Whamcloud - gitweb
smash the HEAD with the contents of b_cmd. HEAD_PRE_CMD_SMASH and
authorphil <phil>
Mon, 17 May 2004 11:52:09 +0000 (11:52 +0000)
committerphil <phil>
Mon, 17 May 2004 11:52:09 +0000 (11:52 +0000)
cMD_PRE_CMD_SMASH are the relevant tags.

The pre-smashing contents of HEAD will be committed by yury into b_cmd as a
merge of the two branches.  These will be stabilized on b_cmd and eventually
landed onto HEAD.

751 files changed:
ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch [deleted file]
ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch [deleted file]
ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch [deleted file]
ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch [deleted file]
ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch [deleted file]
ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series [deleted file]
ldiskfs/ldiskfs/Makefile.in [deleted file]
ldiskfs/ldiskfs/autoMakefile.am [deleted file]
lnet/.cvsignore
lnet/Makefile.am [new file with mode: 0644]
lnet/Makefile.in [deleted file]
lnet/Rules.linux [new file with mode: 0644]
lnet/archdep.m4
lnet/build.m4
lnet/include/Makefile.am [moved from lustre/portals/knals/autoMakefile.am with 66% similarity]
lnet/include/linux/Makefile.am [new file with mode: 0644]
lnet/include/linux/kp30.h
lnet/include/linux/kpr.h
lnet/include/linux/libcfs.h
lnet/include/linux/portals_compat25.h
lnet/include/lnet/Makefile.am [new file with mode: 0644]
lnet/include/lnet/api-support.h
lnet/include/lnet/api.h
lnet/include/lnet/arg-blocks.h
lnet/include/lnet/errno.h
lnet/include/lnet/internal.h
lnet/include/lnet/lib-dispatch.h
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-p30.h
lnet/include/lnet/lib-types.h
lnet/include/lnet/lnet.h
lnet/include/lnet/lnetctl.h
lnet/include/lnet/nal.h
lnet/include/lnet/nalids.h
lnet/include/lnet/p30.h
lnet/include/lnet/ptlctl.h
lnet/include/lnet/types.h
lnet/klnds/.cvsignore
lnet/klnds/Makefile.am [moved from lustre/include/lustre/Makefile.am with 59% similarity]
lnet/klnds/Makefile.in [deleted file]
lnet/klnds/gmlnd/.cvsignore
lnet/klnds/gmlnd/Makefile.am [new file with mode: 0644]
lnet/klnds/gmlnd/Makefile.in [deleted file]
lnet/klnds/gmlnd/autoMakefile.am [deleted file]
lnet/klnds/gmlnd/gmlnd.h
lnet/klnds/gmlnd/gmlnd_api.c
lnet/klnds/gmlnd/gmlnd_module.c
lnet/klnds/iblnd/.cvsignore
lnet/klnds/iblnd/Makefile.am [new file with mode: 0644]
lnet/klnds/iblnd/Makefile.in [deleted file]
lnet/klnds/iblnd/autoMakefile.am [deleted file]
lnet/klnds/iblnd/ibnal.c
lnet/klnds/qswlnd/.cvsignore
lnet/klnds/qswlnd/Makefile.am [new file with mode: 0644]
lnet/klnds/qswlnd/Makefile.in [deleted file]
lnet/klnds/qswlnd/autoMakefile.am [deleted file]
lnet/klnds/qswlnd/qswlnd.c
lnet/klnds/qswlnd/qswlnd.h
lnet/klnds/qswlnd/qswlnd_cb.c
lnet/klnds/scimaclnd/.cvsignore
lnet/klnds/scimaclnd/Makefile.am [new file with mode: 0644]
lnet/klnds/scimaclnd/Makefile.in [deleted file]
lnet/klnds/scimaclnd/autoMakefile.am [deleted file]
lnet/klnds/scimaclnd/scimacnal.c
lnet/klnds/socklnd/.cvsignore
lnet/klnds/socklnd/Makefile.am [new file with mode: 0644]
lnet/klnds/socklnd/Makefile.in [deleted file]
lnet/klnds/socklnd/autoMakefile.am [deleted file]
lnet/klnds/socklnd/socklnd.c
lnet/klnds/socklnd/socklnd.h
lnet/klnds/socklnd/socklnd_cb.c
lnet/libcfs/.cvsignore
lnet/libcfs/Makefile.am [new file with mode: 0644]
lnet/libcfs/Makefile.in [deleted file]
lnet/libcfs/autoMakefile.am [deleted file]
lnet/libcfs/debug.c
lnet/libcfs/module.c
lnet/libcfs/proc.c
lnet/lnet/.cvsignore
lnet/lnet/Makefile.am [moved from lnet/lnet/autoMakefile.am with 57% similarity]
lnet/lnet/Makefile.in [deleted file]
lnet/lnet/api-eq.c
lnet/lnet/api-errno.c
lnet/lnet/api-init.c
lnet/lnet/api-me.c
lnet/lnet/api-ni.c
lnet/lnet/api-wrap.c
lnet/lnet/lib-dispatch.c
lnet/lnet/lib-init.c
lnet/lnet/lib-md.c
lnet/lnet/lib-me.c
lnet/lnet/lib-msg.c
lnet/lnet/lib-ni.c
lnet/lnet/module.c
lnet/router/.cvsignore
lnet/router/Makefile.am [new file with mode: 0644]
lnet/router/Makefile.in [deleted file]
lnet/router/autoMakefile.am [deleted file]
lnet/router/router.c
lnet/router/router.h
lnet/tests/.cvsignore
lnet/tests/Makefile.am [new file with mode: 0644]
lnet/tests/Makefile.in [deleted file]
lnet/tests/autoMakefile.am [deleted file]
lnet/tests/ping_cli.c
lnet/tests/ping_srv.c
lnet/tests/sping_cli.c
lnet/tests/sping_srv.c
lnet/ulnds/Makefile.am
lnet/ulnds/bridge.h
lnet/ulnds/connection.c
lnet/ulnds/procapi.c
lnet/ulnds/procbridge.h
lnet/ulnds/proclib.c
lnet/ulnds/socklnd/Makefile.am
lnet/ulnds/socklnd/bridge.h
lnet/ulnds/socklnd/connection.c
lnet/ulnds/socklnd/procapi.c
lnet/ulnds/socklnd/procbridge.h
lnet/ulnds/socklnd/proclib.c
lnet/utils/Makefile.am
lnet/utils/acceptor.c
lnet/utils/debug.c
lnet/utils/gmlndnid.c
lnet/utils/l_ioctl.c
lnet/utils/parser.c
lnet/utils/parser.h
lnet/utils/portals.c
lnet/utils/wirecheck.c
lustre/.cvsignore
lustre/ChangeLog
lustre/Makefile.am [new file with mode: 0644]
lustre/Makefile.in [deleted file]
lustre/README.kernel-source [deleted file]
lustre/Rules [new file with mode: 0644]
lustre/Rules.in [deleted file]
lustre/autoMakefile.am [deleted file]
lustre/autogen.sh
lustre/cobd/.cvsignore
lustre/cobd/Makefile.am [moved from lustre/cobd/autoMakefile.am with 50% similarity]
lustre/cobd/Makefile.in [deleted file]
lustre/cobd/cache_obd.c
lustre/conf/Makefile.am
lustre/conf/lustre.dtd
lustre/configure.in
lustre/doc/Makefile.am
lustre/doc/lmc.1
lustre/doc/lmc.lyx
lustre/include/.cvsignore
lustre/include/Makefile.am
lustre/include/config.h.in [new file with mode: 0644]
lustre/include/liblustre.h
lustre/include/linux/Makefile.am
lustre/include/linux/lprocfs_status.h
lustre/include/linux/lustre_compat25.h
lustre/include/linux/lustre_dlm.h
lustre/include/linux/lustre_export.h
lustre/include/linux/lustre_fsfilt.h
lustre/include/linux/lustre_idl.h
lustre/include/linux/lustre_lib.h
lustre/include/linux/lustre_lite.h
lustre/include/linux/lustre_log.h
lustre/include/linux/lustre_mds.h
lustre/include/linux/lustre_net.h
lustre/include/linux/lustre_smfs.h [deleted file]
lustre/include/linux/lustre_user.h [moved from lustre/include/lustre/lustre_user.h with 75% similarity]
lustre/include/linux/lvfs.h
lustre/include/linux/lvfs_linux.h
lustre/include/linux/obd.h
lustre/include/linux/obd_class.h
lustre/include/linux/obd_lmv.h [new file with mode: 0644]
lustre/include/linux/obd_support.h
lustre/include/lustre/liblustreapi.h [deleted file]
lustre/install-sh [new file with mode: 0755]
lustre/kernel-tests/.cvsignore [deleted file]
lustre/kernel-tests/Makefile [deleted file]
lustre/kernel_patches/kernel_configs/kernel-2.4.18-chaos-2.4.18-i686-smp.config [deleted file]
lustre/kernel_patches/kernel_configs/kernel-2.4.18-chaos-2.4.18-i686.config [deleted file]
lustre/kernel_patches/kernel_configs/kernel-2.4.20-rh-2.4-i586-smp.config [moved from lustre/kernel_patches/kernel_configs/kernel-2.4.20-rh-2.4-i686-smp.config with 100% similarity]
lustre/kernel_patches/kernel_configs/kernel-2.4.20-rh-2.4-i586.config [moved from lustre/kernel_patches/kernel_configs/kernel-2.4.20-rh-2.4-i686.config with 100% similarity]
lustre/kernel_patches/kernel_configs/kernel-2.4.21-suse-2.4.21-2-x86_64.config [deleted file]
lustre/kernel_patches/patches/2.6.0-mm2.patch [new file with mode: 0644]
lustre/kernel_patches/patches/2.6.0-test6-mm4.patch [new file with mode: 0644]
lustre/kernel_patches/patches/add_page_private.patch
lustre/kernel_patches/patches/bproc-patch-2.4.20
lustre/kernel_patches/patches/cifs_2.6.5.patch [deleted file]
lustre/kernel_patches/patches/configurable-x86-stack-2.4.21-sles8sp3.patch [deleted file]
lustre/kernel_patches/patches/dev_read_only-suse-2.4.19.patch [deleted file]
lustre/kernel_patches/patches/dev_read_only_2.6.0.patch [moved from lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch with 100% similarity]
lustre/kernel_patches/patches/directio-2.4.24.patch [deleted file]
lustre/kernel_patches/patches/dynamic-locks-2.4.24.patch [new file with mode: 0644]
lustre/kernel_patches/patches/export-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/export-2.6.3.patch [new file with mode: 0644]
lustre/kernel_patches/patches/export-ext3-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/export-truncate-2.5.63.patch [moved from lustre/kernel_patches/patches/export-truncate-2.6-suse.patch with 100% similarity]
lustre/kernel_patches/patches/export_symbols-2.6.0-test6.patch [new file with mode: 0644]
lustre/kernel_patches/patches/export_symbols-2.6.0.patch [moved from lustre/kernel_patches/patches/export_symbols-2.6-suse.patch with 50% similarity]
lustre/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/exports_2.4.19-suse.patch
lustre/kernel_patches/patches/ext-2.4-patch-1-suse-2.4.19.patch [deleted file]
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.18-chaos.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.20.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.21-chaos.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.21-suse2.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.22-rh.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.6.0.patch [moved from lustre/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch with 98% similarity]
lustre/kernel_patches/patches/ext3-extents-2.4.18-chaos-pdirops.patch
lustre/kernel_patches/patches/ext3-extents-2.4.18-chaos.patch
lustre/kernel_patches/patches/ext3-extents-2.4.24.patch [deleted file]
lustre/kernel_patches/patches/ext3-htree-2.4.19-pre1.patch
lustre/kernel_patches/patches/ext3-htree-2.4.21-chaos.patch
lustre/kernel_patches/patches/ext3-htree-2.4.22-rh.patch
lustre/kernel_patches/patches/ext3-htree-suse.patch
lustre/kernel_patches/patches/ext3-htree.patch
lustre/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/ext3-init-generation-2.6.0.patch [moved from lustre/kernel_patches/patches/ext3-init-generation-2.6-suse.patch with 100% similarity]
lustre/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/ext3-map_inode_page-2.6.0.patch [moved from ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch with 100% similarity]
lustre/kernel_patches/patches/ext3-mballoc-2.4.21-suse2.patch
lustre/kernel_patches/patches/ext3-mballoc-2.4.24.patch
lustre/kernel_patches/patches/ext3-mds-num-2.4.24.patch [new file with mode: 0644]
lustre/kernel_patches/patches/ext3-orphan_lock-2.4.19-suse.patch
lustre/kernel_patches/patches/ext3-pdirops-2.4.24.patch [new file with mode: 0644]
lustre/kernel_patches/patches/ext3-san-jdike-2.5.73.patch [moved from ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch with 100% similarity]
lustre/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/ext3-trusted_ea-suse-2.4.19.patch [deleted file]
lustre/kernel_patches/patches/ext3-use-after-free-suse.patch
lustre/kernel_patches/patches/ext3-wantedi-2.6.3.patch [moved from ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch with 91% similarity]
lustre/kernel_patches/patches/ext3-wantedi-2.6.patch [moved from lustre/kernel_patches/patches/ext3-wantedi-2.6-suse.patch with 72% similarity]
lustre/kernel_patches/patches/ext3-wantedi-misc-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/ext3-xattr-header-move-2.6.suse.patch [deleted file]
lustre/kernel_patches/patches/fs-intent-2.6.3-mm4.patch [moved from lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch with 77% similarity]
lustre/kernel_patches/patches/header-guards-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/htree-ext3-2.4.18.patch
lustre/kernel_patches/patches/invalidate_show-2.4.21-sles8sp3.patch [deleted file]
lustre/kernel_patches/patches/invalidate_show-2.6.0.patch [new file with mode: 0644]
lustre/kernel_patches/patches/iopen-2.4.18-2.patch
lustre/kernel_patches/patches/iopen-2.4.18.patch
lustre/kernel_patches/patches/iopen-2.4.19-suse.patch
lustre/kernel_patches/patches/iopen-2.4.21-sles8sp3.patch [deleted file]
lustre/kernel_patches/patches/iopen-2.5.73.patch [new file with mode: 0644]
lustre/kernel_patches/patches/iopen-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/iopen-2.6.0-test6.patch [new file with mode: 0644]
lustre/kernel_patches/patches/iopen-2.6.0.patch [new file with mode: 0644]
lustre/kernel_patches/patches/iopen-2.6.3-mm4.patch [moved from lustre/kernel_patches/patches/iopen-2.6-vanilla.patch with 77% similarity]
lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/kernel_text_address-2.4.21-sles8sp3.patch [deleted file]
lustre/kernel_patches/patches/kernel_text_address-2.6.0.patch [new file with mode: 0644]
lustre/kernel_patches/patches/kernel_text_address-2.6.3.patch [new file with mode: 0644]
lustre/kernel_patches/patches/kexec-2.6.0-full.patch [new file with mode: 0644]
lustre/kernel_patches/patches/kexec-2.6.0-test6-full.patch [new file with mode: 0644]
lustre/kernel_patches/patches/linux-2.4.19-pre1-xattr-0.8.54.patch
lustre/kernel_patches/patches/linux-2.4.19-xattr-0.8.54-suse.patch
lustre/kernel_patches/patches/linux-2.4.20-tmpfs-iopen.patch [new file with mode: 0644]
lustre/kernel_patches/patches/linux-2.4.20-tmpfs-xattr.patch [new file with mode: 0644]
lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-chaos.patch
lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-hp.patch
lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54.patch
lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-chaos.patch
lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-suse.patch
lustre/kernel_patches/patches/linux-2.4.22-xattr-0.8.54.patch
lustre/kernel_patches/patches/linux-2.4.24-xattr-0.8.54.patch
lustre/kernel_patches/patches/linux-2.6.3-CITI_NFS4_ALL.patch [new file with mode: 0644]
lustre/kernel_patches/patches/linux-2.6.3-nfs-intent.patch [new file with mode: 0644]
lustre/kernel_patches/patches/lkcd-cvs-2.6.0-test6.patch [new file with mode: 0644]
lustre/kernel_patches/patches/lkcd-kernel-changes-2.6.0-test6.patch [new file with mode: 0644]
lustre/kernel_patches/patches/lustre_version.patch
lustre/kernel_patches/patches/mkdep-revert-rh-2.4.patch [deleted file]
lustre/kernel_patches/patches/nfs-cifs-intent-2.6.3-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/qla2xxx-v8.00.00b1-2.5.73.patch [new file with mode: 0644]
lustre/kernel_patches/patches/removepage-2.6-suse.patch [deleted file]
lustre/kernel_patches/patches/removepage-2.6.0.patch [new file with mode: 0644]
lustre/kernel_patches/patches/removepage-vanilla-2.6.5.patch [deleted file]
lustre/kernel_patches/patches/revalide-special-oops-2.6.4.suse.patch [deleted file]
lustre/kernel_patches/patches/tcp-zero-copy-2.4.21-sles8sp3.patch [deleted file]
lustre/kernel_patches/patches/uml-2.6.0-fix.patch [new file with mode: 0644]
lustre/kernel_patches/patches/uml-fix-2.6.3.patch [new file with mode: 0644]
lustre/kernel_patches/patches/uml-patch-2.4.23-1.patch [moved from lustre/kernel_patches/patches/uml-patch-2.4.24-1.patch with 98% similarity]
lustre/kernel_patches/patches/uml-patch-2.6.0-1-fix1.patch [new file with mode: 0644]
lustre/kernel_patches/patches/uml-patch-2.6.0-1.patch [new file with mode: 0644]
lustre/kernel_patches/patches/uml-patch-2.6.0-test5.patch [new file with mode: 0644]
lustre/kernel_patches/patches/uml-patch-2.6.3-rc2-1.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_intent-2.4.18-18-chaos65.patch
lustre/kernel_patches/patches/vfs_intent-2.4.19-pre1.patch
lustre/kernel_patches/patches/vfs_intent-2.4.19-suse.patch
lustre/kernel_patches/patches/vfs_intent-2.4.20-hp.patch
lustre/kernel_patches/patches/vfs_intent-2.4.20-rh.patch
lustre/kernel_patches/patches/vfs_intent-2.4.20-vanilla.patch
lustre/kernel_patches/patches/vfs_intent-2.4.21-chaos.patch
lustre/kernel_patches/patches/vfs_intent-2.4.21-sles8sp3.patch [deleted file]
lustre/kernel_patches/patches/vfs_intent-2.4.21-suse2.patch
lustre/kernel_patches/patches/vfs_intent-2.4.22-rh.patch
lustre/kernel_patches/patches/vfs_intent-2.6.3-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_intent-2.6.3.patch [moved from lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch with 81% similarity]
lustre/kernel_patches/patches/vfs_intent_2.6.0-test1.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_intent_2.6.0-test6.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_intent_2.6.0.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_mntcwd_2.5.72_rev1.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_nointent-2.6.3-mm4.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_nointent_2.6.0-test1.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_nointent_2.6.0-test6.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_nointent_2.6.0-uml1.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_nointent_2.6.3-suse.patch [moved from lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch with 76% similarity]
lustre/kernel_patches/patches/vfs_races_2.5.72_rev1.patch [moved from lustre/kernel_patches/patches/vfs_races-2.6-suse.patch with 100% similarity]
lustre/kernel_patches/patches/xattr-0.8.54-2.4.22-rh.patch
lustre/kernel_patches/series/2.6-suse.series [deleted file]
lustre/kernel_patches/series/2.6.3-mm4 [new file with mode: 0644]
lustre/kernel_patches/series/chaos-2.4.18
lustre/kernel_patches/series/chaos-2.4.18-pdirops
lustre/kernel_patches/series/chaos-2.4.21
lustre/kernel_patches/series/kgdb_2.6.0 [new file with mode: 0644]
lustre/kernel_patches/series/kgdb_2.6.0_test1 [new file with mode: 0644]
lustre/kernel_patches/series/kgdb_2.6.0_test6 [new file with mode: 0644]
lustre/kernel_patches/series/ldiskfs-2.6-suse.series [deleted file]
lustre/kernel_patches/series/ldiskfs-2.6.6-vanilla.series [deleted file]
lustre/kernel_patches/series/rh-2.4.20
lustre/kernel_patches/series/suse-2.4.19
lustre/kernel_patches/series/suse-2.4.21-2
lustre/kernel_patches/series/suse-2.6.3 [new file with mode: 0644]
lustre/kernel_patches/series/suse-sles8sp3-2.4.21 [deleted file]
lustre/kernel_patches/series/uml_2.6.0 [new file with mode: 0644]
lustre/kernel_patches/series/uml_2.6.0_test3 [new file with mode: 0644]
lustre/kernel_patches/series/vanilla-2.4.20
lustre/kernel_patches/series/vanilla-2.4.24
lustre/kernel_patches/series/vanilla-2.6.3-nfs4 [new file with mode: 0644]
lustre/kernel_patches/series/vanilla-2.6.6 [deleted file]
lustre/kernel_patches/targets/2.6-suse.target [deleted file]
lustre/kernel_patches/targets/chaos-2.4.18.target [deleted file]
lustre/kernel_patches/targets/rh-2.4.target
lustre/kernel_patches/targets/suse-2.4.21-2.target [deleted file]
lustre/kernel_patches/which_patch
lustre/ldiskfs/.cvsignore [deleted file]
lustre/ldiskfs/Makefile.in [deleted file]
lustre/ldiskfs/autoMakefile.am [deleted file]
lustre/ldlm/.cvsignore
lustre/ldlm/Makefile.am
lustre/ldlm/Makefile.mk
lustre/ldlm/ldlm_extent.c
lustre/ldlm/ldlm_internal.h
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/ldlm/ldlm_resource.c
lustre/liblustre/Makefile.am
lustre/liblustre/dir.c
lustre/liblustre/file.c
lustre/liblustre/genlib.sh
lustre/liblustre/llite_lib.c
lustre/liblustre/namei.c
lustre/liblustre/rw.c
lustre/liblustre/super.c
lustre/liblustre/tests/.cvsignore
lustre/liblustre/tests/Makefile.am
lustre/liblustre/tests/echo_test.c
lustre/liblustre/tests/recovery_small.c
lustre/liblustre/tests/replay_single.c
lustre/liblustre/tests/sanity.c
lustre/liblustre/tests/test_common.c
lustre/liblustre/tests/test_common.h
lustre/llite/.cvsignore
lustre/llite/Makefile.am [new file with mode: 0644]
lustre/llite/Makefile.in [deleted file]
lustre/llite/Makefile.mk
lustre/llite/autoMakefile.am [deleted file]
lustre/llite/dcache.c
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_close.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/llite_nfs.c
lustre/llite/lproc_llite.c
lustre/llite/namei.c
lustre/llite/rw.c
lustre/llite/rw24.c
lustre/llite/rw26.c
lustre/llite/special.c [deleted file]
lustre/llite/super.c
lustre/llite/super25.c
lustre/llite/symlink.c
lustre/lmv/.cvsignore [moved from lustre/include/lustre/.cvsignore with 77% similarity]
lustre/lmv/Makefile.am [new file with mode: 0644]
lustre/lmv/lmv_intent.c [new file with mode: 0644]
lustre/lmv/lmv_internal.h [new file with mode: 0644]
lustre/lmv/lmv_obd.c [new file with mode: 0644]
lustre/lmv/lmv_objmgr.c [new file with mode: 0644]
lustre/lov/.cvsignore
lustre/lov/Makefile.am [moved from lustre/lov/autoMakefile.am with 56% similarity]
lustre/lov/Makefile.in [deleted file]
lustre/lov/lov_internal.h
lustre/lov/lov_log.c
lustre/lov/lov_obd.c
lustre/lov/lov_pack.c
lustre/lov/lproc_lov.c
lustre/lvfs/.cvsignore
lustre/lvfs/Makefile.am [new file with mode: 0644]
lustre/lvfs/Makefile.in [deleted file]
lustre/lvfs/Makefile.mk
lustre/lvfs/autoMakefile.am [deleted file]
lustre/lvfs/fsfilt_ext3.c
lustre/lvfs/fsfilt_reiserfs.c
lustre/lvfs/fsfilt_smfs.c [deleted file]
lustre/lvfs/llog_lvfs.c [deleted file]
lustre/lvfs/lvfs_common.c
lustre/lvfs/lvfs_internal.h
lustre/lvfs/lvfs_linux.c
lustre/lvfs/lvfs_reint.c [deleted file]
lustre/lvfs/lvfs_undo.c [deleted file]
lustre/lvfs/lvfs_userfs.c
lustre/mdc/.cvsignore
lustre/mdc/Makefile.am [moved from lustre/mdc/autoMakefile.am with 57% similarity]
lustre/mdc/Makefile.in [deleted file]
lustre/mdc/mdc_internal.h
lustre/mdc/mdc_lib.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/mdc/mdc_request.c
lustre/mds/.cvsignore
lustre/mds/Makefile.am [new file with mode: 0644]
lustre/mds/Makefile.in [deleted file]
lustre/mds/autoMakefile.am [deleted file]
lustre/mds/handler.c
lustre/mds/lproc_mds.c
lustre/mds/mds_fs.c
lustre/mds/mds_internal.h
lustre/mds/mds_lib.c
lustre/mds/mds_lmv.c [new file with mode: 0644]
lustre/mds/mds_log.c
lustre/mds/mds_lov.c
lustre/mds/mds_open.c
lustre/mds/mds_reint.c
lustre/mds/mds_unlink_open.c
lustre/mgmt/.cvsignore
lustre/mgmt/Makefile.am [moved from lustre/portals/autoMakefile.am with 59% similarity]
lustre/mgmt/Makefile.in [deleted file]
lustre/mgmt/autoMakefile.am [deleted file]
lustre/mgmt/mgmt_cli.c
lustre/mgmt/mgmt_svc.c
lustre/missing [new file with mode: 0755]
lustre/mkinstalldirs [new file with mode: 0755]
lustre/obdclass/.cvsignore
lustre/obdclass/Makefile.am [new file with mode: 0644]
lustre/obdclass/Makefile.in [deleted file]
lustre/obdclass/Makefile.mk
lustre/obdclass/autoMakefile.am [deleted file]
lustre/obdclass/class_obd.c
lustre/obdclass/genops.c
lustre/obdclass/llog.c [moved from lustre/lvfs/llog.c with 65% similarity]
lustre/obdclass/llog_cat.c [moved from lustre/lvfs/llog_cat.c with 57% similarity]
lustre/obdclass/llog_internal.h [new file with mode: 0644]
lustre/obdclass/llog_ioctl.c
lustre/obdclass/llog_lvfs.c [new file with mode: 0644]
lustre/obdclass/llog_obd.c
lustre/obdclass/llog_test.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/lustre_peer.c
lustre/obdclass/mea.c [new file with mode: 0644]
lustre/obdclass/obd_config.c
lustre/obdclass/simple.c
lustre/obdclass/sysctl.c
lustre/obdecho/.cvsignore
lustre/obdecho/Makefile.am [moved from lustre/obdecho/autoMakefile.am with 54% similarity]
lustre/obdecho/Makefile.in [deleted file]
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c
lustre/obdfilter/.cvsignore
lustre/obdfilter/Makefile.am [new file with mode: 0644]
lustre/obdfilter/Makefile.in [deleted file]
lustre/obdfilter/autoMakefile.am [deleted file]
lustre/obdfilter/filter.c
lustre/obdfilter/filter_internal.h
lustre/obdfilter/filter_io.c
lustre/obdfilter/filter_io_24.c
lustre/obdfilter/filter_io_26.c
lustre/obdfilter/filter_log.c
lustre/obdfilter/filter_lvb.c
lustre/obdfilter/lproc_obdfilter.c
lustre/osc/.cvsignore
lustre/osc/Makefile.am [moved from lustre/osc/autoMakefile.am with 58% similarity]
lustre/osc/Makefile.in [deleted file]
lustre/osc/lproc_osc.c
lustre/osc/osc_create.c
lustre/osc/osc_request.c
lustre/ost/.cvsignore
lustre/ost/Makefile.am [moved from lustre/ost/autoMakefile.am with 54% similarity]
lustre/ost/Makefile.in [deleted file]
lustre/ost/ost_handler.c
lustre/portals/.cvsignore
lustre/portals/Makefile.am [new file with mode: 0644]
lustre/portals/Makefile.in [deleted file]
lustre/portals/Rules.linux [new file with mode: 0644]
lustre/portals/archdep.m4
lustre/portals/build.m4
lustre/portals/include/Makefile.am [moved from lnet/klnds/autoMakefile.am with 66% similarity]
lustre/portals/include/linux/Makefile.am [new file with mode: 0644]
lustre/portals/include/linux/kp30.h
lustre/portals/include/linux/kpr.h
lustre/portals/include/linux/libcfs.h
lustre/portals/include/linux/portals_compat25.h
lustre/portals/include/portals/Makefile.am [new file with mode: 0644]
lustre/portals/include/portals/api-support.h
lustre/portals/include/portals/api.h
lustre/portals/include/portals/arg-blocks.h
lustre/portals/include/portals/errno.h
lustre/portals/include/portals/lib-dispatch.h
lustre/portals/include/portals/lib-p30.h
lustre/portals/include/portals/lib-types.h
lustre/portals/include/portals/nal.h
lustre/portals/include/portals/nalids.h
lustre/portals/include/portals/p30.h
lustre/portals/include/portals/ptlctl.h
lustre/portals/include/portals/types.h
lustre/portals/knals/.cvsignore
lustre/portals/knals/Makefile.am [moved from lnet/autoMakefile.am with 59% similarity]
lustre/portals/knals/Makefile.in [deleted file]
lustre/portals/knals/gmnal/.cvsignore
lustre/portals/knals/gmnal/Makefile.am [new file with mode: 0644]
lustre/portals/knals/gmnal/Makefile.in [deleted file]
lustre/portals/knals/gmnal/autoMakefile.am [deleted file]
lustre/portals/knals/gmnal/gmnal.h
lustre/portals/knals/gmnal/gmnal_api.c
lustre/portals/knals/gmnal/gmnal_module.c
lustre/portals/knals/ibnal/.cvsignore
lustre/portals/knals/ibnal/Makefile.am [new file with mode: 0644]
lustre/portals/knals/ibnal/Makefile.in [deleted file]
lustre/portals/knals/ibnal/autoMakefile.am [deleted file]
lustre/portals/knals/ibnal/ibnal.c
lustre/portals/knals/qswnal/.cvsignore
lustre/portals/knals/qswnal/Makefile.am [new file with mode: 0644]
lustre/portals/knals/qswnal/Makefile.in [deleted file]
lustre/portals/knals/qswnal/autoMakefile.am [deleted file]
lustre/portals/knals/qswnal/qswnal.c
lustre/portals/knals/qswnal/qswnal.h
lustre/portals/knals/qswnal/qswnal_cb.c
lustre/portals/knals/scimacnal/.cvsignore
lustre/portals/knals/scimacnal/Makefile.am [new file with mode: 0644]
lustre/portals/knals/scimacnal/Makefile.in [deleted file]
lustre/portals/knals/scimacnal/autoMakefile.am [deleted file]
lustre/portals/knals/scimacnal/scimacnal.c
lustre/portals/knals/socknal/.cvsignore
lustre/portals/knals/socknal/Makefile.am [new file with mode: 0644]
lustre/portals/knals/socknal/Makefile.in [deleted file]
lustre/portals/knals/socknal/autoMakefile.am [deleted file]
lustre/portals/knals/socknal/socknal.c
lustre/portals/knals/socknal/socknal.h
lustre/portals/knals/socknal/socknal_cb.c
lustre/portals/libcfs/.cvsignore
lustre/portals/libcfs/Makefile.am [new file with mode: 0644]
lustre/portals/libcfs/Makefile.in [deleted file]
lustre/portals/libcfs/autoMakefile.am [deleted file]
lustre/portals/libcfs/debug.c
lustre/portals/libcfs/module.c
lustre/portals/libcfs/proc.c
lustre/portals/portals/.cvsignore
lustre/portals/portals/Makefile.am [moved from lustre/portals/portals/autoMakefile.am with 57% similarity]
lustre/portals/portals/Makefile.in [deleted file]
lustre/portals/portals/api-eq.c
lustre/portals/portals/api-errno.c
lustre/portals/portals/api-init.c
lustre/portals/portals/api-me.c
lustre/portals/portals/api-ni.c
lustre/portals/portals/api-wrap.c
lustre/portals/portals/lib-dispatch.c
lustre/portals/portals/lib-init.c
lustre/portals/portals/lib-md.c
lustre/portals/portals/lib-me.c
lustre/portals/portals/lib-msg.c
lustre/portals/portals/lib-ni.c
lustre/portals/portals/module.c
lustre/portals/router/.cvsignore
lustre/portals/router/Makefile.am [new file with mode: 0644]
lustre/portals/router/Makefile.in [deleted file]
lustre/portals/router/autoMakefile.am [deleted file]
lustre/portals/router/router.c
lustre/portals/router/router.h
lustre/portals/tests/.cvsignore
lustre/portals/tests/Makefile.am [new file with mode: 0644]
lustre/portals/tests/Makefile.in [deleted file]
lustre/portals/tests/autoMakefile.am [deleted file]
lustre/portals/tests/ping_cli.c
lustre/portals/tests/ping_srv.c
lustre/portals/tests/sping_cli.c
lustre/portals/tests/sping_srv.c
lustre/portals/unals/Makefile.am
lustre/portals/unals/bridge.h
lustre/portals/unals/connection.c
lustre/portals/unals/procapi.c
lustre/portals/unals/procbridge.h
lustre/portals/unals/proclib.c
lustre/portals/utils/Makefile.am
lustre/portals/utils/acceptor.c
lustre/portals/utils/debug.c
lustre/portals/utils/gmnalnid.c
lustre/portals/utils/l_ioctl.c
lustre/portals/utils/parser.c
lustre/portals/utils/parser.h
lustre/portals/utils/portals.c
lustre/portals/utils/wirecheck.c
lustre/ptlbd/.cvsignore
lustre/ptlbd/Makefile.am [moved from lustre/ptlbd/autoMakefile.am with 50% similarity]
lustre/ptlbd/Makefile.in [deleted file]
lustre/ptlbd/blk.c
lustre/ptlbd/client.c
lustre/ptlbd/server.c
lustre/ptlrpc/.cvsignore
lustre/ptlrpc/Makefile.am [moved from lustre/ptlrpc/autoMakefile.am with 72% similarity]
lustre/ptlrpc/Makefile.in [deleted file]
lustre/ptlrpc/Makefile.mk
lustre/ptlrpc/client.c
lustre/ptlrpc/connection.c
lustre/ptlrpc/events.c
lustre/ptlrpc/import.c
lustre/ptlrpc/llog_client.c
lustre/ptlrpc/llog_net.c
lustre/ptlrpc/llog_server.c
lustre/ptlrpc/niobuf.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/pers.c
lustre/ptlrpc/pinger.c
lustre/ptlrpc/ptlrpc_internal.h
lustre/ptlrpc/ptlrpc_module.c
lustre/ptlrpc/recov_thread.c
lustre/ptlrpc/recover.c
lustre/ptlrpc/service.c
lustre/scripts/.cvsignore
lustre/scripts/Makefile.am
lustre/scripts/collect-stats.sh [deleted file]
lustre/scripts/graph-rpcs.sh [deleted file]
lustre/scripts/land1.sh
lustre/scripts/lbuild
lustre/scripts/lmake
lustre/scripts/lustre-kernel-2.4.spec.in
lustre/scripts/lustre.spec.in
lustre/scripts/merge1.sh
lustre/scripts/version_tag.pl [moved from lustre/scripts/version_tag.pl.in with 94% similarity]
lustre/smfs/.cvsignore
lustre/smfs/Makefile.am [new file with mode: 0644]
lustre/smfs/Makefile.in [deleted file]
lustre/smfs/autoMakefile.am [deleted file]
lustre/smfs/cache.c
lustre/smfs/cache_space.c [deleted file]
lustre/smfs/dir.c
lustre/smfs/file.c
lustre/smfs/inode.c
lustre/smfs/ioctl.c [deleted file]
lustre/smfs/journal.c
lustre/smfs/journal_ext3.c [new file with mode: 0644]
lustre/smfs/kml.c
lustre/smfs/kml_idl.h [new file with mode: 0644]
lustre/smfs/options.c
lustre/smfs/reint.c [new file with mode: 0644]
lustre/smfs/sm_fs.c
lustre/smfs/smfs_internal.h
lustre/smfs/smfs_llog.c
lustre/smfs/smfs_support.h [new file with mode: 0644]
lustre/smfs/super.c
lustre/smfs/symlink.c
lustre/smfs/sysctl.c
lustre/snapfs/.cvsignore
lustre/snapfs/Makefile.am [new file with mode: 0644]
lustre/snapfs/Makefile.in [deleted file]
lustre/snapfs/autoMakefile.am [deleted file]
lustre/snapfs/options.c
lustre/snapfs/utils/Makefile.am
lustre/snapfs/utils/parser.c
lustre/tests/.RC_CURRENT.tag
lustre/tests/.cvsignore
lustre/tests/Makefile.am
lustre/tests/acceptance-small.sh
lustre/tests/ba-echo.sh [new file with mode: 0644]
lustre/tests/ba-mount.sh [new file with mode: 0644]
lustre/tests/cfg/insanity-adev.sh
lustre/tests/cfg/insanity-local.sh
lustre/tests/cfg/insanity-mdev.sh
lustre/tests/cfg/lmv.sh [new file with mode: 0644]
lustre/tests/cfg/local.sh
lustre/tests/cfg/mdev.sh
lustre/tests/cmknod.c
lustre/tests/conf-sanity.sh
lustre/tests/copy_attr.c [deleted file]
lustre/tests/createdestroy.c
lustre/tests/createmany.c
lustre/tests/directio.c
lustre/tests/echo.sh
lustre/tests/fsx.c
lustre/tests/insanity.sh
lustre/tests/lfsck_config.sh [deleted file]
lustre/tests/lfscktest.sh [deleted file]
lustre/tests/lfscktest_config.sh [deleted file]
lustre/tests/ll_dirstripe_verify.c [deleted file]
lustre/tests/llmount.sh
lustre/tests/llmountcleanup.sh
lustre/tests/lmv.sh [new file with mode: 0755]
lustre/tests/local.sh
lustre/tests/lov.sh
lustre/tests/lp_utils.c [deleted file]
lustre/tests/lp_utils.h [deleted file]
lustre/tests/lsmfs.sh [deleted file]
lustre/tests/mcr-routed-config.sh
lustre/tests/mcrlov.sh
lustre/tests/mkdirmany.c
lustre/tests/mount2.sh [new file with mode: 0644]
lustre/tests/mount2fs.sh
lustre/tests/mount2lov.sh [new file with mode: 0644]
lustre/tests/multiop.c
lustre/tests/munlink.c
lustre/tests/oos.sh
lustre/tests/oos2.sh
lustre/tests/open_delay.c
lustre/tests/openclose.c
lustre/tests/openfile.c
lustre/tests/openfilleddirunlink.c [deleted file]
lustre/tests/parallel_grouplock.c [deleted file]
lustre/tests/recovery-cleanup.sh
lustre/tests/recovery-small-upcall.sh
lustre/tests/recovery-small.sh
lustre/tests/replay-dual.sh
lustre/tests/replay-ost-single.sh
lustre/tests/replay-single.sh
lustre/tests/run-llog.sh
lustre/tests/run_lfscktest.sh [deleted file]
lustre/tests/runas.c
lustre/tests/runregression-brw.sh
lustre/tests/runregression-mds.sh
lustre/tests/runregression-net.sh
lustre/tests/runtests
lustre/tests/sanity.sh
lustre/tests/sanityN.sh
lustre/tests/socketserver
lustre/tests/stat.c
lustre/tests/stat_fs.h
lustre/tests/statmany.c
lustre/tests/test-framework.sh
lustre/tests/uml.sh
lustre/tests/write_append_truncate.c
lustre/tests/write_disjoint.c
lustre/utils/Lustre/lustredb.py
lustre/utils/Makefile.am
lustre/utils/lconf
lustre/utils/lctl.c
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/llmount.c
lustre/utils/lmc
lustre/utils/lustre_cfg.c
lustre/utils/obd.c
lustre/utils/obdctl.h
lustre/utils/parser.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

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 (file)
index 638b4bf..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c   2004-04-02 16:40:18.000000000 -0500
-+++ linux-stage/fs/ext3/super.c        2004-04-02 16:40:18.000000000 -0500
-@@ -115,6 +115,8 @@
-               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
-@@ -1774,6 +1776,8 @@
-       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
-@@ -2088,6 +2092,10 @@
-                         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);
-+
- 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 (file)
index 2327263..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: linux-2.6.0/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.0.orig/include/linux/ext3_fs_sb.h        2003-06-24 18:05:26.000000000 +0400
-+++ linux-2.6.0/include/linux/ext3_fs_sb.h     2003-12-31 01:09:26.000000000 +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
- /*
-  * third extended-fs super-block data in memory
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 (file)
index 39fa9ce..0000000
+++ /dev/null
@@ -1,833 +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,11 @@
-       inode->i_generation = EXT3_SB(sb)->s_next_generation++;
-       ei->i_state = EXT3_STATE_NEW;
-+      if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) {
-+              ei->i_extra_isize = sizeof(__u16)       /* i_extra_isize */
-+                              + sizeof(__u16);        /* i_pad1 */
-+      } else
-+              ei->i_extra_isize = 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)
-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_ibode_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);
-+      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;
-@@ -380,7 +469,7 @@
-       if (!bh)
-               goto cleanup;
-       ea_bdebug(bh, "b_count=%d, refcount=%d",
--              atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
-+              (int) atomic_read(&(bh->b_count)), (int) 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)) {
-@@ -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);
-+      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);
-+      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);
-+      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 + %d > 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
-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-include-fixes-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch
deleted file mode 100644 (file)
index 28e3587..0000000
+++ /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              0x20000  /* 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/iopen-2.6-suse.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch
deleted file mode 100644 (file)
index 2133355..0000000
+++ /dev/null
@@ -1,475 +0,0 @@
- fs/ext3/inode.c                    |    3 
- fs/ext3/iopen.c                    |  239 +++++++++++++++++++++++++++++++++++++
- fs/ext3/iopen.h                    |   15 ++
- fs/ext3/namei.c                    |   13 ++
- fs/ext3/super.c                    |   17 ++
- include/linux/ext3_fs.h            |    2 
- 7 files changed, 304 insertions(+), 1 deletion(-)
-
-Index: linux-stage/fs/ext3/Makefile
-===================================================================
---- linux-stage.orig/fs/ext3/Makefile  2004-05-07 16:00:16.000000000 -0400
-+++ linux-stage/fs/ext3/Makefile       2004-05-07 16:00:17.000000000 -0400
-@@ -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   2004-05-07 16:00:16.000000000 -0400
-+++ linux-stage/fs/ext3/inode.c        2004-05-07 17:21:59.000000000 -0400
-@@ -37,6 +37,7 @@
- #include <linux/mpage.h>
- #include <linux/uio.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- /*
-@@ -2472,6 +2473,9 @@
-       ei->i_acl = EXT3_ACL_NOT_CACHED;
-       ei->i_default_acl = EXT3_ACL_NOT_CACHED;
- #endif
-+      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-stage.orig/fs/ext3/iopen.c   2004-05-07 16:00:17.000000000 -0400
-+++ linux-stage/fs/ext3/iopen.c        2004-05-07 17:22:37.000000000 -0400
-@@ -0,0 +1,272 @@
-+/*
-+ * 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);
-+              alternate->d_vfs_flags |= DCACHE_REFERENCED;
-+              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;
-+
-+      /* 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_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   2004-05-07 16:00:17.000000000 -0400
-+++ linux-stage/fs/ext3/iopen.h        2004-05-07 16:00:17.000000000 -0400
-@@ -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   2004-05-07 16:00:16.000000000 -0400
-+++ linux-stage/fs/ext3/namei.c        2004-05-07 16:00:17.000000000 -0400
-@@ -37,6 +37,7 @@
- #include <linux/buffer_head.h>
- #include <linux/smp_lock.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- /*
-@@ -979,6 +980,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) {
-@@ -989,10 +993,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);
- }
-@@ -2019,10 +2021,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);
-@@ -2139,6 +2137,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) {
-+                      (void)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)
- {
-@@ -2161,7 +2176,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);
-       return err;
- }
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c   2004-05-07 16:00:16.000000000 -0400
-+++ linux-stage/fs/ext3/super.c        2004-05-07 17:21:59.000000000 -0400
-@@ -536,7 +536,7 @@
-       Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, Opt_noload,
-       Opt_commit, Opt_journal_update, Opt_journal_inum,
-       Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
--      Opt_ignore, Opt_err,
-+      Opt_ignore, Opt_err, Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- };
- static match_table_t tokens = {
-@@ -575,6 +575,9 @@
-       {Opt_ignore, "noquota"},
-       {Opt_ignore, "quota"},
-       {Opt_ignore, "usrquota"},
-+      {Opt_iopen,  "iopen"},
-+      {Opt_noiopen,  "noiopen"},
-+      {Opt_iopen_nopriv,  "iopen_nopriv"},
-       {Opt_err, NULL}
- };
-@@ -762,6 +765,18 @@
-               case Opt_abort:
-                       set_opt(sbi->s_mount_opt, ABORT);
-                       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   2004-05-07 16:00:16.000000000 -0400
-+++ linux-stage/include/linux/ext3_fs.h        2004-05-07 16:00:17.000000000 -0400
-@@ -325,6 +325,8 @@
- #define EXT3_MOUNT_NO_UID32           0x2000  /* Disable 32-bit UIDs */
- #define EXT3_MOUNT_XATTR_USER         0x4000  /* Extended user attributes */
- #define EXT3_MOUNT_POSIX_ACL          0x8000  /* POSIX Access Control Lists */
-+#define EXT3_MOUNT_IOPEN             0x10000  /* Allow access via iopen */
-+#define EXT3_MOUNT_IOPEN_NOPRIV              0x20000  /* 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-suse.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series
deleted file mode 100644 (file)
index cff99dd..0000000
+++ /dev/null
@@ -1,9 +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-init-generation-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
diff --git a/ldiskfs/ldiskfs/Makefile.in b/ldiskfs/ldiskfs/Makefile.in
deleted file mode 100644 (file)
index 7d1e229..0000000
+++ /dev/null
@@ -1,19 +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
-ldiskfs_sources := $(notdir $(ext3_sources) $(ext3_headers)) $(new_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 (file)
index b24081e..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-if LDISKFS
-modulefs_DATA = ldiskfs$(KMODEXT)
-endif
-
-ldiskfs_linux_headers := $(addprefix linux/,$(subst ext3,ldiskfs,$(notdir $(linux_headers))))
-
-$(filter %.c,$(ldiskfs_sources)): sources $(ldiskfs_linux_headers) $(filter %.h,$(ldiskfs_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/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@/kernel_patches/series/ldiskfs-2.6-suse.series
-
-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
-       cd linux-stage && quilt setup -l ../$(series)
-       cp $(ext3_sources) $(ext3_headers) $(ext3_extra) linux-stage/fs/ext3
-       cp $(linux_headers) linux-stage/include/linux
-       cd linux-stage && quilt push -a -q
-       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))) ; do \
-               echo -n " ext3$$i" ; \
-               sed $(strip $(ldiskfs_sed_flags)) \
-                       linux-stage/include/linux/ext3$$i \
-                       > linux/ldiskfs$$i ; \
-       done
-       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 = *.o *.ko *.mod.c
-CLEANFILES = sources *.c *.h
-
-clean: clean-am
-       rm -rf linux linux-stage
index f30d862..c1a9bdf 100644 (file)
@@ -1,11 +1,9 @@
 Kernelenv
 Makefile
-autoMakefile
-autoMakefile.in
+Makefile.in
 aclocal.m4
 autom4te.cache
 config.log
 config.status
 configure
-.*.cmd
-.depend
+.*.o.cmd
diff --git a/lnet/Makefile.am b/lnet/Makefile.am
new file mode 100644 (file)
index 0000000..0083ac1
--- /dev/null
@@ -0,0 +1,19 @@
+# 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 = Rules.linux archdep.m4 include 
+DIST_SUBDIRS = libcfs portals knals unals utils tests doc router
+
+if LIBLUSTRE
+SUBDIRS = portals unals utils
+else
+
+if CRAY_PORTALS
+SUBDIRS = libcfs tests doc 
+else 
+SUBDIRS = libcfs portals knals unals utils tests doc router
+endif
+
+endif
diff --git a/lnet/Makefile.in b/lnet/Makefile.in
deleted file mode 100644 (file)
index 71d0dc8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-subdir-m += libcfs
-
-cray-subdirs += portals
-cray-subdirs += knals
-cray-subdirs += router
-cray-subdirs += tests
-@CRAY_PORTALS_FALSE@subdir-m += $(cray-subdirs)
-
-@INCLUDE_RULES@
diff --git a/lnet/Rules.linux b/lnet/Rules.linux
new file mode 100644 (file)
index 0000000..232a248
--- /dev/null
@@ -0,0 +1,29 @@
+# included in Linux kernel directories
+# Rules for module building
+
+if LINUX25
+
+basename=$(shell echo $< | sed -e 's/\.c//g' | sed -e 's/-//g' | sed -e 's/\.o//g' | sed -e 's/^.*\///g')
+AM_CPPFLAGS= -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2  -DKBUILD_MODNAME=$(MODULE) -DKBUILD_BASENAME=$(basename)
+
+$(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
+       $(LD) -m $(MOD_LINK) -r -o $(MODULE)_tmp.o $($(MODULE)_OBJECTS)
+       rm -f $(MODULE)_tmp.c
+       $(LINUX)/scripts/modpost $(LINUX)/vmlinux $(MODULE)_tmp.o
+       $(COMPILE) -UKBUILD_BASENAME -DKBUILD_BASENAME=$(MODULE) -c $(MODULE)_tmp.mod.c
+       $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $(MODULE)_tmp.o $(MODULE)_tmp.mod.o
+
+else
+
+$(MODULE).o: $($(MODULE)_OBJECTS)
+       $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $($(MODULE)_OBJECTS)
+
+endif
+
+tags:
+       rm -f $(top_srcdir)/TAGS
+       rm -f $(top_srcdir)/tags
+       find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs etags -a
+       find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs etags -a
+       find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs ctags -a
+       find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs ctags -a
index 636ee1d..b203a95 100644 (file)
@@ -1,55 +1,25 @@
-# -------- we can't build modules unless srcdir = builddir
-if test x$enable_modules != xno ; then
-AC_CHECK_FILE([autoMakefile.am],[],
-       [AC_MSG_ERROR([At this time, Lustre does not support building kernel modules with srcdir != buildir.])])
-fi
 
 # -------- in kernel compilation? (2.5 only) -------------
-AC_MSG_CHECKING([if inkernel build support is requested])
-AC_ARG_ENABLE([inkernel],
-       AC_HELP_STRING([--enable-inkernel],
-                      [set up 2.5 kernel makefiles]),
-       [],[enable_inkernel=no])
-AC_MSG_RESULT([$enable_inkernel])
+AC_ARG_ENABLE(inkernel, [  --enable-inkernel set up 2.5 kernel makefiles])
 AM_CONDITIONAL(INKERNEL, test x$enable_inkernel = xyes)
+echo "Makefile for in kernel build: $INKERNEL"
 
 # -------- are we building against an external portals? -------
-AC_MSG_CHECKING([if Cray portals should be used])
-AC_ARG_WITH([cray-portals],
-       AC_HELP_STRING([--with-cray-portals=path],
-                      [path to cray portals]),
-       [
-               if test "$with_cray_portals" != no; then
-                       if test -r $with_cray_portals/include/portals/api.h ; then
-                               CRAY_PORTALS_INCLUDE="-I$with_cray_portals/include"
-                               AC_DEFINE(CRAY_PORTALS, 1, [Building with Cray Portals])
-                       else
-                               AC_MSG_ERROR([--with-cray-portals specified badly])
-                        fi
-                fi
-       ],[with_cray_portals=no])
-AC_MSG_RESULT([$with_cray_portals])
-
-AM_CONDITIONAL(CRAY_PORTALS, test x$with_cray_portals != xno)
-
-# -------- enable tests and utils? -------
-if test x$enable_tests = xno ; then
-       AC_MSG_NOTICE([disabling tests])
-       enable_tests=no
-fi
-if test x$enable_utils = xno ; then
-       AC_MSG_NOTICE([disabling utilities])
-       enable_utils=no
-fi
+# haha, I wonder how one is really supposed to do this
+# automake seems to have a DEFS variable which looks good
+AC_ARG_WITH(cray-portals, [  --with-cray-portals=[path] path to cray portals],
+       CRAY_PORTALS_INCLUDE="-I$with_cray_portals"
+       CC="$CC -DCRAY_PORTALS=1"
+       )
+AC_SUBST(CRAY_PORTALS_INCLUDE)
+AM_CONDITIONAL(CRAY_PORTALS, test ! "x$with_cray_portals" = x)
+
+# -------- liblustre compilation --------------
+AC_ARG_WITH(lib, [  --with-lib compile lustre library], host_cpu="lib")
 
 # -------- set linuxdir ------------
-AC_MSG_CHECKING([for Linux sources])
-AC_ARG_WITH([linux],
-       AC_HELP_STRING([--with-linux=path],
-                      [set path to Linux source (default=/usr/src/linux)]),
-       [LINUX=$with_linux],
-       [LINUX=/usr/src/linux])
-AC_MSG_RESULT([$LINUX])
+
+AC_ARG_WITH(linux, [  --with-linux=[path] set path to Linux source (default=/usr/src/linux)],LINUX=$with_linux,LINUX=/usr/src/linux)
 AC_SUBST(LINUX)
 if test x$enable_inkernel = xyes ; then
         echo ln -s `pwd` $LINUX/fs/lustre
@@ -57,196 +27,201 @@ if test x$enable_inkernel = xyes ; then
         ln -s `pwd` $LINUX/fs/lustre
 fi
 
-# -------- check for .confg --------
-AC_ARG_WITH([linux-config],
-       [AC_HELP_STRING([--with-linux-config=path],
-                       [set path to Linux .conf (default=\$LINUX/.config)])],
-       [LINUX_CONFIG=$with_linux_config],
-       [LINUX_CONFIG=$LINUX/.config])
-AC_SUBST(LINUX_CONFIG)
-
-AC_CHECK_FILE([/boot/kernel.h],
-       [KERNEL_SOURCE_HEADER='/boot/kernel.h'],
-       [AC_CHECK_FILE([/var/adm/running-kernel.h]),
-               [KERNEL_SOURCE_HEADER='/var/adm/running-kernel.h']])
-
-AC_ARG_WITH([kernel-source-header],
-       AC_HELP_STRING([--with-kernel-source-header=path],
-                       [Use a different kernel version header.  Consult README.kernel-source for details.]),
-       [KERNEL_SOURCE_HEADER=$with_kernel_source_header])
-
 #  --------------------
-ARCH_UM=
-UML_CFLAGS=
-if test x$enable_modules != xno ; then
-       AC_MSG_CHECKING([if you are running user mode linux for $host_cpu])
-       if test -e $LINUX/include/asm-um ; then
-               if test  X`ls -id $LINUX/include/asm/ | awk '{print $1}'` = X`ls -id $LINUX/include/asm-um | awk '{print $1}'` ; then
-                       ARCH_UM='ARCH=um'
-                       # see notes in Rules.in
-                       UML_CFLAGS='-O0'
-                       AC_MSG_RESULT(yes)
-               else
-                       AC_MSG_RESULT([no (asm doesn't point at asm-um)])
-               fi
-       else
-               AC_MSG_RESULT([no (asm-um missing)])
-       fi
+AC_MSG_CHECKING(if you are running user mode linux for $host_cpu ...)
+if test $host_cpu = "lib" ; then 
+        host_cpu="lib"
+       AC_MSG_RESULT(no building Lustre library)
+else
+  if test -e $LINUX/include/asm-um ; then
+    if test  X`ls -id $LINUX/include/asm/ | awk '{print $1}'` = X`ls -id $LINUX/include/asm-um | awk '{print $1}'` ; then
+       host_cpu="um";
+       AC_MSG_RESULT(yes)
+    else
+       AC_MSG_RESULT(no (asm doesn't point at asm-um))
+    fi
+
+  else 
+        AC_MSG_RESULT(no (asm-um missing))
+  fi
 fi
-AC_SUBST(ARCH_UM)
-AC_SUBST(UML_CFLAGS)
+
 # --------- Linux 25 ------------------
 
-AC_CHECK_FILE([$LINUX/include/linux/namei.h],
-       [
-               linux25="yes"
-               KMODEXT=".ko"
-       ],[
-               KMODEXT=".o"
-               linux25="no"
-       ])
-AC_MSG_CHECKING([if you are using Linux 2.6])
-AC_MSG_RESULT([$linux25])
+AC_MSG_CHECKING(if you are running linux 2.5)
+if test -e $LINUX/include/linux/namei.h ; then
+        linux25="yes"
+        AC_MSG_RESULT(yes)
+else
+        linux25="no"
+        AC_MSG_RESULT(no)
+fi
 AM_CONDITIONAL(LINUX25, test x$linux25 = xyes)
-AC_SUBST(KMODEXT)
+echo "Makefiles for in linux 2.5 build: $LINUX25"
 
 # -------  Makeflags ------------------
 
-CPPFLAGS="$CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE -I\$(top_srcdir)/include -I\$(top_srcdir)/portals/include"
-
-# liblustre are all the same
-LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1"
-AC_SUBST(LLCPPFLAGS)
-
-LLCFLAGS="-g -Wall -fPIC"
-AC_SUBST(LLCFLAGS)
-
-# everyone builds against portals and lustre
-
-if test x$enable_ldiskfs = xyes ; then
-       AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
-       AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
-       AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls])
-       AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security])
+AC_MSG_CHECKING(setting make flags system architecture: )
+case ${host_cpu} in
+       lib )
+       AC_MSG_RESULT($host_cpu)
+       KCFLAGS='-g -Wall '
+       KCPPFLAGS='-D__arch_lib__ '
+       libdir='${exec_prefix}/lib/lustre'
+        MOD_LINK=elf_i386
+;;
+       um )
+       AC_MSG_RESULT($host_cpu)
+       KCFLAGS='-g -Wall -pipe -Wno-trigraphs -Wstrict-prototypes -fno-strict-aliasing -fno-common '
+        case ${linux25} in
+                yes )
+                KCPPFLAGS='-D__KERNEL__ -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE  -Derrno=kernel_errno -DPATCHLEVEL=4 -DMODULE -I$(LINUX)/arch/um/include -I$(LINUX)/arch/um/kernel/tt/include -I$(LINUX)/arch/um/kernel/skas/include -O2 -nostdinc -iwithprefix include'
+        ;;
+                * )
+                KCPPFLAGS='-D__KERNEL__ -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE  -Derrno=kernel_errno -DPATCHLEVEL=4 -DMODULE -I$(LINUX)/arch/um/kernel/tt/include -I$(LINUX)/arch/um/include '
+        ;;
+        esac
+
+        MOD_LINK=elf_i386
+;;
+       i*86 )
+       AC_MSG_RESULT($host_cpu)
+        KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -pipe'
+        case ${linux25} in
+                yes )
+                KCPPFLAGS='-D__KERNEL__ -DMODULE -march=i686 -I$(LINUX)/include/asm-i386/mach-default -nostdinc -iwithprefix include '
+        ;;
+                * )
+                KCPPFLAGS='-D__KERNEL__ -DMODULE '
+        ;;
+        esac
+        MOD_LINK=elf_i386
+;;
+
+       alphaev6 )
+       AC_MSG_RESULT($host_cpu)
+        KCFLAGS='-g -O2  -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6'
+        KCPPFLAGS='-D__KERNEL__ -DMODULE '
+        MOD_LINK=elf64alpha
+;;
+
+       alphaev67 )
+       AC_MSG_RESULT($host_cpu)
+        KCFLAGS='-g -O2  -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6'
+        KCPPFLAGS='-D__KERNEL__ -DMODULE '
+        MOD_LINK=elf64alpha
+;;
+
+       alpha* )
+       AC_MSG_RESULT($host_cpu)
+        KCFLAGS='-g -O2  -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev5'
+        KCPPFLAGS='-D__KERNEL__ -DMODULE '
+        MOD_LINK=elf64alpha
+;;
+
+       ia64 )
+       AC_MSG_RESULT($host_cpu)
+        KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -falign-functions=32 -mb-step'
+       KCPPFLAGS='-D__KERNEL__ -DMODULE'
+        MOD_LINK=elf64_ia64
+;;
+
+       x86_64 )
+       AC_MSG_RESULT($host_cpu)
+        KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fomit-frame-pointer -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -finline-limit=2000 -fno-strength-reduce -fno-asynchronous-unwind-tables'
+       KCPPFLAGS='-D__KERNEL__ -DMODULE'
+        MOD_LINK=elf_x86_64
+;;
+
+       sparc64 )
+       AC_MSG_RESULT($host_cpu)
+        KCFLAGS='-O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -Wno-unused -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs'
+        KCPPFLAGS='-D__KERNEL__'
+        MOD_LINK=elf64_sparc
+
+;;
+
+       powerpc )
+       AC_MSG_RESULT($host_cpu)
+        KCFLAGS='-O2 -g -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring'
+        KCPPFLAGS='-D__KERNEL__ -DMODULE'
+        MOD_LINK=elf32ppclinux
+;;
+
+        *)
+       AC_ERROR("Unknown Linux Platform: $host_cpu")
+;;
+esac
+
+# ----------- make dep run? ------------------
+
+if test $host_cpu != "lib" ; then 
+  AC_MSG_CHECKING(if make dep has been run in kernel source (host $host_cpu) )
+  if test -f $LINUX/include/linux/config.h ; then
+  AC_MSG_RESULT(yes)
+ else
+  AC_MSG_ERROR(** cannot find $LINUX/include/linux/config.h. Run make dep in $LINUX.)
+  fi
 fi
 
-EXTRA_KCFLAGS="-g $CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE -I$PWD/portals/include -I$PWD/include"
-
-# these are like AC_TRY_COMPILE, but try to build modules against the
-# kernel, inside the kernel-tests directory
-
-AC_DEFUN([LUSTRE_MODULE_CONFTEST],
-[cat >conftest.c <<_ACEOF
-$1
-_ACEOF
-])
-
-AC_DEFUN([LUSTRE_MODULE_COMPILE_IFELSE],
-[m4_ifvaln([$1], [LUSTRE_MODULE_CONFTEST([$1])])dnl
-rm -f kernel-tests/conftest.o kernel-tests/conftest.mod.c kernel-tests/conftest.ko
-AS_IF([AC_TRY_COMMAND(cp conftest.c kernel-tests && make [$2] -f $PWD/kernel-tests/Makefile LUSTRE_LINUX_CONFIG=$LINUX_CONFIG -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX EXTRA_CFLAGS="$EXTRA_KCFLAGS" $ARCH_UM SUBDIRS=$PWD/kernel-tests) >/dev/null && AC_TRY_COMMAND([$3])],
-       [$4],
-       [_AC_MSG_LOG_CONFTEST
-m4_ifvaln([$5],[$5])dnl])dnl
-rm -f kernel-tests/conftest.o kernel-tests/conftest.mod.c kernel-tests/conftest.mod.o kernel-tests/conftest.ko m4_ifval([$1], [kernel-tests/conftest.c conftest.c])[]dnl
-])
-
-AC_DEFUN([LUSTRE_MODULE_TRY_COMPILE],
-[LUSTRE_MODULE_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM([[$1]], [[$2]])],
-       [modules],
-       [test -s kernel-tests/conftest.o],
-       [$3], [$4])])
-
-AC_DEFUN([LUSTRE_MODULE_TRY_MAKE],
-[LUSTRE_MODULE_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4], [$5], [$6])])
-
 # ------------ include paths ------------------
 
-if test x$enable_modules != xno ; then
-       # ------------ .config exists ----------------
-       AC_CHECK_FILE([$LINUX_CONFIG],[],
-               [AC_MSG_ERROR([Kernel config could not be found.  If you are building from a kernel-source rpm consult README.kernel-source])])
-
-       # ----------- make dep run? ------------------
-       AC_CHECK_FILES([$LINUX/include/linux/autoconf.h
-                       $LINUX/include/linux/version.h
-                       $LINUX/include/linux/config.h],[],
-               [AC_MSG_ERROR([Run make config in $LINUX.])])
-
-       # ------------ rhconfig.h includes runtime-generated bits --
-       # red hat kernel-source checks
-
-       # we know this exists after the check above.  if the user
-       # tarred up the tree and ran make dep etc. in it, then
-       # version.h gets overwritten with a standard linux one.
-
-       if grep rhconfig $LINUX/include/linux/version.h >/dev/null ; then
-               # This is a clean kernel-source tree, we need to
-               # enable extensive workarounds to get this to build
-               # modules
-               AC_CHECK_FILE([$KERNEL_SOURCE_HEADER],
-                       [if test $KERNEL_SOURCE_HEADER = '/boot/kernel.h' ; then
-                               AC_MSG_WARN([Using /boot/kernel.h from RUNNING kernel.])
-                               AC_MSG_WARN([If this is not what you want, use --with-kernel-source-header.])
-                               AC_MSG_WARN([Consult README.kernel-source for details.])
-                       fi],
-                       [AC_MSG_ERROR([$KERNEL_SOURCE_HEADER not found.  Consult README.kernel-source for details.])])
-               EXTRA_KCFLAGS="-include $KERNEL_SOURCE_HEADER $EXTRA_KCFLAGS"
-       fi
-
-       # --- check that we can build modules at all
-       AC_MSG_CHECKING([that modules can be built])
-       LUSTRE_MODULE_TRY_COMPILE([],[],
-               [
-                       AC_MSG_RESULT([yes])
-               ],[
-                       AC_MSG_RESULT([no])
-                       AC_MSG_WARN([Consult config.log for details.])
-                       AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult README.kernel-source])
-                       AC_MSG_ERROR([Kernel modules could not be built.])
-               ])
-
-       # ------------ LINUXRELEASE and moduledir ------------------
-       AC_MSG_CHECKING([for Linux release])
-       rm -f kernel-tests/conftest.i
-       LINUXRELEASE=
-       if test $linux25 = 'yes' ; then
-               makerule="$PWD/kernel-tests"
-       else
-               makerule="_dir_$PWD/kernel-tests"
-       fi
-       LUSTRE_MODULE_TRY_MAKE(
-               [#include <linux/version.h>],
-               [LINUXRELEASE=UTS_RELEASE],
-               [$makerule LUSTRE_KERNEL_TEST=conftest.i],
-               [test -s kernel-tests/conftest.i],
-               [
-                       # LINUXRELEASE="UTS_RELEASE"
-                       eval $(grep LINUXRELEASE kernel-tests/conftest.i)
-               ],[
-                       AC_MSG_RESULT([unknown])
-                       AC_MSG_ERROR([Could not preprocess test program.  Consult config.log for details.])
-               ])
-       rm -f kernel-tests/conftest.i
-       if test x$LINUXRELEASE = x ; then
-               AC_MSG_RESULT([unknown])
-               AC_MSG_ERROR([Could not determine Linux release version from linux/version.h.])
-       fi
-       AC_MSG_RESULT([$LINUXRELEASE])
-       AC_SUBST(LINUXRELEASE)
-
-       moduledir='$(libdir)/modules/'$LINUXRELEASE/kernel
-       AC_SUBST(moduledir)
-
-       modulefsdir='$(moduledir)/fs/$(PACKAGE)'
-       AC_SUBST(modulefsdir)
-
-       # ------------ RELEASE --------------------------------
-       AC_MSG_CHECKING([for Lustre release])
-       RELEASE="`echo ${LINUXRELEASE} | tr '-' '_'`_`date +%Y%m%d%H%M`"
-       AC_MSG_RESULT($RELEASE)
-       AC_SUBST(RELEASE)
+KINCFLAGS="$CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE \
+       -I\$(top_srcdir)/include \
+       -I\$(top_srcdir)/portals/include"
+if test $host_cpu != "lib" ; then 
+    KINCFLAGS="$KINCFLAGS -I$LINUX/include -I$LINUX/include"
+fi
+CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS"
+
+if test $host_cpu != "lib" ; then 
+# ------------ autoconf.h ------------------
+  AC_MSG_CHECKING(if autoconf.h is in kernel source)
+  if test -f $LINUX/include/linux/autoconf.h ; then
+      AC_MSG_RESULT(yes)
+  else
+      AC_MSG_ERROR(** cannot find $LINUX/include/linux/autoconf.h. Run make config in $LINUX.)
+  fi
+
+# ------------ LINUXRELEASE and moduledir ------------------
+  AC_MSG_CHECKING(for Linux release)
+  
+  dnl We need to rid ourselves of the nasty [ ] quotes.
+  changequote(, )
+  dnl Get release from version.h
+  LINUXRELEASE="`sed -ne 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z_-]*\).*/\1/p' $LINUX/include/linux/version.h`"
+  changequote([, ])
+  
+  moduledir='$(libdir)/modules/'$LINUXRELEASE/kernel
+  AC_SUBST(moduledir)
+  
+  modulefsdir='$(moduledir)/fs/$(PACKAGE)'
+  AC_SUBST(modulefsdir)
+  
+  AC_MSG_RESULT($LINUXRELEASE)
+  AC_SUBST(LINUXRELEASE)
+
+# ------------ RELEASE --------------------------------
+  AC_MSG_CHECKING(lustre release)
+  
+  dnl We need to rid ourselves of the nasty [ ] quotes.
+  changequote(, )
+  dnl Get release from version.h
+  RELEASE="`sed -ne 's/-/_/g' -e 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z_]*\).*/\1/p' $LINUX/include/linux/version.h`_`date +%Y%m%d%H%M`"
+  changequote([, ])
+
+  AC_MSG_RESULT($RELEASE)
+  AC_SUBST(RELEASE)
+
+# ---------- modversions? --------------------
+  AC_MSG_CHECKING(for MODVERSIONS)
+  if egrep -e 'MODVERSIONS.*1' $LINUX/include/linux/autoconf.h >/dev/null 2>&1;
+  then
+       if test $linux25 != "yes"; then
+                MFLAGS="-DMODULE -DMODVERSIONS -include $LINUX/include/linux/modversions.h -DEXPORT_SYMTAB"
+                AC_MSG_RESULT(yes)
+        fi
+  fi
 fi
 
 # ---------- Portals flags --------------------
@@ -259,299 +234,166 @@ fi
 #fi
 #AC_SUBST(usrprefix)
 
-AC_MSG_CHECKING([for zero-copy TCP support])
-AC_ARG_ENABLE([zerocopy],
-       AC_HELP_STRING([--disable-zerocopy],
-                      [disable socknal zerocopy]),
-       [],[enable_zerocopy='yes'])
-if test x$enable_zerocopy = xno ; then
-       AC_MSG_RESULT([no (by request)])
+AC_MSG_CHECKING(if kernel has CPU affinity support)
+SET_CPUS_ALLOW="`grep -c set_cpus_allowed $LINUX/kernel/softirq.c`"
+if test "$SET_CPUS_ALLOW" != 0 ; then
+  enable_affinity_temp="-DCPU_AFFINITY=1"
+  AC_MSG_RESULT(yes)
 else
-       ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
-       if test "$ZCCD" != 0 ; then
-               AC_DEFINE(SOCKNAL_ZC, 1, [use zero-copy TCP])
-               AC_MSG_RESULT(yes)
-       else
-               AC_MSG_RESULT([no (no kernel support)])
-       fi
+  enable_affinity_temp=""
+  AC_MSG_RESULT(no)
 fi
 
-AC_MSG_CHECKING([for CPU affinity support])
-AC_ARG_ENABLE([affinity],
-       AC_HELP_STRING([--disable-affinity],
-                      [disable process/irq affinity]),
-       [],[enable_affinity='yes'])
-if test x$enable_affinity = xno ; then
-       AC_MSG_RESULT([no (by request)])
+AC_MSG_CHECKING(if kernel has zero-copy TCP support)
+ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
+if test "$ZCCD" != 0 ; then
+  enable_zerocopy_temp="-DSOCKNAL_ZC=1"
+  AC_MSG_RESULT(yes)
 else
-       SET_CPUS_ALLOW="`grep -c set_cpus_allowed $LINUX/kernel/softirq.c`"
-       if test "$SET_CPUS_ALLOW" != 0 ; then
-               AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no (no kernel support)])
-       fi
+  enable_zerocopy_temp=""
+  AC_MSG_RESULT(no)
 fi
 
+AC_ARG_ENABLE(zerocopy, [  --disable-zerocopy disable socknal zerocopy],enable_zerocopy="", enable_zerocopy=$enable_zerocopy_temp)
 
+AC_ARG_ENABLE(affinity, [  --disable-affinity disable process/irq affinity],enable_affinity="", enable_affinity=$enable_affinity_temp)
 #####################################
 
-AC_MSG_CHECKING([if quadrics kernel headers are present])
+AC_MSG_CHECKING(if quadrics kernel headers are present)
 if test -d $LINUX/drivers/net/qsnet ; then
-       AC_MSG_RESULT([yes])
-       QSWNAL="qswnal"
-       AC_MSG_CHECKING([for multirail EKC])
-       if test -f $LINUX/include/elan/epcomms.h; then
-               AC_MSG_RESULT([supported])
-               QSWCPPFLAGS="-DMULTIRAIL_EKC=1"
-       else
-               AC_MSG_RESULT([not supported])
-               if test -d $LINUX/drivers/net/qsnet/include; then
-                       QSWCPPFLAGS="-I$LINUX/drivers/net/qsnet/include"
-               else
-                       QSWCPPFLAGS="-I$LINUX/include/linux"
-               fi
-       fi
+  AC_MSG_RESULT(yes)
+  QSWNAL="qswnal"
+  AC_MSG_CHECKING(for multirail EKC)
+  if test -f $LINUX/include/elan/epcomms.h; then
+       AC_MSG_RESULT(supported)
+       with_quadrics="-DMULTIRAIL_EKC=1"
+  else
+       AC_MSG_RESULT(not supported)
+       with_quadrics="-I$LINUX/drivers/net/qsnet/include"
+  fi
+  :
 else
-       AC_MSG_RESULT([no])
-       QSWNAL=""
-       QSWCPPFLAGS=""
+  AC_MSG_RESULT(no)
+  QSWNAL=""
+  with_quadrics=""
+  :
 fi
-AC_SUBST(QSWCPPFLAGS)
+AC_SUBST(with_quadrics)
 AC_SUBST(QSWNAL)
-AM_CONDITIONAL(BUILD_QSWNAL, test x$QSWNAL = "xqswnal")
-
-AC_MSG_CHECKING([if gm support was requested])
-AC_ARG_WITH([gm],
-       AC_HELP_STRING([--with-gm=path],
-                      [build gmnal against path]),
-       [
-               case $with_gm in 
-                       yes)
-                               AC_MSG_RESULT([yes])
-                               GMCPPFLAGS="-I/usr/local/gm/include"
-                               GMNAL="gmnal"
-                               ;;
-                       no)
-                               AC_MSG_RESULT([no])
-                               GMCPPFLAGS=""
-                               GMNAL=""
-                               ;;
-                       *)
-                               AC_MSG_RESULT([yes])
-                               GMCPPFLAGS="-I$with_gm/include -I$with_gm/drivers -I$with_gm/drivers/linux/gm"
-                               GMNAL="gmnal"
-                               ;;
-               esac
-       ],[
-               AC_MSG_RESULT([no])
-               GMCPPFLAGS=""
-               GMNAL=""
-       ])
-AC_SUBST(GMCPPFLAGS)
+
+# R. Read 5/02
+GMNAL=""
+echo "checking with-gm=" ${with_gm}
+if test "${with_gm+set}" = set; then
+  if test "${with_gm}" = yes; then
+    with_gm="-I/usr/local/gm/include"
+  else
+    with_gm="-I$with_gm/include -I$with_gm/drivers -I$with_gm/drivers/linux/gm"
+  fi
+  GMNAL="gmnal"
+else
+# default case - no GM
+  with_gm=""
+fi
+AC_SUBST(with_gm)
 AC_SUBST(GMNAL)
-AM_CONDITIONAL(BUILD_GMNAL, test x$GMNAL = "xgmnal")
+
 
 #fixme: where are the default IB includes?
 default_ib_include_dir=/usr/local/ib/include
 an_ib_include_file=vapi.h
 
-AC_MSG_CHECKING([if ib nal support was requested])
-AC_ARG_WITH([ib],
-       AC_HELP_STRING([--with-ib=yes/no/path],
-                      [Path to IB includes]),
-       [
-               case $with_ib in
-                       yes)
-                               AC_MSG_RESULT([yes])
-                               IBCPPFLAGS="-I/usr/local/ib/include"
-                               IBNAL="ibnal"
-                               ;;
-                       no)
-                               AC_MSG_RESULT([no])
-                               IBCPPFLAGS=""
-                               IBNAL=""
-                               ;;
-                       *)
-                               AC_MSG_RESULT([yes])
-                               IBCPPFLAGS="-I$with_ib"
-                               IBNAL=""
-                               ;;
-               esac
-       ],[
-               AC_MSG_RESULT([no])
-               IBFLAGS=""
-               IBNAL=""
-       ])
+AC_ARG_WITH(ib, [  --with-ib=[yes/no/path] Path to IB includes], with_ib=$withval, with_ib=$default_ib)
+AC_MSG_CHECKING(if IB headers are present)
+if test "$with_ib" = yes; then
+    with_ib=$default_ib_include_dir
+fi
+if test "$with_ib" != no -a -f ${with_ib}/${an_ib_include_file}; then
+    AC_MSG_RESULT(yes)
+    IBNAL="ibnal"
+    with_ib="-I${with_ib}"
+else
+    AC_MSG_RESULT(no)
+    IBNAL=""
+    with_ib=""
+fi
 AC_SUBST(IBNAL)
-AC_SUBST(IBCPPFLAGS)
-AM_CONDITIONAL(BUILD_IBNAL, test x$IBNAL = "xibnal")
+AC_SUBST(with_ib)
+
 
+def_scamac=/opt/scali/include
+AC_ARG_WITH(scamac, [  --with-scamac=[yes/no/path] Path to ScaMAC includes (default=/opt/scali/include)], with_scamac=$withval, with_scamac=$def_scamac)
+AC_MSG_CHECKING(if ScaMAC headers are present)
+if test "$with_scamac" = yes; then
+  with_scamac=$def_scamac
+fi
+if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
+  AC_MSG_RESULT(yes)
+  SCIMACNAL="scimacnal"
+  with_scamac="-I${with_scamac} -I${with_scamac}/icm"
+else
+  AC_MSG_RESULT(no)
+  SCIMACNAL=""
+  with_scamac=""
+fi
+
+AC_SUBST(with_scamac)
+AC_SUBST(SCIMACNAL)
+
+CFLAGS="$KCFLAGS"
+CPPFLAGS="$KINCFLAGS $KCPPFLAGS $MFLAGS $enable_zerocopy $enable_affinity $with_quadrics $with_gm $with_scamac $with_ib"
+
+AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
 AC_SUBST(MOD_LINK)
 AC_SUBST(LINUX25)
+AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
 
 # ---------- Red Hat 2.4.18 has iobuf->dovary --------------
 # But other kernels don't
 
 AC_MSG_CHECKING([if struct kiobuf has a dovary field])
-LUSTRE_MODULE_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])
-       ])
-
-# ----------- 2.6.4 no longer has page->list ---------------
-AC_MSG_CHECKING([if struct page has a list field])
-LUSTRE_MODULE_TRY_COMPILE(
-       [
-               #include <linux/mm.h>
-       ],[
-               struct page page;
-               &page.list;
-       ],[
-               AC_MSG_RESULT([yes])
-               AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
-       ],[
-               AC_MSG_RESULT([no])
-       ])
+AC_TRY_COMPILE([#define __KERNEL__
+               #include <linux/iobuf.h>],
+              [struct kiobuf iobuf;
+               iobuf.dovary = 1;],
+              [AC_MSG_RESULT([yes])
+                CPPFLAGS="$CPPFLAGS -DHAVE_KIOBUF_DOVARY"],
+              [AC_MSG_RESULT([no])])
 
 # ---------- Red Hat 2.4.20 backports some 2.5 bits --------
 # This needs to run after we've defined the KCPPFLAGS
 
-AC_MSG_CHECKING([for kernel version])
-LUSTRE_MODULE_TRY_COMPILE(
-       [
-               #include <linux/sched.h>
-       ],[
-               struct task_struct p;
-               p.sighand = NULL;
-       ],[
-               AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
-               AC_MSG_RESULT([redhat-2.4.20])
-       ],[
-               AC_MSG_RESULT([$LINUXRELEASE])
-       ])
+AC_MSG_CHECKING(for kernel version)
+AC_TRY_COMPILE([#define __KERNEL__
+             #include <linux/sched.h>],
+            [struct task_struct p;
+             p.sighand = NULL;],
+            [RH_2_4_20=1],
+            [RH_2_4_20=0])
+
+if test $RH_2_4_20 = 1; then
+       AC_MSG_RESULT(redhat-2.4.20)
+       CPPFLAGS="$CPPFLAGS -DCONFIG_RH_2_4_20"
+else
+       AC_MSG_RESULT($LINUXRELEASE)
+fi 
 
 # ---------- Red Hat 2.4.21 backports some more 2.5 bits --------
 
-AC_MSG_CHECKING([if kernel defines 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])
+  CPPFLAGS="$CPPFLAGS -DHAVE_PDE"
+  AC_MSG_RESULT(yes)
 else
-       AC_MSG_RESULT([no])
+  AC_MSG_RESULT(no)
 fi
 
-AC_MSG_CHECKING([if kernel passes struct file to 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)
+  CPPFLAGS="$CPPFLAGS -DHAVE_DIO_FILE"
+  AC_MSG_RESULT(yes)
 else
-       AC_MSG_RESULT(no)
-fi
-
-if test x$enable_modules != xno ; then
-       # ---------- modules? ------------------------
-       AC_MSG_CHECKING([for module support])
-       LUSTRE_MODULE_TRY_COMPILE(
-               [
-                       #include <linux/config.h>
-               ],[
-                       #ifndef CONFIG_MODULES
-                       #error CONFIG_MODULES not #defined
-                       #endif
-               ],[
-                       AC_MSG_RESULT([yes])
-               ],[
-                       AC_MSG_RESULT([no])
-                       AC_MSG_ERROR([module support is required to build Lustre kernel modules.])
-               ])
-
-       # ---------- modversions? --------------------
-       AC_MSG_CHECKING([for MODVERSIONS])
-       LUSTRE_MODULE_TRY_COMPILE(
-               [
-                       #include <linux/config.h>
-               ],[
-                       #ifndef CONFIG_MODVERSIONS
-                       #error CONFIG_MODVERSIONS not #defined
-                       #endif
-               ],[
-                       AC_MSG_RESULT([yes])
-               ],[
-                       AC_MSG_RESULT([no])
-               ])
-
-       # ------------ preempt -----------------------
-       AC_MSG_CHECKING([if preempt is enabled])
-       LUSTRE_MODULE_TRY_COMPILE(
-               [
-                       #include <linux/config.h>
-               ],[
-                       #ifndef CONFIG_PREEMPT
-                       #error CONFIG_PREEMPT is not #defined
-                       #endif
-               ],[
-                       AC_MSG_RESULT([yes])
-                       AC_MSG_ERROR([Lustre does not support kernels with preempt enabled.])
-               ],[
-                       AC_MSG_RESULT([no])
-               ])
-
-       if test $BACKINGFS = 'ext3' ; then
-               # --- Check that ext3 and ext3 xattr are enabled in the kernel
-               AC_MSG_CHECKING([that ext3 is enabled in the kernel])
-               LUSTRE_MODULE_TRY_COMPILE(
-                       [
-                               #include <linux/config.h>
-                       ],[
-                               #ifndef CONFIG_EXT3_FS
-                               #ifndef CONFIG_EXT3_FS_MODULE
-                               #error CONFIG_EXT3_FS not #defined
-                               #endif
-                               #endif
-                       ],[
-                               AC_MSG_RESULT([yes])
-                       ],[
-                               AC_MSG_RESULT([no])
-                               AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel (CONFIG_EXT3_FS)])
-                       ])
-
-               AC_MSG_CHECKING([that extended attributes for ext3 are enabled in the kernel])
-               LUSTRE_MODULE_TRY_COMPILE(
-                       [
-                               #include <linux/config.h>
-                       ],[
-                               #ifndef CONFIG_EXT3_FS_XATTR
-                               #error CONFIG_EXT3_FS_XATTR not #defined
-                               #endif
-                       ],[
-                               AC_MSG_RESULT([yes])
-                       ],[
-                               AC_MSG_RESULT([no])
-                               AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel (CONFIG_EXT3_FS_XATTR.)])
-                               AC_MSG_WARN([This build may fail.])
-                       ])
-       fi # BACKINGFS = ext3
+  AC_MSG_RESULT(no)
 fi
-
-CPPFLAGS="-include \$(top_builddir)/include/config.h $CPPFLAGS"
-EXTRA_KCFLAGS="-include $PWD/include/config.h $EXTRA_KCFLAGS"
-AC_SUBST(EXTRA_KCFLAGS)
-
-#echo "KCPPFLAGS: $KCPPFLAGS"
-#echo "KCFLAGS: $KCFLAGS"
-#echo "LLCPPFLAGS: $LLCPPFLAGS"
-#echo "LLCFLAGS: $LLCFLAGS"
-#echo "MOD_LINK: $MOD_LINK"
-#echo "CFLAGS: $CFLAGS"
-#echo "CPPFLAGS: $CPPFLAGS"
index 93a370f..8c55b20 100644 (file)
@@ -1,9 +1,5 @@
 # ----------  other tests and settings ---------
 
-AC_CHECK_TYPE([spinlock_t],
-       [AC_DEFINE(HAVE_SPINLOCK_T, 1, [spinlock_t is defined])],
-       [],
-       [#include <linux/spinlock.h>])
 
 # ---------  unsigned long long sane? -------
 
@@ -32,9 +28,6 @@ pkgexampledir='${prefix}/usr/lib/$(PACKAGE)/examples'
 AC_SUBST(pkgexampledir)
 pymoddir='${prefix}/usr/lib/${PACKAGE}/python/Lustre'
 AC_SUBST(pymoddir)
-# for substitution in lconf
-PYMOD_DIR="/usr/lib/$PACKAGE/python"
-AC_SUBST(PYMOD_DIR)
 modulenetdir='$(moduledir)/net/$(PACKAGE)'
 AC_SUBST(modulenetdir)
 
@@ -42,15 +35,14 @@ AC_SUBST(modulenetdir)
 # ----------  BAD gcc? ------------
 AC_PROG_RANLIB
 AC_PROG_CC
-AC_MSG_CHECKING([for buggy compiler])
+AC_MSG_CHECKING(for buggy compiler)
 CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"`
 bad_cc() {
-       AC_MSG_RESULT([buggy compiler found!])
        echo
        echo "   '$CC_VERSION'"
        echo "  has been known to generate bad code, "
        echo "  please get an updated compiler."
-       AC_MSG_ERROR([sorry])
+       AC_MSG_ERROR(sorry)
 }
 TMP_VERSION=`echo $CC_VERSION | cut -c 1-16`
 if test "$TMP_VERSION" = "gcc version 2.95"; then
@@ -69,7 +61,7 @@ case "$CC_VERSION" in
                bad_cc
                ;;
        *)
-               AC_MSG_RESULT([no known problems])
+               AC_MSG_RESULT(no known problems)
                ;;
 esac
 # end ------  BAD gcc? ------------
@@ -78,30 +70,29 @@ esac
 
 # this doesn't seem to work on older autoconf
 # AC_CHECK_LIB(readline, readline,,)
-AC_MSG_CHECKING([for readline support])
-AC_ARG_ENABLE(readline,
-       AC_HELP_STRING([--disable-readline],
-                       [do not use readline library]),
-       [],[enable_readline='yes'])
-AC_MSG_RESULT([$enable_readline]) 
-if test x$enable_readline = xyes ; then
-       LIBREADLINE="-lreadline -lncurses"
-       AC_DEFINE(HAVE_LIBREADLINE, 1, [readline library is available])
+AC_ARG_ENABLE(readline,        [  --enable-readline  use readline library],,
+                       enable_readline="yes")
+if test "$enable_readline" = "yes" ; then
+   LIBREADLINE="-lreadline -lncurses"
+   HAVE_LIBREADLINE="-DHAVE_LIBREADLINE=1"
 else 
-       LIBREADLINE=""
+   LIBREADLINE=""
+   HAVE_LIBREADLINE=""
 fi
 AC_SUBST(LIBREADLINE)
+AC_SUBST(HAVE_LIBREADLINE)
 
-AC_MSG_CHECKING([if efence debugging support is requested])
-AC_ARG_ENABLE(efence,
-       AC_HELP_STRING([--enable-efence],
-                       [use efence library]),
-       [],[enable_efence='no'])
-AC_MSG_RESULT([$enable_efence])
+AC_ARG_ENABLE(efence,  [  --enable-efence  use efence library],,
+                       enable_efence="no")
 if test "$enable_efence" = "yes" ; then
-       LIBEFENCE="-lefence"
-       AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested])
+   LIBEFENCE="-lefence"
+   HAVE_LIBEFENCE="-DHAVE_LIBEFENCE=1"
 else 
-       LIBEFENCE=""
+   LIBEFENCE=""
+   HAVE_LIBEFENCE=""
 fi
 AC_SUBST(LIBEFENCE)
+AC_SUBST(HAVE_LIBEFENCE)
+
similarity index 66%
rename from lustre/portals/knals/autoMakefile.am
rename to lnet/include/Makefile.am
index 9d04a46..2cf7f99 100644 (file)
@@ -3,4 +3,6 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-SUBDIRS = gmnal ibnal qswnal socknal
+SUBDIRS = portals linux
+EXTRA_DIST = config.h.in
+include $(top_srcdir)/Rules
diff --git a/lnet/include/linux/Makefile.am b/lnet/include/linux/Makefile.am
new file mode 100644 (file)
index 0000000..6a65cb5
--- /dev/null
@@ -0,0 +1,10 @@
+# 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 $(top_srcdir)/Rules
+
+linuxincludedir = $(includedir)/linux
+
+linuxinclude_HEADERS=kp30.h portals_lib.h
index c55dd37..9e7e7c2 100644 (file)
@@ -8,7 +8,7 @@
 #define PORTAL_DEBUG
 
 #ifndef offsetof
-# define offsetof(typ,memb)     ((unsigned long)((char *)&(((typ *)0)->memb)))
+# define offsetof(typ,memb)     ((int)((char *)&(((typ *)0)->memb)))
 #endif
 
 #define LOWEST_BIT_SET(x)       ((x) & ~((x) - 1))
@@ -301,7 +301,6 @@ extern void kportal_blockallsigs (void);
 #endif
 # include <unistd.h>
 # include <time.h>
-# include <limits.h>
 # include <asm/types.h>
 # ifndef DEBUG_SUBSYSTEM
 #  define DEBUG_SUBSYSTEM S_UNDEFINED
@@ -310,12 +309,7 @@ extern void kportal_blockallsigs (void);
 #  undef NDEBUG
 #  include <assert.h>
 #  define LASSERT(e)     assert(e)
-#  define LASSERTF(cond, args...)                                              \
-do {                                                                           \
-          if (!(cond))                                                         \
-                CERROR(args);                                                  \
-          assert(cond);                                                        \
-} while (0)
+#  define LASSERTF(cond, args...)     assert(cond)
 # else
 #  define LASSERT(e)
 #  define LASSERTF(cond, args...) do { } while (0)
@@ -323,7 +317,6 @@ do {                                                                           \
 # define printk(format, args...) printf (format, ## args)
 # define PORTAL_ALLOC(ptr, size) do { (ptr) = malloc(size); } while (0);
 # define PORTAL_FREE(a, b) do { free(a); } while (0);
-void portals_debug_dumplog(void);
 # define portals_debug_msg(subsys, mask, file, fn, line, stack, format, a...) \
     printf("%02x:%06x (@%lu %s:%s,l. %d %d %lu): " format,                    \
            (subsys), (mask), (long)time(0), file, fn, line,                   \
@@ -440,6 +433,40 @@ struct portals_device_userstate
  * USER LEVEL STUFF BELOW
  */
 
+#define PORTALS_CFG_VERSION 0x00010001;
+
+struct portals_cfg {
+        __u32 pcfg_version;
+        __u32 pcfg_command;
+
+        __u32 pcfg_nal;
+        __u32 pcfg_flags;
+
+        __u32 pcfg_gw_nal;
+        __u64 pcfg_nid;
+        __u64 pcfg_nid2;
+        __u64 pcfg_nid3;
+        __u32 pcfg_id;
+        __u32 pcfg_misc;
+        __u32 pcfg_fd;
+        __u32 pcfg_count;
+        __u32 pcfg_size;
+        __u32 pcfg_wait;
+
+        __u32 pcfg_plen1; /* buffers in userspace */
+        char *pcfg_pbuf1;
+        __u32 pcfg_plen2; /* buffers in userspace */
+        char *pcfg_pbuf2;
+};
+
+#define PCFG_INIT(pcfg, cmd)                            \
+do {                                                    \
+        memset(&pcfg, 0, sizeof(pcfg));                 \
+        pcfg.pcfg_version = PORTALS_CFG_VERSION;        \
+        pcfg.pcfg_command = (cmd);                      \
+                                                        \
+} while (0)
+
 #define PORTAL_IOCTL_VERSION 0x00010007
 #define PING_SYNC       0
 #define PING_ASYNC      1
@@ -645,13 +672,21 @@ enum {
         GMNAL     = 3,
         /*          4 unused */
         TCPNAL    = 5,
-        ROUTER    = 6,
-        IBNAL     = 7,
-        CRAY_KB_ERNAL = 8,
+        SCIMACNAL = 6,
+        ROUTER    = 7,
+        IBNAL     = 8,
         NAL_ENUM_END_MARKER
 };
 
-#define PTL_NALFMT_SIZE               26 /* %u:%u.%u.%u.%u (10+4+4+4+3+1) */
+#ifdef __KERNEL__
+extern ptl_handle_ni_t  kqswnal_ni;
+extern ptl_handle_ni_t  ksocknal_ni;
+extern ptl_handle_ni_t  kgmnal_ni;
+extern ptl_handle_ni_t  kibnal_ni;
+extern ptl_handle_ni_t  kscimacnal_ni;
+#endif
+
+#define PTL_NALFMT_SIZE         16
 
 #define NAL_MAX_NR (NAL_ENUM_END_MARKER - 1)
 
@@ -676,6 +711,10 @@ enum {
         DEBUG_DAEMON_CONTINUE    =  4,
 };
 
+/* module.c */
+typedef int (*nal_cmd_handler_t)(struct portals_cfg *, void * private);
+int kportal_nal_register(int nal, nal_cmd_handler_t handler, void * private);
+int kportal_nal_unregister(int nal);
 
 enum cfg_record_type {
         PORTALS_CFG_TYPE = 1,
@@ -683,6 +722,10 @@ enum cfg_record_type {
 };
 
 typedef int (*cfg_record_cb_t)(enum cfg_record_type, int len, void *data);
+int kportal_nal_cmd(struct portals_cfg *);
+
+ptl_handle_ni_t *kportal_get_ni (int nal);
+void kportal_put_ni (int nal);
 
 #ifdef __CYGWIN__
 # ifndef BITS_PER_LONG
@@ -694,16 +737,6 @@ typedef int (*cfg_record_cb_t)(enum cfg_record_type, int len, void *data);
 # endif
 #endif
 
-#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
-
 #if defined(__x86_64__)
 # define LPU64 "%Lu"
 # define LPD64 "%Ld"
index 51d2d2f..45b58fe 100644 (file)
@@ -81,6 +81,21 @@ typedef struct {
         void                    *kpr_arg;
 } kpr_router_t;
 
+/* Router's control interface (Kernel Portals Routing Control Interface) */
+typedef const struct {
+        int     (*kprci_add_route)(int gateway_nal, ptl_nid_t gateway_nid,
+                                   ptl_nid_t lo_nid, ptl_nid_t hi_nid);
+        int     (*kprci_del_route)(int gateway_nal, ptl_nid_t gateway_nid,
+                                   ptl_nid_t lo_nid, ptl_nid_t hi_nid);
+        int     (*kprci_get_route)(int index, int *gateway_nal,
+                                   ptl_nid_t *gateway,
+                                   ptl_nid_t *lo_nid, ptl_nid_t *hi_nid,
+                                   int *alive);
+        int     (*kprci_notify)(int gateway_nal, ptl_nid_t gateway_nid,
+                                int alive, time_t when);
+} kpr_control_interface_t;
+
+extern kpr_control_interface_t  kpr_control_interface;
 extern kpr_router_interface_t   kpr_router_interface;
 
 static inline int
index 1d27768..3ebf935 100644 (file)
@@ -6,43 +6,8 @@
 
 #define PORTAL_DEBUG
 
-/* I think this beast is just trying to get cycles_t and get_cycles().
- * this should be in its own header. */
-#ifdef __linux__
-# include <asm/types.h>
-# if defined(__powerpc__) && !defined(__KERNEL__)
-#  define __KERNEL__
-#  include <asm/timex.h>
-#  undef __KERNEL__
-# else
-#  if defined(__KERNEL__)
-#   include <asm/timex.h>
-#  else
-#   include <sys/time.h>
-#   define cycles_t unsigned long
-static inline cycles_t get_cycles(void) 
-{
-        struct timeval tv;
-        gettimeofday(&tv, NULL);
-        return (tv.tv_sec * 100000) + tv.tv_usec;
-}
-#  endif
-# endif
-#else
-# include <sys/types.h>
-typedef u_int32_t __u32;
-typedef u_int64_t __u64;
-#endif
-
-#ifdef __KERNEL__
-# include <linux/time.h>
-#else
-# include <sys/time.h>
-# define do_gettimeofday(tv) gettimeofday(tv, NULL);
-#endif
-
 #ifndef offsetof
-# define offsetof(typ,memb)     ((unsigned long)((char *)&(((typ *)0)->memb)))
+# define offsetof(typ,memb)     ((int)((char *)&(((typ *)0)->memb)))
 #endif
 
 #define LOWEST_BIT_SET(x)       ((x) & ~((x) - 1))
@@ -79,7 +44,7 @@ extern unsigned int portal_cerror;
 #define S_PTLROUTER   0x00100000
 #define S_COBD        0x00200000
 #define S_IBNAL       0x00400000
-#define S_SM          0x00800000
+#define S_LMV         0x00800000
 
 /* If you change these values, please keep portals/utils/debug.c
  * up to date! */
@@ -200,45 +165,6 @@ do {                                                                    \
 #define EXIT                            do { } while (0)
 #endif
 
-#define PORTALS_CFG_VERSION 0x00010001;
-
-struct portals_cfg {
-        __u32 pcfg_version;
-        __u32 pcfg_command;
-
-        __u32 pcfg_nal;
-        __u32 pcfg_flags;
-
-        __u32 pcfg_gw_nal;
-        __u64 pcfg_nid;
-        __u64 pcfg_nid2;
-        __u64 pcfg_nid3;
-        __u32 pcfg_id;
-        __u32 pcfg_misc;
-        __u32 pcfg_fd;
-        __u32 pcfg_count;
-        __u32 pcfg_size;
-        __u32 pcfg_wait;
-
-        __u32 pcfg_plen1; /* buffers in userspace */
-        char *pcfg_pbuf1;
-        __u32 pcfg_plen2; /* buffers in userspace */
-        char *pcfg_pbuf2;
-};
-
-#define PCFG_INIT(pcfg, cmd)                            \
-do {                                                    \
-        memset(&pcfg, 0, sizeof(pcfg));                 \
-        pcfg.pcfg_version = PORTALS_CFG_VERSION;        \
-        pcfg.pcfg_command = (cmd);                      \
-                                                        \
-} while (0)
-
-typedef int (nal_cmd_handler_fn)(struct portals_cfg *, void *);
-int libcfs_nal_cmd_register(int nal, nal_cmd_handler_fn *handler, void *arg);
-int libcfs_nal_cmd(struct portals_cfg *pcfg);
-void libcfs_nal_cmd_unregister(int nal);
-
 struct portal_ioctl_data {
         __u32 ioc_len;
         __u32 ioc_version;
@@ -271,7 +197,6 @@ struct portal_ioctl_data {
         char ioc_bulk[0];
 };
 
-
 #ifdef __KERNEL__
 
 #include <linux/list.h>
index 9ab4020..4361858 100644 (file)
@@ -40,9 +40,6 @@
 # define RECALC_SIGPENDING         recalc_sigpending()
 # define CURRENT_SECONDS           CURRENT_TIME
 
-# define kernel_text_address(addr) is_kernel_text_address(addr)
-extern int is_kernel_text_address(unsigned long addr);
-
 #else /* 2.4.x */
 
 # define SIGNAL_MASK_LOCK(task, flags)                                  \
@@ -54,30 +51,17 @@ extern int is_kernel_text_address(unsigned long addr);
 # define RECALC_SIGPENDING         recalc_sigpending(current)
 # define CURRENT_SECONDS           CURRENT_TIME
 
-# define kernel_text_address(addr) is_kernel_text_address(addr)
-extern int is_kernel_text_address(unsigned long addr);
-
 #endif
 
 #if defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20))
-# define THREAD_NAME(comm, len, fmt, a...)                              \
-        snprintf(comm, len, fmt "|%d", ## a, current->thread.extern_pid)
+# define THREAD_NAME(comm, fmt, a...)                                   \
+        sprintf(comm, fmt "|%d", ## a, current->thread.extern_pid)
 #elif defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-# define THREAD_NAME(comm, len, fmt, a...)                              \
-        snprintf(comm, len,fmt"|%d", ## a,current->thread.mode.tt.extern_pid)
-#else
-# define THREAD_NAME(comm, len, fmt, a...)                              \
-        snprintf(comm, len, fmt, ## a)
-#endif
-
-#ifdef HAVE_PAGE_LIST
-/* 2.4 alloc_page users can use page->list */
-#define PAGE_LIST_ENTRY list
-#define PAGE_LIST(page) ((page)->list)
+# define THREAD_NAME(comm, fmt, a...)                                   \
+        sprintf(comm, fmt "|%d", ## a, current->thread.mode.tt.extern_pid)
 #else
-/* 2.6 alloc_page users can use page->lru */
-#define PAGE_LIST_ENTRY lru
-#define PAGE_LIST(page) ((page)->lru)
+# define THREAD_NAME(comm, fmt, a...)                                   \
+        sprintf(comm, fmt, ## a)
 #endif
 
 #endif /* _PORTALS_COMPAT_H */
diff --git a/lnet/include/lnet/Makefile.am b/lnet/include/lnet/Makefile.am
new file mode 100644 (file)
index 0000000..c61b084
--- /dev/null
@@ -0,0 +1,10 @@
+# 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 = base
+include $(top_srcdir)/Rules
+
+pkginclude_HEADERS=api-support.h api.h arg-blocks.h defines.h errno.h internal.h lib-dispatch.h lib-nal.h lib-p30.h lib-types.h myrnal.h nal.h p30.h ppid.h ptlctl.h stringtab.h types.h nalids.h list.h bridge.h ipmap.h procbridge.h lltrace.h
+
index cfae78c..db83ae7 100644 (file)
@@ -1,3 +1,5 @@
+# define DEBUG_SUBSYSTEM S_PORTALS
+# define PORTAL_DEBUG
 
 #include "build_check.h"
 
index 6d382bb..69fa339 100644 (file)
@@ -9,9 +9,9 @@
 int PtlInit(int *);
 void PtlFini(void);
 
-int PtlNIInit(ptl_interface_t interface, ptl_pid_t requested_pid,
-             ptl_ni_limits_t *desired_limits, ptl_ni_limits_t *actual_limits,
-              ptl_handle_ni_t *interface_out);
+int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size_in,
+              ptl_ac_index_t acl_size_in, ptl_pid_t requested_pid,
+              ptl_handle_ni_t * interface_out);
 
 int PtlNIInitialized(ptl_interface_t);
 
@@ -37,6 +37,17 @@ int PtlNIHandle(ptl_handle_any_t handle_in, ptl_handle_ni_t * interface_out);
 #endif
 
 
+/*
+ * PtlNIDebug: 
+ *
+ * This is not an official Portals 3 API call.  It is provided
+ * by the reference implementation to allow the maintainers an
+ * easy way to turn on and off debugging information in the
+ * library.  Do not use it in code that is not intended for use
+ * with any version other than the portable reference library.
+ */
+unsigned int PtlNIDebug(ptl_handle_ni_t ni, unsigned int mask_in);
+
 /* 
  * PtlNIFailNid
  *
@@ -112,8 +123,8 @@ int PtlMDUpdate_internal(ptl_handle_md_t md_in, ptl_md_t * old_inout,
 
 /* These should be called by users */
 int PtlEQAlloc(ptl_handle_ni_t ni_in, ptl_size_t count_in,
-               ptl_eq_handler_t handler,
-               ptl_handle_eq_t *handle_out);
+               int (*callback) (ptl_event_t * event),
+               ptl_handle_eq_t * handle_out);
 int PtlEQFree(ptl_handle_eq_t eventq_in);
 
 int PtlEQCount(ptl_handle_eq_t eventq_in, ptl_size_t * count_out);
index 21e30d5..0be8a3d 100644 (file)
@@ -18,7 +18,7 @@
 #define PTL_GETID     1
 #define PTL_NISTATUS  2
 #define PTL_NIDIST    3
-// #define PTL_NIDEBUG   4
+#define PTL_NIDEBUG   4
 #define PTL_MEATTACH  5
 #define PTL_MEINSERT  6
 // #define PTL_MEPREPEND 7
@@ -205,7 +205,7 @@ typedef struct PtlEQAlloc_in {
         ptl_size_t count_in;
         void *base_in;
         int len_in;
-        ptl_eq_handler_t callback_in;
+        int (*callback_in) (ptl_event_t * event);
 } PtlEQAlloc_in;
 
 typedef struct PtlEQAlloc_out {
index a98bfd9..499f32b 100644 (file)
@@ -37,11 +37,12 @@ typedef enum {
         PTL_MD_NO_UPDATE       = 18,
         PTL_FAIL               = 19,
 
-        PTL_IOV_INVALID        = 20,
+        PTL_IOV_TOO_MANY       = 20,
+        PTL_IOV_TOO_SMALL      = 21,
 
-       PTL_EQ_IN_USE           = 21,
+       PTL_EQ_IN_USE           = 22,
 
-        PTL_MAX_ERRNO          = 22
+        PTL_MAX_ERRNO          = 23
 } ptl_err_t;
 /* If you change these, you must update the string table in api-errno.c */
 
index 25778e4..94f4f48 100644 (file)
 
 #include <portals/p30.h>
 
-extern int ptl_init;           /* Has the library been initialized */
+extern int ptl_init;           /* Has the library be initialized */
 
 extern int ptl_ni_init(void);
+extern int ptl_me_init(void);
+extern int ptl_md_init(void);
+extern int ptl_eq_init(void);
+
+extern int ptl_me_ni_init(nal_t * nal);
+extern int ptl_md_ni_init(nal_t * nal);
+extern int ptl_eq_ni_init(nal_t * nal);
+
 extern void ptl_ni_fini(void);
+extern void ptl_me_fini(void);
+extern void ptl_md_fini(void);
+extern void ptl_eq_fini(void);
+
+extern void ptl_me_ni_fini(nal_t * nal);
+extern void ptl_md_ni_fini(nal_t * nal);
+extern void ptl_eq_ni_fini(nal_t * nal);
 
 static inline ptl_eq_t *
 ptl_handle2usereq (ptl_handle_eq_t *handle)
index 610c776..90ed4f5 100644 (file)
@@ -18,6 +18,7 @@
 extern int do_PtlGetId(nal_cb_t * nal, void *private, void *args, void *ret);
 extern int do_PtlNIStatus(nal_cb_t * nal, void *private, void *args, void *ret);
 extern int do_PtlNIDist(nal_cb_t * nal, void *private, void *args, void *ret);
+extern int do_PtlNIDebug(nal_cb_t * nal, void *private, void *args, void *ret);
 extern int do_PtlMEAttach(nal_cb_t * nal, void *private, void *args, void *ret);
 extern int do_PtlMEInsert(nal_cb_t * nal, void *private, void *args, void *ret);
 extern int do_PtlMEPrepend(nal_cb_t * nal, void *private, void *args,
index efa929c..350447e 100644 (file)
@@ -194,11 +194,11 @@ lib_md_alloc (nal_cb_t *nal, ptl_md_t *umd)
         int       niov;
 
         if ((umd->options & PTL_MD_KIOV) != 0) {
-                niov = umd->length;
+                niov = umd->niov;
                 size = offsetof(lib_md_t, md_iov.kiov[niov]);
         } else {
                 niov = ((umd->options & PTL_MD_IOVEC) != 0) ?
-                       umd->length : 1;
+                       umd->niov : 1;
                 size = offsetof(lib_md_t, md_iov.iov[niov]);
         }
 
@@ -346,9 +346,8 @@ ptl_handle2me (ptl_handle_me_t *handle, nal_cb_t *nal)
         return (lh_entry (lh, lib_me_t, me_lh));
 }
 
-extern int lib_init(nal_cb_t *cb, ptl_process_id_t pid,
-                    ptl_ni_limits_t *desired_limits, 
-                    ptl_ni_limits_t *actual_limits);
+extern int lib_init(nal_cb_t * cb, ptl_nid_t nid, ptl_pid_t pid, int gsize,
+                    ptl_pt_index_t tbl_size, ptl_ac_index_t ac_size);
 extern int lib_fini(nal_cb_t * cb);
 extern void lib_dispatch(nal_cb_t * cb, void *private, int index,
                          void *arg_block, void *ret_block);
index efa929c..350447e 100644 (file)
@@ -194,11 +194,11 @@ lib_md_alloc (nal_cb_t *nal, ptl_md_t *umd)
         int       niov;
 
         if ((umd->options & PTL_MD_KIOV) != 0) {
-                niov = umd->length;
+                niov = umd->niov;
                 size = offsetof(lib_md_t, md_iov.kiov[niov]);
         } else {
                 niov = ((umd->options & PTL_MD_IOVEC) != 0) ?
-                       umd->length : 1;
+                       umd->niov : 1;
                 size = offsetof(lib_md_t, md_iov.iov[niov]);
         }
 
@@ -346,9 +346,8 @@ ptl_handle2me (ptl_handle_me_t *handle, nal_cb_t *nal)
         return (lh_entry (lh, lib_me_t, me_lh));
 }
 
-extern int lib_init(nal_cb_t *cb, ptl_process_id_t pid,
-                    ptl_ni_limits_t *desired_limits, 
-                    ptl_ni_limits_t *actual_limits);
+extern int lib_init(nal_cb_t * cb, ptl_nid_t nid, ptl_pid_t pid, int gsize,
+                    ptl_pt_index_t tbl_size, ptl_ac_index_t ac_size);
 extern int lib_fini(nal_cb_t * cb);
 extern void lib_dispatch(nal_cb_t * cb, void *private, int index,
                          void *arg_block, void *ret_block);
index ef618c7..40776a6 100644 (file)
@@ -169,7 +169,7 @@ struct lib_eq_t {
         ptl_size_t        size;
         ptl_event_t      *base;
         int               eq_refcount;
-        ptl_eq_handler_t  event_callback;
+        int (*event_callback) (ptl_event_t * event);
         void             *eq_addrkey;
 };
 
@@ -245,11 +245,15 @@ typedef struct {
  * extracted by masking with (PTL_COOKIE_TYPES - 1) */
 
 typedef struct {
+        int up;
+        int refcnt;
         ptl_nid_t nid;
         ptl_pid_t pid;
+        int num_nodes;
+        unsigned int debug;
         lib_ptl_t tbl;
+        lib_ac_t ac;
         lib_counters_t counters;
-        ptl_ni_limits_t actual_limits;
 
         int               ni_lh_hash_size;      /* size of lib handle hash table */
         struct list_head *ni_lh_hash_table;     /* all extant lib handles, this interface */
index 4b8631d..577ffab 100644 (file)
 #endif
 
 #include <portals/types.h>
+#include <portals/nal.h>
 #include <portals/api.h>
+#include <portals/nalids.h>
+
+/*
+ * Debugging flags reserved for the Portals reference library.
+ * These are not part of the API as described in the SAND report
+ * but are for the use of the maintainers of the reference implementation.
+ *
+ * It is not expected that the real implementations will export
+ * this functionality.
+ */
+#define PTL_DEBUG_NONE          0ul
+#define PTL_DEBUG_ALL           (0x0FFFul)     /* Only the Portals flags */
+
+#define __bit(x)                ((unsigned long) 1<<(x))
+#define PTL_DEBUG_PUT           __bit(0)
+#define PTL_DEBUG_GET           __bit(1)
+#define PTL_DEBUG_REPLY         __bit(2)
+#define PTL_DEBUG_ACK           __bit(3)
+#define PTL_DEBUG_DROP          __bit(4)
+#define PTL_DEBUG_REQUEST       __bit(5)
+#define PTL_DEBUG_DELIVERY      __bit(6)
+#define PTL_DEBUG_UNLINK        __bit(7)
+#define PTL_DEBUG_THRESHOLD     __bit(8)
+#define PTL_DEBUG_API           __bit(9)
+
+/*
+ * These eight are reserved for the NAL to define
+ * It should probably give them better names...
+ */
+#define PTL_DEBUG_NI_ALL        (0xF000ul)     /* Only the NAL flags */
+#define PTL_DEBUG_NI0           __bit(24)
+#define PTL_DEBUG_NI1           __bit(25)
+#define PTL_DEBUG_NI2           __bit(26)
+#define PTL_DEBUG_NI3           __bit(27)
+#define PTL_DEBUG_NI4           __bit(28)
+#define PTL_DEBUG_NI5           __bit(29)
+#define PTL_DEBUG_NI6           __bit(30)
+#define PTL_DEBUG_NI7           __bit(31)
 
 #endif
index 2af336e..12ef47a 100644 (file)
 #ifndef _PTLCTL_H_
 #define _PTLCTL_H_
 
-#include <portals/types.h>
-#include <linux/kp30.h>
-#include <linux/libcfs.h>
-
 #define PORTALS_DEV_ID 0
 #define PORTALS_DEV_PATH "/dev/portals"
 #define OBD_DEV_ID 1
@@ -80,15 +76,13 @@ int jt_dbg_panic(int argc, char **argv);
 int ptl_set_cfg_record_cb(cfg_record_cb_t cb);
 
 /* l_ioctl.c */
-typedef int (ioc_handler_t)(int dev_id, unsigned int opc, void *buf);
+typedef int (ioc_handler_t)(int dev_id, int opc, void *buf);
 void set_ioc_handler(ioc_handler_t *handler);
 int register_ioc_dev(int dev_id, const char * dev_name);
 void unregister_ioc_dev(int dev_id);
 int set_ioctl_dump(char * file);
-int l_ioctl(int dev_id, unsigned int opc, void *buf);
-int parse_dump(char * dump_file, ioc_handler_t ioc_func);
+int l_ioctl(int dev_id, int opc, void *buf);
+int parse_dump(char * dump_file, int (*ioc_func)(int dev_id, int opc, void *));
 int jt_ioc_dump(int argc, char **argv);
-extern char *dump_filename;
-int dump(int dev_id, unsigned int opc, void *buf);
 
 #endif
index 1f925c1..5b72046 100644 (file)
 typedef struct nal_t nal_t;
 
 struct nal_t {
-       int              nal_refct;
-       void            *nal_data;
+       ptl_ni_t ni;
+       int refct;
+       void *nal_data;
+       int *timeout;           /* for libp30api users */
+       int (*forward) (nal_t * nal, int index, /* Function ID */
+                       void *args, size_t arg_len, void *ret, size_t ret_len);
 
-       int (*startup) (nal_t *nal, ptl_pid_t requested_pid,
-                       ptl_ni_limits_t *req, ptl_ni_limits_t *actual);
-       
-       void (*shutdown) (nal_t *nal);
+       int (*shutdown) (nal_t * nal, int interface);
 
-       int (*forward) (nal_t *nal, int index,  /* Function ID */
-                       void *args, size_t arg_len, void *ret, size_t ret_len);
+       int (*validate) (nal_t * nal, void *base, size_t extent);
 
-       int (*yield) (nal_t *nal, unsigned long *flags, int milliseconds);
+       int (*yield) (nal_t * nal, unsigned long *flags, int milliseconds);
 
-       void (*lock) (nal_t *nal, unsigned long *flags);
+       void (*lock) (nal_t * nal, unsigned long *flags);
 
-       void (*unlock) (nal_t *nal, unsigned long *flags);
+       void (*unlock) (nal_t * nal, unsigned long *flags);
 };
 
+typedef nal_t *(ptl_interface_t) (int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid);
+extern nal_t *PTL_IFACE_IP(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid);
+extern nal_t *PTL_IFACE_MYR(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid);
+
 extern nal_t *ptl_hndl2nal(ptl_handle_any_t * any);
 
-#ifdef __KERNEL__
-extern int ptl_register_nal(ptl_interface_t interface, nal_t *nal);
-extern void ptl_unregister_nal(ptl_interface_t interface);
+#ifndef PTL_IFACE_DEFAULT
+#define PTL_IFACE_DEFAULT (PTL_IFACE_IP)
 #endif
 
 #endif
index 55a991b..1568593 100644 (file)
@@ -1,2 +1,6 @@
 #include "build_check.h"
 
+#define PTL_IFACE_TCP 1
+#define PTL_IFACE_ER 2
+#define PTL_IFACE_SS 3
+#define PTL_IFACE_MAX 4
index 4b8631d..577ffab 100644 (file)
 #endif
 
 #include <portals/types.h>
+#include <portals/nal.h>
 #include <portals/api.h>
+#include <portals/nalids.h>
+
+/*
+ * Debugging flags reserved for the Portals reference library.
+ * These are not part of the API as described in the SAND report
+ * but are for the use of the maintainers of the reference implementation.
+ *
+ * It is not expected that the real implementations will export
+ * this functionality.
+ */
+#define PTL_DEBUG_NONE          0ul
+#define PTL_DEBUG_ALL           (0x0FFFul)     /* Only the Portals flags */
+
+#define __bit(x)                ((unsigned long) 1<<(x))
+#define PTL_DEBUG_PUT           __bit(0)
+#define PTL_DEBUG_GET           __bit(1)
+#define PTL_DEBUG_REPLY         __bit(2)
+#define PTL_DEBUG_ACK           __bit(3)
+#define PTL_DEBUG_DROP          __bit(4)
+#define PTL_DEBUG_REQUEST       __bit(5)
+#define PTL_DEBUG_DELIVERY      __bit(6)
+#define PTL_DEBUG_UNLINK        __bit(7)
+#define PTL_DEBUG_THRESHOLD     __bit(8)
+#define PTL_DEBUG_API           __bit(9)
+
+/*
+ * These eight are reserved for the NAL to define
+ * It should probably give them better names...
+ */
+#define PTL_DEBUG_NI_ALL        (0xF000ul)     /* Only the NAL flags */
+#define PTL_DEBUG_NI0           __bit(24)
+#define PTL_DEBUG_NI1           __bit(25)
+#define PTL_DEBUG_NI2           __bit(26)
+#define PTL_DEBUG_NI3           __bit(27)
+#define PTL_DEBUG_NI4           __bit(28)
+#define PTL_DEBUG_NI5           __bit(29)
+#define PTL_DEBUG_NI6           __bit(30)
+#define PTL_DEBUG_NI7           __bit(31)
 
 #endif
index 2af336e..12ef47a 100644 (file)
 #ifndef _PTLCTL_H_
 #define _PTLCTL_H_
 
-#include <portals/types.h>
-#include <linux/kp30.h>
-#include <linux/libcfs.h>
-
 #define PORTALS_DEV_ID 0
 #define PORTALS_DEV_PATH "/dev/portals"
 #define OBD_DEV_ID 1
@@ -80,15 +76,13 @@ int jt_dbg_panic(int argc, char **argv);
 int ptl_set_cfg_record_cb(cfg_record_cb_t cb);
 
 /* l_ioctl.c */
-typedef int (ioc_handler_t)(int dev_id, unsigned int opc, void *buf);
+typedef int (ioc_handler_t)(int dev_id, int opc, void *buf);
 void set_ioc_handler(ioc_handler_t *handler);
 int register_ioc_dev(int dev_id, const char * dev_name);
 void unregister_ioc_dev(int dev_id);
 int set_ioctl_dump(char * file);
-int l_ioctl(int dev_id, unsigned int opc, void *buf);
-int parse_dump(char * dump_file, ioc_handler_t ioc_func);
+int l_ioctl(int dev_id, int opc, void *buf);
+int parse_dump(char * dump_file, int (*ioc_func)(int dev_id, int opc, void *));
 int jt_ioc_dump(int argc, char **argv);
-extern char *dump_filename;
-int dump(int dev_id, unsigned int opc, void *buf);
 
 #endif
index ef2712b..902db76 100644 (file)
@@ -3,7 +3,28 @@
 
 #include "build_check.h"
 
-#include <linux/libcfs.h>
+#ifdef __linux__
+# include <asm/types.h>
+# if defined(__powerpc__) && !defined(__KERNEL__)
+#  define __KERNEL__
+#  include <asm/timex.h>
+#  undef __KERNEL__
+# else
+#  include <asm/timex.h>
+# endif
+#else
+# include <sys/types.h>
+typedef u_int32_t __u32;
+typedef u_int64_t __u64;
+#endif
+
+#ifdef __KERNEL__
+# include <linux/time.h>
+#else
+# include <sys/time.h>
+# define do_gettimeofday(tv) gettimeofday(tv, NULL);
+#endif
+
 #include <portals/errno.h>
 
 /* This implementation uses the same type for API function return codes and
@@ -20,6 +41,7 @@ typedef __u64 ptl_hdr_data_t;
 typedef __u32 ptl_size_t;
 
 #define PTL_TIME_FOREVER    (-1)
+#define PTL_EQ_HANDLER_NONE NULL
 
 typedef struct {
         unsigned long nal_idx;                 /* which network interface */
@@ -59,6 +81,12 @@ typedef enum {
 } ptl_ins_pos_t;
 
 typedef struct {
+       struct page     *kiov_page;
+       unsigned int     kiov_len;
+       unsigned int     kiov_offset;
+} ptl_kiov_t;
+
+typedef struct {
         void            *start;
         ptl_size_t       length;
         int              threshold;
@@ -66,6 +94,7 @@ typedef struct {
         unsigned int     options;
         void            *user_ptr;
         ptl_handle_eq_t  eventq;
+       unsigned int     niov;
 } ptl_md_t;
 
 /* Options for the MD structure */
@@ -83,19 +112,9 @@ typedef struct {
 
 /* For compatibility with Cray Portals */
 #define PTL_MD_LUSTRE_COMPLETION_SEMANTICS  0
-#define PTL_MD_PHYS                         0
 
 #define PTL_MD_THRESH_INF       (-1)
 
-/* NB lustre portals uses struct iovec internally! */
-typedef struct iovec ptl_md_iovec_t;
-
-typedef struct {
-       struct page     *kiov_page;
-       unsigned int     kiov_len;
-       unsigned int     kiov_offset;
-} ptl_kiov_t;
-
 typedef enum {
         PTL_EVENT_GET_START,
         PTL_EVENT_GET_END,
@@ -149,9 +168,6 @@ typedef enum {
         PTL_NOACK_REQ
 } ptl_ack_req_t;
 
-typedef void (*ptl_eq_handler_t)(ptl_event_t *event);
-#define PTL_EQ_HANDLER_NONE NULL
-
 typedef struct {
         volatile ptl_seq_t sequence;
         ptl_size_t size;
@@ -164,14 +180,11 @@ typedef struct {
 } ptl_ni_t;
 
 typedef struct {
-       int max_mes;
-       int max_mds;
-       int max_eqs;
-       int max_ac_index;
-       int max_pt_index;
-       int max_md_iovecs;
-       int max_me_list;
-       int max_getput_md;
+        int max_match_entries;    /* max number of match entries */
+        int max_mem_descriptors;  /* max number of memory descriptors */
+        int max_event_queues;     /* max number of event queues */
+        int max_atable_index;     /* maximum access control list table index */
+        int max_ptable_index;     /* maximum portals table index */
 } ptl_ni_limits_t;
 
 /*
@@ -189,7 +202,4 @@ typedef enum {
 
 typedef int ptl_sr_value_t;
 
-typedef int ptl_interface_t;
-#define PTL_IFACE_DEFAULT    (-1)
-
 #endif
index f5fd0b0..89a4aa6 100644 (file)
@@ -1,5 +1,3 @@
 Makefile
-autoMakefile
-autoMakefile.in
-.*.cmd
-.depend
+Makefile.in
+.*.o.cmd
similarity index 59%
rename from lustre/include/lustre/Makefile.am
rename to lnet/klnds/Makefile.am
index a785ada..df6ee5c 100644 (file)
@@ -3,7 +3,5 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-
-pkginclude_HEADERS = lustre_user.h liblustreapi.h
-
-EXTRA_DIST = $(pkginclude_HEADERS)
+DIST_SUBDIRS= socknal qswnal gmnal scimacnal ibnal
+SUBDIRS= socknal @QSWNAL@ @GMNAL@ @SCIMACNAL@ @IBNAL@
diff --git a/lnet/klnds/Makefile.in b/lnet/klnds/Makefile.in
deleted file mode 100644 (file)
index b5ed168..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-@BUILD_GMNAL_TRUE@subdir-m += gmnal
-@BUILD_IBNAL_TRUE@subdir-m += ibnal
-@BUILD_QSWNAL_TRUE@subdir-m += qswnal
-subdir-m += socknal
-
-@INCLUDE_RULES@
index 642e2e6..e995588 100644 (file)
@@ -1,10 +1,3 @@
 .deps
 Makefile
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.cmd
-.*.flags
-.tmp_versions
-.depend
+Makefile.in
diff --git a/lnet/klnds/gmlnd/Makefile.am b/lnet/klnds/gmlnd/Makefile.am
new file mode 100644 (file)
index 0000000..bac4680
--- /dev/null
@@ -0,0 +1,13 @@
+# 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 ../../Rules.linux
+
+MODULE = kgmnal
+modulenet_DATA = kgmnal.o
+EXTRA_PROGRAMS = kgmnal
+
+DEFS = -DGM_KERNEL
+kgmnal_SOURCES = gmnal.h gmnal_api.c gmnal_cb.c gmnal_comm.c gmnal_utils.c gmnal_module.c
diff --git a/lnet/klnds/gmlnd/Makefile.in b/lnet/klnds/gmlnd/Makefile.in
deleted file mode 100644 (file)
index 89ea361..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MODULES := kgmnal
-kgmnal-objs := gmnal_api.o gmnal_cb.o gmnal_comm.o gmnal_utils.o gmnal_module.o
-
-EXTRA_PRE_CFLAGS := @GMCPPFLAGS@
-
-@INCLUDE_RULES@
diff --git a/lnet/klnds/gmlnd/autoMakefile.am b/lnet/klnds/gmlnd/autoMakefile.am
deleted file mode 100644 (file)
index d8b9edb..0000000
+++ /dev/null
@@ -1,15 +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
-if BUILD_GMNAL
-if !CRAY_PORTALS
-modulenet_DATA = kgmnal$(KMODEXT)
-endif
-endif
-endif
-
-MOSTLYCLEANFILES = *.o *.ko *.mod.c
-DIST_SOURCES = $(kgmnal-objs:%.o=%.c) gmnal.h
index e48552e..9955599 100644 (file)
@@ -190,6 +190,7 @@ typedef struct _gmnal_rxtwe {
 #define NRXTHREADS 10 /* max number of receiver threads */
 
 typedef struct _gmnal_data_t {
+       int             refcnt;
        spinlock_t      cb_lock;
        spinlock_t      stxd_lock;
        struct semaphore stxd_token;
@@ -308,12 +309,9 @@ extern gmnal_data_t        *global_nal_data;
 /*
  *     API NAL
  */
-int gmnal_api_startup(nal_t *, ptl_pid_t, 
-                      ptl_ni_limits_t *, ptl_ni_limits_t *);
-
 int gmnal_api_forward(nal_t *, int, void *, size_t, void *, size_t);
 
-void gmnal_api_shutdown(nal_t *);
+int gmnal_api_shutdown(nal_t *, int);
 
 int gmnal_api_validate(nal_t *, void *, size_t);
 
@@ -325,13 +323,14 @@ void gmnal_api_unlock(nal_t *, unsigned long *);
 
 
 #define GMNAL_INIT_NAL(a)      do {    \
-                                a->startup = gmnal_api_startup; \
                                a->forward = gmnal_api_forward; \
                                a->shutdown = gmnal_api_shutdown; \
+                               a->validate = NULL; \
                                a->yield = gmnal_api_yield; \
                                a->lock = gmnal_api_lock; \
                                a->unlock = gmnal_api_unlock; \
                                a->timeout = NULL; \
+                               a->refct = 1; \
                                a->nal_data = NULL; \
                                } while (0)
 
@@ -374,7 +373,7 @@ void gmnal_cb_sti(nal_cb_t *, unsigned long *);
 
 int gmnal_cb_dist(nal_cb_t *, ptl_nid_t, unsigned long *);
 
-int gmnal_init(void);
+nal_t *gmnal_init(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t rpid);
 
 void  gmnal_fini(void);
 
index 7c94f93..338d75c 100644 (file)
@@ -123,51 +123,18 @@ gmnal_api_forward(nal_t *nal, int index, void *args, size_t arg_len,
 
 /*
  *     gmnal_api_shutdown
- *      nal_refct == 0 => called on last matching PtlNIFini()
  *     Close down this interface and free any resources associated with it
  *     nal_t   nal     our nal to shutdown
  */
-void
+int
 gmnal_api_shutdown(nal_t *nal, int interface)
 {
-       gmnal_data_t    *nal_data;
-       nal_cb_t        *nal_cb;
-
-        if (nal->nal_refct != 0)
-                return;
-        
-       CDEBUG(D_TRACE, "gmnal_api_shutdown: nal_data [%p]\n", nal_data);
-
-        LASSERT(nal == global_nal_data->nal);
-        nal_data = nal->nal_data;
-        LASSERT(nal_data == global_nal_data);
-        nal_cb = nal_data->nal_cb;
-
-        /* Stop portals calling our ioctl handler */
-        libcfs_nal_cmd_unregister(GMNAL);
 
-        /* XXX for shutdown "under fire" we probably need to set a shutdown
-         * flag so when lib calls us we fail immediately and dont queue any
-         * more work but our threads can still call into lib OK.  THEN
-         * shutdown our threads, THEN lib_fini() */
-        lib_fini(nal_cb);
+       gmnal_data_t    *nal_data = nal->nal_data;
 
-       gmnal_stop_rxthread(nal_data);
-       gmnal_stop_ctthread(nal_data);
-       gmnal_free_txd(nal_data);
-       gmnal_free_srxd(nal_data);
-       GMNAL_GM_LOCK(nal_data);
-       gm_close(nal_data->gm_port);
-       gm_finalize();
-       GMNAL_GM_UNLOCK(nal_data);
-        if (nal_data->sysctl)
-                unregister_sysctl_table (nal_data->sysctl);
-       PORTAL_FREE(nal, sizeof(nal_t));        
-       PORTAL_FREE(nal_data, sizeof(gmnal_data_t));    
-       PORTAL_FREE(nal_cb, sizeof(nal_cb_t));
+       CDEBUG(D_TRACE, "gmnal_api_shutdown: nal_data [%p]\n", nal_data);
 
-        global_nal_data = NULL;
-        PORTAL_MODULE_UNUSE;
+       return(PTL_OK);
 }
 
 
@@ -243,54 +210,57 @@ gmnal_api_unlock(nal_t *nal, unsigned long *flags)
 }
 
 
-int
-gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
-                  ptl_ni_limits_t *requested_limits,
-                  ptl_ni_limits_t *actual_limits)
+nal_t *
+gmnal_init(int interface, ptl_pt_index_t ptl_size, ptl_ac_index_t ac_size, 
+           ptl_pid_t rpid)
 {
 
+       nal_t           *nal = NULL;
        nal_cb_t        *nal_cb = NULL;
        gmnal_data_t    *nal_data = NULL;
        gmnal_srxd_t    *srxd = NULL;
        gm_status_t     gm_status;
        unsigned int    local_nid = 0, global_nid = 0;
-        ptl_process_id_t process_id;
-
-        if (nal->nal_refct != 0) {
-                if (actual_limits != NULL) {
-                        nal_data = (gmnal_data_t *)nal->nal_data;
-                        nal_cb = nal_data->nal_cb;
-                        *actual_limits = nal->_cb->ni.actual_limits;
-                return (PTL_OK);
-        }
+       ptl_nid_t       portals_nid;
+       ptl_pid_t       portals_pid = 0;
 
-        /* Called on first PtlNIInit() */
 
-       CDEBUG(D_TRACE, "startup\n");
+       CDEBUG(D_TRACE, "gmnal_init : interface [%d], ptl_size [%d], "
+              "ac_size[%d]\n", interface, ptl_size, ac_size);
 
-        LASSERT(global_nal_data == NULL);
 
        PORTAL_ALLOC(nal_data, sizeof(gmnal_data_t));
        if (!nal_data) {
                CDEBUG(D_ERROR, "can't get memory\n");
-               return(PTL_NO_SPACE);
+               return(NULL);
        }       
        memset(nal_data, 0, sizeof(gmnal_data_t));
        /*
         *      set the small message buffer size 
         */
+       nal_data->refcnt = 1;
 
        CDEBUG(D_INFO, "Allocd and reset nal_data[%p]\n", nal_data);
        CDEBUG(D_INFO, "small_msg_size is [%d]\n", nal_data->small_msg_size);
 
+       PORTAL_ALLOC(nal, sizeof(nal_t));
+       if (!nal) {
+               PORTAL_FREE(nal_data, sizeof(gmnal_data_t));
+               return(NULL);
+       }
+       memset(nal, 0, sizeof(nal_t));
+       CDEBUG(D_INFO, "Allocd and reset nal[%p]\n", nal);
+
        PORTAL_ALLOC(nal_cb, sizeof(nal_cb_t));
        if (!nal_cb) {
+               PORTAL_FREE(nal, sizeof(nal_t));
                PORTAL_FREE(nal_data, sizeof(gmnal_data_t));
-               return(PTL_NO_SPACE);
+               return(NULL);
        }
        memset(nal_cb, 0, sizeof(nal_cb_t));
        CDEBUG(D_INFO, "Allocd and reset nal_cb[%p]\n", nal_cb);
 
+       GMNAL_INIT_NAL(nal);
        GMNAL_INIT_NAL_CB(nal_cb);
        /*
         *      String them all together
@@ -310,9 +280,10 @@ gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
        CDEBUG(D_INFO, "Calling gm_init\n");
        if (gm_init() != GM_SUCCESS) {
                CDEBUG(D_ERROR, "call to gm_init failed\n");
+               PORTAL_FREE(nal, sizeof(nal_t));        
                PORTAL_FREE(nal_data, sizeof(gmnal_data_t));    
                PORTAL_FREE(nal_cb, sizeof(nal_cb_t));
-               return(PTL_FAIL);
+               return(NULL);
        }
 
 
@@ -355,9 +326,10 @@ gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
                GMNAL_GM_LOCK(nal_data);
                gm_finalize();
                GMNAL_GM_UNLOCK(nal_data);
+               PORTAL_FREE(nal, sizeof(nal_t));        
                PORTAL_FREE(nal_data, sizeof(gmnal_data_t));    
                PORTAL_FREE(nal_cb, sizeof(nal_cb_t));
-               return(PTL_FAIL);
+               return(NULL);
        }
 
        
@@ -372,9 +344,10 @@ gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
                gm_close(nal_data->gm_port);
                gm_finalize();
                GMNAL_GM_UNLOCK(nal_data);
+               PORTAL_FREE(nal, sizeof(nal_t));        
                PORTAL_FREE(nal_data, sizeof(gmnal_data_t));    
                PORTAL_FREE(nal_cb, sizeof(nal_cb_t));
-               return(PTL_FAIL);
+               return(NULL);
        }
 
 
@@ -401,9 +374,10 @@ gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
                gm_close(nal_data->gm_port);
                gm_finalize();
                GMNAL_GM_UNLOCK(nal_data);
+               PORTAL_FREE(nal, sizeof(nal_t));        
                PORTAL_FREE(nal_data, sizeof(gmnal_data_t));    
                PORTAL_FREE(nal_cb, sizeof(nal_cb_t));
-               return(PTL_FAIL);
+               return(NULL);
        }
 
        gmnal_start_kernel_threads(nal_data);
@@ -433,9 +407,10 @@ gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
                gm_close(nal_data->gm_port);
                gm_finalize();
                GMNAL_GM_UNLOCK(nal_data);
+               PORTAL_FREE(nal, sizeof(nal_t));        
                PORTAL_FREE(nal_data, sizeof(gmnal_data_t));    
                PORTAL_FREE(nal_cb, sizeof(nal_cb_t));
-               return(PTL_FAIL);
+               return(NULL);
        }
        nal_data->gm_local_nid = local_nid;
        CDEBUG(D_INFO, "Local node id is [%u]\n", local_nid);
@@ -453,9 +428,10 @@ gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
                gm_close(nal_data->gm_port);
                gm_finalize();
                GMNAL_GM_UNLOCK(nal_data);
+               PORTAL_FREE(nal, sizeof(nal_t));        
                PORTAL_FREE(nal_data, sizeof(gmnal_data_t));    
                PORTAL_FREE(nal_cb, sizeof(nal_cb_t));
-               return(PTL_FAIL);
+               return(NULL);
        }
        CDEBUG(D_INFO, "Global node id is [%u]\n", global_nid);
        nal_data->gm_global_nid = global_nid;
@@ -464,15 +440,13 @@ gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
 /*
        pid = gm_getpid();
 */
-        process_id.pid = 0;
-        process_id.nid = global_nid;
-        
-       CDEBUG(D_INFO, "portals_pid is [%u]\n", process_id.pid);
-       CDEBUG(D_INFO, "portals_nid is ["LPU64"]\n", process_id.nid);
+       CDEBUG(D_INFO, "portals_pid is [%u]\n", portals_pid);
+       portals_nid = (unsigned long)global_nid;
+       CDEBUG(D_INFO, "portals_nid is ["LPU64"]\n", portals_nid);
        
        CDEBUG(D_PORTALS, "calling lib_init\n");
-       if (lib_init(nal_cb, process_id
-                     requested_limits, actual_limits) != PTL_OK) {
+       if (lib_init(nal_cb, portals_nid, portals_pid, 1024, ptl_size
+                    ac_size) != PTL_OK) {
                CDEBUG(D_ERROR, "lib_init failed\n");
                gmnal_stop_rxthread(nal_data);
                gmnal_stop_ctthread(nal_data);
@@ -482,68 +456,22 @@ gmnal_api_startup(nal_t *nal, ptl_pid_t requested_pid,
                gm_close(nal_data->gm_port);
                gm_finalize();
                GMNAL_GM_UNLOCK(nal_data);
+               PORTAL_FREE(nal, sizeof(nal_t));        
                PORTAL_FREE(nal_data, sizeof(gmnal_data_t));    
                PORTAL_FREE(nal_cb, sizeof(nal_cb_t));
-               return(PTL_FAIL);
+               return(NULL);
                
        }
-
-       if (libcfs_nal_cmd_register(GMNAL, &gmnal_cmd, nal->nal_data) != 0) {
-               CDEBUG(D_INFO, "libcfs_nal_cmd_register failed\n");
-
-                /* XXX these cleanup cases should be restructured to
-                 * minimise duplication... */
-                lib_fini(nal_cb);
-                
-  &nbs