From b8329eb1a0b5baed5f7b958e10e2d9d93ac3f224 Mon Sep 17 00:00:00 2001 From: cvs2svn <admin@example.com> Date: Thu, 24 Apr 2008 11:54:20 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'unlabeled-1.84.6.9.6'. --- build/README.kernel-source | 103 - build/Rules.in | 78 - build/autoconf/.cvsignore | 2 - build/autoconf/Makefile.am | 4 - build/autoconf/lustre-build-darwin.m4 | 106 - build/checkstack.pl | 87 - build/clearpatches.sh | 13 - build/confirmpatches.sh | 12 - build/cvs-modified-files.pl | 47 - build/land2.sh | 34 - build/linux-merge-config.awk | 317 - build/linux-merge-modules.awk | 125 - build/merge1.sh | 104 - build/merge2.sh | 35 - build/osxpack/ReadMe.txt | 4 - build/osxpack/Welcome.txt | 4 - build/osxpack/packlustre.sh | 72 - build/osxpack/postflight | 13 - build/osxpack/preflight | 67 - build/osxpack/sysctl.conf | 15 - build/osxpack/uninstall_lustre | 111 - build/osxpack/unload_lustre | 18 - build/replace2.sh | 36 - build/sles8-post.sh | 49 - build/sles8-postun.sh | 22 - build/sles8-pre.sh | 2 - build/sles8-update_INITRD_MODULES.sh | 56 - build/sles8-update_rcfile_setting.sh | 35 - build/suse-functions.sh | 22 - build/suse-trigger-script.sh.in | 9 - build/update_oldconfig | 74 - .../patches/export-ext3-2.6-rhel4.patch | 35 - .../patches/export-ext3-2.6-suse.patch | 35 - .../export_symbols-ext3-2.6-suse.patch | 17 - .../patches/ext3-check-jbd-errors-2.6.5.patch | 113 - .../patches/ext3-check-jbd-errors-2.6.9.patch | 113 - ...able-write-bar-by-default-2.6-sles10.patch | 15 - .../patches/ext3-ea-in-inode-2.6-rhel4.patch | 840 - .../patches/ext3-ea-in-inode-2.6-suse.patch | 840 - .../patches/ext3-extents-2.6.12.patch | 2940 -- .../patches/ext3-extents-2.6.15.patch | 2947 -- .../patches/ext3-extents-2.6.16-sles10.patch | 2947 -- .../patches/ext3-extents-2.6.18-vanilla.patch | 2950 -- .../patches/ext3-extents-2.6.5.patch | 2951 -- .../patches/ext3-extents-2.6.9-rhel4.patch | 2926 -- .../patches/ext3-extents-bug11324.patch | 252 - .../ext3-external-journal-2.6.12.patch | 148 - .../patches/ext3-filterdata-2.6.15.patch | 25 - .../patches/ext3-htree-dot-2.6.patch | 23 - .../patches/ext3-ialloc-2.6.patch | 128 - .../ext3-include-fixes-2.6-rhel4.patch | 20 - .../patches/ext3-include-fixes-2.6-suse.patch | 20 - .../patches/ext3-lookup-dotdot-2.6.9.patch | 63 - .../ext3-map_inode_page-2.6-suse.patch | 86 - .../patches/ext3-mballoc2-2.6-fc5.patch | 3103 -- .../patches/ext3-mballoc2-2.6-suse.patch | 3108 -- .../patches/ext3-mballoc2-2.6.12.patch | 3102 -- .../ext3-mballoc2-2.6.18-vanilla.patch | 3140 -- .../patches/ext3-mballoc2-2.6.9-rhel4.patch | 3121 -- .../patches/ext3-nanosecond-2.6-rhel4.patch | 401 - .../patches/ext3-nanosecond-2.6-sles10.patch | 404 - .../patches/ext3-nanosecond-2.6-suse.patch | 195 - .../ext3-nanosecond-2.6.18-vanilla.patch | 403 - .../patches/ext3-nlinks-2.6.7.patch | 156 - .../patches/ext3-nlinks-2.6.9.patch | 158 - ...xt3-remove-cond_resched-calls-2.6.12.patch | 29 - .../ext3-rename-reserve-2.6-suse.patch | 263 - .../patches/ext3-san-jdike-2.6-suse.patch | 106 - .../ext3-sector_t-overflow-2.6.12.patch | 64 - .../ext3-sector_t-overflow-2.6.5-suse.patch | 44 - .../ext3-sector_t-overflow-2.6.9-rhel4.patch | 64 - .../patches/ext3-wantedi-2.6-rhel4.patch | 193 - .../patches/ext3-wantedi-2.6-suse.patch | 192 - .../patches/iopen-2.6-fc5.patch | 448 - .../patches/iopen-2.6-rhel4.patch | 471 - .../patches/iopen-2.6-suse.patch | 472 - .../kernel_patches/patches/iopen-2.6.12.patch | 471 - .../series/ldiskfs-2.6-fc3.series | 13 - .../series/ldiskfs-2.6-fc5.series | 12 - .../series/ldiskfs-2.6-rhel4.series | 17 - .../series/ldiskfs-2.6-sles10.series | 15 - .../series/ldiskfs-2.6-suse.series | 17 - .../series/ldiskfs-2.6.12-vanilla.series | 15 - .../series/ldiskfs-2.6.18-vanilla.series | 14 - ldiskfs/ldiskfs/Makefile.in | 21 - ldiskfs/ldiskfs/autoMakefile.am | 80 - lustre/.cvsignore | 30 - lustre/BUGS | 1 - lustre/BUILDING | 30 - lustre/ChangeLog | 5207 --- lustre/FDL | 355 - lustre/LICENSE | 372 - lustre/Makefile.in | 13 - lustre/autoMakefile.am | 63 - lustre/autoconf/.cvsignore | 2 - lustre/autoconf/Makefile.am | 1 - lustre/autoconf/lustre-core.m4 | 1693 - lustre/autoconf/lustre-version.ac | 36 - lustre/conf/.cvsignore | 2 - lustre/conf/Makefile.am | 14 - lustre/conf/lustre.dtd | 145 - lustre/conf/lustre2ldif.xsl | 308 - lustre/conf/modules.conf | 8 - lustre/conf/slapd-lustre.conf | 11 - lustre/conf/top.ldif | 4 - lustre/contrib/.cvsignore | 2 - lustre/contrib/Makefile.am | 5 - lustre/contrib/README | 6 - lustre/contrib/adio-lustre-mpich2-v03.patch | 1221 - lustre/contrib/mpich-1.2.6-lustre.patch | 1829 - lustre/contrib/mpich2-1.0.3.patch | 1831 - lustre/cvstest | 9 - lustre/doc/.cvsignore | 23 - lustre/doc/Makefile.am | 63 - lustre/doc/VERSIONING | 90 - lustre/doc/chbar.sh | 243 - lustre/doc/lctl.8 | 190 - lustre/doc/lfs.1 | 165 - lustre/doc/llbackup.8 | 258 - lustre/doc/llverdev.8 | 103 - lustre/doc/llverfs.txt | 48 - lustre/doc/lustre.7 | 73 - lustre/doc/mkfs.lustre.8 | 133 - lustre/doc/mount.lustre.8 | 134 - lustre/doc/postbar | 151 - lustre/doc/tex2pdf | 3043 -- lustre/doc/tunefs.lustre.8 | 102 - lustre/include/.cvsignore | 14 - lustre/include/Makefile.am | 18 - lustre/include/class_hash.h | 146 - lustre/include/darwin/lprocfs_status.h | 57 - lustre/include/darwin/lustre_compat.h | 75 - lustre/include/darwin/lustre_debug.h | 36 - lustre/include/darwin/lustre_dlm.h | 25 - lustre/include/darwin/lustre_fsfilt.h | 32 - lustre/include/darwin/lustre_handles.h | 12 - lustre/include/darwin/lustre_lib.h | 76 - lustre/include/darwin/lustre_lite.h | 84 - lustre/include/darwin/lustre_log.h | 11 - lustre/include/darwin/lustre_mds.h | 32 - lustre/include/darwin/lustre_net.h | 34 - lustre/include/darwin/lustre_quota.h | 16 - lustre/include/darwin/lustre_types.h | 7 - lustre/include/darwin/lustre_user.h | 47 - lustre/include/darwin/lvfs.h | 24 - lustre/include/darwin/obd.h | 39 - lustre/include/darwin/obd_class.h | 34 - lustre/include/darwin/obd_support.h | 58 - lustre/include/interval_tree.h | 106 - lustre/include/ioctl.h | 72 - lustre/include/liblustre.h | 906 - lustre/include/linux/.cvsignore | 15 - lustre/include/linux/Makefile.am | 17 - lustre/include/linux/lprocfs_status.h | 53 - lustre/include/linux/lustre_compat25.h | 542 - lustre/include/linux/lustre_debug.h | 41 - lustre/include/linux/lustre_dlm.h | 21 - lustre/include/linux/lustre_fsfilt.h | 477 - lustre/include/linux/lustre_handles.h | 25 - lustre/include/linux/lustre_intent.h | 35 - lustre/include/linux/lustre_lib.h | 93 - lustre/include/linux/lustre_lite.h | 78 - lustre/include/linux/lustre_log.h | 44 - lustre/include/linux/lustre_mds.h | 57 - lustre/include/linux/lustre_net.h | 46 - .../include/linux/lustre_patchless_compat.h | 118 - lustre/include/linux/lustre_quota.h | 18 - lustre/include/linux/lustre_types.h | 48 - lustre/include/linux/lustre_user.h | 59 - lustre/include/linux/lvfs.h | 139 - lustre/include/linux/lvfs_linux.h | 69 - lustre/include/linux/obd.h | 46 - lustre/include/linux/obd_class.h | 59 - lustre/include/linux/obd_support.h | 182 - lustre/include/lprocfs_status.h | 716 - lustre/include/lustre/.cvsignore | 2 - lustre/include/lustre/Makefile.am | 10 - lustre/include/lustre/liblustreapi.h | 114 - lustre/include/lustre/lustre_idl.h | 1612 - lustre/include/lustre/lustre_user.h | 266 - lustre/include/lustre/types.h | 14 - lustre/include/lustre_cache.h | 53 - lustre/include/lustre_cfg.h | 256 - lustre/include/lustre_commit_confd.h | 59 - lustre/include/lustre_debug.h | 64 - lustre/include/lustre_disk.h | 288 - lustre/include/lustre_dlm.h | 834 - lustre/include/lustre_export.h | 137 - lustre/include/lustre_fsfilt.h | 38 - lustre/include/lustre_ha.h | 25 - lustre/include/lustre_handles.h | 54 - lustre/include/lustre_import.h | 162 - lustre/include/lustre_lib.h | 762 - lustre/include/lustre_lite.h | 140 - lustre/include/lustre_log.h | 483 - lustre/include/lustre_mds.h | 255 - lustre/include/lustre_net.h | 938 - lustre/include/lustre_param.h | 65 - lustre/include/lustre_quota.h | 594 - lustre/include/lustre_ucache.h | 68 - lustre/include/lustre_ver.h.in | 32 - lustre/include/lvfs.h | 61 - lustre/include/obd.h | 1158 - lustre/include/obd_cache.h | 11 - lustre/include/obd_class.h | 1509 - lustre/include/obd_echo.h | 33 - lustre/include/obd_lov.h | 28 - lustre/include/obd_ost.h | 41 - lustre/include/obd_support.h | 677 - lustre/kernel-tests/.cvsignore | 5 - lustre/kernel-tests/Makefile | 24 - lustre/kernel_patches/LICENSE | 359 - lustre/kernel_patches/README | 3 - .../kernel-2.6.15-2.6-fc5-i686-smp.config | 1598 - .../kernel-2.6.15-2.6-fc5-i686.config | 1591 - .../kernel-2.6.15-fc5-i686.config | 1598 - ...ernel-2.6.16-2.6-patchless-i686-smp.config | 1620 - .../kernel-2.6.16-2.6-patchless-i686.config | 1616 - ...ernel-2.6.16-2.6-patchless-ia64-smp.config | 1422 - .../kernel-2.6.16-2.6-patchless-ia64.config | 1419 - ...nel-2.6.16-2.6-patchless-x86_64-smp.config | 1463 - .../kernel-2.6.16-2.6-patchless-x86_64.config | 1462 - ...ernel-2.6.16-2.6-sles10-i686-bigsmp.config | 3496 -- .../kernel-2.6.16-2.6-sles10-i686.config | 3496 -- ...kernel-2.6.16-2.6-sles10-x86_64-smp.config | 3058 -- .../kernel-2.6.16-2.6-sles10-x86_64.config | 3046 -- .../kernel-2.6.18-2.6-rhel5-i686-smp.config | 3094 -- .../kernel-2.6.18-2.6-rhel5-i686.config | 3081 -- .../kernel-2.6.18-2.6-rhel5-ia64-smp.config | 2733 -- .../kernel-2.6.18-2.6-rhel5-ia64.config | 2729 -- .../kernel-2.6.18-2.6-rhel5-x86_64-smp.config | 2974 -- .../kernel-2.6.18-2.6-rhel5-x86_64.config | 2958 -- .../kernel-2.6.18-2.6-vanilla-i686-smp.config | 2936 -- .../kernel-2.6.18-2.6-vanilla-i686.config | 2956 -- ...ernel-2.6.18-2.6-vanilla-x86_64-smp.config | 2818 -- .../kernel-2.6.18-2.6-vanilla-x86_64.config | 2796 -- ...ernel-2.6.22-2.6-sles10-i686-bigsmp.config | 3324 -- .../kernel-2.6.22-2.6-sles10-i686.config | 3313 -- ...kernel-2.6.22-2.6-sles10-x86_64-smp.config | 3192 -- .../kernel-2.6.22-2.6-sles10-x86_64.config | 3175 -- .../kernel-2.6.5-2.6-suse-i686-bigsmp.config | 2950 -- .../kernel-2.6.5-2.6-suse-i686-smp.config | 2888 -- .../kernel-2.6.5-2.6-suse-i686.config | 2963 -- .../kernel-2.6.5-2.6-suse-ia64-smp.config | 2411 -- .../kernel-2.6.5-2.6-suse-ia64.config | 2411 -- ...kernel-2.6.5-2.6-suse-ppc-pseries64.config | 1454 - .../kernel-2.6.5-2.6-suse-ppc.config | 1453 - .../kernel-2.6.5-2.6-suse-x86_64-smp.config | 2551 -- .../kernel-2.6.5-2.6-suse-x86_64.config | 2566 -- .../kernel-2.6.9-2.6-rhel4-i686-smp.config | 2487 -- .../kernel-2.6.9-2.6-rhel4-i686.config | 2490 -- .../kernel-2.6.9-2.6-rhel4-ia64-smp.config | 2045 -- .../kernel-2.6.9-2.6-rhel4-ia64.config | 2045 -- .../kernel-2.6.9-2.6-rhel4-x86_64-smp.config | 2235 -- .../kernel-2.6.9-2.6-rhel4-x86_64.config | 2235 -- .../kgdb_2.6.0_test1_vmware.config | 914 - .../kernel_configs/uml-2.6.10-fc3.config | 662 - .../kernel_configs/uml-vanilla-2.6.6.config | 491 - .../kernel_configs/uml_2.6.0_test3.config | 325 - .../patches/2.6.5-quotafix.patch | 2151 -- .../patches/8kstack-2.6.12.patch | 13 - .../patches/atomic_add_return-sles9.patch | 104 - .../bitops_ext2_find_next_le_bit-2.6.patch | 153 - .../patches/blkdev_tunables-2.6-sles10.patch | 13 - .../patches/blkdev_tunables-2.6-suse.patch | 28 - .../dcache-qstr-api-fix-2.6-suse.patch | 32 - .../patches/dev_read_only-2.6-fc5.patch | 142 - .../patches/dev_read_only-2.6-lnxi.patch | 167 - .../patches/dev_read_only-2.6-suse.patch | 147 - .../dev_read_only-2.6.18-vanilla.patch | 142 - .../dev_read_only-2.6.22-vanilla.patch | 145 - .../patches/export-2.6-fc5.patch | 12 - .../patches/export-2.6-suse.patch | 24 - .../patches/export-2.6.18-vanilla.patch | 24 - .../patches/export-do_kern_mount.patch | 13 - .../patches/export-log-2.6-rhel4.patch | 12 - .../patches/export-show_task-2.6-fc5.patch | 25 - .../export-show_task-2.6-vanilla.patch | 25 - .../export-show_task-2.6.18-vanilla.patch | 25 - .../patches/export-truncate-2.6-suse.patch | 37 - .../export-truncate-2.6.18-vanilla.patch | 39 - .../patches/export_symbol_numa-2.6-fc5.patch | 12 - .../patches/export_symbol_numa-2.6.18.patch | 24 - .../patches/export_symbol_numa.patch | 24 - .../patches/export_symbols-2.6-rhel4.patch | 81 - .../patches/export_symbols-2.6-suse.patch | 57 - .../patches/export_symbols-2.6.12.patch | 64 - .../export_symbols-2.6.18-vanilla.patch | 64 - .../export_symbols-2.6.22-vanilla.patch | 51 - .../patches/ext3-patch-fuzz-fixup-fc3.patch | 15 - .../patches/ext3-super-ntohl.patch | 16 - .../patches/fc3_to_rhel4_updates.patch | 12 - .../patches/fmode-exec-2.6-sles10.patch | 36 - .../patches/fsprivate-2.6.patch | 10 - .../patches/header-guards-2.6-suse.patch | 38 - .../patches/hostfs_readdir_large.patch | 32 - .../patches/i_filter_data.patch | 12 - .../patches/iallocsem_consistency.patch | 48 - .../patches/inode-nr_unused-2.6.9-rhel4.patch | 47 - .../patches/iopen-misc-2.6-fc3.patch | 82 - .../patches/iopen-misc-2.6-suse.patch | 69 - .../patches/iopen-misc-2.6.12.patch | 112 - .../patches/iopen-misc-2.6.18-vanilla.patch | 74 - .../patches/iopen-misc-2.6.22-vanilla.patch | 68 - .../patches/jbd-16tb-overflow-fixes.patch | 43 - .../patches/jbd-2.6.10-jcberr.patch | 222 - .../jbd-check-for-unmapped-buffer.patch | 91 - .../patches/jbd-jcberr-2.6.18-vanilla.patch | 228 - .../jbd-journal-chksum-2.6-sles10.patch | 628 - .../jbd-journal-chksum-2.6.18-vanilla.patch | 636 - .../patches/jbd-stats-2.6-rhel5.patch | 744 - .../patches/jbd-stats-2.6-sles10.patch | 735 - .../patches/jbd-stats-2.6.5.patch | 772 - .../patches/jbd-stats-2.6.9.patch | 737 - .../patches/link_notlast-susefix.patch | 16 - .../patches/linux-2.6-binutils-2.16.patch | 102 - ...inux-2.6.9-ext3-sub-second-timestamp.patch | 631 - ...okup_bdev_init_intent-2.6.18-vanilla.patch | 12 - .../patches/lookup_bdev_init_intent.patch | 12 - .../patches/lustre-version-revert_suse.patch | 4 - .../patches/lustre_version.patch | 26 - .../patches/md-rebuild-policy.patch | 137 - .../patches/md_path_lookup-2.6-suse | 25 - .../patches/md_path_lookup-2.6-suse.patch | 25 - ...odpost_external_module_updates_rhel4.patch | 351 - ...odpost_external_module_updates_sles9.patch | 342 - ...pt-fusion-downgrade-to-3_02_73-rhel4.patch | 27949 ---------------- .../patches/netpoll_xmit_lock-2.6-suse.patch | 14 - .../patches/nfs-cifs-intent-2.6-fc3.patch | 127 - .../patches/nfs-cifs-intent-2.6-fc5.patch | 116 - .../patches/nfs-cifs-intent-2.6-suse.patch | 135 - .../patches/qsnet-rhel4-2.6.patch | 1741 - .../patches/qsnet-suse-2.6.patch | 1690 - .../quota-deadlock-on-pagelock-core.patch | 1261 - .../quota-deadlock-on-pagelock-ext3.patch | 273 - .../quota-fix-oops-in-invalidate_dquots.patch | 127 - .../patches/quota-umount-race-fix.patch | 139 - .../raid5-configurable-cachesize-rhel5.patch | 31 - .../raid5-configurable-cachesize.patch | 50 - .../patches/raid5-large-io-rhel5.patch | 15 - .../patches/raid5-large-io.patch | 20 - .../patches/raid5-merge-ios-rhel5.patch | 185 - .../patches/raid5-merge-ios.patch | 129 - .../raid5-serialize-ovelapping-reqs.patch | 140 - .../patches/raid5-stats-rhel5.patch | 256 - .../kernel_patches/patches/raid5-stats.patch | 200 - ...aid5-stripe-by-stripe-handling-rhel5.patch | 284 - .../raid5-stripe-by-stripe-handling.patch | 104 - .../patches/raid5-zerocopy-rhel5.patch | 446 - .../patches/raid5-zerocopy.patch | 376 - .../raid6-configurable-cachesize.patch | 45 - .../patches/raid6-large-io.patch | 14 - .../patches/raid6-merge-ios.patch | 126 - .../raid6-serialize-ovelapping-reqs.patch | 150 - .../kernel_patches/patches/raid6-stats.patch | 169 - .../raid6-stripe-by-stripe-handling.patch | 100 - .../patches/raid6-zerocopy.patch | 166 - .../patches/remove-suid-2.6-suse.patch | 22 - .../patches/rollback-raid5ch-to-55.patch | 329 - .../patches/sd_iostats-2.6-rhel4.patch | 652 - .../patches/sd_iostats-2.6-rhel5.patch | 650 - .../patches/sd_iostats-2.6.22-vanilla.patch | 484 - .../patches/tcp-rto_proc-2.6.9.patch | 130 - .../patches/uml-2.6.10-fc3.patch | 3781 --- .../patches/uml-exprt-clearuser.patch | 24 - ...fs-keep-inode-hashed-for-clear-inode.patch | 32 - .../patches/vfs_intent-2.6-fc3.patch | 756 - .../patches/vfs_intent-2.6-fc5-fix.patch | 20 - .../patches/vfs_intent-2.6-fc5.patch | 827 - .../patches/vfs_intent-2.6-rhel4.patch | 1461 - .../patches/vfs_intent-2.6-sles10.patch | 1500 - .../patches/vfs_intent-2.6-suse.patch | 833 - ...nt-reduce-stack-usage-2.6-suse-newer.patch | 42 - .../patches/vfs_nointent-2.6-fc5.patch | 472 - .../patches/vfs_nointent-2.6-rhel4.patch | 487 - .../patches/vfs_nointent-2.6-sles10.patch | 453 - .../patches/vfs_nointent-2.6-suse.patch | 472 - .../patches/vfs_races-2.6-fc3.patch | 53 - .../patches/vfs_races-2.6-rhel4.patch | 63 - .../patches/vfs_races-2.6-rhel5.patch | 87 - .../patches/vfs_races-2.6-suse.patch | 68 - .../patches/vfs_races-2.6.12.patch | 69 - .../patches/vfs_races-2.6.18-vanilla.patch | 68 - .../patches/vfs_races-2.6.22-vanilla.patch | 56 - .../patches/vm-tunables-rhel4.patch | 19 - lustre/kernel_patches/series/2.6-fc3.series | 23 - lustre/kernel_patches/series/2.6-fc5.series | 18 - lustre/kernel_patches/series/2.6-rhel4.series | 41 - lustre/kernel_patches/series/2.6-rhel5.series | 19 - .../kernel_patches/series/2.6-sles10.series | 14 - .../series/2.6-suse-newer.series | 17 - lustre/kernel_patches/series/2.6-suse.series | 14 - .../series/2.6.18-vanilla.series | 16 - .../series/2.6.22-vanilla.series | 12 - lustre/kernel_patches/targets/.cvsignore | 1 - .../kernel_patches/targets/2.6-fc5.target.in | 18 - .../targets/2.6-patchless.target.in | 25 - .../targets/2.6-rhel4.target.in | 25 - .../targets/2.6-rhel5.target.in | 24 - .../targets/2.6-sles10.target.in | 37 - .../kernel_patches/targets/2.6-suse.target.in | 29 - .../targets/2.6-vanilla.target.in | 29 - .../targets/hp_pnnl-2.4.target.in | 17 - .../kernel_patches/targets/rh-2.4.target.in | 24 - .../kernel_patches/targets/rhel-2.4.target.in | 24 - .../kernel_patches/targets/sles-2.4.target.in | 26 - .../targets/suse-2.4.21-2.target.in | 15 - lustre/kernel_patches/which_patch | 19 - lustre/ldlm/.cvsignore | 6 - lustre/ldlm/Makefile.am | 14 - lustre/ldlm/interval_tree.c | 752 - lustre/ldlm/l_lock.c | 71 - lustre/ldlm/ldlm_extent.c | 881 - lustre/ldlm/ldlm_flock.c | 579 - lustre/ldlm/ldlm_inodebits.c | 170 - lustre/ldlm/ldlm_internal.h | 204 - lustre/ldlm/ldlm_lib.c | 1749 - lustre/ldlm/ldlm_lock.c | 1968 -- lustre/ldlm/ldlm_lockd.c | 2222 -- lustre/ldlm/ldlm_plain.c | 144 - lustre/ldlm/ldlm_pool.c | 1145 - lustre/ldlm/ldlm_request.c | 2002 -- lustre/ldlm/ldlm_resource.c | 1061 - lustre/liblustre/.cvsignore | 9 - lustre/liblustre/Makefile.am | 69 - lustre/liblustre/dir.c | 275 - lustre/liblustre/file.c | 521 - lustre/liblustre/genlib.sh | 112 - lustre/liblustre/llite_lib.c | 390 - lustre/liblustre/llite_lib.h | 276 - lustre/liblustre/lutil.c | 239 - lustre/liblustre/lutil.h | 34 - lustre/liblustre/namei.c | 589 - lustre/liblustre/rw.c | 892 - lustre/liblustre/super.c | 2102 -- lustre/liblustre/tests/.cvsignore | 8 - lustre/liblustre/tests/Makefile.am | 63 - lustre/liblustre/tests/echo_test.c | 313 - lustre/liblustre/tests/recovery_small.c | 390 - lustre/liblustre/tests/replay_ost_single.c | 338 - lustre/liblustre/tests/replay_single.c | 423 - lustre/liblustre/tests/sanity.c | 1518 - lustre/liblustre/tests/test_common.c | 434 - lustre/liblustre/tests/test_common.h | 40 - lustre/liblustre/tests/test_lock_cancel.c | 194 - lustre/llite/.cvsignore | 16 - lustre/llite/Makefile.in | 12 - lustre/llite/autoMakefile.am | 12 - lustre/llite/dcache.c | 794 - lustre/llite/dir.c | 1087 - lustre/llite/file.c | 3093 -- lustre/llite/llite_close.c | 269 - lustre/llite/llite_internal.h | 944 - lustre/llite/llite_lib.c | 2188 -- lustre/llite/llite_mmap.c | 668 - lustre/llite/llite_nfs.c | 274 - lustre/llite/lloop.c | 764 - lustre/llite/lproc_llite.c | 1351 - lustre/llite/namei.c | 1371 - lustre/llite/rw.c | 2185 -- lustre/llite/rw24.c | 144 - lustre/llite/rw26.c | 329 - lustre/llite/statahead.c | 927 - lustre/llite/super.c | 127 - lustre/llite/super25.c | 170 - lustre/llite/symlink.c | 219 - lustre/llite/xattr.c | 411 - lustre/lov/.cvsignore | 11 - lustre/lov/Info.plist | 41 - lustre/lov/Makefile.in | 4 - lustre/lov/autoMakefile.am | 46 - lustre/lov/lov_ea.c | 611 - lustre/lov/lov_internal.h | 274 - lustre/lov/lov_log.c | 243 - lustre/lov/lov_merge.c | 179 - lustre/lov/lov_obd.c | 2859 -- lustre/lov/lov_offset.c | 279 - lustre/lov/lov_pack.c | 455 - lustre/lov/lov_qos.c | 956 - lustre/lov/lov_request.c | 1639 - lustre/lov/lproc_lov.c | 365 - lustre/lvfs/.cvsignore | 19 - lustre/lvfs/Info.plist | 37 - lustre/lvfs/Makefile.in | 20 - lustre/lvfs/autoMakefile.am | 84 - lustre/lvfs/fsfilt.c | 109 - lustre/lvfs/fsfilt_ext3.c | 2219 -- lustre/lvfs/fsfilt_reiserfs.c | 244 - lustre/lvfs/lustre_quota_fmt.c | 1079 - lustre/lvfs/lustre_quota_fmt.h | 189 - lustre/lvfs/lustre_quota_fmt_convert.c | 185 - lustre/lvfs/lvfs_common.c | 35 - lustre/lvfs/lvfs_darwin.c | 45 - lustre/lvfs/lvfs_internal.h | 5 - lustre/lvfs/lvfs_lib.c | 264 - lustre/lvfs/lvfs_linux.c | 510 - lustre/lvfs/lvfs_userfs.c | 44 - lustre/lvfs/prng.c | 107 - lustre/lvfs/quotafmt_test.c | 508 - lustre/lvfs/upcall_cache.c | 518 - lustre/mdc/.cvsignore | 15 - lustre/mdc/Makefile.in | 4 - lustre/mdc/autoMakefile.am | 18 - lustre/mdc/lproc_mdc.c | 97 - lustre/mdc/mdc_internal.h | 87 - lustre/mdc/mdc_lib.c | 461 - lustre/mdc/mdc_locks.c | 906 - lustre/mdc/mdc_reint.c | 335 - lustre/mdc/mdc_request.c | 1438 - lustre/mds/.cvsignore | 15 - lustre/mds/Makefile.in | 5 - lustre/mds/autoMakefile.am | 11 - lustre/mds/commit_confd.c | 98 - lustre/mds/handler.c | 2822 -- lustre/mds/lproc_mds.c | 645 - lustre/mds/mds_fs.c | 852 - lustre/mds/mds_internal.h | 289 - lustre/mds/mds_join.c | 506 - lustre/mds/mds_lib.c | 500 - lustre/mds/mds_log.c | 229 - lustre/mds/mds_lov.c | 1104 - lustre/mds/mds_open.c | 1544 - lustre/mds/mds_reint.c | 2417 -- lustre/mds/mds_unlink_open.c | 286 - lustre/mds/mds_xattr.c | 366 - lustre/mgc/.cvsignore | 15 - lustre/mgc/Makefile.in | 4 - lustre/mgc/autoMakefile.am | 18 - lustre/mgc/libmgc.c | 148 - lustre/mgc/lproc_mgc.c | 53 - lustre/mgc/mgc_internal.h | 24 - lustre/mgc/mgc_request.c | 1285 - lustre/mgs/.cvsignore | 15 - lustre/mgs/Makefile.in | 4 - lustre/mgs/autoMakefile.am | 11 - lustre/mgs/lproc_mgs.c | 197 - lustre/mgs/mgs_fs.c | 240 - lustre/mgs/mgs_handler.c | 772 - lustre/mgs/mgs_internal.h | 95 - lustre/mgs/mgs_llog.c | 2053 -- lustre/nodist | 9 - lustre/obdclass/.cvsignore | 17 - lustre/obdclass/Info.plist | 39 - lustre/obdclass/Makefile.in | 37 - lustre/obdclass/autoMakefile.am | 54 - lustre/obdclass/class_hash.c | 756 - lustre/obdclass/class_obd.c | 635 - lustre/obdclass/darwin/.cvsignore | 1 - lustre/obdclass/darwin/Makefile.am | 3 - lustre/obdclass/darwin/darwin-module.c | 181 - lustre/obdclass/darwin/darwin-sysctl.c | 154 - lustre/obdclass/debug.c | 187 - lustre/obdclass/genops.c | 1318 - lustre/obdclass/linux/.cvsignore | 5 - lustre/obdclass/linux/Makefile.am | 4 - lustre/obdclass/linux/linux-module.c | 431 - lustre/obdclass/linux/linux-obdo.c | 288 - lustre/obdclass/linux/linux-sysctl.c | 348 - lustre/obdclass/llog.c | 424 - lustre/obdclass/llog_cat.c | 539 - lustre/obdclass/llog_internal.h | 10 - lustre/obdclass/llog_ioctl.c | 452 - lustre/obdclass/llog_lvfs.c | 926 - lustre/obdclass/llog_obd.c | 434 - lustre/obdclass/llog_swab.c | 253 - lustre/obdclass/llog_test.c | 720 - lustre/obdclass/lprocfs_status.c | 1932 -- lustre/obdclass/lustre_handles.c | 251 - lustre/obdclass/lustre_peer.c | 181 - lustre/obdclass/obd_config.c | 1243 - lustre/obdclass/obd_mount.c | 2058 -- lustre/obdclass/obdo.c | 91 - lustre/obdclass/statfs_pack.c | 70 - lustre/obdclass/uuid.c | 53 - lustre/obdecho/.cvsignore | 15 - lustre/obdecho/Info.plist | 45 - lustre/obdecho/Makefile.in | 4 - lustre/obdecho/autoMakefile.am | 40 - lustre/obdecho/echo.c | 620 - lustre/obdecho/echo_client.c | 1510 - lustre/obdecho/lproc_echo.c | 46 - lustre/obdfilter/.cvsignore | 15 - lustre/obdfilter/Makefile.in | 12 - lustre/obdfilter/autoMakefile.am | 11 - lustre/obdfilter/filter.c | 3746 --- lustre/obdfilter/filter_internal.h | 197 - lustre/obdfilter/filter_io.c | 862 - lustre/obdfilter/filter_io_24.c | 544 - lustre/obdfilter/filter_io_26.c | 810 - lustre/obdfilter/filter_log.c | 254 - lustre/obdfilter/filter_lvb.c | 224 - lustre/obdfilter/lproc_obdfilter.c | 458 - lustre/osc/.cvsignore | 15 - lustre/osc/Info.plist | 43 - lustre/osc/Makefile.in | 4 - lustre/osc/autoMakefile.am | 41 - lustre/osc/cache.c | 398 - lustre/osc/lproc_osc.c | 555 - lustre/osc/osc_create.c | 442 - lustre/osc/osc_internal.h | 97 - lustre/osc/osc_request.c | 3988 --- lustre/ost/.cvsignore | 15 - lustre/ost/Makefile.in | 4 - lustre/ost/autoMakefile.am | 11 - lustre/ost/lproc_ost.c | 48 - lustre/ost/ost_handler.c | 1998 -- lustre/ost/ost_internal.h | 51 - lustre/ptlrpc/.cvsignore | 16 - lustre/ptlrpc/Info.plist | 33 - lustre/ptlrpc/Makefile.in | 34 - lustre/ptlrpc/autoMakefile.am | 78 - lustre/ptlrpc/client.c | 2149 -- lustre/ptlrpc/connection.c | 245 - lustre/ptlrpc/import.c | 1333 - lustre/ptlrpc/llog_client.c | 323 - lustre/ptlrpc/llog_net.c | 177 - lustre/ptlrpc/llog_server.c | 716 - lustre/ptlrpc/lproc_ptlrpc.c | 634 - lustre/ptlrpc/niobuf.c | 639 - lustre/ptlrpc/pack_generic.c | 2729 -- lustre/ptlrpc/pers.c | 130 - lustre/ptlrpc/pinger.c | 702 - lustre/ptlrpc/ptlrpc_internal.h | 90 - lustre/ptlrpc/ptlrpc_module.c | 313 - lustre/ptlrpc/ptlrpcd.c | 306 - lustre/ptlrpc/recov_thread.c | 644 - lustre/ptlrpc/recover.c | 319 - lustre/ptlrpc/service.c | 1743 - lustre/ptlrpc/wirehdr.c | 28 - lustre/ptlrpc/wiretest.c | 2234 -- lustre/quota/.cvsignore | 15 - lustre/quota/Makefile.in | 10 - lustre/quota/autoMakefile.am | 19 - lustre/quota/quota_adjust_qunit.c | 403 - lustre/quota/quota_check.c | 237 - lustre/quota/quota_context.c | 1160 - lustre/quota/quota_ctl.c | 297 - lustre/quota/quota_interface.c | 947 - lustre/quota/quota_internal.h | 180 - lustre/quota/quota_master.c | 1591 - lustre/quota/quotacheck_test.c | 223 - lustre/quota/quotactl_test.c | 363 - lustre/scripts/.cvsignore | 18 - lustre/scripts/Makefile.am | 25 - lustre/scripts/bdev-io-survey.sh | 883 - lustre/scripts/dodiff.sh | 5 - lustre/scripts/lc_cluman.in | 524 - lustre/scripts/lc_common | 591 - lustre/scripts/lc_hb.in | 644 - lustre/scripts/lc_lvm.in | 593 - lustre/scripts/lc_md.in | 511 - lustre/scripts/lc_modprobe.in | 66 - lustre/scripts/lc_mon | 139 - lustre/scripts/lc_net.in | 226 - lustre/scripts/lc_servip | 250 - lustre/scripts/license-status | 26 - lustre/scripts/llite-group.sh | 67 - lustre/scripts/lmc2csv.pl | 228 - lustre/scripts/lustre | 243 - lustre/scripts/lustre_config.in | 1220 - lustre/scripts/lustre_createcsv.in | 2101 -- lustre/scripts/lustre_req_history | 163 - lustre/scripts/lustre_rmmod | 20 - lustre/scripts/lustre_up14 | 66 - lustre/scripts/lustrefs | 124 - lustre/scripts/maketags.sh | 8 - lustre/scripts/nodelustre | 46 - lustre/scripts/system-profile.sh | 233 - lustre/scripts/version_tag.pl.in | 197 - lustre/tests/.cvsignore | 78 - lustre/tests/2ost.sh | 54 - lustre/tests/Makefile.am | 63 - lustre/tests/README | 85 - lustre/tests/acceptance-metadata-double.sh | 128 - lustre/tests/acceptance-metadata-parallel.sh | 105 - lustre/tests/acceptance-metadata-single.sh | 153 - lustre/tests/acceptance-small.sh | 345 - lustre/tests/acl/README | 4 - lustre/tests/acl/cp.test | 50 - lustre/tests/acl/getfacl-noacl.test | 59 - lustre/tests/acl/inheritance.test | 131 - lustre/tests/acl/make-tree | 45 - lustre/tests/acl/misc.test | 431 - lustre/tests/acl/permissions.test | 281 - lustre/tests/acl/run | 275 - lustre/tests/acl/setfacl.test | 144 - lustre/tests/busy.sh | 7 - lustre/tests/cfg/insanity-local.sh | 70 - lustre/tests/cfg/local.sh | 91 - lustre/tests/checkstat.c | 317 - lustre/tests/chownmany.c | 79 - lustre/tests/cmknod.c | 128 - lustre/tests/cobd.sh | 34 - lustre/tests/compile.sh | 16 - lustre/tests/conf-sanity.sh | 1568 - lustre/tests/crash-mod.sh | 11 - lustre/tests/create.pl | 178 - lustre/tests/createdestroy.c | 225 - lustre/tests/createmany-mpi.c | 143 - lustre/tests/createmany.c | 121 - lustre/tests/createtest.c | 142 - lustre/tests/directio.c | 130 - lustre/tests/disk1_4.zip | Bin 216468 -> 0 bytes lustre/tests/fchdir_test.c | 41 - lustre/tests/filter_survey.sh | 262 - lustre/tests/flock.c | 196 - lustre/tests/flock_test.c | 86 - lustre/tests/flocks_test.c | 62 - lustre/tests/fsx.c | 1400 - lustre/tests/getdents.c | 31 - lustre/tests/insanity.sh | 572 - lustre/tests/iopentest1.c | 101 - lustre/tests/iopentest2.c | 186 - lustre/tests/it_test.c | 519 - lustre/tests/ldaptest.c | 27 - lustre/tests/leak_finder.pl | 84 - lustre/tests/lfscktest.sh | 238 - lustre/tests/liblustre_sanity_uml.sh | 83 - lustre/tests/ll_dirstripe_verify.c | 245 - lustre/tests/ll_getstripe_info.c | 57 - lustre/tests/ll_sparseness_verify.c | 102 - lustre/tests/ll_sparseness_write.c | 61 - lustre/tests/llecho.sh | 23 - lustre/tests/llmount.sh | 11 - lustre/tests/llmountcleanup.sh | 10 - lustre/tests/llog-test.sh | 106 - lustre/tests/lockorder.sh | 80 - lustre/tests/lov-sanity.sh | 89 - lustre/tests/lp_utils.c | 265 - lustre/tests/lp_utils.h | 103 - lustre/tests/mcr.sh | 45 - lustre/tests/mcreate.c | 23 - lustre/tests/memhog.c | 108 - lustre/tests/mkdirdeep.c | 258 - lustre/tests/mkdirmany.c | 40 - lustre/tests/mlink.c | 25 - lustre/tests/mmap_sanity.c | 654 - lustre/tests/mrename.c | 19 - lustre/tests/multifstat.c | 63 - lustre/tests/multiop.c | 425 - lustre/tests/munlink.c | 35 - lustre/tests/o_directory.c | 53 - lustre/tests/oos.sh | 90 - lustre/tests/oos2.sh | 93 - lustre/tests/openclose.c | 145 - lustre/tests/opendevunlink.c | 117 - lustre/tests/opendirunlink.c | 125 - lustre/tests/openfile.c | 177 - lustre/tests/openfilleddirunlink.c | 81 - lustre/tests/openme.c | 23 - lustre/tests/openunlink.c | 155 - lustre/tests/ost_oos.sh | 41 - lustre/tests/parallel_grouplock.c | 899 - lustre/tests/random-reads.c | 208 - lustre/tests/recovery-small.sh | 934 - lustre/tests/rename.pl | 210 - lustre/tests/rename_many.c | 262 - lustre/tests/replay-dual.sh | 440 - lustre/tests/replay-ost-single.sh | 176 - lustre/tests/replay-single.sh | 1568 - lustre/tests/rmdirmany.c | 40 - lustre/tests/run-llog.sh | 45 - lustre/tests/runas.c | 169 - lustre/tests/rundbench | 20 - lustre/tests/runiozone | 17 - lustre/tests/runmultiop_bg_pause | 11 - lustre/tests/runobdstat | 7 - lustre/tests/runtests | 154 - lustre/tests/runvmstat | 24 - lustre/tests/sanity-quota.sh | 1438 - lustre/tests/sanity.sh | 4890 --- lustre/tests/sanityN.sh | 599 - lustre/tests/set_dates.sh | 4 - lustre/tests/sleeptest.c | 115 - lustre/tests/small_write.c | 145 - lustre/tests/socketclient | 12 - lustre/tests/socketserver | 29 - lustre/tests/statmany.c | 215 - lustre/tests/statone.c | 59 - lustre/tests/tchmod.c | 18 - lustre/tests/test-framework.sh | 1440 - lustre/tests/test2.c | 60 - lustre/tests/test_brw.c | 236 - lustre/tests/toexcl.c | 77 - lustre/tests/truncate.c | 24 - lustre/tests/unlinkmany.c | 84 - lustre/tests/utime.c | 161 - lustre/tests/wantedi.c | 49 - lustre/tests/write_append_truncate.c | 286 - lustre/tests/write_disjoint.c | 195 - lustre/tests/writemany.c | 276 - lustre/tests/writeme.c | 46 - lustre/utils/.cvsignore | 31 - lustre/utils/Makefile.am | 98 - lustre/utils/l_getgroups.c | 249 - lustre/utils/lctl.c | 338 - lustre/utils/lfs.c | 1881 -- lustre/utils/liblustreapi.c | 1676 - lustre/utils/llanalyze | 452 - lustre/utils/llbackup | 537 - lustre/utils/llobdstat | 170 - lustre/utils/llog_reader.c | 407 - lustre/utils/llstat | 204 - lustre/utils/llverdev.c | 553 - lustre/utils/llverfs.c | 650 - lustre/utils/loadgen.c | 1037 - lustre/utils/lr_reader.c | 209 - lustre/utils/lrun | 17 - lustre/utils/ltrack_stats.c | 493 - lustre/utils/lustre_cfg.c | 740 - lustre/utils/mkfs_lustre.c | 1597 - lustre/utils/module_cleanup.sh | 22 - lustre/utils/module_setup.sh | 66 - lustre/utils/mount_lustre.c | 626 - lustre/utils/obd.c | 2267 -- lustre/utils/obdbarrier.c | 224 - lustre/utils/obdctl.c | 103 - lustre/utils/obdctl.h | 91 - lustre/utils/obdio.c | 297 - lustre/utils/obdiolib.c | 386 - lustre/utils/obdiolib.h | 53 - lustre/utils/parser.c | 772 - lustre/utils/parser.h | 74 - lustre/utils/platform.h | 248 - lustre/utils/plot-llstat | 182 - lustre/utils/wirecheck.c | 1341 - lustre/utils/wirehdr.c | 26 - lustre/utils/wiretest.c | 2232 -- 828 files changed, 429927 deletions(-) delete mode 100644 build/README.kernel-source delete mode 100644 build/Rules.in delete mode 100644 build/autoconf/.cvsignore delete mode 100644 build/autoconf/Makefile.am delete mode 100644 build/autoconf/lustre-build-darwin.m4 delete mode 100644 build/checkstack.pl delete mode 100644 build/clearpatches.sh delete mode 100644 build/confirmpatches.sh delete mode 100755 build/cvs-modified-files.pl delete mode 100755 build/land2.sh delete mode 100644 build/linux-merge-config.awk delete mode 100644 build/linux-merge-modules.awk delete mode 100755 build/merge1.sh delete mode 100755 build/merge2.sh delete mode 100644 build/osxpack/ReadMe.txt delete mode 100644 build/osxpack/Welcome.txt delete mode 100755 build/osxpack/packlustre.sh delete mode 100755 build/osxpack/postflight delete mode 100755 build/osxpack/preflight delete mode 100644 build/osxpack/sysctl.conf delete mode 100755 build/osxpack/uninstall_lustre delete mode 100755 build/osxpack/unload_lustre delete mode 100755 build/replace2.sh delete mode 100644 build/sles8-post.sh delete mode 100644 build/sles8-postun.sh delete mode 100644 build/sles8-pre.sh delete mode 100644 build/sles8-update_INITRD_MODULES.sh delete mode 100644 build/sles8-update_rcfile_setting.sh delete mode 100644 build/suse-functions.sh delete mode 100644 build/suse-trigger-script.sh.in delete mode 100755 build/update_oldconfig delete mode 100644 ldiskfs/kernel_patches/patches/export-ext3-2.6-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.5.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.9.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-disable-write-bar-by-default-2.6-sles10.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-extents-2.6.15.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-extents-bug11324.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-external-journal-2.6.12.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-filterdata-2.6.15.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-htree-dot-2.6.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-ialloc-2.6.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-lookup-dotdot-2.6.9.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.18-vanilla.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-sles10.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.18-vanilla.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-remove-cond_resched-calls-2.6.12.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-rename-reserve-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.12.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.5-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.9-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch delete mode 100644 ldiskfs/kernel_patches/patches/iopen-2.6-rhel4.patch delete mode 100644 ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch delete mode 100644 ldiskfs/kernel_patches/patches/iopen-2.6.12.patch delete mode 100644 ldiskfs/kernel_patches/series/ldiskfs-2.6-fc3.series delete mode 100644 ldiskfs/kernel_patches/series/ldiskfs-2.6-fc5.series delete mode 100644 ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series delete mode 100644 ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series delete mode 100644 ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series delete mode 100644 ldiskfs/kernel_patches/series/ldiskfs-2.6.12-vanilla.series delete mode 100644 ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series delete mode 100644 ldiskfs/ldiskfs/Makefile.in delete mode 100644 ldiskfs/ldiskfs/autoMakefile.am delete mode 100644 lustre/.cvsignore delete mode 100644 lustre/BUGS delete mode 100644 lustre/BUILDING delete mode 100644 lustre/ChangeLog delete mode 100644 lustre/FDL delete mode 100644 lustre/LICENSE delete mode 100644 lustre/Makefile.in delete mode 100644 lustre/autoMakefile.am delete mode 100644 lustre/autoconf/.cvsignore delete mode 100644 lustre/autoconf/Makefile.am delete mode 100644 lustre/autoconf/lustre-core.m4 delete mode 100644 lustre/autoconf/lustre-version.ac delete mode 100644 lustre/conf/.cvsignore delete mode 100644 lustre/conf/Makefile.am delete mode 100644 lustre/conf/lustre.dtd delete mode 100644 lustre/conf/lustre2ldif.xsl delete mode 100644 lustre/conf/modules.conf delete mode 100644 lustre/conf/slapd-lustre.conf delete mode 100644 lustre/conf/top.ldif delete mode 100644 lustre/contrib/.cvsignore delete mode 100644 lustre/contrib/Makefile.am delete mode 100644 lustre/contrib/README delete mode 100644 lustre/contrib/adio-lustre-mpich2-v03.patch delete mode 100644 lustre/contrib/mpich-1.2.6-lustre.patch delete mode 100644 lustre/contrib/mpich2-1.0.3.patch delete mode 100644 lustre/cvstest delete mode 100644 lustre/doc/.cvsignore delete mode 100644 lustre/doc/Makefile.am delete mode 100644 lustre/doc/VERSIONING delete mode 100755 lustre/doc/chbar.sh delete mode 100644 lustre/doc/lctl.8 delete mode 100644 lustre/doc/lfs.1 delete mode 100644 lustre/doc/llbackup.8 delete mode 100644 lustre/doc/llverdev.8 delete mode 100644 lustre/doc/llverfs.txt delete mode 100644 lustre/doc/lustre.7 delete mode 100644 lustre/doc/mkfs.lustre.8 delete mode 100644 lustre/doc/mount.lustre.8 delete mode 100755 lustre/doc/postbar delete mode 100755 lustre/doc/tex2pdf delete mode 100644 lustre/doc/tunefs.lustre.8 delete mode 100644 lustre/include/.cvsignore delete mode 100644 lustre/include/Makefile.am delete mode 100644 lustre/include/class_hash.h delete mode 100644 lustre/include/darwin/lprocfs_status.h delete mode 100644 lustre/include/darwin/lustre_compat.h delete mode 100644 lustre/include/darwin/lustre_debug.h delete mode 100644 lustre/include/darwin/lustre_dlm.h delete mode 100644 lustre/include/darwin/lustre_fsfilt.h delete mode 100644 lustre/include/darwin/lustre_handles.h delete mode 100644 lustre/include/darwin/lustre_lib.h delete mode 100644 lustre/include/darwin/lustre_lite.h delete mode 100644 lustre/include/darwin/lustre_log.h delete mode 100644 lustre/include/darwin/lustre_mds.h delete mode 100644 lustre/include/darwin/lustre_net.h delete mode 100644 lustre/include/darwin/lustre_quota.h delete mode 100644 lustre/include/darwin/lustre_types.h delete mode 100644 lustre/include/darwin/lustre_user.h delete mode 100644 lustre/include/darwin/lvfs.h delete mode 100644 lustre/include/darwin/obd.h delete mode 100644 lustre/include/darwin/obd_class.h delete mode 100644 lustre/include/darwin/obd_support.h delete mode 100644 lustre/include/interval_tree.h delete mode 100644 lustre/include/ioctl.h delete mode 100644 lustre/include/liblustre.h delete mode 100644 lustre/include/linux/.cvsignore delete mode 100644 lustre/include/linux/Makefile.am delete mode 100644 lustre/include/linux/lprocfs_status.h delete mode 100644 lustre/include/linux/lustre_compat25.h delete mode 100644 lustre/include/linux/lustre_debug.h delete mode 100644 lustre/include/linux/lustre_dlm.h delete mode 100644 lustre/include/linux/lustre_fsfilt.h delete mode 100644 lustre/include/linux/lustre_handles.h delete mode 100644 lustre/include/linux/lustre_intent.h delete mode 100644 lustre/include/linux/lustre_lib.h delete mode 100644 lustre/include/linux/lustre_lite.h delete mode 100644 lustre/include/linux/lustre_log.h delete mode 100644 lustre/include/linux/lustre_mds.h delete mode 100644 lustre/include/linux/lustre_net.h delete mode 100644 lustre/include/linux/lustre_patchless_compat.h delete mode 100644 lustre/include/linux/lustre_quota.h delete mode 100644 lustre/include/linux/lustre_types.h delete mode 100644 lustre/include/linux/lustre_user.h delete mode 100644 lustre/include/linux/lvfs.h delete mode 100644 lustre/include/linux/lvfs_linux.h delete mode 100644 lustre/include/linux/obd.h delete mode 100644 lustre/include/linux/obd_class.h delete mode 100644 lustre/include/linux/obd_support.h delete mode 100644 lustre/include/lprocfs_status.h delete mode 100644 lustre/include/lustre/.cvsignore delete mode 100644 lustre/include/lustre/Makefile.am delete mode 100644 lustre/include/lustre/liblustreapi.h delete mode 100644 lustre/include/lustre/lustre_idl.h delete mode 100644 lustre/include/lustre/lustre_user.h delete mode 100644 lustre/include/lustre/types.h delete mode 100644 lustre/include/lustre_cache.h delete mode 100644 lustre/include/lustre_cfg.h delete mode 100644 lustre/include/lustre_commit_confd.h delete mode 100644 lustre/include/lustre_debug.h delete mode 100644 lustre/include/lustre_disk.h delete mode 100644 lustre/include/lustre_dlm.h delete mode 100644 lustre/include/lustre_export.h delete mode 100644 lustre/include/lustre_fsfilt.h delete mode 100644 lustre/include/lustre_ha.h delete mode 100644 lustre/include/lustre_handles.h delete mode 100644 lustre/include/lustre_import.h delete mode 100644 lustre/include/lustre_lib.h delete mode 100644 lustre/include/lustre_lite.h delete mode 100644 lustre/include/lustre_log.h delete mode 100644 lustre/include/lustre_mds.h delete mode 100644 lustre/include/lustre_net.h delete mode 100644 lustre/include/lustre_param.h delete mode 100644 lustre/include/lustre_quota.h delete mode 100644 lustre/include/lustre_ucache.h delete mode 100644 lustre/include/lustre_ver.h.in delete mode 100644 lustre/include/lvfs.h delete mode 100644 lustre/include/obd.h delete mode 100644 lustre/include/obd_cache.h delete mode 100644 lustre/include/obd_class.h delete mode 100644 lustre/include/obd_echo.h delete mode 100644 lustre/include/obd_lov.h delete mode 100644 lustre/include/obd_ost.h delete mode 100644 lustre/include/obd_support.h delete mode 100644 lustre/kernel-tests/.cvsignore delete mode 100644 lustre/kernel-tests/Makefile delete mode 100644 lustre/kernel_patches/LICENSE delete mode 100644 lustre/kernel_patches/README delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.15-fc5-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686-bigsmp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686-bigsmp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-bigsmp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc-pseries64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64-smp.config delete mode 100644 lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64.config delete mode 100644 lustre/kernel_patches/kernel_configs/kgdb_2.6.0_test1_vmware.config delete mode 100644 lustre/kernel_patches/kernel_configs/uml-2.6.10-fc3.config delete mode 100644 lustre/kernel_patches/kernel_configs/uml-vanilla-2.6.6.config delete mode 100644 lustre/kernel_patches/kernel_configs/uml_2.6.0_test3.config delete mode 100644 lustre/kernel_patches/patches/2.6.5-quotafix.patch delete mode 100644 lustre/kernel_patches/patches/8kstack-2.6.12.patch delete mode 100644 lustre/kernel_patches/patches/atomic_add_return-sles9.patch delete mode 100644 lustre/kernel_patches/patches/bitops_ext2_find_next_le_bit-2.6.patch delete mode 100644 lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch delete mode 100644 lustre/kernel_patches/patches/blkdev_tunables-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/dcache-qstr-api-fix-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/dev_read_only-2.6-fc5.patch delete mode 100644 lustre/kernel_patches/patches/dev_read_only-2.6-lnxi.patch delete mode 100644 lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/dev_read_only-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/dev_read_only-2.6.22-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/export-2.6-fc5.patch delete mode 100644 lustre/kernel_patches/patches/export-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/export-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/export-do_kern_mount.patch delete mode 100644 lustre/kernel_patches/patches/export-log-2.6-rhel4.patch delete mode 100644 lustre/kernel_patches/patches/export-show_task-2.6-fc5.patch delete mode 100644 lustre/kernel_patches/patches/export-show_task-2.6-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/export-show_task-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/export-truncate-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/export-truncate-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/export_symbol_numa-2.6-fc5.patch delete mode 100644 lustre/kernel_patches/patches/export_symbol_numa-2.6.18.patch delete mode 100644 lustre/kernel_patches/patches/export_symbol_numa.patch delete mode 100644 lustre/kernel_patches/patches/export_symbols-2.6-rhel4.patch delete mode 100644 lustre/kernel_patches/patches/export_symbols-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/export_symbols-2.6.12.patch delete mode 100644 lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/export_symbols-2.6.22-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/ext3-patch-fuzz-fixup-fc3.patch delete mode 100644 lustre/kernel_patches/patches/ext3-super-ntohl.patch delete mode 100644 lustre/kernel_patches/patches/fc3_to_rhel4_updates.patch delete mode 100644 lustre/kernel_patches/patches/fmode-exec-2.6-sles10.patch delete mode 100644 lustre/kernel_patches/patches/fsprivate-2.6.patch delete mode 100644 lustre/kernel_patches/patches/header-guards-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/hostfs_readdir_large.patch delete mode 100644 lustre/kernel_patches/patches/i_filter_data.patch delete mode 100644 lustre/kernel_patches/patches/iallocsem_consistency.patch delete mode 100644 lustre/kernel_patches/patches/inode-nr_unused-2.6.9-rhel4.patch delete mode 100644 lustre/kernel_patches/patches/iopen-misc-2.6-fc3.patch delete mode 100644 lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/iopen-misc-2.6.12.patch delete mode 100644 lustre/kernel_patches/patches/iopen-misc-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/iopen-misc-2.6.22-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/jbd-16tb-overflow-fixes.patch delete mode 100644 lustre/kernel_patches/patches/jbd-2.6.10-jcberr.patch delete mode 100644 lustre/kernel_patches/patches/jbd-check-for-unmapped-buffer.patch delete mode 100644 lustre/kernel_patches/patches/jbd-jcberr-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch delete mode 100644 lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch delete mode 100644 lustre/kernel_patches/patches/jbd-stats-2.6.5.patch delete mode 100644 lustre/kernel_patches/patches/jbd-stats-2.6.9.patch delete mode 100644 lustre/kernel_patches/patches/link_notlast-susefix.patch delete mode 100644 lustre/kernel_patches/patches/linux-2.6-binutils-2.16.patch delete mode 100644 lustre/kernel_patches/patches/linux-2.6.9-ext3-sub-second-timestamp.patch delete mode 100644 lustre/kernel_patches/patches/lookup_bdev_init_intent-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/lookup_bdev_init_intent.patch delete mode 100644 lustre/kernel_patches/patches/lustre-version-revert_suse.patch delete mode 100644 lustre/kernel_patches/patches/lustre_version.patch delete mode 100644 lustre/kernel_patches/patches/md-rebuild-policy.patch delete mode 100644 lustre/kernel_patches/patches/md_path_lookup-2.6-suse delete mode 100644 lustre/kernel_patches/patches/md_path_lookup-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/modpost_external_module_updates_rhel4.patch delete mode 100644 lustre/kernel_patches/patches/modpost_external_module_updates_sles9.patch delete mode 100644 lustre/kernel_patches/patches/mpt-fusion-downgrade-to-3_02_73-rhel4.patch delete mode 100644 lustre/kernel_patches/patches/netpoll_xmit_lock-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc3.patch delete mode 100644 lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc5.patch delete mode 100644 lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/qsnet-rhel4-2.6.patch delete mode 100644 lustre/kernel_patches/patches/qsnet-suse-2.6.patch delete mode 100644 lustre/kernel_patches/patches/quota-deadlock-on-pagelock-core.patch delete mode 100644 lustre/kernel_patches/patches/quota-deadlock-on-pagelock-ext3.patch delete mode 100644 lustre/kernel_patches/patches/quota-fix-oops-in-invalidate_dquots.patch delete mode 100644 lustre/kernel_patches/patches/quota-umount-race-fix.patch delete mode 100644 lustre/kernel_patches/patches/raid5-configurable-cachesize-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/raid5-configurable-cachesize.patch delete mode 100644 lustre/kernel_patches/patches/raid5-large-io-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/raid5-large-io.patch delete mode 100644 lustre/kernel_patches/patches/raid5-merge-ios-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/raid5-merge-ios.patch delete mode 100644 lustre/kernel_patches/patches/raid5-serialize-ovelapping-reqs.patch delete mode 100644 lustre/kernel_patches/patches/raid5-stats-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/raid5-stats.patch delete mode 100644 lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch delete mode 100644 lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/raid5-zerocopy.patch delete mode 100644 lustre/kernel_patches/patches/raid6-configurable-cachesize.patch delete mode 100644 lustre/kernel_patches/patches/raid6-large-io.patch delete mode 100644 lustre/kernel_patches/patches/raid6-merge-ios.patch delete mode 100644 lustre/kernel_patches/patches/raid6-serialize-ovelapping-reqs.patch delete mode 100644 lustre/kernel_patches/patches/raid6-stats.patch delete mode 100644 lustre/kernel_patches/patches/raid6-stripe-by-stripe-handling.patch delete mode 100644 lustre/kernel_patches/patches/raid6-zerocopy.patch delete mode 100644 lustre/kernel_patches/patches/remove-suid-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/rollback-raid5ch-to-55.patch delete mode 100644 lustre/kernel_patches/patches/sd_iostats-2.6-rhel4.patch delete mode 100644 lustre/kernel_patches/patches/sd_iostats-2.6-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/tcp-rto_proc-2.6.9.patch delete mode 100644 lustre/kernel_patches/patches/uml-2.6.10-fc3.patch delete mode 100644 lustre/kernel_patches/patches/uml-exprt-clearuser.patch delete mode 100644 lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch delete mode 100644 lustre/kernel_patches/patches/vfs_intent-2.6-fc3.patch delete mode 100644 lustre/kernel_patches/patches/vfs_intent-2.6-fc5-fix.patch delete mode 100644 lustre/kernel_patches/patches/vfs_intent-2.6-fc5.patch delete mode 100644 lustre/kernel_patches/patches/vfs_intent-2.6-rhel4.patch delete mode 100644 lustre/kernel_patches/patches/vfs_intent-2.6-sles10.patch delete mode 100644 lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/vfs_intent-reduce-stack-usage-2.6-suse-newer.patch delete mode 100644 lustre/kernel_patches/patches/vfs_nointent-2.6-fc5.patch delete mode 100644 lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch delete mode 100644 lustre/kernel_patches/patches/vfs_nointent-2.6-sles10.patch delete mode 100644 lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/vfs_races-2.6-fc3.patch delete mode 100644 lustre/kernel_patches/patches/vfs_races-2.6-rhel4.patch delete mode 100644 lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch delete mode 100644 lustre/kernel_patches/patches/vfs_races-2.6-suse.patch delete mode 100644 lustre/kernel_patches/patches/vfs_races-2.6.12.patch delete mode 100644 lustre/kernel_patches/patches/vfs_races-2.6.18-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/vfs_races-2.6.22-vanilla.patch delete mode 100644 lustre/kernel_patches/patches/vm-tunables-rhel4.patch delete mode 100644 lustre/kernel_patches/series/2.6-fc3.series delete mode 100644 lustre/kernel_patches/series/2.6-fc5.series delete mode 100644 lustre/kernel_patches/series/2.6-rhel4.series delete mode 100644 lustre/kernel_patches/series/2.6-rhel5.series delete mode 100644 lustre/kernel_patches/series/2.6-sles10.series delete mode 100644 lustre/kernel_patches/series/2.6-suse-newer.series delete mode 100644 lustre/kernel_patches/series/2.6-suse.series delete mode 100644 lustre/kernel_patches/series/2.6.18-vanilla.series delete mode 100644 lustre/kernel_patches/series/2.6.22-vanilla.series delete mode 100644 lustre/kernel_patches/targets/.cvsignore delete mode 100644 lustre/kernel_patches/targets/2.6-fc5.target.in delete mode 100644 lustre/kernel_patches/targets/2.6-patchless.target.in delete mode 100644 lustre/kernel_patches/targets/2.6-rhel4.target.in delete mode 100644 lustre/kernel_patches/targets/2.6-rhel5.target.in delete mode 100644 lustre/kernel_patches/targets/2.6-sles10.target.in delete mode 100644 lustre/kernel_patches/targets/2.6-suse.target.in delete mode 100644 lustre/kernel_patches/targets/2.6-vanilla.target.in delete mode 100644 lustre/kernel_patches/targets/hp_pnnl-2.4.target.in delete mode 100644 lustre/kernel_patches/targets/rh-2.4.target.in delete mode 100644 lustre/kernel_patches/targets/rhel-2.4.target.in delete mode 100644 lustre/kernel_patches/targets/sles-2.4.target.in delete mode 100644 lustre/kernel_patches/targets/suse-2.4.21-2.target.in delete mode 100644 lustre/kernel_patches/which_patch delete mode 100644 lustre/ldlm/.cvsignore delete mode 100644 lustre/ldlm/Makefile.am delete mode 100644 lustre/ldlm/interval_tree.c delete mode 100644 lustre/ldlm/l_lock.c delete mode 100644 lustre/ldlm/ldlm_extent.c delete mode 100644 lustre/ldlm/ldlm_flock.c delete mode 100644 lustre/ldlm/ldlm_inodebits.c delete mode 100644 lustre/ldlm/ldlm_internal.h delete mode 100644 lustre/ldlm/ldlm_lib.c delete mode 100644 lustre/ldlm/ldlm_lock.c delete mode 100644 lustre/ldlm/ldlm_lockd.c delete mode 100644 lustre/ldlm/ldlm_plain.c delete mode 100644 lustre/ldlm/ldlm_pool.c delete mode 100644 lustre/ldlm/ldlm_request.c delete mode 100644 lustre/ldlm/ldlm_resource.c delete mode 100644 lustre/liblustre/.cvsignore delete mode 100644 lustre/liblustre/Makefile.am delete mode 100644 lustre/liblustre/dir.c delete mode 100644 lustre/liblustre/file.c delete mode 100755 lustre/liblustre/genlib.sh delete mode 100644 lustre/liblustre/llite_lib.c delete mode 100644 lustre/liblustre/llite_lib.h delete mode 100644 lustre/liblustre/lutil.c delete mode 100644 lustre/liblustre/lutil.h delete mode 100644 lustre/liblustre/namei.c delete mode 100644 lustre/liblustre/rw.c delete mode 100644 lustre/liblustre/super.c delete mode 100644 lustre/liblustre/tests/.cvsignore delete mode 100644 lustre/liblustre/tests/Makefile.am delete mode 100644 lustre/liblustre/tests/echo_test.c delete mode 100644 lustre/liblustre/tests/recovery_small.c delete mode 100644 lustre/liblustre/tests/replay_ost_single.c delete mode 100644 lustre/liblustre/tests/replay_single.c delete mode 100644 lustre/liblustre/tests/sanity.c delete mode 100644 lustre/liblustre/tests/test_common.c delete mode 100644 lustre/liblustre/tests/test_common.h delete mode 100644 lustre/liblustre/tests/test_lock_cancel.c delete mode 100644 lustre/llite/.cvsignore delete mode 100644 lustre/llite/Makefile.in delete mode 100644 lustre/llite/autoMakefile.am delete mode 100644 lustre/llite/dcache.c delete mode 100644 lustre/llite/dir.c delete mode 100644 lustre/llite/file.c delete mode 100644 lustre/llite/llite_close.c delete mode 100644 lustre/llite/llite_internal.h delete mode 100644 lustre/llite/llite_lib.c delete mode 100644 lustre/llite/llite_mmap.c delete mode 100644 lustre/llite/llite_nfs.c delete mode 100644 lustre/llite/lloop.c delete mode 100644 lustre/llite/lproc_llite.c delete mode 100644 lustre/llite/namei.c delete mode 100644 lustre/llite/rw.c delete mode 100644 lustre/llite/rw24.c delete mode 100644 lustre/llite/rw26.c delete mode 100644 lustre/llite/statahead.c delete mode 100644 lustre/llite/super.c delete mode 100644 lustre/llite/super25.c delete mode 100644 lustre/llite/symlink.c delete mode 100644 lustre/llite/xattr.c delete mode 100644 lustre/lov/.cvsignore delete mode 100644 lustre/lov/Info.plist delete mode 100644 lustre/lov/Makefile.in delete mode 100644 lustre/lov/autoMakefile.am delete mode 100755 lustre/lov/lov_ea.c delete mode 100644 lustre/lov/lov_internal.h delete mode 100644 lustre/lov/lov_log.c delete mode 100644 lustre/lov/lov_merge.c delete mode 100644 lustre/lov/lov_obd.c delete mode 100644 lustre/lov/lov_offset.c delete mode 100644 lustre/lov/lov_pack.c delete mode 100644 lustre/lov/lov_qos.c delete mode 100644 lustre/lov/lov_request.c delete mode 100644 lustre/lov/lproc_lov.c delete mode 100644 lustre/lvfs/.cvsignore delete mode 100644 lustre/lvfs/Info.plist delete mode 100644 lustre/lvfs/Makefile.in delete mode 100644 lustre/lvfs/autoMakefile.am delete mode 100644 lustre/lvfs/fsfilt.c delete mode 100644 lustre/lvfs/fsfilt_ext3.c delete mode 100644 lustre/lvfs/fsfilt_reiserfs.c delete mode 100644 lustre/lvfs/lustre_quota_fmt.c delete mode 100644 lustre/lvfs/lustre_quota_fmt.h delete mode 100644 lustre/lvfs/lustre_quota_fmt_convert.c delete mode 100644 lustre/lvfs/lvfs_common.c delete mode 100644 lustre/lvfs/lvfs_darwin.c delete mode 100644 lustre/lvfs/lvfs_internal.h delete mode 100644 lustre/lvfs/lvfs_lib.c delete mode 100644 lustre/lvfs/lvfs_linux.c delete mode 100644 lustre/lvfs/lvfs_userfs.c delete mode 100644 lustre/lvfs/prng.c delete mode 100644 lustre/lvfs/quotafmt_test.c delete mode 100644 lustre/lvfs/upcall_cache.c delete mode 100644 lustre/mdc/.cvsignore delete mode 100644 lustre/mdc/Makefile.in delete mode 100644 lustre/mdc/autoMakefile.am delete mode 100644 lustre/mdc/lproc_mdc.c delete mode 100644 lustre/mdc/mdc_internal.h delete mode 100644 lustre/mdc/mdc_lib.c delete mode 100644 lustre/mdc/mdc_locks.c delete mode 100644 lustre/mdc/mdc_reint.c delete mode 100644 lustre/mdc/mdc_request.c delete mode 100644 lustre/mds/.cvsignore delete mode 100644 lustre/mds/Makefile.in delete mode 100644 lustre/mds/autoMakefile.am delete mode 100644 lustre/mds/commit_confd.c delete mode 100644 lustre/mds/handler.c delete mode 100644 lustre/mds/lproc_mds.c delete mode 100644 lustre/mds/mds_fs.c delete mode 100644 lustre/mds/mds_internal.h delete mode 100644 lustre/mds/mds_join.c delete mode 100644 lustre/mds/mds_lib.c delete mode 100644 lustre/mds/mds_log.c delete mode 100644 lustre/mds/mds_lov.c delete mode 100644 lustre/mds/mds_open.c delete mode 100644 lustre/mds/mds_reint.c delete mode 100644 lustre/mds/mds_unlink_open.c delete mode 100644 lustre/mds/mds_xattr.c delete mode 100644 lustre/mgc/.cvsignore delete mode 100644 lustre/mgc/Makefile.in delete mode 100644 lustre/mgc/autoMakefile.am delete mode 100644 lustre/mgc/libmgc.c delete mode 100644 lustre/mgc/lproc_mgc.c delete mode 100644 lustre/mgc/mgc_internal.h delete mode 100644 lustre/mgc/mgc_request.c delete mode 100644 lustre/mgs/.cvsignore delete mode 100644 lustre/mgs/Makefile.in delete mode 100644 lustre/mgs/autoMakefile.am delete mode 100644 lustre/mgs/lproc_mgs.c delete mode 100644 lustre/mgs/mgs_fs.c delete mode 100644 lustre/mgs/mgs_handler.c delete mode 100644 lustre/mgs/mgs_internal.h delete mode 100644 lustre/mgs/mgs_llog.c delete mode 100644 lustre/nodist delete mode 100644 lustre/obdclass/.cvsignore delete mode 100644 lustre/obdclass/Info.plist delete mode 100644 lustre/obdclass/Makefile.in delete mode 100644 lustre/obdclass/autoMakefile.am delete mode 100644 lustre/obdclass/class_hash.c delete mode 100644 lustre/obdclass/class_obd.c delete mode 100644 lustre/obdclass/darwin/.cvsignore delete mode 100644 lustre/obdclass/darwin/Makefile.am delete mode 100644 lustre/obdclass/darwin/darwin-module.c delete mode 100644 lustre/obdclass/darwin/darwin-sysctl.c delete mode 100644 lustre/obdclass/debug.c delete mode 100644 lustre/obdclass/genops.c delete mode 100644 lustre/obdclass/linux/.cvsignore delete mode 100644 lustre/obdclass/linux/Makefile.am delete mode 100644 lustre/obdclass/linux/linux-module.c delete mode 100644 lustre/obdclass/linux/linux-obdo.c delete mode 100644 lustre/obdclass/linux/linux-sysctl.c delete mode 100644 lustre/obdclass/llog.c delete mode 100644 lustre/obdclass/llog_cat.c delete mode 100644 lustre/obdclass/llog_internal.h delete mode 100644 lustre/obdclass/llog_ioctl.c delete mode 100644 lustre/obdclass/llog_lvfs.c delete mode 100644 lustre/obdclass/llog_obd.c delete mode 100644 lustre/obdclass/llog_swab.c delete mode 100644 lustre/obdclass/llog_test.c delete mode 100644 lustre/obdclass/lprocfs_status.c delete mode 100644 lustre/obdclass/lustre_handles.c delete mode 100644 lustre/obdclass/lustre_peer.c delete mode 100644 lustre/obdclass/obd_config.c delete mode 100644 lustre/obdclass/obd_mount.c delete mode 100644 lustre/obdclass/obdo.c delete mode 100644 lustre/obdclass/statfs_pack.c delete mode 100644 lustre/obdclass/uuid.c delete mode 100644 lustre/obdecho/.cvsignore delete mode 100644 lustre/obdecho/Info.plist delete mode 100644 lustre/obdecho/Makefile.in delete mode 100644 lustre/obdecho/autoMakefile.am delete mode 100644 lustre/obdecho/echo.c delete mode 100644 lustre/obdecho/echo_client.c delete mode 100644 lustre/obdecho/lproc_echo.c delete mode 100644 lustre/obdfilter/.cvsignore delete mode 100644 lustre/obdfilter/Makefile.in delete mode 100644 lustre/obdfilter/autoMakefile.am delete mode 100644 lustre/obdfilter/filter.c delete mode 100644 lustre/obdfilter/filter_internal.h delete mode 100644 lustre/obdfilter/filter_io.c delete mode 100644 lustre/obdfilter/filter_io_24.c delete mode 100644 lustre/obdfilter/filter_io_26.c delete mode 100644 lustre/obdfilter/filter_log.c delete mode 100644 lustre/obdfilter/filter_lvb.c delete mode 100644 lustre/obdfilter/lproc_obdfilter.c delete mode 100644 lustre/osc/.cvsignore delete mode 100644 lustre/osc/Info.plist delete mode 100644 lustre/osc/Makefile.in delete mode 100644 lustre/osc/autoMakefile.am delete mode 100644 lustre/osc/cache.c delete mode 100644 lustre/osc/lproc_osc.c delete mode 100644 lustre/osc/osc_create.c delete mode 100644 lustre/osc/osc_internal.h delete mode 100644 lustre/osc/osc_request.c delete mode 100644 lustre/ost/.cvsignore delete mode 100644 lustre/ost/Makefile.in delete mode 100644 lustre/ost/autoMakefile.am delete mode 100644 lustre/ost/lproc_ost.c delete mode 100644 lustre/ost/ost_handler.c delete mode 100644 lustre/ost/ost_internal.h delete mode 100644 lustre/ptlrpc/.cvsignore delete mode 100644 lustre/ptlrpc/Info.plist delete mode 100644 lustre/ptlrpc/Makefile.in delete mode 100644 lustre/ptlrpc/autoMakefile.am delete mode 100644 lustre/ptlrpc/client.c delete mode 100644 lustre/ptlrpc/connection.c delete mode 100644 lustre/ptlrpc/import.c delete mode 100644 lustre/ptlrpc/llog_client.c delete mode 100644 lustre/ptlrpc/llog_net.c delete mode 100644 lustre/ptlrpc/llog_server.c delete mode 100644 lustre/ptlrpc/lproc_ptlrpc.c delete mode 100644 lustre/ptlrpc/niobuf.c delete mode 100644 lustre/ptlrpc/pack_generic.c delete mode 100644 lustre/ptlrpc/pers.c delete mode 100644 lustre/ptlrpc/pinger.c delete mode 100644 lustre/ptlrpc/ptlrpc_internal.h delete mode 100644 lustre/ptlrpc/ptlrpc_module.c delete mode 100644 lustre/ptlrpc/ptlrpcd.c delete mode 100644 lustre/ptlrpc/recov_thread.c delete mode 100644 lustre/ptlrpc/recover.c delete mode 100644 lustre/ptlrpc/service.c delete mode 100644 lustre/ptlrpc/wirehdr.c delete mode 100644 lustre/ptlrpc/wiretest.c delete mode 100644 lustre/quota/.cvsignore delete mode 100644 lustre/quota/Makefile.in delete mode 100644 lustre/quota/autoMakefile.am delete mode 100644 lustre/quota/quota_adjust_qunit.c delete mode 100644 lustre/quota/quota_check.c delete mode 100644 lustre/quota/quota_context.c delete mode 100644 lustre/quota/quota_ctl.c delete mode 100644 lustre/quota/quota_interface.c delete mode 100644 lustre/quota/quota_internal.h delete mode 100644 lustre/quota/quota_master.c delete mode 100644 lustre/quota/quotacheck_test.c delete mode 100644 lustre/quota/quotactl_test.c delete mode 100644 lustre/scripts/.cvsignore delete mode 100644 lustre/scripts/Makefile.am delete mode 100755 lustre/scripts/bdev-io-survey.sh delete mode 100755 lustre/scripts/dodiff.sh delete mode 100644 lustre/scripts/lc_cluman.in delete mode 100644 lustre/scripts/lc_common delete mode 100644 lustre/scripts/lc_hb.in delete mode 100644 lustre/scripts/lc_lvm.in delete mode 100644 lustre/scripts/lc_md.in delete mode 100644 lustre/scripts/lc_modprobe.in delete mode 100644 lustre/scripts/lc_mon delete mode 100644 lustre/scripts/lc_net.in delete mode 100644 lustre/scripts/lc_servip delete mode 100755 lustre/scripts/license-status delete mode 100644 lustre/scripts/llite-group.sh delete mode 100644 lustre/scripts/lmc2csv.pl delete mode 100755 lustre/scripts/lustre delete mode 100644 lustre/scripts/lustre_config.in delete mode 100644 lustre/scripts/lustre_createcsv.in delete mode 100644 lustre/scripts/lustre_req_history delete mode 100755 lustre/scripts/lustre_rmmod delete mode 100644 lustre/scripts/lustre_up14 delete mode 100644 lustre/scripts/lustrefs delete mode 100755 lustre/scripts/maketags.sh delete mode 100755 lustre/scripts/nodelustre delete mode 100755 lustre/scripts/system-profile.sh delete mode 100644 lustre/scripts/version_tag.pl.in delete mode 100644 lustre/tests/.cvsignore delete mode 100644 lustre/tests/2ost.sh delete mode 100644 lustre/tests/Makefile.am delete mode 100644 lustre/tests/README delete mode 100644 lustre/tests/acceptance-metadata-double.sh delete mode 100644 lustre/tests/acceptance-metadata-parallel.sh delete mode 100644 lustre/tests/acceptance-metadata-single.sh delete mode 100755 lustre/tests/acceptance-small.sh delete mode 100644 lustre/tests/acl/README delete mode 100644 lustre/tests/acl/cp.test delete mode 100644 lustre/tests/acl/getfacl-noacl.test delete mode 100644 lustre/tests/acl/inheritance.test delete mode 100755 lustre/tests/acl/make-tree delete mode 100644 lustre/tests/acl/misc.test delete mode 100644 lustre/tests/acl/permissions.test delete mode 100755 lustre/tests/acl/run delete mode 100644 lustre/tests/acl/setfacl.test delete mode 100644 lustre/tests/busy.sh delete mode 100644 lustre/tests/cfg/insanity-local.sh delete mode 100644 lustre/tests/cfg/local.sh delete mode 100644 lustre/tests/checkstat.c delete mode 100644 lustre/tests/chownmany.c delete mode 100644 lustre/tests/cmknod.c delete mode 100755 lustre/tests/cobd.sh delete mode 100644 lustre/tests/compile.sh delete mode 100644 lustre/tests/conf-sanity.sh delete mode 100644 lustre/tests/crash-mod.sh delete mode 100644 lustre/tests/create.pl delete mode 100644 lustre/tests/createdestroy.c delete mode 100644 lustre/tests/createmany-mpi.c delete mode 100644 lustre/tests/createmany.c delete mode 100644 lustre/tests/createtest.c delete mode 100644 lustre/tests/directio.c delete mode 100644 lustre/tests/disk1_4.zip delete mode 100644 lustre/tests/fchdir_test.c delete mode 100644 lustre/tests/filter_survey.sh delete mode 100644 lustre/tests/flock.c delete mode 100644 lustre/tests/flock_test.c delete mode 100644 lustre/tests/flocks_test.c delete mode 100644 lustre/tests/fsx.c delete mode 100644 lustre/tests/getdents.c delete mode 100755 lustre/tests/insanity.sh delete mode 100644 lustre/tests/iopentest1.c delete mode 100644 lustre/tests/iopentest2.c delete mode 100644 lustre/tests/it_test.c delete mode 100644 lustre/tests/ldaptest.c delete mode 100644 lustre/tests/leak_finder.pl delete mode 100755 lustre/tests/lfscktest.sh delete mode 100644 lustre/tests/liblustre_sanity_uml.sh delete mode 100644 lustre/tests/ll_dirstripe_verify.c delete mode 100644 lustre/tests/ll_getstripe_info.c delete mode 100644 lustre/tests/ll_sparseness_verify.c delete mode 100644 lustre/tests/ll_sparseness_write.c delete mode 100644 lustre/tests/llecho.sh delete mode 100755 lustre/tests/llmount.sh delete mode 100755 lustre/tests/llmountcleanup.sh delete mode 100644 lustre/tests/llog-test.sh delete mode 100644 lustre/tests/lockorder.sh delete mode 100644 lustre/tests/lov-sanity.sh delete mode 100644 lustre/tests/lp_utils.c delete mode 100644 lustre/tests/lp_utils.h delete mode 100755 lustre/tests/mcr.sh delete mode 100644 lustre/tests/mcreate.c delete mode 100644 lustre/tests/memhog.c delete mode 100644 lustre/tests/mkdirdeep.c delete mode 100755 lustre/tests/mkdirmany.c delete mode 100755 lustre/tests/mlink.c delete mode 100644 lustre/tests/mmap_sanity.c delete mode 100644 lustre/tests/mrename.c delete mode 100644 lustre/tests/multifstat.c delete mode 100755 lustre/tests/multiop.c delete mode 100755 lustre/tests/munlink.c delete mode 100644 lustre/tests/o_directory.c delete mode 100755 lustre/tests/oos.sh delete mode 100644 lustre/tests/oos2.sh delete mode 100644 lustre/tests/openclose.c delete mode 100644 lustre/tests/opendevunlink.c delete mode 100644 lustre/tests/opendirunlink.c delete mode 100644 lustre/tests/openfile.c delete mode 100644 lustre/tests/openfilleddirunlink.c delete mode 100644 lustre/tests/openme.c delete mode 100644 lustre/tests/openunlink.c delete mode 100644 lustre/tests/ost_oos.sh delete mode 100644 lustre/tests/parallel_grouplock.c delete mode 100644 lustre/tests/random-reads.c delete mode 100755 lustre/tests/recovery-small.sh delete mode 100644 lustre/tests/rename.pl delete mode 100644 lustre/tests/rename_many.c delete mode 100755 lustre/tests/replay-dual.sh delete mode 100755 lustre/tests/replay-ost-single.sh delete mode 100755 lustre/tests/replay-single.sh delete mode 100755 lustre/tests/rmdirmany.c delete mode 100644 lustre/tests/run-llog.sh delete mode 100644 lustre/tests/runas.c delete mode 100755 lustre/tests/rundbench delete mode 100755 lustre/tests/runiozone delete mode 100644 lustre/tests/runmultiop_bg_pause delete mode 100644 lustre/tests/runobdstat delete mode 100755 lustre/tests/runtests delete mode 100755 lustre/tests/runvmstat delete mode 100644 lustre/tests/sanity-quota.sh delete mode 100644 lustre/tests/sanity.sh delete mode 100644 lustre/tests/sanityN.sh delete mode 100644 lustre/tests/set_dates.sh delete mode 100644 lustre/tests/sleeptest.c delete mode 100644 lustre/tests/small_write.c delete mode 100755 lustre/tests/socketclient delete mode 100755 lustre/tests/socketserver delete mode 100644 lustre/tests/statmany.c delete mode 100644 lustre/tests/statone.c delete mode 100644 lustre/tests/tchmod.c delete mode 100644 lustre/tests/test-framework.sh delete mode 100755 lustre/tests/test2.c delete mode 100644 lustre/tests/test_brw.c delete mode 100644 lustre/tests/toexcl.c delete mode 100644 lustre/tests/truncate.c delete mode 100644 lustre/tests/unlinkmany.c delete mode 100644 lustre/tests/utime.c delete mode 100644 lustre/tests/wantedi.c delete mode 100644 lustre/tests/write_append_truncate.c delete mode 100644 lustre/tests/write_disjoint.c delete mode 100644 lustre/tests/writemany.c delete mode 100644 lustre/tests/writeme.c delete mode 100644 lustre/utils/.cvsignore delete mode 100644 lustre/utils/Makefile.am delete mode 100644 lustre/utils/l_getgroups.c delete mode 100644 lustre/utils/lctl.c delete mode 100644 lustre/utils/lfs.c delete mode 100644 lustre/utils/liblustreapi.c delete mode 100644 lustre/utils/llanalyze delete mode 100755 lustre/utils/llbackup delete mode 100644 lustre/utils/llobdstat delete mode 100644 lustre/utils/llog_reader.c delete mode 100644 lustre/utils/llstat delete mode 100644 lustre/utils/llverdev.c delete mode 100644 lustre/utils/llverfs.c delete mode 100644 lustre/utils/loadgen.c delete mode 100644 lustre/utils/lr_reader.c delete mode 100755 lustre/utils/lrun delete mode 100644 lustre/utils/ltrack_stats.c delete mode 100644 lustre/utils/lustre_cfg.c delete mode 100644 lustre/utils/mkfs_lustre.c delete mode 100755 lustre/utils/module_cleanup.sh delete mode 100755 lustre/utils/module_setup.sh delete mode 100644 lustre/utils/mount_lustre.c delete mode 100644 lustre/utils/obd.c delete mode 100644 lustre/utils/obdbarrier.c delete mode 100644 lustre/utils/obdctl.c delete mode 100644 lustre/utils/obdctl.h delete mode 100644 lustre/utils/obdio.c delete mode 100644 lustre/utils/obdiolib.c delete mode 100644 lustre/utils/obdiolib.h delete mode 100644 lustre/utils/parser.c delete mode 100644 lustre/utils/parser.h delete mode 100644 lustre/utils/platform.h delete mode 100644 lustre/utils/plot-llstat delete mode 100644 lustre/utils/wirecheck.c delete mode 100644 lustre/utils/wirehdr.c delete mode 100644 lustre/utils/wiretest.c diff --git a/build/README.kernel-source b/build/README.kernel-source deleted file mode 100644 index bb985e9c97..0000000000 --- a/build/README.kernel-source +++ /dev/null @@ -1,103 +0,0 @@ -Lustre can currently build against Red Hat 2.4 and SuSE 2.6 -kernel-source RPMs. All other kernel-source RPMs are *unsupported* at -this time. - -Note that a Lustre-patched kernel is required for building Lustre; in -most cases a kernel-source RPM from your Linux vendor will not contain -the necessary patches. - -## -## Instructions for Red Hat 2.4.x kernel-source RPMs -## - -1. kernel.h - -Building against a kernel-source RPM requires a special header. On -Red Hat systems, this file should be automatically created at boot -time, and saved in /boot/kernel.h. - - *** If you are not running Red Hat Linux, or are not booted into the - *** kernel you are trying to build against, you need to create this - *** file manually. - - *** If you do not, the Lustre build may fail, or may fail to build - *** modules that work with your kernel. - -Here is an example /boot/kernel.h file. If you are building on -x86_64, the first defines should be __MODULE_KERNEL_x86_64, etc. The -other defines should be simple to figure out. - -/* This file is automatically generated at boot time. */ -#ifndef __BOOT_KERNEL_H_ -#define __BOOT_KERNEL_H_ - -/* Kernel type i686-smp */ - -#ifndef __MODULE_KERNEL_i686 -#define __MODULE_KERNEL_i686 1 -#endif - -#ifndef __BOOT_KERNEL_ENTERPRISE -#define __BOOT_KERNEL_ENTERPRISE 0 -#endif - -#ifndef __BOOT_KERNEL_BIGMEM -#define __BOOT_KERNEL_BIGMEM 0 -#endif - -#ifndef __BOOT_KERNEL_HUGEMEM -#define __BOOT_KERNEL_HUGEMEM 0 -#endif - -#ifndef __BOOT_KERNEL_SMP -#define __BOOT_KERNEL_SMP 1 -#endif - -#ifndef __BOOT_KERNEL_UP -#define __BOOT_KERNEL_UP 0 -#endif - -#endif - -You should save this somewhere, and pass the location of this file to -./configure using the --with-kernel-source-header option. - -2. .config - -You will also need to tell Lustre about the .config file for your -kernel. The two likely locations of this file are -/boot/config-$(uname -r), and /usr/src/linux-2.4/configs/. You should -pass the location of this file to Lustre using the --with-linux-config -option. - -3. An Example - -Here is an example for configuring Lustre: - -./configure --with-linux=/usr/src/linux-2.4.20-28.9_lustre.1.0.3 \ ---with-kernel-source-header=/boot/kernel.h \ ---with-linux-config=/boot/config-2.4.20-28.9_lustre.1.0.3smp - -## -## Instructions for SuSE 2.6.x kernel-source RPMs -## - -1. kernel-syms - -In addition to the kernel-source rpm, you may need to install a -kernel-syms rpm. This should be included where you got your kernel -rpm. - -2. linux-obj - -You will need to choose the correct linux-obj directory for your -machine. They will be located in /usr/src/linux-$(uname --r)-obj/$ARCH/$FLAVOR. Lustre should be configured with the ---with-linux-obj option. - -3. Example - -Here is an example for configuring Lustre: - -./configure --with-linux=/usr/src/linux-2.6.5-7.97 \ ---with-linux-obj=/usr/src/linux-2.6.5-7.97-obj/ppc64/pseries64 diff --git a/build/Rules.in b/build/Rules.in deleted file mode 100644 index 815b3da57c..0000000000 --- a/build/Rules.in +++ /dev/null @@ -1,78 +0,0 @@ -# Directories building kernel modules should have two files: -# -# Makefile.in: -# -# MODULES := <module-name> -# <module-name>-objs := file1.o file2.o file3.o -# @INCLUDE_RULES@ -# -# and autoMakefile.am: -# -# if LIBLUSTRE -# <liblustre rules> -# endif -# -# if MODULES -# modulefs_DATA = <module-name>$(KMODEXT) -# endif -# -# DIST_SOURCES = $(<module-name>-objs:.o=.c) <other sources> -# MOSTLYCLEANFILES = *.o *.ko *.mod.c - -ifeq ($(PATCHLEVEL),) - -include autoMakefile - -# The kernel ABI files for the nonfree modules. -KABIS := $(NONFREE_MODULES:%$(KMODEXT)=%.kabi) - -all: archive-nonfree-modules - -# Where to archive the nonfree modules for binary distribution. -# If this directory has a colon in it, SSH/SCP are used to go out on the network. -nonfreedir := $$HOME/nonfree -#nonfreedir := moraine.clusterfs.com:/home/lustre-nonfree - -# Put the nonfree modules and corresponding KABI files into the binary -# archive. We assume that if the CVS subdirectory doesn't exist, we -# don't want to archive. -archive-nonfree-modules: $(KABIS) $(NONFREE_MODULES) - test -d CVS || exit 0; \ - list="$(NONFREE_MODULES)"; for mod in $$list; do \ - perl $(top_srcdir)/build/kabi -v archive $(nonfreedir) $$mod || exit $$?; \ - done - -# Generate the Kernel ABI files for the nonfree modules. -$(KABIS): $(NONFREE_MODULES) - for mod in $(NONFREE_MODULES); do \ - CC="$(CC)" perl $(top_srcdir)/build/kabi --with-linux="$(LINUX)" module $$mod || exit $$?; \ - done - -fix-kext-ownership: - @if test -d $(DESTDIR)$(kextdir) ; then \ - echo chown -R root:wheel $(DESTDIR)$(kextdir) ; \ - chown -R root:wheel $(DESTDIR)$(kextdir) || \ - echo >&2 "*** WARNING: Could not fix kext ownership for $(DESTDIR)$(kextdir)" ; \ - fi - -else - -include @LINUX_CONFIG@ - -EXTRA_CFLAGS := $(EXTRA_PRE_CFLAGS) -EXTRA_CFLAGS += @EXTRA_KCFLAGS@ @UML_CFLAGS@ @CFLAGS@ -EXTRA_CFLAGS += $(EXTRA_POST_CFLAGS) - -obj-m := $(patsubst %,%.o,$(MODULES)) - -ifeq ($(PATCHLEVEL),4) -# 2.4 rules -O_TARGET := $(firstword $(obj-m)) -obj-y := $($(firstword $(MODULES))-objs) -export-objs := $(obj-y) $(filter-out $(O_TARGET),$(obj-m)) -include $(TOPDIR)/Rules.make -$(MODINCL)/%.ver: %.c - @true -endif # PATCHLEVEL - -endif # KERNELRELEASE diff --git a/build/autoconf/.cvsignore b/build/autoconf/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/build/autoconf/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/build/autoconf/Makefile.am b/build/autoconf/Makefile.am deleted file mode 100644 index 5ee43813b4..0000000000 --- a/build/autoconf/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_DIST := lustre-build.m4 lustre-build-linux.m4 -if DARWIN -EXTRA_DIST += lustre-build-darwin.m4 -endif diff --git a/build/autoconf/lustre-build-darwin.m4 b/build/autoconf/lustre-build-darwin.m4 deleted file mode 100644 index a14ebf8cd6..0000000000 --- a/build/autoconf/lustre-build-darwin.m4 +++ /dev/null @@ -1,106 +0,0 @@ -# -# LB_DARWIN_CHECK_FUNCS -# -# check for functions in the darwin kernel -# Note that this is broken for cross compiling -# -AC_DEFUN([LB_DARWIN_CHECK_FUNCS], -[AC_FOREACH([AC_Func], [$1], - [AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Func), - [Define to 1 if you have the `]AC_Func[' function.])])dnl -for ac_func in $1 -do -AC_MSG_CHECKING([for $1]) -AS_IF([AC_TRY_COMMAND(nm /mach | grep "[$1]" >/dev/null 2>/dev/null)],[ - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$ac_func])]) $2 -],[ - AC_MSG_RESULT([no]) $3 -])dnl -done -]) - -# -# LB_DARWIN_CONDITIONALS -# -# AM_CONDITIONALs for darwin -# -AC_DEFUN([LB_DARWIN_CONDITIONALS], -[ -]) - -# -# LB_PROG_DARWIN -# -# darwin tests -# -AC_DEFUN([LB_PROG_DARWIN], -[kernel_framework="/System/Library/Frameworks/Kernel.framework" -# -# FIXME: there should be a better way to get these than hard coding them -# -case $target_cpu in - powerpc*) - EXTRA_KCFLAGS="$EXTRA_KCFLAGS -arch ppc -mtune=G4 -mlong-branch" - EXTRA_KLDFLAGS="-arch ppc" - ;; - i?86 | x86_64) - EXTRA_KCFLAGS="$EXTRA_KCFLAGS -arch i386" - EXTRA_KLDFLAGS="-arch i386" - ;; -esac - -# Kernel of OS X is not 64bits(even in Tiger), but -m64 can be taken by gcc in Tiger -# (Tiger can support 64bits applications), so we have to eliminate -m64 while -# building kextensions for and OS X. -CC=`echo $CC | sed -e "s/\-m64//g"` -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -x c -pipe -Wno-trigraphs -fasm-blocks -g -O0" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-four-char-constants -Wmost -O0" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -fmessage-length=0" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -I$kernel_framework/Headers" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -I$kernel_framework/Headers/bsd" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -I$kernel_framework/PrivateHeaders" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -fno-common -nostdinc -fno-builtin" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -finline -fno-keep-inline-functions" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -force_cpusubtype_ALL -fno-exceptions" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -msoft-float -static" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -DKERNEL -DKERNEL_PRIVATE" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -DDRIVER_PRIVATE -DAPPLE -DNeXT" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__KERNEL__ -D__DARWIN__" -# -# C flags for Panther/Tiger -# -case $target_os in - darwin8*) - EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__DARWIN8__" - ;; - darwin7*) - EXTRA_KCFLAGS="$EXTRA_KCFLAGS -ffix-and-continue" - ;; -esac - -# -# Debugging flags. Remove! -# -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -O0 -DMACH_ASSERT=1" -EXTRA_KLDFLAGS="$EXTRA_KLDFLAGS -static -nostdlib -r" -EXTRA_KLIBS="-lkmodc++ -lkmod -lcc_kext" -KMODEXT="" - -AC_SUBST(EXTRA_KLDFLAGS) -AC_SUBST(EXTRA_KLIBS) - -kextdir='/System/Library/Extensions/$(firstword $(macos_PROGRAMS)).kext' -plistdir='$(kextdir)/Contents' -macosdir='$(plistdir)/MacOS' - -AC_SUBST(kextdir) -AC_SUBST(plistdir) -AC_SUBST(macosdir) - -LN_PROG_DARWIN - -LP_PROG_DARWIN - -LC_PROG_DARWIN -]) diff --git a/build/checkstack.pl b/build/checkstack.pl deleted file mode 100644 index 6bdab11260..0000000000 --- a/build/checkstack.pl +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/perl -# Check the stack usage of functions -# -# Copyright Joern Engel <joern@wh.fh-wedel.de> -# Inspired by Linus Torvalds -# Original idea maybe from Keith Owens -# s390 port and big speedup by Arnd Bergmann <arnd@bergmann-dalldorf.de> -# Modified to have simpler output format by Dan Kegel -# -# Usage: -# objdump -d vmlinux | stackcheck.pl [arch] -# -# find <moduledir> -name "*.o" | while read M; do -# objdump -d $M | perl ~/checkstack.pl <arch> | \ -# sed "s/^/`basename $M`: /" ; done | \ -# awk '/esp/ { print $5, $2, $4 }' | sort -nr - -# TODO : Port to all architectures (one regex per arch) - -# check for arch -# -# $re is used for three matches: -# $& (whole re) matches the complete objdump line with the stack growth -# $1 (first bracket) matches the code that will be displayed in the output -# $2 (second bracket) matches the size of the stack growth -# -# use anything else and feel the pain ;) -{ - my $arch = shift; - $x = "[0-9a-f]{2,5}"; # hex number >= 256 - $d = "([0-9]{2}|[2-9])[0-9]{2}"; # decimal number >= 200 - if ($arch eq "") { - $arch = `uname -m`; - } - if ($arch =~ /^i[3456]86$/) { - #c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp - $re = qr/^.*(sub \$(0x$x),\%esp)$/o; - $todec = sub { return hex($_[0]); }; - } elsif ($arch =~ 'x86_64') { - # 2f60: 48 81 ec e8 05 00 00 sub $0x5e8,%rsp - $re = qr/^.*(add \$(0x$x),\%rsp)$/o; - $todec = sub { return hex($_[0]); }; - } elsif ($arch =~ /^ia64$/) { - #e0000000044011fc: 01 0f fc 8c adds r12=-384,r12 - $re = qr/.*(adds.*r12=-($d),r12)/o; - $todec = sub { return $_[0]; }; - } elsif ($arch =~ /^mips64$/) { - #8800402c: 67bdfff0 daddiu sp,sp,-16 - $re = qr/.*(daddiu.*sp,sp,-($d))/o; - $todec = sub { return $_[0]; }; - } elsif ($arch =~ /^mips$/) { - #88003254: 27bdffe0 addiu sp,sp,-32 - $re = qr/.*(addiu.*sp,sp,-($d))/o; - $todec = sub { return $_[0]; }; - } elsif ($arch =~ /^ppc$/) { - #c00029f4: 94 21 ff 30 stwu r1,-208(r1) - $re = qr/.*(stwu.*r1,-($x)\(r1\))/o; - $todec = sub { return hex($_[0]); }; - } elsif ($arch =~ /^s390x?$/) { - # 11160: a7 fb ff 60 aghi %r15,-160 - $re = qr/.*(ag?hi.*\%r15,-($d))/o; - $todec = sub { return $_[0]; }; - } else { - print "Usage: objdump -d vmlinux | checkstack.pl [arch]\n"; - print "where arch is i386, ia64, mips, mips64, ppc, or s390\n"; - print "Each output line gives a function's stack usage, name\n"; - print "Lines are output in order of decreasing stack usage\n"; - die("wrong or unknown architecture\n"); - } -} - -$funcre = qr/^[0-9a-f]* \<(.*)\>:$/; -while ($line = <STDIN>) { - if ($line =~ m/$funcre/) { - ($func = $line) =~ s/$funcre/\1/; - chomp($func); - } - if ($line =~ m/$re/) { - push(@stack, &$todec($2)." ".$func); - # don't expect more than one stack allocation per function - $func .= " ** bug **"; - } -} - -foreach (sort { $b - $a } (@stack)) { - print $_."\n"; -} diff --git a/build/clearpatches.sh b/build/clearpatches.sh deleted file mode 100644 index a0f5741331..0000000000 --- a/build/clearpatches.sh +++ /dev/null @@ -1,13 +0,0 @@ -BASEDIR=${BASEDIR:-lustre/kernel_patches} -SERIESPATH=${SERIESPATH:-$BASEDIR/series} -PATCHESPATH=${PATCHESPATH:-$BASEDIR/patches} -NOUSEPATH=${NOUSEPATH:-$BASEDIR/unused} - -#mkdir -p $NOUSEPATH -for PATCH in `ls $PATCHESPATH | grep -v CVS` ; do - #echo $PATCH - if ! grep -rq $PATCH $SERIESPATH ; then - echo "$PATCH" - #mv $PATCHESPATH/$PATCH $NOUSEPATH - fi -done diff --git a/build/confirmpatches.sh b/build/confirmpatches.sh deleted file mode 100644 index 1c160dac86..0000000000 --- a/build/confirmpatches.sh +++ /dev/null @@ -1,12 +0,0 @@ -BASEDIR=${BASEDIR:-lustre/kernel_patches} -SERIESPATH=${SERIESPATH:-$BASEDIR/series} -PATCHESPATH=${PATCHESPATH:-$BASEDIR/patches} -for SERIES in `ls $SERIESPATH | egrep -v "CVS|~$|.orig"` ; do - #echo $SERIES - for PATCH in `cat $SERIESPATH/$SERIES`; do - #echo $PATCH - if [ ! `find $PATCHESPATH -name $PATCH` ]; then - echo "$SERIESPATH/$SERIES: patch $PATCH was not found !" - fi - done -done diff --git a/build/cvs-modified-files.pl b/build/cvs-modified-files.pl deleted file mode 100755 index d13c4d3d71..0000000000 --- a/build/cvs-modified-files.pl +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env perl - -my $mode = "NONE"; -my @modified, @added, @removed; - -while($line = <>) { - if ($line =~ /Modified Files:/) { - $mode = "MODIFIED"; - next; - } - - if ($line =~ /Added Files:/) { - $mode = "ADDED"; - next; - } - - if ($line =~ /Removed Files:/) { - $mode = "REMOVED"; - next; - } - - if ($mode eq "NONE") { next; } - if ($line =~ /-------/) { next; } - - chop($line); - $line =~ s/^CVS:\s+//; - $line =~ s/\s+$//; - # print "processing $line for $mode\n"; - @files = split(/ /, $line); - # print "new files for $mode: ", join(', ', @files), "\n"; - - if ($mode eq "MODIFIED") { - push(@modified, @files); - } elsif ($mode eq "ADDED") { - push(@added, @files); - } elsif ($mode eq "REMOVED") { - push(@removed, @files); - } else { - die "Unknown mode $mode!"; - } -} - -print join(' ', @modified); -if ($ENV{"SHOW_ALL_FILES"} ne "no") { - print ' ', join(' ', @added), ' ', join(' ', @removed); -} -print "\n"; diff --git a/build/land2.sh b/build/land2.sh deleted file mode 100755 index ea616a91cd..0000000000 --- a/build/land2.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -e - -CVS=cvs - -if [ ! -f .mergeinfo ] ; then - echo ".mergeinfo doesn't exist - exit" - exit -fi - -. .mergeinfo - -if [ "$OPERATION" != "Land" ] ; then - echo "OPERATION must be Land - is $OPERATION" - echo "You should probably be running ${OPERATION}2.sh" - exit -fi - -if [ -f "$CONFLICTS" ] ; then - echo "$CONFLICTS exists - clean up first" - cat $CONFLICTS - exit -fi - -cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1 - -echo -n "Tagging as ${CHILD}_BASE_$date ..." -$CVS rtag -r $parent ${CHILD}_BASE_$date $module -echo "done" -echo -n "Tagging as ${CHILD}_BASE ..." -$CVS rtag -F -r $parent ${CHILD}_BASE $module - -echo "saving .mergeinfo as .mergeinfo-$date" -mv .mergeinfo .mergeinfo-$date -echo "done" diff --git a/build/linux-merge-config.awk b/build/linux-merge-config.awk deleted file mode 100644 index 9a9338cc54..0000000000 --- a/build/linux-merge-config.awk +++ /dev/null @@ -1,317 +0,0 @@ -#!/bin/awk -f -BEGIN { - nsects = 0 -} -{ - ARCH = $1 - ARCHES[ARCH] = 1 - TYPE = $2 - TYPES[TYPE] = 1 - NTOTAL++ - ARCHTYPES[ARCH ":" TYPE] = 1 - NARCHES[TYPE]++ - if (NARCHES[TYPE] == 1) - NTOTALTYPES++ - NTYPES[ARCH]++ - if (NTYPES[ARCH] == 1) - NTOTALARCHES++ - FILE = $3 - cursects = nsects - while ((getline < FILE) > 0) { - if ($0 ~ /^\/\*/ || $0 ~ /^ \*\// || $0 ~ /^[ ]*$/) - continue - if ($0 ~ /^ * /) { - SECTION = gensub(/^ \* /,"",$0) - if (!(SECTION in sectno)) { - sectno[SECTION] = nsects - counts[SECTION] = 0 - nsects++ - } else if (cursects && cursects != nsects) { - no = sectno[SECTION] - diff = nsects - cursects - for (s in sectno) { - if (sectno[s] >= cursects) - sectno[s] = sectno[s] - cursects + no - else if (sectno[s] >= no) - sectno[s] += diff - } - } - cursects = nsect - cursym[SECTION] = counts[SECTION] - continue - } - if ($1 != "#define" && $1 != "#undef") - exit 1 - SYMBOL = $2 - n = index($0,SYMBOL)+length(SYMBOL) - if ($1 == "#define") { - n = index($0,SYMBOL)+length(SYMBOL) - VALUE = gensub(/^[ ]*/,"","",substr($0,n)) - if (VALUE == "") VALUE = "__novalue__" - } else - VALUE = "__undefined__" - if (values[SYMBOL]) { - if (present[SYMBOL,ARCH,TYPE]) continue - present[SYMBOL,ARCH,TYPE] = 1 - values[SYMBOL] = values[SYMBOL] SUBSEP ARCH ":" TYPE ":" VALUE - if (SECTION == sections[SYMBOL] && cursym[SECTION] && cursym[SECTION] != counts[SECTION]) { - no = pos[SYMBOL] - diff = counts[SECTION]-cursym[SECTION] - for (s in pos) - if (sections[s] == SECTION) { - if (pos[s] >= cursym[SECTION]) - pos[s] = pos[s] - cursym[SECTION] + no - else if (pos[s] >= no) - pos[s] += diff - } - cursym[SECTION] = counts[SECTION] - } - } else { - present[SYMBOL,ARCH,TYPE] = 1 - values[SYMBOL] = ARCH ":" TYPE ":" VALUE - sections[SYMBOL] = SECTION - pos[SYMBOL] = counts[SECTION] - counts[SECTION]++ - } - } - close(FILE) -} -END { - for (SECTION in sectno) - x[sectno[SECTION]] = SECTION - for (i = 0; i < nsects; i++) { - SECTION = x[i] - if (i > 0) - printf "\n" - printf "/*\n * %s\n */\n", SECTION - split("",lines) - lastelse = "" - for (SYMBOL in sections) - if (sections[SYMBOL] == SECTION) - y[pos[SYMBOL]] = SYMBOL - for (j = 0; j < counts[SECTION]; j++) { - SYMBOL = y[j] - split("",ntype) - split("",total) - split(values[SYMBOL],z,SUBSEP) - split("",val) - totalsum = 0 - for (k in z) { - split(z[k],l,":") - ARCH = l[1] - TYPE = l[2] - VALUE = substr(z[k],length(ARCH)+length(TYPE)+3) - if (val[VALUE]) - val[VALUE] = val[VALUE] " " - val[VALUE] = val[VALUE] ARCH ":" TYPE - ntype[VALUE,TYPE] += 1 - total[VALUE] += 1 - totalsum += 1 - } - split("",curlines) - append = 1 - for (VALUE in val) { - if (total[VALUE] == NTOTAL) { - if (VALUE == "__undefined__") - curlines["1"] = "#undef " SYMBOL "\n" - else if (VALUE == "__novalue__") - curlines["1"] = "#define " SYMBOL "\n" - else - curlines["1"] = "#define " SYMBOL " " VALUE "\n" - if (!lines["1"]) - append = 0 - break - } - shorteststr = "" - curcount = 0 - for (m = 0; m < 4; m++) { - str = "" - split(val[VALUE],yy) - if (total[VALUE] > 1 && total[VALUE] == NTOTAL - 1) { - found = 0 - for (arch in ARCHES) { - for (type in TYPES) { - archtype = arch ":" type - if (ARCHTYPES [archtype] == 1) { - for (n in yy) - if (yy[n] == archtype) - break - if (yy[n] != archtype) { - found = 1 - break - } - } - } - if (found) - break - } - if (NARCHES[type] > 1 && NTYPES[arch] > 1) { - str = "!defined(__module__" arch "_" type ")" - shorteststr = str - break - } - } - if (m == 0 || m == 2) { - nfull = 0 - split("",yysave) - for (type in TYPES) - if (ntype[VALUE,type] == NARCHES[type]) { - if (str) str = str " || " - str = str "defined(__module__" type ")" - for (k in yy) { - split(yy[k], z, ":") - if (z[2] == type) { - yysave[k] = yy[k] - delete yy[k] - } - } - nfull++ - } else - NOTYPE = type - if (m < 2 && nfull > 1 && nfull == NTOTALTYPES - 1) { - str = "!defined(__module__" NOTYPE ")" - for (k in yysave) - yy[k] = yysave[k] - for (k in yy) { - split(yy[k], z, ":") - if (z[2] != NOTYPE) - delete yy[k] - } - } - } - savestr = str - nfull = 0 - split("",yysave) - for (arch in ARCHES) { - narch = 0 - for (k in yy) { - split(yy[k], z, ":") - if (z[1] == arch) - narch++ - } - if (narch == NTYPES[arch]) { - if (str) str = str " || " - str = str "defined(__module__" arch ")" - for (k in yy) { - split(yy[k], z, ":") - if (z[1] == arch) { - yysave[k] = yy[k] - delete yy[k] - } - } - nfull++ - } else - NOARCH = arch - } - if (m < 2 && nfull > 1 && nfull == NTOTALARCHES - 1) { - str = savestr - for (k in yysave) - yy[k] = yysave[k] - if (str) str = str " || " - str = str "!defined(__module__" NOARCH ")" - for (k in yy) { - split(yy[k], z, ":") - if (z[1] != NOARCH) - delete yy[k] - } - } - if (m == 1 || m == 3) { - savestr = str - nfull = 0 - split("",yysave) - for (type in TYPES) { - ntypex = 0 - for (k in yy) { - split(yy[k], z, ":") - if (z[2] == type) - ntypex++ - } - if (ntypex == NARCHES[type]) { - if (str) str = str " || " - str = str "defined(__module__" type ")" - for (k in yy) { - split(yy[k], z, ":") - if (z[2] == type) { - yysave[k] = yy[k] - delete yy[k] - } - } - nfull++ - } else - NOTYPE = type - } - if (m < 2 && nfull > 1 && nfull == NTOTALTYPES - 1) { - str = savestr - for (k in yysave) - yy[k] = yysave[k] - if (str) str = str " || " - str = "!defined(__module__" NOTYPE ")" - for (k in yy) { - split(yy[k], z, ":") - if (z[2] != NOTYPE) - delete yy[k] - } - } - } - for (k in yy) { - split(yy[k], z, ":") - if (str) str = str " || " - str = str "defined(__module__" z[1] "_" z[2] ")" - } - if (m == 0 || length(str) < length(shorteststr)) - shorteststr = str - } - str = shorteststr - if (VALUE == "__undefined__") - curlines[str] = "#undef " SYMBOL "\n" - else if (VALUE == "__novalue__") - curlines[str] = "#define " SYMBOL "\n" - else - curlines[str] = "#define " SYMBOL " " VALUE "\n" - if (!lines[str]) - append = 0 - } - if (append) { - for (str in curlines) - if (curlines[str]) - lines[str] = lines[str] curlines[str] - } else { - if (lines["1"]) - printf "%s", lines["1"] - else if (j > 0) { - ifstr = "#if " - for (str in lines) - if (lines[str] && str != lastelse) { - printf "%s %s\n%s", ifstr, str, lines[str] - ifstr = "#elif " - } - if (lastelse != "") - printf "#else\n%s", lines[lastelse] - printf "#endif\n" - } - split("",lines) - lastelse = "" - for (str in curlines) - if (curlines[str]) { - lines[str] = curlines[str] - if (totalsum == NTOTAL && length(str) > length(lastelse)) { - lastelse = str - } - } - } - } - if (lines["1"]) - printf "%s", lines["1"] - else if (j > 0) { - ifstr = "#if " - for (str in lines) - if (lines[str] && str != lastelse) { - printf "%s %s\n%s", ifstr, str, lines[str] - ifstr = "#elif " - } - if (lastelse != "") - printf "#else\n%s", lines[lastelse] - printf "#endif\n" - } - } -} diff --git a/build/linux-merge-modules.awk b/build/linux-merge-modules.awk deleted file mode 100644 index babc815839..0000000000 --- a/build/linux-merge-modules.awk +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/awk -f -{ - # lines in input look like ARCH TYPE path/to/TYPE/ARCH/modules/foo.ver - ARCH=$1 - ARCHES[ARCH]=1 - TYPE=$2 - TYPES[TYPE]=1 - NTOTAL++ - NARCHES[TYPE]++ - NTYPES[ARCH]++ - FILE=$3 - - # read files that look like pairs of repeating - # #define __ver_foo hexstring - # #define foo _set_ver(foo) - while ((getline < FILE) > 0) { - if ($0 ~ /^[ ]*$/) - continue - if ($1 != "#define" || $2 !~ /^__ver_/) - exit 1 - - # this is a "#define __ver_foo somehex" line - SYMBOL=gensub(/^__ver_/,"","",$2) - VALUE=gensub(/^(smp_|2gig_|smp2gig_)/,"","",$3) - VALUE=gensub(/^(smp|2gig|smp2gig)/,"","",VALUE) - values[SYMBOL,ARCH,TYPE]=VALUE - - # skip the "#define foo _set_ver(foo)" line - if ((getline < FILE) <= 0) - exit 2 - if ($1 != "#define" || $2 != SYMBOL || $3 != "_set_ver(" SYMBOL ")") - exit 3 - } - close(FILE) -} -END { - count=0 - for (key in values) - if (values[key]) { - count++ - split(key,x,SUBSEP) - SYMBOL=x[1] - ARCH=x[2] - TYPE=x[3] - - # (re)initialize a few arrays to have no elements - split("",x) - split("",ntype) - split("",total) - - totalsum=0 - for (arch in ARCHES) - for (type in TYPES) - if (values[SYMBOL,arch,type]) { - VALUE = values[SYMBOL,arch,type] - values[SYMBOL,arch,type] = "" - ntype[VALUE,type] += 1 - total[VALUE] += 1 - if (x[VALUE]) - x[VALUE] = x[VALUE] " " - x[VALUE] = x[VALUE] arch ":" type - } - ifstr="#if " - for (VALUE in x) { - if (total[VALUE] == NTOTAL) { - # there is only one checksum for this symbol - printf "#define __ver_%s\t_ver_str(%s)\n", SYMBOL, VALUE - printf "#define %s _set_ver(%s)\n", SYMBOL, SYMBOL - break - } - - totalsum += total[VALUE] - if (totalsum == NTOTAL && ifstr == "#elif") { - # this is the last unique checksum for this symbol - printf "#else\n#define __ver_%s\t_ver_str(%s)\n", SYMBOL, VALUE - printf "#define %s _set_ver(%s)\n", SYMBOL, SYMBOL - break - } - - # there must be more than one checksum still to - # print for this symbol - str="" - split(x[VALUE],y) - for (type in TYPES) - if (ntype[VALUE,type] == NARCHES[type]) { - if (str) str = str " || " - str = str "defined(__module__" type ")" - for (k in y) { - split(y[k], z, ":") - if (z[2] == type) - delete y[k] - } - } - for (arch in ARCHES) { - narch=0 - for (k in y) { - split(y[k], z, ":") - if (z[1] == arch) - narch++ - } - if (narch == NTYPES[arch]) { - if (str) str = str " || " - str = str "defined(__module__" arch ")" - for (k in y) { - split(y[k], z, ":") - if (z[1] == arch) - delete y[k] - } - } - } - for (k in y) { - split(y[k], z, ":") - if (str) str = str " || " - str = str "defined(__module__" z[1] "_" z[2] ")" - } - printf "%s %s\n#define __ver_%s\t_ver_str(%s)\n", ifstr, str, SYMBOL, VALUE - printf "#define %s _set_ver(%s)\n", SYMBOL, SYMBOL - ifstr="#elif " - } - if (ifstr == "#elif ") - printf "#endif\n" - } - if (!count) - printf "\n" -} diff --git a/build/merge1.sh b/build/merge1.sh deleted file mode 100755 index cbd32279c7..0000000000 --- a/build/merge1.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -e - -CONFLICTS=cvs-merge-conflicts -CVS="cvs -z3" - -if [ -f .mergeinfo ] ; then - echo ".mergeinfo exists - clean up first" - exit -fi - -if [ -f $CONFLICTS ] ; then - echo "$CONFLICTS exists - clean up first" - exit -fi - -if [ $# -lt 2 -o $# -gt 3 ]; then - echo "This is phase 1 of merging branches. Usage: $0 parent child dir" - exit -fi - -parent=$1 -PARENT=`echo $parent | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` -child=$2 -CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` -date=`date +%Y%m%d_%H%M` - -dir=${3:-.} -module=$(basename $(<$dir/CVS/Repository)) - -if [ "$module" = "lustre" ] ; then - echo >&2 "${progname}: You probably want to merge lustre or portals, not the whole tree." - echo >&2 "${progname}: Try using ${0} $parent $child lustre" - exit 1 -fi - - -case $parent in - HEAD) : ;; - b_*|b[1-4]*) : ;; - *) parent="b_$parent" ;; -esac -case $child in - HEAD) : ;; - b_*|b[1-4]*) : ;; - *) child="b_$child" -esac - -if [ "$child" != "HEAD" -a "`cat $dir/CVS/Tag 2> /dev/null`" != "T$child" ]; then - echo "This script must be run within the $child branch" - exit 1 -fi - -TEST_FILE=${TEST_FILE:-ChangeLog} # does this need to be smarter? -[ $dir = "build" ] && TEST_FILE=lbuild -check_tag() { - [ -z "$1" ] && echo "check_tag() missing arg" && exit3 - [ "$1" = "HEAD" ] && return - $CVS log $dir/$TEST_FILE 2> /dev/null | grep -q " $1: " && return - echo "$0: tag $1 not found in $dir/$TEST_FILE" - exit 2 -} - -check_tag $parent -check_tag ${CHILD}_BASE - -cat << EOF > .mergeinfo -parent=$parent -PARENT=$PARENT -child=$child -CHILD=$CHILD -date=$date -dir=$dir -module=$module -CONFLICTS=$CONFLICTS -OPERATION=Merge -OPERWHERE=from -EOF - -echo PARENT: $PARENT parent: $parent CHILD: $CHILD child: $child date: $date - -echo -n "tagging $parent as '${PARENT}_${CHILD}_UPDATE_PARENT_$date' ...." -$CVS rtag -r $parent ${PARENT}_${CHILD}_UPDATE_PARENT_$date $module -echo "done" -echo -n "tagging $child as '${PARENT}_${CHILD}_UPDATE_CHILD_$date' ...." -$CVS rtag -r $child ${PARENT}_${CHILD}_UPDATE_CHILD_$date $module -echo "done" - -# Apply all of the changes to your local tree: -echo "Updating: -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_UPDATE_PARENT_$date ...." -$CVS update -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_UPDATE_PARENT_$date -dP $dir -echo "done" - -echo -n "Recording conflicts in $CONFLICTS ..." -$CVS update | awk '/^C/ { print $2 }' > $CONFLICTS -if [ -s $CONFLICTS ] ; then - echo "Conflicts found, fix before committing." - cat $CONFLICTS -else - echo "No conflicts found" - rm -f $CONFLICTS -fi -echo "done" - -echo "Build, test, commit and then run merge2.sh (no arguments)" diff --git a/build/merge2.sh b/build/merge2.sh deleted file mode 100755 index 0ef27cc45a..0000000000 --- a/build/merge2.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -e - -if [ ! -f .mergeinfo ] ; then - echo ".mergeinfo doesn't exist - exit" - exit -fi - -. .mergeinfo - -if [ "$OPERATION" != "Merge" ] ; then - echo "OPERATION must be Merge - is $OPERATION" - echo "You should probably be running ${OPERATION}2.sh" - exit -fi - -if [ -f $CONFLICTS ] ; then - echo "$CONFLICTS exists - clean up first" - cat $CONFLICTS - exit -fi - -cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1 - -echo -n "Tagging ${PARENT}_${CHILD}_UPDATE_PARENT_$date as ${CHILD}_BASE_$date ..." -cvs rtag -r ${PARENT}_${CHILD}_UPDATE_PARENT_$date ${CHILD}_BASE_$date $module -echo "done" -echo -n "Tagging ${CHILD}_BASE as ${CHILD}_BASE_PREV ...." -cvs rtag -F -r ${CHILD}_BASE ${CHILD}_BASE_PREV $module -echo "done" -echo "${CHILD}_BASE_$date as ${CHILD}_BASE ..." -cvs rtag -F -r ${CHILD}_BASE_$date ${CHILD}_BASE $module - -echo "saving .mergeinfo as .mergeinfo-$date" -mv .mergeinfo .mergeinfo-$date -echo "done" diff --git a/build/osxpack/ReadMe.txt b/build/osxpack/ReadMe.txt deleted file mode 100644 index 06555ba501..0000000000 --- a/build/osxpack/ReadMe.txt +++ /dev/null @@ -1,4 +0,0 @@ -This is release 0.9.2 Beta of the Lustre OS X client. - -This is not a production quality release, so use it with care, and on non-production systems. The installation will overwrite the OS X kernel on your system. Un-installing this package will restore your current kernel. - diff --git a/build/osxpack/Welcome.txt b/build/osxpack/Welcome.txt deleted file mode 100644 index f6fa0ce991..0000000000 --- a/build/osxpack/Welcome.txt +++ /dev/null @@ -1,4 +0,0 @@ -Welcome to the Lustre OS X client installation - -You will be guided through the steps necessary to install this software. During installation you will be required to reboot your Mac, so make sure you have saved all your data and closed applications before continuing the installation. - diff --git a/build/osxpack/packlustre.sh b/build/osxpack/packlustre.sh deleted file mode 100755 index 7392c0eb32..0000000000 --- a/build/osxpack/packlustre.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -# -# This script is used to create package directory tree used -# by PackageMaker in OS X. - -PREFIX=$1 -STAGE=$2 - -RESOURCE=$PWD/build/osxpack -if ! [ -d $RESOURCE ]; then - echo "Your tree seems to be missing $RESOURCE." >&2 -fi - -if [ "x$PREFIX" == "x" ]; then - PREFIX=/home/cfs/package -fi - -if [ "x$STAGE" == "x" ]; then - STAGE=/System/Library/Extensions -fi - -if ! [ -d $STAGE/llite.kext ]; then - echo "Sorry, cannot find stage files for package" - exit 1 -fi - -if ! [ -d $PREFIX ]; then - mkdir -p $PREFIX -fi - -if ! [ -d $PREFIX/Install_resources ]; then - mkdir -p $PREFIX/Install_resources -fi - -if ! [ -d $PREFIX/Package_contents ]; then - mkdir -p $PREFIX/Package_contents -fi - -CONTENTS=$PREFIX/Package_contents - -if ! [ -d $CONTENTS/System/Libraray/Extensions ]; then - mkdir -p $CONTENTS/System/Library/Extensions -fi -# IMPORTANT -# /etc is symlink of /private/etc in OS X, if we -# just use $CONTENTS/etc, it will OVERWRITE /etc in -# installation target, that means all files in /etc -# will be lost, the system will be corrupted. -if ! [ -d $CONTENTS/private/etc ]; then - mkdir -p $CONTENTS/private/etc -fi - -if ! [ -d $CONTENTS/sbin ]; then - mkdir -p $CONTENTS/sbin -fi - -cp -f $RESOURCE/*.txt $PREFIX/Install_resources/ -cp -f $RESOURCE/*flight $PREFIX/Install_resources/ -cp -f $RESOURCE/sysctl.conf $CONTENTS/private/etc -cp -f $RESOURCE/uninstall_lustre $CONTENTS/sbin -cp -f $RESOURCE/unload_lustre $CONTENTS/sbin -cp -rf $STAGE/llite.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/mdc.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/lov.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/osc.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/ptlrpc.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/ptlrpcs.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/obdclass.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/lvfs.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/ksocknal.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/portals.kext $CONTENTS/System/Library/Extensions -cp -rf $STAGE/libcfs.kext $CONTENTS/System/Library/Extensions diff --git a/build/osxpack/postflight b/build/osxpack/postflight deleted file mode 100755 index a4e663300a..0000000000 --- a/build/osxpack/postflight +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -/usr/sbin/nvram boot-args="debug=0xe zsize=256" - -# Delete cache files -if [ -f /System/Library/Extensions.kextcache ]; then - rm -f /System/Library/Extensions.kextcache -fi - -if [ -d /System/Library/Caches/com.apple.kernelcaches ]; then - rm -rf /System/Library/Caches/com.apple.kernelcaches -fi - -touch /System/Library diff --git a/build/osxpack/preflight b/build/osxpack/preflight deleted file mode 100755 index 582aea3449..0000000000 --- a/build/osxpack/preflight +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -date=`date +%Y%m%d_%H%M` - -backpath=/System/LustreBackup -if ! [ -d $backpath ]; then - mkdir -p $backpath -fi - -backdir=${backpath}/SystemBackup - -# If system has been backed up, just exit -if [ -d ${backdir} ]; then - exit 0 -fi - -mkdir $backdir -chmod 700 $backdir - -# create backup directory -mkdir -p $backdir/System/Library/Frameworks -mkdir -p $backdir/System/Library/Extensions -mkdir -p $backdir/usr/lib -mkdir -p $backdir/usr/include -mkdir -p $backdir/private/etc - -# backup the old system -cp /mach_kernel $backdir/ -cp -rf /System/Library/Frameworks/IOKit.framework $backdir/System/Library/Frameworks/ -cp -rf /System/Library/Frameworks/Kernel.framework $backdir/System/Library/Frameworks/ -cp -rf /System/Library/Frameworks/System.framework $backdir/System/Library/Frameworks/ -cp -rf /System/Library/Extensions/System.kext $backdir/System/Library/Extensions/ -cp -rf /usr/include/bsm $backdir/usr/include/bsm -cp -rf /usr/include/default_pager $backdir/usr/include/default_pager -cp -rf /usr/include/dev $backdir/usr/include/dev -cp -rf /usr/include/device $backdir/usr/include/device -cp -rf /usr/include/drivers $backdir/usr/include/drivers -cp -rf /usr/include/hfs $backdir/usr/include/hfs -cp -rf /usr/include/isofs $backdir/usr/include/isofs -cp -rf /usr/include/libkern $backdir/usr/include/libkern -cp -rf /usr/include/mach $backdir/usr/include/mach -cp -rf /usr/include/mach_debug $backdir/usr/include/mach_debug -cp -rf /usr/include/machine $backdir/usr/include/machine -cp -rf /usr/include/miscfs $backdir/usr/include/miscfs -cp -rf /usr/include/net $backdir/usr/include/net -cp -rf /usr/include/netat $backdir/usr/include/netat -cp -rf /usr/include/netinet $backdir/usr/include/netinet -cp -rf /usr/include/netinet6 $backdir/usr/include/netinet6 -cp -rf /usr/include/netkey $backdir/usr/include/netkey -cp -rf /usr/include/nfs $backdir/usr/include/nfs -cp -rf /usr/include/pexpert $backdir/usr/include/pexpert -cp -rf /usr/include/ppc $backdir/usr/include/ppc -cp -rf /usr/include/profile $backdir/usr/include/profile -cp -rf /usr/include/sys $backdir/usr/include/sys -cp -rf /usr/include/ufs $backdir/usr/include/ufs -cp -rf /usr/include/vfs $backdir/usr/include/vfs -cp -f /usr/lib/libIOKit.A.dylib $backdir/usr/lib/libIOKit.A.dylib -cp -f /usr/lib/libIOKit.dylib $backdir/usr/lib/libIOKit.dylib -cp -f /usr/lib/libkmod.a $backdir/usr/lib/libkmod.a -cp -f /usr/lib/libkmodc++.a $backdir/usr/lib/libkmodc++.a -if [ -f /private/etc/sysctl.conf ]; then - cp -f /private/etc/sysctl.conf $backdir/private/etc/sysctl.conf -fi - -# record sysctem backup path of current installation -# echo $backdir >> $backpath/lustre-current -# echo $date > $backdir/install_date diff --git a/build/osxpack/sysctl.conf b/build/osxpack/sysctl.conf deleted file mode 100644 index f8d2cc2fc1..0000000000 --- a/build/osxpack/sysctl.conf +++ /dev/null @@ -1,15 +0,0 @@ -# nmbclusters can not be modified by sysctl(it's read only) -# so we have to change it in kernel patch -## kern.ipc.nmbclusters=32768 - -# Keep a long enough reassembly queue. -net.inet.tcp.reass.maxsegments=4096 - -# max permited sockbuf -kern.ipc.maxsockbuf=8388608 - -# XXX -net.inet.tcp.sendspace=3217968 -net.inet.tcp.recvspace=3217968 - -kern.maxvnodes=65536 diff --git a/build/osxpack/uninstall_lustre b/build/osxpack/uninstall_lustre deleted file mode 100755 index d2624d2d3a..0000000000 --- a/build/osxpack/uninstall_lustre +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/sh -# -# It's the uninstall programe of lustre - -mount | grep lustre > /dev/null -if [ $? -eq 0 ]; then - echo "Please unmount Lustre before uninstall Lustre." - exit 1 -fi - -echo "unloading modules......" -/sbin/unload_lustre 2 > /dev/null - -backdir=/System/LustreBackup/SystemBackup -if ! [ -d $backdir ]; then - echo "No backup directory is found, you have not installed lustre or uninstall failed!" - exit 1 -fi - -# if ! [ -f $backpath/lustre-current ]; then -# echo "No version information of Lustre installation, you have uninstalled or uninstall failed!" -# exit 2 -# fi -# -# get information of the the backup system -# -# backdir=`tail -1 $backpath/lustre-current` -# if ! [ -d $backdir ]; then -# echo "Miss backup directory, uninstall failed!" -# exit 3 -# fi - -# recover the old system -echo "recover orignal kernel......" -cp -f $backdir/mach_kernel /mach_kernel -echo "recover orignal frameworks......" -cp -rf $backdir/System/Library/Frameworks/IOKit.framework /System/Library/Frameworks/ -cp -rf $backdir/System/Library/Frameworks/Kernel.framework /System/Library/Frameworks/ -cp -rf $backdir/System/Library/Frameworks/System.framework /System/Library/Frameworks/ -echo "recover orignal kernel extensions......" -cp -rf $backdir/System/Library/Extensions/System.kext /System/Library/Extensions/ -echo "recover orignal system headers......" -cp -rf $backdir/usr/include/bsm /usr/include/bsm -cp -rf $backdir/usr/include/default_pager /usr/include/default_pager -cp -rf $backdir/usr/include/dev /usr/include/dev -cp -rf $backdir/usr/include/device /usr/include/device -cp -rf $backdir/usr/include/drivers /usr/include/drivers -cp -rf $backdir/usr/include/hfs /usr/include/hfs -cp -rf $backdir/usr/include/isofs /usr/include/isofs -cp -rf $backdir/usr/include/libkern /usr/include/libkern -cp -rf $backdir/usr/include/mach /usr/include/mach -cp -rf $backdir/usr/include/mach_debug /usr/include/mach_debug -cp -rf $backdir/usr/include/machine /usr/include/machine -cp -rf $backdir/usr/include/miscfs /usr/include/miscfs -cp -rf $backdir/usr/include/net /usr/include/net -cp -rf $backdir/usr/include/netat /usr/include/netat -cp -rf $backdir/usr/include/netinet /usr/include/netinet -cp -rf $backdir/usr/include/netinet6 /usr/include/netinet6 -cp -rf $backdir/usr/include/netkey /usr/include/netkey -cp -rf $backdir/usr/include/nfs /usr/include/nfs -cp -rf $backdir/usr/include/pexpert /usr/include/pexpert -cp -rf $backdir/usr/include/ppc /usr/include/ppc -cp -rf $backdir/usr/include/profile /usr/include/profile -cp -rf $backdir/usr/include/sys /usr/include/sys -cp -rf $backdir/usr/include/ufs /usr/include/ufs -cp -rf $backdir/usr/include/vfs /usr/include/vfs -echo "recover orignal system libraries......" -cp -f $backdir/usr/lib/libIOKit.A.dylib /usr/lib/libIOKit.A.dylib -cp -f $backdir/usr/lib/libIOKit.dylib /usr/lib/libIOKit.dylib -cp -f $backdir/usr/lib/libkmod.a /usr/lib/libkmod.a -cp -f $backdir/usr/lib/libkmodc++.a /usr/lib/libkmodc++.a -if [ -f $backdir/private/etc/sysctl.conf ]; then - cp -f $backdir/private/etc/sysctl.conf /private/etc/sysctl.conf -else - rm -f /private/etc/sysctl.conf -fi - -# -# cp $backpath/lustre-current /tmp/lustre-v -# count=`grep "SystemBackup" /tmp/lustre-v|wc -l` -# count=`expr $count - 1` -# if [ $count -gt 0 ]; then -# head -$count /tmp/lustre-v > $backpath/lustre-current -# else -# # The file should be empty now, it's the last uninstall -# rm -f $backpath/lustre-current -# fi -# rm -f /tmp/lustre-v - -# remove unused files -echo "uninstall lustre modules and utilities......" -rm -rf $backdir -rm -f /sbin/lctl -rm -f /sbin/mount_lustre -rm -f /sbin/unload_lustre -rm -rf /System/Library/Extensions/libcfs.kext -rm -rf /System/Library/Extensions/portals.kext -rm -rf /System/Library/Extensions/ksocknal.kext -rm -rf /System/Library/Extensions/lvfs.kext -rm -rf /System/Library/Extensions/obdclass.kext -rm -rf /System/Library/Extensions/ptlrpc.kext -rm -rf /System/Library/Extensions/ptlrpcs.kext -rm -rf /System/Library/Extensions/osc.kext -rm -rf /System/Library/Extensions/lov.kext -rm -rf /System/Library/Extensions/obdecho.kext -rm -rf /System/Library/Extensions/mdc.kext -rm -rf /System/Library/Extensions/llite.kext - -# disable kernel cache by touch /System/Library -touch /System/Library -echo "Uninstall Lustre successfully, please reboot your computer!" diff --git a/build/osxpack/unload_lustre b/build/osxpack/unload_lustre deleted file mode 100755 index 54404c1b5b..0000000000 --- a/build/osxpack/unload_lustre +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -mount | grep lustre > /dev/null -if [ $? -eq 0 ]; then - echo "Please unmount lustre before unload modules." - exit 1 -fi -kextunload /System/Library/Extensions/llite.kext -kextunload /System/Library/Extensions/mdc.kext -kextunload /System/Library/Extensions/lov.kext -kextunload /System/Library/Extensions/osc.kext -kextunload /System/Library/Extensions/ptlrpc.kext -kextunload /System/Library/Extensions/ptlrpcs.kext -kextunload /System/Library/Extensions/obdclass.kext -kextunload /System/Library/Extensions/lvfs.kext -kextunload /System/Library/Extensions/ksocknal.kext -kextunload /System/Library/Extensions/portals.kext -kextunload /System/Library/Extensions/libcfs.kext diff --git a/build/replace2.sh b/build/replace2.sh deleted file mode 100755 index e0f7b2b05d..0000000000 --- a/build/replace2.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -e - -CVS=cvs - -if [ ! -f .mergeinfo ] ; then - echo ".mergeinfo doesn't exist - exit" - exit -fi - -. .mergeinfo - -if [ "$OPERATION" != "Replace" ] ; then - echo "OPERATION must be Replace - is $OPERATION" - echo "You should probably be running ${OPERATION}2.sh" - exit -fi - -if [ -f "$CONFLICTS" ] ; then - echo "$CONFLICTS exists - clean up first" - cat $CONFLICTS - exit -fi - -cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1 - -# Tag parent -echo -n "Tagging as ${CHILD}_REPLACED_${PARENT}_$date ..." -$CVS rtag -r $parent ${CHILD}_REPLACED_${PARENT}_$date $module -echo "done" -# In case someone tries to re-land later -echo -n "Tagging as ${CHILD}_BASE ..." -$CVS rtag -F -r $parent ${CHILD}_BASE $module - -echo "saving .mergeinfo as .mergeinfo-$date" -mv .mergeinfo .mergeinfo-$date -echo "done" diff --git a/build/sles8-post.sh b/build/sles8-post.sh deleted file mode 100644 index d8a2e6bc98..0000000000 --- a/build/sles8-post.sh +++ /dev/null @@ -1,49 +0,0 @@ -# Replace fake symlinks with the real ones -relink vmlinuz-%ver_str /boot/vmlinuz -relink initrd-%ver_str /boot/initrd - -if [ -e /etc/sysconfig/kernel ]; then - update_rcfile_setting /etc/sysconfig/kernel INITRD_MODULES 2>&1 -elif [ -e /etc/rc.config ]; then - update_rcfile_setting /etc/rc.config INITRD_MODULES 2>&1 -fi - -# If any trigger scripts have created additional modules, we need to -# run depmod. -run_depmod= -if [ -x /sbin/depmod ]; then - for module in $(find /lib/modules/%ver_str \ - /lib/modules/%{version}-override-%{cfg_name} \ - -type f) ; do - if [ $module -nt /lib/modules/%ver_str/modules.dep ]; then - run_depmod=1 - break - fi - done -fi -if [ -n "$run_depmod" ]; then - depmod -ae %ver_str -fi - -if [ -f /etc/fstab -a -x /sbin/mkinitrd ]; then - cd /boot && \ - /sbin/mkinitrd -k "vmlinuz-%ver_str" -i "initrd-%ver_str" -elif [ -f /etc/fstab -a -x /sbin/mk_initrd ]; then - cd /boot && \ - /sbin/mk_initrd -k "vmlinuz-%ver_str" -i "initrd-%ver_str" -else - echo "please run mkinitrd as soon as your system is complete" -fi - -# Only call new-kernel-pkg during package updates: Otherwise we might -# call this during an initial installation, with a half-initialized -# boot loader. ($1 = number of instances of this package currently -# installed.) -if [ "$1" -gt 1 ]; then - # Notify boot loader that a new kernel image has been installed. - if [ -x /sbin/new-kernel-pkg ]; then - /sbin/new-kernel-pkg %ver_str - elif [ -e /etc/lilo.conf -a -x /sbin/lilo ]; then - /sbin/lilo - fi -fi diff --git a/build/sles8-postun.sh b/build/sles8-postun.sh deleted file mode 100644 index fe1ded5899..0000000000 --- a/build/sles8-postun.sh +++ /dev/null @@ -1,22 +0,0 @@ -rm -f /boot/initrd-%ver_str # created in %post -- clean up. - -if [ "$(readlink /boot/vmlinuz)" = "vmlinuz-%ver_str" -o \ - "$(readlink /boot/initrd)" = "initrd-%ver_str" ]; then - # This may be the last kernel RPM on the system, or it may - # be an update. In both of those cases the symlinks will - # eventually be correct. On the other hand, if this kernel - # is removed and other kernel rpms remain installed, - # find the most recent of the remaining kernels, and make - # the symlinks point to it. This makes sure that the boot - # manager will always have a kernel to boot in its default - # configuration. - for vmlinuz in $(cd /boot ; ls -dt vmlinuz-*); do - version="${vmlinuz#vmlinuz-}" - initrd="initrd-$version" - if [ -f "/boot/$vmlinuz" -a -f "/boot/$initrd" ]; then - relink "$vmlinuz" /boot/vmlinuz - relink "$initrd" /boot/initrd - break - fi - done -fi diff --git a/build/sles8-pre.sh b/build/sles8-pre.sh deleted file mode 100644 index a542caf5a9..0000000000 --- a/build/sles8-pre.sh +++ /dev/null @@ -1,2 +0,0 @@ -rm -f /boot/vmlinuz.suse -rm -f /boot/initrd.suse diff --git a/build/sles8-update_INITRD_MODULES.sh b/build/sles8-update_INITRD_MODULES.sh deleted file mode 100644 index 38d5e3d5fb..0000000000 --- a/build/sles8-update_INITRD_MODULES.sh +++ /dev/null @@ -1,56 +0,0 @@ -# Check if $1 is equal to any argument in $1 .. $*. -# -contains() { - local x=$1 - shift - - case " $@ " in - *" $x "*) return 0 ;; - *) return 1 ;; - esac -} - -# Check the old value of INITRD_MODULES: -# - Remove modules that no longer exist. -# - Add modules that were built into the kernel before. -# -update_INITRD_MODULES() { - # MD_MODS is the list of modules that require md.o. - local MD_MODS="linear multipath raid0 raid1 raid5" - - # NON_SCSI is a whitelist of modules that are no scsi drivers. Any - # module not listed here is assumed to be a scsi driver, and the - # low-level scsi modules are added to INITRD_MODULES. - local NON_SCSI="jbd ext3 jfs xfs reiserfs $MD_MODS md" - - local result maybe_scsi need_md have_md have_scsi have_sd m - for m in "$@" ; do - m="${m%.o}" ; m="${m%.ko}" - - contains "$m" $NON_SCSI || maybe_scsi=1 - contains "$m" $MD_MODS && need_md=1 - [ "$m" == md ] && have_md=1 - if contains "$m" scsi_mod sd_mod ; then - eval have_${m%_mod}=1 - continue - fi - if contains "$m" xfs_dmapi xfs_support ; then - echo "Module $m no longer exists, and was removed from" \ - "INITRD_MODULES." >&2 - continue - fi - - result[${#result[@]}]="$m" - done - if [ -n "$maybe_scsi" -o -n "$have_scsi" -o -n "$have_sd" ]; then - [ -z "$have_scsi" -o -z "$have_sd" ] \ - && echo "Adding SCSI disk modules to INITRD_MODULES" >&2 - result=(scsi_mod sd_mod ${result[@]}) - fi - if [ -n "$need_md" -a -z "$have_md" ]; then - echo "Adding RAID support module to INITRD_MODULES" >&2 - result=(md ${result[@]}) - fi - - echo ${result[@]} -} diff --git a/build/sles8-update_rcfile_setting.sh b/build/sles8-update_rcfile_setting.sh deleted file mode 100644 index 6165cc7da8..0000000000 --- a/build/sles8-update_rcfile_setting.sh +++ /dev/null @@ -1,35 +0,0 @@ -# Update the variable $var in $rcfile: The function update_$VAR must -# exist. It is called with the old value of $var, and must return the -# new value. -# -update_rcfile_setting() { - local rcfile=$1 var=$2 - - # The characters $, `, ", and \ have special meaning inside double - # quoted shell variables. The characters " and \ have special meaning - # inside awk double-quoted variables. - - local old=$(source "$rcfile" ; - eval echo \$$var \ - | sed -e 's/\([$`"\\]\)/\\\1/g') - local new=$(eval update_$var "$old" \ - | sed -e 's/\([$`"\\]\)/\\\1/g' \ - -e 's/\(["\\]\)/\\\1/g') - local tmp=$(mktemp /tmp/${rcfile##/*}.XXXXXX) - - # This script breaks for multi-line varables -- I don't think - # we need to handle this special case. - awk ' - function replace() { - if (!done) - print "'"$var"'=\"'"$new"'\"" - done=1 - } - - /^'"$var"'=/ { replace() ; next } - { print } - ' < $rcfile > $tmp && - cat $tmp > $rcfile - - rm -f $tmp -} diff --git a/build/suse-functions.sh b/build/suse-functions.sh deleted file mode 100644 index a7e421d2c5..0000000000 --- a/build/suse-functions.sh +++ /dev/null @@ -1,22 +0,0 @@ -# Readlink is not present on some older distributions: emulate it. -readlink() { - local path=$1 ll - - if [ -L "$path" ]; then - ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" && - echo "${ll/* -> }" - else - return 1 - fi -} -relink() { - if [ -h "$2" ]; then - local old=$(readlink "$2") - [ "$old" = "$1" ] && return 0 - echo "Changing symlink $2 from $old to $1" - elif [ -e "$2" ]; then - echo "Replacing file $2 with symlink to $1" - fi - rm -f "$2" \ - && ln -s "$1" "$2" -} diff --git a/build/suse-trigger-script.sh.in b/build/suse-trigger-script.sh.in deleted file mode 100644 index 0ead9e86f2..0000000000 --- a/build/suse-trigger-script.sh.in +++ /dev/null @@ -1,9 +0,0 @@ -old_shopt=$(shopt -p nullglob || :) -shopt -s nullglob -for script in /lib/modules/scripts/* ; do - if [ -f "$script" -a -x "$script" ] \ - && ! "$script" --@when@ %ver_str $1 ; then - echo "$script failed." - fi -done -eval $old_shopt diff --git a/build/update_oldconfig b/build/update_oldconfig deleted file mode 100755 index 6d4d870450..0000000000 --- a/build/update_oldconfig +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/expect -f - -#enables some diagnostic output -exp_internal 1 - -# log all interaction to a file to diagnose failures -log_file -a [lindex $argv 0] - -# and not stddout -log_user 0 - -set spawnid [spawn make oldconfig] - -#match_max 200 - -# need to allow for the config tool to be built initially -set timeout 30 - -expect { - timeout { - puts "timeout in update_oldconfig waiting for a prompt we recognize" - exit 1 - } - -re "\n *(\[^\n]* \\\[N\/y\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) n" - send "n\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[N\/m\/y\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) m" - send "m\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[N\/y\/m\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) m" - send "m\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[N\/m\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) m" - send "m\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[Y\/n\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) y" - send "y\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[\[0-9]*] \\(NEW\\)) " { - puts "$expect_out(1,string) <cr>" - send "\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[M\/n\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) m" - send "m\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[M\/n\/y\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) m" - send "m\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[Y\/n\/m\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) m" - send "m\r" - exp_continue - } - -re "\n *(\[^\n]* \\\[Y\/\\?] \\(NEW\\)) " { - puts "$expect_out(1,string) y" - send "y\r" - exp_continue - } -} diff --git a/ldiskfs/kernel_patches/patches/export-ext3-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/export-ext3-2.6-rhel4.patch deleted file mode 100644 index 9f443b49b8..0000000000 --- a/ldiskfs/kernel_patches/patches/export-ext3-2.6-rhel4.patch +++ /dev/null @@ -1,35 +0,0 @@ -Index: linux-2.6.9-42.0.10.EL_lustre.1.4.10/fs/ext3/super.c -=================================================================== ---- linux-2.6.9-42.0.10.EL_lustre.1.4.10.orig/fs/ext3/super.c 2007-05-16 08:46:24.000000000 +0200 -+++ linux-2.6.9-42.0.10.EL_lustre.1.4.10/fs/ext3/super.c 2007-05-16 08:48:58.000000000 +0200 -@@ -123,6 +123,8 @@ void ext3_journal_abort_handle(const cha - journal_abort_handle(handle); - } - -+EXPORT_SYMBOL(ext3_journal_abort_handle); -+ - /* Deal with the reporting of failure conditions on a filesystem such as - * inconsistencies detected or read IO failures. - * -@@ -2064,6 +2066,8 @@ int ext3_force_commit(struct super_block - return ret; - } - -+EXPORT_SYMBOL(ext3_force_commit); -+ - /* - * Ext3 always journals updates to the superblock itself, so we don't - * have to propagate any other updates to the superblock on disk at this -@@ -2586,6 +2590,12 @@ int ext3_map_inode_page(struct inode *in - unsigned long *blocks, int *created, int create); - EXPORT_SYMBOL(ext3_map_inode_page); - -+EXPORT_SYMBOL(ext3_xattr_get); -+EXPORT_SYMBOL(ext3_xattr_set_handle); -+EXPORT_SYMBOL(ext3_bread); -+EXPORT_SYMBOL(ext3_journal_start_sb); -+EXPORT_SYMBOL(__ext3_journal_stop); -+ - MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); - MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); - MODULE_LICENSE("GPL"); diff --git a/ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch b/ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch deleted file mode 100644 index c10431bf43..0000000000 --- a/ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch +++ /dev/null @@ -1,35 +0,0 @@ -Index: linux-2.6.5-7.283_lustre-1.4.10.1/fs/ext3/super.c -=================================================================== ---- linux-2.6.5-7.283_lustre-1.4.10.1.orig/fs/ext3/super.c 2007-05-30 08:48:29.000000000 +0200 -+++ linux-2.6.5-7.283_lustre-1.4.10.1/fs/ext3/super.c 2007-05-30 08:48:37.000000000 +0200 -@@ -116,6 +116,8 @@ void ext3_journal_abort_handle(const cha - handle->h_err = err; - } - -+EXPORT_SYMBOL(ext3_journal_abort_handle); -+ - static char error_buf[1024]; - - /* Deal with the reporting of failure conditions on a filesystem such as -@@ -1895,6 +1897,8 @@ int ext3_force_commit(struct super_block - return ret; - } - -+EXPORT_SYMBOL(ext3_force_commit); -+ - /* - * Ext3 always journals updates to the superblock itself, so we don't - * have to propagate any other updates to the superblock on disk at this -@@ -2334,6 +2338,12 @@ int ext3_map_inode_page(struct inode *in - unsigned long *blocks, int *created, int create); - EXPORT_SYMBOL(ext3_map_inode_page); - -+EXPORT_SYMBOL(ext3_xattr_get); -+EXPORT_SYMBOL(ext3_xattr_set_handle); -+EXPORT_SYMBOL(ext3_bread); -+EXPORT_SYMBOL(ext3_journal_start); -+EXPORT_SYMBOL(__ext3_journal_stop); -+ - MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); - MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); - MODULE_LICENSE("GPL"); diff --git a/ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch b/ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch deleted file mode 100644 index 294a9cdffb..0000000000 --- a/ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: linux-2.6.5-sles9/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.5-sles9.orig/include/linux/ext3_fs_sb.h 2004-11-03 08:36:51.000000000 +0300 -+++ linux-2.6.5-sles9/include/linux/ext3_fs_sb.h 2004-11-09 02:20:51.598024096 +0300 -@@ -19,9 +19,12 @@ - #ifdef __KERNEL__ - #include <linux/timer.h> - #include <linux/wait.h> -+#ifndef EXT_INCLUDE -+#define EXT_INCLUDE - #include <linux/blockgroup_lock.h> - #include <linux/percpu_counter.h> - #endif -+#endif - #include <linux/rbtree.h> - - /* diff --git a/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.5.patch b/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.5.patch deleted file mode 100644 index e54774ff70..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.5.patch +++ /dev/null @@ -1,113 +0,0 @@ -Index: linux-2.6.5-7.201-full/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.5-7.201-full.orig/include/linux/ext3_fs.h 2006-08-09 17:59:34.000000000 +0400 -+++ linux-2.6.5-7.201-full/include/linux/ext3_fs.h 2006-08-22 12:35:55.000000000 +0400 -@@ -793,6 +793,7 @@ extern void ext3_put_super (struct super - extern void ext3_write_super (struct super_block *); - extern void ext3_write_super_lockfs (struct super_block *); - extern void ext3_unlockfs (struct super_block *); -+extern void ext3_commit_super (struct super_block *, struct ext3_super_block *, int); - extern int ext3_remount (struct super_block *, int *, char *); - extern int ext3_statfs (struct super_block *, struct kstatfs *); - -Index: linux-2.6.5-7.201-full/fs/ext3/super.c -=================================================================== ---- linux-2.6.5-7.201-full.orig/fs/ext3/super.c 2006-08-09 17:59:37.000000000 +0400 -+++ linux-2.6.5-7.201-full/fs/ext3/super.c 2006-08-09 17:59:37.000000000 +0400 -@@ -39,7 +39,7 @@ - static int ext3_load_journal(struct super_block *, struct ext3_super_block *); - static int ext3_create_journal(struct super_block *, struct ext3_super_block *, - int); --static void ext3_commit_super (struct super_block * sb, -+void ext3_commit_super (struct super_block * sb, - struct ext3_super_block * es, - int sync); - static void ext3_mark_recovery_complete(struct super_block * sb, -@@ -1781,7 +1781,7 @@ static int ext3_create_journal(struct su - return 0; - } - --static void ext3_commit_super (struct super_block * sb, -+void ext3_commit_super (struct super_block * sb, - struct ext3_super_block * es, - int sync) - { -Index: linux-2.6.5-7.201-full/fs/ext3/namei.c -=================================================================== ---- linux-2.6.5-7.201-full.orig/fs/ext3/namei.c 2006-08-09 17:59:37.000000000 +0400 -+++ linux-2.6.5-7.201-full/fs/ext3/namei.c 2006-08-09 17:59:37.000000000 +0400 -@@ -1598,7 +1598,7 @@ static int ext3_delete_entry (handle_t * - struct buffer_head * bh) - { - struct ext3_dir_entry_2 * de, * pde; -- int i; -+ int i, err; - - i = 0; - pde = NULL; -@@ -1608,7 +1608,9 @@ static int ext3_delete_entry (handle_t * - return -EIO; - if (de == de_del) { - BUFFER_TRACE(bh, "get_write_access"); -- ext3_journal_get_write_access(handle, bh); -+ err = ext3_journal_get_write_access(handle, bh); -+ if (err) -+ return err; - if (pde) - pde->rec_len = - cpu_to_le16(le16_to_cpu(pde->rec_len) + -Index: linux-2.6.5-7.201-full/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.5-7.201-full.orig/fs/ext3/xattr.c 2006-07-14 01:53:23.000000000 +0400 -+++ linux-2.6.5-7.201-full/fs/ext3/xattr.c 2006-08-09 17:59:37.000000000 +0400 -@@ -107,7 +107,7 @@ ext3_xattr_register(int name_index, stru - { - int error = -EINVAL; - -- if (name_index > 0 && name_index <= EXT3_XATTR_INDEX_MAX) { -+ if (name_index > 0 && name_index < EXT3_XATTR_INDEX_MAX) { - write_lock(&ext3_handler_lock); - if (!ext3_xattr_handlers[name_index-1]) { - ext3_xattr_handlers[name_index-1] = handler; -Index: linux-2.6.5-7.201-full/fs/ext3/inode.c -=================================================================== ---- linux-2.6.5-7.201-full.orig/fs/ext3/inode.c 2006-07-14 01:53:22.000000000 +0400 -+++ linux-2.6.5-7.201-full/fs/ext3/inode.c 2006-08-22 12:35:28.000000000 +0400 -@@ -1517,9 +1517,14 @@ out_stop: - if (end > inode->i_size) { - ei->i_disksize = end; - i_size_write(inode, end); -- err = ext3_mark_inode_dirty(handle, inode); -- if (!ret) -- ret = err; -+ /* -+ * We're going to return a positive `ret' -+ * here due to non-zero-length I/O, so there's -+ * no way of reporting error returns from -+ * ext3_mark_inode_dirty() to userspace. So -+ * ignore it. -+ */ -+ ext3_mark_inode_dirty(handle, inode); - } - } - err = ext3_journal_stop(handle); -@@ -1811,8 +1816,18 @@ ext3_clear_blocks(handle_t *handle, stru - ext3_mark_inode_dirty(handle, inode); - ext3_journal_test_restart(handle, inode); - if (bh) { -+ int err; - BUFFER_TRACE(bh, "retaking write access"); -- ext3_journal_get_write_access(handle, bh); -+ err = ext3_journal_get_write_access(handle, bh); -+ if (err) { -+ struct super_block *sb = inode->i_sb; -+ struct ext3_super_block *es = EXT3_SB(sb)->s_es; -+ printk (KERN_CRIT"EXT3-fs: can't continue truncate\n"); -+ EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS; -+ es->s_state |= cpu_to_le16(EXT3_ERROR_FS); -+ ext3_commit_super(sb, es, 1); -+ return; -+ } - } - } - diff --git a/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.9.patch b/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.9.patch deleted file mode 100644 index f6904f29b5..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.9.patch +++ /dev/null @@ -1,113 +0,0 @@ -Index: linux-2.6.9-full/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.9-full.orig/include/linux/ext3_fs.h 2006-08-09 17:56:39.000000000 +0400 -+++ linux-2.6.9-full/include/linux/ext3_fs.h 2006-08-22 12:36:22.000000000 +0400 -@@ -826,6 +826,7 @@ extern void ext3_put_super (struct super - extern void ext3_write_super (struct super_block *); - extern void ext3_write_super_lockfs (struct super_block *); - extern void ext3_unlockfs (struct super_block *); -+extern void ext3_commit_super (struct super_block *, struct ext3_super_block *, int); - extern int ext3_remount (struct super_block *, int *, char *); - extern int ext3_statfs (struct super_block *, struct kstatfs *); - -Index: linux-2.6.9-full/fs/ext3/super.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/super.c 2006-08-09 17:56:40.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/super.c 2006-08-09 17:56:40.000000000 +0400 -@@ -43,7 +43,7 @@ static int ext3_load_journal(struct supe - unsigned long journal_devnum); - static int ext3_create_journal(struct super_block *, struct ext3_super_block *, - int); --static void ext3_commit_super (struct super_block * sb, -+void ext3_commit_super (struct super_block * sb, - struct ext3_super_block * es, - int sync); - static void ext3_mark_recovery_complete(struct super_block * sb, -@@ -1991,7 +1991,7 @@ static int ext3_create_journal(struct su - return 0; - } - --static void ext3_commit_super (struct super_block * sb, -+void ext3_commit_super (struct super_block * sb, - struct ext3_super_block * es, - int sync) - { -Index: linux-2.6.9-full/fs/ext3/namei.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/namei.c 2006-08-09 17:56:40.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/namei.c 2006-08-09 17:56:40.000000000 +0400 -@@ -1599,7 +1599,7 @@ static int ext3_delete_entry (handle_t * - struct buffer_head * bh) - { - struct ext3_dir_entry_2 * de, * pde; -- int i; -+ int i, err; - - i = 0; - pde = NULL; -@@ -1609,7 +1609,9 @@ static int ext3_delete_entry (handle_t * - return -EIO; - if (de == de_del) { - BUFFER_TRACE(bh, "get_write_access"); -- ext3_journal_get_write_access(handle, bh); -+ err = ext3_journal_get_write_access(handle, bh); -+ if (err) -+ return err; - if (pde) - pde->rec_len = - cpu_to_le16(le16_to_cpu(pde->rec_len) + -Index: linux-2.6.9-full/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/xattr.c 2006-06-01 14:58:48.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/xattr.c 2006-08-09 17:56:40.000000000 +0400 -@@ -132,7 +132,7 @@ ext3_xattr_handler(int name_index) - { - struct xattr_handler *handler = NULL; - -- if (name_index > 0 && name_index <= EXT3_XATTR_INDEX_MAX) -+ if (name_index > 0 && name_index < EXT3_XATTR_INDEX_MAX) - handler = ext3_xattr_handler_map[name_index]; - return handler; - } -Index: linux-2.6.9-full/fs/ext3/inode.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/inode.c 2006-06-02 23:37:38.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/inode.c 2006-08-22 12:34:28.000000000 +0400 -@@ -1513,9 +1513,14 @@ out_stop: - if (end > inode->i_size) { - ei->i_disksize = end; - i_size_write(inode, end); -- err = ext3_mark_inode_dirty(handle, inode); -- if (!ret) -- ret = err; -+ /* -+ * We're going to return a positive `ret' -+ * here due to non-zero-length I/O, so there's -+ * no way of reporting error returns from -+ * ext3_mark_inode_dirty() to userspace. So -+ * ignore it. -+ */ -+ ext3_mark_inode_dirty(handle, inode); - } - } - err = ext3_journal_stop(handle); -@@ -1807,8 +1812,18 @@ ext3_clear_blocks(handle_t *handle, stru - ext3_mark_inode_dirty(handle, inode); - ext3_journal_test_restart(handle, inode); - if (bh) { -+ int err; - BUFFER_TRACE(bh, "retaking write access"); -- ext3_journal_get_write_access(handle, bh); -+ err = ext3_journal_get_write_access(handle, bh); -+ if (err) { -+ struct super_block *sb = inode->i_sb; -+ struct ext3_super_block *es = EXT3_SB(sb)->s_es; -+ printk (KERN_CRIT"EXT3-fs: can't continue truncate\n"); -+ EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS; -+ es->s_state |= cpu_to_le16(EXT3_ERROR_FS); -+ ext3_commit_super(sb, es, 1); -+ return; -+ } - } - } - diff --git a/ldiskfs/kernel_patches/patches/ext3-disable-write-bar-by-default-2.6-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-disable-write-bar-by-default-2.6-sles10.patch deleted file mode 100644 index 9b8d33152e..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-disable-write-bar-by-default-2.6-sles10.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - fs/ext3/super.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- linux-2.6.16.21-0.8.orig/fs/ext3/super.c -+++ linux-2.6.16.21-0.8/fs/ext3/super.c -@@ -1425,7 +1425,7 @@ static int ext3_fill_super (struct super - sbi->s_resgid = le16_to_cpu(es->s_def_resgid); - - /* enable barriers by default */ -- set_opt(sbi->s_mount_opt, BARRIER); -+ /* set_opt(sbi->s_mount_opt, BARRIER); */ - set_opt(sbi->s_mount_opt, RESERVATION); - - if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum, diff --git a/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch deleted file mode 100644 index 89cc1b5d4b..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch +++ /dev/null @@ -1,840 +0,0 @@ -Index: linux-stage/fs/ext3/ialloc.c -=================================================================== ---- linux-stage.orig/fs/ext3/ialloc.c 2005-10-04 16:53:24.000000000 -0600 -+++ linux-stage/fs/ext3/ialloc.c 2005-10-04 17:07:25.000000000 -0600 -@@ -629,6 +629,9 @@ - spin_unlock(&sbi->s_next_gen_lock); - - ei->i_state = EXT3_STATE_NEW; -+ ei->i_extra_isize = -+ (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? -+ sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; - - ret = inode; - if(DQUOT_ALLOC_INODE(inode)) { -Index: linux-stage/fs/ext3/inode.c -=================================================================== ---- linux-stage.orig/fs/ext3/inode.c 2005-10-04 17:00:22.000000000 -0600 -+++ linux-stage/fs/ext3/inode.c 2005-10-04 17:07:25.000000000 -0600 -@@ -2274,7 +2274,7 @@ - * trying to determine the inode's location on-disk and no read need be - * performed. - */ --static int ext3_get_inode_loc(struct inode *inode, -+int ext3_get_inode_loc(struct inode *inode, - struct ext3_iloc *iloc, int in_mem) - { - unsigned long block; -@@ -2484,6 +2484,11 @@ void ext3_read_inode(struct inode * inod - ei->i_data[block] = raw_inode->i_block[block]; - INIT_LIST_HEAD(&ei->i_orphan); - -+ if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) -+ ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize); -+ else -+ ei->i_extra_isize = 0; -+ - if (S_ISREG(inode->i_mode)) { - inode->i_op = &ext3_file_inode_operations; - inode->i_fop = &ext3_file_operations; -@@ -2619,6 +2624,9 @@ static int ext3_do_update_inode(handle_t - } else for (block = 0; block < EXT3_N_BLOCKS; block++) - raw_inode->i_block[block] = ei->i_data[block]; - -+ if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) -+ raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize); -+ - BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata"); - rc = ext3_journal_dirty_metadata(handle, bh); - if (!err) -@@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl - { - int err = 0; - if (handle) { -- err = ext3_get_inode_loc(inode, iloc, 1); -+ err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state & -+ EXT3_STATE_NEW); - if (!err) { - BUFFER_TRACE(iloc->bh, "get_write_access"); - err = ext3_journal_get_write_access(handle, iloc->bh); -Index: linux-stage/fs/ext3/xattr.c -=================================================================== ---- linux-stage.orig/fs/ext3/xattr.c 2005-10-04 16:50:11.000000000 -0600 -+++ linux-stage/fs/ext3/xattr.c 2005-10-04 17:19:43.000000000 -0600 -@@ -149,17 +149,12 @@ - } - - /* -- * ext3_xattr_get() -- * -- * Copy an extended attribute into the buffer -- * provided, or compute the buffer size required. -- * Buffer is NULL to compute the size of the buffer required. -+ * ext3_xattr_block_get() - * -- * Returns a negative error number on failure, or the number of bytes -- * used / required on success. -+ * routine looks for attribute in EA block and returns it's value and size - */ - int --ext3_xattr_get(struct inode *inode, int name_index, const char *name, -+ext3_xattr_block_get(struct inode *inode, int name_index, const char *name, - void *buffer, size_t buffer_size) - { - struct buffer_head *bh = NULL; -@@ -173,7 +168,6 @@ - - if (name == NULL) - return -EINVAL; -- down_read(&EXT3_I(inode)->xattr_sem); - error = -ENODATA; - if (!EXT3_I(inode)->i_file_acl) - goto cleanup; -@@ -246,15 +240,87 @@ - - cleanup: - brelse(bh); -- up_read(&EXT3_I(inode)->xattr_sem); - - return error; - } - - /* -- * ext3_xattr_list() -+ * ext3_xattr_ibody_get() - * -- * Copy a list of attribute names into the buffer -+ * routine looks for attribute in inode body and returns it's value and size -+ */ -+int -+ext3_xattr_ibody_get(struct inode *inode, int name_index, const char *name, -+ void *buffer, size_t buffer_size) -+{ -+ int size, name_len = strlen(name), storage_size; -+ struct ext3_xattr_entry *last; -+ struct ext3_inode *raw_inode; -+ struct ext3_iloc iloc; -+ char *start, *end; -+ int ret = -ENOENT; -+ -+ if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) -+ return -ENOENT; -+ -+ ret = ext3_get_inode_loc(inode, &iloc, 0); -+ if (ret) -+ return ret; -+ raw_inode = ext3_raw_inode(&iloc); -+ -+ storage_size = EXT3_SB(inode->i_sb)->s_inode_size - -+ EXT3_GOOD_OLD_INODE_SIZE - -+ EXT3_I(inode)->i_extra_isize - -+ sizeof(__u32); -+ start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE + -+ EXT3_I(inode)->i_extra_isize; -+ if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) { -+ brelse(iloc.bh); -+ return -ENOENT; -+ } -+ start += sizeof(__u32); -+ end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size; -+ -+ last = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(last)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last); -+ if (le32_to_cpu(last->e_value_size) > storage_size || -+ (char *) next >= end) { -+ ext3_error(inode->i_sb, "ext3_xattr_ibody_get", -+ "inode %ld", inode->i_ino); -+ brelse(iloc.bh); -+ return -EIO; -+ } -+ if (name_index == last->e_name_index && -+ name_len == last->e_name_len && -+ !memcmp(name, last->e_name, name_len)) -+ goto found; -+ last = next; -+ } -+ -+ /* can't find EA */ -+ brelse(iloc.bh); -+ return -ENOENT; -+ -+found: -+ size = le32_to_cpu(last->e_value_size); -+ if (buffer) { -+ ret = -ERANGE; -+ if (buffer_size >= size) { -+ memcpy(buffer, start + le16_to_cpu(last->e_value_offs), -+ size); -+ ret = size; -+ } -+ } else -+ ret = size; -+ brelse(iloc.bh); -+ return ret; -+} -+ -+/* -+ * ext3_xattr_get() -+ * -+ * Copy an extended attribute into the buffer - * provided, or compute the buffer size required. - * Buffer is NULL to compute the size of the buffer required. - * -@@ -262,7 +328,31 @@ - * used / required on success. - */ - int --ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size) -+ext3_xattr_get(struct inode *inode, int name_index, const char *name, -+ void *buffer, size_t buffer_size) -+{ -+ int err; -+ -+ down_read(&EXT3_I(inode)->xattr_sem); -+ -+ /* try to find attribute in inode body */ -+ err = ext3_xattr_ibody_get(inode, name_index, name, -+ buffer, buffer_size); -+ if (err < 0) -+ /* search was unsuccessful, try to find EA in dedicated block */ -+ err = ext3_xattr_block_get(inode, name_index, name, -+ buffer, buffer_size); -+ up_read(&EXT3_I(inode)->xattr_sem); -+ -+ return err; -+} -+ -+/* ext3_xattr_ibody_list() -+ * -+ * generate list of attributes stored in EA block -+ */ -+int -+ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) - { - struct buffer_head *bh = NULL; - struct ext3_xattr_entry *entry; -@@ -273,7 +363,6 @@ - ea_idebug(inode, "buffer=%p, buffer_size=%ld", - buffer, (long)buffer_size); - -- down_read(&EXT3_I(inode)->xattr_sem); - error = 0; - if (!EXT3_I(inode)->i_file_acl) - goto cleanup; -@@ -330,11 +419,149 @@ - - cleanup: - brelse(bh); -- up_read(&EXT3_I(inode)->xattr_sem); - - return error; - } - -+/* ext3_xattr_ibody_list() -+ * -+ * generate list of attributes stored in inode body -+ */ -+int -+ext3_xattr_ibody_list(struct inode *inode, char *buffer, size_t buffer_size) -+{ -+ struct ext3_xattr_entry *last; -+ struct ext3_inode *raw_inode; -+ char *start, *end, *buf; -+ struct ext3_iloc iloc; -+ int storage_size; -+ size_t rest = buffer_size; -+ int ret; -+ int size = 0; -+ -+ if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) -+ return 0; -+ -+ ret = ext3_get_inode_loc(inode, &iloc, 0); -+ if (ret) -+ return ret; -+ raw_inode = ext3_raw_inode(&iloc); -+ -+ storage_size = EXT3_SB(inode->i_sb)->s_inode_size - -+ EXT3_GOOD_OLD_INODE_SIZE - -+ EXT3_I(inode)->i_extra_isize - -+ sizeof(__u32); -+ start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE + -+ EXT3_I(inode)->i_extra_isize; -+ if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) { -+ brelse(iloc.bh); -+ return 0; -+ } -+ start += sizeof(__u32); -+ end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size; -+ -+ last = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(last)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last); -+ struct xattr_handler *handler; -+ if (le32_to_cpu(last->e_value_size) > storage_size || -+ (char *) next >= end) { -+ ext3_error(inode->i_sb, "ext3_xattr_ibody_list", -+ "inode %ld", inode->i_ino); -+ brelse(iloc.bh); -+ return -EIO; -+ } -+ handler = ext3_xattr_handler(last->e_name_index); -+ if (handler) -+ size += handler->list(inode, NULL, 0, last->e_name, -+ last->e_name_len); -+ last = next; -+ } -+ -+ if (!buffer) { -+ ret = size; -+ goto cleanup; -+ } else { -+ ret = -ERANGE; -+ if (size > buffer_size) -+ goto cleanup; -+ } -+ -+ last = (struct ext3_xattr_entry *) start; -+ buf = buffer; -+ while (!IS_LAST_ENTRY(last)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last); -+ struct xattr_handler *handler; -+ handler = ext3_xattr_handler(last->e_name_index); -+ if (handler) { -+ size_t size = handler->list(inode, buffer, rest, -+ last->e_name, -+ last->e_name_len); -+ if (buffer) { -+ if (size > rest) { -+ ret = -ERANGE; -+ goto cleanup; -+ } -+ buffer += size; -+ } -+ rest -= size; -+ } -+ last = next; -+ } -+ ret = size; -+cleanup: -+ brelse(iloc.bh); -+ return ret; -+} -+ -+/* -+ * ext3_xattr_list() -+ * -+ * Copy a list of attribute names into the buffer -+ * provided, or compute the buffer size required. -+ * Buffer is NULL to compute the size of the buffer required. -+ * -+ * Returns a negative error number on failure, or the number of bytes -+ * used / required on success. -+ */ -+int -+ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size) -+{ -+ int error; -+ int size = buffer_size; -+ -+ down_read(&EXT3_I(inode)->xattr_sem); -+ -+ /* get list of attributes stored in inode body */ -+ error = ext3_xattr_ibody_list(inode, buffer, buffer_size); -+ if (error < 0) { -+ /* some error occured while collecting -+ * attributes in inode body */ -+ size = 0; -+ goto cleanup; -+ } -+ size = error; -+ -+ /* get list of attributes stored in dedicated block */ -+ if (buffer) { -+ buffer_size -= error; -+ if (buffer_size <= 0) { -+ buffer = NULL; -+ buffer_size = 0; -+ } else -+ buffer += error; -+ } -+ -+ error = ext3_xattr_block_list(inode, buffer, buffer_size); -+ if (error < 0) -+ /* listing was successful, so we return len */ -+ size = 0; -+ -+cleanup: -+ up_read(&EXT3_I(inode)->xattr_sem); -+ return error + size; -+} -+ - /* - * If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is - * not set, set it. -@@ -356,6 +583,279 @@ - } - - /* -+ * ext3_xattr_ibody_find() -+ * -+ * search attribute and calculate free space in inode body -+ * NOTE: free space includes space our attribute hold -+ */ -+int -+ext3_xattr_ibody_find(struct inode *inode, int name_index, -+ const char *name, struct ext3_xattr_entry *rentry, int *free) -+{ -+ struct ext3_xattr_entry *last; -+ struct ext3_inode *raw_inode; -+ int name_len = strlen(name); -+ int err, storage_size; -+ struct ext3_iloc iloc; -+ char *start, *end; -+ int ret = -ENOENT; -+ -+ if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) -+ return ret; -+ -+ err = ext3_get_inode_loc(inode, &iloc, 0); -+ if (err) -+ return -EIO; -+ raw_inode = ext3_raw_inode(&iloc); -+ -+ storage_size = EXT3_SB(inode->i_sb)->s_inode_size - -+ EXT3_GOOD_OLD_INODE_SIZE - -+ EXT3_I(inode)->i_extra_isize - -+ sizeof(__u32); -+ *free = storage_size - sizeof(__u32); -+ start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE + -+ EXT3_I(inode)->i_extra_isize; -+ if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) { -+ brelse(iloc.bh); -+ return -ENOENT; -+ } -+ start += sizeof(__u32); -+ end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size; -+ -+ last = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(last)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last); -+ if (le32_to_cpu(last->e_value_size) > storage_size || -+ (char *) next >= end) { -+ ext3_error(inode->i_sb, "ext3_xattr_ibody_find", -+ "inode %ld", inode->i_ino); -+ brelse(iloc.bh); -+ return -EIO; -+ } -+ -+ if (name_index == last->e_name_index && -+ name_len == last->e_name_len && -+ !memcmp(name, last->e_name, name_len)) { -+ memcpy(rentry, last, sizeof(struct ext3_xattr_entry)); -+ ret = 0; -+ } else { -+ *free -= EXT3_XATTR_LEN(last->e_name_len); -+ *free -= le32_to_cpu(last->e_value_size); -+ } -+ last = next; -+ } -+ -+ brelse(iloc.bh); -+ return ret; -+} -+ -+/* -+ * ext3_xattr_block_find() -+ * -+ * search attribute and calculate free space in EA block (if it allocated) -+ * NOTE: free space includes space our attribute hold -+ */ -+int -+ext3_xattr_block_find(struct inode *inode, int name_index, const char *name, -+ struct ext3_xattr_entry *rentry, int *free) -+{ -+ struct buffer_head *bh = NULL; -+ struct ext3_xattr_entry *entry; -+ char *end; -+ int name_len, error = -ENOENT; -+ -+ if (!EXT3_I(inode)->i_file_acl) { -+ *free = inode->i_sb->s_blocksize - -+ sizeof(struct ext3_xattr_header) - -+ sizeof(__u32); -+ return -ENOENT; -+ } -+ ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl); -+ bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); -+ if (!bh) -+ return -EIO; -+ ea_bdebug(bh, "b_count=%d, refcount=%d", -+ atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount)); -+ end = bh->b_data + bh->b_size; -+ if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) || -+ HDR(bh)->h_blocks != cpu_to_le32(1)) { -+bad_block: ext3_error(inode->i_sb, "ext3_xattr_get", -+ "inode %ld: bad block %d", inode->i_ino, -+ EXT3_I(inode)->i_file_acl); -+ brelse(bh); -+ return -EIO; -+ } -+ /* find named attribute */ -+ name_len = strlen(name); -+ *free = bh->b_size - sizeof(__u32); -+ -+ entry = FIRST_ENTRY(bh); -+ while (!IS_LAST_ENTRY(entry)) { -+ struct ext3_xattr_entry *next = -+ EXT3_XATTR_NEXT(entry); -+ if ((char *)next >= end) -+ goto bad_block; -+ if (name_index == entry->e_name_index && -+ name_len == entry->e_name_len && -+ memcmp(name, entry->e_name, name_len) == 0) { -+ memcpy(rentry, entry, sizeof(struct ext3_xattr_entry)); -+ error = 0; -+ } else { -+ *free -= EXT3_XATTR_LEN(entry->e_name_len); -+ *free -= le32_to_cpu(entry->e_value_size); -+ } -+ entry = next; -+ } -+ brelse(bh); -+ -+ return error; -+} -+ -+/* -+ * ext3_xattr_inode_set() -+ * -+ * this routine add/remove/replace attribute in inode body -+ */ -+int -+ext3_xattr_ibody_set(handle_t *handle, struct inode *inode, int name_index, -+ const char *name, const void *value, size_t value_len, -+ int flags) -+{ -+ struct ext3_xattr_entry *last, *next, *here = NULL; -+ struct ext3_inode *raw_inode; -+ int name_len = strlen(name); -+ int esize = EXT3_XATTR_LEN(name_len); -+ struct buffer_head *bh; -+ int err, storage_size; -+ struct ext3_iloc iloc; -+ int free, min_offs; -+ char *start, *end; -+ -+ if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) -+ return -ENOSPC; -+ -+ err = ext3_get_inode_loc(inode, &iloc, 0); -+ if (err) -+ return err; -+ raw_inode = ext3_raw_inode(&iloc); -+ bh = iloc.bh; -+ -+ storage_size = EXT3_SB(inode->i_sb)->s_inode_size - -+ EXT3_GOOD_OLD_INODE_SIZE - -+ EXT3_I(inode)->i_extra_isize - -+ sizeof(__u32); -+ start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE + -+ EXT3_I(inode)->i_extra_isize; -+ if ((*(__u32*) start) != EXT3_XATTR_MAGIC) { -+ /* inode had no attributes before */ -+ *((__u32*) start) = cpu_to_le32(EXT3_XATTR_MAGIC); -+ } -+ start += sizeof(__u32); -+ end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size; -+ min_offs = storage_size; -+ free = storage_size - sizeof(__u32); -+ -+ last = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(last)) { -+ next = EXT3_XATTR_NEXT(last); -+ if (le32_to_cpu(last->e_value_size) > storage_size || -+ (char *) next >= end) { -+ ext3_error(inode->i_sb, "ext3_xattr_ibody_set", -+ "inode %ld", inode->i_ino); -+ brelse(bh); -+ return -EIO; -+ } -+ -+ if (last->e_value_size) { -+ int offs = le16_to_cpu(last->e_value_offs); -+ if (offs < min_offs) -+ min_offs = offs; -+ } -+ if (name_index == last->e_name_index && -+ name_len == last->e_name_len && -+ !memcmp(name, last->e_name, name_len)) -+ here = last; -+ else { -+ /* we calculate all but our attribute -+ * because it will be removed before changing */ -+ free -= EXT3_XATTR_LEN(last->e_name_len); -+ free -= le32_to_cpu(last->e_value_size); -+ } -+ last = next; -+ } -+ -+ if (value && (esize + value_len > free)) { -+ brelse(bh); -+ return -ENOSPC; -+ } -+ -+ err = ext3_reserve_inode_write(handle, inode, &iloc); -+ if (err) { -+ brelse(bh); -+ return err; -+ } -+ -+ if (here) { -+ /* time to remove old value */ -+ struct ext3_xattr_entry *e; -+ int size = le32_to_cpu(here->e_value_size); -+ int border = le16_to_cpu(here->e_value_offs); -+ char *src; -+ -+ /* move tail */ -+ memmove(start + min_offs + size, start + min_offs, -+ border - min_offs); -+ -+ /* recalculate offsets */ -+ e = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(e)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e); -+ int offs = le16_to_cpu(e->e_value_offs); -+ if (offs < border) -+ e->e_value_offs = -+ cpu_to_le16(offs + size); -+ e = next; -+ } -+ min_offs += size; -+ -+ /* remove entry */ -+ border = EXT3_XATTR_LEN(here->e_name_len); -+ src = (char *) here + EXT3_XATTR_LEN(here->e_name_len); -+ size = (char *) last - src; -+ if ((char *) here + size > end) -+ printk("ALERT at %s:%d: 0x%p + %d > 0x%p\n", -+ __FILE__, __LINE__, here, size, end); -+ memmove(here, src, size); -+ last = (struct ext3_xattr_entry *) ((char *) last - border); -+ *((__u32 *) last) = 0; -+ } -+ -+ if (value) { -+ int offs = min_offs - value_len; -+ /* use last to create new entry */ -+ last->e_name_len = strlen(name); -+ last->e_name_index = name_index; -+ last->e_value_offs = cpu_to_le16(offs); -+ last->e_value_size = cpu_to_le32(value_len); -+ last->e_hash = last->e_value_block = 0; -+ memset(last->e_name, 0, esize); -+ memcpy(last->e_name, name, last->e_name_len); -+ if (start + offs + value_len > end) -+ printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n", -+ __FILE__, __LINE__, start, offs, -+ value_len, end); -+ memcpy(start + offs, value, value_len); -+ last = EXT3_XATTR_NEXT(last); -+ *((__u32 *) last) = 0; -+ } -+ -+ ext3_mark_iloc_dirty(handle, inode, &iloc); -+ brelse(bh); -+ -+ return 0; -+} -+ -+/* - * ext3_xattr_set_handle() - * - * Create, replace or remove an extended attribute for this inode. Buffer -@@ -369,6 +869,104 @@ - */ - int - ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, -+ const char *name, const void *value, size_t value_len, -+ int flags) -+{ -+ struct ext3_xattr_entry entry; -+ int err, where = 0, found = 0, total; -+ int free1 = -1, free2 = -1; -+ int name_len; -+ -+ ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld", -+ name_index, name, value, (long)value_len); -+ -+ if (IS_RDONLY(inode)) -+ return -EROFS; -+ if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -+ return -EPERM; -+ if (value == NULL) -+ value_len = 0; -+ if (name == NULL) -+ return -EINVAL; -+ name_len = strlen(name); -+ if (name_len > 255 || value_len > inode->i_sb->s_blocksize) -+ return -ERANGE; -+ down_write(&EXT3_I(inode)->xattr_sem); -+ -+ /* try to find attribute in inode body */ -+ err = ext3_xattr_ibody_find(inode, name_index, name, &entry, &free1); -+ if (err == 0) { -+ /* found EA in inode */ -+ found = 1; -+ where = 0; -+ } else if (err == -ENOENT) { -+ /* there is no such attribute in inode body */ -+ /* try to find attribute in dedicated block */ -+ err = ext3_xattr_block_find(inode, name_index, name, -+ &entry, &free2); -+ if (err != 0 && err != -ENOENT) { -+ /* not found EA in block */ -+ goto finish; -+ } else if (err == 0) { -+ /* found EA in block */ -+ where = 1; -+ found = 1; -+ } -+ } else -+ goto finish; -+ -+ /* check flags: may replace? may create ? */ -+ if (found && (flags & XATTR_CREATE)) { -+ err = -EEXIST; -+ goto finish; -+ } else if (!found && (flags & XATTR_REPLACE)) { -+ err = -ENODATA; -+ goto finish; -+ } -+ -+ /* check if we have enough space to store attribute */ -+ total = EXT3_XATTR_LEN(strlen(name)) + value_len; -+ if (free1 >= 0 && total > free1 && free2 >= 0 && total > free2) { -+ /* have no enough space */ -+ err = -ENOSPC; -+ goto finish; -+ } -+ -+ /* time to remove attribute */ -+ if (found) { -+ if (where == 0) { -+ /* EA is stored in inode body */ -+ ext3_xattr_ibody_set(handle, inode, name_index, name, -+ NULL, 0, flags); -+ } else { -+ /* EA is stored in separated block */ -+ ext3_xattr_block_set(handle, inode, name_index, name, -+ NULL, 0, flags); -+ } -+ } -+ -+ /* try to store EA in inode body */ -+ err = ext3_xattr_ibody_set(handle, inode, name_index, name, -+ value, value_len, flags); -+ if (err) { -+ /* can't store EA in inode body */ -+ /* try to store in block */ -+ err = ext3_xattr_block_set(handle, inode, name_index, -+ name, value, value_len, flags); -+ } -+ -+finish: -+ up_write(&EXT3_I(inode)->xattr_sem); -+ return err; -+} -+ -+/* -+ * ext3_xattr_block_set() -+ * -+ * this routine add/remove/replace attribute in EA block -+ */ -+int -+ext3_xattr_block_set(handle_t *handle, struct inode *inode, int name_index, - const char *name, const void *value, size_t value_len, - int flags) - { -@@ -391,22 +989,7 @@ - * towards the end of the block). - * end -- Points right after the block pointed to by header. - */ -- -- ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld", -- name_index, name, value, (long)value_len); -- -- if (IS_RDONLY(inode)) -- return -EROFS; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- return -EPERM; -- if (value == NULL) -- value_len = 0; -- if (name == NULL) -- return -EINVAL; - name_len = strlen(name); -- if (name_len > 255 || value_len > sb->s_blocksize) -- return -ERANGE; -- down_write(&EXT3_I(inode)->xattr_sem); - if (EXT3_I(inode)->i_file_acl) { - /* The inode already has an extended attribute block. */ - bh = sb_bread(sb, EXT3_I(inode)->i_file_acl); -@@ -638,7 +1221,6 @@ - brelse(bh); - if (!(bh && header == HDR(bh))) - kfree(header); -- up_write(&EXT3_I(inode)->xattr_sem); - - return error; - } -Index: linux-stage/fs/ext3/xattr.h -=================================================================== ---- linux-stage.orig/fs/ext3/xattr.h 2005-10-04 16:50:11.000000000 -0600 -+++ linux-stage/fs/ext3/xattr.h 2005-10-04 17:07:25.000000000 -0600 -@@ -67,7 +67,8 @@ - extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t); - extern int ext3_xattr_list(struct inode *, char *, size_t); - extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int); --extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int); -+extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int); -+extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int); - - extern void ext3_xattr_delete_inode(handle_t *, struct inode *); - extern void ext3_xattr_put_super(struct super_block *); -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h 2005-10-04 16:53:29.000000000 -0600 -+++ linux-stage/include/linux/ext3_fs.h 2005-10-04 17:07:25.000000000 -0600 -@@ -293,6 +293,8 @@ - __u32 m_i_reserved2[2]; - } masix2; - } osd2; /* OS dependent 2 */ -+ __u16 i_extra_isize; -+ __u16 i_pad1; - }; - - #define i_size_high i_dir_acl -@@ -757,6 +759,7 @@ - extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); - extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); - extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); -+int ext3_get_inode_loc(struct inode *inode, struct ext3_iloc *iloc, int in_mem); - - extern void ext3_read_inode (struct inode *); - extern int ext3_write_inode (struct inode *, int); -Index: linux-stage/include/linux/ext3_fs_i.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs_i.h 2005-10-04 16:50:11.000000000 -0600 -+++ linux-stage/include/linux/ext3_fs_i.h 2005-10-04 17:07:25.000000000 -0600 -@@ -113,6 +113,9 @@ - */ - loff_t i_disksize; - -+ /* on-disk additional length */ -+ __u16 i_extra_isize; -+ - /* - * truncate_sem is for serialising ext3_truncate() against - * ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's diff --git a/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch deleted file mode 100644 index 72c25a4def..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch +++ /dev/null @@ -1,840 +0,0 @@ -%patch -Index: linux-2.6.0/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.0.orig/fs/ext3/ialloc.c 2004-01-14 18:54:11.000000000 +0300 -+++ linux-2.6.0/fs/ext3/ialloc.c 2004-01-14 18:54:12.000000000 +0300 -@@ -627,6 +627,9 @@ - inode->i_generation = EXT3_SB(sb)->s_next_generation++; - - ei->i_state = EXT3_STATE_NEW; -+ ei->i_extra_isize = -+ (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? -+ sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; - - ret = inode; - if(DQUOT_ALLOC_INODE(inode)) { -Index: linux-2.6.0/fs/ext3/inode.c -=================================================================== ---- linux-2.6.0.orig/fs/ext3/inode.c 2004-01-14 18:54:12.000000000 +0300 -+++ linux-2.6.0/fs/ext3/inode.c 2004-01-14 19:09:46.000000000 +0300 -@@ -2339,7 +2339,7 @@ - * trying to determine the inode's location on-disk and no read need be - * performed. - */ --static int ext3_get_inode_loc(struct inode *inode, -+int ext3_get_inode_loc(struct inode *inode, - struct ext3_iloc *iloc, int in_mem) - { - unsigned long block; -@@ -2547,6 +2547,11 @@ - ei->i_data[block] = raw_inode->i_block[block]; - INIT_LIST_HEAD(&ei->i_orphan); - -+ if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) -+ ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize); -+ else -+ ei->i_extra_isize = 0; -+ - if (S_ISREG(inode->i_mode)) { - inode->i_op = &ext3_file_inode_operations; - inode->i_fop = &ext3_file_operations; -@@ -2682,6 +2687,9 @@ - } else for (block = 0; block < EXT3_N_BLOCKS; block++) - raw_inode->i_block[block] = ei->i_data[block]; - -+ if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) -+ raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize); -+ - BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata"); - rc = ext3_journal_dirty_metadata(handle, bh); - if (!err) -@@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl - { - int err = 0; - if (handle) { -- err = ext3_get_inode_loc(inode, iloc, 1); -+ err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state & -+ EXT3_STATE_NEW); - if (!err) { - BUFFER_TRACE(iloc->bh, "get_write_access"); - err = ext3_journal_get_write_access(handle, iloc->bh); -Index: linux-2.6.0/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.0.orig/fs/ext3/xattr.c 2003-12-30 08:33:13.000000000 +0300 -+++ linux-2.6.0/fs/ext3/xattr.c 2004-01-14 18:54:12.000000000 +0300 -@@ -246,17 +246,12 @@ - } - - /* -- * ext3_xattr_get() -- * -- * Copy an extended attribute into the buffer -- * provided, or compute the buffer size required. -- * Buffer is NULL to compute the size of the buffer required. -+ * ext3_xattr_block_get() - * -- * Returns a negative error number on failure, or the number of bytes -- * used / required on success. -+ * routine looks for attribute in EA block and returns it's value and size - */ - int --ext3_xattr_get(struct inode *inode, int name_index, const char *name, -+ext3_xattr_block_get(struct inode *inode, int name_index, const char *name, - void *buffer, size_t buffer_size) - { - struct buffer_head *bh = NULL; -@@ -270,7 +265,6 @@ - - if (name == NULL) - return -EINVAL; -- down_read(&EXT3_I(inode)->xattr_sem); - error = -ENODATA; - if (!EXT3_I(inode)->i_file_acl) - goto cleanup; -@@ -343,15 +337,87 @@ - - cleanup: - brelse(bh); -- up_read(&EXT3_I(inode)->xattr_sem); - - return error; - } - - /* -- * ext3_xattr_list() -+ * ext3_xattr_ibody_get() - * -- * Copy a list of attribute names into the buffer -+ * routine looks for attribute in inode body and returns it's value and size -+ */ -+int -+ext3_xattr_ibody_get(struct inode *inode, int name_index, const char *name, -+ void *buffer, size_t buffer_size) -+{ -+ int size, name_len = strlen(name), storage_size; -+ struct ext3_xattr_entry *last; -+ struct ext3_inode *raw_inode; -+ struct ext3_iloc iloc; -+ char *start, *end; -+ int ret = -ENOENT; -+ -+ if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) -+ return -ENOENT; -+ -+ ret = ext3_get_inode_loc(inode, &iloc, 0); -+ if (ret) -+ return ret; -+ raw_inode = ext3_raw_inode(&iloc); -+ -+ storage_size = EXT3_SB(inode->i_sb)->s_inode_size - -+ EXT3_GOOD_OLD_INODE_SIZE - -+ EXT3_I(inode)->i_extra_isize - -+ sizeof(__u32); -+ start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE + -+ EXT3_I(inode)->i_extra_isize; -+ if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) { -+ brelse(iloc.bh); -+ return -ENOENT; -+ } -+ start += sizeof(__u32); -+ end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size; -+ -+ last = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(last)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last); -+ if (le32_to_cpu(last->e_value_size) > storage_size || -+ (char *) next >= end) { -+ ext3_error(inode->i_sb, "ext3_xattr_ibody_get", -+ "inode %ld", inode->i_ino); -+ brelse(iloc.bh); -+ return -EIO; -+ } -+ if (name_index == last->e_name_index && -+ name_len == last->e_name_len && -+ !memcmp(name, last->e_name, name_len)) -+ goto found; -+ last = next; -+ } -+ -+ /* can't find EA */ -+ brelse(iloc.bh); -+ return -ENOENT; -+ -+found: -+ size = le32_to_cpu(last->e_value_size); -+ if (buffer) { -+ ret = -ERANGE; -+ if (buffer_size >= size) { -+ memcpy(buffer, start + le16_to_cpu(last->e_value_offs), -+ size); -+ ret = size; -+ } -+ } else -+ ret = size; -+ brelse(iloc.bh); -+ return ret; -+} -+ -+/* -+ * ext3_xattr_get() -+ * -+ * Copy an extended attribute into the buffer - * provided, or compute the buffer size required. - * Buffer is NULL to compute the size of the buffer required. - * -@@ -359,7 +425,31 @@ - * used / required on success. - */ - int --ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size) -+ext3_xattr_get(struct inode *inode, int name_index, const char *name, -+ void *buffer, size_t buffer_size) -+{ -+ int err; -+ -+ down_read(&EXT3_I(inode)->xattr_sem); -+ -+ /* try to find attribute in inode body */ -+ err = ext3_xattr_ibody_get(inode, name_index, name, -+ buffer, buffer_size); -+ if (err < 0) -+ /* search was unsuccessful, try to find EA in dedicated block */ -+ err = ext3_xattr_block_get(inode, name_index, name, -+ buffer, buffer_size); -+ up_read(&EXT3_I(inode)->xattr_sem); -+ -+ return err; -+} -+ -+/* ext3_xattr_ibody_list() -+ * -+ * generate list of attributes stored in EA block -+ */ -+int -+ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) - { - struct buffer_head *bh = NULL; - struct ext3_xattr_entry *entry; -@@ -370,7 +460,6 @@ - ea_idebug(inode, "buffer=%p, buffer_size=%ld", - buffer, (long)buffer_size); - -- down_read(&EXT3_I(inode)->xattr_sem); - error = 0; - if (!EXT3_I(inode)->i_file_acl) - goto cleanup; -@@ -431,11 +520,138 @@ - - cleanup: - brelse(bh); -- up_read(&EXT3_I(inode)->xattr_sem); - - return error; - } - -+/* ext3_xattr_ibody_list() -+ * -+ * generate list of attributes stored in inode body -+ */ -+int -+ext3_xattr_ibody_list(struct inode *inode, char *buffer, size_t buffer_size) -+{ -+ struct ext3_xattr_entry *last; -+ struct ext3_inode *raw_inode; -+ char *start, *end, *buf; -+ struct ext3_iloc iloc; -+ int storage_size; -+ int ret; -+ int size = 0; -+ -+ if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) -+ return 0; -+ -+ ret = ext3_get_inode_loc(inode, &iloc, 0); -+ if (ret) -+ return ret; -+ raw_inode = ext3_raw_inode(&iloc); -+ -+ storage_size = EXT3_SB(inode->i_sb)->s_inode_size - -+ EXT3_GOOD_OLD_INODE_SIZE - -+ EXT3_I(inode)->i_extra_isize - -+ sizeof(__u32); -+ start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE + -+ EXT3_I(inode)->i_extra_isize; -+ if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) { -+ brelse(iloc.bh); -+ return 0; -+ } -+ start += sizeof(__u32); -+ end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size; -+ -+ last = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(last)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last); -+ struct ext3_xattr_handler *handler; -+ if (le32_to_cpu(last->e_value_size) > storage_size || -+ (char *) next >= end) { -+ ext3_error(inode->i_sb, "ext3_xattr_ibody_list", -+ "inode %ld", inode->i_ino); -+ brelse(iloc.bh); -+ return -EIO; -+ } -+ handler = ext3_xattr_handler(last->e_name_index); -+ if (handler) -+ size += handler->list(NULL, inode, last->e_name, -+ last->e_name_len); -+ last = next; -+ } -+ -+ if (!buffer) { -+ ret = size; -+ goto cleanup; -+ } else { -+ ret = -ERANGE; -+ if (size > buffer_size) -+ goto cleanup; -+ } -+ -+ last = (struct ext3_xattr_entry *) start; -+ buf = buffer; -+ while (!IS_LAST_ENTRY(last)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last); -+ struct ext3_xattr_handler *handler; -+ handler = ext3_xattr_handler(last->e_name_index); -+ if (handler) -+ buf += handler->list(buf, inode, last->e_name, -+ last->e_name_len); -+ last = next; -+ } -+ ret = size; -+cleanup: -+ brelse(iloc.bh); -+ return ret; -+} -+ -+/* -+ * ext3_xattr_list() -+ * -+ * Copy a list of attribute names into the buffer -+ * provided, or compute the buffer size required. -+ * Buffer is NULL to compute the size of the buffer required. -+ * -+ * Returns a negative error number on failure, or the number of bytes -+ * used / required on success. -+ */ -+int -+ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size) -+{ -+ int error; -+ int size = buffer_size; -+ -+ down_read(&EXT3_I(inode)->xattr_sem); -+ -+ /* get list of attributes stored in inode body */ -+ error = ext3_xattr_ibody_list(inode, buffer, buffer_size); -+ if (error < 0) { -+ /* some error occured while collecting -+ * attributes in inode body */ -+ size = 0; -+ goto cleanup; -+ } -+ size = error; -+ -+ /* get list of attributes stored in dedicated block */ -+ if (buffer) { -+ buffer_size -= error; -+ if (buffer_size <= 0) { -+ buffer = NULL; -+ buffer_size = 0; -+ } else -+ buffer += error; -+ } -+ -+ error = ext3_xattr_block_list(inode, buffer, buffer_size); -+ if (error < 0) -+ /* listing was successful, so we return len */ -+ size = 0; -+ -+cleanup: -+ up_read(&EXT3_I(inode)->xattr_sem); -+ return error + size; -+} -+ - /* - * If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is - * not set, set it. -@@ -457,6 +673,279 @@ - } - - /* -+ * ext3_xattr_ibody_find() -+ * -+ * search attribute and calculate free space in inode body -+ * NOTE: free space includes space our attribute hold -+ */ -+int -+ext3_xattr_ibody_find(struct inode *inode, int name_index, -+ const char *name, struct ext3_xattr_entry *rentry, int *free) -+{ -+ struct ext3_xattr_entry *last; -+ struct ext3_inode *raw_inode; -+ int name_len = strlen(name); -+ int err, storage_size; -+ struct ext3_iloc iloc; -+ char *start, *end; -+ int ret = -ENOENT; -+ -+ if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) -+ return ret; -+ -+ err = ext3_get_inode_loc(inode, &iloc, 0); -+ if (err) -+ return -EIO; -+ raw_inode = ext3_raw_inode(&iloc); -+ -+ storage_size = EXT3_SB(inode->i_sb)->s_inode_size - -+ EXT3_GOOD_OLD_INODE_SIZE - -+ EXT3_I(inode)->i_extra_isize - -+ sizeof(__u32); -+ *free = storage_size - sizeof(__u32); -+ start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE + -+ EXT3_I(inode)->i_extra_isize; -+ if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) { -+ brelse(iloc.bh); -+ return -ENOENT; -+ } -+ start += sizeof(__u32); -+ end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size; -+ -+ last = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(last)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last); -+ if (le32_to_cpu(last->e_value_size) > storage_size || -+ (char *) next >= end) { -+ ext3_error(inode->i_sb, "ext3_xattr_ibody_find", -+ "inode %ld", inode->i_ino); -+ brelse(iloc.bh); -+ return -EIO; -+ } -+ -+ if (name_index == last->e_name_index && -+ name_len == last->e_name_len && -+ !memcmp(name, last->e_name, name_len)) { -+ memcpy(rentry, last, sizeof(struct ext3_xattr_entry)); -+ ret = 0; -+ } else { -+ *free -= EXT3_XATTR_LEN(last->e_name_len); -+ *free -= le32_to_cpu(last->e_value_size); -+ } -+ last = next; -+ } -+ -+ brelse(iloc.bh); -+ return ret; -+} -+ -+/* -+ * ext3_xattr_block_find() -+ * -+ * search attribute and calculate free space in EA block (if it allocated) -+ * NOTE: free space includes space our attribute hold -+ */ -+int -+ext3_xattr_block_find(struct inode *inode, int name_index, const char *name, -+ struct ext3_xattr_entry *rentry, int *free) -+{ -+ struct buffer_head *bh = NULL; -+ struct ext3_xattr_entry *entry; -+ char *end; -+ int name_len, error = -ENOENT; -+ -+ if (!EXT3_I(inode)->i_file_acl) { -+ *free = inode->i_sb->s_blocksize - -+ sizeof(struct ext3_xattr_header) - -+ sizeof(__u32); -+ return -ENOENT; -+ } -+ ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl); -+ bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); -+ if (!bh) -+ return -EIO; -+ ea_bdebug(bh, "b_count=%d, refcount=%d", -+ atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount)); -+ end = bh->b_data + bh->b_size; -+ if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) || -+ HDR(bh)->h_blocks != cpu_to_le32(1)) { -+bad_block: ext3_error(inode->i_sb, "ext3_xattr_get", -+ "inode %ld: bad block %d", inode->i_ino, -+ EXT3_I(inode)->i_file_acl); -+ brelse(bh); -+ return -EIO; -+ } -+ /* find named attribute */ -+ name_len = strlen(name); -+ *free = bh->b_size - sizeof(__u32); -+ -+ entry = FIRST_ENTRY(bh); -+ while (!IS_LAST_ENTRY(entry)) { -+ struct ext3_xattr_entry *next = -+ EXT3_XATTR_NEXT(entry); -+ if ((char *)next >= end) -+ goto bad_block; -+ if (name_index == entry->e_name_index && -+ name_len == entry->e_name_len && -+ memcmp(name, entry->e_name, name_len) == 0) { -+ memcpy(rentry, entry, sizeof(struct ext3_xattr_entry)); -+ error = 0; -+ } else { -+ *free -= EXT3_XATTR_LEN(entry->e_name_len); -+ *free -= le32_to_cpu(entry->e_value_size); -+ } -+ entry = next; -+ } -+ brelse(bh); -+ -+ return error; -+} -+ -+/* -+ * ext3_xattr_inode_set() -+ * -+ * this routine add/remove/replace attribute in inode body -+ */ -+int -+ext3_xattr_ibody_set(handle_t *handle, struct inode *inode, int name_index, -+ const char *name, const void *value, size_t value_len, -+ int flags) -+{ -+ struct ext3_xattr_entry *last, *next, *here = NULL; -+ struct ext3_inode *raw_inode; -+ int name_len = strlen(name); -+ int esize = EXT3_XATTR_LEN(name_len); -+ struct buffer_head *bh; -+ int err, storage_size; -+ struct ext3_iloc iloc; -+ int free, min_offs; -+ char *start, *end; -+ -+ if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) -+ return -ENOSPC; -+ -+ err = ext3_get_inode_loc(inode, &iloc, 0); -+ if (err) -+ return err; -+ raw_inode = ext3_raw_inode(&iloc); -+ bh = iloc.bh; -+ -+ storage_size = EXT3_SB(inode->i_sb)->s_inode_size - -+ EXT3_GOOD_OLD_INODE_SIZE - -+ EXT3_I(inode)->i_extra_isize - -+ sizeof(__u32); -+ start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE + -+ EXT3_I(inode)->i_extra_isize; -+ if ((*(__u32*) start) != EXT3_XATTR_MAGIC) { -+ /* inode had no attributes before */ -+ *((__u32*) start) = cpu_to_le32(EXT3_XATTR_MAGIC); -+ } -+ start += sizeof(__u32); -+ end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size; -+ min_offs = storage_size; -+ free = storage_size - sizeof(__u32); -+ -+ last = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(last)) { -+ next = EXT3_XATTR_NEXT(last); -+ if (le32_to_cpu(last->e_value_size) > storage_size || -+ (char *) next >= end) { -+ ext3_error(inode->i_sb, "ext3_xattr_ibody_set", -+ "inode %ld", inode->i_ino); -+ brelse(bh); -+ return -EIO; -+ } -+ -+ if (last->e_value_size) { -+ int offs = le16_to_cpu(last->e_value_offs); -+ if (offs < min_offs) -+ min_offs = offs; -+ } -+ if (name_index == last->e_name_index && -+ name_len == last->e_name_len && -+ !memcmp(name, last->e_name, name_len)) -+ here = last; -+ else { -+ /* we calculate all but our attribute -+ * because it will be removed before changing */ -+ free -= EXT3_XATTR_LEN(last->e_name_len); -+ free -= le32_to_cpu(last->e_value_size); -+ } -+ last = next; -+ } -+ -+ if (value && (esize + value_len > free)) { -+ brelse(bh); -+ return -ENOSPC; -+ } -+ -+ err = ext3_reserve_inode_write(handle, inode, &iloc); -+ if (err) { -+ brelse(bh); -+ return err; -+ } -+ -+ if (here) { -+ /* time to remove old value */ -+ struct ext3_xattr_entry *e; -+ int size = le32_to_cpu(here->e_value_size); -+ int border = le16_to_cpu(here->e_value_offs); -+ char *src; -+ -+ /* move tail */ -+ memmove(start + min_offs + size, start + min_offs, -+ border - min_offs); -+ -+ /* recalculate offsets */ -+ e = (struct ext3_xattr_entry *) start; -+ while (!IS_LAST_ENTRY(e)) { -+ struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e); -+ int offs = le16_to_cpu(e->e_value_offs); -+ if (offs < border) -+ e->e_value_offs = -+ cpu_to_le16(offs + size); -+ e = next; -+ } -+ min_offs += size; -+ -+ /* remove entry */ -+ border = EXT3_XATTR_LEN(here->e_name_len); -+ src = (char *) here + EXT3_XATTR_LEN(here->e_name_len); -+ size = (char *) last - src; -+ if ((char *) here + size > end) -+ printk("ALERT at %s:%d: 0x%p + %d > 0x%p\n", -+ __FILE__, __LINE__, here, size, end); -+ memmove(here, src, size); -+ last = (struct ext3_xattr_entry *) ((char *) last - border); -+ *((__u32 *) last) = 0; -+ } -+ -+ if (value) { -+ int offs = min_offs - value_len; -+ /* use last to create new entry */ -+ last->e_name_len = strlen(name); -+ last->e_name_index = name_index; -+ last->e_value_offs = cpu_to_le16(offs); -+ last->e_value_size = cpu_to_le32(value_len); -+ last->e_hash = last->e_value_block = 0; -+ memset(last->e_name, 0, esize); -+ memcpy(last->e_name, name, last->e_name_len); -+ if (start + offs + value_len > end) -+ printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n", -+ __FILE__, __LINE__, start, offs, -+ value_len, end); -+ memcpy(start + offs, value, value_len); -+ last = EXT3_XATTR_NEXT(last); -+ *((__u32 *) last) = 0; -+ } -+ -+ ext3_mark_iloc_dirty(handle, inode, &iloc); -+ brelse(bh); -+ -+ return 0; -+} -+ -+/* - * ext3_xattr_set_handle() - * - * Create, replace or remove an extended attribute for this inode. Buffer -@@ -470,6 +959,104 @@ - */ - int - ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, -+ const char *name, const void *value, size_t value_len, -+ int flags) -+{ -+ struct ext3_xattr_entry entry; -+ int err, where = 0, found = 0, total; -+ int free1 = -1, free2 = -1; -+ int name_len; -+ -+ ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld", -+ name_index, name, value, (long)value_len); -+ -+ if (IS_RDONLY(inode)) -+ return -EROFS; -+ if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -+ return -EPERM; -+ if (value == NULL) -+ value_len = 0; -+ if (name == NULL) -+ return -EINVAL; -+ name_len = strlen(name); -+ if (name_len > 255 || value_len > inode->i_sb->s_blocksize) -+ return -ERANGE; -+ down_write(&EXT3_I(inode)->xattr_sem); -+ -+ /* try to find attribute in inode body */ -+ err = ext3_xattr_ibody_find(inode, name_index, name, &entry, &free1); -+ if (err == 0) { -+ /* found EA in inode */ -+ found = 1; -+ where = 0; -+ } else if (err == -ENOENT) { -+ /* there is no such attribute in inode body */ -+ /* try to find attribute in dedicated block */ -+ err = ext3_xattr_block_find(inode, name_index, name, -+ &entry, &free2); -+ if (err != 0 && err != -ENOENT) { -+ /* not found EA in block */ -+ goto finish; -+ } else if (err == 0) { -+ /* found EA in block */ -+ where = 1; -+ found = 1; -+ } -+ } else -+ goto finish; -+ -+ /* check flags: may replace? may create ? */ -+ if (found && (flags & XATTR_CREATE)) { -+ err = -EEXIST; -+ goto finish; -+ } else if (!found && (flags & XATTR_REPLACE)) { -+ err = -ENODATA; -+ goto finish; -+ } -+ -+ /* check if we have enough space to store attribute */ -+ total = EXT3_XATTR_LEN(strlen(name)) + value_len; -+ if (free1 >= 0 && total > free1 && free2 >= 0 && total > free2) { -+ /* have no enough space */ -+ err = -ENOSPC; -+ goto finish; -+ } -+ -+ /* time to remove attribute */ -+ if (found) { -+ if (where == 0) { -+ /* EA is stored in inode body */ -+ ext3_xattr_ibody_set(handle, inode, name_index, name, -+ NULL, 0, flags); -+ } else { -+ /* EA is stored in separated block */ -+ ext3_xattr_block_set(handle, inode, name_index, name, -+ NULL, 0, flags); -+ } -+ } -+ -+ /* try to store EA in inode body */ -+ err = ext3_xattr_ibody_set(handle, inode, name_index, name, -+ value, value_len, flags); -+ if (err) { -+ /* can't store EA in inode body */ -+ /* try to store in block */ -+ err = ext3_xattr_block_set(handle, inode, name_index, -+ name, value, value_len, flags); -+ } -+ -+finish: -+ up_write(&EXT3_I(inode)->xattr_sem); -+ return err; -+} -+ -+/* -+ * ext3_xattr_block_set() -+ * -+ * this routine add/remove/replace attribute in EA block -+ */ -+int -+ext3_xattr_block_set(handle_t *handle, struct inode *inode, int name_index, - const char *name, const void *value, size_t value_len, - int flags) - { -@@ -492,22 +1078,7 @@ - * towards the end of the block). - * end -- Points right after the block pointed to by header. - */ -- -- ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld", -- name_index, name, value, (long)value_len); -- -- if (IS_RDONLY(inode)) -- return -EROFS; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- return -EPERM; -- if (value == NULL) -- value_len = 0; -- if (name == NULL) -- return -EINVAL; - name_len = strlen(name); -- if (name_len > 255 || value_len > sb->s_blocksize) -- return -ERANGE; -- down_write(&EXT3_I(inode)->xattr_sem); - if (EXT3_I(inode)->i_file_acl) { - /* The inode already has an extended attribute block. */ - bh = sb_bread(sb, EXT3_I(inode)->i_file_acl); -@@ -733,7 +1304,6 @@ - brelse(bh); - if (!(bh && header == HDR(bh))) - kfree(header); -- up_write(&EXT3_I(inode)->xattr_sem); - - return error; - } -Index: linux-2.6.0/fs/ext3/xattr.h -=================================================================== ---- linux-2.6.0.orig/fs/ext3/xattr.h 2003-06-24 18:04:43.000000000 +0400 -+++ linux-2.6.0/fs/ext3/xattr.h 2004-01-14 18:54:12.000000000 +0300 -@@ -77,7 +77,8 @@ - extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t); - extern int ext3_xattr_list(struct inode *, char *, size_t); - extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int); --extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int); -+extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int); -+extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int); - - extern void ext3_xattr_delete_inode(handle_t *, struct inode *); - extern void ext3_xattr_put_super(struct super_block *); -Index: linux-2.6.0/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.0.orig/include/linux/ext3_fs.h 2004-01-14 18:54:11.000000000 +0300 -+++ linux-2.6.0/include/linux/ext3_fs.h 2004-01-14 18:54:12.000000000 +0300 -@@ -265,6 +265,8 @@ - __u32 m_i_reserved2[2]; - } masix2; - } osd2; /* OS dependent 2 */ -+ __u16 i_extra_isize; -+ __u16 i_pad1; - }; - - #define i_size_high i_dir_acl -@@ -721,6 +723,7 @@ - extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); - extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); - extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); -+int ext3_get_inode_loc(struct inode *inode, struct ext3_iloc *iloc, int in_mem); - - extern void ext3_read_inode (struct inode *); - extern void ext3_write_inode (struct inode *, int); -Index: linux-2.6.0/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.0.orig/include/linux/ext3_fs_i.h 2003-12-30 08:32:44.000000000 +0300 -+++ linux-2.6.0/include/linux/ext3_fs_i.h 2004-01-14 18:54:12.000000000 +0300 -@@ -96,6 +96,9 @@ - */ - loff_t i_disksize; - -+ /* on-disk additional length */ -+ __u16 i_extra_isize; -+ - /* - * truncate_sem is for serialising ext3_truncate() against - * ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's - -%diffstat - fs/ext3/ialloc.c | 5 - fs/ext3/inode.c | 10 - fs/ext3/xattr.c | 634 +++++++++++++++++++++++++++++++++++++++++++--- - fs/ext3/xattr.h | 3 - include/linux/ext3_fs.h | 2 - include/linux/ext3_fs_i.h | 3 - 6 files changed, 623 insertions(+), 34 deletions(-) - diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch deleted file mode 100644 index f421f88e95..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch +++ /dev/null @@ -1,2940 +0,0 @@ -Index: linux-2.6.12-rc6/fs/ext3/extents.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/extents.c 2005-06-14 16:31:25.756503133 +0200 -+++ linux-2.6.12-rc6/fs/ext3/extents.c 2005-06-14 16:31:25.836581257 +0200 -@@ -0,0 +1,2359 @@ -+/* -+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+/* -+ * Extents support for EXT3 -+ * -+ * TODO: -+ * - ext3_ext_walk_space() sould not use ext3_ext_find_extent() -+ * - ext3_ext_calc_credits() could take 'mergable' into account -+ * - ext3*_error() should be used in some situations -+ * - find_goal() [to be tested and improved] -+ * - smart tree reduction -+ * - arch-independence -+ * common on-disk format for big/little-endian arch -+ */ -+ -+#include <linux/module.h> -+#include <linux/fs.h> -+#include <linux/time.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/smp_lock.h> -+#include <linux/highuid.h> -+#include <linux/pagemap.h> -+#include <linux/quotaops.h> -+#include <linux/string.h> -+#include <linux/slab.h> -+#include <linux/ext3_extents.h> -+#include <asm/uaccess.h> -+ -+ -+static inline int ext3_ext_check_header(struct ext3_extent_header *eh) -+{ -+ if (eh->eh_magic != EXT3_EXT_MAGIC) { -+ printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n", -+ (unsigned)eh->eh_magic); -+ return -EIO; -+ } -+ if (eh->eh_max == 0) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n", -+ (unsigned)eh->eh_max); -+ return -EIO; -+ } -+ if (eh->eh_entries > eh->eh_max) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n", -+ (unsigned)eh->eh_entries); -+ return -EIO; -+ } -+ return 0; -+} -+ -+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed) -+{ -+ int err; -+ -+ if (handle->h_buffer_credits > needed) -+ return handle; -+ if (!ext3_journal_extend(handle, needed)) -+ return handle; -+ err = ext3_journal_restart(handle, needed); -+ -+ return handle; -+} -+ -+static int inline -+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->get_write_access) -+ return tree->ops->get_write_access(h,tree->buffer); -+ else -+ return 0; -+} -+ -+static int inline -+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->mark_buffer_dirty) -+ return tree->ops->mark_buffer_dirty(h,tree->buffer); -+ else -+ return 0; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ */ -+static int ext3_ext_get_access(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ -+ if (path->p_bh) { -+ /* path points to block */ -+ err = ext3_journal_get_write_access(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_get_access_for_root(handle, tree); -+ } -+ return err; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ * - EIO -+ */ -+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ if (path->p_bh) { -+ /* path points to block */ -+ err =ext3_journal_dirty_metadata(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_mark_root_dirty(handle, tree); -+ } -+ return err; -+} -+ -+static int inline -+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, struct ext3_extent *ex, -+ int *err) -+{ -+ int goal, depth, newblock; -+ struct inode *inode; -+ -+ EXT_ASSERT(tree); -+ if (tree->ops->new_block) -+ return tree->ops->new_block(handle, tree, path, ex, err); -+ -+ inode = tree->inode; -+ depth = EXT_DEPTH(tree); -+ if (path && depth > 0) { -+ goal = path[depth-1].p_block; -+ } else { -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ -+ bg_start = (ei->i_block_group * -+ EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ goal = bg_start + colour; -+ } -+ -+ newblock = ext3_new_block(handle, inode, goal, err); -+ return newblock; -+} -+ -+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *neh = EXT_ROOT_HDR(tree); -+ neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) | -+ (EXT_HDR_GEN(neh) + 1); -+} -+ -+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 6; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 5; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 3; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 4; -+#endif -+ return size; -+} -+ -+static void ext3_ext_show_path(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int k, l = path->p_depth; -+ -+ ext_debug(tree, "path:"); -+ for (k = 0; k <= l; k++, path++) { -+ if (path->p_idx) { -+ ext_debug(tree, " %d->%d", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ } else if (path->p_ext) { -+ ext_debug(tree, " %d:%d:%d", -+ path->p_ext->ee_block, -+ path->p_ext->ee_len, -+ path->p_ext->ee_start); -+ } else -+ ext_debug(tree, " []"); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *eh; -+ struct ext3_extent *ex; -+ int i; -+ -+ if (!path) -+ return; -+ -+ eh = path[depth].p_hdr; -+ ex = EXT_FIRST_EXTENT(eh); -+ -+ for (i = 0; i < eh->eh_entries; i++, ex++) { -+ ext_debug(tree, "%d:%d:%d ", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_drop_refs(struct ext3_ext_path *path) -+{ -+ int depth = path->p_depth; -+ int i; -+ -+ for (i = 0; i <= depth; i++, path++) { -+ if (path->p_bh) { -+ brelse(path->p_bh); -+ path->p_bh = NULL; -+ } -+ } -+} -+ -+/* -+ * binary search for closest index by given block -+ */ -+static inline void -+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent_idx *ix; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_entries > 0); -+ -+ ext_debug(tree, "binsearch for %d(idx): ", block); -+ -+ path->p_idx = ix = EXT_FIRST_INDEX(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ix[l + k].ei_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ix += l; -+ path->p_idx = ix; -+ ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf); -+ -+ while (l++ < r) { -+ if (block < ix->ei_block) -+ break; -+ path->p_idx = ix++; -+ } -+ ext_debug(tree, " -> %d->%d\n", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent_idx *chix; -+ -+ chix = ix = EXT_FIRST_INDEX(eh); -+ for (k = 0; k < eh->eh_entries; k++, ix++) { -+ if (k != 0 && ix->ei_block <= ix[-1].ei_block) { -+ printk("k=%d, ix=0x%p, first=0x%p\n", k, -+ ix, EXT_FIRST_INDEX(eh)); -+ printk("%u <= %u\n", -+ ix->ei_block,ix[-1].ei_block); -+ } -+ EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block); -+ if (block < ix->ei_block) -+ break; -+ chix = ix; -+ } -+ EXT_ASSERT(chix == path->p_idx); -+ } -+#endif -+} -+ -+/* -+ * binary search for closest extent by given block -+ */ -+static inline void -+ext3_ext_binsearch(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent *ex; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ -+ if (eh->eh_entries == 0) { -+ /* -+ * this leaf is empty yet: -+ * we get such a leaf in split/add case -+ */ -+ return; -+ } -+ -+ ext_debug(tree, "binsearch for %d: ", block); -+ -+ path->p_ext = ex = EXT_FIRST_EXTENT(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ex[l + k].ee_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ex += l; -+ path->p_ext = ex; -+ ext_debug(tree, " -> %d:%d:%d ", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+ while (l++ < r) { -+ if (block < ex->ee_block) -+ break; -+ path->p_ext = ex++; -+ } -+ ext_debug(tree, " -> %d:%d:%d\n", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent *chex; -+ -+ chex = ex = EXT_FIRST_EXTENT(eh); -+ for (k = 0; k < eh->eh_entries; k++, ex++) { -+ EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block); -+ if (block < ex->ee_block) -+ break; -+ chex = ex; -+ } -+ EXT_ASSERT(chex == path->p_ext); -+ } -+#endif -+} -+ -+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *eh; -+ -+ BUG_ON(tree->buffer_len == 0); -+ ext3_ext_get_access_for_root(handle, tree); -+ eh = EXT_ROOT_HDR(tree); -+ eh->eh_depth = 0; -+ eh->eh_entries = 0; -+ eh->eh_magic = EXT3_EXT_MAGIC; -+ eh->eh_max = ext3_ext_space_root(tree); -+ ext3_ext_mark_root_dirty(handle, tree); -+ ext3_ext_invalidate_cache(tree); -+ return 0; -+} -+ -+struct ext3_ext_path * -+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ struct buffer_head *bh; -+ int depth, i, ppos = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ eh = EXT_ROOT_HDR(tree); -+ EXT_ASSERT(eh); -+ if (ext3_ext_check_header(eh)) { -+ /* don't free previously allocated path -+ * -- caller should take care */ -+ path = NULL; -+ goto err; -+ } -+ -+ i = depth = EXT_DEPTH(tree); -+ EXT_ASSERT(eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* account possible depth increase */ -+ if (!path) { -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2), -+ GFP_NOFS); -+ if (!path) -+ return ERR_PTR(-ENOMEM); -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[0].p_hdr = eh; -+ -+ /* walk through the tree */ -+ while (i) { -+ ext_debug(tree, "depth %d: num %d, max %d\n", -+ ppos, eh->eh_entries, eh->eh_max); -+ ext3_ext_binsearch_idx(tree, path + ppos, block); -+ path[ppos].p_block = path[ppos].p_idx->ei_leaf; -+ path[ppos].p_depth = i; -+ path[ppos].p_ext = NULL; -+ -+ bh = sb_bread(tree->inode->i_sb, path[ppos].p_block); -+ if (!bh) -+ goto err; -+ -+ eh = EXT_BLOCK_HDR(bh); -+ ppos++; -+ EXT_ASSERT(ppos <= depth); -+ path[ppos].p_bh = bh; -+ path[ppos].p_hdr = eh; -+ i--; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ } -+ -+ path[ppos].p_depth = i; -+ path[ppos].p_hdr = eh; -+ path[ppos].p_ext = NULL; -+ path[ppos].p_idx = NULL; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ -+ /* find extent */ -+ ext3_ext_binsearch(tree, path + ppos, block); -+ -+ ext3_ext_show_path(tree, path); -+ -+ return path; -+ -+err: -+ printk(KERN_ERR "EXT3-fs: header is corrupted!\n"); -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ return ERR_PTR(-EIO); -+} -+ -+/* -+ * insert new index [logical;ptr] into the block at cupr -+ * it check where to insert: before curp or after curp -+ */ -+static int ext3_ext_insert_index(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *curp, -+ int logical, int ptr) -+{ -+ struct ext3_extent_idx *ix; -+ int len, err; -+ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ return err; -+ -+ EXT_ASSERT(logical != curp->p_idx->ei_block); -+ len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx; -+ if (logical > curp->p_idx->ei_block) { -+ /* insert after */ -+ if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { -+ len = (len - 1) * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d after: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ (curp->p_idx + 1), (curp->p_idx + 2)); -+ memmove(curp->p_idx + 2, curp->p_idx + 1, len); -+ } -+ ix = curp->p_idx + 1; -+ } else { -+ /* insert before */ -+ len = len * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d before: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ curp->p_idx, (curp->p_idx + 1)); -+ memmove(curp->p_idx + 1, curp->p_idx, len); -+ ix = curp->p_idx; -+ } -+ -+ ix->ei_block = logical; -+ ix->ei_leaf = ptr; -+ ix->ei_leaf_hi = ix->ei_unused = 0; -+ curp->p_hdr->eh_entries++; -+ -+ EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max); -+ EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr)); -+ -+ err = ext3_ext_dirty(handle, tree, curp); -+ ext3_std_error(tree->inode->i_sb, err); -+ -+ return err; -+} -+ -+/* -+ * routine inserts new subtree into the path, using free index entry -+ * at depth 'at: -+ * - allocates all needed blocks (new leaf and all intermediate index blocks) -+ * - makes decision where to split -+ * - moves remaining extens and index entries (right to the split point) -+ * into the newly allocated blocks -+ * - initialize subtree -+ */ -+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext, int at) -+{ -+ struct buffer_head *bh = NULL; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct ext3_extent *ex; -+ int i = at, k, m, a; -+ unsigned long newblock, oldblock, border; -+ int *ablocks = NULL; /* array of allocated blocks */ -+ int err = 0; -+ -+ /* make decision: where to split? */ -+ /* FIXME: now desicion is simplest: at current extent */ -+ -+ /* if current leaf will be splitted, then we should use -+ * border from split point */ -+ EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr)); -+ if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ border = path[depth].p_ext[1].ee_block; -+ ext_debug(tree, "leaf will be splitted." -+ " next leaf starts at %d\n", -+ (int)border); -+ } else { -+ border = newext->ee_block; -+ ext_debug(tree, "leaf will be added." -+ " next leaf starts at %d\n", -+ (int)border); -+ } -+ -+ /* -+ * if error occurs, then we break processing -+ * and turn filesystem read-only. so, index won't -+ * be inserted and tree will be in consistent -+ * state. next mount will repair buffers too -+ */ -+ -+ /* -+ * get array to track all allocated blocks -+ * we need this to handle errors and free blocks -+ * upon them -+ */ -+ ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS); -+ if (!ablocks) -+ return -ENOMEM; -+ memset(ablocks, 0, sizeof(unsigned long) * depth); -+ -+ /* allocate all needed blocks */ -+ ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at); -+ for (a = 0; a < depth - at; a++) { -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ goto cleanup; -+ ablocks[a] = newblock; -+ } -+ -+ /* initialize new leaf */ -+ newblock = ablocks[--a]; -+ EXT_ASSERT(newblock); -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 0; -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_depth = 0; -+ ex = EXT_FIRST_EXTENT(neh); -+ -+ /* move remain of path[depth] to the new leaf */ -+ EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max); -+ /* start copy from next extent */ -+ /* TODO: we could do it by single memmove */ -+ m = 0; -+ path[depth].p_ext++; -+ while (path[depth].p_ext <= -+ EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ ext_debug(tree, "move %d:%d:%d in new leaf %lu\n", -+ path[depth].p_ext->ee_block, -+ path[depth].p_ext->ee_start, -+ path[depth].p_ext->ee_len, -+ newblock); -+ memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent)); -+ neh->eh_entries++; -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old leaf */ -+ if (m) { -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ path[depth].p_hdr->eh_entries -= m; -+ if ((err = ext3_ext_dirty(handle, tree, path + depth))) -+ goto cleanup; -+ -+ } -+ -+ /* create intermediate indexes */ -+ k = depth - at - 1; -+ EXT_ASSERT(k >= 0); -+ if (k) -+ ext_debug(tree, "create %d intermediate indices\n", k); -+ /* insert new index into current index block */ -+ /* current depth stored in i var */ -+ i = depth - 1; -+ while (k--) { -+ oldblock = newblock; -+ newblock = ablocks[--a]; -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 1; -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ neh->eh_depth = depth - i; -+ fidx = EXT_FIRST_INDEX(neh); -+ fidx->ei_block = border; -+ fidx->ei_leaf = oldblock; -+ fidx->ei_leaf_hi = fidx->ei_unused = 0; -+ -+ ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n", -+ i, newblock, border, oldblock); -+ /* copy indexes */ -+ m = 0; -+ path[i].p_idx++; -+ -+ ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx, -+ EXT_MAX_INDEX(path[i].p_hdr)); -+ EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) == -+ EXT_LAST_INDEX(path[i].p_hdr)); -+ while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { -+ ext_debug(tree, "%d: move %d:%d in new index %lu\n", -+ i, path[i].p_idx->ei_block, -+ path[i].p_idx->ei_leaf, newblock); -+ memmove(++fidx, path[i].p_idx++, -+ sizeof(struct ext3_extent_idx)); -+ neh->eh_entries++; -+ EXT_ASSERT(neh->eh_entries <= neh->eh_max); -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old index */ -+ if (m) { -+ err = ext3_ext_get_access(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ path[i].p_hdr->eh_entries -= m; -+ err = ext3_ext_dirty(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ } -+ -+ i--; -+ } -+ -+ /* insert new index */ -+ if (!err) -+ err = ext3_ext_insert_index(handle, tree, path + at, -+ border, newblock); -+ -+cleanup: -+ if (bh) { -+ if (buffer_locked(bh)) -+ unlock_buffer(bh); -+ brelse(bh); -+ } -+ -+ if (err) { -+ /* free all allocated blocks in error case */ -+ for (i = 0; i < depth; i++) { -+ if (!ablocks[i]) -+ continue; -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ } -+ } -+ kfree(ablocks); -+ -+ return err; -+} -+ -+/* -+ * routine implements tree growing procedure: -+ * - allocates new block -+ * - moves top-level data (index block or leaf) into the new block -+ * - initialize new top-level, creating index that points to the -+ * just created block -+ */ -+static int ext3_ext_grow_indepth(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp = path; -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct buffer_head *bh; -+ unsigned long newblock; -+ int err = 0; -+ -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ return err; -+ -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ ext3_std_error(tree->inode->i_sb, err); -+ return err; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) { -+ unlock_buffer(bh); -+ goto out; -+ } -+ -+ /* move top-level index/leaf into new block */ -+ memmove(bh->b_data, curp->p_hdr, tree->buffer_len); -+ -+ /* set size of new block */ -+ neh = EXT_BLOCK_HDR(bh); -+ /* old root could have indexes or leaves -+ * so calculate eh_max right way */ -+ if (EXT_DEPTH(tree)) -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ else -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto out; -+ -+ /* create index in new top-level index: num,max,pointer */ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ goto out; -+ -+ curp->p_hdr->eh_magic = EXT3_EXT_MAGIC; -+ curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree); -+ curp->p_hdr->eh_entries = 1; -+ curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr); -+ /* FIXME: it works, but actually path[0] can be index */ -+ curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block; -+ curp->p_idx->ei_leaf = newblock; -+ curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0; -+ -+ neh = EXT_ROOT_HDR(tree); -+ fidx = EXT_FIRST_INDEX(neh); -+ ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n", -+ neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); -+ -+ neh->eh_depth = path->p_depth + 1; -+ err = ext3_ext_dirty(handle, tree, curp); -+out: -+ brelse(bh); -+ -+ return err; -+} -+ -+/* -+ * routine finds empty index and adds new leaf. if no free index found -+ * then it requests in-depth growing -+ */ -+static int ext3_ext_create_new_leaf(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp; -+ int depth, i, err = 0; -+ -+repeat: -+ i = depth = EXT_DEPTH(tree); -+ -+ /* walk up to the tree and look for free index entry */ -+ curp = path + depth; -+ while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) { -+ i--; -+ curp--; -+ } -+ -+ /* we use already allocated block for index block -+ * so, subsequent data blocks should be contigoues */ -+ if (EXT_HAS_FREE_INDEX(curp)) { -+ /* if we found index with free entry, then use that -+ * entry: create all needed subtree and add new leaf */ -+ err = ext3_ext_split(handle, tree, path, newext, i); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ } else { -+ /* tree is full, time to grow in depth */ -+ err = ext3_ext_grow_indepth(handle, tree, path, newext); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ -+ /* -+ * only first (depth 0 -> 1) produces free space -+ * in all other cases we have to split growed tree -+ */ -+ depth = EXT_DEPTH(tree); -+ if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) { -+ /* now we need split */ -+ goto repeat; -+ } -+ } -+ -+ if (err) -+ return err; -+ -+ return 0; -+} -+ -+/* -+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK -+ * NOTE: it consider block number from index entry as -+ * allocated block. thus, index entries have to be consistent -+ * with leafs -+ */ -+static unsigned long -+ext3_ext_next_allocated_block(struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ if (depth == 0 && path->p_ext == NULL) -+ return EXT_MAX_BLOCK; -+ -+ /* FIXME: what if index isn't full ?! */ -+ while (depth >= 0) { -+ if (depth == path->p_depth) { -+ /* leaf */ -+ if (path[depth].p_ext != -+ EXT_LAST_EXTENT(path[depth].p_hdr)) -+ return path[depth].p_ext[1].ee_block; -+ } else { -+ /* index */ -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ } -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * returns first allocated block from next leaf or EXT_MAX_BLOCK -+ */ -+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ /* zero-tree has no leaf blocks at all */ -+ if (depth == 0) -+ return EXT_MAX_BLOCK; -+ -+ /* go to index block */ -+ depth--; -+ -+ while (depth >= 0) { -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * if leaf gets modified and modified extent is first in the leaf -+ * then we have to correct all indexes above -+ * TODO: do we need to correct tree in all cases? -+ */ -+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent *ex; -+ unsigned long border; -+ int k, err = 0; -+ -+ eh = path[depth].p_hdr; -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(eh); -+ -+ if (depth == 0) { -+ /* there is no tree at all */ -+ return 0; -+ } -+ -+ if (ex != EXT_FIRST_EXTENT(eh)) { -+ /* we correct tree if first leaf got modified only */ -+ return 0; -+ } -+ -+ /* -+ * TODO: we need correction if border is smaller then current one -+ */ -+ k = depth - 1; -+ border = path[depth].p_ext->ee_block; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ return err; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ return err; -+ -+ while (k--) { -+ /* change all left-side indexes */ -+ if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr)) -+ break; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ break; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ break; -+ } -+ -+ return err; -+} -+ -+static int inline -+ext3_can_extents_be_merged(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ if (ex1->ee_block + ex1->ee_len != ex2->ee_block) -+ return 0; -+ -+#ifdef AGRESSIVE_TEST -+ if (ex1->ee_len >= 4) -+ return 0; -+#endif -+ -+ if (!tree->ops->mergable) -+ return 1; -+ -+ return tree->ops->mergable(ex1, ex2); -+} -+ -+/* -+ * this routine tries to merge requsted extent into the existing -+ * extent or inserts requested extent as new one into the tree, -+ * creating new leaf in no-space case -+ */ -+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_extent_header * eh; -+ struct ext3_extent *ex, *fex; -+ struct ext3_extent *nearex; /* nearest extent */ -+ struct ext3_ext_path *npath = NULL; -+ int depth, len, err, next; -+ -+ EXT_ASSERT(newext->ee_len > 0); -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(path[depth].p_hdr); -+ -+ /* try to insert block into found extent and return */ -+ if (ex && ext3_can_extents_be_merged(tree, ex, newext)) { -+ ext_debug(tree, "append %d block to %d:%d (from %d)\n", -+ newext->ee_len, ex->ee_block, ex->ee_len, -+ ex->ee_start); -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ return err; -+ ex->ee_len += newext->ee_len; -+ eh = path[depth].p_hdr; -+ nearex = ex; -+ goto merge; -+ } -+ -+repeat: -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) -+ goto has_space; -+ -+ /* probably next leaf has space for us? */ -+ fex = EXT_LAST_EXTENT(eh); -+ next = ext3_ext_next_leaf_block(tree, path); -+ if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) { -+ ext_debug(tree, "next leaf block - %d\n", next); -+ EXT_ASSERT(!npath); -+ npath = ext3_ext_find_extent(tree, next, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ EXT_ASSERT(npath->p_depth == path->p_depth); -+ eh = npath[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) { -+ ext_debug(tree, "next leaf isnt full(%d)\n", -+ eh->eh_entries); -+ path = npath; -+ goto repeat; -+ } -+ ext_debug(tree, "next leaf hasno free space(%d,%d)\n", -+ eh->eh_entries, eh->eh_max); -+ } -+ -+ /* -+ * there is no free space in found leaf -+ * we're gonna add new leaf in the tree -+ */ -+ err = ext3_ext_create_new_leaf(handle, tree, path, newext); -+ if (err) -+ goto cleanup; -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ -+has_space: -+ nearex = path[depth].p_ext; -+ -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ -+ if (!nearex) { -+ /* there is no extent in this leaf, create first one */ -+ ext_debug(tree, "first extent in the leaf: %d:%d:%d\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len); -+ path[depth].p_ext = EXT_FIRST_EXTENT(eh); -+ } else if (newext->ee_block > nearex->ee_block) { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ if (nearex != EXT_LAST_EXTENT(eh)) { -+ len = EXT_MAX_EXTENT(eh) - nearex; -+ len = (len - 1) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 2, nearex + 1, len); -+ } -+ path[depth].p_ext = nearex + 1; -+ } else { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 1, nearex, len); -+ path[depth].p_ext = nearex; -+ } -+ -+ eh->eh_entries++; -+ nearex = path[depth].p_ext; -+ nearex->ee_block = newext->ee_block; -+ nearex->ee_start = newext->ee_start; -+ nearex->ee_len = newext->ee_len; -+ /* FIXME: support for large fs */ -+ nearex->ee_start_hi = 0; -+ -+merge: -+ /* try to merge extents to the right */ -+ while (nearex < EXT_LAST_EXTENT(eh)) { -+ if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1)) -+ break; -+ /* merge with next extent! */ -+ nearex->ee_len += nearex[1].ee_len; -+ if (nearex + 1 < EXT_LAST_EXTENT(eh)) { -+ len = (EXT_LAST_EXTENT(eh) - nearex - 1) * -+ sizeof(struct ext3_extent); -+ memmove(nearex + 1, nearex + 2, len); -+ } -+ eh->eh_entries--; -+ EXT_ASSERT(eh->eh_entries > 0); -+ } -+ -+ /* try to merge extents to the left */ -+ -+ /* time to correct all indexes above */ -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ if (err) -+ goto cleanup; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ -+cleanup: -+ if (npath) { -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ } -+ ext3_ext_tree_changed(tree); -+ ext3_ext_invalidate_cache(tree); -+ return err; -+} -+ -+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block, -+ unsigned long num, ext_prepare_callback func) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_ext_cache cbex; -+ struct ext3_extent *ex; -+ unsigned long next, start = 0, end = 0; -+ unsigned long last = block + num; -+ int depth, exists, err = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(func); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ while (block < last && block != EXT_MAX_BLOCK) { -+ num = last - block; -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(tree, block, path); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ break; -+ } -+ -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(path[depth].p_hdr); -+ ex = path[depth].p_ext; -+ next = ext3_ext_next_allocated_block(path); -+ -+ exists = 0; -+ if (!ex) { -+ /* there is no extent yet, so try to allocate -+ * all requested space */ -+ start = block; -+ end = block + num; -+ } else if (ex->ee_block > block) { -+ /* need to allocate space before found extent */ -+ start = block; -+ end = ex->ee_block; -+ if (block + num < end) -+ end = block + num; -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ /* need to allocate space after found extent */ -+ start = block; -+ end = block + num; -+ if (end >= next) -+ end = next; -+ } else if (block >= ex->ee_block) { -+ /* -+ * some part of requested space is covered -+ * by found extent -+ */ -+ start = block; -+ end = ex->ee_block + ex->ee_len; -+ if (block + num < end) -+ end = block + num; -+ exists = 1; -+ } else { -+ BUG(); -+ } -+ EXT_ASSERT(end > start); -+ -+ if (!exists) { -+ cbex.ec_block = start; -+ cbex.ec_len = end - start; -+ cbex.ec_start = 0; -+ cbex.ec_type = EXT3_EXT_CACHE_GAP; -+ } else { -+ cbex.ec_block = ex->ee_block; -+ cbex.ec_len = ex->ee_len; -+ cbex.ec_start = ex->ee_start; -+ cbex.ec_type = EXT3_EXT_CACHE_EXTENT; -+ } -+ -+ EXT_ASSERT(cbex.ec_len > 0); -+ EXT_ASSERT(path[depth].p_hdr); -+ err = func(tree, path, &cbex); -+ ext3_ext_drop_refs(path); -+ -+ if (err < 0) -+ break; -+ if (err == EXT_REPEAT) -+ continue; -+ else if (err == EXT_BREAK) { -+ err = 0; -+ break; -+ } -+ -+ if (EXT_DEPTH(tree) != depth) { -+ /* depth was changed. we have to realloc path */ -+ kfree(path); -+ path = NULL; -+ } -+ -+ block = cbex.ec_block + cbex.ec_len; -+ } -+ -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ -+ return err; -+} -+ -+static inline void -+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block, -+ __u32 len, __u32 start, int type) -+{ -+ EXT_ASSERT(len > 0); -+ if (tree->cex) { -+ tree->cex->ec_type = type; -+ tree->cex->ec_block = block; -+ tree->cex->ec_len = len; -+ tree->cex->ec_start = start; -+ } -+} -+ -+/* -+ * this routine calculate boundaries of the gap requested block fits into -+ * and cache this gap -+ */ -+static inline void -+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ unsigned long block) -+{ -+ int depth = EXT_DEPTH(tree); -+ unsigned long lblock, len; -+ struct ext3_extent *ex; -+ -+ if (!tree->cex) -+ return; -+ -+ ex = path[depth].p_ext; -+ if (ex == NULL) { -+ /* there is no extent yet, so gap is [0;-] */ -+ lblock = 0; -+ len = EXT_MAX_BLOCK; -+ ext_debug(tree, "cache gap(whole file):"); -+ } else if (block < ex->ee_block) { -+ lblock = block; -+ len = ex->ee_block - block; -+ ext_debug(tree, "cache gap(before): %lu [%lu:%lu]", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len); -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ lblock = ex->ee_block + ex->ee_len; -+ len = ext3_ext_next_allocated_block(path); -+ ext_debug(tree, "cache gap(after): [%lu:%lu] %lu", -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) block); -+ EXT_ASSERT(len > lblock); -+ len = len - lblock; -+ } else { -+ lblock = len = 0; -+ BUG(); -+ } -+ -+ ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len); -+ ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP); -+} -+ -+static inline int -+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block, -+ struct ext3_extent *ex) -+{ -+ struct ext3_ext_cache *cex = tree->cex; -+ -+ /* is there cache storage at all? */ -+ if (!cex) -+ return EXT3_EXT_CACHE_NO; -+ -+ /* has cache valid data? */ -+ if (cex->ec_type == EXT3_EXT_CACHE_NO) -+ return EXT3_EXT_CACHE_NO; -+ -+ EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP || -+ cex->ec_type == EXT3_EXT_CACHE_EXTENT); -+ if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) { -+ ex->ee_block = cex->ec_block; -+ ex->ee_start = cex->ec_start; -+ ex->ee_start_hi = 0; -+ ex->ee_len = cex->ec_len; -+ ext_debug(tree, "%lu cached by %lu:%lu:%lu\n", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) ex->ee_start); -+ return cex->ec_type; -+ } -+ -+ /* not in cache */ -+ return EXT3_EXT_CACHE_NO; -+} -+ -+/* -+ * routine removes index from the index block -+ * it's used in truncate case only. thus all requests are for -+ * last index in the block only -+ */ -+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct buffer_head *bh; -+ int err; -+ -+ /* free index block */ -+ path--; -+ EXT_ASSERT(path->p_hdr->eh_entries); -+ if ((err = ext3_ext_get_access(handle, tree, path))) -+ return err; -+ path->p_hdr->eh_entries--; -+ if ((err = ext3_ext_dirty(handle, tree, path))) -+ return err; -+ ext_debug(tree, "index is empty, remove it, free block %d\n", -+ path->p_idx->ei_leaf); -+ bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); -+ ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ return err; -+} -+ -+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth = EXT_DEPTH(tree); -+ int needed; -+ -+ if (path) { -+ /* probably there is space in leaf? */ -+ if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max) -+ return 1; -+ } -+ -+ /* -+ * the worste case we're expecting is creation of the -+ * new root (growing in depth) with index splitting -+ * for splitting we have to consider depth + 1 because -+ * previous growing could increase it -+ */ -+ depth = depth + 1; -+ -+ /* -+ * growing in depth: -+ * block allocation + new root + old root -+ */ -+ needed = EXT3_ALLOC_NEEDED + 2; -+ -+ /* index split. we may need: -+ * allocate intermediate indexes and new leaf -+ * change two blocks at each level, but root -+ * modify root block (inode) -+ */ -+ needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1; -+ -+ return needed; -+} -+ -+static int -+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, tex; -+ struct ext3_ext_path *npath; -+ int depth, creds, err; -+ -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1); -+ EXT_ASSERT(ex->ee_block < start); -+ -+ /* calculate tail extent */ -+ tex.ee_block = end + 1; -+ EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len); -+ tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block; -+ -+ creds = ext3_ext_calc_credits_for_insert(tree, path); -+ handle = ext3_ext_journal_restart(handle, creds); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ /* calculate head extent. use primary extent */ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ return err; -+ ex->ee_len = start - ex->ee_block; -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ return err; -+ -+ /* FIXME: some callback to free underlying resource -+ * and correct ee_start? */ -+ ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n", -+ ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len); -+ -+ npath = ext3_ext_find_extent(tree, ex->ee_block, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block); -+ EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len); -+ -+ err = ext3_ext_insert_extent(handle, tree, npath, &tex); -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ -+ return err; -+} -+ -+static int -+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, *fu = NULL, *lu, *le; -+ int err = 0, correct_index = 0; -+ int depth = EXT_DEPTH(tree), credits; -+ struct ext3_extent_header *eh; -+ unsigned a, b, block, num; -+ -+ ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end); -+ if (!path[depth].p_hdr) -+ path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh); -+ eh = path[depth].p_hdr; -+ EXT_ASSERT(eh); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* find where to start removing */ -+ le = ex = EXT_LAST_EXTENT(eh); -+ while (ex != EXT_FIRST_EXTENT(eh)) { -+ if (ex->ee_block <= end) -+ break; -+ ex--; -+ } -+ -+ if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) { -+ /* removal of internal part of the extent requested -+ * tail and head must be placed in different extent -+ * so, we have to insert one more extent */ -+ path[depth].p_ext = ex; -+ return ext3_ext_split_for_rm(handle, tree, path, start, end); -+ } -+ -+ lu = ex; -+ while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) { -+ ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len); -+ path[depth].p_ext = ex; -+ -+ a = ex->ee_block > start ? ex->ee_block : start; -+ b = ex->ee_block + ex->ee_len - 1 < end ? -+ ex->ee_block + ex->ee_len - 1 : end; -+ -+ ext_debug(tree, " border %u:%u\n", a, b); -+ -+ if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) { -+ block = 0; -+ num = 0; -+ BUG(); -+ } else if (a != ex->ee_block) { -+ /* remove tail of the extent */ -+ block = ex->ee_block; -+ num = a - block; -+ } else if (b != ex->ee_block + ex->ee_len - 1) { -+ /* remove head of the extent */ -+ block = a; -+ num = b - a; -+ } else { -+ /* remove whole extent: excelent! */ -+ block = ex->ee_block; -+ num = 0; -+ EXT_ASSERT(a == ex->ee_block && -+ b == ex->ee_block + ex->ee_len - 1); -+ } -+ -+ if (ex == EXT_FIRST_EXTENT(eh)) -+ correct_index = 1; -+ -+ credits = 1; -+ if (correct_index) -+ credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1; -+ if (tree->ops->remove_extent_credits) -+ credits+=tree->ops->remove_extent_credits(tree,ex,a,b); -+ -+ handle = ext3_ext_journal_restart(handle, credits); -+ if (IS_ERR(handle)) { -+ err = PTR_ERR(handle); -+ goto out; -+ } -+ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ if (tree->ops->remove_extent) -+ err = tree->ops->remove_extent(tree, ex, a, b); -+ if (err) -+ goto out; -+ -+ if (num == 0) { -+ /* this extent is removed entirely mark slot unused */ -+ ex->ee_start = ex->ee_start_hi = 0; -+ eh->eh_entries--; -+ fu = ex; -+ } -+ -+ ex->ee_block = block; -+ ex->ee_len = num; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ ext_debug(tree, "new extent: %u:%u:%u\n", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ ex--; -+ } -+ -+ if (fu) { -+ /* reuse unused slots */ -+ while (lu < le) { -+ if (lu->ee_start) { -+ *fu = *lu; -+ lu->ee_start = lu->ee_start_hi = 0; -+ fu++; -+ } -+ lu++; -+ } -+ } -+ -+ if (correct_index && eh->eh_entries) -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ -+ /* if this leaf is free, then we should -+ * remove it from index block above */ -+ if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) -+ err = ext3_ext_rm_idx(handle, tree, path + depth); -+ -+out: -+ return err; -+} -+ -+ -+static struct ext3_extent_idx * -+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block) -+{ -+ struct ext3_extent_idx *ix; -+ -+ ix = EXT_LAST_INDEX(hdr); -+ while (ix != EXT_FIRST_INDEX(hdr)) { -+ if (ix->ei_block <= block) -+ break; -+ ix--; -+ } -+ return ix; -+} -+ -+/* -+ * returns 1 if current index have to be freed (even partial) -+ */ -+static int inline -+ext3_ext_more_to_rm(struct ext3_ext_path *path) -+{ -+ EXT_ASSERT(path->p_idx); -+ -+ if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr)) -+ return 0; -+ -+ /* -+ * if truncate on deeper level happened it it wasn't partial -+ * so we have to consider current index for truncation -+ */ -+ if (path->p_hdr->eh_entries == path->p_block) -+ return 0; -+ return 1; -+} -+ -+int ext3_ext_remove_space(struct ext3_extents_tree *tree, -+ unsigned long start, unsigned long end) -+{ -+ struct inode *inode = tree->inode; -+ struct super_block *sb = inode->i_sb; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_ext_path *path; -+ handle_t *handle; -+ int i = 0, err = 0; -+ -+ ext_debug(tree, "space to be removed: %lu:%lu\n", start, end); -+ -+ /* probably first extent we're gonna free will be last in block */ -+ handle = ext3_journal_start(inode, depth + 1); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ ext3_ext_invalidate_cache(tree); -+ -+ /* -+ * we start scanning from right side freeing all the blocks -+ * after i_size and walking into the deep -+ */ -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL); -+ if (IS_ERR(path)) { -+ ext3_error(sb, __FUNCTION__, "Can't allocate path array"); -+ ext3_journal_stop(handle); -+ return -ENOMEM; -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[i].p_hdr = EXT_ROOT_HDR(tree); -+ -+ while (i >= 0 && err == 0) { -+ if (i == depth) { -+ /* this is leaf block */ -+ err = ext3_ext_rm_leaf(handle, tree, path, start, end); -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ continue; -+ } -+ -+ /* this is index block */ -+ if (!path[i].p_hdr) { -+ ext_debug(tree, "initialize header\n"); -+ path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh); -+ } -+ -+ EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max); -+ EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC); -+ -+ if (!path[i].p_idx) { -+ /* this level hasn't touched yet */ -+ path[i].p_idx = -+ ext3_ext_last_covered(path[i].p_hdr, end); -+ path[i].p_block = path[i].p_hdr->eh_entries + 1; -+ ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n", -+ path[i].p_hdr, path[i].p_hdr->eh_entries); -+ } else { -+ /* we've already was here, see at next index */ -+ path[i].p_idx--; -+ } -+ -+ ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n", -+ i, EXT_FIRST_INDEX(path[i].p_hdr), -+ path[i].p_idx); -+ if (ext3_ext_more_to_rm(path + i)) { -+ /* go to the next level */ -+ ext_debug(tree, "move to level %d (block %d)\n", -+ i + 1, path[i].p_idx->ei_leaf); -+ memset(path + i + 1, 0, sizeof(*path)); -+ path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf); -+ if (!path[i+1].p_bh) { -+ /* should we reset i_size? */ -+ err = -EIO; -+ break; -+ } -+ /* put actual number of indexes to know is this -+ * number got changed at the next iteration */ -+ path[i].p_block = path[i].p_hdr->eh_entries; -+ i++; -+ } else { -+ /* we finish processing this index, go up */ -+ if (path[i].p_hdr->eh_entries == 0 && i > 0) { -+ /* index is empty, remove it -+ * handle must be already prepared by the -+ * truncatei_leaf() */ -+ err = ext3_ext_rm_idx(handle, tree, path + i); -+ } -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ ext_debug(tree, "return to level %d\n", i); -+ } -+ } -+ -+ /* TODO: flexible tree reduction should be here */ -+ if (path->p_hdr->eh_entries == 0) { -+ /* -+ * truncate to zero freed all the tree -+ * so, we need to correct eh_depth -+ */ -+ err = ext3_ext_get_access(handle, tree, path); -+ if (err == 0) { -+ EXT_ROOT_HDR(tree)->eh_depth = 0; -+ EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree); -+ err = ext3_ext_dirty(handle, tree, path); -+ } -+ } -+ ext3_ext_tree_changed(tree); -+ -+ kfree(path); -+ ext3_journal_stop(handle); -+ -+ return err; -+} -+ -+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks) -+{ -+ int lcap, icap, rcap, leafs, idxs, num; -+ -+ rcap = ext3_ext_space_root(tree); -+ if (blocks <= rcap) { -+ /* all extents fit to the root */ -+ return 0; -+ } -+ -+ rcap = ext3_ext_space_root_idx(tree); -+ lcap = ext3_ext_space_block(tree); -+ icap = ext3_ext_space_block_idx(tree); -+ -+ num = leafs = (blocks + lcap - 1) / lcap; -+ if (leafs <= rcap) { -+ /* all pointers to leafs fit to the root */ -+ return leafs; -+ } -+ -+ /* ok. we need separate index block(s) to link all leaf blocks */ -+ idxs = (leafs + icap - 1) / icap; -+ do { -+ num += idxs; -+ idxs = (idxs + icap - 1) / icap; -+ } while (idxs > rcap); -+ -+ return num; -+} -+ -+/* -+ * called at mount time -+ */ -+void ext3_ext_init(struct super_block *sb) -+{ -+ /* -+ * possible initialization would be here -+ */ -+ -+ if (test_opt(sb, EXTENTS)) { -+ printk("EXT3-fs: file extents enabled"); -+#ifdef AGRESSIVE_TEST -+ printk(", agressive tests"); -+#endif -+#ifdef CHECK_BINSEARCH -+ printk(", check binsearch"); -+#endif -+ printk("\n"); -+ } -+} -+ -+/* -+ * called at umount time -+ */ -+void ext3_ext_release(struct super_block *sb) -+{ -+} -+ -+/************************************************************************ -+ * VFS related routines -+ ************************************************************************/ -+ -+static int ext3_get_inode_write_access(handle_t *handle, void *buffer) -+{ -+ /* we use in-core data, not bh */ -+ return 0; -+} -+ -+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer) -+{ -+ struct inode *inode = buffer; -+ return ext3_mark_inode_dirty(handle, inode); -+} -+ -+static int ext3_ext_mergable(struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ /* FIXME: support for large fs */ -+ if (ex1->ee_start + ex1->ee_len == ex2->ee_start) -+ return 1; -+ return 0; -+} -+ -+static int -+ext3_remove_blocks_credits(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed; -+ -+ /* at present, extent can't cross block group */; -+ needed = 4; /* bitmap + group desc + sb + inode */ -+ -+#ifdef CONFIG_QUOTA -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ return needed; -+} -+ -+static int -+ext3_remove_blocks(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed = ext3_remove_blocks_credits(tree, ex, from, to); -+ handle_t *handle = ext3_journal_start(tree->inode, needed); -+ struct buffer_head *bh; -+ int i; -+ -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { -+ /* tail removal */ -+ unsigned long num, start; -+ num = ex->ee_block + ex->ee_len - from; -+ start = ex->ee_start + ex->ee_len - num; -+ ext_debug(tree, "free last %lu blocks starting %lu\n", -+ num, start); -+ for (i = 0; i < num; i++) { -+ bh = sb_find_get_block(tree->inode->i_sb, start + i); -+ ext3_forget(handle, 0, tree->inode, bh, start + i); -+ } -+ ext3_free_blocks(handle, tree->inode, start, num); -+ } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { -+ printk("strange request: removal %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } else { -+ printk("strange request: removal(2) %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } -+ ext3_journal_stop(handle); -+ return 0; -+} -+ -+static int ext3_ext_find_goal(struct inode *inode, -+ struct ext3_ext_path *path, unsigned long block) -+{ -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ int depth; -+ -+ if (path) { -+ struct ext3_extent *ex; -+ depth = path->p_depth; -+ -+ /* try to predict block placement */ -+ if ((ex = path[depth].p_ext)) -+ return ex->ee_start + (block - ex->ee_block); -+ -+ /* it looks index is empty -+ * try to find starting from index itself */ -+ if (path[depth].p_bh) -+ return path[depth].p_bh->b_blocknr; -+ } -+ -+ /* OK. use inode's group */ -+ bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ return bg_start + colour + block; -+} -+ -+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *ex, int *err) -+{ -+ struct inode *inode = tree->inode; -+ int newblock, goal; -+ -+ EXT_ASSERT(path); -+ EXT_ASSERT(ex); -+ EXT_ASSERT(ex->ee_start); -+ EXT_ASSERT(ex->ee_len); -+ -+ /* reuse block from the extent to order data/metadata */ -+ newblock = ex->ee_start++; -+ ex->ee_len--; -+ if (ex->ee_len == 0) { -+ ex->ee_len = 1; -+ /* allocate new block for the extent */ -+ goal = ext3_ext_find_goal(inode, path, ex->ee_block); -+ ex->ee_start = ext3_new_block(handle, inode, goal, err); -+ ex->ee_start_hi = 0; -+ if (ex->ee_start == 0) { -+ /* error occured: restore old extent */ -+ ex->ee_start = newblock; -+ return 0; -+ } -+ } -+ return newblock; -+} -+ -+static struct ext3_extents_helpers ext3_blockmap_helpers = { -+ .get_write_access = ext3_get_inode_write_access, -+ .mark_buffer_dirty = ext3_mark_buffer_dirty, -+ .mergable = ext3_ext_mergable, -+ .new_block = ext3_new_block_cb, -+ .remove_extent = ext3_remove_blocks, -+ .remove_extent_credits = ext3_remove_blocks_credits, -+}; -+ -+void ext3_init_tree_desc(struct ext3_extents_tree *tree, -+ struct inode *inode) -+{ -+ tree->inode = inode; -+ tree->root = (void *) EXT3_I(inode)->i_data; -+ tree->buffer = (void *) inode; -+ tree->buffer_len = sizeof(EXT3_I(inode)->i_data); -+ tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent; -+ tree->ops = &ext3_blockmap_helpers; -+} -+ -+int ext3_ext_get_block(handle_t *handle, struct inode *inode, -+ long iblock, struct buffer_head *bh_result, -+ int create, int extend_disksize) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_extent newex; -+ struct ext3_extent *ex; -+ int goal, newblock, err = 0, depth; -+ struct ext3_extents_tree tree; -+ -+ clear_buffer_new(bh_result); -+ ext3_init_tree_desc(&tree, inode); -+ ext_debug(&tree, "block %d requested for inode %u\n", -+ (int) iblock, (unsigned) inode->i_ino); -+ down(&EXT3_I(inode)->truncate_sem); -+ -+ /* check in cache */ -+ if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) { -+ if (goal == EXT3_EXT_CACHE_GAP) { -+ if (!create) { -+ /* block isn't allocated yet and -+ * user don't want to allocate it */ -+ goto out2; -+ } -+ /* we should allocate requested block */ -+ } else if (goal == EXT3_EXT_CACHE_EXTENT) { -+ /* block is already allocated */ -+ newblock = iblock - newex.ee_block + newex.ee_start; -+ goto out; -+ } else { -+ EXT_ASSERT(0); -+ } -+ } -+ -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(&tree, iblock, NULL); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ goto out2; -+ } -+ -+ depth = EXT_DEPTH(&tree); -+ -+ /* -+ * consistent leaf must not be empty -+ * this situations is possible, though, _during_ tree modification -+ * this is why assert can't be put in ext3_ext_find_extent() -+ */ -+ EXT_ASSERT(path[depth].p_ext != NULL || depth == 0); -+ -+ if ((ex = path[depth].p_ext)) { -+ /* if found exent covers block, simple return it */ -+ if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) { -+ newblock = iblock - ex->ee_block + ex->ee_start; -+ ext_debug(&tree, "%d fit into %d:%d -> %d\n", -+ (int) iblock, ex->ee_block, ex->ee_len, -+ newblock); -+ ext3_ext_put_in_cache(&tree, ex->ee_block, -+ ex->ee_len, ex->ee_start, -+ EXT3_EXT_CACHE_EXTENT); -+ goto out; -+ } -+ } -+ -+ /* -+ * requested block isn't allocated yet -+ * we couldn't try to create block if create flag is zero -+ */ -+ if (!create) { -+ /* put just found gap into cache to speedup subsequest reqs */ -+ ext3_ext_put_gap_in_cache(&tree, path, iblock); -+ goto out2; -+ } -+ -+ /* allocate new block */ -+ goal = ext3_ext_find_goal(inode, path, iblock); -+ newblock = ext3_new_block(handle, inode, goal, &err); -+ if (!newblock) -+ goto out2; -+ ext_debug(&tree, "allocate new block: goal %d, found %d\n", -+ goal, newblock); -+ -+ /* try to insert new extent into found leaf and return */ -+ newex.ee_block = iblock; -+ newex.ee_start = newblock; -+ newex.ee_start_hi = 0; -+ newex.ee_len = 1; -+ err = ext3_ext_insert_extent(handle, &tree, path, &newex); -+ if (err) -+ goto out2; -+ -+ if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize) -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ -+ /* previous routine could use block we allocated */ -+ newblock = newex.ee_start; -+ set_buffer_new(bh_result); -+ -+ ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len, -+ newex.ee_start, EXT3_EXT_CACHE_EXTENT); -+out: -+ ext3_ext_show_leaf(&tree, path); -+ map_bh(bh_result, inode->i_sb, newblock); -+out2: -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ up(&EXT3_I(inode)->truncate_sem); -+ -+ return err; -+} -+ -+void ext3_ext_truncate(struct inode * inode, struct page *page) -+{ -+ struct address_space *mapping = inode->i_mapping; -+ struct super_block *sb = inode->i_sb; -+ struct ext3_extents_tree tree; -+ unsigned long last_block; -+ handle_t *handle; -+ int err = 0; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ /* -+ * probably first extent we're gonna free will be last in block -+ */ -+ err = ext3_writepage_trans_blocks(inode) + 3; -+ handle = ext3_journal_start(inode, err); -+ if (IS_ERR(handle)) { -+ if (page) { -+ clear_highpage(page); -+ flush_dcache_page(page); -+ unlock_page(page); -+ page_cache_release(page); -+ } -+ return; -+ } -+ -+ if (page) -+ ext3_block_truncate_page(handle, page, mapping, inode->i_size); -+ -+ down(&EXT3_I(inode)->truncate_sem); -+ ext3_ext_invalidate_cache(&tree); -+ -+ /* -+ * TODO: optimization is possible here -+ * probably we need not scaning at all, -+ * because page truncation is enough -+ */ -+ if (ext3_orphan_add(handle, inode)) -+ goto out_stop; -+ -+ /* we have to know where to truncate from in crash case */ -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ ext3_mark_inode_dirty(handle, inode); -+ -+ last_block = (inode->i_size + sb->s_blocksize - 1) >> -+ EXT3_BLOCK_SIZE_BITS(sb); -+ err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK); -+ -+ /* In a multi-transaction truncate, we only make the final -+ * transaction synchronous */ -+ if (IS_SYNC(inode)) -+ handle->h_sync = 1; -+ -+out_stop: -+ /* -+ * If this was a simple ftruncate(), and the file will remain alive -+ * then we need to clear up the orphan record which we created above. -+ * However, if this was a real unlink then we were called by -+ * ext3_delete_inode(), and we allow that function to clean up the -+ * orphan info for us. -+ */ -+ if (inode->i_nlink) -+ ext3_orphan_del(handle, inode); -+ -+ up(&EXT3_I(inode)->truncate_sem); -+ ext3_journal_stop(handle); -+} -+ -+/* -+ * this routine calculate max number of blocks we could modify -+ * in order to allocate new block for an inode -+ */ -+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num) -+{ -+ struct ext3_extents_tree tree; -+ int needed; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ needed = ext3_ext_calc_credits_for_insert(&tree, NULL); -+ -+ /* caller want to allocate num blocks */ -+ needed *= num; -+ -+#ifdef CONFIG_QUOTA -+ /* -+ * FIXME: real calculation should be here -+ * it depends on blockmap format of qouta file -+ */ -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ -+ return needed; -+} -+ -+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ ext3_extent_tree_init(handle, &tree); -+} -+ -+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ return ext3_ext_calc_metadata_amount(&tree, blocks); -+} -+ -+static int -+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *newex) -+{ -+ struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private; -+ -+ if (newex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ if (buf->err < 0) -+ return EXT_BREAK; -+ if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen) -+ return EXT_BREAK; -+ -+ if (!copy_to_user(buf->cur, newex, sizeof(*newex))) { -+ buf->err++; -+ buf->cur += sizeof(*newex); -+ } else { -+ buf->err = -EFAULT; -+ return EXT_BREAK; -+ } -+ return EXT_CONTINUE; -+} -+ -+static int -+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *ex) -+{ -+ struct ext3_extent_tree_stats *buf = -+ (struct ext3_extent_tree_stats *) tree->private; -+ int depth; -+ -+ if (ex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ depth = EXT_DEPTH(tree); -+ buf->extents_num++; -+ if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr)) -+ buf->leaf_num++; -+ return EXT_CONTINUE; -+} -+ -+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, -+ unsigned long arg) -+{ -+ int err = 0; -+ -+ if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)) -+ return -EINVAL; -+ -+ if (cmd == EXT3_IOC_GET_EXTENTS) { -+ struct ext3_extent_buf buf; -+ struct ext3_extents_tree tree; -+ -+ if (copy_from_user(&buf, (void *) arg, sizeof(buf))) -+ return -EFAULT; -+ -+ ext3_init_tree_desc(&tree, inode); -+ buf.cur = buf.buffer; -+ buf.err = 0; -+ tree.private = &buf; -+ down(&EXT3_I(inode)->truncate_sem); -+ err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK, -+ ext3_ext_store_extent_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (err == 0) -+ err = buf.err; -+ } else if (cmd == EXT3_IOC_GET_TREE_STATS) { -+ struct ext3_extent_tree_stats buf; -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ buf.depth = EXT_DEPTH(&tree); -+ buf.extents_num = 0; -+ buf.leaf_num = 0; -+ tree.private = &buf; -+ err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK, -+ ext3_ext_collect_stats_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (!err) -+ err = copy_to_user((void *) arg, &buf, sizeof(buf)); -+ } else if (cmd == EXT3_IOC_GET_TREE_DEPTH) { -+ struct ext3_extents_tree tree; -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ err = EXT_DEPTH(&tree); -+ up(&EXT3_I(inode)->truncate_sem); -+ } -+ -+ return err; -+} -+ -+EXPORT_SYMBOL(ext3_init_tree_desc); -+EXPORT_SYMBOL(ext3_mark_inode_dirty); -+EXPORT_SYMBOL(ext3_ext_invalidate_cache); -+EXPORT_SYMBOL(ext3_ext_insert_extent); -+EXPORT_SYMBOL(ext3_ext_walk_space); -+EXPORT_SYMBOL(ext3_ext_find_goal); -+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert); -Index: linux-2.6.12-rc6/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/ialloc.c 2005-06-14 16:31:08.634433030 +0200 -+++ linux-2.6.12-rc6/fs/ext3/ialloc.c 2005-06-14 16:31:25.846346882 +0200 -@@ -598,7 +598,7 @@ - ei->i_dir_start_lookup = 0; - ei->i_disksize = 0; - -- ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL; -+ ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL); - if (S_ISLNK(mode)) - ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL); - /* dirsync only applies to directories */ -@@ -639,6 +639,18 @@ - DQUOT_FREE_INODE(inode); - goto fail2; - } -+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) { -+ EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL; -+ ext3_extents_initialize_blockmap(handle, inode); -+ if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) { -+ err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh); -+ if (err) goto fail; -+ EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS); -+ BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata"); -+ err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); -+ } -+ } -+ - err = ext3_mark_inode_dirty(handle, inode); - if (err) { - ext3_std_error(sb, err); -Index: linux-2.6.12-rc6/fs/ext3/inode.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/inode.c 2005-06-14 16:31:09.701815830 +0200 -+++ linux-2.6.12-rc6/fs/ext3/inode.c 2005-06-14 16:31:25.861971882 +0200 -@@ -40,7 +40,7 @@ - #include "iopen.h" - #include "acl.h" - --static int ext3_writepage_trans_blocks(struct inode *inode); -+int ext3_writepage_trans_blocks(struct inode *inode); - - /* - * Test whether an inode is a fast symlink. -@@ -784,6 +784,17 @@ - return err; - } - -+static inline int -+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block, -+ struct buffer_head *bh, int create, int extend_disksize) -+{ -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_get_block(handle, inode, block, bh, create, -+ extend_disksize); -+ return ext3_get_block_handle(handle, inode, block, bh, create, -+ extend_disksize); -+} -+ - static int ext3_get_block(struct inode *inode, sector_t iblock, - struct buffer_head *bh_result, int create) - { -@@ -794,8 +805,8 @@ - handle = ext3_journal_current_handle(); - J_ASSERT(handle != 0); - } -- ret = ext3_get_block_handle(handle, inode, iblock, -- bh_result, create, 1); -+ ret = ext3_get_block_wrap(handle, inode, iblock, -+ bh_result, create, 1); - return ret; - } - -@@ -839,7 +850,7 @@ - - get_block: - if (ret == 0) -- ret = ext3_get_block_handle(handle, inode, iblock, -+ ret = ext3_get_block_wrap(handle, inode, iblock, - bh_result, create, 0); - bh_result->b_size = (1 << inode->i_blkbits); - return ret; -@@ -859,7 +870,7 @@ - dummy.b_state = 0; - dummy.b_blocknr = -1000; - buffer_trace_init(&dummy.b_history); -- *errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1); -+ *errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1); - if (!*errp && buffer_mapped(&dummy)) { - struct buffer_head *bh; - bh = sb_getblk(inode->i_sb, dummy.b_blocknr); -@@ -1593,7 +1604,7 @@ - * This required during truncate. We need to physically zero the tail end - * of that block so it doesn't yield old data if the file is later grown. - */ --static int ext3_block_truncate_page(handle_t *handle, struct page *page, -+int ext3_block_truncate_page(handle_t *handle, struct page *page, - struct address_space *mapping, loff_t from) - { - unsigned long index = from >> PAGE_CACHE_SHIFT; -@@ -2104,6 +2115,9 @@ - return; - } - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_truncate(inode, page); -+ - handle = start_transaction(inode); - if (IS_ERR(handle)) { - if (page) { -@@ -2850,12 +2864,15 @@ - * block and work out the exact number of indirects which are touched. Pah. - */ - --static int ext3_writepage_trans_blocks(struct inode *inode) -+int ext3_writepage_trans_blocks(struct inode *inode) - { - int bpp = ext3_journal_blocks_per_page(inode); - int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3; - int ret; - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_writepage_trans_blocks(inode, bpp); -+ - if (ext3_should_journal_data(inode)) - ret = 3 * (bpp + indirects) + 2; - else -Index: linux-2.6.12-rc6/fs/ext3/Makefile -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/Makefile 2005-06-14 16:31:09.179354899 +0200 -+++ linux-2.6.12-rc6/fs/ext3/Makefile 2005-06-14 16:31:25.872714069 +0200 -@@ -5,7 +5,8 @@ - obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ -- ioctl.o namei.o super.o symlink.o hash.o resize.o -+ ioctl.o namei.o super.o symlink.o hash.o resize.o \ -+ extents.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o -Index: linux-2.6.12-rc6/fs/ext3/super.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/super.c 2005-06-14 16:31:09.950839264 +0200 -+++ linux-2.6.12-rc6/fs/ext3/super.c 2005-06-14 16:31:25.886385944 +0200 -@@ -387,6 +387,7 @@ - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); - if (!(sb->s_flags & MS_RDONLY)) { -@@ -451,6 +452,8 @@ - #endif - ei->i_block_alloc_info = NULL; - ei->vfs_inode.i_version = 1; -+ -+ memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent)); - return &ei->vfs_inode; - } - -@@ -593,6 +596,7 @@ - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, -+ Opt_extents, Opt_noextents, Opt_extdebug, - }; - - static match_table_t tokens = { -@@ -644,6 +647,9 @@ - {Opt_iopen, "iopen"}, - {Opt_noiopen, "noiopen"}, - {Opt_iopen_nopriv, "iopen_nopriv"}, -+ {Opt_extents, "extents"}, -+ {Opt_noextents, "noextents"}, -+ {Opt_extdebug, "extdebug"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -953,6 +958,15 @@ - case Opt_nobh: - set_opt(sbi->s_mount_opt, NOBH); - break; -+ case Opt_extents: -+ set_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_noextents: -+ clear_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_extdebug: -+ set_opt (sbi->s_mount_opt, EXTDEBUG); -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1668,6 +1681,7 @@ - percpu_counter_mod(&sbi->s_dirs_counter, - ext3_count_dirs(sb)); - -+ ext3_ext_init(sb); - lock_kernel(); - return 0; - -Index: linux-2.6.12-rc6/fs/ext3/ioctl.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/ioctl.c 2005-06-14 16:31:08.646151780 +0200 -+++ linux-2.6.12-rc6/fs/ext3/ioctl.c 2005-06-14 16:31:25.897128131 +0200 -@@ -124,6 +124,10 @@ - err = ext3_change_inode_journal_flag(inode, jflag); - return err; - } -+ case EXT3_IOC_GET_EXTENTS: -+ case EXT3_IOC_GET_TREE_STATS: -+ case EXT3_IOC_GET_TREE_DEPTH: -+ return ext3_ext_ioctl(inode, filp, cmd, arg); - case EXT3_IOC_GETVERSION: - case EXT3_IOC_GETVERSION_OLD: - return put_user(inode->i_generation, (int __user *) arg); -Index: linux-2.6.12-rc6/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.12-rc6.orig/include/linux/ext3_fs.h 2005-06-14 16:31:10.185214261 +0200 -+++ linux-2.6.12-rc6/include/linux/ext3_fs.h 2005-06-14 16:31:52.859041864 +0200 -@@ -186,8 +186,9 @@ - #define EXT3_NOTAIL_FL 0x00008000 /* don't merge file tail */ - #define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ - #define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ -+#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ - #define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */ - --#define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ -+#define EXT3_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */ - #define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ - -@@ -237,6 +238,9 @@ - #endif - #define EXT3_IOC_GETRSVSZ _IOR('f', 5, long) - #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) -+#define EXT3_IOC_GET_EXTENTS _IOR('f', 7, long) -+#define EXT3_IOC_GET_TREE_DEPTH _IOR('f', 8, long) -+#define EXT3_IOC_GET_TREE_STATS _IOR('f', 9, long) - - /* - * Structure of an inode on the disk -@@ -360,6 +364,8 @@ - #define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */ - #define EXT3_MOUNT_IOPEN 0x80000 /* Allow access via iopen */ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ -+#define EXT3_MOUNT_EXTENTS 0x200000/* Extents support */ -+#define EXT3_MOUNT_EXTDEBUG 0x400000/* Extents debug */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -548,11 +554,13 @@ - #define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ - #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ - #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 -+#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ - - #define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR - #define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \ - EXT3_FEATURE_INCOMPAT_RECOVER| \ -- EXT3_FEATURE_INCOMPAT_META_BG) -+ EXT3_FEATURE_INCOMPAT_META_BG| \ -+ EXT3_FEATURE_INCOMPAT_EXTENTS) - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) -@@ -759,6 +767,9 @@ - - - /* inode.c */ -+extern int ext3_block_truncate_page(handle_t *, struct page *, -+ struct address_space *, loff_t); -+extern int ext3_writepage_trans_blocks(struct inode *inode); - extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); - extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); - extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); -@@ -828,6 +837,16 @@ - extern struct inode_operations ext3_symlink_inode_operations; - extern struct inode_operations ext3_fast_symlink_inode_operations; - -+/* extents.c */ -+extern int ext3_ext_writepage_trans_blocks(struct inode *, int); -+extern int ext3_ext_get_block(handle_t *, struct inode *, long, -+ struct buffer_head *, int, int); -+extern void ext3_ext_truncate(struct inode *, struct page *); -+extern void ext3_ext_init(struct super_block *); -+extern void ext3_ext_release(struct super_block *); -+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *); -+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, -+ unsigned int cmd, unsigned long arg); - - #endif /* __KERNEL__ */ - -Index: linux-2.6.12-rc6/include/linux/ext3_extents.h -=================================================================== ---- linux-2.6.12-rc6.orig/include/linux/ext3_extents.h 2005-06-14 16:31:25.780917195 +0200 -+++ linux-2.6.12-rc6/include/linux/ext3_extents.h 2005-06-14 16:31:25.932284381 +0200 -@@ -0,0 +1,262 @@ -+/* -+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+#ifndef _LINUX_EXT3_EXTENTS -+#define _LINUX_EXT3_EXTENTS -+ -+/* -+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks -+ * become very little, so index split, in-depth growing and -+ * other hard changes happens much more often -+ * this is for debug purposes only -+ */ -+#define AGRESSIVE_TEST_ -+ -+/* -+ * if CHECK_BINSEARCH defined, then results of binary search -+ * will be checked by linear search -+ */ -+#define CHECK_BINSEARCH_ -+ -+/* -+ * if EXT_DEBUG is defined you can use 'extdebug' mount option -+ * to get lots of info what's going on -+ */ -+#define EXT_DEBUG_ -+#ifdef EXT_DEBUG -+#define ext_debug(tree,fmt,a...) \ -+do { \ -+ if (test_opt((tree)->inode->i_sb, EXTDEBUG)) \ -+ printk(fmt, ##a); \ -+} while (0); -+#else -+#define ext_debug(tree,fmt,a...) -+#endif -+ -+/* -+ * if EXT_STATS is defined then stats numbers are collected -+ * these number will be displayed at umount time -+ */ -+#define EXT_STATS_ -+ -+ -+#define EXT3_ALLOC_NEEDED 3 /* block bitmap + group desc. + sb */ -+ -+/* -+ * ext3_inode has i_block array (total 60 bytes) -+ * first 4 bytes are used to store: -+ * - tree depth (0 mean there is no tree yet. all extents in the inode) -+ * - number of alive extents in the inode -+ */ -+ -+/* -+ * this is extent on-disk structure -+ * it's used at the bottom of the tree -+ */ -+struct ext3_extent { -+ __u32 ee_block; /* first logical block extent covers */ -+ __u16 ee_len; /* number of blocks covered by extent */ -+ __u16 ee_start_hi; /* high 16 bits of physical block */ -+ __u32 ee_start; /* low 32 bigs of physical block */ -+}; -+ -+/* -+ * this is index on-disk structure -+ * it's used at all the levels, but the bottom -+ */ -+struct ext3_extent_idx { -+ __u32 ei_block; /* index covers logical blocks from 'block' */ -+ __u32 ei_leaf; /* pointer to the physical block of the next * -+ * level. leaf or next index could bet here */ -+ __u16 ei_leaf_hi; /* high 16 bits of physical block */ -+ __u16 ei_unused; -+}; -+ -+/* -+ * each block (leaves and indexes), even inode-stored has header -+ */ -+struct ext3_extent_header { -+ __u16 eh_magic; /* probably will support different formats */ -+ __u16 eh_entries; /* number of valid entries */ -+ __u16 eh_max; /* capacity of store in entries */ -+ __u16 eh_depth; /* has tree real underlaying blocks? */ -+ __u32 eh_generation; /* flags(8 bits) | generation of the tree */ -+}; -+ -+#define EXT3_EXT_MAGIC 0xf30a -+ -+/* -+ * array of ext3_ext_path contains path to some extent -+ * creation/lookup routines use it for traversal/splitting/etc -+ * truncate uses it to simulate recursive walking -+ */ -+struct ext3_ext_path { -+ __u32 p_block; -+ __u16 p_depth; -+ struct ext3_extent *p_ext; -+ struct ext3_extent_idx *p_idx; -+ struct ext3_extent_header *p_hdr; -+ struct buffer_head *p_bh; -+}; -+ -+/* -+ * structure for external API -+ */ -+ -+/* -+ * storage for cached extent -+ */ -+struct ext3_ext_cache { -+ __u32 ec_start; -+ __u32 ec_block; -+ __u32 ec_len; -+ __u32 ec_type; -+}; -+ -+#define EXT3_EXT_CACHE_NO 0 -+#define EXT3_EXT_CACHE_GAP 1 -+#define EXT3_EXT_CACHE_EXTENT 2 -+ -+/* -+ * ext3_extents_tree is used to pass initial information -+ * to top-level extents API -+ */ -+struct ext3_extents_helpers; -+struct ext3_extents_tree { -+ struct inode *inode; /* inode which tree belongs to */ -+ void *root; /* ptr to data top of tree resides at */ -+ void *buffer; /* will be passed as arg to ^^ routines */ -+ int buffer_len; -+ void *private; -+ struct ext3_ext_cache *cex;/* last found extent */ -+ struct ext3_extents_helpers *ops; -+}; -+ -+struct ext3_extents_helpers { -+ int (*get_write_access)(handle_t *h, void *buffer); -+ int (*mark_buffer_dirty)(handle_t *h, void *buffer); -+ int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2); -+ int (*remove_extent_credits)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*remove_extent)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*new_block)(handle_t *, struct ext3_extents_tree *, -+ struct ext3_ext_path *, struct ext3_extent *, -+ int *); -+}; -+ -+/* -+ * to be called by ext3_ext_walk_space() -+ * negative retcode - error -+ * positive retcode - signal for ext3_ext_walk_space(), see below -+ * callback must return valid extent (passed or newly created) -+ */ -+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *, -+ struct ext3_ext_path *, -+ struct ext3_ext_cache *); -+ -+#define EXT_CONTINUE 0 -+#define EXT_BREAK 1 -+#define EXT_REPEAT 2 -+ -+ -+#define EXT_MAX_BLOCK 0xffffffff -+ -+ -+#define EXT_FIRST_EXTENT(__hdr__) \ -+ ((struct ext3_extent *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_FIRST_INDEX(__hdr__) \ -+ ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_HAS_FREE_INDEX(__path__) \ -+ ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max) -+#define EXT_LAST_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_LAST_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_MAX_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_MAX_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_HDR_GEN(__hdr__) ((__hdr__)->eh_generation & 0x00ffffff) -+#define EXT_FLAGS(__hdr__) ((__hdr__)->eh_generation >> 24) -+#define EXT_FLAGS_CLR_UNKNOWN 0x7 /* Flags cleared on modification */ -+ -+#define EXT_BLOCK_HDR(__bh__) ((struct ext3_extent_header *)(__bh__)->b_data) -+#define EXT_ROOT_HDR(__tree__) ((struct ext3_extent_header *)(__tree__)->root) -+#define EXT_DEPTH(__tree__) (EXT_ROOT_HDR(__tree__)->eh_depth) -+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__)) -+ -+#define EXT_ASSERT(__x__) if (!(__x__)) BUG(); -+ -+#define EXT_CHECK_PATH(tree,path) \ -+{ \ -+ int depth = EXT_DEPTH(tree); \ -+ BUG_ON((unsigned long) (path) < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_idx < \ -+ __PAGE_OFFSET && (path)[depth].p_idx != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_ext < \ -+ __PAGE_OFFSET && (path)[depth].p_ext != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET \ -+ && depth != 0); \ -+ BUG_ON((path)[0].p_depth != depth); \ -+} -+ -+ -+/* -+ * this structure is used to gather extents from the tree via ioctl -+ */ -+struct ext3_extent_buf { -+ unsigned long start; -+ int buflen; -+ void *buffer; -+ void *cur; -+ int err; -+}; -+ -+/* -+ * this structure is used to collect stats info about the tree -+ */ -+struct ext3_extent_tree_stats { -+ int depth; -+ int extents_num; -+ int leaf_num; -+}; -+ -+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *); -+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *); -+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *); -+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *); -+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback); -+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long); -+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *); -+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int); -+ -+static inline void -+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree) -+{ -+ if (tree->cex) -+ tree->cex->ec_type = EXT3_EXT_CACHE_NO; -+} -+ -+ -+#endif /* _LINUX_EXT3_EXTENTS */ -Index: linux-2.6.12-rc6/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.12-rc6.orig/include/linux/ext3_fs_i.h 2005-06-06 17:22:29.000000000 +0200 -+++ linux-2.6.12-rc6/include/linux/ext3_fs_i.h 2005-06-14 16:31:25.941073443 +0200 -@@ -133,6 +133,8 @@ - */ - struct semaphore truncate_sem; - struct inode vfs_inode; -+ -+ __u32 i_cached_extent[4]; - }; - - #endif /* _LINUX_EXT3_FS_I */ diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.15.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.15.patch deleted file mode 100644 index ea69e84b46..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.15.patch +++ /dev/null @@ -1,2947 +0,0 @@ -Index: linux-2.6.16.21-0.8/fs/ext3/extents.c -=================================================================== ---- /dev/null -+++ linux-2.6.16.21-0.8/fs/ext3/extents.c -@@ -0,0 +1,2359 @@ -+/* -+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+/* -+ * Extents support for EXT3 -+ * -+ * TODO: -+ * - ext3_ext_walk_space() sould not use ext3_ext_find_extent() -+ * - ext3_ext_calc_credits() could take 'mergable' into account -+ * - ext3*_error() should be used in some situations -+ * - find_goal() [to be tested and improved] -+ * - smart tree reduction -+ * - arch-independence -+ * common on-disk format for big/little-endian arch -+ */ -+ -+#include <linux/module.h> -+#include <linux/fs.h> -+#include <linux/time.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/smp_lock.h> -+#include <linux/highuid.h> -+#include <linux/pagemap.h> -+#include <linux/quotaops.h> -+#include <linux/string.h> -+#include <linux/slab.h> -+#include <linux/ext3_extents.h> -+#include <asm/uaccess.h> -+ -+ -+static inline int ext3_ext_check_header(struct ext3_extent_header *eh) -+{ -+ if (eh->eh_magic != EXT3_EXT_MAGIC) { -+ printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n", -+ (unsigned)eh->eh_magic); -+ return -EIO; -+ } -+ if (eh->eh_max == 0) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n", -+ (unsigned)eh->eh_max); -+ return -EIO; -+ } -+ if (eh->eh_entries > eh->eh_max) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n", -+ (unsigned)eh->eh_entries); -+ return -EIO; -+ } -+ return 0; -+} -+ -+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed) -+{ -+ int err; -+ -+ if (handle->h_buffer_credits > needed) -+ return handle; -+ if (!ext3_journal_extend(handle, needed)) -+ return handle; -+ err = ext3_journal_restart(handle, needed); -+ -+ return handle; -+} -+ -+static int inline -+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->get_write_access) -+ return tree->ops->get_write_access(h,tree->buffer); -+ else -+ return 0; -+} -+ -+static int inline -+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->mark_buffer_dirty) -+ return tree->ops->mark_buffer_dirty(h,tree->buffer); -+ else -+ return 0; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ */ -+static int ext3_ext_get_access(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ -+ if (path->p_bh) { -+ /* path points to block */ -+ err = ext3_journal_get_write_access(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_get_access_for_root(handle, tree); -+ } -+ return err; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ * - EIO -+ */ -+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ if (path->p_bh) { -+ /* path points to block */ -+ err =ext3_journal_dirty_metadata(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_mark_root_dirty(handle, tree); -+ } -+ return err; -+} -+ -+static int inline -+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, struct ext3_extent *ex, -+ int *err) -+{ -+ int goal, depth, newblock; -+ struct inode *inode; -+ -+ EXT_ASSERT(tree); -+ if (tree->ops->new_block) -+ return tree->ops->new_block(handle, tree, path, ex, err); -+ -+ inode = tree->inode; -+ depth = EXT_DEPTH(tree); -+ if (path && depth > 0) { -+ goal = path[depth-1].p_block; -+ } else { -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ -+ bg_start = (ei->i_block_group * -+ EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ goal = bg_start + colour; -+ } -+ -+ newblock = ext3_new_block(handle, inode, goal, err); -+ return newblock; -+} -+ -+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *neh = EXT_ROOT_HDR(tree); -+ neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) | -+ (EXT_HDR_GEN(neh) + 1); -+} -+ -+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 6; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 5; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 3; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 4; -+#endif -+ return size; -+} -+ -+static void ext3_ext_show_path(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int k, l = path->p_depth; -+ -+ ext_debug(tree, "path:"); -+ for (k = 0; k <= l; k++, path++) { -+ if (path->p_idx) { -+ ext_debug(tree, " %d->%d", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ } else if (path->p_ext) { -+ ext_debug(tree, " %d:%d:%d", -+ path->p_ext->ee_block, -+ path->p_ext->ee_len, -+ path->p_ext->ee_start); -+ } else -+ ext_debug(tree, " []"); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *eh; -+ struct ext3_extent *ex; -+ int i; -+ -+ if (!path) -+ return; -+ -+ eh = path[depth].p_hdr; -+ ex = EXT_FIRST_EXTENT(eh); -+ -+ for (i = 0; i < eh->eh_entries; i++, ex++) { -+ ext_debug(tree, "%d:%d:%d ", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_drop_refs(struct ext3_ext_path *path) -+{ -+ int depth = path->p_depth; -+ int i; -+ -+ for (i = 0; i <= depth; i++, path++) { -+ if (path->p_bh) { -+ brelse(path->p_bh); -+ path->p_bh = NULL; -+ } -+ } -+} -+ -+/* -+ * binary search for closest index by given block -+ */ -+static inline void -+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent_idx *ix; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_entries > 0); -+ -+ ext_debug(tree, "binsearch for %d(idx): ", block); -+ -+ path->p_idx = ix = EXT_FIRST_INDEX(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ix[l + k].ei_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ix += l; -+ path->p_idx = ix; -+ ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf); -+ -+ while (l++ < r) { -+ if (block < ix->ei_block) -+ break; -+ path->p_idx = ix++; -+ } -+ ext_debug(tree, " -> %d->%d\n", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent_idx *chix; -+ -+ chix = ix = EXT_FIRST_INDEX(eh); -+ for (k = 0; k < eh->eh_entries; k++, ix++) { -+ if (k != 0 && ix->ei_block <= ix[-1].ei_block) { -+ printk("k=%d, ix=0x%p, first=0x%p\n", k, -+ ix, EXT_FIRST_INDEX(eh)); -+ printk("%u <= %u\n", -+ ix->ei_block,ix[-1].ei_block); -+ } -+ EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block); -+ if (block < ix->ei_block) -+ break; -+ chix = ix; -+ } -+ EXT_ASSERT(chix == path->p_idx); -+ } -+#endif -+} -+ -+/* -+ * binary search for closest extent by given block -+ */ -+static inline void -+ext3_ext_binsearch(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent *ex; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ -+ if (eh->eh_entries == 0) { -+ /* -+ * this leaf is empty yet: -+ * we get such a leaf in split/add case -+ */ -+ return; -+ } -+ -+ ext_debug(tree, "binsearch for %d: ", block); -+ -+ path->p_ext = ex = EXT_FIRST_EXTENT(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ex[l + k].ee_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ex += l; -+ path->p_ext = ex; -+ ext_debug(tree, " -> %d:%d:%d ", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+ while (l++ < r) { -+ if (block < ex->ee_block) -+ break; -+ path->p_ext = ex++; -+ } -+ ext_debug(tree, " -> %d:%d:%d\n", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent *chex; -+ -+ chex = ex = EXT_FIRST_EXTENT(eh); -+ for (k = 0; k < eh->eh_entries; k++, ex++) { -+ EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block); -+ if (block < ex->ee_block) -+ break; -+ chex = ex; -+ } -+ EXT_ASSERT(chex == path->p_ext); -+ } -+#endif -+} -+ -+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *eh; -+ -+ BUG_ON(tree->buffer_len == 0); -+ ext3_ext_get_access_for_root(handle, tree); -+ eh = EXT_ROOT_HDR(tree); -+ eh->eh_depth = 0; -+ eh->eh_entries = 0; -+ eh->eh_magic = EXT3_EXT_MAGIC; -+ eh->eh_max = ext3_ext_space_root(tree); -+ ext3_ext_mark_root_dirty(handle, tree); -+ ext3_ext_invalidate_cache(tree); -+ return 0; -+} -+ -+struct ext3_ext_path * -+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ struct buffer_head *bh; -+ int depth, i, ppos = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ eh = EXT_ROOT_HDR(tree); -+ EXT_ASSERT(eh); -+ if (ext3_ext_check_header(eh)) { -+ /* don't free previously allocated path -+ * -- caller should take care */ -+ path = NULL; -+ goto err; -+ } -+ -+ i = depth = EXT_DEPTH(tree); -+ EXT_ASSERT(eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* account possible depth increase */ -+ if (!path) { -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2), -+ GFP_NOFS); -+ if (!path) -+ return ERR_PTR(-ENOMEM); -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[0].p_hdr = eh; -+ -+ /* walk through the tree */ -+ while (i) { -+ ext_debug(tree, "depth %d: num %d, max %d\n", -+ ppos, eh->eh_entries, eh->eh_max); -+ ext3_ext_binsearch_idx(tree, path + ppos, block); -+ path[ppos].p_block = path[ppos].p_idx->ei_leaf; -+ path[ppos].p_depth = i; -+ path[ppos].p_ext = NULL; -+ -+ bh = sb_bread(tree->inode->i_sb, path[ppos].p_block); -+ if (!bh) -+ goto err; -+ -+ eh = EXT_BLOCK_HDR(bh); -+ ppos++; -+ EXT_ASSERT(ppos <= depth); -+ path[ppos].p_bh = bh; -+ path[ppos].p_hdr = eh; -+ i--; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ } -+ -+ path[ppos].p_depth = i; -+ path[ppos].p_hdr = eh; -+ path[ppos].p_ext = NULL; -+ path[ppos].p_idx = NULL; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ -+ /* find extent */ -+ ext3_ext_binsearch(tree, path + ppos, block); -+ -+ ext3_ext_show_path(tree, path); -+ -+ return path; -+ -+err: -+ printk(KERN_ERR "EXT3-fs: header is corrupted!\n"); -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ return ERR_PTR(-EIO); -+} -+ -+/* -+ * insert new index [logical;ptr] into the block at cupr -+ * it check where to insert: before curp or after curp -+ */ -+static int ext3_ext_insert_index(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *curp, -+ int logical, int ptr) -+{ -+ struct ext3_extent_idx *ix; -+ int len, err; -+ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ return err; -+ -+ EXT_ASSERT(logical != curp->p_idx->ei_block); -+ len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx; -+ if (logical > curp->p_idx->ei_block) { -+ /* insert after */ -+ if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { -+ len = (len - 1) * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d after: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ (curp->p_idx + 1), (curp->p_idx + 2)); -+ memmove(curp->p_idx + 2, curp->p_idx + 1, len); -+ } -+ ix = curp->p_idx + 1; -+ } else { -+ /* insert before */ -+ len = len * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d before: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ curp->p_idx, (curp->p_idx + 1)); -+ memmove(curp->p_idx + 1, curp->p_idx, len); -+ ix = curp->p_idx; -+ } -+ -+ ix->ei_block = logical; -+ ix->ei_leaf = ptr; -+ ix->ei_leaf_hi = ix->ei_unused = 0; -+ curp->p_hdr->eh_entries++; -+ -+ EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max); -+ EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr)); -+ -+ err = ext3_ext_dirty(handle, tree, curp); -+ ext3_std_error(tree->inode->i_sb, err); -+ -+ return err; -+} -+ -+/* -+ * routine inserts new subtree into the path, using free index entry -+ * at depth 'at: -+ * - allocates all needed blocks (new leaf and all intermediate index blocks) -+ * - makes decision where to split -+ * - moves remaining extens and index entries (right to the split point) -+ * into the newly allocated blocks -+ * - initialize subtree -+ */ -+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext, int at) -+{ -+ struct buffer_head *bh = NULL; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct ext3_extent *ex; -+ int i = at, k, m, a; -+ unsigned long newblock, oldblock, border; -+ int *ablocks = NULL; /* array of allocated blocks */ -+ int err = 0; -+ -+ /* make decision: where to split? */ -+ /* FIXME: now desicion is simplest: at current extent */ -+ -+ /* if current leaf will be splitted, then we should use -+ * border from split point */ -+ EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr)); -+ if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ border = path[depth].p_ext[1].ee_block; -+ ext_debug(tree, "leaf will be splitted." -+ " next leaf starts at %d\n", -+ (int)border); -+ } else { -+ border = newext->ee_block; -+ ext_debug(tree, "leaf will be added." -+ " next leaf starts at %d\n", -+ (int)border); -+ } -+ -+ /* -+ * if error occurs, then we break processing -+ * and turn filesystem read-only. so, index won't -+ * be inserted and tree will be in consistent -+ * state. next mount will repair buffers too -+ */ -+ -+ /* -+ * get array to track all allocated blocks -+ * we need this to handle errors and free blocks -+ * upon them -+ */ -+ ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS); -+ if (!ablocks) -+ return -ENOMEM; -+ memset(ablocks, 0, sizeof(unsigned long) * depth); -+ -+ /* allocate all needed blocks */ -+ ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at); -+ for (a = 0; a < depth - at; a++) { -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ goto cleanup; -+ ablocks[a] = newblock; -+ } -+ -+ /* initialize new leaf */ -+ newblock = ablocks[--a]; -+ EXT_ASSERT(newblock); -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 0; -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_depth = 0; -+ ex = EXT_FIRST_EXTENT(neh); -+ -+ /* move remain of path[depth] to the new leaf */ -+ EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max); -+ /* start copy from next extent */ -+ /* TODO: we could do it by single memmove */ -+ m = 0; -+ path[depth].p_ext++; -+ while (path[depth].p_ext <= -+ EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ ext_debug(tree, "move %d:%d:%d in new leaf %lu\n", -+ path[depth].p_ext->ee_block, -+ path[depth].p_ext->ee_start, -+ path[depth].p_ext->ee_len, -+ newblock); -+ memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent)); -+ neh->eh_entries++; -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old leaf */ -+ if (m) { -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ path[depth].p_hdr->eh_entries -= m; -+ if ((err = ext3_ext_dirty(handle, tree, path + depth))) -+ goto cleanup; -+ -+ } -+ -+ /* create intermediate indexes */ -+ k = depth - at - 1; -+ EXT_ASSERT(k >= 0); -+ if (k) -+ ext_debug(tree, "create %d intermediate indices\n", k); -+ /* insert new index into current index block */ -+ /* current depth stored in i var */ -+ i = depth - 1; -+ while (k--) { -+ oldblock = newblock; -+ newblock = ablocks[--a]; -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 1; -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ neh->eh_depth = depth - i; -+ fidx = EXT_FIRST_INDEX(neh); -+ fidx->ei_block = border; -+ fidx->ei_leaf = oldblock; -+ fidx->ei_leaf_hi = fidx->ei_unused = 0; -+ -+ ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n", -+ i, newblock, border, oldblock); -+ /* copy indexes */ -+ m = 0; -+ path[i].p_idx++; -+ -+ ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx, -+ EXT_MAX_INDEX(path[i].p_hdr)); -+ EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) == -+ EXT_LAST_INDEX(path[i].p_hdr)); -+ while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { -+ ext_debug(tree, "%d: move %d:%d in new index %lu\n", -+ i, path[i].p_idx->ei_block, -+ path[i].p_idx->ei_leaf, newblock); -+ memmove(++fidx, path[i].p_idx++, -+ sizeof(struct ext3_extent_idx)); -+ neh->eh_entries++; -+ EXT_ASSERT(neh->eh_entries <= neh->eh_max); -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old index */ -+ if (m) { -+ err = ext3_ext_get_access(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ path[i].p_hdr->eh_entries -= m; -+ err = ext3_ext_dirty(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ } -+ -+ i--; -+ } -+ -+ /* insert new index */ -+ if (!err) -+ err = ext3_ext_insert_index(handle, tree, path + at, -+ border, newblock); -+ -+cleanup: -+ if (bh) { -+ if (buffer_locked(bh)) -+ unlock_buffer(bh); -+ brelse(bh); -+ } -+ -+ if (err) { -+ /* free all allocated blocks in error case */ -+ for (i = 0; i < depth; i++) { -+ if (!ablocks[i]) -+ continue; -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ } -+ } -+ kfree(ablocks); -+ -+ return err; -+} -+ -+/* -+ * routine implements tree growing procedure: -+ * - allocates new block -+ * - moves top-level data (index block or leaf) into the new block -+ * - initialize new top-level, creating index that points to the -+ * just created block -+ */ -+static int ext3_ext_grow_indepth(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp = path; -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct buffer_head *bh; -+ unsigned long newblock; -+ int err = 0; -+ -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ return err; -+ -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ ext3_std_error(tree->inode->i_sb, err); -+ return err; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) { -+ unlock_buffer(bh); -+ goto out; -+ } -+ -+ /* move top-level index/leaf into new block */ -+ memmove(bh->b_data, curp->p_hdr, tree->buffer_len); -+ -+ /* set size of new block */ -+ neh = EXT_BLOCK_HDR(bh); -+ /* old root could have indexes or leaves -+ * so calculate eh_max right way */ -+ if (EXT_DEPTH(tree)) -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ else -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto out; -+ -+ /* create index in new top-level index: num,max,pointer */ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ goto out; -+ -+ curp->p_hdr->eh_magic = EXT3_EXT_MAGIC; -+ curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree); -+ curp->p_hdr->eh_entries = 1; -+ curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr); -+ /* FIXME: it works, but actually path[0] can be index */ -+ curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block; -+ curp->p_idx->ei_leaf = newblock; -+ curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0; -+ -+ neh = EXT_ROOT_HDR(tree); -+ fidx = EXT_FIRST_INDEX(neh); -+ ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n", -+ neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); -+ -+ neh->eh_depth = path->p_depth + 1; -+ err = ext3_ext_dirty(handle, tree, curp); -+out: -+ brelse(bh); -+ -+ return err; -+} -+ -+/* -+ * routine finds empty index and adds new leaf. if no free index found -+ * then it requests in-depth growing -+ */ -+static int ext3_ext_create_new_leaf(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp; -+ int depth, i, err = 0; -+ -+repeat: -+ i = depth = EXT_DEPTH(tree); -+ -+ /* walk up to the tree and look for free index entry */ -+ curp = path + depth; -+ while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) { -+ i--; -+ curp--; -+ } -+ -+ /* we use already allocated block for index block -+ * so, subsequent data blocks should be contigoues */ -+ if (EXT_HAS_FREE_INDEX(curp)) { -+ /* if we found index with free entry, then use that -+ * entry: create all needed subtree and add new leaf */ -+ err = ext3_ext_split(handle, tree, path, newext, i); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ } else { -+ /* tree is full, time to grow in depth */ -+ err = ext3_ext_grow_indepth(handle, tree, path, newext); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ -+ /* -+ * only first (depth 0 -> 1) produces free space -+ * in all other cases we have to split growed tree -+ */ -+ depth = EXT_DEPTH(tree); -+ if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) { -+ /* now we need split */ -+ goto repeat; -+ } -+ } -+ -+ if (err) -+ return err; -+ -+ return 0; -+} -+ -+/* -+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK -+ * NOTE: it consider block number from index entry as -+ * allocated block. thus, index entries have to be consistent -+ * with leafs -+ */ -+static unsigned long -+ext3_ext_next_allocated_block(struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ if (depth == 0 && path->p_ext == NULL) -+ return EXT_MAX_BLOCK; -+ -+ /* FIXME: what if index isn't full ?! */ -+ while (depth >= 0) { -+ if (depth == path->p_depth) { -+ /* leaf */ -+ if (path[depth].p_ext != -+ EXT_LAST_EXTENT(path[depth].p_hdr)) -+ return path[depth].p_ext[1].ee_block; -+ } else { -+ /* index */ -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ } -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * returns first allocated block from next leaf or EXT_MAX_BLOCK -+ */ -+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ /* zero-tree has no leaf blocks at all */ -+ if (depth == 0) -+ return EXT_MAX_BLOCK; -+ -+ /* go to index block */ -+ depth--; -+ -+ while (depth >= 0) { -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * if leaf gets modified and modified extent is first in the leaf -+ * then we have to correct all indexes above -+ * TODO: do we need to correct tree in all cases? -+ */ -+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent *ex; -+ unsigned long border; -+ int k, err = 0; -+ -+ eh = path[depth].p_hdr; -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(eh); -+ -+ if (depth == 0) { -+ /* there is no tree at all */ -+ return 0; -+ } -+ -+ if (ex != EXT_FIRST_EXTENT(eh)) { -+ /* we correct tree if first leaf got modified only */ -+ return 0; -+ } -+ -+ /* -+ * TODO: we need correction if border is smaller then current one -+ */ -+ k = depth - 1; -+ border = path[depth].p_ext->ee_block; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ return err; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ return err; -+ -+ while (k--) { -+ /* change all left-side indexes */ -+ if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr)) -+ break; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ break; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ break; -+ } -+ -+ return err; -+} -+ -+static int inline -+ext3_can_extents_be_merged(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ if (ex1->ee_block + ex1->ee_len != ex2->ee_block) -+ return 0; -+ -+#ifdef AGRESSIVE_TEST -+ if (ex1->ee_len >= 4) -+ return 0; -+#endif -+ -+ if (!tree->ops->mergable) -+ return 1; -+ -+ return tree->ops->mergable(ex1, ex2); -+} -+ -+/* -+ * this routine tries to merge requsted extent into the existing -+ * extent or inserts requested extent as new one into the tree, -+ * creating new leaf in no-space case -+ */ -+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_extent_header * eh; -+ struct ext3_extent *ex, *fex; -+ struct ext3_extent *nearex; /* nearest extent */ -+ struct ext3_ext_path *npath = NULL; -+ int depth, len, err, next; -+ -+ EXT_ASSERT(newext->ee_len > 0); -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(path[depth].p_hdr); -+ -+ /* try to insert block into found extent and return */ -+ if (ex && ext3_can_extents_be_merged(tree, ex, newext)) { -+ ext_debug(tree, "append %d block to %d:%d (from %d)\n", -+ newext->ee_len, ex->ee_block, ex->ee_len, -+ ex->ee_start); -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ return err; -+ ex->ee_len += newext->ee_len; -+ eh = path[depth].p_hdr; -+ nearex = ex; -+ goto merge; -+ } -+ -+repeat: -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) -+ goto has_space; -+ -+ /* probably next leaf has space for us? */ -+ fex = EXT_LAST_EXTENT(eh); -+ next = ext3_ext_next_leaf_block(tree, path); -+ if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) { -+ ext_debug(tree, "next leaf block - %d\n", next); -+ EXT_ASSERT(!npath); -+ npath = ext3_ext_find_extent(tree, next, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ EXT_ASSERT(npath->p_depth == path->p_depth); -+ eh = npath[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) { -+ ext_debug(tree, "next leaf isnt full(%d)\n", -+ eh->eh_entries); -+ path = npath; -+ goto repeat; -+ } -+ ext_debug(tree, "next leaf hasno free space(%d,%d)\n", -+ eh->eh_entries, eh->eh_max); -+ } -+ -+ /* -+ * there is no free space in found leaf -+ * we're gonna add new leaf in the tree -+ */ -+ err = ext3_ext_create_new_leaf(handle, tree, path, newext); -+ if (err) -+ goto cleanup; -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ -+has_space: -+ nearex = path[depth].p_ext; -+ -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ -+ if (!nearex) { -+ /* there is no extent in this leaf, create first one */ -+ ext_debug(tree, "first extent in the leaf: %d:%d:%d\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len); -+ path[depth].p_ext = EXT_FIRST_EXTENT(eh); -+ } else if (newext->ee_block > nearex->ee_block) { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ if (nearex != EXT_LAST_EXTENT(eh)) { -+ len = EXT_MAX_EXTENT(eh) - nearex; -+ len = (len - 1) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 2, nearex + 1, len); -+ } -+ path[depth].p_ext = nearex + 1; -+ } else { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 1, nearex, len); -+ path[depth].p_ext = nearex; -+ } -+ -+ eh->eh_entries++; -+ nearex = path[depth].p_ext; -+ nearex->ee_block = newext->ee_block; -+ nearex->ee_start = newext->ee_start; -+ nearex->ee_len = newext->ee_len; -+ /* FIXME: support for large fs */ -+ nearex->ee_start_hi = 0; -+ -+merge: -+ /* try to merge extents to the right */ -+ while (nearex < EXT_LAST_EXTENT(eh)) { -+ if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1)) -+ break; -+ /* merge with next extent! */ -+ nearex->ee_len += nearex[1].ee_len; -+ if (nearex + 1 < EXT_LAST_EXTENT(eh)) { -+ len = (EXT_LAST_EXTENT(eh) - nearex - 1) * -+ sizeof(struct ext3_extent); -+ memmove(nearex + 1, nearex + 2, len); -+ } -+ eh->eh_entries--; -+ EXT_ASSERT(eh->eh_entries > 0); -+ } -+ -+ /* try to merge extents to the left */ -+ -+ /* time to correct all indexes above */ -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ if (err) -+ goto cleanup; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ -+cleanup: -+ if (npath) { -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ } -+ ext3_ext_tree_changed(tree); -+ ext3_ext_invalidate_cache(tree); -+ return err; -+} -+ -+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block, -+ unsigned long num, ext_prepare_callback func) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_ext_cache cbex; -+ struct ext3_extent *ex; -+ unsigned long next, start = 0, end = 0; -+ unsigned long last = block + num; -+ int depth, exists, err = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(func); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ while (block < last && block != EXT_MAX_BLOCK) { -+ num = last - block; -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(tree, block, path); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ break; -+ } -+ -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(path[depth].p_hdr); -+ ex = path[depth].p_ext; -+ next = ext3_ext_next_allocated_block(path); -+ -+ exists = 0; -+ if (!ex) { -+ /* there is no extent yet, so try to allocate -+ * all requested space */ -+ start = block; -+ end = block + num; -+ } else if (ex->ee_block > block) { -+ /* need to allocate space before found extent */ -+ start = block; -+ end = ex->ee_block; -+ if (block + num < end) -+ end = block + num; -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ /* need to allocate space after found extent */ -+ start = block; -+ end = block + num; -+ if (end >= next) -+ end = next; -+ } else if (block >= ex->ee_block) { -+ /* -+ * some part of requested space is covered -+ * by found extent -+ */ -+ start = block; -+ end = ex->ee_block + ex->ee_len; -+ if (block + num < end) -+ end = block + num; -+ exists = 1; -+ } else { -+ BUG(); -+ } -+ EXT_ASSERT(end > start); -+ -+ if (!exists) { -+ cbex.ec_block = start; -+ cbex.ec_len = end - start; -+ cbex.ec_start = 0; -+ cbex.ec_type = EXT3_EXT_CACHE_GAP; -+ } else { -+ cbex.ec_block = ex->ee_block; -+ cbex.ec_len = ex->ee_len; -+ cbex.ec_start = ex->ee_start; -+ cbex.ec_type = EXT3_EXT_CACHE_EXTENT; -+ } -+ -+ EXT_ASSERT(cbex.ec_len > 0); -+ EXT_ASSERT(path[depth].p_hdr); -+ err = func(tree, path, &cbex); -+ ext3_ext_drop_refs(path); -+ -+ if (err < 0) -+ break; -+ if (err == EXT_REPEAT) -+ continue; -+ else if (err == EXT_BREAK) { -+ err = 0; -+ break; -+ } -+ -+ if (EXT_DEPTH(tree) != depth) { -+ /* depth was changed. we have to realloc path */ -+ kfree(path); -+ path = NULL; -+ } -+ -+ block = cbex.ec_block + cbex.ec_len; -+ } -+ -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ -+ return err; -+} -+ -+static inline void -+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block, -+ __u32 len, __u32 start, int type) -+{ -+ EXT_ASSERT(len > 0); -+ if (tree->cex) { -+ tree->cex->ec_type = type; -+ tree->cex->ec_block = block; -+ tree->cex->ec_len = len; -+ tree->cex->ec_start = start; -+ } -+} -+ -+/* -+ * this routine calculate boundaries of the gap requested block fits into -+ * and cache this gap -+ */ -+static inline void -+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ unsigned long block) -+{ -+ int depth = EXT_DEPTH(tree); -+ unsigned long lblock, len; -+ struct ext3_extent *ex; -+ -+ if (!tree->cex) -+ return; -+ -+ ex = path[depth].p_ext; -+ if (ex == NULL) { -+ /* there is no extent yet, so gap is [0;-] */ -+ lblock = 0; -+ len = EXT_MAX_BLOCK; -+ ext_debug(tree, "cache gap(whole file):"); -+ } else if (block < ex->ee_block) { -+ lblock = block; -+ len = ex->ee_block - block; -+ ext_debug(tree, "cache gap(before): %lu [%lu:%lu]", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len); -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ lblock = ex->ee_block + ex->ee_len; -+ len = ext3_ext_next_allocated_block(path); -+ ext_debug(tree, "cache gap(after): [%lu:%lu] %lu", -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) block); -+ EXT_ASSERT(len > lblock); -+ len = len - lblock; -+ } else { -+ lblock = len = 0; -+ BUG(); -+ } -+ -+ ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len); -+ ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP); -+} -+ -+static inline int -+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block, -+ struct ext3_extent *ex) -+{ -+ struct ext3_ext_cache *cex = tree->cex; -+ -+ /* is there cache storage at all? */ -+ if (!cex) -+ return EXT3_EXT_CACHE_NO; -+ -+ /* has cache valid data? */ -+ if (cex->ec_type == EXT3_EXT_CACHE_NO) -+ return EXT3_EXT_CACHE_NO; -+ -+ EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP || -+ cex->ec_type == EXT3_EXT_CACHE_EXTENT); -+ if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) { -+ ex->ee_block = cex->ec_block; -+ ex->ee_start = cex->ec_start; -+ ex->ee_start_hi = 0; -+ ex->ee_len = cex->ec_len; -+ ext_debug(tree, "%lu cached by %lu:%lu:%lu\n", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) ex->ee_start); -+ return cex->ec_type; -+ } -+ -+ /* not in cache */ -+ return EXT3_EXT_CACHE_NO; -+} -+ -+/* -+ * routine removes index from the index block -+ * it's used in truncate case only. thus all requests are for -+ * last index in the block only -+ */ -+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct buffer_head *bh; -+ int err; -+ -+ /* free index block */ -+ path--; -+ EXT_ASSERT(path->p_hdr->eh_entries); -+ if ((err = ext3_ext_get_access(handle, tree, path))) -+ return err; -+ path->p_hdr->eh_entries--; -+ if ((err = ext3_ext_dirty(handle, tree, path))) -+ return err; -+ ext_debug(tree, "index is empty, remove it, free block %d\n", -+ path->p_idx->ei_leaf); -+ bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); -+ ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ return err; -+} -+ -+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth = EXT_DEPTH(tree); -+ int needed; -+ -+ if (path) { -+ /* probably there is space in leaf? */ -+ if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max) -+ return 1; -+ } -+ -+ /* -+ * the worste case we're expecting is creation of the -+ * new root (growing in depth) with index splitting -+ * for splitting we have to consider depth + 1 because -+ * previous growing could increase it -+ */ -+ depth = depth + 1; -+ -+ /* -+ * growing in depth: -+ * block allocation + new root + old root -+ */ -+ needed = EXT3_ALLOC_NEEDED + 2; -+ -+ /* index split. we may need: -+ * allocate intermediate indexes and new leaf -+ * change two blocks at each level, but root -+ * modify root block (inode) -+ */ -+ needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1; -+ -+ return needed; -+} -+ -+static int -+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, tex; -+ struct ext3_ext_path *npath; -+ int depth, creds, err; -+ -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1); -+ EXT_ASSERT(ex->ee_block < start); -+ -+ /* calculate tail extent */ -+ tex.ee_block = end + 1; -+ EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len); -+ tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block; -+ -+ creds = ext3_ext_calc_credits_for_insert(tree, path); -+ handle = ext3_ext_journal_restart(handle, creds); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ /* calculate head extent. use primary extent */ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ return err; -+ ex->ee_len = start - ex->ee_block; -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ return err; -+ -+ /* FIXME: some callback to free underlying resource -+ * and correct ee_start? */ -+ ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n", -+ ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len); -+ -+ npath = ext3_ext_find_extent(tree, ex->ee_block, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block); -+ EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len); -+ -+ err = ext3_ext_insert_extent(handle, tree, npath, &tex); -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ -+ return err; -+} -+ -+static int -+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, *fu = NULL, *lu, *le; -+ int err = 0, correct_index = 0; -+ int depth = EXT_DEPTH(tree), credits; -+ struct ext3_extent_header *eh; -+ unsigned a, b, block, num; -+ -+ ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end); -+ if (!path[depth].p_hdr) -+ path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh); -+ eh = path[depth].p_hdr; -+ EXT_ASSERT(eh); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* find where to start removing */ -+ le = ex = EXT_LAST_EXTENT(eh); -+ while (ex != EXT_FIRST_EXTENT(eh)) { -+ if (ex->ee_block <= end) -+ break; -+ ex--; -+ } -+ -+ if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) { -+ /* removal of internal part of the extent requested -+ * tail and head must be placed in different extent -+ * so, we have to insert one more extent */ -+ path[depth].p_ext = ex; -+ return ext3_ext_split_for_rm(handle, tree, path, start, end); -+ } -+ -+ lu = ex; -+ while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) { -+ ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len); -+ path[depth].p_ext = ex; -+ -+ a = ex->ee_block > start ? ex->ee_block : start; -+ b = ex->ee_block + ex->ee_len - 1 < end ? -+ ex->ee_block + ex->ee_len - 1 : end; -+ -+ ext_debug(tree, " border %u:%u\n", a, b); -+ -+ if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) { -+ block = 0; -+ num = 0; -+ BUG(); -+ } else if (a != ex->ee_block) { -+ /* remove tail of the extent */ -+ block = ex->ee_block; -+ num = a - block; -+ } else if (b != ex->ee_block + ex->ee_len - 1) { -+ /* remove head of the extent */ -+ block = a; -+ num = b - a; -+ } else { -+ /* remove whole extent: excelent! */ -+ block = ex->ee_block; -+ num = 0; -+ EXT_ASSERT(a == ex->ee_block && -+ b == ex->ee_block + ex->ee_len - 1); -+ } -+ -+ if (ex == EXT_FIRST_EXTENT(eh)) -+ correct_index = 1; -+ -+ credits = 1; -+ if (correct_index) -+ credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1; -+ if (tree->ops->remove_extent_credits) -+ credits+=tree->ops->remove_extent_credits(tree,ex,a,b); -+ -+ handle = ext3_ext_journal_restart(handle, credits); -+ if (IS_ERR(handle)) { -+ err = PTR_ERR(handle); -+ goto out; -+ } -+ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ if (tree->ops->remove_extent) -+ err = tree->ops->remove_extent(tree, ex, a, b); -+ if (err) -+ goto out; -+ -+ if (num == 0) { -+ /* this extent is removed entirely mark slot unused */ -+ ex->ee_start = ex->ee_start_hi = 0; -+ eh->eh_entries--; -+ fu = ex; -+ } -+ -+ ex->ee_block = block; -+ ex->ee_len = num; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ ext_debug(tree, "new extent: %u:%u:%u\n", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ ex--; -+ } -+ -+ if (fu) { -+ /* reuse unused slots */ -+ while (lu < le) { -+ if (lu->ee_start) { -+ *fu = *lu; -+ lu->ee_start = lu->ee_start_hi = 0; -+ fu++; -+ } -+ lu++; -+ } -+ } -+ -+ if (correct_index && eh->eh_entries) -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ -+ /* if this leaf is free, then we should -+ * remove it from index block above */ -+ if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) -+ err = ext3_ext_rm_idx(handle, tree, path + depth); -+ -+out: -+ return err; -+} -+ -+ -+static struct ext3_extent_idx * -+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block) -+{ -+ struct ext3_extent_idx *ix; -+ -+ ix = EXT_LAST_INDEX(hdr); -+ while (ix != EXT_FIRST_INDEX(hdr)) { -+ if (ix->ei_block <= block) -+ break; -+ ix--; -+ } -+ return ix; -+} -+ -+/* -+ * returns 1 if current index have to be freed (even partial) -+ */ -+static int inline -+ext3_ext_more_to_rm(struct ext3_ext_path *path) -+{ -+ EXT_ASSERT(path->p_idx); -+ -+ if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr)) -+ return 0; -+ -+ /* -+ * if truncate on deeper level happened it it wasn't partial -+ * so we have to consider current index for truncation -+ */ -+ if (path->p_hdr->eh_entries == path->p_block) -+ return 0; -+ return 1; -+} -+ -+int ext3_ext_remove_space(struct ext3_extents_tree *tree, -+ unsigned long start, unsigned long end) -+{ -+ struct inode *inode = tree->inode; -+ struct super_block *sb = inode->i_sb; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_ext_path *path; -+ handle_t *handle; -+ int i = 0, err = 0; -+ -+ ext_debug(tree, "space to be removed: %lu:%lu\n", start, end); -+ -+ /* probably first extent we're gonna free will be last in block */ -+ handle = ext3_journal_start(inode, depth + 1); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ ext3_ext_invalidate_cache(tree); -+ -+ /* -+ * we start scanning from right side freeing all the blocks -+ * after i_size and walking into the deep -+ */ -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL); -+ if (IS_ERR(path)) { -+ ext3_error(sb, __FUNCTION__, "Can't allocate path array"); -+ ext3_journal_stop(handle); -+ return -ENOMEM; -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[i].p_hdr = EXT_ROOT_HDR(tree); -+ -+ while (i >= 0 && err == 0) { -+ if (i == depth) { -+ /* this is leaf block */ -+ err = ext3_ext_rm_leaf(handle, tree, path, start, end); -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ continue; -+ } -+ -+ /* this is index block */ -+ if (!path[i].p_hdr) { -+ ext_debug(tree, "initialize header\n"); -+ path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh); -+ } -+ -+ EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max); -+ EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC); -+ -+ if (!path[i].p_idx) { -+ /* this level hasn't touched yet */ -+ path[i].p_idx = -+ ext3_ext_last_covered(path[i].p_hdr, end); -+ path[i].p_block = path[i].p_hdr->eh_entries + 1; -+ ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n", -+ path[i].p_hdr, path[i].p_hdr->eh_entries); -+ } else { -+ /* we've already was here, see at next index */ -+ path[i].p_idx--; -+ } -+ -+ ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n", -+ i, EXT_FIRST_INDEX(path[i].p_hdr), -+ path[i].p_idx); -+ if (ext3_ext_more_to_rm(path + i)) { -+ /* go to the next level */ -+ ext_debug(tree, "move to level %d (block %d)\n", -+ i + 1, path[i].p_idx->ei_leaf); -+ memset(path + i + 1, 0, sizeof(*path)); -+ path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf); -+ if (!path[i+1].p_bh) { -+ /* should we reset i_size? */ -+ err = -EIO; -+ break; -+ } -+ /* put actual number of indexes to know is this -+ * number got changed at the next iteration */ -+ path[i].p_block = path[i].p_hdr->eh_entries; -+ i++; -+ } else { -+ /* we finish processing this index, go up */ -+ if (path[i].p_hdr->eh_entries == 0 && i > 0) { -+ /* index is empty, remove it -+ * handle must be already prepared by the -+ * truncatei_leaf() */ -+ err = ext3_ext_rm_idx(handle, tree, path + i); -+ } -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ ext_debug(tree, "return to level %d\n", i); -+ } -+ } -+ -+ /* TODO: flexible tree reduction should be here */ -+ if (path->p_hdr->eh_entries == 0) { -+ /* -+ * truncate to zero freed all the tree -+ * so, we need to correct eh_depth -+ */ -+ err = ext3_ext_get_access(handle, tree, path); -+ if (err == 0) { -+ EXT_ROOT_HDR(tree)->eh_depth = 0; -+ EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree); -+ err = ext3_ext_dirty(handle, tree, path); -+ } -+ } -+ ext3_ext_tree_changed(tree); -+ -+ kfree(path); -+ ext3_journal_stop(handle); -+ -+ return err; -+} -+ -+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks) -+{ -+ int lcap, icap, rcap, leafs, idxs, num; -+ -+ rcap = ext3_ext_space_root(tree); -+ if (blocks <= rcap) { -+ /* all extents fit to the root */ -+ return 0; -+ } -+ -+ rcap = ext3_ext_space_root_idx(tree); -+ lcap = ext3_ext_space_block(tree); -+ icap = ext3_ext_space_block_idx(tree); -+ -+ num = leafs = (blocks + lcap - 1) / lcap; -+ if (leafs <= rcap) { -+ /* all pointers to leafs fit to the root */ -+ return leafs; -+ } -+ -+ /* ok. we need separate index block(s) to link all leaf blocks */ -+ idxs = (leafs + icap - 1) / icap; -+ do { -+ num += idxs; -+ idxs = (idxs + icap - 1) / icap; -+ } while (idxs > rcap); -+ -+ return num; -+} -+ -+/* -+ * called at mount time -+ */ -+void ext3_ext_init(struct super_block *sb) -+{ -+ /* -+ * possible initialization would be here -+ */ -+ -+ if (test_opt(sb, EXTENTS)) { -+ printk("EXT3-fs: file extents enabled"); -+#ifdef AGRESSIVE_TEST -+ printk(", agressive tests"); -+#endif -+#ifdef CHECK_BINSEARCH -+ printk(", check binsearch"); -+#endif -+ printk("\n"); -+ } -+} -+ -+/* -+ * called at umount time -+ */ -+void ext3_ext_release(struct super_block *sb) -+{ -+} -+ -+/************************************************************************ -+ * VFS related routines -+ ************************************************************************/ -+ -+static int ext3_get_inode_write_access(handle_t *handle, void *buffer) -+{ -+ /* we use in-core data, not bh */ -+ return 0; -+} -+ -+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer) -+{ -+ struct inode *inode = buffer; -+ return ext3_mark_inode_dirty(handle, inode); -+} -+ -+static int ext3_ext_mergable(struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ /* FIXME: support for large fs */ -+ if (ex1->ee_start + ex1->ee_len == ex2->ee_start) -+ return 1; -+ return 0; -+} -+ -+static int -+ext3_remove_blocks_credits(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed; -+ -+ /* at present, extent can't cross block group */; -+ needed = 4; /* bitmap + group desc + sb + inode */ -+ -+#ifdef CONFIG_QUOTA -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ return needed; -+} -+ -+static int -+ext3_remove_blocks(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed = ext3_remove_blocks_credits(tree, ex, from, to); -+ handle_t *handle = ext3_journal_start(tree->inode, needed); -+ struct buffer_head *bh; -+ int i; -+ -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { -+ /* tail removal */ -+ unsigned long num, start; -+ num = ex->ee_block + ex->ee_len - from; -+ start = ex->ee_start + ex->ee_len - num; -+ ext_debug(tree, "free last %lu blocks starting %lu\n", -+ num, start); -+ for (i = 0; i < num; i++) { -+ bh = sb_find_get_block(tree->inode->i_sb, start + i); -+ ext3_forget(handle, 0, tree->inode, bh, start + i); -+ } -+ ext3_free_blocks(handle, tree->inode, start, num); -+ } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { -+ printk("strange request: removal %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } else { -+ printk("strange request: removal(2) %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } -+ ext3_journal_stop(handle); -+ return 0; -+} -+ -+static int ext3_ext_find_goal(struct inode *inode, -+ struct ext3_ext_path *path, unsigned long block) -+{ -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ int depth; -+ -+ if (path) { -+ struct ext3_extent *ex; -+ depth = path->p_depth; -+ -+ /* try to predict block placement */ -+ if ((ex = path[depth].p_ext)) -+ return ex->ee_start + (block - ex->ee_block); -+ -+ /* it looks index is empty -+ * try to find starting from index itself */ -+ if (path[depth].p_bh) -+ return path[depth].p_bh->b_blocknr; -+ } -+ -+ /* OK. use inode's group */ -+ bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ return bg_start + colour + block; -+} -+ -+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *ex, int *err) -+{ -+ struct inode *inode = tree->inode; -+ int newblock, goal; -+ -+ EXT_ASSERT(path); -+ EXT_ASSERT(ex); -+ EXT_ASSERT(ex->ee_start); -+ EXT_ASSERT(ex->ee_len); -+ -+ /* reuse block from the extent to order data/metadata */ -+ newblock = ex->ee_start++; -+ ex->ee_len--; -+ if (ex->ee_len == 0) { -+ ex->ee_len = 1; -+ /* allocate new block for the extent */ -+ goal = ext3_ext_find_goal(inode, path, ex->ee_block); -+ ex->ee_start = ext3_new_block(handle, inode, goal, err); -+ ex->ee_start_hi = 0; -+ if (ex->ee_start == 0) { -+ /* error occured: restore old extent */ -+ ex->ee_start = newblock; -+ return 0; -+ } -+ } -+ return newblock; -+} -+ -+static struct ext3_extents_helpers ext3_blockmap_helpers = { -+ .get_write_access = ext3_get_inode_write_access, -+ .mark_buffer_dirty = ext3_mark_buffer_dirty, -+ .mergable = ext3_ext_mergable, -+ .new_block = ext3_new_block_cb, -+ .remove_extent = ext3_remove_blocks, -+ .remove_extent_credits = ext3_remove_blocks_credits, -+}; -+ -+void ext3_init_tree_desc(struct ext3_extents_tree *tree, -+ struct inode *inode) -+{ -+ tree->inode = inode; -+ tree->root = (void *) EXT3_I(inode)->i_data; -+ tree->buffer = (void *) inode; -+ tree->buffer_len = sizeof(EXT3_I(inode)->i_data); -+ tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent; -+ tree->ops = &ext3_blockmap_helpers; -+} -+ -+int ext3_ext_get_block(handle_t *handle, struct inode *inode, -+ long iblock, struct buffer_head *bh_result, -+ int create, int extend_disksize) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_extent newex; -+ struct ext3_extent *ex; -+ int goal, newblock, err = 0, depth; -+ struct ext3_extents_tree tree; -+ -+ clear_buffer_new(bh_result); -+ ext3_init_tree_desc(&tree, inode); -+ ext_debug(&tree, "block %d requested for inode %u\n", -+ (int) iblock, (unsigned) inode->i_ino); -+ down(&EXT3_I(inode)->truncate_sem); -+ -+ /* check in cache */ -+ if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) { -+ if (goal == EXT3_EXT_CACHE_GAP) { -+ if (!create) { -+ /* block isn't allocated yet and -+ * user don't want to allocate it */ -+ goto out2; -+ } -+ /* we should allocate requested block */ -+ } else if (goal == EXT3_EXT_CACHE_EXTENT) { -+ /* block is already allocated */ -+ newblock = iblock - newex.ee_block + newex.ee_start; -+ goto out; -+ } else { -+ EXT_ASSERT(0); -+ } -+ } -+ -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(&tree, iblock, NULL); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ goto out2; -+ } -+ -+ depth = EXT_DEPTH(&tree); -+ -+ /* -+ * consistent leaf must not be empty -+ * this situations is possible, though, _during_ tree modification -+ * this is why assert can't be put in ext3_ext_find_extent() -+ */ -+ EXT_ASSERT(path[depth].p_ext != NULL || depth == 0); -+ -+ if ((ex = path[depth].p_ext)) { -+ /* if found exent covers block, simple return it */ -+ if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) { -+ newblock = iblock - ex->ee_block + ex->ee_start; -+ ext_debug(&tree, "%d fit into %d:%d -> %d\n", -+ (int) iblock, ex->ee_block, ex->ee_len, -+ newblock); -+ ext3_ext_put_in_cache(&tree, ex->ee_block, -+ ex->ee_len, ex->ee_start, -+ EXT3_EXT_CACHE_EXTENT); -+ goto out; -+ } -+ } -+ -+ /* -+ * requested block isn't allocated yet -+ * we couldn't try to create block if create flag is zero -+ */ -+ if (!create) { -+ /* put just found gap into cache to speedup subsequest reqs */ -+ ext3_ext_put_gap_in_cache(&tree, path, iblock); -+ goto out2; -+ } -+ -+ /* allocate new block */ -+ goal = ext3_ext_find_goal(inode, path, iblock); -+ newblock = ext3_new_block(handle, inode, goal, &err); -+ if (!newblock) -+ goto out2; -+ ext_debug(&tree, "allocate new block: goal %d, found %d\n", -+ goal, newblock); -+ -+ /* try to insert new extent into found leaf and return */ -+ newex.ee_block = iblock; -+ newex.ee_start = newblock; -+ newex.ee_start_hi = 0; -+ newex.ee_len = 1; -+ err = ext3_ext_insert_extent(handle, &tree, path, &newex); -+ if (err) -+ goto out2; -+ -+ if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize) -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ -+ /* previous routine could use block we allocated */ -+ newblock = newex.ee_start; -+ set_buffer_new(bh_result); -+ -+ ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len, -+ newex.ee_start, EXT3_EXT_CACHE_EXTENT); -+out: -+ ext3_ext_show_leaf(&tree, path); -+ map_bh(bh_result, inode->i_sb, newblock); -+out2: -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ up(&EXT3_I(inode)->truncate_sem); -+ -+ return err; -+} -+ -+void ext3_ext_truncate(struct inode * inode, struct page *page) -+{ -+ struct address_space *mapping = inode->i_mapping; -+ struct super_block *sb = inode->i_sb; -+ struct ext3_extents_tree tree; -+ unsigned long last_block; -+ handle_t *handle; -+ int err = 0; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ /* -+ * probably first extent we're gonna free will be last in block -+ */ -+ err = ext3_writepage_trans_blocks(inode) + 3; -+ handle = ext3_journal_start(inode, err); -+ if (IS_ERR(handle)) { -+ if (page) { -+ clear_highpage(page); -+ flush_dcache_page(page); -+ unlock_page(page); -+ page_cache_release(page); -+ } -+ return; -+ } -+ -+ if (page) -+ ext3_block_truncate_page(handle, page, mapping, inode->i_size); -+ -+ down(&EXT3_I(inode)->truncate_sem); -+ ext3_ext_invalidate_cache(&tree); -+ -+ /* -+ * TODO: optimization is possible here -+ * probably we need not scaning at all, -+ * because page truncation is enough -+ */ -+ if (ext3_orphan_add(handle, inode)) -+ goto out_stop; -+ -+ /* we have to know where to truncate from in crash case */ -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ ext3_mark_inode_dirty(handle, inode); -+ -+ last_block = (inode->i_size + sb->s_blocksize - 1) >> -+ EXT3_BLOCK_SIZE_BITS(sb); -+ err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK); -+ -+ /* In a multi-transaction truncate, we only make the final -+ * transaction synchronous */ -+ if (IS_SYNC(inode)) -+ handle->h_sync = 1; -+ -+out_stop: -+ /* -+ * If this was a simple ftruncate(), and the file will remain alive -+ * then we need to clear up the orphan record which we created above. -+ * However, if this was a real unlink then we were called by -+ * ext3_delete_inode(), and we allow that function to clean up the -+ * orphan info for us. -+ */ -+ if (inode->i_nlink) -+ ext3_orphan_del(handle, inode); -+ -+ up(&EXT3_I(inode)->truncate_sem); -+ ext3_journal_stop(handle); -+} -+ -+/* -+ * this routine calculate max number of blocks we could modify -+ * in order to allocate new block for an inode -+ */ -+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num) -+{ -+ struct ext3_extents_tree tree; -+ int needed; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ needed = ext3_ext_calc_credits_for_insert(&tree, NULL); -+ -+ /* caller want to allocate num blocks */ -+ needed *= num; -+ -+#ifdef CONFIG_QUOTA -+ /* -+ * FIXME: real calculation should be here -+ * it depends on blockmap format of qouta file -+ */ -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ -+ return needed; -+} -+ -+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ ext3_extent_tree_init(handle, &tree); -+} -+ -+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ return ext3_ext_calc_metadata_amount(&tree, blocks); -+} -+ -+static int -+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *newex) -+{ -+ struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private; -+ -+ if (newex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ if (buf->err < 0) -+ return EXT_BREAK; -+ if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen) -+ return EXT_BREAK; -+ -+ if (!copy_to_user(buf->cur, newex, sizeof(*newex))) { -+ buf->err++; -+ buf->cur += sizeof(*newex); -+ } else { -+ buf->err = -EFAULT; -+ return EXT_BREAK; -+ } -+ return EXT_CONTINUE; -+} -+ -+static int -+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *ex) -+{ -+ struct ext3_extent_tree_stats *buf = -+ (struct ext3_extent_tree_stats *) tree->private; -+ int depth; -+ -+ if (ex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ depth = EXT_DEPTH(tree); -+ buf->extents_num++; -+ if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr)) -+ buf->leaf_num++; -+ return EXT_CONTINUE; -+} -+ -+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, -+ unsigned long arg) -+{ -+ int err = 0; -+ -+ if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)) -+ return -EINVAL; -+ -+ if (cmd == EXT3_IOC_GET_EXTENTS) { -+ struct ext3_extent_buf buf; -+ struct ext3_extents_tree tree; -+ -+ if (copy_from_user(&buf, (void *) arg, sizeof(buf))) -+ return -EFAULT; -+ -+ ext3_init_tree_desc(&tree, inode); -+ buf.cur = buf.buffer; -+ buf.err = 0; -+ tree.private = &buf; -+ down(&EXT3_I(inode)->truncate_sem); -+ err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK, -+ ext3_ext_store_extent_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (err == 0) -+ err = buf.err; -+ } else if (cmd == EXT3_IOC_GET_TREE_STATS) { -+ struct ext3_extent_tree_stats buf; -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ buf.depth = EXT_DEPTH(&tree); -+ buf.extents_num = 0; -+ buf.leaf_num = 0; -+ tree.private = &buf; -+ err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK, -+ ext3_ext_collect_stats_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (!err) -+ err = copy_to_user((void *) arg, &buf, sizeof(buf)); -+ } else if (cmd == EXT3_IOC_GET_TREE_DEPTH) { -+ struct ext3_extents_tree tree; -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ err = EXT_DEPTH(&tree); -+ up(&EXT3_I(inode)->truncate_sem); -+ } -+ -+ return err; -+} -+ -+EXPORT_SYMBOL(ext3_init_tree_desc); -+EXPORT_SYMBOL(ext3_mark_inode_dirty); -+EXPORT_SYMBOL(ext3_ext_invalidate_cache); -+EXPORT_SYMBOL(ext3_ext_insert_extent); -+EXPORT_SYMBOL(ext3_ext_walk_space); -+EXPORT_SYMBOL(ext3_ext_find_goal); -+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert); -Index: linux-2.6.16.21-0.8/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.16.21-0.8.orig/fs/ext3/ialloc.c -+++ linux-2.6.16.21-0.8/fs/ext3/ialloc.c -@@ -598,7 +598,7 @@ got: - ei->i_dir_start_lookup = 0; - ei->i_disksize = 0; - -- ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL; -+ ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL); - if (S_ISLNK(mode)) - ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL); - /* dirsync only applies to directories */ -@@ -642,6 +642,18 @@ got: - if (err) - goto fail_free_drop; - -+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) { -+ EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL; -+ ext3_extents_initialize_blockmap(handle, inode); -+ if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) { -+ err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh); -+ if (err) goto fail; -+ EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS); -+ BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata"); -+ err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); -+ } -+ } -+ - err = ext3_mark_inode_dirty(handle, inode); - if (err) { - ext3_std_error(sb, err); -Index: linux-2.6.16.21-0.8/fs/ext3/inode.c -=================================================================== ---- linux-2.6.16.21-0.8.orig/fs/ext3/inode.c -+++ linux-2.6.16.21-0.8/fs/ext3/inode.c -@@ -40,7 +40,7 @@ - #include "iopen.h" - #include "acl.h" - --static int ext3_writepage_trans_blocks(struct inode *inode); -+int ext3_writepage_trans_blocks(struct inode *inode); - - /* - * Test whether an inode is a fast symlink. -@@ -788,6 +788,17 @@ out: - return err; - } - -+static inline int -+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block, -+ struct buffer_head *bh, int create, int extend_disksize) -+{ -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_get_block(handle, inode, block, bh, create, -+ extend_disksize); -+ return ext3_get_block_handle(handle, inode, block, bh, create, -+ extend_disksize); -+} -+ - static int ext3_get_block(struct inode *inode, sector_t iblock, - struct buffer_head *bh_result, int create) - { -@@ -798,8 +809,8 @@ static int ext3_get_block(struct inode * - handle = ext3_journal_current_handle(); - J_ASSERT(handle != 0); - } -- ret = ext3_get_block_handle(handle, inode, iblock, -- bh_result, create, 1); -+ ret = ext3_get_block_wrap(handle, inode, iblock, -+ bh_result, create, 1); - return ret; - } - -@@ -843,7 +854,7 @@ ext3_direct_io_get_blocks(struct inode * - - get_block: - if (ret == 0) -- ret = ext3_get_block_handle(handle, inode, iblock, -+ ret = ext3_get_block_wrap(handle, inode, iblock, - bh_result, create, 0); - bh_result->b_size = (1 << inode->i_blkbits); - return ret; -@@ -863,7 +874,7 @@ struct buffer_head *ext3_getblk(handle_t - dummy.b_state = 0; - dummy.b_blocknr = -1000; - buffer_trace_init(&dummy.b_history); -- *errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1); -+ *errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1); - if (!*errp && buffer_mapped(&dummy)) { - struct buffer_head *bh; - bh = sb_getblk(inode->i_sb, dummy.b_blocknr); -@@ -1606,7 +1617,7 @@ void ext3_set_aops(struct inode *inode) - * This required during truncate. We need to physically zero the tail end - * of that block so it doesn't yield old data if the file is later grown. - */ --static int ext3_block_truncate_page(handle_t *handle, struct page *page, -+int ext3_block_truncate_page(handle_t *handle, struct page *page, - struct address_space *mapping, loff_t from) - { - unsigned long index = from >> PAGE_CACHE_SHIFT; -@@ -2116,6 +2127,9 @@ void ext3_truncate(struct inode * inode) - return; - } - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_truncate(inode, page); -+ - handle = start_transaction(inode); - if (IS_ERR(handle)) { - if (page) { -@@ -2863,12 +2877,15 @@ err_out: - * block and work out the exact number of indirects which are touched. Pah. - */ - --static int ext3_writepage_trans_blocks(struct inode *inode) -+int ext3_writepage_trans_blocks(struct inode *inode) - { - int bpp = ext3_journal_blocks_per_page(inode); - int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3; - int ret; - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_writepage_trans_blocks(inode, bpp); -+ - if (ext3_should_journal_data(inode)) - ret = 3 * (bpp + indirects) + 2; - else -Index: linux-2.6.16.21-0.8/fs/ext3/Makefile -=================================================================== ---- linux-2.6.16.21-0.8.orig/fs/ext3/Makefile -+++ linux-2.6.16.21-0.8/fs/ext3/Makefile -@@ -5,7 +5,8 @@ - obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ -- ioctl.o namei.o super.o symlink.o hash.o resize.o -+ ioctl.o namei.o super.o symlink.o hash.o resize.o \ -+ extents.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o -Index: linux-2.6.16.21-0.8/fs/ext3/super.c -=================================================================== ---- linux-2.6.16.21-0.8.orig/fs/ext3/super.c -+++ linux-2.6.16.21-0.8/fs/ext3/super.c -@@ -392,6 +392,7 @@ static void ext3_put_super (struct super - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); - if (!(sb->s_flags & MS_RDONLY)) { -@@ -456,6 +457,8 @@ static struct inode *ext3_alloc_inode(st - #endif - ei->i_block_alloc_info = NULL; - ei->vfs_inode.i_version = 1; -+ -+ memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent)); - return &ei->vfs_inode; - } - -@@ -638,6 +641,7 @@ enum { - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, -+ Opt_extents, Opt_noextents, Opt_extdebug, - Opt_grpquota - }; - -@@ -689,6 +693,9 @@ static match_table_t tokens = { - {Opt_iopen, "iopen"}, - {Opt_noiopen, "noiopen"}, - {Opt_iopen_nopriv, "iopen_nopriv"}, -+ {Opt_extents, "extents"}, -+ {Opt_noextents, "noextents"}, -+ {Opt_extdebug, "extdebug"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -1030,6 +1036,15 @@ clear_qf_name: - case Opt_nobh: - set_opt(sbi->s_mount_opt, NOBH); - break; -+ case Opt_extents: -+ set_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_noextents: -+ clear_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_extdebug: -+ set_opt (sbi->s_mount_opt, EXTDEBUG); -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1756,6 +1768,7 @@ static int ext3_fill_super (struct super - percpu_counter_mod(&sbi->s_dirs_counter, - ext3_count_dirs(sb)); - -+ ext3_ext_init(sb); - lock_kernel(); - return 0; - -Index: linux-2.6.16.21-0.8/fs/ext3/ioctl.c -=================================================================== ---- linux-2.6.16.21-0.8.orig/fs/ext3/ioctl.c -+++ linux-2.6.16.21-0.8/fs/ext3/ioctl.c -@@ -125,6 +125,10 @@ flags_err: - err = ext3_change_inode_journal_flag(inode, jflag); - return err; - } -+ case EXT3_IOC_GET_EXTENTS: -+ case EXT3_IOC_GET_TREE_STATS: -+ case EXT3_IOC_GET_TREE_DEPTH: -+ return ext3_ext_ioctl(inode, filp, cmd, arg); - case EXT3_IOC_GETVERSION: - case EXT3_IOC_GETVERSION_OLD: - return put_user(inode->i_generation, (int __user *) arg); -Index: linux-2.6.16.21-0.8/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.16.21-0.8.orig/include/linux/ext3_fs.h -+++ linux-2.6.16.21-0.8/include/linux/ext3_fs.h -@@ -185,9 +185,10 @@ struct ext3_group_desc - #define EXT3_NOTAIL_FL 0x00008000 /* file tail should not be merged */ - #define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ - #define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ -+#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ - #define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */ - --#define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ -+#define EXT3_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */ - #define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ - - /* -@@ -237,6 +238,9 @@ struct ext3_new_group_data { - #endif - #define EXT3_IOC_GETRSVSZ _IOR('f', 5, long) - #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) -+#define EXT3_IOC_GET_EXTENTS _IOR('f', 7, long) -+#define EXT3_IOC_GET_TREE_DEPTH _IOR('f', 8, long) -+#define EXT3_IOC_GET_TREE_STATS _IOR('f', 9, long) - - /* - * Mount options -@@ -377,6 +381,8 @@ struct ext3_inode { - #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ - #define EXT3_MOUNT_IOPEN 0x400000 /* Allow access via iopen */ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x800000/* Make iopen world-readable */ -+#define EXT3_MOUNT_EXTENTS 0x1000000/* Extents support */ -+#define EXT3_MOUNT_EXTDEBUG 0x2000000/* Extents debug */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -565,11 +571,13 @@ static inline struct ext3_inode_info *EX - #define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ - #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ - #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 -+#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ - - #define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR - #define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \ - EXT3_FEATURE_INCOMPAT_RECOVER| \ -- EXT3_FEATURE_INCOMPAT_META_BG) -+ EXT3_FEATURE_INCOMPAT_META_BG| \ -+ EXT3_FEATURE_INCOMPAT_EXTENTS) - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) -@@ -776,6 +784,7 @@ extern unsigned long ext3_count_free (st - - - /* inode.c */ -+extern int ext3_block_truncate_page(handle_t *, struct page *, struct address_space *, loff_t); - extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); - extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); - extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); -@@ -792,6 +801,7 @@ extern int ext3_get_inode_loc(struct ino - extern void ext3_truncate (struct inode *); - extern void ext3_set_inode_flags(struct inode *); - extern void ext3_set_aops(struct inode *inode); -+extern int ext3_writepage_trans_blocks(struct inode *inode); - - /* ioctl.c */ - extern int ext3_ioctl (struct inode *, struct file *, unsigned int, -@@ -845,6 +855,16 @@ extern struct inode_operations ext3_spec - extern struct inode_operations ext3_symlink_inode_operations; - extern struct inode_operations ext3_fast_symlink_inode_operations; - -+/* extents.c */ -+extern int ext3_ext_writepage_trans_blocks(struct inode *, int); -+extern int ext3_ext_get_block(handle_t *, struct inode *, long, -+ struct buffer_head *, int, int); -+extern void ext3_ext_truncate(struct inode *, struct page *); -+extern void ext3_ext_init(struct super_block *); -+extern void ext3_ext_release(struct super_block *); -+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *); -+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, -+ unsigned int cmd, unsigned long arg); - - #endif /* __KERNEL__ */ - -Index: linux-2.6.16.21-0.8/include/linux/ext3_extents.h -=================================================================== ---- /dev/null -+++ linux-2.6.16.21-0.8/include/linux/ext3_extents.h -@@ -0,0 +1,262 @@ -+/* -+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+#ifndef _LINUX_EXT3_EXTENTS -+#define _LINUX_EXT3_EXTENTS -+ -+/* -+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks -+ * become very little, so index split, in-depth growing and -+ * other hard changes happens much more often -+ * this is for debug purposes only -+ */ -+#define AGRESSIVE_TEST_ -+ -+/* -+ * if CHECK_BINSEARCH defined, then results of binary search -+ * will be checked by linear search -+ */ -+#define CHECK_BINSEARCH_ -+ -+/* -+ * if EXT_DEBUG is defined you can use 'extdebug' mount option -+ * to get lots of info what's going on -+ */ -+#define EXT_DEBUG_ -+#ifdef EXT_DEBUG -+#define ext_debug(tree,fmt,a...) \ -+do { \ -+ if (test_opt((tree)->inode->i_sb, EXTDEBUG)) \ -+ printk(fmt, ##a); \ -+} while (0); -+#else -+#define ext_debug(tree,fmt,a...) -+#endif -+ -+/* -+ * if EXT_STATS is defined then stats numbers are collected -+ * these number will be displayed at umount time -+ */ -+#define EXT_STATS_ -+ -+ -+#define EXT3_ALLOC_NEEDED 3 /* block bitmap + group desc. + sb */ -+ -+/* -+ * ext3_inode has i_block array (total 60 bytes) -+ * first 4 bytes are used to store: -+ * - tree depth (0 mean there is no tree yet. all extents in the inode) -+ * - number of alive extents in the inode -+ */ -+ -+/* -+ * this is extent on-disk structure -+ * it's used at the bottom of the tree -+ */ -+struct ext3_extent { -+ __u32 ee_block; /* first logical block extent covers */ -+ __u16 ee_len; /* number of blocks covered by extent */ -+ __u16 ee_start_hi; /* high 16 bits of physical block */ -+ __u32 ee_start; /* low 32 bigs of physical block */ -+}; -+ -+/* -+ * this is index on-disk structure -+ * it's used at all the levels, but the bottom -+ */ -+struct ext3_extent_idx { -+ __u32 ei_block; /* index covers logical blocks from 'block' */ -+ __u32 ei_leaf; /* pointer to the physical block of the next * -+ * level. leaf or next index could bet here */ -+ __u16 ei_leaf_hi; /* high 16 bits of physical block */ -+ __u16 ei_unused; -+}; -+ -+/* -+ * each block (leaves and indexes), even inode-stored has header -+ */ -+struct ext3_extent_header { -+ __u16 eh_magic; /* probably will support different formats */ -+ __u16 eh_entries; /* number of valid entries */ -+ __u16 eh_max; /* capacity of store in entries */ -+ __u16 eh_depth; /* has tree real underlaying blocks? */ -+ __u32 eh_generation; /* flags(8 bits) | generation of the tree */ -+}; -+ -+#define EXT3_EXT_MAGIC 0xf30a -+ -+/* -+ * array of ext3_ext_path contains path to some extent -+ * creation/lookup routines use it for traversal/splitting/etc -+ * truncate uses it to simulate recursive walking -+ */ -+struct ext3_ext_path { -+ __u32 p_block; -+ __u16 p_depth; -+ struct ext3_extent *p_ext; -+ struct ext3_extent_idx *p_idx; -+ struct ext3_extent_header *p_hdr; -+ struct buffer_head *p_bh; -+}; -+ -+/* -+ * structure for external API -+ */ -+ -+/* -+ * storage for cached extent -+ */ -+struct ext3_ext_cache { -+ __u32 ec_start; -+ __u32 ec_block; -+ __u32 ec_len; -+ __u32 ec_type; -+}; -+ -+#define EXT3_EXT_CACHE_NO 0 -+#define EXT3_EXT_CACHE_GAP 1 -+#define EXT3_EXT_CACHE_EXTENT 2 -+ -+/* -+ * ext3_extents_tree is used to pass initial information -+ * to top-level extents API -+ */ -+struct ext3_extents_helpers; -+struct ext3_extents_tree { -+ struct inode *inode; /* inode which tree belongs to */ -+ void *root; /* ptr to data top of tree resides at */ -+ void *buffer; /* will be passed as arg to ^^ routines */ -+ int buffer_len; -+ void *private; -+ struct ext3_ext_cache *cex;/* last found extent */ -+ struct ext3_extents_helpers *ops; -+}; -+ -+struct ext3_extents_helpers { -+ int (*get_write_access)(handle_t *h, void *buffer); -+ int (*mark_buffer_dirty)(handle_t *h, void *buffer); -+ int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2); -+ int (*remove_extent_credits)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*remove_extent)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*new_block)(handle_t *, struct ext3_extents_tree *, -+ struct ext3_ext_path *, struct ext3_extent *, -+ int *); -+}; -+ -+/* -+ * to be called by ext3_ext_walk_space() -+ * negative retcode - error -+ * positive retcode - signal for ext3_ext_walk_space(), see below -+ * callback must return valid extent (passed or newly created) -+ */ -+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *, -+ struct ext3_ext_path *, -+ struct ext3_ext_cache *); -+ -+#define EXT_CONTINUE 0 -+#define EXT_BREAK 1 -+#define EXT_REPEAT 2 -+ -+ -+#define EXT_MAX_BLOCK 0xffffffff -+ -+ -+#define EXT_FIRST_EXTENT(__hdr__) \ -+ ((struct ext3_extent *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_FIRST_INDEX(__hdr__) \ -+ ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_HAS_FREE_INDEX(__path__) \ -+ ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max) -+#define EXT_LAST_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_LAST_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_MAX_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_MAX_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_HDR_GEN(__hdr__) ((__hdr__)->eh_generation & 0x00ffffff) -+#define EXT_FLAGS(__hdr__) ((__hdr__)->eh_generation >> 24) -+#define EXT_FLAGS_CLR_UNKNOWN 0x7 /* Flags cleared on modification */ -+ -+#define EXT_BLOCK_HDR(__bh__) ((struct ext3_extent_header *)(__bh__)->b_data) -+#define EXT_ROOT_HDR(__tree__) ((struct ext3_extent_header *)(__tree__)->root) -+#define EXT_DEPTH(__tree__) (EXT_ROOT_HDR(__tree__)->eh_depth) -+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__)) -+ -+#define EXT_ASSERT(__x__) if (!(__x__)) BUG(); -+ -+#define EXT_CHECK_PATH(tree,path) \ -+{ \ -+ int depth = EXT_DEPTH(tree); \ -+ BUG_ON((unsigned long) (path) < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_idx < \ -+ __PAGE_OFFSET && (path)[depth].p_idx != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_ext < \ -+ __PAGE_OFFSET && (path)[depth].p_ext != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET \ -+ && depth != 0); \ -+ BUG_ON((path)[0].p_depth != depth); \ -+} -+ -+ -+/* -+ * this structure is used to gather extents from the tree via ioctl -+ */ -+struct ext3_extent_buf { -+ unsigned long start; -+ int buflen; -+ void *buffer; -+ void *cur; -+ int err; -+}; -+ -+/* -+ * this structure is used to collect stats info about the tree -+ */ -+struct ext3_extent_tree_stats { -+ int depth; -+ int extents_num; -+ int leaf_num; -+}; -+ -+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *); -+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *); -+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *); -+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *); -+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback); -+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long); -+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *); -+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int); -+ -+static inline void -+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree) -+{ -+ if (tree->cex) -+ tree->cex->ec_type = EXT3_EXT_CACHE_NO; -+} -+ -+ -+#endif /* _LINUX_EXT3_EXTENTS */ -Index: linux-2.6.16.21-0.8/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.16.21-0.8.orig/include/linux/ext3_fs_i.h -+++ linux-2.6.16.21-0.8/include/linux/ext3_fs_i.h -@@ -133,6 +133,8 @@ struct ext3_inode_info { - */ - struct semaphore truncate_sem; - struct inode vfs_inode; -+ -+ __u32 i_cached_extent[4]; - }; - - #endif /* _LINUX_EXT3_FS_I */ diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch deleted file mode 100644 index fd17dab39e..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch +++ /dev/null @@ -1,2947 +0,0 @@ -Index: linux-2.6.16.27-0.9/fs/ext3/extents.c -=================================================================== ---- /dev/null -+++ linux-2.6.16.27-0.9/fs/ext3/extents.c -@@ -0,0 +1,2359 @@ -+/* -+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+/* -+ * Extents support for EXT3 -+ * -+ * TODO: -+ * - ext3_ext_walk_space() sould not use ext3_ext_find_extent() -+ * - ext3_ext_calc_credits() could take 'mergable' into account -+ * - ext3*_error() should be used in some situations -+ * - find_goal() [to be tested and improved] -+ * - smart tree reduction -+ * - arch-independence -+ * common on-disk format for big/little-endian arch -+ */ -+ -+#include <linux/module.h> -+#include <linux/fs.h> -+#include <linux/time.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/smp_lock.h> -+#include <linux/highuid.h> -+#include <linux/pagemap.h> -+#include <linux/quotaops.h> -+#include <linux/string.h> -+#include <linux/slab.h> -+#include <linux/ext3_extents.h> -+#include <asm/uaccess.h> -+ -+ -+static inline int ext3_ext_check_header(struct ext3_extent_header *eh) -+{ -+ if (eh->eh_magic != EXT3_EXT_MAGIC) { -+ printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n", -+ (unsigned)eh->eh_magic); -+ return -EIO; -+ } -+ if (eh->eh_max == 0) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n", -+ (unsigned)eh->eh_max); -+ return -EIO; -+ } -+ if (eh->eh_entries > eh->eh_max) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n", -+ (unsigned)eh->eh_entries); -+ return -EIO; -+ } -+ return 0; -+} -+ -+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed) -+{ -+ int err; -+ -+ if (handle->h_buffer_credits > needed) -+ return handle; -+ if (!ext3_journal_extend(handle, needed)) -+ return handle; -+ err = ext3_journal_restart(handle, needed); -+ -+ return handle; -+} -+ -+static int inline -+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->get_write_access) -+ return tree->ops->get_write_access(h,tree->buffer); -+ else -+ return 0; -+} -+ -+static int inline -+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->mark_buffer_dirty) -+ return tree->ops->mark_buffer_dirty(h,tree->buffer); -+ else -+ return 0; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ */ -+static int ext3_ext_get_access(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ -+ if (path->p_bh) { -+ /* path points to block */ -+ err = ext3_journal_get_write_access(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_get_access_for_root(handle, tree); -+ } -+ return err; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ * - EIO -+ */ -+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ if (path->p_bh) { -+ /* path points to block */ -+ err =ext3_journal_dirty_metadata(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_mark_root_dirty(handle, tree); -+ } -+ return err; -+} -+ -+static int inline -+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, struct ext3_extent *ex, -+ int *err) -+{ -+ int goal, depth, newblock; -+ struct inode *inode; -+ -+ EXT_ASSERT(tree); -+ if (tree->ops->new_block) -+ return tree->ops->new_block(handle, tree, path, ex, err); -+ -+ inode = tree->inode; -+ depth = EXT_DEPTH(tree); -+ if (path && depth > 0) { -+ goal = path[depth-1].p_block; -+ } else { -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ -+ bg_start = (ei->i_block_group * -+ EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ goal = bg_start + colour; -+ } -+ -+ newblock = ext3_new_block(handle, inode, goal, err); -+ return newblock; -+} -+ -+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *neh = EXT_ROOT_HDR(tree); -+ neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) | -+ (EXT_HDR_GEN(neh) + 1); -+} -+ -+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 6; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 5; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 3; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 4; -+#endif -+ return size; -+} -+ -+static void ext3_ext_show_path(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int k, l = path->p_depth; -+ -+ ext_debug(tree, "path:"); -+ for (k = 0; k <= l; k++, path++) { -+ if (path->p_idx) { -+ ext_debug(tree, " %d->%d", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ } else if (path->p_ext) { -+ ext_debug(tree, " %d:%d:%d", -+ path->p_ext->ee_block, -+ path->p_ext->ee_len, -+ path->p_ext->ee_start); -+ } else -+ ext_debug(tree, " []"); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *eh; -+ struct ext3_extent *ex; -+ int i; -+ -+ if (!path) -+ return; -+ -+ eh = path[depth].p_hdr; -+ ex = EXT_FIRST_EXTENT(eh); -+ -+ for (i = 0; i < eh->eh_entries; i++, ex++) { -+ ext_debug(tree, "%d:%d:%d ", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_drop_refs(struct ext3_ext_path *path) -+{ -+ int depth = path->p_depth; -+ int i; -+ -+ for (i = 0; i <= depth; i++, path++) { -+ if (path->p_bh) { -+ brelse(path->p_bh); -+ path->p_bh = NULL; -+ } -+ } -+} -+ -+/* -+ * binary search for closest index by given block -+ */ -+static inline void -+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent_idx *ix; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_entries > 0); -+ -+ ext_debug(tree, "binsearch for %d(idx): ", block); -+ -+ path->p_idx = ix = EXT_FIRST_INDEX(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ix[l + k].ei_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ix += l; -+ path->p_idx = ix; -+ ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf); -+ -+ while (l++ < r) { -+ if (block < ix->ei_block) -+ break; -+ path->p_idx = ix++; -+ } -+ ext_debug(tree, " -> %d->%d\n", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent_idx *chix; -+ -+ chix = ix = EXT_FIRST_INDEX(eh); -+ for (k = 0; k < eh->eh_entries; k++, ix++) { -+ if (k != 0 && ix->ei_block <= ix[-1].ei_block) { -+ printk("k=%d, ix=0x%p, first=0x%p\n", k, -+ ix, EXT_FIRST_INDEX(eh)); -+ printk("%u <= %u\n", -+ ix->ei_block,ix[-1].ei_block); -+ } -+ EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block); -+ if (block < ix->ei_block) -+ break; -+ chix = ix; -+ } -+ EXT_ASSERT(chix == path->p_idx); -+ } -+#endif -+} -+ -+/* -+ * binary search for closest extent by given block -+ */ -+static inline void -+ext3_ext_binsearch(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent *ex; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ -+ if (eh->eh_entries == 0) { -+ /* -+ * this leaf is empty yet: -+ * we get such a leaf in split/add case -+ */ -+ return; -+ } -+ -+ ext_debug(tree, "binsearch for %d: ", block); -+ -+ path->p_ext = ex = EXT_FIRST_EXTENT(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ex[l + k].ee_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ex += l; -+ path->p_ext = ex; -+ ext_debug(tree, " -> %d:%d:%d ", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+ while (l++ < r) { -+ if (block < ex->ee_block) -+ break; -+ path->p_ext = ex++; -+ } -+ ext_debug(tree, " -> %d:%d:%d\n", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent *chex; -+ -+ chex = ex = EXT_FIRST_EXTENT(eh); -+ for (k = 0; k < eh->eh_entries; k++, ex++) { -+ EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block); -+ if (block < ex->ee_block) -+ break; -+ chex = ex; -+ } -+ EXT_ASSERT(chex == path->p_ext); -+ } -+#endif -+} -+ -+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *eh; -+ -+ BUG_ON(tree->buffer_len == 0); -+ ext3_ext_get_access_for_root(handle, tree); -+ eh = EXT_ROOT_HDR(tree); -+ eh->eh_depth = 0; -+ eh->eh_entries = 0; -+ eh->eh_magic = EXT3_EXT_MAGIC; -+ eh->eh_max = ext3_ext_space_root(tree); -+ ext3_ext_mark_root_dirty(handle, tree); -+ ext3_ext_invalidate_cache(tree); -+ return 0; -+} -+ -+struct ext3_ext_path * -+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ struct buffer_head *bh; -+ int depth, i, ppos = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ eh = EXT_ROOT_HDR(tree); -+ EXT_ASSERT(eh); -+ if (ext3_ext_check_header(eh)) { -+ /* don't free previously allocated path -+ * -- caller should take care */ -+ path = NULL; -+ goto err; -+ } -+ -+ i = depth = EXT_DEPTH(tree); -+ EXT_ASSERT(eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* account possible depth increase */ -+ if (!path) { -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2), -+ GFP_NOFS); -+ if (!path) -+ return ERR_PTR(-ENOMEM); -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[0].p_hdr = eh; -+ -+ /* walk through the tree */ -+ while (i) { -+ ext_debug(tree, "depth %d: num %d, max %d\n", -+ ppos, eh->eh_entries, eh->eh_max); -+ ext3_ext_binsearch_idx(tree, path + ppos, block); -+ path[ppos].p_block = path[ppos].p_idx->ei_leaf; -+ path[ppos].p_depth = i; -+ path[ppos].p_ext = NULL; -+ -+ bh = sb_bread(tree->inode->i_sb, path[ppos].p_block); -+ if (!bh) -+ goto err; -+ -+ eh = EXT_BLOCK_HDR(bh); -+ ppos++; -+ EXT_ASSERT(ppos <= depth); -+ path[ppos].p_bh = bh; -+ path[ppos].p_hdr = eh; -+ i--; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ } -+ -+ path[ppos].p_depth = i; -+ path[ppos].p_hdr = eh; -+ path[ppos].p_ext = NULL; -+ path[ppos].p_idx = NULL; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ -+ /* find extent */ -+ ext3_ext_binsearch(tree, path + ppos, block); -+ -+ ext3_ext_show_path(tree, path); -+ -+ return path; -+ -+err: -+ printk(KERN_ERR "EXT3-fs: header is corrupted!\n"); -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ return ERR_PTR(-EIO); -+} -+ -+/* -+ * insert new index [logical;ptr] into the block at cupr -+ * it check where to insert: before curp or after curp -+ */ -+static int ext3_ext_insert_index(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *curp, -+ int logical, int ptr) -+{ -+ struct ext3_extent_idx *ix; -+ int len, err; -+ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ return err; -+ -+ EXT_ASSERT(logical != curp->p_idx->ei_block); -+ len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx; -+ if (logical > curp->p_idx->ei_block) { -+ /* insert after */ -+ if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { -+ len = (len - 1) * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d after: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ (curp->p_idx + 1), (curp->p_idx + 2)); -+ memmove(curp->p_idx + 2, curp->p_idx + 1, len); -+ } -+ ix = curp->p_idx + 1; -+ } else { -+ /* insert before */ -+ len = len * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d before: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ curp->p_idx, (curp->p_idx + 1)); -+ memmove(curp->p_idx + 1, curp->p_idx, len); -+ ix = curp->p_idx; -+ } -+ -+ ix->ei_block = logical; -+ ix->ei_leaf = ptr; -+ ix->ei_leaf_hi = ix->ei_unused = 0; -+ curp->p_hdr->eh_entries++; -+ -+ EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max); -+ EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr)); -+ -+ err = ext3_ext_dirty(handle, tree, curp); -+ ext3_std_error(tree->inode->i_sb, err); -+ -+ return err; -+} -+ -+/* -+ * routine inserts new subtree into the path, using free index entry -+ * at depth 'at: -+ * - allocates all needed blocks (new leaf and all intermediate index blocks) -+ * - makes decision where to split -+ * - moves remaining extens and index entries (right to the split point) -+ * into the newly allocated blocks -+ * - initialize subtree -+ */ -+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext, int at) -+{ -+ struct buffer_head *bh = NULL; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct ext3_extent *ex; -+ int i = at, k, m, a; -+ unsigned long newblock, oldblock, border; -+ int *ablocks = NULL; /* array of allocated blocks */ -+ int err = 0; -+ -+ /* make decision: where to split? */ -+ /* FIXME: now desicion is simplest: at current extent */ -+ -+ /* if current leaf will be splitted, then we should use -+ * border from split point */ -+ EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr)); -+ if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ border = path[depth].p_ext[1].ee_block; -+ ext_debug(tree, "leaf will be splitted." -+ " next leaf starts at %d\n", -+ (int)border); -+ } else { -+ border = newext->ee_block; -+ ext_debug(tree, "leaf will be added." -+ " next leaf starts at %d\n", -+ (int)border); -+ } -+ -+ /* -+ * if error occurs, then we break processing -+ * and turn filesystem read-only. so, index won't -+ * be inserted and tree will be in consistent -+ * state. next mount will repair buffers too -+ */ -+ -+ /* -+ * get array to track all allocated blocks -+ * we need this to handle errors and free blocks -+ * upon them -+ */ -+ ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS); -+ if (!ablocks) -+ return -ENOMEM; -+ memset(ablocks, 0, sizeof(unsigned long) * depth); -+ -+ /* allocate all needed blocks */ -+ ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at); -+ for (a = 0; a < depth - at; a++) { -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ goto cleanup; -+ ablocks[a] = newblock; -+ } -+ -+ /* initialize new leaf */ -+ newblock = ablocks[--a]; -+ EXT_ASSERT(newblock); -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 0; -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_depth = 0; -+ ex = EXT_FIRST_EXTENT(neh); -+ -+ /* move remain of path[depth] to the new leaf */ -+ EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max); -+ /* start copy from next extent */ -+ /* TODO: we could do it by single memmove */ -+ m = 0; -+ path[depth].p_ext++; -+ while (path[depth].p_ext <= -+ EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ ext_debug(tree, "move %d:%d:%d in new leaf %lu\n", -+ path[depth].p_ext->ee_block, -+ path[depth].p_ext->ee_start, -+ path[depth].p_ext->ee_len, -+ newblock); -+ memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent)); -+ neh->eh_entries++; -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old leaf */ -+ if (m) { -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ path[depth].p_hdr->eh_entries -= m; -+ if ((err = ext3_ext_dirty(handle, tree, path + depth))) -+ goto cleanup; -+ -+ } -+ -+ /* create intermediate indexes */ -+ k = depth - at - 1; -+ EXT_ASSERT(k >= 0); -+ if (k) -+ ext_debug(tree, "create %d intermediate indices\n", k); -+ /* insert new index into current index block */ -+ /* current depth stored in i var */ -+ i = depth - 1; -+ while (k--) { -+ oldblock = newblock; -+ newblock = ablocks[--a]; -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 1; -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ neh->eh_depth = depth - i; -+ fidx = EXT_FIRST_INDEX(neh); -+ fidx->ei_block = border; -+ fidx->ei_leaf = oldblock; -+ fidx->ei_leaf_hi = fidx->ei_unused = 0; -+ -+ ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n", -+ i, newblock, border, oldblock); -+ /* copy indexes */ -+ m = 0; -+ path[i].p_idx++; -+ -+ ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx, -+ EXT_MAX_INDEX(path[i].p_hdr)); -+ EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) == -+ EXT_LAST_INDEX(path[i].p_hdr)); -+ while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { -+ ext_debug(tree, "%d: move %d:%d in new index %lu\n", -+ i, path[i].p_idx->ei_block, -+ path[i].p_idx->ei_leaf, newblock); -+ memmove(++fidx, path[i].p_idx++, -+ sizeof(struct ext3_extent_idx)); -+ neh->eh_entries++; -+ EXT_ASSERT(neh->eh_entries <= neh->eh_max); -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old index */ -+ if (m) { -+ err = ext3_ext_get_access(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ path[i].p_hdr->eh_entries -= m; -+ err = ext3_ext_dirty(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ } -+ -+ i--; -+ } -+ -+ /* insert new index */ -+ if (!err) -+ err = ext3_ext_insert_index(handle, tree, path + at, -+ border, newblock); -+ -+cleanup: -+ if (bh) { -+ if (buffer_locked(bh)) -+ unlock_buffer(bh); -+ brelse(bh); -+ } -+ -+ if (err) { -+ /* free all allocated blocks in error case */ -+ for (i = 0; i < depth; i++) { -+ if (!ablocks[i]) -+ continue; -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ } -+ } -+ kfree(ablocks); -+ -+ return err; -+} -+ -+/* -+ * routine implements tree growing procedure: -+ * - allocates new block -+ * - moves top-level data (index block or leaf) into the new block -+ * - initialize new top-level, creating index that points to the -+ * just created block -+ */ -+static int ext3_ext_grow_indepth(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp = path; -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct buffer_head *bh; -+ unsigned long newblock; -+ int err = 0; -+ -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ return err; -+ -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ ext3_std_error(tree->inode->i_sb, err); -+ return err; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) { -+ unlock_buffer(bh); -+ goto out; -+ } -+ -+ /* move top-level index/leaf into new block */ -+ memmove(bh->b_data, curp->p_hdr, tree->buffer_len); -+ -+ /* set size of new block */ -+ neh = EXT_BLOCK_HDR(bh); -+ /* old root could have indexes or leaves -+ * so calculate eh_max right way */ -+ if (EXT_DEPTH(tree)) -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ else -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto out; -+ -+ /* create index in new top-level index: num,max,pointer */ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ goto out; -+ -+ curp->p_hdr->eh_magic = EXT3_EXT_MAGIC; -+ curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree); -+ curp->p_hdr->eh_entries = 1; -+ curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr); -+ /* FIXME: it works, but actually path[0] can be index */ -+ curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block; -+ curp->p_idx->ei_leaf = newblock; -+ curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0; -+ -+ neh = EXT_ROOT_HDR(tree); -+ fidx = EXT_FIRST_INDEX(neh); -+ ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n", -+ neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); -+ -+ neh->eh_depth = path->p_depth + 1; -+ err = ext3_ext_dirty(handle, tree, curp); -+out: -+ brelse(bh); -+ -+ return err; -+} -+ -+/* -+ * routine finds empty index and adds new leaf. if no free index found -+ * then it requests in-depth growing -+ */ -+static int ext3_ext_create_new_leaf(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp; -+ int depth, i, err = 0; -+ -+repeat: -+ i = depth = EXT_DEPTH(tree); -+ -+ /* walk up to the tree and look for free index entry */ -+ curp = path + depth; -+ while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) { -+ i--; -+ curp--; -+ } -+ -+ /* we use already allocated block for index block -+ * so, subsequent data blocks should be contigoues */ -+ if (EXT_HAS_FREE_INDEX(curp)) { -+ /* if we found index with free entry, then use that -+ * entry: create all needed subtree and add new leaf */ -+ err = ext3_ext_split(handle, tree, path, newext, i); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ } else { -+ /* tree is full, time to grow in depth */ -+ err = ext3_ext_grow_indepth(handle, tree, path, newext); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ -+ /* -+ * only first (depth 0 -> 1) produces free space -+ * in all other cases we have to split growed tree -+ */ -+ depth = EXT_DEPTH(tree); -+ if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) { -+ /* now we need split */ -+ goto repeat; -+ } -+ } -+ -+ if (err) -+ return err; -+ -+ return 0; -+} -+ -+/* -+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK -+ * NOTE: it consider block number from index entry as -+ * allocated block. thus, index entries have to be consistent -+ * with leafs -+ */ -+static unsigned long -+ext3_ext_next_allocated_block(struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ if (depth == 0 && path->p_ext == NULL) -+ return EXT_MAX_BLOCK; -+ -+ /* FIXME: what if index isn't full ?! */ -+ while (depth >= 0) { -+ if (depth == path->p_depth) { -+ /* leaf */ -+ if (path[depth].p_ext != -+ EXT_LAST_EXTENT(path[depth].p_hdr)) -+ return path[depth].p_ext[1].ee_block; -+ } else { -+ /* index */ -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ } -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * returns first allocated block from next leaf or EXT_MAX_BLOCK -+ */ -+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ /* zero-tree has no leaf blocks at all */ -+ if (depth == 0) -+ return EXT_MAX_BLOCK; -+ -+ /* go to index block */ -+ depth--; -+ -+ while (depth >= 0) { -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * if leaf gets modified and modified extent is first in the leaf -+ * then we have to correct all indexes above -+ * TODO: do we need to correct tree in all cases? -+ */ -+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent *ex; -+ unsigned long border; -+ int k, err = 0; -+ -+ eh = path[depth].p_hdr; -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(eh); -+ -+ if (depth == 0) { -+ /* there is no tree at all */ -+ return 0; -+ } -+ -+ if (ex != EXT_FIRST_EXTENT(eh)) { -+ /* we correct tree if first leaf got modified only */ -+ return 0; -+ } -+ -+ /* -+ * TODO: we need correction if border is smaller then current one -+ */ -+ k = depth - 1; -+ border = path[depth].p_ext->ee_block; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ return err; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ return err; -+ -+ while (k--) { -+ /* change all left-side indexes */ -+ if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr)) -+ break; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ break; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ break; -+ } -+ -+ return err; -+} -+ -+static int inline -+ext3_can_extents_be_merged(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ if (ex1->ee_block + ex1->ee_len != ex2->ee_block) -+ return 0; -+ -+#ifdef AGRESSIVE_TEST -+ if (ex1->ee_len >= 4) -+ return 0; -+#endif -+ -+ if (!tree->ops->mergable) -+ return 1; -+ -+ return tree->ops->mergable(ex1, ex2); -+} -+ -+/* -+ * this routine tries to merge requsted extent into the existing -+ * extent or inserts requested extent as new one into the tree, -+ * creating new leaf in no-space case -+ */ -+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_extent_header * eh; -+ struct ext3_extent *ex, *fex; -+ struct ext3_extent *nearex; /* nearest extent */ -+ struct ext3_ext_path *npath = NULL; -+ int depth, len, err, next; -+ -+ EXT_ASSERT(newext->ee_len > 0); -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(path[depth].p_hdr); -+ -+ /* try to insert block into found extent and return */ -+ if (ex && ext3_can_extents_be_merged(tree, ex, newext)) { -+ ext_debug(tree, "append %d block to %d:%d (from %d)\n", -+ newext->ee_len, ex->ee_block, ex->ee_len, -+ ex->ee_start); -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ return err; -+ ex->ee_len += newext->ee_len; -+ eh = path[depth].p_hdr; -+ nearex = ex; -+ goto merge; -+ } -+ -+repeat: -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) -+ goto has_space; -+ -+ /* probably next leaf has space for us? */ -+ fex = EXT_LAST_EXTENT(eh); -+ next = ext3_ext_next_leaf_block(tree, path); -+ if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) { -+ ext_debug(tree, "next leaf block - %d\n", next); -+ EXT_ASSERT(!npath); -+ npath = ext3_ext_find_extent(tree, next, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ EXT_ASSERT(npath->p_depth == path->p_depth); -+ eh = npath[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) { -+ ext_debug(tree, "next leaf isnt full(%d)\n", -+ eh->eh_entries); -+ path = npath; -+ goto repeat; -+ } -+ ext_debug(tree, "next leaf hasno free space(%d,%d)\n", -+ eh->eh_entries, eh->eh_max); -+ } -+ -+ /* -+ * there is no free space in found leaf -+ * we're gonna add new leaf in the tree -+ */ -+ err = ext3_ext_create_new_leaf(handle, tree, path, newext); -+ if (err) -+ goto cleanup; -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ -+has_space: -+ nearex = path[depth].p_ext; -+ -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ -+ if (!nearex) { -+ /* there is no extent in this leaf, create first one */ -+ ext_debug(tree, "first extent in the leaf: %d:%d:%d\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len); -+ path[depth].p_ext = EXT_FIRST_EXTENT(eh); -+ } else if (newext->ee_block > nearex->ee_block) { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ if (nearex != EXT_LAST_EXTENT(eh)) { -+ len = EXT_MAX_EXTENT(eh) - nearex; -+ len = (len - 1) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 2, nearex + 1, len); -+ } -+ path[depth].p_ext = nearex + 1; -+ } else { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 1, nearex, len); -+ path[depth].p_ext = nearex; -+ } -+ -+ eh->eh_entries++; -+ nearex = path[depth].p_ext; -+ nearex->ee_block = newext->ee_block; -+ nearex->ee_start = newext->ee_start; -+ nearex->ee_len = newext->ee_len; -+ /* FIXME: support for large fs */ -+ nearex->ee_start_hi = 0; -+ -+merge: -+ /* try to merge extents to the right */ -+ while (nearex < EXT_LAST_EXTENT(eh)) { -+ if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1)) -+ break; -+ /* merge with next extent! */ -+ nearex->ee_len += nearex[1].ee_len; -+ if (nearex + 1 < EXT_LAST_EXTENT(eh)) { -+ len = (EXT_LAST_EXTENT(eh) - nearex - 1) * -+ sizeof(struct ext3_extent); -+ memmove(nearex + 1, nearex + 2, len); -+ } -+ eh->eh_entries--; -+ EXT_ASSERT(eh->eh_entries > 0); -+ } -+ -+ /* try to merge extents to the left */ -+ -+ /* time to correct all indexes above */ -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ if (err) -+ goto cleanup; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ -+cleanup: -+ if (npath) { -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ } -+ ext3_ext_tree_changed(tree); -+ ext3_ext_invalidate_cache(tree); -+ return err; -+} -+ -+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block, -+ unsigned long num, ext_prepare_callback func) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_ext_cache cbex; -+ struct ext3_extent *ex; -+ unsigned long next, start = 0, end = 0; -+ unsigned long last = block + num; -+ int depth, exists, err = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(func); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ while (block < last && block != EXT_MAX_BLOCK) { -+ num = last - block; -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(tree, block, path); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ break; -+ } -+ -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(path[depth].p_hdr); -+ ex = path[depth].p_ext; -+ next = ext3_ext_next_allocated_block(path); -+ -+ exists = 0; -+ if (!ex) { -+ /* there is no extent yet, so try to allocate -+ * all requested space */ -+ start = block; -+ end = block + num; -+ } else if (ex->ee_block > block) { -+ /* need to allocate space before found extent */ -+ start = block; -+ end = ex->ee_block; -+ if (block + num < end) -+ end = block + num; -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ /* need to allocate space after found extent */ -+ start = block; -+ end = block + num; -+ if (end >= next) -+ end = next; -+ } else if (block >= ex->ee_block) { -+ /* -+ * some part of requested space is covered -+ * by found extent -+ */ -+ start = block; -+ end = ex->ee_block + ex->ee_len; -+ if (block + num < end) -+ end = block + num; -+ exists = 1; -+ } else { -+ BUG(); -+ } -+ EXT_ASSERT(end > start); -+ -+ if (!exists) { -+ cbex.ec_block = start; -+ cbex.ec_len = end - start; -+ cbex.ec_start = 0; -+ cbex.ec_type = EXT3_EXT_CACHE_GAP; -+ } else { -+ cbex.ec_block = ex->ee_block; -+ cbex.ec_len = ex->ee_len; -+ cbex.ec_start = ex->ee_start; -+ cbex.ec_type = EXT3_EXT_CACHE_EXTENT; -+ } -+ -+ EXT_ASSERT(cbex.ec_len > 0); -+ EXT_ASSERT(path[depth].p_hdr); -+ err = func(tree, path, &cbex); -+ ext3_ext_drop_refs(path); -+ -+ if (err < 0) -+ break; -+ if (err == EXT_REPEAT) -+ continue; -+ else if (err == EXT_BREAK) { -+ err = 0; -+ break; -+ } -+ -+ if (EXT_DEPTH(tree) != depth) { -+ /* depth was changed. we have to realloc path */ -+ kfree(path); -+ path = NULL; -+ } -+ -+ block = cbex.ec_block + cbex.ec_len; -+ } -+ -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ -+ return err; -+} -+ -+static inline void -+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block, -+ __u32 len, __u32 start, int type) -+{ -+ EXT_ASSERT(len > 0); -+ if (tree->cex) { -+ tree->cex->ec_type = type; -+ tree->cex->ec_block = block; -+ tree->cex->ec_len = len; -+ tree->cex->ec_start = start; -+ } -+} -+ -+/* -+ * this routine calculate boundaries of the gap requested block fits into -+ * and cache this gap -+ */ -+static inline void -+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ unsigned long block) -+{ -+ int depth = EXT_DEPTH(tree); -+ unsigned long lblock, len; -+ struct ext3_extent *ex; -+ -+ if (!tree->cex) -+ return; -+ -+ ex = path[depth].p_ext; -+ if (ex == NULL) { -+ /* there is no extent yet, so gap is [0;-] */ -+ lblock = 0; -+ len = EXT_MAX_BLOCK; -+ ext_debug(tree, "cache gap(whole file):"); -+ } else if (block < ex->ee_block) { -+ lblock = block; -+ len = ex->ee_block - block; -+ ext_debug(tree, "cache gap(before): %lu [%lu:%lu]", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len); -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ lblock = ex->ee_block + ex->ee_len; -+ len = ext3_ext_next_allocated_block(path); -+ ext_debug(tree, "cache gap(after): [%lu:%lu] %lu", -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) block); -+ EXT_ASSERT(len > lblock); -+ len = len - lblock; -+ } else { -+ lblock = len = 0; -+ BUG(); -+ } -+ -+ ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len); -+ ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP); -+} -+ -+static inline int -+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block, -+ struct ext3_extent *ex) -+{ -+ struct ext3_ext_cache *cex = tree->cex; -+ -+ /* is there cache storage at all? */ -+ if (!cex) -+ return EXT3_EXT_CACHE_NO; -+ -+ /* has cache valid data? */ -+ if (cex->ec_type == EXT3_EXT_CACHE_NO) -+ return EXT3_EXT_CACHE_NO; -+ -+ EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP || -+ cex->ec_type == EXT3_EXT_CACHE_EXTENT); -+ if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) { -+ ex->ee_block = cex->ec_block; -+ ex->ee_start = cex->ec_start; -+ ex->ee_start_hi = 0; -+ ex->ee_len = cex->ec_len; -+ ext_debug(tree, "%lu cached by %lu:%lu:%lu\n", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) ex->ee_start); -+ return cex->ec_type; -+ } -+ -+ /* not in cache */ -+ return EXT3_EXT_CACHE_NO; -+} -+ -+/* -+ * routine removes index from the index block -+ * it's used in truncate case only. thus all requests are for -+ * last index in the block only -+ */ -+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct buffer_head *bh; -+ int err; -+ -+ /* free index block */ -+ path--; -+ EXT_ASSERT(path->p_hdr->eh_entries); -+ if ((err = ext3_ext_get_access(handle, tree, path))) -+ return err; -+ path->p_hdr->eh_entries--; -+ if ((err = ext3_ext_dirty(handle, tree, path))) -+ return err; -+ ext_debug(tree, "index is empty, remove it, free block %d\n", -+ path->p_idx->ei_leaf); -+ bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); -+ ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ return err; -+} -+ -+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth = EXT_DEPTH(tree); -+ int needed; -+ -+ if (path) { -+ /* probably there is space in leaf? */ -+ if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max) -+ return 1; -+ } -+ -+ /* -+ * the worste case we're expecting is creation of the -+ * new root (growing in depth) with index splitting -+ * for splitting we have to consider depth + 1 because -+ * previous growing could increase it -+ */ -+ depth = depth + 1; -+ -+ /* -+ * growing in depth: -+ * block allocation + new root + old root -+ */ -+ needed = EXT3_ALLOC_NEEDED + 2; -+ -+ /* index split. we may need: -+ * allocate intermediate indexes and new leaf -+ * change two blocks at each level, but root -+ * modify root block (inode) -+ */ -+ needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1; -+ -+ return needed; -+} -+ -+static int -+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, tex; -+ struct ext3_ext_path *npath; -+ int depth, creds, err; -+ -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1); -+ EXT_ASSERT(ex->ee_block < start); -+ -+ /* calculate tail extent */ -+ tex.ee_block = end + 1; -+ EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len); -+ tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block; -+ -+ creds = ext3_ext_calc_credits_for_insert(tree, path); -+ handle = ext3_ext_journal_restart(handle, creds); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ /* calculate head extent. use primary extent */ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ return err; -+ ex->ee_len = start - ex->ee_block; -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ return err; -+ -+ /* FIXME: some callback to free underlying resource -+ * and correct ee_start? */ -+ ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n", -+ ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len); -+ -+ npath = ext3_ext_find_extent(tree, ex->ee_block, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block); -+ EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len); -+ -+ err = ext3_ext_insert_extent(handle, tree, npath, &tex); -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ -+ return err; -+} -+ -+static int -+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, *fu = NULL, *lu, *le; -+ int err = 0, correct_index = 0; -+ int depth = EXT_DEPTH(tree), credits; -+ struct ext3_extent_header *eh; -+ unsigned a, b, block, num; -+ -+ ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end); -+ if (!path[depth].p_hdr) -+ path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh); -+ eh = path[depth].p_hdr; -+ EXT_ASSERT(eh); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* find where to start removing */ -+ le = ex = EXT_LAST_EXTENT(eh); -+ while (ex != EXT_FIRST_EXTENT(eh)) { -+ if (ex->ee_block <= end) -+ break; -+ ex--; -+ } -+ -+ if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) { -+ /* removal of internal part of the extent requested -+ * tail and head must be placed in different extent -+ * so, we have to insert one more extent */ -+ path[depth].p_ext = ex; -+ return ext3_ext_split_for_rm(handle, tree, path, start, end); -+ } -+ -+ lu = ex; -+ while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) { -+ ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len); -+ path[depth].p_ext = ex; -+ -+ a = ex->ee_block > start ? ex->ee_block : start; -+ b = ex->ee_block + ex->ee_len - 1 < end ? -+ ex->ee_block + ex->ee_len - 1 : end; -+ -+ ext_debug(tree, " border %u:%u\n", a, b); -+ -+ if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) { -+ block = 0; -+ num = 0; -+ BUG(); -+ } else if (a != ex->ee_block) { -+ /* remove tail of the extent */ -+ block = ex->ee_block; -+ num = a - block; -+ } else if (b != ex->ee_block + ex->ee_len - 1) { -+ /* remove head of the extent */ -+ block = a; -+ num = b - a; -+ } else { -+ /* remove whole extent: excelent! */ -+ block = ex->ee_block; -+ num = 0; -+ EXT_ASSERT(a == ex->ee_block && -+ b == ex->ee_block + ex->ee_len - 1); -+ } -+ -+ if (ex == EXT_FIRST_EXTENT(eh)) -+ correct_index = 1; -+ -+ credits = 1; -+ if (correct_index) -+ credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1; -+ if (tree->ops->remove_extent_credits) -+ credits+=tree->ops->remove_extent_credits(tree,ex,a,b); -+ -+ handle = ext3_ext_journal_restart(handle, credits); -+ if (IS_ERR(handle)) { -+ err = PTR_ERR(handle); -+ goto out; -+ } -+ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ if (tree->ops->remove_extent) -+ err = tree->ops->remove_extent(tree, ex, a, b); -+ if (err) -+ goto out; -+ -+ if (num == 0) { -+ /* this extent is removed entirely mark slot unused */ -+ ex->ee_start = ex->ee_start_hi = 0; -+ eh->eh_entries--; -+ fu = ex; -+ } -+ -+ ex->ee_block = block; -+ ex->ee_len = num; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ ext_debug(tree, "new extent: %u:%u:%u\n", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ ex--; -+ } -+ -+ if (fu) { -+ /* reuse unused slots */ -+ while (lu < le) { -+ if (lu->ee_start) { -+ *fu = *lu; -+ lu->ee_start = lu->ee_start_hi = 0; -+ fu++; -+ } -+ lu++; -+ } -+ } -+ -+ if (correct_index && eh->eh_entries) -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ -+ /* if this leaf is free, then we should -+ * remove it from index block above */ -+ if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) -+ err = ext3_ext_rm_idx(handle, tree, path + depth); -+ -+out: -+ return err; -+} -+ -+ -+static struct ext3_extent_idx * -+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block) -+{ -+ struct ext3_extent_idx *ix; -+ -+ ix = EXT_LAST_INDEX(hdr); -+ while (ix != EXT_FIRST_INDEX(hdr)) { -+ if (ix->ei_block <= block) -+ break; -+ ix--; -+ } -+ return ix; -+} -+ -+/* -+ * returns 1 if current index have to be freed (even partial) -+ */ -+static int inline -+ext3_ext_more_to_rm(struct ext3_ext_path *path) -+{ -+ EXT_ASSERT(path->p_idx); -+ -+ if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr)) -+ return 0; -+ -+ /* -+ * if truncate on deeper level happened it it wasn't partial -+ * so we have to consider current index for truncation -+ */ -+ if (path->p_hdr->eh_entries == path->p_block) -+ return 0; -+ return 1; -+} -+ -+int ext3_ext_remove_space(struct ext3_extents_tree *tree, -+ unsigned long start, unsigned long end) -+{ -+ struct inode *inode = tree->inode; -+ struct super_block *sb = inode->i_sb; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_ext_path *path; -+ handle_t *handle; -+ int i = 0, err = 0; -+ -+ ext_debug(tree, "space to be removed: %lu:%lu\n", start, end); -+ -+ /* probably first extent we're gonna free will be last in block */ -+ handle = ext3_journal_start(inode, depth + 1); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ ext3_ext_invalidate_cache(tree); -+ -+ /* -+ * we start scanning from right side freeing all the blocks -+ * after i_size and walking into the deep -+ */ -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL); -+ if (IS_ERR(path)) { -+ ext3_error(sb, __FUNCTION__, "Can't allocate path array"); -+ ext3_journal_stop(handle); -+ return -ENOMEM; -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[i].p_hdr = EXT_ROOT_HDR(tree); -+ -+ while (i >= 0 && err == 0) { -+ if (i == depth) { -+ /* this is leaf block */ -+ err = ext3_ext_rm_leaf(handle, tree, path, start, end); -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ continue; -+ } -+ -+ /* this is index block */ -+ if (!path[i].p_hdr) { -+ ext_debug(tree, "initialize header\n"); -+ path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh); -+ } -+ -+ EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max); -+ EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC); -+ -+ if (!path[i].p_idx) { -+ /* this level hasn't touched yet */ -+ path[i].p_idx = -+ ext3_ext_last_covered(path[i].p_hdr, end); -+ path[i].p_block = path[i].p_hdr->eh_entries + 1; -+ ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n", -+ path[i].p_hdr, path[i].p_hdr->eh_entries); -+ } else { -+ /* we've already was here, see at next index */ -+ path[i].p_idx--; -+ } -+ -+ ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n", -+ i, EXT_FIRST_INDEX(path[i].p_hdr), -+ path[i].p_idx); -+ if (ext3_ext_more_to_rm(path + i)) { -+ /* go to the next level */ -+ ext_debug(tree, "move to level %d (block %d)\n", -+ i + 1, path[i].p_idx->ei_leaf); -+ memset(path + i + 1, 0, sizeof(*path)); -+ path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf); -+ if (!path[i+1].p_bh) { -+ /* should we reset i_size? */ -+ err = -EIO; -+ break; -+ } -+ /* put actual number of indexes to know is this -+ * number got changed at the next iteration */ -+ path[i].p_block = path[i].p_hdr->eh_entries; -+ i++; -+ } else { -+ /* we finish processing this index, go up */ -+ if (path[i].p_hdr->eh_entries == 0 && i > 0) { -+ /* index is empty, remove it -+ * handle must be already prepared by the -+ * truncatei_leaf() */ -+ err = ext3_ext_rm_idx(handle, tree, path + i); -+ } -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ ext_debug(tree, "return to level %d\n", i); -+ } -+ } -+ -+ /* TODO: flexible tree reduction should be here */ -+ if (path->p_hdr->eh_entries == 0) { -+ /* -+ * truncate to zero freed all the tree -+ * so, we need to correct eh_depth -+ */ -+ err = ext3_ext_get_access(handle, tree, path); -+ if (err == 0) { -+ EXT_ROOT_HDR(tree)->eh_depth = 0; -+ EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree); -+ err = ext3_ext_dirty(handle, tree, path); -+ } -+ } -+ ext3_ext_tree_changed(tree); -+ -+ kfree(path); -+ ext3_journal_stop(handle); -+ -+ return err; -+} -+ -+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks) -+{ -+ int lcap, icap, rcap, leafs, idxs, num; -+ -+ rcap = ext3_ext_space_root(tree); -+ if (blocks <= rcap) { -+ /* all extents fit to the root */ -+ return 0; -+ } -+ -+ rcap = ext3_ext_space_root_idx(tree); -+ lcap = ext3_ext_space_block(tree); -+ icap = ext3_ext_space_block_idx(tree); -+ -+ num = leafs = (blocks + lcap - 1) / lcap; -+ if (leafs <= rcap) { -+ /* all pointers to leafs fit to the root */ -+ return leafs; -+ } -+ -+ /* ok. we need separate index block(s) to link all leaf blocks */ -+ idxs = (leafs + icap - 1) / icap; -+ do { -+ num += idxs; -+ idxs = (idxs + icap - 1) / icap; -+ } while (idxs > rcap); -+ -+ return num; -+} -+ -+/* -+ * called at mount time -+ */ -+void ext3_ext_init(struct super_block *sb) -+{ -+ /* -+ * possible initialization would be here -+ */ -+ -+ if (test_opt(sb, EXTENTS)) { -+ printk("EXT3-fs: file extents enabled"); -+#ifdef AGRESSIVE_TEST -+ printk(", agressive tests"); -+#endif -+#ifdef CHECK_BINSEARCH -+ printk(", check binsearch"); -+#endif -+ printk("\n"); -+ } -+} -+ -+/* -+ * called at umount time -+ */ -+void ext3_ext_release(struct super_block *sb) -+{ -+} -+ -+/************************************************************************ -+ * VFS related routines -+ ************************************************************************/ -+ -+static int ext3_get_inode_write_access(handle_t *handle, void *buffer) -+{ -+ /* we use in-core data, not bh */ -+ return 0; -+} -+ -+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer) -+{ -+ struct inode *inode = buffer; -+ return ext3_mark_inode_dirty(handle, inode); -+} -+ -+static int ext3_ext_mergable(struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ /* FIXME: support for large fs */ -+ if (ex1->ee_start + ex1->ee_len == ex2->ee_start) -+ return 1; -+ return 0; -+} -+ -+static int -+ext3_remove_blocks_credits(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed; -+ -+ /* at present, extent can't cross block group */; -+ needed = 4; /* bitmap + group desc + sb + inode */ -+ -+#ifdef CONFIG_QUOTA -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ return needed; -+} -+ -+static int -+ext3_remove_blocks(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed = ext3_remove_blocks_credits(tree, ex, from, to); -+ handle_t *handle = ext3_journal_start(tree->inode, needed); -+ struct buffer_head *bh; -+ int i; -+ -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { -+ /* tail removal */ -+ unsigned long num, start; -+ num = ex->ee_block + ex->ee_len - from; -+ start = ex->ee_start + ex->ee_len - num; -+ ext_debug(tree, "free last %lu blocks starting %lu\n", -+ num, start); -+ for (i = 0; i < num; i++) { -+ bh = sb_find_get_block(tree->inode->i_sb, start + i); -+ ext3_forget(handle, 0, tree->inode, bh, start + i); -+ } -+ ext3_free_blocks(handle, tree->inode, start, num); -+ } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { -+ printk("strange request: removal %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } else { -+ printk("strange request: removal(2) %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } -+ ext3_journal_stop(handle); -+ return 0; -+} -+ -+static int ext3_ext_find_goal(struct inode *inode, -+ struct ext3_ext_path *path, unsigned long block) -+{ -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ int depth; -+ -+ if (path) { -+ struct ext3_extent *ex; -+ depth = path->p_depth; -+ -+ /* try to predict block placement */ -+ if ((ex = path[depth].p_ext)) -+ return ex->ee_start + (block - ex->ee_block); -+ -+ /* it looks index is empty -+ * try to find starting from index itself */ -+ if (path[depth].p_bh) -+ return path[depth].p_bh->b_blocknr; -+ } -+ -+ /* OK. use inode's group */ -+ bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ return bg_start + colour + block; -+} -+ -+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *ex, int *err) -+{ -+ struct inode *inode = tree->inode; -+ int newblock, goal; -+ -+ EXT_ASSERT(path); -+ EXT_ASSERT(ex); -+ EXT_ASSERT(ex->ee_start); -+ EXT_ASSERT(ex->ee_len); -+ -+ /* reuse block from the extent to order data/metadata */ -+ newblock = ex->ee_start++; -+ ex->ee_len--; -+ if (ex->ee_len == 0) { -+ ex->ee_len = 1; -+ /* allocate new block for the extent */ -+ goal = ext3_ext_find_goal(inode, path, ex->ee_block); -+ ex->ee_start = ext3_new_block(handle, inode, goal, err); -+ ex->ee_start_hi = 0; -+ if (ex->ee_start == 0) { -+ /* error occured: restore old extent */ -+ ex->ee_start = newblock; -+ return 0; -+ } -+ } -+ return newblock; -+} -+ -+static struct ext3_extents_helpers ext3_blockmap_helpers = { -+ .get_write_access = ext3_get_inode_write_access, -+ .mark_buffer_dirty = ext3_mark_buffer_dirty, -+ .mergable = ext3_ext_mergable, -+ .new_block = ext3_new_block_cb, -+ .remove_extent = ext3_remove_blocks, -+ .remove_extent_credits = ext3_remove_blocks_credits, -+}; -+ -+void ext3_init_tree_desc(struct ext3_extents_tree *tree, -+ struct inode *inode) -+{ -+ tree->inode = inode; -+ tree->root = (void *) EXT3_I(inode)->i_data; -+ tree->buffer = (void *) inode; -+ tree->buffer_len = sizeof(EXT3_I(inode)->i_data); -+ tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent; -+ tree->ops = &ext3_blockmap_helpers; -+} -+ -+int ext3_ext_get_block(handle_t *handle, struct inode *inode, -+ long iblock, struct buffer_head *bh_result, -+ int create, int extend_disksize) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_extent newex; -+ struct ext3_extent *ex; -+ int goal, newblock, err = 0, depth; -+ struct ext3_extents_tree tree; -+ -+ clear_buffer_new(bh_result); -+ ext3_init_tree_desc(&tree, inode); -+ ext_debug(&tree, "block %d requested for inode %u\n", -+ (int) iblock, (unsigned) inode->i_ino); -+ down(&EXT3_I(inode)->truncate_sem); -+ -+ /* check in cache */ -+ if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) { -+ if (goal == EXT3_EXT_CACHE_GAP) { -+ if (!create) { -+ /* block isn't allocated yet and -+ * user don't want to allocate it */ -+ goto out2; -+ } -+ /* we should allocate requested block */ -+ } else if (goal == EXT3_EXT_CACHE_EXTENT) { -+ /* block is already allocated */ -+ newblock = iblock - newex.ee_block + newex.ee_start; -+ goto out; -+ } else { -+ EXT_ASSERT(0); -+ } -+ } -+ -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(&tree, iblock, NULL); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ goto out2; -+ } -+ -+ depth = EXT_DEPTH(&tree); -+ -+ /* -+ * consistent leaf must not be empty -+ * this situations is possible, though, _during_ tree modification -+ * this is why assert can't be put in ext3_ext_find_extent() -+ */ -+ EXT_ASSERT(path[depth].p_ext != NULL || depth == 0); -+ -+ if ((ex = path[depth].p_ext)) { -+ /* if found exent covers block, simple return it */ -+ if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) { -+ newblock = iblock - ex->ee_block + ex->ee_start; -+ ext_debug(&tree, "%d fit into %d:%d -> %d\n", -+ (int) iblock, ex->ee_block, ex->ee_len, -+ newblock); -+ ext3_ext_put_in_cache(&tree, ex->ee_block, -+ ex->ee_len, ex->ee_start, -+ EXT3_EXT_CACHE_EXTENT); -+ goto out; -+ } -+ } -+ -+ /* -+ * requested block isn't allocated yet -+ * we couldn't try to create block if create flag is zero -+ */ -+ if (!create) { -+ /* put just found gap into cache to speedup subsequest reqs */ -+ ext3_ext_put_gap_in_cache(&tree, path, iblock); -+ goto out2; -+ } -+ -+ /* allocate new block */ -+ goal = ext3_ext_find_goal(inode, path, iblock); -+ newblock = ext3_new_block(handle, inode, goal, &err); -+ if (!newblock) -+ goto out2; -+ ext_debug(&tree, "allocate new block: goal %d, found %d\n", -+ goal, newblock); -+ -+ /* try to insert new extent into found leaf and return */ -+ newex.ee_block = iblock; -+ newex.ee_start = newblock; -+ newex.ee_start_hi = 0; -+ newex.ee_len = 1; -+ err = ext3_ext_insert_extent(handle, &tree, path, &newex); -+ if (err) -+ goto out2; -+ -+ if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize) -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ -+ /* previous routine could use block we allocated */ -+ newblock = newex.ee_start; -+ set_buffer_new(bh_result); -+ -+ ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len, -+ newex.ee_start, EXT3_EXT_CACHE_EXTENT); -+out: -+ ext3_ext_show_leaf(&tree, path); -+ map_bh(bh_result, inode->i_sb, newblock); -+out2: -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ up(&EXT3_I(inode)->truncate_sem); -+ -+ return err; -+} -+ -+void ext3_ext_truncate(struct inode * inode, struct page *page) -+{ -+ struct address_space *mapping = inode->i_mapping; -+ struct super_block *sb = inode->i_sb; -+ struct ext3_extents_tree tree; -+ unsigned long last_block; -+ handle_t *handle; -+ int err = 0; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ /* -+ * probably first extent we're gonna free will be last in block -+ */ -+ err = ext3_writepage_trans_blocks(inode) + 3; -+ handle = ext3_journal_start(inode, err); -+ if (IS_ERR(handle)) { -+ if (page) { -+ clear_highpage(page); -+ flush_dcache_page(page); -+ unlock_page(page); -+ page_cache_release(page); -+ } -+ return; -+ } -+ -+ if (page) -+ ext3_block_truncate_page(handle, page, mapping, inode->i_size); -+ -+ down(&EXT3_I(inode)->truncate_sem); -+ ext3_ext_invalidate_cache(&tree); -+ -+ /* -+ * TODO: optimization is possible here -+ * probably we need not scaning at all, -+ * because page truncation is enough -+ */ -+ if (ext3_orphan_add(handle, inode)) -+ goto out_stop; -+ -+ /* we have to know where to truncate from in crash case */ -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ ext3_mark_inode_dirty(handle, inode); -+ -+ last_block = (inode->i_size + sb->s_blocksize - 1) >> -+ EXT3_BLOCK_SIZE_BITS(sb); -+ err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK); -+ -+ /* In a multi-transaction truncate, we only make the final -+ * transaction synchronous */ -+ if (IS_SYNC(inode)) -+ handle->h_sync = 1; -+ -+out_stop: -+ /* -+ * If this was a simple ftruncate(), and the file will remain alive -+ * then we need to clear up the orphan record which we created above. -+ * However, if this was a real unlink then we were called by -+ * ext3_delete_inode(), and we allow that function to clean up the -+ * orphan info for us. -+ */ -+ if (inode->i_nlink) -+ ext3_orphan_del(handle, inode); -+ -+ up(&EXT3_I(inode)->truncate_sem); -+ ext3_journal_stop(handle); -+} -+ -+/* -+ * this routine calculate max number of blocks we could modify -+ * in order to allocate new block for an inode -+ */ -+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num) -+{ -+ struct ext3_extents_tree tree; -+ int needed; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ needed = ext3_ext_calc_credits_for_insert(&tree, NULL); -+ -+ /* caller want to allocate num blocks */ -+ needed *= num; -+ -+#ifdef CONFIG_QUOTA -+ /* -+ * FIXME: real calculation should be here -+ * it depends on blockmap format of qouta file -+ */ -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ -+ return needed; -+} -+ -+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ ext3_extent_tree_init(handle, &tree); -+} -+ -+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ return ext3_ext_calc_metadata_amount(&tree, blocks); -+} -+ -+static int -+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *newex) -+{ -+ struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private; -+ -+ if (newex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ if (buf->err < 0) -+ return EXT_BREAK; -+ if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen) -+ return EXT_BREAK; -+ -+ if (!copy_to_user(buf->cur, newex, sizeof(*newex))) { -+ buf->err++; -+ buf->cur += sizeof(*newex); -+ } else { -+ buf->err = -EFAULT; -+ return EXT_BREAK; -+ } -+ return EXT_CONTINUE; -+} -+ -+static int -+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *ex) -+{ -+ struct ext3_extent_tree_stats *buf = -+ (struct ext3_extent_tree_stats *) tree->private; -+ int depth; -+ -+ if (ex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ depth = EXT_DEPTH(tree); -+ buf->extents_num++; -+ if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr)) -+ buf->leaf_num++; -+ return EXT_CONTINUE; -+} -+ -+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, -+ unsigned long arg) -+{ -+ int err = 0; -+ -+ if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)) -+ return -EINVAL; -+ -+ if (cmd == EXT3_IOC_GET_EXTENTS) { -+ struct ext3_extent_buf buf; -+ struct ext3_extents_tree tree; -+ -+ if (copy_from_user(&buf, (void *) arg, sizeof(buf))) -+ return -EFAULT; -+ -+ ext3_init_tree_desc(&tree, inode); -+ buf.cur = buf.buffer; -+ buf.err = 0; -+ tree.private = &buf; -+ down(&EXT3_I(inode)->truncate_sem); -+ err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK, -+ ext3_ext_store_extent_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (err == 0) -+ err = buf.err; -+ } else if (cmd == EXT3_IOC_GET_TREE_STATS) { -+ struct ext3_extent_tree_stats buf; -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ buf.depth = EXT_DEPTH(&tree); -+ buf.extents_num = 0; -+ buf.leaf_num = 0; -+ tree.private = &buf; -+ err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK, -+ ext3_ext_collect_stats_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (!err) -+ err = copy_to_user((void *) arg, &buf, sizeof(buf)); -+ } else if (cmd == EXT3_IOC_GET_TREE_DEPTH) { -+ struct ext3_extents_tree tree; -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ err = EXT_DEPTH(&tree); -+ up(&EXT3_I(inode)->truncate_sem); -+ } -+ -+ return err; -+} -+ -+EXPORT_SYMBOL(ext3_init_tree_desc); -+EXPORT_SYMBOL(ext3_mark_inode_dirty); -+EXPORT_SYMBOL(ext3_ext_invalidate_cache); -+EXPORT_SYMBOL(ext3_ext_insert_extent); -+EXPORT_SYMBOL(ext3_ext_walk_space); -+EXPORT_SYMBOL(ext3_ext_find_goal); -+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert); -Index: linux-2.6.16.27-0.9/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/ialloc.c -+++ linux-2.6.16.27-0.9/fs/ext3/ialloc.c -@@ -601,7 +601,7 @@ got: - ei->i_dir_start_lookup = 0; - ei->i_disksize = 0; - -- ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL; -+ ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL); - if (S_ISLNK(mode)) - ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL); - /* dirsync only applies to directories */ -@@ -645,6 +645,18 @@ got: - if (err) - goto fail_free_drop; - -+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) { -+ EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL; -+ ext3_extents_initialize_blockmap(handle, inode); -+ if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) { -+ err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh); -+ if (err) goto fail; -+ EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS); -+ BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata"); -+ err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); -+ } -+ } -+ - err = ext3_mark_inode_dirty(handle, inode); - if (err) { - ext3_std_error(sb, err); -Index: linux-2.6.16.27-0.9/fs/ext3/inode.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/inode.c -+++ linux-2.6.16.27-0.9/fs/ext3/inode.c -@@ -40,7 +40,7 @@ - #include "iopen.h" - #include "acl.h" - --static int ext3_writepage_trans_blocks(struct inode *inode); -+int ext3_writepage_trans_blocks(struct inode *inode); - - /* - * Test whether an inode is a fast symlink. -@@ -788,6 +788,17 @@ out: - return err; - } - -+static inline int -+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block, -+ struct buffer_head *bh, int create, int extend_disksize) -+{ -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_get_block(handle, inode, block, bh, create, -+ extend_disksize); -+ return ext3_get_block_handle(handle, inode, block, bh, create, -+ extend_disksize); -+} -+ - static int ext3_get_block(struct inode *inode, sector_t iblock, - struct buffer_head *bh_result, int create) - { -@@ -798,8 +809,8 @@ static int ext3_get_block(struct inode * - handle = ext3_journal_current_handle(); - J_ASSERT(handle != 0); - } -- ret = ext3_get_block_handle(handle, inode, iblock, -- bh_result, create, 1); -+ ret = ext3_get_block_wrap(handle, inode, iblock, -+ bh_result, create, 1); - return ret; - } - -@@ -843,7 +854,7 @@ ext3_direct_io_get_blocks(struct inode * - - get_block: - if (ret == 0) -- ret = ext3_get_block_handle(handle, inode, iblock, -+ ret = ext3_get_block_wrap(handle, inode, iblock, - bh_result, create, 0); - bh_result->b_size = (1 << inode->i_blkbits); - return ret; -@@ -863,7 +874,7 @@ struct buffer_head *ext3_getblk(handle_t - dummy.b_state = 0; - dummy.b_blocknr = -1000; - buffer_trace_init(&dummy.b_history); -- *errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1); -+ *errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1); - if (!*errp && buffer_mapped(&dummy)) { - struct buffer_head *bh; - bh = sb_getblk(inode->i_sb, dummy.b_blocknr); -@@ -1606,7 +1617,7 @@ void ext3_set_aops(struct inode *inode) - * This required during truncate. We need to physically zero the tail end - * of that block so it doesn't yield old data if the file is later grown. - */ --static int ext3_block_truncate_page(handle_t *handle, struct page *page, -+int ext3_block_truncate_page(handle_t *handle, struct page *page, - struct address_space *mapping, loff_t from) - { - unsigned long index = from >> PAGE_CACHE_SHIFT; -@@ -2116,6 +2127,9 @@ void ext3_truncate(struct inode * inode) - return; - } - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_truncate(inode, page); -+ - handle = start_transaction(inode); - if (IS_ERR(handle)) { - if (page) { -@@ -2863,12 +2877,15 @@ err_out: - * block and work out the exact number of indirects which are touched. Pah. - */ - --static int ext3_writepage_trans_blocks(struct inode *inode) -+int ext3_writepage_trans_blocks(struct inode *inode) - { - int bpp = ext3_journal_blocks_per_page(inode); - int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3; - int ret; - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_writepage_trans_blocks(inode, bpp); -+ - if (ext3_should_journal_data(inode)) - ret = 3 * (bpp + indirects) + 2; - else -Index: linux-2.6.16.27-0.9/fs/ext3/Makefile -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/Makefile -+++ linux-2.6.16.27-0.9/fs/ext3/Makefile -@@ -5,7 +5,8 @@ - obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ -- ioctl.o namei.o super.o symlink.o hash.o resize.o -+ ioctl.o namei.o super.o symlink.o hash.o resize.o \ -+ extents.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o -Index: linux-2.6.16.27-0.9/fs/ext3/super.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/super.c -+++ linux-2.6.16.27-0.9/fs/ext3/super.c -@@ -392,6 +392,7 @@ static void ext3_put_super (struct super - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); - if (!(sb->s_flags & MS_RDONLY)) { -@@ -456,6 +457,8 @@ static struct inode *ext3_alloc_inode(st - #endif - ei->i_block_alloc_info = NULL; - ei->vfs_inode.i_version = 1; -+ -+ memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent)); - return &ei->vfs_inode; - } - -@@ -681,6 +684,7 @@ enum { - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, -+ Opt_extents, Opt_noextents, Opt_extdebug, - Opt_grpquota - }; - -@@ -732,6 +736,9 @@ static match_table_t tokens = { - {Opt_iopen, "iopen"}, - {Opt_noiopen, "noiopen"}, - {Opt_iopen_nopriv, "iopen_nopriv"}, -+ {Opt_extents, "extents"}, -+ {Opt_noextents, "noextents"}, -+ {Opt_extdebug, "extdebug"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -1073,6 +1080,15 @@ clear_qf_name: - case Opt_nobh: - set_opt(sbi->s_mount_opt, NOBH); - break; -+ case Opt_extents: -+ set_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_noextents: -+ clear_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_extdebug: -+ set_opt (sbi->s_mount_opt, EXTDEBUG); -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1799,6 +1815,7 @@ static int ext3_fill_super (struct super - percpu_counter_mod(&sbi->s_dirs_counter, - ext3_count_dirs(sb)); - -+ ext3_ext_init(sb); - lock_kernel(); - return 0; - -Index: linux-2.6.16.27-0.9/fs/ext3/ioctl.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/ioctl.c -+++ linux-2.6.16.27-0.9/fs/ext3/ioctl.c -@@ -125,6 +125,10 @@ flags_err: - err = ext3_change_inode_journal_flag(inode, jflag); - return err; - } -+ case EXT3_IOC_GET_EXTENTS: -+ case EXT3_IOC_GET_TREE_STATS: -+ case EXT3_IOC_GET_TREE_DEPTH: -+ return ext3_ext_ioctl(inode, filp, cmd, arg); - case EXT3_IOC_GETVERSION: - case EXT3_IOC_GETVERSION_OLD: - return put_user(inode->i_generation, (int __user *) arg); -Index: linux-2.6.16.27-0.9/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs.h -+++ linux-2.6.16.27-0.9/include/linux/ext3_fs.h -@@ -185,9 +185,10 @@ struct ext3_group_desc - #define EXT3_NOTAIL_FL 0x00008000 /* file tail should not be merged */ - #define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ - #define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ -+#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ - #define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */ - --#define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ -+#define EXT3_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */ - #define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ - - /* -@@ -237,6 +238,9 @@ struct ext3_new_group_data { - #endif - #define EXT3_IOC_GETRSVSZ _IOR('f', 5, long) - #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) -+#define EXT3_IOC_GET_EXTENTS _IOR('f', 7, long) -+#define EXT3_IOC_GET_TREE_DEPTH _IOR('f', 8, long) -+#define EXT3_IOC_GET_TREE_STATS _IOR('f', 9, long) - - /* - * Mount options -@@ -377,6 +381,8 @@ struct ext3_inode { - #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ - #define EXT3_MOUNT_IOPEN 0x400000 /* Allow access via iopen */ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x800000/* Make iopen world-readable */ -+#define EXT3_MOUNT_EXTENTS 0x1000000/* Extents support */ -+#define EXT3_MOUNT_EXTDEBUG 0x2000000/* Extents debug */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -565,11 +571,13 @@ static inline struct ext3_inode_info *EX - #define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ - #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ - #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 -+#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ - - #define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR - #define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \ - EXT3_FEATURE_INCOMPAT_RECOVER| \ -- EXT3_FEATURE_INCOMPAT_META_BG) -+ EXT3_FEATURE_INCOMPAT_META_BG| \ -+ EXT3_FEATURE_INCOMPAT_EXTENTS) - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) -@@ -776,6 +784,7 @@ extern unsigned long ext3_count_free (st - - - /* inode.c */ -+extern int ext3_block_truncate_page(handle_t *, struct page *, struct address_space *, loff_t); - int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); - struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); - struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); -@@ -795,6 +804,7 @@ extern int ext3_get_inode_loc(struct ino - extern void ext3_truncate (struct inode *); - extern void ext3_set_inode_flags(struct inode *); - extern void ext3_set_aops(struct inode *inode); -+extern int ext3_writepage_trans_blocks(struct inode *inode); - - /* ioctl.c */ - extern int ext3_ioctl (struct inode *, struct file *, unsigned int, -@@ -848,6 +858,16 @@ extern struct inode_operations ext3_spec - extern struct inode_operations ext3_symlink_inode_operations; - extern struct inode_operations ext3_fast_symlink_inode_operations; - -+/* extents.c */ -+extern int ext3_ext_writepage_trans_blocks(struct inode *, int); -+extern int ext3_ext_get_block(handle_t *, struct inode *, long, -+ struct buffer_head *, int, int); -+extern void ext3_ext_truncate(struct inode *, struct page *); -+extern void ext3_ext_init(struct super_block *); -+extern void ext3_ext_release(struct super_block *); -+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *); -+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, -+ unsigned int cmd, unsigned long arg); - - #endif /* __KERNEL__ */ - -Index: linux-2.6.16.27-0.9/include/linux/ext3_extents.h -=================================================================== ---- /dev/null -+++ linux-2.6.16.27-0.9/include/linux/ext3_extents.h -@@ -0,0 +1,262 @@ -+/* -+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+#ifndef _LINUX_EXT3_EXTENTS -+#define _LINUX_EXT3_EXTENTS -+ -+/* -+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks -+ * become very little, so index split, in-depth growing and -+ * other hard changes happens much more often -+ * this is for debug purposes only -+ */ -+#define AGRESSIVE_TEST_ -+ -+/* -+ * if CHECK_BINSEARCH defined, then results of binary search -+ * will be checked by linear search -+ */ -+#define CHECK_BINSEARCH_ -+ -+/* -+ * if EXT_DEBUG is defined you can use 'extdebug' mount option -+ * to get lots of info what's going on -+ */ -+#define EXT_DEBUG_ -+#ifdef EXT_DEBUG -+#define ext_debug(tree,fmt,a...) \ -+do { \ -+ if (test_opt((tree)->inode->i_sb, EXTDEBUG)) \ -+ printk(fmt, ##a); \ -+} while (0); -+#else -+#define ext_debug(tree,fmt,a...) -+#endif -+ -+/* -+ * if EXT_STATS is defined then stats numbers are collected -+ * these number will be displayed at umount time -+ */ -+#define EXT_STATS_ -+ -+ -+#define EXT3_ALLOC_NEEDED 3 /* block bitmap + group desc. + sb */ -+ -+/* -+ * ext3_inode has i_block array (total 60 bytes) -+ * first 4 bytes are used to store: -+ * - tree depth (0 mean there is no tree yet. all extents in the inode) -+ * - number of alive extents in the inode -+ */ -+ -+/* -+ * this is extent on-disk structure -+ * it's used at the bottom of the tree -+ */ -+struct ext3_extent { -+ __u32 ee_block; /* first logical block extent covers */ -+ __u16 ee_len; /* number of blocks covered by extent */ -+ __u16 ee_start_hi; /* high 16 bits of physical block */ -+ __u32 ee_start; /* low 32 bigs of physical block */ -+}; -+ -+/* -+ * this is index on-disk structure -+ * it's used at all the levels, but the bottom -+ */ -+struct ext3_extent_idx { -+ __u32 ei_block; /* index covers logical blocks from 'block' */ -+ __u32 ei_leaf; /* pointer to the physical block of the next * -+ * level. leaf or next index could bet here */ -+ __u16 ei_leaf_hi; /* high 16 bits of physical block */ -+ __u16 ei_unused; -+}; -+ -+/* -+ * each block (leaves and indexes), even inode-stored has header -+ */ -+struct ext3_extent_header { -+ __u16 eh_magic; /* probably will support different formats */ -+ __u16 eh_entries; /* number of valid entries */ -+ __u16 eh_max; /* capacity of store in entries */ -+ __u16 eh_depth; /* has tree real underlaying blocks? */ -+ __u32 eh_generation; /* flags(8 bits) | generation of the tree */ -+}; -+ -+#define EXT3_EXT_MAGIC 0xf30a -+ -+/* -+ * array of ext3_ext_path contains path to some extent -+ * creation/lookup routines use it for traversal/splitting/etc -+ * truncate uses it to simulate recursive walking -+ */ -+struct ext3_ext_path { -+ __u32 p_block; -+ __u16 p_depth; -+ struct ext3_extent *p_ext; -+ struct ext3_extent_idx *p_idx; -+ struct ext3_extent_header *p_hdr; -+ struct buffer_head *p_bh; -+}; -+ -+/* -+ * structure for external API -+ */ -+ -+/* -+ * storage for cached extent -+ */ -+struct ext3_ext_cache { -+ __u32 ec_start; -+ __u32 ec_block; -+ __u32 ec_len; -+ __u32 ec_type; -+}; -+ -+#define EXT3_EXT_CACHE_NO 0 -+#define EXT3_EXT_CACHE_GAP 1 -+#define EXT3_EXT_CACHE_EXTENT 2 -+ -+/* -+ * ext3_extents_tree is used to pass initial information -+ * to top-level extents API -+ */ -+struct ext3_extents_helpers; -+struct ext3_extents_tree { -+ struct inode *inode; /* inode which tree belongs to */ -+ void *root; /* ptr to data top of tree resides at */ -+ void *buffer; /* will be passed as arg to ^^ routines */ -+ int buffer_len; -+ void *private; -+ struct ext3_ext_cache *cex;/* last found extent */ -+ struct ext3_extents_helpers *ops; -+}; -+ -+struct ext3_extents_helpers { -+ int (*get_write_access)(handle_t *h, void *buffer); -+ int (*mark_buffer_dirty)(handle_t *h, void *buffer); -+ int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2); -+ int (*remove_extent_credits)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*remove_extent)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*new_block)(handle_t *, struct ext3_extents_tree *, -+ struct ext3_ext_path *, struct ext3_extent *, -+ int *); -+}; -+ -+/* -+ * to be called by ext3_ext_walk_space() -+ * negative retcode - error -+ * positive retcode - signal for ext3_ext_walk_space(), see below -+ * callback must return valid extent (passed or newly created) -+ */ -+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *, -+ struct ext3_ext_path *, -+ struct ext3_ext_cache *); -+ -+#define EXT_CONTINUE 0 -+#define EXT_BREAK 1 -+#define EXT_REPEAT 2 -+ -+ -+#define EXT_MAX_BLOCK 0xffffffff -+ -+ -+#define EXT_FIRST_EXTENT(__hdr__) \ -+ ((struct ext3_extent *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_FIRST_INDEX(__hdr__) \ -+ ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_HAS_FREE_INDEX(__path__) \ -+ ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max) -+#define EXT_LAST_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_LAST_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_MAX_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_MAX_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_HDR_GEN(__hdr__) ((__hdr__)->eh_generation & 0x00ffffff) -+#define EXT_FLAGS(__hdr__) ((__hdr__)->eh_generation >> 24) -+#define EXT_FLAGS_CLR_UNKNOWN 0x7 /* Flags cleared on modification */ -+ -+#define EXT_BLOCK_HDR(__bh__) ((struct ext3_extent_header *)(__bh__)->b_data) -+#define EXT_ROOT_HDR(__tree__) ((struct ext3_extent_header *)(__tree__)->root) -+#define EXT_DEPTH(__tree__) (EXT_ROOT_HDR(__tree__)->eh_depth) -+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__)) -+ -+#define EXT_ASSERT(__x__) if (!(__x__)) BUG(); -+ -+#define EXT_CHECK_PATH(tree,path) \ -+{ \ -+ int depth = EXT_DEPTH(tree); \ -+ BUG_ON((unsigned long) (path) < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_idx < \ -+ __PAGE_OFFSET && (path)[depth].p_idx != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_ext < \ -+ __PAGE_OFFSET && (path)[depth].p_ext != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET \ -+ && depth != 0); \ -+ BUG_ON((path)[0].p_depth != depth); \ -+} -+ -+ -+/* -+ * this structure is used to gather extents from the tree via ioctl -+ */ -+struct ext3_extent_buf { -+ unsigned long start; -+ int buflen; -+ void *buffer; -+ void *cur; -+ int err; -+}; -+ -+/* -+ * this structure is used to collect stats info about the tree -+ */ -+struct ext3_extent_tree_stats { -+ int depth; -+ int extents_num; -+ int leaf_num; -+}; -+ -+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *); -+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *); -+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *); -+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *); -+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback); -+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long); -+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *); -+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int); -+ -+static inline void -+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree) -+{ -+ if (tree->cex) -+ tree->cex->ec_type = EXT3_EXT_CACHE_NO; -+} -+ -+ -+#endif /* _LINUX_EXT3_EXTENTS */ -Index: linux-2.6.16.27-0.9/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs_i.h -+++ linux-2.6.16.27-0.9/include/linux/ext3_fs_i.h -@@ -133,6 +133,8 @@ struct ext3_inode_info { - */ - struct semaphore truncate_sem; - struct inode vfs_inode; -+ -+ __u32 i_cached_extent[4]; - }; - - #endif /* _LINUX_EXT3_FS_I */ diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch deleted file mode 100644 index 7bc712e236..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch +++ /dev/null @@ -1,2950 +0,0 @@ -Index: linux-stage/fs/ext3/extents.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-stage/fs/ext3/extents.c 2006-07-16 14:10:21.000000000 +0800 -@@ -0,0 +1,2359 @@ -+/* -+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+/* -+ * Extents support for EXT3 -+ * -+ * TODO: -+ * - ext3_ext_walk_space() sould not use ext3_ext_find_extent() -+ * - ext3_ext_calc_credits() could take 'mergable' into account -+ * - ext3*_error() should be used in some situations -+ * - find_goal() [to be tested and improved] -+ * - smart tree reduction -+ * - arch-independence -+ * common on-disk format for big/little-endian arch -+ */ -+ -+#include <linux/module.h> -+#include <linux/fs.h> -+#include <linux/time.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/smp_lock.h> -+#include <linux/highuid.h> -+#include <linux/pagemap.h> -+#include <linux/quotaops.h> -+#include <linux/string.h> -+#include <linux/slab.h> -+#include <linux/ext3_extents.h> -+#include <asm/uaccess.h> -+ -+ -+static inline int ext3_ext_check_header(struct ext3_extent_header *eh) -+{ -+ if (eh->eh_magic != EXT3_EXT_MAGIC) { -+ printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n", -+ (unsigned)eh->eh_magic); -+ return -EIO; -+ } -+ if (eh->eh_max == 0) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n", -+ (unsigned)eh->eh_max); -+ return -EIO; -+ } -+ if (eh->eh_entries > eh->eh_max) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n", -+ (unsigned)eh->eh_entries); -+ return -EIO; -+ } -+ return 0; -+} -+ -+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed) -+{ -+ int err; -+ -+ if (handle->h_buffer_credits > needed) -+ return handle; -+ if (!ext3_journal_extend(handle, needed)) -+ return handle; -+ err = ext3_journal_restart(handle, needed); -+ -+ return handle; -+} -+ -+static int inline -+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->get_write_access) -+ return tree->ops->get_write_access(h,tree->buffer); -+ else -+ return 0; -+} -+ -+static int inline -+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->mark_buffer_dirty) -+ return tree->ops->mark_buffer_dirty(h,tree->buffer); -+ else -+ return 0; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ */ -+static int ext3_ext_get_access(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ -+ if (path->p_bh) { -+ /* path points to block */ -+ err = ext3_journal_get_write_access(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_get_access_for_root(handle, tree); -+ } -+ return err; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ * - EIO -+ */ -+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ if (path->p_bh) { -+ /* path points to block */ -+ err =ext3_journal_dirty_metadata(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_mark_root_dirty(handle, tree); -+ } -+ return err; -+} -+ -+static int inline -+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, struct ext3_extent *ex, -+ int *err) -+{ -+ int goal, depth, newblock; -+ struct inode *inode; -+ -+ EXT_ASSERT(tree); -+ if (tree->ops->new_block) -+ return tree->ops->new_block(handle, tree, path, ex, err); -+ -+ inode = tree->inode; -+ depth = EXT_DEPTH(tree); -+ if (path && depth > 0) { -+ goal = path[depth-1].p_block; -+ } else { -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ -+ bg_start = (ei->i_block_group * -+ EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ goal = bg_start + colour; -+ } -+ -+ newblock = ext3_new_block(handle, inode, goal, err); -+ return newblock; -+} -+ -+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *neh = EXT_ROOT_HDR(tree); -+ neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) | -+ (EXT_HDR_GEN(neh) + 1); -+} -+ -+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 6; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 5; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 3; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 4; -+#endif -+ return size; -+} -+ -+static void ext3_ext_show_path(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int k, l = path->p_depth; -+ -+ ext_debug(tree, "path:"); -+ for (k = 0; k <= l; k++, path++) { -+ if (path->p_idx) { -+ ext_debug(tree, " %d->%d", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ } else if (path->p_ext) { -+ ext_debug(tree, " %d:%d:%d", -+ path->p_ext->ee_block, -+ path->p_ext->ee_len, -+ path->p_ext->ee_start); -+ } else -+ ext_debug(tree, " []"); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *eh; -+ struct ext3_extent *ex; -+ int i; -+ -+ if (!path) -+ return; -+ -+ eh = path[depth].p_hdr; -+ ex = EXT_FIRST_EXTENT(eh); -+ -+ for (i = 0; i < eh->eh_entries; i++, ex++) { -+ ext_debug(tree, "%d:%d:%d ", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_drop_refs(struct ext3_ext_path *path) -+{ -+ int depth = path->p_depth; -+ int i; -+ -+ for (i = 0; i <= depth; i++, path++) { -+ if (path->p_bh) { -+ brelse(path->p_bh); -+ path->p_bh = NULL; -+ } -+ } -+} -+ -+/* -+ * binary search for closest index by given block -+ */ -+static inline void -+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent_idx *ix; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_entries > 0); -+ -+ ext_debug(tree, "binsearch for %d(idx): ", block); -+ -+ path->p_idx = ix = EXT_FIRST_INDEX(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ix[l + k].ei_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ix += l; -+ path->p_idx = ix; -+ ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf); -+ -+ while (l++ < r) { -+ if (block < ix->ei_block) -+ break; -+ path->p_idx = ix++; -+ } -+ ext_debug(tree, " -> %d->%d\n", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent_idx *chix; -+ -+ chix = ix = EXT_FIRST_INDEX(eh); -+ for (k = 0; k < eh->eh_entries; k++, ix++) { -+ if (k != 0 && ix->ei_block <= ix[-1].ei_block) { -+ printk("k=%d, ix=0x%p, first=0x%p\n", k, -+ ix, EXT_FIRST_INDEX(eh)); -+ printk("%u <= %u\n", -+ ix->ei_block,ix[-1].ei_block); -+ } -+ EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block); -+ if (block < ix->ei_block) -+ break; -+ chix = ix; -+ } -+ EXT_ASSERT(chix == path->p_idx); -+ } -+#endif -+} -+ -+/* -+ * binary search for closest extent by given block -+ */ -+static inline void -+ext3_ext_binsearch(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent *ex; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ -+ if (eh->eh_entries == 0) { -+ /* -+ * this leaf is empty yet: -+ * we get such a leaf in split/add case -+ */ -+ return; -+ } -+ -+ ext_debug(tree, "binsearch for %d: ", block); -+ -+ path->p_ext = ex = EXT_FIRST_EXTENT(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ex[l + k].ee_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ex += l; -+ path->p_ext = ex; -+ ext_debug(tree, " -> %d:%d:%d ", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+ while (l++ < r) { -+ if (block < ex->ee_block) -+ break; -+ path->p_ext = ex++; -+ } -+ ext_debug(tree, " -> %d:%d:%d\n", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent *chex; -+ -+ chex = ex = EXT_FIRST_EXTENT(eh); -+ for (k = 0; k < eh->eh_entries; k++, ex++) { -+ EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block); -+ if (block < ex->ee_block) -+ break; -+ chex = ex; -+ } -+ EXT_ASSERT(chex == path->p_ext); -+ } -+#endif -+} -+ -+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *eh; -+ -+ BUG_ON(tree->buffer_len == 0); -+ ext3_ext_get_access_for_root(handle, tree); -+ eh = EXT_ROOT_HDR(tree); -+ eh->eh_depth = 0; -+ eh->eh_entries = 0; -+ eh->eh_magic = EXT3_EXT_MAGIC; -+ eh->eh_max = ext3_ext_space_root(tree); -+ ext3_ext_mark_root_dirty(handle, tree); -+ ext3_ext_invalidate_cache(tree); -+ return 0; -+} -+ -+struct ext3_ext_path * -+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ struct buffer_head *bh; -+ int depth, i, ppos = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ eh = EXT_ROOT_HDR(tree); -+ EXT_ASSERT(eh); -+ if (ext3_ext_check_header(eh)) { -+ /* don't free previously allocated path -+ * -- caller should take care */ -+ path = NULL; -+ goto err; -+ } -+ -+ i = depth = EXT_DEPTH(tree); -+ EXT_ASSERT(eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* account possible depth increase */ -+ if (!path) { -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2), -+ GFP_NOFS); -+ if (!path) -+ return ERR_PTR(-ENOMEM); -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[0].p_hdr = eh; -+ -+ /* walk through the tree */ -+ while (i) { -+ ext_debug(tree, "depth %d: num %d, max %d\n", -+ ppos, eh->eh_entries, eh->eh_max); -+ ext3_ext_binsearch_idx(tree, path + ppos, block); -+ path[ppos].p_block = path[ppos].p_idx->ei_leaf; -+ path[ppos].p_depth = i; -+ path[ppos].p_ext = NULL; -+ -+ bh = sb_bread(tree->inode->i_sb, path[ppos].p_block); -+ if (!bh) -+ goto err; -+ -+ eh = EXT_BLOCK_HDR(bh); -+ ppos++; -+ EXT_ASSERT(ppos <= depth); -+ path[ppos].p_bh = bh; -+ path[ppos].p_hdr = eh; -+ i--; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ } -+ -+ path[ppos].p_depth = i; -+ path[ppos].p_hdr = eh; -+ path[ppos].p_ext = NULL; -+ path[ppos].p_idx = NULL; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ -+ /* find extent */ -+ ext3_ext_binsearch(tree, path + ppos, block); -+ -+ ext3_ext_show_path(tree, path); -+ -+ return path; -+ -+err: -+ printk(KERN_ERR "EXT3-fs: header is corrupted!\n"); -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ return ERR_PTR(-EIO); -+} -+ -+/* -+ * insert new index [logical;ptr] into the block at cupr -+ * it check where to insert: before curp or after curp -+ */ -+static int ext3_ext_insert_index(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *curp, -+ int logical, int ptr) -+{ -+ struct ext3_extent_idx *ix; -+ int len, err; -+ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ return err; -+ -+ EXT_ASSERT(logical != curp->p_idx->ei_block); -+ len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx; -+ if (logical > curp->p_idx->ei_block) { -+ /* insert after */ -+ if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { -+ len = (len - 1) * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d after: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ (curp->p_idx + 1), (curp->p_idx + 2)); -+ memmove(curp->p_idx + 2, curp->p_idx + 1, len); -+ } -+ ix = curp->p_idx + 1; -+ } else { -+ /* insert before */ -+ len = len * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d before: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ curp->p_idx, (curp->p_idx + 1)); -+ memmove(curp->p_idx + 1, curp->p_idx, len); -+ ix = curp->p_idx; -+ } -+ -+ ix->ei_block = logical; -+ ix->ei_leaf = ptr; -+ ix->ei_leaf_hi = ix->ei_unused = 0; -+ curp->p_hdr->eh_entries++; -+ -+ EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max); -+ EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr)); -+ -+ err = ext3_ext_dirty(handle, tree, curp); -+ ext3_std_error(tree->inode->i_sb, err); -+ -+ return err; -+} -+ -+/* -+ * routine inserts new subtree into the path, using free index entry -+ * at depth 'at: -+ * - allocates all needed blocks (new leaf and all intermediate index blocks) -+ * - makes decision where to split -+ * - moves remaining extens and index entries (right to the split point) -+ * into the newly allocated blocks -+ * - initialize subtree -+ */ -+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext, int at) -+{ -+ struct buffer_head *bh = NULL; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct ext3_extent *ex; -+ int i = at, k, m, a; -+ unsigned long newblock, oldblock, border; -+ int *ablocks = NULL; /* array of allocated blocks */ -+ int err = 0; -+ -+ /* make decision: where to split? */ -+ /* FIXME: now desicion is simplest: at current extent */ -+ -+ /* if current leaf will be splitted, then we should use -+ * border from split point */ -+ EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr)); -+ if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ border = path[depth].p_ext[1].ee_block; -+ ext_debug(tree, "leaf will be splitted." -+ " next leaf starts at %d\n", -+ (int)border); -+ } else { -+ border = newext->ee_block; -+ ext_debug(tree, "leaf will be added." -+ " next leaf starts at %d\n", -+ (int)border); -+ } -+ -+ /* -+ * if error occurs, then we break processing -+ * and turn filesystem read-only. so, index won't -+ * be inserted and tree will be in consistent -+ * state. next mount will repair buffers too -+ */ -+ -+ /* -+ * get array to track all allocated blocks -+ * we need this to handle errors and free blocks -+ * upon them -+ */ -+ ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS); -+ if (!ablocks) -+ return -ENOMEM; -+ memset(ablocks, 0, sizeof(unsigned long) * depth); -+ -+ /* allocate all needed blocks */ -+ ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at); -+ for (a = 0; a < depth - at; a++) { -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ goto cleanup; -+ ablocks[a] = newblock; -+ } -+ -+ /* initialize new leaf */ -+ newblock = ablocks[--a]; -+ EXT_ASSERT(newblock); -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 0; -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_depth = 0; -+ ex = EXT_FIRST_EXTENT(neh); -+ -+ /* move remain of path[depth] to the new leaf */ -+ EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max); -+ /* start copy from next extent */ -+ /* TODO: we could do it by single memmove */ -+ m = 0; -+ path[depth].p_ext++; -+ while (path[depth].p_ext <= -+ EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ ext_debug(tree, "move %d:%d:%d in new leaf %lu\n", -+ path[depth].p_ext->ee_block, -+ path[depth].p_ext->ee_start, -+ path[depth].p_ext->ee_len, -+ newblock); -+ memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent)); -+ neh->eh_entries++; -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old leaf */ -+ if (m) { -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ path[depth].p_hdr->eh_entries -= m; -+ if ((err = ext3_ext_dirty(handle, tree, path + depth))) -+ goto cleanup; -+ -+ } -+ -+ /* create intermediate indexes */ -+ k = depth - at - 1; -+ EXT_ASSERT(k >= 0); -+ if (k) -+ ext_debug(tree, "create %d intermediate indices\n", k); -+ /* insert new index into current index block */ -+ /* current depth stored in i var */ -+ i = depth - 1; -+ while (k--) { -+ oldblock = newblock; -+ newblock = ablocks[--a]; -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 1; -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ neh->eh_depth = depth - i; -+ fidx = EXT_FIRST_INDEX(neh); -+ fidx->ei_block = border; -+ fidx->ei_leaf = oldblock; -+ fidx->ei_leaf_hi = fidx->ei_unused = 0; -+ -+ ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n", -+ i, newblock, border, oldblock); -+ /* copy indexes */ -+ m = 0; -+ path[i].p_idx++; -+ -+ ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx, -+ EXT_MAX_INDEX(path[i].p_hdr)); -+ EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) == -+ EXT_LAST_INDEX(path[i].p_hdr)); -+ while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { -+ ext_debug(tree, "%d: move %d:%d in new index %lu\n", -+ i, path[i].p_idx->ei_block, -+ path[i].p_idx->ei_leaf, newblock); -+ memmove(++fidx, path[i].p_idx++, -+ sizeof(struct ext3_extent_idx)); -+ neh->eh_entries++; -+ EXT_ASSERT(neh->eh_entries <= neh->eh_max); -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old index */ -+ if (m) { -+ err = ext3_ext_get_access(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ path[i].p_hdr->eh_entries -= m; -+ err = ext3_ext_dirty(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ } -+ -+ i--; -+ } -+ -+ /* insert new index */ -+ if (!err) -+ err = ext3_ext_insert_index(handle, tree, path + at, -+ border, newblock); -+ -+cleanup: -+ if (bh) { -+ if (buffer_locked(bh)) -+ unlock_buffer(bh); -+ brelse(bh); -+ } -+ -+ if (err) { -+ /* free all allocated blocks in error case */ -+ for (i = 0; i < depth; i++) { -+ if (!ablocks[i]) -+ continue; -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ } -+ } -+ kfree(ablocks); -+ -+ return err; -+} -+ -+/* -+ * routine implements tree growing procedure: -+ * - allocates new block -+ * - moves top-level data (index block or leaf) into the new block -+ * - initialize new top-level, creating index that points to the -+ * just created block -+ */ -+static int ext3_ext_grow_indepth(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp = path; -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct buffer_head *bh; -+ unsigned long newblock; -+ int err = 0; -+ -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ return err; -+ -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ ext3_std_error(tree->inode->i_sb, err); -+ return err; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) { -+ unlock_buffer(bh); -+ goto out; -+ } -+ -+ /* move top-level index/leaf into new block */ -+ memmove(bh->b_data, curp->p_hdr, tree->buffer_len); -+ -+ /* set size of new block */ -+ neh = EXT_BLOCK_HDR(bh); -+ /* old root could have indexes or leaves -+ * so calculate eh_max right way */ -+ if (EXT_DEPTH(tree)) -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ else -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto out; -+ -+ /* create index in new top-level index: num,max,pointer */ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ goto out; -+ -+ curp->p_hdr->eh_magic = EXT3_EXT_MAGIC; -+ curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree); -+ curp->p_hdr->eh_entries = 1; -+ curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr); -+ /* FIXME: it works, but actually path[0] can be index */ -+ curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block; -+ curp->p_idx->ei_leaf = newblock; -+ curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0; -+ -+ neh = EXT_ROOT_HDR(tree); -+ fidx = EXT_FIRST_INDEX(neh); -+ ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n", -+ neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); -+ -+ neh->eh_depth = path->p_depth + 1; -+ err = ext3_ext_dirty(handle, tree, curp); -+out: -+ brelse(bh); -+ -+ return err; -+} -+ -+/* -+ * routine finds empty index and adds new leaf. if no free index found -+ * then it requests in-depth growing -+ */ -+static int ext3_ext_create_new_leaf(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp; -+ int depth, i, err = 0; -+ -+repeat: -+ i = depth = EXT_DEPTH(tree); -+ -+ /* walk up to the tree and look for free index entry */ -+ curp = path + depth; -+ while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) { -+ i--; -+ curp--; -+ } -+ -+ /* we use already allocated block for index block -+ * so, subsequent data blocks should be contigoues */ -+ if (EXT_HAS_FREE_INDEX(curp)) { -+ /* if we found index with free entry, then use that -+ * entry: create all needed subtree and add new leaf */ -+ err = ext3_ext_split(handle, tree, path, newext, i); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ } else { -+ /* tree is full, time to grow in depth */ -+ err = ext3_ext_grow_indepth(handle, tree, path, newext); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ -+ /* -+ * only first (depth 0 -> 1) produces free space -+ * in all other cases we have to split growed tree -+ */ -+ depth = EXT_DEPTH(tree); -+ if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) { -+ /* now we need split */ -+ goto repeat; -+ } -+ } -+ -+ if (err) -+ return err; -+ -+ return 0; -+} -+ -+/* -+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK -+ * NOTE: it consider block number from index entry as -+ * allocated block. thus, index entries have to be consistent -+ * with leafs -+ */ -+static unsigned long -+ext3_ext_next_allocated_block(struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ if (depth == 0 && path->p_ext == NULL) -+ return EXT_MAX_BLOCK; -+ -+ /* FIXME: what if index isn't full ?! */ -+ while (depth >= 0) { -+ if (depth == path->p_depth) { -+ /* leaf */ -+ if (path[depth].p_ext != -+ EXT_LAST_EXTENT(path[depth].p_hdr)) -+ return path[depth].p_ext[1].ee_block; -+ } else { -+ /* index */ -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ } -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * returns first allocated block from next leaf or EXT_MAX_BLOCK -+ */ -+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ /* zero-tree has no leaf blocks at all */ -+ if (depth == 0) -+ return EXT_MAX_BLOCK; -+ -+ /* go to index block */ -+ depth--; -+ -+ while (depth >= 0) { -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * if leaf gets modified and modified extent is first in the leaf -+ * then we have to correct all indexes above -+ * TODO: do we need to correct tree in all cases? -+ */ -+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent *ex; -+ unsigned long border; -+ int k, err = 0; -+ -+ eh = path[depth].p_hdr; -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(eh); -+ -+ if (depth == 0) { -+ /* there is no tree at all */ -+ return 0; -+ } -+ -+ if (ex != EXT_FIRST_EXTENT(eh)) { -+ /* we correct tree if first leaf got modified only */ -+ return 0; -+ } -+ -+ /* -+ * TODO: we need correction if border is smaller then current one -+ */ -+ k = depth - 1; -+ border = path[depth].p_ext->ee_block; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ return err; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ return err; -+ -+ while (k--) { -+ /* change all left-side indexes */ -+ if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr)) -+ break; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ break; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ break; -+ } -+ -+ return err; -+} -+ -+static int inline -+ext3_can_extents_be_merged(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ if (ex1->ee_block + ex1->ee_len != ex2->ee_block) -+ return 0; -+ -+#ifdef AGRESSIVE_TEST -+ if (ex1->ee_len >= 4) -+ return 0; -+#endif -+ -+ if (!tree->ops->mergable) -+ return 1; -+ -+ return tree->ops->mergable(ex1, ex2); -+} -+ -+/* -+ * this routine tries to merge requsted extent into the existing -+ * extent or inserts requested extent as new one into the tree, -+ * creating new leaf in no-space case -+ */ -+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_extent_header * eh; -+ struct ext3_extent *ex, *fex; -+ struct ext3_extent *nearex; /* nearest extent */ -+ struct ext3_ext_path *npath = NULL; -+ int depth, len, err, next; -+ -+ EXT_ASSERT(newext->ee_len > 0); -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(path[depth].p_hdr); -+ -+ /* try to insert block into found extent and return */ -+ if (ex && ext3_can_extents_be_merged(tree, ex, newext)) { -+ ext_debug(tree, "append %d block to %d:%d (from %d)\n", -+ newext->ee_len, ex->ee_block, ex->ee_len, -+ ex->ee_start); -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ return err; -+ ex->ee_len += newext->ee_len; -+ eh = path[depth].p_hdr; -+ nearex = ex; -+ goto merge; -+ } -+ -+repeat: -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) -+ goto has_space; -+ -+ /* probably next leaf has space for us? */ -+ fex = EXT_LAST_EXTENT(eh); -+ next = ext3_ext_next_leaf_block(tree, path); -+ if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) { -+ ext_debug(tree, "next leaf block - %d\n", next); -+ EXT_ASSERT(!npath); -+ npath = ext3_ext_find_extent(tree, next, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ EXT_ASSERT(npath->p_depth == path->p_depth); -+ eh = npath[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) { -+ ext_debug(tree, "next leaf isnt full(%d)\n", -+ eh->eh_entries); -+ path = npath; -+ goto repeat; -+ } -+ ext_debug(tree, "next leaf hasno free space(%d,%d)\n", -+ eh->eh_entries, eh->eh_max); -+ } -+ -+ /* -+ * there is no free space in found leaf -+ * we're gonna add new leaf in the tree -+ */ -+ err = ext3_ext_create_new_leaf(handle, tree, path, newext); -+ if (err) -+ goto cleanup; -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ -+has_space: -+ nearex = path[depth].p_ext; -+ -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ -+ if (!nearex) { -+ /* there is no extent in this leaf, create first one */ -+ ext_debug(tree, "first extent in the leaf: %d:%d:%d\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len); -+ path[depth].p_ext = EXT_FIRST_EXTENT(eh); -+ } else if (newext->ee_block > nearex->ee_block) { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ if (nearex != EXT_LAST_EXTENT(eh)) { -+ len = EXT_MAX_EXTENT(eh) - nearex; -+ len = (len - 1) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 2, nearex + 1, len); -+ } -+ path[depth].p_ext = nearex + 1; -+ } else { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 1, nearex, len); -+ path[depth].p_ext = nearex; -+ } -+ -+ eh->eh_entries++; -+ nearex = path[depth].p_ext; -+ nearex->ee_block = newext->ee_block; -+ nearex->ee_start = newext->ee_start; -+ nearex->ee_len = newext->ee_len; -+ /* FIXME: support for large fs */ -+ nearex->ee_start_hi = 0; -+ -+merge: -+ /* try to merge extents to the right */ -+ while (nearex < EXT_LAST_EXTENT(eh)) { -+ if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1)) -+ break; -+ /* merge with next extent! */ -+ nearex->ee_len += nearex[1].ee_len; -+ if (nearex + 1 < EXT_LAST_EXTENT(eh)) { -+ len = (EXT_LAST_EXTENT(eh) - nearex - 1) * -+ sizeof(struct ext3_extent); -+ memmove(nearex + 1, nearex + 2, len); -+ } -+ eh->eh_entries--; -+ EXT_ASSERT(eh->eh_entries > 0); -+ } -+ -+ /* try to merge extents to the left */ -+ -+ /* time to correct all indexes above */ -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ if (err) -+ goto cleanup; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ -+cleanup: -+ if (npath) { -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ } -+ ext3_ext_tree_changed(tree); -+ ext3_ext_invalidate_cache(tree); -+ return err; -+} -+ -+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block, -+ unsigned long num, ext_prepare_callback func) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_ext_cache cbex; -+ struct ext3_extent *ex; -+ unsigned long next, start = 0, end = 0; -+ unsigned long last = block + num; -+ int depth, exists, err = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(func); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ while (block < last && block != EXT_MAX_BLOCK) { -+ num = last - block; -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(tree, block, path); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ break; -+ } -+ -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(path[depth].p_hdr); -+ ex = path[depth].p_ext; -+ next = ext3_ext_next_allocated_block(path); -+ -+ exists = 0; -+ if (!ex) { -+ /* there is no extent yet, so try to allocate -+ * all requested space */ -+ start = block; -+ end = block + num; -+ } else if (ex->ee_block > block) { -+ /* need to allocate space before found extent */ -+ start = block; -+ end = ex->ee_block; -+ if (block + num < end) -+ end = block + num; -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ /* need to allocate space after found extent */ -+ start = block; -+ end = block + num; -+ if (end >= next) -+ end = next; -+ } else if (block >= ex->ee_block) { -+ /* -+ * some part of requested space is covered -+ * by found extent -+ */ -+ start = block; -+ end = ex->ee_block + ex->ee_len; -+ if (block + num < end) -+ end = block + num; -+ exists = 1; -+ } else { -+ BUG(); -+ } -+ EXT_ASSERT(end > start); -+ -+ if (!exists) { -+ cbex.ec_block = start; -+ cbex.ec_len = end - start; -+ cbex.ec_start = 0; -+ cbex.ec_type = EXT3_EXT_CACHE_GAP; -+ } else { -+ cbex.ec_block = ex->ee_block; -+ cbex.ec_len = ex->ee_len; -+ cbex.ec_start = ex->ee_start; -+ cbex.ec_type = EXT3_EXT_CACHE_EXTENT; -+ } -+ -+ EXT_ASSERT(cbex.ec_len > 0); -+ EXT_ASSERT(path[depth].p_hdr); -+ err = func(tree, path, &cbex); -+ ext3_ext_drop_refs(path); -+ -+ if (err < 0) -+ break; -+ if (err == EXT_REPEAT) -+ continue; -+ else if (err == EXT_BREAK) { -+ err = 0; -+ break; -+ } -+ -+ if (EXT_DEPTH(tree) != depth) { -+ /* depth was changed. we have to realloc path */ -+ kfree(path); -+ path = NULL; -+ } -+ -+ block = cbex.ec_block + cbex.ec_len; -+ } -+ -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ -+ return err; -+} -+ -+static inline void -+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block, -+ __u32 len, __u32 start, int type) -+{ -+ EXT_ASSERT(len > 0); -+ if (tree->cex) { -+ tree->cex->ec_type = type; -+ tree->cex->ec_block = block; -+ tree->cex->ec_len = len; -+ tree->cex->ec_start = start; -+ } -+} -+ -+/* -+ * this routine calculate boundaries of the gap requested block fits into -+ * and cache this gap -+ */ -+static inline void -+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ unsigned long block) -+{ -+ int depth = EXT_DEPTH(tree); -+ unsigned long lblock, len; -+ struct ext3_extent *ex; -+ -+ if (!tree->cex) -+ return; -+ -+ ex = path[depth].p_ext; -+ if (ex == NULL) { -+ /* there is no extent yet, so gap is [0;-] */ -+ lblock = 0; -+ len = EXT_MAX_BLOCK; -+ ext_debug(tree, "cache gap(whole file):"); -+ } else if (block < ex->ee_block) { -+ lblock = block; -+ len = ex->ee_block - block; -+ ext_debug(tree, "cache gap(before): %lu [%lu:%lu]", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len); -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ lblock = ex->ee_block + ex->ee_len; -+ len = ext3_ext_next_allocated_block(path); -+ ext_debug(tree, "cache gap(after): [%lu:%lu] %lu", -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) block); -+ EXT_ASSERT(len > lblock); -+ len = len - lblock; -+ } else { -+ lblock = len = 0; -+ BUG(); -+ } -+ -+ ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len); -+ ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP); -+} -+ -+static inline int -+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block, -+ struct ext3_extent *ex) -+{ -+ struct ext3_ext_cache *cex = tree->cex; -+ -+ /* is there cache storage at all? */ -+ if (!cex) -+ return EXT3_EXT_CACHE_NO; -+ -+ /* has cache valid data? */ -+ if (cex->ec_type == EXT3_EXT_CACHE_NO) -+ return EXT3_EXT_CACHE_NO; -+ -+ EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP || -+ cex->ec_type == EXT3_EXT_CACHE_EXTENT); -+ if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) { -+ ex->ee_block = cex->ec_block; -+ ex->ee_start = cex->ec_start; -+ ex->ee_start_hi = 0; -+ ex->ee_len = cex->ec_len; -+ ext_debug(tree, "%lu cached by %lu:%lu:%lu\n", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) ex->ee_start); -+ return cex->ec_type; -+ } -+ -+ /* not in cache */ -+ return EXT3_EXT_CACHE_NO; -+} -+ -+/* -+ * routine removes index from the index block -+ * it's used in truncate case only. thus all requests are for -+ * last index in the block only -+ */ -+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct buffer_head *bh; -+ int err; -+ -+ /* free index block */ -+ path--; -+ EXT_ASSERT(path->p_hdr->eh_entries); -+ if ((err = ext3_ext_get_access(handle, tree, path))) -+ return err; -+ path->p_hdr->eh_entries--; -+ if ((err = ext3_ext_dirty(handle, tree, path))) -+ return err; -+ ext_debug(tree, "index is empty, remove it, free block %d\n", -+ path->p_idx->ei_leaf); -+ bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); -+ ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ return err; -+} -+ -+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth = EXT_DEPTH(tree); -+ int needed; -+ -+ if (path) { -+ /* probably there is space in leaf? */ -+ if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max) -+ return 1; -+ } -+ -+ /* -+ * the worste case we're expecting is creation of the -+ * new root (growing in depth) with index splitting -+ * for splitting we have to consider depth + 1 because -+ * previous growing could increase it -+ */ -+ depth = depth + 1; -+ -+ /* -+ * growing in depth: -+ * block allocation + new root + old root -+ */ -+ needed = EXT3_ALLOC_NEEDED + 2; -+ -+ /* index split. we may need: -+ * allocate intermediate indexes and new leaf -+ * change two blocks at each level, but root -+ * modify root block (inode) -+ */ -+ needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1; -+ -+ return needed; -+} -+ -+static int -+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, tex; -+ struct ext3_ext_path *npath; -+ int depth, creds, err; -+ -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1); -+ EXT_ASSERT(ex->ee_block < start); -+ -+ /* calculate tail extent */ -+ tex.ee_block = end + 1; -+ EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len); -+ tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block; -+ -+ creds = ext3_ext_calc_credits_for_insert(tree, path); -+ handle = ext3_ext_journal_restart(handle, creds); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ /* calculate head extent. use primary extent */ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ return err; -+ ex->ee_len = start - ex->ee_block; -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ return err; -+ -+ /* FIXME: some callback to free underlying resource -+ * and correct ee_start? */ -+ ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n", -+ ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len); -+ -+ npath = ext3_ext_find_extent(tree, ex->ee_block, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block); -+ EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len); -+ -+ err = ext3_ext_insert_extent(handle, tree, npath, &tex); -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ -+ return err; -+} -+ -+static int -+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, *fu = NULL, *lu, *le; -+ int err = 0, correct_index = 0; -+ int depth = EXT_DEPTH(tree), credits; -+ struct ext3_extent_header *eh; -+ unsigned a, b, block, num; -+ -+ ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end); -+ if (!path[depth].p_hdr) -+ path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh); -+ eh = path[depth].p_hdr; -+ EXT_ASSERT(eh); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* find where to start removing */ -+ le = ex = EXT_LAST_EXTENT(eh); -+ while (ex != EXT_FIRST_EXTENT(eh)) { -+ if (ex->ee_block <= end) -+ break; -+ ex--; -+ } -+ -+ if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) { -+ /* removal of internal part of the extent requested -+ * tail and head must be placed in different extent -+ * so, we have to insert one more extent */ -+ path[depth].p_ext = ex; -+ return ext3_ext_split_for_rm(handle, tree, path, start, end); -+ } -+ -+ lu = ex; -+ while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) { -+ ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len); -+ path[depth].p_ext = ex; -+ -+ a = ex->ee_block > start ? ex->ee_block : start; -+ b = ex->ee_block + ex->ee_len - 1 < end ? -+ ex->ee_block + ex->ee_len - 1 : end; -+ -+ ext_debug(tree, " border %u:%u\n", a, b); -+ -+ if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) { -+ block = 0; -+ num = 0; -+ BUG(); -+ } else if (a != ex->ee_block) { -+ /* remove tail of the extent */ -+ block = ex->ee_block; -+ num = a - block; -+ } else if (b != ex->ee_block + ex->ee_len - 1) { -+ /* remove head of the extent */ -+ block = a; -+ num = b - a; -+ } else { -+ /* remove whole extent: excelent! */ -+ block = ex->ee_block; -+ num = 0; -+ EXT_ASSERT(a == ex->ee_block && -+ b == ex->ee_block + ex->ee_len - 1); -+ } -+ -+ if (ex == EXT_FIRST_EXTENT(eh)) -+ correct_index = 1; -+ -+ credits = 1; -+ if (correct_index) -+ credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1; -+ if (tree->ops->remove_extent_credits) -+ credits+=tree->ops->remove_extent_credits(tree,ex,a,b); -+ -+ handle = ext3_ext_journal_restart(handle, credits); -+ if (IS_ERR(handle)) { -+ err = PTR_ERR(handle); -+ goto out; -+ } -+ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ if (tree->ops->remove_extent) -+ err = tree->ops->remove_extent(tree, ex, a, b); -+ if (err) -+ goto out; -+ -+ if (num == 0) { -+ /* this extent is removed entirely mark slot unused */ -+ ex->ee_start = ex->ee_start_hi = 0; -+ eh->eh_entries--; -+ fu = ex; -+ } -+ -+ ex->ee_block = block; -+ ex->ee_len = num; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ ext_debug(tree, "new extent: %u:%u:%u\n", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ ex--; -+ } -+ -+ if (fu) { -+ /* reuse unused slots */ -+ while (lu < le) { -+ if (lu->ee_start) { -+ *fu = *lu; -+ lu->ee_start = lu->ee_start_hi = 0; -+ fu++; -+ } -+ lu++; -+ } -+ } -+ -+ if (correct_index && eh->eh_entries) -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ -+ /* if this leaf is free, then we should -+ * remove it from index block above */ -+ if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) -+ err = ext3_ext_rm_idx(handle, tree, path + depth); -+ -+out: -+ return err; -+} -+ -+ -+static struct ext3_extent_idx * -+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block) -+{ -+ struct ext3_extent_idx *ix; -+ -+ ix = EXT_LAST_INDEX(hdr); -+ while (ix != EXT_FIRST_INDEX(hdr)) { -+ if (ix->ei_block <= block) -+ break; -+ ix--; -+ } -+ return ix; -+} -+ -+/* -+ * returns 1 if current index have to be freed (even partial) -+ */ -+static int inline -+ext3_ext_more_to_rm(struct ext3_ext_path *path) -+{ -+ EXT_ASSERT(path->p_idx); -+ -+ if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr)) -+ return 0; -+ -+ /* -+ * if truncate on deeper level happened it it wasn't partial -+ * so we have to consider current index for truncation -+ */ -+ if (path->p_hdr->eh_entries == path->p_block) -+ return 0; -+ return 1; -+} -+ -+int ext3_ext_remove_space(struct ext3_extents_tree *tree, -+ unsigned long start, unsigned long end) -+{ -+ struct inode *inode = tree->inode; -+ struct super_block *sb = inode->i_sb; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_ext_path *path; -+ handle_t *handle; -+ int i = 0, err = 0; -+ -+ ext_debug(tree, "space to be removed: %lu:%lu\n", start, end); -+ -+ /* probably first extent we're gonna free will be last in block */ -+ handle = ext3_journal_start(inode, depth + 1); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ ext3_ext_invalidate_cache(tree); -+ -+ /* -+ * we start scanning from right side freeing all the blocks -+ * after i_size and walking into the deep -+ */ -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL); -+ if (IS_ERR(path)) { -+ ext3_error(sb, __FUNCTION__, "Can't allocate path array"); -+ ext3_journal_stop(handle); -+ return -ENOMEM; -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[i].p_hdr = EXT_ROOT_HDR(tree); -+ -+ while (i >= 0 && err == 0) { -+ if (i == depth) { -+ /* this is leaf block */ -+ err = ext3_ext_rm_leaf(handle, tree, path, start, end); -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ continue; -+ } -+ -+ /* this is index block */ -+ if (!path[i].p_hdr) { -+ ext_debug(tree, "initialize header\n"); -+ path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh); -+ } -+ -+ EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max); -+ EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC); -+ -+ if (!path[i].p_idx) { -+ /* this level hasn't touched yet */ -+ path[i].p_idx = -+ ext3_ext_last_covered(path[i].p_hdr, end); -+ path[i].p_block = path[i].p_hdr->eh_entries + 1; -+ ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n", -+ path[i].p_hdr, path[i].p_hdr->eh_entries); -+ } else { -+ /* we've already was here, see at next index */ -+ path[i].p_idx--; -+ } -+ -+ ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n", -+ i, EXT_FIRST_INDEX(path[i].p_hdr), -+ path[i].p_idx); -+ if (ext3_ext_more_to_rm(path + i)) { -+ /* go to the next level */ -+ ext_debug(tree, "move to level %d (block %d)\n", -+ i + 1, path[i].p_idx->ei_leaf); -+ memset(path + i + 1, 0, sizeof(*path)); -+ path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf); -+ if (!path[i+1].p_bh) { -+ /* should we reset i_size? */ -+ err = -EIO; -+ break; -+ } -+ /* put actual number of indexes to know is this -+ * number got changed at the next iteration */ -+ path[i].p_block = path[i].p_hdr->eh_entries; -+ i++; -+ } else { -+ /* we finish processing this index, go up */ -+ if (path[i].p_hdr->eh_entries == 0 && i > 0) { -+ /* index is empty, remove it -+ * handle must be already prepared by the -+ * truncatei_leaf() */ -+ err = ext3_ext_rm_idx(handle, tree, path + i); -+ } -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ ext_debug(tree, "return to level %d\n", i); -+ } -+ } -+ -+ /* TODO: flexible tree reduction should be here */ -+ if (path->p_hdr->eh_entries == 0) { -+ /* -+ * truncate to zero freed all the tree -+ * so, we need to correct eh_depth -+ */ -+ err = ext3_ext_get_access(handle, tree, path); -+ if (err == 0) { -+ EXT_ROOT_HDR(tree)->eh_depth = 0; -+ EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree); -+ err = ext3_ext_dirty(handle, tree, path); -+ } -+ } -+ ext3_ext_tree_changed(tree); -+ -+ kfree(path); -+ ext3_journal_stop(handle); -+ -+ return err; -+} -+ -+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks) -+{ -+ int lcap, icap, rcap, leafs, idxs, num; -+ -+ rcap = ext3_ext_space_root(tree); -+ if (blocks <= rcap) { -+ /* all extents fit to the root */ -+ return 0; -+ } -+ -+ rcap = ext3_ext_space_root_idx(tree); -+ lcap = ext3_ext_space_block(tree); -+ icap = ext3_ext_space_block_idx(tree); -+ -+ num = leafs = (blocks + lcap - 1) / lcap; -+ if (leafs <= rcap) { -+ /* all pointers to leafs fit to the root */ -+ return leafs; -+ } -+ -+ /* ok. we need separate index block(s) to link all leaf blocks */ -+ idxs = (leafs + icap - 1) / icap; -+ do { -+ num += idxs; -+ idxs = (idxs + icap - 1) / icap; -+ } while (idxs > rcap); -+ -+ return num; -+} -+ -+/* -+ * called at mount time -+ */ -+void ext3_ext_init(struct super_block *sb) -+{ -+ /* -+ * possible initialization would be here -+ */ -+ -+ if (test_opt(sb, EXTENTS)) { -+ printk("EXT3-fs: file extents enabled"); -+#ifdef AGRESSIVE_TEST -+ printk(", agressive tests"); -+#endif -+#ifdef CHECK_BINSEARCH -+ printk(", check binsearch"); -+#endif -+ printk("\n"); -+ } -+} -+ -+/* -+ * called at umount time -+ */ -+void ext3_ext_release(struct super_block *sb) -+{ -+} -+ -+/************************************************************************ -+ * VFS related routines -+ ************************************************************************/ -+ -+static int ext3_get_inode_write_access(handle_t *handle, void *buffer) -+{ -+ /* we use in-core data, not bh */ -+ return 0; -+} -+ -+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer) -+{ -+ struct inode *inode = buffer; -+ return ext3_mark_inode_dirty(handle, inode); -+} -+ -+static int ext3_ext_mergable(struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ /* FIXME: support for large fs */ -+ if (ex1->ee_start + ex1->ee_len == ex2->ee_start) -+ return 1; -+ return 0; -+} -+ -+static int -+ext3_remove_blocks_credits(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed; -+ -+ /* at present, extent can't cross block group */; -+ needed = 4; /* bitmap + group desc + sb + inode */ -+ -+#ifdef CONFIG_QUOTA -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ return needed; -+} -+ -+static int -+ext3_remove_blocks(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed = ext3_remove_blocks_credits(tree, ex, from, to); -+ handle_t *handle = ext3_journal_start(tree->inode, needed); -+ struct buffer_head *bh; -+ int i; -+ -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { -+ /* tail removal */ -+ unsigned long num, start; -+ num = ex->ee_block + ex->ee_len - from; -+ start = ex->ee_start + ex->ee_len - num; -+ ext_debug(tree, "free last %lu blocks starting %lu\n", -+ num, start); -+ for (i = 0; i < num; i++) { -+ bh = sb_find_get_block(tree->inode->i_sb, start + i); -+ ext3_forget(handle, 0, tree->inode, bh, start + i); -+ } -+ ext3_free_blocks(handle, tree->inode, start, num); -+ } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { -+ printk("strange request: removal %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } else { -+ printk("strange request: removal(2) %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } -+ ext3_journal_stop(handle); -+ return 0; -+} -+ -+static int ext3_ext_find_goal(struct inode *inode, -+ struct ext3_ext_path *path, unsigned long block) -+{ -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ int depth; -+ -+ if (path) { -+ struct ext3_extent *ex; -+ depth = path->p_depth; -+ -+ /* try to predict block placement */ -+ if ((ex = path[depth].p_ext)) -+ return ex->ee_start + (block - ex->ee_block); -+ -+ /* it looks index is empty -+ * try to find starting from index itself */ -+ if (path[depth].p_bh) -+ return path[depth].p_bh->b_blocknr; -+ } -+ -+ /* OK. use inode's group */ -+ bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ return bg_start + colour + block; -+} -+ -+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *ex, int *err) -+{ -+ struct inode *inode = tree->inode; -+ int newblock, goal; -+ -+ EXT_ASSERT(path); -+ EXT_ASSERT(ex); -+ EXT_ASSERT(ex->ee_start); -+ EXT_ASSERT(ex->ee_len); -+ -+ /* reuse block from the extent to order data/metadata */ -+ newblock = ex->ee_start++; -+ ex->ee_len--; -+ if (ex->ee_len == 0) { -+ ex->ee_len = 1; -+ /* allocate new block for the extent */ -+ goal = ext3_ext_find_goal(inode, path, ex->ee_block); -+ ex->ee_start = ext3_new_block(handle, inode, goal, err); -+ ex->ee_start_hi = 0; -+ if (ex->ee_start == 0) { -+ /* error occured: restore old extent */ -+ ex->ee_start = newblock; -+ return 0; -+ } -+ } -+ return newblock; -+} -+ -+static struct ext3_extents_helpers ext3_blockmap_helpers = { -+ .get_write_access = ext3_get_inode_write_access, -+ .mark_buffer_dirty = ext3_mark_buffer_dirty, -+ .mergable = ext3_ext_mergable, -+ .new_block = ext3_new_block_cb, -+ .remove_extent = ext3_remove_blocks, -+ .remove_extent_credits = ext3_remove_blocks_credits, -+}; -+ -+void ext3_init_tree_desc(struct ext3_extents_tree *tree, -+ struct inode *inode) -+{ -+ tree->inode = inode; -+ tree->root = (void *) EXT3_I(inode)->i_data; -+ tree->buffer = (void *) inode; -+ tree->buffer_len = sizeof(EXT3_I(inode)->i_data); -+ tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent; -+ tree->ops = &ext3_blockmap_helpers; -+} -+ -+int ext3_ext_get_block(handle_t *handle, struct inode *inode, -+ long iblock, struct buffer_head *bh_result, -+ int create, int extend_disksize) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_extent newex; -+ struct ext3_extent *ex; -+ int goal, newblock, err = 0, depth; -+ struct ext3_extents_tree tree; -+ -+ clear_buffer_new(bh_result); -+ ext3_init_tree_desc(&tree, inode); -+ ext_debug(&tree, "block %d requested for inode %u\n", -+ (int) iblock, (unsigned) inode->i_ino); -+ mutex_lock(&EXT3_I(inode)->truncate_mutex); -+ -+ /* check in cache */ -+ if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) { -+ if (goal == EXT3_EXT_CACHE_GAP) { -+ if (!create) { -+ /* block isn't allocated yet and -+ * user don't want to allocate it */ -+ goto out2; -+ } -+ /* we should allocate requested block */ -+ } else if (goal == EXT3_EXT_CACHE_EXTENT) { -+ /* block is already allocated */ -+ newblock = iblock - newex.ee_block + newex.ee_start; -+ goto out; -+ } else { -+ EXT_ASSERT(0); -+ } -+ } -+ -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(&tree, iblock, NULL); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ goto out2; -+ } -+ -+ depth = EXT_DEPTH(&tree); -+ -+ /* -+ * consistent leaf must not be empty -+ * this situations is possible, though, _during_ tree modification -+ * this is why assert can't be put in ext3_ext_find_extent() -+ */ -+ EXT_ASSERT(path[depth].p_ext != NULL || depth == 0); -+ -+ if ((ex = path[depth].p_ext)) { -+ /* if found exent covers block, simple return it */ -+ if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) { -+ newblock = iblock - ex->ee_block + ex->ee_start; -+ ext_debug(&tree, "%d fit into %d:%d -> %d\n", -+ (int) iblock, ex->ee_block, ex->ee_len, -+ newblock); -+ ext3_ext_put_in_cache(&tree, ex->ee_block, -+ ex->ee_len, ex->ee_start, -+ EXT3_EXT_CACHE_EXTENT); -+ goto out; -+ } -+ } -+ -+ /* -+ * requested block isn't allocated yet -+ * we couldn't try to create block if create flag is zero -+ */ -+ if (!create) { -+ /* put just found gap into cache to speedup subsequest reqs */ -+ ext3_ext_put_gap_in_cache(&tree, path, iblock); -+ goto out2; -+ } -+ -+ /* allocate new block */ -+ goal = ext3_ext_find_goal(inode, path, iblock); -+ newblock = ext3_new_block(handle, inode, goal, &err); -+ if (!newblock) -+ goto out2; -+ ext_debug(&tree, "allocate new block: goal %d, found %d\n", -+ goal, newblock); -+ -+ /* try to insert new extent into found leaf and return */ -+ newex.ee_block = iblock; -+ newex.ee_start = newblock; -+ newex.ee_start_hi = 0; -+ newex.ee_len = 1; -+ err = ext3_ext_insert_extent(handle, &tree, path, &newex); -+ if (err) -+ goto out2; -+ -+ if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize) -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ -+ /* previous routine could use block we allocated */ -+ newblock = newex.ee_start; -+ set_buffer_new(bh_result); -+ -+ ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len, -+ newex.ee_start, EXT3_EXT_CACHE_EXTENT); -+out: -+ ext3_ext_show_leaf(&tree, path); -+ map_bh(bh_result, inode->i_sb, newblock); -+out2: -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ mutex_unlock(&EXT3_I(inode)->truncate_mutex); -+ -+ return err; -+} -+ -+void ext3_ext_truncate(struct inode * inode, struct page *page) -+{ -+ struct address_space *mapping = inode->i_mapping; -+ struct super_block *sb = inode->i_sb; -+ struct ext3_extents_tree tree; -+ unsigned long last_block; -+ handle_t *handle; -+ int err = 0; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ /* -+ * probably first extent we're gonna free will be last in block -+ */ -+ err = ext3_writepage_trans_blocks(inode) + 3; -+ handle = ext3_journal_start(inode, err); -+ if (IS_ERR(handle)) { -+ if (page) { -+ clear_highpage(page); -+ flush_dcache_page(page); -+ unlock_page(page); -+ page_cache_release(page); -+ } -+ return; -+ } -+ -+ if (page) -+ ext3_block_truncate_page(handle, page, mapping, inode->i_size); -+ -+ mutex_lock(&EXT3_I(inode)->truncate_mutex); -+ ext3_ext_invalidate_cache(&tree); -+ -+ /* -+ * TODO: optimization is possible here -+ * probably we need not scaning at all, -+ * because page truncation is enough -+ */ -+ if (ext3_orphan_add(handle, inode)) -+ goto out_stop; -+ -+ /* we have to know where to truncate from in crash case */ -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ ext3_mark_inode_dirty(handle, inode); -+ -+ last_block = (inode->i_size + sb->s_blocksize - 1) >> -+ EXT3_BLOCK_SIZE_BITS(sb); -+ err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK); -+ -+ /* In a multi-transaction truncate, we only make the final -+ * transaction synchronous */ -+ if (IS_SYNC(inode)) -+ handle->h_sync = 1; -+ -+out_stop: -+ /* -+ * If this was a simple ftruncate(), and the file will remain alive -+ * then we need to clear up the orphan record which we created above. -+ * However, if this was a real unlink then we were called by -+ * ext3_delete_inode(), and we allow that function to clean up the -+ * orphan info for us. -+ */ -+ if (inode->i_nlink) -+ ext3_orphan_del(handle, inode); -+ -+ mutex_unlock(&EXT3_I(inode)->truncate_mutex); -+ ext3_journal_stop(handle); -+} -+ -+/* -+ * this routine calculate max number of blocks we could modify -+ * in order to allocate new block for an inode -+ */ -+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num) -+{ -+ struct ext3_extents_tree tree; -+ int needed; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ needed = ext3_ext_calc_credits_for_insert(&tree, NULL); -+ -+ /* caller want to allocate num blocks */ -+ needed *= num; -+ -+#ifdef CONFIG_QUOTA -+ /* -+ * FIXME: real calculation should be here -+ * it depends on blockmap format of qouta file -+ */ -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ -+ return needed; -+} -+ -+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ ext3_extent_tree_init(handle, &tree); -+} -+ -+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ return ext3_ext_calc_metadata_amount(&tree, blocks); -+} -+ -+static int -+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *newex) -+{ -+ struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private; -+ -+ if (newex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ if (buf->err < 0) -+ return EXT_BREAK; -+ if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen) -+ return EXT_BREAK; -+ -+ if (!copy_to_user(buf->cur, newex, sizeof(*newex))) { -+ buf->err++; -+ buf->cur += sizeof(*newex); -+ } else { -+ buf->err = -EFAULT; -+ return EXT_BREAK; -+ } -+ return EXT_CONTINUE; -+} -+ -+static int -+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *ex) -+{ -+ struct ext3_extent_tree_stats *buf = -+ (struct ext3_extent_tree_stats *) tree->private; -+ int depth; -+ -+ if (ex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ depth = EXT_DEPTH(tree); -+ buf->extents_num++; -+ if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr)) -+ buf->leaf_num++; -+ return EXT_CONTINUE; -+} -+ -+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, -+ unsigned long arg) -+{ -+ int err = 0; -+ -+ if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)) -+ return -EINVAL; -+ -+ if (cmd == EXT3_IOC_GET_EXTENTS) { -+ struct ext3_extent_buf buf; -+ struct ext3_extents_tree tree; -+ -+ if (copy_from_user(&buf, (void *) arg, sizeof(buf))) -+ return -EFAULT; -+ -+ ext3_init_tree_desc(&tree, inode); -+ buf.cur = buf.buffer; -+ buf.err = 0; -+ tree.private = &buf; -+ mutex_lock(&EXT3_I(inode)->truncate_mutex); -+ err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK, -+ ext3_ext_store_extent_cb); -+ mutex_unlock(&EXT3_I(inode)->truncate_mutex); -+ if (err == 0) -+ err = buf.err; -+ } else if (cmd == EXT3_IOC_GET_TREE_STATS) { -+ struct ext3_extent_tree_stats buf; -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ mutex_lock(&EXT3_I(inode)->truncate_mutex); -+ buf.depth = EXT_DEPTH(&tree); -+ buf.extents_num = 0; -+ buf.leaf_num = 0; -+ tree.private = &buf; -+ err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK, -+ ext3_ext_collect_stats_cb); -+ mutex_unlock(&EXT3_I(inode)->truncate_mutex); -+ if (!err) -+ err = copy_to_user((void *) arg, &buf, sizeof(buf)); -+ } else if (cmd == EXT3_IOC_GET_TREE_DEPTH) { -+ struct ext3_extents_tree tree; -+ ext3_init_tree_desc(&tree, inode); -+ mutex_lock(&EXT3_I(inode)->truncate_mutex); -+ err = EXT_DEPTH(&tree); -+ mutex_unlock(&EXT3_I(inode)->truncate_mutex); -+ } -+ -+ return err; -+} -+ -+EXPORT_SYMBOL(ext3_init_tree_desc); -+EXPORT_SYMBOL(ext3_mark_inode_dirty); -+EXPORT_SYMBOL(ext3_ext_invalidate_cache); -+EXPORT_SYMBOL(ext3_ext_insert_extent); -+EXPORT_SYMBOL(ext3_ext_walk_space); -+EXPORT_SYMBOL(ext3_ext_find_goal); -+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert); -Index: linux-stage/fs/ext3/ialloc.c -=================================================================== ---- linux-stage.orig/fs/ext3/ialloc.c 2006-07-16 13:55:31.000000000 +0800 -+++ linux-stage/fs/ext3/ialloc.c 2006-07-16 14:10:20.000000000 +0800 -@@ -600,7 +600,7 @@ got: - ei->i_dir_start_lookup = 0; - ei->i_disksize = 0; - -- ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL; -+ ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL); - if (S_ISLNK(mode)) - ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL); - /* dirsync only applies to directories */ -@@ -644,6 +644,18 @@ got: - if (err) - goto fail_free_drop; - -+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) { -+ EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL; -+ ext3_extents_initialize_blockmap(handle, inode); -+ if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) { -+ err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh); -+ if (err) goto fail; -+ EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS); -+ BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata"); -+ err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); -+ } -+ } -+ - err = ext3_mark_inode_dirty(handle, inode); - if (err) { - ext3_std_error(sb, err); -Index: linux-stage/fs/ext3/inode.c -=================================================================== ---- linux-stage.orig/fs/ext3/inode.c 2006-07-16 13:55:31.000000000 +0800 -+++ linux-stage/fs/ext3/inode.c 2006-07-16 14:11:28.000000000 +0800 -@@ -40,7 +40,7 @@ - #include "iopen.h" - #include "acl.h" - --static int ext3_writepage_trans_blocks(struct inode *inode); -+int ext3_writepage_trans_blocks(struct inode *inode); - - /* - * Test whether an inode is a fast symlink. -@@ -944,6 +944,17 @@ out: - - #define DIO_CREDITS (EXT3_RESERVE_TRANS_BLOCKS + 32) - -+static inline int -+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block, -+ struct buffer_head *bh, int create, int extend_disksize) -+{ -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_get_block(handle, inode, block, bh, create, -+ extend_disksize); -+ return ext3_get_blocks_handle(handle, inode, block, 1, bh, create, -+ extend_disksize); -+} -+ - static int ext3_get_block(struct inode *inode, sector_t iblock, - struct buffer_head *bh_result, int create) - { -@@ -984,8 +995,8 @@ static int ext3_get_block(struct inode * - - get_block: - if (ret == 0) { -- ret = ext3_get_blocks_handle(handle, inode, iblock, -- max_blocks, bh_result, create, 0); -+ ret = ext3_get_block_wrap(handle, inode, iblock, -+ bh_result, create, 0); - if (ret > 0) { - bh_result->b_size = (ret << inode->i_blkbits); - ret = 0; -@@ -1008,7 +1019,7 @@ struct buffer_head *ext3_getblk(handle_t - dummy.b_state = 0; - dummy.b_blocknr = -1000; - buffer_trace_init(&dummy.b_history); -- err = ext3_get_blocks_handle(handle, inode, block, 1, -+ err = ext3_get_block_wrap(handle, inode, block, - &dummy, create, 1); - if (err == 1) { - err = 0; -@@ -1756,7 +1767,7 @@ void ext3_set_aops(struct inode *inode) - * This required during truncate. We need to physically zero the tail end - * of that block so it doesn't yield old data if the file is later grown. - */ --static int ext3_block_truncate_page(handle_t *handle, struct page *page, -+int ext3_block_truncate_page(handle_t *handle, struct page *page, - struct address_space *mapping, loff_t from) - { - ext3_fsblk_t index = from >> PAGE_CACHE_SHIFT; -@@ -2260,6 +2271,9 @@ void ext3_truncate(struct inode *inode) - return; - } - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_truncate(inode, page); -+ - handle = start_transaction(inode); - if (IS_ERR(handle)) { - if (page) { -@@ -3004,12 +3018,15 @@ err_out: - * block and work out the exact number of indirects which are touched. Pah. - */ - --static int ext3_writepage_trans_blocks(struct inode *inode) -+int ext3_writepage_trans_blocks(struct inode *inode) - { - int bpp = ext3_journal_blocks_per_page(inode); - int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3; - int ret; - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_writepage_trans_blocks(inode, bpp); -+ - if (ext3_should_journal_data(inode)) - ret = 3 * (bpp + indirects) + 2; - else -@@ -3277,7 +3294,7 @@ int ext3_prep_san_write(struct inode *in - - /* alloc blocks one by one */ - for (i = 0; i < nblocks; i++) { -- ret = ext3_get_block_handle(handle, inode, blocks[i], -+ ret = ext3_get_blocks_handle(handle, inode, blocks[i], 1, - &bh_tmp, 1, 1); - if (ret) - break; -@@ -3337,7 +3354,7 @@ int ext3_map_inode_page(struct inode *in - if (blocks[i] != 0) - continue; - -- rc = ext3_get_block_handle(handle, inode, iblock, &dummy, 1, 1); -+ rc = ext3_get_blocks_handle(handle, inode, iblock, 1, &dummy, 1, 1); - if (rc) { - printk(KERN_INFO "ext3_map_inode_page: error reading " - "block %ld\n", iblock); -Index: linux-stage/fs/ext3/Makefile -=================================================================== ---- linux-stage.orig/fs/ext3/Makefile 2006-07-16 13:55:31.000000000 +0800 -+++ linux-stage/fs/ext3/Makefile 2006-07-16 14:10:21.000000000 +0800 -@@ -5,7 +5,8 @@ - obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ -- ioctl.o namei.o super.o symlink.o hash.o resize.o -+ ioctl.o namei.o super.o symlink.o hash.o resize.o \ -+ extents.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o -Index: linux-stage/fs/ext3/super.c -=================================================================== ---- linux-stage.orig/fs/ext3/super.c 2006-07-16 13:55:31.000000000 +0800 -+++ linux-stage/fs/ext3/super.c 2006-07-16 14:10:21.000000000 +0800 -@@ -391,6 +391,7 @@ static void ext3_put_super (struct super - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); - if (!(sb->s_flags & MS_RDONLY)) { -@@ -455,6 +456,8 @@ static struct inode *ext3_alloc_inode(st - #endif - ei->i_block_alloc_info = NULL; - ei->vfs_inode.i_version = 1; -+ -+ memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent)); - return &ei->vfs_inode; - } - -@@ -638,6 +641,7 @@ enum { - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, -+ Opt_extents, Opt_noextents, Opt_extdebug, - Opt_grpquota - }; - -@@ -690,6 +694,9 @@ static match_table_t tokens = { - {Opt_iopen, "iopen"}, - {Opt_noiopen, "noiopen"}, - {Opt_iopen_nopriv, "iopen_nopriv"}, -+ {Opt_extents, "extents"}, -+ {Opt_noextents, "noextents"}, -+ {Opt_extdebug, "extdebug"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -1035,6 +1041,15 @@ clear_qf_name: - case Opt_bh: - clear_opt(sbi->s_mount_opt, NOBH); - break; -+ case Opt_extents: -+ set_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_noextents: -+ clear_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_extdebug: -+ set_opt (sbi->s_mount_opt, EXTDEBUG); -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1760,6 +1772,7 @@ static int ext3_fill_super (struct super - test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered": - "writeback"); - -+ ext3_ext_init(sb); - lock_kernel(); - return 0; - -Index: linux-stage/fs/ext3/ioctl.c -=================================================================== ---- linux-stage.orig/fs/ext3/ioctl.c 2006-07-16 13:55:31.000000000 +0800 -+++ linux-stage/fs/ext3/ioctl.c 2006-07-16 13:55:31.000000000 +0800 -@@ -135,6 +135,10 @@ flags_err: - mutex_unlock(&inode->i_mutex); - return err; - } -+ case EXT3_IOC_GET_EXTENTS: -+ case EXT3_IOC_GET_TREE_STATS: -+ case EXT3_IOC_GET_TREE_DEPTH: -+ return ext3_ext_ioctl(inode, filp, cmd, arg); - case EXT3_IOC_GETVERSION: - case EXT3_IOC_GETVERSION_OLD: - return put_user(inode->i_generation, (int __user *) arg); -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h 2006-07-16 13:55:31.000000000 +0800 -+++ linux-stage/include/linux/ext3_fs.h 2006-07-16 14:10:21.000000000 +0800 -@@ -181,9 +181,10 @@ struct ext3_group_desc - #define EXT3_NOTAIL_FL 0x00008000 /* file tail should not be merged */ - #define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ - #define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ -+#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ - #define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */ - --#define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ -+#define EXT3_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */ - #define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ - - /* -@@ -233,6 +234,9 @@ struct ext3_new_group_data { - #endif - #define EXT3_IOC_GETRSVSZ _IOR('f', 5, long) - #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) -+#define EXT3_IOC_GET_EXTENTS _IOR('f', 7, long) -+#define EXT3_IOC_GET_TREE_DEPTH _IOR('f', 8, long) -+#define EXT3_IOC_GET_TREE_STATS _IOR('f', 9, long) - - /* - * Mount options -@@ -373,6 +377,8 @@ struct ext3_inode { - #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ - #define EXT3_MOUNT_IOPEN 0x400000 /* Allow access via iopen */ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x800000/* Make iopen world-readable */ -+#define EXT3_MOUNT_EXTENTS 0x1000000/* Extents support */ -+#define EXT3_MOUNT_EXTDEBUG 0x2000000/* Extents debug */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -563,11 +569,13 @@ static inline struct ext3_inode_info *EX - #define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ - #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ - #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 -+#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ - - #define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR - #define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \ - EXT3_FEATURE_INCOMPAT_RECOVER| \ -- EXT3_FEATURE_INCOMPAT_META_BG) -+ EXT3_FEATURE_INCOMPAT_META_BG| \ -+ EXT3_FEATURE_INCOMPAT_EXTENTS) - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) -@@ -787,6 +795,9 @@ extern unsigned long ext3_count_free (st - - - /* inode.c */ -+extern int ext3_block_truncate_page(handle_t *, struct page *, -+ struct address_space *, loff_t); -+extern int ext3_writepage_trans_blocks(struct inode *inode); - int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, - struct buffer_head *bh, ext3_fsblk_t blocknr); - struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); -@@ -860,6 +870,16 @@ extern struct inode_operations ext3_spec - extern struct inode_operations ext3_symlink_inode_operations; - extern struct inode_operations ext3_fast_symlink_inode_operations; - -+/* extents.c */ -+extern int ext3_ext_writepage_trans_blocks(struct inode *, int); -+extern int ext3_ext_get_block(handle_t *, struct inode *, long, -+ struct buffer_head *, int, int); -+extern void ext3_ext_truncate(struct inode *, struct page *); -+extern void ext3_ext_init(struct super_block *); -+extern void ext3_ext_release(struct super_block *); -+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *); -+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, -+ unsigned int cmd, unsigned long arg); - - #endif /* __KERNEL__ */ - -Index: linux-stage/include/linux/ext3_extents.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-stage/include/linux/ext3_extents.h 2006-07-16 13:55:31.000000000 +0800 -@@ -0,0 +1,262 @@ -+/* -+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+#ifndef _LINUX_EXT3_EXTENTS -+#define _LINUX_EXT3_EXTENTS -+ -+/* -+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks -+ * become very little, so index split, in-depth growing and -+ * other hard changes happens much more often -+ * this is for debug purposes only -+ */ -+#define AGRESSIVE_TEST_ -+ -+/* -+ * if CHECK_BINSEARCH defined, then results of binary search -+ * will be checked by linear search -+ */ -+#define CHECK_BINSEARCH_ -+ -+/* -+ * if EXT_DEBUG is defined you can use 'extdebug' mount option -+ * to get lots of info what's going on -+ */ -+#define EXT_DEBUG_ -+#ifdef EXT_DEBUG -+#define ext_debug(tree,fmt,a...) \ -+do { \ -+ if (test_opt((tree)->inode->i_sb, EXTDEBUG)) \ -+ printk(fmt, ##a); \ -+} while (0); -+#else -+#define ext_debug(tree,fmt,a...) -+#endif -+ -+/* -+ * if EXT_STATS is defined then stats numbers are collected -+ * these number will be displayed at umount time -+ */ -+#define EXT_STATS_ -+ -+ -+#define EXT3_ALLOC_NEEDED 3 /* block bitmap + group desc. + sb */ -+ -+/* -+ * ext3_inode has i_block array (total 60 bytes) -+ * first 4 bytes are used to store: -+ * - tree depth (0 mean there is no tree yet. all extents in the inode) -+ * - number of alive extents in the inode -+ */ -+ -+/* -+ * this is extent on-disk structure -+ * it's used at the bottom of the tree -+ */ -+struct ext3_extent { -+ __u32 ee_block; /* first logical block extent covers */ -+ __u16 ee_len; /* number of blocks covered by extent */ -+ __u16 ee_start_hi; /* high 16 bits of physical block */ -+ __u32 ee_start; /* low 32 bigs of physical block */ -+}; -+ -+/* -+ * this is index on-disk structure -+ * it's used at all the levels, but the bottom -+ */ -+struct ext3_extent_idx { -+ __u32 ei_block; /* index covers logical blocks from 'block' */ -+ __u32 ei_leaf; /* pointer to the physical block of the next * -+ * level. leaf or next index could bet here */ -+ __u16 ei_leaf_hi; /* high 16 bits of physical block */ -+ __u16 ei_unused; -+}; -+ -+/* -+ * each block (leaves and indexes), even inode-stored has header -+ */ -+struct ext3_extent_header { -+ __u16 eh_magic; /* probably will support different formats */ -+ __u16 eh_entries; /* number of valid entries */ -+ __u16 eh_max; /* capacity of store in entries */ -+ __u16 eh_depth; /* has tree real underlaying blocks? */ -+ __u32 eh_generation; /* flags(8 bits) | generation of the tree */ -+}; -+ -+#define EXT3_EXT_MAGIC 0xf30a -+ -+/* -+ * array of ext3_ext_path contains path to some extent -+ * creation/lookup routines use it for traversal/splitting/etc -+ * truncate uses it to simulate recursive walking -+ */ -+struct ext3_ext_path { -+ __u32 p_block; -+ __u16 p_depth; -+ struct ext3_extent *p_ext; -+ struct ext3_extent_idx *p_idx; -+ struct ext3_extent_header *p_hdr; -+ struct buffer_head *p_bh; -+}; -+ -+/* -+ * structure for external API -+ */ -+ -+/* -+ * storage for cached extent -+ */ -+struct ext3_ext_cache { -+ __u32 ec_start; -+ __u32 ec_block; -+ __u32 ec_len; -+ __u32 ec_type; -+}; -+ -+#define EXT3_EXT_CACHE_NO 0 -+#define EXT3_EXT_CACHE_GAP 1 -+#define EXT3_EXT_CACHE_EXTENT 2 -+ -+/* -+ * ext3_extents_tree is used to pass initial information -+ * to top-level extents API -+ */ -+struct ext3_extents_helpers; -+struct ext3_extents_tree { -+ struct inode *inode; /* inode which tree belongs to */ -+ void *root; /* ptr to data top of tree resides at */ -+ void *buffer; /* will be passed as arg to ^^ routines */ -+ int buffer_len; -+ void *private; -+ struct ext3_ext_cache *cex;/* last found extent */ -+ struct ext3_extents_helpers *ops; -+}; -+ -+struct ext3_extents_helpers { -+ int (*get_write_access)(handle_t *h, void *buffer); -+ int (*mark_buffer_dirty)(handle_t *h, void *buffer); -+ int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2); -+ int (*remove_extent_credits)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*remove_extent)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*new_block)(handle_t *, struct ext3_extents_tree *, -+ struct ext3_ext_path *, struct ext3_extent *, -+ int *); -+}; -+ -+/* -+ * to be called by ext3_ext_walk_space() -+ * negative retcode - error -+ * positive retcode - signal for ext3_ext_walk_space(), see below -+ * callback must return valid extent (passed or newly created) -+ */ -+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *, -+ struct ext3_ext_path *, -+ struct ext3_ext_cache *); -+ -+#define EXT_CONTINUE 0 -+#define EXT_BREAK 1 -+#define EXT_REPEAT 2 -+ -+ -+#define EXT_MAX_BLOCK 0xffffffff -+ -+ -+#define EXT_FIRST_EXTENT(__hdr__) \ -+ ((struct ext3_extent *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_FIRST_INDEX(__hdr__) \ -+ ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_HAS_FREE_INDEX(__path__) \ -+ ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max) -+#define EXT_LAST_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_LAST_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_MAX_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_MAX_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_HDR_GEN(__hdr__) ((__hdr__)->eh_generation & 0x00ffffff) -+#define EXT_FLAGS(__hdr__) ((__hdr__)->eh_generation >> 24) -+#define EXT_FLAGS_CLR_UNKNOWN 0x7 /* Flags cleared on modification */ -+ -+#define EXT_BLOCK_HDR(__bh__) ((struct ext3_extent_header *)(__bh__)->b_data) -+#define EXT_ROOT_HDR(__tree__) ((struct ext3_extent_header *)(__tree__)->root) -+#define EXT_DEPTH(__tree__) (EXT_ROOT_HDR(__tree__)->eh_depth) -+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__)) -+ -+#define EXT_ASSERT(__x__) if (!(__x__)) BUG(); -+ -+#define EXT_CHECK_PATH(tree,path) \ -+{ \ -+ int depth = EXT_DEPTH(tree); \ -+ BUG_ON((unsigned long) (path) < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_idx < \ -+ __PAGE_OFFSET && (path)[depth].p_idx != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_ext < \ -+ __PAGE_OFFSET && (path)[depth].p_ext != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET \ -+ && depth != 0); \ -+ BUG_ON((path)[0].p_depth != depth); \ -+} -+ -+ -+/* -+ * this structure is used to gather extents from the tree via ioctl -+ */ -+struct ext3_extent_buf { -+ unsigned long start; -+ int buflen; -+ void *buffer; -+ void *cur; -+ int err; -+}; -+ -+/* -+ * this structure is used to collect stats info about the tree -+ */ -+struct ext3_extent_tree_stats { -+ int depth; -+ int extents_num; -+ int leaf_num; -+}; -+ -+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *); -+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *); -+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *); -+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *); -+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback); -+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long); -+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *); -+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int); -+ -+static inline void -+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree) -+{ -+ if (tree->cex) -+ tree->cex->ec_type = EXT3_EXT_CACHE_NO; -+} -+ -+ -+#endif /* _LINUX_EXT3_EXTENTS */ -Index: linux-stage/include/linux/ext3_fs_i.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs_i.h 2006-07-16 13:55:30.000000000 +0800 -+++ linux-stage/include/linux/ext3_fs_i.h 2006-07-16 14:10:20.000000000 +0800 -@@ -142,6 +142,8 @@ struct ext3_inode_info { - */ - struct mutex truncate_mutex; - struct inode vfs_inode; -+ -+ __u32 i_cached_extent[4]; - }; - - #endif /* _LINUX_EXT3_FS_I */ diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch deleted file mode 100644 index b6c37c15ac..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch +++ /dev/null @@ -1,2951 +0,0 @@ -%patch -Index: linux-2.6.5-sles9/fs/ext3/extents.c -=================================================================== ---- linux-2.6.5-sles9.orig/fs/ext3/extents.c 2005-02-17 22:07:57.023609040 +0300 -+++ linux-2.6.5-sles9/fs/ext3/extents.c 2005-02-23 01:02:37.396435640 +0300 -@@ -0,0 +1,2361 @@ -+/* -+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+/* -+ * Extents support for EXT3 -+ * -+ * TODO: -+ * - ext3_ext_walk_space() sould not use ext3_ext_find_extent() -+ * - ext3_ext_calc_credits() could take 'mergable' into account -+ * - ext3*_error() should be used in some situations -+ * - find_goal() [to be tested and improved] -+ * - smart tree reduction -+ * - arch-independence -+ * common on-disk format for big/little-endian arch -+ */ -+ -+#include <linux/module.h> -+#include <linux/fs.h> -+#include <linux/time.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/smp_lock.h> -+#include <linux/highuid.h> -+#include <linux/pagemap.h> -+#include <linux/quotaops.h> -+#include <linux/string.h> -+#include <linux/slab.h> -+#include <linux/ext3_extents.h> -+#include <asm/uaccess.h> -+ -+ -+static inline int ext3_ext_check_header(struct ext3_extent_header *eh) -+{ -+ if (eh->eh_magic != EXT3_EXT_MAGIC) { -+ printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n", -+ (unsigned)eh->eh_magic); -+ return -EIO; -+ } -+ if (eh->eh_max == 0) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n", -+ (unsigned)eh->eh_max); -+ return -EIO; -+ } -+ if (eh->eh_entries > eh->eh_max) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n", -+ (unsigned)eh->eh_entries); -+ return -EIO; -+ } -+ return 0; -+} -+ -+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed) -+{ -+ int err; -+ -+ if (handle->h_buffer_credits > needed) -+ return handle; -+ if (!ext3_journal_extend(handle, needed)) -+ return handle; -+ err = ext3_journal_restart(handle, needed); -+ -+ return handle; -+} -+ -+static int inline -+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->get_write_access) -+ return tree->ops->get_write_access(h,tree->buffer); -+ else -+ return 0; -+} -+ -+static int inline -+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->mark_buffer_dirty) -+ return tree->ops->mark_buffer_dirty(h,tree->buffer); -+ else -+ return 0; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ */ -+static int ext3_ext_get_access(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ -+ if (path->p_bh) { -+ /* path points to block */ -+ err = ext3_journal_get_write_access(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_get_access_for_root(handle, tree); -+ } -+ return err; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ * - EIO -+ */ -+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ if (path->p_bh) { -+ /* path points to block */ -+ err =ext3_journal_dirty_metadata(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_mark_root_dirty(handle, tree); -+ } -+ return err; -+} -+ -+static int inline -+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, struct ext3_extent *ex, -+ int *err) -+{ -+ int goal, depth, newblock; -+ struct inode *inode; -+ -+ EXT_ASSERT(tree); -+ if (tree->ops->new_block) -+ return tree->ops->new_block(handle, tree, path, ex, err); -+ -+ inode = tree->inode; -+ depth = EXT_DEPTH(tree); -+ if (path && depth > 0) { -+ goal = path[depth-1].p_block; -+ } else { -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ -+ bg_start = (ei->i_block_group * -+ EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ goal = bg_start + colour; -+ } -+ -+ newblock = ext3_new_block(handle, inode, goal, err); -+ return newblock; -+} -+ -+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *neh = EXT_ROOT_HDR(tree); -+ neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) | -+ (EXT_HDR_GEN(neh) + 1); -+} -+ -+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 6; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 5; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 3; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 4; -+#endif -+ return size; -+} -+ -+static void ext3_ext_show_path(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int k, l = path->p_depth; -+ -+ ext_debug(tree, "path:"); -+ for (k = 0; k <= l; k++, path++) { -+ if (path->p_idx) { -+ ext_debug(tree, " %d->%d", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ } else if (path->p_ext) { -+ ext_debug(tree, " %d:%d:%d", -+ path->p_ext->ee_block, -+ path->p_ext->ee_len, -+ path->p_ext->ee_start); -+ } else -+ ext_debug(tree, " []"); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *eh; -+ struct ext3_extent *ex; -+ int i; -+ -+ if (!path) -+ return; -+ -+ eh = path[depth].p_hdr; -+ ex = EXT_FIRST_EXTENT(eh); -+ -+ for (i = 0; i < eh->eh_entries; i++, ex++) { -+ ext_debug(tree, "%d:%d:%d ", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_drop_refs(struct ext3_ext_path *path) -+{ -+ int depth = path->p_depth; -+ int i; -+ -+ for (i = 0; i <= depth; i++, path++) { -+ if (path->p_bh) { -+ brelse(path->p_bh); -+ path->p_bh = NULL; -+ } -+ } -+} -+ -+/* -+ * binary search for closest index by given block -+ */ -+static inline void -+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent_idx *ix; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_entries > 0); -+ -+ ext_debug(tree, "binsearch for %d(idx): ", block); -+ -+ path->p_idx = ix = EXT_FIRST_INDEX(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ix[l + k].ei_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ix += l; -+ path->p_idx = ix; -+ ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf); -+ -+ while (l++ < r) { -+ if (block < ix->ei_block) -+ break; -+ path->p_idx = ix++; -+ } -+ ext_debug(tree, " -> %d->%d\n", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent_idx *chix; -+ -+ chix = ix = EXT_FIRST_INDEX(eh); -+ for (k = 0; k < eh->eh_entries; k++, ix++) { -+ if (k != 0 && ix->ei_block <= ix[-1].ei_block) { -+ printk("k=%d, ix=0x%p, first=0x%p\n", k, -+ ix, EXT_FIRST_INDEX(eh)); -+ printk("%u <= %u\n", -+ ix->ei_block,ix[-1].ei_block); -+ } -+ EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block); -+ if (block < ix->ei_block) -+ break; -+ chix = ix; -+ } -+ EXT_ASSERT(chix == path->p_idx); -+ } -+#endif -+} -+ -+/* -+ * binary search for closest extent by given block -+ */ -+static inline void -+ext3_ext_binsearch(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent *ex; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ -+ if (eh->eh_entries == 0) { -+ /* -+ * this leaf is empty yet: -+ * we get such a leaf in split/add case -+ */ -+ return; -+ } -+ -+ ext_debug(tree, "binsearch for %d: ", block); -+ -+ path->p_ext = ex = EXT_FIRST_EXTENT(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ex[l + k].ee_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ex += l; -+ path->p_ext = ex; -+ ext_debug(tree, " -> %d:%d:%d ", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+ while (l++ < r) { -+ if (block < ex->ee_block) -+ break; -+ path->p_ext = ex++; -+ } -+ ext_debug(tree, " -> %d:%d:%d\n", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent *chex; -+ -+ chex = ex = EXT_FIRST_EXTENT(eh); -+ for (k = 0; k < eh->eh_entries; k++, ex++) { -+ EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block); -+ if (block < ex->ee_block) -+ break; -+ chex = ex; -+ } -+ EXT_ASSERT(chex == path->p_ext); -+ } -+#endif -+} -+ -+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *eh; -+ -+ BUG_ON(tree->buffer_len == 0); -+ ext3_ext_get_access_for_root(handle, tree); -+ eh = EXT_ROOT_HDR(tree); -+ eh->eh_depth = 0; -+ eh->eh_entries = 0; -+ eh->eh_magic = EXT3_EXT_MAGIC; -+ eh->eh_max = ext3_ext_space_root(tree); -+ ext3_ext_mark_root_dirty(handle, tree); -+ ext3_ext_invalidate_cache(tree); -+ return 0; -+} -+ -+struct ext3_ext_path * -+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ struct buffer_head *bh; -+ int depth, i, ppos = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ eh = EXT_ROOT_HDR(tree); -+ EXT_ASSERT(eh); -+ if (ext3_ext_check_header(eh)) { -+ /* don't free previously allocated path -+ * -- caller should take care */ -+ path = NULL; -+ goto err; -+ } -+ -+ i = depth = EXT_DEPTH(tree); -+ EXT_ASSERT(eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* account possible depth increase */ -+ if (!path) { -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2), -+ GFP_NOFS); -+ if (!path) -+ return ERR_PTR(-ENOMEM); -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[0].p_hdr = eh; -+ -+ /* walk through the tree */ -+ while (i) { -+ ext_debug(tree, "depth %d: num %d, max %d\n", -+ ppos, eh->eh_entries, eh->eh_max); -+ ext3_ext_binsearch_idx(tree, path + ppos, block); -+ path[ppos].p_block = path[ppos].p_idx->ei_leaf; -+ path[ppos].p_depth = i; -+ path[ppos].p_ext = NULL; -+ -+ bh = sb_bread(tree->inode->i_sb, path[ppos].p_block); -+ if (!bh) -+ goto err; -+ -+ eh = EXT_BLOCK_HDR(bh); -+ ppos++; -+ EXT_ASSERT(ppos <= depth); -+ path[ppos].p_bh = bh; -+ path[ppos].p_hdr = eh; -+ i--; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ } -+ -+ path[ppos].p_depth = i; -+ path[ppos].p_hdr = eh; -+ path[ppos].p_ext = NULL; -+ path[ppos].p_idx = NULL; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ -+ /* find extent */ -+ ext3_ext_binsearch(tree, path + ppos, block); -+ -+ ext3_ext_show_path(tree, path); -+ -+ return path; -+ -+err: -+ printk(KERN_ERR "EXT3-fs: header is corrupted!\n"); -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ return ERR_PTR(-EIO); -+} -+ -+/* -+ * insert new index [logical;ptr] into the block at cupr -+ * it check where to insert: before curp or after curp -+ */ -+static int ext3_ext_insert_index(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *curp, -+ int logical, int ptr) -+{ -+ struct ext3_extent_idx *ix; -+ int len, err; -+ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ return err; -+ -+ EXT_ASSERT(logical != curp->p_idx->ei_block); -+ len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx; -+ if (logical > curp->p_idx->ei_block) { -+ /* insert after */ -+ if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { -+ len = (len - 1) * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d after: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ (curp->p_idx + 1), (curp->p_idx + 2)); -+ memmove(curp->p_idx + 2, curp->p_idx + 1, len); -+ } -+ ix = curp->p_idx + 1; -+ } else { -+ /* insert before */ -+ len = len * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d before: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ curp->p_idx, (curp->p_idx + 1)); -+ memmove(curp->p_idx + 1, curp->p_idx, len); -+ ix = curp->p_idx; -+ } -+ -+ ix->ei_block = logical; -+ ix->ei_leaf = ptr; -+ ix->ei_leaf_hi = ix->ei_unused = 0; -+ curp->p_hdr->eh_entries++; -+ -+ EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max); -+ EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr)); -+ -+ err = ext3_ext_dirty(handle, tree, curp); -+ ext3_std_error(tree->inode->i_sb, err); -+ -+ return err; -+} -+ -+/* -+ * routine inserts new subtree into the path, using free index entry -+ * at depth 'at: -+ * - allocates all needed blocks (new leaf and all intermediate index blocks) -+ * - makes decision where to split -+ * - moves remaining extens and index entries (right to the split point) -+ * into the newly allocated blocks -+ * - initialize subtree -+ */ -+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext, int at) -+{ -+ struct buffer_head *bh = NULL; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct ext3_extent *ex; -+ int i = at, k, m, a; -+ unsigned long newblock, oldblock, border; -+ int *ablocks = NULL; /* array of allocated blocks */ -+ int err = 0; -+ -+ /* make decision: where to split? */ -+ /* FIXME: now desicion is simplest: at current extent */ -+ -+ /* if current leaf will be splitted, then we should use -+ * border from split point */ -+ EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr)); -+ if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ border = path[depth].p_ext[1].ee_block; -+ ext_debug(tree, "leaf will be splitted." -+ " next leaf starts at %d\n", -+ (int)border); -+ } else { -+ border = newext->ee_block; -+ ext_debug(tree, "leaf will be added." -+ " next leaf starts at %d\n", -+ (int)border); -+ } -+ -+ /* -+ * if error occurs, then we break processing -+ * and turn filesystem read-only. so, index won't -+ * be inserted and tree will be in consistent -+ * state. next mount will repair buffers too -+ */ -+ -+ /* -+ * get array to track all allocated blocks -+ * we need this to handle errors and free blocks -+ * upon them -+ */ -+ ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS); -+ if (!ablocks) -+ return -ENOMEM; -+ memset(ablocks, 0, sizeof(unsigned long) * depth); -+ -+ /* allocate all needed blocks */ -+ ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at); -+ for (a = 0; a < depth - at; a++) { -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ goto cleanup; -+ ablocks[a] = newblock; -+ } -+ -+ /* initialize new leaf */ -+ newblock = ablocks[--a]; -+ EXT_ASSERT(newblock); -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 0; -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_depth = 0; -+ ex = EXT_FIRST_EXTENT(neh); -+ -+ /* move remain of path[depth] to the new leaf */ -+ EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max); -+ /* start copy from next extent */ -+ /* TODO: we could do it by single memmove */ -+ m = 0; -+ path[depth].p_ext++; -+ while (path[depth].p_ext <= -+ EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ ext_debug(tree, "move %d:%d:%d in new leaf %lu\n", -+ path[depth].p_ext->ee_block, -+ path[depth].p_ext->ee_start, -+ path[depth].p_ext->ee_len, -+ newblock); -+ memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent)); -+ neh->eh_entries++; -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old leaf */ -+ if (m) { -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ path[depth].p_hdr->eh_entries -= m; -+ if ((err = ext3_ext_dirty(handle, tree, path + depth))) -+ goto cleanup; -+ -+ } -+ -+ /* create intermediate indexes */ -+ k = depth - at - 1; -+ EXT_ASSERT(k >= 0); -+ if (k) -+ ext_debug(tree, "create %d intermediate indices\n", k); -+ /* insert new index into current index block */ -+ /* current depth stored in i var */ -+ i = depth - 1; -+ while (k--) { -+ oldblock = newblock; -+ newblock = ablocks[--a]; -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 1; -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ neh->eh_depth = depth - i; -+ fidx = EXT_FIRST_INDEX(neh); -+ fidx->ei_block = border; -+ fidx->ei_leaf = oldblock; -+ fidx->ei_leaf_hi = fidx->ei_unused = 0; -+ -+ ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n", -+ i, newblock, border, oldblock); -+ /* copy indexes */ -+ m = 0; -+ path[i].p_idx++; -+ -+ ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx, -+ EXT_MAX_INDEX(path[i].p_hdr)); -+ EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) == -+ EXT_LAST_INDEX(path[i].p_hdr)); -+ while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { -+ ext_debug(tree, "%d: move %d:%d in new index %lu\n", -+ i, path[i].p_idx->ei_block, -+ path[i].p_idx->ei_leaf, newblock); -+ memmove(++fidx, path[i].p_idx++, -+ sizeof(struct ext3_extent_idx)); -+ neh->eh_entries++; -+ EXT_ASSERT(neh->eh_entries <= neh->eh_max); -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old index */ -+ if (m) { -+ err = ext3_ext_get_access(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ path[i].p_hdr->eh_entries -= m; -+ err = ext3_ext_dirty(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ } -+ -+ i--; -+ } -+ -+ /* insert new index */ -+ if (!err) -+ err = ext3_ext_insert_index(handle, tree, path + at, -+ border, newblock); -+ -+cleanup: -+ if (bh) { -+ if (buffer_locked(bh)) -+ unlock_buffer(bh); -+ brelse(bh); -+ } -+ -+ if (err) { -+ /* free all allocated blocks in error case */ -+ for (i = 0; i < depth; i++) { -+ if (!ablocks[i]) -+ continue; -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ } -+ } -+ kfree(ablocks); -+ -+ return err; -+} -+ -+/* -+ * routine implements tree growing procedure: -+ * - allocates new block -+ * - moves top-level data (index block or leaf) into the new block -+ * - initialize new top-level, creating index that points to the -+ * just created block -+ */ -+static int ext3_ext_grow_indepth(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp = path; -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct buffer_head *bh; -+ unsigned long newblock; -+ int err = 0; -+ -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ return err; -+ -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ ext3_std_error(tree->inode->i_sb, err); -+ return err; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) { -+ unlock_buffer(bh); -+ goto out; -+ } -+ -+ /* move top-level index/leaf into new block */ -+ memmove(bh->b_data, curp->p_hdr, tree->buffer_len); -+ -+ /* set size of new block */ -+ neh = EXT_BLOCK_HDR(bh); -+ /* old root could have indexes or leaves -+ * so calculate eh_max right way */ -+ if (EXT_DEPTH(tree)) -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ else -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto out; -+ -+ /* create index in new top-level index: num,max,pointer */ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ goto out; -+ -+ curp->p_hdr->eh_magic = EXT3_EXT_MAGIC; -+ curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree); -+ curp->p_hdr->eh_entries = 1; -+ curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr); -+ /* FIXME: it works, but actually path[0] can be index */ -+ curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block; -+ curp->p_idx->ei_leaf = newblock; -+ curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0; -+ -+ neh = EXT_ROOT_HDR(tree); -+ fidx = EXT_FIRST_INDEX(neh); -+ ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n", -+ neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); -+ -+ neh->eh_depth = path->p_depth + 1; -+ err = ext3_ext_dirty(handle, tree, curp); -+out: -+ brelse(bh); -+ -+ return err; -+} -+ -+/* -+ * routine finds empty index and adds new leaf. if no free index found -+ * then it requests in-depth growing -+ */ -+static int ext3_ext_create_new_leaf(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp; -+ int depth, i, err = 0; -+ -+repeat: -+ i = depth = EXT_DEPTH(tree); -+ -+ /* walk up to the tree and look for free index entry */ -+ curp = path + depth; -+ while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) { -+ i--; -+ curp--; -+ } -+ -+ /* we use already allocated block for index block -+ * so, subsequent data blocks should be contigoues */ -+ if (EXT_HAS_FREE_INDEX(curp)) { -+ /* if we found index with free entry, then use that -+ * entry: create all needed subtree and add new leaf */ -+ err = ext3_ext_split(handle, tree, path, newext, i); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ } else { -+ /* tree is full, time to grow in depth */ -+ err = ext3_ext_grow_indepth(handle, tree, path, newext); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ -+ /* -+ * only first (depth 0 -> 1) produces free space -+ * in all other cases we have to split growed tree -+ */ -+ depth = EXT_DEPTH(tree); -+ if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) { -+ /* now we need split */ -+ goto repeat; -+ } -+ } -+ -+ if (err) -+ return err; -+ -+ return 0; -+} -+ -+/* -+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK -+ * NOTE: it consider block number from index entry as -+ * allocated block. thus, index entries have to be consistent -+ * with leafs -+ */ -+static unsigned long -+ext3_ext_next_allocated_block(struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ if (depth == 0 && path->p_ext == NULL) -+ return EXT_MAX_BLOCK; -+ -+ /* FIXME: what if index isn't full ?! */ -+ while (depth >= 0) { -+ if (depth == path->p_depth) { -+ /* leaf */ -+ if (path[depth].p_ext != -+ EXT_LAST_EXTENT(path[depth].p_hdr)) -+ return path[depth].p_ext[1].ee_block; -+ } else { -+ /* index */ -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ } -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * returns first allocated block from next leaf or EXT_MAX_BLOCK -+ */ -+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ /* zero-tree has no leaf blocks at all */ -+ if (depth == 0) -+ return EXT_MAX_BLOCK; -+ -+ /* go to index block */ -+ depth--; -+ -+ while (depth >= 0) { -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * if leaf gets modified and modified extent is first in the leaf -+ * then we have to correct all indexes above -+ * TODO: do we need to correct tree in all cases? -+ */ -+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent *ex; -+ unsigned long border; -+ int k, err = 0; -+ -+ eh = path[depth].p_hdr; -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(eh); -+ -+ if (depth == 0) { -+ /* there is no tree at all */ -+ return 0; -+ } -+ -+ if (ex != EXT_FIRST_EXTENT(eh)) { -+ /* we correct tree if first leaf got modified only */ -+ return 0; -+ } -+ -+ /* -+ * TODO: we need correction if border is smaller then current one -+ */ -+ k = depth - 1; -+ border = path[depth].p_ext->ee_block; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ return err; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ return err; -+ -+ while (k--) { -+ /* change all left-side indexes */ -+ if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr)) -+ break; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ break; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ break; -+ } -+ -+ return err; -+} -+ -+static int inline -+ext3_can_extents_be_merged(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ if (ex1->ee_block + ex1->ee_len != ex2->ee_block) -+ return 0; -+ -+#ifdef AGRESSIVE_TEST -+ if (ex1->ee_len >= 4) -+ return 0; -+#endif -+ -+ if (!tree->ops->mergable) -+ return 1; -+ -+ return tree->ops->mergable(ex1, ex2); -+} -+ -+/* -+ * this routine tries to merge requsted extent into the existing -+ * extent or inserts requested extent as new one into the tree, -+ * creating new leaf in no-space case -+ */ -+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_extent_header * eh; -+ struct ext3_extent *ex, *fex; -+ struct ext3_extent *nearex; /* nearest extent */ -+ struct ext3_ext_path *npath = NULL; -+ int depth, len, err, next; -+ -+ EXT_ASSERT(newext->ee_len > 0); -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(path[depth].p_hdr); -+ -+ /* try to insert block into found extent and return */ -+ if (ex && ext3_can_extents_be_merged(tree, ex, newext)) { -+ ext_debug(tree, "append %d block to %d:%d (from %d)\n", -+ newext->ee_len, ex->ee_block, ex->ee_len, -+ ex->ee_start); -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ return err; -+ ex->ee_len += newext->ee_len; -+ eh = path[depth].p_hdr; -+ nearex = ex; -+ goto merge; -+ } -+ -+repeat: -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) -+ goto has_space; -+ -+ /* probably next leaf has space for us? */ -+ fex = EXT_LAST_EXTENT(eh); -+ next = ext3_ext_next_leaf_block(tree, path); -+ if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) { -+ ext_debug(tree, "next leaf block - %d\n", next); -+ EXT_ASSERT(!npath); -+ npath = ext3_ext_find_extent(tree, next, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ EXT_ASSERT(npath->p_depth == path->p_depth); -+ eh = npath[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) { -+ ext_debug(tree, "next leaf isnt full(%d)\n", -+ eh->eh_entries); -+ path = npath; -+ goto repeat; -+ } -+ ext_debug(tree, "next leaf hasno free space(%d,%d)\n", -+ eh->eh_entries, eh->eh_max); -+ } -+ -+ /* -+ * there is no free space in found leaf -+ * we're gonna add new leaf in the tree -+ */ -+ err = ext3_ext_create_new_leaf(handle, tree, path, newext); -+ if (err) -+ goto cleanup; -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ -+has_space: -+ nearex = path[depth].p_ext; -+ -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ -+ if (!nearex) { -+ /* there is no extent in this leaf, create first one */ -+ ext_debug(tree, "first extent in the leaf: %d:%d:%d\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len); -+ path[depth].p_ext = EXT_FIRST_EXTENT(eh); -+ } else if (newext->ee_block > nearex->ee_block) { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ if (nearex != EXT_LAST_EXTENT(eh)) { -+ len = EXT_MAX_EXTENT(eh) - nearex; -+ len = (len - 1) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 2, nearex + 1, len); -+ } -+ path[depth].p_ext = nearex + 1; -+ } else { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 1, nearex, len); -+ path[depth].p_ext = nearex; -+ } -+ -+ eh->eh_entries++; -+ nearex = path[depth].p_ext; -+ nearex->ee_block = newext->ee_block; -+ nearex->ee_start = newext->ee_start; -+ nearex->ee_len = newext->ee_len; -+ /* FIXME: support for large fs */ -+ nearex->ee_start_hi = 0; -+ -+merge: -+ /* try to merge extents to the right */ -+ while (nearex < EXT_LAST_EXTENT(eh)) { -+ if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1)) -+ break; -+ /* merge with next extent! */ -+ nearex->ee_len += nearex[1].ee_len; -+ if (nearex + 1 < EXT_LAST_EXTENT(eh)) { -+ len = (EXT_LAST_EXTENT(eh) - nearex - 1) * -+ sizeof(struct ext3_extent); -+ memmove(nearex + 1, nearex + 2, len); -+ } -+ eh->eh_entries--; -+ EXT_ASSERT(eh->eh_entries > 0); -+ } -+ -+ /* try to merge extents to the left */ -+ -+ /* time to correct all indexes above */ -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ if (err) -+ goto cleanup; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ -+cleanup: -+ if (npath) { -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ } -+ ext3_ext_tree_changed(tree); -+ ext3_ext_invalidate_cache(tree); -+ return err; -+} -+ -+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block, -+ unsigned long num, ext_prepare_callback func) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_ext_cache cbex; -+ struct ext3_extent *ex; -+ unsigned long next, start = 0, end = 0; -+ unsigned long last = block + num; -+ int depth, exists, err = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(func); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ while (block < last && block != EXT_MAX_BLOCK) { -+ num = last - block; -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(tree, block, path); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ break; -+ } -+ -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(path[depth].p_hdr); -+ ex = path[depth].p_ext; -+ next = ext3_ext_next_allocated_block(path); -+ -+ exists = 0; -+ if (!ex) { -+ /* there is no extent yet, so try to allocate -+ * all requested space */ -+ start = block; -+ end = block + num; -+ } else if (ex->ee_block > block) { -+ /* need to allocate space before found extent */ -+ start = block; -+ end = ex->ee_block; -+ if (block + num < end) -+ end = block + num; -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ /* need to allocate space after found extent */ -+ start = block; -+ end = block + num; -+ if (end >= next) -+ end = next; -+ } else if (block >= ex->ee_block) { -+ /* -+ * some part of requested space is covered -+ * by found extent -+ */ -+ start = block; -+ end = ex->ee_block + ex->ee_len; -+ if (block + num < end) -+ end = block + num; -+ exists = 1; -+ } else { -+ BUG(); -+ } -+ EXT_ASSERT(end > start); -+ -+ if (!exists) { -+ cbex.ec_block = start; -+ cbex.ec_len = end - start; -+ cbex.ec_start = 0; -+ cbex.ec_type = EXT3_EXT_CACHE_GAP; -+ } else { -+ cbex.ec_block = ex->ee_block; -+ cbex.ec_len = ex->ee_len; -+ cbex.ec_start = ex->ee_start; -+ cbex.ec_type = EXT3_EXT_CACHE_EXTENT; -+ } -+ -+ EXT_ASSERT(cbex.ec_len > 0); -+ EXT_ASSERT(path[depth].p_hdr); -+ err = func(tree, path, &cbex); -+ ext3_ext_drop_refs(path); -+ -+ if (err < 0) -+ break; -+ if (err == EXT_REPEAT) -+ continue; -+ else if (err == EXT_BREAK) { -+ err = 0; -+ break; -+ } -+ -+ if (EXT_DEPTH(tree) != depth) { -+ /* depth was changed. we have to realloc path */ -+ kfree(path); -+ path = NULL; -+ } -+ -+ block = cbex.ec_block + cbex.ec_len; -+ } -+ -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ -+ return err; -+} -+ -+static inline void -+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block, -+ __u32 len, __u32 start, int type) -+{ -+ EXT_ASSERT(len > 0); -+ if (tree->cex) { -+ tree->cex->ec_type = type; -+ tree->cex->ec_block = block; -+ tree->cex->ec_len = len; -+ tree->cex->ec_start = start; -+ } -+} -+ -+/* -+ * this routine calculate boundaries of the gap requested block fits into -+ * and cache this gap -+ */ -+static inline void -+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ unsigned long block) -+{ -+ int depth = EXT_DEPTH(tree); -+ unsigned long lblock, len; -+ struct ext3_extent *ex; -+ -+ if (!tree->cex) -+ return; -+ -+ ex = path[depth].p_ext; -+ if (ex == NULL) { -+ /* there is no extent yet, so gap is [0;-] */ -+ lblock = 0; -+ len = EXT_MAX_BLOCK; -+ ext_debug(tree, "cache gap(whole file):"); -+ } else if (block < ex->ee_block) { -+ lblock = block; -+ len = ex->ee_block - block; -+ ext_debug(tree, "cache gap(before): %lu [%lu:%lu]", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len); -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ lblock = ex->ee_block + ex->ee_len; -+ len = ext3_ext_next_allocated_block(path); -+ ext_debug(tree, "cache gap(after): [%lu:%lu] %lu", -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) block); -+ EXT_ASSERT(len > lblock); -+ len = len - lblock; -+ } else { -+ lblock = len = 0; -+ BUG(); -+ } -+ -+ ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len); -+ ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP); -+} -+ -+static inline int -+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block, -+ struct ext3_extent *ex) -+{ -+ struct ext3_ext_cache *cex = tree->cex; -+ -+ /* is there cache storage at all? */ -+ if (!cex) -+ return EXT3_EXT_CACHE_NO; -+ -+ /* has cache valid data? */ -+ if (cex->ec_type == EXT3_EXT_CACHE_NO) -+ return EXT3_EXT_CACHE_NO; -+ -+ EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP || -+ cex->ec_type == EXT3_EXT_CACHE_EXTENT); -+ if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) { -+ ex->ee_block = cex->ec_block; -+ ex->ee_start = cex->ec_start; -+ ex->ee_start_hi = 0; -+ ex->ee_len = cex->ec_len; -+ ext_debug(tree, "%lu cached by %lu:%lu:%lu\n", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) ex->ee_start); -+ return cex->ec_type; -+ } -+ -+ /* not in cache */ -+ return EXT3_EXT_CACHE_NO; -+} -+ -+/* -+ * routine removes index from the index block -+ * it's used in truncate case only. thus all requests are for -+ * last index in the block only -+ */ -+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct buffer_head *bh; -+ int err; -+ -+ /* free index block */ -+ path--; -+ EXT_ASSERT(path->p_hdr->eh_entries); -+ if ((err = ext3_ext_get_access(handle, tree, path))) -+ return err; -+ path->p_hdr->eh_entries--; -+ if ((err = ext3_ext_dirty(handle, tree, path))) -+ return err; -+ ext_debug(tree, "index is empty, remove it, free block %d\n", -+ path->p_idx->ei_leaf); -+ bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); -+ ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ return err; -+} -+ -+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth = EXT_DEPTH(tree); -+ int needed; -+ -+ if (path) { -+ /* probably there is space in leaf? */ -+ if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max) -+ return 1; -+ } -+ -+ /* -+ * the worste case we're expecting is creation of the -+ * new root (growing in depth) with index splitting -+ * for splitting we have to consider depth + 1 because -+ * previous growing could increase it -+ */ -+ depth = depth + 1; -+ -+ /* -+ * growing in depth: -+ * block allocation + new root + old root -+ */ -+ needed = EXT3_ALLOC_NEEDED + 2; -+ -+ /* index split. we may need: -+ * allocate intermediate indexes and new leaf -+ * change two blocks at each level, but root -+ * modify root block (inode) -+ */ -+ needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1; -+ -+ return needed; -+} -+ -+static int -+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, tex; -+ struct ext3_ext_path *npath; -+ int depth, creds, err; -+ -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1); -+ EXT_ASSERT(ex->ee_block < start); -+ -+ /* calculate tail extent */ -+ tex.ee_block = end + 1; -+ EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len); -+ tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block; -+ -+ creds = ext3_ext_calc_credits_for_insert(tree, path); -+ handle = ext3_ext_journal_restart(handle, creds); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ /* calculate head extent. use primary extent */ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ return err; -+ ex->ee_len = start - ex->ee_block; -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ return err; -+ -+ /* FIXME: some callback to free underlying resource -+ * and correct ee_start? */ -+ ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n", -+ ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len); -+ -+ npath = ext3_ext_find_extent(tree, ex->ee_block, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block); -+ EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len); -+ -+ err = ext3_ext_insert_extent(handle, tree, npath, &tex); -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ -+ return err; -+} -+ -+static int -+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, *fu = NULL, *lu, *le; -+ int err = 0, correct_index = 0; -+ int depth = EXT_DEPTH(tree), credits; -+ struct ext3_extent_header *eh; -+ unsigned a, b, block, num; -+ -+ ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end); -+ if (!path[depth].p_hdr) -+ path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh); -+ eh = path[depth].p_hdr; -+ EXT_ASSERT(eh); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* find where to start removing */ -+ le = ex = EXT_LAST_EXTENT(eh); -+ while (ex != EXT_FIRST_EXTENT(eh)) { -+ if (ex->ee_block <= end) -+ break; -+ ex--; -+ } -+ -+ if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) { -+ /* removal of internal part of the extent requested -+ * tail and head must be placed in different extent -+ * so, we have to insert one more extent */ -+ path[depth].p_ext = ex; -+ return ext3_ext_split_for_rm(handle, tree, path, start, end); -+ } -+ -+ lu = ex; -+ while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) { -+ ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len); -+ path[depth].p_ext = ex; -+ -+ a = ex->ee_block > start ? ex->ee_block : start; -+ b = ex->ee_block + ex->ee_len - 1 < end ? -+ ex->ee_block + ex->ee_len - 1 : end; -+ -+ ext_debug(tree, " border %u:%u\n", a, b); -+ -+ if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) { -+ block = 0; -+ num = 0; -+ BUG(); -+ } else if (a != ex->ee_block) { -+ /* remove tail of the extent */ -+ block = ex->ee_block; -+ num = a - block; -+ } else if (b != ex->ee_block + ex->ee_len - 1) { -+ /* remove head of the extent */ -+ block = a; -+ num = b - a; -+ } else { -+ /* remove whole extent: excelent! */ -+ block = ex->ee_block; -+ num = 0; -+ EXT_ASSERT(a == ex->ee_block && -+ b == ex->ee_block + ex->ee_len - 1); -+ } -+ -+ if (ex == EXT_FIRST_EXTENT(eh)) -+ correct_index = 1; -+ -+ credits = 1; -+ if (correct_index) -+ credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1; -+ if (tree->ops->remove_extent_credits) -+ credits+=tree->ops->remove_extent_credits(tree,ex,a,b); -+ -+ handle = ext3_ext_journal_restart(handle, credits); -+ if (IS_ERR(handle)) { -+ err = PTR_ERR(handle); -+ goto out; -+ } -+ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ if (tree->ops->remove_extent) -+ err = tree->ops->remove_extent(tree, ex, a, b); -+ if (err) -+ goto out; -+ -+ if (num == 0) { -+ /* this extent is removed entirely mark slot unused */ -+ ex->ee_start = ex->ee_start_hi = 0; -+ eh->eh_entries--; -+ fu = ex; -+ } -+ -+ ex->ee_block = block; -+ ex->ee_len = num; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ ext_debug(tree, "new extent: %u:%u:%u\n", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ ex--; -+ } -+ -+ if (fu) { -+ /* reuse unused slots */ -+ while (lu < le) { -+ if (lu->ee_start) { -+ *fu = *lu; -+ lu->ee_start = lu->ee_start_hi = 0; -+ fu++; -+ } -+ lu++; -+ } -+ } -+ -+ if (correct_index && eh->eh_entries) -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ -+ /* if this leaf is free, then we should -+ * remove it from index block above */ -+ if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) -+ err = ext3_ext_rm_idx(handle, tree, path + depth); -+ -+out: -+ return err; -+} -+ -+ -+static struct ext3_extent_idx * -+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block) -+{ -+ struct ext3_extent_idx *ix; -+ -+ ix = EXT_LAST_INDEX(hdr); -+ while (ix != EXT_FIRST_INDEX(hdr)) { -+ if (ix->ei_block <= block) -+ break; -+ ix--; -+ } -+ return ix; -+} -+ -+/* -+ * returns 1 if current index have to be freed (even partial) -+ */ -+static int inline -+ext3_ext_more_to_rm(struct ext3_ext_path *path) -+{ -+ EXT_ASSERT(path->p_idx); -+ -+ if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr)) -+ return 0; -+ -+ /* -+ * if truncate on deeper level happened it it wasn't partial -+ * so we have to consider current index for truncation -+ */ -+ if (path->p_hdr->eh_entries == path->p_block) -+ return 0; -+ return 1; -+} -+ -+int ext3_ext_remove_space(struct ext3_extents_tree *tree, -+ unsigned long start, unsigned long end) -+{ -+ struct inode *inode = tree->inode; -+ struct super_block *sb = inode->i_sb; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_ext_path *path; -+ handle_t *handle; -+ int i = 0, err = 0; -+ -+ ext_debug(tree, "space to be removed: %lu:%lu\n", start, end); -+ -+ /* probably first extent we're gonna free will be last in block */ -+ handle = ext3_journal_start(inode, depth + 1); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ ext3_ext_invalidate_cache(tree); -+ -+ /* -+ * we start scanning from right side freeing all the blocks -+ * after i_size and walking into the deep -+ */ -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL); -+ if (IS_ERR(path)) { -+ ext3_error(sb, __FUNCTION__, "Can't allocate path array"); -+ ext3_journal_stop(handle); -+ return -ENOMEM; -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[i].p_hdr = EXT_ROOT_HDR(tree); -+ -+ while (i >= 0 && err == 0) { -+ if (i == depth) { -+ /* this is leaf block */ -+ err = ext3_ext_rm_leaf(handle, tree, path, start, end); -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ continue; -+ } -+ -+ /* this is index block */ -+ if (!path[i].p_hdr) { -+ ext_debug(tree, "initialize header\n"); -+ path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh); -+ } -+ -+ EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max); -+ EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC); -+ -+ if (!path[i].p_idx) { -+ /* this level hasn't touched yet */ -+ path[i].p_idx = -+ ext3_ext_last_covered(path[i].p_hdr, end); -+ path[i].p_block = path[i].p_hdr->eh_entries + 1; -+ ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n", -+ path[i].p_hdr, path[i].p_hdr->eh_entries); -+ } else { -+ /* we've already was here, see at next index */ -+ path[i].p_idx--; -+ } -+ -+ ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n", -+ i, EXT_FIRST_INDEX(path[i].p_hdr), -+ path[i].p_idx); -+ if (ext3_ext_more_to_rm(path + i)) { -+ /* go to the next level */ -+ ext_debug(tree, "move to level %d (block %d)\n", -+ i + 1, path[i].p_idx->ei_leaf); -+ memset(path + i + 1, 0, sizeof(*path)); -+ path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf); -+ if (!path[i+1].p_bh) { -+ /* should we reset i_size? */ -+ err = -EIO; -+ break; -+ } -+ /* put actual number of indexes to know is this -+ * number got changed at the next iteration */ -+ path[i].p_block = path[i].p_hdr->eh_entries; -+ i++; -+ } else { -+ /* we finish processing this index, go up */ -+ if (path[i].p_hdr->eh_entries == 0 && i > 0) { -+ /* index is empty, remove it -+ * handle must be already prepared by the -+ * truncatei_leaf() */ -+ err = ext3_ext_rm_idx(handle, tree, path + i); -+ } -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ ext_debug(tree, "return to level %d\n", i); -+ } -+ } -+ -+ /* TODO: flexible tree reduction should be here */ -+ if (path->p_hdr->eh_entries == 0) { -+ /* -+ * truncate to zero freed all the tree -+ * so, we need to correct eh_depth -+ */ -+ err = ext3_ext_get_access(handle, tree, path); -+ if (err == 0) { -+ EXT_ROOT_HDR(tree)->eh_depth = 0; -+ EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree); -+ err = ext3_ext_dirty(handle, tree, path); -+ } -+ } -+ ext3_ext_tree_changed(tree); -+ -+ kfree(path); -+ ext3_journal_stop(handle); -+ -+ return err; -+} -+ -+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks) -+{ -+ int lcap, icap, rcap, leafs, idxs, num; -+ -+ rcap = ext3_ext_space_root(tree); -+ if (blocks <= rcap) { -+ /* all extents fit to the root */ -+ return 0; -+ } -+ -+ rcap = ext3_ext_space_root_idx(tree); -+ lcap = ext3_ext_space_block(tree); -+ icap = ext3_ext_space_block_idx(tree); -+ -+ num = leafs = (blocks + lcap - 1) / lcap; -+ if (leafs <= rcap) { -+ /* all pointers to leafs fit to the root */ -+ return leafs; -+ } -+ -+ /* ok. we need separate index block(s) to link all leaf blocks */ -+ idxs = (leafs + icap - 1) / icap; -+ do { -+ num += idxs; -+ idxs = (idxs + icap - 1) / icap; -+ } while (idxs > rcap); -+ -+ return num; -+} -+ -+/* -+ * called at mount time -+ */ -+void ext3_ext_init(struct super_block *sb) -+{ -+ /* -+ * possible initialization would be here -+ */ -+ -+ if (test_opt(sb, EXTENTS)) { -+ printk("EXT3-fs: file extents enabled"); -+#ifdef AGRESSIVE_TEST -+ printk(", agressive tests"); -+#endif -+#ifdef CHECK_BINSEARCH -+ printk(", check binsearch"); -+#endif -+ printk("\n"); -+ } -+} -+ -+/* -+ * called at umount time -+ */ -+void ext3_ext_release(struct super_block *sb) -+{ -+} -+ -+/************************************************************************ -+ * VFS related routines -+ ************************************************************************/ -+ -+static int ext3_get_inode_write_access(handle_t *handle, void *buffer) -+{ -+ /* we use in-core data, not bh */ -+ return 0; -+} -+ -+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer) -+{ -+ struct inode *inode = buffer; -+ return ext3_mark_inode_dirty(handle, inode); -+} -+ -+static int ext3_ext_mergable(struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ /* FIXME: support for large fs */ -+ if (ex1->ee_start + ex1->ee_len == ex2->ee_start) -+ return 1; -+ return 0; -+} -+ -+static int -+ext3_remove_blocks_credits(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed; -+ -+ /* at present, extent can't cross block group */; -+ needed = 4; /* bitmap + group desc + sb + inode */ -+ -+#ifdef CONFIG_QUOTA -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ return needed; -+} -+ -+static int -+ext3_remove_blocks(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed = ext3_remove_blocks_credits(tree, ex, from, to); -+ handle_t *handle = ext3_journal_start(tree->inode, needed); -+ struct buffer_head *bh; -+ int i; -+ -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { -+ /* tail removal */ -+ unsigned long num, start; -+ num = ex->ee_block + ex->ee_len - from; -+ start = ex->ee_start + ex->ee_len - num; -+ ext_debug(tree, "free last %lu blocks starting %lu\n", -+ num, start); -+ for (i = 0; i < num; i++) { -+ bh = sb_find_get_block(tree->inode->i_sb, start + i); -+ ext3_forget(handle, 0, tree->inode, bh, start + i); -+ } -+ ext3_free_blocks(handle, tree->inode, start, num); -+ } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { -+ printk("strange request: removal %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } else { -+ printk("strange request: removal(2) %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } -+ ext3_journal_stop(handle); -+ return 0; -+} -+ -+static int ext3_ext_find_goal(struct inode *inode, -+ struct ext3_ext_path *path, unsigned long block) -+{ -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ int depth; -+ -+ if (path) { -+ struct ext3_extent *ex; -+ depth = path->p_depth; -+ -+ /* try to predict block placement */ -+ if ((ex = path[depth].p_ext)) -+ return ex->ee_start + (block - ex->ee_block); -+ -+ /* it looks index is empty -+ * try to find starting from index itself */ -+ if (path[depth].p_bh) -+ return path[depth].p_bh->b_blocknr; -+ } -+ -+ /* OK. use inode's group */ -+ bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ return bg_start + colour + block; -+} -+ -+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *ex, int *err) -+{ -+ struct inode *inode = tree->inode; -+ int newblock, goal; -+ -+ EXT_ASSERT(path); -+ EXT_ASSERT(ex); -+ EXT_ASSERT(ex->ee_start); -+ EXT_ASSERT(ex->ee_len); -+ -+ /* reuse block from the extent to order data/metadata */ -+ newblock = ex->ee_start++; -+ ex->ee_len--; -+ if (ex->ee_len == 0) { -+ ex->ee_len = 1; -+ /* allocate new block for the extent */ -+ goal = ext3_ext_find_goal(inode, path, ex->ee_block); -+ ex->ee_start = ext3_new_block(handle, inode, goal, err); -+ ex->ee_start_hi = 0; -+ if (ex->ee_start == 0) { -+ /* error occured: restore old extent */ -+ ex->ee_start = newblock; -+ return 0; -+ } -+ } -+ return newblock; -+} -+ -+static struct ext3_extents_helpers ext3_blockmap_helpers = { -+ .get_write_access = ext3_get_inode_write_access, -+ .mark_buffer_dirty = ext3_mark_buffer_dirty, -+ .mergable = ext3_ext_mergable, -+ .new_block = ext3_new_block_cb, -+ .remove_extent = ext3_remove_blocks, -+ .remove_extent_credits = ext3_remove_blocks_credits, -+}; -+ -+void ext3_init_tree_desc(struct ext3_extents_tree *tree, -+ struct inode *inode) -+{ -+ tree->inode = inode; -+ tree->root = (void *) EXT3_I(inode)->i_data; -+ tree->buffer = (void *) inode; -+ tree->buffer_len = sizeof(EXT3_I(inode)->i_data); -+ tree->cex = &EXT3_I(inode)->i_cached_extent; -+ tree->ops = &ext3_blockmap_helpers; -+} -+ -+int ext3_ext_get_block(handle_t *handle, struct inode *inode, -+ long iblock, struct buffer_head *bh_result, -+ int create, int extend_disksize) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_extent newex; -+ struct ext3_extent *ex; -+ int goal, newblock, err = 0, depth; -+ struct ext3_extents_tree tree; -+ -+ __clear_bit(BH_New, &bh_result->b_state); -+ ext3_init_tree_desc(&tree, inode); -+ ext_debug(&tree, "block %d requested for inode %u\n", -+ (int) iblock, (unsigned) inode->i_ino); -+ down(&EXT3_I(inode)->truncate_sem); -+ -+ /* check in cache */ -+ if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) { -+ if (goal == EXT3_EXT_CACHE_GAP) { -+ if (!create) { -+ /* block isn't allocated yet and -+ * user don't want to allocate it */ -+ goto out2; -+ } -+ /* we should allocate requested block */ -+ } else if (goal == EXT3_EXT_CACHE_EXTENT) { -+ /* block is already allocated */ -+ newblock = iblock - newex.ee_block + newex.ee_start; -+ goto out; -+ } else { -+ EXT_ASSERT(0); -+ } -+ } -+ -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(&tree, iblock, NULL); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ goto out2; -+ } -+ -+ depth = EXT_DEPTH(&tree); -+ -+ /* -+ * consistent leaf must not be empty -+ * this situations is possible, though, _during_ tree modification -+ * this is why assert can't be put in ext3_ext_find_extent() -+ */ -+ EXT_ASSERT(path[depth].p_ext != NULL || depth == 0); -+ -+ if ((ex = path[depth].p_ext)) { -+ /* if found exent covers block, simple return it */ -+ if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) { -+ newblock = iblock - ex->ee_block + ex->ee_start; -+ ext_debug(&tree, "%d fit into %d:%d -> %d\n", -+ (int) iblock, ex->ee_block, ex->ee_len, -+ newblock); -+ ext3_ext_put_in_cache(&tree, ex->ee_block, -+ ex->ee_len, ex->ee_start, -+ EXT3_EXT_CACHE_EXTENT); -+ goto out; -+ } -+ } -+ -+ /* -+ * requested block isn't allocated yet -+ * we couldn't try to create block if create flag is zero -+ */ -+ if (!create) { -+ /* put just found gap into cache to speedup subsequest reqs */ -+ ext3_ext_put_gap_in_cache(&tree, path, iblock); -+ goto out2; -+ } -+ -+ /* allocate new block */ -+ goal = ext3_ext_find_goal(inode, path, iblock); -+ newblock = ext3_new_block(handle, inode, goal, &err); -+ if (!newblock) -+ goto out2; -+ ext_debug(&tree, "allocate new block: goal %d, found %d\n", -+ goal, newblock); -+ -+ /* try to insert new extent into found leaf and return */ -+ newex.ee_block = iblock; -+ newex.ee_start = newblock; -+ newex.ee_start_hi = 0; -+ newex.ee_len = 1; -+ err = ext3_ext_insert_extent(handle, &tree, path, &newex); -+ if (err) -+ goto out2; -+ -+ if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize) -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ -+ /* previous routine could use block we allocated */ -+ newblock = newex.ee_start; -+ __set_bit(BH_New, &bh_result->b_state); -+ -+ ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len, -+ newex.ee_start, EXT3_EXT_CACHE_EXTENT); -+out: -+ ext3_ext_show_leaf(&tree, path); -+ __set_bit(BH_Mapped, &bh_result->b_state); -+ bh_result->b_bdev = inode->i_sb->s_bdev; -+ bh_result->b_blocknr = newblock; -+out2: -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ up(&EXT3_I(inode)->truncate_sem); -+ -+ return err; -+} -+ -+void ext3_ext_truncate(struct inode * inode, struct page *page) -+{ -+ struct address_space *mapping = inode->i_mapping; -+ struct super_block *sb = inode->i_sb; -+ struct ext3_extents_tree tree; -+ unsigned long last_block; -+ handle_t *handle; -+ int err = 0; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ /* -+ * probably first extent we're gonna free will be last in block -+ */ -+ err = ext3_writepage_trans_blocks(inode) + 3; -+ handle = ext3_journal_start(inode, err); -+ if (IS_ERR(handle)) { -+ if (page) { -+ clear_highpage(page); -+ flush_dcache_page(page); -+ unlock_page(page); -+ page_cache_release(page); -+ } -+ return; -+ } -+ -+ if (page) -+ ext3_block_truncate_page(handle, page, mapping, inode->i_size); -+ -+ down(&EXT3_I(inode)->truncate_sem); -+ ext3_ext_invalidate_cache(&tree); -+ -+ /* -+ * TODO: optimization is possible here -+ * probably we need not scaning at all, -+ * because page truncation is enough -+ */ -+ if (ext3_orphan_add(handle, inode)) -+ goto out_stop; -+ -+ /* we have to know where to truncate from in crash case */ -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ ext3_mark_inode_dirty(handle, inode); -+ -+ last_block = (inode->i_size + sb->s_blocksize - 1) >> -+ EXT3_BLOCK_SIZE_BITS(sb); -+ err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK); -+ -+ /* In a multi-transaction truncate, we only make the final -+ * transaction synchronous */ -+ if (IS_SYNC(inode)) -+ handle->h_sync = 1; -+ -+out_stop: -+ /* -+ * If this was a simple ftruncate(), and the file will remain alive -+ * then we need to clear up the orphan record which we created above. -+ * However, if this was a real unlink then we were called by -+ * ext3_delete_inode(), and we allow that function to clean up the -+ * orphan info for us. -+ */ -+ if (inode->i_nlink) -+ ext3_orphan_del(handle, inode); -+ -+ up(&EXT3_I(inode)->truncate_sem); -+ ext3_journal_stop(handle); -+} -+ -+/* -+ * this routine calculate max number of blocks we could modify -+ * in order to allocate new block for an inode -+ */ -+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num) -+{ -+ struct ext3_extents_tree tree; -+ int needed; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ needed = ext3_ext_calc_credits_for_insert(&tree, NULL); -+ -+ /* caller want to allocate num blocks */ -+ needed *= num; -+ -+#ifdef CONFIG_QUOTA -+ /* -+ * FIXME: real calculation should be here -+ * it depends on blockmap format of qouta file -+ */ -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ -+ return needed; -+} -+ -+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ ext3_extent_tree_init(handle, &tree); -+} -+ -+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ return ext3_ext_calc_metadata_amount(&tree, blocks); -+} -+ -+static int -+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *newex) -+{ -+ struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private; -+ -+ if (newex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ if (buf->err < 0) -+ return EXT_BREAK; -+ if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen) -+ return EXT_BREAK; -+ -+ if (!copy_to_user(buf->cur, newex, sizeof(*newex))) { -+ buf->err++; -+ buf->cur += sizeof(*newex); -+ } else { -+ buf->err = -EFAULT; -+ return EXT_BREAK; -+ } -+ return EXT_CONTINUE; -+} -+ -+static int -+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *ex) -+{ -+ struct ext3_extent_tree_stats *buf = -+ (struct ext3_extent_tree_stats *) tree->private; -+ int depth; -+ -+ if (ex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ depth = EXT_DEPTH(tree); -+ buf->extents_num++; -+ if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr)) -+ buf->leaf_num++; -+ return EXT_CONTINUE; -+} -+ -+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, -+ unsigned long arg) -+{ -+ int err = 0; -+ -+ if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)) -+ return -EINVAL; -+ -+ if (cmd == EXT3_IOC_GET_EXTENTS) { -+ struct ext3_extent_buf buf; -+ struct ext3_extents_tree tree; -+ -+ if (copy_from_user(&buf, (void *) arg, sizeof(buf))) -+ return -EFAULT; -+ -+ ext3_init_tree_desc(&tree, inode); -+ buf.cur = buf.buffer; -+ buf.err = 0; -+ tree.private = &buf; -+ down(&EXT3_I(inode)->truncate_sem); -+ err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK, -+ ext3_ext_store_extent_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (err == 0) -+ err = buf.err; -+ } else if (cmd == EXT3_IOC_GET_TREE_STATS) { -+ struct ext3_extent_tree_stats buf; -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ buf.depth = EXT_DEPTH(&tree); -+ buf.extents_num = 0; -+ buf.leaf_num = 0; -+ tree.private = &buf; -+ err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK, -+ ext3_ext_collect_stats_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (!err) -+ err = copy_to_user((void *) arg, &buf, sizeof(buf)); -+ } else if (cmd == EXT3_IOC_GET_TREE_DEPTH) { -+ struct ext3_extents_tree tree; -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ err = EXT_DEPTH(&tree); -+ up(&EXT3_I(inode)->truncate_sem); -+ } -+ -+ return err; -+} -+ -+EXPORT_SYMBOL(ext3_init_tree_desc); -+EXPORT_SYMBOL(ext3_mark_inode_dirty); -+EXPORT_SYMBOL(ext3_ext_invalidate_cache); -+EXPORT_SYMBOL(ext3_ext_insert_extent); -+EXPORT_SYMBOL(ext3_ext_walk_space); -+EXPORT_SYMBOL(ext3_ext_find_goal); -+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert); -Index: linux-2.6.5-sles9/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.5-sles9.orig/fs/ext3/ialloc.c 2005-02-23 01:01:52.366281264 +0300 -+++ linux-2.6.5-sles9/fs/ext3/ialloc.c 2005-02-23 01:02:37.398435336 +0300 -@@ -566,7 +566,7 @@ repeat: - ei->i_dir_start_lookup = 0; - ei->i_disksize = 0; - -- ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL; -+ ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL); - if (S_ISLNK(mode)) - ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL); - /* dirsync only applies to directories */ -@@ -647,6 +647,18 @@ - DQUOT_FREE_INODE(inode); - goto fail2; - } -+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) { -+ EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL; -+ ext3_extents_initialize_blockmap(handle, inode); -+ if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) { -+ err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh); -+ if (err) goto fail; -+ EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS); -+ BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata"); -+ err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); -+ } -+ } -+ - err = ext3_mark_inode_dirty(handle, inode); - if (err) { - ext3_std_error(sb, err); -Index: linux-2.6.5-sles9/fs/ext3/inode.c -=================================================================== ---- linux-2.6.5-sles9.orig/fs/ext3/inode.c 2005-02-23 01:01:52.373280200 +0300 -+++ linux-2.6.5-sles9/fs/ext3/inode.c 2005-02-23 01:02:37.404434424 +0300 -@@ -796,6 +796,17 @@ - goto reread; - } - -+static inline int -+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block, -+ struct buffer_head *bh, int create, int extend_disksize) -+{ -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_get_block(handle, inode, block, bh, create, -+ extend_disksize); -+ return ext3_get_block_handle(handle, inode, block, bh, create, -+ extend_disksize); -+} -+ - static int ext3_get_block(struct inode *inode, sector_t iblock, - struct buffer_head *bh_result, int create) - { -@@ -806,8 +817,8 @@ - handle = ext3_journal_current_handle(); - J_ASSERT(handle != 0); - } -- ret = ext3_get_block_handle(handle, inode, iblock, -- bh_result, create, 1); -+ ret = ext3_get_block_wrap(handle, inode, iblock, -+ bh_result, create, 1); - return ret; - } - -@@ -833,8 +844,8 @@ - } - } - if (ret == 0) -- ret = ext3_get_block_handle(handle, inode, iblock, -- bh_result, create, 0); -+ ret = ext3_get_block_wrap(handle, inode, iblock, -+ bh_result, create, 0); - if (ret == 0) - bh_result->b_size = (1 << inode->i_blkbits); - return ret; -@@ -855,7 +866,7 @@ - dummy.b_state = 0; - dummy.b_blocknr = -1000; - buffer_trace_init(&dummy.b_history); -- *errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1); -+ *errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1); - if (!*errp && buffer_mapped(&dummy)) { - struct buffer_head *bh; - bh = sb_getblk(inode->i_sb, dummy.b_blocknr); -@@ -1587,7 +1598,7 @@ - * This required during truncate. We need to physically zero the tail end - * of that block so it doesn't yield old data if the file is later grown. - */ --static int ext3_block_truncate_page(handle_t *handle, struct page *page, -+int ext3_block_truncate_page(handle_t *handle, struct page *page, - struct address_space *mapping, loff_t from) - { - unsigned long index = from >> PAGE_CACHE_SHIFT; -@@ -2083,6 +2094,9 @@ - return; - } - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_truncate(inode, page); -+ - handle = start_transaction(inode); - if (IS_ERR(handle)) { - if (page) { -@@ -2789,6 +2803,9 @@ - int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3; - int ret; - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_writepage_trans_blocks(inode, bpp); -+ - if (ext3_should_journal_data(inode)) - ret = 3 * (bpp + indirects) + 2; - else -Index: linux-2.6.5-sles9/fs/ext3/Makefile -=================================================================== ---- linux-2.6.5-sles9.orig/fs/ext3/Makefile 2005-02-23 01:01:46.501172896 +0300 -+++ linux-2.6.5-sles9/fs/ext3/Makefile 2005-02-23 01:02:37.405434272 +0300 -@@ -5,7 +5,8 @@ - obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ -- ioctl.o namei.o super.o symlink.o hash.o -+ ioctl.o namei.o super.o symlink.o hash.o \ -+ extents.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o -Index: linux-2.6.5-sles9/fs/ext3/super.c -=================================================================== ---- linux-2.6.5-sles9.orig/fs/ext3/super.c 2005-02-23 01:02:34.072940888 +0300 -+++ linux-2.6.5-sles9/fs/ext3/super.c 2005-02-23 01:47:15.291333736 +0300 -@@ -389,6 +389,7 @@ - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); - if (!(sb->s_flags & MS_RDONLY)) { -@@ -447,6 +448,8 @@ - #endif - ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED; - ei->vfs_inode.i_version = 1; -+ -+ memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent)); - return &ei->vfs_inode; - } - -@@ -537,6 +540,7 @@ - Opt_ignore, Opt_barrier, - Opt_err, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, -+ Opt_extents, Opt_noextents, Opt_extdebug, - }; - - static match_table_t tokens = { -@@ -582,6 +585,9 @@ - {Opt_iopen, "iopen"}, - {Opt_noiopen, "noiopen"}, - {Opt_iopen_nopriv, "iopen_nopriv"}, -+ {Opt_extents, "extents"}, -+ {Opt_noextents, "noextents"}, -+ {Opt_extdebug, "extdebug"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL} - }; -@@ -797,6 +802,15 @@ - break; - case Opt_ignore: - break; -+ case Opt_extents: -+ set_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_noextents: -+ clear_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_extdebug: -+ set_opt (sbi->s_mount_opt, EXTDEBUG); -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1449,6 +1460,8 @@ - percpu_counter_mod(&sbi->s_dirs_counter, - ext3_count_dirs(sb)); - -+ ext3_ext_init(sb); -+ - return 0; - - failed_mount3: -Index: linux-2.6.5-sles9/fs/ext3/ioctl.c -=================================================================== ---- linux-2.6.5-sles9.orig/fs/ext3/ioctl.c 2005-02-23 01:01:42.887722224 +0300 -+++ linux-2.6.5-sles9/fs/ext3/ioctl.c 2005-02-23 01:02:37.412433208 +0300 -@@ -124,6 +124,10 @@ - err = ext3_change_inode_journal_flag(inode, jflag); - return err; - } -+ case EXT3_IOC_GET_EXTENTS: -+ case EXT3_IOC_GET_TREE_STATS: -+ case EXT3_IOC_GET_TREE_DEPTH: -+ return ext3_ext_ioctl(inode, filp, cmd, arg); - case EXT3_IOC_GETVERSION: - case EXT3_IOC_GETVERSION_OLD: - return put_user(inode->i_generation, (int *) arg); -Index: linux-2.6.5-sles9/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.5-sles9.orig/include/linux/ext3_fs.h 2005-02-23 01:02:35.823674736 +0300 -+++ linux-2.6.5-sles9/include/linux/ext3_fs.h 2005-02-23 01:02:37.414432904 +0300 -@@ -186,8 +186,9 @@ - #define EXT3_NOTAIL_FL 0x00008000 /* don't merge file tail */ - #define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ - #define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ -+#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ - #define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */ - --#define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ -+#define EXT3_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */ - #define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ - -@@ -211,6 +212,9 @@ - #endif - #define EXT3_IOC_GETRSVSZ _IOR('f', 5, long) - #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) -+#define EXT3_IOC_GET_EXTENTS _IOR('f', 7, long) -+#define EXT3_IOC_GET_TREE_DEPTH _IOR('f', 8, long) -+#define EXT3_IOC_GET_TREE_STATS _IOR('f', 9, long) - - /* - * Structure of an inode on the disk -@@ -333,6 +337,8 @@ - #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ - #define EXT3_MOUNT_IOPEN 0x80000 /* Allow access via iopen */ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ -+#define EXT3_MOUNT_EXTENTS 0x200000/* Extents support */ -+#define EXT3_MOUNT_EXTDEBUG 0x400000/* Extents debug */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -503,11 +509,13 @@ - #define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ - #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ - #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 -+#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ - - #define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR - #define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \ - EXT3_FEATURE_INCOMPAT_RECOVER| \ -- EXT3_FEATURE_INCOMPAT_META_BG) -+ EXT3_FEATURE_INCOMPAT_META_BG| \ -+ EXT3_FEATURE_INCOMPAT_EXTENTS) - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) -@@ -729,6 +735,9 @@ - - - /* inode.c */ -+extern int ext3_block_truncate_page(handle_t *, struct page *, -+ struct address_space *, loff_t); -+extern int ext3_writepage_trans_blocks(struct inode *inode); - extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); - extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); - extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); -@@ -802,6 +809,16 @@ - extern struct inode_operations ext3_symlink_inode_operations; - extern struct inode_operations ext3_fast_symlink_inode_operations; - -+/* extents.c */ -+extern int ext3_ext_writepage_trans_blocks(struct inode *, int); -+extern int ext3_ext_get_block(handle_t *, struct inode *, long, -+ struct buffer_head *, int, int); -+extern void ext3_ext_truncate(struct inode *, struct page *); -+extern void ext3_ext_init(struct super_block *); -+extern void ext3_ext_release(struct super_block *); -+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *); -+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, -+ unsigned int cmd, unsigned long arg); - - #endif /* __KERNEL__ */ - -Index: linux-2.6.5-sles9/include/linux/ext3_extents.h -=================================================================== ---- linux-2.6.5-sles9.orig/include/linux/ext3_extents.h 2005-02-17 22:07:57.023609040 +0300 -+++ linux-2.6.5-sles9/include/linux/ext3_extents.h 2005-02-23 01:02:37.416432600 +0300 -@@ -0,0 +1,262 @@ -+/* -+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+#ifndef _LINUX_EXT3_EXTENTS -+#define _LINUX_EXT3_EXTENTS -+ -+/* -+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks -+ * become very little, so index split, in-depth growing and -+ * other hard changes happens much more often -+ * this is for debug purposes only -+ */ -+#define AGRESSIVE_TEST_ -+ -+/* -+ * if CHECK_BINSEARCH defined, then results of binary search -+ * will be checked by linear search -+ */ -+#define CHECK_BINSEARCH_ -+ -+/* -+ * if EXT_DEBUG is defined you can use 'extdebug' mount option -+ * to get lots of info what's going on -+ */ -+#define EXT_DEBUG_ -+#ifdef EXT_DEBUG -+#define ext_debug(tree,fmt,a...) \ -+do { \ -+ if (test_opt((tree)->inode->i_sb, EXTDEBUG)) \ -+ printk(fmt, ##a); \ -+} while (0); -+#else -+#define ext_debug(tree,fmt,a...) -+#endif -+ -+/* -+ * if EXT_STATS is defined then stats numbers are collected -+ * these number will be displayed at umount time -+ */ -+#define EXT_STATS_ -+ -+ -+#define EXT3_ALLOC_NEEDED 3 /* block bitmap + group desc. + sb */ -+ -+/* -+ * ext3_inode has i_block array (total 60 bytes) -+ * first 4 bytes are used to store: -+ * - tree depth (0 mean there is no tree yet. all extents in the inode) -+ * - number of alive extents in the inode -+ */ -+ -+/* -+ * this is extent on-disk structure -+ * it's used at the bottom of the tree -+ */ -+struct ext3_extent { -+ __u32 ee_block; /* first logical block extent covers */ -+ __u16 ee_len; /* number of blocks covered by extent */ -+ __u16 ee_start_hi; /* high 16 bits of physical block */ -+ __u32 ee_start; /* low 32 bigs of physical block */ -+}; -+ -+/* -+ * this is index on-disk structure -+ * it's used at all the levels, but the bottom -+ */ -+struct ext3_extent_idx { -+ __u32 ei_block; /* index covers logical blocks from 'block' */ -+ __u32 ei_leaf; /* pointer to the physical block of the next * -+ * level. leaf or next index could bet here */ -+ __u16 ei_leaf_hi; /* high 16 bits of physical block */ -+ __u16 ei_unused; -+}; -+ -+/* -+ * each block (leaves and indexes), even inode-stored has header -+ */ -+struct ext3_extent_header { -+ __u16 eh_magic; /* probably will support different formats */ -+ __u16 eh_entries; /* number of valid entries */ -+ __u16 eh_max; /* capacity of store in entries */ -+ __u16 eh_depth; /* has tree real underlaying blocks? */ -+ __u32 eh_generation; /* flags(8 bits) | generation of the tree */ -+}; -+ -+#define EXT3_EXT_MAGIC 0xf30a -+ -+/* -+ * array of ext3_ext_path contains path to some extent -+ * creation/lookup routines use it for traversal/splitting/etc -+ * truncate uses it to simulate recursive walking -+ */ -+struct ext3_ext_path { -+ __u32 p_block; -+ __u16 p_depth; -+ struct ext3_extent *p_ext; -+ struct ext3_extent_idx *p_idx; -+ struct ext3_extent_header *p_hdr; -+ struct buffer_head *p_bh; -+}; -+ -+/* -+ * structure for external API -+ */ -+ -+/* -+ * storage for cached extent -+ */ -+struct ext3_ext_cache { -+ __u32 ec_start; -+ __u32 ec_block; -+ __u32 ec_len; -+ __u32 ec_type; -+}; -+ -+#define EXT3_EXT_CACHE_NO 0 -+#define EXT3_EXT_CACHE_GAP 1 -+#define EXT3_EXT_CACHE_EXTENT 2 -+ -+/* -+ * ext3_extents_tree is used to pass initial information -+ * to top-level extents API -+ */ -+struct ext3_extents_helpers; -+struct ext3_extents_tree { -+ struct inode *inode; /* inode which tree belongs to */ -+ void *root; /* ptr to data top of tree resides at */ -+ void *buffer; /* will be passed as arg to ^^ routines */ -+ int buffer_len; -+ void *private; -+ struct ext3_ext_cache *cex;/* last found extent */ -+ struct ext3_extents_helpers *ops; -+}; -+ -+struct ext3_extents_helpers { -+ int (*get_write_access)(handle_t *h, void *buffer); -+ int (*mark_buffer_dirty)(handle_t *h, void *buffer); -+ int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2); -+ int (*remove_extent_credits)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*remove_extent)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*new_block)(handle_t *, struct ext3_extents_tree *, -+ struct ext3_ext_path *, struct ext3_extent *, -+ int *); -+}; -+ -+/* -+ * to be called by ext3_ext_walk_space() -+ * negative retcode - error -+ * positive retcode - signal for ext3_ext_walk_space(), see below -+ * callback must return valid extent (passed or newly created) -+ */ -+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *, -+ struct ext3_ext_path *, -+ struct ext3_ext_cache *); -+ -+#define EXT_CONTINUE 0 -+#define EXT_BREAK 1 -+#define EXT_REPEAT 2 -+ -+ -+#define EXT_MAX_BLOCK 0xffffffff -+ -+ -+#define EXT_FIRST_EXTENT(__hdr__) \ -+ ((struct ext3_extent *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_FIRST_INDEX(__hdr__) \ -+ ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_HAS_FREE_INDEX(__path__) \ -+ ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max) -+#define EXT_LAST_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_LAST_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_MAX_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_MAX_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_HDR_GEN(__hdr__) ((__hdr__)->eh_generation & 0x00ffffff) -+#define EXT_FLAGS(__hdr__) ((__hdr__)->eh_generation >> 24) -+#define EXT_FLAGS_CLR_UNKNOWN 0x7 /* Flags cleared on modification */ -+ -+#define EXT_BLOCK_HDR(__bh__) ((struct ext3_extent_header *)(__bh__)->b_data) -+#define EXT_ROOT_HDR(__tree__) ((struct ext3_extent_header *)(__tree__)->root) -+#define EXT_DEPTH(__tree__) (EXT_ROOT_HDR(__tree__)->eh_depth) -+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__)) -+ -+#define EXT_ASSERT(__x__) if (!(__x__)) BUG(); -+ -+#define EXT_CHECK_PATH(tree,path) \ -+{ \ -+ int depth = EXT_DEPTH(tree); \ -+ BUG_ON((unsigned long) (path) < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_idx < \ -+ __PAGE_OFFSET && (path)[depth].p_idx != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_ext < \ -+ __PAGE_OFFSET && (path)[depth].p_ext != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET \ -+ && depth != 0); \ -+ BUG_ON((path)[0].p_depth != depth); \ -+} -+ -+ -+/* -+ * this structure is used to gather extents from the tree via ioctl -+ */ -+struct ext3_extent_buf { -+ unsigned long start; -+ int buflen; -+ void *buffer; -+ void *cur; -+ int err; -+}; -+ -+/* -+ * this structure is used to collect stats info about the tree -+ */ -+struct ext3_extent_tree_stats { -+ int depth; -+ int extents_num; -+ int leaf_num; -+}; -+ -+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *); -+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *); -+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *); -+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *); -+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback); -+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long); -+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *); -+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int); -+ -+static inline void -+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree) -+{ -+ if (tree->cex) -+ tree->cex->ec_type = EXT3_EXT_CACHE_NO; -+} -+ -+ -+#endif /* _LINUX_EXT3_EXTENTS */ -Index: linux-2.6.5-sles9/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.5-sles9.orig/include/linux/ext3_fs_i.h 2005-02-23 01:01:52.425272296 +0300 -+++ linux-2.6.5-sles9/include/linux/ext3_fs_i.h 2005-02-23 01:45:55.611446920 +0300 -@@ -19,6 +19,7 @@ - #include <linux/rwsem.h> - #include <linux/rbtree.h> - #include <linux/seqlock.h> -+#include <linux/ext3_extents.h> - - struct reserve_window { - __u32 _rsv_start; /* First byte reserved */ -@@ -128,6 +129,8 @@ - */ - struct semaphore truncate_sem; - struct inode vfs_inode; -+ -+ struct ext3_ext_cache i_cached_extent; - }; - - #endif /* _LINUX_EXT3_FS_I */ - -%diffstat - fs/ext3/Makefile | 2 - fs/ext3/extents.c | 2356 +++++++++++++++++++++++++++++++++++++++++++ - fs/ext3/ialloc.c | 4 - fs/ext3/inode.c | 29 - fs/ext3/ioctl.c | 4 - fs/ext3/super.c | 15 - include/linux/ext3_extents.h | 265 ++++ - include/linux/ext3_fs.h | 17 - include/linux/ext3_fs_i.h | 3 - 9 files changed, 2687 insertions(+), 8 deletions(-) - diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch deleted file mode 100644 index 67d62365dc..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch +++ /dev/null @@ -1,2926 +0,0 @@ -Index: linux-stage/fs/ext3/extents.c -=================================================================== ---- linux-stage.orig/fs/ext3/extents.c 2005-02-25 15:33:48.890198160 +0200 -+++ linux-stage/fs/ext3/extents.c 2005-02-25 15:33:48.917194056 +0200 -@@ -0,0 +1,2360 @@ -+/* -+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+/* -+ * Extents support for EXT3 -+ * -+ * TODO: -+ * - ext3_ext_walk_space() sould not use ext3_ext_find_extent() -+ * - ext3_ext_calc_credits() could take 'mergable' into account -+ * - ext3*_error() should be used in some situations -+ * - find_goal() [to be tested and improved] -+ * - smart tree reduction -+ * - arch-independence -+ * common on-disk format for big/little-endian arch -+ */ -+ -+#include <linux/module.h> -+#include <linux/fs.h> -+#include <linux/time.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/smp_lock.h> -+#include <linux/highuid.h> -+#include <linux/pagemap.h> -+#include <linux/quotaops.h> -+#include <linux/string.h> -+#include <linux/slab.h> -+#include <linux/ext3_extents.h> -+#include <asm/uaccess.h> -+ -+ -+static inline int ext3_ext_check_header(struct ext3_extent_header *eh) -+{ -+ if (eh->eh_magic != EXT3_EXT_MAGIC) { -+ printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n", -+ (unsigned)eh->eh_magic); -+ return -EIO; -+ } -+ if (eh->eh_max == 0) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n", -+ (unsigned)eh->eh_max); -+ return -EIO; -+ } -+ if (eh->eh_entries > eh->eh_max) { -+ printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n", -+ (unsigned)eh->eh_entries); -+ return -EIO; -+ } -+ return 0; -+} -+ -+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed) -+{ -+ int err; -+ -+ if (handle->h_buffer_credits > needed) -+ return handle; -+ if (!ext3_journal_extend(handle, needed)) -+ return handle; -+ err = ext3_journal_restart(handle, needed); -+ -+ return handle; -+} -+ -+static int inline -+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->get_write_access) -+ return tree->ops->get_write_access(h,tree->buffer); -+ else -+ return 0; -+} -+ -+static int inline -+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree) -+{ -+ if (tree->ops->mark_buffer_dirty) -+ return tree->ops->mark_buffer_dirty(h,tree->buffer); -+ else -+ return 0; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ */ -+static int ext3_ext_get_access(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ -+ if (path->p_bh) { -+ /* path points to block */ -+ err = ext3_journal_get_write_access(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_get_access_for_root(handle, tree); -+ } -+ return err; -+} -+ -+/* -+ * could return: -+ * - EROFS -+ * - ENOMEM -+ * - EIO -+ */ -+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int err; -+ if (path->p_bh) { -+ /* path points to block */ -+ err =ext3_journal_dirty_metadata(handle, path->p_bh); -+ } else { -+ /* path points to leaf/index in inode body */ -+ err = ext3_ext_mark_root_dirty(handle, tree); -+ } -+ return err; -+} -+ -+static int inline -+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, struct ext3_extent *ex, -+ int *err) -+{ -+ int goal, depth, newblock; -+ struct inode *inode; -+ -+ EXT_ASSERT(tree); -+ if (tree->ops->new_block) -+ return tree->ops->new_block(handle, tree, path, ex, err); -+ -+ inode = tree->inode; -+ depth = EXT_DEPTH(tree); -+ if (path && depth > 0) { -+ goal = path[depth-1].p_block; -+ } else { -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ -+ bg_start = (ei->i_block_group * -+ EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ goal = bg_start + colour; -+ } -+ -+ newblock = ext3_new_block(handle, inode, goal, err); -+ return newblock; -+} -+ -+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *neh = EXT_ROOT_HDR(tree); -+ neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << -+ EXT_HDR_GEN_BITS) | -+ ((EXT_HDR_GEN(neh) + 1) & EXT_HDR_GEN_MASK); -+} -+ -+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 6; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->inode->i_sb->s_blocksize - -+ sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 5; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent); -+#ifdef AGRESSIVE_TEST -+ size = 3; -+#endif -+ return size; -+} -+ -+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree) -+{ -+ int size; -+ -+ size = (tree->buffer_len - sizeof(struct ext3_extent_header)) / -+ sizeof(struct ext3_extent_idx); -+#ifdef AGRESSIVE_TEST -+ size = 4; -+#endif -+ return size; -+} -+ -+static void ext3_ext_show_path(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int k, l = path->p_depth; -+ -+ ext_debug(tree, "path:"); -+ for (k = 0; k <= l; k++, path++) { -+ if (path->p_idx) { -+ ext_debug(tree, " %d->%d", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ } else if (path->p_ext) { -+ ext_debug(tree, " %d:%d:%d", -+ path->p_ext->ee_block, -+ path->p_ext->ee_len, -+ path->p_ext->ee_start); -+ } else -+ ext_debug(tree, " []"); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+#ifdef EXT_DEBUG -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *eh; -+ struct ext3_extent *ex; -+ int i; -+ -+ if (!path) -+ return; -+ -+ eh = path[depth].p_hdr; -+ ex = EXT_FIRST_EXTENT(eh); -+ -+ for (i = 0; i < eh->eh_entries; i++, ex++) { -+ ext_debug(tree, "%d:%d:%d ", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ } -+ ext_debug(tree, "\n"); -+#endif -+} -+ -+static void ext3_ext_drop_refs(struct ext3_ext_path *path) -+{ -+ int depth = path->p_depth; -+ int i; -+ -+ for (i = 0; i <= depth; i++, path++) { -+ if (path->p_bh) { -+ brelse(path->p_bh); -+ path->p_bh = NULL; -+ } -+ } -+} -+ -+/* -+ * binary search for closest index by given block -+ */ -+static inline void -+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent_idx *ix; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_entries > 0); -+ -+ ext_debug(tree, "binsearch for %d(idx): ", block); -+ -+ path->p_idx = ix = EXT_FIRST_INDEX(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ix[l + k].ei_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ix += l; -+ path->p_idx = ix; -+ ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf); -+ -+ while (l++ < r) { -+ if (block < ix->ei_block) -+ break; -+ path->p_idx = ix++; -+ } -+ ext_debug(tree, " -> %d->%d\n", path->p_idx->ei_block, -+ path->p_idx->ei_leaf); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent_idx *chix; -+ -+ chix = ix = EXT_FIRST_INDEX(eh); -+ for (k = 0; k < eh->eh_entries; k++, ix++) { -+ if (k != 0 && ix->ei_block <= ix[-1].ei_block) { -+ printk("k=%d, ix=0x%p, first=0x%p\n", k, -+ ix, EXT_FIRST_INDEX(eh)); -+ printk("%u <= %u\n", -+ ix->ei_block,ix[-1].ei_block); -+ } -+ EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block); -+ if (block < ix->ei_block) -+ break; -+ chix = ix; -+ } -+ EXT_ASSERT(chix == path->p_idx); -+ } -+#endif -+} -+ -+/* -+ * binary search for closest extent by given block -+ */ -+static inline void -+ext3_ext_binsearch(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, int block) -+{ -+ struct ext3_extent_header *eh = path->p_hdr; -+ struct ext3_extent *ex; -+ int l = 0, k, r; -+ -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ -+ if (eh->eh_entries == 0) { -+ /* -+ * this leaf is empty yet: -+ * we get such a leaf in split/add case -+ */ -+ return; -+ } -+ -+ ext_debug(tree, "binsearch for %d: ", block); -+ -+ path->p_ext = ex = EXT_FIRST_EXTENT(eh); -+ -+ r = k = eh->eh_entries; -+ while (k > 1) { -+ k = (r - l) / 2; -+ if (block < ex[l + k].ee_block) -+ r -= k; -+ else -+ l += k; -+ ext_debug(tree, "%d:%d:%d ", k, l, r); -+ } -+ -+ ex += l; -+ path->p_ext = ex; -+ ext_debug(tree, " -> %d:%d:%d ", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+ while (l++ < r) { -+ if (block < ex->ee_block) -+ break; -+ path->p_ext = ex++; -+ } -+ ext_debug(tree, " -> %d:%d:%d\n", path->p_ext->ee_block, -+ path->p_ext->ee_start, path->p_ext->ee_len); -+ -+#ifdef CHECK_BINSEARCH -+ { -+ struct ext3_extent *chex; -+ -+ chex = ex = EXT_FIRST_EXTENT(eh); -+ for (k = 0; k < eh->eh_entries; k++, ex++) { -+ EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block); -+ if (block < ex->ee_block) -+ break; -+ chex = ex; -+ } -+ EXT_ASSERT(chex == path->p_ext); -+ } -+#endif -+} -+ -+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree) -+{ -+ struct ext3_extent_header *eh; -+ -+ BUG_ON(tree->buffer_len == 0); -+ ext3_ext_get_access_for_root(handle, tree); -+ eh = EXT_ROOT_HDR(tree); -+ eh->eh_depth = 0; -+ eh->eh_entries = 0; -+ eh->eh_magic = EXT3_EXT_MAGIC; -+ eh->eh_max = ext3_ext_space_root(tree); -+ ext3_ext_mark_root_dirty(handle, tree); -+ ext3_ext_invalidate_cache(tree); -+ return 0; -+} -+ -+struct ext3_ext_path * -+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ struct buffer_head *bh; -+ int depth, i, ppos = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ eh = EXT_ROOT_HDR(tree); -+ EXT_ASSERT(eh); -+ if (ext3_ext_check_header(eh)) { -+ /* don't free previously allocated path -+ * -- caller should take care */ -+ path = NULL; -+ goto err; -+ } -+ -+ i = depth = EXT_DEPTH(tree); -+ EXT_ASSERT(eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* account possible depth increase */ -+ if (!path) { -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2), -+ GFP_NOFS); -+ if (!path) -+ return ERR_PTR(-ENOMEM); -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[0].p_hdr = eh; -+ -+ /* walk through the tree */ -+ while (i) { -+ ext_debug(tree, "depth %d: num %d, max %d\n", -+ ppos, eh->eh_entries, eh->eh_max); -+ ext3_ext_binsearch_idx(tree, path + ppos, block); -+ path[ppos].p_block = path[ppos].p_idx->ei_leaf; -+ path[ppos].p_depth = i; -+ path[ppos].p_ext = NULL; -+ -+ bh = sb_bread(tree->inode->i_sb, path[ppos].p_block); -+ if (!bh) -+ goto err; -+ -+ eh = EXT_BLOCK_HDR(bh); -+ ppos++; -+ EXT_ASSERT(ppos <= depth); -+ path[ppos].p_bh = bh; -+ path[ppos].p_hdr = eh; -+ i--; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ } -+ -+ path[ppos].p_depth = i; -+ path[ppos].p_hdr = eh; -+ path[ppos].p_ext = NULL; -+ path[ppos].p_idx = NULL; -+ -+ if (ext3_ext_check_header(eh)) -+ goto err; -+ -+ /* find extent */ -+ ext3_ext_binsearch(tree, path + ppos, block); -+ -+ ext3_ext_show_path(tree, path); -+ -+ return path; -+ -+err: -+ printk(KERN_ERR "EXT3-fs: header is corrupted!\n"); -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ return ERR_PTR(-EIO); -+} -+ -+/* -+ * insert new index [logical;ptr] into the block at cupr -+ * it check where to insert: before curp or after curp -+ */ -+static int ext3_ext_insert_index(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *curp, -+ int logical, int ptr) -+{ -+ struct ext3_extent_idx *ix; -+ int len, err; -+ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ return err; -+ -+ EXT_ASSERT(logical != curp->p_idx->ei_block); -+ len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx; -+ if (logical > curp->p_idx->ei_block) { -+ /* insert after */ -+ if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { -+ len = (len - 1) * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d after: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ (curp->p_idx + 1), (curp->p_idx + 2)); -+ memmove(curp->p_idx + 2, curp->p_idx + 1, len); -+ } -+ ix = curp->p_idx + 1; -+ } else { -+ /* insert before */ -+ len = len * sizeof(struct ext3_extent_idx); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert new index %d before: %d. " -+ "move %d from 0x%p to 0x%p\n", -+ logical, ptr, len, -+ curp->p_idx, (curp->p_idx + 1)); -+ memmove(curp->p_idx + 1, curp->p_idx, len); -+ ix = curp->p_idx; -+ } -+ -+ ix->ei_block = logical; -+ ix->ei_leaf = ptr; -+ ix->ei_leaf_hi = ix->ei_unused = 0; -+ curp->p_hdr->eh_entries++; -+ -+ EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max); -+ EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr)); -+ -+ err = ext3_ext_dirty(handle, tree, curp); -+ ext3_std_error(tree->inode->i_sb, err); -+ -+ return err; -+} -+ -+/* -+ * routine inserts new subtree into the path, using free index entry -+ * at depth 'at: -+ * - allocates all needed blocks (new leaf and all intermediate index blocks) -+ * - makes decision where to split -+ * - moves remaining extens and index entries (right to the split point) -+ * into the newly allocated blocks -+ * - initialize subtree -+ */ -+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext, int at) -+{ -+ struct buffer_head *bh = NULL; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct ext3_extent *ex; -+ int i = at, k, m, a; -+ unsigned long newblock, oldblock, border; -+ int *ablocks = NULL; /* array of allocated blocks */ -+ int err = 0; -+ -+ /* make decision: where to split? */ -+ /* FIXME: now desicion is simplest: at current extent */ -+ -+ /* if current leaf will be splitted, then we should use -+ * border from split point */ -+ EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr)); -+ if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ border = path[depth].p_ext[1].ee_block; -+ ext_debug(tree, "leaf will be splitted." -+ " next leaf starts at %d\n", -+ (int)border); -+ } else { -+ border = newext->ee_block; -+ ext_debug(tree, "leaf will be added." -+ " next leaf starts at %d\n", -+ (int)border); -+ } -+ -+ /* -+ * if error occurs, then we break processing -+ * and turn filesystem read-only. so, index won't -+ * be inserted and tree will be in consistent -+ * state. next mount will repair buffers too -+ */ -+ -+ /* -+ * get array to track all allocated blocks -+ * we need this to handle errors and free blocks -+ * upon them -+ */ -+ ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS); -+ if (!ablocks) -+ return -ENOMEM; -+ memset(ablocks, 0, sizeof(unsigned long) * depth); -+ -+ /* allocate all needed blocks */ -+ ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at); -+ for (a = 0; a < depth - at; a++) { -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ goto cleanup; -+ ablocks[a] = newblock; -+ } -+ -+ /* initialize new leaf */ -+ newblock = ablocks[--a]; -+ EXT_ASSERT(newblock); -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 0; -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_depth = 0; -+ ex = EXT_FIRST_EXTENT(neh); -+ -+ /* move remain of path[depth] to the new leaf */ -+ EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max); -+ /* start copy from next extent */ -+ /* TODO: we could do it by single memmove */ -+ m = 0; -+ path[depth].p_ext++; -+ while (path[depth].p_ext <= -+ EXT_MAX_EXTENT(path[depth].p_hdr)) { -+ ext_debug(tree, "move %d:%d:%d in new leaf %lu\n", -+ path[depth].p_ext->ee_block, -+ path[depth].p_ext->ee_start, -+ path[depth].p_ext->ee_len, -+ newblock); -+ memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent)); -+ neh->eh_entries++; -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old leaf */ -+ if (m) { -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ path[depth].p_hdr->eh_entries -= m; -+ if ((err = ext3_ext_dirty(handle, tree, path + depth))) -+ goto cleanup; -+ -+ } -+ -+ /* create intermediate indexes */ -+ k = depth - at - 1; -+ EXT_ASSERT(k >= 0); -+ if (k) -+ ext_debug(tree, "create %d intermediate indices\n", k); -+ /* insert new index into current index block */ -+ /* current depth stored in i var */ -+ i = depth - 1; -+ while (k--) { -+ oldblock = newblock; -+ newblock = ablocks[--a]; -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ goto cleanup; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) -+ goto cleanup; -+ -+ neh = EXT_BLOCK_HDR(bh); -+ neh->eh_entries = 1; -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ neh->eh_depth = depth - i; -+ fidx = EXT_FIRST_INDEX(neh); -+ fidx->ei_block = border; -+ fidx->ei_leaf = oldblock; -+ fidx->ei_leaf_hi = fidx->ei_unused = 0; -+ -+ ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n", -+ i, newblock, border, oldblock); -+ /* copy indexes */ -+ m = 0; -+ path[i].p_idx++; -+ -+ ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx, -+ EXT_MAX_INDEX(path[i].p_hdr)); -+ EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) == -+ EXT_LAST_INDEX(path[i].p_hdr)); -+ while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { -+ ext_debug(tree, "%d: move %d:%d in new index %lu\n", -+ i, path[i].p_idx->ei_block, -+ path[i].p_idx->ei_leaf, newblock); -+ memmove(++fidx, path[i].p_idx++, -+ sizeof(struct ext3_extent_idx)); -+ neh->eh_entries++; -+ EXT_ASSERT(neh->eh_entries <= neh->eh_max); -+ m++; -+ } -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto cleanup; -+ brelse(bh); -+ bh = NULL; -+ -+ /* correct old index */ -+ if (m) { -+ err = ext3_ext_get_access(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ path[i].p_hdr->eh_entries -= m; -+ err = ext3_ext_dirty(handle, tree, path + i); -+ if (err) -+ goto cleanup; -+ } -+ -+ i--; -+ } -+ -+ /* insert new index */ -+ if (!err) -+ err = ext3_ext_insert_index(handle, tree, path + at, -+ border, newblock); -+ -+cleanup: -+ if (bh) { -+ if (buffer_locked(bh)) -+ unlock_buffer(bh); -+ brelse(bh); -+ } -+ -+ if (err) { -+ /* free all allocated blocks in error case */ -+ for (i = 0; i < depth; i++) { -+ if (!ablocks[i]) -+ continue; -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ } -+ } -+ kfree(ablocks); -+ -+ return err; -+} -+ -+/* -+ * routine implements tree growing procedure: -+ * - allocates new block -+ * - moves top-level data (index block or leaf) into the new block -+ * - initialize new top-level, creating index that points to the -+ * just created block -+ */ -+static int ext3_ext_grow_indepth(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp = path; -+ struct ext3_extent_header *neh; -+ struct ext3_extent_idx *fidx; -+ struct buffer_head *bh; -+ unsigned long newblock; -+ int err = 0; -+ -+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err); -+ if (newblock == 0) -+ return err; -+ -+ bh = sb_getblk(tree->inode->i_sb, newblock); -+ if (!bh) { -+ err = -EIO; -+ ext3_std_error(tree->inode->i_sb, err); -+ return err; -+ } -+ lock_buffer(bh); -+ -+ if ((err = ext3_journal_get_create_access(handle, bh))) { -+ unlock_buffer(bh); -+ goto out; -+ } -+ -+ /* move top-level index/leaf into new block */ -+ memmove(bh->b_data, curp->p_hdr, tree->buffer_len); -+ -+ /* set size of new block */ -+ neh = EXT_BLOCK_HDR(bh); -+ /* old root could have indexes or leaves -+ * so calculate eh_max right way */ -+ if (EXT_DEPTH(tree)) -+ neh->eh_max = ext3_ext_space_block_idx(tree); -+ else -+ neh->eh_max = ext3_ext_space_block(tree); -+ neh->eh_magic = EXT3_EXT_MAGIC; -+ set_buffer_uptodate(bh); -+ unlock_buffer(bh); -+ -+ if ((err = ext3_journal_dirty_metadata(handle, bh))) -+ goto out; -+ -+ /* create index in new top-level index: num,max,pointer */ -+ if ((err = ext3_ext_get_access(handle, tree, curp))) -+ goto out; -+ -+ curp->p_hdr->eh_magic = EXT3_EXT_MAGIC; -+ curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree); -+ curp->p_hdr->eh_entries = 1; -+ curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr); -+ /* FIXME: it works, but actually path[0] can be index */ -+ curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block; -+ curp->p_idx->ei_leaf = newblock; -+ curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0; -+ -+ neh = EXT_ROOT_HDR(tree); -+ fidx = EXT_FIRST_INDEX(neh); -+ ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n", -+ neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); -+ -+ neh->eh_depth = path->p_depth + 1; -+ err = ext3_ext_dirty(handle, tree, curp); -+out: -+ brelse(bh); -+ -+ return err; -+} -+ -+/* -+ * routine finds empty index and adds new leaf. if no free index found -+ * then it requests in-depth growing -+ */ -+static int ext3_ext_create_new_leaf(handle_t *handle, -+ struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_ext_path *curp; -+ int depth, i, err = 0; -+ -+repeat: -+ i = depth = EXT_DEPTH(tree); -+ -+ /* walk up to the tree and look for free index entry */ -+ curp = path + depth; -+ while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) { -+ i--; -+ curp--; -+ } -+ -+ /* we use already allocated block for index block -+ * so, subsequent data blocks should be contigoues */ -+ if (EXT_HAS_FREE_INDEX(curp)) { -+ /* if we found index with free entry, then use that -+ * entry: create all needed subtree and add new leaf */ -+ err = ext3_ext_split(handle, tree, path, newext, i); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ } else { -+ /* tree is full, time to grow in depth */ -+ err = ext3_ext_grow_indepth(handle, tree, path, newext); -+ -+ /* refill path */ -+ ext3_ext_drop_refs(path); -+ path = ext3_ext_find_extent(tree, newext->ee_block, path); -+ if (IS_ERR(path)) -+ err = PTR_ERR(path); -+ -+ /* -+ * only first (depth 0 -> 1) produces free space -+ * in all other cases we have to split growed tree -+ */ -+ depth = EXT_DEPTH(tree); -+ if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) { -+ /* now we need split */ -+ goto repeat; -+ } -+ } -+ -+ if (err) -+ return err; -+ -+ return 0; -+} -+ -+/* -+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK -+ * NOTE: it consider block number from index entry as -+ * allocated block. thus, index entries have to be consistent -+ * with leafs -+ */ -+static unsigned long -+ext3_ext_next_allocated_block(struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ if (depth == 0 && path->p_ext == NULL) -+ return EXT_MAX_BLOCK; -+ -+ /* FIXME: what if index isn't full ?! */ -+ while (depth >= 0) { -+ if (depth == path->p_depth) { -+ /* leaf */ -+ if (path[depth].p_ext != -+ EXT_LAST_EXTENT(path[depth].p_hdr)) -+ return path[depth].p_ext[1].ee_block; -+ } else { -+ /* index */ -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ } -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * returns first allocated block from next leaf or EXT_MAX_BLOCK -+ */ -+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth; -+ -+ EXT_ASSERT(path != NULL); -+ depth = path->p_depth; -+ -+ /* zero-tree has no leaf blocks at all */ -+ if (depth == 0) -+ return EXT_MAX_BLOCK; -+ -+ /* go to index block */ -+ depth--; -+ -+ while (depth >= 0) { -+ if (path[depth].p_idx != -+ EXT_LAST_INDEX(path[depth].p_hdr)) -+ return path[depth].p_idx[1].ei_block; -+ depth--; -+ } -+ -+ return EXT_MAX_BLOCK; -+} -+ -+/* -+ * if leaf gets modified and modified extent is first in the leaf -+ * then we have to correct all indexes above -+ * TODO: do we need to correct tree in all cases? -+ */ -+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct ext3_extent_header *eh; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_extent *ex; -+ unsigned long border; -+ int k, err = 0; -+ -+ eh = path[depth].p_hdr; -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(eh); -+ -+ if (depth == 0) { -+ /* there is no tree at all */ -+ return 0; -+ } -+ -+ if (ex != EXT_FIRST_EXTENT(eh)) { -+ /* we correct tree if first leaf got modified only */ -+ return 0; -+ } -+ -+ /* -+ * TODO: we need correction if border is smaller then current one -+ */ -+ k = depth - 1; -+ border = path[depth].p_ext->ee_block; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ return err; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ return err; -+ -+ while (k--) { -+ /* change all left-side indexes */ -+ if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr)) -+ break; -+ if ((err = ext3_ext_get_access(handle, tree, path + k))) -+ break; -+ path[k].p_idx->ei_block = border; -+ if ((err = ext3_ext_dirty(handle, tree, path + k))) -+ break; -+ } -+ -+ return err; -+} -+ -+static int inline -+ext3_can_extents_be_merged(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ if (ex1->ee_block + ex1->ee_len != ex2->ee_block) -+ return 0; -+ -+#ifdef AGRESSIVE_TEST -+ if (ex1->ee_len >= 4) -+ return 0; -+#endif -+ -+ if (!tree->ops->mergable) -+ return 1; -+ -+ return tree->ops->mergable(ex1, ex2); -+} -+ -+/* -+ * this routine tries to merge requsted extent into the existing -+ * extent or inserts requested extent as new one into the tree, -+ * creating new leaf in no-space case -+ */ -+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *newext) -+{ -+ struct ext3_extent_header * eh; -+ struct ext3_extent *ex, *fex; -+ struct ext3_extent *nearex; /* nearest extent */ -+ struct ext3_ext_path *npath = NULL; -+ int depth, len, err, next; -+ -+ EXT_ASSERT(newext->ee_len > 0); -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(path[depth].p_hdr); -+ -+ /* try to insert block into found extent and return */ -+ if (ex && ext3_can_extents_be_merged(tree, ex, newext)) { -+ ext_debug(tree, "append %d block to %d:%d (from %d)\n", -+ newext->ee_len, ex->ee_block, ex->ee_len, -+ ex->ee_start); -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ return err; -+ ex->ee_len += newext->ee_len; -+ eh = path[depth].p_hdr; -+ nearex = ex; -+ goto merge; -+ } -+ -+repeat: -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) -+ goto has_space; -+ -+ /* probably next leaf has space for us? */ -+ fex = EXT_LAST_EXTENT(eh); -+ next = ext3_ext_next_leaf_block(tree, path); -+ if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) { -+ ext_debug(tree, "next leaf block - %d\n", next); -+ EXT_ASSERT(!npath); -+ npath = ext3_ext_find_extent(tree, next, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ EXT_ASSERT(npath->p_depth == path->p_depth); -+ eh = npath[depth].p_hdr; -+ if (eh->eh_entries < eh->eh_max) { -+ ext_debug(tree, "next leaf isnt full(%d)\n", -+ eh->eh_entries); -+ path = npath; -+ goto repeat; -+ } -+ ext_debug(tree, "next leaf hasno free space(%d,%d)\n", -+ eh->eh_entries, eh->eh_max); -+ } -+ -+ /* -+ * there is no free space in found leaf -+ * we're gonna add new leaf in the tree -+ */ -+ err = ext3_ext_create_new_leaf(handle, tree, path, newext); -+ if (err) -+ goto cleanup; -+ depth = EXT_DEPTH(tree); -+ eh = path[depth].p_hdr; -+ -+has_space: -+ nearex = path[depth].p_ext; -+ -+ if ((err = ext3_ext_get_access(handle, tree, path + depth))) -+ goto cleanup; -+ -+ if (!nearex) { -+ /* there is no extent in this leaf, create first one */ -+ ext_debug(tree, "first extent in the leaf: %d:%d:%d\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len); -+ path[depth].p_ext = EXT_FIRST_EXTENT(eh); -+ } else if (newext->ee_block > nearex->ee_block) { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ if (nearex != EXT_LAST_EXTENT(eh)) { -+ len = EXT_MAX_EXTENT(eh) - nearex; -+ len = (len - 1) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, -+ newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 2, nearex + 1, len); -+ } -+ path[depth].p_ext = nearex + 1; -+ } else { -+ EXT_ASSERT(newext->ee_block != nearex->ee_block); -+ len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent); -+ len = len < 0 ? 0 : len; -+ ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, " -+ "move %d from 0x%p to 0x%p\n", -+ newext->ee_block, newext->ee_start, newext->ee_len, -+ nearex, len, nearex + 1, nearex + 2); -+ memmove(nearex + 1, nearex, len); -+ path[depth].p_ext = nearex; -+ } -+ -+ eh->eh_entries++; -+ nearex = path[depth].p_ext; -+ nearex->ee_block = newext->ee_block; -+ nearex->ee_start = newext->ee_start; -+ nearex->ee_len = newext->ee_len; -+ /* FIXME: support for large fs */ -+ nearex->ee_start_hi = 0; -+ -+merge: -+ /* try to merge extents to the right */ -+ while (nearex < EXT_LAST_EXTENT(eh)) { -+ if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1)) -+ break; -+ /* merge with next extent! */ -+ nearex->ee_len += nearex[1].ee_len; -+ if (nearex + 1 < EXT_LAST_EXTENT(eh)) { -+ len = (EXT_LAST_EXTENT(eh) - nearex - 1) * -+ sizeof(struct ext3_extent); -+ memmove(nearex + 1, nearex + 2, len); -+ } -+ eh->eh_entries--; -+ EXT_ASSERT(eh->eh_entries > 0); -+ } -+ -+ /* try to merge extents to the left */ -+ -+ /* time to correct all indexes above */ -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ if (err) -+ goto cleanup; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ -+cleanup: -+ if (npath) { -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ } -+ ext3_ext_tree_changed(tree); -+ ext3_ext_invalidate_cache(tree); -+ return err; -+} -+ -+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block, -+ unsigned long num, ext_prepare_callback func) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_ext_cache cbex; -+ struct ext3_extent *ex; -+ unsigned long next, start = 0, end = 0; -+ unsigned long last = block + num; -+ int depth, exists, err = 0; -+ -+ EXT_ASSERT(tree); -+ EXT_ASSERT(func); -+ EXT_ASSERT(tree->inode); -+ EXT_ASSERT(tree->root); -+ -+ while (block < last && block != EXT_MAX_BLOCK) { -+ num = last - block; -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(tree, block, path); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ break; -+ } -+ -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(path[depth].p_hdr); -+ ex = path[depth].p_ext; -+ next = ext3_ext_next_allocated_block(path); -+ -+ exists = 0; -+ if (!ex) { -+ /* there is no extent yet, so try to allocate -+ * all requested space */ -+ start = block; -+ end = block + num; -+ } else if (ex->ee_block > block) { -+ /* need to allocate space before found extent */ -+ start = block; -+ end = ex->ee_block; -+ if (block + num < end) -+ end = block + num; -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ /* need to allocate space after found extent */ -+ start = block; -+ end = block + num; -+ if (end >= next) -+ end = next; -+ } else if (block >= ex->ee_block) { -+ /* -+ * some part of requested space is covered -+ * by found extent -+ */ -+ start = block; -+ end = ex->ee_block + ex->ee_len; -+ if (block + num < end) -+ end = block + num; -+ exists = 1; -+ } else { -+ BUG(); -+ } -+ EXT_ASSERT(end > start); -+ -+ if (!exists) { -+ cbex.ec_block = start; -+ cbex.ec_len = end - start; -+ cbex.ec_start = 0; -+ cbex.ec_type = EXT3_EXT_CACHE_GAP; -+ } else { -+ cbex.ec_block = ex->ee_block; -+ cbex.ec_len = ex->ee_len; -+ cbex.ec_start = ex->ee_start; -+ cbex.ec_type = EXT3_EXT_CACHE_EXTENT; -+ } -+ -+ EXT_ASSERT(cbex.ec_len > 0); -+ EXT_ASSERT(path[depth].p_hdr); -+ err = func(tree, path, &cbex); -+ ext3_ext_drop_refs(path); -+ -+ if (err < 0) -+ break; -+ if (err == EXT_REPEAT) -+ continue; -+ else if (err == EXT_BREAK) { -+ err = 0; -+ break; -+ } -+ -+ if (EXT_DEPTH(tree) != depth) { -+ /* depth was changed. we have to realloc path */ -+ kfree(path); -+ path = NULL; -+ } -+ -+ block = cbex.ec_block + cbex.ec_len; -+ } -+ -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ -+ return err; -+} -+ -+static inline void -+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block, -+ __u32 len, __u32 start, int type) -+{ -+ EXT_ASSERT(len > 0); -+ if (tree->cex) { -+ tree->cex->ec_type = type; -+ tree->cex->ec_block = block; -+ tree->cex->ec_len = len; -+ tree->cex->ec_start = start; -+ } -+} -+ -+/* -+ * this routine calculate boundaries of the gap requested block fits into -+ * and cache this gap -+ */ -+static inline void -+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ unsigned long block) -+{ -+ int depth = EXT_DEPTH(tree); -+ unsigned long lblock, len; -+ struct ext3_extent *ex; -+ -+ if (!tree->cex) -+ return; -+ -+ ex = path[depth].p_ext; -+ if (ex == NULL) { -+ /* there is no extent yet, so gap is [0;-] */ -+ lblock = 0; -+ len = EXT_MAX_BLOCK; -+ ext_debug(tree, "cache gap(whole file):"); -+ } else if (block < ex->ee_block) { -+ lblock = block; -+ len = ex->ee_block - block; -+ ext_debug(tree, "cache gap(before): %lu [%lu:%lu]", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len); -+ } else if (block >= ex->ee_block + ex->ee_len) { -+ lblock = ex->ee_block + ex->ee_len; -+ len = ext3_ext_next_allocated_block(path); -+ ext_debug(tree, "cache gap(after): [%lu:%lu] %lu", -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) block); -+ EXT_ASSERT(len > lblock); -+ len = len - lblock; -+ } else { -+ lblock = len = 0; -+ BUG(); -+ } -+ -+ ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len); -+ ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP); -+} -+ -+static inline int -+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block, -+ struct ext3_extent *ex) -+{ -+ struct ext3_ext_cache *cex = tree->cex; -+ -+ /* is there cache storage at all? */ -+ if (!cex) -+ return EXT3_EXT_CACHE_NO; -+ -+ /* has cache valid data? */ -+ if (cex->ec_type == EXT3_EXT_CACHE_NO) -+ return EXT3_EXT_CACHE_NO; -+ -+ EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP || -+ cex->ec_type == EXT3_EXT_CACHE_EXTENT); -+ if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) { -+ ex->ee_block = cex->ec_block; -+ ex->ee_start = cex->ec_start; -+ ex->ee_start_hi = 0; -+ ex->ee_len = cex->ec_len; -+ ext_debug(tree, "%lu cached by %lu:%lu:%lu\n", -+ (unsigned long) block, -+ (unsigned long) ex->ee_block, -+ (unsigned long) ex->ee_len, -+ (unsigned long) ex->ee_start); -+ return cex->ec_type; -+ } -+ -+ /* not in cache */ -+ return EXT3_EXT_CACHE_NO; -+} -+ -+/* -+ * routine removes index from the index block -+ * it's used in truncate case only. thus all requests are for -+ * last index in the block only -+ */ -+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ struct buffer_head *bh; -+ int err; -+ -+ /* free index block */ -+ path--; -+ EXT_ASSERT(path->p_hdr->eh_entries); -+ if ((err = ext3_ext_get_access(handle, tree, path))) -+ return err; -+ path->p_hdr->eh_entries--; -+ if ((err = ext3_ext_dirty(handle, tree, path))) -+ return err; -+ ext_debug(tree, "index is empty, remove it, free block %d\n", -+ path->p_idx->ei_leaf); -+ bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); -+ ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ return err; -+} -+ -+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path) -+{ -+ int depth = EXT_DEPTH(tree); -+ int needed; -+ -+ if (path) { -+ /* probably there is space in leaf? */ -+ if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max) -+ return 1; -+ } -+ -+ /* -+ * the worste case we're expecting is creation of the -+ * new root (growing in depth) with index splitting -+ * for splitting we have to consider depth + 1 because -+ * previous growing could increase it -+ */ -+ depth = depth + 1; -+ -+ /* -+ * growing in depth: -+ * block allocation + new root + old root -+ */ -+ needed = EXT3_ALLOC_NEEDED + 2; -+ -+ /* index split. we may need: -+ * allocate intermediate indexes and new leaf -+ * change two blocks at each level, but root -+ * modify root block (inode) -+ */ -+ needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1; -+ -+ return needed; -+} -+ -+static int -+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, tex; -+ struct ext3_ext_path *npath; -+ int depth, creds, err; -+ -+ depth = EXT_DEPTH(tree); -+ ex = path[depth].p_ext; -+ EXT_ASSERT(ex); -+ EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1); -+ EXT_ASSERT(ex->ee_block < start); -+ -+ /* calculate tail extent */ -+ tex.ee_block = end + 1; -+ EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len); -+ tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block; -+ -+ creds = ext3_ext_calc_credits_for_insert(tree, path); -+ handle = ext3_ext_journal_restart(handle, creds); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ /* calculate head extent. use primary extent */ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ return err; -+ ex->ee_len = start - ex->ee_block; -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ return err; -+ -+ /* FIXME: some callback to free underlying resource -+ * and correct ee_start? */ -+ ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n", -+ ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len); -+ -+ npath = ext3_ext_find_extent(tree, ex->ee_block, NULL); -+ if (IS_ERR(npath)) -+ return PTR_ERR(npath); -+ depth = EXT_DEPTH(tree); -+ EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block); -+ EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len); -+ -+ err = ext3_ext_insert_extent(handle, tree, npath, &tex); -+ ext3_ext_drop_refs(npath); -+ kfree(npath); -+ -+ return err; -+} -+ -+static int -+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, unsigned long start, -+ unsigned long end) -+{ -+ struct ext3_extent *ex, *fu = NULL, *lu, *le; -+ int err = 0, correct_index = 0; -+ int depth = EXT_DEPTH(tree), credits; -+ struct ext3_extent_header *eh; -+ unsigned a, b, block, num; -+ -+ ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end); -+ if (!path[depth].p_hdr) -+ path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh); -+ eh = path[depth].p_hdr; -+ EXT_ASSERT(eh); -+ EXT_ASSERT(eh->eh_entries <= eh->eh_max); -+ EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -+ -+ /* find where to start removing */ -+ le = ex = EXT_LAST_EXTENT(eh); -+ while (ex != EXT_FIRST_EXTENT(eh)) { -+ if (ex->ee_block <= end) -+ break; -+ ex--; -+ } -+ -+ if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) { -+ /* removal of internal part of the extent requested -+ * tail and head must be placed in different extent -+ * so, we have to insert one more extent */ -+ path[depth].p_ext = ex; -+ return ext3_ext_split_for_rm(handle, tree, path, start, end); -+ } -+ -+ lu = ex; -+ while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) { -+ ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len); -+ path[depth].p_ext = ex; -+ -+ a = ex->ee_block > start ? ex->ee_block : start; -+ b = ex->ee_block + ex->ee_len - 1 < end ? -+ ex->ee_block + ex->ee_len - 1 : end; -+ -+ ext_debug(tree, " border %u:%u\n", a, b); -+ -+ if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) { -+ block = 0; -+ num = 0; -+ BUG(); -+ } else if (a != ex->ee_block) { -+ /* remove tail of the extent */ -+ block = ex->ee_block; -+ num = a - block; -+ } else if (b != ex->ee_block + ex->ee_len - 1) { -+ /* remove head of the extent */ -+ block = a; -+ num = b - a; -+ } else { -+ /* remove whole extent: excelent! */ -+ block = ex->ee_block; -+ num = 0; -+ EXT_ASSERT(a == ex->ee_block && -+ b == ex->ee_block + ex->ee_len - 1); -+ } -+ -+ if (ex == EXT_FIRST_EXTENT(eh)) -+ correct_index = 1; -+ -+ credits = 1; -+ if (correct_index) -+ credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1; -+ if (tree->ops->remove_extent_credits) -+ credits+=tree->ops->remove_extent_credits(tree,ex,a,b); -+ -+ handle = ext3_ext_journal_restart(handle, credits); -+ if (IS_ERR(handle)) { -+ err = PTR_ERR(handle); -+ goto out; -+ } -+ -+ err = ext3_ext_get_access(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ if (tree->ops->remove_extent) -+ err = tree->ops->remove_extent(tree, ex, a, b); -+ if (err) -+ goto out; -+ -+ if (num == 0) { -+ /* this extent is removed entirely mark slot unused */ -+ ex->ee_start = ex->ee_start_hi = 0; -+ eh->eh_entries--; -+ fu = ex; -+ } -+ -+ ex->ee_block = block; -+ ex->ee_len = num; -+ -+ err = ext3_ext_dirty(handle, tree, path + depth); -+ if (err) -+ goto out; -+ -+ ext_debug(tree, "new extent: %u:%u:%u\n", -+ ex->ee_block, ex->ee_len, ex->ee_start); -+ ex--; -+ } -+ -+ if (fu) { -+ /* reuse unused slots */ -+ while (lu < le) { -+ if (lu->ee_start) { -+ *fu = *lu; -+ lu->ee_start = lu->ee_start_hi = 0; -+ fu++; -+ } -+ lu++; -+ } -+ } -+ -+ if (correct_index && eh->eh_entries) -+ err = ext3_ext_correct_indexes(handle, tree, path); -+ -+ /* if this leaf is free, then we should -+ * remove it from index block above */ -+ if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) -+ err = ext3_ext_rm_idx(handle, tree, path + depth); -+ -+out: -+ return err; -+} -+ -+ -+static struct ext3_extent_idx * -+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block) -+{ -+ struct ext3_extent_idx *ix; -+ -+ ix = EXT_LAST_INDEX(hdr); -+ while (ix != EXT_FIRST_INDEX(hdr)) { -+ if (ix->ei_block <= block) -+ break; -+ ix--; -+ } -+ return ix; -+} -+ -+/* -+ * returns 1 if current index have to be freed (even partial) -+ */ -+static int inline -+ext3_ext_more_to_rm(struct ext3_ext_path *path) -+{ -+ EXT_ASSERT(path->p_idx); -+ -+ if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr)) -+ return 0; -+ -+ /* -+ * if truncate on deeper level happened it it wasn't partial -+ * so we have to consider current index for truncation -+ */ -+ if (path->p_hdr->eh_entries == path->p_block) -+ return 0; -+ return 1; -+} -+ -+int ext3_ext_remove_space(struct ext3_extents_tree *tree, -+ unsigned long start, unsigned long end) -+{ -+ struct inode *inode = tree->inode; -+ struct super_block *sb = inode->i_sb; -+ int depth = EXT_DEPTH(tree); -+ struct ext3_ext_path *path; -+ handle_t *handle; -+ int i = 0, err = 0; -+ -+ ext_debug(tree, "space to be removed: %lu:%lu\n", start, end); -+ -+ /* probably first extent we're gonna free will be last in block */ -+ handle = ext3_journal_start(inode, depth + 1); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ ext3_ext_invalidate_cache(tree); -+ -+ /* -+ * we start scanning from right side freeing all the blocks -+ * after i_size and walking into the deep -+ */ -+ path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL); -+ if (IS_ERR(path)) { -+ ext3_error(sb, __FUNCTION__, "Can't allocate path array"); -+ ext3_journal_stop(handle); -+ return -ENOMEM; -+ } -+ memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); -+ path[i].p_hdr = EXT_ROOT_HDR(tree); -+ -+ while (i >= 0 && err == 0) { -+ if (i == depth) { -+ /* this is leaf block */ -+ err = ext3_ext_rm_leaf(handle, tree, path, start, end); -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ continue; -+ } -+ -+ /* this is index block */ -+ if (!path[i].p_hdr) { -+ ext_debug(tree, "initialize header\n"); -+ path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh); -+ } -+ -+ EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max); -+ EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC); -+ -+ if (!path[i].p_idx) { -+ /* this level hasn't touched yet */ -+ path[i].p_idx = -+ ext3_ext_last_covered(path[i].p_hdr, end); -+ path[i].p_block = path[i].p_hdr->eh_entries + 1; -+ ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n", -+ path[i].p_hdr, path[i].p_hdr->eh_entries); -+ } else { -+ /* we've already was here, see at next index */ -+ path[i].p_idx--; -+ } -+ -+ ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n", -+ i, EXT_FIRST_INDEX(path[i].p_hdr), -+ path[i].p_idx); -+ if (ext3_ext_more_to_rm(path + i)) { -+ /* go to the next level */ -+ ext_debug(tree, "move to level %d (block %d)\n", -+ i + 1, path[i].p_idx->ei_leaf); -+ memset(path + i + 1, 0, sizeof(*path)); -+ path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf); -+ if (!path[i+1].p_bh) { -+ /* should we reset i_size? */ -+ err = -EIO; -+ break; -+ } -+ /* put actual number of indexes to know is this -+ * number got changed at the next iteration */ -+ path[i].p_block = path[i].p_hdr->eh_entries; -+ i++; -+ } else { -+ /* we finish processing this index, go up */ -+ if (path[i].p_hdr->eh_entries == 0 && i > 0) { -+ /* index is empty, remove it -+ * handle must be already prepared by the -+ * truncatei_leaf() */ -+ err = ext3_ext_rm_idx(handle, tree, path + i); -+ } -+ /* root level have p_bh == NULL, brelse() eats this */ -+ brelse(path[i].p_bh); -+ i--; -+ ext_debug(tree, "return to level %d\n", i); -+ } -+ } -+ -+ /* TODO: flexible tree reduction should be here */ -+ if (path->p_hdr->eh_entries == 0) { -+ /* -+ * truncate to zero freed all the tree -+ * so, we need to correct eh_depth -+ */ -+ err = ext3_ext_get_access(handle, tree, path); -+ if (err == 0) { -+ EXT_ROOT_HDR(tree)->eh_depth = 0; -+ EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree); -+ err = ext3_ext_dirty(handle, tree, path); -+ } -+ } -+ ext3_ext_tree_changed(tree); -+ -+ kfree(path); -+ ext3_journal_stop(handle); -+ -+ return err; -+} -+ -+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks) -+{ -+ int lcap, icap, rcap, leafs, idxs, num; -+ -+ rcap = ext3_ext_space_root(tree); -+ if (blocks <= rcap) { -+ /* all extents fit to the root */ -+ return 0; -+ } -+ -+ rcap = ext3_ext_space_root_idx(tree); -+ lcap = ext3_ext_space_block(tree); -+ icap = ext3_ext_space_block_idx(tree); -+ -+ num = leafs = (blocks + lcap - 1) / lcap; -+ if (leafs <= rcap) { -+ /* all pointers to leafs fit to the root */ -+ return leafs; -+ } -+ -+ /* ok. we need separate index block(s) to link all leaf blocks */ -+ idxs = (leafs + icap - 1) / icap; -+ do { -+ num += idxs; -+ idxs = (idxs + icap - 1) / icap; -+ } while (idxs > rcap); -+ -+ return num; -+} -+ -+/* -+ * called at mount time -+ */ -+void ext3_ext_init(struct super_block *sb) -+{ -+ /* -+ * possible initialization would be here -+ */ -+ -+ if (test_opt(sb, EXTENTS)) { -+ printk("EXT3-fs: file extents enabled"); -+#ifdef AGRESSIVE_TEST -+ printk(", agressive tests"); -+#endif -+#ifdef CHECK_BINSEARCH -+ printk(", check binsearch"); -+#endif -+ printk("\n"); -+ } -+} -+ -+/* -+ * called at umount time -+ */ -+void ext3_ext_release(struct super_block *sb) -+{ -+} -+ -+/************************************************************************ -+ * VFS related routines -+ ************************************************************************/ -+ -+static int ext3_get_inode_write_access(handle_t *handle, void *buffer) -+{ -+ /* we use in-core data, not bh */ -+ return 0; -+} -+ -+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer) -+{ -+ struct inode *inode = buffer; -+ return ext3_mark_inode_dirty(handle, inode); -+} -+ -+static int ext3_ext_mergable(struct ext3_extent *ex1, -+ struct ext3_extent *ex2) -+{ -+ /* FIXME: support for large fs */ -+ if (ex1->ee_start + ex1->ee_len == ex2->ee_start) -+ return 1; -+ return 0; -+} -+ -+static int -+ext3_remove_blocks_credits(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed; -+ -+ /* at present, extent can't cross block group */; -+ needed = 4; /* bitmap + group desc + sb + inode */ -+ -+#ifdef CONFIG_QUOTA -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ return needed; -+} -+ -+static int -+ext3_remove_blocks(struct ext3_extents_tree *tree, -+ struct ext3_extent *ex, -+ unsigned long from, unsigned long to) -+{ -+ int needed = ext3_remove_blocks_credits(tree, ex, from, to); -+ handle_t *handle = ext3_journal_start(tree->inode, needed); -+ struct buffer_head *bh; -+ int i; -+ -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { -+ /* tail removal */ -+ unsigned long num, start; -+ num = ex->ee_block + ex->ee_len - from; -+ start = ex->ee_start + ex->ee_len - num; -+ ext_debug(tree, "free last %lu blocks starting %lu\n", -+ num, start); -+ for (i = 0; i < num; i++) { -+ bh = sb_find_get_block(tree->inode->i_sb, start + i); -+ ext3_forget(handle, 0, tree->inode, bh, start + i); -+ } -+ ext3_free_blocks(handle, tree->inode, start, num); -+ } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { -+ printk("strange request: removal %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } else { -+ printk("strange request: removal(2) %lu-%lu from %u:%u\n", -+ from, to, ex->ee_block, ex->ee_len); -+ } -+ ext3_journal_stop(handle); -+ return 0; -+} -+ -+static int ext3_ext_find_goal(struct inode *inode, -+ struct ext3_ext_path *path, unsigned long block) -+{ -+ struct ext3_inode_info *ei = EXT3_I(inode); -+ unsigned long bg_start; -+ unsigned long colour; -+ int depth; -+ -+ if (path) { -+ struct ext3_extent *ex; -+ depth = path->p_depth; -+ -+ /* try to predict block placement */ -+ if ((ex = path[depth].p_ext)) -+ return ex->ee_start + (block - ex->ee_block); -+ -+ /* it looks index is empty -+ * try to find starting from index itself */ -+ if (path[depth].p_bh) -+ return path[depth].p_bh->b_blocknr; -+ } -+ -+ /* OK. use inode's group */ -+ bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + -+ le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); -+ colour = (current->pid % 16) * -+ (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); -+ return bg_start + colour + block; -+} -+ -+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_extent *ex, int *err) -+{ -+ struct inode *inode = tree->inode; -+ int newblock, goal; -+ -+ EXT_ASSERT(path); -+ EXT_ASSERT(ex); -+ EXT_ASSERT(ex->ee_start); -+ EXT_ASSERT(ex->ee_len); -+ -+ /* reuse block from the extent to order data/metadata */ -+ newblock = ex->ee_start++; -+ ex->ee_len--; -+ if (ex->ee_len == 0) { -+ ex->ee_len = 1; -+ /* allocate new block for the extent */ -+ goal = ext3_ext_find_goal(inode, path, ex->ee_block); -+ ex->ee_start = ext3_new_block(handle, inode, goal, err); -+ ex->ee_start_hi = 0; -+ if (ex->ee_start == 0) { -+ /* error occured: restore old extent */ -+ ex->ee_start = newblock; -+ return 0; -+ } -+ } -+ return newblock; -+} -+ -+static struct ext3_extents_helpers ext3_blockmap_helpers = { -+ .get_write_access = ext3_get_inode_write_access, -+ .mark_buffer_dirty = ext3_mark_buffer_dirty, -+ .mergable = ext3_ext_mergable, -+ .new_block = ext3_new_block_cb, -+ .remove_extent = ext3_remove_blocks, -+ .remove_extent_credits = ext3_remove_blocks_credits, -+}; -+ -+void ext3_init_tree_desc(struct ext3_extents_tree *tree, -+ struct inode *inode) -+{ -+ tree->inode = inode; -+ tree->root = (void *) EXT3_I(inode)->i_data; -+ tree->buffer = (void *) inode; -+ tree->buffer_len = sizeof(EXT3_I(inode)->i_data); -+ tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent; -+ tree->ops = &ext3_blockmap_helpers; -+} -+ -+int ext3_ext_get_block(handle_t *handle, struct inode *inode, -+ long iblock, struct buffer_head *bh_result, -+ int create, int extend_disksize) -+{ -+ struct ext3_ext_path *path = NULL; -+ struct ext3_extent newex; -+ struct ext3_extent *ex; -+ int goal, newblock, err = 0, depth; -+ struct ext3_extents_tree tree; -+ -+ clear_buffer_new(bh_result); -+ ext3_init_tree_desc(&tree, inode); -+ ext_debug(&tree, "block %d requested for inode %u\n", -+ (int) iblock, (unsigned) inode->i_ino); -+ down(&EXT3_I(inode)->truncate_sem); -+ -+ /* check in cache */ -+ if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) { -+ if (goal == EXT3_EXT_CACHE_GAP) { -+ if (!create) { -+ /* block isn't allocated yet and -+ * user don't want to allocate it */ -+ goto out2; -+ } -+ /* we should allocate requested block */ -+ } else if (goal == EXT3_EXT_CACHE_EXTENT) { -+ /* block is already allocated */ -+ newblock = iblock - newex.ee_block + newex.ee_start; -+ goto out; -+ } else { -+ EXT_ASSERT(0); -+ } -+ } -+ -+ /* find extent for this block */ -+ path = ext3_ext_find_extent(&tree, iblock, NULL); -+ if (IS_ERR(path)) { -+ err = PTR_ERR(path); -+ path = NULL; -+ goto out2; -+ } -+ -+ depth = EXT_DEPTH(&tree); -+ -+ /* -+ * consistent leaf must not be empty -+ * this situations is possible, though, _during_ tree modification -+ * this is why assert can't be put in ext3_ext_find_extent() -+ */ -+ EXT_ASSERT(path[depth].p_ext != NULL || depth == 0); -+ -+ if ((ex = path[depth].p_ext)) { -+ /* if found exent covers block, simple return it */ -+ if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) { -+ newblock = iblock - ex->ee_block + ex->ee_start; -+ ext_debug(&tree, "%d fit into %d:%d -> %d\n", -+ (int) iblock, ex->ee_block, ex->ee_len, -+ newblock); -+ ext3_ext_put_in_cache(&tree, ex->ee_block, -+ ex->ee_len, ex->ee_start, -+ EXT3_EXT_CACHE_EXTENT); -+ goto out; -+ } -+ } -+ -+ /* -+ * requested block isn't allocated yet -+ * we couldn't try to create block if create flag is zero -+ */ -+ if (!create) { -+ /* put just found gap into cache to speedup subsequest reqs */ -+ ext3_ext_put_gap_in_cache(&tree, path, iblock); -+ goto out2; -+ } -+ -+ /* allocate new block */ -+ goal = ext3_ext_find_goal(inode, path, iblock); -+ newblock = ext3_new_block(handle, inode, goal, &err); -+ if (!newblock) -+ goto out2; -+ ext_debug(&tree, "allocate new block: goal %d, found %d\n", -+ goal, newblock); -+ -+ /* try to insert new extent into found leaf and return */ -+ newex.ee_block = iblock; -+ newex.ee_start = newblock; -+ newex.ee_start_hi = 0; -+ newex.ee_len = 1; -+ err = ext3_ext_insert_extent(handle, &tree, path, &newex); -+ if (err) -+ goto out2; -+ -+ if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize) -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ -+ /* previous routine could use block we allocated */ -+ newblock = newex.ee_start; -+ set_buffer_new(bh_result); -+ -+ ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len, -+ newex.ee_start, EXT3_EXT_CACHE_EXTENT); -+out: -+ ext3_ext_show_leaf(&tree, path); -+ map_bh(bh_result, inode->i_sb, newblock); -+out2: -+ if (path) { -+ ext3_ext_drop_refs(path); -+ kfree(path); -+ } -+ up(&EXT3_I(inode)->truncate_sem); -+ -+ return err; -+} -+ -+void ext3_ext_truncate(struct inode * inode, struct page *page) -+{ -+ struct address_space *mapping = inode->i_mapping; -+ struct super_block *sb = inode->i_sb; -+ struct ext3_extents_tree tree; -+ unsigned long last_block; -+ handle_t *handle; -+ int err = 0; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ /* -+ * probably first extent we're gonna free will be last in block -+ */ -+ err = ext3_writepage_trans_blocks(inode) + 3; -+ handle = ext3_journal_start(inode, err); -+ if (IS_ERR(handle)) { -+ if (page) { -+ clear_highpage(page); -+ flush_dcache_page(page); -+ unlock_page(page); -+ page_cache_release(page); -+ } -+ return; -+ } -+ -+ if (page) -+ ext3_block_truncate_page(handle, page, mapping, inode->i_size); -+ -+ down(&EXT3_I(inode)->truncate_sem); -+ ext3_ext_invalidate_cache(&tree); -+ -+ /* -+ * TODO: optimization is possible here -+ * probably we need not scaning at all, -+ * because page truncation is enough -+ */ -+ if (ext3_orphan_add(handle, inode)) -+ goto out_stop; -+ -+ /* we have to know where to truncate from in crash case */ -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ ext3_mark_inode_dirty(handle, inode); -+ -+ last_block = (inode->i_size + sb->s_blocksize - 1) >> -+ EXT3_BLOCK_SIZE_BITS(sb); -+ err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK); -+ -+ /* In a multi-transaction truncate, we only make the final -+ * transaction synchronous */ -+ if (IS_SYNC(inode)) -+ handle->h_sync = 1; -+ -+out_stop: -+ /* -+ * If this was a simple ftruncate(), and the file will remain alive -+ * then we need to clear up the orphan record which we created above. -+ * However, if this was a real unlink then we were called by -+ * ext3_delete_inode(), and we allow that function to clean up the -+ * orphan info for us. -+ */ -+ if (inode->i_nlink) -+ ext3_orphan_del(handle, inode); -+ -+ up(&EXT3_I(inode)->truncate_sem); -+ ext3_journal_stop(handle); -+} -+ -+/* -+ * this routine calculate max number of blocks we could modify -+ * in order to allocate new block for an inode -+ */ -+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num) -+{ -+ struct ext3_extents_tree tree; -+ int needed; -+ -+ ext3_init_tree_desc(&tree, inode); -+ -+ needed = ext3_ext_calc_credits_for_insert(&tree, NULL); -+ -+ /* caller want to allocate num blocks */ -+ needed *= num; -+ -+#ifdef CONFIG_QUOTA -+ /* -+ * FIXME: real calculation should be here -+ * it depends on blockmap format of qouta file -+ */ -+ needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ -+ return needed; -+} -+ -+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ ext3_extent_tree_init(handle, &tree); -+} -+ -+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks) -+{ -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ return ext3_ext_calc_metadata_amount(&tree, blocks); -+} -+ -+static int -+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *newex) -+{ -+ struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private; -+ -+ if (newex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ if (buf->err < 0) -+ return EXT_BREAK; -+ if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen) -+ return EXT_BREAK; -+ -+ if (!copy_to_user(buf->cur, newex, sizeof(*newex))) { -+ buf->err++; -+ buf->cur += sizeof(*newex); -+ } else { -+ buf->err = -EFAULT; -+ return EXT_BREAK; -+ } -+ return EXT_CONTINUE; -+} -+ -+static int -+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree, -+ struct ext3_ext_path *path, -+ struct ext3_ext_cache *ex) -+{ -+ struct ext3_extent_tree_stats *buf = -+ (struct ext3_extent_tree_stats *) tree->private; -+ int depth; -+ -+ if (ex->ec_type != EXT3_EXT_CACHE_EXTENT) -+ return EXT_CONTINUE; -+ -+ depth = EXT_DEPTH(tree); -+ buf->extents_num++; -+ if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr)) -+ buf->leaf_num++; -+ return EXT_CONTINUE; -+} -+ -+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, -+ unsigned long arg) -+{ -+ int err = 0; -+ -+ if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)) -+ return -EINVAL; -+ -+ if (cmd == EXT3_IOC_GET_EXTENTS) { -+ struct ext3_extent_buf buf; -+ struct ext3_extents_tree tree; -+ -+ if (copy_from_user(&buf, (void *) arg, sizeof(buf))) -+ return -EFAULT; -+ -+ ext3_init_tree_desc(&tree, inode); -+ buf.cur = buf.buffer; -+ buf.err = 0; -+ tree.private = &buf; -+ down(&EXT3_I(inode)->truncate_sem); -+ err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK, -+ ext3_ext_store_extent_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (err == 0) -+ err = buf.err; -+ } else if (cmd == EXT3_IOC_GET_TREE_STATS) { -+ struct ext3_extent_tree_stats buf; -+ struct ext3_extents_tree tree; -+ -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ buf.depth = EXT_DEPTH(&tree); -+ buf.extents_num = 0; -+ buf.leaf_num = 0; -+ tree.private = &buf; -+ err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK, -+ ext3_ext_collect_stats_cb); -+ up(&EXT3_I(inode)->truncate_sem); -+ if (!err) -+ err = copy_to_user((void *) arg, &buf, sizeof(buf)); -+ } else if (cmd == EXT3_IOC_GET_TREE_DEPTH) { -+ struct ext3_extents_tree tree; -+ ext3_init_tree_desc(&tree, inode); -+ down(&EXT3_I(inode)->truncate_sem); -+ err = EXT_DEPTH(&tree); -+ up(&EXT3_I(inode)->truncate_sem); -+ } -+ -+ return err; -+} -+ -+EXPORT_SYMBOL(ext3_init_tree_desc); -+EXPORT_SYMBOL(ext3_mark_inode_dirty); -+EXPORT_SYMBOL(ext3_ext_invalidate_cache); -+EXPORT_SYMBOL(ext3_ext_insert_extent); -+EXPORT_SYMBOL(ext3_ext_walk_space); -+EXPORT_SYMBOL(ext3_ext_find_goal); -+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert); -Index: linux-stage/fs/ext3/ialloc.c -=================================================================== ---- linux-stage.orig/fs/ext3/ialloc.c 2005-02-25 14:50:50.304202816 +0200 -+++ linux-stage/fs/ext3/ialloc.c 2005-02-25 15:33:48.920193600 +0200 -@@ -566,7 +566,7 @@ repeat: - ei->i_dir_start_lookup = 0; - ei->i_disksize = 0; - -- ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL; -+ ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL); - if (S_ISLNK(mode)) - ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL); - /* dirsync only applies to directories */ -@@ -646,6 +646,18 @@ - DQUOT_FREE_INODE(inode); - goto fail2; - } -+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) { -+ EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL; -+ ext3_extents_initialize_blockmap(handle, inode); -+ if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) { -+ err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh); -+ if (err) goto fail; -+ EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS); -+ BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata"); -+ err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); -+ } -+ } -+ - err = ext3_mark_inode_dirty(handle, inode); - if (err) { - ext3_std_error(sb, err); -Index: linux-stage/fs/ext3/inode.c -=================================================================== ---- linux-stage.orig/fs/ext3/inode.c 2005-02-25 14:50:50.309202056 +0200 -+++ linux-stage/fs/ext3/inode.c 2005-02-25 15:36:51.846384592 +0200 -@@ -796,6 +796,17 @@ - goto reread; - } - -+static inline int -+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block, -+ struct buffer_head *bh, int create, int extend_disksize) -+{ -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_get_block(handle, inode, block, bh, create, -+ extend_disksize); -+ return ext3_get_block_handle(handle, inode, block, bh, create, -+ extend_disksize); -+} -+ - static int ext3_get_block(struct inode *inode, sector_t iblock, - struct buffer_head *bh_result, int create) - { -@@ -806,8 +817,8 @@ - handle = ext3_journal_current_handle(); - J_ASSERT(handle != 0); - } -- ret = ext3_get_block_handle(handle, inode, iblock, -- bh_result, create, 1); -+ ret = ext3_get_block_wrap(handle, inode, iblock, -+ bh_result, create, 1); - return ret; - } - -@@ -851,7 +862,7 @@ - - get_block: - if (ret == 0) -- ret = ext3_get_block_handle(handle, inode, iblock, -+ ret = ext3_get_block_wrap(handle, inode, iblock, - bh_result, create, 0); - bh_result->b_size = (1 << inode->i_blkbits); - return ret; -@@ -871,7 +882,7 @@ - dummy.b_state = 0; - dummy.b_blocknr = -1000; - buffer_trace_init(&dummy.b_history); -- *errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1); -+ *errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1); - if (!*errp && buffer_mapped(&dummy)) { - struct buffer_head *bh; - bh = sb_getblk(inode->i_sb, dummy.b_blocknr); -@@ -1589,7 +1600,7 @@ - * This required during truncate. We need to physically zero the tail end - * of that block so it doesn't yield old data if the file is later grown. - */ --static int ext3_block_truncate_page(handle_t *handle, struct page *page, -+int ext3_block_truncate_page(handle_t *handle, struct page *page, - struct address_space *mapping, loff_t from) - { - unsigned long index = from >> PAGE_CACHE_SHIFT; -@@ -2087,6 +2098,9 @@ - return; - } - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_truncate(inode, page); -+ - handle = start_transaction(inode); - if (IS_ERR(handle)) { - if (page) { -@@ -2814,6 +2828,9 @@ - int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3; - int ret; - -+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) -+ return ext3_ext_writepage_trans_blocks(inode, bpp); -+ - if (ext3_should_journal_data(inode)) - ret = 3 * (bpp + indirects) + 2; - else -Index: linux-stage/fs/ext3/Makefile -=================================================================== ---- linux-stage.orig/fs/ext3/Makefile 2005-02-25 14:49:42.168561008 +0200 -+++ linux-stage/fs/ext3/Makefile 2005-02-25 15:39:28.384587168 +0200 -@@ -5,7 +5,8 @@ - obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ -- ioctl.o namei.o super.o symlink.o hash.o resize.o -+ ioctl.o namei.o super.o symlink.o hash.o resize.o \ -+ extents.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o -Index: linux-stage/fs/ext3/super.c -=================================================================== ---- linux-stage.orig/fs/ext3/super.c 2005-02-25 14:52:33.550506992 +0200 -+++ linux-stage/fs/ext3/super.c 2005-02-25 15:38:10.474431312 +0200 -@@ -394,6 +394,7 @@ - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); - if (!(sb->s_flags & MS_RDONLY)) { -@@ -457,6 +458,8 @@ - #endif - ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED; - ei->vfs_inode.i_version = 1; -+ -+ memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent)); - return &ei->vfs_inode; - } - -@@ -589,6 +594,7 @@ - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, -+ Opt_extents, Opt_noextents, Opt_extdebug, - }; - - static match_table_t tokens = { -@@ -639,6 +644,9 @@ - {Opt_iopen, "iopen"}, - {Opt_noiopen, "noiopen"}, - {Opt_iopen_nopriv, "iopen_nopriv"}, -+ {Opt_extents, "extents"}, -+ {Opt_noextents, "noextents"}, -+ {Opt_extdebug, "extdebug"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -943,6 +950,15 @@ - match_int(&args[0], &option); - *n_blocks_count = option; - break; -+ case Opt_extents: -+ set_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_noextents: -+ clear_opt (sbi->s_mount_opt, EXTENTS); -+ break; -+ case Opt_extdebug: -+ set_opt (sbi->s_mount_opt, EXTDEBUG); -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1625,6 +1638,8 @@ - percpu_counter_mod(&sbi->s_dirs_counter, - ext3_count_dirs(sb)); - -+ ext3_ext_init(sb); -+ - return 0; - - failed_mount3: -Index: linux-stage/fs/ext3/ioctl.c -=================================================================== ---- linux-stage.orig/fs/ext3/ioctl.c 2005-02-25 14:37:28.971023976 +0200 -+++ linux-stage/fs/ext3/ioctl.c 2005-02-25 15:33:48.938190864 +0200 -@@ -124,6 +124,10 @@ - err = ext3_change_inode_journal_flag(inode, jflag); - return err; - } -+ case EXT3_IOC_GET_EXTENTS: -+ case EXT3_IOC_GET_TREE_STATS: -+ case EXT3_IOC_GET_TREE_DEPTH: -+ return ext3_ext_ioctl(inode, filp, cmd, arg); - case EXT3_IOC_GETVERSION: - case EXT3_IOC_GETVERSION_OLD: - return put_user(inode->i_generation, (int __user *) arg); -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h 2005-02-25 14:53:56.424908168 +0200 -+++ linux-stage/include/linux/ext3_fs.h 2005-02-25 15:39:12.841950008 +0200 -@@ -186,8 +186,9 @@ - #define EXT3_NOTAIL_FL 0x00008000 /* don't merge file tail */ - #define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ - #define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ -+#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ - #define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */ - --#define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ -+#define EXT3_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */ - #define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ - -@@ -237,6 +238,9 @@ - #endif - #define EXT3_IOC_GETRSVSZ _IOR('f', 5, long) - #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) -+#define EXT3_IOC_GET_EXTENTS _IOR('f', 7, long) -+#define EXT3_IOC_GET_TREE_DEPTH _IOR('f', 8, long) -+#define EXT3_IOC_GET_TREE_STATS _IOR('f', 9, long) - - /* - * Structure of an inode on the disk -@@ -359,6 +363,8 @@ - #define EXT3_MOUNT_RESERVATION 0x20000 /* Preallocation */ - #define EXT3_MOUNT_IOPEN 0x80000 /* Allow access via iopen */ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ -+#define EXT3_MOUNT_EXTENTS 0x200000/* Extents support */ -+#define EXT3_MOUNT_EXTDEBUG 0x400000/* Extents debug */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef _LINUX_EXT2_FS_H -@@ -503,11 +509,13 @@ - #define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ - #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ - #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 -+#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ - - #define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR - #define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \ - EXT3_FEATURE_INCOMPAT_RECOVER| \ -- EXT3_FEATURE_INCOMPAT_META_BG) -+ EXT3_FEATURE_INCOMPAT_META_BG| \ -+ EXT3_FEATURE_INCOMPAT_EXTENTS) - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) -@@ -756,6 +763,9 @@ - - - /* inode.c */ -+extern int ext3_block_truncate_page(handle_t *, struct page *, -+ struct address_space *, loff_t); -+extern int ext3_writepage_trans_blocks(struct inode *inode); - extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); - extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); - extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); -@@ -836,6 +844,16 @@ - extern struct inode_operations ext3_symlink_inode_operations; - extern struct inode_operations ext3_fast_symlink_inode_operations; - -+/* extents.c */ -+extern int ext3_ext_writepage_trans_blocks(struct inode *, int); -+extern int ext3_ext_get_block(handle_t *, struct inode *, long, -+ struct buffer_head *, int, int); -+extern void ext3_ext_truncate(struct inode *, struct page *); -+extern void ext3_ext_init(struct super_block *); -+extern void ext3_ext_release(struct super_block *); -+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *); -+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, -+ unsigned int cmd, unsigned long arg); - - #endif /* __KERNEL__ */ - -Index: linux-stage/include/linux/ext3_extents.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_extents.h 2005-02-25 15:33:48.891198008 +0200 -+++ linux-stage/include/linux/ext3_extents.h 2005-02-25 15:33:48.944189952 +0200 -@@ -0,0 +1,262 @@ -+/* -+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+#ifndef _LINUX_EXT3_EXTENTS -+#define _LINUX_EXT3_EXTENTS -+ -+/* -+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks -+ * become very little, so index split, in-depth growing and -+ * other hard changes happens much more often -+ * this is for debug purposes only -+ */ -+#define AGRESSIVE_TEST_ -+ -+/* -+ * if CHECK_BINSEARCH defined, then results of binary search -+ * will be checked by linear search -+ */ -+#define CHECK_BINSEARCH_ -+ -+/* -+ * if EXT_DEBUG is defined you can use 'extdebug' mount option -+ * to get lots of info what's going on -+ */ -+#define EXT_DEBUG_ -+#ifdef EXT_DEBUG -+#define ext_debug(tree,fmt,a...) \ -+do { \ -+ if (test_opt((tree)->inode->i_sb, EXTDEBUG)) \ -+ printk(fmt, ##a); \ -+} while (0); -+#else -+#define ext_debug(tree,fmt,a...) -+#endif -+ -+/* -+ * if EXT_STATS is defined then stats numbers are collected -+ * these number will be displayed at umount time -+ */ -+#define EXT_STATS_ -+ -+ -+#define EXT3_ALLOC_NEEDED 3 /* block bitmap + group desc. + sb */ -+ -+/* -+ * ext3_inode has i_block array (total 60 bytes) -+ * first 4 bytes are used to store: -+ * - tree depth (0 mean there is no tree yet. all extents in the inode) -+ * - number of alive extents in the inode -+ */ -+ -+/* -+ * this is extent on-disk structure -+ * it's used at the bottom of the tree -+ */ -+struct ext3_extent { -+ __u32 ee_block; /* first logical block extent covers */ -+ __u16 ee_len; /* number of blocks covered by extent */ -+ __u16 ee_start_hi; /* high 16 bits of physical block */ -+ __u32 ee_start; /* low 32 bits of physical block */ -+}; -+ -+/* -+ * this is index on-disk structure -+ * it's used at all the levels, but the bottom -+ */ -+struct ext3_extent_idx { -+ __u32 ei_block; /* index covers logical blocks from 'block' */ -+ __u32 ei_leaf; /* pointer to the physical block of the next * -+ * level. leaf or next index could bet here */ -+ __u16 ei_leaf_hi; /* high 16 bits of physical block */ -+ __u16 ei_unused; -+}; -+ -+/* -+ * each block (leaves and indexes), even inode-stored has header -+ */ -+struct ext3_extent_header { -+ __u16 eh_magic; /* probably will support different formats */ -+ __u16 eh_entries; /* number of valid entries */ -+ __u16 eh_max; /* capacity of store in entries */ -+ __u16 eh_depth; /* has tree real underlaying blocks? */ -+ __u32 eh_generation; /* flags(8 bits) | generation of the tree */ -+}; -+ -+#define EXT3_EXT_MAGIC 0xf30a -+ -+/* -+ * array of ext3_ext_path contains path to some extent -+ * creation/lookup routines use it for traversal/splitting/etc -+ * truncate uses it to simulate recursive walking -+ */ -+struct ext3_ext_path { -+ __u32 p_block; -+ __u16 p_depth; -+ struct ext3_extent *p_ext; -+ struct ext3_extent_idx *p_idx; -+ struct ext3_extent_header *p_hdr; -+ struct buffer_head *p_bh; -+}; -+ -+/* -+ * structure for external API -+ */ -+ -+/* -+ * storage for cached extent -+ */ -+struct ext3_ext_cache { -+ __u32 ec_start; -+ __u32 ec_block; -+ __u32 ec_len; -+ __u32 ec_type; -+}; -+ -+#define EXT3_EXT_CACHE_NO 0 -+#define EXT3_EXT_CACHE_GAP 1 -+#define EXT3_EXT_CACHE_EXTENT 2 -+ -+/* -+ * ext3_extents_tree is used to pass initial information -+ * to top-level extents API -+ */ -+struct ext3_extents_helpers; -+struct ext3_extents_tree { -+ struct inode *inode; /* inode which tree belongs to */ -+ void *root; /* ptr to data top of tree resides at */ -+ void *buffer; /* will be passed as arg to ^^ routines */ -+ int buffer_len; -+ void *private; -+ struct ext3_ext_cache *cex;/* last found extent */ -+ struct ext3_extents_helpers *ops; -+}; -+ -+struct ext3_extents_helpers { -+ int (*get_write_access)(handle_t *h, void *buffer); -+ int (*mark_buffer_dirty)(handle_t *h, void *buffer); -+ int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2); -+ int (*remove_extent_credits)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*remove_extent)(struct ext3_extents_tree *, -+ struct ext3_extent *, unsigned long, -+ unsigned long); -+ int (*new_block)(handle_t *, struct ext3_extents_tree *, -+ struct ext3_ext_path *, struct ext3_extent *, -+ int *); -+}; -+ -+/* -+ * to be called by ext3_ext_walk_space() -+ * negative retcode - error -+ * positive retcode - signal for ext3_ext_walk_space(), see below -+ * callback must return valid extent (passed or newly created) -+ */ -+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *, -+ struct ext3_ext_path *, -+ struct ext3_ext_cache *); -+ -+#define EXT_CONTINUE 0 -+#define EXT_BREAK 1 -+#define EXT_REPEAT 2 -+ -+ -+#define EXT_MAX_BLOCK 0xffffffff -+ -+ -+#define EXT_FIRST_EXTENT(__hdr__) \ -+ ((struct ext3_extent *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_FIRST_INDEX(__hdr__) \ -+ ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \ -+ sizeof(struct ext3_extent_header))) -+#define EXT_HAS_FREE_INDEX(__path__) \ -+ ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max) -+#define EXT_LAST_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_LAST_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1) -+#define EXT_MAX_EXTENT(__hdr__) \ -+ (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_MAX_INDEX(__hdr__) \ -+ (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1) -+#define EXT_HDR_GEN_BITS 24 -+#define EXT_HDR_GEN_MASK ((1 << EXT_HDR_GEN_BITS) - 1) -+#define EXT_HDR_GEN(__hdr__) ((__hdr__)->eh_generation & EXT_HDR_GEN_MASK) -+#define EXT_FLAGS(__hdr__) ((__hdr__)->eh_generation >> EXT_HDR_GEN_BITS) -+#define EXT_FLAGS_CLR_UNKNOWN 0x7 /* Flags cleared on modification */ -+ -+#define EXT_BLOCK_HDR(__bh__) ((struct ext3_extent_header *)(__bh__)->b_data) -+#define EXT_ROOT_HDR(__tree__) ((struct ext3_extent_header *)(__tree__)->root) -+#define EXT_DEPTH(__tree__) (EXT_ROOT_HDR(__tree__)->eh_depth) -+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__)) -+ -+#define EXT_ASSERT(__x__) if (!(__x__)) BUG(); -+ -+#define EXT_CHECK_PATH(tree,path) \ -+{ \ -+ int depth = EXT_DEPTH(tree); \ -+ BUG_ON((unsigned long) (path) < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_idx < \ -+ __PAGE_OFFSET && (path)[depth].p_idx != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_ext < \ -+ __PAGE_OFFSET && (path)[depth].p_ext != NULL); \ -+ BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET); \ -+ BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET \ -+ && depth != 0); \ -+ BUG_ON((path)[0].p_depth != depth); \ -+} -+ -+ -+/* -+ * this structure is used to gather extents from the tree via ioctl -+ */ -+struct ext3_extent_buf { -+ unsigned long start; -+ int buflen; -+ void *buffer; -+ void *cur; -+ int err; -+}; -+ -+/* -+ * this structure is used to collect stats info about the tree -+ */ -+struct ext3_extent_tree_stats { -+ int depth; -+ int extents_num; -+ int leaf_num; -+}; -+ -+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *); -+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *); -+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *); -+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *); -+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback); -+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long); -+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *); -+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int); -+ -+static inline void -+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree) -+{ -+ if (tree->cex) -+ tree->cex->ec_type = EXT3_EXT_CACHE_NO; -+} -+#endif /* _LINUX_EXT3_EXTENTS */ -Index: linux-stage/include/linux/ext3_fs_i.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs_i.h 2005-02-25 14:50:50.320200384 +0200 -+++ linux-stage/include/linux/ext3_fs_i.h 2005-02-25 15:33:48.945189800 +0200 -@@ -128,6 +128,8 @@ - */ - struct semaphore truncate_sem; - struct inode vfs_inode; -+ -+ __u32 i_cached_extent[4]; - }; - - #endif /* _LINUX_EXT3_FS_I */ diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-bug11324.patch b/ldiskfs/kernel_patches/patches/ext3-extents-bug11324.patch deleted file mode 100644 index c7ed475da2..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-extents-bug11324.patch +++ /dev/null @@ -1,252 +0,0 @@ -Index: linux-stage/fs/ext3/extents.c -=================================================================== ---- linux-stage.orig/fs/ext3/extents.c 2007-04-17 22:09:19.000000000 -0700 -+++ linux-stage/fs/ext3/extents.c 2007-04-17 22:12:05.000000000 -0700 -@@ -44,26 +44,49 @@ - #include <asm/uaccess.h> - - --static inline int ext3_ext_check_header(struct ext3_extent_header *eh) --{ -- if (eh->eh_magic != EXT3_EXT_MAGIC) { -- printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n", -- (unsigned)eh->eh_magic); -- return -EIO; -- } -- if (eh->eh_max == 0) { -- printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n", -- (unsigned)eh->eh_max); -- return -EIO; -- } -- if (eh->eh_entries > eh->eh_max) { -- printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n", -- (unsigned)eh->eh_entries); -- return -EIO; -+static int __ext3_ext_check_header(const char *function, struct inode *inode, -+ struct ext3_extent_header *eh, int depth, -+ int max) -+{ -+ const char *error_msg = NULL; -+ -+ if (unlikely(eh->eh_magic != EXT3_EXT_MAGIC)) { -+ error_msg = "invalid magic"; -+ goto corrupted; -+ } -+ if (unlikely(eh->eh_depth != depth)) { -+ error_msg = "unexpected eh_depth"; -+ goto corrupted; -+ } -+ if (unlikely(eh->eh_max == 0)) { -+ error_msg = "too small eh_max"; -+ goto corrupted; -+ } -+ if (unlikely(eh->eh_max > max)) { -+ error_msg = "too large eh_max"; -+ goto corrupted; -+ } -+ if (unlikely(eh->eh_entries > eh->eh_max)) { -+ error_msg = "invalid eh_entries"; -+ goto corrupted; - } - return 0; -+ -+corrupted: -+ ext3_error(inode->i_sb, function, -+ "bad header in inode #%lu: %s - magic %x, " -+ "entries %u, max %u(%u), depth %u(%u)", -+ inode->i_ino, error_msg, eh->eh_magic, -+ eh->eh_entries, eh->eh_max, max, -+ eh->eh_depth, depth); -+ -+ return -EIO; - } - -+#define ext3_ext_check_header(inode,eh,depth,max) \ -+ __ext3_ext_check_header(__FUNCTION__,inode,eh,depth,max) -+ -+ - static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed) - { - int err; -@@ -226,6 +249,26 @@ - return size; - } - -+static inline int -+ext3_ext_max_entries(struct ext3_extents_tree *tree, int root, int depth) -+{ -+ int max; -+ -+ if (root) { -+ if (depth == 0) -+ max = ext3_ext_space_root(tree); -+ else -+ max = ext3_ext_space_root_idx(tree); -+ } else { -+ if (depth == 0) -+ max = ext3_ext_space_block(tree); -+ else -+ max = ext3_ext_space_block_idx(tree); -+ } -+ -+ return max; -+} -+ - static void ext3_ext_show_path(struct ext3_extents_tree *tree, - struct ext3_ext_path *path) - { -@@ -296,10 +339,6 @@ - struct ext3_extent_idx *ix; - int l = 0, k, r; - -- EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -- EXT_ASSERT(eh->eh_entries <= eh->eh_max); -- EXT_ASSERT(eh->eh_entries > 0); -- - ext_debug(tree, "binsearch for %d(idx): ", block); - - path->p_idx = ix = EXT_FIRST_INDEX(eh); -@@ -359,9 +398,6 @@ - struct ext3_extent *ex; - int l = 0, k, r; - -- EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -- EXT_ASSERT(eh->eh_entries <= eh->eh_max); -- - if (eh->eh_entries == 0) { - /* - * this leaf is empty yet: -@@ -436,6 +472,7 @@ - struct ext3_extent_header *eh; - struct buffer_head *bh; - int depth, i, ppos = 0; -+ int max; - - EXT_ASSERT(tree); - EXT_ASSERT(tree->inode); -@@ -443,17 +480,15 @@ - - eh = EXT_ROOT_HDR(tree); - EXT_ASSERT(eh); -- if (ext3_ext_check_header(eh)) { -+ i = depth = EXT_DEPTH(tree); -+ max = ext3_ext_max_entries(tree, 1, i); -+ if (ext3_ext_check_header(tree->inode, eh, i, max)) { - /* don't free previously allocated path - * -- caller should take care */ - path = NULL; - goto err; - } - -- i = depth = EXT_DEPTH(tree); -- EXT_ASSERT(eh->eh_max); -- EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC); -- - /* account possible depth increase */ - if (!path) { - path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2), -@@ -484,8 +519,10 @@ - path[ppos].p_hdr = eh; - i--; - -- if (ext3_ext_check_header(eh)) -+ max = ext3_ext_max_entries(tree, 0, i); -+ if (ext3_ext_check_header(tree->inode, eh, i, max)) - goto err; -+ - } - - path[ppos].p_depth = i; -@@ -493,9 +530,6 @@ - path[ppos].p_ext = NULL; - path[ppos].p_idx = NULL; - -- if (ext3_ext_check_header(eh)) -- goto err; -- - /* find extent */ - ext3_ext_binsearch(tree, path + ppos, block); - -@@ -1545,6 +1579,8 @@ - ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end); - if (!path[depth].p_hdr) - path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh); -+ -+ /* the header must be checked already in ext3_ext_remove_space() */ - eh = path[depth].p_hdr; - EXT_ASSERT(eh); - EXT_ASSERT(eh->eh_entries <= eh->eh_max); -@@ -1707,7 +1743,7 @@ - int depth = EXT_DEPTH(tree); - struct ext3_ext_path *path; - handle_t *handle; -- int i = 0, err = 0; -+ int i = 0, err = 0, max; - - ext_debug(tree, "space to be removed: %lu:%lu\n", start, end); - -@@ -1730,7 +1766,13 @@ - } - memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1)); - path[i].p_hdr = EXT_ROOT_HDR(tree); -- -+ -+ max = ext3_ext_max_entries(tree, 1, depth); -+ if (ext3_ext_check_header(inode, path[i].p_hdr, depth, max)) { -+ err = -EIO; -+ goto out; -+ } -+ - while (i >= 0 && err == 0) { - if (i == depth) { - /* this is leaf block */ -@@ -1740,16 +1782,13 @@ - i--; - continue; - } -- -+ - /* this is index block */ - if (!path[i].p_hdr) { - ext_debug(tree, "initialize header\n"); - path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh); - } - -- EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max); -- EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC); -- - if (!path[i].p_idx) { - /* this level hasn't touched yet */ - path[i].p_idx = -@@ -1776,6 +1815,14 @@ - err = -EIO; - break; - } -+ BUG_ON(i + 1 > depth); -+ max = ext3_ext_max_entries(tree, 0, depth - i - 1); -+ if (ext3_ext_check_header(inode, -+ EXT_BLOCK_HDR(path[i+1].p_bh), -+ depth - i - 1, max)) { -+ err = -EIO; -+ break; -+ } - /* put actual number of indexes to know is this - * number got changed at the next iteration */ - path[i].p_block = path[i].p_hdr->eh_entries; -@@ -1796,7 +1843,7 @@ - } - - /* TODO: flexible tree reduction should be here */ -- if (path->p_hdr->eh_entries == 0) { -+ if (err == 0 && path->p_hdr->eh_entries == 0) { - /* - * truncate to zero freed all the tree - * so, we need to correct eh_depth -@@ -1810,6 +1857,7 @@ - } - ext3_ext_tree_changed(tree); - -+out: - kfree(path); - ext3_journal_stop(handle); - diff --git a/ldiskfs/kernel_patches/patches/ext3-external-journal-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-external-journal-2.6.12.patch deleted file mode 100644 index bcfdae293f..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-external-journal-2.6.12.patch +++ /dev/null @@ -1,148 +0,0 @@ -Signed-off-by: Johann Lombardi <johann.lombardi@bull.net> - ---- linux-2.6.12.orig/fs/ext3/super.c 2005-06-17 21:48:29.000000000 +0200 -+++ linux-2.6.12/fs/ext3/super.c 2005-11-07 13:37:30.000000000 +0100 -@@ -39,7 +39,8 @@ - #include "xattr.h" - #include "acl.h" - --static int ext3_load_journal(struct super_block *, struct ext3_super_block *); -+static int ext3_load_journal(struct super_block *, struct ext3_super_block *, -+ unsigned long journal_devnum); - static int ext3_create_journal(struct super_block *, struct ext3_super_block *, - int); - static void ext3_commit_super (struct super_block * sb, -@@ -586,7 +587,7 @@ enum { - Opt_nouid32, Opt_check, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov, - Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, - Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, -- Opt_commit, Opt_journal_update, Opt_journal_inum, -+ Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev, - Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, - Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, -@@ -624,6 +625,7 @@ static match_table_t tokens = { - {Opt_commit, "commit=%u"}, - {Opt_journal_update, "journal=update"}, - {Opt_journal_inum, "journal=%u"}, -+ {Opt_journal_dev, "journal_dev=%u"}, - {Opt_abort, "abort"}, - {Opt_data_journal, "data=journal"}, - {Opt_data_ordered, "data=ordered"}, -@@ -663,8 +665,9 @@ static unsigned long get_sb_block(void * - return sb_block; - } - --static int parse_options (char * options, struct super_block *sb, -- unsigned long * inum, unsigned long *n_blocks_count, int is_remount) -+static int parse_options (char *options, struct super_block *sb, -+ unsigned long *inum, unsigned long *journal_devnum, -+ unsigned long *n_blocks_count, int is_remount) - { - struct ext3_sb_info *sbi = EXT3_SB(sb); - char * p; -@@ -805,6 +808,16 @@ static int parse_options (char * options - return 0; - *inum = option; - break; -+ case Opt_journal_dev: -+ if (is_remount) { -+ printk(KERN_ERR "EXT3-fs: cannot specify " -+ "journal on remount\n"); -+ return 0; -+ } -+ if (match_int(&args[0], &option)) -+ return 0; -+ *journal_devnum = option; -+ break; - case Opt_noload: - set_opt (sbi->s_mount_opt, NOLOAD); - break; -@@ -1250,6 +1263,7 @@ static int ext3_fill_super (struct super - unsigned long logic_sb_block; - unsigned long offset = 0; - unsigned long journal_inum = 0; -+ unsigned long journal_devnum = 0; - unsigned long def_mount_opts; - struct inode *root; - int blocksize; -@@ -1330,7 +1344,8 @@ static int ext3_fill_super (struct super - - set_opt(sbi->s_mount_opt, RESERVATION); - -- if (!parse_options ((char *) data, sb, &journal_inum, NULL, 0)) -+ if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum, -+ NULL, 0)) - goto failed_mount; - - sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | -@@ -1541,7 +1556,7 @@ static int ext3_fill_super (struct super - */ - if (!test_opt(sb, NOLOAD) && - EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) { -- if (ext3_load_journal(sb, es)) -+ if (ext3_load_journal(sb, es, journal_devnum)) - goto failed_mount2; - } else if (journal_inum) { - if (ext3_create_journal(sb, es, journal_inum)) -@@ -1821,15 +1836,24 @@ out_bdev: - return NULL; - } - --static int ext3_load_journal(struct super_block * sb, -- struct ext3_super_block * es) -+static int ext3_load_journal(struct super_block *sb, -+ struct ext3_super_block *es, -+ unsigned long journal_devnum) - { - journal_t *journal; - int journal_inum = le32_to_cpu(es->s_journal_inum); -- dev_t journal_dev = new_decode_dev(le32_to_cpu(es->s_journal_dev)); -+ dev_t journal_dev; - int err = 0; - int really_read_only; - -+ if (journal_devnum && -+ journal_devnum != le32_to_cpu(es->s_journal_dev)) { -+ printk(KERN_INFO "EXT3-fs: external journal device major/minor " -+ "numbers have changed\n"); -+ journal_dev = new_decode_dev(journal_devnum); -+ } else -+ journal_dev = new_decode_dev(le32_to_cpu(es->s_journal_dev)); -+ - really_read_only = bdev_read_only(sb->s_bdev); - - /* -@@ -1888,6 +1912,16 @@ static int ext3_load_journal(struct supe - - EXT3_SB(sb)->s_journal = journal; - ext3_clear_journal_err(sb, es); -+ -+ if (journal_devnum && -+ journal_devnum != le32_to_cpu(es->s_journal_dev)) { -+ es->s_journal_dev = cpu_to_le32(journal_devnum); -+ sb->s_dirt = 1; -+ -+ /* Make sure we flush the recovery flag to disk. */ -+ ext3_commit_super(sb, es, 1); -+ } -+ - return 0; - } - -@@ -2093,13 +2127,13 @@ static int ext3_remount (struct super_bl - { - struct ext3_super_block * es; - struct ext3_sb_info *sbi = EXT3_SB(sb); -- unsigned long tmp; -+ unsigned long tmp1, tmp2; - unsigned long n_blocks_count = 0; - - /* - * Allow the "check" option to be passed as a remount option. - */ -- if (!parse_options(data, sb, &tmp, &n_blocks_count, 1)) -+ if (!parse_options(data, sb, &tmp1, &tmp2, &n_blocks_count, 1)) - return -EINVAL; - - if (sbi->s_mount_opt & EXT3_MOUNT_ABORT) diff --git a/ldiskfs/kernel_patches/patches/ext3-filterdata-2.6.15.patch b/ldiskfs/kernel_patches/patches/ext3-filterdata-2.6.15.patch deleted file mode 100644 index e6d431f867..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-filterdata-2.6.15.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: linux-2.6.15/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.15.orig/include/linux/ext3_fs_i.h 2006-02-24 15:41:30.000000000 +0300 -+++ linux-2.6.15/include/linux/ext3_fs_i.h 2006-02-24 15:41:31.000000000 +0300 -@@ -135,6 +135,8 @@ struct ext3_inode_info { - struct inode vfs_inode; - - __u32 i_cached_extent[4]; -+ -+ void *i_filterdata; - }; - - #endif /* _LINUX_EXT3_FS_I */ -Index: linux-2.6.15/fs/ext3/super.c -=================================================================== ---- linux-2.6.15.orig/fs/ext3/super.c 2006-02-24 15:41:30.000000000 +0300 -+++ linux-2.6.15/fs/ext3/super.c 2006-02-24 15:42:02.000000000 +0300 -@@ -459,6 +459,7 @@ static struct inode *ext3_alloc_inode(st - ei->vfs_inode.i_version = 1; - - memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent)); -+ ei->i_filterdata = NULL; - return &ei->vfs_inode; - } - diff --git a/ldiskfs/kernel_patches/patches/ext3-htree-dot-2.6.patch b/ldiskfs/kernel_patches/patches/ext3-htree-dot-2.6.patch deleted file mode 100644 index 919211223c..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-htree-dot-2.6.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/namei.c -=================================================================== ---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891.orig/fs/ext3/namei.c 2005-04-04 05:06:46.000000000 -0600 -+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/namei.c 2005-04-04 05:09:18.000000000 -0600 -@@ -926,8 +926,16 @@ - struct inode *dir = dentry->d_parent->d_inode; - - sb = dir->i_sb; -- if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err))) -- return NULL; -+ /* NFS may look up ".." - look at dx_root directory block */ -+ if (namelen > 2 || name[0] != '.'||(name[1] != '.' && name[1] != '\0')){ -+ if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err))) -+ return NULL; -+ } else { -+ frame = frames; -+ frame->bh = NULL; /* for dx_release() */ -+ frame->at = (struct dx_entry *)frames; /* hack for zero entry*/ -+ dx_set_block(frame->at, 0); /* dx_root block is 0 */ -+ } - hash = hinfo.hash; - do { - block = dx_get_block(frame->at); diff --git a/ldiskfs/kernel_patches/patches/ext3-ialloc-2.6.patch b/ldiskfs/kernel_patches/patches/ext3-ialloc-2.6.patch deleted file mode 100644 index 15d37a91dc..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-ialloc-2.6.patch +++ /dev/null @@ -1,128 +0,0 @@ -Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891.orig/fs/ext3/ialloc.c 2005-05-16 14:10:54.000000000 -0600 -+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/ialloc.c 2005-05-16 14:18:29.000000000 -0600 -@@ -352,13 +352,17 @@ - return -1; - } - --static int find_group_other(struct super_block *sb, struct inode *parent) -+static int find_group_other(struct super_block *sb, struct inode *parent, -+ int mode) - { - int parent_group = EXT3_I(parent)->i_block_group; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); - int ngroups = EXT3_SB(sb)->s_groups_count; - struct ext3_group_desc *desc; - struct buffer_head *bh; - int group, i; -+ int best_group = -1; -+ int avefreeb, freeb, best_group_freeb = 0; - - /* - * Try to place the inode in its parent directory -@@ -366,9 +370,9 @@ - group = parent_group; - desc = ext3_get_group_desc (sb, group, &bh); - if (desc && le16_to_cpu(desc->bg_free_inodes_count) && -- le16_to_cpu(desc->bg_free_blocks_count)) -+ (!S_ISREG(mode) || le16_to_cpu(desc->bg_free_blocks_count))) - return group; -- -+ avefreeb = le32_to_cpu(sbi->s_es->s_free_blocks_count) / ngroups; - /* - * We're going to place this inode in a different blockgroup from its - * parent. We want to cause files in a common directory to all land in -@@ -381,33 +385,47 @@ - group = (group + parent->i_ino) % ngroups; - - /* -- * Use a quadratic hash to find a group with a free inode and some free -- * blocks. -+ * Use a quadratic hash to find a group with a free inode and -+ * average number of free blocks. - */ - for (i = 1; i < ngroups; i <<= 1) { - group += i; - if (group >= ngroups) - group -= ngroups; - desc = ext3_get_group_desc (sb, group, &bh); -- if (desc && le16_to_cpu(desc->bg_free_inodes_count) && -- le16_to_cpu(desc->bg_free_blocks_count)) -+ if (!desc || !desc->bg_free_inodes_count) -+ continue; -+ if (!S_ISREG(mode)) -+ return group; -+ if (le16_to_cpu(desc->bg_free_blocks_count) >= avefreeb) - return group; - } - - /* -- * That failed: try linear search for a free inode, even if that group -- * has no free blocks. -+ * That failed: start from last group used to allocate inode -+ * try linear search for a free inode and prefereably -+ * free blocks. - */ -- group = parent_group; -+ group = sbi->s_last_alloc_group; -+ if (group == -1) -+ group = parent_group; -+ - for (i = 0; i < ngroups; i++) { - if (++group >= ngroups) - group = 0; - desc = ext3_get_group_desc (sb, group, &bh); -- if (desc && le16_to_cpu(desc->bg_free_inodes_count)) -- return group; -+ if (!desc || !desc->bg_free_inodes_count) -+ continue; -+ freeb = le16_to_cpu(desc->bg_free_blocks_count); -+ if (freeb > best_group_freeb) { -+ best_group_freeb = freeb; -+ best_group = group; -+ if (freeb >= avefreeb || !S_ISREG(mode)) -+ break; -+ } - } -- -- return -1; -+ sbi->s_last_alloc_group = best_group; -+ return best_group; - } - - /* -@@ -454,7 +472,7 @@ - else - group = find_group_orlov(sb, dir); - } else -- group = find_group_other(sb, dir); -+ group = find_group_other(sb, dir, mode); - - err = -ENOSPC; - if (group == -1) -Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/super.c -=================================================================== ---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891.orig/fs/ext3/super.c 2005-05-16 14:10:54.000000000 -0600 -+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/super.c 2005-05-16 14:17:14.000000000 -0600 -@@ -1297,6 +1297,7 @@ - percpu_counter_init(&sbi->s_dirs_counter); - bgl_lock_init(&sbi->s_blockgroup_lock); - -+ sbi->s_last_alloc_group = -1; - for (i = 0; i < db_count; i++) { - block = descriptor_loc(sb, logic_sb_block, i); - sbi->s_group_desc[i] = sb_bread(sb, block); -Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891.orig/include/linux/ext3_fs_sb.h 2005-05-16 14:10:54.000000000 -0600 -+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/include/linux/ext3_fs_sb.h 2005-05-16 14:17:14.000000000 -0600 -@@ -59,6 +59,8 @@ - struct percpu_counter s_freeinodes_counter; - struct percpu_counter s_dirs_counter; - struct blockgroup_lock s_blockgroup_lock; -+ /* Last group used to allocate inode */ -+ int s_last_alloc_group; - - /* root of the per fs reservation window tree */ - spinlock_t s_rsv_window_lock; diff --git a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-rhel4.patch deleted file mode 100644 index 52e5521092..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-rhel4.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h 2005-02-25 14:53:56.424908168 +0200 -+++ linux-stage/include/linux/ext3_fs.h 2005-02-25 14:53:59.376459464 +0200 -@@ -361,12 +361,13 @@ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ --#ifndef _LINUX_EXT2_FS_H -+#ifndef clear_opt - #define clear_opt(o, opt) o &= ~EXT3_MOUNT_##opt - #define set_opt(o, opt) o |= EXT3_MOUNT_##opt - #define test_opt(sb, opt) (EXT3_SB(sb)->s_mount_opt & \ - EXT3_MOUNT_##opt) --#else -+#endif -+#ifndef EXT2_MOUNT_NOLOAD - #define EXT2_MOUNT_NOLOAD EXT3_MOUNT_NOLOAD - #define EXT2_MOUNT_ABORT EXT3_MOUNT_ABORT - #define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS diff --git a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch deleted file mode 100644 index 1ac944bf40..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h 2004-04-02 16:43:37.000000000 -0500 -+++ linux-stage/include/linux/ext3_fs.h 2004-04-02 16:43:37.000000000 -0500 -@@ -331,12 +331,13 @@ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ --#ifndef _LINUX_EXT2_FS_H -+#ifndef clear_opt - #define clear_opt(o, opt) o &= ~EXT3_MOUNT_##opt - #define set_opt(o, opt) o |= EXT3_MOUNT_##opt - #define test_opt(sb, opt) (EXT3_SB(sb)->s_mount_opt & \ - EXT3_MOUNT_##opt) --#else -+#endif -+#ifndef EXT2_MOUNT_NOLOAD - #define EXT2_MOUNT_NOLOAD EXT3_MOUNT_NOLOAD - #define EXT2_MOUNT_ABORT EXT3_MOUNT_ABORT - #define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS diff --git a/ldiskfs/kernel_patches/patches/ext3-lookup-dotdot-2.6.9.patch b/ldiskfs/kernel_patches/patches/ext3-lookup-dotdot-2.6.9.patch deleted file mode 100644 index a05256ba58..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-lookup-dotdot-2.6.9.patch +++ /dev/null @@ -1,63 +0,0 @@ -Index: linux-2.6.9-full/fs/ext3/iopen.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/iopen.c 2006-04-25 08:51:11.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/iopen.c 2006-05-06 01:21:11.000000000 +0400 -@@ -94,9 +94,12 @@ static struct dentry *iopen_lookup(struc - assert(!(alternate->d_flags & DCACHE_DISCONNECTED)); - } - -- if (!list_empty(&inode->i_dentry)) { -- alternate = list_entry(inode->i_dentry.next, -- struct dentry, d_alias); -+ list_for_each(lp, &inode->i_dentry) { -+ alternate = list_entry(lp, struct dentry, d_alias); -+ /* ignore dentries created for ".." to preserve -+ * proper dcache hierarchy -- bug 10458 */ -+ if (alternate->d_flags & DCACHE_NFSFS_RENAMED) -+ continue; - dget_locked(alternate); - spin_lock(&alternate->d_lock); - alternate->d_flags |= DCACHE_REFERENCED; -Index: linux-2.6.9-full/fs/ext3/namei.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/namei.c 2006-05-06 01:21:10.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/namei.c 2006-05-06 01:29:30.000000000 +0400 -@@ -1003,6 +1003,38 @@ static struct dentry *ext3_lookup(struct - return ERR_PTR(-EACCES); - } - -+ /* ".." shouldn't go into dcache to preserve dcache hierarchy -+ * otherwise we'll get parent being a child of actual child. -+ * see bug 10458 for details -bzzz */ -+ if (inode && (dentry->d_name.name[0] == '.' && (dentry->d_name.len == 1 || -+ (dentry->d_name.len == 2 && dentry->d_name.name[1] == '.')))) { -+ struct dentry *tmp, *goal = NULL; -+ struct list_head *lp; -+ -+ /* first, look for an existing dentry - any one is good */ -+ spin_lock(&dcache_lock); -+ list_for_each(lp, &inode->i_dentry) { -+ tmp = list_entry(lp, struct dentry, d_alias); -+ goal = tmp; -+ dget_locked(goal); -+ break; -+ } -+ if (goal == NULL) { -+ /* there is no alias, we need to make current dentry: -+ * a) inaccessible for __d_lookup() -+ * b) inaccessible for iopen */ -+ J_ASSERT(list_empty(&dentry->d_alias)); -+ dentry->d_flags |= DCACHE_NFSFS_RENAMED; -+ /* this is d_instantiate() ... */ -+ list_add(&dentry->d_alias, &inode->i_dentry); -+ dentry->d_inode = inode; -+ } -+ spin_unlock(&dcache_lock); -+ if (goal) -+ iput(inode); -+ return goal; -+ } -+ - return iopen_connect_dentry(dentry, inode, 1); - } - diff --git a/ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch deleted file mode 100644 index 2b6bcf1a3b..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch +++ /dev/null @@ -1,86 +0,0 @@ - fs/ext3/inode.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - fs/ext3/super.c | 3 +++ - 2 files changed, 55 insertions(+) - -Index: linux-2.6.0/fs/ext3/inode.c -=================================================================== ---- linux-2.6.0.orig/fs/ext3/inode.c 2003-12-31 00:33:49.000000000 +0300 -+++ linux-2.6.0/fs/ext3/inode.c 2003-12-31 01:14:17.000000000 +0300 -@@ -3136,3 +3136,62 @@ - ret = ret2; - return ret; - } -+ -+int ext3_map_inode_page(struct inode *inode, struct page *page, -+ unsigned long *blocks, int *created, int create) -+{ -+ unsigned int blocksize, blocks_per_page; -+ unsigned long iblock; -+ struct buffer_head dummy; -+ void *handle; -+ int i, rc = 0, failed = 0, needed_blocks; -+ -+ blocksize = inode->i_sb->s_blocksize; -+ blocks_per_page = PAGE_SIZE >> inode->i_sb->s_blocksize_bits; -+ iblock = page->index * blocks_per_page; -+ -+ for (i = 0; i < blocks_per_page; i++, iblock++) { -+ blocks[i] = ext3_bmap(inode->i_mapping, iblock); -+ if (blocks[i] == 0) { -+ failed++; -+ if (created) -+ created[i] = -1; -+ } else if (created) { -+ created[i] = 0; -+ } -+ } -+ -+ if (failed == 0 || create == 0) -+ return 0; -+ -+ needed_blocks = ext3_writepage_trans_blocks(inode); -+ handle = ext3_journal_start(inode, needed_blocks); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ -+ iblock = page->index * blocks_per_page; -+ for (i = 0; i < blocks_per_page; i++, iblock++) { -+ if (blocks[i] != 0) -+ continue; -+ -+ rc = ext3_get_block_handle(handle, inode, iblock, &dummy, 1, 1); -+ if (rc) { -+ printk(KERN_INFO "ext3_map_inode_page: error reading " -+ "block %ld\n", iblock); -+ goto out; -+ } -+ /* Unmap any metadata buffers from the block mapping, to avoid -+ * data corruption due to direct-write from Lustre being -+ * clobbered by a later flush of the blockdev metadata buffer.*/ -+ if (buffer_new(&dummy)) -+ unmap_underlying_metadata(dummy.b_bdev, -+ dummy.b_blocknr); -+ blocks[i] = dummy.b_blocknr; -+ if (created) -+ created[i] = 1; -+ } -+ -+ out: -+ ext3_journal_stop(handle); -+ return rc; -+} -Index: linux-2.6.0/fs/ext3/super.c -=================================================================== ---- linux-2.6.0.orig/fs/ext3/super.c 2003-12-31 00:33:49.000000000 +0300 -+++ linux-2.6.0/fs/ext3/super.c 2003-12-31 01:10:40.000000000 +0300 -@@ -2051,6 +2051,10 @@ - int nblocks, loff_t newsize); - EXPORT_SYMBOL(ext3_prep_san_write); - -+int ext3_map_inode_page(struct inode *inode, struct page *page, -+ unsigned long *blocks, int *created, int create); -+EXPORT_SYMBOL(ext3_map_inode_page); -+ - MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); - MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); - MODULE_LICENSE("GPL"); diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch deleted file mode 100644 index 90a9123f72..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch +++ /dev/null @@ -1,3103 +0,0 @@ -Index: linux-2.6.16.i686/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.16.i686.orig/include/linux/ext3_fs.h 2006-05-30 22:55:32.000000000 +0800 -+++ linux-2.6.16.i686/include/linux/ext3_fs.h 2006-05-30 23:02:59.000000000 +0800 -@@ -57,6 +57,14 @@ - #define ext3_debug(f, a...) do {} while (0) - #endif - -+#define EXT3_MULTIBLOCK_ALLOCATOR 1 -+ -+#define EXT3_MB_HINT_MERGE 1 -+#define EXT3_MB_HINT_RESERVED 2 -+#define EXT3_MB_HINT_METADATA 4 -+#define EXT3_MB_HINT_FIRST 8 -+#define EXT3_MB_HINT_BEST 16 -+ - /* - * Special inodes numbers - */ -@@ -383,6 +391,7 @@ - #define EXT3_MOUNT_IOPEN_NOPRIV 0x800000/* Make iopen world-readable */ - #define EXT3_MOUNT_EXTENTS 0x1000000/* Extents support */ - #define EXT3_MOUNT_EXTDEBUG 0x2000000/* Extents debug */ -+#define EXT3_MOUNT_MBALLOC 0x4000000/* Buddy allocation support */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -404,6 +413,14 @@ - #define ext3_find_first_zero_bit ext2_find_first_zero_bit - #define ext3_find_next_zero_bit ext2_find_next_zero_bit - -+#ifndef ext2_find_next_le_bit -+#ifdef __LITTLE_ENDIAN -+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off)) -+#else -+#error "mballoc needs a patch for big-endian systems - CFS bug 10634" -+#endif /* __LITTLE_ENDIAN */ -+#endif /* !ext2_find_next_le_bit */ -+ - /* - * Maximal mount counts between two filesystem checks - */ -@@ -744,7 +753,9 @@ - extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group); - extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *); - extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long, -- unsigned long); -+ unsigned long, int); -+extern int ext3_new_block_old(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *errp); - extern void ext3_free_blocks_sb (handle_t *, struct super_block *, - unsigned long, unsigned long, int *); - extern unsigned long ext3_count_free_blocks (struct super_block *); -@@ -865,6 +874,17 @@ - extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); - -+/* mballoc.c */ -+extern long ext3_mb_stats; -+extern long ext3_mb_max_to_scan; -+extern int ext3_mb_init(struct super_block *, int); -+extern int ext3_mb_release(struct super_block *); -+extern int ext3_mb_new_blocks(handle_t *, struct inode *, unsigned long, int *, int, int *); -+extern int ext3_mb_reserve_blocks(struct super_block *, int); -+extern void ext3_mb_release_blocks(struct super_block *, int); -+int __init init_ext3_proc(void); -+void exit_ext3_proc(void); -+ - #endif /* __KERNEL__ */ - - /* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */ -Index: linux-2.6.16.i686/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.16.i686.orig/include/linux/ext3_fs_sb.h 2006-03-20 13:53:29.000000000 +0800 -+++ linux-2.6.16.i686/include/linux/ext3_fs_sb.h 2006-05-30 23:02:59.000000000 +0800 -@@ -21,8 +21,14 @@ - #include <linux/wait.h> - #include <linux/blockgroup_lock.h> - #include <linux/percpu_counter.h> -+#include <linux/list.h> - #endif - #include <linux/rbtree.h> -+#include <linux/proc_fs.h> -+ -+struct ext3_buddy_group_blocks; -+struct ext3_mb_history; -+#define EXT3_BB_MAX_BLOCKS - - /* - * third extended-fs super-block data in memory -@@ -78,6 +84,43 @@ - char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */ - int s_jquota_fmt; /* Format of quota to use */ - #endif -+ -+ /* for buddy allocator */ -+ struct ext3_group_info ***s_group_info; -+ struct inode *s_buddy_cache; -+ long s_blocks_reserved; -+ spinlock_t s_reserve_lock; -+ struct list_head s_active_transaction; -+ struct list_head s_closed_transaction; -+ struct list_head s_committed_transaction; -+ spinlock_t s_md_lock; -+ tid_t s_last_transaction; -+ int s_mb_factor; -+ unsigned short *s_mb_offsets, *s_mb_maxs; -+ unsigned long s_stripe; -+ -+ /* history to debug policy */ -+ struct ext3_mb_history *s_mb_history; -+ int s_mb_history_cur; -+ int s_mb_history_max; -+ struct proc_dir_entry *s_mb_proc; -+ spinlock_t s_mb_history_lock; -+ -+ /* stats for buddy allocator */ -+ atomic_t s_bal_reqs; /* number of reqs with len > 1 */ -+ atomic_t s_bal_success; /* we found long enough chunks */ -+ atomic_t s_bal_allocated; /* in blocks */ -+ atomic_t s_bal_ex_scanned; /* total extents scanned */ -+ atomic_t s_bal_goals; /* goal hits */ -+ atomic_t s_bal_breaks; /* too long searches */ -+ atomic_t s_bal_2orders; /* 2^order hits */ -+ spinlock_t s_bal_lock; -+ unsigned long s_mb_buddies_generated; -+ unsigned long long s_mb_generation_time; - }; -+ -+#define EXT3_GROUP_INFO(sb, group) \ -+ EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \ -+ [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)] - - #endif /* _LINUX_EXT3_FS_SB */ -Index: linux-2.6.16.i686/fs/ext3/super.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/super.c 2006-05-30 22:55:32.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/super.c 2006-05-30 23:02:59.000000000 +0800 -@@ -392,6 +392,7 @@ - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_mb_release(sb); - ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); -@@ -640,6 +641,7 @@ - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - Opt_extents, Opt_noextents, Opt_extdebug, -+ Opt_mballoc, Opt_nomballoc, Opt_stripe, - Opt_grpquota - }; - -@@ -694,6 +695,9 @@ - {Opt_extents, "extents"}, - {Opt_noextents, "noextents"}, - {Opt_extdebug, "extdebug"}, -+ {Opt_mballoc, "mballoc"}, -+ {Opt_nomballoc, "nomballoc"}, -+ {Opt_stripe, "stripe=%u"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -1041,6 +1043,19 @@ - case Opt_extdebug: - set_opt (sbi->s_mount_opt, EXTDEBUG); - break; -+ case Opt_mballoc: -+ set_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_nomballoc: -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_stripe: -+ if (match_int(&args[0], &option)) -+ return 0; -+ if (option < 0) -+ return 0; -+ sbi->s_stripe = option; -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1766,6 +1771,7 @@ - ext3_count_dirs(sb)); - - ext3_ext_init(sb); -+ ext3_mb_init(sb, needs_recovery); - lock_kernel(); - return 0; - -@@ -2699,7 +2705,13 @@ - - static int __init init_ext3_fs(void) - { -- int err = init_ext3_xattr(); -+ int err; -+ -+ err = init_ext3_proc(); -+ if (err) -+ return err; -+ -+ err = init_ext3_xattr(); - if (err) - return err; - err = init_inodecache(); -@@ -2721,6 +2733,7 @@ - unregister_filesystem(&ext3_fs_type); - destroy_inodecache(); - exit_ext3_xattr(); -+ exit_ext3_proc(); - } - - int ext3_prep_san_write(struct inode *inode, long *blocks, -Index: linux-2.6.16.i686/fs/ext3/extents.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/extents.c 2006-05-30 22:55:32.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/extents.c 2006-05-30 23:02:59.000000000 +0800 -@@ -771,7 +771,7 @@ - for (i = 0; i < depth; i++) { - if (!ablocks[i]) - continue; -- ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1); - } - } - kfree(ablocks); -@@ -1428,7 +1428,7 @@ - path->p_idx->ei_leaf); - bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); - ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -- ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1); - return err; - } - -@@ -1913,10 +1913,12 @@ - int needed = ext3_remove_blocks_credits(tree, ex, from, to); - handle_t *handle = ext3_journal_start(tree->inode, needed); - struct buffer_head *bh; -- int i; -+ int i, metadata = 0; - - if (IS_ERR(handle)) - return PTR_ERR(handle); -+ if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode)) -+ metadata = 1; - if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { - /* tail removal */ - unsigned long num, start; -@@ -1928,7 +1930,7 @@ - bh = sb_find_get_block(tree->inode->i_sb, start + i); - ext3_forget(handle, 0, tree->inode, bh, start + i); - } -- ext3_free_blocks(handle, tree->inode, start, num); -+ ext3_free_blocks(handle, tree->inode, start, num, metadata); - } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { - printk("strange request: removal %lu-%lu from %u:%u\n", - from, to, ex->ee_block, ex->ee_len); -Index: linux-2.6.16.i686/fs/ext3/inode.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/inode.c 2006-05-30 22:55:32.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/inode.c 2006-05-30 23:02:59.000000000 +0800 -@@ -568,7 +568,7 @@ - ext3_journal_forget(handle, branch[i].bh); - } - for (i = 0; i < keys; i++) -- ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1); -+ ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1, 1); - return err; - } - -@@ -1862,7 +1862,7 @@ - } - } - -- ext3_free_blocks(handle, inode, block_to_free, count); -+ ext3_free_blocks(handle, inode, block_to_free, count, 1); - } - - /** -@@ -2035,7 +2035,7 @@ - ext3_journal_test_restart(handle, inode); - } - -- ext3_free_blocks(handle, inode, nr, 1); -+ ext3_free_blocks(handle, inode, nr, 1, 1); - - if (parent_bh) { - /* -Index: linux-2.6.16.i686/fs/ext3/balloc.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/balloc.c 2006-03-20 13:53:29.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/balloc.c 2006-05-30 23:02:59.000000000 +0800 -@@ -80,7 +80,7 @@ - * - * Return buffer_head on success or NULL in case of failure. - */ --static struct buffer_head * -+struct buffer_head * - read_block_bitmap(struct super_block *sb, unsigned int block_group) - { - struct ext3_group_desc * desc; -@@ -491,24 +491,6 @@ - return; - } - --/* Free given blocks, update quota and i_blocks field */ --void ext3_free_blocks(handle_t *handle, struct inode *inode, -- unsigned long block, unsigned long count) --{ -- struct super_block * sb; -- int dquot_freed_blocks; -- -- sb = inode->i_sb; -- if (!sb) { -- printk ("ext3_free_blocks: nonexistent device"); -- return; -- } -- ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks); -- if (dquot_freed_blocks) -- DQUOT_FREE_BLOCK(inode, dquot_freed_blocks); -- return; --} -- - /* - * For ext3 allocations, we must not reuse any blocks which are - * allocated in the bitmap buffer's "last committed data" copy. This -@@ -1154,7 +1136,7 @@ - * bitmap, and then for any free bit if that fails. - * This function also updates quota and i_blocks field. - */ --int ext3_new_block(handle_t *handle, struct inode *inode, -+int ext3_new_block_old(handle_t *handle, struct inode *inode, - unsigned long goal, int *errp) - { - struct buffer_head *bitmap_bh = NULL; -Index: linux-2.6.16.i686/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/xattr.c 2006-03-20 13:53:29.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/xattr.c 2006-05-30 23:02:59.000000000 +0800 -@@ -484,7 +484,7 @@ - ea_bdebug(bh, "refcount now=0; freeing"); - if (ce) - mb_cache_entry_free(ce); -- ext3_free_blocks(handle, inode, bh->b_blocknr, 1); -+ ext3_free_blocks(handle, inode, bh->b_blocknr, 1, 1); - get_bh(bh); - ext3_forget(handle, 1, inode, bh, bh->b_blocknr); - } else { -@@ -804,7 +804,7 @@ - new_bh = sb_getblk(sb, block); - if (!new_bh) { - getblk_failed: -- ext3_free_blocks(handle, inode, block, 1); -+ ext3_free_blocks(handle, inode, block, 1, 1); - error = -EIO; - goto cleanup; - } -Index: linux-2.6.16.i686/fs/ext3/mballoc.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/mballoc.c 2006-05-31 04:14:15.752410384 +0800 -+++ linux-2.6.16.i686/fs/ext3/mballoc.c 2006-05-30 23:03:38.000000000 +0800 -@@ -0,0 +1,2725 @@ -+/* -+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+ -+/* -+ * mballoc.c contains the multiblocks allocation routines -+ */ -+ -+#include <linux/config.h> -+#include <linux/time.h> -+#include <linux/fs.h> -+#include <linux/namei.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/quotaops.h> -+#include <linux/buffer_head.h> -+#include <linux/module.h> -+#include <linux/swap.h> -+#include <linux/proc_fs.h> -+#include <linux/pagemap.h> -+#include <linux/seq_file.h> -+ -+/* -+ * TODO: -+ * - bitmap read-ahead (proposed by Oleg Drokin aka green) -+ * - track min/max extents in each group for better group selection -+ * - mb_mark_used() may allocate chunk right after splitting buddy -+ * - special flag to advice allocator to look for requested + N blocks -+ * this may improve interaction between extents and mballoc -+ * - tree of groups sorted by number of free blocks -+ * - percpu reservation code (hotpath) -+ * - error handling -+ */ -+ -+/* -+ * with AGRESSIVE_CHECK allocator runs consistency checks over -+ * structures. these checks slow things down a lot -+ */ -+#define AGGRESSIVE_CHECK__ -+ -+/* -+ */ -+#define MB_DEBUG__ -+#ifdef MB_DEBUG -+#define mb_debug(fmt,a...) printk(fmt, ##a) -+#else -+#define mb_debug(fmt,a...) -+#endif -+ -+/* -+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory -+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history -+ */ -+#define EXT3_MB_HISTORY -+ -+/* -+ * How long mballoc can look for a best extent (in found extents) -+ */ -+long ext3_mb_max_to_scan = 500; -+ -+/* -+ * How long mballoc must look for a best extent -+ */ -+long ext3_mb_min_to_scan = 30; -+ -+/* -+ * with 'ext3_mb_stats' allocator will collect stats that will be -+ * shown at umount. The collecting costs though! -+ */ -+ -+long ext3_mb_stats = 1; -+ -+/* -+ * for which requests use 2^N search using buddies -+ */ -+long ext3_mb_order2_reqs = 8; -+ -+#ifdef EXT3_BB_MAX_BLOCKS -+#undef EXT3_BB_MAX_BLOCKS -+#endif -+#define EXT3_BB_MAX_BLOCKS 30 -+ -+struct ext3_free_metadata { -+ unsigned short group; -+ unsigned short num; -+ unsigned short blocks[EXT3_BB_MAX_BLOCKS]; -+ struct list_head list; -+}; -+ -+struct ext3_group_info { -+ unsigned long bb_state; -+ unsigned long bb_tid; -+ struct ext3_free_metadata *bb_md_cur; -+ unsigned short bb_first_free; -+ unsigned short bb_free; -+ unsigned short bb_fragments; -+ unsigned short bb_counters[]; -+}; -+ -+ -+#define EXT3_GROUP_INFO_NEED_INIT_BIT 0 -+#define EXT3_GROUP_INFO_LOCKED_BIT 1 -+ -+#define EXT3_MB_GRP_NEED_INIT(grp) \ -+ (test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state)) -+ -+struct ext3_free_extent { -+ __u16 fe_start; -+ __u16 fe_len; -+ __u16 fe_group; -+}; -+ -+struct ext3_allocation_context { -+ struct super_block *ac_sb; -+ -+ /* search goals */ -+ struct ext3_free_extent ac_g_ex; -+ -+ /* the best found extent */ -+ struct ext3_free_extent ac_b_ex; -+ -+ /* number of iterations done. we have to track to limit searching */ -+ unsigned long ac_ex_scanned; -+ __u16 ac_groups_scanned; -+ __u16 ac_found; -+ __u16 ac_tail; -+ __u16 ac_buddy; -+ __u8 ac_status; -+ __u8 ac_flags; /* allocation hints */ -+ __u8 ac_criteria; -+ __u8 ac_repeats; -+ __u8 ac_2order; /* if request is to allocate 2^N blocks and -+ * N > 0, the field stores N, otherwise 0 */ -+ -+ struct page *ac_buddy_page; -+ struct page *ac_bitmap_page; -+}; -+ -+#define AC_STATUS_CONTINUE 1 -+#define AC_STATUS_FOUND 2 -+#define AC_STATUS_BREAK 3 -+ -+struct ext3_mb_history { -+ struct ext3_free_extent goal; /* goal allocation */ -+ struct ext3_free_extent result; /* result allocation */ -+ unsigned pid; -+ unsigned ino; -+ __u16 found; /* how many extents have been found */ -+ __u16 groups; /* how many groups have been scanned */ -+ __u16 tail; /* what tail broke some buddy */ -+ __u16 buddy; /* buddy the tail ^^^ broke */ -+ __u8 cr; /* which phase the result extent was found at */ -+ __u8 merged; -+}; -+ -+struct ext3_buddy { -+ struct page *bd_buddy_page; -+ void *bd_buddy; -+ struct page *bd_bitmap_page; -+ void *bd_bitmap; -+ struct ext3_group_info *bd_info; -+ struct super_block *bd_sb; -+ __u16 bd_blkbits; -+ __u16 bd_group; -+}; -+#define EXT3_MB_BITMAP(e3b) ((e3b)->bd_bitmap) -+#define EXT3_MB_BUDDY(e3b) ((e3b)->bd_buddy) -+ -+#ifndef EXT3_MB_HISTORY -+#define ext3_mb_store_history(sb,ino,ac) -+#else -+static void ext3_mb_store_history(struct super_block *, unsigned ino, -+ struct ext3_allocation_context *ac); -+#endif -+ -+#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -+ -+static struct proc_dir_entry *proc_root_ext3; -+ -+struct buffer_head *read_block_bitmap(struct super_block *, unsigned int); -+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *); -+void ext3_mb_free_committed_blocks(struct super_block *); -+ -+#if BITS_PER_LONG == 64 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 7UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~7UL); \ -+} -+#elif BITS_PER_LONG == 32 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 3UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~3UL); \ -+} -+#else -+#error "how many bits you are?!" -+#endif -+ -+static inline int mb_test_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ return ext2_test_bit(bit, addr); -+} -+ -+static inline void mb_set_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit(bit, addr); -+} -+ -+static inline void mb_set_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit_atomic(NULL, bit, addr); -+} -+ -+static inline void mb_clear_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit(bit, addr); -+} -+ -+static inline void mb_clear_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit_atomic(NULL, bit, addr); -+} -+ -+static inline int mb_find_next_zero_bit(void *addr, int max, int start) -+{ -+ int fix; -+#if BITS_PER_LONG == 64 -+ fix = ((unsigned long) addr & 7UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~7UL); -+#elif BITS_PER_LONG == 32 -+ fix = ((unsigned long) addr & 3UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~3UL); -+#else -+#error "how many bits you are?!" -+#endif -+ max += fix; -+ start += fix; -+ return ext2_find_next_zero_bit(addr, max, start) - fix; -+} -+ -+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max) -+{ -+ char *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(max != NULL); -+ -+ if (order > e3b->bd_blkbits + 1) { -+ *max = 0; -+ return NULL; -+ } -+ -+ /* at order 0 we see each particular block */ -+ *max = 1 << (e3b->bd_blkbits + 3); -+ if (order == 0) -+ return EXT3_MB_BITMAP(e3b); -+ -+ bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order]; -+ *max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order]; -+ -+ return bb; -+} -+ -+#ifdef AGGRESSIVE_CHECK -+ -+static void mb_check_buddy(struct ext3_buddy *e3b) -+{ -+ int order = e3b->bd_blkbits + 1; -+ int max, max2, i, j, k, count; -+ int fragments = 0, fstart; -+ void *buddy, *buddy2; -+ -+ if (!test_opt(e3b->bd_sb, MBALLOC)) -+ return; -+ -+ { -+ static int mb_check_counter = 0; -+ if (mb_check_counter++ % 300 != 0) -+ return; -+ } -+ -+ while (order > 1) { -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ buddy2 = mb_find_buddy(e3b, order - 1, &max2); -+ J_ASSERT(buddy2); -+ J_ASSERT(buddy != buddy2); -+ J_ASSERT(max * 2 == max2); -+ -+ count = 0; -+ for (i = 0; i < max; i++) { -+ -+ if (mb_test_bit(i, buddy)) { -+ /* only single bit in buddy2 may be 1 */ -+ if (!mb_test_bit(i << 1, buddy2)) -+ J_ASSERT(mb_test_bit((i<<1)+1, buddy2)); -+ else if (!mb_test_bit((i << 1) + 1, buddy2)) -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ continue; -+ } -+ -+ /* both bits in buddy2 must be 0 */ -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ J_ASSERT(mb_test_bit((i << 1) + 1, buddy2)); -+ -+ for (j = 0; j < (1 << order); j++) { -+ k = (i * (1 << order)) + j; -+ J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b))); -+ } -+ count++; -+ } -+ J_ASSERT(e3b->bd_info->bb_counters[order] == count); -+ order--; -+ } -+ -+ fstart = -1; -+ buddy = mb_find_buddy(e3b, 0, &max); -+ for (i = 0; i < max; i++) { -+ if (!mb_test_bit(i, buddy)) { -+ J_ASSERT(i >= e3b->bd_info->bb_first_free); -+ if (fstart == -1) { -+ fragments++; -+ fstart = i; -+ } -+ continue; -+ } -+ fstart = -1; -+ /* check used bits only */ -+ for (j = 0; j < e3b->bd_blkbits + 1; j++) { -+ buddy2 = mb_find_buddy(e3b, j, &max2); -+ k = i >> j; -+ J_ASSERT(k < max2); -+ J_ASSERT(mb_test_bit(k, buddy2)); -+ } -+ } -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info)); -+ J_ASSERT(e3b->bd_info->bb_fragments == fragments); -+} -+ -+#else -+#define mb_check_buddy(e3b) -+#endif -+ -+/* find most significant bit */ -+static int inline fmsb(unsigned short word) -+{ -+ int order; -+ -+ if (word > 255) { -+ order = 7; -+ word >>= 8; -+ } else { -+ order = -1; -+ } -+ -+ do { -+ order++; -+ word >>= 1; -+ } while (word != 0); -+ -+ return order; -+} -+ -+static void inline -+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first, -+ int len, struct ext3_group_info *grp) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ unsigned short min, max, chunk, border; -+ -+ mb_debug("mark %u/%u free\n", first, len); -+ J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ border = 2 << sb->s_blocksize_bits; -+ -+ while (len > 0) { -+ /* find how many blocks can be covered since this position */ -+ max = ffs(first | border) - 1; -+ -+ /* find how many blocks of power 2 we need to mark */ -+ min = fmsb(len); -+ -+ mb_debug(" %u/%u -> max %u, min %u\n", -+ first & ((2 << sb->s_blocksize_bits) - 1), -+ len, max, min); -+ -+ if (max < min) -+ min = max; -+ chunk = 1 << min; -+ -+ /* mark multiblock chunks only */ -+ grp->bb_counters[min]++; -+ if (min > 0) { -+ mb_debug(" set %u at %u \n", first >> min, -+ sbi->s_mb_offsets[min]); -+ mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]); -+ } -+ -+ len -= chunk; -+ first += chunk; -+ } -+} -+ -+static void -+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap, -+ int group) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group); -+ unsigned short max = EXT3_BLOCKS_PER_GROUP(sb); -+ unsigned short i = 0, first, len; -+ unsigned free = 0, fragments = 0; -+ unsigned long long period = get_cycles(); -+ -+ i = mb_find_next_zero_bit(bitmap, max, 0); -+ grp->bb_first_free = i; -+ while (i < max) { -+ fragments++; -+ first = i; -+ i = ext2_find_next_le_bit(bitmap, max, i); -+ len = i - first; -+ free += len; -+ if (len > 1) -+ ext3_mb_mark_free_simple(sb, buddy, first, len, grp); -+ else -+ grp->bb_counters[0]++; -+ if (i < max) -+ i = mb_find_next_zero_bit(bitmap, max, i); -+ } -+ grp->bb_fragments = fragments; -+ -+ /* bb_state shouldn't being modified because all -+ * others waits for init completion on page lock */ -+ clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state); -+ if (free != grp->bb_free) { -+ printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n", -+ group, free, grp->bb_free); -+ grp->bb_free = free; -+ } -+ -+ period = get_cycles() - period; -+ spin_lock(&EXT3_SB(sb)->s_bal_lock); -+ EXT3_SB(sb)->s_mb_buddies_generated++; -+ EXT3_SB(sb)->s_mb_generation_time += period; -+ spin_unlock(&EXT3_SB(sb)->s_bal_lock); -+} -+ -+static int ext3_mb_init_cache(struct page *page) -+{ -+ int blocksize, blocks_per_page, groups_per_page; -+ int err = 0, i, first_group, first_block; -+ struct super_block *sb; -+ struct buffer_head *bhs; -+ struct buffer_head **bh; -+ struct inode *inode; -+ char *data, *bitmap; -+ -+ mb_debug("init page %lu\n", page->index); -+ -+ inode = page->mapping->host; -+ sb = inode->i_sb; -+ blocksize = 1 << inode->i_blkbits; -+ blocks_per_page = PAGE_CACHE_SIZE / blocksize; -+ -+ groups_per_page = blocks_per_page >> 1; -+ if (groups_per_page == 0) -+ groups_per_page = 1; -+ -+ /* allocate buffer_heads to read bitmaps */ -+ if (groups_per_page > 1) { -+ err = -ENOMEM; -+ i = sizeof(struct buffer_head *) * groups_per_page; -+ bh = kmalloc(i, GFP_NOFS); -+ if (bh == NULL) -+ goto out; -+ memset(bh, 0, i); -+ } else -+ bh = &bhs; -+ -+ first_group = page->index * blocks_per_page / 2; -+ -+ /* read all groups the page covers into the cache */ -+ for (i = 0; i < groups_per_page; i++) { -+ struct ext3_group_desc * desc; -+ -+ if (first_group + i >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ err = -EIO; -+ desc = ext3_get_group_desc(sb, first_group + i, NULL); -+ if (desc == NULL) -+ goto out; -+ -+ err = -ENOMEM; -+ bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ if (bh[i] == NULL) -+ goto out; -+ -+ if (buffer_uptodate(bh[i])) -+ continue; -+ -+ lock_buffer(bh[i]); -+ if (buffer_uptodate(bh[i])) { -+ unlock_buffer(bh[i]); -+ continue; -+ } -+ -+ get_bh(bh[i]); -+ bh[i]->b_end_io = end_buffer_read_sync; -+ submit_bh(READ, bh[i]); -+ mb_debug("read bitmap for group %u\n", first_group + i); -+ } -+ -+ /* wait for I/O completion */ -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ wait_on_buffer(bh[i]); -+ -+ err = -EIO; -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ if (!buffer_uptodate(bh[i])) -+ goto out; -+ -+ first_block = page->index * blocks_per_page; -+ for (i = 0; i < blocks_per_page; i++) { -+ int group; -+ -+ group = (first_block + i) >> 1; -+ if (group >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ data = page_address(page) + (i * blocksize); -+ bitmap = bh[group - first_group]->b_data; -+ -+ if ((first_block + i) & 1) { -+ /* this is block of buddy */ -+ mb_debug("put buddy for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memset(data, 0xff, blocksize); -+ EXT3_GROUP_INFO(sb, group)->bb_fragments = 0; -+ memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0, -+ sizeof(unsigned short)*(sb->s_blocksize_bits+2)); -+ ext3_mb_generate_buddy(sb, data, bitmap, group); -+ } else { -+ /* this is block of bitmap */ -+ mb_debug("put bitmap for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memcpy(data, bitmap, blocksize); -+ } -+ } -+ SetPageUptodate(page); -+ -+out: -+ if (bh) { -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ brelse(bh[i]); -+ if (bh != &bhs) -+ kfree(bh); -+ } -+ return err; -+} -+ -+static int ext3_mb_load_buddy(struct super_block *sb, int group, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *inode = sbi->s_buddy_cache; -+ int blocks_per_page, block, pnum, poff; -+ struct page *page; -+ -+ mb_debug("load group %u\n", group); -+ -+ blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize; -+ -+ e3b->bd_blkbits = sb->s_blocksize_bits; -+ e3b->bd_info = EXT3_GROUP_INFO(sb, group); -+ e3b->bd_sb = sb; -+ e3b->bd_group = group; -+ e3b->bd_buddy_page = NULL; -+ e3b->bd_bitmap_page = NULL; -+ -+ block = group * 2; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ /* we could use find_or_create_page(), but it locks page -+ * what we'd like to avoid in fast path ... */ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_bitmap_page = page; -+ e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ block++; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_buddy_page = page; -+ e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ return 0; -+ -+err: -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+ e3b->bd_buddy = NULL; -+ e3b->bd_bitmap = NULL; -+ return -EIO; -+} -+ -+static void ext3_mb_release_desc(struct ext3_buddy *e3b) -+{ -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+} -+ -+ -+static inline void -+ext3_lock_group(struct super_block *sb, int group) -+{ -+ bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static inline void -+ext3_unlock_group(struct super_block *sb, int group) -+{ -+ bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block) -+{ -+ int order = 1; -+ void *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(block < (1 << (e3b->bd_blkbits + 3))); -+ -+ bb = EXT3_MB_BUDDY(e3b); -+ while (order <= e3b->bd_blkbits + 1) { -+ block = block >> 1; -+ if (!mb_test_bit(block, bb)) { -+ /* this block is part of buddy of order 'order' */ -+ return order; -+ } -+ bb += 1 << (e3b->bd_blkbits - order); -+ order++; -+ } -+ return 0; -+} -+ -+static inline void mb_clear_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0; -+ cur += 32; -+ continue; -+ } -+ mb_clear_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static inline void mb_set_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0xffffffff; -+ cur += 32; -+ continue; -+ } -+ mb_set_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count) -+{ -+ int block = 0, max = 0, order; -+ void *buddy, *buddy2; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free += count; -+ if (first < e3b->bd_info->bb_first_free) -+ e3b->bd_info->bb_first_free = first; -+ -+ /* let's maintain fragments counter */ -+ if (first != 0) -+ block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b)); -+ if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b)); -+ if (block && max) -+ e3b->bd_info->bb_fragments--; -+ else if (!block && !max) -+ e3b->bd_info->bb_fragments++; -+ -+ /* let's maintain buddy itself */ -+ while (count-- > 0) { -+ block = first++; -+ order = 0; -+ -+ J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b))); -+ mb_clear_bit(block, EXT3_MB_BITMAP(e3b)); -+ e3b->bd_info->bb_counters[order]++; -+ -+ /* start of the buddy */ -+ buddy = mb_find_buddy(e3b, order, &max); -+ -+ do { -+ block &= ~1UL; -+ if (mb_test_bit(block, buddy) || -+ mb_test_bit(block + 1, buddy)) -+ break; -+ -+ /* both the buddies are free, try to coalesce them */ -+ buddy2 = mb_find_buddy(e3b, order + 1, &max); -+ -+ if (!buddy2) -+ break; -+ -+ if (order > 0) { -+ /* for special purposes, we don't set -+ * free bits in bitmap */ -+ mb_set_bit(block, buddy); -+ mb_set_bit(block + 1, buddy); -+ } -+ e3b->bd_info->bb_counters[order]--; -+ e3b->bd_info->bb_counters[order]--; -+ -+ block = block >> 1; -+ order++; -+ e3b->bd_info->bb_counters[order]++; -+ -+ mb_clear_bit(block, buddy2); -+ buddy = buddy2; -+ } while (1); -+ } -+ mb_check_buddy(e3b); -+ -+ return 0; -+} -+ -+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block, -+ int needed, struct ext3_free_extent *ex) -+{ -+ int next = block, max, ord; -+ void *buddy; -+ -+ J_ASSERT(ex != NULL); -+ -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ J_ASSERT(block < max); -+ if (mb_test_bit(block, buddy)) { -+ ex->fe_len = 0; -+ ex->fe_start = 0; -+ ex->fe_group = 0; -+ return 0; -+ } -+ -+ if (likely(order == 0)) { -+ /* find actual order */ -+ order = mb_find_order_for_block(e3b, block); -+ block = block >> order; -+ } -+ -+ ex->fe_len = 1 << order; -+ ex->fe_start = block << order; -+ ex->fe_group = e3b->bd_group; -+ -+ /* calc difference from given start */ -+ next = next - ex->fe_start; -+ ex->fe_len -= next; -+ ex->fe_start += next; -+ -+ while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) { -+ -+ if (block + 1 >= max) -+ break; -+ -+ next = (block + 1) * (1 << order); -+ if (mb_test_bit(next, EXT3_MB_BITMAP(e3b))) -+ break; -+ -+ ord = mb_find_order_for_block(e3b, next); -+ -+ order = ord; -+ block = next >> order; -+ ex->fe_len += 1 << order; -+ } -+ -+ J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3))); -+ return ex->fe_len; -+} -+ -+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex) -+{ -+ int ord, mlen = 0, max = 0, cur; -+ int start = ex->fe_start; -+ int len = ex->fe_len; -+ unsigned ret = 0; -+ int len0 = len; -+ void *buddy; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free -= len; -+ if (e3b->bd_info->bb_first_free == start) -+ e3b->bd_info->bb_first_free += len; -+ -+ /* let's maintain fragments counter */ -+ if (start != 0) -+ mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b)); -+ if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b)); -+ if (mlen && max) -+ e3b->bd_info->bb_fragments++; -+ else if (!mlen && !max) -+ e3b->bd_info->bb_fragments--; -+ -+ /* let's maintain buddy itself */ -+ while (len) { -+ ord = mb_find_order_for_block(e3b, start); -+ -+ if (((start >> ord) << ord) == start && len >= (1 << ord)) { -+ /* the whole chunk may be allocated at once! */ -+ mlen = 1 << ord; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ J_ASSERT((start >> ord) < max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ start += mlen; -+ len -= mlen; -+ J_ASSERT(len >= 0); -+ continue; -+ } -+ -+ /* store for history */ -+ if (ret == 0) -+ ret = len | (ord << 16); -+ -+ /* we have to split large buddy */ -+ J_ASSERT(ord > 0); -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ -+ ord--; -+ cur = (start >> ord) & ~1U; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_clear_bit(cur, buddy); -+ mb_clear_bit(cur + 1, buddy); -+ e3b->bd_info->bb_counters[ord]++; -+ e3b->bd_info->bb_counters[ord]++; -+ } -+ -+ /* now drop all the bits in bitmap */ -+ mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0); -+ -+ mb_check_buddy(e3b); -+ -+ return ret; -+} -+ -+/* -+ * Must be called under group lock! -+ */ -+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ unsigned long ret; -+ -+ ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len); -+ ret = mb_mark_used(e3b, &ac->ac_b_ex); -+ -+ ac->ac_status = AC_STATUS_FOUND; -+ ac->ac_tail = ret & 0xffff; -+ ac->ac_buddy = ret >> 16; -+ -+ /* hold in-core structures until allocated -+ * blocks are marked non-free in on-disk bitmap */ -+ ac->ac_buddy_page = e3b->bd_buddy_page; -+ page_cache_get(e3b->bd_buddy_page); -+ ac->ac_bitmap_page = e3b->bd_bitmap_page; -+ page_cache_get(e3b->bd_bitmap_page); -+} -+ -+/* -+ * The routine checks whether found extent is good enough. If it is, -+ * then the extent gets marked used and flag is set to the context -+ * to stop scanning. Otherwise, the extent is compared with the -+ * previous found extent and if new one is better, then it's stored -+ * in the context. Later, the best found extent will be used, if -+ * mballoc can't find good enough extent. -+ * -+ * FIXME: real allocation policy is to be designed yet! -+ */ -+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac, -+ struct ext3_free_extent *ex, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent *bex = &ac->ac_b_ex; -+ struct ext3_free_extent *gex = &ac->ac_g_ex; -+ -+ J_ASSERT(ex->fe_len > 0); -+ J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ -+ ac->ac_found++; -+ -+ /* -+ * The special case - take what you catch first -+ */ -+ if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * Let's check whether the chunk is good enough -+ */ -+ if (ex->fe_len == gex->fe_len) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * If this is first found extent, just store it in the context -+ */ -+ if (bex->fe_len == 0) { -+ *bex = *ex; -+ return; -+ } -+ -+ /* -+ * If new found extent is better, store it in the context -+ */ -+ if (bex->fe_len < gex->fe_len) { -+ /* if the request isn't satisfied, any found extent -+ * larger than previous best one is better */ -+ if (ex->fe_len > bex->fe_len) -+ *bex = *ex; -+ } else if (ex->fe_len > gex->fe_len) { -+ /* if the request is satisfied, then we try to find -+ * an extent that still satisfy the request, but is -+ * smaller than previous one */ -+ *bex = *ex; -+ } -+ -+ /* -+ * Let's scan at least few extents and don't pick up a first one -+ */ -+ if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+ -+ /* -+ * We don't want to scan for a whole year -+ */ -+ if (ac->ac_found > ext3_mb_max_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+} -+ -+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent ex = ac->ac_b_ex; -+ int group = ex.fe_group, max, err; -+ -+ J_ASSERT(ex.fe_len > 0); -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex); -+ -+ if (max > 0) { -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ int group = ac->ac_g_ex.fe_group, max, err; -+ struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb); -+ struct ext3_super_block *es = sbi->s_es; -+ struct ext3_free_extent ex; -+ -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start, -+ ac->ac_g_ex.fe_len, &ex); -+ -+ if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) { -+ unsigned long start; -+ start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) + -+ ex.fe_start + le32_to_cpu(es->s_first_data_block)); -+ if (start % sbi->s_stripe == 0) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ } else if (max >= ac->ac_g_ex.fe_len) { -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) { -+ /* Sometimes, caller may want to merge even small -+ * number of blocks to an existing extent */ -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+/* -+ * The routine scans buddy structures (not bitmap!) from given order -+ * to max order and tries to find big enough chunk to satisfy the req -+ */ -+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_group_info *grp = e3b->bd_info; -+ void *buddy; -+ int i, k, max; -+ -+ J_ASSERT(ac->ac_2order > 0); -+ for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) { -+ if (grp->bb_counters[i] == 0) -+ continue; -+ -+ buddy = mb_find_buddy(e3b, i, &max); -+ if (buddy == NULL) { -+ printk(KERN_ALERT "looking for wrong order?\n"); -+ break; -+ } -+ -+ k = mb_find_next_zero_bit(buddy, max, 0); -+ J_ASSERT(k < max); -+ -+ ac->ac_found++; -+ -+ ac->ac_b_ex.fe_len = 1 << i; -+ ac->ac_b_ex.fe_start = k << i; -+ ac->ac_b_ex.fe_group = e3b->bd_group; -+ -+ ext3_mb_use_best_found(ac, e3b); -+ J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len); -+ -+ if (unlikely(ext3_mb_stats)) -+ atomic_inc(&EXT3_SB(sb)->s_bal_2orders); -+ -+ break; -+ } -+} -+ -+/* -+ * The routine scans the group and measures all found extents. -+ * In order to optimize scanning, caller must pass number of -+ * free blocks in the group, so the routine can know upper limit. -+ */ -+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ int i, free; -+ -+ free = e3b->bd_info->bb_free; -+ J_ASSERT(free > 0); -+ -+ i = e3b->bd_info->bb_first_free; -+ -+ while (free && ac->ac_status == AC_STATUS_CONTINUE) { -+ i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i); -+ if (i >= sb->s_blocksize * 8) { -+ J_ASSERT(free == 0); -+ break; -+ } -+ -+ mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex); -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(free >= ex.fe_len); -+ -+ ext3_mb_measure_extent(ac, &ex, e3b); -+ -+ i += ex.fe_len; -+ free -= ex.fe_len; -+ } -+} -+ -+/* -+ * This is a special case for storages like raid5 -+ * we try to find stripe-aligned chunks for stripe-size requests -+ */ -+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ unsigned long i, max; -+ -+ J_ASSERT(sbi->s_stripe != 0); -+ -+ /* find first stripe-aligned block */ -+ i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + le32_to_cpu(sbi->s_es->s_first_data_block); -+ i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe; -+ i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) -+ % EXT3_BLOCKS_PER_GROUP(sb); -+ -+ while (i < sb->s_blocksize * 8) { -+ if (!mb_test_bit(i, bitmap)) { -+ max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex); -+ if (max >= sbi->s_stripe) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ break; -+ } -+ } -+ i += sbi->s_stripe; -+ } -+} -+ -+static int ext3_mb_good_group(struct ext3_allocation_context *ac, -+ int group, int cr) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group); -+ unsigned free, fragments, i, bits; -+ -+ J_ASSERT(cr >= 0 && cr < 4); -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp)); -+ -+ free = grp->bb_free; -+ fragments = grp->bb_fragments; -+ if (free == 0) -+ return 0; -+ if (fragments == 0) -+ return 0; -+ -+ switch (cr) { -+ case 0: -+ J_ASSERT(ac->ac_2order != 0); -+ bits = ac->ac_sb->s_blocksize_bits + 1; -+ for (i = ac->ac_2order; i <= bits; i++) -+ if (grp->bb_counters[i] > 0) -+ return 1; -+ break; -+ case 1: -+ if ((free / fragments) >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 2: -+ if (free >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 3: -+ return 1; -+ default: -+ BUG(); -+ } -+ -+ return 0; -+} -+ -+int ext3_mb_new_blocks(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *len, int flags, int *errp) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_allocation_context ac; -+ int i, group, block, cr, err = 0; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ struct buffer_head *gdp_bh; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ -+ J_ASSERT(len != NULL); -+ J_ASSERT(*len > 0); -+ -+ sb = inode->i_sb; -+ if (!sb) { -+ printk("ext3_mb_new_nblocks: nonexistent device"); -+ return 0; -+ } -+ -+ if (!test_opt(sb, MBALLOC)) { -+ static int ext3_mballoc_warning = 0; -+ if (ext3_mballoc_warning == 0) { -+ printk(KERN_ERR "EXT3-fs: multiblock request with " -+ "mballoc disabled!\n"); -+ ext3_mballoc_warning++; -+ } -+ *len = 1; -+ err = ext3_new_block_old(handle, inode, goal, errp); -+ return err; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ -+ /* -+ * We can't allocate > group size -+ */ -+ if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10) -+ *len = EXT3_BLOCKS_PER_GROUP(sb) - 10; -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* someone asks for non-reserved blocks */ -+ BUG_ON(*len > 1); -+ err = ext3_mb_reserve_blocks(sb, 1); -+ if (err) { -+ *errp = err; -+ return 0; -+ } -+ } -+ -+ ac.ac_buddy_page = NULL; -+ ac.ac_bitmap_page = NULL; -+ -+ /* -+ * Check quota for allocation of this blocks. -+ */ -+ while (*len && DQUOT_ALLOC_BLOCK(inode, *len)) -+ *len -= 1; -+ if (*len == 0) { -+ *errp = -EDQUOT; -+ block = 0; -+ goto out; -+ } -+ -+ /* start searching from the goal */ -+ if (goal < le32_to_cpu(es->s_first_data_block) || -+ goal >= le32_to_cpu(es->s_blocks_count)) -+ goal = le32_to_cpu(es->s_first_data_block); -+ group = (goal - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ block = ((goal - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ /* set up allocation goals */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_groups_scanned = 0; -+ ac.ac_ex_scanned = 0; -+ ac.ac_found = 0; -+ ac.ac_sb = inode->i_sb; -+ ac.ac_g_ex.fe_group = group; -+ ac.ac_g_ex.fe_start = block; -+ ac.ac_g_ex.fe_len = *len; -+ ac.ac_flags = flags; -+ ac.ac_2order = 0; -+ ac.ac_criteria = 0; -+ -+ if (*len == 1 && sbi->s_stripe) { -+ /* looks like a metadata, let's use a dirty hack for raid5 -+ * move all metadata in first groups in hope to hit cached -+ * sectors and thus avoid read-modify cycles in raid5 */ -+ ac.ac_g_ex.fe_group = group = 0; -+ } -+ -+ /* probably, the request is for 2^8+ blocks (1/2/3/... MB) */ -+ i = ffs(*len); -+ if (i >= ext3_mb_order2_reqs) { -+ i--; -+ if ((*len & (~(1 << i))) == 0) -+ ac.ac_2order = i; -+ } -+ -+ /* first, try the goal */ -+ err = ext3_mb_find_by_goal(&ac, &e3b); -+ if (err) -+ goto out_err; -+ if (ac.ac_status == AC_STATUS_FOUND) -+ goto found; -+ -+ /* Let's just scan groups to find more-less suitable blocks */ -+ cr = ac.ac_2order ? 0 : 1; -+repeat: -+ for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) { -+ ac.ac_criteria = cr; -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) { -+ if (group == EXT3_SB(sb)->s_groups_count) -+ group = 0; -+ -+ if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) { -+ /* we need full data about the group -+ * to make a good selection */ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ ext3_mb_release_desc(&e3b); -+ } -+ -+ /* check is group good for our criteries */ -+ if (!ext3_mb_good_group(&ac, group, cr)) -+ continue; -+ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ -+ ext3_lock_group(sb, group); -+ if (!ext3_mb_good_group(&ac, group, cr)) { -+ /* someone did allocation from this group */ -+ ext3_unlock_group(sb, group); -+ ext3_mb_release_desc(&e3b); -+ continue; -+ } -+ -+ ac.ac_groups_scanned++; -+ if (cr == 0) -+ ext3_mb_simple_scan_group(&ac, &e3b); -+ else if (cr == 1 && *len == sbi->s_stripe) -+ ext3_mb_scan_aligned(&ac, &e3b); -+ else -+ ext3_mb_complex_scan_group(&ac, &e3b); -+ -+ ext3_unlock_group(sb, group); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ if (ac.ac_status != AC_STATUS_CONTINUE) -+ break; -+ } -+ } -+ -+ if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND && -+ !(ac.ac_flags & EXT3_MB_HINT_FIRST)) { -+ /* -+ * We've been searching too long. Let's try to allocate -+ * the best chunk we've found so far -+ */ -+ -+ /*if (ac.ac_found > ext3_mb_max_to_scan) -+ printk(KERN_DEBUG "EXT3-fs: too long searching at " -+ "%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len, -+ ac.ac_g_ex.fe_len);*/ -+ ext3_mb_try_best_found(&ac, &e3b); -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * Someone more lucky has already allocated it. -+ * The only thing we can do is just take first -+ * found block(s) -+ printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n"); -+ */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_flags |= EXT3_MB_HINT_FIRST; -+ cr = 3; -+ goto repeat; -+ } -+ } -+ -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * We aren't lucky definitely -+ */ -+ DQUOT_FREE_BLOCK(inode, *len); -+ *errp = -ENOSPC; -+ block = 0; -+#if 1 -+ printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n", -+ ac.ac_status, ac.ac_flags); -+ printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n", -+ ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group, -+ ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr); -+ printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n", -+ sbi->s_blocks_reserved, ac.ac_found); -+ printk("EXT3-fs: groups: "); -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) -+ printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free); -+ printk("\n"); -+#endif -+ goto out; -+ } -+ -+found: -+ J_ASSERT(ac.ac_b_ex.fe_len > 0); -+ -+ /* good news - free block(s) have been found. now it's time -+ * to mark block(s) in good old journaled bitmap */ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ /* we made a desicion, now mark found blocks in good old -+ * bitmap to be journaled */ -+ -+ ext3_debug("using block group %d(%d)\n", -+ ac.ac_b_group.group, gdp->bg_free_blocks_count); -+ -+ bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group); -+ if (!bitmap_bh) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) { -+ *errp = err; -+ goto out_err; -+ } -+ -+ gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh); -+ if (!gdp) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ if (block == le32_to_cpu(gdp->bg_block_bitmap) || -+ block == le32_to_cpu(gdp->bg_inode_bitmap) || -+ in_range(block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error(sb, "ext3_new_block", -+ "Allocating block in system zone - " -+ "block = %u", block); -+#ifdef AGGRESSIVE_CHECK -+ for (i = 0; i < ac.ac_b_ex.fe_len; i++) -+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data)); -+#endif -+ mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len); -+ -+ spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) -+ - ac.ac_b_ex.fe_len); -+ spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len); -+ -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ if (err) -+ goto out_err; -+ err = ext3_journal_dirty_metadata(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ sb->s_dirt = 1; -+ *errp = 0; -+ brelse(bitmap_bh); -+ -+ /* drop non-allocated, but dquote'd blocks */ -+ J_ASSERT(*len >= ac.ac_b_ex.fe_len); -+ DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len); -+ -+ *len = ac.ac_b_ex.fe_len; -+ J_ASSERT(*len > 0); -+ J_ASSERT(block != 0); -+ goto out; -+ -+out_err: -+ /* if we've already allocated something, roll it back */ -+ if (ac.ac_status == AC_STATUS_FOUND) { -+ /* FIXME: free blocks here */ -+ } -+ -+ DQUOT_FREE_BLOCK(inode, *len); -+ brelse(bitmap_bh); -+ *errp = err; -+ block = 0; -+out: -+ if (ac.ac_buddy_page) -+ page_cache_release(ac.ac_buddy_page); -+ if (ac.ac_bitmap_page) -+ page_cache_release(ac.ac_bitmap_page); -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* block wasn't reserved before and we reserved it -+ * at the beginning of allocation. it doesn't matter -+ * whether we allocated anything or we failed: time -+ * to release reservation. NOTE: because I expect -+ * any multiblock request from delayed allocation -+ * path only, here is single block always */ -+ ext3_mb_release_blocks(sb, 1); -+ } -+ -+ if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) { -+ atomic_inc(&sbi->s_bal_reqs); -+ atomic_add(*len, &sbi->s_bal_allocated); -+ if (*len >= ac.ac_g_ex.fe_len) -+ atomic_inc(&sbi->s_bal_success); -+ atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned); -+ if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start && -+ ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group) -+ atomic_inc(&sbi->s_bal_goals); -+ if (ac.ac_found > ext3_mb_max_to_scan) -+ atomic_inc(&sbi->s_bal_breaks); -+ } -+ -+ ext3_mb_store_history(sb, inode->i_ino, &ac); -+ -+ return block; -+} -+EXPORT_SYMBOL(ext3_mb_new_blocks); -+ -+#ifdef EXT3_MB_HISTORY -+struct ext3_mb_proc_session { -+ struct ext3_mb_history *history; -+ struct super_block *sb; -+ int start; -+ int max; -+}; -+ -+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s, -+ struct ext3_mb_history *hs, -+ int first) -+{ -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (!first && hs == s->history + s->start) -+ return NULL; -+ while (hs->goal.fe_len == 0) { -+ hs++; -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (hs == s->history + s->start) -+ return NULL; -+ } -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ if (!hs) -+ return NULL; -+ while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL); -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ else -+ return ext3_mb_history_skip_empty(s, ++hs, 0); -+} -+ -+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct ext3_mb_history *hs = v; -+ char buf[20], buf2[20]; -+ -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n", -+ "pid", "inode", "goal", "result", "found", "grps", "cr", -+ "merge", "tail", "broken"); -+ return 0; -+ } -+ -+ sprintf(buf, "%u/%u/%u", hs->goal.fe_group, -+ hs->goal.fe_start, hs->goal.fe_len); -+ sprintf(buf2, "%u/%u/%u", hs->result.fe_group, -+ hs->result.fe_start, hs->result.fe_len); -+ seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n", -+ hs->pid, hs->ino, buf, buf2, hs->found, hs->groups, -+ hs->cr, hs->merged ? "M" : "", hs->tail, -+ hs->buddy ? 1 << hs->buddy : 0); -+ return 0; -+} -+ -+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_history_ops = { -+ .start = ext3_mb_seq_history_start, -+ .next = ext3_mb_seq_history_next, -+ .stop = ext3_mb_seq_history_stop, -+ .show = ext3_mb_seq_history_show, -+}; -+ -+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max; -+ s->history = kmalloc(size, GFP_KERNEL); -+ if (s == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(s->history, sbi->s_mb_history, size); -+ s->max = sbi->s_mb_history_max; -+ s->start = sbi->s_mb_history_cur % s->max; -+ spin_unlock(&sbi->s_mb_history_lock); -+ -+ rc = seq_open(file, &ext3_mb_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->history); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct ext3_mb_proc_session *s = seq->private; -+ kfree(s->history); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations ext3_mb_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_history_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = ext3_mb_seq_history_release, -+}; -+ -+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ -+ group = *pos + 1; -+ return (void *) group; -+} -+ -+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ ++*pos; -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ group = *pos + 1; -+ return (void *) group;; -+} -+ -+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v) -+{ -+ struct super_block *sb = seq->private; -+ long group = (long) v, i; -+ struct sg { -+ struct ext3_group_info info; -+ unsigned short counters[16]; -+ } sg; -+ -+ group--; -+ if (group == 0) -+ seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n", -+ "group", "free", "frags", "first", "2^0", "2^1", "2^2", -+ "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10", -+ "2^11", "2^12", "2^13"); -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + -+ sizeof(struct ext3_group_info); -+ ext3_lock_group(sb, group); -+ memcpy(&sg, EXT3_GROUP_INFO(sb, group), i); -+ ext3_unlock_group(sb, group); -+ -+ if (EXT3_MB_GRP_NEED_INIT(&sg.info)) -+ return 0; -+ -+ seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free, -+ sg.info.bb_fragments, sg.info.bb_first_free); -+ for (i = 0; i <= 13; i++) -+ seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ? -+ sg.info.bb_counters[i] : 0); -+ seq_printf(seq, " ]\n"); -+ -+ return 0; -+} -+ -+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_groups_ops = { -+ .start = ext3_mb_seq_groups_start, -+ .next = ext3_mb_seq_groups_next, -+ .stop = ext3_mb_seq_groups_stop, -+ .show = ext3_mb_seq_groups_show, -+}; -+ -+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ int rc; -+ -+ rc = seq_open(file, &ext3_mb_seq_groups_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = sb; -+ } -+ return rc; -+ -+} -+ -+static struct file_operations ext3_mb_seq_groups_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_groups_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = seq_release, -+}; -+ -+static void ext3_mb_history_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ remove_proc_entry("mb_groups", sbi->s_mb_proc); -+ remove_proc_entry("mb_history", sbi->s_mb_proc); -+ remove_proc_entry(name, proc_root_ext3); -+ -+ if (sbi->s_mb_history) -+ kfree(sbi->s_mb_history); -+} -+ -+static void ext3_mb_history_init(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ int i; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3); -+ if (sbi->s_mb_proc != NULL) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_history_fops; -+ p->data = sb; -+ } -+ p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_groups_fops; -+ p->data = sb; -+ } -+ } -+ -+ sbi->s_mb_history_max = 1000; -+ sbi->s_mb_history_cur = 0; -+ spin_lock_init(&sbi->s_mb_history_lock); -+ i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history); -+ sbi->s_mb_history = kmalloc(i, GFP_KERNEL); -+ memset(sbi->s_mb_history, 0, i); -+ /* if we can't allocate history, then we simple won't use it */ -+} -+ -+static void -+ext3_mb_store_history(struct super_block *sb, unsigned ino, -+ struct ext3_allocation_context *ac) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_history h; -+ -+ if (likely(sbi->s_mb_history == NULL)) -+ return; -+ -+ h.pid = current->pid; -+ h.ino = ino; -+ h.goal = ac->ac_g_ex; -+ h.result = ac->ac_b_ex; -+ h.found = ac->ac_found; -+ h.cr = ac->ac_criteria; -+ h.groups = ac->ac_groups_scanned; -+ h.tail = ac->ac_tail; -+ h.buddy = ac->ac_buddy; -+ h.merged = 0; -+ if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start && -+ ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group) -+ h.merged = 1; -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h)); -+ if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max) -+ sbi->s_mb_history_cur = 0; -+ spin_unlock(&sbi->s_mb_history_lock); -+} -+ -+#else -+#define ext3_mb_history_release(sb) -+#define ext3_mb_history_init(sb) -+#endif -+ -+int ext3_mb_init_backend(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, j, len, metalen; -+ int num_meta_group_infos = -+ (sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ struct ext3_group_info **meta_group_info; -+ -+ /* An 8TB filesystem with 64-bit pointers requires a 4096 byte -+ * kmalloc. A 128kb malloc should suffice for a 256TB filesystem. -+ * So a two level scheme suffices for now. */ -+ sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) * -+ num_meta_group_infos, GFP_KERNEL); -+ if (sbi->s_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n"); -+ return -ENOMEM; -+ } -+ sbi->s_buddy_cache = new_inode(sb); -+ if (sbi->s_buddy_cache == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't get new inode\n"); -+ goto err_freesgi; -+ } -+ -+ metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) { -+ if ((i + 1) == num_meta_group_infos) -+ metalen = sizeof(*meta_group_info) * -+ (sbi->s_groups_count - -+ (i << EXT3_DESC_PER_BLOCK_BITS(sb))); -+ meta_group_info = kmalloc(metalen, GFP_KERNEL); -+ if (meta_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate mem for a " -+ "buddy group\n"); -+ goto err_freemeta; -+ } -+ sbi->s_group_info[i] = meta_group_info; -+ } -+ -+ /* -+ * calculate needed size. if change bb_counters size, -+ * don't forget about ext3_mb_generate_buddy() -+ */ -+ len = sizeof(struct ext3_group_info); -+ len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2); -+ for (i = 0; i < sbi->s_groups_count; i++) { -+ struct ext3_group_desc * desc; -+ -+ meta_group_info = -+ sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)]; -+ j = i & (EXT3_DESC_PER_BLOCK(sb) - 1); -+ -+ meta_group_info[j] = kmalloc(len, GFP_KERNEL); -+ if (meta_group_info[j] == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n"); -+ i--; -+ goto err_freebuddy; -+ } -+ desc = ext3_get_group_desc(sb, i, NULL); -+ if (desc == NULL) { -+ printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i); -+ goto err_freebuddy; -+ } -+ memset(meta_group_info[j], 0, len); -+ set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, -+ &meta_group_info[j]->bb_state); -+ meta_group_info[j]->bb_free = -+ le16_to_cpu(desc->bg_free_blocks_count); -+ } -+ -+ return 0; -+ -+err_freebuddy: -+ while (i >= 0) { -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ i--; -+ } -+ i = num_meta_group_infos; -+err_freemeta: -+ while (--i >= 0) -+ kfree(sbi->s_group_info[i]); -+ iput(sbi->s_buddy_cache); -+err_freesgi: -+ kfree(sbi->s_group_info); -+ return -ENOMEM; -+} -+ -+int ext3_mb_init(struct super_block *sb, int needs_recovery) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *root = sb->s_root->d_inode; -+ unsigned i, offset, max; -+ struct dentry *dentry; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short); -+ -+ sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_offsets == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ return -ENOMEM; -+ } -+ sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_maxs == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_maxs); -+ return -ENOMEM; -+ } -+ -+ /* order 0 is regular bitmap */ -+ sbi->s_mb_maxs[0] = sb->s_blocksize << 3; -+ sbi->s_mb_offsets[0] = 0; -+ -+ i = 1; -+ offset = 0; -+ max = sb->s_blocksize << 2; -+ do { -+ sbi->s_mb_offsets[i] = offset; -+ sbi->s_mb_maxs[i] = max; -+ offset += 1 << (sb->s_blocksize_bits - i); -+ max = max >> 1; -+ i++; -+ } while (i <= sb->s_blocksize_bits + 1); -+ -+ /* init file for buddy data */ -+ if ((i = ext3_mb_init_backend(sb))) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_offsets); -+ kfree(sbi->s_mb_maxs); -+ return i; -+ } -+ -+ spin_lock_init(&sbi->s_reserve_lock); -+ spin_lock_init(&sbi->s_md_lock); -+ INIT_LIST_HEAD(&sbi->s_active_transaction); -+ INIT_LIST_HEAD(&sbi->s_closed_transaction); -+ INIT_LIST_HEAD(&sbi->s_committed_transaction); -+ spin_lock_init(&sbi->s_bal_lock); -+ -+ /* remove old on-disk buddy file */ -+ mutex_lock(&root->i_mutex); -+ dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy")); -+ if (dentry->d_inode != NULL) { -+ i = vfs_unlink(root, dentry); -+ if (i != 0) -+ printk("EXT3-fs: can't remove .buddy file: %d\n", i); -+ } -+ dput(dentry); -+ mutex_unlock(&root->i_mutex); -+ -+ ext3_mb_history_init(sb); -+ -+ printk("EXT3-fs: mballoc enabled\n"); -+ return 0; -+} -+ -+int ext3_mb_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, num_meta_group_infos; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ /* release freed, non-committed blocks */ -+ spin_lock(&sbi->s_md_lock); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_committed_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ ext3_mb_free_committed_blocks(sb); -+ -+ if (sbi->s_group_info) { -+ for (i = 0; i < sbi->s_groups_count; i++) -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ num_meta_group_infos = (sbi->s_groups_count + -+ EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) -+ kfree(sbi->s_group_info[i]); -+ kfree(sbi->s_group_info); -+ } -+ if (sbi->s_mb_offsets) -+ kfree(sbi->s_mb_offsets); -+ if (sbi->s_mb_maxs) -+ kfree(sbi->s_mb_maxs); -+ if (sbi->s_buddy_cache) -+ iput(sbi->s_buddy_cache); -+ if (sbi->s_blocks_reserved) -+ printk("ext3-fs: %ld blocks being reserved at umount!\n", -+ sbi->s_blocks_reserved); -+ if (ext3_mb_stats) { -+ printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n", -+ atomic_read(&sbi->s_bal_allocated), -+ atomic_read(&sbi->s_bal_reqs), -+ atomic_read(&sbi->s_bal_success)); -+ printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, " -+ "%u 2^N hits, %u breaks\n", -+ atomic_read(&sbi->s_bal_ex_scanned), -+ atomic_read(&sbi->s_bal_goals), -+ atomic_read(&sbi->s_bal_2orders), -+ atomic_read(&sbi->s_bal_breaks)); -+ printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n", -+ sbi->s_mb_buddies_generated++, -+ sbi->s_mb_generation_time); -+ } -+ -+ ext3_mb_history_release(sb); -+ -+ return 0; -+} -+ -+void ext3_mb_free_committed_blocks(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int err, i, count = 0, count2 = 0; -+ struct ext3_free_metadata *md; -+ struct ext3_buddy e3b; -+ -+ if (list_empty(&sbi->s_committed_transaction)) -+ return; -+ -+ /* there is committed blocks to be freed yet */ -+ do { -+ /* get next array of blocks */ -+ md = NULL; -+ spin_lock(&sbi->s_md_lock); -+ if (!list_empty(&sbi->s_committed_transaction)) { -+ md = list_entry(sbi->s_committed_transaction.next, -+ struct ext3_free_metadata, list); -+ list_del(&md->list); -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ if (md == NULL) -+ break; -+ -+ mb_debug("gonna free %u blocks in group %u (0x%p):", -+ md->num, md->group, md); -+ -+ err = ext3_mb_load_buddy(sb, md->group, &e3b); -+ /* we expect to find existing buddy because it's pinned */ -+ BUG_ON(err != 0); -+ -+ /* there are blocks to put in buddy to make them really free */ -+ count += md->num; -+ count2++; -+ ext3_lock_group(sb, md->group); -+ for (i = 0; i < md->num; i++) { -+ mb_debug(" %u", md->blocks[i]); -+ mb_free_blocks(&e3b, md->blocks[i], 1); -+ } -+ mb_debug("\n"); -+ ext3_unlock_group(sb, md->group); -+ -+ /* balance refcounts from ext3_mb_free_metadata() */ -+ page_cache_release(e3b.bd_buddy_page); -+ page_cache_release(e3b.bd_bitmap_page); -+ -+ kfree(md); -+ ext3_mb_release_desc(&e3b); -+ -+ } while (md); -+ mb_debug("freed %u blocks in %u structures\n", count, count2); -+} -+ -+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ if (sbi->s_last_transaction == handle->h_transaction->t_tid) -+ return; -+ -+ /* new transaction! time to close last one and free blocks for -+ * committed transaction. we know that only transaction can be -+ * active, so previos transaction can be being logged and we -+ * know that transaction before previous is known to be already -+ * logged. this means that now we may free blocks freed in all -+ * transactions before previous one. hope I'm clear enough ... */ -+ -+ spin_lock(&sbi->s_md_lock); -+ if (sbi->s_last_transaction != handle->h_transaction->t_tid) { -+ mb_debug("new transaction %lu, old %lu\n", -+ (unsigned long) handle->h_transaction->t_tid, -+ (unsigned long) sbi->s_last_transaction); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_closed_transaction); -+ sbi->s_last_transaction = handle->h_transaction->t_tid; -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ ext3_mb_free_committed_blocks(sb); -+} -+ -+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b, -+ int group, int block, int count) -+{ -+ struct ext3_group_info *db = e3b->bd_info; -+ struct super_block *sb = e3b->bd_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_free_metadata *md; -+ int i; -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ ext3_lock_group(sb, group); -+ for (i = 0; i < count; i++) { -+ md = db->bb_md_cur; -+ if (md && db->bb_tid != handle->h_transaction->t_tid) { -+ db->bb_md_cur = NULL; -+ md = NULL; -+ } -+ -+ if (md == NULL) { -+ ext3_unlock_group(sb, group); -+ md = kmalloc(sizeof(*md), GFP_KERNEL); -+ if (md == NULL) -+ return -ENOMEM; -+ md->num = 0; -+ md->group = group; -+ -+ ext3_lock_group(sb, group); -+ if (db->bb_md_cur == NULL) { -+ spin_lock(&sbi->s_md_lock); -+ list_add(&md->list, &sbi->s_active_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ /* protect buddy cache from being freed, -+ * otherwise we'll refresh it from -+ * on-disk bitmap and lose not-yet-available -+ * blocks */ -+ page_cache_get(e3b->bd_buddy_page); -+ page_cache_get(e3b->bd_bitmap_page); -+ db->bb_md_cur = md; -+ db->bb_tid = handle->h_transaction->t_tid; -+ mb_debug("new md 0x%p for group %u\n", -+ md, md->group); -+ } else { -+ kfree(md); -+ md = db->bb_md_cur; -+ } -+ } -+ -+ BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS); -+ md->blocks[md->num] = block + i; -+ md->num++; -+ if (md->num == EXT3_BB_MAX_BLOCKS) { -+ /* no more space, put full container on a sb's list */ -+ db->bb_md_cur = NULL; -+ } -+ } -+ ext3_unlock_group(sb, group); -+ return 0; -+} -+ -+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode, -+ unsigned long block, unsigned long count, -+ int metadata, int *freed) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ unsigned long bit, overflow; -+ struct buffer_head *gd_bh; -+ unsigned long block_group; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ int err = 0, ret; -+ -+ *freed = 0; -+ sb = inode->i_sb; -+ if (!sb) { -+ printk ("ext3_free_blocks: nonexistent device"); -+ return; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ if (block < le32_to_cpu(es->s_first_data_block) || -+ block + count < block || -+ block + count > le32_to_cpu(es->s_blocks_count)) { -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks not in datazone - " -+ "block = %lu, count = %lu", block, count); -+ goto error_return; -+ } -+ -+ ext3_debug("freeing block %lu\n", block); -+ -+do_more: -+ overflow = 0; -+ block_group = (block - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ bit = (block - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb); -+ /* -+ * Check to see if we are freeing blocks across a group -+ * boundary. -+ */ -+ if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) { -+ overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb); -+ count -= overflow; -+ } -+ brelse(bitmap_bh); -+ bitmap_bh = read_block_bitmap(sb, block_group); -+ if (!bitmap_bh) -+ goto error_return; -+ gdp = ext3_get_group_desc (sb, block_group, &gd_bh); -+ if (!gdp) -+ goto error_return; -+ -+ if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) || -+ in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) || -+ in_range (block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group) || -+ in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks in system zones - " -+ "Block = %lu, count = %lu", -+ block, count); -+ -+ BUFFER_TRACE(bitmap_bh, "getting write access"); -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) -+ goto error_return; -+ -+ /* -+ * We are about to modify some metadata. Call the journal APIs -+ * to unshare ->b_data if a currently-committing transaction is -+ * using it -+ */ -+ BUFFER_TRACE(gd_bh, "get_write_access"); -+ err = ext3_journal_get_write_access(handle, gd_bh); -+ if (err) -+ goto error_return; -+ -+ err = ext3_mb_load_buddy(sb, block_group, &e3b); -+ if (err) -+ goto error_return; -+ -+#ifdef AGGRESSIVE_CHECK -+ { -+ int i; -+ for (i = 0; i < count; i++) -+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data)); -+ } -+#endif -+ mb_clear_bits(bitmap_bh->b_data, bit, count); -+ -+ /* We dirtied the bitmap block */ -+ BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ -+ if (metadata) { -+ /* blocks being freed are metadata. these blocks shouldn't -+ * be used until this transaction is committed */ -+ ext3_mb_free_metadata(handle, &e3b, block_group, bit, count); -+ } else { -+ ext3_lock_group(sb, block_group); -+ mb_free_blocks(&e3b, bit, count); -+ ext3_unlock_group(sb, block_group); -+ } -+ -+ spin_lock(sb_bgl_lock(sbi, block_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count); -+ spin_unlock(sb_bgl_lock(sbi, block_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, count); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ *freed = count; -+ -+ /* And the group descriptor block */ -+ BUFFER_TRACE(gd_bh, "dirtied group descriptor block"); -+ ret = ext3_journal_dirty_metadata(handle, gd_bh); -+ if (!err) err = ret; -+ -+ if (overflow && !err) { -+ block += count; -+ count = overflow; -+ goto do_more; -+ } -+ sb->s_dirt = 1; -+error_return: -+ brelse(bitmap_bh); -+ ext3_std_error(sb, err); -+ return; -+} -+ -+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int free, ret = -ENOSPC; -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ free = percpu_counter_read_positive(&sbi->s_freeblocks_counter); -+ if (blocks <= free - sbi->s_blocks_reserved) { -+ sbi->s_blocks_reserved += blocks; -+ ret = 0; -+ } -+ spin_unlock(&sbi->s_reserve_lock); -+ return ret; -+} -+ -+void ext3_mb_release_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ sbi->s_blocks_reserved -= blocks; -+ WARN_ON(sbi->s_blocks_reserved < 0); -+ if (sbi->s_blocks_reserved < 0) -+ sbi->s_blocks_reserved = 0; -+ spin_unlock(&sbi->s_reserve_lock); -+} -+ -+int ext3_new_block(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *errp) -+{ -+ int ret, len; -+ -+ if (!test_opt(inode->i_sb, MBALLOC)) { -+ ret = ext3_new_block_old(handle, inode, goal, errp); -+ goto out; -+ } -+ len = 1; -+ ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp); -+out: -+ return ret; -+} -+ -+ -+void ext3_free_blocks(handle_t *handle, struct inode * inode, -+ unsigned long block, unsigned long count, int metadata) -+{ -+ struct super_block *sb; -+ int freed; -+ -+ sb = inode->i_sb; -+ if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info) -+ ext3_free_blocks_sb(handle, sb, block, count, &freed); -+ else -+ ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed); -+ if (freed) -+ DQUOT_FREE_BLOCK(inode, freed); -+ return; -+} -+ -+#define EXT3_ROOT "ext3" -+#define EXT3_MB_STATS_NAME "mb_stats" -+#define EXT3_MB_MAX_TO_SCAN_NAME "mb_max_to_scan" -+#define EXT3_MB_MIN_TO_SCAN_NAME "mb_min_to_scan" -+#define EXT3_MB_ORDER2_REQ "mb_order2_req" -+ -+static int ext3_mb_stats_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_stats); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_stats_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_STATS_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0); -+ return count; -+} -+ -+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_max_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_max_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_min_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_min_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_order2_req_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_order2_reqs); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_order2_req_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_order2_reqs = value; -+ -+ return count; -+} -+ -+int __init init_ext3_proc(void) -+{ -+ struct proc_dir_entry *proc_ext3_mb_stats; -+ struct proc_dir_entry *proc_ext3_mb_max_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_min_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_order2_req; -+ -+ proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs); -+ if (proc_root_ext3 == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT); -+ return -EIO; -+ } -+ -+ /* Initialize EXT3_MB_STATS_NAME */ -+ proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_stats == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_STATS_NAME); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_stats->data = NULL; -+ proc_ext3_mb_stats->read_proc = ext3_mb_stats_read; -+ proc_ext3_mb_stats->write_proc = ext3_mb_stats_write; -+ -+ /* Initialize EXT3_MAX_TO_SCAN_NAME */ -+ proc_ext3_mb_max_to_scan = create_proc_entry( -+ EXT3_MB_MAX_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_max_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MAX_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_max_to_scan->data = NULL; -+ proc_ext3_mb_max_to_scan->read_proc = ext3_mb_max_to_scan_read; -+ proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write; -+ -+ /* Initialize EXT3_MIN_TO_SCAN_NAME */ -+ proc_ext3_mb_min_to_scan = create_proc_entry( -+ EXT3_MB_MIN_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_min_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MIN_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_min_to_scan->data = NULL; -+ proc_ext3_mb_min_to_scan->read_proc = ext3_mb_min_to_scan_read; -+ proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write; -+ -+ /* Initialize EXT3_ORDER2_REQ */ -+ proc_ext3_mb_order2_req = create_proc_entry( -+ EXT3_MB_ORDER2_REQ, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_order2_req == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_ORDER2_REQ); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_order2_req->data = NULL; -+ proc_ext3_mb_order2_req->read_proc = ext3_mb_order2_req_read; -+ proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write; -+ -+ return 0; -+} -+ -+void exit_ext3_proc(void) -+{ -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+} -Index: linux-2.6.16.i686/fs/ext3/Makefile -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/Makefile 2006-05-30 22:55:32.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/Makefile 2006-05-30 23:02:59.000000000 +0800 -@@ -6,7 +6,7 @@ - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o resize.o \ -- extents.o -+ extents.o mballoc.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch deleted file mode 100644 index cec18779bd..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch +++ /dev/null @@ -1,3108 +0,0 @@ -Index: linux-2.6.5-7.282-full/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.5-7.282-full.orig/include/linux/ext3_fs.h 2006-10-24 22:18:28.000000000 +0400 -+++ linux-2.6.5-7.282-full/include/linux/ext3_fs.h 2006-10-24 22:18:28.000000000 +0400 -@@ -57,6 +57,14 @@ struct statfs; - #define ext3_debug(f, a...) do {} while (0) - #endif - -+#define EXT3_MULTIBLOCK_ALLOCATOR 1 -+ -+#define EXT3_MB_HINT_MERGE 1 -+#define EXT3_MB_HINT_RESERVED 2 -+#define EXT3_MB_HINT_METADATA 4 -+#define EXT3_MB_HINT_FIRST 8 -+#define EXT3_MB_HINT_BEST 16 -+ - /* - * Special inodes numbers - */ -@@ -339,6 +347,7 @@ struct ext3_inode { - #define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ - #define EXT3_MOUNT_EXTENTS 0x200000/* Extents support */ - #define EXT3_MOUNT_EXTDEBUG 0x400000/* Extents debug */ -+#define EXT3_MOUNT_MBALLOC 0x800000/* Buddy allocation support */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -361,6 +370,14 @@ struct ext3_inode { - #define ext3_find_first_zero_bit ext2_find_first_zero_bit - #define ext3_find_next_zero_bit ext2_find_next_zero_bit - -+#ifndef ext2_find_next_le_bit -+#ifdef __LITTLE_ENDIAN -+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off)) -+#else -+#error "mballoc needs a patch for big-endian systems - CFS bug 10634" -+#endif /* __LITTLE_ENDIAN */ -+#endif /* !ext2_find_next_le_bit */ -+ - /* - * Maximal mount counts between two filesystem checks - */ -@@ -700,7 +717,10 @@ extern int ext3_bg_has_super(struct supe - extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group); - extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *); - extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long, -- unsigned long); -+ unsigned long, int); -+extern int ext3_new_block_old(handle_t *, struct inode *, unsigned long, int *); -+extern void ext3_free_blocks_old(handle_t *, struct inode *, unsigned long, -+ unsigned long); - extern unsigned long ext3_count_free_blocks (struct super_block *); - extern void ext3_check_blocks_bitmap (struct super_block *); - extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb, -@@ -824,6 +843,17 @@ extern void ext3_extents_initialize_bloc - extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); - -+/* mballoc.c */ -+extern long ext3_mb_stats; -+extern long ext3_mb_max_to_scan; -+extern int ext3_mb_init(struct super_block *, int); -+extern int ext3_mb_release(struct super_block *); -+extern int ext3_mb_new_blocks(handle_t *, struct inode *, unsigned long, int *, int, int *); -+extern int ext3_mb_reserve_blocks(struct super_block *, int); -+extern void ext3_mb_release_blocks(struct super_block *, int); -+int __init init_ext3_proc(void); -+void exit_ext3_proc(void); -+ - #endif /* __KERNEL__ */ - - #define EXT3_IOC_CREATE_INUM _IOW('f', 5, long) -Index: linux-2.6.5-7.282-full/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.5-7.282-full.orig/include/linux/ext3_fs_sb.h 2006-10-24 22:18:28.000000000 +0400 -+++ linux-2.6.5-7.282-full/include/linux/ext3_fs_sb.h 2006-10-24 22:18:28.000000000 +0400 -@@ -23,9 +23,15 @@ - #define EXT_INCLUDE - #include <linux/blockgroup_lock.h> - #include <linux/percpu_counter.h> -+#include <linux/list.h> - #endif - #endif - #include <linux/rbtree.h> -+#include <linux/proc_fs.h> -+ -+struct ext3_buddy_group_blocks; -+struct ext3_mb_history; -+#define EXT3_BB_MAX_BLOCKS - - /* - * third extended-fs super-block data in memory -@@ -78,6 +84,43 @@ struct ext3_sb_info { - struct timer_list turn_ro_timer; /* For turning read-only (crash simulation) */ - wait_queue_head_t ro_wait_queue; /* For people waiting for the fs to go read-only */ - #endif -+ -+ /* for buddy allocator */ -+ struct ext3_group_info ***s_group_info; -+ struct inode *s_buddy_cache; -+ long s_blocks_reserved; -+ spinlock_t s_reserve_lock; -+ struct list_head s_active_transaction; -+ struct list_head s_closed_transaction; -+ struct list_head s_committed_transaction; -+ spinlock_t s_md_lock; -+ tid_t s_last_transaction; -+ int s_mb_factor; -+ unsigned short *s_mb_offsets, *s_mb_maxs; -+ unsigned long s_stripe; -+ -+ /* history to debug policy */ -+ struct ext3_mb_history *s_mb_history; -+ int s_mb_history_cur; -+ int s_mb_history_max; -+ struct proc_dir_entry *s_mb_proc; -+ spinlock_t s_mb_history_lock; -+ -+ /* stats for buddy allocator */ -+ atomic_t s_bal_reqs; /* number of reqs with len > 1 */ -+ atomic_t s_bal_success; /* we found long enough chunks */ -+ atomic_t s_bal_allocated; /* in blocks */ -+ atomic_t s_bal_ex_scanned; /* total extents scanned */ -+ atomic_t s_bal_goals; /* goal hits */ -+ atomic_t s_bal_breaks; /* too long searches */ -+ atomic_t s_bal_2orders; /* 2^order hits */ -+ spinlock_t s_bal_lock; -+ unsigned long s_mb_buddies_generated; -+ unsigned long long s_mb_generation_time; - }; - -+#define EXT3_GROUP_INFO(sb, group) \ -+ EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \ -+ [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)] -+ - #endif /* _LINUX_EXT3_FS_SB */ -Index: linux-2.6.5-7.282-full/fs/ext3/super.c -=================================================================== ---- linux-2.6.5-7.282-full.orig/fs/ext3/super.c 2006-10-24 22:18:28.000000000 +0400 -+++ linux-2.6.5-7.282-full/fs/ext3/super.c 2006-10-24 22:18:28.000000000 +0400 -@@ -389,6 +389,7 @@ void ext3_put_super (struct super_block - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_mb_release(sb); - ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); -@@ -588,6 +589,7 @@ enum { - Opt_err, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - Opt_extents, Opt_noextents, Opt_extdebug, -+ Opt_mballoc, Opt_nomballoc, Opt_stripe, - }; - - static match_table_t tokens = { -@@ -634,6 +636,9 @@ static match_table_t tokens = { - {Opt_extents, "extents"}, - {Opt_noextents, "noextents"}, - {Opt_extdebug, "extdebug"}, -+ {Opt_mballoc, "mballoc"}, -+ {Opt_nomballoc, "nomballoc"}, -+ {Opt_stripe, "stripe=%u"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL} - }; -@@ -859,6 +864,19 @@ static int parse_options (char * options - case Opt_extdebug: - set_opt (sbi->s_mount_opt, EXTDEBUG); - break; -+ case Opt_mballoc: -+ set_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_nomballoc: -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_stripe: -+ if (match_int(&args[0], &option)) -+ return 0; -+ if (option < 0) -+ return 0; -+ sbi->s_stripe = option; -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1512,6 +1530,7 @@ static int ext3_fill_super (struct super - ext3_count_dirs(sb)); - - ext3_ext_init(sb); -+ ext3_mb_init(sb, needs_recovery); - - return 0; - -@@ -2160,7 +2179,13 @@ static struct file_system_type ext3_fs_t - - static int __init init_ext3_fs(void) - { -- int err = init_ext3_xattr(); -+ int err; -+ -+ err = init_ext3_proc(); -+ if (err) -+ return err; -+ -+ err = init_ext3_xattr(); - if (err) - return err; - err = init_inodecache(); -@@ -2189,6 +2214,7 @@ static void __exit exit_ext3_fs(void) - unregister_filesystem(&ext3_fs_type); - destroy_inodecache(); - exit_ext3_xattr(); -+ exit_ext3_proc(); - } - - int ext3_prep_san_write(struct inode *inode, long *blocks, -Index: linux-2.6.5-7.282-full/fs/ext3/extents.c -=================================================================== ---- linux-2.6.5-7.282-full.orig/fs/ext3/extents.c 2006-10-24 22:18:28.000000000 +0400 -+++ linux-2.6.5-7.282-full/fs/ext3/extents.c 2006-10-24 22:18:28.000000000 +0400 -@@ -779,7 +779,7 @@ cleanup: - for (i = 0; i < depth; i++) { - if (!ablocks[i]) - continue; -- ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1); - } - } - kfree(ablocks); -@@ -1438,7 +1438,7 @@ int ext3_ext_rm_idx(handle_t *handle, st - path->p_idx->ei_leaf); - bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); - ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -- ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1); - return err; - } - -@@ -1923,10 +1923,12 @@ ext3_remove_blocks(struct ext3_extents_t - int needed = ext3_remove_blocks_credits(tree, ex, from, to); - handle_t *handle = ext3_journal_start(tree->inode, needed); - struct buffer_head *bh; -- int i; -+ int i, metadata = 0; - - if (IS_ERR(handle)) - return PTR_ERR(handle); -+ if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode)) -+ metadata = 1; - if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { - /* tail removal */ - unsigned long num, start; -@@ -1938,7 +1940,7 @@ ext3_remove_blocks(struct ext3_extents_t - bh = sb_find_get_block(tree->inode->i_sb, start + i); - ext3_forget(handle, 0, tree->inode, bh, start + i); - } -- ext3_free_blocks(handle, tree->inode, start, num); -+ ext3_free_blocks(handle, tree->inode, start, num, metadata); - } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { - printk("strange request: removal %lu-%lu from %u:%u\n", - from, to, ex->ee_block, ex->ee_len); -Index: linux-2.6.5-7.282-full/fs/ext3/inode.c -=================================================================== ---- linux-2.6.5-7.282-full.orig/fs/ext3/inode.c 2006-10-24 22:18:28.000000000 +0400 -+++ linux-2.6.5-7.282-full/fs/ext3/inode.c 2006-10-24 22:18:28.000000000 +0400 -@@ -574,7 +574,7 @@ static int ext3_alloc_branch(handle_t *h - ext3_journal_forget(handle, branch[i].bh); - } - for (i = 0; i < keys; i++) -- ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1); -+ ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1, 1); - return err; - } - -@@ -675,7 +675,7 @@ err_out: - if (err == -EAGAIN) - for (i = 0; i < num; i++) - ext3_free_blocks(handle, inode, -- le32_to_cpu(where[i].key), 1); -+ le32_to_cpu(where[i].key), 1, 1); - return err; - } - -@@ -1837,7 +1837,7 @@ ext3_clear_blocks(handle_t *handle, stru - } - } - -- ext3_free_blocks(handle, inode, block_to_free, count); -+ ext3_free_blocks(handle, inode, block_to_free, count, 1); - } - - /** -@@ -2008,7 +2008,7 @@ static void ext3_free_branches(handle_t - ext3_journal_test_restart(handle, inode); - } - -- ext3_free_blocks(handle, inode, nr, 1); -+ ext3_free_blocks(handle, inode, nr, 1, 1); - - if (parent_bh) { - /* -Index: linux-2.6.5-7.282-full/fs/ext3/balloc.c -=================================================================== ---- linux-2.6.5-7.282-full.orig/fs/ext3/balloc.c 2006-08-30 18:12:13.000000000 +0400 -+++ linux-2.6.5-7.282-full/fs/ext3/balloc.c 2006-10-24 22:18:28.000000000 +0400 -@@ -78,7 +78,7 @@ struct ext3_group_desc * ext3_get_group_ - * - * Return buffer_head on success or NULL in case of failure. - */ --static struct buffer_head * -+struct buffer_head * - read_block_bitmap(struct super_block *sb, unsigned int block_group) - { - struct ext3_group_desc * desc; -@@ -274,7 +274,7 @@ void ext3_discard_reservation(struct ino - } - - /* Free given blocks, update quota and i_blocks field */ --void ext3_free_blocks(handle_t *handle, struct inode *inode, -+void ext3_free_blocks_old(handle_t *handle, struct inode *inode, - unsigned long block, unsigned long count) - { - struct buffer_head *bitmap_bh = NULL; -@@ -1142,7 +1142,7 @@ int ext3_should_retry_alloc(struct super - * bitmap, and then for any free bit if that fails. - * This function also updates quota and i_blocks field. - */ --int ext3_new_block(handle_t *handle, struct inode *inode, -+int ext3_new_block_old(handle_t *handle, struct inode *inode, - unsigned long goal, int *errp) - { - struct buffer_head *bitmap_bh = NULL; -Index: linux-2.6.5-7.282-full/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.5-7.282-full.orig/fs/ext3/xattr.c 2006-10-24 22:18:28.000000000 +0400 -+++ linux-2.6.5-7.282-full/fs/ext3/xattr.c 2006-10-24 22:18:28.000000000 +0400 -@@ -1371,7 +1371,7 @@ ext3_xattr_set_handle2(handle_t *handle, - new_bh = sb_getblk(sb, block); - if (!new_bh) { - getblk_failed: -- ext3_free_blocks(handle, inode, block, 1); -+ ext3_free_blocks(handle, inode, block, 1, 1); - error = -EIO; - goto cleanup; - } -@@ -1411,7 +1411,7 @@ getblk_failed: - if (HDR(old_bh)->h_refcount == cpu_to_le32(1)) { - /* Free the old block. */ - ea_bdebug(old_bh, "freeing"); -- ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1); -+ ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1, 1); - - /* ext3_forget() calls bforget() for us, but we - let our caller release old_bh, so we need to -@@ -1519,7 +1519,7 @@ ext3_xattr_delete_inode(handle_t *handle - mb_cache_entry_free(ce); - ce = NULL; - } -- ext3_free_blocks(handle, inode, EXT3_I(inode)->i_file_acl, 1); -+ ext3_free_blocks(handle, inode, EXT3_I(inode)->i_file_acl, 1, 1); - get_bh(bh); - ext3_forget(handle, 1, inode, bh, EXT3_I(inode)->i_file_acl); - } else { -Index: linux-2.6.5-7.282-full/fs/ext3/mballoc.c -=================================================================== ---- linux-2.6.5-7.282-full.orig/fs/ext3/mballoc.c 2006-10-23 18:07:54.821533176 +0400 -+++ linux-2.6.5-7.282-full/fs/ext3/mballoc.c 2006-10-24 22:20:45.000000000 +0400 -@@ -0,0 +1,2726 @@ -+/* -+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+ -+/* -+ * mballoc.c contains the multiblocks allocation routines -+ */ -+ -+#include <linux/config.h> -+#include <linux/time.h> -+#include <linux/fs.h> -+#include <linux/namei.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/quotaops.h> -+#include <linux/buffer_head.h> -+#include <linux/module.h> -+#include <linux/swap.h> -+#include <linux/proc_fs.h> -+#include <linux/pagemap.h> -+#include <linux/seq_file.h> -+ -+/* -+ * TODO: -+ * - bitmap read-ahead (proposed by Oleg Drokin aka green) -+ * - track min/max extents in each group for better group selection -+ * - mb_mark_used() may allocate chunk right after splitting buddy -+ * - special flag to advice allocator to look for requested + N blocks -+ * this may improve interaction between extents and mballoc -+ * - tree of groups sorted by number of free blocks -+ * - percpu reservation code (hotpath) -+ * - error handling -+ */ -+ -+/* -+ * with AGRESSIVE_CHECK allocator runs consistency checks over -+ * structures. these checks slow things down a lot -+ */ -+#define AGGRESSIVE_CHECK__ -+ -+/* -+ */ -+#define MB_DEBUG__ -+#ifdef MB_DEBUG -+#define mb_debug(fmt,a...) printk(fmt, ##a) -+#else -+#define mb_debug(fmt,a...) -+#endif -+ -+/* -+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory -+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history -+ */ -+#define EXT3_MB_HISTORY -+ -+/* -+ * How long mballoc can look for a best extent (in found extents) -+ */ -+long ext3_mb_max_to_scan = 500; -+ -+/* -+ * How long mballoc must look for a best extent -+ */ -+long ext3_mb_min_to_scan = 30; -+ -+/* -+ * with 'ext3_mb_stats' allocator will collect stats that will be -+ * shown at umount. The collecting costs though! -+ */ -+ -+long ext3_mb_stats = 1; -+ -+/* -+ * for which requests use 2^N search using buddies -+ */ -+long ext3_mb_order2_reqs = 8; -+ -+#ifdef EXT3_BB_MAX_BLOCKS -+#undef EXT3_BB_MAX_BLOCKS -+#endif -+#define EXT3_BB_MAX_BLOCKS 30 -+ -+struct ext3_free_metadata { -+ unsigned short group; -+ unsigned short num; -+ unsigned short blocks[EXT3_BB_MAX_BLOCKS]; -+ struct list_head list; -+}; -+ -+struct ext3_group_info { -+ unsigned long bb_state; -+ unsigned long bb_tid; -+ struct ext3_free_metadata *bb_md_cur; -+ unsigned short bb_first_free; -+ unsigned short bb_free; -+ unsigned short bb_fragments; -+ unsigned short bb_counters[]; -+}; -+ -+ -+#define EXT3_GROUP_INFO_NEED_INIT_BIT 0 -+#define EXT3_GROUP_INFO_LOCKED_BIT 1 -+ -+#define EXT3_MB_GRP_NEED_INIT(grp) \ -+ (test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state)) -+ -+struct ext3_free_extent { -+ __u16 fe_start; -+ __u16 fe_len; -+ __u16 fe_group; -+}; -+ -+struct ext3_allocation_context { -+ struct super_block *ac_sb; -+ -+ /* search goals */ -+ struct ext3_free_extent ac_g_ex; -+ -+ /* the best found extent */ -+ struct ext3_free_extent ac_b_ex; -+ -+ /* number of iterations done. we have to track to limit searching */ -+ unsigned long ac_ex_scanned; -+ __u16 ac_groups_scanned; -+ __u16 ac_found; -+ __u16 ac_tail; -+ __u16 ac_buddy; -+ __u8 ac_status; -+ __u8 ac_flags; /* allocation hints */ -+ __u8 ac_criteria; -+ __u8 ac_repeats; -+ __u8 ac_2order; /* if request is to allocate 2^N blocks and -+ * N > 0, the field stores N, otherwise 0 */ -+ -+ struct page *ac_buddy_page; -+ struct page *ac_bitmap_page; -+}; -+ -+#define AC_STATUS_CONTINUE 1 -+#define AC_STATUS_FOUND 2 -+#define AC_STATUS_BREAK 3 -+ -+struct ext3_mb_history { -+ struct ext3_free_extent goal; /* goal allocation */ -+ struct ext3_free_extent result; /* result allocation */ -+ unsigned pid; -+ unsigned ino; -+ __u16 found; /* how many extents have been found */ -+ __u16 groups; /* how many groups have been scanned */ -+ __u16 tail; /* what tail broke some buddy */ -+ __u16 buddy; /* buddy the tail ^^^ broke */ -+ __u8 cr; /* which phase the result extent was found at */ -+ __u8 merged; -+}; -+ -+struct ext3_buddy { -+ struct page *bd_buddy_page; -+ void *bd_buddy; -+ struct page *bd_bitmap_page; -+ void *bd_bitmap; -+ struct ext3_group_info *bd_info; -+ struct super_block *bd_sb; -+ __u16 bd_blkbits; -+ __u16 bd_group; -+}; -+#define EXT3_MB_BITMAP(e3b) ((e3b)->bd_bitmap) -+#define EXT3_MB_BUDDY(e3b) ((e3b)->bd_buddy) -+ -+#ifndef EXT3_MB_HISTORY -+#define ext3_mb_store_history(sb,ino,ac) -+#else -+static void ext3_mb_store_history(struct super_block *, unsigned ino, -+ struct ext3_allocation_context *ac); -+#endif -+ -+#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -+ -+static struct proc_dir_entry *proc_root_ext3; -+ -+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int); -+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *); -+void ext3_mb_free_committed_blocks(struct super_block *); -+ -+#if BITS_PER_LONG == 64 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 7UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~7UL); \ -+} -+#elif BITS_PER_LONG == 32 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 3UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~3UL); \ -+} -+#else -+#error "how many bits you are?!" -+#endif -+ -+static inline int mb_test_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ return ext2_test_bit(bit, addr); -+} -+ -+static inline void mb_set_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit(bit, addr); -+} -+ -+static inline void mb_set_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit_atomic(NULL, bit, addr); -+} -+ -+static inline void mb_clear_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit(bit, addr); -+} -+ -+static inline void mb_clear_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit_atomic(NULL, bit, addr); -+} -+ -+static inline int mb_find_next_zero_bit(void *addr, int max, int start) -+{ -+ int fix; -+#if BITS_PER_LONG == 64 -+ fix = ((unsigned long) addr & 7UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~7UL); -+#elif BITS_PER_LONG == 32 -+ fix = ((unsigned long) addr & 3UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~3UL); -+#else -+#error "how many bits you are?!" -+#endif -+ max += fix; -+ start += fix; -+ return ext2_find_next_zero_bit(addr, max, start) - fix; -+} -+ -+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max) -+{ -+ char *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(max != NULL); -+ -+ if (order > e3b->bd_blkbits + 1) { -+ *max = 0; -+ return NULL; -+ } -+ -+ /* at order 0 we see each particular block */ -+ *max = 1 << (e3b->bd_blkbits + 3); -+ if (order == 0) -+ return EXT3_MB_BITMAP(e3b); -+ -+ bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order]; -+ *max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order]; -+ -+ return bb; -+} -+ -+#ifdef AGGRESSIVE_CHECK -+ -+static void mb_check_buddy(struct ext3_buddy *e3b) -+{ -+ int order = e3b->bd_blkbits + 1; -+ int max, max2, i, j, k, count; -+ int fragments = 0, fstart; -+ void *buddy, *buddy2; -+ -+ if (!test_opt(e3b->bd_sb, MBALLOC)) -+ return; -+ -+ { -+ static int mb_check_counter = 0; -+ if (mb_check_counter++ % 300 != 0) -+ return; -+ } -+ -+ while (order > 1) { -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ buddy2 = mb_find_buddy(e3b, order - 1, &max2); -+ J_ASSERT(buddy2); -+ J_ASSERT(buddy != buddy2); -+ J_ASSERT(max * 2 == max2); -+ -+ count = 0; -+ for (i = 0; i < max; i++) { -+ -+ if (mb_test_bit(i, buddy)) { -+ /* only single bit in buddy2 may be 1 */ -+ if (!mb_test_bit(i << 1, buddy2)) -+ J_ASSERT(mb_test_bit((i<<1)+1, buddy2)); -+ else if (!mb_test_bit((i << 1) + 1, buddy2)) -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ continue; -+ } -+ -+ /* both bits in buddy2 must be 0 */ -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ J_ASSERT(mb_test_bit((i << 1) + 1, buddy2)); -+ -+ for (j = 0; j < (1 << order); j++) { -+ k = (i * (1 << order)) + j; -+ J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b))); -+ } -+ count++; -+ } -+ J_ASSERT(e3b->bd_info->bb_counters[order] == count); -+ order--; -+ } -+ -+ fstart = -1; -+ buddy = mb_find_buddy(e3b, 0, &max); -+ for (i = 0; i < max; i++) { -+ if (!mb_test_bit(i, buddy)) { -+ J_ASSERT(i >= e3b->bd_info->bb_first_free); -+ if (fstart == -1) { -+ fragments++; -+ fstart = i; -+ } -+ continue; -+ } -+ fstart = -1; -+ /* check used bits only */ -+ for (j = 0; j < e3b->bd_blkbits + 1; j++) { -+ buddy2 = mb_find_buddy(e3b, j, &max2); -+ k = i >> j; -+ J_ASSERT(k < max2); -+ J_ASSERT(mb_test_bit(k, buddy2)); -+ } -+ } -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info)); -+ J_ASSERT(e3b->bd_info->bb_fragments == fragments); -+} -+ -+#else -+#define mb_check_buddy(e3b) -+#endif -+ -+/* find most significant bit */ -+static int inline fmsb(unsigned short word) -+{ -+ int order; -+ -+ if (word > 255) { -+ order = 7; -+ word >>= 8; -+ } else { -+ order = -1; -+ } -+ -+ do { -+ order++; -+ word >>= 1; -+ } while (word != 0); -+ -+ return order; -+} -+ -+static void inline -+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first, -+ int len, struct ext3_group_info *grp) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ unsigned short min, max, chunk, border; -+ -+ mb_debug("mark %u/%u free\n", first, len); -+ J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ border = 2 << sb->s_blocksize_bits; -+ -+ while (len > 0) { -+ /* find how many blocks can be covered since this position */ -+ max = ffs(first | border) - 1; -+ -+ /* find how many blocks of power 2 we need to mark */ -+ min = fmsb(len); -+ -+ mb_debug(" %u/%u -> max %u, min %u\n", -+ first & ((2 << sb->s_blocksize_bits) - 1), -+ len, max, min); -+ -+ if (max < min) -+ min = max; -+ chunk = 1 << min; -+ -+ /* mark multiblock chunks only */ -+ grp->bb_counters[min]++; -+ if (min > 0) { -+ mb_debug(" set %u at %u \n", first >> min, -+ sbi->s_mb_offsets[min]); -+ mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]); -+ } -+ -+ len -= chunk; -+ first += chunk; -+ } -+} -+ -+static void -+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap, -+ int group) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group); -+ unsigned short max = EXT3_BLOCKS_PER_GROUP(sb); -+ unsigned short i = 0, first, len; -+ unsigned free = 0, fragments = 0; -+ unsigned long long period = get_cycles(); -+ -+ i = mb_find_next_zero_bit(bitmap, max, 0); -+ grp->bb_first_free = i; -+ while (i < max) { -+ fragments++; -+ first = i; -+ i = ext2_find_next_le_bit(bitmap, max, i); -+ len = i - first; -+ free += len; -+ if (len > 1) -+ ext3_mb_mark_free_simple(sb, buddy, first, len, grp); -+ else -+ grp->bb_counters[0]++; -+ if (i < max) -+ i = mb_find_next_zero_bit(bitmap, max, i); -+ } -+ grp->bb_fragments = fragments; -+ -+ /* bb_state shouldn't being modified because all -+ * others waits for init completion on page lock */ -+ clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state); -+ if (free != grp->bb_free) { -+ printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n", -+ group, free, grp->bb_free); -+ grp->bb_free = free; -+ } -+ -+ period = get_cycles() - period; -+ spin_lock(&EXT3_SB(sb)->s_bal_lock); -+ EXT3_SB(sb)->s_mb_buddies_generated++; -+ EXT3_SB(sb)->s_mb_generation_time += period; -+ spin_unlock(&EXT3_SB(sb)->s_bal_lock); -+} -+ -+static int ext3_mb_init_cache(struct page *page) -+{ -+ int blocksize, blocks_per_page, groups_per_page; -+ int err = 0, i, first_group, first_block; -+ struct super_block *sb; -+ struct buffer_head *bhs; -+ struct buffer_head **bh; -+ struct inode *inode; -+ char *data, *bitmap; -+ -+ mb_debug("init page %lu\n", page->index); -+ -+ inode = page->mapping->host; -+ sb = inode->i_sb; -+ blocksize = 1 << inode->i_blkbits; -+ blocks_per_page = PAGE_CACHE_SIZE / blocksize; -+ -+ groups_per_page = blocks_per_page >> 1; -+ if (groups_per_page == 0) -+ groups_per_page = 1; -+ -+ /* allocate buffer_heads to read bitmaps */ -+ if (groups_per_page > 1) { -+ err = -ENOMEM; -+ i = sizeof(struct buffer_head *) * groups_per_page; -+ bh = kmalloc(i, GFP_NOFS); -+ if (bh == NULL) -+ goto out; -+ memset(bh, 0, i); -+ } else -+ bh = &bhs; -+ -+ first_group = page->index * blocks_per_page / 2; -+ -+ /* read all groups the page covers into the cache */ -+ for (i = 0; i < groups_per_page; i++) { -+ struct ext3_group_desc * desc; -+ -+ if (first_group + i >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ err = -EIO; -+ desc = ext3_get_group_desc(sb, first_group + i, NULL); -+ if (desc == NULL) -+ goto out; -+ -+ err = -ENOMEM; -+ bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ if (bh[i] == NULL) -+ goto out; -+ -+ if (buffer_uptodate(bh[i])) -+ continue; -+ -+ lock_buffer(bh[i]); -+ if (buffer_uptodate(bh[i])) { -+ unlock_buffer(bh[i]); -+ continue; -+ } -+ -+ get_bh(bh[i]); -+ bh[i]->b_end_io = end_buffer_read_sync; -+ submit_bh(READ, bh[i]); -+ mb_debug("read bitmap for group %u\n", first_group + i); -+ } -+ -+ /* wait for I/O completion */ -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ wait_on_buffer(bh[i]); -+ -+ err = -EIO; -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ if (!buffer_uptodate(bh[i])) -+ goto out; -+ -+ first_block = page->index * blocks_per_page; -+ for (i = 0; i < blocks_per_page; i++) { -+ int group; -+ -+ group = (first_block + i) >> 1; -+ if (group >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ data = page_address(page) + (i * blocksize); -+ bitmap = bh[group - first_group]->b_data; -+ -+ if ((first_block + i) & 1) { -+ /* this is block of buddy */ -+ mb_debug("put buddy for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memset(data, 0xff, blocksize); -+ EXT3_GROUP_INFO(sb, group)->bb_fragments = 0; -+ memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0, -+ sizeof(unsigned short)*(sb->s_blocksize_bits+2)); -+ ext3_mb_generate_buddy(sb, data, bitmap, group); -+ } else { -+ /* this is block of bitmap */ -+ mb_debug("put bitmap for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memcpy(data, bitmap, blocksize); -+ } -+ } -+ SetPageUptodate(page); -+ -+out: -+ if (bh) { -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ brelse(bh[i]); -+ if (bh != &bhs) -+ kfree(bh); -+ } -+ return err; -+} -+ -+static int ext3_mb_load_buddy(struct super_block *sb, int group, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *inode = sbi->s_buddy_cache; -+ int blocks_per_page, block, pnum, poff; -+ struct page *page; -+ -+ mb_debug("load group %u\n", group); -+ -+ blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize; -+ -+ e3b->bd_blkbits = sb->s_blocksize_bits; -+ e3b->bd_info = EXT3_GROUP_INFO(sb, group); -+ e3b->bd_sb = sb; -+ e3b->bd_group = group; -+ e3b->bd_buddy_page = NULL; -+ e3b->bd_bitmap_page = NULL; -+ -+ block = group * 2; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ /* we could use find_or_create_page(), but it locks page -+ * what we'd like to avoid in fast path ... */ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_bitmap_page = page; -+ e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ block++; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_buddy_page = page; -+ e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ return 0; -+ -+err: -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+ e3b->bd_buddy = NULL; -+ e3b->bd_bitmap = NULL; -+ return -EIO; -+} -+ -+static void ext3_mb_release_desc(struct ext3_buddy *e3b) -+{ -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+} -+ -+ -+static inline void -+ext3_lock_group(struct super_block *sb, int group) -+{ -+ bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static inline void -+ext3_unlock_group(struct super_block *sb, int group) -+{ -+ bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block) -+{ -+ int order = 1; -+ void *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(block < (1 << (e3b->bd_blkbits + 3))); -+ -+ bb = EXT3_MB_BUDDY(e3b); -+ while (order <= e3b->bd_blkbits + 1) { -+ block = block >> 1; -+ if (!mb_test_bit(block, bb)) { -+ /* this block is part of buddy of order 'order' */ -+ return order; -+ } -+ bb += 1 << (e3b->bd_blkbits - order); -+ order++; -+ } -+ return 0; -+} -+ -+static inline void mb_clear_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0; -+ cur += 32; -+ continue; -+ } -+ mb_clear_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static inline void mb_set_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0xffffffff; -+ cur += 32; -+ continue; -+ } -+ mb_set_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count) -+{ -+ int block = 0, max = 0, order; -+ void *buddy, *buddy2; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free += count; -+ if (first < e3b->bd_info->bb_first_free) -+ e3b->bd_info->bb_first_free = first; -+ -+ /* let's maintain fragments counter */ -+ if (first != 0) -+ block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b)); -+ if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b)); -+ if (block && max) -+ e3b->bd_info->bb_fragments--; -+ else if (!block && !max) -+ e3b->bd_info->bb_fragments++; -+ -+ /* let's maintain buddy itself */ -+ while (count-- > 0) { -+ block = first++; -+ order = 0; -+ -+ J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b))); -+ mb_clear_bit(block, EXT3_MB_BITMAP(e3b)); -+ e3b->bd_info->bb_counters[order]++; -+ -+ /* start of the buddy */ -+ buddy = mb_find_buddy(e3b, order, &max); -+ -+ do { -+ block &= ~1UL; -+ if (mb_test_bit(block, buddy) || -+ mb_test_bit(block + 1, buddy)) -+ break; -+ -+ /* both the buddies are free, try to coalesce them */ -+ buddy2 = mb_find_buddy(e3b, order + 1, &max); -+ -+ if (!buddy2) -+ break; -+ -+ if (order > 0) { -+ /* for special purposes, we don't set -+ * free bits in bitmap */ -+ mb_set_bit(block, buddy); -+ mb_set_bit(block + 1, buddy); -+ } -+ e3b->bd_info->bb_counters[order]--; -+ e3b->bd_info->bb_counters[order]--; -+ -+ block = block >> 1; -+ order++; -+ e3b->bd_info->bb_counters[order]++; -+ -+ mb_clear_bit(block, buddy2); -+ buddy = buddy2; -+ } while (1); -+ } -+ mb_check_buddy(e3b); -+ -+ return 0; -+} -+ -+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block, -+ int needed, struct ext3_free_extent *ex) -+{ -+ int next = block, max, ord; -+ void *buddy; -+ -+ J_ASSERT(ex != NULL); -+ -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ J_ASSERT(block < max); -+ if (mb_test_bit(block, buddy)) { -+ ex->fe_len = 0; -+ ex->fe_start = 0; -+ ex->fe_group = 0; -+ return 0; -+ } -+ -+ if (likely(order == 0)) { -+ /* find actual order */ -+ order = mb_find_order_for_block(e3b, block); -+ block = block >> order; -+ } -+ -+ ex->fe_len = 1 << order; -+ ex->fe_start = block << order; -+ ex->fe_group = e3b->bd_group; -+ -+ /* calc difference from given start */ -+ next = next - ex->fe_start; -+ ex->fe_len -= next; -+ ex->fe_start += next; -+ -+ while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) { -+ -+ if (block + 1 >= max) -+ break; -+ -+ next = (block + 1) * (1 << order); -+ if (mb_test_bit(next, EXT3_MB_BITMAP(e3b))) -+ break; -+ -+ ord = mb_find_order_for_block(e3b, next); -+ -+ order = ord; -+ block = next >> order; -+ ex->fe_len += 1 << order; -+ } -+ -+ J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3))); -+ return ex->fe_len; -+} -+ -+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex) -+{ -+ int ord, mlen = 0, max = 0, cur; -+ int start = ex->fe_start; -+ int len = ex->fe_len; -+ unsigned ret = 0; -+ int len0 = len; -+ void *buddy; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free -= len; -+ if (e3b->bd_info->bb_first_free == start) -+ e3b->bd_info->bb_first_free += len; -+ -+ /* let's maintain fragments counter */ -+ if (start != 0) -+ mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b)); -+ if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b)); -+ if (mlen && max) -+ e3b->bd_info->bb_fragments++; -+ else if (!mlen && !max) -+ e3b->bd_info->bb_fragments--; -+ -+ /* let's maintain buddy itself */ -+ while (len) { -+ ord = mb_find_order_for_block(e3b, start); -+ -+ if (((start >> ord) << ord) == start && len >= (1 << ord)) { -+ /* the whole chunk may be allocated at once! */ -+ mlen = 1 << ord; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ J_ASSERT((start >> ord) < max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ start += mlen; -+ len -= mlen; -+ J_ASSERT(len >= 0); -+ continue; -+ } -+ -+ /* store for history */ -+ if (ret == 0) -+ ret = len | (ord << 16); -+ -+ /* we have to split large buddy */ -+ J_ASSERT(ord > 0); -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ -+ ord--; -+ cur = (start >> ord) & ~1U; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_clear_bit(cur, buddy); -+ mb_clear_bit(cur + 1, buddy); -+ e3b->bd_info->bb_counters[ord]++; -+ e3b->bd_info->bb_counters[ord]++; -+ } -+ -+ /* now drop all the bits in bitmap */ -+ mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0); -+ -+ mb_check_buddy(e3b); -+ -+ return ret; -+} -+ -+/* -+ * Must be called under group lock! -+ */ -+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ unsigned long ret; -+ -+ ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len); -+ ret = mb_mark_used(e3b, &ac->ac_b_ex); -+ -+ ac->ac_status = AC_STATUS_FOUND; -+ ac->ac_tail = ret & 0xffff; -+ ac->ac_buddy = ret >> 16; -+ -+ /* hold in-core structures until allocated -+ * blocks are marked non-free in on-disk bitmap */ -+ ac->ac_buddy_page = e3b->bd_buddy_page; -+ page_cache_get(e3b->bd_buddy_page); -+ ac->ac_bitmap_page = e3b->bd_bitmap_page; -+ page_cache_get(e3b->bd_bitmap_page); -+} -+ -+/* -+ * The routine checks whether found extent is good enough. If it is, -+ * then the extent gets marked used and flag is set to the context -+ * to stop scanning. Otherwise, the extent is compared with the -+ * previous found extent and if new one is better, then it's stored -+ * in the context. Later, the best found extent will be used, if -+ * mballoc can't find good enough extent. -+ * -+ * FIXME: real allocation policy is to be designed yet! -+ */ -+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac, -+ struct ext3_free_extent *ex, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent *bex = &ac->ac_b_ex; -+ struct ext3_free_extent *gex = &ac->ac_g_ex; -+ -+ J_ASSERT(ex->fe_len > 0); -+ J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ -+ ac->ac_found++; -+ -+ /* -+ * The special case - take what you catch first -+ */ -+ if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * Let's check whether the chunk is good enough -+ */ -+ if (ex->fe_len == gex->fe_len) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * If this is first found extent, just store it in the context -+ */ -+ if (bex->fe_len == 0) { -+ *bex = *ex; -+ return; -+ } -+ -+ /* -+ * If new found extent is better, store it in the context -+ */ -+ if (bex->fe_len < gex->fe_len) { -+ /* if the request isn't satisfied, any found extent -+ * larger than previous best one is better */ -+ if (ex->fe_len > bex->fe_len) -+ *bex = *ex; -+ } else if (ex->fe_len > gex->fe_len) { -+ /* if the request is satisfied, then we try to find -+ * an extent that still satisfy the request, but is -+ * smaller than previous one */ -+ *bex = *ex; -+ } -+ -+ /* -+ * Let's scan at least few extents and don't pick up a first one -+ */ -+ if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+ -+ /* -+ * We don't want to scan for a whole year -+ */ -+ if (ac->ac_found > ext3_mb_max_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+} -+ -+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent ex = ac->ac_b_ex; -+ int group = ex.fe_group, max, err; -+ -+ J_ASSERT(ex.fe_len > 0); -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex); -+ -+ if (max > 0) { -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ int group = ac->ac_g_ex.fe_group, max, err; -+ struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb); -+ struct ext3_super_block *es = sbi->s_es; -+ struct ext3_free_extent ex; -+ -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start, -+ ac->ac_g_ex.fe_len, &ex); -+ -+ if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) { -+ unsigned long start; -+ start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) + -+ ex.fe_start + le32_to_cpu(es->s_first_data_block)); -+ if (start % sbi->s_stripe == 0) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ } else if (max >= ac->ac_g_ex.fe_len) { -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) { -+ /* Sometimes, caller may want to merge even small -+ * number of blocks to an existing extent */ -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+/* -+ * The routine scans buddy structures (not bitmap!) from given order -+ * to max order and tries to find big enough chunk to satisfy the req -+ */ -+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_group_info *grp = e3b->bd_info; -+ void *buddy; -+ int i, k, max; -+ -+ J_ASSERT(ac->ac_2order > 0); -+ for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) { -+ if (grp->bb_counters[i] == 0) -+ continue; -+ -+ buddy = mb_find_buddy(e3b, i, &max); -+ if (buddy == NULL) { -+ printk(KERN_ALERT "looking for wrong order?\n"); -+ break; -+ } -+ -+ k = mb_find_next_zero_bit(buddy, max, 0); -+ J_ASSERT(k < max); -+ -+ ac->ac_found++; -+ -+ ac->ac_b_ex.fe_len = 1 << i; -+ ac->ac_b_ex.fe_start = k << i; -+ ac->ac_b_ex.fe_group = e3b->bd_group; -+ -+ ext3_mb_use_best_found(ac, e3b); -+ J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len); -+ -+ if (unlikely(ext3_mb_stats)) -+ atomic_inc(&EXT3_SB(sb)->s_bal_2orders); -+ -+ break; -+ } -+} -+ -+/* -+ * The routine scans the group and measures all found extents. -+ * In order to optimize scanning, caller must pass number of -+ * free blocks in the group, so the routine can know upper limit. -+ */ -+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ int i, free; -+ -+ free = e3b->bd_info->bb_free; -+ J_ASSERT(free > 0); -+ -+ i = e3b->bd_info->bb_first_free; -+ -+ while (free && ac->ac_status == AC_STATUS_CONTINUE) { -+ i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i); -+ if (i >= sb->s_blocksize * 8) { -+ J_ASSERT(free == 0); -+ break; -+ } -+ -+ mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex); -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(free >= ex.fe_len); -+ -+ ext3_mb_measure_extent(ac, &ex, e3b); -+ -+ i += ex.fe_len; -+ free -= ex.fe_len; -+ } -+} -+ -+/* -+ * This is a special case for storages like raid5 -+ * we try to find stripe-aligned chunks for stripe-size requests -+ */ -+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ unsigned long i, max; -+ -+ J_ASSERT(sbi->s_stripe != 0); -+ -+ /* find first stripe-aligned block */ -+ i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + le32_to_cpu(sbi->s_es->s_first_data_block); -+ i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe; -+ i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) -+ % EXT3_BLOCKS_PER_GROUP(sb); -+ -+ while (i < sb->s_blocksize * 8) { -+ if (!mb_test_bit(i, bitmap)) { -+ max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex); -+ if (max >= sbi->s_stripe) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ break; -+ } -+ } -+ i += sbi->s_stripe; -+ } -+} -+ -+static int ext3_mb_good_group(struct ext3_allocation_context *ac, -+ int group, int cr) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group); -+ unsigned free, fragments, i, bits; -+ -+ J_ASSERT(cr >= 0 && cr < 4); -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp)); -+ -+ free = grp->bb_free; -+ fragments = grp->bb_fragments; -+ if (free == 0) -+ return 0; -+ if (fragments == 0) -+ return 0; -+ -+ switch (cr) { -+ case 0: -+ J_ASSERT(ac->ac_2order != 0); -+ bits = ac->ac_sb->s_blocksize_bits + 1; -+ for (i = ac->ac_2order; i <= bits; i++) -+ if (grp->bb_counters[i] > 0) -+ return 1; -+ break; -+ case 1: -+ if ((free / fragments) >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 2: -+ if (free >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 3: -+ return 1; -+ default: -+ BUG(); -+ } -+ -+ return 0; -+} -+ -+int ext3_mb_new_blocks(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *len, int flags, int *errp) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_allocation_context ac; -+ int i, group, block, cr, err = 0; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ struct buffer_head *gdp_bh; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ -+ J_ASSERT(len != NULL); -+ J_ASSERT(*len > 0); -+ -+ sb = inode->i_sb; -+ if (!sb) { -+ printk("ext3_mb_new_nblocks: nonexistent device"); -+ return 0; -+ } -+ -+ if (!test_opt(sb, MBALLOC)) { -+ static int ext3_mballoc_warning = 0; -+ if (ext3_mballoc_warning == 0) { -+ printk(KERN_ERR "EXT3-fs: multiblock request with " -+ "mballoc disabled!\n"); -+ ext3_mballoc_warning++; -+ } -+ *len = 1; -+ err = ext3_new_block_old(handle, inode, goal, errp); -+ return err; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ -+ /* -+ * We can't allocate > group size -+ */ -+ if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10) -+ *len = EXT3_BLOCKS_PER_GROUP(sb) - 10; -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* someone asks for non-reserved blocks */ -+ BUG_ON(*len > 1); -+ err = ext3_mb_reserve_blocks(sb, 1); -+ if (err) { -+ *errp = err; -+ return 0; -+ } -+ } -+ -+ ac.ac_buddy_page = NULL; -+ ac.ac_bitmap_page = NULL; -+ -+ /* -+ * Check quota for allocation of this blocks. -+ */ -+ while (*len && DQUOT_ALLOC_BLOCK(inode, *len)) -+ *len -= 1; -+ if (*len == 0) { -+ *errp = -EDQUOT; -+ block = 0; -+ goto out; -+ } -+ -+ /* start searching from the goal */ -+ if (goal < le32_to_cpu(es->s_first_data_block) || -+ goal >= le32_to_cpu(es->s_blocks_count)) -+ goal = le32_to_cpu(es->s_first_data_block); -+ group = (goal - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ block = ((goal - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ /* set up allocation goals */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_groups_scanned = 0; -+ ac.ac_ex_scanned = 0; -+ ac.ac_found = 0; -+ ac.ac_sb = inode->i_sb; -+ ac.ac_g_ex.fe_group = group; -+ ac.ac_g_ex.fe_start = block; -+ ac.ac_g_ex.fe_len = *len; -+ ac.ac_flags = flags; -+ ac.ac_2order = 0; -+ ac.ac_criteria = 0; -+ -+ if (*len == 1 && sbi->s_stripe) { -+ /* looks like a metadata, let's use a dirty hack for raid5 -+ * move all metadata in first groups in hope to hit cached -+ * sectors and thus avoid read-modify cycles in raid5 */ -+ ac.ac_g_ex.fe_group = group = 0; -+ } -+ -+ /* probably, the request is for 2^8+ blocks (1/2/3/... MB) */ -+ i = ffs(*len); -+ if (i >= ext3_mb_order2_reqs) { -+ i--; -+ if ((*len & (~(1 << i))) == 0) -+ ac.ac_2order = i; -+ } -+ -+ /* first, try the goal */ -+ err = ext3_mb_find_by_goal(&ac, &e3b); -+ if (err) -+ goto out_err; -+ if (ac.ac_status == AC_STATUS_FOUND) -+ goto found; -+ -+ /* Let's just scan groups to find more-less suitable blocks */ -+ cr = ac.ac_2order ? 0 : 1; -+repeat: -+ for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) { -+ ac.ac_criteria = cr; -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) { -+ if (group == EXT3_SB(sb)->s_groups_count) -+ group = 0; -+ -+ if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) { -+ /* we need full data about the group -+ * to make a good selection */ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ ext3_mb_release_desc(&e3b); -+ } -+ -+ /* check is group good for our criteries */ -+ if (!ext3_mb_good_group(&ac, group, cr)) -+ continue; -+ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ -+ ext3_lock_group(sb, group); -+ if (!ext3_mb_good_group(&ac, group, cr)) { -+ /* someone did allocation from this group */ -+ ext3_unlock_group(sb, group); -+ ext3_mb_release_desc(&e3b); -+ continue; -+ } -+ -+ ac.ac_groups_scanned++; -+ if (cr == 0) -+ ext3_mb_simple_scan_group(&ac, &e3b); -+ else if (cr == 1 && *len == sbi->s_stripe) -+ ext3_mb_scan_aligned(&ac, &e3b); -+ else -+ ext3_mb_complex_scan_group(&ac, &e3b); -+ -+ ext3_unlock_group(sb, group); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ if (ac.ac_status != AC_STATUS_CONTINUE) -+ break; -+ } -+ } -+ -+ if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND && -+ !(ac.ac_flags & EXT3_MB_HINT_FIRST)) { -+ /* -+ * We've been searching too long. Let's try to allocate -+ * the best chunk we've found so far -+ */ -+ -+ /*if (ac.ac_found > ext3_mb_max_to_scan) -+ printk(KERN_DEBUG "EXT3-fs: too long searching at " -+ "%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len, -+ ac.ac_g_ex.fe_len);*/ -+ ext3_mb_try_best_found(&ac, &e3b); -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * Someone more lucky has already allocated it. -+ * The only thing we can do is just take first -+ * found block(s) -+ printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n"); -+ */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_flags |= EXT3_MB_HINT_FIRST; -+ cr = 3; -+ goto repeat; -+ } -+ } -+ -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * We aren't lucky definitely -+ */ -+ DQUOT_FREE_BLOCK(inode, *len); -+ *errp = -ENOSPC; -+ block = 0; -+#if 1 -+ printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n", -+ ac.ac_status, ac.ac_flags); -+ printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n", -+ ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group, -+ ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr); -+ printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n", -+ sbi->s_blocks_reserved, ac.ac_found); -+ printk("EXT3-fs: groups: "); -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) -+ printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free); -+ printk("\n"); -+#endif -+ goto out; -+ } -+ -+found: -+ J_ASSERT(ac.ac_b_ex.fe_len > 0); -+ -+ /* good news - free block(s) have been found. now it's time -+ * to mark block(s) in good old journaled bitmap */ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ /* we made a desicion, now mark found blocks in good old -+ * bitmap to be journaled */ -+ -+ ext3_debug("using block group %d(%d)\n", -+ ac.ac_b_group.group, gdp->bg_free_blocks_count); -+ -+ bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group); -+ if (!bitmap_bh) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) { -+ *errp = err; -+ goto out_err; -+ } -+ -+ gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh); -+ if (!gdp) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ if (block == le32_to_cpu(gdp->bg_block_bitmap) || -+ block == le32_to_cpu(gdp->bg_inode_bitmap) || -+ in_range(block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error(sb, "ext3_new_block", -+ "Allocating block in system zone - " -+ "block = %u", block); -+#ifdef AGGRESSIVE_CHECK -+ for (i = 0; i < ac.ac_b_ex.fe_len; i++) -+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data)); -+#endif -+ mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len); -+ -+ spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) -+ - ac.ac_b_ex.fe_len); -+ spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len); -+ -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ if (err) -+ goto out_err; -+ err = ext3_journal_dirty_metadata(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ sb->s_dirt = 1; -+ *errp = 0; -+ brelse(bitmap_bh); -+ -+ /* drop non-allocated, but dquote'd blocks */ -+ J_ASSERT(*len >= ac.ac_b_ex.fe_len); -+ DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len); -+ -+ *len = ac.ac_b_ex.fe_len; -+ J_ASSERT(*len > 0); -+ J_ASSERT(block != 0); -+ goto out; -+ -+out_err: -+ /* if we've already allocated something, roll it back */ -+ if (ac.ac_status == AC_STATUS_FOUND) { -+ /* FIXME: free blocks here */ -+ } -+ -+ DQUOT_FREE_BLOCK(inode, *len); -+ brelse(bitmap_bh); -+ *errp = err; -+ block = 0; -+out: -+ if (ac.ac_buddy_page) -+ page_cache_release(ac.ac_buddy_page); -+ if (ac.ac_bitmap_page) -+ page_cache_release(ac.ac_bitmap_page); -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* block wasn't reserved before and we reserved it -+ * at the beginning of allocation. it doesn't matter -+ * whether we allocated anything or we failed: time -+ * to release reservation. NOTE: because I expect -+ * any multiblock request from delayed allocation -+ * path only, here is single block always */ -+ ext3_mb_release_blocks(sb, 1); -+ } -+ -+ if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) { -+ atomic_inc(&sbi->s_bal_reqs); -+ atomic_add(*len, &sbi->s_bal_allocated); -+ if (*len >= ac.ac_g_ex.fe_len) -+ atomic_inc(&sbi->s_bal_success); -+ atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned); -+ if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start && -+ ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group) -+ atomic_inc(&sbi->s_bal_goals); -+ if (ac.ac_found > ext3_mb_max_to_scan) -+ atomic_inc(&sbi->s_bal_breaks); -+ } -+ -+ ext3_mb_store_history(sb, inode->i_ino, &ac); -+ -+ return block; -+} -+EXPORT_SYMBOL(ext3_mb_new_blocks); -+ -+#ifdef EXT3_MB_HISTORY -+struct ext3_mb_proc_session { -+ struct ext3_mb_history *history; -+ struct super_block *sb; -+ int start; -+ int max; -+}; -+ -+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s, -+ struct ext3_mb_history *hs, -+ int first) -+{ -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (!first && hs == s->history + s->start) -+ return NULL; -+ while (hs->goal.fe_len == 0) { -+ hs++; -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (hs == s->history + s->start) -+ return NULL; -+ } -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ if (!hs) -+ return NULL; -+ while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL); -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ else -+ return ext3_mb_history_skip_empty(s, ++hs, 0); -+} -+ -+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct ext3_mb_history *hs = v; -+ char buf[20], buf2[20]; -+ -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n", -+ "pid", "inode", "goal", "result", "found", "grps", "cr", -+ "merge", "tail", "broken"); -+ return 0; -+ } -+ -+ sprintf(buf, "%u/%u/%u", hs->goal.fe_group, -+ hs->goal.fe_start, hs->goal.fe_len); -+ sprintf(buf2, "%u/%u/%u", hs->result.fe_group, -+ hs->result.fe_start, hs->result.fe_len); -+ seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n", -+ hs->pid, hs->ino, buf, buf2, hs->found, hs->groups, -+ hs->cr, hs->merged ? "M" : "", hs->tail, -+ hs->buddy ? 1 << hs->buddy : 0); -+ return 0; -+} -+ -+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_history_ops = { -+ .start = ext3_mb_seq_history_start, -+ .next = ext3_mb_seq_history_next, -+ .stop = ext3_mb_seq_history_stop, -+ .show = ext3_mb_seq_history_show, -+}; -+ -+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max; -+ s->history = kmalloc(size, GFP_KERNEL); -+ if (s == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(s->history, sbi->s_mb_history, size); -+ s->max = sbi->s_mb_history_max; -+ s->start = sbi->s_mb_history_cur % s->max; -+ spin_unlock(&sbi->s_mb_history_lock); -+ -+ rc = seq_open(file, &ext3_mb_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->history); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct ext3_mb_proc_session *s = seq->private; -+ kfree(s->history); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations ext3_mb_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_history_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = ext3_mb_seq_history_release, -+}; -+ -+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ -+ group = *pos + 1; -+ return (void *) group; -+} -+ -+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ ++*pos; -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ group = *pos + 1; -+ return (void *) group;; -+} -+ -+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v) -+{ -+ struct super_block *sb = seq->private; -+ long group = (long) v, i; -+ struct sg { -+ struct ext3_group_info info; -+ unsigned short counters[16]; -+ } sg; -+ -+ group--; -+ if (group == 0) -+ seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n", -+ "group", "free", "frags", "first", "2^0", "2^1", "2^2", -+ "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10", -+ "2^11", "2^12", "2^13"); -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + -+ sizeof(struct ext3_group_info); -+ ext3_lock_group(sb, group); -+ memcpy(&sg, EXT3_GROUP_INFO(sb, group), i); -+ ext3_unlock_group(sb, group); -+ -+ if (EXT3_MB_GRP_NEED_INIT(&sg.info)) -+ return 0; -+ -+ seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free, -+ sg.info.bb_fragments, sg.info.bb_first_free); -+ for (i = 0; i <= 13; i++) -+ seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ? -+ sg.info.bb_counters[i] : 0); -+ seq_printf(seq, " ]\n"); -+ -+ return 0; -+} -+ -+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_groups_ops = { -+ .start = ext3_mb_seq_groups_start, -+ .next = ext3_mb_seq_groups_next, -+ .stop = ext3_mb_seq_groups_stop, -+ .show = ext3_mb_seq_groups_show, -+}; -+ -+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ int rc; -+ -+ rc = seq_open(file, &ext3_mb_seq_groups_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = sb; -+ } -+ return rc; -+ -+} -+ -+static struct file_operations ext3_mb_seq_groups_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_groups_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = seq_release, -+}; -+ -+static void ext3_mb_history_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ remove_proc_entry("mb_groups", sbi->s_mb_proc); -+ remove_proc_entry("mb_history", sbi->s_mb_proc); -+ remove_proc_entry(name, proc_root_ext3); -+ -+ if (sbi->s_mb_history) -+ kfree(sbi->s_mb_history); -+} -+ -+static void ext3_mb_history_init(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ int i; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3); -+ if (sbi->s_mb_proc != NULL) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_history_fops; -+ p->data = sb; -+ } -+ p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_groups_fops; -+ p->data = sb; -+ } -+ } -+ -+ sbi->s_mb_history_max = 1000; -+ sbi->s_mb_history_cur = 0; -+ spin_lock_init(&sbi->s_mb_history_lock); -+ i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history); -+ sbi->s_mb_history = kmalloc(i, GFP_KERNEL); -+ memset(sbi->s_mb_history, 0, i); -+ /* if we can't allocate history, then we simple won't use it */ -+} -+ -+static void -+ext3_mb_store_history(struct super_block *sb, unsigned ino, -+ struct ext3_allocation_context *ac) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_history h; -+ -+ if (likely(sbi->s_mb_history == NULL)) -+ return; -+ -+ h.pid = current->pid; -+ h.ino = ino; -+ h.goal = ac->ac_g_ex; -+ h.result = ac->ac_b_ex; -+ h.found = ac->ac_found; -+ h.cr = ac->ac_criteria; -+ h.groups = ac->ac_groups_scanned; -+ h.tail = ac->ac_tail; -+ h.buddy = ac->ac_buddy; -+ h.merged = 0; -+ if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start && -+ ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group) -+ h.merged = 1; -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h)); -+ if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max) -+ sbi->s_mb_history_cur = 0; -+ spin_unlock(&sbi->s_mb_history_lock); -+} -+ -+#else -+#define ext3_mb_history_release(sb) -+#define ext3_mb_history_init(sb) -+#endif -+ -+int ext3_mb_init_backend(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, j, len, metalen; -+ int num_meta_group_infos = -+ (sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ struct ext3_group_info **meta_group_info; -+ -+ /* An 8TB filesystem with 64-bit pointers requires a 4096 byte -+ * kmalloc. A 128kb malloc should suffice for a 256TB filesystem. -+ * So a two level scheme suffices for now. */ -+ sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) * -+ num_meta_group_infos, GFP_KERNEL); -+ if (sbi->s_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n"); -+ return -ENOMEM; -+ } -+ sbi->s_buddy_cache = new_inode(sb); -+ if (sbi->s_buddy_cache == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't get new inode\n"); -+ goto err_freesgi; -+ } -+ -+ metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) { -+ if ((i + 1) == num_meta_group_infos) -+ metalen = sizeof(*meta_group_info) * -+ (sbi->s_groups_count - -+ (i << EXT3_DESC_PER_BLOCK_BITS(sb))); -+ meta_group_info = kmalloc(metalen, GFP_KERNEL); -+ if (meta_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate mem for a " -+ "buddy group\n"); -+ goto err_freemeta; -+ } -+ sbi->s_group_info[i] = meta_group_info; -+ } -+ -+ /* -+ * calculate needed size. if change bb_counters size, -+ * don't forget about ext3_mb_generate_buddy() -+ */ -+ len = sizeof(struct ext3_group_info); -+ len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2); -+ for (i = 0; i < sbi->s_groups_count; i++) { -+ struct ext3_group_desc * desc; -+ -+ meta_group_info = -+ sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)]; -+ j = i & (EXT3_DESC_PER_BLOCK(sb) - 1); -+ -+ meta_group_info[j] = kmalloc(len, GFP_KERNEL); -+ if (meta_group_info[j] == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n"); -+ i--; -+ goto err_freebuddy; -+ } -+ desc = ext3_get_group_desc(sb, i, NULL); -+ if (desc == NULL) { -+ printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i); -+ goto err_freebuddy; -+ } -+ memset(meta_group_info[j], 0, len); -+ set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, -+ &meta_group_info[j]->bb_state); -+ meta_group_info[j]->bb_free = -+ le16_to_cpu(desc->bg_free_blocks_count); -+ } -+ -+ return 0; -+ -+err_freebuddy: -+ while (i >= 0) { -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ i--; -+ } -+ i = num_meta_group_infos; -+err_freemeta: -+ while (--i >= 0) -+ kfree(sbi->s_group_info[i]); -+ iput(sbi->s_buddy_cache); -+err_freesgi: -+ kfree(sbi->s_group_info); -+ return -ENOMEM; -+} -+ -+int ext3_mb_init(struct super_block *sb, int needs_recovery) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *root = sb->s_root->d_inode; -+ unsigned i, offset, max; -+ struct dentry *dentry; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short); -+ -+ sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_offsets == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ return -ENOMEM; -+ } -+ sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_maxs == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_maxs); -+ return -ENOMEM; -+ } -+ -+ /* order 0 is regular bitmap */ -+ sbi->s_mb_maxs[0] = sb->s_blocksize << 3; -+ sbi->s_mb_offsets[0] = 0; -+ -+ i = 1; -+ offset = 0; -+ max = sb->s_blocksize << 2; -+ do { -+ sbi->s_mb_offsets[i] = offset; -+ sbi->s_mb_maxs[i] = max; -+ offset += 1 << (sb->s_blocksize_bits - i); -+ max = max >> 1; -+ i++; -+ } while (i <= sb->s_blocksize_bits + 1); -+ -+ /* init file for buddy data */ -+ if ((i = ext3_mb_init_backend(sb))) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_offsets); -+ kfree(sbi->s_mb_maxs); -+ return i; -+ } -+ -+ spin_lock_init(&sbi->s_reserve_lock); -+ spin_lock_init(&sbi->s_md_lock); -+ INIT_LIST_HEAD(&sbi->s_active_transaction); -+ INIT_LIST_HEAD(&sbi->s_closed_transaction); -+ INIT_LIST_HEAD(&sbi->s_committed_transaction); -+ spin_lock_init(&sbi->s_bal_lock); -+ -+ /* remove old on-disk buddy file */ -+ down(&root->i_sem); -+ dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy")); -+ if (dentry->d_inode != NULL) { -+ i = vfs_unlink(root, dentry); -+ if (i != 0) -+ printk("EXT3-fs: can't remove .buddy file: %d\n", i); -+ } -+ dput(dentry); -+ up(&root->i_sem); -+ -+ ext3_mb_history_init(sb); -+ -+ printk("EXT3-fs: mballoc enabled\n"); -+ return 0; -+} -+ -+int ext3_mb_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, num_meta_group_infos; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ /* release freed, non-committed blocks */ -+ spin_lock(&sbi->s_md_lock); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_committed_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ ext3_mb_free_committed_blocks(sb); -+ -+ if (sbi->s_group_info) { -+ for (i = 0; i < sbi->s_groups_count; i++) -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ num_meta_group_infos = (sbi->s_groups_count + -+ EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) -+ kfree(sbi->s_group_info[i]); -+ kfree(sbi->s_group_info); -+ } -+ if (sbi->s_mb_offsets) -+ kfree(sbi->s_mb_offsets); -+ if (sbi->s_mb_maxs) -+ kfree(sbi->s_mb_maxs); -+ if (sbi->s_buddy_cache) -+ iput(sbi->s_buddy_cache); -+ if (sbi->s_blocks_reserved) -+ printk("ext3-fs: %ld blocks being reserved at umount!\n", -+ sbi->s_blocks_reserved); -+ if (ext3_mb_stats) { -+ printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n", -+ atomic_read(&sbi->s_bal_allocated), -+ atomic_read(&sbi->s_bal_reqs), -+ atomic_read(&sbi->s_bal_success)); -+ printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, " -+ "%u 2^N hits, %u breaks\n", -+ atomic_read(&sbi->s_bal_ex_scanned), -+ atomic_read(&sbi->s_bal_goals), -+ atomic_read(&sbi->s_bal_2orders), -+ atomic_read(&sbi->s_bal_breaks)); -+ printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n", -+ sbi->s_mb_buddies_generated++, -+ sbi->s_mb_generation_time); -+ } -+ -+ ext3_mb_history_release(sb); -+ -+ return 0; -+} -+ -+void ext3_mb_free_committed_blocks(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int err, i, count = 0, count2 = 0; -+ struct ext3_free_metadata *md; -+ struct ext3_buddy e3b; -+ -+ if (list_empty(&sbi->s_committed_transaction)) -+ return; -+ -+ /* there is committed blocks to be freed yet */ -+ do { -+ /* get next array of blocks */ -+ md = NULL; -+ spin_lock(&sbi->s_md_lock); -+ if (!list_empty(&sbi->s_committed_transaction)) { -+ md = list_entry(sbi->s_committed_transaction.next, -+ struct ext3_free_metadata, list); -+ list_del(&md->list); -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ if (md == NULL) -+ break; -+ -+ mb_debug("gonna free %u blocks in group %u (0x%p):", -+ md->num, md->group, md); -+ -+ err = ext3_mb_load_buddy(sb, md->group, &e3b); -+ /* we expect to find existing buddy because it's pinned */ -+ BUG_ON(err != 0); -+ -+ /* there are blocks to put in buddy to make them really free */ -+ count += md->num; -+ count2++; -+ ext3_lock_group(sb, md->group); -+ for (i = 0; i < md->num; i++) { -+ mb_debug(" %u", md->blocks[i]); -+ mb_free_blocks(&e3b, md->blocks[i], 1); -+ } -+ mb_debug("\n"); -+ ext3_unlock_group(sb, md->group); -+ -+ /* balance refcounts from ext3_mb_free_metadata() */ -+ page_cache_release(e3b.bd_buddy_page); -+ page_cache_release(e3b.bd_bitmap_page); -+ -+ kfree(md); -+ ext3_mb_release_desc(&e3b); -+ -+ } while (md); -+ mb_debug("freed %u blocks in %u structures\n", count, count2); -+} -+ -+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ if (sbi->s_last_transaction == handle->h_transaction->t_tid) -+ return; -+ -+ /* new transaction! time to close last one and free blocks for -+ * committed transaction. we know that only transaction can be -+ * active, so previos transaction can be being logged and we -+ * know that transaction before previous is known to be already -+ * logged. this means that now we may free blocks freed in all -+ * transactions before previous one. hope I'm clear enough ... */ -+ -+ spin_lock(&sbi->s_md_lock); -+ if (sbi->s_last_transaction != handle->h_transaction->t_tid) { -+ mb_debug("new transaction %lu, old %lu\n", -+ (unsigned long) handle->h_transaction->t_tid, -+ (unsigned long) sbi->s_last_transaction); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_closed_transaction); -+ sbi->s_last_transaction = handle->h_transaction->t_tid; -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ ext3_mb_free_committed_blocks(sb); -+} -+ -+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b, -+ int group, int block, int count) -+{ -+ struct ext3_group_info *db = e3b->bd_info; -+ struct super_block *sb = e3b->bd_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_free_metadata *md; -+ int i; -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ ext3_lock_group(sb, group); -+ for (i = 0; i < count; i++) { -+ md = db->bb_md_cur; -+ if (md && db->bb_tid != handle->h_transaction->t_tid) { -+ db->bb_md_cur = NULL; -+ md = NULL; -+ } -+ -+ if (md == NULL) { -+ ext3_unlock_group(sb, group); -+ md = kmalloc(sizeof(*md), GFP_KERNEL); -+ if (md == NULL) -+ return -ENOMEM; -+ md->num = 0; -+ md->group = group; -+ -+ ext3_lock_group(sb, group); -+ if (db->bb_md_cur == NULL) { -+ spin_lock(&sbi->s_md_lock); -+ list_add(&md->list, &sbi->s_active_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ /* protect buddy cache from being freed, -+ * otherwise we'll refresh it from -+ * on-disk bitmap and lose not-yet-available -+ * blocks */ -+ page_cache_get(e3b->bd_buddy_page); -+ page_cache_get(e3b->bd_bitmap_page); -+ db->bb_md_cur = md; -+ db->bb_tid = handle->h_transaction->t_tid; -+ mb_debug("new md 0x%p for group %u\n", -+ md, md->group); -+ } else { -+ kfree(md); -+ md = db->bb_md_cur; -+ } -+ } -+ -+ BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS); -+ md->blocks[md->num] = block + i; -+ md->num++; -+ if (md->num == EXT3_BB_MAX_BLOCKS) { -+ /* no more space, put full container on a sb's list */ -+ db->bb_md_cur = NULL; -+ } -+ } -+ ext3_unlock_group(sb, group); -+ return 0; -+} -+ -+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode, -+ unsigned long block, unsigned long count, -+ int metadata, int *freed) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ unsigned long bit, overflow; -+ struct buffer_head *gd_bh; -+ unsigned long block_group; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ int err = 0, ret; -+ -+ *freed = 0; -+ sb = inode->i_sb; -+ if (!sb) { -+ printk ("ext3_free_blocks: nonexistent device"); -+ return; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ if (block < le32_to_cpu(es->s_first_data_block) || -+ block + count < block || -+ block + count > le32_to_cpu(es->s_blocks_count)) { -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks not in datazone - " -+ "block = %lu, count = %lu", block, count); -+ goto error_return; -+ } -+ -+ ext3_debug("freeing block %lu\n", block); -+ -+do_more: -+ overflow = 0; -+ block_group = (block - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ bit = (block - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb); -+ /* -+ * Check to see if we are freeing blocks across a group -+ * boundary. -+ */ -+ if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) { -+ overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb); -+ count -= overflow; -+ } -+ brelse(bitmap_bh); -+ bitmap_bh = read_block_bitmap(sb, block_group); -+ if (!bitmap_bh) -+ goto error_return; -+ gdp = ext3_get_group_desc (sb, block_group, &gd_bh); -+ if (!gdp) -+ goto error_return; -+ -+ if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) || -+ in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) || -+ in_range (block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group) || -+ in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks in system zones - " -+ "Block = %lu, count = %lu", -+ block, count); -+ -+ BUFFER_TRACE(bitmap_bh, "getting write access"); -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) -+ goto error_return; -+ -+ /* -+ * We are about to modify some metadata. Call the journal APIs -+ * to unshare ->b_data if a currently-committing transaction is -+ * using it -+ */ -+ BUFFER_TRACE(gd_bh, "get_write_access"); -+ err = ext3_journal_get_write_access(handle, gd_bh); -+ if (err) -+ goto error_return; -+ -+ err = ext3_mb_load_buddy(sb, block_group, &e3b); -+ if (err) -+ goto error_return; -+ -+#ifdef AGGRESSIVE_CHECK -+ { -+ int i; -+ for (i = 0; i < count; i++) -+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data)); -+ } -+#endif -+ mb_clear_bits(bitmap_bh->b_data, bit, count); -+ -+ /* We dirtied the bitmap block */ -+ BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ -+ if (metadata) { -+ /* blocks being freed are metadata. these blocks shouldn't -+ * be used until this transaction is committed */ -+ ext3_mb_free_metadata(handle, &e3b, block_group, bit, count); -+ } else { -+ ext3_lock_group(sb, block_group); -+ mb_free_blocks(&e3b, bit, count); -+ ext3_unlock_group(sb, block_group); -+ } -+ -+ spin_lock(sb_bgl_lock(sbi, block_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count); -+ spin_unlock(sb_bgl_lock(sbi, block_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, count); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ *freed = count; -+ -+ /* And the group descriptor block */ -+ BUFFER_TRACE(gd_bh, "dirtied group descriptor block"); -+ ret = ext3_journal_dirty_metadata(handle, gd_bh); -+ if (!err) err = ret; -+ -+ if (overflow && !err) { -+ block += count; -+ count = overflow; -+ goto do_more; -+ } -+ sb->s_dirt = 1; -+error_return: -+ brelse(bitmap_bh); -+ ext3_std_error(sb, err); -+ return; -+} -+ -+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int free, ret = -ENOSPC; -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ free = percpu_counter_read_positive(&sbi->s_freeblocks_counter); -+ if (blocks <= free - sbi->s_blocks_reserved) { -+ sbi->s_blocks_reserved += blocks; -+ ret = 0; -+ } -+ spin_unlock(&sbi->s_reserve_lock); -+ return ret; -+} -+ -+void ext3_mb_release_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ sbi->s_blocks_reserved -= blocks; -+ WARN_ON(sbi->s_blocks_reserved < 0); -+ if (sbi->s_blocks_reserved < 0) -+ sbi->s_blocks_reserved = 0; -+ spin_unlock(&sbi->s_reserve_lock); -+} -+ -+int ext3_new_block(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *errp) -+{ -+ int ret, len; -+ -+ if (!test_opt(inode->i_sb, MBALLOC)) { -+ ret = ext3_new_block_old(handle, inode, goal, errp); -+ goto out; -+ } -+ len = 1; -+ ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp); -+out: -+ return ret; -+} -+ -+ -+void ext3_free_blocks(handle_t *handle, struct inode * inode, -+ unsigned long block, unsigned long count, int metadata) -+{ -+ struct super_block *sb; -+ int freed; -+ -+ sb = inode->i_sb; -+ if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info) -+ ext3_free_blocks_old(handle, inode, block, count); -+ else { -+ ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed); -+ if (freed) -+ DQUOT_FREE_BLOCK(inode, freed); -+ } -+ return; -+} -+ -+#define EXT3_ROOT "ext3" -+#define EXT3_MB_STATS_NAME "mb_stats" -+#define EXT3_MB_MAX_TO_SCAN_NAME "mb_max_to_scan" -+#define EXT3_MB_MIN_TO_SCAN_NAME "mb_min_to_scan" -+#define EXT3_MB_ORDER2_REQ "mb_order2_req" -+ -+static int ext3_mb_stats_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_stats); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_stats_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_STATS_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0); -+ return count; -+} -+ -+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_max_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_max_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_min_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_min_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_order2_req_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_order2_reqs); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_order2_req_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_order2_reqs = value; -+ -+ return count; -+} -+ -+int __init init_ext3_proc(void) -+{ -+ struct proc_dir_entry *proc_ext3_mb_stats; -+ struct proc_dir_entry *proc_ext3_mb_max_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_min_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_order2_req; -+ -+ proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs); -+ if (proc_root_ext3 == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT); -+ return -EIO; -+ } -+ -+ /* Initialize EXT3_MB_STATS_NAME */ -+ proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_stats == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_STATS_NAME); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_stats->data = NULL; -+ proc_ext3_mb_stats->read_proc = ext3_mb_stats_read; -+ proc_ext3_mb_stats->write_proc = ext3_mb_stats_write; -+ -+ /* Initialize EXT3_MAX_TO_SCAN_NAME */ -+ proc_ext3_mb_max_to_scan = create_proc_entry( -+ EXT3_MB_MAX_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_max_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MAX_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_max_to_scan->data = NULL; -+ proc_ext3_mb_max_to_scan->read_proc = ext3_mb_max_to_scan_read; -+ proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write; -+ -+ /* Initialize EXT3_MIN_TO_SCAN_NAME */ -+ proc_ext3_mb_min_to_scan = create_proc_entry( -+ EXT3_MB_MIN_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_min_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MIN_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_min_to_scan->data = NULL; -+ proc_ext3_mb_min_to_scan->read_proc = ext3_mb_min_to_scan_read; -+ proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write; -+ -+ /* Initialize EXT3_ORDER2_REQ */ -+ proc_ext3_mb_order2_req = create_proc_entry( -+ EXT3_MB_ORDER2_REQ, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_order2_req == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_ORDER2_REQ); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_order2_req->data = NULL; -+ proc_ext3_mb_order2_req->read_proc = ext3_mb_order2_req_read; -+ proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write; -+ -+ return 0; -+} -+ -+void exit_ext3_proc(void) -+{ -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+} -Index: linux-2.6.5-7.282-full/fs/ext3/Makefile -=================================================================== ---- linux-2.6.5-7.282-full.orig/fs/ext3/Makefile 2006-10-24 22:18:28.000000000 +0400 -+++ linux-2.6.5-7.282-full/fs/ext3/Makefile 2006-10-24 22:18:28.000000000 +0400 -@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o \ -- extents.o -+ extents.o mballoc.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch deleted file mode 100644 index 135262a0ff..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch +++ /dev/null @@ -1,3102 +0,0 @@ -Index: linux-2.6.12.6-bull/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.12.6-bull.orig/include/linux/ext3_fs.h 2006-04-29 20:39:09.000000000 +0400 -+++ linux-2.6.12.6-bull/include/linux/ext3_fs.h 2006-04-29 20:39:10.000000000 +0400 -@@ -57,6 +57,14 @@ struct statfs; - #define ext3_debug(f, a...) do {} while (0) - #endif - -+#define EXT3_MULTIBLOCK_ALLOCATOR 1 -+ -+#define EXT3_MB_HINT_MERGE 1 -+#define EXT3_MB_HINT_RESERVED 2 -+#define EXT3_MB_HINT_METADATA 4 -+#define EXT3_MB_HINT_FIRST 8 -+#define EXT3_MB_HINT_BEST 16 -+ - /* - * Special inodes numbers - */ -@@ -366,6 +374,7 @@ struct ext3_inode { - #define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ - #define EXT3_MOUNT_EXTENTS 0x200000/* Extents support */ - #define EXT3_MOUNT_EXTDEBUG 0x400000/* Extents debug */ -+#define EXT3_MOUNT_MBALLOC 0x800000/* Buddy allocation support */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -387,6 +396,14 @@ struct ext3_inode { - #define ext3_find_first_zero_bit ext2_find_first_zero_bit - #define ext3_find_next_zero_bit ext2_find_next_zero_bit - -+#ifndef ext2_find_next_le_bit -+#ifdef __LITTLE_ENDIAN -+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off)) -+#else -+#error "mballoc needs a patch for big-endian systems - CFS bug 10634" -+#endif /* __LITTLE_ENDIAN */ -+#endif /* !ext2_find_next_le_bit */ -+ - /* - * Maximal mount counts between two filesystem checks - */ -@@ -727,7 +736,8 @@ extern int ext3_bg_has_super(struct supe - extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group); - extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *); - extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long, -- unsigned long); -+ unsigned long, int); -+extern int ext3_new_block_old(handle_t *, struct inode *, unsigned long, int *); - extern void ext3_free_blocks_sb (handle_t *, struct super_block *, - unsigned long, unsigned long, int *); - extern unsigned long ext3_count_free_blocks (struct super_block *); -@@ -848,6 +857,17 @@ extern void ext3_extents_initialize_bloc - extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); - -+/* mballoc.c */ -+extern long ext3_mb_stats; -+extern long ext3_mb_max_to_scan; -+extern int ext3_mb_init(struct super_block *, int); -+extern int ext3_mb_release(struct super_block *); -+extern int ext3_mb_new_blocks(handle_t *, struct inode *, unsigned long, int *, int, int *); -+extern int ext3_mb_reserve_blocks(struct super_block *, int); -+extern void ext3_mb_release_blocks(struct super_block *, int); -+int __init init_ext3_proc(void); -+void exit_ext3_proc(void); -+ - #endif /* __KERNEL__ */ - - /* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */ -Index: linux-2.6.12.6-bull/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.12.6-bull.orig/include/linux/ext3_fs_sb.h 2005-08-29 20:55:27.000000000 +0400 -+++ linux-2.6.12.6-bull/include/linux/ext3_fs_sb.h 2006-04-29 20:39:10.000000000 +0400 -@@ -21,8 +21,14 @@ - #include <linux/wait.h> - #include <linux/blockgroup_lock.h> - #include <linux/percpu_counter.h> -+#include <linux/list.h> - #endif - #include <linux/rbtree.h> -+#include <linux/proc_fs.h> -+ -+struct ext3_buddy_group_blocks; -+struct ext3_mb_history; -+#define EXT3_BB_MAX_BLOCKS - - /* - * third extended-fs super-block data in memory -@@ -78,6 +84,43 @@ struct ext3_sb_info { - char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */ - int s_jquota_fmt; /* Format of quota to use */ - #endif -+ -+ /* for buddy allocator */ -+ struct ext3_group_info ***s_group_info; -+ struct inode *s_buddy_cache; -+ long s_blocks_reserved; -+ spinlock_t s_reserve_lock; -+ struct list_head s_active_transaction; -+ struct list_head s_closed_transaction; -+ struct list_head s_committed_transaction; -+ spinlock_t s_md_lock; -+ tid_t s_last_transaction; -+ int s_mb_factor; -+ unsigned short *s_mb_offsets, *s_mb_maxs; -+ unsigned long s_stripe; -+ -+ /* history to debug policy */ -+ struct ext3_mb_history *s_mb_history; -+ int s_mb_history_cur; -+ int s_mb_history_max; -+ struct proc_dir_entry *s_mb_proc; -+ spinlock_t s_mb_history_lock; -+ -+ /* stats for buddy allocator */ -+ atomic_t s_bal_reqs; /* number of reqs with len > 1 */ -+ atomic_t s_bal_success; /* we found long enough chunks */ -+ atomic_t s_bal_allocated; /* in blocks */ -+ atomic_t s_bal_ex_scanned; /* total extents scanned */ -+ atomic_t s_bal_goals; /* goal hits */ -+ atomic_t s_bal_breaks; /* too long searches */ -+ atomic_t s_bal_2orders; /* 2^order hits */ -+ spinlock_t s_bal_lock; -+ unsigned long s_mb_buddies_generated; -+ unsigned long long s_mb_generation_time; - }; -+ -+#define EXT3_GROUP_INFO(sb, group) \ -+ EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \ -+ [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)] - - #endif /* _LINUX_EXT3_FS_SB */ -Index: linux-2.6.12.6-bull/fs/ext3/super.c -=================================================================== ---- linux-2.6.12.6-bull.orig/fs/ext3/super.c 2006-04-29 20:39:09.000000000 +0400 -+++ linux-2.6.12.6-bull/fs/ext3/super.c 2006-04-29 20:39:10.000000000 +0400 -@@ -387,6 +387,7 @@ static void ext3_put_super (struct super - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_mb_release(sb); - ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); -@@ -597,6 +598,7 @@ enum { - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - Opt_extents, Opt_noextents, Opt_extdebug, -+ Opt_mballoc, Opt_nomballoc, Opt_stripe, - }; - - static match_table_t tokens = { -@@ -650,6 +651,9 @@ static match_table_t tokens = { - {Opt_extents, "extents"}, - {Opt_noextents, "noextents"}, - {Opt_extdebug, "extdebug"}, -+ {Opt_mballoc, "mballoc"}, -+ {Opt_nomballoc, "nomballoc"}, -+ {Opt_stripe, "stripe=%u"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -965,6 +967,19 @@ clear_qf_name: - case Opt_extdebug: - set_opt (sbi->s_mount_opt, EXTDEBUG); - break; -+ case Opt_mballoc: -+ set_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_nomballoc: -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_stripe: -+ if (match_int(&args[0], &option)) -+ return 0; -+ if (option < 0) -+ return 0; -+ sbi->s_stripe = option; -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1670,6 +1675,7 @@ static int ext3_fill_super (struct super - ext3_count_dirs(sb)); - - ext3_ext_init(sb); -+ ext3_mb_init(sb, needs_recovery); - lock_kernel(); - return 0; - -@@ -2549,7 +2555,13 @@ static struct file_system_type ext3_fs_t - - static int __init init_ext3_fs(void) - { -- int err = init_ext3_xattr(); -+ int err; -+ -+ err = init_ext3_proc(); -+ if (err) -+ return err; -+ -+ err = init_ext3_xattr(); - if (err) - return err; - err = init_inodecache(); -@@ -2571,6 +2583,7 @@ static void __exit exit_ext3_fs(void) - unregister_filesystem(&ext3_fs_type); - destroy_inodecache(); - exit_ext3_xattr(); -+ exit_ext3_proc(); - } - - int ext3_prep_san_write(struct inode *inode, long *blocks, -Index: linux-2.6.12.6-bull/fs/ext3/extents.c -=================================================================== ---- linux-2.6.12.6-bull.orig/fs/ext3/extents.c 2006-04-29 20:39:09.000000000 +0400 -+++ linux-2.6.12.6-bull/fs/ext3/extents.c 2006-04-29 20:39:10.000000000 +0400 -@@ -777,7 +777,7 @@ cleanup: - for (i = 0; i < depth; i++) { - if (!ablocks[i]) - continue; -- ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1); - } - } - kfree(ablocks); -@@ -1434,7 +1434,7 @@ int ext3_ext_rm_idx(handle_t *handle, st - path->p_idx->ei_leaf); - bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); - ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -- ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1); - return err; - } - -@@ -1919,10 +1919,12 @@ ext3_remove_blocks(struct ext3_extents_t - int needed = ext3_remove_blocks_credits(tree, ex, from, to); - handle_t *handle = ext3_journal_start(tree->inode, needed); - struct buffer_head *bh; -- int i; -+ int i, metadata = 0; - - if (IS_ERR(handle)) - return PTR_ERR(handle); -+ if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode)) -+ metadata = 1; - if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { - /* tail removal */ - unsigned long num, start; -@@ -1934,7 +1936,7 @@ ext3_remove_blocks(struct ext3_extents_t - bh = sb_find_get_block(tree->inode->i_sb, start + i); - ext3_forget(handle, 0, tree->inode, bh, start + i); - } -- ext3_free_blocks(handle, tree->inode, start, num); -+ ext3_free_blocks(handle, tree->inode, start, num, metadata); - } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { - printk("strange request: removal %lu-%lu from %u:%u\n", - from, to, ex->ee_block, ex->ee_len); -Index: linux-2.6.12.6-bull/fs/ext3/inode.c -=================================================================== ---- linux-2.6.12.6-bull.orig/fs/ext3/inode.c 2006-04-29 20:39:09.000000000 +0400 -+++ linux-2.6.12.6-bull/fs/ext3/inode.c 2006-04-29 20:39:10.000000000 +0400 -@@ -564,7 +564,7 @@ static int ext3_alloc_branch(handle_t *h - ext3_journal_forget(handle, branch[i].bh); - } - for (i = 0; i < keys; i++) -- ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1); -+ ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1, 1); - return err; - } - -@@ -1850,7 +1850,7 @@ ext3_clear_blocks(handle_t *handle, stru - } - } - -- ext3_free_blocks(handle, inode, block_to_free, count); -+ ext3_free_blocks(handle, inode, block_to_free, count, 1); - } - - /** -@@ -2023,7 +2023,7 @@ static void ext3_free_branches(handle_t - ext3_journal_test_restart(handle, inode); - } - -- ext3_free_blocks(handle, inode, nr, 1); -+ ext3_free_blocks(handle, inode, nr, 1, 1); - - if (parent_bh) { - /* -Index: linux-2.6.12.6-bull/fs/ext3/balloc.c -=================================================================== ---- linux-2.6.12.6-bull.orig/fs/ext3/balloc.c 2005-08-29 20:55:27.000000000 +0400 -+++ linux-2.6.12.6-bull/fs/ext3/balloc.c 2006-04-29 20:39:10.000000000 +0400 -@@ -79,7 +79,7 @@ struct ext3_group_desc * ext3_get_group_ - * - * Return buffer_head on success or NULL in case of failure. - */ --static struct buffer_head * -+struct buffer_head * - read_block_bitmap(struct super_block *sb, unsigned int block_group) - { - struct ext3_group_desc * desc; -@@ -490,24 +490,6 @@ error_return: - return; - } - --/* Free given blocks, update quota and i_blocks field */ --void ext3_free_blocks(handle_t *handle, struct inode *inode, -- unsigned long block, unsigned long count) --{ -- struct super_block * sb; -- int dquot_freed_blocks; -- -- sb = inode->i_sb; -- if (!sb) { -- printk ("ext3_free_blocks: nonexistent device"); -- return; -- } -- ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks); -- if (dquot_freed_blocks) -- DQUOT_FREE_BLOCK(inode, dquot_freed_blocks); -- return; --} -- - /* - * For ext3 allocations, we must not reuse any blocks which are - * allocated in the bitmap buffer's "last committed data" copy. This -@@ -1162,7 +1144,7 @@ int ext3_should_retry_alloc(struct super - * bitmap, and then for any free bit if that fails. - * This function also updates quota and i_blocks field. - */ --int ext3_new_block(handle_t *handle, struct inode *inode, -+int ext3_new_block_old(handle_t *handle, struct inode *inode, - unsigned long goal, int *errp) - { - struct buffer_head *bitmap_bh = NULL; -Index: linux-2.6.12.6-bull/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.12.6-bull.orig/fs/ext3/xattr.c 2005-08-29 20:55:27.000000000 +0400 -+++ linux-2.6.12.6-bull/fs/ext3/xattr.c 2006-04-29 20:39:10.000000000 +0400 -@@ -484,7 +484,7 @@ ext3_xattr_release_block(handle_t *handl - ea_bdebug(bh, "refcount now=0; freeing"); - if (ce) - mb_cache_entry_free(ce); -- ext3_free_blocks(handle, inode, bh->b_blocknr, 1); -+ ext3_free_blocks(handle, inode, bh->b_blocknr, 1, 1); - get_bh(bh); - ext3_forget(handle, 1, inode, bh, bh->b_blocknr); - } else { -@@ -804,7 +804,7 @@ inserted: - new_bh = sb_getblk(sb, block); - if (!new_bh) { - getblk_failed: -- ext3_free_blocks(handle, inode, block, 1); -+ ext3_free_blocks(handle, inode, block, 1, 1); - error = -EIO; - goto cleanup; - } -Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c -=================================================================== ---- linux-2.6.12.6-bull.orig/fs/ext3/mballoc.c 2006-04-22 17:31:47.543334750 +0400 -+++ linux-2.6.12.6-bull/fs/ext3/mballoc.c 2006-04-30 01:24:11.000000000 +0400 -@@ -0,0 +1,2725 @@ -+/* -+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+ -+/* -+ * mballoc.c contains the multiblocks allocation routines -+ */ -+ -+#include <linux/config.h> -+#include <linux/time.h> -+#include <linux/fs.h> -+#include <linux/namei.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/quotaops.h> -+#include <linux/buffer_head.h> -+#include <linux/module.h> -+#include <linux/swap.h> -+#include <linux/proc_fs.h> -+#include <linux/pagemap.h> -+#include <linux/seq_file.h> -+ -+/* -+ * TODO: -+ * - bitmap read-ahead (proposed by Oleg Drokin aka green) -+ * - track min/max extents in each group for better group selection -+ * - mb_mark_used() may allocate chunk right after splitting buddy -+ * - special flag to advice allocator to look for requested + N blocks -+ * this may improve interaction between extents and mballoc -+ * - tree of groups sorted by number of free blocks -+ * - percpu reservation code (hotpath) -+ * - error handling -+ */ -+ -+/* -+ * with AGRESSIVE_CHECK allocator runs consistency checks over -+ * structures. these checks slow things down a lot -+ */ -+#define AGGRESSIVE_CHECK__ -+ -+/* -+ */ -+#define MB_DEBUG__ -+#ifdef MB_DEBUG -+#define mb_debug(fmt,a...) printk(fmt, ##a) -+#else -+#define mb_debug(fmt,a...) -+#endif -+ -+/* -+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory -+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history -+ */ -+#define EXT3_MB_HISTORY -+ -+/* -+ * How long mballoc can look for a best extent (in found extents) -+ */ -+long ext3_mb_max_to_scan = 500; -+ -+/* -+ * How long mballoc must look for a best extent -+ */ -+long ext3_mb_min_to_scan = 30; -+ -+/* -+ * with 'ext3_mb_stats' allocator will collect stats that will be -+ * shown at umount. The collecting costs though! -+ */ -+ -+long ext3_mb_stats = 1; -+ -+/* -+ * for which requests use 2^N search using buddies -+ */ -+long ext3_mb_order2_reqs = 8; -+ -+#ifdef EXT3_BB_MAX_BLOCKS -+#undef EXT3_BB_MAX_BLOCKS -+#endif -+#define EXT3_BB_MAX_BLOCKS 30 -+ -+struct ext3_free_metadata { -+ unsigned short group; -+ unsigned short num; -+ unsigned short blocks[EXT3_BB_MAX_BLOCKS]; -+ struct list_head list; -+}; -+ -+struct ext3_group_info { -+ unsigned long bb_state; -+ unsigned long bb_tid; -+ struct ext3_free_metadata *bb_md_cur; -+ unsigned short bb_first_free; -+ unsigned short bb_free; -+ unsigned short bb_fragments; -+ unsigned short bb_counters[]; -+}; -+ -+ -+#define EXT3_GROUP_INFO_NEED_INIT_BIT 0 -+#define EXT3_GROUP_INFO_LOCKED_BIT 1 -+ -+#define EXT3_MB_GRP_NEED_INIT(grp) \ -+ (test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state)) -+ -+struct ext3_free_extent { -+ __u16 fe_start; -+ __u16 fe_len; -+ __u16 fe_group; -+}; -+ -+struct ext3_allocation_context { -+ struct super_block *ac_sb; -+ -+ /* search goals */ -+ struct ext3_free_extent ac_g_ex; -+ -+ /* the best found extent */ -+ struct ext3_free_extent ac_b_ex; -+ -+ /* number of iterations done. we have to track to limit searching */ -+ unsigned long ac_ex_scanned; -+ __u16 ac_groups_scanned; -+ __u16 ac_found; -+ __u16 ac_tail; -+ __u16 ac_buddy; -+ __u8 ac_status; -+ __u8 ac_flags; /* allocation hints */ -+ __u8 ac_criteria; -+ __u8 ac_repeats; -+ __u8 ac_2order; /* if request is to allocate 2^N blocks and -+ * N > 0, the field stores N, otherwise 0 */ -+ -+ struct page *ac_buddy_page; -+ struct page *ac_bitmap_page; -+}; -+ -+#define AC_STATUS_CONTINUE 1 -+#define AC_STATUS_FOUND 2 -+#define AC_STATUS_BREAK 3 -+ -+struct ext3_mb_history { -+ struct ext3_free_extent goal; /* goal allocation */ -+ struct ext3_free_extent result; /* result allocation */ -+ unsigned pid; -+ unsigned ino; -+ __u16 found; /* how many extents have been found */ -+ __u16 groups; /* how many groups have been scanned */ -+ __u16 tail; /* what tail broke some buddy */ -+ __u16 buddy; /* buddy the tail ^^^ broke */ -+ __u8 cr; /* which phase the result extent was found at */ -+ __u8 merged; -+}; -+ -+struct ext3_buddy { -+ struct page *bd_buddy_page; -+ void *bd_buddy; -+ struct page *bd_bitmap_page; -+ void *bd_bitmap; -+ struct ext3_group_info *bd_info; -+ struct super_block *bd_sb; -+ __u16 bd_blkbits; -+ __u16 bd_group; -+}; -+#define EXT3_MB_BITMAP(e3b) ((e3b)->bd_bitmap) -+#define EXT3_MB_BUDDY(e3b) ((e3b)->bd_buddy) -+ -+#ifndef EXT3_MB_HISTORY -+#define ext3_mb_store_history(sb,ino,ac) -+#else -+static void ext3_mb_store_history(struct super_block *, unsigned ino, -+ struct ext3_allocation_context *ac); -+#endif -+ -+#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -+ -+static struct proc_dir_entry *proc_root_ext3; -+ -+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int); -+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *); -+void ext3_mb_free_committed_blocks(struct super_block *); -+ -+#if BITS_PER_LONG == 64 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 7UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~7UL); \ -+} -+#elif BITS_PER_LONG == 32 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 3UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~3UL); \ -+} -+#else -+#error "how many bits you are?!" -+#endif -+ -+static inline int mb_test_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ return ext2_test_bit(bit, addr); -+} -+ -+static inline void mb_set_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit(bit, addr); -+} -+ -+static inline void mb_set_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit_atomic(NULL, bit, addr); -+} -+ -+static inline void mb_clear_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit(bit, addr); -+} -+ -+static inline void mb_clear_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit_atomic(NULL, bit, addr); -+} -+ -+static inline int mb_find_next_zero_bit(void *addr, int max, int start) -+{ -+ int fix; -+#if BITS_PER_LONG == 64 -+ fix = ((unsigned long) addr & 7UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~7UL); -+#elif BITS_PER_LONG == 32 -+ fix = ((unsigned long) addr & 3UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~3UL); -+#else -+#error "how many bits you are?!" -+#endif -+ max += fix; -+ start += fix; -+ return ext2_find_next_zero_bit(addr, max, start) - fix; -+} -+ -+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max) -+{ -+ char *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(max != NULL); -+ -+ if (order > e3b->bd_blkbits + 1) { -+ *max = 0; -+ return NULL; -+ } -+ -+ /* at order 0 we see each particular block */ -+ *max = 1 << (e3b->bd_blkbits + 3); -+ if (order == 0) -+ return EXT3_MB_BITMAP(e3b); -+ -+ bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order]; -+ *max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order]; -+ -+ return bb; -+} -+ -+#ifdef AGGRESSIVE_CHECK -+ -+static void mb_check_buddy(struct ext3_buddy *e3b) -+{ -+ int order = e3b->bd_blkbits + 1; -+ int max, max2, i, j, k, count; -+ int fragments = 0, fstart; -+ void *buddy, *buddy2; -+ -+ if (!test_opt(e3b->bd_sb, MBALLOC)) -+ return; -+ -+ { -+ static int mb_check_counter = 0; -+ if (mb_check_counter++ % 300 != 0) -+ return; -+ } -+ -+ while (order > 1) { -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ buddy2 = mb_find_buddy(e3b, order - 1, &max2); -+ J_ASSERT(buddy2); -+ J_ASSERT(buddy != buddy2); -+ J_ASSERT(max * 2 == max2); -+ -+ count = 0; -+ for (i = 0; i < max; i++) { -+ -+ if (mb_test_bit(i, buddy)) { -+ /* only single bit in buddy2 may be 1 */ -+ if (!mb_test_bit(i << 1, buddy2)) -+ J_ASSERT(mb_test_bit((i<<1)+1, buddy2)); -+ else if (!mb_test_bit((i << 1) + 1, buddy2)) -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ continue; -+ } -+ -+ /* both bits in buddy2 must be 0 */ -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ J_ASSERT(mb_test_bit((i << 1) + 1, buddy2)); -+ -+ for (j = 0; j < (1 << order); j++) { -+ k = (i * (1 << order)) + j; -+ J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b))); -+ } -+ count++; -+ } -+ J_ASSERT(e3b->bd_info->bb_counters[order] == count); -+ order--; -+ } -+ -+ fstart = -1; -+ buddy = mb_find_buddy(e3b, 0, &max); -+ for (i = 0; i < max; i++) { -+ if (!mb_test_bit(i, buddy)) { -+ J_ASSERT(i >= e3b->bd_info->bb_first_free); -+ if (fstart == -1) { -+ fragments++; -+ fstart = i; -+ } -+ continue; -+ } -+ fstart = -1; -+ /* check used bits only */ -+ for (j = 0; j < e3b->bd_blkbits + 1; j++) { -+ buddy2 = mb_find_buddy(e3b, j, &max2); -+ k = i >> j; -+ J_ASSERT(k < max2); -+ J_ASSERT(mb_test_bit(k, buddy2)); -+ } -+ } -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info)); -+ J_ASSERT(e3b->bd_info->bb_fragments == fragments); -+} -+ -+#else -+#define mb_check_buddy(e3b) -+#endif -+ -+/* find most significant bit */ -+static int inline fmsb(unsigned short word) -+{ -+ int order; -+ -+ if (word > 255) { -+ order = 7; -+ word >>= 8; -+ } else { -+ order = -1; -+ } -+ -+ do { -+ order++; -+ word >>= 1; -+ } while (word != 0); -+ -+ return order; -+} -+ -+static void inline -+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first, -+ int len, struct ext3_group_info *grp) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ unsigned short min, max, chunk, border; -+ -+ mb_debug("mark %u/%u free\n", first, len); -+ J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ border = 2 << sb->s_blocksize_bits; -+ -+ while (len > 0) { -+ /* find how many blocks can be covered since this position */ -+ max = ffs(first | border) - 1; -+ -+ /* find how many blocks of power 2 we need to mark */ -+ min = fmsb(len); -+ -+ mb_debug(" %u/%u -> max %u, min %u\n", -+ first & ((2 << sb->s_blocksize_bits) - 1), -+ len, max, min); -+ -+ if (max < min) -+ min = max; -+ chunk = 1 << min; -+ -+ /* mark multiblock chunks only */ -+ grp->bb_counters[min]++; -+ if (min > 0) { -+ mb_debug(" set %u at %u \n", first >> min, -+ sbi->s_mb_offsets[min]); -+ mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]); -+ } -+ -+ len -= chunk; -+ first += chunk; -+ } -+} -+ -+static void -+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap, -+ int group) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group); -+ unsigned short max = EXT3_BLOCKS_PER_GROUP(sb); -+ unsigned short i = 0, first, len; -+ unsigned free = 0, fragments = 0; -+ unsigned long long period = get_cycles(); -+ -+ i = mb_find_next_zero_bit(bitmap, max, 0); -+ grp->bb_first_free = i; -+ while (i < max) { -+ fragments++; -+ first = i; -+ i = ext2_find_next_le_bit(bitmap, max, i); -+ len = i - first; -+ free += len; -+ if (len > 1) -+ ext3_mb_mark_free_simple(sb, buddy, first, len, grp); -+ else -+ grp->bb_counters[0]++; -+ if (i < max) -+ i = mb_find_next_zero_bit(bitmap, max, i); -+ } -+ grp->bb_fragments = fragments; -+ -+ /* bb_state shouldn't being modified because all -+ * others waits for init completion on page lock */ -+ clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state); -+ if (free != grp->bb_free) { -+ printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n", -+ group, free, grp->bb_free); -+ grp->bb_free = free; -+ } -+ -+ period = get_cycles() - period; -+ spin_lock(&EXT3_SB(sb)->s_bal_lock); -+ EXT3_SB(sb)->s_mb_buddies_generated++; -+ EXT3_SB(sb)->s_mb_generation_time += period; -+ spin_unlock(&EXT3_SB(sb)->s_bal_lock); -+} -+ -+static int ext3_mb_init_cache(struct page *page) -+{ -+ int blocksize, blocks_per_page, groups_per_page; -+ int err = 0, i, first_group, first_block; -+ struct super_block *sb; -+ struct buffer_head *bhs; -+ struct buffer_head **bh; -+ struct inode *inode; -+ char *data, *bitmap; -+ -+ mb_debug("init page %lu\n", page->index); -+ -+ inode = page->mapping->host; -+ sb = inode->i_sb; -+ blocksize = 1 << inode->i_blkbits; -+ blocks_per_page = PAGE_CACHE_SIZE / blocksize; -+ -+ groups_per_page = blocks_per_page >> 1; -+ if (groups_per_page == 0) -+ groups_per_page = 1; -+ -+ /* allocate buffer_heads to read bitmaps */ -+ if (groups_per_page > 1) { -+ err = -ENOMEM; -+ i = sizeof(struct buffer_head *) * groups_per_page; -+ bh = kmalloc(i, GFP_NOFS); -+ if (bh == NULL) -+ goto out; -+ memset(bh, 0, i); -+ } else -+ bh = &bhs; -+ -+ first_group = page->index * blocks_per_page / 2; -+ -+ /* read all groups the page covers into the cache */ -+ for (i = 0; i < groups_per_page; i++) { -+ struct ext3_group_desc * desc; -+ -+ if (first_group + i >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ err = -EIO; -+ desc = ext3_get_group_desc(sb, first_group + i, NULL); -+ if (desc == NULL) -+ goto out; -+ -+ err = -ENOMEM; -+ bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ if (bh[i] == NULL) -+ goto out; -+ -+ if (buffer_uptodate(bh[i])) -+ continue; -+ -+ lock_buffer(bh[i]); -+ if (buffer_uptodate(bh[i])) { -+ unlock_buffer(bh[i]); -+ continue; -+ } -+ -+ get_bh(bh[i]); -+ bh[i]->b_end_io = end_buffer_read_sync; -+ submit_bh(READ, bh[i]); -+ mb_debug("read bitmap for group %u\n", first_group + i); -+ } -+ -+ /* wait for I/O completion */ -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ wait_on_buffer(bh[i]); -+ -+ err = -EIO; -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ if (!buffer_uptodate(bh[i])) -+ goto out; -+ -+ first_block = page->index * blocks_per_page; -+ for (i = 0; i < blocks_per_page; i++) { -+ int group; -+ -+ group = (first_block + i) >> 1; -+ if (group >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ data = page_address(page) + (i * blocksize); -+ bitmap = bh[group - first_group]->b_data; -+ -+ if ((first_block + i) & 1) { -+ /* this is block of buddy */ -+ mb_debug("put buddy for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memset(data, 0xff, blocksize); -+ EXT3_GROUP_INFO(sb, group)->bb_fragments = 0; -+ memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0, -+ sizeof(unsigned short)*(sb->s_blocksize_bits+2)); -+ ext3_mb_generate_buddy(sb, data, bitmap, group); -+ } else { -+ /* this is block of bitmap */ -+ mb_debug("put bitmap for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memcpy(data, bitmap, blocksize); -+ } -+ } -+ SetPageUptodate(page); -+ -+out: -+ if (bh) { -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ brelse(bh[i]); -+ if (bh != &bhs) -+ kfree(bh); -+ } -+ return err; -+} -+ -+static int ext3_mb_load_buddy(struct super_block *sb, int group, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *inode = sbi->s_buddy_cache; -+ int blocks_per_page, block, pnum, poff; -+ struct page *page; -+ -+ mb_debug("load group %u\n", group); -+ -+ blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize; -+ -+ e3b->bd_blkbits = sb->s_blocksize_bits; -+ e3b->bd_info = EXT3_GROUP_INFO(sb, group); -+ e3b->bd_sb = sb; -+ e3b->bd_group = group; -+ e3b->bd_buddy_page = NULL; -+ e3b->bd_bitmap_page = NULL; -+ -+ block = group * 2; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ /* we could use find_or_create_page(), but it locks page -+ * what we'd like to avoid in fast path ... */ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_bitmap_page = page; -+ e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ block++; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_buddy_page = page; -+ e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ return 0; -+ -+err: -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+ e3b->bd_buddy = NULL; -+ e3b->bd_bitmap = NULL; -+ return -EIO; -+} -+ -+static void ext3_mb_release_desc(struct ext3_buddy *e3b) -+{ -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+} -+ -+ -+static inline void -+ext3_lock_group(struct super_block *sb, int group) -+{ -+ bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static inline void -+ext3_unlock_group(struct super_block *sb, int group) -+{ -+ bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block) -+{ -+ int order = 1; -+ void *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(block < (1 << (e3b->bd_blkbits + 3))); -+ -+ bb = EXT3_MB_BUDDY(e3b); -+ while (order <= e3b->bd_blkbits + 1) { -+ block = block >> 1; -+ if (!mb_test_bit(block, bb)) { -+ /* this block is part of buddy of order 'order' */ -+ return order; -+ } -+ bb += 1 << (e3b->bd_blkbits - order); -+ order++; -+ } -+ return 0; -+} -+ -+static inline void mb_clear_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0; -+ cur += 32; -+ continue; -+ } -+ mb_clear_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static inline void mb_set_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0xffffffff; -+ cur += 32; -+ continue; -+ } -+ mb_set_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count) -+{ -+ int block = 0, max = 0, order; -+ void *buddy, *buddy2; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free += count; -+ if (first < e3b->bd_info->bb_first_free) -+ e3b->bd_info->bb_first_free = first; -+ -+ /* let's maintain fragments counter */ -+ if (first != 0) -+ block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b)); -+ if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b)); -+ if (block && max) -+ e3b->bd_info->bb_fragments--; -+ else if (!block && !max) -+ e3b->bd_info->bb_fragments++; -+ -+ /* let's maintain buddy itself */ -+ while (count-- > 0) { -+ block = first++; -+ order = 0; -+ -+ J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b))); -+ mb_clear_bit(block, EXT3_MB_BITMAP(e3b)); -+ e3b->bd_info->bb_counters[order]++; -+ -+ /* start of the buddy */ -+ buddy = mb_find_buddy(e3b, order, &max); -+ -+ do { -+ block &= ~1UL; -+ if (mb_test_bit(block, buddy) || -+ mb_test_bit(block + 1, buddy)) -+ break; -+ -+ /* both the buddies are free, try to coalesce them */ -+ buddy2 = mb_find_buddy(e3b, order + 1, &max); -+ -+ if (!buddy2) -+ break; -+ -+ if (order > 0) { -+ /* for special purposes, we don't set -+ * free bits in bitmap */ -+ mb_set_bit(block, buddy); -+ mb_set_bit(block + 1, buddy); -+ } -+ e3b->bd_info->bb_counters[order]--; -+ e3b->bd_info->bb_counters[order]--; -+ -+ block = block >> 1; -+ order++; -+ e3b->bd_info->bb_counters[order]++; -+ -+ mb_clear_bit(block, buddy2); -+ buddy = buddy2; -+ } while (1); -+ } -+ mb_check_buddy(e3b); -+ -+ return 0; -+} -+ -+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block, -+ int needed, struct ext3_free_extent *ex) -+{ -+ int next = block, max, ord; -+ void *buddy; -+ -+ J_ASSERT(ex != NULL); -+ -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ J_ASSERT(block < max); -+ if (mb_test_bit(block, buddy)) { -+ ex->fe_len = 0; -+ ex->fe_start = 0; -+ ex->fe_group = 0; -+ return 0; -+ } -+ -+ if (likely(order == 0)) { -+ /* find actual order */ -+ order = mb_find_order_for_block(e3b, block); -+ block = block >> order; -+ } -+ -+ ex->fe_len = 1 << order; -+ ex->fe_start = block << order; -+ ex->fe_group = e3b->bd_group; -+ -+ /* calc difference from given start */ -+ next = next - ex->fe_start; -+ ex->fe_len -= next; -+ ex->fe_start += next; -+ -+ while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) { -+ -+ if (block + 1 >= max) -+ break; -+ -+ next = (block + 1) * (1 << order); -+ if (mb_test_bit(next, EXT3_MB_BITMAP(e3b))) -+ break; -+ -+ ord = mb_find_order_for_block(e3b, next); -+ -+ order = ord; -+ block = next >> order; -+ ex->fe_len += 1 << order; -+ } -+ -+ J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3))); -+ return ex->fe_len; -+} -+ -+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex) -+{ -+ int ord, mlen = 0, max = 0, cur; -+ int start = ex->fe_start; -+ int len = ex->fe_len; -+ unsigned ret = 0; -+ int len0 = len; -+ void *buddy; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free -= len; -+ if (e3b->bd_info->bb_first_free == start) -+ e3b->bd_info->bb_first_free += len; -+ -+ /* let's maintain fragments counter */ -+ if (start != 0) -+ mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b)); -+ if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b)); -+ if (mlen && max) -+ e3b->bd_info->bb_fragments++; -+ else if (!mlen && !max) -+ e3b->bd_info->bb_fragments--; -+ -+ /* let's maintain buddy itself */ -+ while (len) { -+ ord = mb_find_order_for_block(e3b, start); -+ -+ if (((start >> ord) << ord) == start && len >= (1 << ord)) { -+ /* the whole chunk may be allocated at once! */ -+ mlen = 1 << ord; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ J_ASSERT((start >> ord) < max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ start += mlen; -+ len -= mlen; -+ J_ASSERT(len >= 0); -+ continue; -+ } -+ -+ /* store for history */ -+ if (ret == 0) -+ ret = len | (ord << 16); -+ -+ /* we have to split large buddy */ -+ J_ASSERT(ord > 0); -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ -+ ord--; -+ cur = (start >> ord) & ~1U; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_clear_bit(cur, buddy); -+ mb_clear_bit(cur + 1, buddy); -+ e3b->bd_info->bb_counters[ord]++; -+ e3b->bd_info->bb_counters[ord]++; -+ } -+ -+ /* now drop all the bits in bitmap */ -+ mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0); -+ -+ mb_check_buddy(e3b); -+ -+ return ret; -+} -+ -+/* -+ * Must be called under group lock! -+ */ -+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ unsigned long ret; -+ -+ ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len); -+ ret = mb_mark_used(e3b, &ac->ac_b_ex); -+ -+ ac->ac_status = AC_STATUS_FOUND; -+ ac->ac_tail = ret & 0xffff; -+ ac->ac_buddy = ret >> 16; -+ -+ /* hold in-core structures until allocated -+ * blocks are marked non-free in on-disk bitmap */ -+ ac->ac_buddy_page = e3b->bd_buddy_page; -+ page_cache_get(e3b->bd_buddy_page); -+ ac->ac_bitmap_page = e3b->bd_bitmap_page; -+ page_cache_get(e3b->bd_bitmap_page); -+} -+ -+/* -+ * The routine checks whether found extent is good enough. If it is, -+ * then the extent gets marked used and flag is set to the context -+ * to stop scanning. Otherwise, the extent is compared with the -+ * previous found extent and if new one is better, then it's stored -+ * in the context. Later, the best found extent will be used, if -+ * mballoc can't find good enough extent. -+ * -+ * FIXME: real allocation policy is to be designed yet! -+ */ -+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac, -+ struct ext3_free_extent *ex, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent *bex = &ac->ac_b_ex; -+ struct ext3_free_extent *gex = &ac->ac_g_ex; -+ -+ J_ASSERT(ex->fe_len > 0); -+ J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ -+ ac->ac_found++; -+ -+ /* -+ * The special case - take what you catch first -+ */ -+ if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * Let's check whether the chunk is good enough -+ */ -+ if (ex->fe_len == gex->fe_len) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * If this is first found extent, just store it in the context -+ */ -+ if (bex->fe_len == 0) { -+ *bex = *ex; -+ return; -+ } -+ -+ /* -+ * If new found extent is better, store it in the context -+ */ -+ if (bex->fe_len < gex->fe_len) { -+ /* if the request isn't satisfied, any found extent -+ * larger than previous best one is better */ -+ if (ex->fe_len > bex->fe_len) -+ *bex = *ex; -+ } else if (ex->fe_len > gex->fe_len) { -+ /* if the request is satisfied, then we try to find -+ * an extent that still satisfy the request, but is -+ * smaller than previous one */ -+ *bex = *ex; -+ } -+ -+ /* -+ * Let's scan at least few extents and don't pick up a first one -+ */ -+ if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+ -+ /* -+ * We don't want to scan for a whole year -+ */ -+ if (ac->ac_found > ext3_mb_max_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+} -+ -+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent ex = ac->ac_b_ex; -+ int group = ex.fe_group, max, err; -+ -+ J_ASSERT(ex.fe_len > 0); -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex); -+ -+ if (max > 0) { -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ int group = ac->ac_g_ex.fe_group, max, err; -+ struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb); -+ struct ext3_super_block *es = sbi->s_es; -+ struct ext3_free_extent ex; -+ -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start, -+ ac->ac_g_ex.fe_len, &ex); -+ -+ if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) { -+ unsigned long start; -+ start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) + -+ ex.fe_start + le32_to_cpu(es->s_first_data_block)); -+ if (start % sbi->s_stripe == 0) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ } else if (max >= ac->ac_g_ex.fe_len) { -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) { -+ /* Sometimes, caller may want to merge even small -+ * number of blocks to an existing extent */ -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+/* -+ * The routine scans buddy structures (not bitmap!) from given order -+ * to max order and tries to find big enough chunk to satisfy the req -+ */ -+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_group_info *grp = e3b->bd_info; -+ void *buddy; -+ int i, k, max; -+ -+ J_ASSERT(ac->ac_2order > 0); -+ for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) { -+ if (grp->bb_counters[i] == 0) -+ continue; -+ -+ buddy = mb_find_buddy(e3b, i, &max); -+ if (buddy == NULL) { -+ printk(KERN_ALERT "looking for wrong order?\n"); -+ break; -+ } -+ -+ k = mb_find_next_zero_bit(buddy, max, 0); -+ J_ASSERT(k < max); -+ -+ ac->ac_found++; -+ -+ ac->ac_b_ex.fe_len = 1 << i; -+ ac->ac_b_ex.fe_start = k << i; -+ ac->ac_b_ex.fe_group = e3b->bd_group; -+ -+ ext3_mb_use_best_found(ac, e3b); -+ J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len); -+ -+ if (unlikely(ext3_mb_stats)) -+ atomic_inc(&EXT3_SB(sb)->s_bal_2orders); -+ -+ break; -+ } -+} -+ -+/* -+ * The routine scans the group and measures all found extents. -+ * In order to optimize scanning, caller must pass number of -+ * free blocks in the group, so the routine can know upper limit. -+ */ -+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ int i, free; -+ -+ free = e3b->bd_info->bb_free; -+ J_ASSERT(free > 0); -+ -+ i = e3b->bd_info->bb_first_free; -+ -+ while (free && ac->ac_status == AC_STATUS_CONTINUE) { -+ i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i); -+ if (i >= sb->s_blocksize * 8) { -+ J_ASSERT(free == 0); -+ break; -+ } -+ -+ mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex); -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(free >= ex.fe_len); -+ -+ ext3_mb_measure_extent(ac, &ex, e3b); -+ -+ i += ex.fe_len; -+ free -= ex.fe_len; -+ } -+} -+ -+/* -+ * This is a special case for storages like raid5 -+ * we try to find stripe-aligned chunks for stripe-size requests -+ */ -+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ unsigned long i, max; -+ -+ J_ASSERT(sbi->s_stripe != 0); -+ -+ /* find first stripe-aligned block */ -+ i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) + -+ le32_to_cpu(sbi->s_es->s_first_data_block); -+ i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe; -+ i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb); -+ -+ while (i < sb->s_blocksize * 8) { -+ if (!mb_test_bit(i, bitmap)) { -+ max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex); -+ if (max >= sbi->s_stripe) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ break; -+ } -+ } -+ i += sbi->s_stripe; -+ } -+} -+ -+static int ext3_mb_good_group(struct ext3_allocation_context *ac, -+ int group, int cr) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group); -+ unsigned free, fragments, i, bits; -+ -+ J_ASSERT(cr >= 0 && cr < 4); -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp)); -+ -+ free = grp->bb_free; -+ fragments = grp->bb_fragments; -+ if (free == 0) -+ return 0; -+ if (fragments == 0) -+ return 0; -+ -+ switch (cr) { -+ case 0: -+ J_ASSERT(ac->ac_2order != 0); -+ bits = ac->ac_sb->s_blocksize_bits + 1; -+ for (i = ac->ac_2order; i <= bits; i++) -+ if (grp->bb_counters[i] > 0) -+ return 1; -+ break; -+ case 1: -+ if ((free / fragments) >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 2: -+ if (free >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 3: -+ return 1; -+ default: -+ BUG(); -+ } -+ -+ return 0; -+} -+ -+int ext3_mb_new_blocks(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *len, int flags, int *errp) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_allocation_context ac; -+ int i, group, block, cr, err = 0; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ struct buffer_head *gdp_bh; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ -+ J_ASSERT(len != NULL); -+ J_ASSERT(*len > 0); -+ -+ sb = inode->i_sb; -+ if (!sb) { -+ printk("ext3_mb_new_nblocks: nonexistent device"); -+ return 0; -+ } -+ -+ if (!test_opt(sb, MBALLOC)) { -+ static int ext3_mballoc_warning = 0; -+ if (ext3_mballoc_warning == 0) { -+ printk(KERN_ERR "EXT3-fs: multiblock request with " -+ "mballoc disabled!\n"); -+ ext3_mballoc_warning++; -+ } -+ *len = 1; -+ err = ext3_new_block_old(handle, inode, goal, errp); -+ return err; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ -+ /* -+ * We can't allocate > group size -+ */ -+ if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10) -+ *len = EXT3_BLOCKS_PER_GROUP(sb) - 10; -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* someone asks for non-reserved blocks */ -+ BUG_ON(*len > 1); -+ err = ext3_mb_reserve_blocks(sb, 1); -+ if (err) { -+ *errp = err; -+ return 0; -+ } -+ } -+ -+ ac.ac_buddy_page = NULL; -+ ac.ac_bitmap_page = NULL; -+ -+ /* -+ * Check quota for allocation of this blocks. -+ */ -+ while (*len && DQUOT_ALLOC_BLOCK(inode, *len)) -+ *len -= 1; -+ if (*len == 0) { -+ *errp = -EDQUOT; -+ block = 0; -+ goto out; -+ } -+ -+ /* start searching from the goal */ -+ if (goal < le32_to_cpu(es->s_first_data_block) || -+ goal >= le32_to_cpu(es->s_blocks_count)) -+ goal = le32_to_cpu(es->s_first_data_block); -+ group = (goal - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ block = ((goal - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ /* set up allocation goals */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_groups_scanned = 0; -+ ac.ac_ex_scanned = 0; -+ ac.ac_found = 0; -+ ac.ac_sb = inode->i_sb; -+ ac.ac_g_ex.fe_group = group; -+ ac.ac_g_ex.fe_start = block; -+ ac.ac_g_ex.fe_len = *len; -+ ac.ac_flags = flags; -+ ac.ac_2order = 0; -+ ac.ac_criteria = 0; -+ -+ if (*len == 1 && sbi->s_stripe) { -+ /* looks like a metadata, let's use a dirty hack for raid5 -+ * move all metadata in first groups in hope to hit cached -+ * sectors and thus avoid read-modify cycles in raid5 */ -+ ac.ac_g_ex.fe_group = group = 0; -+ } -+ -+ /* probably, the request is for 2^8+ blocks (1/2/3/... MB) */ -+ i = ffs(*len); -+ if (i >= ext3_mb_order2_reqs) { -+ i--; -+ if ((*len & (~(1 << i))) == 0) -+ ac.ac_2order = i; -+ } -+ -+ /* first, try the goal */ -+ err = ext3_mb_find_by_goal(&ac, &e3b); -+ if (err) -+ goto out_err; -+ if (ac.ac_status == AC_STATUS_FOUND) -+ goto found; -+ -+ /* Let's just scan groups to find more-less suitable blocks */ -+ cr = ac.ac_2order ? 0 : 1; -+repeat: -+ for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) { -+ ac.ac_criteria = cr; -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) { -+ if (group == EXT3_SB(sb)->s_groups_count) -+ group = 0; -+ -+ if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) { -+ /* we need full data about the group -+ * to make a good selection */ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ ext3_mb_release_desc(&e3b); -+ } -+ -+ /* check is group good for our criteries */ -+ if (!ext3_mb_good_group(&ac, group, cr)) -+ continue; -+ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ -+ ext3_lock_group(sb, group); -+ if (!ext3_mb_good_group(&ac, group, cr)) { -+ /* someone did allocation from this group */ -+ ext3_unlock_group(sb, group); -+ ext3_mb_release_desc(&e3b); -+ continue; -+ } -+ -+ ac.ac_groups_scanned++; -+ if (cr == 0) -+ ext3_mb_simple_scan_group(&ac, &e3b); -+ else if (cr == 1 && *len == sbi->s_stripe) -+ ext3_mb_scan_aligned(&ac, &e3b); -+ else -+ ext3_mb_complex_scan_group(&ac, &e3b); -+ -+ ext3_unlock_group(sb, group); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ if (ac.ac_status != AC_STATUS_CONTINUE) -+ break; -+ } -+ } -+ -+ if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND && -+ !(ac.ac_flags & EXT3_MB_HINT_FIRST)) { -+ /* -+ * We've been searching too long. Let's try to allocate -+ * the best chunk we've found so far -+ */ -+ -+ /*if (ac.ac_found > ext3_mb_max_to_scan) -+ printk(KERN_DEBUG "EXT3-fs: too long searching at " -+ "%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len, -+ ac.ac_g_ex.fe_len);*/ -+ ext3_mb_try_best_found(&ac, &e3b); -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * Someone more lucky has already allocated it. -+ * The only thing we can do is just take first -+ * found block(s) -+ printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n"); -+ */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_flags |= EXT3_MB_HINT_FIRST; -+ cr = 3; -+ goto repeat; -+ } -+ } -+ -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * We aren't lucky definitely -+ */ -+ DQUOT_FREE_BLOCK(inode, *len); -+ *errp = -ENOSPC; -+ block = 0; -+#if 1 -+ printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n", -+ ac.ac_status, ac.ac_flags); -+ printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n", -+ ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group, -+ ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr); -+ printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n", -+ sbi->s_blocks_reserved, ac.ac_found); -+ printk("EXT3-fs: groups: "); -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) -+ printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free); -+ printk("\n"); -+#endif -+ goto out; -+ } -+ -+found: -+ J_ASSERT(ac.ac_b_ex.fe_len > 0); -+ -+ /* good news - free block(s) have been found. now it's time -+ * to mark block(s) in good old journaled bitmap */ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ /* we made a desicion, now mark found blocks in good old -+ * bitmap to be journaled */ -+ -+ ext3_debug("using block group %d(%d)\n", -+ ac.ac_b_group.group, gdp->bg_free_blocks_count); -+ -+ bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group); -+ if (!bitmap_bh) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) { -+ *errp = err; -+ goto out_err; -+ } -+ -+ gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh); -+ if (!gdp) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ if (block == le32_to_cpu(gdp->bg_block_bitmap) || -+ block == le32_to_cpu(gdp->bg_inode_bitmap) || -+ in_range(block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error(sb, "ext3_new_block", -+ "Allocating block in system zone - " -+ "block = %u", block); -+#ifdef AGGRESSIVE_CHECK -+ for (i = 0; i < ac.ac_b_ex.fe_len; i++) -+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data)); -+#endif -+ mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len); -+ -+ spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) -+ - ac.ac_b_ex.fe_len); -+ spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len); -+ -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ if (err) -+ goto out_err; -+ err = ext3_journal_dirty_metadata(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ sb->s_dirt = 1; -+ *errp = 0; -+ brelse(bitmap_bh); -+ -+ /* drop non-allocated, but dquote'd blocks */ -+ J_ASSERT(*len >= ac.ac_b_ex.fe_len); -+ DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len); -+ -+ *len = ac.ac_b_ex.fe_len; -+ J_ASSERT(*len > 0); -+ J_ASSERT(block != 0); -+ goto out; -+ -+out_err: -+ /* if we've already allocated something, roll it back */ -+ if (ac.ac_status == AC_STATUS_FOUND) { -+ /* FIXME: free blocks here */ -+ } -+ -+ DQUOT_FREE_BLOCK(inode, *len); -+ brelse(bitmap_bh); -+ *errp = err; -+ block = 0; -+out: -+ if (ac.ac_buddy_page) -+ page_cache_release(ac.ac_buddy_page); -+ if (ac.ac_bitmap_page) -+ page_cache_release(ac.ac_bitmap_page); -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* block wasn't reserved before and we reserved it -+ * at the beginning of allocation. it doesn't matter -+ * whether we allocated anything or we failed: time -+ * to release reservation. NOTE: because I expect -+ * any multiblock request from delayed allocation -+ * path only, here is single block always */ -+ ext3_mb_release_blocks(sb, 1); -+ } -+ -+ if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) { -+ atomic_inc(&sbi->s_bal_reqs); -+ atomic_add(*len, &sbi->s_bal_allocated); -+ if (*len >= ac.ac_g_ex.fe_len) -+ atomic_inc(&sbi->s_bal_success); -+ atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned); -+ if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start && -+ ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group) -+ atomic_inc(&sbi->s_bal_goals); -+ if (ac.ac_found > ext3_mb_max_to_scan) -+ atomic_inc(&sbi->s_bal_breaks); -+ } -+ -+ ext3_mb_store_history(sb, inode->i_ino, &ac); -+ -+ return block; -+} -+EXPORT_SYMBOL(ext3_mb_new_blocks); -+ -+#ifdef EXT3_MB_HISTORY -+struct ext3_mb_proc_session { -+ struct ext3_mb_history *history; -+ struct super_block *sb; -+ int start; -+ int max; -+}; -+ -+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s, -+ struct ext3_mb_history *hs, -+ int first) -+{ -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (!first && hs == s->history + s->start) -+ return NULL; -+ while (hs->goal.fe_len == 0) { -+ hs++; -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (hs == s->history + s->start) -+ return NULL; -+ } -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ if (!hs) -+ return NULL; -+ while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL); -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ else -+ return ext3_mb_history_skip_empty(s, ++hs, 0); -+} -+ -+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct ext3_mb_history *hs = v; -+ char buf[20], buf2[20]; -+ -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n", -+ "pid", "inode", "goal", "result", "found", "grps", "cr", -+ "merge", "tail", "broken"); -+ return 0; -+ } -+ -+ sprintf(buf, "%u/%u/%u", hs->goal.fe_group, -+ hs->goal.fe_start, hs->goal.fe_len); -+ sprintf(buf2, "%u/%u/%u", hs->result.fe_group, -+ hs->result.fe_start, hs->result.fe_len); -+ seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n", -+ hs->pid, hs->ino, buf, buf2, hs->found, hs->groups, -+ hs->cr, hs->merged ? "M" : "", hs->tail, -+ hs->buddy ? 1 << hs->buddy : 0); -+ return 0; -+} -+ -+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_history_ops = { -+ .start = ext3_mb_seq_history_start, -+ .next = ext3_mb_seq_history_next, -+ .stop = ext3_mb_seq_history_stop, -+ .show = ext3_mb_seq_history_show, -+}; -+ -+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max; -+ s->history = kmalloc(size, GFP_KERNEL); -+ if (s == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(s->history, sbi->s_mb_history, size); -+ s->max = sbi->s_mb_history_max; -+ s->start = sbi->s_mb_history_cur % s->max; -+ spin_unlock(&sbi->s_mb_history_lock); -+ -+ rc = seq_open(file, &ext3_mb_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->history); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct ext3_mb_proc_session *s = seq->private; -+ kfree(s->history); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations ext3_mb_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_history_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = ext3_mb_seq_history_release, -+}; -+ -+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ -+ group = *pos + 1; -+ return (void *) group; -+} -+ -+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ ++*pos; -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ group = *pos + 1; -+ return (void *) group;; -+} -+ -+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v) -+{ -+ struct super_block *sb = seq->private; -+ long group = (long) v, i; -+ struct sg { -+ struct ext3_group_info info; -+ unsigned short counters[16]; -+ } sg; -+ -+ group--; -+ if (group == 0) -+ seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n", -+ "group", "free", "frags", "first", "2^0", "2^1", "2^2", -+ "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10", -+ "2^11", "2^12", "2^13"); -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + -+ sizeof(struct ext3_group_info); -+ ext3_lock_group(sb, group); -+ memcpy(&sg, EXT3_GROUP_INFO(sb, group), i); -+ ext3_unlock_group(sb, group); -+ -+ if (EXT3_MB_GRP_NEED_INIT(&sg.info)) -+ return 0; -+ -+ seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free, -+ sg.info.bb_fragments, sg.info.bb_first_free); -+ for (i = 0; i <= 13; i++) -+ seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ? -+ sg.info.bb_counters[i] : 0); -+ seq_printf(seq, " ]\n"); -+ -+ return 0; -+} -+ -+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_groups_ops = { -+ .start = ext3_mb_seq_groups_start, -+ .next = ext3_mb_seq_groups_next, -+ .stop = ext3_mb_seq_groups_stop, -+ .show = ext3_mb_seq_groups_show, -+}; -+ -+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ int rc; -+ -+ rc = seq_open(file, &ext3_mb_seq_groups_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = sb; -+ } -+ return rc; -+ -+} -+ -+static struct file_operations ext3_mb_seq_groups_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_groups_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = seq_release, -+}; -+ -+static void ext3_mb_history_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ remove_proc_entry("mb_groups", sbi->s_mb_proc); -+ remove_proc_entry("mb_history", sbi->s_mb_proc); -+ remove_proc_entry(name, proc_root_ext3); -+ -+ if (sbi->s_mb_history) -+ kfree(sbi->s_mb_history); -+} -+ -+static void ext3_mb_history_init(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ int i; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3); -+ if (sbi->s_mb_proc != NULL) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_history_fops; -+ p->data = sb; -+ } -+ p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_groups_fops; -+ p->data = sb; -+ } -+ } -+ -+ sbi->s_mb_history_max = 1000; -+ sbi->s_mb_history_cur = 0; -+ spin_lock_init(&sbi->s_mb_history_lock); -+ i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history); -+ sbi->s_mb_history = kmalloc(i, GFP_KERNEL); -+ memset(sbi->s_mb_history, 0, i); -+ /* if we can't allocate history, then we simple won't use it */ -+} -+ -+static void -+ext3_mb_store_history(struct super_block *sb, unsigned ino, -+ struct ext3_allocation_context *ac) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_history h; -+ -+ if (likely(sbi->s_mb_history == NULL)) -+ return; -+ -+ h.pid = current->pid; -+ h.ino = ino; -+ h.goal = ac->ac_g_ex; -+ h.result = ac->ac_b_ex; -+ h.found = ac->ac_found; -+ h.cr = ac->ac_criteria; -+ h.groups = ac->ac_groups_scanned; -+ h.tail = ac->ac_tail; -+ h.buddy = ac->ac_buddy; -+ h.merged = 0; -+ if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start && -+ ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group) -+ h.merged = 1; -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h)); -+ if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max) -+ sbi->s_mb_history_cur = 0; -+ spin_unlock(&sbi->s_mb_history_lock); -+} -+ -+#else -+#define ext3_mb_history_release(sb) -+#define ext3_mb_history_init(sb) -+#endif -+ -+int ext3_mb_init_backend(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, j, len, metalen; -+ int num_meta_group_infos = -+ (sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ struct ext3_group_info **meta_group_info; -+ -+ /* An 8TB filesystem with 64-bit pointers requires a 4096 byte -+ * kmalloc. A 128kb malloc should suffice for a 256TB filesystem. -+ * So a two level scheme suffices for now. */ -+ sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) * -+ num_meta_group_infos, GFP_KERNEL); -+ if (sbi->s_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n"); -+ return -ENOMEM; -+ } -+ sbi->s_buddy_cache = new_inode(sb); -+ if (sbi->s_buddy_cache == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't get new inode\n"); -+ goto err_freesgi; -+ } -+ -+ metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) { -+ if ((i + 1) == num_meta_group_infos) -+ metalen = sizeof(*meta_group_info) * -+ (sbi->s_groups_count - -+ (i << EXT3_DESC_PER_BLOCK_BITS(sb))); -+ meta_group_info = kmalloc(metalen, GFP_KERNEL); -+ if (meta_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate mem for a " -+ "buddy group\n"); -+ goto err_freemeta; -+ } -+ sbi->s_group_info[i] = meta_group_info; -+ } -+ -+ /* -+ * calculate needed size. if change bb_counters size, -+ * don't forget about ext3_mb_generate_buddy() -+ */ -+ len = sizeof(struct ext3_group_info); -+ len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2); -+ for (i = 0; i < sbi->s_groups_count; i++) { -+ struct ext3_group_desc * desc; -+ -+ meta_group_info = -+ sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)]; -+ j = i & (EXT3_DESC_PER_BLOCK(sb) - 1); -+ -+ meta_group_info[j] = kmalloc(len, GFP_KERNEL); -+ if (meta_group_info[j] == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n"); -+ i--; -+ goto err_freebuddy; -+ } -+ desc = ext3_get_group_desc(sb, i, NULL); -+ if (desc == NULL) { -+ printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i); -+ goto err_freebuddy; -+ } -+ memset(meta_group_info[j], 0, len); -+ set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, -+ &meta_group_info[j]->bb_state); -+ meta_group_info[j]->bb_free = -+ le16_to_cpu(desc->bg_free_blocks_count); -+ } -+ -+ return 0; -+ -+err_freebuddy: -+ while (i >= 0) { -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ i--; -+ } -+ i = num_meta_group_infos; -+err_freemeta: -+ while (--i >= 0) -+ kfree(sbi->s_group_info[i]); -+ iput(sbi->s_buddy_cache); -+err_freesgi: -+ kfree(sbi->s_group_info); -+ return -ENOMEM; -+} -+ -+int ext3_mb_init(struct super_block *sb, int needs_recovery) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *root = sb->s_root->d_inode; -+ unsigned i, offset, max; -+ struct dentry *dentry; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short); -+ -+ sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_offsets == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ return -ENOMEM; -+ } -+ sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_maxs == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_maxs); -+ return -ENOMEM; -+ } -+ -+ /* order 0 is regular bitmap */ -+ sbi->s_mb_maxs[0] = sb->s_blocksize << 3; -+ sbi->s_mb_offsets[0] = 0; -+ -+ i = 1; -+ offset = 0; -+ max = sb->s_blocksize << 2; -+ do { -+ sbi->s_mb_offsets[i] = offset; -+ sbi->s_mb_maxs[i] = max; -+ offset += 1 << (sb->s_blocksize_bits - i); -+ max = max >> 1; -+ i++; -+ } while (i <= sb->s_blocksize_bits + 1); -+ -+ /* init file for buddy data */ -+ if ((i = ext3_mb_init_backend(sb))) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_offsets); -+ kfree(sbi->s_mb_maxs); -+ return i; -+ } -+ -+ spin_lock_init(&sbi->s_reserve_lock); -+ spin_lock_init(&sbi->s_md_lock); -+ INIT_LIST_HEAD(&sbi->s_active_transaction); -+ INIT_LIST_HEAD(&sbi->s_closed_transaction); -+ INIT_LIST_HEAD(&sbi->s_committed_transaction); -+ spin_lock_init(&sbi->s_bal_lock); -+ -+ /* remove old on-disk buddy file */ -+ down(&root->i_sem); -+ dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy")); -+ if (dentry->d_inode != NULL) { -+ i = vfs_unlink(root, dentry); -+ if (i != 0) -+ printk("EXT3-fs: can't remove .buddy file: %d\n", i); -+ } -+ dput(dentry); -+ up(&root->i_sem); -+ -+ ext3_mb_history_init(sb); -+ -+ printk("EXT3-fs: mballoc enabled\n"); -+ return 0; -+} -+ -+int ext3_mb_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, num_meta_group_infos; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ /* release freed, non-committed blocks */ -+ spin_lock(&sbi->s_md_lock); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_committed_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ ext3_mb_free_committed_blocks(sb); -+ -+ if (sbi->s_group_info) { -+ for (i = 0; i < sbi->s_groups_count; i++) -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ num_meta_group_infos = (sbi->s_groups_count + -+ EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) -+ kfree(sbi->s_group_info[i]); -+ kfree(sbi->s_group_info); -+ } -+ if (sbi->s_mb_offsets) -+ kfree(sbi->s_mb_offsets); -+ if (sbi->s_mb_maxs) -+ kfree(sbi->s_mb_maxs); -+ if (sbi->s_buddy_cache) -+ iput(sbi->s_buddy_cache); -+ if (sbi->s_blocks_reserved) -+ printk("ext3-fs: %ld blocks being reserved at umount!\n", -+ sbi->s_blocks_reserved); -+ if (ext3_mb_stats) { -+ printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n", -+ atomic_read(&sbi->s_bal_allocated), -+ atomic_read(&sbi->s_bal_reqs), -+ atomic_read(&sbi->s_bal_success)); -+ printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, " -+ "%u 2^N hits, %u breaks\n", -+ atomic_read(&sbi->s_bal_ex_scanned), -+ atomic_read(&sbi->s_bal_goals), -+ atomic_read(&sbi->s_bal_2orders), -+ atomic_read(&sbi->s_bal_breaks)); -+ printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n", -+ sbi->s_mb_buddies_generated++, -+ sbi->s_mb_generation_time); -+ } -+ -+ ext3_mb_history_release(sb); -+ -+ return 0; -+} -+ -+void ext3_mb_free_committed_blocks(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int err, i, count = 0, count2 = 0; -+ struct ext3_free_metadata *md; -+ struct ext3_buddy e3b; -+ -+ if (list_empty(&sbi->s_committed_transaction)) -+ return; -+ -+ /* there is committed blocks to be freed yet */ -+ do { -+ /* get next array of blocks */ -+ md = NULL; -+ spin_lock(&sbi->s_md_lock); -+ if (!list_empty(&sbi->s_committed_transaction)) { -+ md = list_entry(sbi->s_committed_transaction.next, -+ struct ext3_free_metadata, list); -+ list_del(&md->list); -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ if (md == NULL) -+ break; -+ -+ mb_debug("gonna free %u blocks in group %u (0x%p):", -+ md->num, md->group, md); -+ -+ err = ext3_mb_load_buddy(sb, md->group, &e3b); -+ /* we expect to find existing buddy because it's pinned */ -+ BUG_ON(err != 0); -+ -+ /* there are blocks to put in buddy to make them really free */ -+ count += md->num; -+ count2++; -+ ext3_lock_group(sb, md->group); -+ for (i = 0; i < md->num; i++) { -+ mb_debug(" %u", md->blocks[i]); -+ mb_free_blocks(&e3b, md->blocks[i], 1); -+ } -+ mb_debug("\n"); -+ ext3_unlock_group(sb, md->group); -+ -+ /* balance refcounts from ext3_mb_free_metadata() */ -+ page_cache_release(e3b.bd_buddy_page); -+ page_cache_release(e3b.bd_bitmap_page); -+ -+ kfree(md); -+ ext3_mb_release_desc(&e3b); -+ -+ } while (md); -+ mb_debug("freed %u blocks in %u structures\n", count, count2); -+} -+ -+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ if (sbi->s_last_transaction == handle->h_transaction->t_tid) -+ return; -+ -+ /* new transaction! time to close last one and free blocks for -+ * committed transaction. we know that only transaction can be -+ * active, so previos transaction can be being logged and we -+ * know that transaction before previous is known to be already -+ * logged. this means that now we may free blocks freed in all -+ * transactions before previous one. hope I'm clear enough ... */ -+ -+ spin_lock(&sbi->s_md_lock); -+ if (sbi->s_last_transaction != handle->h_transaction->t_tid) { -+ mb_debug("new transaction %lu, old %lu\n", -+ (unsigned long) handle->h_transaction->t_tid, -+ (unsigned long) sbi->s_last_transaction); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_closed_transaction); -+ sbi->s_last_transaction = handle->h_transaction->t_tid; -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ ext3_mb_free_committed_blocks(sb); -+} -+ -+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b, -+ int group, int block, int count) -+{ -+ struct ext3_group_info *db = e3b->bd_info; -+ struct super_block *sb = e3b->bd_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_free_metadata *md; -+ int i; -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ ext3_lock_group(sb, group); -+ for (i = 0; i < count; i++) { -+ md = db->bb_md_cur; -+ if (md && db->bb_tid != handle->h_transaction->t_tid) { -+ db->bb_md_cur = NULL; -+ md = NULL; -+ } -+ -+ if (md == NULL) { -+ ext3_unlock_group(sb, group); -+ md = kmalloc(sizeof(*md), GFP_KERNEL); -+ if (md == NULL) -+ return -ENOMEM; -+ md->num = 0; -+ md->group = group; -+ -+ ext3_lock_group(sb, group); -+ if (db->bb_md_cur == NULL) { -+ spin_lock(&sbi->s_md_lock); -+ list_add(&md->list, &sbi->s_active_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ /* protect buddy cache from being freed, -+ * otherwise we'll refresh it from -+ * on-disk bitmap and lose not-yet-available -+ * blocks */ -+ page_cache_get(e3b->bd_buddy_page); -+ page_cache_get(e3b->bd_bitmap_page); -+ db->bb_md_cur = md; -+ db->bb_tid = handle->h_transaction->t_tid; -+ mb_debug("new md 0x%p for group %u\n", -+ md, md->group); -+ } else { -+ kfree(md); -+ md = db->bb_md_cur; -+ } -+ } -+ -+ BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS); -+ md->blocks[md->num] = block + i; -+ md->num++; -+ if (md->num == EXT3_BB_MAX_BLOCKS) { -+ /* no more space, put full container on a sb's list */ -+ db->bb_md_cur = NULL; -+ } -+ } -+ ext3_unlock_group(sb, group); -+ return 0; -+} -+ -+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode, -+ unsigned long block, unsigned long count, -+ int metadata, int *freed) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ unsigned long bit, overflow; -+ struct buffer_head *gd_bh; -+ unsigned long block_group; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ int err = 0, ret; -+ -+ *freed = 0; -+ sb = inode->i_sb; -+ if (!sb) { -+ printk ("ext3_free_blocks: nonexistent device"); -+ return; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ if (block < le32_to_cpu(es->s_first_data_block) || -+ block + count < block || -+ block + count > le32_to_cpu(es->s_blocks_count)) { -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks not in datazone - " -+ "block = %lu, count = %lu", block, count); -+ goto error_return; -+ } -+ -+ ext3_debug("freeing block %lu\n", block); -+ -+do_more: -+ overflow = 0; -+ block_group = (block - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ bit = (block - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb); -+ /* -+ * Check to see if we are freeing blocks across a group -+ * boundary. -+ */ -+ if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) { -+ overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb); -+ count -= overflow; -+ } -+ brelse(bitmap_bh); -+ bitmap_bh = read_block_bitmap(sb, block_group); -+ if (!bitmap_bh) -+ goto error_return; -+ gdp = ext3_get_group_desc (sb, block_group, &gd_bh); -+ if (!gdp) -+ goto error_return; -+ -+ if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) || -+ in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) || -+ in_range (block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group) || -+ in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks in system zones - " -+ "Block = %lu, count = %lu", -+ block, count); -+ -+ BUFFER_TRACE(bitmap_bh, "getting write access"); -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) -+ goto error_return; -+ -+ /* -+ * We are about to modify some metadata. Call the journal APIs -+ * to unshare ->b_data if a currently-committing transaction is -+ * using it -+ */ -+ BUFFER_TRACE(gd_bh, "get_write_access"); -+ err = ext3_journal_get_write_access(handle, gd_bh); -+ if (err) -+ goto error_return; -+ -+ err = ext3_mb_load_buddy(sb, block_group, &e3b); -+ if (err) -+ goto error_return; -+ -+#ifdef AGGRESSIVE_CHECK -+ { -+ int i; -+ for (i = 0; i < count; i++) -+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data)); -+ } -+#endif -+ mb_clear_bits(bitmap_bh->b_data, bit, count); -+ -+ /* We dirtied the bitmap block */ -+ BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ -+ if (metadata) { -+ /* blocks being freed are metadata. these blocks shouldn't -+ * be used until this transaction is committed */ -+ ext3_mb_free_metadata(handle, &e3b, block_group, bit, count); -+ } else { -+ ext3_lock_group(sb, block_group); -+ mb_free_blocks(&e3b, bit, count); -+ ext3_unlock_group(sb, block_group); -+ } -+ -+ spin_lock(sb_bgl_lock(sbi, block_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count); -+ spin_unlock(sb_bgl_lock(sbi, block_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, count); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ *freed = count; -+ -+ /* And the group descriptor block */ -+ BUFFER_TRACE(gd_bh, "dirtied group descriptor block"); -+ ret = ext3_journal_dirty_metadata(handle, gd_bh); -+ if (!err) err = ret; -+ -+ if (overflow && !err) { -+ block += count; -+ count = overflow; -+ goto do_more; -+ } -+ sb->s_dirt = 1; -+error_return: -+ brelse(bitmap_bh); -+ ext3_std_error(sb, err); -+ return; -+} -+ -+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int free, ret = -ENOSPC; -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ free = percpu_counter_read_positive(&sbi->s_freeblocks_counter); -+ if (blocks <= free - sbi->s_blocks_reserved) { -+ sbi->s_blocks_reserved += blocks; -+ ret = 0; -+ } -+ spin_unlock(&sbi->s_reserve_lock); -+ return ret; -+} -+ -+void ext3_mb_release_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ sbi->s_blocks_reserved -= blocks; -+ WARN_ON(sbi->s_blocks_reserved < 0); -+ if (sbi->s_blocks_reserved < 0) -+ sbi->s_blocks_reserved = 0; -+ spin_unlock(&sbi->s_reserve_lock); -+} -+ -+int ext3_new_block(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *errp) -+{ -+ int ret, len; -+ -+ if (!test_opt(inode->i_sb, MBALLOC)) { -+ ret = ext3_new_block_old(handle, inode, goal, errp); -+ goto out; -+ } -+ len = 1; -+ ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp); -+out: -+ return ret; -+} -+ -+ -+void ext3_free_blocks(handle_t *handle, struct inode * inode, -+ unsigned long block, unsigned long count, int metadata) -+{ -+ struct super_block *sb; -+ int freed; -+ -+ sb = inode->i_sb; -+ if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info) -+ ext3_free_blocks_sb(handle, sb, block, count, &freed); -+ else -+ ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed); -+ if (freed) -+ DQUOT_FREE_BLOCK(inode, freed); -+ return; -+} -+ -+#define EXT3_ROOT "ext3" -+#define EXT3_MB_STATS_NAME "mb_stats" -+#define EXT3_MB_MAX_TO_SCAN_NAME "mb_max_to_scan" -+#define EXT3_MB_MIN_TO_SCAN_NAME "mb_min_to_scan" -+#define EXT3_MB_ORDER2_REQ "mb_order2_req" -+ -+static int ext3_mb_stats_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_stats); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_stats_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_STATS_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0); -+ return count; -+} -+ -+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_max_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_max_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_min_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_min_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_order2_req_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_order2_reqs); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_order2_req_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_order2_reqs = value; -+ -+ return count; -+} -+ -+int __init init_ext3_proc(void) -+{ -+ struct proc_dir_entry *proc_ext3_mb_stats; -+ struct proc_dir_entry *proc_ext3_mb_max_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_min_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_order2_req; -+ -+ proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs); -+ if (proc_root_ext3 == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT); -+ return -EIO; -+ } -+ -+ /* Initialize EXT3_MB_STATS_NAME */ -+ proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_stats == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_STATS_NAME); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_stats->data = NULL; -+ proc_ext3_mb_stats->read_proc = ext3_mb_stats_read; -+ proc_ext3_mb_stats->write_proc = ext3_mb_stats_write; -+ -+ /* Initialize EXT3_MAX_TO_SCAN_NAME */ -+ proc_ext3_mb_max_to_scan = create_proc_entry( -+ EXT3_MB_MAX_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_max_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MAX_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_max_to_scan->data = NULL; -+ proc_ext3_mb_max_to_scan->read_proc = ext3_mb_max_to_scan_read; -+ proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write; -+ -+ /* Initialize EXT3_MIN_TO_SCAN_NAME */ -+ proc_ext3_mb_min_to_scan = create_proc_entry( -+ EXT3_MB_MIN_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_min_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MIN_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_min_to_scan->data = NULL; -+ proc_ext3_mb_min_to_scan->read_proc = ext3_mb_min_to_scan_read; -+ proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write; -+ -+ /* Initialize EXT3_ORDER2_REQ */ -+ proc_ext3_mb_order2_req = create_proc_entry( -+ EXT3_MB_ORDER2_REQ, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_order2_req == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_ORDER2_REQ); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_order2_req->data = NULL; -+ proc_ext3_mb_order2_req->read_proc = ext3_mb_order2_req_read; -+ proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write; -+ -+ return 0; -+} -+ -+void exit_ext3_proc(void) -+{ -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+} -Index: linux-2.6.12.6-bull/fs/ext3/Makefile -=================================================================== ---- linux-2.6.12.6-bull.orig/fs/ext3/Makefile 2006-04-29 20:39:09.000000000 +0400 -+++ linux-2.6.12.6-bull/fs/ext3/Makefile 2006-04-29 20:39:10.000000000 +0400 -@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o resize.o \ -- extents.o -+ extents.o mballoc.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.18-vanilla.patch deleted file mode 100644 index 702dfcc502..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.18-vanilla.patch +++ /dev/null @@ -1,3140 +0,0 @@ -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h 2006-07-16 02:29:43.000000000 +0800 -+++ linux-stage/include/linux/ext3_fs.h 2006-07-16 02:29:49.000000000 +0800 -@@ -53,6 +53,14 @@ - #define ext3_debug(f, a...) do {} while (0) - #endif - -+#define EXT3_MULTIBLOCK_ALLOCATOR 1 -+ -+#define EXT3_MB_HINT_MERGE 1 -+#define EXT3_MB_HINT_RESERVED 2 -+#define EXT3_MB_HINT_METADATA 4 -+#define EXT3_MB_HINT_FIRST 8 -+#define EXT3_MB_HINT_BEST 16 -+ - /* - * Special inodes numbers - */ -@@ -379,6 +387,7 @@ struct ext3_inode { - #define EXT3_MOUNT_IOPEN_NOPRIV 0x800000/* Make iopen world-readable */ - #define EXT3_MOUNT_EXTENTS 0x1000000/* Extents support */ - #define EXT3_MOUNT_EXTDEBUG 0x2000000/* Extents debug */ -+#define EXT3_MOUNT_MBALLOC 0x4000000/* Buddy allocation support */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -405,6 +413,14 @@ - #define ext3_find_first_zero_bit ext2_find_first_zero_bit - #define ext3_find_next_zero_bit ext2_find_next_zero_bit - -+#ifndef ext2_find_next_le_bit -+#ifdef __LITTLE_ENDIAN -+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off)) -+#else -+#error "mballoc needs a patch for big-endian systems - CFS bug 10634" -+#endif /* __LITTLE_ENDIAN */ -+#endif /* !ext2_find_next_le_bit */ -+ - /* - * Maximal mount counts between two filesystem checks - */ -@@ -749,12 +758,12 @@ ext3_group_first_block_no(struct super_b - /* balloc.c */ - extern int ext3_bg_has_super(struct super_block *sb, int group); - extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group); --extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode, -+extern ext3_fsblk_t ext3_new_block_old(handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, int *errp); - extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, unsigned long *count, int *errp); - extern void ext3_free_blocks (handle_t *handle, struct inode *inode, -- ext3_fsblk_t block, unsigned long count); -+ ext3_fsblk_t block, unsigned long count, int metadata); - extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb, - ext3_fsblk_t block, unsigned long count, - unsigned long *pdquot_freed_blocks); -@@ -881,6 +890,21 @@ extern void ext3_extents_initialize_bloc - extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); - -+/* mballoc.c */ -+extern long ext3_mb_stats; -+extern long ext3_mb_max_to_scan; -+extern int ext3_mb_init(struct super_block *sb, int needs_recovery); -+extern int ext3_mb_release(struct super_block *sb); -+extern ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode, -+ ext3_fsblk_t goal, int *errp); -+extern ext3_fsblk_t ext3_mb_new_blocks(handle_t *handle, struct inode *inode, -+ ext3_fsblk_t goal, int *len, int flags, -+ int *errp); -+extern int ext3_mb_reserve_blocks(struct super_block *sb, int); -+extern void ext3_mb_release_blocks(struct super_block *sb, int); -+int __init init_ext3_proc(void); -+void exit_ext3_proc(void); -+ - #endif /* __KERNEL__ */ - - /* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */ -Index: linux-stage/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs_sb.h 2006-07-16 02:29:43.000000000 +0800 -+++ linux-stage/include/linux/ext3_fs_sb.h 2006-07-16 02:29:49.000000000 +0800 -@@ -21,8 +21,14 @@ - #include <linux/wait.h> - #include <linux/blockgroup_lock.h> - #include <linux/percpu_counter.h> -+#include <linux/list.h> - #endif - #include <linux/rbtree.h> -+#include <linux/proc_fs.h> -+ -+struct ext3_buddy_group_blocks; -+struct ext3_mb_history; -+#define EXT3_BB_MAX_BLOCKS - - /* - * third extended-fs super-block data in memory -@@ -78,6 +84,43 @@ struct ext3_sb_info { - char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */ - int s_jquota_fmt; /* Format of quota to use */ - #endif -+ -+ /* for buddy allocator */ -+ struct ext3_group_info ***s_group_info; -+ struct inode *s_buddy_cache; -+ long s_blocks_reserved; -+ spinlock_t s_reserve_lock; -+ struct list_head s_active_transaction; -+ struct list_head s_closed_transaction; -+ struct list_head s_committed_transaction; -+ spinlock_t s_md_lock; -+ tid_t s_last_transaction; -+ int s_mb_factor; -+ unsigned short *s_mb_offsets, *s_mb_maxs; -+ unsigned long s_stripe; -+ -+ /* history to debug policy */ -+ struct ext3_mb_history *s_mb_history; -+ int s_mb_history_cur; -+ int s_mb_history_max; -+ struct proc_dir_entry *s_mb_proc; -+ spinlock_t s_mb_history_lock; -+ -+ /* stats for buddy allocator */ -+ atomic_t s_bal_reqs; /* number of reqs with len > 1 */ -+ atomic_t s_bal_success; /* we found long enough chunks */ -+ atomic_t s_bal_allocated; /* in blocks */ -+ atomic_t s_bal_ex_scanned; /* total extents scanned */ -+ atomic_t s_bal_goals; /* goal hits */ -+ atomic_t s_bal_breaks; /* too long searches */ -+ atomic_t s_bal_2orders; /* 2^order hits */ -+ spinlock_t s_bal_lock; -+ unsigned long s_mb_buddies_generated; -+ unsigned long long s_mb_generation_time; - }; -+ -+#define EXT3_GROUP_INFO(sb, group) \ -+ EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \ -+ [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)] - - #endif /* _LINUX_EXT3_FS_SB */ -Index: linux-stage/fs/ext3/super.c -=================================================================== ---- linux-stage.orig/fs/ext3/super.c 2006-07-16 02:29:43.000000000 +0800 -+++ linux-stage/fs/ext3/super.c 2006-07-16 02:29:49.000000000 +0800 -@@ -391,6 +391,7 @@ static void ext3_put_super (struct super - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_mb_release(sb); - ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); -@@ -642,6 +643,7 @@ enum { - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - Opt_extents, Opt_noextents, Opt_extdebug, -+ Opt_mballoc, Opt_nomballoc, Opt_stripe, - Opt_grpquota - }; - -@@ -696,6 +697,9 @@ static match_table_t tokens = { - {Opt_extents, "extents"}, - {Opt_noextents, "noextents"}, - {Opt_extdebug, "extdebug"}, -+ {Opt_mballoc, "mballoc"}, -+ {Opt_nomballoc, "nomballoc"}, -+ {Opt_stripe, "stripe=%u"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -1047,6 +1049,19 @@ clear_qf_name: - case Opt_extdebug: - set_opt (sbi->s_mount_opt, EXTDEBUG); - break; -+ case Opt_mballoc: -+ set_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_nomballoc: -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_stripe: -+ if (match_int(&args[0], &option)) -+ return 0; -+ if (option < 0) -+ return 0; -+ sbi->s_stripe = option; -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1773,6 +1778,7 @@ static int ext3_fill_super (struct super - "writeback"); - - ext3_ext_init(sb); -+ ext3_mb_init(sb, needs_recovery); - lock_kernel(); - return 0; - -@@ -2712,7 +2718,13 @@ static struct file_system_type ext3_fs_t - - static int __init init_ext3_fs(void) - { -- int err = init_ext3_xattr(); -+ int err; -+ -+ err = init_ext3_proc(); -+ if (err) -+ return err; -+ -+ err = init_ext3_xattr(); - if (err) - return err; - err = init_inodecache(); -@@ -2734,6 +2746,7 @@ static void __exit exit_ext3_fs(void) - unregister_filesystem(&ext3_fs_type); - destroy_inodecache(); - exit_ext3_xattr(); -+ exit_ext3_proc(); - } - - int ext3_prep_san_write(struct inode *inode, long *blocks, -Index: linux-stage/fs/ext3/extents.c -=================================================================== ---- linux-stage.orig/fs/ext3/extents.c 2006-07-16 02:29:43.000000000 +0800 -+++ linux-stage/fs/ext3/extents.c 2006-07-16 02:29:49.000000000 +0800 -@@ -771,7 +771,7 @@ cleanup: - for (i = 0; i < depth; i++) { - if (!ablocks[i]) - continue; -- ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1); - } - } - kfree(ablocks); -@@ -1428,7 +1428,7 @@ int ext3_ext_rm_idx(handle_t *handle, st - path->p_idx->ei_leaf); - bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); - ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -- ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1); - return err; - } - -@@ -1913,10 +1913,12 @@ ext3_remove_blocks(struct ext3_extents_t - int needed = ext3_remove_blocks_credits(tree, ex, from, to); - handle_t *handle = ext3_journal_start(tree->inode, needed); - struct buffer_head *bh; -- int i; -+ int i, metadata = 0; - - if (IS_ERR(handle)) - return PTR_ERR(handle); -+ if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode)) -+ metadata = 1; - if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { - /* tail removal */ - unsigned long num, start; -@@ -1928,7 +1930,7 @@ ext3_remove_blocks(struct ext3_extents_t - bh = sb_find_get_block(tree->inode->i_sb, start + i); - ext3_forget(handle, 0, tree->inode, bh, start + i); - } -- ext3_free_blocks(handle, tree->inode, start, num); -+ ext3_free_blocks(handle, tree->inode, start, num, metadata); - } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { - printk("strange request: removal %lu-%lu from %u:%u\n", - from, to, ex->ee_block, ex->ee_len); -Index: linux-stage/fs/ext3/inode.c -=================================================================== ---- linux-stage.orig/fs/ext3/inode.c 2006-07-16 02:29:43.000000000 +0800 -+++ linux-stage/fs/ext3/inode.c 2006-07-16 02:29:49.000000000 +0800 -@@ -562,7 +562,7 @@ static int ext3_alloc_blocks(handle_t *h - return ret; - failed_out: - for (i = 0; i <index; i++) -- ext3_free_blocks(handle, inode, new_blocks[i], 1); -+ ext3_free_blocks(handle, inode, new_blocks[i], 1, 1); - return ret; - } - -@@ -661,9 +661,9 @@ failed: - ext3_journal_forget(handle, branch[i].bh); - } - for (i = 0; i <indirect_blks; i++) -- ext3_free_blocks(handle, inode, new_blocks[i], 1); -+ ext3_free_blocks(handle, inode, new_blocks[i], 1, 1); - -- ext3_free_blocks(handle, inode, new_blocks[i], num); -+ ext3_free_blocks(handle, inode, new_blocks[i], num, 1); - - return err; - } -@@ -760,9 +760,9 @@ err_out: - for (i = 1; i <= num; i++) { - BUFFER_TRACE(where[i].bh, "call journal_forget"); - ext3_journal_forget(handle, where[i].bh); -- ext3_free_blocks(handle,inode,le32_to_cpu(where[i-1].key),1); -+ ext3_free_blocks(handle,inode,le32_to_cpu(where[i-1].key),1,1); - } -- ext3_free_blocks(handle, inode, le32_to_cpu(where[num].key), blks); -+ ext3_free_blocks(handle, inode, le32_to_cpu(where[num].key), blks, 1); - - return err; - } -@@ -2007,7 +2007,7 @@ static void ext3_clear_blocks(handle_t * - } - } - -- ext3_free_blocks(handle, inode, block_to_free, count); -+ ext3_free_blocks(handle, inode, block_to_free, count, 1); - } - - /** -@@ -2180,7 +2180,7 @@ static void ext3_free_branches(handle_t - ext3_journal_test_restart(handle, inode); - } - -- ext3_free_blocks(handle, inode, nr, 1); -+ ext3_free_blocks(handle, inode, nr, 1, 1); - - if (parent_bh) { - /* -Index: linux-stage/fs/ext3/balloc.c -=================================================================== ---- linux-stage.orig/fs/ext3/balloc.c 2006-07-16 02:29:43.000000000 +0800 -+++ linux-stage/fs/ext3/balloc.c 2006-07-16 02:33:13.000000000 +0800 -@@ -79,7 +79,7 @@ struct ext3_group_desc * ext3_get_group_ - * - * Return buffer_head on success or NULL in case of failure. - */ --static struct buffer_head * -+struct buffer_head * - read_block_bitmap(struct super_block *sb, unsigned int block_group) - { - struct ext3_group_desc * desc; -@@ -490,24 +490,6 @@ error_return: - return; - } - --/* Free given blocks, update quota and i_blocks field */ --void ext3_free_blocks(handle_t *handle, struct inode *inode, -- ext3_fsblk_t block, unsigned long count) --{ -- struct super_block * sb; -- unsigned long dquot_freed_blocks; -- -- sb = inode->i_sb; -- if (!sb) { -- printk ("ext3_free_blocks: nonexistent device"); -- return; -- } -- ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks); -- if (dquot_freed_blocks) -- DQUOT_FREE_BLOCK(inode, dquot_freed_blocks); -- return; --} -- - /* - * For ext3 allocations, we must not reuse any blocks which are - * allocated in the bitmap buffer's "last committed data" copy. This -@@ -1463,7 +1445,7 @@ out: - return 0; - } - --ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode, -+ext3_fsblk_t ext3_new_block_old(handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, int *errp) - { - unsigned long count = 1; -Index: linux-stage/fs/ext3/xattr.c -=================================================================== ---- linux-stage.orig/fs/ext3/xattr.c 2006-07-16 02:29:43.000000000 +0800 -+++ linux-stage/fs/ext3/xattr.c 2006-07-16 02:29:49.000000000 +0800 -@@ -484,7 +484,7 @@ ext3_xattr_release_block(handle_t *handl - ea_bdebug(bh, "refcount now=0; freeing"); - if (ce) - mb_cache_entry_free(ce); -- ext3_free_blocks(handle, inode, bh->b_blocknr, 1); -+ ext3_free_blocks(handle, inode, bh->b_blocknr, 1, 1); - get_bh(bh); - ext3_forget(handle, 1, inode, bh, bh->b_blocknr); - } else { -@@ -805,7 +805,7 @@ inserted: - new_bh = sb_getblk(sb, block); - if (!new_bh) { - getblk_failed: -- ext3_free_blocks(handle, inode, block, 1); -+ ext3_free_blocks(handle, inode, block, 1, 1); - error = -EIO; - goto cleanup; - } -Index: linux-stage/fs/ext3/mballoc.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-stage/fs/ext3/mballoc.c 2006-07-16 02:29:49.000000000 +0800 -@@ -0,0 +1,2730 @@ -+/* -+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+ -+/* -+ * mballoc.c contains the multiblocks allocation routines -+ */ -+ -+#include <linux/config.h> -+#include <linux/time.h> -+#include <linux/fs.h> -+#include <linux/namei.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/quotaops.h> -+#include <linux/buffer_head.h> -+#include <linux/module.h> -+#include <linux/swap.h> -+#include <linux/proc_fs.h> -+#include <linux/pagemap.h> -+#include <linux/seq_file.h> -+ -+/* -+ * TODO: -+ * - bitmap read-ahead (proposed by Oleg Drokin aka green) -+ * - track min/max extents in each group for better group selection -+ * - mb_mark_used() may allocate chunk right after splitting buddy -+ * - special flag to advice allocator to look for requested + N blocks -+ * this may improve interaction between extents and mballoc -+ * - tree of groups sorted by number of free blocks -+ * - percpu reservation code (hotpath) -+ * - error handling -+ */ -+ -+/* -+ * with AGRESSIVE_CHECK allocator runs consistency checks over -+ * structures. these checks slow things down a lot -+ */ -+#define AGGRESSIVE_CHECK__ -+ -+/* -+ */ -+#define MB_DEBUG__ -+#ifdef MB_DEBUG -+#define mb_debug(fmt,a...) printk(fmt, ##a) -+#else -+#define mb_debug(fmt,a...) -+#endif -+ -+/* -+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory -+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history -+ */ -+#define EXT3_MB_HISTORY -+ -+/* -+ * How long mballoc can look for a best extent (in found extents) -+ */ -+long ext3_mb_max_to_scan = 500; -+ -+/* -+ * How long mballoc must look for a best extent -+ */ -+long ext3_mb_min_to_scan = 30; -+ -+/* -+ * with 'ext3_mb_stats' allocator will collect stats that will be -+ * shown at umount. The collecting costs though! -+ */ -+ -+long ext3_mb_stats = 1; -+ -+/* -+ * for which requests use 2^N search using buddies -+ */ -+long ext3_mb_order2_reqs = 8; -+ -+#ifdef EXT3_BB_MAX_BLOCKS -+#undef EXT3_BB_MAX_BLOCKS -+#endif -+#define EXT3_BB_MAX_BLOCKS 30 -+ -+struct ext3_free_metadata { -+ unsigned short group; -+ unsigned short num; -+ unsigned short blocks[EXT3_BB_MAX_BLOCKS]; -+ struct list_head list; -+}; -+ -+struct ext3_group_info { -+ unsigned long bb_state; -+ unsigned long bb_tid; -+ struct ext3_free_metadata *bb_md_cur; -+ unsigned short bb_first_free; -+ unsigned short bb_free; -+ unsigned short bb_fragments; -+ unsigned short bb_counters[]; -+}; -+ -+ -+#define EXT3_GROUP_INFO_NEED_INIT_BIT 0 -+#define EXT3_GROUP_INFO_LOCKED_BIT 1 -+ -+#define EXT3_MB_GRP_NEED_INIT(grp) \ -+ (test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state)) -+ -+struct ext3_free_extent { -+ __u16 fe_start; -+ __u16 fe_len; -+ __u16 fe_group; -+}; -+ -+struct ext3_allocation_context { -+ struct super_block *ac_sb; -+ -+ /* search goals */ -+ struct ext3_free_extent ac_g_ex; -+ -+ /* the best found extent */ -+ struct ext3_free_extent ac_b_ex; -+ -+ /* number of iterations done. we have to track to limit searching */ -+ unsigned long ac_ex_scanned; -+ __u16 ac_groups_scanned; -+ __u16 ac_found; -+ __u16 ac_tail; -+ __u16 ac_buddy; -+ __u8 ac_status; -+ __u8 ac_flags; /* allocation hints */ -+ __u8 ac_criteria; -+ __u8 ac_repeats; -+ __u8 ac_2order; /* if request is to allocate 2^N blocks and -+ * N > 0, the field stores N, otherwise 0 */ -+ -+ struct page *ac_buddy_page; -+ struct page *ac_bitmap_page; -+}; -+ -+#define AC_STATUS_CONTINUE 1 -+#define AC_STATUS_FOUND 2 -+#define AC_STATUS_BREAK 3 -+ -+struct ext3_mb_history { -+ struct ext3_free_extent goal; /* goal allocation */ -+ struct ext3_free_extent result; /* result allocation */ -+ unsigned pid; -+ unsigned ino; -+ __u16 found; /* how many extents have been found */ -+ __u16 groups; /* how many groups have been scanned */ -+ __u16 tail; /* what tail broke some buddy */ -+ __u16 buddy; /* buddy the tail ^^^ broke */ -+ __u8 cr; /* which phase the result extent was found at */ -+ __u8 merged; -+}; -+ -+struct ext3_buddy { -+ struct page *bd_buddy_page; -+ void *bd_buddy; -+ struct page *bd_bitmap_page; -+ void *bd_bitmap; -+ struct ext3_group_info *bd_info; -+ struct super_block *bd_sb; -+ __u16 bd_blkbits; -+ __u16 bd_group; -+}; -+#define EXT3_MB_BITMAP(e3b) ((e3b)->bd_bitmap) -+#define EXT3_MB_BUDDY(e3b) ((e3b)->bd_buddy) -+ -+#ifndef EXT3_MB_HISTORY -+#define ext3_mb_store_history(sb,ino,ac) -+#else -+static void ext3_mb_store_history(struct super_block *, unsigned ino, -+ struct ext3_allocation_context *ac); -+#endif -+ -+#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -+ -+static struct proc_dir_entry *proc_root_ext3; -+ -+int ext3_create (struct inode *, struct dentry *, int, struct nameidata *); -+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int); -+int ext3_mb_reserve_blocks(struct super_block *, int); -+void ext3_mb_release_blocks(struct super_block *, int); -+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *); -+void ext3_mb_free_committed_blocks(struct super_block *); -+ -+#if BITS_PER_LONG == 64 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 7UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~7UL); \ -+} -+#elif BITS_PER_LONG == 32 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 3UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~3UL); \ -+} -+#else -+#error "how many bits you are?!" -+#endif -+ -+static inline int mb_test_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ return ext2_test_bit(bit, addr); -+} -+ -+static inline void mb_set_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit(bit, addr); -+} -+ -+static inline void mb_set_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit_atomic(NULL, bit, addr); -+} -+ -+static inline void mb_clear_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit(bit, addr); -+} -+ -+static inline void mb_clear_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit_atomic(NULL, bit, addr); -+} -+ -+static inline int mb_find_next_zero_bit(void *addr, int max, int start) -+{ -+ int fix; -+#if BITS_PER_LONG == 64 -+ fix = ((unsigned long) addr & 7UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~7UL); -+#elif BITS_PER_LONG == 32 -+ fix = ((unsigned long) addr & 3UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~3UL); -+#else -+#error "how many bits you are?!" -+#endif -+ max += fix; -+ start += fix; -+ return ext2_find_next_zero_bit(addr, max, start) - fix; -+} -+ -+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max) -+{ -+ char *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(max != NULL); -+ -+ if (order > e3b->bd_blkbits + 1) { -+ *max = 0; -+ return NULL; -+ } -+ -+ /* at order 0 we see each particular block */ -+ *max = 1 << (e3b->bd_blkbits + 3); -+ if (order == 0) -+ return EXT3_MB_BITMAP(e3b); -+ -+ bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order]; -+ *max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order]; -+ -+ return bb; -+} -+ -+#ifdef AGGRESSIVE_CHECK -+ -+static void mb_check_buddy(struct ext3_buddy *e3b) -+{ -+ int order = e3b->bd_blkbits + 1; -+ int max, max2, i, j, k, count; -+ int fragments = 0, fstart; -+ void *buddy, *buddy2; -+ -+ if (!test_opt(e3b->bd_sb, MBALLOC)) -+ return; -+ -+ { -+ static int mb_check_counter = 0; -+ if (mb_check_counter++ % 300 != 0) -+ return; -+ } -+ -+ while (order > 1) { -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ buddy2 = mb_find_buddy(e3b, order - 1, &max2); -+ J_ASSERT(buddy2); -+ J_ASSERT(buddy != buddy2); -+ J_ASSERT(max * 2 == max2); -+ -+ count = 0; -+ for (i = 0; i < max; i++) { -+ -+ if (mb_test_bit(i, buddy)) { -+ /* only single bit in buddy2 may be 1 */ -+ if (!mb_test_bit(i << 1, buddy2)) -+ J_ASSERT(mb_test_bit((i<<1)+1, buddy2)); -+ else if (!mb_test_bit((i << 1) + 1, buddy2)) -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ continue; -+ } -+ -+ /* both bits in buddy2 must be 0 */ -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ J_ASSERT(mb_test_bit((i << 1) + 1, buddy2)); -+ -+ for (j = 0; j < (1 << order); j++) { -+ k = (i * (1 << order)) + j; -+ J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b))); -+ } -+ count++; -+ } -+ J_ASSERT(e3b->bd_info->bb_counters[order] == count); -+ order--; -+ } -+ -+ fstart = -1; -+ buddy = mb_find_buddy(e3b, 0, &max); -+ for (i = 0; i < max; i++) { -+ if (!mb_test_bit(i, buddy)) { -+ J_ASSERT(i >= e3b->bd_info->bb_first_free); -+ if (fstart == -1) { -+ fragments++; -+ fstart = i; -+ } -+ continue; -+ } -+ fstart = -1; -+ /* check used bits only */ -+ for (j = 0; j < e3b->bd_blkbits + 1; j++) { -+ buddy2 = mb_find_buddy(e3b, j, &max2); -+ k = i >> j; -+ J_ASSERT(k < max2); -+ J_ASSERT(mb_test_bit(k, buddy2)); -+ } -+ } -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info)); -+ J_ASSERT(e3b->bd_info->bb_fragments == fragments); -+} -+ -+#else -+#define mb_check_buddy(e3b) -+#endif -+ -+/* find most significant bit */ -+static int inline fmsb(unsigned short word) -+{ -+ int order; -+ -+ if (word > 255) { -+ order = 7; -+ word >>= 8; -+ } else { -+ order = -1; -+ } -+ -+ do { -+ order++; -+ word >>= 1; -+ } while (word != 0); -+ -+ return order; -+} -+ -+static void inline -+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first, -+ int len, struct ext3_group_info *grp) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ unsigned short min, max, chunk, border; -+ -+ mb_debug("mark %u/%u free\n", first, len); -+ J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ border = 2 << sb->s_blocksize_bits; -+ -+ while (len > 0) { -+ /* find how many blocks can be covered since this position */ -+ max = ffs(first | border) - 1; -+ -+ /* find how many blocks of power 2 we need to mark */ -+ min = fmsb(len); -+ -+ mb_debug(" %u/%u -> max %u, min %u\n", -+ first & ((2 << sb->s_blocksize_bits) - 1), -+ len, max, min); -+ -+ if (max < min) -+ min = max; -+ chunk = 1 << min; -+ -+ /* mark multiblock chunks only */ -+ grp->bb_counters[min]++; -+ if (min > 0) { -+ mb_debug(" set %u at %u \n", first >> min, -+ sbi->s_mb_offsets[min]); -+ mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]); -+ } -+ -+ len -= chunk; -+ first += chunk; -+ } -+} -+ -+static void -+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap, -+ int group) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group); -+ unsigned short max = EXT3_BLOCKS_PER_GROUP(sb); -+ unsigned short i = 0, first, len; -+ unsigned free = 0, fragments = 0; -+ unsigned long long period = get_cycles(); -+ -+ i = mb_find_next_zero_bit(bitmap, max, 0); -+ grp->bb_first_free = i; -+ while (i < max) { -+ fragments++; -+ first = i; -+ i = ext2_find_next_le_bit(bitmap, max, i); -+ len = i - first; -+ free += len; -+ if (len > 1) -+ ext3_mb_mark_free_simple(sb, buddy, first, len, grp); -+ else -+ grp->bb_counters[0]++; -+ if (i < max) -+ i = mb_find_next_zero_bit(bitmap, max, i); -+ } -+ grp->bb_fragments = fragments; -+ -+ /* bb_state shouldn't being modified because all -+ * others waits for init completion on page lock */ -+ clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state); -+ if (free != grp->bb_free) { -+ printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n", -+ group, free, grp->bb_free); -+ grp->bb_free = free; -+ } -+ -+ period = get_cycles() - period; -+ spin_lock(&EXT3_SB(sb)->s_bal_lock); -+ EXT3_SB(sb)->s_mb_buddies_generated++; -+ EXT3_SB(sb)->s_mb_generation_time += period; -+ spin_unlock(&EXT3_SB(sb)->s_bal_lock); -+} -+ -+static int ext3_mb_init_cache(struct page *page) -+{ -+ int blocksize, blocks_per_page, groups_per_page; -+ int err = 0, i, first_group, first_block; -+ struct super_block *sb; -+ struct buffer_head *bhs; -+ struct buffer_head **bh; -+ struct inode *inode; -+ char *data, *bitmap; -+ -+ mb_debug("init page %lu\n", page->index); -+ -+ inode = page->mapping->host; -+ sb = inode->i_sb; -+ blocksize = 1 << inode->i_blkbits; -+ blocks_per_page = PAGE_CACHE_SIZE / blocksize; -+ -+ groups_per_page = blocks_per_page >> 1; -+ if (groups_per_page == 0) -+ groups_per_page = 1; -+ -+ /* allocate buffer_heads to read bitmaps */ -+ if (groups_per_page > 1) { -+ err = -ENOMEM; -+ i = sizeof(struct buffer_head *) * groups_per_page; -+ bh = kmalloc(i, GFP_NOFS); -+ if (bh == NULL) -+ goto out; -+ memset(bh, 0, i); -+ } else -+ bh = &bhs; -+ -+ first_group = page->index * blocks_per_page / 2; -+ -+ /* read all groups the page covers into the cache */ -+ for (i = 0; i < groups_per_page; i++) { -+ struct ext3_group_desc * desc; -+ -+ if (first_group + i >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ err = -EIO; -+ desc = ext3_get_group_desc(sb, first_group + i, NULL); -+ if (desc == NULL) -+ goto out; -+ -+ err = -ENOMEM; -+ bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ if (bh[i] == NULL) -+ goto out; -+ -+ if (buffer_uptodate(bh[i])) -+ continue; -+ -+ lock_buffer(bh[i]); -+ if (buffer_uptodate(bh[i])) { -+ unlock_buffer(bh[i]); -+ continue; -+ } -+ -+ get_bh(bh[i]); -+ bh[i]->b_end_io = end_buffer_read_sync; -+ submit_bh(READ, bh[i]); -+ mb_debug("read bitmap for group %u\n", first_group + i); -+ } -+ -+ /* wait for I/O completion */ -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ wait_on_buffer(bh[i]); -+ -+ err = -EIO; -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ if (!buffer_uptodate(bh[i])) -+ goto out; -+ -+ first_block = page->index * blocks_per_page; -+ for (i = 0; i < blocks_per_page; i++) { -+ int group; -+ -+ group = (first_block + i) >> 1; -+ if (group >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ data = page_address(page) + (i * blocksize); -+ bitmap = bh[group - first_group]->b_data; -+ -+ if ((first_block + i) & 1) { -+ /* this is block of buddy */ -+ mb_debug("put buddy for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memset(data, 0xff, blocksize); -+ EXT3_GROUP_INFO(sb, group)->bb_fragments = 0; -+ memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0, -+ sizeof(unsigned short)*(sb->s_blocksize_bits+2)); -+ ext3_mb_generate_buddy(sb, data, bitmap, group); -+ } else { -+ /* this is block of bitmap */ -+ mb_debug("put bitmap for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memcpy(data, bitmap, blocksize); -+ } -+ } -+ SetPageUptodate(page); -+ -+out: -+ if (bh) { -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ brelse(bh[i]); -+ if (bh != &bhs) -+ kfree(bh); -+ } -+ return err; -+} -+ -+static int ext3_mb_load_buddy(struct super_block *sb, int group, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *inode = sbi->s_buddy_cache; -+ int blocks_per_page, block, pnum, poff; -+ struct page *page; -+ -+ mb_debug("load group %u\n", group); -+ -+ blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize; -+ -+ e3b->bd_blkbits = sb->s_blocksize_bits; -+ e3b->bd_info = EXT3_GROUP_INFO(sb, group); -+ e3b->bd_sb = sb; -+ e3b->bd_group = group; -+ e3b->bd_buddy_page = NULL; -+ e3b->bd_bitmap_page = NULL; -+ -+ block = group * 2; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ /* we could use find_or_create_page(), but it locks page -+ * what we'd like to avoid in fast path ... */ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_bitmap_page = page; -+ e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ block++; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_buddy_page = page; -+ e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ return 0; -+ -+err: -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+ e3b->bd_buddy = NULL; -+ e3b->bd_bitmap = NULL; -+ return -EIO; -+} -+ -+static void ext3_mb_release_desc(struct ext3_buddy *e3b) -+{ -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+} -+ -+ -+static inline void -+ext3_lock_group(struct super_block *sb, int group) -+{ -+ bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static inline void -+ext3_unlock_group(struct super_block *sb, int group) -+{ -+ bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block) -+{ -+ int order = 1; -+ void *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(block < (1 << (e3b->bd_blkbits + 3))); -+ -+ bb = EXT3_MB_BUDDY(e3b); -+ while (order <= e3b->bd_blkbits + 1) { -+ block = block >> 1; -+ if (!mb_test_bit(block, bb)) { -+ /* this block is part of buddy of order 'order' */ -+ return order; -+ } -+ bb += 1 << (e3b->bd_blkbits - order); -+ order++; -+ } -+ return 0; -+} -+ -+static inline void mb_clear_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0; -+ cur += 32; -+ continue; -+ } -+ mb_clear_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static inline void mb_set_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0xffffffff; -+ cur += 32; -+ continue; -+ } -+ mb_set_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count) -+{ -+ int block = 0, max = 0, order; -+ void *buddy, *buddy2; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free += count; -+ if (first < e3b->bd_info->bb_first_free) -+ e3b->bd_info->bb_first_free = first; -+ -+ /* let's maintain fragments counter */ -+ if (first != 0) -+ block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b)); -+ if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b)); -+ if (block && max) -+ e3b->bd_info->bb_fragments--; -+ else if (!block && !max) -+ e3b->bd_info->bb_fragments++; -+ -+ /* let's maintain buddy itself */ -+ while (count-- > 0) { -+ block = first++; -+ order = 0; -+ -+ J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b))); -+ mb_clear_bit(block, EXT3_MB_BITMAP(e3b)); -+ e3b->bd_info->bb_counters[order]++; -+ -+ /* start of the buddy */ -+ buddy = mb_find_buddy(e3b, order, &max); -+ -+ do { -+ block &= ~1UL; -+ if (mb_test_bit(block, buddy) || -+ mb_test_bit(block + 1, buddy)) -+ break; -+ -+ /* both the buddies are free, try to coalesce them */ -+ buddy2 = mb_find_buddy(e3b, order + 1, &max); -+ -+ if (!buddy2) -+ break; -+ -+ if (order > 0) { -+ /* for special purposes, we don't set -+ * free bits in bitmap */ -+ mb_set_bit(block, buddy); -+ mb_set_bit(block + 1, buddy); -+ } -+ e3b->bd_info->bb_counters[order]--; -+ e3b->bd_info->bb_counters[order]--; -+ -+ block = block >> 1; -+ order++; -+ e3b->bd_info->bb_counters[order]++; -+ -+ mb_clear_bit(block, buddy2); -+ buddy = buddy2; -+ } while (1); -+ } -+ mb_check_buddy(e3b); -+ -+ return 0; -+} -+ -+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block, -+ int needed, struct ext3_free_extent *ex) -+{ -+ int next = block, max, ord; -+ void *buddy; -+ -+ J_ASSERT(ex != NULL); -+ -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ J_ASSERT(block < max); -+ if (mb_test_bit(block, buddy)) { -+ ex->fe_len = 0; -+ ex->fe_start = 0; -+ ex->fe_group = 0; -+ return 0; -+ } -+ -+ if (likely(order == 0)) { -+ /* find actual order */ -+ order = mb_find_order_for_block(e3b, block); -+ block = block >> order; -+ } -+ -+ ex->fe_len = 1 << order; -+ ex->fe_start = block << order; -+ ex->fe_group = e3b->bd_group; -+ -+ /* calc difference from given start */ -+ next = next - ex->fe_start; -+ ex->fe_len -= next; -+ ex->fe_start += next; -+ -+ while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) { -+ -+ if (block + 1 >= max) -+ break; -+ -+ next = (block + 1) * (1 << order); -+ if (mb_test_bit(next, EXT3_MB_BITMAP(e3b))) -+ break; -+ -+ ord = mb_find_order_for_block(e3b, next); -+ -+ order = ord; -+ block = next >> order; -+ ex->fe_len += 1 << order; -+ } -+ -+ J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3))); -+ return ex->fe_len; -+} -+ -+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex) -+{ -+ int ord, mlen = 0, max = 0, cur; -+ int start = ex->fe_start; -+ int len = ex->fe_len; -+ unsigned ret = 0; -+ int len0 = len; -+ void *buddy; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free -= len; -+ if (e3b->bd_info->bb_first_free == start) -+ e3b->bd_info->bb_first_free += len; -+ -+ /* let's maintain fragments counter */ -+ if (start != 0) -+ mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b)); -+ if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b)); -+ if (mlen && max) -+ e3b->bd_info->bb_fragments++; -+ else if (!mlen && !max) -+ e3b->bd_info->bb_fragments--; -+ -+ /* let's maintain buddy itself */ -+ while (len) { -+ ord = mb_find_order_for_block(e3b, start); -+ -+ if (((start >> ord) << ord) == start && len >= (1 << ord)) { -+ /* the whole chunk may be allocated at once! */ -+ mlen = 1 << ord; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ J_ASSERT((start >> ord) < max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ start += mlen; -+ len -= mlen; -+ J_ASSERT(len >= 0); -+ continue; -+ } -+ -+ /* store for history */ -+ if (ret == 0) -+ ret = len | (ord << 16); -+ -+ /* we have to split large buddy */ -+ J_ASSERT(ord > 0); -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ -+ ord--; -+ cur = (start >> ord) & ~1U; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_clear_bit(cur, buddy); -+ mb_clear_bit(cur + 1, buddy); -+ e3b->bd_info->bb_counters[ord]++; -+ e3b->bd_info->bb_counters[ord]++; -+ } -+ -+ /* now drop all the bits in bitmap */ -+ mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0); -+ -+ mb_check_buddy(e3b); -+ -+ return ret; -+} -+ -+/* -+ * Must be called under group lock! -+ */ -+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ unsigned long ret; -+ -+ ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len); -+ ret = mb_mark_used(e3b, &ac->ac_b_ex); -+ -+ ac->ac_status = AC_STATUS_FOUND; -+ ac->ac_tail = ret & 0xffff; -+ ac->ac_buddy = ret >> 16; -+ -+ /* hold in-core structures until allocated -+ * blocks are marked non-free in on-disk bitmap */ -+ ac->ac_buddy_page = e3b->bd_buddy_page; -+ page_cache_get(e3b->bd_buddy_page); -+ ac->ac_bitmap_page = e3b->bd_bitmap_page; -+ page_cache_get(e3b->bd_bitmap_page); -+} -+ -+/* -+ * The routine checks whether found extent is good enough. If it is, -+ * then the extent gets marked used and flag is set to the context -+ * to stop scanning. Otherwise, the extent is compared with the -+ * previous found extent and if new one is better, then it's stored -+ * in the context. Later, the best found extent will be used, if -+ * mballoc can't find good enough extent. -+ * -+ * FIXME: real allocation policy is to be designed yet! -+ */ -+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac, -+ struct ext3_free_extent *ex, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent *bex = &ac->ac_b_ex; -+ struct ext3_free_extent *gex = &ac->ac_g_ex; -+ -+ J_ASSERT(ex->fe_len > 0); -+ J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ -+ ac->ac_found++; -+ -+ /* -+ * The special case - take what you catch first -+ */ -+ if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * Let's check whether the chunk is good enough -+ */ -+ if (ex->fe_len == gex->fe_len) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * If this is first found extent, just store it in the context -+ */ -+ if (bex->fe_len == 0) { -+ *bex = *ex; -+ return; -+ } -+ -+ /* -+ * If new found extent is better, store it in the context -+ */ -+ if (bex->fe_len < gex->fe_len) { -+ /* if the request isn't satisfied, any found extent -+ * larger than previous best one is better */ -+ if (ex->fe_len > bex->fe_len) -+ *bex = *ex; -+ } else if (ex->fe_len > gex->fe_len) { -+ /* if the request is satisfied, then we try to find -+ * an extent that still satisfy the request, but is -+ * smaller than previous one */ -+ *bex = *ex; -+ } -+ -+ /* -+ * Let's scan at least few extents and don't pick up a first one -+ */ -+ if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+ -+ /* -+ * We don't want to scan for a whole year -+ */ -+ if (ac->ac_found > ext3_mb_max_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+} -+ -+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent ex = ac->ac_b_ex; -+ int group = ex.fe_group, max, err; -+ -+ J_ASSERT(ex.fe_len > 0); -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex); -+ -+ if (max > 0) { -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ int group = ac->ac_g_ex.fe_group, max, err; -+ struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb); -+ struct ext3_super_block *es = sbi->s_es; -+ struct ext3_free_extent ex; -+ -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start, -+ ac->ac_g_ex.fe_len, &ex); -+ -+ if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) { -+ ext3_fsblk_t start; -+ start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) + -+ ex.fe_start + le32_to_cpu(es->s_first_data_block)); -+ if (start % sbi->s_stripe == 0) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ } else if (max >= ac->ac_g_ex.fe_len) { -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) { -+ /* Sometimes, caller may want to merge even small -+ * number of blocks to an existing extent */ -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+/* -+ * The routine scans buddy structures (not bitmap!) from given order -+ * to max order and tries to find big enough chunk to satisfy the req -+ */ -+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_group_info *grp = e3b->bd_info; -+ void *buddy; -+ int i, k, max; -+ -+ J_ASSERT(ac->ac_2order > 0); -+ for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) { -+ if (grp->bb_counters[i] == 0) -+ continue; -+ -+ buddy = mb_find_buddy(e3b, i, &max); -+ if (buddy == NULL) { -+ printk(KERN_ALERT "looking for wrong order?\n"); -+ break; -+ } -+ -+ k = mb_find_next_zero_bit(buddy, max, 0); -+ J_ASSERT(k < max); -+ -+ ac->ac_found++; -+ -+ ac->ac_b_ex.fe_len = 1 << i; -+ ac->ac_b_ex.fe_start = k << i; -+ ac->ac_b_ex.fe_group = e3b->bd_group; -+ -+ ext3_mb_use_best_found(ac, e3b); -+ J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len); -+ -+ if (unlikely(ext3_mb_stats)) -+ atomic_inc(&EXT3_SB(sb)->s_bal_2orders); -+ -+ break; -+ } -+} -+ -+/* -+ * The routine scans the group and measures all found extents. -+ * In order to optimize scanning, caller must pass number of -+ * free blocks in the group, so the routine can know upper limit. -+ */ -+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ int i, free; -+ -+ free = e3b->bd_info->bb_free; -+ J_ASSERT(free > 0); -+ -+ i = e3b->bd_info->bb_first_free; -+ -+ while (free && ac->ac_status == AC_STATUS_CONTINUE) { -+ i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i); -+ if (i >= sb->s_blocksize * 8) { -+ J_ASSERT(free == 0); -+ break; -+ } -+ -+ mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex); -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(free >= ex.fe_len); -+ -+ ext3_mb_measure_extent(ac, &ex, e3b); -+ -+ i += ex.fe_len; -+ free -= ex.fe_len; -+ } -+} -+ -+/* -+ * This is a special case for storages like raid5 -+ * we try to find stripe-aligned chunks for stripe-size requests -+ */ -+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ ext3_fsblk_t i, max; -+ -+ J_ASSERT(sbi->s_stripe != 0); -+ -+ /* find first stripe-aligned block */ -+ i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) + -+ le32_to_cpu(sbi->s_es->s_first_data_block); -+ i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe; -+ i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb); -+ -+ while (i < sb->s_blocksize * 8) { -+ if (!mb_test_bit(i, bitmap)) { -+ max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex); -+ if (max >= sbi->s_stripe) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ break; -+ } -+ } -+ i += sbi->s_stripe; -+ } -+} -+ -+static int ext3_mb_good_group(struct ext3_allocation_context *ac, -+ int group, int cr) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group); -+ unsigned free, fragments, i, bits; -+ -+ J_ASSERT(cr >= 0 && cr < 4); -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp)); -+ -+ free = grp->bb_free; -+ fragments = grp->bb_fragments; -+ if (free == 0) -+ return 0; -+ if (fragments == 0) -+ return 0; -+ -+ switch (cr) { -+ case 0: -+ J_ASSERT(ac->ac_2order != 0); -+ bits = ac->ac_sb->s_blocksize_bits + 1; -+ for (i = ac->ac_2order; i <= bits; i++) -+ if (grp->bb_counters[i] > 0) -+ return 1; -+ break; -+ case 1: -+ if ((free / fragments) >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 2: -+ if (free >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 3: -+ return 1; -+ default: -+ BUG(); -+ } -+ -+ return 0; -+} -+ -+ext3_fsblk_t ext3_mb_new_blocks(handle_t *handle, struct inode *inode, -+ ext3_fsblk_t goal, int *len,int flags,int *errp) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_allocation_context ac; -+ int i, group, cr, err = 0; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ struct buffer_head *gdp_bh; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ ext3_fsblk_t block; -+ -+ J_ASSERT(len != NULL); -+ J_ASSERT(*len > 0); -+ -+ sb = inode->i_sb; -+ if (!sb) { -+ printk("ext3_mb_new_nblocks: nonexistent device"); -+ return 0; -+ } -+ -+ if (!test_opt(sb, MBALLOC)) { -+ static int ext3_mballoc_warning = 0; -+ if (ext3_mballoc_warning == 0) { -+ printk(KERN_ERR "EXT3-fs: multiblock request with " -+ "mballoc disabled!\n"); -+ ext3_mballoc_warning++; -+ } -+ *len = 1; -+ err = ext3_new_block_old(handle, inode, goal, errp); -+ return err; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ -+ /* -+ * We can't allocate > group size -+ */ -+ if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10) -+ *len = EXT3_BLOCKS_PER_GROUP(sb) - 10; -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* someone asks for non-reserved blocks */ -+ BUG_ON(*len > 1); -+ err = ext3_mb_reserve_blocks(sb, 1); -+ if (err) { -+ *errp = err; -+ return 0; -+ } -+ } -+ -+ ac.ac_buddy_page = NULL; -+ ac.ac_bitmap_page = NULL; -+ -+ /* -+ * Check quota for allocation of this blocks. -+ */ -+ while (*len && DQUOT_ALLOC_BLOCK(inode, *len)) -+ *len -= 1; -+ if (*len == 0) { -+ *errp = -EDQUOT; -+ block = 0; -+ goto out; -+ } -+ -+ /* start searching from the goal */ -+ if (goal < le32_to_cpu(es->s_first_data_block) || -+ goal >= le32_to_cpu(es->s_blocks_count)) -+ goal = le32_to_cpu(es->s_first_data_block); -+ group = (goal - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ block = ((goal - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ /* set up allocation goals */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_groups_scanned = 0; -+ ac.ac_ex_scanned = 0; -+ ac.ac_found = 0; -+ ac.ac_sb = inode->i_sb; -+ ac.ac_g_ex.fe_group = group; -+ ac.ac_g_ex.fe_start = block; -+ ac.ac_g_ex.fe_len = *len; -+ ac.ac_flags = flags; -+ ac.ac_2order = 0; -+ ac.ac_criteria = 0; -+ -+ if (*len == 1 && sbi->s_stripe) { -+ /* looks like a metadata, let's use a dirty hack for raid5 -+ * move all metadata in first groups in hope to hit cached -+ * sectors and thus avoid read-modify cycles in raid5 */ -+ ac.ac_g_ex.fe_group = group = 0; -+ } -+ -+ /* probably, the request is for 2^8+ blocks (1/2/3/... MB) */ -+ i = ffs(*len); -+ if (i >= ext3_mb_order2_reqs) { -+ i--; -+ if ((*len & (~(1 << i))) == 0) -+ ac.ac_2order = i; -+ } -+ -+ /* first, try the goal */ -+ err = ext3_mb_find_by_goal(&ac, &e3b); -+ if (err) -+ goto out_err; -+ if (ac.ac_status == AC_STATUS_FOUND) -+ goto found; -+ -+ /* Let's just scan groups to find more-less suitable blocks */ -+ cr = ac.ac_2order ? 0 : 1; -+repeat: -+ for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) { -+ ac.ac_criteria = cr; -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) { -+ if (group == EXT3_SB(sb)->s_groups_count) -+ group = 0; -+ -+ if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) { -+ /* we need full data about the group -+ * to make a good selection */ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ ext3_mb_release_desc(&e3b); -+ } -+ -+ /* check is group good for our criteries */ -+ if (!ext3_mb_good_group(&ac, group, cr)) -+ continue; -+ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ -+ ext3_lock_group(sb, group); -+ if (!ext3_mb_good_group(&ac, group, cr)) { -+ /* someone did allocation from this group */ -+ ext3_unlock_group(sb, group); -+ ext3_mb_release_desc(&e3b); -+ continue; -+ } -+ -+ ac.ac_groups_scanned++; -+ if (cr == 0) -+ ext3_mb_simple_scan_group(&ac, &e3b); -+ else if (cr == 1 && *len == sbi->s_stripe) -+ ext3_mb_scan_aligned(&ac, &e3b); -+ else -+ ext3_mb_complex_scan_group(&ac, &e3b); -+ -+ ext3_unlock_group(sb, group); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ if (ac.ac_status != AC_STATUS_CONTINUE) -+ break; -+ } -+ } -+ -+ if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND && -+ !(ac.ac_flags & EXT3_MB_HINT_FIRST)) { -+ /* -+ * We've been searching too long. Let's try to allocate -+ * the best chunk we've found so far -+ */ -+ -+ /*if (ac.ac_found > ext3_mb_max_to_scan) -+ printk(KERN_DEBUG "EXT3-fs: too long searching at " -+ "%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len, -+ ac.ac_g_ex.fe_len);*/ -+ ext3_mb_try_best_found(&ac, &e3b); -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * Someone more lucky has already allocated it. -+ * The only thing we can do is just take first -+ * found block(s) -+ printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n"); -+ */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_flags |= EXT3_MB_HINT_FIRST; -+ cr = 3; -+ goto repeat; -+ } -+ } -+ -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * We aren't lucky definitely -+ */ -+ DQUOT_FREE_BLOCK(inode, *len); -+ *errp = -ENOSPC; -+ block = 0; -+#if 1 -+ printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n", -+ ac.ac_status, ac.ac_flags); -+ printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n", -+ ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group, -+ ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr); -+ printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n", -+ sbi->s_blocks_reserved, ac.ac_found); -+ printk("EXT3-fs: groups: "); -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) -+ printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free); -+ printk("\n"); -+#endif -+ goto out; -+ } -+ -+found: -+ J_ASSERT(ac.ac_b_ex.fe_len > 0); -+ -+ /* good news - free block(s) have been found. now it's time -+ * to mark block(s) in good old journaled bitmap */ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ /* we made a desicion, now mark found blocks in good old -+ * bitmap to be journaled */ -+ -+ ext3_debug("using block group %d(%d)\n", -+ ac.ac_b_group.group, gdp->bg_free_blocks_count); -+ -+ bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group); -+ if (!bitmap_bh) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) { -+ *errp = err; -+ goto out_err; -+ } -+ -+ gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh); -+ if (!gdp) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ if (block == le32_to_cpu(gdp->bg_block_bitmap) || -+ block == le32_to_cpu(gdp->bg_inode_bitmap) || -+ in_range(block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error(sb, "ext3_new_block", -+ "Allocating block in system zone - " -+ "block = "E3FSBLK, block); -+#ifdef AGGRESSIVE_CHECK -+ for (i = 0; i < ac.ac_b_ex.fe_len; i++) -+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data)); -+#endif -+ mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len); -+ -+ spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) -+ - ac.ac_b_ex.fe_len); -+ spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len); -+ -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ if (err) -+ goto out_err; -+ err = ext3_journal_dirty_metadata(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ sb->s_dirt = 1; -+ *errp = 0; -+ brelse(bitmap_bh); -+ -+ /* drop non-allocated, but dquote'd blocks */ -+ J_ASSERT(*len >= ac.ac_b_ex.fe_len); -+ DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len); -+ -+ *len = ac.ac_b_ex.fe_len; -+ J_ASSERT(*len > 0); -+ J_ASSERT(block != 0); -+ goto out; -+ -+out_err: -+ /* if we've already allocated something, roll it back */ -+ if (ac.ac_status == AC_STATUS_FOUND) { -+ /* FIXME: free blocks here */ -+ } -+ -+ DQUOT_FREE_BLOCK(inode, *len); -+ brelse(bitmap_bh); -+ *errp = err; -+ block = 0; -+out: -+ if (ac.ac_buddy_page) -+ page_cache_release(ac.ac_buddy_page); -+ if (ac.ac_bitmap_page) -+ page_cache_release(ac.ac_bitmap_page); -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* block wasn't reserved before and we reserved it -+ * at the beginning of allocation. it doesn't matter -+ * whether we allocated anything or we failed: time -+ * to release reservation. NOTE: because I expect -+ * any multiblock request from delayed allocation -+ * path only, here is single block always */ -+ ext3_mb_release_blocks(sb, 1); -+ } -+ -+ if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) { -+ atomic_inc(&sbi->s_bal_reqs); -+ atomic_add(*len, &sbi->s_bal_allocated); -+ if (*len >= ac.ac_g_ex.fe_len) -+ atomic_inc(&sbi->s_bal_success); -+ atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned); -+ if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start && -+ ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group) -+ atomic_inc(&sbi->s_bal_goals); -+ if (ac.ac_found > ext3_mb_max_to_scan) -+ atomic_inc(&sbi->s_bal_breaks); -+ } -+ -+ ext3_mb_store_history(sb, inode->i_ino, &ac); -+ -+ return block; -+} -+EXPORT_SYMBOL(ext3_mb_new_blocks); -+ -+#ifdef EXT3_MB_HISTORY -+struct ext3_mb_proc_session { -+ struct ext3_mb_history *history; -+ struct super_block *sb; -+ int start; -+ int max; -+}; -+ -+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s, -+ struct ext3_mb_history *hs, -+ int first) -+{ -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (!first && hs == s->history + s->start) -+ return NULL; -+ while (hs->goal.fe_len == 0) { -+ hs++; -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (hs == s->history + s->start) -+ return NULL; -+ } -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ if (!hs) -+ return NULL; -+ while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL); -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ else -+ return ext3_mb_history_skip_empty(s, ++hs, 0); -+} -+ -+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct ext3_mb_history *hs = v; -+ char buf[20], buf2[20]; -+ -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n", -+ "pid", "inode", "goal", "result", "found", "grps", "cr", -+ "merge", "tail", "broken"); -+ return 0; -+ } -+ -+ sprintf(buf, "%u/%u/%u", hs->goal.fe_group, -+ hs->goal.fe_start, hs->goal.fe_len); -+ sprintf(buf2, "%u/%u/%u", hs->result.fe_group, -+ hs->result.fe_start, hs->result.fe_len); -+ seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n", -+ hs->pid, hs->ino, buf, buf2, hs->found, hs->groups, -+ hs->cr, hs->merged ? "M" : "", hs->tail, -+ hs->buddy ? 1 << hs->buddy : 0); -+ return 0; -+} -+ -+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_history_ops = { -+ .start = ext3_mb_seq_history_start, -+ .next = ext3_mb_seq_history_next, -+ .stop = ext3_mb_seq_history_stop, -+ .show = ext3_mb_seq_history_show, -+}; -+ -+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max; -+ s->history = kmalloc(size, GFP_KERNEL); -+ if (s == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(s->history, sbi->s_mb_history, size); -+ s->max = sbi->s_mb_history_max; -+ s->start = sbi->s_mb_history_cur % s->max; -+ spin_unlock(&sbi->s_mb_history_lock); -+ -+ rc = seq_open(file, &ext3_mb_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->history); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct ext3_mb_proc_session *s = seq->private; -+ kfree(s->history); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations ext3_mb_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_history_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = ext3_mb_seq_history_release, -+}; -+ -+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ -+ group = *pos + 1; -+ return (void *) group; -+} -+ -+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ ++*pos; -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ group = *pos + 1; -+ return (void *) group;; -+} -+ -+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v) -+{ -+ struct super_block *sb = seq->private; -+ long group = (long) v, i; -+ struct sg { -+ struct ext3_group_info info; -+ unsigned short counters[16]; -+ } sg; -+ -+ group--; -+ if (group == 0) -+ seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n", -+ "group", "free", "frags", "first", "2^0", "2^1", "2^2", -+ "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10", -+ "2^11", "2^12", "2^13"); -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + -+ sizeof(struct ext3_group_info); -+ ext3_lock_group(sb, group); -+ memcpy(&sg, EXT3_GROUP_INFO(sb, group), i); -+ ext3_unlock_group(sb, group); -+ -+ if (EXT3_MB_GRP_NEED_INIT(&sg.info)) -+ return 0; -+ -+ seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free, -+ sg.info.bb_fragments, sg.info.bb_first_free); -+ for (i = 0; i <= 13; i++) -+ seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ? -+ sg.info.bb_counters[i] : 0); -+ seq_printf(seq, " ]\n"); -+ -+ return 0; -+} -+ -+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_groups_ops = { -+ .start = ext3_mb_seq_groups_start, -+ .next = ext3_mb_seq_groups_next, -+ .stop = ext3_mb_seq_groups_stop, -+ .show = ext3_mb_seq_groups_show, -+}; -+ -+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ int rc; -+ -+ rc = seq_open(file, &ext3_mb_seq_groups_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = sb; -+ } -+ return rc; -+ -+} -+ -+static struct file_operations ext3_mb_seq_groups_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_groups_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = seq_release, -+}; -+ -+static void ext3_mb_history_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ remove_proc_entry("mb_groups", sbi->s_mb_proc); -+ remove_proc_entry("mb_history", sbi->s_mb_proc); -+ remove_proc_entry(name, proc_root_ext3); -+ -+ if (sbi->s_mb_history) -+ kfree(sbi->s_mb_history); -+} -+ -+static void ext3_mb_history_init(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ int i; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3); -+ if (sbi->s_mb_proc != NULL) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_history_fops; -+ p->data = sb; -+ } -+ p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_groups_fops; -+ p->data = sb; -+ } -+ } -+ -+ sbi->s_mb_history_max = 1000; -+ sbi->s_mb_history_cur = 0; -+ spin_lock_init(&sbi->s_mb_history_lock); -+ i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history); -+ sbi->s_mb_history = kmalloc(i, GFP_KERNEL); -+ memset(sbi->s_mb_history, 0, i); -+ /* if we can't allocate history, then we simple won't use it */ -+} -+ -+static void -+ext3_mb_store_history(struct super_block *sb, unsigned ino, -+ struct ext3_allocation_context *ac) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_history h; -+ -+ if (likely(sbi->s_mb_history == NULL)) -+ return; -+ -+ h.pid = current->pid; -+ h.ino = ino; -+ h.goal = ac->ac_g_ex; -+ h.result = ac->ac_b_ex; -+ h.found = ac->ac_found; -+ h.cr = ac->ac_criteria; -+ h.groups = ac->ac_groups_scanned; -+ h.tail = ac->ac_tail; -+ h.buddy = ac->ac_buddy; -+ h.merged = 0; -+ if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start && -+ ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group) -+ h.merged = 1; -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h)); -+ if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max) -+ sbi->s_mb_history_cur = 0; -+ spin_unlock(&sbi->s_mb_history_lock); -+} -+ -+#else -+#define ext3_mb_history_release(sb) -+#define ext3_mb_history_init(sb) -+#endif -+ -+int ext3_mb_init_backend(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, j, len, metalen; -+ int num_meta_group_infos = -+ (sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ struct ext3_group_info **meta_group_info; -+ -+ /* An 8TB filesystem with 64-bit pointers requires a 4096 byte -+ * kmalloc. A 128kb malloc should suffice for a 256TB filesystem. -+ * So a two level scheme suffices for now. */ -+ sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) * -+ num_meta_group_infos, GFP_KERNEL); -+ if (sbi->s_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n"); -+ return -ENOMEM; -+ } -+ sbi->s_buddy_cache = new_inode(sb); -+ if (sbi->s_buddy_cache == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't get new inode\n"); -+ goto err_freesgi; -+ } -+ -+ metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) { -+ if ((i + 1) == num_meta_group_infos) -+ metalen = sizeof(*meta_group_info) * -+ (sbi->s_groups_count - -+ (i << EXT3_DESC_PER_BLOCK_BITS(sb))); -+ meta_group_info = kmalloc(metalen, GFP_KERNEL); -+ if (meta_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate mem for a " -+ "buddy group\n"); -+ goto err_freemeta; -+ } -+ sbi->s_group_info[i] = meta_group_info; -+ } -+ -+ /* -+ * calculate needed size. if change bb_counters size, -+ * don't forget about ext3_mb_generate_buddy() -+ */ -+ len = sizeof(struct ext3_group_info); -+ len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2); -+ for (i = 0; i < sbi->s_groups_count; i++) { -+ struct ext3_group_desc * desc; -+ -+ meta_group_info = -+ sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)]; -+ j = i & (EXT3_DESC_PER_BLOCK(sb) - 1); -+ -+ meta_group_info[j] = kmalloc(len, GFP_KERNEL); -+ if (meta_group_info[j] == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n"); -+ i--; -+ goto err_freebuddy; -+ } -+ desc = ext3_get_group_desc(sb, i, NULL); -+ if (desc == NULL) { -+ printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i); -+ goto err_freebuddy; -+ } -+ memset(meta_group_info[j], 0, len); -+ set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, -+ &meta_group_info[j]->bb_state); -+ meta_group_info[j]->bb_free = -+ le16_to_cpu(desc->bg_free_blocks_count); -+ } -+ -+ return 0; -+ -+err_freebuddy: -+ while (i >= 0) { -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ i--; -+ } -+ i = num_meta_group_infos; -+err_freemeta: -+ while (--i >= 0) -+ kfree(sbi->s_group_info[i]); -+ iput(sbi->s_buddy_cache); -+err_freesgi: -+ kfree(sbi->s_group_info); -+ return -ENOMEM; -+} -+ -+int ext3_mb_init(struct super_block *sb, int needs_recovery) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *root = sb->s_root->d_inode; -+ unsigned i, offset, max; -+ struct dentry *dentry; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short); -+ -+ sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_offsets == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ return -ENOMEM; -+ } -+ sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_maxs == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_maxs); -+ return -ENOMEM; -+ } -+ -+ /* order 0 is regular bitmap */ -+ sbi->s_mb_maxs[0] = sb->s_blocksize << 3; -+ sbi->s_mb_offsets[0] = 0; -+ -+ i = 1; -+ offset = 0; -+ max = sb->s_blocksize << 2; -+ do { -+ sbi->s_mb_offsets[i] = offset; -+ sbi->s_mb_maxs[i] = max; -+ offset += 1 << (sb->s_blocksize_bits - i); -+ max = max >> 1; -+ i++; -+ } while (i <= sb->s_blocksize_bits + 1); -+ -+ /* init file for buddy data */ -+ if ((i = ext3_mb_init_backend(sb))) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_offsets); -+ kfree(sbi->s_mb_maxs); -+ return i; -+ } -+ -+ spin_lock_init(&sbi->s_reserve_lock); -+ spin_lock_init(&sbi->s_md_lock); -+ INIT_LIST_HEAD(&sbi->s_active_transaction); -+ INIT_LIST_HEAD(&sbi->s_closed_transaction); -+ INIT_LIST_HEAD(&sbi->s_committed_transaction); -+ spin_lock_init(&sbi->s_bal_lock); -+ -+ /* remove old on-disk buddy file */ -+ mutex_lock(&root->i_mutex); -+ dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy")); -+ if (dentry->d_inode != NULL) { -+ i = vfs_unlink(root, dentry); -+ if (i != 0) -+ printk("EXT3-fs: can't remove .buddy file: %d\n", i); -+ } -+ dput(dentry); -+ mutex_unlock(&root->i_mutex); -+ -+ ext3_mb_history_init(sb); -+ -+ printk("EXT3-fs: mballoc enabled\n"); -+ return 0; -+} -+ -+int ext3_mb_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, num_meta_group_infos; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ /* release freed, non-committed blocks */ -+ spin_lock(&sbi->s_md_lock); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_committed_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ ext3_mb_free_committed_blocks(sb); -+ -+ if (sbi->s_group_info) { -+ for (i = 0; i < sbi->s_groups_count; i++) -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ num_meta_group_infos = (sbi->s_groups_count + -+ EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) -+ kfree(sbi->s_group_info[i]); -+ kfree(sbi->s_group_info); -+ } -+ if (sbi->s_mb_offsets) -+ kfree(sbi->s_mb_offsets); -+ if (sbi->s_mb_maxs) -+ kfree(sbi->s_mb_maxs); -+ if (sbi->s_buddy_cache) -+ iput(sbi->s_buddy_cache); -+ if (sbi->s_blocks_reserved) -+ printk("ext3-fs: %ld blocks being reserved at umount!\n", -+ sbi->s_blocks_reserved); -+ if (ext3_mb_stats) { -+ printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n", -+ atomic_read(&sbi->s_bal_allocated), -+ atomic_read(&sbi->s_bal_reqs), -+ atomic_read(&sbi->s_bal_success)); -+ printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, " -+ "%u 2^N hits, %u breaks\n", -+ atomic_read(&sbi->s_bal_ex_scanned), -+ atomic_read(&sbi->s_bal_goals), -+ atomic_read(&sbi->s_bal_2orders), -+ atomic_read(&sbi->s_bal_breaks)); -+ printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n", -+ sbi->s_mb_buddies_generated++, -+ sbi->s_mb_generation_time); -+ } -+ -+ ext3_mb_history_release(sb); -+ -+ return 0; -+} -+ -+void ext3_mb_free_committed_blocks(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int err, i, count = 0, count2 = 0; -+ struct ext3_free_metadata *md; -+ struct ext3_buddy e3b; -+ -+ if (list_empty(&sbi->s_committed_transaction)) -+ return; -+ -+ /* there is committed blocks to be freed yet */ -+ do { -+ /* get next array of blocks */ -+ md = NULL; -+ spin_lock(&sbi->s_md_lock); -+ if (!list_empty(&sbi->s_committed_transaction)) { -+ md = list_entry(sbi->s_committed_transaction.next, -+ struct ext3_free_metadata, list); -+ list_del(&md->list); -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ if (md == NULL) -+ break; -+ -+ mb_debug("gonna free %u blocks in group %u (0x%p):", -+ md->num, md->group, md); -+ -+ err = ext3_mb_load_buddy(sb, md->group, &e3b); -+ /* we expect to find existing buddy because it's pinned */ -+ BUG_ON(err != 0); -+ -+ /* there are blocks to put in buddy to make them really free */ -+ count += md->num; -+ count2++; -+ ext3_lock_group(sb, md->group); -+ for (i = 0; i < md->num; i++) { -+ mb_debug(" %u", md->blocks[i]); -+ mb_free_blocks(&e3b, md->blocks[i], 1); -+ } -+ mb_debug("\n"); -+ ext3_unlock_group(sb, md->group); -+ -+ /* balance refcounts from ext3_mb_free_metadata() */ -+ page_cache_release(e3b.bd_buddy_page); -+ page_cache_release(e3b.bd_bitmap_page); -+ -+ kfree(md); -+ ext3_mb_release_desc(&e3b); -+ -+ } while (md); -+ mb_debug("freed %u blocks in %u structures\n", count, count2); -+} -+ -+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ if (sbi->s_last_transaction == handle->h_transaction->t_tid) -+ return; -+ -+ /* new transaction! time to close last one and free blocks for -+ * committed transaction. we know that only transaction can be -+ * active, so previos transaction can be being logged and we -+ * know that transaction before previous is known to be already -+ * logged. this means that now we may free blocks freed in all -+ * transactions before previous one. hope I'm clear enough ... */ -+ -+ spin_lock(&sbi->s_md_lock); -+ if (sbi->s_last_transaction != handle->h_transaction->t_tid) { -+ mb_debug("new transaction %lu, old %lu\n", -+ (unsigned long) handle->h_transaction->t_tid, -+ (unsigned long) sbi->s_last_transaction); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_closed_transaction); -+ sbi->s_last_transaction = handle->h_transaction->t_tid; -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ ext3_mb_free_committed_blocks(sb); -+} -+ -+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b, -+ int group, int block, int count) -+{ -+ struct ext3_group_info *db = e3b->bd_info; -+ struct super_block *sb = e3b->bd_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_free_metadata *md; -+ int i; -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ ext3_lock_group(sb, group); -+ for (i = 0; i < count; i++) { -+ md = db->bb_md_cur; -+ if (md && db->bb_tid != handle->h_transaction->t_tid) { -+ db->bb_md_cur = NULL; -+ md = NULL; -+ } -+ -+ if (md == NULL) { -+ ext3_unlock_group(sb, group); -+ md = kmalloc(sizeof(*md), GFP_KERNEL); -+ if (md == NULL) -+ return -ENOMEM; -+ md->num = 0; -+ md->group = group; -+ -+ ext3_lock_group(sb, group); -+ if (db->bb_md_cur == NULL) { -+ spin_lock(&sbi->s_md_lock); -+ list_add(&md->list, &sbi->s_active_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ /* protect buddy cache from being freed, -+ * otherwise we'll refresh it from -+ * on-disk bitmap and lose not-yet-available -+ * blocks */ -+ page_cache_get(e3b->bd_buddy_page); -+ page_cache_get(e3b->bd_bitmap_page); -+ db->bb_md_cur = md; -+ db->bb_tid = handle->h_transaction->t_tid; -+ mb_debug("new md 0x%p for group %u\n", -+ md, md->group); -+ } else { -+ kfree(md); -+ md = db->bb_md_cur; -+ } -+ } -+ -+ BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS); -+ md->blocks[md->num] = block + i; -+ md->num++; -+ if (md->num == EXT3_BB_MAX_BLOCKS) { -+ /* no more space, put full container on a sb's list */ -+ db->bb_md_cur = NULL; -+ } -+ } -+ ext3_unlock_group(sb, group); -+ return 0; -+} -+ -+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode, -+ ext3_fsblk_t block, unsigned long count, -+ int metadata, unsigned long *freed) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ unsigned long bit, overflow; -+ struct buffer_head *gd_bh; -+ unsigned long block_group; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ int err = 0, ret; -+ -+ *freed = 0; -+ sb = inode->i_sb; -+ if (!sb) { -+ printk ("ext3_free_blocks: nonexistent device"); -+ return; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ if (block < le32_to_cpu(es->s_first_data_block) || -+ block + count < block || -+ block + count > le32_to_cpu(es->s_blocks_count)) { -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks not in datazone - " -+ "block = %lu, count = %lu", block, count); -+ goto error_return; -+ } -+ -+ ext3_debug("freeing block %lu\n", block); -+ -+do_more: -+ overflow = 0; -+ block_group = (block - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ bit = (block - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb); -+ /* -+ * Check to see if we are freeing blocks across a group -+ * boundary. -+ */ -+ if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) { -+ overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb); -+ count -= overflow; -+ } -+ brelse(bitmap_bh); -+ bitmap_bh = read_block_bitmap(sb, block_group); -+ if (!bitmap_bh) -+ goto error_return; -+ gdp = ext3_get_group_desc (sb, block_group, &gd_bh); -+ if (!gdp) -+ goto error_return; -+ -+ if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) || -+ in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) || -+ in_range (block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group) || -+ in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks in system zones - " -+ "Block = %lu, count = %lu", -+ block, count); -+ -+ BUFFER_TRACE(bitmap_bh, "getting write access"); -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) -+ goto error_return; -+ -+ /* -+ * We are about to modify some metadata. Call the journal APIs -+ * to unshare ->b_data if a currently-committing transaction is -+ * using it -+ */ -+ BUFFER_TRACE(gd_bh, "get_write_access"); -+ err = ext3_journal_get_write_access(handle, gd_bh); -+ if (err) -+ goto error_return; -+ -+ err = ext3_mb_load_buddy(sb, block_group, &e3b); -+ if (err) -+ goto error_return; -+ -+#ifdef AGGRESSIVE_CHECK -+ { -+ int i; -+ for (i = 0; i < count; i++) -+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data)); -+ } -+#endif -+ mb_clear_bits(bitmap_bh->b_data, bit, count); -+ -+ /* We dirtied the bitmap block */ -+ BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ -+ if (metadata) { -+ /* blocks being freed are metadata. these blocks shouldn't -+ * be used until this transaction is committed */ -+ ext3_mb_free_metadata(handle, &e3b, block_group, bit, count); -+ } else { -+ ext3_lock_group(sb, block_group); -+ mb_free_blocks(&e3b, bit, count); -+ ext3_unlock_group(sb, block_group); -+ } -+ -+ spin_lock(sb_bgl_lock(sbi, block_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count); -+ spin_unlock(sb_bgl_lock(sbi, block_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, count); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ *freed = count; -+ -+ /* And the group descriptor block */ -+ BUFFER_TRACE(gd_bh, "dirtied group descriptor block"); -+ ret = ext3_journal_dirty_metadata(handle, gd_bh); -+ if (!err) err = ret; -+ -+ if (overflow && !err) { -+ block += count; -+ count = overflow; -+ goto do_more; -+ } -+ sb->s_dirt = 1; -+error_return: -+ brelse(bitmap_bh); -+ ext3_std_error(sb, err); -+ return; -+} -+ -+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int free, ret = -ENOSPC; -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ free = percpu_counter_read_positive(&sbi->s_freeblocks_counter); -+ if (blocks <= free - sbi->s_blocks_reserved) { -+ sbi->s_blocks_reserved += blocks; -+ ret = 0; -+ } -+ spin_unlock(&sbi->s_reserve_lock); -+ return ret; -+} -+ -+void ext3_mb_release_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ sbi->s_blocks_reserved -= blocks; -+ WARN_ON(sbi->s_blocks_reserved < 0); -+ if (sbi->s_blocks_reserved < 0) -+ sbi->s_blocks_reserved = 0; -+ spin_unlock(&sbi->s_reserve_lock); -+} -+ -+ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode, -+ ext3_fsblk_t goal, int *errp) -+{ -+ ext3_fsblk_t ret; -+ int len; -+ -+ if (!test_opt(inode->i_sb, MBALLOC)) { -+ ret = ext3_new_block_old(handle, inode, goal, errp); -+ goto out; -+ } -+ len = 1; -+ ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp); -+out: -+ return ret; -+} -+ -+void ext3_free_blocks(handle_t *handle, struct inode * inode, -+ ext3_fsblk_t block, unsigned long count, int metadata) -+{ -+ struct super_block *sb; -+ unsigned long freed; -+ -+ sb = inode->i_sb; -+ if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info) -+ ext3_free_blocks_sb(handle, sb, block, count, &freed); -+ else -+ ext3_mb_free_blocks(handle, inode, block, count, metadata, -+ &freed); -+ if (freed) -+ DQUOT_FREE_BLOCK(inode, freed); -+ return; -+} -+ -+#define EXT3_ROOT "ext3" -+#define EXT3_MB_STATS_NAME "mb_stats" -+#define EXT3_MB_MAX_TO_SCAN_NAME "mb_max_to_scan" -+#define EXT3_MB_MIN_TO_SCAN_NAME "mb_min_to_scan" -+#define EXT3_MB_ORDER2_REQ "mb_order2_req" -+ -+static int ext3_mb_stats_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_stats); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_stats_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_STATS_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0); -+ return count; -+} -+ -+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_max_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_max_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_min_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_min_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_order2_req_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_order2_reqs); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_order2_req_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_order2_reqs = value; -+ -+ return count; -+} -+ -+int __init init_ext3_proc(void) -+{ -+ struct proc_dir_entry *proc_ext3_mb_stats; -+ struct proc_dir_entry *proc_ext3_mb_max_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_min_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_order2_req; -+ -+ proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs); -+ if (proc_root_ext3 == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT); -+ return -EIO; -+ } -+ -+ /* Initialize EXT3_MB_STATS_NAME */ -+ proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_stats == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_STATS_NAME); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_stats->data = NULL; -+ proc_ext3_mb_stats->read_proc = ext3_mb_stats_read; -+ proc_ext3_mb_stats->write_proc = ext3_mb_stats_write; -+ -+ /* Initialize EXT3_MAX_TO_SCAN_NAME */ -+ proc_ext3_mb_max_to_scan = create_proc_entry( -+ EXT3_MB_MAX_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_max_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MAX_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_max_to_scan->data = NULL; -+ proc_ext3_mb_max_to_scan->read_proc = ext3_mb_max_to_scan_read; -+ proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write; -+ -+ /* Initialize EXT3_MIN_TO_SCAN_NAME */ -+ proc_ext3_mb_min_to_scan = create_proc_entry( -+ EXT3_MB_MIN_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_min_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MIN_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_min_to_scan->data = NULL; -+ proc_ext3_mb_min_to_scan->read_proc = ext3_mb_min_to_scan_read; -+ proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write; -+ -+ /* Initialize EXT3_ORDER2_REQ */ -+ proc_ext3_mb_order2_req = create_proc_entry( -+ EXT3_MB_ORDER2_REQ, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_order2_req == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_ORDER2_REQ); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_order2_req->data = NULL; -+ proc_ext3_mb_order2_req->read_proc = ext3_mb_order2_req_read; -+ proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write; -+ -+ return 0; -+} -+ -+void exit_ext3_proc(void) -+{ -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+} -Index: linux-stage/fs/ext3/Makefile -=================================================================== ---- linux-stage.orig/fs/ext3/Makefile 2006-07-16 02:29:43.000000000 +0800 -+++ linux-stage/fs/ext3/Makefile 2006-07-16 02:29:49.000000000 +0800 -@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o resize.o \ -- extents.o -+ extents.o mballoc.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch deleted file mode 100644 index 4512098da5..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch +++ /dev/null @@ -1,3121 +0,0 @@ -Index: linux-2.6.9-full/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.9-full.orig/include/linux/ext3_fs.h 2006-06-01 14:58:46.000000000 +0400 -+++ linux-2.6.9-full/include/linux/ext3_fs.h 2006-10-24 12:54:31.000000000 +0400 -@@ -57,6 +57,14 @@ struct statfs; - #define ext3_debug(f, a...) do {} while (0) - #endif - -+#define EXT3_MULTIBLOCK_ALLOCATOR 1 -+ -+#define EXT3_MB_HINT_MERGE 1 -+#define EXT3_MB_HINT_RESERVED 2 -+#define EXT3_MB_HINT_METADATA 4 -+#define EXT3_MB_HINT_FIRST 8 -+#define EXT3_MB_HINT_BEST 16 -+ - /* - * Special inodes numbers - */ -@@ -365,6 +373,7 @@ struct ext3_inode { - #define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ - #define EXT3_MOUNT_EXTENTS 0x200000/* Extents support */ - #define EXT3_MOUNT_EXTDEBUG 0x400000/* Extents debug */ -+#define EXT3_MOUNT_MBALLOC 0x800000/* Buddy allocation support */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef clear_opt -@@ -387,6 +396,14 @@ struct ext3_inode { - #define ext3_find_first_zero_bit ext2_find_first_zero_bit - #define ext3_find_next_zero_bit ext2_find_next_zero_bit - -+#ifndef ext2_find_next_le_bit -+#ifdef __LITTLE_ENDIAN -+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off)) -+#else -+#error "mballoc needs a patch for big-endian systems - CFS bug 10634" -+#endif /* __LITTLE_ENDIAN */ -+#endif /* !ext2_find_next_le_bit */ -+ - /* - * Maximal mount counts between two filesystem checks - */ -@@ -726,7 +743,8 @@ extern int ext3_bg_has_super(struct supe - extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group); - extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *); - extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long, -- unsigned long); -+ unsigned long, int); -+extern int ext3_new_block_old(handle_t *, struct inode *, unsigned long, int *); - extern void ext3_free_blocks_sb (handle_t *, struct super_block *, - unsigned long, unsigned long, int *); - extern unsigned long ext3_count_free_blocks (struct super_block *); -@@ -857,6 +874,17 @@ extern void ext3_extents_initialize_bloc - extern int ext3_ext_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); - -+/* mballoc.c */ -+extern long ext3_mb_stats; -+extern long ext3_mb_max_to_scan; -+extern int ext3_mb_init(struct super_block *, int); -+extern int ext3_mb_release(struct super_block *); -+extern int ext3_mb_new_blocks(handle_t *, struct inode *, unsigned long, int *, int, int *); -+extern int ext3_mb_reserve_blocks(struct super_block *, int); -+extern void ext3_mb_release_blocks(struct super_block *, int); -+int __init init_ext3_proc(void); -+void exit_ext3_proc(void); -+ - #endif /* __KERNEL__ */ - - /* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */ -Index: linux-2.6.9-full/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.9-full.orig/include/linux/ext3_fs_sb.h 2006-05-18 23:57:04.000000000 +0400 -+++ linux-2.6.9-full/include/linux/ext3_fs_sb.h 2006-10-24 12:54:31.000000000 +0400 -@@ -23,9 +23,15 @@ - #define EXT_INCLUDE - #include <linux/blockgroup_lock.h> - #include <linux/percpu_counter.h> -+#include <linux/list.h> - #endif - #endif - #include <linux/rbtree.h> -+#include <linux/proc_fs.h> -+ -+struct ext3_buddy_group_blocks; -+struct ext3_mb_history; -+#define EXT3_BB_MAX_BLOCKS - - /* - * third extended-fs super-block data in memory -@@ -81,6 +87,43 @@ struct ext3_sb_info { - char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */ - int s_jquota_fmt; /* Format of quota to use */ - #endif -+ -+ /* for buddy allocator */ -+ struct ext3_group_info ***s_group_info; -+ struct inode *s_buddy_cache; -+ long s_blocks_reserved; -+ spinlock_t s_reserve_lock; -+ struct list_head s_active_transaction; -+ struct list_head s_closed_transaction; -+ struct list_head s_committed_transaction; -+ spinlock_t s_md_lock; -+ tid_t s_last_transaction; -+ int s_mb_factor; -+ unsigned short *s_mb_offsets, *s_mb_maxs; -+ unsigned long s_stripe; -+ -+ /* history to debug policy */ -+ struct ext3_mb_history *s_mb_history; -+ int s_mb_history_cur; -+ int s_mb_history_max; -+ struct proc_dir_entry *s_mb_proc; -+ spinlock_t s_mb_history_lock; -+ -+ /* stats for buddy allocator */ -+ atomic_t s_bal_reqs; /* number of reqs with len > 1 */ -+ atomic_t s_bal_success; /* we found long enough chunks */ -+ atomic_t s_bal_allocated; /* in blocks */ -+ atomic_t s_bal_ex_scanned; /* total extents scanned */ -+ atomic_t s_bal_goals; /* goal hits */ -+ atomic_t s_bal_breaks; /* too long searches */ -+ atomic_t s_bal_2orders; /* 2^order hits */ -+ spinlock_t s_bal_lock; -+ unsigned long s_mb_buddies_generated; -+ unsigned long long s_mb_generation_time; - }; - -+#define EXT3_GROUP_INFO(sb, group) \ -+ EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \ -+ [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)] -+ - #endif /* _LINUX_EXT3_FS_SB */ -Index: linux-2.6.9-full/fs/ext3/super.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/super.c 2006-06-01 14:58:46.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/super.c 2006-10-24 12:54:31.000000000 +0400 -@@ -394,6 +394,7 @@ void ext3_put_super (struct super_block - struct ext3_super_block *es = sbi->s_es; - int i; - -+ ext3_mb_release(sb); - ext3_ext_release(sb); - ext3_xattr_put_super(sb); - journal_destroy(sbi->s_journal); -@@ -597,6 +598,7 @@ enum { - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - Opt_extents, Opt_noextents, Opt_extdebug, -+ Opt_mballoc, Opt_nomballoc, Opt_stripe, - }; - - static match_table_t tokens = { -@@ -649,6 +651,9 @@ static match_table_t tokens = { - {Opt_extents, "extents"}, - {Opt_noextents, "noextents"}, - {Opt_extdebug, "extdebug"}, -+ {Opt_mballoc, "mballoc"}, -+ {Opt_nomballoc, "nomballoc"}, -+ {Opt_stripe, "stripe=%u"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -962,6 +967,19 @@ clear_qf_name: - case Opt_extdebug: - set_opt (sbi->s_mount_opt, EXTDEBUG); - break; -+ case Opt_mballoc: -+ set_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_nomballoc: -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ break; -+ case Opt_stripe: -+ if (match_int(&args[0], &option)) -+ return 0; -+ if (option < 0) -+ return 0; -+ sbi->s_stripe = option; -+ break; - default: - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option \"%s\" " -@@ -1651,6 +1669,7 @@ static int ext3_fill_super (struct super - ext3_count_dirs(sb)); - - ext3_ext_init(sb); -+ ext3_mb_init(sb, needs_recovery); - - return 0; - -@@ -2433,7 +2452,13 @@ static struct file_system_type ext3_fs_t - - static int __init init_ext3_fs(void) - { -- int err = init_ext3_xattr(); -+ int err; -+ -+ err = init_ext3_proc(); -+ if (err) -+ return err; -+ -+ err = init_ext3_xattr(); - if (err) - return err; - err = init_inodecache(); -@@ -2455,6 +2480,7 @@ static void __exit exit_ext3_fs(void) - unregister_filesystem(&ext3_fs_type); - destroy_inodecache(); - exit_ext3_xattr(); -+ exit_ext3_proc(); - } - - int ext3_prep_san_write(struct inode *inode, long *blocks, -Index: linux-2.6.9-full/fs/ext3/extents.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/extents.c 2006-06-01 14:58:46.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/extents.c 2006-10-24 12:54:31.000000000 +0400 -@@ -777,7 +777,7 @@ cleanup: - for (i = 0; i < depth; i++) { - if (!ablocks[i]) - continue; -- ext3_free_blocks(handle, tree->inode, ablocks[i], 1); -+ ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1); - } - } - kfree(ablocks); -@@ -1434,7 +1434,7 @@ int ext3_ext_rm_idx(handle_t *handle, st - path->p_idx->ei_leaf); - bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf); - ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf); -- ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1); -+ ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1); - return err; - } - -@@ -1919,10 +1919,12 @@ ext3_remove_blocks(struct ext3_extents_t - int needed = ext3_remove_blocks_credits(tree, ex, from, to); - handle_t *handle = ext3_journal_start(tree->inode, needed); - struct buffer_head *bh; -- int i; -+ int i, metadata = 0; - - if (IS_ERR(handle)) - return PTR_ERR(handle); -+ if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode)) -+ metadata = 1; - if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) { - /* tail removal */ - unsigned long num, start; -@@ -1934,7 +1936,7 @@ ext3_remove_blocks(struct ext3_extents_t - bh = sb_find_get_block(tree->inode->i_sb, start + i); - ext3_forget(handle, 0, tree->inode, bh, start + i); - } -- ext3_free_blocks(handle, tree->inode, start, num); -+ ext3_free_blocks(handle, tree->inode, start, num, metadata); - } else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) { - printk("strange request: removal %lu-%lu from %u:%u\n", - from, to, ex->ee_block, ex->ee_len); -Index: linux-2.6.9-full/fs/ext3/inode.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/inode.c 2006-06-01 14:58:46.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/inode.c 2006-10-24 12:54:31.000000000 +0400 -@@ -572,7 +572,7 @@ static int ext3_alloc_branch(handle_t *h - ext3_journal_forget(handle, branch[i].bh); - } - for (i = 0; i < keys; i++) -- ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1); -+ ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1, 1); - return err; - } - -@@ -673,7 +673,7 @@ err_out: - if (err == -EAGAIN) - for (i = 0; i < num; i++) - ext3_free_blocks(handle, inode, -- le32_to_cpu(where[i].key), 1); -+ le32_to_cpu(where[i].key), 1, 1); - return err; - } - -@@ -1831,7 +1831,7 @@ ext3_clear_blocks(handle_t *handle, stru - } - } - -- ext3_free_blocks(handle, inode, block_to_free, count); -+ ext3_free_blocks(handle, inode, block_to_free, count, 1); - } - - /** -@@ -2004,7 +2004,7 @@ static void ext3_free_branches(handle_t - ext3_journal_test_restart(handle, inode); - } - -- ext3_free_blocks(handle, inode, nr, 1); -+ ext3_free_blocks(handle, inode, nr, 1, 1); - - if (parent_bh) { - /* -Index: linux-2.6.9-full/fs/ext3/balloc.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/balloc.c 2006-03-10 18:20:03.000000000 +0300 -+++ linux-2.6.9-full/fs/ext3/balloc.c 2006-10-24 12:54:31.000000000 +0400 -@@ -79,7 +79,7 @@ struct ext3_group_desc * ext3_get_group_ - * - * Return buffer_head on success or NULL in case of failure. - */ --static struct buffer_head * -+struct buffer_head * - read_block_bitmap(struct super_block *sb, unsigned int block_group) - { - struct ext3_group_desc * desc; -@@ -451,24 +451,6 @@ error_return: - return; - } - --/* Free given blocks, update quota and i_blocks field */ --void ext3_free_blocks(handle_t *handle, struct inode *inode, -- unsigned long block, unsigned long count) --{ -- struct super_block * sb; -- int dquot_freed_blocks; -- -- sb = inode->i_sb; -- if (!sb) { -- printk ("ext3_free_blocks: nonexistent device"); -- return; -- } -- ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks); -- if (dquot_freed_blocks) -- DQUOT_FREE_BLOCK(inode, dquot_freed_blocks); -- return; --} -- - /* - * For ext3 allocations, we must not reuse any blocks which are - * allocated in the bitmap buffer's "last committed data" copy. This -@@ -1131,7 +1113,7 @@ int ext3_should_retry_alloc(struct super - * bitmap, and then for any free bit if that fails. - * This function also updates quota and i_blocks field. - */ --int ext3_new_block(handle_t *handle, struct inode *inode, -+int ext3_new_block_old(handle_t *handle, struct inode *inode, - unsigned long goal, int *errp) - { - struct buffer_head *bitmap_bh = NULL; -Index: linux-2.6.9-full/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/xattr.c 2006-05-18 23:57:04.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/xattr.c 2006-10-24 12:54:31.000000000 +0400 -@@ -1281,7 +1281,7 @@ ext3_xattr_set_handle2(handle_t *handle, - new_bh = sb_getblk(sb, block); - if (!new_bh) { - getblk_failed: -- ext3_free_blocks(handle, inode, block, 1); -+ ext3_free_blocks(handle, inode, block, 1, 1); - error = -EIO; - goto cleanup; - } -@@ -1328,7 +1328,7 @@ getblk_failed: - if (ce) - mb_cache_entry_free(ce); - ea_bdebug(old_bh, "freeing"); -- ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1); -+ ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1, 1); - - /* ext3_forget() calls bforget() for us, but we - let our caller release old_bh, so we need to -@@ -1427,7 +1427,7 @@ ext3_xattr_delete_inode(handle_t *handle - if (HDR(bh)->h_refcount == cpu_to_le32(1)) { - if (ce) - mb_cache_entry_free(ce); -- ext3_free_blocks(handle, inode, EXT3_I(inode)->i_file_acl, 1); -+ ext3_free_blocks(handle, inode, EXT3_I(inode)->i_file_acl, 1, 1); - get_bh(bh); - ext3_forget(handle, 1, inode, bh, EXT3_I(inode)->i_file_acl); - } else { -Index: linux-2.6.9-full/fs/ext3/mballoc.c -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/mballoc.c 2006-10-23 18:07:54.821533176 +0400 -+++ linux-2.6.9-full/fs/ext3/mballoc.c 2006-10-24 13:00:56.000000000 +0400 -@@ -0,0 +1,2725 @@ -+/* -+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com -+ * Written by Alex Tomas <alex@clusterfs.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public Licens -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- -+ */ -+ -+ -+/* -+ * mballoc.c contains the multiblocks allocation routines -+ */ -+ -+#include <linux/config.h> -+#include <linux/time.h> -+#include <linux/fs.h> -+#include <linux/namei.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/quotaops.h> -+#include <linux/buffer_head.h> -+#include <linux/module.h> -+#include <linux/swap.h> -+#include <linux/proc_fs.h> -+#include <linux/pagemap.h> -+#include <linux/seq_file.h> -+ -+/* -+ * TODO: -+ * - bitmap read-ahead (proposed by Oleg Drokin aka green) -+ * - track min/max extents in each group for better group selection -+ * - mb_mark_used() may allocate chunk right after splitting buddy -+ * - special flag to advice allocator to look for requested + N blocks -+ * this may improve interaction between extents and mballoc -+ * - tree of groups sorted by number of free blocks -+ * - percpu reservation code (hotpath) -+ * - error handling -+ */ -+ -+/* -+ * with AGRESSIVE_CHECK allocator runs consistency checks over -+ * structures. these checks slow things down a lot -+ */ -+#define AGGRESSIVE_CHECK__ -+ -+/* -+ */ -+#define MB_DEBUG__ -+#ifdef MB_DEBUG -+#define mb_debug(fmt,a...) printk(fmt, ##a) -+#else -+#define mb_debug(fmt,a...) -+#endif -+ -+/* -+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory -+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history -+ */ -+#define EXT3_MB_HISTORY -+ -+/* -+ * How long mballoc can look for a best extent (in found extents) -+ */ -+long ext3_mb_max_to_scan = 500; -+ -+/* -+ * How long mballoc must look for a best extent -+ */ -+long ext3_mb_min_to_scan = 30; -+ -+/* -+ * with 'ext3_mb_stats' allocator will collect stats that will be -+ * shown at umount. The collecting costs though! -+ */ -+ -+long ext3_mb_stats = 1; -+ -+/* -+ * for which requests use 2^N search using buddies -+ */ -+long ext3_mb_order2_reqs = 8; -+ -+#ifdef EXT3_BB_MAX_BLOCKS -+#undef EXT3_BB_MAX_BLOCKS -+#endif -+#define EXT3_BB_MAX_BLOCKS 30 -+ -+struct ext3_free_metadata { -+ unsigned short group; -+ unsigned short num; -+ unsigned short blocks[EXT3_BB_MAX_BLOCKS]; -+ struct list_head list; -+}; -+ -+struct ext3_group_info { -+ unsigned long bb_state; -+ unsigned long bb_tid; -+ struct ext3_free_metadata *bb_md_cur; -+ unsigned short bb_first_free; -+ unsigned short bb_free; -+ unsigned short bb_fragments; -+ unsigned short bb_counters[]; -+}; -+ -+ -+#define EXT3_GROUP_INFO_NEED_INIT_BIT 0 -+#define EXT3_GROUP_INFO_LOCKED_BIT 1 -+ -+#define EXT3_MB_GRP_NEED_INIT(grp) \ -+ (test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state)) -+ -+struct ext3_free_extent { -+ __u16 fe_start; -+ __u16 fe_len; -+ __u16 fe_group; -+}; -+ -+struct ext3_allocation_context { -+ struct super_block *ac_sb; -+ -+ /* search goals */ -+ struct ext3_free_extent ac_g_ex; -+ -+ /* the best found extent */ -+ struct ext3_free_extent ac_b_ex; -+ -+ /* number of iterations done. we have to track to limit searching */ -+ unsigned long ac_ex_scanned; -+ __u16 ac_groups_scanned; -+ __u16 ac_found; -+ __u16 ac_tail; -+ __u16 ac_buddy; -+ __u8 ac_status; -+ __u8 ac_flags; /* allocation hints */ -+ __u8 ac_criteria; -+ __u8 ac_repeats; -+ __u8 ac_2order; /* if request is to allocate 2^N blocks and -+ * N > 0, the field stores N, otherwise 0 */ -+ -+ struct page *ac_buddy_page; -+ struct page *ac_bitmap_page; -+}; -+ -+#define AC_STATUS_CONTINUE 1 -+#define AC_STATUS_FOUND 2 -+#define AC_STATUS_BREAK 3 -+ -+struct ext3_mb_history { -+ struct ext3_free_extent goal; /* goal allocation */ -+ struct ext3_free_extent result; /* result allocation */ -+ unsigned pid; -+ unsigned ino; -+ __u16 found; /* how many extents have been found */ -+ __u16 groups; /* how many groups have been scanned */ -+ __u16 tail; /* what tail broke some buddy */ -+ __u16 buddy; /* buddy the tail ^^^ broke */ -+ __u8 cr; /* which phase the result extent was found at */ -+ __u8 merged; -+}; -+ -+struct ext3_buddy { -+ struct page *bd_buddy_page; -+ void *bd_buddy; -+ struct page *bd_bitmap_page; -+ void *bd_bitmap; -+ struct ext3_group_info *bd_info; -+ struct super_block *bd_sb; -+ __u16 bd_blkbits; -+ __u16 bd_group; -+}; -+#define EXT3_MB_BITMAP(e3b) ((e3b)->bd_bitmap) -+#define EXT3_MB_BUDDY(e3b) ((e3b)->bd_buddy) -+ -+#ifndef EXT3_MB_HISTORY -+#define ext3_mb_store_history(sb,ino,ac) -+#else -+static void ext3_mb_store_history(struct super_block *, unsigned ino, -+ struct ext3_allocation_context *ac); -+#endif -+ -+#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -+ -+static struct proc_dir_entry *proc_root_ext3; -+ -+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int); -+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *); -+void ext3_mb_free_committed_blocks(struct super_block *); -+ -+#if BITS_PER_LONG == 64 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 7UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~7UL); \ -+} -+#elif BITS_PER_LONG == 32 -+#define mb_correct_addr_and_bit(bit,addr) \ -+{ \ -+ bit += ((unsigned long) addr & 3UL) << 3; \ -+ addr = (void *) ((unsigned long) addr & ~3UL); \ -+} -+#else -+#error "how many bits you are?!" -+#endif -+ -+static inline int mb_test_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ return ext2_test_bit(bit, addr); -+} -+ -+static inline void mb_set_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit(bit, addr); -+} -+ -+static inline void mb_set_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_set_bit_atomic(NULL, bit, addr); -+} -+ -+static inline void mb_clear_bit(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit(bit, addr); -+} -+ -+static inline void mb_clear_bit_atomic(int bit, void *addr) -+{ -+ mb_correct_addr_and_bit(bit,addr); -+ ext2_clear_bit_atomic(NULL, bit, addr); -+} -+ -+static inline int mb_find_next_zero_bit(void *addr, int max, int start) -+{ -+ int fix; -+#if BITS_PER_LONG == 64 -+ fix = ((unsigned long) addr & 7UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~7UL); -+#elif BITS_PER_LONG == 32 -+ fix = ((unsigned long) addr & 3UL) << 3; -+ addr = (void *) ((unsigned long) addr & ~3UL); -+#else -+#error "how many bits you are?!" -+#endif -+ max += fix; -+ start += fix; -+ return ext2_find_next_zero_bit(addr, max, start) - fix; -+} -+ -+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max) -+{ -+ char *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(max != NULL); -+ -+ if (order > e3b->bd_blkbits + 1) { -+ *max = 0; -+ return NULL; -+ } -+ -+ /* at order 0 we see each particular block */ -+ *max = 1 << (e3b->bd_blkbits + 3); -+ if (order == 0) -+ return EXT3_MB_BITMAP(e3b); -+ -+ bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order]; -+ *max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order]; -+ -+ return bb; -+} -+ -+#ifdef AGGRESSIVE_CHECK -+ -+static void mb_check_buddy(struct ext3_buddy *e3b) -+{ -+ int order = e3b->bd_blkbits + 1; -+ int max, max2, i, j, k, count; -+ int fragments = 0, fstart; -+ void *buddy, *buddy2; -+ -+ if (!test_opt(e3b->bd_sb, MBALLOC)) -+ return; -+ -+ { -+ static int mb_check_counter = 0; -+ if (mb_check_counter++ % 300 != 0) -+ return; -+ } -+ -+ while (order > 1) { -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ buddy2 = mb_find_buddy(e3b, order - 1, &max2); -+ J_ASSERT(buddy2); -+ J_ASSERT(buddy != buddy2); -+ J_ASSERT(max * 2 == max2); -+ -+ count = 0; -+ for (i = 0; i < max; i++) { -+ -+ if (mb_test_bit(i, buddy)) { -+ /* only single bit in buddy2 may be 1 */ -+ if (!mb_test_bit(i << 1, buddy2)) -+ J_ASSERT(mb_test_bit((i<<1)+1, buddy2)); -+ else if (!mb_test_bit((i << 1) + 1, buddy2)) -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ continue; -+ } -+ -+ /* both bits in buddy2 must be 0 */ -+ J_ASSERT(mb_test_bit(i << 1, buddy2)); -+ J_ASSERT(mb_test_bit((i << 1) + 1, buddy2)); -+ -+ for (j = 0; j < (1 << order); j++) { -+ k = (i * (1 << order)) + j; -+ J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b))); -+ } -+ count++; -+ } -+ J_ASSERT(e3b->bd_info->bb_counters[order] == count); -+ order--; -+ } -+ -+ fstart = -1; -+ buddy = mb_find_buddy(e3b, 0, &max); -+ for (i = 0; i < max; i++) { -+ if (!mb_test_bit(i, buddy)) { -+ J_ASSERT(i >= e3b->bd_info->bb_first_free); -+ if (fstart == -1) { -+ fragments++; -+ fstart = i; -+ } -+ continue; -+ } -+ fstart = -1; -+ /* check used bits only */ -+ for (j = 0; j < e3b->bd_blkbits + 1; j++) { -+ buddy2 = mb_find_buddy(e3b, j, &max2); -+ k = i >> j; -+ J_ASSERT(k < max2); -+ J_ASSERT(mb_test_bit(k, buddy2)); -+ } -+ } -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info)); -+ J_ASSERT(e3b->bd_info->bb_fragments == fragments); -+} -+ -+#else -+#define mb_check_buddy(e3b) -+#endif -+ -+/* find most significant bit */ -+static int inline fmsb(unsigned short word) -+{ -+ int order; -+ -+ if (word > 255) { -+ order = 7; -+ word >>= 8; -+ } else { -+ order = -1; -+ } -+ -+ do { -+ order++; -+ word >>= 1; -+ } while (word != 0); -+ -+ return order; -+} -+ -+static void inline -+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first, -+ int len, struct ext3_group_info *grp) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ unsigned short min, max, chunk, border; -+ -+ mb_debug("mark %u/%u free\n", first, len); -+ J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ border = 2 << sb->s_blocksize_bits; -+ -+ while (len > 0) { -+ /* find how many blocks can be covered since this position */ -+ max = ffs(first | border) - 1; -+ -+ /* find how many blocks of power 2 we need to mark */ -+ min = fmsb(len); -+ -+ mb_debug(" %u/%u -> max %u, min %u\n", -+ first & ((2 << sb->s_blocksize_bits) - 1), -+ len, max, min); -+ -+ if (max < min) -+ min = max; -+ chunk = 1 << min; -+ -+ /* mark multiblock chunks only */ -+ grp->bb_counters[min]++; -+ if (min > 0) { -+ mb_debug(" set %u at %u \n", first >> min, -+ sbi->s_mb_offsets[min]); -+ mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]); -+ } -+ -+ len -= chunk; -+ first += chunk; -+ } -+} -+ -+static void -+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap, -+ int group) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group); -+ unsigned short max = EXT3_BLOCKS_PER_GROUP(sb); -+ unsigned short i = 0, first, len; -+ unsigned free = 0, fragments = 0; -+ unsigned long long period = get_cycles(); -+ -+ i = mb_find_next_zero_bit(bitmap, max, 0); -+ grp->bb_first_free = i; -+ while (i < max) { -+ fragments++; -+ first = i; -+ i = ext2_find_next_le_bit(bitmap, max, i); -+ len = i - first; -+ free += len; -+ if (len > 1) -+ ext3_mb_mark_free_simple(sb, buddy, first, len, grp); -+ else -+ grp->bb_counters[0]++; -+ if (i < max) -+ i = mb_find_next_zero_bit(bitmap, max, i); -+ } -+ grp->bb_fragments = fragments; -+ -+ /* bb_state shouldn't being modified because all -+ * others waits for init completion on page lock */ -+ clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state); -+ if (free != grp->bb_free) { -+ printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n", -+ group, free, grp->bb_free); -+ grp->bb_free = free; -+ } -+ -+ period = get_cycles() - period; -+ spin_lock(&EXT3_SB(sb)->s_bal_lock); -+ EXT3_SB(sb)->s_mb_buddies_generated++; -+ EXT3_SB(sb)->s_mb_generation_time += period; -+ spin_unlock(&EXT3_SB(sb)->s_bal_lock); -+} -+ -+static int ext3_mb_init_cache(struct page *page) -+{ -+ int blocksize, blocks_per_page, groups_per_page; -+ int err = 0, i, first_group, first_block; -+ struct super_block *sb; -+ struct buffer_head *bhs; -+ struct buffer_head **bh; -+ struct inode *inode; -+ char *data, *bitmap; -+ -+ mb_debug("init page %lu\n", page->index); -+ -+ inode = page->mapping->host; -+ sb = inode->i_sb; -+ blocksize = 1 << inode->i_blkbits; -+ blocks_per_page = PAGE_CACHE_SIZE / blocksize; -+ -+ groups_per_page = blocks_per_page >> 1; -+ if (groups_per_page == 0) -+ groups_per_page = 1; -+ -+ /* allocate buffer_heads to read bitmaps */ -+ if (groups_per_page > 1) { -+ err = -ENOMEM; -+ i = sizeof(struct buffer_head *) * groups_per_page; -+ bh = kmalloc(i, GFP_NOFS); -+ if (bh == NULL) -+ goto out; -+ memset(bh, 0, i); -+ } else -+ bh = &bhs; -+ -+ first_group = page->index * blocks_per_page / 2; -+ -+ /* read all groups the page covers into the cache */ -+ for (i = 0; i < groups_per_page; i++) { -+ struct ext3_group_desc * desc; -+ -+ if (first_group + i >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ err = -EIO; -+ desc = ext3_get_group_desc(sb, first_group + i, NULL); -+ if (desc == NULL) -+ goto out; -+ -+ err = -ENOMEM; -+ bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ if (bh[i] == NULL) -+ goto out; -+ -+ if (buffer_uptodate(bh[i])) -+ continue; -+ -+ lock_buffer(bh[i]); -+ if (buffer_uptodate(bh[i])) { -+ unlock_buffer(bh[i]); -+ continue; -+ } -+ -+ get_bh(bh[i]); -+ bh[i]->b_end_io = end_buffer_read_sync; -+ submit_bh(READ, bh[i]); -+ mb_debug("read bitmap for group %u\n", first_group + i); -+ } -+ -+ /* wait for I/O completion */ -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ wait_on_buffer(bh[i]); -+ -+ err = -EIO; -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ if (!buffer_uptodate(bh[i])) -+ goto out; -+ -+ first_block = page->index * blocks_per_page; -+ for (i = 0; i < blocks_per_page; i++) { -+ int group; -+ -+ group = (first_block + i) >> 1; -+ if (group >= EXT3_SB(sb)->s_groups_count) -+ break; -+ -+ data = page_address(page) + (i * blocksize); -+ bitmap = bh[group - first_group]->b_data; -+ -+ if ((first_block + i) & 1) { -+ /* this is block of buddy */ -+ mb_debug("put buddy for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memset(data, 0xff, blocksize); -+ EXT3_GROUP_INFO(sb, group)->bb_fragments = 0; -+ memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0, -+ sizeof(unsigned short)*(sb->s_blocksize_bits+2)); -+ ext3_mb_generate_buddy(sb, data, bitmap, group); -+ } else { -+ /* this is block of bitmap */ -+ mb_debug("put bitmap for group %u in page %lu/%x\n", -+ group, page->index, i * blocksize); -+ memcpy(data, bitmap, blocksize); -+ } -+ } -+ SetPageUptodate(page); -+ -+out: -+ if (bh) { -+ for (i = 0; i < groups_per_page && bh[i]; i++) -+ brelse(bh[i]); -+ if (bh != &bhs) -+ kfree(bh); -+ } -+ return err; -+} -+ -+static int ext3_mb_load_buddy(struct super_block *sb, int group, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *inode = sbi->s_buddy_cache; -+ int blocks_per_page, block, pnum, poff; -+ struct page *page; -+ -+ mb_debug("load group %u\n", group); -+ -+ blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize; -+ -+ e3b->bd_blkbits = sb->s_blocksize_bits; -+ e3b->bd_info = EXT3_GROUP_INFO(sb, group); -+ e3b->bd_sb = sb; -+ e3b->bd_group = group; -+ e3b->bd_buddy_page = NULL; -+ e3b->bd_bitmap_page = NULL; -+ -+ block = group * 2; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ /* we could use find_or_create_page(), but it locks page -+ * what we'd like to avoid in fast path ... */ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_bitmap_page = page; -+ e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ block++; -+ pnum = block / blocks_per_page; -+ poff = block % blocks_per_page; -+ -+ page = find_get_page(inode->i_mapping, pnum); -+ if (page == NULL || !PageUptodate(page)) { -+ if (page) -+ page_cache_release(page); -+ page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS); -+ if (page) { -+ BUG_ON(page->mapping != inode->i_mapping); -+ if (!PageUptodate(page)) -+ ext3_mb_init_cache(page); -+ unlock_page(page); -+ } -+ } -+ if (page == NULL || !PageUptodate(page)) -+ goto err; -+ e3b->bd_buddy_page = page; -+ e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize); -+ mark_page_accessed(page); -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ return 0; -+ -+err: -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+ e3b->bd_buddy = NULL; -+ e3b->bd_bitmap = NULL; -+ return -EIO; -+} -+ -+static void ext3_mb_release_desc(struct ext3_buddy *e3b) -+{ -+ if (e3b->bd_bitmap_page) -+ page_cache_release(e3b->bd_bitmap_page); -+ if (e3b->bd_buddy_page) -+ page_cache_release(e3b->bd_buddy_page); -+} -+ -+ -+static inline void -+ext3_lock_group(struct super_block *sb, int group) -+{ -+ bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static inline void -+ext3_unlock_group(struct super_block *sb, int group) -+{ -+ bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT, -+ &EXT3_GROUP_INFO(sb, group)->bb_state); -+} -+ -+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block) -+{ -+ int order = 1; -+ void *bb; -+ -+ J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b)); -+ J_ASSERT(block < (1 << (e3b->bd_blkbits + 3))); -+ -+ bb = EXT3_MB_BUDDY(e3b); -+ while (order <= e3b->bd_blkbits + 1) { -+ block = block >> 1; -+ if (!mb_test_bit(block, bb)) { -+ /* this block is part of buddy of order 'order' */ -+ return order; -+ } -+ bb += 1 << (e3b->bd_blkbits - order); -+ order++; -+ } -+ return 0; -+} -+ -+static inline void mb_clear_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0; -+ cur += 32; -+ continue; -+ } -+ mb_clear_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static inline void mb_set_bits(void *bm, int cur, int len) -+{ -+ __u32 *addr; -+ -+ len = cur + len; -+ while (cur < len) { -+ if ((cur & 31) == 0 && (len - cur) >= 32) { -+ /* fast path: clear whole word at once */ -+ addr = bm + (cur >> 3); -+ *addr = 0xffffffff; -+ cur += 32; -+ continue; -+ } -+ mb_set_bit_atomic(cur, bm); -+ cur++; -+ } -+} -+ -+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count) -+{ -+ int block = 0, max = 0, order; -+ void *buddy, *buddy2; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free += count; -+ if (first < e3b->bd_info->bb_first_free) -+ e3b->bd_info->bb_first_free = first; -+ -+ /* let's maintain fragments counter */ -+ if (first != 0) -+ block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b)); -+ if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b)); -+ if (block && max) -+ e3b->bd_info->bb_fragments--; -+ else if (!block && !max) -+ e3b->bd_info->bb_fragments++; -+ -+ /* let's maintain buddy itself */ -+ while (count-- > 0) { -+ block = first++; -+ order = 0; -+ -+ J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b))); -+ mb_clear_bit(block, EXT3_MB_BITMAP(e3b)); -+ e3b->bd_info->bb_counters[order]++; -+ -+ /* start of the buddy */ -+ buddy = mb_find_buddy(e3b, order, &max); -+ -+ do { -+ block &= ~1UL; -+ if (mb_test_bit(block, buddy) || -+ mb_test_bit(block + 1, buddy)) -+ break; -+ -+ /* both the buddies are free, try to coalesce them */ -+ buddy2 = mb_find_buddy(e3b, order + 1, &max); -+ -+ if (!buddy2) -+ break; -+ -+ if (order > 0) { -+ /* for special purposes, we don't set -+ * free bits in bitmap */ -+ mb_set_bit(block, buddy); -+ mb_set_bit(block + 1, buddy); -+ } -+ e3b->bd_info->bb_counters[order]--; -+ e3b->bd_info->bb_counters[order]--; -+ -+ block = block >> 1; -+ order++; -+ e3b->bd_info->bb_counters[order]++; -+ -+ mb_clear_bit(block, buddy2); -+ buddy = buddy2; -+ } while (1); -+ } -+ mb_check_buddy(e3b); -+ -+ return 0; -+} -+ -+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block, -+ int needed, struct ext3_free_extent *ex) -+{ -+ int next = block, max, ord; -+ void *buddy; -+ -+ J_ASSERT(ex != NULL); -+ -+ buddy = mb_find_buddy(e3b, order, &max); -+ J_ASSERT(buddy); -+ J_ASSERT(block < max); -+ if (mb_test_bit(block, buddy)) { -+ ex->fe_len = 0; -+ ex->fe_start = 0; -+ ex->fe_group = 0; -+ return 0; -+ } -+ -+ if (likely(order == 0)) { -+ /* find actual order */ -+ order = mb_find_order_for_block(e3b, block); -+ block = block >> order; -+ } -+ -+ ex->fe_len = 1 << order; -+ ex->fe_start = block << order; -+ ex->fe_group = e3b->bd_group; -+ -+ /* calc difference from given start */ -+ next = next - ex->fe_start; -+ ex->fe_len -= next; -+ ex->fe_start += next; -+ -+ while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) { -+ -+ if (block + 1 >= max) -+ break; -+ -+ next = (block + 1) * (1 << order); -+ if (mb_test_bit(next, EXT3_MB_BITMAP(e3b))) -+ break; -+ -+ ord = mb_find_order_for_block(e3b, next); -+ -+ order = ord; -+ block = next >> order; -+ ex->fe_len += 1 << order; -+ } -+ -+ J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3))); -+ return ex->fe_len; -+} -+ -+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex) -+{ -+ int ord, mlen = 0, max = 0, cur; -+ int start = ex->fe_start; -+ int len = ex->fe_len; -+ unsigned ret = 0; -+ int len0 = len; -+ void *buddy; -+ -+ mb_check_buddy(e3b); -+ -+ e3b->bd_info->bb_free -= len; -+ if (e3b->bd_info->bb_first_free == start) -+ e3b->bd_info->bb_first_free += len; -+ -+ /* let's maintain fragments counter */ -+ if (start != 0) -+ mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b)); -+ if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0]) -+ max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b)); -+ if (mlen && max) -+ e3b->bd_info->bb_fragments++; -+ else if (!mlen && !max) -+ e3b->bd_info->bb_fragments--; -+ -+ /* let's maintain buddy itself */ -+ while (len) { -+ ord = mb_find_order_for_block(e3b, start); -+ -+ if (((start >> ord) << ord) == start && len >= (1 << ord)) { -+ /* the whole chunk may be allocated at once! */ -+ mlen = 1 << ord; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ J_ASSERT((start >> ord) < max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ start += mlen; -+ len -= mlen; -+ J_ASSERT(len >= 0); -+ continue; -+ } -+ -+ /* store for history */ -+ if (ret == 0) -+ ret = len | (ord << 16); -+ -+ /* we have to split large buddy */ -+ J_ASSERT(ord > 0); -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_set_bit(start >> ord, buddy); -+ e3b->bd_info->bb_counters[ord]--; -+ -+ ord--; -+ cur = (start >> ord) & ~1U; -+ buddy = mb_find_buddy(e3b, ord, &max); -+ mb_clear_bit(cur, buddy); -+ mb_clear_bit(cur + 1, buddy); -+ e3b->bd_info->bb_counters[ord]++; -+ e3b->bd_info->bb_counters[ord]++; -+ } -+ -+ /* now drop all the bits in bitmap */ -+ mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0); -+ -+ mb_check_buddy(e3b); -+ -+ return ret; -+} -+ -+/* -+ * Must be called under group lock! -+ */ -+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ unsigned long ret; -+ -+ ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len); -+ ret = mb_mark_used(e3b, &ac->ac_b_ex); -+ -+ ac->ac_status = AC_STATUS_FOUND; -+ ac->ac_tail = ret & 0xffff; -+ ac->ac_buddy = ret >> 16; -+ -+ /* hold in-core structures until allocated -+ * blocks are marked non-free in on-disk bitmap */ -+ ac->ac_buddy_page = e3b->bd_buddy_page; -+ page_cache_get(e3b->bd_buddy_page); -+ ac->ac_bitmap_page = e3b->bd_bitmap_page; -+ page_cache_get(e3b->bd_bitmap_page); -+} -+ -+/* -+ * The routine checks whether found extent is good enough. If it is, -+ * then the extent gets marked used and flag is set to the context -+ * to stop scanning. Otherwise, the extent is compared with the -+ * previous found extent and if new one is better, then it's stored -+ * in the context. Later, the best found extent will be used, if -+ * mballoc can't find good enough extent. -+ * -+ * FIXME: real allocation policy is to be designed yet! -+ */ -+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac, -+ struct ext3_free_extent *ex, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent *bex = &ac->ac_b_ex; -+ struct ext3_free_extent *gex = &ac->ac_g_ex; -+ -+ J_ASSERT(ex->fe_len > 0); -+ J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8); -+ -+ ac->ac_found++; -+ -+ /* -+ * The special case - take what you catch first -+ */ -+ if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * Let's check whether the chunk is good enough -+ */ -+ if (ex->fe_len == gex->fe_len) { -+ *bex = *ex; -+ ext3_mb_use_best_found(ac, e3b); -+ return; -+ } -+ -+ /* -+ * If this is first found extent, just store it in the context -+ */ -+ if (bex->fe_len == 0) { -+ *bex = *ex; -+ return; -+ } -+ -+ /* -+ * If new found extent is better, store it in the context -+ */ -+ if (bex->fe_len < gex->fe_len) { -+ /* if the request isn't satisfied, any found extent -+ * larger than previous best one is better */ -+ if (ex->fe_len > bex->fe_len) -+ *bex = *ex; -+ } else if (ex->fe_len > gex->fe_len) { -+ /* if the request is satisfied, then we try to find -+ * an extent that still satisfy the request, but is -+ * smaller than previous one */ -+ *bex = *ex; -+ } -+ -+ /* -+ * Let's scan at least few extents and don't pick up a first one -+ */ -+ if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+ -+ /* -+ * We don't want to scan for a whole year -+ */ -+ if (ac->ac_found > ext3_mb_max_to_scan) -+ ac->ac_status = AC_STATUS_BREAK; -+} -+ -+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct ext3_free_extent ex = ac->ac_b_ex; -+ int group = ex.fe_group, max, err; -+ -+ J_ASSERT(ex.fe_len > 0); -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex); -+ -+ if (max > 0) { -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ int group = ac->ac_g_ex.fe_group, max, err; -+ struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb); -+ struct ext3_super_block *es = sbi->s_es; -+ struct ext3_free_extent ex; -+ -+ err = ext3_mb_load_buddy(ac->ac_sb, group, e3b); -+ if (err) -+ return err; -+ -+ ext3_lock_group(ac->ac_sb, group); -+ max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start, -+ ac->ac_g_ex.fe_len, &ex); -+ -+ if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) { -+ unsigned long start; -+ start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) + -+ ex.fe_start + le32_to_cpu(es->s_first_data_block)); -+ if (start % sbi->s_stripe == 0) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ } else if (max >= ac->ac_g_ex.fe_len) { -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) { -+ /* Sometimes, caller may want to merge even small -+ * number of blocks to an existing extent */ -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group); -+ J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start); -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ } -+ ext3_unlock_group(ac->ac_sb, group); -+ -+ ext3_mb_release_desc(e3b); -+ -+ return 0; -+} -+ -+/* -+ * The routine scans buddy structures (not bitmap!) from given order -+ * to max order and tries to find big enough chunk to satisfy the req -+ */ -+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_group_info *grp = e3b->bd_info; -+ void *buddy; -+ int i, k, max; -+ -+ J_ASSERT(ac->ac_2order > 0); -+ for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) { -+ if (grp->bb_counters[i] == 0) -+ continue; -+ -+ buddy = mb_find_buddy(e3b, i, &max); -+ if (buddy == NULL) { -+ printk(KERN_ALERT "looking for wrong order?\n"); -+ break; -+ } -+ -+ k = mb_find_next_zero_bit(buddy, max, 0); -+ J_ASSERT(k < max); -+ -+ ac->ac_found++; -+ -+ ac->ac_b_ex.fe_len = 1 << i; -+ ac->ac_b_ex.fe_start = k << i; -+ ac->ac_b_ex.fe_group = e3b->bd_group; -+ -+ ext3_mb_use_best_found(ac, e3b); -+ J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len); -+ -+ if (unlikely(ext3_mb_stats)) -+ atomic_inc(&EXT3_SB(sb)->s_bal_2orders); -+ -+ break; -+ } -+} -+ -+/* -+ * The routine scans the group and measures all found extents. -+ * In order to optimize scanning, caller must pass number of -+ * free blocks in the group, so the routine can know upper limit. -+ */ -+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ int i, free; -+ -+ free = e3b->bd_info->bb_free; -+ J_ASSERT(free > 0); -+ -+ i = e3b->bd_info->bb_first_free; -+ -+ while (free && ac->ac_status == AC_STATUS_CONTINUE) { -+ i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i); -+ if (i >= sb->s_blocksize * 8) { -+ J_ASSERT(free == 0); -+ break; -+ } -+ -+ mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex); -+ J_ASSERT(ex.fe_len > 0); -+ J_ASSERT(free >= ex.fe_len); -+ -+ ext3_mb_measure_extent(ac, &ex, e3b); -+ -+ i += ex.fe_len; -+ free -= ex.fe_len; -+ } -+} -+ -+/* -+ * This is a special case for storages like raid5 -+ * we try to find stripe-aligned chunks for stripe-size requests -+ */ -+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac, -+ struct ext3_buddy *e3b) -+{ -+ struct super_block *sb = ac->ac_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ void *bitmap = EXT3_MB_BITMAP(e3b); -+ struct ext3_free_extent ex; -+ unsigned long i, max; -+ -+ J_ASSERT(sbi->s_stripe != 0); -+ -+ /* find first stripe-aligned block */ -+ i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) + -+ le32_to_cpu(sbi->s_es->s_first_data_block); -+ i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe; -+ i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb); -+ -+ while (i < sb->s_blocksize * 8) { -+ if (!mb_test_bit(i, bitmap)) { -+ max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex); -+ if (max >= sbi->s_stripe) { -+ ac->ac_found++; -+ ac->ac_b_ex = ex; -+ ext3_mb_use_best_found(ac, e3b); -+ break; -+ } -+ } -+ i += sbi->s_stripe; -+ } -+} -+ -+static int ext3_mb_good_group(struct ext3_allocation_context *ac, -+ int group, int cr) -+{ -+ struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group); -+ unsigned free, fragments, i, bits; -+ -+ J_ASSERT(cr >= 0 && cr < 4); -+ J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp)); -+ -+ free = grp->bb_free; -+ fragments = grp->bb_fragments; -+ if (free == 0) -+ return 0; -+ if (fragments == 0) -+ return 0; -+ -+ switch (cr) { -+ case 0: -+ J_ASSERT(ac->ac_2order != 0); -+ bits = ac->ac_sb->s_blocksize_bits + 1; -+ for (i = ac->ac_2order; i <= bits; i++) -+ if (grp->bb_counters[i] > 0) -+ return 1; -+ break; -+ case 1: -+ if ((free / fragments) >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 2: -+ if (free >= ac->ac_g_ex.fe_len) -+ return 1; -+ break; -+ case 3: -+ return 1; -+ default: -+ BUG(); -+ } -+ -+ return 0; -+} -+ -+int ext3_mb_new_blocks(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *len, int flags, int *errp) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_allocation_context ac; -+ int i, group, block, cr, err = 0; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ struct buffer_head *gdp_bh; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ -+ J_ASSERT(len != NULL); -+ J_ASSERT(*len > 0); -+ -+ sb = inode->i_sb; -+ if (!sb) { -+ printk("ext3_mb_new_nblocks: nonexistent device"); -+ return 0; -+ } -+ -+ if (!test_opt(sb, MBALLOC)) { -+ static int ext3_mballoc_warning = 0; -+ if (ext3_mballoc_warning == 0) { -+ printk(KERN_ERR "EXT3-fs: multiblock request with " -+ "mballoc disabled!\n"); -+ ext3_mballoc_warning++; -+ } -+ *len = 1; -+ err = ext3_new_block_old(handle, inode, goal, errp); -+ return err; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ -+ /* -+ * We can't allocate > group size -+ */ -+ if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10) -+ *len = EXT3_BLOCKS_PER_GROUP(sb) - 10; -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* someone asks for non-reserved blocks */ -+ BUG_ON(*len > 1); -+ err = ext3_mb_reserve_blocks(sb, 1); -+ if (err) { -+ *errp = err; -+ return 0; -+ } -+ } -+ -+ ac.ac_buddy_page = NULL; -+ ac.ac_bitmap_page = NULL; -+ -+ /* -+ * Check quota for allocation of this blocks. -+ */ -+ while (*len && DQUOT_ALLOC_BLOCK(inode, *len)) -+ *len -= 1; -+ if (*len == 0) { -+ *errp = -EDQUOT; -+ block = 0; -+ goto out; -+ } -+ -+ /* start searching from the goal */ -+ if (goal < le32_to_cpu(es->s_first_data_block) || -+ goal >= le32_to_cpu(es->s_blocks_count)) -+ goal = le32_to_cpu(es->s_first_data_block); -+ group = (goal - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ block = ((goal - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb)); -+ -+ /* set up allocation goals */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_groups_scanned = 0; -+ ac.ac_ex_scanned = 0; -+ ac.ac_found = 0; -+ ac.ac_sb = inode->i_sb; -+ ac.ac_g_ex.fe_group = group; -+ ac.ac_g_ex.fe_start = block; -+ ac.ac_g_ex.fe_len = *len; -+ ac.ac_flags = flags; -+ ac.ac_2order = 0; -+ ac.ac_criteria = 0; -+ -+ if (*len == 1 && sbi->s_stripe) { -+ /* looks like a metadata, let's use a dirty hack for raid5 -+ * move all metadata in first groups in hope to hit cached -+ * sectors and thus avoid read-modify cycles in raid5 */ -+ ac.ac_g_ex.fe_group = group = 0; -+ } -+ -+ /* probably, the request is for 2^8+ blocks (1/2/3/... MB) */ -+ i = ffs(*len); -+ if (i >= ext3_mb_order2_reqs) { -+ i--; -+ if ((*len & (~(1 << i))) == 0) -+ ac.ac_2order = i; -+ } -+ -+ /* first, try the goal */ -+ err = ext3_mb_find_by_goal(&ac, &e3b); -+ if (err) -+ goto out_err; -+ if (ac.ac_status == AC_STATUS_FOUND) -+ goto found; -+ -+ /* Let's just scan groups to find more-less suitable blocks */ -+ cr = ac.ac_2order ? 0 : 1; -+repeat: -+ for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) { -+ ac.ac_criteria = cr; -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) { -+ if (group == EXT3_SB(sb)->s_groups_count) -+ group = 0; -+ -+ if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) { -+ /* we need full data about the group -+ * to make a good selection */ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ ext3_mb_release_desc(&e3b); -+ } -+ -+ /* check is group good for our criteries */ -+ if (!ext3_mb_good_group(&ac, group, cr)) -+ continue; -+ -+ err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b); -+ if (err) -+ goto out_err; -+ -+ ext3_lock_group(sb, group); -+ if (!ext3_mb_good_group(&ac, group, cr)) { -+ /* someone did allocation from this group */ -+ ext3_unlock_group(sb, group); -+ ext3_mb_release_desc(&e3b); -+ continue; -+ } -+ -+ ac.ac_groups_scanned++; -+ if (cr == 0) -+ ext3_mb_simple_scan_group(&ac, &e3b); -+ else if (cr == 1 && *len == sbi->s_stripe) -+ ext3_mb_scan_aligned(&ac, &e3b); -+ else -+ ext3_mb_complex_scan_group(&ac, &e3b); -+ -+ ext3_unlock_group(sb, group); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ if (ac.ac_status != AC_STATUS_CONTINUE) -+ break; -+ } -+ } -+ -+ if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND && -+ !(ac.ac_flags & EXT3_MB_HINT_FIRST)) { -+ /* -+ * We've been searching too long. Let's try to allocate -+ * the best chunk we've found so far -+ */ -+ -+ /*if (ac.ac_found > ext3_mb_max_to_scan) -+ printk(KERN_DEBUG "EXT3-fs: too long searching at " -+ "%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len, -+ ac.ac_g_ex.fe_len);*/ -+ ext3_mb_try_best_found(&ac, &e3b); -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * Someone more lucky has already allocated it. -+ * The only thing we can do is just take first -+ * found block(s) -+ printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n"); -+ */ -+ ac.ac_b_ex.fe_group = 0; -+ ac.ac_b_ex.fe_start = 0; -+ ac.ac_b_ex.fe_len = 0; -+ ac.ac_status = AC_STATUS_CONTINUE; -+ ac.ac_flags |= EXT3_MB_HINT_FIRST; -+ cr = 3; -+ goto repeat; -+ } -+ } -+ -+ if (ac.ac_status != AC_STATUS_FOUND) { -+ /* -+ * We aren't lucky definitely -+ */ -+ DQUOT_FREE_BLOCK(inode, *len); -+ *errp = -ENOSPC; -+ block = 0; -+#if 1 -+ printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n", -+ ac.ac_status, ac.ac_flags); -+ printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n", -+ ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group, -+ ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr); -+ printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n", -+ sbi->s_blocks_reserved, ac.ac_found); -+ printk("EXT3-fs: groups: "); -+ for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) -+ printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free); -+ printk("\n"); -+#endif -+ goto out; -+ } -+ -+found: -+ J_ASSERT(ac.ac_b_ex.fe_len > 0); -+ -+ /* good news - free block(s) have been found. now it's time -+ * to mark block(s) in good old journaled bitmap */ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ /* we made a desicion, now mark found blocks in good old -+ * bitmap to be journaled */ -+ -+ ext3_debug("using block group %d(%d)\n", -+ ac.ac_b_group.group, gdp->bg_free_blocks_count); -+ -+ bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group); -+ if (!bitmap_bh) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) { -+ *errp = err; -+ goto out_err; -+ } -+ -+ gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh); -+ if (!gdp) { -+ *errp = -EIO; -+ goto out_err; -+ } -+ -+ err = ext3_journal_get_write_access(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb) -+ + ac.ac_b_ex.fe_start -+ + le32_to_cpu(es->s_first_data_block); -+ -+ if (block == le32_to_cpu(gdp->bg_block_bitmap) || -+ block == le32_to_cpu(gdp->bg_inode_bitmap) || -+ in_range(block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error(sb, "ext3_new_block", -+ "Allocating block in system zone - " -+ "block = %u", block); -+#ifdef AGGRESSIVE_CHECK -+ for (i = 0; i < ac.ac_b_ex.fe_len; i++) -+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data)); -+#endif -+ mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len); -+ -+ spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) -+ - ac.ac_b_ex.fe_len); -+ spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len); -+ -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ if (err) -+ goto out_err; -+ err = ext3_journal_dirty_metadata(handle, gdp_bh); -+ if (err) -+ goto out_err; -+ -+ sb->s_dirt = 1; -+ *errp = 0; -+ brelse(bitmap_bh); -+ -+ /* drop non-allocated, but dquote'd blocks */ -+ J_ASSERT(*len >= ac.ac_b_ex.fe_len); -+ DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len); -+ -+ *len = ac.ac_b_ex.fe_len; -+ J_ASSERT(*len > 0); -+ J_ASSERT(block != 0); -+ goto out; -+ -+out_err: -+ /* if we've already allocated something, roll it back */ -+ if (ac.ac_status == AC_STATUS_FOUND) { -+ /* FIXME: free blocks here */ -+ } -+ -+ DQUOT_FREE_BLOCK(inode, *len); -+ brelse(bitmap_bh); -+ *errp = err; -+ block = 0; -+out: -+ if (ac.ac_buddy_page) -+ page_cache_release(ac.ac_buddy_page); -+ if (ac.ac_bitmap_page) -+ page_cache_release(ac.ac_bitmap_page); -+ -+ if (!(flags & EXT3_MB_HINT_RESERVED)) { -+ /* block wasn't reserved before and we reserved it -+ * at the beginning of allocation. it doesn't matter -+ * whether we allocated anything or we failed: time -+ * to release reservation. NOTE: because I expect -+ * any multiblock request from delayed allocation -+ * path only, here is single block always */ -+ ext3_mb_release_blocks(sb, 1); -+ } -+ -+ if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) { -+ atomic_inc(&sbi->s_bal_reqs); -+ atomic_add(*len, &sbi->s_bal_allocated); -+ if (*len >= ac.ac_g_ex.fe_len) -+ atomic_inc(&sbi->s_bal_success); -+ atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned); -+ if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start && -+ ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group) -+ atomic_inc(&sbi->s_bal_goals); -+ if (ac.ac_found > ext3_mb_max_to_scan) -+ atomic_inc(&sbi->s_bal_breaks); -+ } -+ -+ ext3_mb_store_history(sb, inode->i_ino, &ac); -+ -+ return block; -+} -+EXPORT_SYMBOL(ext3_mb_new_blocks); -+ -+#ifdef EXT3_MB_HISTORY -+struct ext3_mb_proc_session { -+ struct ext3_mb_history *history; -+ struct super_block *sb; -+ int start; -+ int max; -+}; -+ -+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s, -+ struct ext3_mb_history *hs, -+ int first) -+{ -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (!first && hs == s->history + s->start) -+ return NULL; -+ while (hs->goal.fe_len == 0) { -+ hs++; -+ if (hs == s->history + s->max) -+ hs = s->history; -+ if (hs == s->history + s->start) -+ return NULL; -+ } -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ if (!hs) -+ return NULL; -+ while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL); -+ return hs; -+} -+ -+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct ext3_mb_proc_session *s = seq->private; -+ struct ext3_mb_history *hs = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return ext3_mb_history_skip_empty(s, s->history + s->start, 1); -+ else -+ return ext3_mb_history_skip_empty(s, ++hs, 0); -+} -+ -+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct ext3_mb_history *hs = v; -+ char buf[20], buf2[20]; -+ -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n", -+ "pid", "inode", "goal", "result", "found", "grps", "cr", -+ "merge", "tail", "broken"); -+ return 0; -+ } -+ -+ sprintf(buf, "%u/%u/%u", hs->goal.fe_group, -+ hs->goal.fe_start, hs->goal.fe_len); -+ sprintf(buf2, "%u/%u/%u", hs->result.fe_group, -+ hs->result.fe_start, hs->result.fe_len); -+ seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n", -+ hs->pid, hs->ino, buf, buf2, hs->found, hs->groups, -+ hs->cr, hs->merged ? "M" : "", hs->tail, -+ hs->buddy ? 1 << hs->buddy : 0); -+ return 0; -+} -+ -+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_history_ops = { -+ .start = ext3_mb_seq_history_start, -+ .next = ext3_mb_seq_history_next, -+ .stop = ext3_mb_seq_history_stop, -+ .show = ext3_mb_seq_history_show, -+}; -+ -+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max; -+ s->history = kmalloc(size, GFP_KERNEL); -+ if (s == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(s->history, sbi->s_mb_history, size); -+ s->max = sbi->s_mb_history_max; -+ s->start = sbi->s_mb_history_cur % s->max; -+ spin_unlock(&sbi->s_mb_history_lock); -+ -+ rc = seq_open(file, &ext3_mb_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->history); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct ext3_mb_proc_session *s = seq->private; -+ kfree(s->history); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations ext3_mb_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_history_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = ext3_mb_seq_history_release, -+}; -+ -+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ -+ group = *pos + 1; -+ return (void *) group; -+} -+ -+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct super_block *sb = seq->private; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ long group; -+ -+ ++*pos; -+ if (*pos < 0 || *pos >= sbi->s_groups_count) -+ return NULL; -+ group = *pos + 1; -+ return (void *) group;; -+} -+ -+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v) -+{ -+ struct super_block *sb = seq->private; -+ long group = (long) v, i; -+ struct sg { -+ struct ext3_group_info info; -+ unsigned short counters[16]; -+ } sg; -+ -+ group--; -+ if (group == 0) -+ seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n", -+ "group", "free", "frags", "first", "2^0", "2^1", "2^2", -+ "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10", -+ "2^11", "2^12", "2^13"); -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + -+ sizeof(struct ext3_group_info); -+ ext3_lock_group(sb, group); -+ memcpy(&sg, EXT3_GROUP_INFO(sb, group), i); -+ ext3_unlock_group(sb, group); -+ -+ if (EXT3_MB_GRP_NEED_INIT(&sg.info)) -+ return 0; -+ -+ seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free, -+ sg.info.bb_fragments, sg.info.bb_first_free); -+ for (i = 0; i <= 13; i++) -+ seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ? -+ sg.info.bb_counters[i] : 0); -+ seq_printf(seq, " ]\n"); -+ -+ return 0; -+} -+ -+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations ext3_mb_seq_groups_ops = { -+ .start = ext3_mb_seq_groups_start, -+ .next = ext3_mb_seq_groups_next, -+ .stop = ext3_mb_seq_groups_stop, -+ .show = ext3_mb_seq_groups_show, -+}; -+ -+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file) -+{ -+ struct super_block *sb = PDE(inode)->data; -+ int rc; -+ -+ rc = seq_open(file, &ext3_mb_seq_groups_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = sb; -+ } -+ return rc; -+ -+} -+ -+static struct file_operations ext3_mb_seq_groups_fops = { -+ .owner = THIS_MODULE, -+ .open = ext3_mb_seq_groups_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = seq_release, -+}; -+ -+static void ext3_mb_history_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ remove_proc_entry("mb_groups", sbi->s_mb_proc); -+ remove_proc_entry("mb_history", sbi->s_mb_proc); -+ remove_proc_entry(name, proc_root_ext3); -+ -+ if (sbi->s_mb_history) -+ kfree(sbi->s_mb_history); -+} -+ -+static void ext3_mb_history_init(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ char name[64]; -+ int i; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name)); -+ sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3); -+ if (sbi->s_mb_proc != NULL) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_history_fops; -+ p->data = sb; -+ } -+ p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc); -+ if (p) { -+ p->proc_fops = &ext3_mb_seq_groups_fops; -+ p->data = sb; -+ } -+ } -+ -+ sbi->s_mb_history_max = 1000; -+ sbi->s_mb_history_cur = 0; -+ spin_lock_init(&sbi->s_mb_history_lock); -+ i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history); -+ sbi->s_mb_history = kmalloc(i, GFP_KERNEL); -+ memset(sbi->s_mb_history, 0, i); -+ /* if we can't allocate history, then we simple won't use it */ -+} -+ -+static void -+ext3_mb_store_history(struct super_block *sb, unsigned ino, -+ struct ext3_allocation_context *ac) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_mb_history h; -+ -+ if (likely(sbi->s_mb_history == NULL)) -+ return; -+ -+ h.pid = current->pid; -+ h.ino = ino; -+ h.goal = ac->ac_g_ex; -+ h.result = ac->ac_b_ex; -+ h.found = ac->ac_found; -+ h.cr = ac->ac_criteria; -+ h.groups = ac->ac_groups_scanned; -+ h.tail = ac->ac_tail; -+ h.buddy = ac->ac_buddy; -+ h.merged = 0; -+ if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start && -+ ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group) -+ h.merged = 1; -+ -+ spin_lock(&sbi->s_mb_history_lock); -+ memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h)); -+ if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max) -+ sbi->s_mb_history_cur = 0; -+ spin_unlock(&sbi->s_mb_history_lock); -+} -+ -+#else -+#define ext3_mb_history_release(sb) -+#define ext3_mb_history_init(sb) -+#endif -+ -+int ext3_mb_init_backend(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, j, len, metalen; -+ int num_meta_group_infos = -+ (sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ struct ext3_group_info **meta_group_info; -+ -+ /* An 8TB filesystem with 64-bit pointers requires a 4096 byte -+ * kmalloc. A 128kb malloc should suffice for a 256TB filesystem. -+ * So a two level scheme suffices for now. */ -+ sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) * -+ num_meta_group_infos, GFP_KERNEL); -+ if (sbi->s_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n"); -+ return -ENOMEM; -+ } -+ sbi->s_buddy_cache = new_inode(sb); -+ if (sbi->s_buddy_cache == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't get new inode\n"); -+ goto err_freesgi; -+ } -+ -+ metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) { -+ if ((i + 1) == num_meta_group_infos) -+ metalen = sizeof(*meta_group_info) * -+ (sbi->s_groups_count - -+ (i << EXT3_DESC_PER_BLOCK_BITS(sb))); -+ meta_group_info = kmalloc(metalen, GFP_KERNEL); -+ if (meta_group_info == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate mem for a " -+ "buddy group\n"); -+ goto err_freemeta; -+ } -+ sbi->s_group_info[i] = meta_group_info; -+ } -+ -+ /* -+ * calculate needed size. if change bb_counters size, -+ * don't forget about ext3_mb_generate_buddy() -+ */ -+ len = sizeof(struct ext3_group_info); -+ len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2); -+ for (i = 0; i < sbi->s_groups_count; i++) { -+ struct ext3_group_desc * desc; -+ -+ meta_group_info = -+ sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)]; -+ j = i & (EXT3_DESC_PER_BLOCK(sb) - 1); -+ -+ meta_group_info[j] = kmalloc(len, GFP_KERNEL); -+ if (meta_group_info[j] == NULL) { -+ printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n"); -+ i--; -+ goto err_freebuddy; -+ } -+ desc = ext3_get_group_desc(sb, i, NULL); -+ if (desc == NULL) { -+ printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i); -+ goto err_freebuddy; -+ } -+ memset(meta_group_info[j], 0, len); -+ set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, -+ &meta_group_info[j]->bb_state); -+ meta_group_info[j]->bb_free = -+ le16_to_cpu(desc->bg_free_blocks_count); -+ } -+ -+ return 0; -+ -+err_freebuddy: -+ while (i >= 0) { -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ i--; -+ } -+ i = num_meta_group_infos; -+err_freemeta: -+ while (--i >= 0) -+ kfree(sbi->s_group_info[i]); -+ iput(sbi->s_buddy_cache); -+err_freesgi: -+ kfree(sbi->s_group_info); -+ return -ENOMEM; -+} -+ -+int ext3_mb_init(struct super_block *sb, int needs_recovery) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct inode *root = sb->s_root->d_inode; -+ unsigned i, offset, max; -+ struct dentry *dentry; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short); -+ -+ sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_offsets == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ return -ENOMEM; -+ } -+ sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL); -+ if (sbi->s_mb_maxs == NULL) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_maxs); -+ return -ENOMEM; -+ } -+ -+ /* order 0 is regular bitmap */ -+ sbi->s_mb_maxs[0] = sb->s_blocksize << 3; -+ sbi->s_mb_offsets[0] = 0; -+ -+ i = 1; -+ offset = 0; -+ max = sb->s_blocksize << 2; -+ do { -+ sbi->s_mb_offsets[i] = offset; -+ sbi->s_mb_maxs[i] = max; -+ offset += 1 << (sb->s_blocksize_bits - i); -+ max = max >> 1; -+ i++; -+ } while (i <= sb->s_blocksize_bits + 1); -+ -+ /* init file for buddy data */ -+ if ((i = ext3_mb_init_backend(sb))) { -+ clear_opt(sbi->s_mount_opt, MBALLOC); -+ kfree(sbi->s_mb_offsets); -+ kfree(sbi->s_mb_maxs); -+ return i; -+ } -+ -+ spin_lock_init(&sbi->s_reserve_lock); -+ spin_lock_init(&sbi->s_md_lock); -+ INIT_LIST_HEAD(&sbi->s_active_transaction); -+ INIT_LIST_HEAD(&sbi->s_closed_transaction); -+ INIT_LIST_HEAD(&sbi->s_committed_transaction); -+ spin_lock_init(&sbi->s_bal_lock); -+ -+ /* remove old on-disk buddy file */ -+ down(&root->i_sem); -+ dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy")); -+ if (dentry->d_inode != NULL) { -+ i = vfs_unlink(root, dentry); -+ if (i != 0) -+ printk("EXT3-fs: can't remove .buddy file: %d\n", i); -+ } -+ dput(dentry); -+ up(&root->i_sem); -+ -+ ext3_mb_history_init(sb); -+ -+ printk("EXT3-fs: mballoc enabled\n"); -+ return 0; -+} -+ -+int ext3_mb_release(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int i, num_meta_group_infos; -+ -+ if (!test_opt(sb, MBALLOC)) -+ return 0; -+ -+ /* release freed, non-committed blocks */ -+ spin_lock(&sbi->s_md_lock); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_committed_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ ext3_mb_free_committed_blocks(sb); -+ -+ if (sbi->s_group_info) { -+ for (i = 0; i < sbi->s_groups_count; i++) -+ kfree(EXT3_GROUP_INFO(sb, i)); -+ num_meta_group_infos = (sbi->s_groups_count + -+ EXT3_DESC_PER_BLOCK(sb) - 1) >> -+ EXT3_DESC_PER_BLOCK_BITS(sb); -+ for (i = 0; i < num_meta_group_infos; i++) -+ kfree(sbi->s_group_info[i]); -+ kfree(sbi->s_group_info); -+ } -+ if (sbi->s_mb_offsets) -+ kfree(sbi->s_mb_offsets); -+ if (sbi->s_mb_maxs) -+ kfree(sbi->s_mb_maxs); -+ if (sbi->s_buddy_cache) -+ iput(sbi->s_buddy_cache); -+ if (sbi->s_blocks_reserved) -+ printk("ext3-fs: %ld blocks being reserved at umount!\n", -+ sbi->s_blocks_reserved); -+ if (ext3_mb_stats) { -+ printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n", -+ atomic_read(&sbi->s_bal_allocated), -+ atomic_read(&sbi->s_bal_reqs), -+ atomic_read(&sbi->s_bal_success)); -+ printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, " -+ "%u 2^N hits, %u breaks\n", -+ atomic_read(&sbi->s_bal_ex_scanned), -+ atomic_read(&sbi->s_bal_goals), -+ atomic_read(&sbi->s_bal_2orders), -+ atomic_read(&sbi->s_bal_breaks)); -+ printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n", -+ sbi->s_mb_buddies_generated++, -+ sbi->s_mb_generation_time); -+ } -+ -+ ext3_mb_history_release(sb); -+ -+ return 0; -+} -+ -+void ext3_mb_free_committed_blocks(struct super_block *sb) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int err, i, count = 0, count2 = 0; -+ struct ext3_free_metadata *md; -+ struct ext3_buddy e3b; -+ -+ if (list_empty(&sbi->s_committed_transaction)) -+ return; -+ -+ /* there is committed blocks to be freed yet */ -+ do { -+ /* get next array of blocks */ -+ md = NULL; -+ spin_lock(&sbi->s_md_lock); -+ if (!list_empty(&sbi->s_committed_transaction)) { -+ md = list_entry(sbi->s_committed_transaction.next, -+ struct ext3_free_metadata, list); -+ list_del(&md->list); -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ if (md == NULL) -+ break; -+ -+ mb_debug("gonna free %u blocks in group %u (0x%p):", -+ md->num, md->group, md); -+ -+ err = ext3_mb_load_buddy(sb, md->group, &e3b); -+ /* we expect to find existing buddy because it's pinned */ -+ BUG_ON(err != 0); -+ -+ /* there are blocks to put in buddy to make them really free */ -+ count += md->num; -+ count2++; -+ ext3_lock_group(sb, md->group); -+ for (i = 0; i < md->num; i++) { -+ mb_debug(" %u", md->blocks[i]); -+ mb_free_blocks(&e3b, md->blocks[i], 1); -+ } -+ mb_debug("\n"); -+ ext3_unlock_group(sb, md->group); -+ -+ /* balance refcounts from ext3_mb_free_metadata() */ -+ page_cache_release(e3b.bd_buddy_page); -+ page_cache_release(e3b.bd_bitmap_page); -+ -+ kfree(md); -+ ext3_mb_release_desc(&e3b); -+ -+ } while (md); -+ mb_debug("freed %u blocks in %u structures\n", count, count2); -+} -+ -+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ if (sbi->s_last_transaction == handle->h_transaction->t_tid) -+ return; -+ -+ /* new transaction! time to close last one and free blocks for -+ * committed transaction. we know that only transaction can be -+ * active, so previos transaction can be being logged and we -+ * know that transaction before previous is known to be already -+ * logged. this means that now we may free blocks freed in all -+ * transactions before previous one. hope I'm clear enough ... */ -+ -+ spin_lock(&sbi->s_md_lock); -+ if (sbi->s_last_transaction != handle->h_transaction->t_tid) { -+ mb_debug("new transaction %lu, old %lu\n", -+ (unsigned long) handle->h_transaction->t_tid, -+ (unsigned long) sbi->s_last_transaction); -+ list_splice_init(&sbi->s_closed_transaction, -+ &sbi->s_committed_transaction); -+ list_splice_init(&sbi->s_active_transaction, -+ &sbi->s_closed_transaction); -+ sbi->s_last_transaction = handle->h_transaction->t_tid; -+ } -+ spin_unlock(&sbi->s_md_lock); -+ -+ ext3_mb_free_committed_blocks(sb); -+} -+ -+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b, -+ int group, int block, int count) -+{ -+ struct ext3_group_info *db = e3b->bd_info; -+ struct super_block *sb = e3b->bd_sb; -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ struct ext3_free_metadata *md; -+ int i; -+ -+ J_ASSERT(e3b->bd_bitmap_page != NULL); -+ J_ASSERT(e3b->bd_buddy_page != NULL); -+ -+ ext3_lock_group(sb, group); -+ for (i = 0; i < count; i++) { -+ md = db->bb_md_cur; -+ if (md && db->bb_tid != handle->h_transaction->t_tid) { -+ db->bb_md_cur = NULL; -+ md = NULL; -+ } -+ -+ if (md == NULL) { -+ ext3_unlock_group(sb, group); -+ md = kmalloc(sizeof(*md), GFP_KERNEL); -+ if (md == NULL) -+ return -ENOMEM; -+ md->num = 0; -+ md->group = group; -+ -+ ext3_lock_group(sb, group); -+ if (db->bb_md_cur == NULL) { -+ spin_lock(&sbi->s_md_lock); -+ list_add(&md->list, &sbi->s_active_transaction); -+ spin_unlock(&sbi->s_md_lock); -+ /* protect buddy cache from being freed, -+ * otherwise we'll refresh it from -+ * on-disk bitmap and lose not-yet-available -+ * blocks */ -+ page_cache_get(e3b->bd_buddy_page); -+ page_cache_get(e3b->bd_bitmap_page); -+ db->bb_md_cur = md; -+ db->bb_tid = handle->h_transaction->t_tid; -+ mb_debug("new md 0x%p for group %u\n", -+ md, md->group); -+ } else { -+ kfree(md); -+ md = db->bb_md_cur; -+ } -+ } -+ -+ BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS); -+ md->blocks[md->num] = block + i; -+ md->num++; -+ if (md->num == EXT3_BB_MAX_BLOCKS) { -+ /* no more space, put full container on a sb's list */ -+ db->bb_md_cur = NULL; -+ } -+ } -+ ext3_unlock_group(sb, group); -+ return 0; -+} -+ -+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode, -+ unsigned long block, unsigned long count, -+ int metadata, int *freed) -+{ -+ struct buffer_head *bitmap_bh = NULL; -+ struct ext3_group_desc *gdp; -+ struct ext3_super_block *es; -+ unsigned long bit, overflow; -+ struct buffer_head *gd_bh; -+ unsigned long block_group; -+ struct ext3_sb_info *sbi; -+ struct super_block *sb; -+ struct ext3_buddy e3b; -+ int err = 0, ret; -+ -+ *freed = 0; -+ sb = inode->i_sb; -+ if (!sb) { -+ printk ("ext3_free_blocks: nonexistent device"); -+ return; -+ } -+ -+ ext3_mb_poll_new_transaction(sb, handle); -+ -+ sbi = EXT3_SB(sb); -+ es = EXT3_SB(sb)->s_es; -+ if (block < le32_to_cpu(es->s_first_data_block) || -+ block + count < block || -+ block + count > le32_to_cpu(es->s_blocks_count)) { -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks not in datazone - " -+ "block = %lu, count = %lu", block, count); -+ goto error_return; -+ } -+ -+ ext3_debug("freeing block %lu\n", block); -+ -+do_more: -+ overflow = 0; -+ block_group = (block - le32_to_cpu(es->s_first_data_block)) / -+ EXT3_BLOCKS_PER_GROUP(sb); -+ bit = (block - le32_to_cpu(es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb); -+ /* -+ * Check to see if we are freeing blocks across a group -+ * boundary. -+ */ -+ if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) { -+ overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb); -+ count -= overflow; -+ } -+ brelse(bitmap_bh); -+ bitmap_bh = read_block_bitmap(sb, block_group); -+ if (!bitmap_bh) -+ goto error_return; -+ gdp = ext3_get_group_desc (sb, block_group, &gd_bh); -+ if (!gdp) -+ goto error_return; -+ -+ if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) || -+ in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) || -+ in_range (block, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group) || -+ in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table), -+ EXT3_SB(sb)->s_itb_per_group)) -+ ext3_error (sb, "ext3_free_blocks", -+ "Freeing blocks in system zones - " -+ "Block = %lu, count = %lu", -+ block, count); -+ -+ BUFFER_TRACE(bitmap_bh, "getting write access"); -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) -+ goto error_return; -+ -+ /* -+ * We are about to modify some metadata. Call the journal APIs -+ * to unshare ->b_data if a currently-committing transaction is -+ * using it -+ */ -+ BUFFER_TRACE(gd_bh, "get_write_access"); -+ err = ext3_journal_get_write_access(handle, gd_bh); -+ if (err) -+ goto error_return; -+ -+ err = ext3_mb_load_buddy(sb, block_group, &e3b); -+ if (err) -+ goto error_return; -+ -+#ifdef AGGRESSIVE_CHECK -+ { -+ int i; -+ for (i = 0; i < count; i++) -+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data)); -+ } -+#endif -+ mb_clear_bits(bitmap_bh->b_data, bit, count); -+ -+ /* We dirtied the bitmap block */ -+ BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ -+ if (metadata) { -+ /* blocks being freed are metadata. these blocks shouldn't -+ * be used until this transaction is committed */ -+ ext3_mb_free_metadata(handle, &e3b, block_group, bit, count); -+ } else { -+ ext3_lock_group(sb, block_group); -+ mb_free_blocks(&e3b, bit, count); -+ ext3_unlock_group(sb, block_group); -+ } -+ -+ spin_lock(sb_bgl_lock(sbi, block_group)); -+ gdp->bg_free_blocks_count = -+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count); -+ spin_unlock(sb_bgl_lock(sbi, block_group)); -+ percpu_counter_mod(&sbi->s_freeblocks_counter, count); -+ -+ ext3_mb_release_desc(&e3b); -+ -+ *freed = count; -+ -+ /* And the group descriptor block */ -+ BUFFER_TRACE(gd_bh, "dirtied group descriptor block"); -+ ret = ext3_journal_dirty_metadata(handle, gd_bh); -+ if (!err) err = ret; -+ -+ if (overflow && !err) { -+ block += count; -+ count = overflow; -+ goto do_more; -+ } -+ sb->s_dirt = 1; -+error_return: -+ brelse(bitmap_bh); -+ ext3_std_error(sb, err); -+ return; -+} -+ -+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ int free, ret = -ENOSPC; -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ free = percpu_counter_read_positive(&sbi->s_freeblocks_counter); -+ if (blocks <= free - sbi->s_blocks_reserved) { -+ sbi->s_blocks_reserved += blocks; -+ ret = 0; -+ } -+ spin_unlock(&sbi->s_reserve_lock); -+ return ret; -+} -+ -+void ext3_mb_release_blocks(struct super_block *sb, int blocks) -+{ -+ struct ext3_sb_info *sbi = EXT3_SB(sb); -+ -+ BUG_ON(blocks < 0); -+ spin_lock(&sbi->s_reserve_lock); -+ sbi->s_blocks_reserved -= blocks; -+ WARN_ON(sbi->s_blocks_reserved < 0); -+ if (sbi->s_blocks_reserved < 0) -+ sbi->s_blocks_reserved = 0; -+ spin_unlock(&sbi->s_reserve_lock); -+} -+ -+int ext3_new_block(handle_t *handle, struct inode *inode, -+ unsigned long goal, int *errp) -+{ -+ int ret, len; -+ -+ if (!test_opt(inode->i_sb, MBALLOC)) { -+ ret = ext3_new_block_old(handle, inode, goal, errp); -+ goto out; -+ } -+ len = 1; -+ ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp); -+out: -+ return ret; -+} -+ -+ -+void ext3_free_blocks(handle_t *handle, struct inode * inode, -+ unsigned long block, unsigned long count, int metadata) -+{ -+ struct super_block *sb; -+ int freed; -+ -+ sb = inode->i_sb; -+ if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info) -+ ext3_free_blocks_sb(handle, sb, block, count, &freed); -+ else -+ ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed); -+ if (freed) -+ DQUOT_FREE_BLOCK(inode, freed); -+ return; -+} -+ -+#define EXT3_ROOT "ext3" -+#define EXT3_MB_STATS_NAME "mb_stats" -+#define EXT3_MB_MAX_TO_SCAN_NAME "mb_max_to_scan" -+#define EXT3_MB_MIN_TO_SCAN_NAME "mb_min_to_scan" -+#define EXT3_MB_ORDER2_REQ "mb_order2_req" -+ -+static int ext3_mb_stats_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_stats); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_stats_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_STATS_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0); -+ return count; -+} -+ -+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_max_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_max_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_min_to_scan); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_min_to_scan = value; -+ -+ return count; -+} -+ -+static int ext3_mb_order2_req_read(char *page, char **start, off_t off, -+ int count, int *eof, void *data) -+{ -+ int len; -+ -+ *eof = 1; -+ if (off != 0) -+ return 0; -+ -+ len = sprintf(page, "%ld\n", ext3_mb_order2_reqs); -+ *start = page; -+ return len; -+} -+ -+static int ext3_mb_order2_req_write(struct file *file, const char *buffer, -+ unsigned long count, void *data) -+{ -+ char str[32]; -+ long value; -+ -+ if (count >= sizeof(str)) { -+ printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n", -+ EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str)); -+ return -EOVERFLOW; -+ } -+ -+ if (copy_from_user(str, buffer, count)) -+ return -EFAULT; -+ -+ /* Only set to 0 or 1 respectively; zero->0; non-zero->1 */ -+ value = simple_strtol(str, NULL, 0); -+ if (value <= 0) -+ return -ERANGE; -+ -+ ext3_mb_order2_reqs = value; -+ -+ return count; -+} -+ -+int __init init_ext3_proc(void) -+{ -+ struct proc_dir_entry *proc_ext3_mb_stats; -+ struct proc_dir_entry *proc_ext3_mb_max_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_min_to_scan; -+ struct proc_dir_entry *proc_ext3_mb_order2_req; -+ -+ proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs); -+ if (proc_root_ext3 == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT); -+ return -EIO; -+ } -+ -+ /* Initialize EXT3_MB_STATS_NAME */ -+ proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_stats == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_STATS_NAME); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_stats->data = NULL; -+ proc_ext3_mb_stats->read_proc = ext3_mb_stats_read; -+ proc_ext3_mb_stats->write_proc = ext3_mb_stats_write; -+ -+ /* Initialize EXT3_MAX_TO_SCAN_NAME */ -+ proc_ext3_mb_max_to_scan = create_proc_entry( -+ EXT3_MB_MAX_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_max_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MAX_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_max_to_scan->data = NULL; -+ proc_ext3_mb_max_to_scan->read_proc = ext3_mb_max_to_scan_read; -+ proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write; -+ -+ /* Initialize EXT3_MIN_TO_SCAN_NAME */ -+ proc_ext3_mb_min_to_scan = create_proc_entry( -+ EXT3_MB_MIN_TO_SCAN_NAME, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_min_to_scan == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_MIN_TO_SCAN_NAME); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_min_to_scan->data = NULL; -+ proc_ext3_mb_min_to_scan->read_proc = ext3_mb_min_to_scan_read; -+ proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write; -+ -+ /* Initialize EXT3_ORDER2_REQ */ -+ proc_ext3_mb_order2_req = create_proc_entry( -+ EXT3_MB_ORDER2_REQ, -+ S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3); -+ if (proc_ext3_mb_order2_req == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", -+ EXT3_MB_ORDER2_REQ); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+ return -EIO; -+ } -+ -+ proc_ext3_mb_order2_req->data = NULL; -+ proc_ext3_mb_order2_req->read_proc = ext3_mb_order2_req_read; -+ proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write; -+ -+ return 0; -+} -+ -+void exit_ext3_proc(void) -+{ -+ remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3); -+ remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3); -+ remove_proc_entry(EXT3_ROOT, proc_root_fs); -+} -Index: linux-2.6.9-full/fs/ext3/Makefile -=================================================================== ---- linux-2.6.9-full.orig/fs/ext3/Makefile 2006-06-01 14:58:46.000000000 +0400 -+++ linux-2.6.9-full/fs/ext3/Makefile 2006-10-24 12:54:31.000000000 +0400 -@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o - - ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o resize.o \ -- extents.o -+ extents.o mballoc.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o - ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o diff --git a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-rhel4.patch deleted file mode 100644 index de039fca90..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-rhel4.patch +++ /dev/null @@ -1,401 +0,0 @@ -Index: linux-stage/fs/ext3/ialloc.c -=================================================================== ---- linux-stage.orig/fs/ext3/ialloc.c -+++ linux-stage/fs/ext3/ialloc.c -@@ -726,7 +726,8 @@ got: - /* This is the optimal IO size (for stat), not the fs block size */ - inode->i_blksize = PAGE_SIZE; - inode->i_blocks = 0; -- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime = -+ ext3_current_time(inode); - - memset(ei->i_data, 0, sizeof(ei->i_data)); - ei->i_next_alloc_block = 0; -@@ -764,9 +765,8 @@ got: - spin_unlock(&sbi->s_next_gen_lock); - - ei->i_state = EXT3_STATE_NEW; -- ei->i_extra_isize = -- (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? -- sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; -+ -+ ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize; - - ret = inode; - if(DQUOT_ALLOC_INODE(inode)) { -Index: linux-stage/fs/ext3/inode.c -=================================================================== ---- linux-stage.orig/fs/ext3/inode.c -+++ linux-stage/fs/ext3/inode.c -@@ -627,7 +627,7 @@ static int ext3_splice_branch(handle_t * - - /* We are done with atomic stuff, now do the rest of housekeeping */ - -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - - /* had we spliced it onto indirect block? */ -@@ -2230,7 +2230,7 @@ do_indirects: - ; - } - up(&ei->truncate_sem); -- inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_mtime = inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - - /* In a multi-transaction truncate, we only make the final -@@ -2457,10 +2457,6 @@ void ext3_read_inode(struct inode * inod - } - inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); - inode->i_size = le32_to_cpu(raw_inode->i_size); -- inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime); -- inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime); -- inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime); -- inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0; - - ei->i_state = 0; - ei->i_next_alloc_block = 0; -@@ -2521,6 +2517,11 @@ void ext3_read_inode(struct inode * inod - else - ei->i_extra_isize = 0; - -+ EXT3_INODE_GET_XTIME(i_ctime, inode, raw_inode); -+ EXT3_INODE_GET_XTIME(i_mtime, inode, raw_inode); -+ EXT3_INODE_GET_XTIME(i_atime, inode, raw_inode); -+ EXT3_EINODE_GET_XTIME(i_crtime, ei, raw_inode); -+ - if (S_ISREG(inode->i_mode)) { - inode->i_op = &ext3_file_inode_operations; - inode->i_fop = &ext3_file_operations; -@@ -2601,9 +2602,12 @@ static int ext3_do_update_inode(handle_t - } - raw_inode->i_links_count = cpu_to_le16(inode->i_nlink); - raw_inode->i_size = cpu_to_le32(ei->i_disksize); -- raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec); -- raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec); -- raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec); -+ -+ EXT3_INODE_SET_XTIME(i_ctime, inode, raw_inode); -+ EXT3_INODE_SET_XTIME(i_mtime, inode, raw_inode); -+ EXT3_INODE_SET_XTIME(i_atime, inode, raw_inode); -+ EXT3_EINODE_SET_XTIME(i_crtime, ei, raw_inode); -+ - raw_inode->i_blocks = cpu_to_le32(inode->i_blocks); - raw_inode->i_dtime = cpu_to_le32(ei->i_dtime); - raw_inode->i_flags = cpu_to_le32(ei->i_flags); -Index: linux-stage/fs/ext3/ioctl.c -=================================================================== ---- linux-stage.orig/fs/ext3/ioctl.c -+++ linux-stage/fs/ext3/ioctl.c -@@ -112,7 +112,7 @@ int ext3_ioctl (struct inode * inode, st - ei->i_flags = flags; - - ext3_set_inode_flags(inode); -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - - err = ext3_mark_iloc_dirty(handle, inode, &iloc); - flags_err: -@@ -150,7 +150,7 @@ flags_err: - return PTR_ERR(handle); - err = ext3_reserve_inode_write(handle, inode, &iloc); - if (err == 0) { -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - inode->i_generation = generation; - err = ext3_mark_iloc_dirty(handle, inode, &iloc); - } -Index: linux-stage/fs/ext3/namei.c -=================================================================== ---- linux-stage.orig/fs/ext3/namei.c -+++ linux-stage/fs/ext3/namei.c -@@ -1302,7 +1302,7 @@ static int add_dirent_to_buf(handle_t *h - * happen is that the times are slightly out of date - * and/or different from the directory change time. - */ -- dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; -+ dir->i_mtime = dir->i_ctime = ext3_current_time(dir); - ext3_update_dx_flag(dir); - dir->i_version++; - ext3_mark_inode_dirty(handle, dir); -@@ -2098,7 +2098,7 @@ static int ext3_rmdir (struct inode * di - inode->i_version++; - inode->i_nlink = 0; - ext3_orphan_add(handle, inode); -- inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; -+ inode->i_ctime = dir->i_ctime = dir->i_mtime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - ext3_dec_count(handle, dir); - ext3_update_dx_flag(dir); -@@ -2148,13 +2148,13 @@ static int ext3_unlink(struct inode * di - retval = ext3_delete_entry(handle, dir, de, bh); - if (retval) - goto end_unlink; -- dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; -+ dir->i_ctime = dir->i_mtime = ext3_current_time(dir); - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); - ext3_dec_count(handle, inode); - if (!inode->i_nlink) - ext3_orphan_add(handle, inode); -- inode->i_ctime = dir->i_ctime; -+ inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - retval = 0; - -@@ -2255,7 +2255,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - ext3_inc_count(handle, inode); - atomic_inc(&inode->i_count); - -@@ -2357,7 +2357,7 @@ static int ext3_rename (struct inode * o - * Like most other Unix systems, set the ctime for inodes on a - * rename. - */ -- old_inode->i_ctime = CURRENT_TIME_SEC; -+ old_inode->i_ctime = ext3_current_time(old_inode); - ext3_mark_inode_dirty(handle, old_inode); - - /* -@@ -2390,9 +2390,9 @@ static int ext3_rename (struct inode * o - - if (new_inode) { - ext3_dec_count(handle, new_inode); -- new_inode->i_ctime = CURRENT_TIME_SEC; -+ new_inode->i_ctime = ext3_current_time(new_inode); - } -- old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; -+ old_dir->i_ctime = old_dir->i_mtime = ext3_current_time(old_dir); - ext3_update_dx_flag(old_dir); - if (dir_bh) { - BUFFER_TRACE(dir_bh, "get_write_access"); -Index: linux-stage/fs/ext3/super.c -=================================================================== ---- linux-stage.orig/fs/ext3/super.c -+++ linux-stage/fs/ext3/super.c -@@ -1573,6 +1573,8 @@ static int ext3_fill_super (struct super - sbi->s_inode_size); - goto failed_mount; - } -+ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) -+ sb->s_time_gran = 1 << (EXT3_EPOCH_BITS - 2); - } - sbi->s_frag_size = EXT3_MIN_FRAG_SIZE << - le32_to_cpu(es->s_log_frag_size); -@@ -1759,6 +1761,32 @@ static int ext3_fill_super (struct super - } - - ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY); -+ -+ /* determine the minimum size of new large inodes, if present */ -+ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) { -+ sbi->s_want_extra_isize = sizeof(struct ext3_inode) - -+ EXT3_GOOD_OLD_INODE_SIZE; -+ if (EXT3_HAS_RO_COMPAT_FEATURE(sb, -+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) { -+ if (sbi->s_want_extra_isize < -+ le16_to_cpu(es->s_want_extra_isize)) -+ sbi->s_want_extra_isize = -+ le16_to_cpu(es->s_want_extra_isize); -+ if (sbi->s_want_extra_isize < -+ le16_to_cpu(es->s_min_extra_isize)) -+ sbi->s_want_extra_isize = -+ le16_to_cpu(es->s_min_extra_isize); -+ } -+ } -+ /* Check if enough inode space is available */ -+ if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > -+ sbi->s_inode_size) { -+ sbi->s_want_extra_isize = sizeof(struct ext3_inode) - -+ EXT3_GOOD_OLD_INODE_SIZE; -+ printk(KERN_INFO "EXT3-fs: required extra inode space not" -+ "available.\n"); -+ } -+ - /* - * akpm: core read_super() calls in here with the superblock locked. - * That deadlocks, because orphan cleanup needs to lock the superblock -Index: linux-stage/fs/ext3/xattr.c -=================================================================== ---- linux-stage.orig/fs/ext3/xattr.c -+++ linux-stage/fs/ext3/xattr.c -@@ -1305,7 +1305,7 @@ getblk_failed: - - /* Update the inode. */ - EXT3_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0; -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - if (IS_SYNC(inode)) - handle->h_sync = 1; -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h -+++ linux-stage/include/linux/ext3_fs.h -@@ -280,7 +280,7 @@ struct ext3_inode { - __le16 i_uid; /* Low 16 bits of Owner Uid */ - __le32 i_size; /* Size in bytes */ - __le32 i_atime; /* Access time */ -- __le32 i_ctime; /* Creation time */ -+ __le32 i_ctime; /* Inode Change time */ - __le32 i_mtime; /* Modification time */ - __le32 i_dtime; /* Deletion Time */ - __le16 i_gid; /* Low 16 bits of Group Id */ -@@ -329,10 +329,73 @@ struct ext3_inode { - } osd2; /* OS dependent 2 */ - __u16 i_extra_isize; - __u16 i_pad1; -+ __le32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */ -+ __le32 i_mtime_extra; /* extra Modification time(nsec << 2 | epoch) */ -+ __le32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */ -+ __le32 i_crtime; /* File Creation time */ -+ __le32 i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */ - }; - - #define i_size_high i_dir_acl - -+#define EXT3_EPOCH_BITS 2 -+#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1) -+#define EXT3_NSEC_MASK (~0UL << EXT3_EPOCH_BITS) -+ -+#define EXT3_FITS_IN_INODE(ext3_inode, einode, field) \ -+ ((offsetof(typeof(*ext3_inode), field) + \ -+ sizeof((ext3_inode)->field)) \ -+ <= (EXT3_GOOD_OLD_INODE_SIZE + \ -+ (einode)->i_extra_isize)) \ -+ -+static inline __le32 ext3_encode_extra_time(struct timespec *time) -+{ -+ return cpu_to_le32((sizeof(time->tv_sec) > 4 ? -+ time->tv_sec >> 32 : 0) | -+ ((time->tv_nsec << 2) & EXT3_NSEC_MASK)); -+} -+ -+static inline void ext3_decode_extra_time(struct timespec *time, __le32 extra) { -+ if (sizeof(time->tv_sec) > 4) -+ time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT3_EPOCH_MASK) -+ << 32; -+ time->tv_nsec = (le32_to_cpu(extra) & EXT3_NSEC_MASK) >> 2; -+} -+ -+#define EXT3_INODE_SET_XTIME(xtime, inode, raw_inode) \ -+do { \ -+ (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra))\ -+ (raw_inode)->xtime ## _extra = \ -+ ext3_encode_extra_time(&(inode)->xtime); \ -+} while (0) -+ -+#define EXT3_EINODE_SET_XTIME(xtime, einode, raw_inode) \ -+do { \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime)) \ -+ (raw_inode)->xtime = cpu_to_le32((einode)->xtime.tv_sec); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \ -+ (raw_inode)->xtime ## _extra = \ -+ ext3_encode_extra_time(&(einode)->xtime); \ -+} while (0) -+ -+#define EXT3_INODE_GET_XTIME(xtime, inode, raw_inode) \ -+do { \ -+ (inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra))\ -+ ext3_decode_extra_time(&(inode)->xtime, \ -+ raw_inode->xtime ## _extra); \ -+} while (0) -+ -+#define EXT3_EINODE_GET_XTIME(xtime, einode, raw_inode) \ -+do { \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime)) \ -+ (einode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \ -+ ext3_decode_extra_time(&(einode)->xtime, \ -+ raw_inode->xtime ## _extra); \ -+} while (0) -+ - #if defined(__KERNEL__) || defined(__linux__) - #define i_reserved1 osd1.linux1.l_i_reserved1 - #define i_frag osd2.linux2.l_i_frag -@@ -500,11 +563,19 @@ struct ext3_super_block { - __le32 s_last_orphan; /* start of list of inodes to delete */ - __le32 s_hash_seed[4]; /* HTREE hash seed */ - __u8 s_def_hash_version; /* Default hash version to use */ -- __u8 s_reserved_char_pad; -- __u16 s_reserved_word_pad; -+ __u8 s_jnl_backup_type; /* Default type of journal backup */ -+ __le16 s_desc_size; /* Group desc. size: INCOMPAT_64BIT */ - __le32 s_default_mount_opts; -- __le32 s_first_meta_bg; /* First metablock block group */ -- __u32 s_reserved[190]; /* Padding to the end of the block */ -+ __le32 s_first_meta_bg; /* First metablock block group */ -+ __le32 s_mkfs_time; /* When the filesystem was created */ -+ __le32 s_jnl_blocks[17]; /* Backup of the journal inode */ -+ __le32 s_blocks_count_hi; /* Blocks count high 32 bits */ -+ __le32 s_r_blocks_count_hi; /* Reserved blocks count high 32 bits*/ -+ __le32 s_free_blocks_hi; /* Free blocks count high 32 bits */ -+ __le16 s_min_extra_isize; /* All inodes have at least # bytes */ -+ __le16 s_want_extra_isize; /* New inodes should reserve # bytes */ -+ __le32 s_flags; /* Miscellaneous flags */ -+ __u32 s_reserved[167]; /* Padding to the end of the block */ - }; - - #ifdef __KERNEL__ -@@ -580,6 +651,7 @@ static inline struct ext3_inode_info *EX - #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 - #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 - #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 -+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 - - #define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001 - #define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002 -@@ -597,6 +669,7 @@ static inline struct ext3_inode_info *EX - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ - EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \ -+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) - - /* -@@ -724,6 +797,12 @@ static inline struct ext3_inode *ext3_ra - return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset); - } - -+static inline struct timespec ext3_current_time(struct inode *inode) -+{ -+ return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ? -+ current_fs_time(inode->i_sb) : CURRENT_TIME_SEC; -+} -+ - /* - * This structure is stuffed into the struct file's private_data field - * for directories. It is where we put information so that we can do -Index: linux-stage/include/linux/ext3_fs_i.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs_i.h -+++ linux-stage/include/linux/ext3_fs_i.h -@@ -130,6 +130,7 @@ struct ext3_inode_info { - - /* on-disk additional length */ - __u16 i_extra_isize; -+ struct timespec i_crtime; - - /* - * truncate_sem is for serialising ext3_truncate() against -Index: linux-stage/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs_sb.h -+++ linux-stage/include/linux/ext3_fs_sb.h -@@ -71,6 +71,8 @@ struct ext3_sb_info { - /* Last group used to allocate inode */ - int s_last_alloc_group; - -+ unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */ -+ - /* root of the per fs reservation window tree */ - spinlock_t s_rsv_window_lock; - struct rb_root s_rsv_window_root; diff --git a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-sles10.patch deleted file mode 100644 index 04c6e61ab1..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-sles10.patch +++ /dev/null @@ -1,404 +0,0 @@ -Index: linux-2.6.16.27-0.9/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/ialloc.c -+++ linux-2.6.16.27-0.9/fs/ext3/ialloc.c -@@ -577,7 +577,8 @@ got: - /* This is the optimal IO size (for stat), not the fs block size */ - inode->i_blksize = PAGE_SIZE; - inode->i_blocks = 0; -- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime = -+ ext3_current_time(inode); - - memset(ei->i_data, 0, sizeof(ei->i_data)); - ei->i_dir_start_lookup = 0; -@@ -609,9 +610,8 @@ got: - spin_unlock(&sbi->s_next_gen_lock); - - ei->i_state = EXT3_STATE_NEW; -- ei->i_extra_isize = -- (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? -- sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; -+ -+ ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize; - - ret = inode; - if(DQUOT_ALLOC_INODE(inode)) { -Index: linux-2.6.16.27-0.9/fs/ext3/inode.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/inode.c -+++ linux-2.6.16.27-0.9/fs/ext3/inode.c -@@ -620,7 +620,7 @@ static int ext3_splice_branch(handle_t * - - /* We are done with atomic stuff, now do the rest of housekeeping */ - -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - - /* had we spliced it onto indirect block? */ -@@ -2244,7 +2244,7 @@ do_indirects: - ext3_discard_reservation(inode); - - up(&ei->truncate_sem); -- inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_mtime = inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - - /* In a multi-transaction truncate, we only make the final -@@ -2479,10 +2479,6 @@ void ext3_read_inode(struct inode * inod - } - inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); - inode->i_size = le32_to_cpu(raw_inode->i_size); -- inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime); -- inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime); -- inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime); -- inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0; - - ei->i_state = 0; - ei->i_dir_start_lookup = 0; -@@ -2557,6 +2553,11 @@ void ext3_read_inode(struct inode * inod - } else - ei->i_extra_isize = 0; - -+ EXT3_INODE_GET_XTIME(i_ctime, inode, raw_inode); -+ EXT3_INODE_GET_XTIME(i_mtime, inode, raw_inode); -+ EXT3_INODE_GET_XTIME(i_atime, inode, raw_inode); -+ EXT3_EINODE_GET_XTIME(i_crtime, ei, raw_inode); -+ - if (S_ISREG(inode->i_mode)) { - inode->i_op = &ext3_file_inode_operations; - inode->i_fop = &ext3_file_operations; -@@ -2637,9 +2638,12 @@ static int ext3_do_update_inode(handle_t - } - raw_inode->i_links_count = cpu_to_le16(inode->i_nlink); - raw_inode->i_size = cpu_to_le32(ei->i_disksize); -- raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec); -- raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec); -- raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec); -+ -+ EXT3_INODE_SET_XTIME(i_ctime, inode, raw_inode); -+ EXT3_INODE_SET_XTIME(i_mtime, inode, raw_inode); -+ EXT3_INODE_SET_XTIME(i_atime, inode, raw_inode); -+ EXT3_EINODE_SET_XTIME(i_crtime, ei, raw_inode); -+ - raw_inode->i_blocks = cpu_to_le32(inode->i_blocks); - raw_inode->i_dtime = cpu_to_le32(ei->i_dtime); - raw_inode->i_flags = cpu_to_le32(ei->i_flags); -Index: linux-2.6.16.27-0.9/fs/ext3/ioctl.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/ioctl.c -+++ linux-2.6.16.27-0.9/fs/ext3/ioctl.c -@@ -88,7 +88,7 @@ int ext3_ioctl (struct inode * inode, st - ei->i_flags = flags; - - ext3_set_inode_flags(inode); -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - - err = ext3_mark_iloc_dirty(handle, inode, &iloc); - flags_err: -@@ -126,7 +126,7 @@ flags_err: - return PTR_ERR(handle); - err = ext3_reserve_inode_write(handle, inode, &iloc); - if (err == 0) { -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - inode->i_generation = generation; - err = ext3_mark_iloc_dirty(handle, inode, &iloc); - } -Index: linux-2.6.16.27-0.9/fs/ext3/namei.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/namei.c -+++ linux-2.6.16.27-0.9/fs/ext3/namei.c -@@ -1276,7 +1276,7 @@ static int add_dirent_to_buf(handle_t *h - * happen is that the times are slightly out of date - * and/or different from the directory change time. - */ -- dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; -+ dir->i_mtime = dir->i_ctime = ext3_current_time(dir); - ext3_update_dx_flag(dir); - dir->i_version++; - ext3_mark_inode_dirty(handle, dir); -@@ -2056,7 +2056,7 @@ static int ext3_rmdir (struct inode * di - inode->i_version++; - inode->i_nlink = 0; - ext3_orphan_add(handle, inode); -- inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; -+ inode->i_ctime = dir->i_ctime = dir->i_mtime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - ext3_dec_count(handle, dir); - ext3_update_dx_flag(dir); -@@ -2106,13 +2106,13 @@ static int ext3_unlink(struct inode * di - retval = ext3_delete_entry(handle, dir, de, bh); - if (retval) - goto end_unlink; -- dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; -+ dir->i_ctime = dir->i_mtime = ext3_current_time(dir); - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); - ext3_dec_count(handle, inode); - if (!inode->i_nlink) - ext3_orphan_add(handle, inode); -- inode->i_ctime = dir->i_ctime; -+ inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - retval = 0; - -@@ -2214,7 +2214,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - ext3_inc_count(handle, inode); - atomic_inc(&inode->i_count); - -@@ -2317,7 +2317,7 @@ static int ext3_rename (struct inode * o - * Like most other Unix systems, set the ctime for inodes on a - * rename. - */ -- old_inode->i_ctime = CURRENT_TIME_SEC; -+ old_inode->i_ctime = ext3_current_time(old_inode); - ext3_mark_inode_dirty(handle, old_inode); - - /* -@@ -2350,9 +2350,9 @@ static int ext3_rename (struct inode * o - - if (new_inode) { - ext3_dec_count(handle, new_inode); -- new_inode->i_ctime = CURRENT_TIME_SEC; -+ new_inode->i_ctime = ext3_current_time(new_inode); - } -- old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; -+ old_dir->i_ctime = old_dir->i_mtime = ext3_current_time(old_dir); - ext3_update_dx_flag(old_dir); - if (dir_bh) { - BUFFER_TRACE(dir_bh, "get_write_access"); -Index: linux-2.6.16.27-0.9/fs/ext3/super.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/super.c -+++ linux-2.6.16.27-0.9/fs/ext3/super.c -@@ -1614,6 +1614,8 @@ static int ext3_fill_super (struct super - sbi->s_inode_size); - goto failed_mount; - } -+ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) -+ sb->s_time_gran = 1 << (EXT3_EPOCH_BITS - 2); - } - sbi->s_frag_size = EXT3_MIN_FRAG_SIZE << - le32_to_cpu(es->s_log_frag_size); -@@ -1809,6 +1811,32 @@ static int ext3_fill_super (struct super - } - - ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY); -+ -+ /* determine the minimum size of new large inodes, if present */ -+ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) { -+ sbi->s_want_extra_isize = sizeof(struct ext3_inode) - -+ EXT3_GOOD_OLD_INODE_SIZE; -+ if (EXT3_HAS_RO_COMPAT_FEATURE(sb, -+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) { -+ if (sbi->s_want_extra_isize < -+ le16_to_cpu(es->s_want_extra_isize)) -+ sbi->s_want_extra_isize = -+ le16_to_cpu(es->s_want_extra_isize); -+ if (sbi->s_want_extra_isize < -+ le16_to_cpu(es->s_min_extra_isize)) -+ sbi->s_want_extra_isize = -+ le16_to_cpu(es->s_min_extra_isize); -+ } -+ } -+ /* Check if enough inode space is available */ -+ if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > -+ sbi->s_inode_size) { -+ sbi->s_want_extra_isize = sizeof(struct ext3_inode) - -+ EXT3_GOOD_OLD_INODE_SIZE; -+ printk(KERN_INFO "EXT3-fs: required extra inode space not" -+ "available.\n"); -+ } -+ - /* - * akpm: core read_super() calls in here with the superblock locked. - * That deadlocks, because orphan cleanup needs to lock the superblock -Index: linux-2.6.16.27-0.9/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.16.27-0.9.orig/fs/ext3/xattr.c -+++ linux-2.6.16.27-0.9/fs/ext3/xattr.c -@@ -1006,8 +1006,8 @@ ext3_xattr_set_handle(handle_t *handle, - } - if (!error) { - ext3_xattr_update_super_block(handle, inode->i_sb); -- inode->i_ctime = CURRENT_TIME_SEC; -- error = ext3_mark_iloc_dirty(handle, inode, &is.iloc); -+ inode->i_ctime = ext3_current_time(inode); -+ ext3_mark_inode_dirty(handle, inode); - /* - * The bh is consumed by ext3_mark_iloc_dirty, even with - * error != 0. -Index: linux-2.6.16.27-0.9/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs.h -+++ linux-2.6.16.27-0.9/include/linux/ext3_fs.h -@@ -272,7 +272,7 @@ struct ext3_inode { - __le16 i_uid; /* Low 16 bits of Owner Uid */ - __le32 i_size; /* Size in bytes */ - __le32 i_atime; /* Access time */ -- __le32 i_ctime; /* Creation time */ -+ __le32 i_ctime; /* Inode Change time */ - __le32 i_mtime; /* Modification time */ - __le32 i_dtime; /* Deletion Time */ - __le16 i_gid; /* Low 16 bits of Group Id */ -@@ -321,10 +321,73 @@ struct ext3_inode { - } osd2; /* OS dependent 2 */ - __le16 i_extra_isize; - __le16 i_pad1; -+ __le32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */ -+ __le32 i_mtime_extra; /* extra Modification time(nsec << 2 | epoch) */ -+ __le32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */ -+ __le32 i_crtime; /* File Creation time */ -+ __le32 i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */ - }; - - #define i_size_high i_dir_acl - -+#define EXT3_EPOCH_BITS 2 -+#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1) -+#define EXT3_NSEC_MASK (~0UL << EXT3_EPOCH_BITS) -+ -+#define EXT3_FITS_IN_INODE(ext3_inode, einode, field) \ -+ ((offsetof(typeof(*ext3_inode), field) + \ -+ sizeof((ext3_inode)->field)) \ -+ <= (EXT3_GOOD_OLD_INODE_SIZE + \ -+ (einode)->i_extra_isize)) \ -+ -+static inline __le32 ext3_encode_extra_time(struct timespec *time) -+{ -+ return cpu_to_le32((sizeof(time->tv_sec) > 4 ? -+ time->tv_sec >> 32 : 0) | -+ ((time->tv_nsec << 2) & EXT3_NSEC_MASK)); -+} -+ -+static inline void ext3_decode_extra_time(struct timespec *time, __le32 extra) { -+ if (sizeof(time->tv_sec) > 4) -+ time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT3_EPOCH_MASK) -+ << 32; -+ time->tv_nsec = (le32_to_cpu(extra) & EXT3_NSEC_MASK) >> 2; -+} -+ -+#define EXT3_INODE_SET_XTIME(xtime, inode, raw_inode) \ -+do { \ -+ (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra)) \ -+ (raw_inode)->xtime ## _extra = \ -+ ext3_encode_extra_time(&(inode)->xtime); \ -+} while (0) -+ -+#define EXT3_EINODE_SET_XTIME(xtime, einode, raw_inode) \ -+do { \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime)) \ -+ (raw_inode)->xtime = cpu_to_le32((einode)->xtime.tv_sec); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \ -+ (raw_inode)->xtime ## _extra = \ -+ ext3_encode_extra_time(&(einode)->xtime); \ -+} while (0) -+ -+#define EXT3_INODE_GET_XTIME(xtime, inode, raw_inode) \ -+do { \ -+ (inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra))\ -+ ext3_decode_extra_time(&(inode)->xtime, \ -+ raw_inode->xtime ## _extra); \ -+} while (0) -+ -+#define EXT3_EINODE_GET_XTIME(xtime, einode, raw_inode) \ -+do { \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime)) \ -+ (einode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime);\ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \ -+ ext3_decode_extra_time(&(einode)->xtime, \ -+ raw_inode->xtime ## _extra); \ -+} while (0) -+ - #if defined(__KERNEL__) || defined(__linux__) - #define i_reserved1 osd1.linux1.l_i_reserved1 - #define i_frag osd2.linux2.l_i_frag -@@ -504,11 +567,19 @@ struct ext3_super_block { - __le32 s_last_orphan; /* start of list of inodes to delete */ - __le32 s_hash_seed[4]; /* HTREE hash seed */ - __u8 s_def_hash_version; /* Default hash version to use */ -- __u8 s_reserved_char_pad; -- __u16 s_reserved_word_pad; -+ __u8 s_jnl_backup_type; /* Default type of journal backup */ -+ __le16 s_desc_size; /* Group desc. size: INCOMPAT_64BIT */ - __le32 s_default_mount_opts; -- __le32 s_first_meta_bg; /* First metablock block group */ -- __u32 s_reserved[190]; /* Padding to the end of the block */ -+ __le32 s_first_meta_bg; /* First metablock block group */ -+ __le32 s_mkfs_time; /* When the filesystem was created */ -+ __le32 s_jnl_blocks[17]; /* Backup of the journal inode */ -+ __le32 s_blocks_count_hi; /* Blocks count high 32 bits */ -+ __le32 s_r_blocks_count_hi; /* Reserved blocks count high 32 bits*/ -+ __le32 s_free_blocks_hi; /* Free blocks count high 32 bits */ -+ __le16 s_min_extra_isize; /* All inodes have at least # bytes */ -+ __le16 s_want_extra_isize; /* New inodes should reserve # bytes */ -+ __le32 s_flags; /* Miscellaneous flags */ -+ __u32 s_reserved[167]; /* Padding to the end of the block */ - }; - - #ifdef __KERNEL__ -@@ -583,6 +648,8 @@ static inline struct ext3_inode_info *EX - #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 - #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 - #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 -+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 -+ - - #define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001 - #define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002 -@@ -599,6 +666,7 @@ static inline struct ext3_inode_info *EX - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ - EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \ -+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) - - /* -@@ -726,6 +794,12 @@ static inline struct ext3_inode *ext3_ra - return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset); - } - -+static inline struct timespec ext3_current_time(struct inode *inode) -+{ -+ return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ? -+ current_fs_time(inode->i_sb) : CURRENT_TIME_SEC; -+} -+ - /* - * This structure is stuffed into the struct file's private_data field - * for directories. It is where we put information so that we can do -Index: linux-2.6.16.27-0.9/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs_i.h -+++ linux-2.6.16.27-0.9/include/linux/ext3_fs_i.h -@@ -130,6 +130,7 @@ struct ext3_inode_info { - - /* on-disk additional length */ - __u16 i_extra_isize; -+ struct timespec i_crtime; - - /* - * truncate_sem is for serialising ext3_truncate() against -Index: linux-2.6.16.27-0.9/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.16.27-0.9/include/linux/ext3_fs_sb.h -@@ -71,6 +71,8 @@ struct ext3_sb_info { - /* Last group used to allocate inode */ - int s_last_alloc_group; - -+ unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */ -+ - /* root of the per fs reservation window tree */ - spinlock_t s_rsv_window_lock; - struct rb_root s_rsv_window_root; diff --git a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-suse.patch deleted file mode 100644 index 7824114a60..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-suse.patch +++ /dev/null @@ -1,195 +0,0 @@ -Index: linux-2.6.5-7.283/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/ext3/ialloc.c -+++ linux-2.6.5-7.283/fs/ext3/ialloc.c -@@ -613,7 +613,8 @@ got: - /* This is the optimal IO size (for stat), not the fs block size */ - inode->i_blksize = PAGE_SIZE; - inode->i_blocks = 0; -- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime = -+ CURRENT_TIME; - - memset(ei->i_data, 0, sizeof(ei->i_data)); - ei->i_next_alloc_block = 0; -@@ -651,9 +652,8 @@ got: - spin_unlock(&sbi->s_next_gen_lock); - - ei->i_state = EXT3_STATE_NEW; -- ei->i_extra_isize = -- (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? -- sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; -+ -+ ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize; - - ret = inode; - if(DQUOT_ALLOC_INODE(inode)) { -Index: linux-2.6.5-7.283/fs/ext3/inode.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/ext3/inode.c -+++ linux-2.6.5-7.283/fs/ext3/inode.c -@@ -2459,7 +2459,11 @@ void ext3_read_inode(struct inode * inod - inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime); - inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime); - inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime); -- inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0; -+ if (EXT3_FITS_IN_INODE(raw_inode, ei, i_crtime)) { -+ ei->i_crtime.tv_sec = le32_to_cpu(raw_inode->i_crtime); -+ } -+ inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = -+ ei->i_crtime.tv_nsec = 0; - - ei->i_state = 0; - ei->i_next_alloc_block = 0; -@@ -2603,6 +2607,10 @@ static int ext3_do_update_inode(handle_t - raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec); - raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec); - raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec); -+ if (EXT3_FITS_IN_INODE(raw_inode, ei, i_crtime)) { -+ raw_inode->i_crtime = cpu_to_le32(ei->i_crtime.tv_sec); -+ } -+ - raw_inode->i_blocks = cpu_to_le32(inode->i_blocks); - raw_inode->i_dtime = cpu_to_le32(ei->i_dtime); - raw_inode->i_flags = cpu_to_le32(ei->i_flags); -Index: linux-2.6.5-7.283/fs/ext3/super.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/ext3/super.c -+++ linux-2.6.5-7.283/fs/ext3/super.c -@@ -1515,6 +1515,32 @@ static int ext3_fill_super (struct super - } - - ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY); -+ -+ /* determine the minimum size of new large inodes, if present */ -+ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) { -+ sbi->s_want_extra_isize = sizeof(struct ext3_inode) - -+ EXT3_GOOD_OLD_INODE_SIZE; -+ if (EXT3_HAS_RO_COMPAT_FEATURE(sb, -+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) { -+ if (sbi->s_want_extra_isize < -+ le16_to_cpu(es->s_want_extra_isize)) -+ sbi->s_want_extra_isize = -+ le16_to_cpu(es->s_want_extra_isize); -+ if (sbi->s_want_extra_isize < -+ le16_to_cpu(es->s_min_extra_isize)) -+ sbi->s_want_extra_isize = -+ le16_to_cpu(es->s_min_extra_isize); -+ } -+ } -+ /* Check if enough inode space is available */ -+ if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > -+ sbi->s_inode_size) { -+ sbi->s_want_extra_isize = sizeof(struct ext3_inode) - -+ EXT3_GOOD_OLD_INODE_SIZE; -+ printk(KERN_INFO "EXT3-fs: required extra inode space not" -+ "available.\n"); -+ } -+ - /* - * akpm: core read_super() calls in here with the superblock locked. - * That deadlocks, because orphan cleanup needs to lock the superblock -Index: linux-2.6.5-7.283/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/ext3_fs.h -+++ linux-2.6.5-7.283/include/linux/ext3_fs.h -@@ -232,7 +232,7 @@ struct ext3_inode { - __u16 i_uid; /* Low 16 bits of Owner Uid */ - __u32 i_size; /* Size in bytes */ - __u32 i_atime; /* Access time */ -- __u32 i_ctime; /* Creation time */ -+ __u32 i_ctime; /* Inode Change time */ - __u32 i_mtime; /* Modification time */ - __u32 i_dtime; /* Deletion Time */ - __u16 i_gid; /* Low 16 bits of Group Id */ -@@ -281,10 +281,25 @@ struct ext3_inode { - } osd2; /* OS dependent 2 */ - __u16 i_extra_isize; - __u16 i_pad1; -+ __le32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */ -+ __le32 i_mtime_extra; /* extra Modification time(nsec << 2 | epoch) */ -+ __le32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */ -+ __le32 i_crtime; /* File Creation time */ -+ __le32 i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */ - }; - - #define i_size_high i_dir_acl - -+#define EXT3_EPOCH_BITS 2 -+#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1) -+#define EXT3_NSEC_MASK (~0UL << EXT3_EPOCH_BITS) -+ -+#define EXT3_FITS_IN_INODE(ext3_inode, einode, field) \ -+ ((offsetof(typeof(*ext3_inode), field) + \ -+ sizeof((ext3_inode)->field)) \ -+ <= (EXT3_GOOD_OLD_INODE_SIZE + \ -+ (einode)->i_extra_isize)) \ -+ - #if defined(__KERNEL__) || defined(__linux__) - #define i_reserved1 osd1.linux1.l_i_reserved1 - #define i_frag osd2.linux2.l_i_frag -@@ -460,11 +475,19 @@ struct ext3_super_block { - __u32 s_last_orphan; /* start of list of inodes to delete */ - __u32 s_hash_seed[4]; /* HTREE hash seed */ - __u8 s_def_hash_version; /* Default hash version to use */ -- __u8 s_reserved_char_pad; -- __u16 s_reserved_word_pad; -+ __u8 s_jnl_backup_type; /* Default type of journal backup */ -+ __u16 s_desc_size; /* Group desc. size: INCOMPAT_64BIT */ - __u32 s_default_mount_opts; -- __u32 s_first_meta_bg; /* First metablock block group */ -- __u32 s_reserved[190]; /* Padding to the end of the block */ -+ __u32 s_first_meta_bg; /* First metablock block group */ -+ __u32 s_mkfs_time; /* When the filesystem was created */ -+ __u32 s_jnl_blocks[17]; /* Backup of the journal inode */ -+ __u32 s_blocks_count_hi; /* Blocks count high 32 bits */ -+ __u32 s_r_blocks_count_hi; /* Reserved blocks count high 32 bits*/ -+ __u32 s_free_blocks_hi; /* Free blocks count high 32 bits */ -+ __u16 s_min_extra_isize; /* All inodes have at least # bytes */ -+ __u16 s_want_extra_isize; /* New inodes should reserve # bytes */ -+ __u32 s_flags; /* Miscellaneous flags */ -+ __u32 s_reserved[167]; /* Padding to the end of the block */ - }; - - #ifdef __KERNEL__ -@@ -539,6 +556,7 @@ static inline struct ext3_inode_info *EX - #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 - #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 - #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 -+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 - - #define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001 - #define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002 -@@ -555,6 +573,7 @@ static inline struct ext3_inode_info *EX - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ - EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \ -+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) - - /* -Index: linux-2.6.5-7.283/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/ext3_fs_i.h -+++ linux-2.6.5-7.283/include/linux/ext3_fs_i.h -@@ -130,6 +130,7 @@ struct ext3_inode_info { - - /* on-disk additional length */ - __u16 i_extra_isize; -+ struct timespec i_crtime; - - /* - * truncate_sem is for serialising ext3_truncate() against -Index: linux-2.6.5-7.283/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.5-7.283/include/linux/ext3_fs_sb.h -@@ -71,6 +71,8 @@ struct ext3_sb_info { - /* Last group used to allocate inode */ - int s_last_alloc_group; - -+ unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */ -+ - /* root of the per fs reservation window tree */ - spinlock_t s_rsv_window_lock; - struct rb_root s_rsv_window_root; diff --git a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.18-vanilla.patch deleted file mode 100644 index 6dd7ad76d6..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.18-vanilla.patch +++ /dev/null @@ -1,403 +0,0 @@ -Index: linux-2.6.18/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.18.orig/fs/ext3/ialloc.c -+++ linux-2.6.18/fs/ext3/ialloc.c -@@ -615,7 +615,8 @@ got: - /* This is the optimal IO size (for stat), not the fs block size */ - inode->i_blksize = PAGE_SIZE; - inode->i_blocks = 0; -- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime = -+ ext3_current_time(inode); - - memset(ei->i_data, 0, sizeof(ei->i_data)); - ei->i_dir_start_lookup = 0; -@@ -647,9 +648,8 @@ got: - spin_unlock(&sbi->s_next_gen_lock); - - ei->i_state = EXT3_STATE_NEW; -- ei->i_extra_isize = -- (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? -- sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; -+ -+ ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize; - - ret = inode; - if(DQUOT_ALLOC_INODE(inode)) { -Index: linux-2.6.18/fs/ext3/inode.c -=================================================================== ---- linux-2.6.18.orig/fs/ext3/inode.c -+++ linux-2.6.18/fs/ext3/inode.c -@@ -729,7 +729,7 @@ static int ext3_splice_branch(handle_t * - - /* We are done with atomic stuff, now do the rest of housekeeping */ - -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - - /* had we spliced it onto indirect block? */ -@@ -2388,7 +2388,7 @@ do_indirects: - ext3_discard_reservation(inode); - - mutex_unlock(&ei->truncate_mutex); -- inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_mtime = inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - - /* -@@ -2624,10 +2624,6 @@ void ext3_read_inode(struct inode * inod - } - inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); - inode->i_size = le32_to_cpu(raw_inode->i_size); -- inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime); -- inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime); -- inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime); -- inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0; - - ei->i_state = 0; - ei->i_dir_start_lookup = 0; -@@ -2702,6 +2698,11 @@ void ext3_read_inode(struct inode * inod - } else - ei->i_extra_isize = 0; - -+ EXT3_INODE_GET_XTIME(i_ctime, inode, raw_inode); -+ EXT3_INODE_GET_XTIME(i_mtime, inode, raw_inode); -+ EXT3_INODE_GET_XTIME(i_atime, inode, raw_inode); -+ EXT3_EINODE_GET_XTIME(i_crtime, ei, raw_inode); -+ - if (S_ISREG(inode->i_mode)) { - inode->i_op = &ext3_file_inode_operations; - inode->i_fop = &ext3_file_operations; -@@ -2782,9 +2783,12 @@ static int ext3_do_update_inode(handle_t - } - raw_inode->i_links_count = cpu_to_le16(inode->i_nlink); - raw_inode->i_size = cpu_to_le32(ei->i_disksize); -- raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec); -- raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec); -- raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec); -+ -+ EXT3_INODE_SET_XTIME(i_ctime, inode, raw_inode); -+ EXT3_INODE_SET_XTIME(i_mtime, inode, raw_inode); -+ EXT3_INODE_SET_XTIME(i_atime, inode, raw_inode); -+ EXT3_EINODE_SET_XTIME(i_crtime, ei, raw_inode); -+ - raw_inode->i_blocks = cpu_to_le32(inode->i_blocks); - raw_inode->i_dtime = cpu_to_le32(ei->i_dtime); - raw_inode->i_flags = cpu_to_le32(ei->i_flags); -Index: linux-2.6.18/fs/ext3/ioctl.c -=================================================================== ---- linux-2.6.18.orig/fs/ext3/ioctl.c -+++ linux-2.6.18/fs/ext3/ioctl.c -@@ -120,7 +120,7 @@ int ext3_ioctl (struct inode * inode, st - ei->i_flags = flags; - - ext3_set_inode_flags(inode); -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - - err = ext3_mark_iloc_dirty(handle, inode, &iloc); - flags_err: -@@ -161,7 +161,7 @@ flags_err: - return PTR_ERR(handle); - err = ext3_reserve_inode_write(handle, inode, &iloc); - if (err == 0) { -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - inode->i_generation = generation; - err = ext3_mark_iloc_dirty(handle, inode, &iloc); - } -Index: linux-2.6.18/fs/ext3/namei.c -=================================================================== ---- linux-2.6.18.orig/fs/ext3/namei.c -+++ linux-2.6.18/fs/ext3/namei.c -@@ -1287,7 +1287,7 @@ static int add_dirent_to_buf(handle_t *h - * happen is that the times are slightly out of date - * and/or different from the directory change time. - */ -- dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; -+ dir->i_mtime = dir->i_ctime = ext3_current_time(dir); - ext3_update_dx_flag(dir); - dir->i_version++; - ext3_mark_inode_dirty(handle, dir); -@@ -2079,7 +2079,7 @@ static int ext3_rmdir (struct inode * di - inode->i_version++; - inode->i_nlink = 0; - ext3_orphan_add(handle, inode); -- inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; -+ inode->i_ctime = dir->i_ctime = dir->i_mtime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - ext3_dec_count(handle, dir); - ext3_update_dx_flag(dir); -@@ -2129,13 +2129,13 @@ static int ext3_unlink(struct inode * di - retval = ext3_delete_entry(handle, dir, de, bh); - if (retval) - goto end_unlink; -- dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; -+ dir->i_ctime = dir->i_mtime = ext3_current_time(dir); - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); - ext3_dec_count(handle, inode); - if (!inode->i_nlink) - ext3_orphan_add(handle, inode); -- inode->i_ctime = dir->i_ctime; -+ inode->i_ctime = ext3_current_time(inode); - ext3_mark_inode_dirty(handle, inode); - retval = 0; - -@@ -2237,7 +2237,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - ext3_inc_count(handle, inode); - atomic_inc(&inode->i_count); - -@@ -2340,7 +2340,7 @@ static int ext3_rename (struct inode * o - * Like most other Unix systems, set the ctime for inodes on a - * rename. - */ -- old_inode->i_ctime = CURRENT_TIME_SEC; -+ old_inode->i_ctime = ext3_current_time(old_inode); - ext3_mark_inode_dirty(handle, old_inode); - - /* -@@ -2373,9 +2373,9 @@ static int ext3_rename (struct inode * o - - if (new_inode) { - ext3_dec_count(handle, new_inode); -- new_inode->i_ctime = CURRENT_TIME_SEC; -+ new_inode->i_ctime = ext3_current_time(new_inode); - } -- old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; -+ old_dir->i_ctime = old_dir->i_mtime = ext3_current_time(old_dir); - ext3_update_dx_flag(old_dir); - if (dir_bh) { - BUFFER_TRACE(dir_bh, "get_write_access"); -Index: linux-2.6.18/fs/ext3/super.c -=================================================================== ---- linux-2.6.18.orig/fs/ext3/super.c -+++ linux-2.6.18/fs/ext3/super.c -@@ -1615,6 +1615,8 @@ static int ext3_fill_super (struct super - sbi->s_inode_size); - goto failed_mount; - } -+ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) -+ sb->s_time_gran = 1 << (EXT3_EPOCH_BITS - 2); - } - sbi->s_frag_size = EXT3_MIN_FRAG_SIZE << - le32_to_cpu(es->s_log_frag_size); -@@ -1819,6 +1821,32 @@ static int ext3_fill_super (struct super - } - - ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY); -+ -+ /* determine the minimum size of new large inodes, if present */ -+ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) { -+ sbi->s_want_extra_isize = sizeof(struct ext3_inode) - -+ EXT3_GOOD_OLD_INODE_SIZE; -+ if (EXT3_HAS_RO_COMPAT_FEATURE(sb, -+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) { -+ if (sbi->s_want_extra_isize < -+ le16_to_cpu(es->s_want_extra_isize)) -+ sbi->s_want_extra_isize = -+ le16_to_cpu(es->s_want_extra_isize); -+ if (sbi->s_want_extra_isize < -+ le16_to_cpu(es->s_min_extra_isize)) -+ sbi->s_want_extra_isize = -+ le16_to_cpu(es->s_min_extra_isize); -+ } -+ } -+ /* Check if enough inode space is available */ -+ if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > -+ sbi->s_inode_size) { -+ sbi->s_want_extra_isize = sizeof(struct ext3_inode) - -+ EXT3_GOOD_OLD_INODE_SIZE; -+ printk(KERN_INFO "EXT3-fs: required extra inode space not" -+ "available.\n"); -+ } -+ - /* - * akpm: core read_super() calls in here with the superblock locked. - * That deadlocks, because orphan cleanup needs to lock the superblock -Index: linux-2.6.18/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.18.orig/fs/ext3/xattr.c -+++ linux-2.6.18/fs/ext3/xattr.c -@@ -1007,7 +1007,7 @@ ext3_xattr_set_handle(handle_t *handle, - } - if (!error) { - ext3_xattr_update_super_block(handle, inode->i_sb); -- inode->i_ctime = CURRENT_TIME_SEC; -+ inode->i_ctime = ext3_current_time(inode); - error = ext3_mark_iloc_dirty(handle, inode, &is.iloc); - /* - * The bh is consumed by ext3_mark_iloc_dirty, even with -Index: linux-2.6.18/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.18.orig/include/linux/ext3_fs.h -+++ linux-2.6.18/include/linux/ext3_fs.h -@@ -268,7 +268,7 @@ struct ext3_inode { - __le16 i_uid; /* Low 16 bits of Owner Uid */ - __le32 i_size; /* Size in bytes */ - __le32 i_atime; /* Access time */ -- __le32 i_ctime; /* Creation time */ -+ __le32 i_ctime; /* Inode Change time */ - __le32 i_mtime; /* Modification time */ - __le32 i_dtime; /* Deletion Time */ - __le16 i_gid; /* Low 16 bits of Group Id */ -@@ -317,10 +317,73 @@ struct ext3_inode { - } osd2; /* OS dependent 2 */ - __le16 i_extra_isize; - __le16 i_pad1; -+ __le32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */ -+ __le32 i_mtime_extra; /* extra Modification time(nsec << 2 | epoch) */ -+ __le32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */ -+ __le32 i_crtime; /* File Creation time */ -+ __le32 i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */ - }; - - #define i_size_high i_dir_acl - -+#define EXT3_EPOCH_BITS 2 -+#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1) -+#define EXT3_NSEC_MASK (~0UL << EXT3_EPOCH_BITS) -+ -+#define EXT3_FITS_IN_INODE(ext3_inode, einode, field) \ -+ ((offsetof(typeof(*ext3_inode), field) + \ -+ sizeof((ext3_inode)->field)) \ -+ <= (EXT3_GOOD_OLD_INODE_SIZE + \ -+ (einode)->i_extra_isize)) \ -+ -+static inline __le32 ext3_encode_extra_time(struct timespec *time) -+{ -+ return cpu_to_le32((sizeof(time->tv_sec) > 4 ? -+ time->tv_sec >> 32 : 0) | -+ ((time->tv_nsec << 2) & EXT3_NSEC_MASK)); -+} -+ -+static inline void ext3_decode_extra_time(struct timespec *time, __le32 extra) { -+ if (sizeof(time->tv_sec) > 4) -+ time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT3_EPOCH_MASK) -+ << 32; -+ time->tv_nsec = (le32_to_cpu(extra) & EXT3_NSEC_MASK) >> 2; -+} -+ -+#define EXT3_INODE_SET_XTIME(xtime, inode, raw_inode) \ -+do { \ -+ (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra)) \ -+ (raw_inode)->xtime ## _extra = \ -+ ext3_encode_extra_time(&(inode)->xtime); \ -+} while (0) -+ -+#define EXT3_EINODE_SET_XTIME(xtime, einode, raw_inode)\ -+do { \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime)) \ -+ (raw_inode)->xtime = cpu_to_le32((einode)->xtime.tv_sec); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \ -+ (raw_inode)->xtime ## _extra = \ -+ ext3_encode_extra_time(&(einode)->xtime); \ -+} while (0) -+ -+#define EXT3_INODE_GET_XTIME(xtime, inode, raw_inode) \ -+do { \ -+ (inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra)) \ -+ ext3_decode_extra_time(&(inode)->xtime, \ -+ raw_inode->xtime ## _extra); \ -+} while (0) -+ -+#define EXT3_EINODE_GET_XTIME(xtime, einode, raw_inode) \ -+do { \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime)) \ -+ (einode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \ -+ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \ -+ ext3_decode_extra_time(&(einode)->xtime, \ -+ raw_inode->xtime ## _extra); \ -+} while (0) -+ - #if defined(__KERNEL__) || defined(__linux__) - #define i_reserved1 osd1.linux1.l_i_reserved1 - #define i_frag osd2.linux2.l_i_frag -@@ -498,11 +562,19 @@ struct ext3_super_block { - __le32 s_last_orphan; /* start of list of inodes to delete */ - __le32 s_hash_seed[4]; /* HTREE hash seed */ - __u8 s_def_hash_version; /* Default hash version to use */ -- __u8 s_reserved_char_pad; -- __u16 s_reserved_word_pad; -+ __u8 s_jnl_backup_type; /* Default type of journal backup */ -+ __le16 s_desc_size; /* Group desc. size: INCOMPAT_64BIT */ - __le32 s_default_mount_opts; -- __le32 s_first_meta_bg; /* First metablock block group */ -- __u32 s_reserved[190]; /* Padding to the end of the block */ -+ __le32 s_first_meta_bg; /* First metablock block group */ -+ __le32 s_mkfs_time; /* When the filesystem was created */ -+ __le32 s_jnl_blocks[17]; /* Backup of the journal inode */ -+ __le32 s_blocks_count_hi; /* Blocks count high 32 bits */ -+ __le32 s_r_blocks_count_hi; /* Reserved blocks count high 32 bits*/ -+ __le32 s_free_blocks_count_hi; /* Free blocks count high 32 bits */ -+ __le16 s_min_extra_isize; /* All inodes have at least # bytes */ -+ __le16 s_want_extra_isize; /* New inodes should reserve # bytes */ -+ __le32 s_flags; /* Miscellaneous flags */ -+ __u32 s_reserved[167]; /* Padding to the end of the block */ - }; - - #ifdef __KERNEL__ -@@ -519,6 +584,13 @@ static inline struct ext3_inode_info *EX - return container_of(inode, struct ext3_inode_info, vfs_inode); - } - -+static inline struct timespec ext3_current_time(struct inode *inode) -+{ -+ return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ? -+ current_fs_time(inode->i_sb) : CURRENT_TIME_SEC; -+} -+ -+ - static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino) - { - return ino == EXT3_ROOT_INO || -@@ -590,6 +662,8 @@ static inline int ext3_valid_inum(struct - #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 - #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 - #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 -+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 -+ - - #define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001 - #define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002 -@@ -606,6 +680,7 @@ static inline int ext3_valid_inum(struct - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \ -+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) - - /* -Index: linux-2.6.18/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.18.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.18/include/linux/ext3_fs_sb.h -@@ -119,6 +119,8 @@ struct ext3_sb_info { - spinlock_t s_bal_lock; - unsigned long s_mb_buddies_generated; - unsigned long long s_mb_generation_time; -+ -+ unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */ - }; - - #define EXT3_GROUP_INFO(sb, group) \ -Index: linux-2.6.18/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.18.orig/include/linux/ext3_fs_i.h -+++ linux-2.6.18/include/linux/ext3_fs_i.h -@@ -144,6 +144,7 @@ struct ext3_inode_info { - struct inode vfs_inode; - - __u32 i_cached_extent[4]; -+ struct timespec i_crtime; - - void *i_filterdata; - }; diff --git a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch deleted file mode 100644 index 5054b0c60b..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch +++ /dev/null @@ -1,156 +0,0 @@ -Index: linux-2.6.5-7.283/fs/ext3/namei.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/ext3/namei.c -+++ linux-2.6.5-7.283/fs/ext3/namei.c -@@ -1613,11 +1613,17 @@ static int ext3_delete_entry (handle_t * - static inline void ext3_inc_count(handle_t *handle, struct inode *inode) - { - inode->i_nlink++; -+ if (is_dx(inode) && inode->i_nlink > 1) { -+ /* limit is 16-bit i_links_count */ -+ if (inode->i_nlink >= EXT3_LINK_MAX || inode->i_nlink == 2) -+ inode->i_nlink = 1; -+ } - } - - static inline void ext3_dec_count(handle_t *handle, struct inode *inode) - { -- inode->i_nlink--; -+ if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2) -+ inode->i_nlink--; - } - - static int ext3_add_nondir(handle_t *handle, -@@ -1730,7 +1736,7 @@ static int ext3_mkdir(struct inode * dir - int retries = 0; - int err; - -- if (dir->i_nlink >= EXT3_LINK_MAX) -+ if (EXT3_DIR_LINK_MAX(dir)) - return -EMLINK; - - retry: -@@ -1752,7 +1758,7 @@ retry: - inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; - dir_block = ext3_bread (handle, inode, 0, 1, &err); - if (!dir_block) { -- inode->i_nlink--; /* is this nlink == 0? */ -+ ext3_dec_count(handle, inode); /* is this nlink == 0? */ - ext3_mark_inode_dirty(handle, inode); - iput (inode); - goto out_stop; -@@ -1784,7 +1790,7 @@ retry: - iput (inode); - goto out_stop; - } -- dir->i_nlink++; -+ ext3_inc_count(handle, dir); - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); - d_instantiate(dentry, inode); -@@ -2042,16 +2048,16 @@ static int ext3_rmdir (struct inode * di - retval = ext3_delete_entry(handle, dir, de, bh); - if (retval) - goto end_rmdir; -- if (inode->i_nlink != 2) -- ext3_warning (inode->i_sb, "ext3_rmdir", -- "empty directory has nlink!=2 (%d)", -- inode->i_nlink); -+ if (!EXT3_DIR_LINK_EMPTY(inode)) -+ ext3_warning(inode->i_sb, "ext3_rmdir", -+ "empty directory has too many links (%d)", -+ inode->i_nlink); - inode->i_version++; - inode->i_nlink = 0; - ext3_orphan_add(handle, inode); - inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; - ext3_mark_inode_dirty(handle, inode); -- dir->i_nlink--; -+ ext3_dec_count(handle, dir); - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); - -@@ -2100,7 +2106,7 @@ static int ext3_unlink(struct inode * di - dir->i_ctime = dir->i_mtime = CURRENT_TIME; - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); -- inode->i_nlink--; -+ ext3_dec_count(handle, inode); - if (!inode->i_nlink) - ext3_orphan_add(handle, inode); - inode->i_ctime = dir->i_ctime; -@@ -2191,7 +2197,7 @@ static int ext3_link (struct dentry * ol - struct inode *inode = old_dentry->d_inode; - int err, retries = 0; - -- if (inode->i_nlink >= EXT3_LINK_MAX) -+ if (EXT3_DIR_LINK_MAX(inode)) - return -EMLINK; - - retry: -@@ -2277,8 +2283,8 @@ static int ext3_rename (struct inode * o - if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino) - goto end_rename; - retval = -EMLINK; -- if (!new_inode && new_dir!=old_dir && -- new_dir->i_nlink >= EXT3_LINK_MAX) -+ if (!new_inode && new_dir != old_dir && -+ EXT3_DIR_LINK_MAX(new_dir)) - goto end_rename; - } - if (!new_bh) { -@@ -2335,7 +2341,7 @@ static int ext3_rename (struct inode * o - } - - if (new_inode) { -- new_inode->i_nlink--; -+ ext3_dec_count(handle, new_inode); - new_inode->i_ctime = CURRENT_TIME; - } - old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; -@@ -2346,11 +2352,13 @@ static int ext3_rename (struct inode * o - PARENT_INO(dir_bh->b_data) = le32_to_cpu(new_dir->i_ino); - BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata"); - ext3_journal_dirty_metadata(handle, dir_bh); -- old_dir->i_nlink--; -+ ext3_dec_count(handle, old_dir); - if (new_inode) { -- new_inode->i_nlink--; -+ /* checked empty_dir above, can't have another parent, -+ * ext3_dec_count() won't work for many-linked dirs */ -+ new_inode->i_nlink = 0; - } else { -- new_dir->i_nlink++; -+ ext3_inc_count(handle, new_dir); - ext3_update_dx_flag(new_dir); - ext3_mark_inode_dirty(handle, new_dir); - } -Index: linux-2.6.5-7.283/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/ext3_fs.h -+++ linux-2.6.5-7.283/include/linux/ext3_fs.h -@@ -86,7 +86,7 @@ struct statfs; - /* - * Maximal count of links to a file - */ --#define EXT3_LINK_MAX 32000 -+#define EXT3_LINK_MAX 65000 - - /* - * Macro-instructions used to manage several block sizes -@@ -538,6 +538,7 @@ static inline struct ext3_inode_info *EX - #define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 - #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 - #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 -+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 - - #define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001 - #define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002 -@@ -553,6 +554,7 @@ static inline struct ext3_inode_info *EX - EXT3_FEATURE_INCOMPAT_EXTENTS) - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ -+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) - - /* diff --git a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch deleted file mode 100644 index d572c8fe13..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch +++ /dev/null @@ -1,158 +0,0 @@ -Index: linux-2.6.12/fs/ext3/namei.c -=================================================================== ---- linux-2.6.12.orig/fs/ext3/namei.c -+++ linux-2.6.12/fs/ext3/namei.c -@@ -1600,11 +1600,17 @@ static int ext3_delete_entry (handle_t * - static inline void ext3_inc_count(handle_t *handle, struct inode *inode) - { - inode->i_nlink++; -+ if (is_dx(inode) && inode->i_nlink > 1) { -+ /* limit is 16-bit i_links_count */ -+ if (inode->i_nlink >= EXT3_LINK_MAX || inode->i_nlink == 2) -+ inode->i_nlink = 1; -+ } - } - - static inline void ext3_dec_count(handle_t *handle, struct inode *inode) - { -- inode->i_nlink--; -+ if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2) -+ inode->i_nlink--; - } - - static int ext3_add_nondir(handle_t *handle, -@@ -1703,7 +1709,7 @@ static int ext3_mkdir(struct inode * dir - struct ext3_dir_entry_2 * de; - int err, retries = 0; - -- if (dir->i_nlink >= EXT3_LINK_MAX) -+ if (EXT3_DIR_LINK_MAX(dir)) - return -EMLINK; - - retry: -@@ -1726,7 +1732,7 @@ retry: - inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; - dir_block = ext3_bread (handle, inode, 0, 1, &err); - if (!dir_block) { -- inode->i_nlink--; /* is this nlink == 0? */ -+ ext3_dec_count(handle, inode); /* is this nlink == 0? */ - ext3_mark_inode_dirty(handle, inode); - iput (inode); - goto out_stop; -@@ -1758,7 +1764,7 @@ retry: - iput (inode); - goto out_stop; - } -- dir->i_nlink++; -+ ext3_inc_count(handle, dir); - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); - d_instantiate(dentry, inode); -@@ -2023,10 +2029,10 @@ static int ext3_rmdir (struct inode * di - retval = ext3_delete_entry(handle, dir, de, bh); - if (retval) - goto end_rmdir; -- if (inode->i_nlink != 2) -- ext3_warning (inode->i_sb, "ext3_rmdir", -- "empty directory has nlink!=2 (%d)", -- inode->i_nlink); -+ if (!EXT3_DIR_LINK_EMPTY(inode)) -+ ext3_warning(inode->i_sb, "ext3_rmdir", -+ "empty directory has too many links (%d)", -+ inode->i_nlink); - inode->i_version++; - inode->i_nlink = 0; - /* There's no need to set i_disksize: the fact that i_nlink is -@@ -2036,7 +2042,7 @@ static int ext3_rmdir (struct inode * di - ext3_orphan_add(handle, inode); - inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; - ext3_mark_inode_dirty(handle, inode); -- dir->i_nlink--; -+ ext3_dec_count(handle, dir); - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); - -@@ -2087,7 +2093,7 @@ static int ext3_unlink(struct inode * di - dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); -- inode->i_nlink--; -+ ext3_dec_count(handle, inode); - if (!inode->i_nlink) - ext3_orphan_add(handle, inode); - inode->i_ctime = dir->i_ctime; -@@ -2162,7 +2168,7 @@ static int ext3_link (struct dentry * ol - struct inode *inode = old_dentry->d_inode; - int err, retries = 0; - -- if (inode->i_nlink >= EXT3_LINK_MAX) -+ if (EXT3_DIR_LINK_MAX(inode)) - return -EMLINK; - - retry: -@@ -2249,8 +2255,8 @@ static int ext3_rename (struct inode * o - if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino) - goto end_rename; - retval = -EMLINK; -- if (!new_inode && new_dir!=old_dir && -- new_dir->i_nlink >= EXT3_LINK_MAX) -+ if (!new_inode && new_dir != old_dir && -+ EXT3_DIR_LINK_MAX(new_dir)) - goto end_rename; - } - if (!new_bh) { -@@ -2307,7 +2313,7 @@ static int ext3_rename (struct inode * o - } - - if (new_inode) { -- new_inode->i_nlink--; -+ ext3_dec_count(handle, new_inode); - new_inode->i_ctime = CURRENT_TIME_SEC; - } - old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; -@@ -2318,11 +2324,13 @@ static int ext3_rename (struct inode * o - PARENT_INO(dir_bh->b_data) = cpu_to_le32(new_dir->i_ino); - BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata"); - ext3_journal_dirty_metadata(handle, dir_bh); -- old_dir->i_nlink--; -+ ext3_dec_count(handle, old_dir); - if (new_inode) { -- new_inode->i_nlink--; -+ /* checked empty_dir above, can't have another parent, -+ * ext3_dec_count() won't work for many-linked dirs */ -+ new_inode->i_nlink = 0; - } else { -- new_dir->i_nlink++; -+ ext3_inc_count(handle, new_dir); - ext3_update_dx_flag(new_dir); - ext3_mark_inode_dirty(handle, new_dir); - } -Index: linux-2.6.12/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.12.orig/include/linux/ext3_fs.h -+++ linux-2.6.12/include/linux/ext3_fs.h -@@ -78,7 +78,7 @@ struct statfs; - /* - * Maximal count of links to a file - */ --#define EXT3_LINK_MAX 32000 -+#define EXT3_LINK_MAX 65000 - - /* - * Macro-instructions used to manage several block sizes -@@ -539,6 +539,7 @@ static inline struct ext3_inode_info *EX - #define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 - #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 - #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 -+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 - - #define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001 - #define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002 -@@ -552,6 +553,7 @@ static inline struct ext3_inode_info *EX - EXT3_FEATURE_INCOMPAT_META_BG) - #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ -+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \ - EXT3_FEATURE_RO_COMPAT_BTREE_DIR) - - /* diff --git a/ldiskfs/kernel_patches/patches/ext3-remove-cond_resched-calls-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-remove-cond_resched-calls-2.6.12.patch deleted file mode 100644 index 57898d572f..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-remove-cond_resched-calls-2.6.12.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: linux-stage/fs/ext3/ialloc.c -=================================================================== ---- linux-stage.orig/fs/ext3/ialloc.c 2005-06-26 10:59:43.048185981 +0200 -+++ linux-stage/fs/ext3/ialloc.c 2005-06-26 11:01:21.317716027 +0200 -@@ -775,7 +775,6 @@ - if (!gdp) - continue; - desc_count += le16_to_cpu(gdp->bg_free_inodes_count); -- cond_resched(); - } - return desc_count; - #endif -Index: linux-stage/fs/ext3/super.c -=================================================================== ---- linux-stage.orig/fs/ext3/super.c 2005-06-26 10:59:43.205412542 +0200 -+++ linux-stage/fs/ext3/super.c 2005-06-26 11:02:29.599941754 +0200 -@@ -2236,11 +2232,9 @@ - * block group descriptors. If the sparse superblocks - * feature is turned on, then not all groups have this. - */ -- for (i = 0; i < ngroups; i++) { -+ for (i = 0; i < ngroups; i++) - overhead += ext3_bg_has_super(sb, i) + - ext3_bg_num_gdb(sb, i); -- cond_resched(); -- } - - /* - * Every block group has an inode bitmap, a block diff --git a/ldiskfs/kernel_patches/patches/ext3-rename-reserve-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-rename-reserve-2.6-suse.patch deleted file mode 100644 index f323584f6f..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-rename-reserve-2.6-suse.patch +++ /dev/null @@ -1,263 +0,0 @@ -Index: linux-2.6.5-sles9/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.5-sles9.orig/include/linux/ext3_fs.h 2004-11-09 02:29:14.878513832 +0300 -+++ linux-2.6.5-sles9/include/linux/ext3_fs.h 2004-11-09 02:32:14.151260232 +0300 -@@ -709,7 +709,7 @@ - unsigned int block_group, - struct buffer_head ** bh); - extern int ext3_should_retry_alloc(struct super_block *sb, int *retries); --extern void rsv_window_add(struct super_block *sb, struct reserve_window_node *rsv); -+extern void rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv); - - /* dir.c */ - extern int ext3_check_dir_entry(const char *, struct inode *, -Index: linux-2.6.5-sles9/include/linux/ext3_fs_sb.h -=================================================================== ---- linux-2.6.5-sles9.orig/include/linux/ext3_fs_sb.h 2004-11-09 02:28:18.753046200 +0300 -+++ linux-2.6.5-sles9/include/linux/ext3_fs_sb.h 2004-11-09 02:32:27.996155488 +0300 -@@ -86,7 +86,7 @@ - /* root of the per fs reservation window tree */ - spinlock_t s_rsv_window_lock; - struct rb_root s_rsv_window_root; -- struct reserve_window_node s_rsv_window_head; -+ struct ext3_reserve_window_node s_rsv_window_head; - - /* Journaling */ - struct inode * s_journal_inode; -Index: linux-2.6.5-sles9/include/linux/ext3_fs_i.h -=================================================================== ---- linux-2.6.5-sles9.orig/include/linux/ext3_fs_i.h 2004-11-09 02:23:21.606219384 +0300 -+++ linux-2.6.5-sles9/include/linux/ext3_fs_i.h 2004-11-09 02:32:08.752081032 +0300 -@@ -20,17 +20,17 @@ - #include <linux/rbtree.h> - #include <linux/seqlock.h> - --struct reserve_window { -+struct ext3_reserve_window { - __u32 _rsv_start; /* First byte reserved */ - __u32 _rsv_end; /* Last byte reserved or 0 */ - }; - --struct reserve_window_node { -+struct ext3_reserve_window_node { - struct rb_node rsv_node; - atomic_t rsv_goal_size; - atomic_t rsv_alloc_hit; - seqlock_t rsv_seqlock; -- struct reserve_window rsv_window; -+ struct ext3_reserve_window rsv_window; - }; - - #define rsv_start rsv_window._rsv_start -@@ -76,7 +76,7 @@ - */ - __u32 i_next_alloc_goal; - /* block reservation window */ -- struct reserve_window_node i_rsv_window; -+ struct ext3_reserve_window_node i_rsv_window; - - __u32 i_dir_start_lookup; - #ifdef CONFIG_EXT3_FS_XATTR -Index: linux-2.6.5-sles9/fs/ext3/balloc.c -=================================================================== ---- linux-2.6.5-sles9.orig/fs/ext3/balloc.c 2004-11-09 02:26:53.078070776 +0300 -+++ linux-2.6.5-sles9/fs/ext3/balloc.c 2004-11-09 02:32:43.108858008 +0300 -@@ -115,7 +115,7 @@ - const char *fn) - { - struct rb_node *n; -- struct reserve_window_node *rsv, *prev; -+ struct ext3_reserve_window_node *rsv, *prev; - int bad; - - restart: -@@ -125,7 +125,7 @@ - - printk("Block Allocation Reservation Windows Map (%s):\n", fn); - while (n) { -- rsv = list_entry(n, struct reserve_window_node, rsv_node); -+ rsv = list_entry(n, struct ext3_reserve_window_node, rsv_node); - if (verbose) - printk("reservation window 0x%p " - "start: %d, end: %d\n", -@@ -161,7 +161,7 @@ - #endif - - static int --goal_in_my_reservation(struct reserve_window *rsv, int goal, -+goal_in_my_reservation(struct ext3_reserve_window *rsv, int goal, - unsigned int group, struct super_block * sb) - { - unsigned long group_first_block, group_last_block; -@@ -184,18 +184,18 @@ - * if the goal is not in any window. - * Returns NULL if there are no windows or if all windows start after the goal. - */ --static struct reserve_window_node *search_reserve_window(struct rb_root *root, -+static struct ext3_reserve_window_node *search_ext3_reserve_window(struct rb_root *root, - unsigned long goal) - { - struct rb_node *n = root->rb_node; -- struct reserve_window_node *rsv; -+ struct ext3_reserve_window_node *rsv; - - if (!n) - return NULL; - - while (n) - { -- rsv = rb_entry(n, struct reserve_window_node, rsv_node); -+ rsv = rb_entry(n, struct ext3_reserve_window_node, rsv_node); - - if (goal < rsv->rsv_start) - n = n->rb_left; -@@ -212,13 +212,13 @@ - */ - if (rsv->rsv_start > goal) { - n = rb_prev(&rsv->rsv_node); -- rsv = rb_entry(n, struct reserve_window_node, rsv_node); -+ rsv = rb_entry(n, struct ext3_reserve_window_node, rsv_node); - } - return rsv; - } - - void rsv_window_add(struct super_block *sb, -- struct reserve_window_node *rsv) -+ struct ext3_reserve_window_node *rsv) - { - struct rb_root *root = &EXT3_SB(sb)->s_rsv_window_root; - struct rb_node *node = &rsv->rsv_node; -@@ -226,12 +226,12 @@ - - struct rb_node ** p = &root->rb_node; - struct rb_node * parent = NULL; -- struct reserve_window_node *this; -+ struct ext3_reserve_window_node *this; - - while (*p) - { - parent = *p; -- this = rb_entry(parent, struct reserve_window_node, rsv_node); -+ this = rb_entry(parent, struct ext3_reserve_window_node, rsv_node); - - if (start < this->rsv_start) - p = &(*p)->rb_left; -@@ -246,7 +246,7 @@ - } - - static void rsv_window_remove(struct super_block *sb, -- struct reserve_window_node *rsv) -+ struct ext3_reserve_window_node *rsv) - { - rsv->rsv_start = EXT3_RESERVE_WINDOW_NOT_ALLOCATED; - rsv->rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED; -@@ -254,7 +254,7 @@ - rb_erase(&rsv->rsv_node, &EXT3_SB(sb)->s_rsv_window_root); - } - --static inline int rsv_is_empty(struct reserve_window *rsv) -+static inline int rsv_is_empty(struct ext3_reserve_window *rsv) - { - /* a valid reservation end block could not be 0 */ - return (rsv->_rsv_end == EXT3_RESERVE_WINDOW_NOT_ALLOCATED); -@@ -263,7 +263,7 @@ - void ext3_discard_reservation(struct inode *inode) - { - struct ext3_inode_info *ei = EXT3_I(inode); -- struct reserve_window_node *rsv = &ei->i_rsv_window; -+ struct ext3_reserve_window_node *rsv = &ei->i_rsv_window; - spinlock_t *rsv_lock = &EXT3_SB(inode->i_sb)->s_rsv_window_lock; - - if (!rsv_is_empty(&rsv->rsv_window)) { -@@ -600,7 +600,7 @@ - */ - static int - ext3_try_to_allocate(struct super_block *sb, handle_t *handle, int group, -- struct buffer_head *bitmap_bh, int goal, struct reserve_window *my_rsv) -+ struct buffer_head *bitmap_bh, int goal, struct ext3_reserve_window *my_rsv) - { - int group_first_block, start, end; - -@@ -700,13 +700,13 @@ - * on succeed, it returns the reservation window to be appended to. - * failed, return NULL. - */ --static struct reserve_window_node *find_next_reservable_window( -- struct reserve_window_node *search_head, -+static struct ext3_reserve_window_node *find_next_reservable_window( -+ struct ext3_reserve_window_node *search_head, - unsigned long size, int *start_block, - int last_block) - { - struct rb_node *next; -- struct reserve_window_node *rsv, *prev; -+ struct ext3_reserve_window_node *rsv, *prev; - int cur; - - /* TODO: make the start of the reservation window byte-aligned */ -@@ -734,7 +734,7 @@ - - prev = rsv; - next = rb_next(&rsv->rsv_node); -- rsv = list_entry(next, struct reserve_window_node, rsv_node); -+ rsv = list_entry(next, struct ext3_reserve_window_node, rsv_node); - - /* - * Reached the last reservation, we can just append to the -@@ -801,15 +801,15 @@ - * @group: the group we are trying to allocate in - * @bitmap_bh: the block group block bitmap - */ --static int alloc_new_reservation(struct reserve_window_node *my_rsv, -+static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv, - int goal, struct super_block *sb, - unsigned int group, struct buffer_head *bitmap_bh) - { -- struct reserve_window_node *search_head; -+ struct ext3_reserve_window_node *search_head; - int group_first_block, group_end_block, start_block; - int first_free_block; - int reservable_space_start; -- struct reserve_window_node *prev_rsv; -+ struct ext3_reserve_window_node *prev_rsv; - struct rb_root *fs_rsv_root = &EXT3_SB(sb)->s_rsv_window_root; - unsigned long size; - -@@ -859,7 +859,7 @@ - /* - * shift the search start to the window near the goal block - */ -- search_head = search_reserve_window(fs_rsv_root, start_block); -+ search_head = search_ext3_reserve_window(fs_rsv_root, start_block); - - /* - * find_next_reservable_window() simply finds a reservable window -@@ -968,7 +968,7 @@ - static int - ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, - unsigned int group, struct buffer_head *bitmap_bh, -- int goal, struct reserve_window_node * my_rsv, -+ int goal, struct ext3_reserve_window_node * my_rsv, - int *errp) - { - spinlock_t *rsv_lock; -@@ -1027,7 +1027,7 @@ - * then we could go to allocate from the reservation window directly. - */ - while (1) { -- struct reserve_window rsv_copy; -+ struct ext3_reserve_window rsv_copy; - unsigned int seq; - - do { -@@ -1159,8 +1159,8 @@ - struct ext3_group_desc *gdp; - struct ext3_super_block *es; - struct ext3_sb_info *sbi; -- struct reserve_window_node *my_rsv = NULL; -- struct reserve_window_node *rsv = &EXT3_I(inode)->i_rsv_window; -+ struct ext3_reserve_window_node *my_rsv = NULL; -+ struct ext3_reserve_window_node *rsv = &EXT3_I(inode)->i_rsv_window; - unsigned short windowsz = 0; - #ifdef EXT3FS_DEBUG - static int goal_hits, goal_attempts; diff --git a/ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch deleted file mode 100644 index afda0bd8c5..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch +++ /dev/null @@ -1,106 +0,0 @@ - fs/ext3/inode.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - fs/ext3/super.c | 4 ++ - 2 files changed, 85 insertions(+) - ---- linux-2.5.73/fs/ext3/inode.c~ext3-san-jdike-2.5.73 2003-06-22 12:32:58.000000000 -0600 -+++ linux-2.5.73-braam/fs/ext3/inode.c 2003-06-30 12:19:21.000000000 -0600 -@@ -2945,3 +2945,84 @@ int ext3_change_inode_journal_flag(struc - - return err; - } -+ -+/* for each block: 1 ind + 1 dind + 1 tind -+ * for each block: 3 bitmap blocks -+ * for each block: 3 group descriptor blocks -+ * i inode block -+ * 1 superblock -+ * 2 * EXT3_SINGLEDATA_TRANS_BLOCKS for the quote files -+ * ((1+1+1) * 3 * nblocks) + 1 + 1 + 2 * EXT3_SINGLEDATA_TRANS_BLOCKS -+ * -+ * XXX assuming: -+ * (1) fs logic block size == page size -+ * (2) ext3 in writeback mode -+ */ -+static inline int ext3_san_write_trans_blocks(int nblocks) -+{ -+ int ret; -+ -+ ret = (1 + 1 + 1) * 3 * nblocks + 1 + 1; -+ -+#ifdef CONFIG_QUOTA -+ ret += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ -+ return ret; -+} -+ -+/* Alloc blocks for an inode, while don't create any buffer/page -+ * for data I/O; set the inode size if file is extended. -+ * -+ * @inode: target inode -+ * @blocks: array of logic block number -+ * @nblocks: how many blocks need be alloced -+ * @newsize: new filesize we should set -+ * -+ * return: 0 success, otherwise failed -+ * (*blocks) contains physical block number alloced -+ * -+ * XXX this assume the fs block size == page size -+ */ -+int ext3_prep_san_write(struct inode *inode, long *blocks, -+ int nblocks, loff_t newsize) -+{ -+ handle_t *handle; -+ struct buffer_head bh_tmp; -+ int needed_blocks; -+ int i, ret = 0, ret2; -+ -+ needed_blocks = ext3_san_write_trans_blocks(nblocks); -+ -+ lock_kernel(); -+ handle = ext3_journal_start(inode, needed_blocks); -+ if (IS_ERR(handle)) { -+ unlock_kernel(); -+ return PTR_ERR(handle); -+ } -+ unlock_kernel(); -+ -+ /* alloc blocks one by one */ -+ for (i = 0; i < nblocks; i++) { -+ ret = ext3_get_block_handle(handle, inode, blocks[i], -+ &bh_tmp, 1, 1); -+ if (ret) -+ break; -+ -+ blocks[i] = bh_tmp.b_blocknr; -+ } -+ -+ /* set inode size if needed */ -+ if (!ret && (newsize > inode->i_size)) { -+ inode->i_size = newsize; -+ ext3_mark_inode_dirty(handle, inode); -+ } -+ -+ lock_kernel(); -+ ret2 = ext3_journal_stop(handle); -+ unlock_kernel(); -+ -+ if (!ret) -+ ret = ret2; -+ return ret; -+} ---- linux-2.5.73/fs/ext3/super.c~ext3-san-jdike-2.5.73 2003-06-22 12:33:16.000000000 -0600 -+++ linux-2.5.73-braam/fs/ext3/super.c 2003-06-30 12:16:36.000000000 -0600 -@@ -2080,6 +2080,10 @@ static void __exit exit_ext3_fs(void) - exit_ext3_xattr(); - } - -+int ext3_prep_san_write(struct inode *inode, long *blocks, -+ int nblocks, loff_t newsize); -+EXPORT_SYMBOL(ext3_prep_san_write); -+ - MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); - MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); - MODULE_LICENSE("GPL"); - -_ diff --git a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.12.patch deleted file mode 100644 index ef0f4a41bd..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.12.patch +++ /dev/null @@ -1,64 +0,0 @@ -Subject: Avoid disk sector_t overflow for >2TB ext3 filesystem -From: Mingming Cao <cmm@us.ibm.com> - - -If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e. -CONFIG_LBD not defined in the kernel), the calculation of the disk sector -will overflow. Add check at ext3_fill_super() and ext3_group_extend() to -prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4 -bytes. - -Verified this patch on a 32 bit platform without CONFIG_LBD defined -(sector_t is 32 bits long), mount refuse to mount a 10TB ext3. - -Signed-off-by: Mingming Cao<cmm@us.ibm.com> -Acked-by: Andreas Dilger <adilger@clusterfs.com> -Signed-off-by: Andrew Morton <akpm@osdl.org> ---- - - fs/ext3/resize.c | 10 ++++++++++ - fs/ext3/super.c | 10 ++++++++++ - 2 files changed, 20 insertions(+) - -diff -puN fs/ext3/resize.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/resize.c ---- devel/fs/ext3/resize.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem 2006-05-22 14:09:53.000000000 -0700 -+++ devel-akpm/fs/ext3/resize.c 2006-05-22 14:10:56.000000000 -0700 -@@ -926,6 +926,16 @@ int ext3_group_extend(struct super_block - if (n_blocks_count == 0 || n_blocks_count == o_blocks_count) - return 0; - -+ if (n_blocks_count > (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { -+ printk(KERN_ERR "EXT3-fs: filesystem on %s: " -+ "too large to resize to %lu blocks safely\n", -+ sb->s_id, n_blocks_count); -+ if (sizeof(sector_t) < 8) -+ ext3_warning(sb, __FUNCTION__, -+ "CONFIG_LBD not enabled\n"); -+ return -EINVAL; -+ } -+ - if (n_blocks_count < o_blocks_count) { - ext3_warning(sb, __FUNCTION__, - "can't shrink FS - resize aborted"); -diff -puN fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/super.c ---- devel/fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem 2006-05-22 14:09:53.000000000 -0700 -+++ devel-akpm/fs/ext3/super.c 2006-05-22 14:11:10.000000000 -0700 -@@ -1565,6 +1565,17 @@ static int ext3_fill_super (struct super - goto failed_mount; - } - -+ if (le32_to_cpu(es->s_blocks_count) > -+ (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { -+ printk(KERN_ERR "EXT3-fs: filesystem on %s: " -+ "too large to mount safely - %u blocks\n", sb->s_id, -+ le32_to_cpu(es->s_blocks_count)); -+ if (sizeof(sector_t) < 8) -+ printk(KERN_WARNING -+ "EXT3-fs: CONFIG_LBD not enabled\n"); -+ goto failed_mount; -+ } -+ - if (EXT3_BLOCKS_PER_GROUP(sb) == 0) - goto cantfind_ext3; - sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) - -_ diff --git a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.5-suse.patch b/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.5-suse.patch deleted file mode 100644 index fe655da1eb..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.5-suse.patch +++ /dev/null @@ -1,44 +0,0 @@ -Subject: Avoid disk sector_t overflow for >2TB ext3 filesystem -From: Mingming Cao <cmm@us.ibm.com> - - -If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e. -CONFIG_LBD not defined in the kernel), the calculation of the disk sector -will overflow. Add check at ext3_fill_super() and ext3_group_extend() to -prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4 -bytes. - -Verified this patch on a 32 bit platform without CONFIG_LBD defined -(sector_t is 32 bits long), mount refuse to mount a 10TB ext3. - -Signed-off-by: Mingming Cao<cmm@us.ibm.com> -Acked-by: Andreas Dilger <adilger@clusterfs.com> -Signed-off-by: Andrew Morton <akpm@osdl.org> ---- - - fs/ext3/resize.c | 10 ++++++++++ - fs/ext3/super.c | 10 ++++++++++ - 2 files changed, 20 insertions(+) - -diff -puN fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/super.c ---- devel/fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem 2006-05-22 14:09:53.000000000 -0700 -+++ devel-akpm/fs/ext3/super.c 2006-05-22 14:11:10.000000000 -0700 -@@ -1565,6 +1565,17 @@ static int ext3_fill_super (struct super - goto failed_mount; - } - -+ if (le32_to_cpu(es->s_blocks_count) > -+ (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { -+ printk(KERN_ERR "EXT3-fs: filesystem on %s: " -+ "too large to mount safely - %u blocks\n", sb->s_id, -+ le32_to_cpu(es->s_blocks_count)); -+ if (sizeof(sector_t) < 8) -+ printk(KERN_WARNING -+ "EXT3-fs: CONFIG_LBD not enabled\n"); -+ goto failed_mount; -+ } -+ - sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) - - le32_to_cpu(es->s_first_data_block) + - EXT3_BLOCKS_PER_GROUP(sb) - 1) / -_ diff --git a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.9-rhel4.patch deleted file mode 100644 index 9bfdf801b3..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.9-rhel4.patch +++ /dev/null @@ -1,64 +0,0 @@ -Subject: Avoid disk sector_t overflow for >2TB ext3 filesystem -From: Mingming Cao <cmm@us.ibm.com> - - -If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e. -CONFIG_LBD not defined in the kernel), the calculation of the disk sector -will overflow. Add check at ext3_fill_super() and ext3_group_extend() to -prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4 -bytes. - -Verified this patch on a 32 bit platform without CONFIG_LBD defined -(sector_t is 32 bits long), mount refuse to mount a 10TB ext3. - -Signed-off-by: Mingming Cao<cmm@us.ibm.com> -Acked-by: Andreas Dilger <adilger@clusterfs.com> -Signed-off-by: Andrew Morton <akpm@osdl.org> ---- - - fs/ext3/resize.c | 10 ++++++++++ - fs/ext3/super.c | 10 ++++++++++ - 2 files changed, 20 insertions(+) - -diff -puN fs/ext3/resize.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/resize.c ---- devel/fs/ext3/resize.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem 2006-05-22 14:09:53.000000000 -0700 -+++ devel-akpm/fs/ext3/resize.c 2006-05-22 14:10:56.000000000 -0700 -@@ -926,6 +926,16 @@ int ext3_group_extend(struct super_block - if (n_blocks_count == 0 || n_blocks_count == o_blocks_count) - return 0; - -+ if (n_blocks_count > (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { -+ printk(KERN_ERR "EXT3-fs: filesystem on %s: " -+ "too large to resize to %lu blocks safely\n", -+ sb->s_id, n_blocks_count); -+ if (sizeof(sector_t) < 8) -+ ext3_warning(sb, __FUNCTION__, -+ "CONFIG_LBD not enabled\n"); -+ return -EINVAL; -+ } -+ - if (n_blocks_count < o_blocks_count) { - ext3_warning(sb, __FUNCTION__, - "can't shrink FS - resize aborted"); -diff -puN fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/super.c ---- devel/fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem 2006-05-22 14:09:53.000000000 -0700 -+++ devel-akpm/fs/ext3/super.c 2006-05-22 14:11:10.000000000 -0700 -@@ -1565,6 +1565,17 @@ static int ext3_fill_super (struct super - goto failed_mount; - } - -+ if (le32_to_cpu(es->s_blocks_count) > -+ (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { -+ printk(KERN_ERR "EXT3-fs: filesystem on %s: " -+ "too large to mount safely - %u blocks\n", sb->s_id, -+ le32_to_cpu(es->s_blocks_count)); -+ if (sizeof(sector_t) < 8) -+ printk(KERN_WARNING -+ "EXT3-fs: CONFIG_LBD not enabled\n"); -+ goto failed_mount; -+ } -+ - sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) - - le32_to_cpu(es->s_first_data_block) + - EXT3_BLOCKS_PER_GROUP(sb) - 1) / -_ diff --git a/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-rhel4.patch deleted file mode 100644 index f71e470005..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-rhel4.patch +++ /dev/null @@ -1,193 +0,0 @@ -diff -urp RH_2_6_9_42_0_3.orig/fs/ext3/ialloc.c RH_2_6_9_42_0_3/fs/ext3/ialloc.c ---- RH_2_6_9_42_0_3.orig/fs/ext3/ialloc.c 2006-10-23 13:32:46.000000000 +0300 -+++ RH_2_6_9_42_0_3/fs/ext3/ialloc.c 2007-02-16 07:22:28.000000000 +0200 -@@ -419,7 +419,8 @@ static int find_group_other(struct super - * For other inodes, search forward from the parent directory's block - * group to find a free inode. - */ --struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode) -+struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode, -+ unsigned long goal) - { - struct super_block *sb; - struct buffer_head *bitmap_bh = NULL; -@@ -447,6 +448,41 @@ struct inode *ext3_new_inode(handle_t *h - - sbi = EXT3_SB(sb); - es = sbi->s_es; -+ if (goal) { -+ group = (goal - 1) / EXT3_INODES_PER_GROUP(sb); -+ ino = (goal - 1) % EXT3_INODES_PER_GROUP(sb); -+ err = -EIO; -+ -+ gdp = ext3_get_group_desc(sb, group, &bh2); -+ if (!gdp) -+ goto fail; -+ -+ bitmap_bh = read_inode_bitmap (sb, group); -+ if (!bitmap_bh) -+ goto fail; -+ -+ BUFFER_TRACE(bh, "get_write_access"); -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) goto fail; -+ -+ if (ext3_set_bit_atomic(sb_bgl_lock(sbi, group), -+ ino, bitmap_bh->b_data)) { -+ printk(KERN_ERR "goal inode %lu unavailable\n", goal); -+ /* Oh well, we tried. */ -+ goto continue_allocation; -+ } -+ -+ BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata"); -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ if (err) goto fail; -+ -+ /* We've shortcircuited the allocation system successfully, -+ * now finish filling in the inode. -+ */ -+ goto got; -+ } -+ -+continue_allocation: - if (S_ISDIR(mode)) { - if (test_opt (sb, OLDALLOC)) - group = find_group_dir(sb, dir); -diff -urp RH_2_6_9_42_0_3.orig/fs/ext3/ioctl.c RH_2_6_9_42_0_3/fs/ext3/ioctl.c ---- RH_2_6_9_42_0_3.orig/fs/ext3/ioctl.c 2006-10-23 13:32:46.000000000 +0300 -+++ RH_2_6_9_42_0_3/fs/ext3/ioctl.c 2007-02-16 07:22:28.000000000 +0200 -@@ -25,6 +25,31 @@ int ext3_ioctl (struct inode * inode, st - ext3_debug ("cmd = %u, arg = %lu\n", cmd, arg); - - switch (cmd) { -+ case EXT3_IOC_CREATE_INUM: { -+ char name[32]; -+ struct dentry *dchild, *dparent; -+ int rc = 0; -+ -+ dparent = list_entry(inode->i_dentry.next, struct dentry, -+ d_alias); -+ snprintf(name, sizeof name, "%lu", arg); -+ dchild = lookup_one_len(name, dparent, strlen(name)); -+ if (dchild->d_inode) { -+ printk(KERN_ERR "%*s/%lu already exists (ino %lu)\n", -+ dparent->d_name.len, dparent->d_name.name, arg, -+ dchild->d_inode->i_ino); -+ rc = -EEXIST; -+ } else { -+ dchild->d_fsdata = (void *)arg; -+ rc = vfs_create(inode, dchild, 0644, NULL); -+ if (rc) -+ printk(KERN_ERR "vfs_create: %d\n", rc); -+ else if (dchild->d_inode->i_ino != arg) -+ rc = -EEXIST; -+ } -+ dput(dchild); -+ return rc; -+ } - case EXT3_IOC_GETFLAGS: - flags = ei->i_flags & EXT3_FL_USER_VISIBLE; - return put_user(flags, (int __user *) arg); -diff -urp RH_2_6_9_42_0_3.orig/fs/ext3/namei.c RH_2_6_9_42_0_3/fs/ext3/namei.c ---- RH_2_6_9_42_0_3.orig/fs/ext3/namei.c 2006-10-23 13:32:59.000000000 +0300 -+++ RH_2_6_9_42_0_3/fs/ext3/namei.c 2007-02-22 18:58:13.000000000 +0200 -@@ -97,6 +97,7 @@ struct dx_entry - __le32 block; - }; - -+ - /* - * dx_root_info is laid out so that if it should somehow get overlaid by a - * dirent the two low bits of the hash version will be zero. Therefore, the -@@ -141,6 +142,14 @@ struct dx_map_entry - u32 offs; - }; - -+#define LVFS_DENTRY_PARAM_MAGIC 20070216UL -+struct lvfs_dentry_params -+{ -+ unsigned long p_inum; -+ void *p_ptr; -+ u32 magic; -+}; -+ - #ifdef CONFIG_EXT3_INDEX - static inline unsigned dx_get_block (struct dx_entry *entry); - static void dx_set_block (struct dx_entry *entry, unsigned value); -@@ -1624,6 +1633,20 @@ static int ext3_add_nondir(handle_t *han - return err; - } - -+static struct inode * ext3_new_inode_wantedi(handle_t *handle, struct inode *dir, -+ int mode, struct dentry *dentry) -+{ -+ unsigned long inum = 0; -+ -+ if (dentry->d_fsdata != NULL) { -+ struct lvfs_dentry_params *param = dentry->d_fsdata; -+ -+ if (param->magic == LVFS_DENTRY_PARAM_MAGIC) -+ inum = param->p_inum; -+ } -+ return ext3_new_inode(handle, dir, mode, inum); -+} -+ - /* - * By the time this is called, we already have created - * the directory cache entry for the new file, but it -@@ -1649,7 +1672,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode = ext3_new_inode (handle, dir, mode); -+ inode = ext3_new_inode_wantedi (handle, dir, mode, dentry); - err = PTR_ERR(inode); - if (!IS_ERR(inode)) { - inode->i_op = &ext3_file_inode_operations; -@@ -1683,7 +1706,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode = ext3_new_inode (handle, dir, mode); -+ inode = ext3_new_inode_wantedi (handle, dir, mode, dentry); - err = PTR_ERR(inode); - if (!IS_ERR(inode)) { - init_special_inode(inode, inode->i_mode, rdev); -@@ -1719,7 +1742,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode = ext3_new_inode (handle, dir, S_IFDIR | mode); -+ inode = ext3_new_inode_wantedi (handle, dir, S_IFDIR | mode, dentry); - err = PTR_ERR(inode); - if (IS_ERR(inode)) - goto out_stop; -@@ -2124,7 +2147,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode = ext3_new_inode (handle, dir, S_IFLNK|S_IRWXUGO); -+ inode = ext3_new_inode_wantedi (handle, dir, S_IFLNK|S_IRWXUGO, dentry); - err = PTR_ERR(inode); - if (IS_ERR(inode)) - goto out_stop; -diff -urp RH_2_6_9_42_0_3.orig/include/linux/ext3_fs.h RH_2_6_9_42_0_3/include/linux/ext3_fs.h ---- RH_2_6_9_42_0_3.orig/include/linux/ext3_fs.h 2006-10-23 13:32:46.000000000 +0300 -+++ RH_2_6_9_42_0_3/include/linux/ext3_fs.h 2007-02-16 07:22:28.000000000 +0200 -@@ -741,7 +741,8 @@ extern int ext3fs_dirhash(const char *na - dx_hash_info *hinfo); - - /* ialloc.c */ --extern struct inode * ext3_new_inode (handle_t *, struct inode *, int); -+extern struct inode * ext3_new_inode (handle_t *, struct inode *, int, -+ unsigned long); - extern void ext3_free_inode (handle_t *, struct inode *); - extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); - extern unsigned long ext3_count_free_inodes (struct super_block *); -@@ -833,4 +834,6 @@ extern struct inode_operations ext3_fast - - #endif /* __KERNEL__ */ - -+/* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */ -+#define EXT3_IOC_CREATE_INUM _IOW('f', 5, long) - #endif /* _LINUX_EXT3_FS_H */ diff --git a/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch deleted file mode 100644 index e38bedb486..0000000000 --- a/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch +++ /dev/null @@ -1,192 +0,0 @@ -diff -urp linux-2.6.5-7.282.orig/fs/ext3/ialloc.c linux-2.6.5-7.282/fs/ext3/ialloc.c ---- linux-2.6.5-7.282.orig/fs/ext3/ialloc.c 2006-08-30 17:12:13.000000000 +0300 -+++ linux-2.6.5-7.282/fs/ext3/ialloc.c 2007-02-16 07:43:08.000000000 +0200 -@@ -420,7 +420,8 @@ static int find_group_other(struct super - * For other inodes, search forward from the parent directory's block - * group to find a free inode. - */ --struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode) -+struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode, -+ unsigned long goal) - { - struct super_block *sb; - struct buffer_head *bitmap_bh = NULL; -@@ -448,6 +449,41 @@ struct inode *ext3_new_inode(handle_t *h - - sbi = EXT3_SB(sb); - es = sbi->s_es; -+ if (goal) { -+ group = (goal - 1) / EXT3_INODES_PER_GROUP(sb); -+ ino = (goal - 1) % EXT3_INODES_PER_GROUP(sb); -+ err = -EIO; -+ -+ gdp = ext3_get_group_desc(sb, group, &bh2); -+ if (!gdp) -+ goto fail; -+ -+ bitmap_bh = read_inode_bitmap (sb, group); -+ if (!bitmap_bh) -+ goto fail; -+ -+ BUFFER_TRACE(bh, "get_write_access"); -+ err = ext3_journal_get_write_access(handle, bitmap_bh); -+ if (err) goto fail; -+ -+ if (ext3_set_bit_atomic(sb_bgl_lock(sbi, group), -+ ino, bitmap_bh->b_data)) { -+ printk(KERN_ERR "goal inode %lu unavailable\n", goal); -+ /* Oh well, we tried. */ -+ goto continue_allocation; -+ } -+ -+ BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata"); -+ err = ext3_journal_dirty_metadata(handle, bitmap_bh); -+ if (err) goto fail; -+ -+ /* We've shortcircuited the allocation system successfully, -+ * now finish filling in the inode. -+ */ -+ goto got; -+ } -+ -+continue_allocation: - if (S_ISDIR(mode)) { - if (test_opt (sb, OLDALLOC)) - group = find_group_dir(sb, dir); -diff -urp linux-2.6.5-7.282.orig/fs/ext3/ioctl.c linux-2.6.5-7.282/fs/ext3/ioctl.c ---- linux-2.6.5-7.282.orig/fs/ext3/ioctl.c 2006-08-30 17:12:13.000000000 +0300 -+++ linux-2.6.5-7.282/fs/ext3/ioctl.c 2007-02-16 07:43:08.000000000 +0200 -@@ -25,6 +25,31 @@ int ext3_ioctl (struct inode * inode, st - ext3_debug ("cmd = %u, arg = %lu\n", cmd, arg); - - switch (cmd) { -+ case EXT3_IOC_CREATE_INUM: { -+ char name[32]; -+ struct dentry *dchild, *dparent; -+ int rc = 0; -+ -+ dparent = list_entry(inode->i_dentry.next, struct dentry, -+ d_alias); -+ snprintf(name, sizeof name, "%lu", arg); -+ dchild = lookup_one_len(name, dparent, strlen(name)); -+ if (dchild->d_inode) { -+ printk(KERN_ERR "%*s/%lu already exists (ino %lu)\n", -+ dparent->d_name.len, dparent->d_name.name, arg, -+ dchild->d_inode->i_ino); -+ rc = -EEXIST; -+ } else { -+ dchild->d_fsdata = (void *)arg; -+ rc = vfs_create(inode, dchild, 0644, NULL); -+ if (rc) -+ printk(KERN_ERR "vfs_create: %d\n", rc); -+ else if (dchild->d_inode->i_ino != arg) -+ rc = -EEXIST; -+ } -+ dput(dchild); -+ return rc; -+ } - case EXT3_IOC_GETFLAGS: - flags = ei->i_flags & EXT3_FL_USER_VISIBLE; - return put_user(flags, (int *) arg); -diff -urp linux-2.6.5-7.282.orig/fs/ext3/namei.c linux-2.6.5-7.282/fs/ext3/namei.c ---- linux-2.6.5-7.282.orig/fs/ext3/namei.c 2006-08-30 17:12:34.000000000 +0300 -+++ linux-2.6.5-7.282/fs/ext3/namei.c 2007-02-16 07:46:13.000000000 +0200 -@@ -144,6 +144,14 @@ struct dx_map_entry - u32 offs; - }; - -+#define LVFS_DENTRY_PARAM_MAGIC 20070216UL -+struct lvfs_dentry_params -+{ -+ unsigned long p_inum; -+ void *p_ptr; -+ u32 magic; -+}; -+ - #ifdef CONFIG_EXT3_INDEX - static inline unsigned dx_get_block (struct dx_entry *entry); - static void dx_set_block (struct dx_entry *entry, unsigned value); -@@ -1625,6 +1633,20 @@ static int ext3_add_nondir(handle_t *han - return err; - } - -+static struct inode * ext3_new_inode_wantedi(handle_t *handle, struct inode *dir, -+ int mode, struct dentry *dentry) -+{ -+ unsigned long inum = 0; -+ -+ if (dentry->d_fsdata != NULL) { -+ struct lvfs_dentry_params *param = dentry->d_fsdata; -+ -+ if (param->magic == LVFS_DENTRY_PARAM_MAGIC) -+ inum = param->p_inum; -+ } -+ return ext3_new_inode(handle, dir, mode, inum); -+} -+ - /* - * By the time this is called, we already have created - * the directory cache entry for the new file, but it -@@ -1649,7 +1671,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode = ext3_new_inode (handle, dir, mode); -+ inode = ext3_new_inode_wantedi (handle, dir, mode, dentry); - err = PTR_ERR(inode); - if (!IS_ERR(inode)) { - inode->i_op = &ext3_file_inode_operations; -@@ -1682,7 +1704,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode = ext3_new_inode (handle, dir, mode); -+ inode = ext3_new_inode_wantedi (handle, dir, mode, dentry); - err = PTR_ERR(inode); - if (!IS_ERR(inode)) { - init_special_inode(inode, inode->i_mode, rdev); -@@ -1718,7 +1740,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode = ext3_new_inode (handle, dir, S_IFDIR | mode); -+ inode = ext3_new_inode_wantedi (handle, dir, S_IFDIR | mode, dentry); - err = PTR_ERR(inode); - if (IS_ERR(inode)) - goto out_stop; -@@ -2113,7 +2135,7 @@ retry: - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode = ext3_new_inode (handle, dir, S_IFLNK|S_IRWXUGO); -+ inode = ext3_new_inode_wantedi (handle, dir, S_IFLNK|S_IRWXUGO, dentry); - err = PTR_ERR(inode); - if (IS_ERR(inode)) - goto out_stop; -diff -urp linux-2.6.5-7.282.orig/include/linux/ext3_fs.h linux-2.6.5-7.282/include/linux/ext3_fs.h ---- linux-2.6.5-7.282.orig/include/linux/ext3_fs.h 2006-08-30 17:12:13.000000000 +0300 -+++ linux-2.6.5-7.282/include/linux/ext3_fs.h 2007-02-16 07:43:08.000000000 +0200 -@@ -203,6 +203,7 @@ struct ext3_group_desc - #define EXT3_IOC_SETFLAGS _IOW('f', 2, long) - #define EXT3_IOC_GETVERSION _IOR('f', 3, long) - #define EXT3_IOC_SETVERSION _IOW('f', 4, long) -+/* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */ - #define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long) - #define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long) - #ifdef CONFIG_JBD_DEBUG -@@ -712,7 +713,8 @@ extern int ext3fs_dirhash(const char *na - dx_hash_info *hinfo); - - /* ialloc.c */ --extern struct inode * ext3_new_inode (handle_t *, struct inode *, int); -+extern struct inode * ext3_new_inode (handle_t *, struct inode *, int, -+ unsigned long); - extern void ext3_free_inode (handle_t *, struct inode *); - extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); - extern unsigned long ext3_count_free_inodes (struct super_block *); -@@ -797,4 +799,5 @@ extern struct inode_operations ext3_fast - - #endif /* __KERNEL__ */ - -+#define EXT3_IOC_CREATE_INUM _IOW('f', 5, long) - #endif /* _LINUX_EXT3_FS_H */ diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch deleted file mode 100644 index 6bbcec5a18..0000000000 --- a/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch +++ /dev/null @@ -1,448 +0,0 @@ -Index: linux-2.6.16.i686/fs/ext3/iopen.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/iopen.c 2006-05-31 04:14:15.752410384 +0800 -+++ linux-2.6.16.i686/fs/ext3/iopen.c 2006-05-30 22:52:38.000000000 +0800 -@@ -0,0 +1,259 @@ -+/* -+ * linux/fs/ext3/iopen.c -+ * -+ * Special support for open by inode number -+ * -+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu). -+ * -+ * This file may be redistributed under the terms of the GNU General -+ * Public License. -+ * -+ * -+ * Invariants: -+ * - there is only ever a single DCACHE_NFSD_DISCONNECTED dentry alias -+ * for an inode at one time. -+ * - there are never both connected and DCACHE_NFSD_DISCONNECTED dentry -+ * aliases on an inode at the same time. -+ * -+ * If we have any connected dentry aliases for an inode, use one of those -+ * in iopen_lookup(). Otherwise, we instantiate a single NFSD_DISCONNECTED -+ * dentry for this inode, which thereafter will be found by the dcache -+ * when looking up this inode number in __iopen__, so we don't return here -+ * until it is gone. -+ * -+ * If we get an inode via a regular name lookup, then we "rename" the -+ * NFSD_DISCONNECTED dentry to the proper name and parent. This ensures -+ * existing users of the disconnected dentry will continue to use the same -+ * dentry as the connected users, and there will never be both kinds of -+ * dentry aliases at one time. -+ */ -+ -+#include <linux/sched.h> -+#include <linux/fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/smp_lock.h> -+#include <linux/dcache.h> -+#include <linux/security.h> -+#include "iopen.h" -+ -+#ifndef assert -+#define assert(test) J_ASSERT(test) -+#endif -+ -+#define IOPEN_NAME_LEN 32 -+ -+/* -+ * This implements looking up an inode by number. -+ */ -+static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry, -+ struct nameidata *nd) -+{ -+ struct inode *inode; -+ unsigned long ino; -+ struct list_head *lp; -+ struct dentry *alternate; -+ char buf[IOPEN_NAME_LEN]; -+ -+ if (dentry->d_name.len >= IOPEN_NAME_LEN) -+ return ERR_PTR(-ENAMETOOLONG); -+ -+ memcpy(buf, dentry->d_name.name, dentry->d_name.len); -+ buf[dentry->d_name.len] = 0; -+ -+ if (strcmp(buf, ".") == 0) -+ ino = dir->i_ino; -+ else if (strcmp(buf, "..") == 0) -+ ino = EXT3_ROOT_INO; -+ else -+ ino = simple_strtoul(buf, 0, 0); -+ -+ if ((ino != EXT3_ROOT_INO && -+ //ino != EXT3_ACL_IDX_INO && -+ //ino != EXT3_ACL_DATA_INO && -+ ino < EXT3_FIRST_INO(dir->i_sb)) || -+ ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count)) -+ return ERR_PTR(-ENOENT); -+ -+ inode = iget(dir->i_sb, ino); -+ if (!inode) -+ return ERR_PTR(-EACCES); -+ if (is_bad_inode(inode)) { -+ iput(inode); -+ return ERR_PTR(-ENOENT); -+ } -+ -+ assert(list_empty(&dentry->d_alias)); /* d_instantiate */ -+ assert(d_unhashed(dentry)); /* d_rehash */ -+ -+ /* preferrably return a connected dentry */ -+ spin_lock(&dcache_lock); -+ list_for_each(lp, &inode->i_dentry) { -+ alternate = list_entry(lp, struct dentry, d_alias); -+ assert(!(alternate->d_flags & DCACHE_DISCONNECTED)); -+ } -+ -+ if (!list_empty(&inode->i_dentry)) { -+ alternate = list_entry(inode->i_dentry.next, -+ struct dentry, d_alias); -+ dget_locked(alternate); -+ spin_lock(&alternate->d_lock); -+ alternate->d_flags |= DCACHE_REFERENCED; -+ spin_unlock(&alternate->d_lock); -+ iput(inode); -+ spin_unlock(&dcache_lock); -+ return alternate; -+ } -+ dentry->d_flags |= DCACHE_DISCONNECTED; -+ -+ /* d_add(), but don't drop dcache_lock before adding dentry to inode */ -+ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ -+ dentry->d_inode = inode; -+ spin_unlock(&dcache_lock); -+ -+ d_rehash(dentry); -+ -+ return NULL; -+} -+ -+/* This function is spliced into ext3_lookup and does the move of a -+ * disconnected dentry (if it exists) to a connected dentry. -+ */ -+struct dentry *iopen_connect_dentry(struct dentry *dentry, struct inode *inode, -+ int rehash) -+{ -+ struct dentry *tmp, *goal = NULL; -+ struct list_head *lp; -+ -+ /* verify this dentry is really new */ -+ assert(dentry->d_inode == NULL); -+ assert(list_empty(&dentry->d_alias)); /* d_instantiate */ -+ if (rehash) -+ assert(d_unhashed(dentry)); /* d_rehash */ -+ assert(list_empty(&dentry->d_subdirs)); -+ -+ spin_lock(&dcache_lock); -+ if (!inode) -+ goto do_rehash; -+ -+ if (!test_opt(inode->i_sb, IOPEN)) -+ goto do_instantiate; -+ -+ /* preferrably return a connected dentry */ -+ list_for_each(lp, &inode->i_dentry) { -+ tmp = list_entry(lp, struct dentry, d_alias); -+ if (tmp->d_flags & DCACHE_DISCONNECTED) { -+ assert(tmp->d_alias.next == &inode->i_dentry); -+ assert(tmp->d_alias.prev == &inode->i_dentry); -+ goal = tmp; -+ dget_locked(goal); -+ break; -+ } -+ } -+ -+ if (!goal) -+ goto do_instantiate; -+ -+ /* Move the goal to the de hash queue */ -+ goal->d_flags &= ~DCACHE_DISCONNECTED; -+ security_d_instantiate(goal, inode); -+ __d_drop(dentry); -+ spin_unlock(&dcache_lock); -+ d_rehash(dentry); -+ d_move(goal, dentry); -+ iput(inode); -+ -+ return goal; -+ -+ /* d_add(), but don't drop dcache_lock before adding dentry to inode */ -+do_instantiate: -+ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ -+ dentry->d_inode = inode; -+do_rehash: -+ spin_unlock(&dcache_lock); -+ if (rehash) -+ d_rehash(dentry); -+ -+ return NULL; -+} -+ -+/* -+ * These are the special structures for the iopen pseudo directory. -+ */ -+ -+static struct inode_operations iopen_inode_operations = { -+ lookup: iopen_lookup, /* BKL held */ -+}; -+ -+static struct file_operations iopen_file_operations = { -+ read: generic_read_dir, -+}; -+ -+static int match_dentry(struct dentry *dentry, const char *name) -+{ -+ int len; -+ -+ len = strlen(name); -+ if (dentry->d_name.len != len) -+ return 0; -+ if (strncmp(dentry->d_name.name, name, len)) -+ return 0; -+ return 1; -+} -+ -+/* -+ * This function is spliced into ext3_lookup and returns 1 the file -+ * name is __iopen__ and dentry has been filled in appropriately. -+ */ -+int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry) -+{ -+ struct inode *inode; -+ -+ if (dir->i_ino != EXT3_ROOT_INO || -+ !test_opt(dir->i_sb, IOPEN) || -+ !match_dentry(dentry, "__iopen__")) -+ return 0; -+ -+ inode = iget(dir->i_sb, EXT3_BAD_INO); -+ -+ if (!inode) -+ return 0; -+ d_add(dentry, inode); -+ return 1; -+} -+ -+/* -+ * This function is spliced into read_inode; it returns 1 if inode -+ * number is the one for /__iopen__, in which case the inode is filled -+ * in appropriately. Otherwise, this fuction returns 0. -+ */ -+int ext3_iopen_get_inode(struct inode *inode) -+{ -+ if (inode->i_ino != EXT3_BAD_INO) -+ return 0; -+ -+ inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR; -+ if (test_opt(inode->i_sb, IOPEN_NOPRIV)) -+ inode->i_mode |= 0777; -+ inode->i_uid = 0; -+ inode->i_gid = 0; -+ inode->i_nlink = 1; -+ inode->i_size = 4096; -+ inode->i_atime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = CURRENT_TIME; -+ EXT3_I(inode)->i_dtime = 0; -+ inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size -+ * (for stat), not the fs block -+ * size */ -+ inode->i_blocks = 0; -+ inode->i_version = 1; -+ inode->i_generation = 0; -+ -+ inode->i_op = &iopen_inode_operations; -+ inode->i_fop = &iopen_file_operations; -+ inode->i_mapping->a_ops = 0; -+ -+ return 1; -+} -Index: linux-2.6.16.i686/fs/ext3/iopen.h -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/iopen.h 2006-05-31 04:14:15.752410384 +0800 -+++ linux-2.6.16.i686/fs/ext3/iopen.h 2006-05-30 22:52:38.000000000 +0800 -@@ -0,0 +1,15 @@ -+/* -+ * iopen.h -+ * -+ * Special support for opening files by inode number. -+ * -+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu). -+ * -+ * This file may be redistributed under the terms of the GNU General -+ * Public License. -+ */ -+ -+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry); -+extern int ext3_iopen_get_inode(struct inode *inode); -+extern struct dentry *iopen_connect_dentry(struct dentry *dentry, -+ struct inode *inode, int rehash); -Index: linux-2.6.16.i686/fs/ext3/inode.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/inode.c 2006-05-30 22:52:03.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/inode.c 2006-05-30 22:52:38.000000000 +0800 -@@ -37,6 +37,7 @@ - #include <linux/mpage.h> - #include <linux/uio.h> - #include "xattr.h" -+#include "iopen.h" - #include "acl.h" - - static int ext3_writepage_trans_blocks(struct inode *inode); -@@ -2448,6 +2449,8 @@ - ei->i_default_acl = EXT3_ACL_NOT_CACHED; - #endif - ei->i_block_alloc_info = NULL; -+ if (ext3_iopen_get_inode(inode)) -+ return; - - if (__ext3_get_inode_loc(inode, &iloc, 0)) - goto bad_inode; -Index: linux-2.6.16.i686/fs/ext3/super.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/super.c 2006-05-30 22:52:03.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/super.c 2006-05-30 22:52:38.000000000 +0800 -@@ -634,6 +634,7 @@ - Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, -+ Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - Opt_grpquota - }; - -@@ -682,6 +683,9 @@ - {Opt_noquota, "noquota"}, - {Opt_quota, "quota"}, - {Opt_usrquota, "usrquota"}, -+ {Opt_iopen, "iopen"}, -+ {Opt_noiopen, "noiopen"}, -+ {Opt_iopen_nopriv, "iopen_nopriv"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -996,6 +1000,18 @@ - else - clear_opt(sbi->s_mount_opt, BARRIER); - break; -+ case Opt_iopen: -+ set_opt (sbi->s_mount_opt, IOPEN); -+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; -+ case Opt_noiopen: -+ clear_opt (sbi->s_mount_opt, IOPEN); -+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; -+ case Opt_iopen_nopriv: -+ set_opt (sbi->s_mount_opt, IOPEN); -+ set_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; - case Opt_ignore: - break; - case Opt_resize: -Index: linux-2.6.16.i686/fs/ext3/namei.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/namei.c 2006-05-30 22:52:00.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/namei.c 2006-05-30 22:55:19.000000000 +0800 -@@ -39,6 +39,7 @@ - - #include "namei.h" - #include "xattr.h" -+#include "iopen.h" - #include "acl.h" - - /* -@@ -995,6 +996,9 @@ - if (dentry->d_name.len > EXT3_NAME_LEN) - return ERR_PTR(-ENAMETOOLONG); - -+ if (ext3_check_for_iopen(dir, dentry)) -+ return NULL; -+ - bh = ext3_find_entry(dentry, &de); - inode = NULL; - if (bh) { -@@ -1005,7 +1009,7 @@ - if (!inode) - return ERR_PTR(-EACCES); - } -- return d_splice_alias(inode, dentry); -+ return iopen_connect_dentry(dentry, inode, 1); - } - - -@@ -2046,10 +2050,6 @@ - inode->i_nlink); - inode->i_version++; - inode->i_nlink = 0; -- /* There's no need to set i_disksize: the fact that i_nlink is -- * zero will ensure that the right thing happens during any -- * recovery. */ -- inode->i_size = 0; - ext3_orphan_add(handle, inode); - inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; - ext3_mark_inode_dirty(handle, inode); -@@ -2173,6 +2173,23 @@ - return err; - } - -+/* Like ext3_add_nondir() except for call to iopen_connect_dentry */ -+static int ext3_add_link(handle_t *handle, struct dentry *dentry, -+ struct inode *inode) -+{ -+ int err = ext3_add_entry(handle, dentry, inode); -+ if (!err) { -+ err = ext3_mark_inode_dirty(handle, inode); -+ if (err == 0) { -+ dput(iopen_connect_dentry(dentry, inode, 0)); -+ return 0; -+ } -+ } -+ ext3_dec_count(handle, inode); -+ iput(inode); -+ return err; -+} -+ - static int ext3_link (struct dentry * old_dentry, - struct inode * dir, struct dentry *dentry) - { -@@ -2196,7 +2213,8 @@ - ext3_inc_count(handle, inode); - atomic_inc(&inode->i_count); - -- err = ext3_add_nondir(handle, dentry, inode); -+ err = ext3_add_link(handle, dentry, inode); -+ ext3_orphan_del(handle, inode); - ext3_journal_stop(handle); - if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries)) - goto retry; -Index: linux-2.6.16.i686/fs/ext3/Makefile -=================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/Makefile 2006-03-20 13:53:29.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/Makefile 2006-05-30 22:52:38.000000000 +0800 -@@ -4,7 +4,7 @@ - - obj-$(CONFIG_EXT3_FS) += ext3.o - --ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ -+ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o resize.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o -Index: linux-2.6.16.i686/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.16.i686.orig/include/linux/ext3_fs.h 2006-05-30 22:52:00.000000000 +0800 -+++ linux-2.6.16.i686/include/linux/ext3_fs.h 2006-05-30 22:52:38.000000000 +0800 -@@ -375,6 +375,8 @@ - #define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ - #define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ - #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ -+#define EXT3_MOUNT_IOPEN 0x400000 /* Allow access via iopen */ -+#define EXT3_MOUNT_IOPEN_NOPRIV 0x800000/* Make iopen world-readable */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef _LINUX_EXT2_FS_H diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-rhel4.patch deleted file mode 100644 index 98dbca4e64..0000000000 --- a/ldiskfs/kernel_patches/patches/iopen-2.6-rhel4.patch +++ /dev/null @@ -1,471 +0,0 @@ -Index: linux-stage/fs/ext3/Makefile -=================================================================== ---- linux-stage.orig/fs/ext3/Makefile 2005-02-25 14:31:53.151076368 +0200 -+++ linux-stage/fs/ext3/Makefile 2005-02-25 14:41:51.259150120 +0200 -@@ -4,7 +4,7 @@ - - obj-$(CONFIG_EXT3_FS) += ext3.o - --ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ -+ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o resize.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o -Index: linux-stage/fs/ext3/inode.c -=================================================================== ---- linux-stage.orig/fs/ext3/inode.c 2005-02-25 14:37:30.983718000 +0200 -+++ linux-stage/fs/ext3/inode.c 2005-02-25 14:47:42.069818792 +0200 -@@ -37,6 +37,7 @@ - #include <linux/mpage.h> - #include <linux/uio.h> - #include "xattr.h" -+#include "iopen.h" - #include "acl.h" - - /* -@@ -2408,6 +2409,8 @@ - ei->i_default_acl = EXT3_ACL_NOT_CACHED; - #endif - ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED; -+ if (ext3_iopen_get_inode(inode)) -+ return; - - if (ext3_get_inode_loc(inode, &iloc, 0)) - goto bad_inode; -Index: linux-stage/fs/ext3/iopen.c -=================================================================== ---- linux-stage.orig/fs/ext3/iopen.c 2005-02-25 14:41:01.017787968 +0200 -+++ linux-stage/fs/ext3/iopen.c 2005-02-25 14:41:01.045783712 +0200 -@@ -0,0 +1,278 @@ -+/* -+ * linux/fs/ext3/iopen.c -+ * -+ * Special support for open by inode number -+ * -+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu). -+ * -+ * This file may be redistributed under the terms of the GNU General -+ * Public License. -+ * -+ * -+ * Invariants: -+ * - there is only ever a single DCACHE_NFSD_DISCONNECTED dentry alias -+ * for an inode at one time. -+ * - there are never both connected and DCACHE_NFSD_DISCONNECTED dentry -+ * aliases on an inode at the same time. -+ * -+ * If we have any connected dentry aliases for an inode, use one of those -+ * in iopen_lookup(). Otherwise, we instantiate a single NFSD_DISCONNECTED -+ * dentry for this inode, which thereafter will be found by the dcache -+ * when looking up this inode number in __iopen__, so we don't return here -+ * until it is gone. -+ * -+ * If we get an inode via a regular name lookup, then we "rename" the -+ * NFSD_DISCONNECTED dentry to the proper name and parent. This ensures -+ * existing users of the disconnected dentry will continue to use the same -+ * dentry as the connected users, and there will never be both kinds of -+ * dentry aliases at one time. -+ */ -+ -+#include <linux/sched.h> -+#include <linux/fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/smp_lock.h> -+#include <linux/dcache.h> -+#include <linux/security.h> -+#include "iopen.h" -+ -+#ifndef assert -+#define assert(test) J_ASSERT(test) -+#endif -+ -+#define IOPEN_NAME_LEN 32 -+ -+/* -+ * This implements looking up an inode by number. -+ */ -+static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry, -+ struct nameidata *nd) -+{ -+ struct inode *inode; -+ unsigned long ino; -+ struct list_head *lp; -+ struct dentry *alternate; -+ char buf[IOPEN_NAME_LEN]; -+ -+ if (dentry->d_name.len >= IOPEN_NAME_LEN) -+ return ERR_PTR(-ENAMETOOLONG); -+ -+ memcpy(buf, dentry->d_name.name, dentry->d_name.len); -+ buf[dentry->d_name.len] = 0; -+ -+ if (strcmp(buf, ".") == 0) -+ ino = dir->i_ino; -+ else if (strcmp(buf, "..") == 0) -+ ino = EXT3_ROOT_INO; -+ else -+ ino = simple_strtoul(buf, 0, 0); -+ -+ if ((ino != EXT3_ROOT_INO && -+ //ino != EXT3_ACL_IDX_INO && -+ //ino != EXT3_ACL_DATA_INO && -+ ino < EXT3_FIRST_INO(dir->i_sb)) || -+ ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count)) -+ return ERR_PTR(-ENOENT); -+ -+ inode = iget(dir->i_sb, ino); -+ if (!inode) -+ return ERR_PTR(-EACCES); -+ if (is_bad_inode(inode)) { -+ iput(inode); -+ return ERR_PTR(-ENOENT); -+ } -+ -+ assert(list_empty(&dentry->d_alias)); /* d_instantiate */ -+ assert(d_unhashed(dentry)); /* d_rehash */ -+ -+ /* preferrably return a connected dentry */ -+ spin_lock(&dcache_lock); -+ list_for_each(lp, &inode->i_dentry) { -+ alternate = list_entry(lp, struct dentry, d_alias); -+ assert(!(alternate->d_flags & DCACHE_DISCONNECTED)); -+ } -+ -+ if (!list_empty(&inode->i_dentry)) { -+ alternate = list_entry(inode->i_dentry.next, -+ struct dentry, d_alias); -+ dget_locked(alternate); -+ spin_lock(&alternate->d_lock); -+ alternate->d_flags |= DCACHE_REFERENCED; -+ spin_unlock(&alternate->d_lock); -+ iput(inode); -+ spin_unlock(&dcache_lock); -+ return alternate; -+ } -+ dentry->d_flags |= DCACHE_DISCONNECTED; -+ -+ /* d_add(), but don't drop dcache_lock before adding dentry to inode */ -+ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ -+ dentry->d_inode = inode; -+ -+ __d_rehash(dentry, 0); /* d_rehash */ -+ spin_unlock(&dcache_lock); -+ -+ return NULL; -+} -+ -+#define do_switch(x,y) do { \ -+ __typeof__ (x) __tmp = x; \ -+ x = y; y = __tmp; } while (0) -+ -+static inline void switch_names(struct dentry *dentry, struct dentry *target) -+{ -+ const unsigned char *old_name, *new_name; -+ -+ memcpy(dentry->d_iname, target->d_iname, DNAME_INLINE_LEN_MIN); -+ old_name = target->d_name.name; -+ new_name = dentry->d_name.name; -+ if (old_name == target->d_iname) -+ old_name = dentry->d_iname; -+ if (new_name == dentry->d_iname) -+ new_name = target->d_iname; -+ target->d_name.name = new_name; -+ dentry->d_name.name = old_name; -+} -+ -+/* This function is spliced into ext3_lookup and does the move of a -+ * disconnected dentry (if it exists) to a connected dentry. -+ */ -+struct dentry *iopen_connect_dentry(struct dentry *dentry, struct inode *inode, -+ int rehash) -+{ -+ struct dentry *tmp, *goal = NULL; -+ struct list_head *lp; -+ -+ /* verify this dentry is really new */ -+ assert(dentry->d_inode == NULL); -+ assert(list_empty(&dentry->d_alias)); /* d_instantiate */ -+ if (rehash) -+ assert(d_unhashed(dentry)); /* d_rehash */ -+ assert(list_empty(&dentry->d_subdirs)); -+ -+ spin_lock(&dcache_lock); -+ if (!inode) -+ goto do_rehash; -+ -+ if (!test_opt(inode->i_sb, IOPEN)) -+ goto do_instantiate; -+ -+ /* preferrably return a connected dentry */ -+ list_for_each(lp, &inode->i_dentry) { -+ tmp = list_entry(lp, struct dentry, d_alias); -+ if (tmp->d_flags & DCACHE_DISCONNECTED) { -+ assert(tmp->d_alias.next == &inode->i_dentry); -+ assert(tmp->d_alias.prev == &inode->i_dentry); -+ goal = tmp; -+ dget_locked(goal); -+ break; -+ } -+ } -+ -+ if (!goal) -+ goto do_instantiate; -+ -+ /* Move the goal to the de hash queue */ -+ goal->d_flags &= ~DCACHE_DISCONNECTED; -+ security_d_instantiate(goal, inode); -+ __d_drop(dentry); -+ __d_rehash(dentry, 0); -+ __d_move(goal, dentry); -+ spin_unlock(&dcache_lock); -+ iput(inode); -+ -+ return goal; -+ -+ /* d_add(), but don't drop dcache_lock before adding dentry to inode */ -+do_instantiate: -+ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ -+ dentry->d_inode = inode; -+do_rehash: -+ if (rehash) -+ __d_rehash(dentry, 0); /* d_rehash */ -+ spin_unlock(&dcache_lock); -+ -+ return NULL; -+} -+ -+/* -+ * These are the special structures for the iopen pseudo directory. -+ */ -+ -+static struct inode_operations iopen_inode_operations = { -+ lookup: iopen_lookup, /* BKL held */ -+}; -+ -+static struct file_operations iopen_file_operations = { -+ read: generic_read_dir, -+}; -+ -+static int match_dentry(struct dentry *dentry, const char *name) -+{ -+ int len; -+ -+ len = strlen(name); -+ if (dentry->d_name.len != len) -+ return 0; -+ if (strncmp(dentry->d_name.name, name, len)) -+ return 0; -+ return 1; -+} -+ -+/* -+ * This function is spliced into ext3_lookup and returns 1 the file -+ * name is __iopen__ and dentry has been filled in appropriately. -+ */ -+int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry) -+{ -+ struct inode *inode; -+ -+ if (dir->i_ino != EXT3_ROOT_INO || -+ !test_opt(dir->i_sb, IOPEN) || -+ !match_dentry(dentry, "__iopen__")) -+ return 0; -+ -+ inode = iget(dir->i_sb, EXT3_BAD_INO); -+ -+ if (!inode) -+ return 0; -+ d_add(dentry, inode); -+ return 1; -+} -+ -+/* -+ * This function is spliced into read_inode; it returns 1 if inode -+ * number is the one for /__iopen__, in which case the inode is filled -+ * in appropriately. Otherwise, this fuction returns 0. -+ */ -+int ext3_iopen_get_inode(struct inode *inode) -+{ -+ if (inode->i_ino != EXT3_BAD_INO) -+ return 0; -+ -+ inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR; -+ if (test_opt(inode->i_sb, IOPEN_NOPRIV)) -+ inode->i_mode |= 0777; -+ inode->i_uid = 0; -+ inode->i_gid = 0; -+ inode->i_nlink = 1; -+ inode->i_size = 4096; -+ inode->i_atime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = CURRENT_TIME; -+ EXT3_I(inode)->i_dtime = 0; -+ inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size -+ * (for stat), not the fs block -+ * size */ -+ inode->i_blocks = 0; -+ inode->i_version = 1; -+ inode->i_generation = 0; -+ -+ inode->i_op = &iopen_inode_operations; -+ inode->i_fop = &iopen_file_operations; -+ inode->i_mapping->a_ops = 0; -+ -+ return 1; -+} -Index: linux-stage/fs/ext3/iopen.h -=================================================================== ---- linux-stage.orig/fs/ext3/iopen.h 2005-02-25 14:41:01.017787968 +0200 -+++ linux-stage/fs/ext3/iopen.h 2005-02-25 14:41:01.045783712 +0200 -@@ -0,0 +1,15 @@ -+/* -+ * iopen.h -+ * -+ * Special support for opening files by inode number. -+ * -+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu). -+ * -+ * This file may be redistributed under the terms of the GNU General -+ * Public License. -+ */ -+ -+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry); -+extern int ext3_iopen_get_inode(struct inode *inode); -+extern struct dentry *iopen_connect_dentry(struct dentry *dentry, -+ struct inode *inode, int rehash); -Index: linux-stage/fs/ext3/namei.c -=================================================================== ---- linux-stage.orig/fs/ext3/namei.c 2005-02-25 14:37:28.975023368 +0200 -+++ linux-stage/fs/ext3/namei.c 2005-02-25 14:46:43.090784968 +0200 -@@ -37,6 +37,7 @@ - #include <linux/buffer_head.h> - #include <linux/smp_lock.h> - #include "xattr.h" -+#include "iopen.h" - #include "acl.h" - - /* -@@ -980,6 +981,9 @@ - if (dentry->d_name.len > EXT3_NAME_LEN) - return ERR_PTR(-ENAMETOOLONG); - -+ if (ext3_check_for_iopen(dir, dentry)) -+ return NULL; -+ - bh = ext3_find_entry(dentry, &de); - inode = NULL; - if (bh) { -@@ -990,10 +994,8 @@ - if (!inode) - return ERR_PTR(-EACCES); - } -- if (inode) -- return d_splice_alias(inode, dentry); -- d_add(dentry, inode); -- return NULL; -+ -+ return iopen_connect_dentry(dentry, inode, 1); - } - - -@@ -2037,10 +2039,6 @@ - inode->i_nlink); - inode->i_version++; - inode->i_nlink = 0; -- /* There's no need to set i_disksize: the fact that i_nlink is -- * zero will ensure that the right thing happens during any -- * recovery. */ -- inode->i_size = 0; - ext3_orphan_add(handle, inode); - inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; - ext3_mark_inode_dirty(handle, inode); -@@ -2163,6 +2161,23 @@ - return err; - } - -+/* Like ext3_add_nondir() except for call to iopen_connect_dentry */ -+static int ext3_add_link(handle_t *handle, struct dentry *dentry, -+ struct inode *inode) -+{ -+ int err = ext3_add_entry(handle, dentry, inode); -+ if (!err) { -+ err = ext3_mark_inode_dirty(handle, inode); -+ if (err == 0) { -+ dput(iopen_connect_dentry(dentry, inode, 0)); -+ return 0; -+ } -+ } -+ ext3_dec_count(handle, inode); -+ iput(inode); -+ return err; -+} -+ - static int ext3_link (struct dentry * old_dentry, - struct inode * dir, struct dentry *dentry) - { -@@ -2186,7 +2201,8 @@ - ext3_inc_count(handle, inode); - atomic_inc(&inode->i_count); - -- err = ext3_add_nondir(handle, dentry, inode); -+ err = ext3_add_link(handle, dentry, inode); -+ ext3_orphan_del(handle, inode); - ext3_journal_stop(handle); - if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries)) - goto retry; -Index: linux-stage/fs/ext3/super.c -=================================================================== ---- linux-stage.orig/fs/ext3/super.c 2005-02-25 14:37:30.987717392 +0200 -+++ linux-stage/fs/ext3/super.c 2005-02-25 14:44:50.495901992 +0200 -@@ -586,6 +586,7 @@ - Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, -+ Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - }; - - static match_table_t tokens = { -@@ -633,6 +634,9 @@ - {Opt_ignore, "noquota"}, - {Opt_ignore, "quota"}, - {Opt_ignore, "usrquota"}, -+ {Opt_iopen, "iopen"}, -+ {Opt_noiopen, "noiopen"}, -+ {Opt_iopen_nopriv, "iopen_nopriv"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -914,6 +918,18 @@ - else - clear_opt(sbi->s_mount_opt, BARRIER); - break; -+ case Opt_iopen: -+ set_opt (sbi->s_mount_opt, IOPEN); -+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; -+ case Opt_noiopen: -+ clear_opt (sbi->s_mount_opt, IOPEN); -+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; -+ case Opt_iopen_nopriv: -+ set_opt (sbi->s_mount_opt, IOPEN); -+ set_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; - case Opt_ignore: - break; - case Opt_resize: -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h 2005-02-25 14:37:28.977023064 +0200 -+++ linux-stage/include/linux/ext3_fs.h 2005-02-25 14:49:00.569884968 +0200 -@@ -355,6 +355,8 @@ - #define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ - #define EXT3_MOUNT_BARRIER 0x10000 /* Use block barriers */ - #define EXT3_MOUNT_RESERVATION 0x20000 /* Preallocation */ -+#define EXT3_MOUNT_IOPEN 0x80000 /* Allow access via iopen */ -+#define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef _LINUX_EXT2_FS_H diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch deleted file mode 100644 index 1c5e900555..0000000000 --- a/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch +++ /dev/null @@ -1,472 +0,0 @@ -Index: linux-stage/fs/ext3/Makefile -=================================================================== ---- linux-stage.orig/fs/ext3/Makefile 2005-02-25 14:31:53.151076368 +0200 -+++ linux-stage/fs/ext3/Makefile 2005-02-25 14:41:51.259150120 +0200 -@@ -4,7 +4,7 @@ - - obj-$(CONFIG_EXT3_FS) += ext3.o - --ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ -+ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o -Index: linux-stage/fs/ext3/inode.c -=================================================================== ---- linux-stage.orig/fs/ext3/inode.c 2005-02-25 14:37:30.983718000 +0200 -+++ linux-stage/fs/ext3/inode.c 2005-02-25 14:47:42.069818792 +0200 -@@ -37,6 +37,7 @@ - #include <linux/mpage.h> - #include <linux/uio.h> - #include "xattr.h" -+#include "iopen.h" - #include "acl.h" - - /* -@@ -2408,6 +2409,9 @@ - #endif - ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED; - -+ if (ext3_iopen_get_inode(inode)) -+ return; -+ - if (ext3_get_inode_loc(inode, &iloc, 0)) - goto bad_inode; - bh = iloc.bh; -Index: linux-stage/fs/ext3/iopen.c -=================================================================== ---- linux-2.6.5-sles9.orig/fs/ext3/iopen.c 2003-01-30 13:24:37.000000000 +0300 -+++ linux-2.6.5-sles9/fs/ext3/iopen.c 2004-11-09 02:18:27.611913312 +0300 -@@ -0,0 +1,278 @@ -+/* -+ * linux/fs/ext3/iopen.c -+ * -+ * Special support for open by inode number -+ * -+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu). -+ * -+ * This file may be redistributed under the terms of the GNU General -+ * Public License. -+ * -+ * -+ * Invariants: -+ * - there is only ever a single DCACHE_NFSD_DISCONNECTED dentry alias -+ * for an inode at one time. -+ * - there are never both connected and DCACHE_NFSD_DISCONNECTED dentry -+ * aliases on an inode at the same time. -+ * -+ * If we have any connected dentry aliases for an inode, use one of those -+ * in iopen_lookup(). Otherwise, we instantiate a single NFSD_DISCONNECTED -+ * dentry for this inode, which thereafter will be found by the dcache -+ * when looking up this inode number in __iopen__, so we don't return here -+ * until it is gone. -+ * -+ * If we get an inode via a regular name lookup, then we "rename" the -+ * NFSD_DISCONNECTED dentry to the proper name and parent. This ensures -+ * existing users of the disconnected dentry will continue to use the same -+ * dentry as the connected users, and there will never be both kinds of -+ * dentry aliases at one time. -+ */ -+ -+#include <linux/sched.h> -+#include <linux/fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/smp_lock.h> -+#include <linux/dcache.h> -+#include <linux/security.h> -+#include "iopen.h" -+ -+#ifndef assert -+#define assert(test) J_ASSERT(test) -+#endif -+ -+#define IOPEN_NAME_LEN 32 -+ -+/* -+ * This implements looking up an inode by number. -+ */ -+static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry, -+ struct nameidata *nd) -+{ -+ struct inode *inode; -+ unsigned long ino; -+ struct list_head *lp; -+ struct dentry *alternate; -+ char buf[IOPEN_NAME_LEN]; -+ -+ if (dentry->d_name.len >= IOPEN_NAME_LEN) -+ return ERR_PTR(-ENAMETOOLONG); -+ -+ memcpy(buf, dentry->d_name.name, dentry->d_name.len); -+ buf[dentry->d_name.len] = 0; -+ -+ if (strcmp(buf, ".") == 0) -+ ino = dir->i_ino; -+ else if (strcmp(buf, "..") == 0) -+ ino = EXT3_ROOT_INO; -+ else -+ ino = simple_strtoul(buf, 0, 0); -+ -+ if ((ino != EXT3_ROOT_INO && -+ //ino != EXT3_ACL_IDX_INO && -+ //ino != EXT3_ACL_DATA_INO && -+ ino < EXT3_FIRST_INO(dir->i_sb)) || -+ ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count)) -+ return ERR_PTR(-ENOENT); -+ -+ inode = iget(dir->i_sb, ino); -+ if (!inode) -+ return ERR_PTR(-EACCES); -+ if (is_bad_inode(inode)) { -+ iput(inode); -+ return ERR_PTR(-ENOENT); -+ } -+ -+ assert(list_empty(&dentry->d_alias)); /* d_instantiate */ -+ assert(d_unhashed(dentry)); /* d_rehash */ -+ -+ /* preferrably return a connected dentry */ -+ spin_lock(&dcache_lock); -+ list_for_each(lp, &inode->i_dentry) { -+ alternate = list_entry(lp, struct dentry, d_alias); -+ assert(!(alternate->d_flags & DCACHE_DISCONNECTED)); -+ } -+ -+ if (!list_empty(&inode->i_dentry)) { -+ alternate = list_entry(inode->i_dentry.next, -+ struct dentry, d_alias); -+ dget_locked(alternate); -+ spin_lock(&alternate->d_lock); -+ alternate->d_vfs_flags |= DCACHE_REFERENCED; -+ spin_unlock(&alternate->d_lock); -+ iput(inode); -+ spin_unlock(&dcache_lock); -+ return alternate; -+ } -+ dentry->d_flags |= DCACHE_DISCONNECTED; -+ -+ /* d_add(), but don't drop dcache_lock before adding dentry to inode */ -+ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ -+ dentry->d_inode = inode; -+ -+ __d_rehash(dentry, 0); /* d_rehash */ -+ spin_unlock(&dcache_lock); -+ -+ return NULL; -+} -+ -+#define do_switch(x,y) do { \ -+ __typeof__ (x) __tmp = x; \ -+ x = y; y = __tmp; } while (0) -+ -+static inline void switch_names(struct dentry *dentry, struct dentry *target) -+{ -+ const unsigned char *old_name, *new_name; -+ -+ memcpy(dentry->d_iname, target->d_iname, DNAME_INLINE_LEN); -+ old_name = target->d_name.name; -+ new_name = dentry->d_name.name; -+ if (old_name == target->d_iname) -+ old_name = dentry->d_iname; -+ if (new_name == dentry->d_iname) -+ new_name = target->d_iname; -+ target->d_name.name = new_name; -+ dentry->d_name.name = old_name; -+} -+ -+/* This function is spliced into ext3_lookup and does the move of a -+ * disconnected dentry (if it exists) to a connected dentry. -+ */ -+struct dentry *iopen_connect_dentry(struct dentry *dentry, struct inode *inode, -+ int rehash) -+{ -+ struct dentry *tmp, *goal = NULL; -+ struct list_head *lp; -+ -+ /* verify this dentry is really new */ -+ assert(dentry->d_inode == NULL); -+ assert(list_empty(&dentry->d_alias)); /* d_instantiate */ -+ if (rehash) -+ assert(d_unhashed(dentry)); /* d_rehash */ -+ assert(list_empty(&dentry->d_subdirs)); -+ -+ spin_lock(&dcache_lock); -+ if (!inode) -+ goto do_rehash; -+ -+ if (!test_opt(inode->i_sb, IOPEN)) -+ goto do_instantiate; -+ -+ /* preferrably return a connected dentry */ -+ list_for_each(lp, &inode->i_dentry) { -+ tmp = list_entry(lp, struct dentry, d_alias); -+ if (tmp->d_flags & DCACHE_DISCONNECTED) { -+ assert(tmp->d_alias.next == &inode->i_dentry); -+ assert(tmp->d_alias.prev == &inode->i_dentry); -+ goal = tmp; -+ dget_locked(goal); -+ break; -+ } -+ } -+ -+ if (!goal) -+ goto do_instantiate; -+ -+ /* Move the goal to the de hash queue */ -+ goal->d_flags &= ~DCACHE_DISCONNECTED; -+ security_d_instantiate(goal, inode); -+ __d_drop(dentry); -+ __d_rehash(dentry, 0); -+ __d_move(goal, dentry); -+ spin_unlock(&dcache_lock); -+ iput(inode); -+ -+ return goal; -+ -+ /* d_add(), but don't drop dcache_lock before adding dentry to inode */ -+do_instantiate: -+ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ -+ dentry->d_inode = inode; -+do_rehash: -+ if (rehash) -+ __d_rehash(dentry, 0); /* d_rehash */ -+ spin_unlock(&dcache_lock); -+ -+ return NULL; -+} -+ -+/* -+ * These are the special structures for the iopen pseudo directory. -+ */ -+ -+static struct inode_operations iopen_inode_operations = { -+ lookup: iopen_lookup, /* BKL held */ -+}; -+ -+static struct file_operations iopen_file_operations = { -+ read: generic_read_dir, -+}; -+ -+static int match_dentry(struct dentry *dentry, const char *name) -+{ -+ int len; -+ -+ len = strlen(name); -+ if (dentry->d_name.len != len) -+ return 0; -+ if (strncmp(dentry->d_name.name, name, len)) -+ return 0; -+ return 1; -+} -+ -+/* -+ * This function is spliced into ext3_lookup and returns 1 the file -+ * name is __iopen__ and dentry has been filled in appropriately. -+ */ -+int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry) -+{ -+ struct inode *inode; -+ -+ if (dir->i_ino != EXT3_ROOT_INO || -+ !test_opt(dir->i_sb, IOPEN) || -+ !match_dentry(dentry, "__iopen__")) -+ return 0; -+ -+ inode = iget(dir->i_sb, EXT3_BAD_INO); -+ -+ if (!inode) -+ return 0; -+ d_add(dentry, inode); -+ return 1; -+} -+ -+/* -+ * This function is spliced into read_inode; it returns 1 if inode -+ * number is the one for /__iopen__, in which case the inode is filled -+ * in appropriately. Otherwise, this fuction returns 0. -+ */ -+int ext3_iopen_get_inode(struct inode *inode) -+{ -+ if (inode->i_ino != EXT3_BAD_INO) -+ return 0; -+ -+ inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR; -+ if (test_opt(inode->i_sb, IOPEN_NOPRIV)) -+ inode->i_mode |= 0777; -+ inode->i_uid = 0; -+ inode->i_gid = 0; -+ inode->i_nlink = 1; -+ inode->i_size = 4096; -+ inode->i_atime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = CURRENT_TIME; -+ EXT3_I(inode)->i_dtime = 0; -+ inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size -+ * (for stat), not the fs block -+ * size */ -+ inode->i_blocks = 0; -+ inode->i_version = 1; -+ inode->i_generation = 0; -+ -+ inode->i_op = &iopen_inode_operations; -+ inode->i_fop = &iopen_file_operations; -+ inode->i_mapping->a_ops = 0; -+ -+ return 1; -+} -Index: linux-stage/fs/ext3/iopen.h -=================================================================== ---- linux-stage.orig/fs/ext3/iopen.h 2005-02-25 14:41:01.017787968 +0200 -+++ linux-stage/fs/ext3/iopen.h 2005-02-25 14:41:01.045783712 +0200 -@@ -0,0 +1,15 @@ -+/* -+ * iopen.h -+ * -+ * Special support for opening files by inode number. -+ * -+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu). -+ * -+ * This file may be redistributed under the terms of the GNU General -+ * Public License. -+ */ -+ -+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry); -+extern int ext3_iopen_get_inode(struct inode *inode); -+extern struct dentry *iopen_connect_dentry(struct dentry *dentry, -+ struct inode *inode, int rehash); -Index: linux-stage/fs/ext3/namei.c -=================================================================== ---- linux-stage.orig/fs/ext3/namei.c 2005-02-25 14:37:28.975023368 +0200 -+++ linux-stage/fs/ext3/namei.c 2005-02-25 14:46:43.090784968 +0200 -@@ -37,6 +37,7 @@ - #include <linux/buffer_head.h> - #include <linux/smp_lock.h> - #include "xattr.h" -+#include "iopen.h" - #include "acl.h" - - /* -@@ -980,6 +981,9 @@ - if (dentry->d_name.len > EXT3_NAME_LEN) - return ERR_PTR(-ENAMETOOLONG); - -+ if (ext3_check_for_iopen(dir, dentry)) -+ return NULL; -+ - bh = ext3_find_entry(dentry, &de); - inode = NULL; - if (bh) { -@@ -990,10 +994,8 @@ - if (!inode) - return ERR_PTR(-EACCES); - } -- if (inode) -- return d_splice_alias(inode, dentry); -- d_add(dentry, inode); -- return NULL; -+ -+ return iopen_connect_dentry(dentry, inode, 1); - } - - -@@ -2037,10 +2039,6 @@ - inode->i_nlink); - inode->i_version++; - inode->i_nlink = 0; -- /* There's no need to set i_disksize: the fact that i_nlink is -- * zero will ensure that the right thing happens during any -- * recovery. */ -- inode->i_size = 0; - ext3_orphan_add(handle, inode); - inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; - ext3_mark_inode_dirty(handle, inode); -@@ -2163,6 +2161,23 @@ - return err; - } - -+/* Like ext3_add_nondir() except for call to iopen_connect_dentry */ -+static int ext3_add_link(handle_t *handle, struct dentry *dentry, -+ struct inode *inode) -+{ -+ int err = ext3_add_entry(handle, dentry, inode); -+ if (!err) { -+ err = ext3_mark_inode_dirty(handle, inode); -+ if (err == 0) { -+ dput(iopen_connect_dentry(dentry, inode, 0)); -+ return 0; -+ } -+ } -+ ext3_dec_count(handle, inode); -+ iput(inode); -+ return err; -+} -+ - static int ext3_link (struct dentry * old_dentry, - struct inode * dir, struct dentry *dentry) - { -@@ -2186,7 +2201,8 @@ - ext3_inc_count(handle, inode); - atomic_inc(&inode->i_count); - -- err = ext3_add_nondir(handle, dentry, inode); -+ err = ext3_add_link(handle, dentry, inode); -+ ext3_orphan_del(handle, inode); - ext3_journal_stop(handle); - if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries)) - goto retry; -Index: linux-stage/fs/ext3/super.c -=================================================================== ---- linux-stage.orig/fs/ext3/super.c 2005-02-25 14:37:30.987717392 +0200 -+++ linux-stage/fs/ext3/super.c 2005-02-25 14:44:50.495901992 +0200 -@@ -586,6 +586,7 @@ - Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, - Opt_ignore, Opt_barrier, - Opt_err, -+ Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - }; - - static match_table_t tokens = { -@@ -633,6 +634,9 @@ - {Opt_ignore, "noquota"}, - {Opt_ignore, "quota"}, - {Opt_ignore, "usrquota"}, -+ {Opt_iopen, "iopen"}, -+ {Opt_noiopen, "noiopen"}, -+ {Opt_iopen_nopriv, "iopen_nopriv"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL} - }; -@@ -914,6 +918,18 @@ - else - clear_opt(sbi->s_mount_opt, BARRIER); - break; -+ case Opt_iopen: -+ set_opt (sbi->s_mount_opt, IOPEN); -+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; -+ case Opt_noiopen: -+ clear_opt (sbi->s_mount_opt, IOPEN); -+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; -+ case Opt_iopen_nopriv: -+ set_opt (sbi->s_mount_opt, IOPEN); -+ set_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; - case Opt_ignore: - break; - default: -Index: linux-stage/include/linux/ext3_fs.h -=================================================================== ---- linux-stage.orig/include/linux/ext3_fs.h 2005-02-25 14:37:28.977023064 +0200 -+++ linux-stage/include/linux/ext3_fs.h 2005-02-25 14:49:00.569884968 +0200 -@@ -355,6 +355,8 @@ - #define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ - #define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */ - #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ -+#define EXT3_MOUNT_IOPEN 0x80000 /* Allow access via iopen */ -+#define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef _LINUX_EXT2_FS_H diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6.12.patch b/ldiskfs/kernel_patches/patches/iopen-2.6.12.patch deleted file mode 100644 index 8d456ac251..0000000000 --- a/ldiskfs/kernel_patches/patches/iopen-2.6.12.patch +++ /dev/null @@ -1,471 +0,0 @@ -Index: linux-2.6.12-rc6/fs/ext3/Makefile -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/Makefile 2005-06-14 16:00:45.206720992 +0200 -+++ linux-2.6.12-rc6/fs/ext3/Makefile 2005-06-14 16:14:33.595382720 +0200 -@@ -4,7 +4,7 @@ - - obj-$(CONFIG_EXT3_FS) += ext3.o - --ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ -+ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o resize.o - - ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o -Index: linux-2.6.12-rc6/fs/ext3/inode.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/inode.c 2005-06-14 16:01:16.272150299 +0200 -+++ linux-2.6.12-rc6/fs/ext3/inode.c 2005-06-14 16:24:55.686195412 +0200 -@@ -37,6 +37,7 @@ - #include <linux/mpage.h> - #include <linux/uio.h> - #include "xattr.h" -+#include "iopen.h" - #include "acl.h" - - static int ext3_writepage_trans_blocks(struct inode *inode); -@@ -2437,6 +2438,8 @@ - ei->i_default_acl = EXT3_ACL_NOT_CACHED; - #endif - ei->i_block_alloc_info = NULL; -+ if (ext3_iopen_get_inode(inode)) -+ return; - - if (__ext3_get_inode_loc(inode, &iloc, 0)) - goto bad_inode; -Index: linux-2.6.12-rc6/fs/ext3/iopen.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/iopen.c 2005-06-14 16:14:33.530929595 +0200 -+++ linux-2.6.12-rc6/fs/ext3/iopen.c 2005-06-14 16:14:33.626632719 +0200 -@@ -0,0 +1,278 @@ -+/* -+ * linux/fs/ext3/iopen.c -+ * -+ * Special support for open by inode number -+ * -+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu). -+ * -+ * This file may be redistributed under the terms of the GNU General -+ * Public License. -+ * -+ * -+ * Invariants: -+ * - there is only ever a single DCACHE_NFSD_DISCONNECTED dentry alias -+ * for an inode at one time. -+ * - there are never both connected and DCACHE_NFSD_DISCONNECTED dentry -+ * aliases on an inode at the same time. -+ * -+ * If we have any connected dentry aliases for an inode, use one of those -+ * in iopen_lookup(). Otherwise, we instantiate a single NFSD_DISCONNECTED -+ * dentry for this inode, which thereafter will be found by the dcache -+ * when looking up this inode number in __iopen__, so we don't return here -+ * until it is gone. -+ * -+ * If we get an inode via a regular name lookup, then we "rename" the -+ * NFSD_DISCONNECTED dentry to the proper name and parent. This ensures -+ * existing users of the disconnected dentry will continue to use the same -+ * dentry as the connected users, and there will never be both kinds of -+ * dentry aliases at one time. -+ */ -+ -+#include <linux/sched.h> -+#include <linux/fs.h> -+#include <linux/ext3_jbd.h> -+#include <linux/jbd.h> -+#include <linux/ext3_fs.h> -+#include <linux/smp_lock.h> -+#include <linux/dcache.h> -+#include <linux/security.h> -+#include "iopen.h" -+ -+#ifndef assert -+#define assert(test) J_ASSERT(test) -+#endif -+ -+#define IOPEN_NAME_LEN 32 -+ -+/* -+ * This implements looking up an inode by number. -+ */ -+static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry, -+ struct nameidata *nd) -+{ -+ struct inode *inode; -+ unsigned long ino; -+ struct list_head *lp; -+ struct dentry *alternate; -+ char buf[IOPEN_NAME_LEN]; -+ -+ if (dentry->d_name.len >= IOPEN_NAME_LEN) -+ return ERR_PTR(-ENAMETOOLONG); -+ -+ memcpy(buf, dentry->d_name.name, dentry->d_name.len); -+ buf[dentry->d_name.len] = 0; -+ -+ if (strcmp(buf, ".") == 0) -+ ino = dir->i_ino; -+ else if (strcmp(buf, "..") == 0) -+ ino = EXT3_ROOT_INO; -+ else -+ ino = simple_strtoul(buf, 0, 0); -+ -+ if ((ino != EXT3_ROOT_INO && -+ //ino != EXT3_ACL_IDX_INO && -+ //ino != EXT3_ACL_DATA_INO && -+ ino < EXT3_FIRST_INO(dir->i_sb)) || -+ ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count)) -+ return ERR_PTR(-ENOENT); -+ -+ inode = iget(dir->i_sb, ino); -+ if (!inode) -+ return ERR_PTR(-EACCES); -+ if (is_bad_inode(inode)) { -+ iput(inode); -+ return ERR_PTR(-ENOENT); -+ } -+ -+ assert(list_empty(&dentry->d_alias)); /* d_instantiate */ -+ assert(d_unhashed(dentry)); /* d_rehash */ -+ -+ /* preferrably return a connected dentry */ -+ spin_lock(&dcache_lock); -+ list_for_each(lp, &inode->i_dentry) { -+ alternate = list_entry(lp, struct dentry, d_alias); -+ assert(!(alternate->d_flags & DCACHE_DISCONNECTED)); -+ } -+ -+ if (!list_empty(&inode->i_dentry)) { -+ alternate = list_entry(inode->i_dentry.next, -+ struct dentry, d_alias); -+ dget_locked(alternate); -+ spin_lock(&alternate->d_lock); -+ alternate->d_flags |= DCACHE_REFERENCED; -+ spin_unlock(&alternate->d_lock); -+ iput(inode); -+ spin_unlock(&dcache_lock); -+ return alternate; -+ } -+ dentry->d_flags |= DCACHE_DISCONNECTED; -+ -+ /* d_add(), but don't drop dcache_lock before adding dentry to inode */ -+ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ -+ dentry->d_inode = inode; -+ -+ d_rehash_cond(dentry, 0); /* d_rehash */ -+ spin_unlock(&dcache_lock); -+ -+ return NULL; -+} -+ -+#define do_switch(x,y) do { \ -+ __typeof__ (x) __tmp = x; \ -+ x = y; y = __tmp; } while (0) -+ -+static inline void switch_names(struct dentry *dentry, struct dentry *target) -+{ -+ const unsigned char *old_name, *new_name; -+ -+ memcpy(dentry->d_iname, target->d_iname, DNAME_INLINE_LEN_MIN); -+ old_name = target->d_name.name; -+ new_name = dentry->d_name.name; -+ if (old_name == target->d_iname) -+ old_name = dentry->d_iname; -+ if (new_name == dentry->d_iname) -+ new_name = target->d_iname; -+ target->d_name.name = new_name; -+ dentry->d_name.name = old_name; -+} -+ -+/* This function is spliced into ext3_lookup and does the move of a -+ * disconnected dentry (if it exists) to a connected dentry. -+ */ -+struct dentry *iopen_connect_dentry(struct dentry *dentry, struct inode *inode, -+ int rehash) -+{ -+ struct dentry *tmp, *goal = NULL; -+ struct list_head *lp; -+ -+ /* verify this dentry is really new */ -+ assert(dentry->d_inode == NULL); -+ assert(list_empty(&dentry->d_alias)); /* d_instantiate */ -+ if (rehash) -+ assert(d_unhashed(dentry)); /* d_rehash */ -+ assert(list_empty(&dentry->d_subdirs)); -+ -+ spin_lock(&dcache_lock); -+ if (!inode) -+ goto do_rehash; -+ -+ if (!test_opt(inode->i_sb, IOPEN)) -+ goto do_instantiate; -+ -+ /* preferrably return a connected dentry */ -+ list_for_each(lp, &inode->i_dentry) { -+ tmp = list_entry(lp, struct dentry, d_alias); -+ if (tmp->d_flags & DCACHE_DISCONNECTED) { -+ assert(tmp->d_alias.next == &inode->i_dentry); -+ assert(tmp->d_alias.prev == &inode->i_dentry); -+ goal = tmp; -+ dget_locked(goal); -+ break; -+ } -+ } -+ -+ if (!goal) -+ goto do_instantiate; -+ -+ /* Move the goal to the de hash queue */ -+ goal->d_flags &= ~DCACHE_DISCONNECTED; -+ security_d_instantiate(goal, inode); -+ __d_drop(dentry); -+ d_rehash_cond(dentry, 0); -+ __d_move(goal, dentry); -+ spin_unlock(&dcache_lock); -+ iput(inode); -+ -+ return goal; -+ -+ /* d_add(), but don't drop dcache_lock before adding dentry to inode */ -+do_instantiate: -+ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ -+ dentry->d_inode = inode; -+do_rehash: -+ if (rehash) -+ d_rehash_cond(dentry, 0); /* d_rehash */ -+ spin_unlock(&dcache_lock); -+ -+ return NULL; -+} -+ -+/* -+ * These are the special structures for the iopen pseudo directory. -+ */ -+ -+static struct inode_operations iopen_inode_operations = { -+ lookup: iopen_lookup, /* BKL held */ -+}; -+ -+static struct file_operations iopen_file_operations = { -+ read: generic_read_dir, -+}; -+ -+static int match_dentry(struct dentry *dentry, const char *name) -+{ -+ int len; -+ -+ len = strlen(name); -+ if (dentry->d_name.len != len) -+ return 0; -+ if (strncmp(dentry->d_name.name, name, len)) -+ return 0; -+ return 1; -+} -+ -+/* -+ * This function is spliced into ext3_lookup and returns 1 the file -+ * name is __iopen__ and dentry has been filled in appropriately. -+ */ -+int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry) -+{ -+ struct inode *inode; -+ -+ if (dir->i_ino != EXT3_ROOT_INO || -+ !test_opt(dir->i_sb, IOPEN) || -+ !match_dentry(dentry, "__iopen__")) -+ return 0; -+ -+ inode = iget(dir->i_sb, EXT3_BAD_INO); -+ -+ if (!inode) -+ return 0; -+ d_add(dentry, inode); -+ return 1; -+} -+ -+/* -+ * This function is spliced into read_inode; it returns 1 if inode -+ * number is the one for /__iopen__, in which case the inode is filled -+ * in appropriately. Otherwise, this fuction returns 0. -+ */ -+int ext3_iopen_get_inode(struct inode *inode) -+{ -+ if (inode->i_ino != EXT3_BAD_INO) -+ return 0; -+ -+ inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR; -+ if (test_opt(inode->i_sb, IOPEN_NOPRIV)) -+ inode->i_mode |= 0777; -+ inode->i_uid = 0; -+ inode->i_gid = 0; -+ inode->i_nlink = 1; -+ inode->i_size = 4096; -+ inode->i_atime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = CURRENT_TIME; -+ EXT3_I(inode)->i_dtime = 0; -+ inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size -+ * (for stat), not the fs block -+ * size */ -+ inode->i_blocks = 0; -+ inode->i_version = 1; -+ inode->i_generation = 0; -+ -+ inode->i_op = &iopen_inode_operations; -+ inode->i_fop = &iopen_file_operations; -+ inode->i_mapping->a_ops = 0; -+ -+ return 1; -+} -Index: linux-2.6.12-rc6/fs/ext3/iopen.h -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/iopen.h 2005-06-14 16:14:33.534835845 +0200 -+++ linux-2.6.12-rc6/fs/ext3/iopen.h 2005-06-14 16:14:33.633468657 +0200 -@@ -0,0 +1,15 @@ -+/* -+ * iopen.h -+ * -+ * Special support for opening files by inode number. -+ * -+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu). -+ * -+ * This file may be redistributed under the terms of the GNU General -+ * Public License. -+ */ -+ -+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry); -+extern int ext3_iopen_get_inode(struct inode *inode); -+extern struct dentry *iopen_connect_dentry(struct dentry *dentry, -+ struct inode *inode, int rehash); -Index: linux-2.6.12-rc6/fs/ext3/namei.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/namei.c 2005-06-14 16:01:14.701837819 +0200 -+++ linux-2.6.12-rc6/fs/ext3/namei.c 2005-06-14 16:14:33.644210844 +0200 -@@ -37,6 +37,7 @@ - #include <linux/buffer_head.h> - #include <linux/smp_lock.h> - #include "xattr.h" -+#include "iopen.h" - #include "acl.h" - - /* -@@ -985,6 +986,9 @@ - if (dentry->d_name.len > EXT3_NAME_LEN) - return ERR_PTR(-ENAMETOOLONG); - -+ if (ext3_check_for_iopen(dir, dentry)) -+ return NULL; -+ - bh = ext3_find_entry(dentry, &de); - inode = NULL; - if (bh) { -@@ -995,10 +999,8 @@ - if (!inode) - return ERR_PTR(-EACCES); - } -- if (inode) -- return d_splice_alias(inode, dentry); -- d_add(dentry, inode); -- return NULL; -+ -+ return iopen_connect_dentry(dentry, inode, 1); - } - - -@@ -2042,10 +2044,6 @@ - inode->i_nlink); - inode->i_version++; - inode->i_nlink = 0; -- /* There's no need to set i_disksize: the fact that i_nlink is -- * zero will ensure that the right thing happens during any -- * recovery. */ -- inode->i_size = 0; - ext3_orphan_add(handle, inode); - inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; - ext3_mark_inode_dirty(handle, inode); -@@ -2168,6 +2166,23 @@ - return err; - } - -+/* Like ext3_add_nondir() except for call to iopen_connect_dentry */ -+static int ext3_add_link(handle_t *handle, struct dentry *dentry, -+ struct inode *inode) -+{ -+ int err = ext3_add_entry(handle, dentry, inode); -+ if (!err) { -+ err = ext3_mark_inode_dirty(handle, inode); -+ if (err == 0) { -+ dput(iopen_connect_dentry(dentry, inode, 0)); -+ return 0; -+ } -+ } -+ ext3_dec_count(handle, inode); -+ iput(inode); -+ return err; -+} -+ - static int ext3_link (struct dentry * old_dentry, - struct inode * dir, struct dentry *dentry) - { -@@ -2191,7 +2206,8 @@ - ext3_inc_count(handle, inode); - atomic_inc(&inode->i_count); - -- err = ext3_add_nondir(handle, dentry, inode); -+ err = ext3_add_link(handle, dentry, inode); -+ ext3_orphan_del(handle, inode); - ext3_journal_stop(handle); - if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries)) - goto retry; -Index: linux-2.6.12-rc6/fs/ext3/super.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/ext3/super.c 2005-06-14 16:01:16.287775299 +0200 -+++ linux-2.6.12-rc6/fs/ext3/super.c 2005-06-14 16:14:33.656906156 +0200 -@@ -590,6 +590,7 @@ - Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, - Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, - Opt_ignore, Opt_barrier, Opt_err, Opt_resize, -+ Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, - }; - - static match_table_t tokens = { -@@ -638,6 +639,9 @@ - {Opt_ignore, "noquota"}, - {Opt_ignore, "quota"}, - {Opt_ignore, "usrquota"}, -+ {Opt_iopen, "iopen"}, -+ {Opt_noiopen, "noiopen"}, -+ {Opt_iopen_nopriv, "iopen_nopriv"}, - {Opt_barrier, "barrier=%u"}, - {Opt_err, NULL}, - {Opt_resize, "resize"}, -@@ -921,6 +925,18 @@ - else - clear_opt(sbi->s_mount_opt, BARRIER); - break; -+ case Opt_iopen: -+ set_opt (sbi->s_mount_opt, IOPEN); -+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; -+ case Opt_noiopen: -+ clear_opt (sbi->s_mount_opt, IOPEN); -+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; -+ case Opt_iopen_nopriv: -+ set_opt (sbi->s_mount_opt, IOPEN); -+ set_opt (sbi->s_mount_opt, IOPEN_NOPRIV); -+ break; - case Opt_ignore: - break; - case Opt_resize: -Index: linux-2.6.12-rc6/include/linux/ext3_fs.h -=================================================================== ---- linux-2.6.12-rc6.orig/include/linux/ext3_fs.h 2005-06-14 16:01:14.709650318 +0200 -+++ linux-2.6.12-rc6/include/linux/ext3_fs.h 2005-06-14 16:28:38.452794245 +0200 -@@ -358,6 +358,8 @@ - #define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */ - #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ - #define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */ -+#define EXT3_MOUNT_IOPEN 0x80000 /* Allow access via iopen */ -+#define EXT3_MOUNT_IOPEN_NOPRIV 0x100000/* Make iopen world-readable */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef _LINUX_EXT2_FS_H diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc3.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc3.series deleted file mode 100644 index 36610235b0..0000000000 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc3.series +++ /dev/null @@ -1,13 +0,0 @@ -ext3-wantedi-2.6-rhel4.patch -ext3-san-jdike-2.6-suse.patch -iopen-2.6-rhel4.patch -export_symbols-ext3-2.6-suse.patch -ext3-map_inode_page-2.6-suse.patch -ext3-ea-in-inode-2.6-rhel4.patch -export-ext3-2.6-rhel4.patch -ext3-include-fixes-2.6-rhel4.patch -ext3-extents-2.6.9-rhel4.patch -ext3-mballoc2-2.6.9-rhel4.patch -ext3-nlinks-2.6.9.patch -ext3-ialloc-2.6.patch -ext3-lookup-dotdot-2.6.9.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc5.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc5.series deleted file mode 100644 index 1c853bddf8..0000000000 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc5.series +++ /dev/null @@ -1,12 +0,0 @@ -ext3-wantedi-2.6-rhel4.patch -ext3-san-jdike-2.6-suse.patch -iopen-2.6-fc5.patch -ext3-map_inode_page-2.6-suse.patch -export-ext3-2.6-rhel4.patch -ext3-include-fixes-2.6-rhel4.patch -ext3-extents-2.6.15.patch -ext3-mballoc2-2.6-fc5.patch -ext3-nlinks-2.6.9.patch -ext3-ialloc-2.6.patch -ext3-remove-cond_resched-calls-2.6.12.patch -ext3-filterdata-2.6.15.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series deleted file mode 100644 index ee07d11812..0000000000 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series +++ /dev/null @@ -1,17 +0,0 @@ -ext3-wantedi-2.6-rhel4.patch -ext3-san-jdike-2.6-suse.patch -iopen-2.6-rhel4.patch -export_symbols-ext3-2.6-suse.patch -ext3-map_inode_page-2.6-suse.patch -ext3-ea-in-inode-2.6-rhel4.patch -export-ext3-2.6-rhel4.patch -ext3-include-fixes-2.6-rhel4.patch -ext3-extents-2.6.9-rhel4.patch -ext3-mballoc2-2.6.9-rhel4.patch -ext3-nlinks-2.6.9.patch -ext3-ialloc-2.6.patch -ext3-lookup-dotdot-2.6.9.patch -ext3-sector_t-overflow-2.6.9-rhel4.patch -ext3-check-jbd-errors-2.6.9.patch -ext3-nanosecond-2.6-rhel4.patch -ext3-extents-bug11324.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series deleted file mode 100644 index e9f3f1fb5a..0000000000 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series +++ /dev/null @@ -1,15 +0,0 @@ -ext3-wantedi-2.6-rhel4.patch -ext3-san-jdike-2.6-suse.patch -iopen-2.6-fc5.patch -ext3-map_inode_page-2.6-suse.patch -export-ext3-2.6-rhel4.patch -ext3-include-fixes-2.6-rhel4.patch -ext3-extents-2.6.16-sles10.patch -ext3-mballoc2-2.6-fc5.patch -ext3-nlinks-2.6.9.patch -ext3-ialloc-2.6.patch -ext3-remove-cond_resched-calls-2.6.12.patch -ext3-filterdata-2.6.15.patch -ext3-disable-write-bar-by-default-2.6-sles10.patch -ext3-nanosecond-2.6-sles10.patch -ext3-inode-version-2.6-sles10.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series deleted file mode 100644 index e27e861c1b..0000000000 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series +++ /dev/null @@ -1,17 +0,0 @@ -ext3-wantedi-2.6-suse.patch -ext3-san-jdike-2.6-suse.patch -iopen-2.6-suse.patch -export_symbols-ext3-2.6-suse.patch -ext3-map_inode_page-2.6-suse.patch -ext3-ea-in-inode-2.6-suse.patch -export-ext3-2.6-suse.patch -ext3-include-fixes-2.6-suse.patch -ext3-extents-2.6.5.patch -ext3-mballoc2-2.6-suse.patch -ext3-nlinks-2.6.7.patch -ext3-rename-reserve-2.6-suse.patch -ext3-ialloc-2.6.patch -ext3-lookup-dotdot-2.6.9.patch -ext3-sector_t-overflow-2.6.5-suse.patch -ext3-check-jbd-errors-2.6.5.patch -ext3-nanosecond-2.6-suse.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6.12-vanilla.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6.12-vanilla.series deleted file mode 100644 index 53c060b352..0000000000 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6.12-vanilla.series +++ /dev/null @@ -1,15 +0,0 @@ -ext3-wantedi-2.6-rhel4.patch -ext3-san-jdike-2.6-suse.patch -iopen-2.6.12.patch -ext3-map_inode_page-2.6-suse.patch -export-ext3-2.6-rhel4.patch -ext3-include-fixes-2.6-rhel4.patch -ext3-extents-2.6.12.patch -ext3-mballoc2-2.6.12.patch -ext3-nlinks-2.6.9.patch -ext3-ialloc-2.6.patch -ext3-remove-cond_resched-calls-2.6.12.patch -ext3-htree-dot-2.6.patch -ext3-external-journal-2.6.12.patch -ext3-lookup-dotdot-2.6.9.patch -ext3-sector_t-overflow-2.6.12.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series deleted file mode 100644 index 350067db39..0000000000 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series +++ /dev/null @@ -1,14 +0,0 @@ -ext3-wantedi-2.6-rhel4.patch -ext3-san-jdike-2.6-suse.patch -iopen-2.6-fc5.patch -ext3-map_inode_page-2.6-suse.patch -export-ext3-2.6-rhel4.patch -ext3-include-fixes-2.6-rhel4.patch -ext3-extents-2.6.18-vanilla.patch -ext3-mballoc2-2.6.18-vanilla.patch -ext3-nlinks-2.6.9.patch -ext3-ialloc-2.6.patch -ext3-remove-cond_resched-calls-2.6.12.patch -ext3-filterdata-2.6.15.patch -ext3-nanosecond-2.6.18-vanilla.patch -ext3-inode-version-2.6.18-vanilla.patch diff --git a/ldiskfs/ldiskfs/Makefile.in b/ldiskfs/ldiskfs/Makefile.in deleted file mode 100644 index eeb1bed045..0000000000 --- a/ldiskfs/ldiskfs/Makefile.in +++ /dev/null @@ -1,21 +0,0 @@ -default: all - -MODULES := ldiskfs - -# copy makefile over to not break patches -ext3_extra := $(wildcard @LINUX@/fs/ext3/Makefile) - -ext3_headers := $(wildcard @LINUX@/fs/ext3/*.h) -linux_headers := $(wildcard @LINUX@/include/linux/ext3*.h) - -ext3_sources := $(filter-out %.mod.c,$(wildcard @LINUX@/fs/ext3/*.c)) -new_sources := iopen.c iopen.h extents.c mballoc.c -new_headers := ext3_extents.h -ldiskfs_patched_sources := $(notdir $(ext3_sources) $(ext3_headers)) $(new_sources) $(new_headers) -ldiskfs_sources := $(ldiskfs_patched_sources) - -ldiskfs-objs := $(filter %.o,$(ldiskfs_sources:.c=.o)) - -EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LUSTRE@ -I@LUSTRE@/ldiskfs - -@INCLUDE_RULES@ diff --git a/ldiskfs/ldiskfs/autoMakefile.am b/ldiskfs/ldiskfs/autoMakefile.am deleted file mode 100644 index 8ac1b877ba..0000000000 --- a/ldiskfs/ldiskfs/autoMakefile.am +++ /dev/null @@ -1,80 +0,0 @@ -if MODULES -if LDISKFS -modulefs_DATA = ldiskfs$(KMODEXT) -endif -endif - -ldiskfs_linux_headers := $(addprefix linux/,$(subst ext3,ldiskfs,$(notdir $(linux_headers)))) - -$(filter %.c,$(ldiskfs_patched_sources)): sources $(ldiskfs_linux_headers) $(filter %.h,$(ldiskfs_patched_sources)) - -ldiskfs_sed_flags = \ - -e "s/dx_hash_info/ext3_dx_hash_info/g" \ - -e "s/dir_private_info/ext3_dir_private_info/g" \ - -e "s/DX_HASH/EXT3_DX_HASH/g" \ - -e "s/reserve_window/ext3_reserve_window/g" \ - -e "s/rsv_window_add/ext3_rsv_window_add/g" \ - -e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g" - -%.c: linux-stage/fs/ext3/%.c - sed $(strip $(ldiskfs_sed_flags)) $< > $@ - -%.h: linux-stage/fs/ext3/%.h - sed $(strip $(ldiskfs_sed_flags)) $< > $@ - -linux/ldiskfs%.h: linux-stage/include/linux/ext3%.h - sed $(strip $(ldiskfs_sed_flags)) $< > $@ - -# -# FIXME: we need to grab the series in configure somehow -# (see bug 1679) -# -series := @top_srcdir@/lustre/kernel_patches/series/ldiskfs-$(LDISKFS_SERIES) -patches := @top_srcdir@/lustre/kernel_patches/patches - -sources: $(ext3_sources) $(ext3_headers) $(linux_headers) $(series) - rm -rf linux-stage linux sources $(ldiskfs_SOURCES) - mkdir -p linux-stage/fs/ext3 linux-stage/include/linux - cp $(ext3_sources) $(ext3_headers) $(ext3_extra) linux-stage/fs/ext3 - cp $(linux_headers) linux-stage/include/linux -if USE_QUILT - ln -s ../$(patches) linux-stage/patches - ln -s ../$(series) linux-stage/series - cd linux-stage && quilt push -a -q -else - @echo -n "Applying ext3 patches:" - @cd linux-stage && for i in $$(<../$(series)) ; do \ - echo -n " $$i" ; \ - patch -s -p1 < ../$(patches)/$$i || exit 1 ; \ - done - @echo -endif - mkdir linux - @echo -n "Replacing 'ext3' with 'ldiskfs':" - @for i in $(notdir $(ext3_headers) $(ext3_sources)) $(new_sources) ; do \ - echo -n " $$i" ; \ - sed $(strip $(ldiskfs_sed_flags)) \ - linux-stage/fs/ext3/$$i > $$i ; \ - done - @for i in $(subst ext3,,$(notdir $(linux_headers) $(new_headers))) ; do \ - echo -n " ext3$$i" ; \ - sed $(strip $(ldiskfs_sed_flags)) \ - linux-stage/include/linux/ext3$$i \ - > linux/ldiskfs$$i ; \ - done - @echo - touch sources - -foo-check: - @echo "ldiskfs_sources: $(ldiskfs_sources)" - @echo "ldiskfs_SOURCES: $(ldiskfs_SOURCES)" - @echo "ldiskfs_headers: $(ldiskfs_headers)" - @echo "ldiskfs_objects: $(ldiskfs_objects)" - @echo "ldiskfs_OBJECTS: $(ldiskfs_OBJECTS)" - @echo "ldiskfs_LDADD: $(ldiskfs_LDADD)" - -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ -CLEANFILES = sources $(notdir $(linux_headers) $(ext3_headers) $(ext3_sources) $(new_sources) $(new_headers)) - -clean: clean-am - rm -rf linux linux-stage diff --git a/lustre/.cvsignore b/lustre/.cvsignore deleted file mode 100644 index 07a5c92e26..0000000000 --- a/lustre/.cvsignore +++ /dev/null @@ -1,30 +0,0 @@ -.Xrefs -.Xrefs-2.5 -aclocal.m4 -config.log -config.status -config.cache -config.guess -config.sub -configure -Makefile -autoMakefile -autoMakefile.in -.deps -tags -TAGS -lustre*.tar.gz -cscope.files -cscope.out -autom4te-2.53.cache -autom4te.cache -depcomp -compile -.*.cmd -.mergeinfo-* -Rules -missing -mkinstalldirs -install-sh -.depend -.tmp_versions diff --git a/lustre/BUGS b/lustre/BUGS deleted file mode 100644 index ba84777a16..0000000000 --- a/lustre/BUGS +++ /dev/null @@ -1 +0,0 @@ -To report bugs, please visit http://bugzilla.clusterfs.com/ diff --git a/lustre/BUILDING b/lustre/BUILDING deleted file mode 100644 index 1c69d3c852..0000000000 --- a/lustre/BUILDING +++ /dev/null @@ -1,30 +0,0 @@ -BUILDING LUSTRE ---------------- - -You must already have a Lustre-patched kernel, which is outside of the -scope of this document. For more information on this process, see the -web sites below. Also consider downloading a pre-packaged Lustre -kernel and utilities from http://www.lustre.org/downloads.html - -To build: - sh autogen.sh - ./configure --with-linux=/usr/src/lustre_patched_kernel_tree - make - -To play with Lustre: - cd tests - sh llmount.sh - -To clean up: - sh llmountcleanup.sh - -More information about Lustre: - http://www.lustre.org/ - -More information about Cluster File Systems: - http://www.clusterfs.com/ - -Feedback: - lustre-discuss@lists.clusterfs.com - -- The Lustre Team - diff --git a/lustre/ChangeLog b/lustre/ChangeLog deleted file mode 100644 index dc6bed354f..0000000000 --- a/lustre/ChangeLog +++ /dev/null @@ -1,5207 +0,0 @@ -tbd Sun Microsystems, Inc. - * version 1.6.5 - * Support for kernels: - 2.6.5-7.311 (SLES 9), - 2.6.9-67.0.7.EL (RHEL 4), - 2.6.16.54-0.2.5 (SLES 10), - 2.6.18-53.1.14.el5 (RHEL 5), - 2.6.18.8 vanilla (kernel.org) - 2.6.22.14 vanilla (kernel.org) - * Client support for unpatched kernels: - (see http://wiki.lustre.org/index.php?title=Patchless_Client) - 2.6.16 - 2.6.22 vanilla (kernel.org) - * Due to problems with nested symlinks and FMODE_EXEC (bug 12652), - we do not recommend using patchless RHEL4 clients with kernels - prior to 2.6.9-55EL (RHEL4U5). - * Recommended e2fsprogs version: 1.40.7-sun1 - * Note that reiserfs quotas are disabled on SLES 10 in this kernel. - * RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a - removed cwd "./" (refer to Bugzilla 14399). - -Severity : normal -Bugzilla : 15069 -Description: don't put request into delay list while invalidate in flight. -Details : ptlrpc_delay_request sometimes put in delay list while invalidate - import in flight. this produce timeout for invalidate and sometimes - can cause stale data. - -Severity : enhancement -Bugzilla : 15416 -Description: Update kernel to SLES9 2.6.5-7.311. - -Severity : enhancement -Bugzilla : 15240 -Description: Update kernel to RHEL4 2.6.9-67.0.7. - -Severity : minor -Bugzilla : 14856 -Frequency : on ppc only -Description: not convert ost objects for directory because it's not exist. -Details : ll_dir_getstripe assume dirrectory has ost objects but this wrong. - -Severity : minor -Bugzilla : 15517 -Description: Fix warnings with compile liblustre at sles10/rhel5 which have - __u64 as usingied long long type. - -Severity : minor -Bugzilla : 15210 -Frequency : rare, on shutdown -Description: race process ast vs remove callback -Details : removing callback before disconnect import open race with processing - callback. - -Severity : enhancement -Bugzilla : 15416 -Description: Update kernel to SLES9 2.6.5-7.311. - -Severity : normal -Bugzilla : 12652 -Description: Add FMODE_EXEC to SLES10 SP1 series. - -Severity : enhancement -Bugzilla : 13397 -Description: Add server support for vanilla-2.6.22.14. - -Severity : normal -Bugzilla : 13375 -Descriptoin: make lov_create() will not stuck in obd_statfs_rqset() -Details : If an OST is down the MDS will hang indefinitely in - obd_statfs_rqset() waiting for the statfs data. While for - MDS QOS usage of statfs, it should not stuck in waiting. - -Severity : normal -Bugzilla : 3055 -Description: Disable adaptive timeouts by default - -Severity : major -Bugzilla : 15027 -Frequency : on network error -Description: panic with double free request if network error -Details : mdc_finish_enqueue is finish request if any network error occuring, - but it's true only for synchronus enqueue, for async enqueue - (via ptlrpcd) this incorrect and ptlrpcd want finish request - himself. - -Severity : normal -Bugzilla : 14533 -Frequency : rare, on recovery -Description: read procfs can produce deadlock in some situation -Details : Holding lprocfs lock with send rpc can produce block for destroy - obd objects and this also block reconnect with -EALREADY. This isn't - fix all lprocfs bugs - but make it rare. - -Severity : enhancement -Bugzilla : 15152 -Description: Update kernel to RHEL5 2.6.18-53.1.14.el5. - -Severity : major -Frequency : frequent on X2 node -Bugzilla : 15010 -Description: mdc_set_open_replay_data LBUG -Details : Set replay data for requests that are eligible for replay. - -Severity : normal -Bugzilla : 14321 -Description: lustre_mgs: operation 101 on unconnected MGS -Details : When MGC is disconnected from MGS long enough, MGS will evict the - MGC, and late on MGC cannot successfully connect to MGS and a lot - of the error messages complaining that MGS is not connected. - -Severity : major -Frequency : rare, depends on device drivers and load -Bugzilla : 14529 -Description: MDS or OSS nodes crash due to stack overflow -Details : Code changes in 1.6.4 increased the stack usage of some functions. - In some cases, in conjunction with device drivers that use a lot - of stack, the MDS (or possibly OSS) service threads could overflow - the stack. One change which was identified to consume additional - stack has been reworked to avoid the extra stack usage. - -Severity : enhancement -Bugzilla : 14876 -Description: Update to RHEL5 latest kernel-2.6.18-53.1.13.el5. - -Severity : enhancement -Bugzilla : 14858 -Description: Update to SLES10 SP1 latest kernel-2.6.16.54-0.2.5. - -Severity : enhancement -Bugzilla : 14720 -Description: Update to RHEL5 latest kernel-2.6.18-53.1.6.el5. - -Serverity : enhancement -Bugzilla : 14793 -Description: Update RHEL4 kernel to 2.6.9-67.0.4. - -Severity : minor -Frequency : rare on shutdown ost -Bugzilla : 13196 -Description: Don't allow skipping OSTs if index has been specified. -Details : Don't allow skipping OSTs if index has been specified, make locking - in internal create lots better. - -Severity : normal -Bugzilla : 14421 -Description: ASSERTION(!PageDirty(page)) failed -Details : Wrong check could lead to an assertion failure under specific - load patterns. - -Severity : normal -Bugzilla : 12228 -Description: LBUG in ptlrpc_check_set() bad phase ebc0de00 -Details : access to bitfield in structure is always rounded to long - and this produce problem with not atomic change any bit. - -Severity : normal -Bugzilla : 13647 -Description: Lustre make rpms failed. -Details : Remove ldiskfs spec file to avoids rpmbuild be confused when - builds Lustre rpms from tarball. - -Severity : enhancement -Bugzilla : 14498 -Description: Update to SLES9 SP4 kernel-2.6.5-7.308. - -Severity : normal -Frequency : rare on shutdown ost -Bugzilla : 14608 -Description: If llog cancel was not send before clean_exports phase, this can - produce deadlock in llog code. -Details : If llog thread has last reference to obd and call class_import_put - this produce deadlock because llog_cleanup_commit_master wait when - last llog_commit_thread exited, but this never success because was - called from llog_commit_thread. - -Severity : normal -Bugzilla : 14607 -Description: NULL lov_tgts causing MDS oops -Details : more safe checks for NULL lov_tgts for avoid oops. - -Severity : enhancement -Bugzilla : 14531 -Description: Update to RHEL4 latest kernel-2.6.9-67.0.1.EL. - -Severity : enhancement -Bugzilla : 14368 -Description: Update to RHEL5 latest kernel-2.6.18-53.1.4.el5. - -Severity : normal -Bugzilla : 14136 -Description: make mgs_setparam() handle fsname containing dash -Details : fsname containing a dash does not work with lctl conf_param - -Severity : enhancement -Bugzilla : 14288 -Description: Update to RHEL4 Update-6 kernel-2.6.9-67.EL. - -Severity : normal -Bugzilla : 12702 -Frequency : rare, in recovery and (or) destroy lovobjid file. -Description: rewrite lov objid code. -Details : Cleanup for lov objid code, remove scability problems and wrong - locking. Fix sending last_id into ost. - -Severity : enhancement -Bugzilla : 14388 -Description: Update to SLES10 SP1 latest kernel-2.6.16.54-0.2.3. - -Severity : enhancement -Bugzilla : 14289 -Description: Update to RHEL5 Update-1 kernel 2.6.18-53.el5. -Details : Use d_move_locked instead of __d_move. - -Severity : major -Bugzilla : 14260 -Frequency : rare, at shutdown -Description: access already free / zero obd_namespace. -Details : if client_disconnect_export was called without force flag set, - and exist connect request in flight, this can produce access to - NULL pointer (or already free pointer) when connect_interpret - store ocd flags in obd_namespace. - -Severity : minor -Bugzilla : 14418 -Frequency : only at startup -Description: not alloc memory with spinlock held. -Details : allocation memory with GFP_KERNEL can produce sleep deadlock, - if any spinlock held. - -Severity : major -Frequency : always -Bugzilla : 14270 -Description: lfs find does not continue on file error -Details : Continue other files processing when a file/dir is absent. - -Severity : normal -Bugzilla : 11791 -Description: Inconsistent usage of lustre_pack_reply() -Details : Standardize the usage of lustre_pack_reply() such that it - always generate a CERROR on failure. - -Severity : normal -Frequency : very rare -Bugzilla : 3462 -Description: Fix replay if there is an un-replied request and open -Details : In some cases, older replay request will revert the - mcd->mcd_last_xid on MDS which is used to record the client's - latest sent request. - -Severity : enhancement -Bugzilla : 13969 -Description: Update to RHEL5 kernel 2.6.18-8.1.15.el5. - -Severity : enhancement -Bugzilla : 13874 -Description: Update to SLES10 SP1 kernel 2.6.16.53-0.16 - -Severity : enhancement -Bugzilla : 13889 -Description: Update to SLES9 kernel-2.6.5-7.287.3. - -Severity : enhancement -Bugzilla : 14041 -Description: Update to RHEL4 kernel-2.6.9-55.0.12.EL. - -Severity : enhancement -Bugzilla : 13690 -Description: Build SLES10 patchless client fails -Details : The configure was broken by run ./configure with - --with-linux-obj=.... argument for patchless client. When the - configure use --with-linux-obj, the LINUXINCLUDE= -Iinclude - can't search header adequately. Use absolute path such as - -I($LINUX)/include instead. - -Severity : enhancement -Bugzilla : 11622 -Description: Lustre Page Accounting -Details : New macros for page alloc and free which enable accounting - of page allocation of Lustre. Use percpu counters to store memory - and page statistics. - -Severity : normal -Frequency : only if debugging is disabled -Bugzilla : 13497 -Description: LASSERT_{REQ,REP}SWAB macros are buggy -Details : If SWAB_PARANOIA is disabled, the LASSERT_REQSWAB and - LASSERT_REPSWAB macros become no-ops, which is incorrect. Drop - these macros and replace them with their difinitions instead. - -Severity : normal -Frequency : rarely -Bugzilla : 13888 -Description: interrupt oig_wait produce painc on resend. -Details : brw_redo_request can be used for resend requests from ptlrpcd and - private set, and this produce situation when rq_ptlrpcd_data not - copyed to new allocated request and triggered LBUG on assert - req->rq_ptlrpcd_data != NULL. But this member used only for wakeup - ptlrpcd set if request is changed and can be safety changed to use - rq_set directly. - -Severity : enhancement -Bugzilla : 11089 -Description: organize the server-side client stats on per-nid basis -Details : Change the structure of stats under obdfilter and mds to - New structure: - +- exports - +- nid#1 - | + stats - | + uuids - +- nid#2... - +- clear - The "uuid"s file would list the uuids of _active_ exports. - And the clear entry is to clear all stats and stale nids. - -Severity : normal -Frequency : rare -Bugzilla : 12266 -Description: Processes looping in ll_readdir() on Lustre clients finally causing - a full node pseudo-hang -Details : Concurrent access to the same directory from multiple clients with - intensive file creation/removal can cause a client node to spin in - ll_readdir(). i_version must be increased every time the lock is - cancelled to ensure a revalidate is done. - -Severity : normal -Frequency : always -Bugzilla : 13976 -Description: touch file failed when fs is not full -Details : OST in recovery should not be discarded by MDS in alloc_qos(), - otherwise we can get ENOSP while fs is not full. - -Severity : normal -Frequency : only for Cray XT3 -Bugzilla : 12829/13455 -Description: Changing primary group doesn't change the group lustre assigns to - a file -Details : When CRAY_XT3 is defined, the fsgid supplied by the client is - overridden with the primary group provided by the group upcall, - whereas the supplied fsgid can be trusted if it is in the list of - supplementary groups returned by the group upcall. - -Severity : normal -Bugzilla : 12749 -Description: Root Squash Functionality -Details : Implementation of NFS-like root squash capability. Specifically, - don't allow someone with root access on a client node to be able - to manipulate files owned by root on a server node. - -Severity : normal -Bugzilla : 10718 -Description: Slow trucate/writes to huge files at high offsets. -Details : Directly associate cached pages to lock that protect those pages, - this allows us to quickly find what pages to write and remove - once lock callback is received. - -Severity : normal -Bugzilla : 14379 -Description: Too many locks accumulating on client during NFS usage -Details : mds_open improperly used accmode to find out access mode to a - file. Also mdc_intent_lock logic to find out if we already have - lock similar to just received was flawed since introduction of - skiplists - locks are now added to the front of the granted - queue. - -Severity : normal -Bugzilla : 14477 -Description: Hit ASSERTION(obd->obd_stopping == 1) failed in some setup failed - situation. -Details : In obd setup failure handler, obd_stopping will not necessarily to - be 1, and obd_set_up should also be checked to make sure whether - obd is completely setup. - -Severity : enhancement -Bugzilla : 14398 -Description: Allow masking D_WARNING, D_ERROR messages from console -Details : Console messages can now be disabled via lnet.printk. - -Severity : normal -Bugzilla : 14614 -Description: User code with malformed file open parameter crashes client node -Details : Before packing join_file req, all the related reference should be - checked carefully in case some malformed flags cause fake join_file - req on client. - -Severity : normal -Frequency : always -Bugzilla : 10600 -Description: shrink/enlarge qunit size when needed; fix the problem of coarse - grain of quota doing harm to quota's accuracy -Details : qunit size will be changed when quota limitation is too low/high; - record the pending quota write in order to get more accureate - quota; delete the patch for bug12588, which is unnecessary when - this patch is landed. This bug also contains fixes for bug 14526, - 14299, 14601 and 13794. - -Severity : normal -Bugzilla : 14225 -Description: LDLM_ENQUEUE races with LDLM_CP_CALLBACK -Details : ldlm_completion_ast() assumes that a lock is granted when the req - mode is equal to the granted mode. However, it should also check - that LDLM_FL_CP_REQD is not set. - -Severity : normal -Bugzilla : 14360 -Description: Heavy nfs access might result in deadlocks -Details : After ELC code landed, it is now improper to enqueue any mds - locks under och_sem, because enqueue might want to decide to - cancel open locks for same inode we are holding och_sem for. - -Severity : normal -Bugzilla : 14443 -Description: 35% write performance drop with ldiskfs2 when quotas are on -Details : Enable ext3 journalled quota by default to improve performance - when quotas are turned on. - -Severity : normal -Bugzilla : 13843 -Description: Client eviction while running blogbench -Details : A lot of unlink operations with concurrent I/O can lead to a - deadlock causing evictions. To address the problem, the number of - oustanding OST_DESTROY requests is now throttled to - max_rpcs_in_flight per OSC and LDLM_FL_DISCARD_DATA blocking - callbacks are processed in priority. - -Severity : normal -Frequency : RHEL4 only -Bugzilla : 14618 -Description: mkfs is very slow on IA64/RHEL4 -Details : A performance regression has been discovered in the MPT Fusion - driver between versions 3.02.73rh and 3.02.99.00rh. As a - consequence, we have downgraded the MPT Fusion driver in the RHEL4 - kernel from 3.02.99.00 to 3.02.73 until this problem is fixed. - -Severity : normal -Frequency : PPC/PPC64 only -Bugzilla : 14845 -Description: conflicts between asm-ppc64/types.h and lustre_types.h -Details : fix duplicated definitions between asm-ppc64/types.h and - lustre_types.h on PPC. - -Severity : normal -Frequency : PPC/PPC64 only -Bugzilla : 14844 -Description: asm-ppc/segment.h does not exist -Details : fix compile issue on PPC. - -Severity : normal -Bugzilla : 13805 -Description: data checksumming impacts single node performance -Details : add support for several checksum algorithms. Currently, CRC32 and - Adler-32 are supported. The checksum type can be changed on the fly - through /proc/fs/lustre/osc/*/checksum_type. - -Severity : normal -Bugzilla : 14648 -Description: use adler32 for page checksums -Details : when available, use the Adler-32 algorithm instead of CRC32 for - page checksums. - -Severity : normal -Bugzilla : 14864 -Description: better handle error messages in extents code - -Severity : enhancement -Bugzilla : 14729 -Description: SNMP support enhancement -Details : Adding total number of sampled request for an MDS node in snmp - support. - -Severity : enhancement -Bugzilla : 14748 -Description: Optimize ldlm waiting list processing for PR extent locks -Details : When processing waiting list for read extent lock and meeting read - lock that is same or wider to it that is not contended, skip - processing rest of the list and immediatelly return current - status of conflictness, since we are guaranteed there are no - conflicting locks in the rest of the list. - -Severity : normal -Bugzilla : 14774 -Description: Time out and refuse to reconnect -Details : When the failover node is the primary node, it is possible - to have two identical connections in imp_conn_list. We must - compare not conn's pointers but NIDs, otherwise we - can defeat connection throttling. - -Severity : major -Bugzilla : 14775 -Description: Client not clear own cache if answer to reconnect is lost. -Details : Client gets evicted from server. Now client also thinks it is - disconnected (or gets ENOTCONN on its operation) and decides to - reconnect. Server receives reconnect message, but cannot find - export. New export is created that is fully valid (new cookie!), - but reply is lost and not reported to client. Client reconnects - again and gets back a just-created connection, but it is not new - so client thinks it was not evicted and does not do recovery. - -Severity : normal -Bugzilla : 14483 -Description: Detect stride IO mode in read-ahead -Details : When a client does stride read, read-ahead should detect that and - read-ahead pages according to the detected stride pattern. - -Severity : normal -Bugzilla : 15033 -Description: build for x2 fails -Details : fix compile issue on Cray systems. - -Severity : enhancement -Bugzilla : 13371 -Description: implement readv/writev APIs(aio_read/aio_writes in newer kernels) -Details : This greatly improves speed of NFS writes on 2.6 kernels. - -Severity : normal -Frequency : only on PPC/SLES10 -Bugzilla : 14855 -Description: "BITS_PER_LONG is not 32 or 64" in linux/idr.h -Details : On SLES10/PPC, fs.h includes idr.h which requires BITS_PER_LONG to - be defined. Add a hack in mkfs_lustre.c to work around this compile - issue. - -Severity : normal -Bugzilla : 14257 -Description: LASSERT on MDS when client holding flock lock dies -Details : ldlm pool logic depends on number of granted locks equal to - number of released locks which is not true for flock locks, so - just exclude such locks from consideration. - -Severity : normal -Bugzilla : 15188 -Description: MDS deadlock with many ll_sync_lov threads and I/O stalled -Details : Use fsfilt_sync() for both the whole filesystem sync and - individual file sync to eliminate dangerous inode locking - with I_LOCK that can lead to a deadlock. - -Severity : minor -Bugzilla : 15566 -Description: Update an obsolete wirecheck.c generator -Details : Update wirecheck.c/wirehdr.c and regenerate wiretest.c - -Severity : normal -Bugzilla : 14712 -Description: Client can panic on open sometimes -Details : It is possible that we try to free already freed request in - ll_file_open in some error cases when we send request from - ll_file_open - --------------------------------------------------------------------------------- - -2007-12-07 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.6.4 - * Support for kernels: - 2.6.5-7.286 (SLES 9), - 2.6.9-55.0.9.EL (RHEL 4), - 2.6.16.53-0.8 (SLES 10), - 2.6.18-8.1.14.el5 (RHEL 5), - 2.6.18.8 vanilla (kernel.org) - * Client support for unpatched kernels: - (see http://wiki.lustre.org/index.php?title=Patchless_Client) - 2.6.16 - 2.6.22 vanilla (kernel.org) - * Due to recently discovered recovery problems, we do not recommend - using patchless RHEL 4 clients with this or any earlier release. - * Recommended e2fsprogs version: 1.40.2-cfs1 - * Note that reiserfs quotas are disabled on SLES 10 in this kernel. - -Severity : major -Frequency : occasional -Bugzilla : 13917 -Description: MDS hang or stay in waiting lock -Details : If client receive lock with CBPENDING flag ldlm need send lock - cancel as separate rpc, to avoid situation when cancel request - can't processed due all i/o threads stay in wait lock. - -Severity : normal -Frequency : occasional -Bugzilla : 13730 -Description: Do not fail import if osc_interpret_create gets -EAGAIN -Details : If osc_interpret_create got -EAGAIN it immediately exits and - wakeup oscc_waitq. After wakeup oscc_wait_for_objects call - oscc_has_objects and see OSC has no objests and call - oscc_internal_create to resend create request. - -Severity : enhancement -Bugzilla : 13521 -Description: Update kernel patches for SLES10 2.6.16.53-0.8. -Details : Update which_patch & target file for SLES10 latest kernel. - -Severity : enhancement -Bugzilla : 13128 -Description: add --type and --size parameters to lfs find -Details : Enhance lfs find by adding filetype and filesize parameters. Also - multiple OBDs can now be specified for the --obd option. - -Severity : enhancement -Bugzilla : 11270 -Description: eliminate client locks in face of contention -Details : file contention detection and lockless i/o implementation - for contended files. - -Severity : enhancement -Bugzilla : 12411 -Description: Remove client patches from SLES 10 kernel. -Details : This causes SLES 10 clients to behave as patchless clients - even on a Lustre-patched (server) kernel. - -Severity : enhancement -Bugzilla : 2369 -Description: use i_size_read and i_size_write in 2.6 port -Details : replace inode->i_size access with i_size_read/write() - -Severity : normal -Frequency : when removing large files -Bugzilla : 13181 -Description: scheduling issue during removal of large Lustre files -Details : Don't take the BKL in fsfilt_ext3_setattr() for 2.6 kernels. - It causes scheduling issues when removing large files (17TB in the - present case). - -Severity : normal -Frequency : always -Bugzilla : 13358 -Description: 1.4.11 Can't handle directories with stripe set and extended ACLs -Details : Impossible (EPROTO is returned) to access a directory that has a - non-default striping and ACLs. - -Severity : normal -Frequency : only on ppc -Bugzilla : 12234 -Description: /proc/fs/lustre/devices broken on ppc -Details : The patch as applied to 1.6.2 doesn't look correct for all arches. - We should make sure the type of 'index' is loff_t and then cast - explicitly as needed below. Do not assign an explicitly cast - loff_t to an int. - -Severity : normal -Frequency : only for rhel5 -Bugzilla : 13616 -Description: Kernel patches update for RHEL5 2.6.18-8.1.10.el5. -Details : Modify the target file & which_kernel. - -Severity : normal -Frequency : if the uninit_groups feature is enabled on ldiskfs -Bugzilla : 13706 -Description: e2fsck reports "invalid unused inodes count" -Details : If a new ldiskfs filesystem is created with the "uninit_groups" - feature and only a single inode is created in a group then the - "bg_unused_inodes" count is incorrectly updated. Creating a - second inode in that group would update it correctly. - -Severity : minor -Frequency : rarely -Bugzilla : 12948 -Description: buffer overruns could theoretically occur -Details : llapi_semantic_traverse() modifies the "path" argument by - appending values to the end of the origin string, and a buffer - overrun may occur. Adding buffer overrun check in liblustreapi. - -Severity : enhancement -Bugzilla : 13454 -Description: Add jbd statistics patch for RHEL5 and 2.6.18-vanilla. - -Severity : normal -Frequency : only if filesystem is inconsistent -Bugzilla : 11673 -Description: handle "serious error: objid * already exists" more gracefully -Details : If LAST_ID value on disk is smaller than the objects existing in - the O/0/d* directories, it indicates disk corruption and causes an - LBUG(). If the object is 0-length, then we should use the existing - object. This will help to avoid a full fsck in most cases. - -Severity : enhancement -Bugzilla : 13518 -Description: Kernel patches update for RHEL4 2.6.9-55.0.6. -Details : Modify vm-tunables-rhel4.patch. - -Severity : enhancement -Bugzilla : 13452 -Description: Kernel config for 2.6.18-vanilla. -Details : Modify targets/2.6-vanilla.target.in. - Add config file kernel-2.6.18-2.6-vanilla-i686.config. - Add config file kernel-2.6.18-2.6-vanilla-i686-smp.config. - Add config file kernel-2.6.18-2.6-vanilla-x86_64.config. - Add config file kernel-2.6.18-2.6-vanilla-x86_64-smp.config. - -Severity : major -Frequency : occasional -Bugzilla : 11710 -Description: improve handling recoverable errors -Details : If request processed with error which can be recoverable on server - request should be resend, otherwise page released from cache and - marked as error. - -Severity : critical -Frequency : always -Bugzilla : 13751 -Description: Kernel patches update for RHEL5 2.6.18-8.1.14.el5. -Details : Modify target file & which_patch. - A flaw was found in the IA32 system call emulation provided - on AMD64 and Intel 64 platforms. An improperly validated 64-bit - value could be stored in the %RAX register, which could trigger an - out-of-bounds system call table access. An untrusted local user - could exploit this flaw to run code in the kernel - (ie a root privilege escalation). (CVE-2007-4573). - -Severity : minor -Bugzilla : 13732 -Description: change order of libsysio includes -Details : '#include sysio.h' should always come before '#include xtio.h' - -Severity : enhancement -Bugzilla : 13207 -Description: adapt the lustre_config script to support the upgrade case -Details : Add "-u" option for lustre_config script to support upgrading 1.4 - server targets to 1.6 in parallel. - -Severity : normal -Frequency : rarely -Bugzilla : 13570 -Description: To avoid grant space > avaible space when the disk is almost - full. Without this patch you might see the error "grant XXXX > - available" or some LBUG about grant, when the disk is almost - full. -Details : In filter_check_grant, for non_grant cache write, we should - check the left space by if (*left > ungranted + bytes), instead - of (*left > ungranted), because only we are sure the left space - is enough for another "bytes", then the ungrant space should be - increase. In client, we should update cl_avail_grant only there is - OBD_MD_FLGRANT in the reply. - -Severity : critical -Frequency : always -Bugzilla : 13748 -Description: Update RHEL 4 kernel to fix local root privilege escalation. -Details : Update to the latest RHEL 4 kernel to fix the vulnerability - described in CVE-2007-4573. This problem could allow untrusted - local users to gain root access. - -Severity : normal -Frequency : when using O_DIRECT and quotas -Bugzilla : 13930 -Description: Incorrect file ownership on O_DIRECT output files -Details : block usage reported by 'lfs quota' does not take into account - files that have been written with O_DIRECT. - --------------------------------------------------------------------------------- - -2007-09-27 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.6.3 - * Support for kernels: - 2.6.5-7.286 (SLES 9), - 2.6.9-55.0.2.EL (RHEL 4), - 2.6.16.46-0.14 (SLES 10), - 2.6.18-8.1.8.el5 (RHEL 5), - 2.6.18.8 vanilla (kernel.org) - * Client support for unpatched kernels: - (see http://wiki.lustre.org/index.php?title=Patchless_Client) - 2.6.16 - 2.6.21 vanilla (kernel.org) - * Due to recently discovered recovery problems, we do not recommend - using patchless RHEL 4 clients with this or any earlier release. - * Recommended e2fsprogs version: 1.40.2-cfs1 - * Note that reiserfs quotas are disabled on SLES 10 in this kernel. - -Severity : minor -Bugzilla : 12186 -Description: Fix errors in lfs documentation -Details : Fixes man pages - -Severity : enhancement -Bugzilla : 3055 -Description: Adaptive timeouts -Details : RPC timeouts adapt to changing server load and network - conditions to reduce resend attempts and improve recovery time. - -Severity : enhancement -Bugzilla : 12192 -Description: llapi_file_create() does not allow some changes -Details : add llapi_file_open() that allows specifying the file creation - mode and open flags, and also returns an open file handle. - -Severity : enhancement -Bugzilla : 12743 -Description: df doesn't work properly if diskfs blocksize != 4K -Details : Choose biggest blocksize of OST's as the LOV's blocksize. - -Severity : normal -Frequency : always on directories with default striping set -Bugzilla : 12836 -Description: lfs find on -1 stripe looping in lsm_lmm_verify_common() -Details : Avoid lov_verify_lmm_common() on directory with -1 stripe count. - -Severity : enhancement -Bugzilla : 11248 -Description: merge and cleanup kernel patches. -Details : Remove mnt_lustre_list in vfs_intent-2.6-rhel4.patch. - -Severity : enhancement -Bugzilla : 13039 -Description: RedHat Update kernel for RHEL5 -Details : Kernel config file for RHEL5. - -Severity : enhancement -Bugzilla : 12446 -Description: OSS needs mutliple precreate threads -Details : Add ability to start more than one create thread per OSS. - -Severity : major -Frequency : only with quota on the root user -Bugzilla : 12223 -Description: mds_obd_create error creating tmp object -Details : When the user sets quota on root, llog will be affected and can't - create files and write files. - -Severity : normal -Frequency : Always on ia64 patchless client, and possibly others. -Bugzilla : 12826 -Description: Add EXPORT_SYMBOL check for node_to_cpumask symbol. -Details : This allows the patchless client to be loaded on architectures - without this export. - -Severity : normal -Frequency : rare -Bugzilla : 13142 -Description: disorder of journal start and llog_add cause deadlock. -Details : in llog_origin_connect, journal start should happen before - llog_add keep the same order as other functions to avoid - the deadlock. - -Severity : enhancement -Bugzilla : 13039 -Description: RedHat Update kernel for RHEL5 -Details : Modify the kernel config file more closer RHEL5. - -Severity : enhancement -Bugzilla : 13360 -Description: Build failure against Centos5 (RHEL5) -Details : Define PAGE_SIZE when it isn't present. - -Severity : normal -Frequency : occasionally when using NFS -Bugzilla : 13030 -Description: "ll_intent_file_open()) lock enqueue: err: -13" with nfs -Details : with NFS, the anon dentry's parent was set to itself in - d_alloc_anon(), so in MDS, we use rec->ur_fid1 to find the - corresponding dentry other than use rec->ur_name. - -Severity : enhancement -Bugzilla : 12398 -Description: enable data checksumming by default -Details : enable checksum by default, allow --disable-checksum - configure option and "-o nochecksum" mount option. Checksums - can also be disabled at runtime via $LPROC/osc/*/checksum_pages. - -Severity : normal -Frequency : Occasionally with failover -Bugzilla : 12459 -Description: Client eviction due to failover config -Details : after a connection loss, the lustre client should attempt to - reconnect to the last active server first before trying the - other potential connections. - -Severity : enhancement -Bugzilla : 11401 -Description: client-side metadata stat-ahead during readdir(directory readahead) -Details : perform client-side metadata stat-ahead when the client detects - readdir and sequential stat of dir entries therein - -Severity : minor -Frequency : rare -Bugzilla : 12588 -Description: when mds and osts use different quota unit(32bit and 64bit), - quota will be released repeatly. -Details : void sending multiple quota reqs to mds, which will keep the - status between the reqs. - -Severity : normal -Frequency : only with liblustre clients on XT3 -Bugzilla : 12418 -Description: evictions taking too long -Details : allow llrd to evict clients directly on OSTs - -Severity : normal -Bugzilla : 13125 -Description: osts not allocated evenly to files -Details : change the condition to increase offset_idx - -Severity : enhancement -Bugzilla : 2262 -Description: self-adjustable client's lru lists -Details : use adaptive algorithm for managing client cached locks lru - lists according to current server load, other client's work - pattern, memory activities, etc. Both, server and client - side namespaces provide number of proc tunables for controlling - things - -Severity : cleanup -Bugzilla : 13532 -Description: rewrite ext2-derived code in llite/dir.c and obdclass/uuid.c -Details : rewrite inherited code (uuid parsing code from ext2 utils and - readdir code from ext3) from scratch preserving functionality. - -Severity : normal -Bugzilla : 13436 -Description: Only those disconnect error should be returned by rq_status. -Details : In open/enqueue processs, Some errors, which will cause client - disconnected, should be returned by rq_status, while other - errors should still be returned by intent, then mdc or llite will - detect them. - -Severity : enhancement -Bugzilla : 11230 -Description: Tune the kernel for good SCSI performance. -Details : Set the value of /sys/block/{dev}/queue/max_sectors_kb - to the value of /sys/block/{dev}/queue/max_hw_sectors_kb - in mount_lustre. - -Severity : critical -Frequency : Always for filesystems larger than 2TB on 32-bit systems. -Bugzilla : 13547, 13627 -Description: Data corruption for OSTs that are formatted larger than 2TB - on 32-bit servers. -Details : When generating the bio request for lustre file writes the - sector number would overflow a temporary variable before being - used for the IO. The data reads correctly from Lustre (which - will overflow in a similar manner) but other file data or - filesystem metadata may be corrupted in some cases. - -Severity : normal -Bugzilla : 13600 -Description: "lfs find -obd UUID" prints directories -Details : "lfs find -obd UUID" will return all directory names instead - of just file names. It is incorrect because the directories - do not reside on the OSTs. - -Severity : normal -Bugzilla : 13596, 13614 -Description: MDS hang after unclean shutdown of lots of clients -Details : Never resend AST requests. - -Severity : normal -Bugzilla : 13304 -Frequency : Always, for kernels after 2.6.16 -Description: Fix warning idr_remove called for id=.. which is not allocated. -Details : Last kernels save old s_dev before kill super and not allow - to restore from callback - restore it before call kill_anon_super. - -Severity : normal -Bugzilla : 13334 -Description: Fix error on 'ls .' at the top of the Lustre mount. -Details : Don't revalidate dentry if it is a root dentry. - --------------------------------------------------------------------------------- - -2007-08-27 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.6.2 - * Support for kernels: - 2.6.5-7.286 (SLES 9), - 2.6.9-55.0.2.EL (RHEL 4), - 2.6.16.46-0.14 (SLES 10), - 2.6.18-8.1.8.el5 (RHEL 5), - 2.6.18.8 vanilla (kernel.org) - * Client support for unpatched kernels: - (see http://wiki.lustre.org/index.php?title=Patchless_Client) - 2.6.16 - 2.6.22 vanilla (kernel.org) - * Due to recently discovered recovery problems, we do not recommend - using patchless RHEL 4 clients with this or any earlier release. - * Recommended e2fsprogs version: 1.39.cfs8 - * Note that reiserfs quotas are disabled on SLES 10 in this kernel. - -Severity : minor -Frequency : rare -Bugzilla : 13147 -Description: block reactivating mgc import until all deactivates complete -Details : Fix race when failing back MDT/MGS to itself (testing) - -Severity : enhancement -Bugzilla : 12786 -Description: lfs setstripe enhancement -Details : Make lfs setstripe understand 'k', 'm' and 'g' for stripe size. - -Severity : normal -Frequency : mds/oss recovery -Bugzilla : 10800 -Description: llog ctxt is refrenced after it has been freed. -Details : llog ctxt refcount was added to avoide the race between ctxt free - and llog recovery process. Each llog user must hold ctxt refcount - before it access the llog. And the llog ctxt can only be freed - when its refcount is zero. - -Severity : enhancement -Bugzilla : 12211 -Description: randomly memory allocation failure util -Details : Make lustre randomly failed allocating memory for testing purpose. - -Severity : normal -Frequency : only for SLES10 -Bugzilla : 12771 -Description: Update kernel patch for SLES10 SP1 -Details : Add patch blkdev_tunables-2.6-sles10.patch to 2.6-sles10.series. - -Severity : enhancement -Bugzilla : 10786 -Description: omit set fsid for export NFS -Details : fix set/restore device id for avoid EMFILE error and mark lustre fs - as FS_REQUIRES_DEV for avoid problems with generate fsid. - -Severity : major -Frequency : after network failures -Bugzilla : 12769 -Description: Add sync option to mount_lustre.c -Details : Client loses data written to lustre after a network interruption. - -Severity : enhancement -Bugzilla : 10595 -Description: Error message improvement. -Details : Merging of two LCONSOLE_ERROR_MSG into one. - -Severity : enhancement -Bugzilla : 12606 -Description: don't use GFP_* in generic Lustre code. -Details : Use cfs_alloc_* functions and CFS_* flags for code portability. - -Severity : enhancement -Bugzilla : 12333 -Description: obdclass is limited by single OBD_ALLOC(idarray) -Details : replace OBD_ALLOC/OBD_FREE with OBD_VMALLOC/OBD_VFREE - -Severity : enhancement -Bugzilla : 12415 -Description: updated patchess for new RHEL4 kernel -Details : Fixed ext3-unlink-race.patch per Kalpak's comment. - -Severity : enhancement -Bugzilla : 13006 -Description: warnings with build patchless client with vanila 2.6.19 and up -Details : change old ctl_table style and replace ctl_table/ctl_table_header - with cfs_sysctl_table_t/cfs_sysctl_table_header_t - -Severity : enhancement -Bugzilla : 13093 -Description: O_DIRECT bypasses client statistics. -Details : When running with O_DIRECT I/O, neither the client rpc_stats nor - read_ahead_stats were updated. Copied stats section from - osc_send_oap_rpc() into async_internal(). - -Severity : minor -Frequency : only for Cray XT3 -Bugzilla : 11706 -Description: peer credits not enough on many OST per OSS systems. -Details : Use new lnet way to add credits as we need those for pings and ASTs - -Severity : minor -Frequency : only with liblustre -Bugzilla : 12790 -Description: Liblustre is not releasing flock locks on file close. -Details : Release flock locks on file close. - -Severity : minor -Frequency : only for RHEL4 -Bugzilla : 12839 -Description: Update kernel patches for kernel-2.6.9-55.0.2.EL -Details : Remove inode-nr_unused-2.6.9-rhel4.patch from 2.6-rhel4.series - Update target file and kernel config. - -Severity : normal -Bugzilla : 11802 -Description: lustre support for RHEL5 -Details : Add support for RHEL5. - -Severity : minor -Bugzilla : 11327 -Frequency : rare -Description: ASSERTION(export != NULL) failed in target_handle_connect -Details : Assetion hit is result of rare race between disconnect and connet - to same nid. target_handle_connect found old connect cockie and - tried to reconnect, but can't find export for this cockie. - -Severity : normal -Frequency : rare -Bugzilla : 11756 -Description: umount blocks forever on error -Details : In result of wrong using obd_no_recov and obd_force flags client - can hand if cancel or some other requests is lost. - -Severity : normal -Frequency : Only for SLES -Bugzilla : 13177 -Description: sanity_quota fail test_1 -Details : There are multiple occurences of $TSTUSR in SLES's /etc/group - file, which makes TSTID[2] inunique. - -Severity : enhancement -Bugzilla : 13249 -Description: Kernel patches for SLES9 2.6.5-7.286 kernel -Details : Update target/ChangeLog/which_patch . - -Severity : enhancement -Bugzilla : 12955 -Description: jbd statistics -Details : Port older jbd statistics patch for sles10 - -Severity : normal -Frequency : rare -Bugzilla : 9977 -Description: lvbo_init failed for resource with missing objects. -Details : Fix returning error if we do stat for file with missing/corrupted - objects and i_size set to all sum of size of all avaible objects. - if we to truncate/write to missing object - it is recreated. - -Severity : minor -Frequency : rare -Bugzilla : 13276 -Description: Oops in read and write path when failing to allocate lock. -Details : Check if lock allocation failed and return error back. - -Severity : normal -Frequency : When flocks are used. -Bugzilla : 13103 -Description: assertion failure in ldlm_cli_enquque_fini for non NULL lock. -Details : Flock locks might destroy just granted lock if it could be merged - with another existing flock, this is done in completion handler, - so teach ldlm_cli_enquque_fini that this is a valid case for - flock locks. - -Severity : normal -Frequency : Rare -Bugzilla : 11974 -Description: reply_lock_interpret crash due to race with it and lock cancel. -Details : Do not replay locks that are being cancelled. Do not reference - locks by their address during replay, just by their handle. - -Severity : normal -Frequency : only with deactivated OSTs -Bugzilla : 11679 -Description: lstripe command fails for valid OST index -Details : The stripe offset is compared to 'lov->desc.ld_tgt_count' - instead of lov->desc.ld_active_tgt_count. - -Severity : enhancement -Bugzilla : 13360 -Description: Build failure against Centos5 (RHEL5) -Details : Use getpagesize() instead of PAGE_SIZE. - --------------------------------------------------------------------------------- - -2007-07-30 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.6.1 - * Support for kernels: - 2.6.5-7.283 (SLES 9), - 2.6.9-55.EL (RHEL 4), - 2.6.16.46-0.14 (SLES 10), - 2.6.18.8 vanilla (kernel.org) - * Client support for unpatched kernels: - (see http://wiki.lustre.org/index.php?title=Patchless_Client) - 2.6.16 - 2.6.22 vanilla (kernel.org) - * Due to recently discovered recovery problems, we do not recommend - using patchless RHEL 4 clients with this or any earlier release. - * Recommended e2fsprogs version: 1.39.cfs8 - * Note that reiserfs quotas are disabled on SLES 10 in this kernel. - * Starting with this release, the ldiskfs backing filesystem required - by Lustre is now in its own package, lustre-ldiskfs. This package - should be installed. It is versioned separately from Lustre and - may be released separately in future. - -Severity : normal -Frequency : rare -Bugzilla : 13129 -Description: server LBUG when shutting down -Details : Block umount forever until the mount refcount is zero rather - than giving up after an arbitrary timeout. - -Severity : enhancement -Bugzilla : 12194 -Description: add optional extra BUILD_VERSION info -Details : add a new environment variable (namely LUSTRE_VERS) which allows - to override the lustre version. - -Severity : normal -Frequency : 2.6.18 servers only -Bugzilla : 12546 -Description: ll_kern_mount() doesn't release the module reference -Details : The ldiskfs module reference count never drops down to 0 - because ll_kern_mount() doesn't release the module reference. - -Severity : normal -Frequency : rare -Bugzilla : 12470 -Description: server LBUG when using old ost_num_threads parameter -Details : Accept the old ost_num_threads parameter but warn that it - is deprecated, and fix an off-by-one error that caused an LBUG. - -Severity : normal -Frequency : rare -Bugzilla : 11722 -Description: Transient SCSI error results in persistent IO issue -Details : iobuf->dr_error is not reinitialized to 0 between two - uses. - -Severity : normal -Frequency : sometimes when underlying device returns I/O errors -Bugzilla : 11743 -Description: OSTs not going read-only during write failures -Details : OSTs are not remounted read-only when the journal commit threads - get I/O errors because fsfilt_ext3 calls journal_start/stop() - instead of the ext3 wrappers. - -Severity : minor -Frequency : only with 10000 clients or more -Bugzilla : 12364 -Description: poor connect scaling with increasing client count -Details : Don't run filter_grant_sanity_check for more than 100 exports - to improve scaling for large numbers of clients. - -Severity : normal -Frequency : SLES10 only -Bugzilla : 12538 -Description: sanity-quota.sh quotacheck failed: rc = -22 -Details : Quotas cannot be enabled on SLES10. - -Severity : normal -Frequency : liblustre clients only -Bugzilla : 12229 -Description: getdirentries does not give error when run on compute nodes -Details : getdirentries does not fail when the size specified as an argument - is too small to contain at least one entry - -Severity : enhancement -Bugzilla : 11548 -Description: Add LNET router traceability for debug purposes -Details : If a checksum failure occurs with a router as part of the - IO path, the NID of the last router that forwarded the bulk data - is printed so it can be identified. - -Severity : normal -Frequency : rare -Bugzilla : 11315 -Description: OST "spontaneously" evicts client; client has imp_pingable == 0 -Details : Due to a race condition, liblustre clients were occasionally - evicted incorrectly. - -Severity : enhancement -Bugzilla : 10997 -Description: lfs setstripe use optional parameters instead of postional - parameters. - -Severity : enhancement -Bugzilla : 10651 -Description: Nanosecond timestamp support for ldiskfs -Details : The on-disk ldiskfs filesystem has added support for nanosecond - resolution timestamps. There is not yet support for this at - the Lustre filesystem level. - -Severity : normal -Frequency : during server recovery -Bugzilla : 11203 -Description: MDS failing to send precreate requests due to OSCC_FLAG_RECOVERING -Details : request with rq_no_resend flag not awake l_wait_event if they get a - timeout. - -Severity : minor -Frequency : nfs export on patchless client -Bugzilla : 11970 -Description: connectathon hang when test nfs export over patchless client -Details : Disconnected dentry cannot be found with lookup, so we do not need - to unhash it or make it invalid - -Bugzilla : 11757 -Description: fix llapi_lov_get_uuids() to allow many OSTs to be returned -Details: : Change llapi_lov_get_uuids() to read the UUIDs from /proc instead - of using an ioctl. This allows lfsck for > 160 OSTs to succeed. - -Severity : minor -Frequency : rare -Bugzilla : 11546 -Description: open req refcounting wrong on reconnect -Details : If reconnect happened between getting open reply from server and - call to mdc_set_replay_data in ll_file_open, we will schedule - replay for unreferenced request that we are about to free. - Subsequent close will crash in variety of ways. - Check that request is still eligible for replay in - mdc_set_replay_data(). - -Severity : minor -Frequency : rare -Bugzilla : 11512 -Description: disable writes to filesystem when reading health_check file -Details : the default for reading the health_check proc file has changed - to NOT do a journal transaction and write to disk, because this - can cause reads of the /proc file to hang and block HA state - checking on a healthy but otherwise heavily loaded system. It - is possible to return to the previous behaviour during configure - with --enable-health-write. - -Severity : enhancement -Bugzilla : 10768 -Description: 64-bit inode version -Details: : Add a on-disk 64-bit inode version for ext3 to track changes made - to the inode. This will be required for version-based recovery. - -Severity : normal -Frequency : rare -Bugzilla : 11818 -Description: MDS fails to start if a duplicate client export is detected -Details : in some rare cases it was possible for a client to connect to - an MDS multiple times. Upon recovery the MDS would detect this - and fail during startup. Handle this more gracefully. - -Severity : enhancement -Bugzilla : 11563 -Description: Add -o localflock option to simulate old noflock behaviour. -Details : This will achieve local-only flock/fcntl locks coherentness. - -Severity : minor -Frequency : rare -Bugzilla : 11658 -Description: log_commit_thread vs filter_destroy race leads to crash -Details : Take import reference before releasing llog record semaphore - -Severity : normal -Frequency : rare -Bugzilla : 12477 -Description: Wrong request locking in request set processing -Details : ptlrpc_check_set wrongly uses req->rq_lock for proctect add to - imp_delayed_list, in this place should be used imp_lock. - -Severity : normal -Frequency : when reconnecting -Bugzilla : 11662 -Description: Grant leak when OSC reconnect to OST -Details : When osc reconnect ost, OST(filter) should check whether it - should grant more space to client by comparing fed_grant and - cl_avail_grant, and return the granted space to client instead - of "new granted" space, because client will call osc_init_grant - to update the client grant space info. - -Severity : normal -Frequency : when client reconnects to OST -Bugzilla : 11662 -Description: Grant leak when OSC does a resend and replays bulk write -Details : When osc reconnect to OST, OST(filter) should clear grant info of - bulk write request, because the grant info while be sync between - OSC and OST when reconnect, and we should ignore the grant info - these of resend/replay write req. - -Severity : normal -Frequency : rare -Bugzilla : 11662 -Description: Grant space more than avaiable space sometimes. -Details : When then OST is about to be full, if two bulk writing from - different clients came to OST. Accord the avaliable space of the - OST, the first req should be permitted, and the second one - should be denied by ENOSPC. But if the seconde arrived before - the first one is commited. The OST might wrongly permit second - writing, which will cause grant space > avaiable space. - -Severity : normal -Frequency : when client is evicted -Bugzilla : 12371 -Description: Grant might be wrongly erased when osc is evicted by OST -Details : when the import is evicted by server, it will fork another - thread ptlrpc_invalidate_import_thread to invalidate the - import, where the grant will be set to 0. While the original - thread will update the grant it got when connecting. So if - the former happened latter, the grant will be wrongly errased - because of this race. - -Severity : normal -Frequency : rare -Bugzilla : 12401 -Description: Checking Stale with correct fid -Details : ll_revalidate_it should uses de_inode instead of op_data.fid2 - to check whether it is stale, because sometimes, we want the - enqueue happened anyway, and op_data.fid2 will not be initialized. - -Severity : enhancement -Bugzilla : 11647 -Description: update patchless client -Details : Add support for patchless client with 2.6.20, 2.6.21 and RHEL 5 - -Severity : normal -Frequency : only with 2.4 kernel -Bugzilla : 12134 -Description: random memory corruption -Details : size of struct ll_inode_info is to big for union inode.u and this - can be cause of random memory corruption. - -Severity : normal -Frequency : rare -Bugzilla : 10818 -Description: Memory leak in recovery -Details : Lov_mds_md was not free in an error handler in mds_create_object. - It should also check obd_fail before fsfilt_start, otherwise if - fsfilt_start return -EROFS,(failover mds during mds recovery). - then the req will return with repmsg->transno = 0 and rc = EROFS. - and we met hit the assert LASSERT(req->rq_reqmsg->transno == - req->rq_repmsg->transno) in ptlrpc_replay_interpret. Fcc should - be freed no matter whether fsfilt_commit success or not. - -Severity : minor -Frequency : only with huge numbers of clients -Bugzilla : 11817 -Description: Prevents from taking the superblock lock in llap_from_page for - a soon died page. -Details : using LL_ORIGIN_REMOVEPAGE origin flag instead of LL_ORIGIN_UNKNOW - for llap_from_page call in ll_removepage() prevents from taking - the superblock lock for a soon died page. - -Severity : normal -Frequency : rare -Bugzilla : 11935 -Description: Not check open intent error before release open handle -Details : in some rare cases, the open intent error is not checked before - release open handle, which may cause - ASSERTION(open_req->rq_transno != 0), because it tries to release - the failed open handle. - -Severity : normal -Frequency : rare -Bugzilla : 12556 -Description: Set cat log bitmap only after create log success. -Details : in some rare cases, the cat log bitmap is set too early. and it - should be set only after create log success. - -Severity : major -Bugzilla : 11971 -Description: Accessing a block bevice can re-enable I/O when Lustre is - tearing down a device. -Details : dev_clear_rdonly(bdev) must be called in kill_bdev() instead of - blkdev_put(). - -Severity : minor -Bugzilla : 11706 -Description: service threads may hog cpus when there are a lot of requests -Details : Insert cond_resched to give other threads a chance to use some CPU - -Severity : normal -Frequency : rare -Bugzilla : 12086 -Description: the cat log was not initialized in recovery -Details : When mds(mgs) do recovery, the tgt_count might be zero, so the - unlink log on mds will not be initialized until mds post - recovery. And also in mds post recovery, the unlink log will - initialization will be done asynchronausly, so there will be race - between add unlink log and unlink log initialization. - -Severity : normal -Bugzilla : 12597 -Description: brw_stats were being printed incorrectly -Details : brw_stats were being printed as log2 but all of them were not - recorded as log2. Also remove some code duplication arising from - filter_tally_{read,write}. - -Severity : normal -Bugzilla : 11674 -Frequency : rare, only in recovery. -Description: ASSERTION(req->rq_type != LI_POISON) failed -Details : imp_lock should be held while iterating over imp_sending_list for - prevent destroy request after get timeout in ptlrpc_queue_wait. - -Severity : normal -Bugzilla : 12689 -Description: replay-single.sh test 52 fails -Details : A lock's skiplist need to be cleanup when it being unlinked - from its resource list. - -Severity : normal -Bugzilla : 11737 -Frequency : always -Description: Short directio read returns full requested size rather than - actual amount read. -Details : Direct I/O operations should return actual amount of bytes - transferred rather than requested size. - -Severity : enhancement -Bugzilla : 10589 -Description: metadata RPC reduction (e.g. for rm performance) -Details : decrease the amount of synchronous RPC between clients and servers - by canceling conflicing lock before the operation on the client - and packing thier handles into the main operation RPC to server. - -Severity : enhancement -Bugzilla : 12605 -Description: add #ifdef HAVE_KERNEL_CONFIG_H -Details : kernels from 2.6.19 not need include linux/config.h, but add - include linux/autoconf.h in commpiler command line. - -Severity : enhancement -Bugzilla : 12764 -Description: patchless client support for 2.6.22 kernel -Details : 2.6.22 has only one visble change, SLAB_CTOR_* constants is - removed. In this case we need drop using os depended interface to - kmem_cache and use cfs_mem_cache API. - -Severity : minor -Bugzilla : 12747 -Frequency : always -Description: fix mal-formatted messages -Details : fix some mal-formatted DEBUG_REQ and LCONSOLE_ERROR_MSG messages - -Severity : minor -Bugzilla : 11737 -Frequency : always in liblustre -Description: wrong IS_ERR implementation in liblustre.h -Details : fix IS_ERR implementation in liblustre.h for right detect errors. - -Severity : minor -Bugzilla : 10419 -Frequency : always -Description: Correct condition for output debug message. -Details : inode i_nlink equal zero is not enough for output message about - disk corruption, i_ctime and i_mode should be also checked. - -Severity : minor -Bugzilla : 12415 -Frequency : always in patchless client -Description: add configure check for truncate_complete_page -Details : improve checks for exported symbols. This allow run check without - sources, but with Module.symvers shipped with kernel distribution. - add check for truncate_complete_page used by patchless client. - -Severity : normal -Bugzilla : 12646 -Description: sanity.sh test_77h fails with "test_77h file compare failed" -Details : test_77h uses a file which was messed by other test case. - -Severity : normal -Bugzilla : 12576 -Description: Not Check whether lov_tgts is NULL in some lov functions -Details : Checking whether lov_tgts is NULL in some functions. - -Severity : normal -Bugzilla : 11815 -Description: replace obdo_alloc() with OBDO_ALLOC macro -Details : nothing special is done in obdo_alloc() function, and for - debugging purpose, it needs to be replaced with macros. - -Severity : normal -Bugzilla : 12784 -Description: bad return value and errno from fcntl call -Details : In liblustre API, errno should be a negative value if error - happens. - -Severity : normal -Bugzilla : 11544 -Description: ptlrpc_check_set() LBUG -Details : In case of positive reply from server and failed client bulk - callback after bulk transfer shouldn't LBUG, but process this - request as erroneous. - -Severity : enhancement -Bugzilla : 10968 -Description: VFS operations stats tool. -Details : Tool which collects stats by tracking value written in pid, - ppid, gid and uses llstat to generate output to plot graph using - plot-llstat - Updated lustre/utils/Makefile.am - Added lustre/utils/ltrack_stats.c - -Severity : enhancement -Bugzilla : 11039 -Description: 2.6.18 server support (lustre 1.6.1) -Details : Support for 2.6.18 kernels on the server side. - -Severity : normal -Frequency : rare -Bugzilla : 12696 -Description: ASSERTION(imp->imp_conn_current) failed -Details : an assertion failure is hit if a client node boots and attempts to - mount a lustre filesystem faster than RECONNECT_INTERVAL seconds. - -Severity : normal -Frequency : only for i686 -Bugzilla : 12695 -Description: 1.4.11 RC1 build fails for RHEL 4, i686 -Details : Fixed config variable for build. - -Severity : normal -Frequency : rare -Bugzilla : 12415 -Description: Updated patchess for new RHEL4 kernel -Details : Updated patch inode-nr_unused-2.6.9-rhel4.patch - Updated patch jbd-stats-2.6.9.patch - Updated patch qsnet-rhel4-2.6.patch - Updated patch quota-deadlock-on-pagelock-core.patch - Updated patch vfs_intent-2.6-rhel4.patch - Updated patch vfs_races-2.6-rhel4.patch - Updated series file 2.6-rhel4-titech.series - Updated series file 2.6-rhel4.series - Updated kernel config files - -Severity : normal -Frequency : rare -Bugzilla : 12374 -Description: lquota slave complains LBUG when reconnecting with mds - or failover in mds. -Details : quota slave depends qctxt->lqc_import to send its quota request. - This pointer will be invalid if mds did failover or broke its - connect to osts, which leads to LBUG. - -Severity : normal -Frequency : when qunit size is too small(less than 20M) -Bugzilla : 12588 -Description: write is stopped by improper -EDQUOT -Details : If the master is busy and qunit size is small enough(let's say 1M), - the slave can not get quota from master on time, which will lead - slave to trigger a -EQUOTA to client. - -Severity : normal -Frequency : rare -Bugzilla : 12629 -Description: Deadlock during metadata tests -Details : in prune_dir_dentries(), shrink_dcache_parent() should not be - called with the per-dentry lock held. - -Severity : normal -Frequency : SLES9 only -Bugzilla : 12744 -Description: Lustre patched kernel for SLES9 SP3 has NR_CPUS set to 8 -Details : set CONFIG_NR_CPUS to 128 instead of 8. - -Severity : enhancement -Bugzilla : 12678 -Description: remove fs_prep_san_write operation and related patches -Details : remove the ext3-san-jdike patches which are no longer useful. - -Severity : normal -Frequency : rare -Bugzilla : 11324 -Description: LDISKFS-fs error (device sdc): ldiskfs_free_blocks -Details : a disk corruption can cause the mballoc code to assert on a - double free or other extent corruptions. Handle these with - ext3_error() instead of assertions. - -Severity : major -Frequency : only with mballoc3 code and deep extent trees -Bugzilla : 12861 -Description: ldiskfs_ext_search_right: bad header in inode: unexpected eh_depth -Details : a wrong check of extent headers in ldiskfs_ext_search_right() - can cause the filesystem to be remounted read-only. - -Severity : normal -Frequency : rare -Bugzilla : 13063 -Description: lfsck built against 1.4.x cannot run against 1.6.0 lustre -Details : the definition for OBD_IOC_GETNAME changed in 1.6.0. One of the - few external users of this ioctl number is lfsck's call to - llapi_lov_get_uuids() and this caused lfsck to fail at startup. - Add the old ioctl number to the handler so both old and new - lfsck can work. - -Severity : normal -Bugzilla : 11301 -Description: parallel lock callbacks -Details : Instead of sending blocking and completion callbacks as separated - requests, adding them to a set and sending in parallel. - -Severity : normal -Bugzilla : 12417 -Description: Disable most debugging by default -Details : To improve performance, disable most logging (for debug purposes) - by default. VFSTRACE, RPCTRACE, and DLMTRACE are now off by - default, and HA includes fewer messages. - -Severity : minor -Bugzilla : 12858 -Frequency : only run on patchless client. -Description: use do_facet on sanity.sh for test handling recoverables errors -Details : use do_facet instead of direct use sysctl for set fail_loc on OST - -Severity : normal -Bugzilla : 11013 -Description: hash tables for lists of nids, connections and uuids -Details : Hash tables noticeably help when a lot of clients connect to a - server, to faster identify duplicate connections or reconnects, - also to faster find export to evict in manual eviction case. - -Severity : normal -Bugzilla : 11190 -Description: Sometimes, when the server evict a client, and the client will - not be evicted as soon as possible. -Details : In enqueue req, the error was returned by intent, instead of - rq_status which make ptlrpc layer not detect this error, and - does not evict the client. So enqueue error should be returned - by rq_status. - -Severity : minor -Frequency : only at startup -Bugzilla : 11778 -Description: Delay client connections to MDT until fist MDT->OST connect -Details : If a client tried to create a new file before the MDT had - connected to any OSTs, the create would return EIO. Now - the client will simply block until the MDT connects to the - first OST and the create can succeed. - -Severity : normal -Frequency : only for SLES9 -Bugzilla : 12543 -Description: Routinely utilize latest Quadrics drivers in CFS releases -Details : Update patch qsnet-suse-2.6.patch. - -Severity : normal -Frequency : only for sles10 -Bugzilla : 12771 -Description: Update patches for SLES 10 SP1 kernel. -Details : Update the patch vfs_intent-2.6-sles10.patch. - -Severity : normal -Frequency : rare -Bugzilla : 12543 -Description: Routinely utilize latest Quadrics drivers in CFS releases -Details : Update patch qsnet-rhel4-2.6.patch. - -Severity : minor -Frequency : at statup only -Bugzilla : 12860 -Description: mds_lov_synchronize race leads to various problems -Details : simultaneous MDT->OST connections at startup can cause the - sync to abort, leaving the OSC in a bad state. - -Severity : normal -Bugzilla : 12975 -Frequency : rare -Description: Using wrong pointer in osc_brw_prep_request -Details : Access to array[-1] can produce panic if kernel compiled with - CONFIG_PAGE_ALLOC enabled - -Severity : enhancement -Bugzilla : 4900 -Description: Async OSC create to avoid the blocking unnecessarily. -Details : If a OST has no remain object, system will block on the creating - when need to create a new object on this OST. Now, ways use - pre-created objects when available, instead of blocking on an - empty osc while others are not empty. If we must block, we block - for the shortest possible period of time. - -Severity : normal -Bugzilla : 13148 -Frequency : only in recovery -Description: Mark OST as early accessible if his start SYNC. -Details : osc_precreate return flag early accessible if oscc marked as - OSCC_FLAG_SYNC_IN_PROGRESS. - -Severity : normal -Bugzilla : 13196 -Frequency : rare -Description: Sometimes precreate code can triger create object on wrong ost -Details : Wrong protected or not not restored variables aftre precreate loop - can produce creation object on wrong ost. - -Severity : normal -Frequency : oss recovery -Bugzilla : 10800 -Description: llog_commit_thread cleanup should sync with llog_commit_thread - start -Details : llog_commit_thread_count should be synced between llog_commit - start and cleanup, so new llog_commit thread should not be started - when llog_commit threads being stopped to avoid accessing some - freed stuff. - -Severity : enhancement -Bugzilla : 11721 -Description: Add printing inode info into message about error in writepage. - --------------------------------------------------------------------------------- - -2007-05-03 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.6.0.1 - * bug fixes - -Severity : normal -Frequency : on some architectures -Bugzilla : 12404 -Description: 1.6 client sometimes fails to mount from a 1.4 MDT -Details : Uninitialized flags sometimes cause configuration commands to - be skipped. - -Severity : normal -Frequency : patchless clients only -Bugzilla : 12391 -Description: missing __iget() symbol export -Details : The __iget() symbol export is missing. To avoid the need for - this on patchless clients the deathrow inode reaper is turned - off, and we depend on the VM to clean up old inodes. This - dependency was during via the fix for bug 12181. - -Severity : normal -Frequency : always -Bugzilla : 12848 -Description: sanity.sh fail: test_52b -Details : The ll_inode_to_ext_flags() has a glitch which makes MDS return - incorrect inode's flags to client. - --------------------------------------------------------------------------------- - -2007-04-19 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.6.0 - * CONFIGURATION CHANGE. This version of Lustre WILL NOT - INTEROPERATE with older versions automatically. In many cases a - special upgrade step is needed. Please read the - user documentation before upgrading any part of a 1.4.x system. - * WARNING: Lustre configuration and startup changes are required with - this release. See https://mail.clusterfs.com/wikis/lustre/MountConf - for details. - * Support for kernels: - 2.4.21-47.0.1.EL (RHEL 3), - 2.6.5-7.283 (SLES 9), - 2.6.9-42.0.10.EL (RHEL 4), - 2.6.12.6 vanilla (kernel.org), - 2.6.16.27-0.9 (SLES10) - * Client support for unpatched kernels: - (see https://mail.clusterfs.com/wikis/lustre/PatchlessClient) - 2.6.16 - 2.6.19 vanilla (kernel.org), - 2.6.9-42.0.8EL (RHEL 4) - * Recommended e2fsprogs version: 1.39.cfs6 - * Note that reiserfs quotas are disabled on SLES 10 in this kernel - * bug fixes - -Severity : enhancement -Bugzilla : 4900 -Description: Async OSC create to avoid the blocking unnecessarily. -Details : If a OST has no remain object, system will block on the creating - when need to create a new object on this OST. Now, ways use - pre-created objects when available, instead of blocking on an - empty osc while others are not empty. If we must block, we block - for the shortest possible period of time. - -Severity : enhancement -Bugzilla : 8007 -Description: MountConf -Details : Lustre configuration is now managed via mkfs and mount - commands instead of lmc and lconf. New obd types (MGS, MGC) - are added for dynamic configuration management. See - https://mail.clusterfs.com/wikis/lustre/MountConf for - details. - -Severity : enhancement -Bugzilla : 4482 -Description: dynamic OST addition -Details : OSTs can now be added to a live filesystem - -Severity : enhancement -Bugzilla : 9851 -Description: startup order invariance -Details : MDTs and OSTs can be started in any order. Clients only - require the MDT to complete startup. - -Severity : enhancement -Bugzilla : 4899 -Description: parallel, asynchronous orphan cleanup -Details : orphan cleanup is now performed in separate threads for each - OST, allowing parallel non-blocking operation. - -Severity : enhancement -Bugzilla : 9862 -Description: optimized stripe assignment -Details : stripe assignments are now made based on ost space available, - ost previous usage, and OSS previous usage, in order to try - to optimize storage space and networking resources. - -Severity : enhancement -Bugzilla : 4226 -Description: Permanently set tunables -Details : All writable /proc/fs/lustre tunables can now be permanently - set on a per-server basis, at mkfs time or on a live - system. - -Severity : enhancement -Bugzilla : 10547 -Description: Lustre message v2 -Details : Add lustre message format v2. - -Severity : enhancement -Bugzilla : 9866 -Description: client OST exclusion list -Details : Clients can be started with a list of OSTs that should be - declared "inactive" for known non-responsive OSTs. - -Severity : normal -Bugzilla : 12123 -Description: ENOENT returned for valid filehandle during dbench. -Details : Check if a directory has children when invalidating dentries - associated with an inode during lock cancellation. This fixes - an incorrect ENOENT sometimes seen for valid filehandles during - testing with dbench. - -Severity : minor -Frequency : SFS test only (otherwise harmless) -Bugzilla : 6062 -Description: SPEC SFS validation failure on NFS v2 over lustre. -Details : Changes the blocksize for regular files to be 2x RPC size, - and not depend on stripe size. - -Severity : enhancement -Bugzilla : 10088 -Description: fine-grained SMP locking inside DLM -Details : Improve DLM performance on SMP systems by removing the single - per-namespace lock and replace it with per-resource locks. - -Severity : enhancement -Bugzilla : 9332 -Description: don't hold multiple extent locks at one time -Details : To avoid client eviction during large writes, locks are not - held on multiple stripes at one time or for very large writes. - Otherwise, clients can block waiting for a lock on a failed OST - while holding locks on other OSTs and be evicted. - -Severity : enhancement -Bugzilla : 9293 -Description: Multiple MD RPCs in flight. -Details : Further unserialise some read-only MDT RPCs - learn about intents. - To avoid overly-overloading MDT, introduce a limit on number of - MDT RPCs in flight for a single client and add /proc controls - to adjust this limit. - -Severity : enhancement -Bugzilla : 22484 -Description: client read/write statistics -Details : Add client read/write call usage stats for performance - analysis of user processes. - /proc/fs/lustre/llite/*/offset_stats shows non-sequential - file access. extents_stats shows chunk size distribution. - extents_stats_per_process show chunk size distribution per - user process. - -Severity : enhancement -Bugzilla : 22485 -Description: per-client statistics on server -Details : Add ldlm and operations statistics for each client in - /proc/fs/lustre/mds|obdfilter/*/exports/ - -Severity : enhancement -Bugzilla : 22486 -Description: improved MDT statistics -Details : Add detailed MDT operations statistics in - /proc/fs/lustre/mds/*/stats - -Severity : enhancement -Bugzilla : 10968 -Description: VFS operations stats -Details : Add client VFS call stats, trackable by pid, ppid, or gid - /proc/fs/lustre/llite/*/stats_track_[pid|ppid|gid] - -Severity : minor -Frequency : always -Bugzilla : 6380 -Description: Fix client-side osc byte counters -Details : The osc read/write byte counters in - /proc/fs/lustre/osc/*/stats are now working - -Severity : minor -Frequency : always as root on SLES -Bugzilla : 10667 -Description: Failure of copying files with lustre special EAs. -Details : Client side always return success for setxattr call for lustre - special xattr (currently only "trusted.lov"). - -Severity : minor -Frequency : always -Bugzilla : 10345 -Description: Refcount LNET uuids -Details : The global LNET uuid list grew linearly with every startup; - refcount repeated list entries instead of always adding to - the list. - -Severity : enhancement -Bugzilla : 2258 -Description: Dynamic service threads -Details : Within a small range, start extra service threads - automatically when the request queue builds up. - -Severity : major -Frequency : mixed-endian client/server environments -Bugzilla : 11214 -Description: mixed-endian crashes -Details : The new msg_v2 system had some failures in mixed-endian - environments. - -Severity : enhancement -Bugzilla : 11229 -Description: Easy OST removal -Details : OSTs can be permanently deactivated with e.g. 'lctl - conf_param lustre-OST0001.osc.active=0' - -Severity : enhancement -Bugzilla : 11335 -Description: MGS proc entries -Details : Added basic proc entries for the MGS showing what filesystems - are served. - -Severity : enhancement -Bugzilla : 10998 -Description: provide MGS failover -Details : Added config lock reacquisition after MGS server failover. - -Severity : enhancement -Bugzilla : 11461 -Description: add Linux 2.4 support -Details : Added support for RHEL 2.4.21 kernel for 1.6 servers and clients - -Severity : normal -Bugzilla : 11330 -Description: a large application tries to do I/O to the same resource and dies - in the middle of it. -Details : Check the req->rq_arrival time after the call to - ost_brw_lock_get(), but before we do anything about - processing it & sending the BULK transfer request. This - should help move old stale pending locks off the queue as - quickly as obd_timeout. - -Severity : major -Frequency : when an incorrect nid is specified during startup -Bugzilla : 10734 -Description: ptlrpc connect to non-existant node causes kernel crash -Details : LNET can't be re-entered from an event callback, which - happened when we expire a message after the export has been - cleaned up. Instead, hand the zombie cleanup off to another - thread. - -Severity : enhancement -Bugzilla : 10902 -Description: plain/inodebits lock performance improvement -Details : Grouping plain/inodebits in granted list by their request modes - and bits policy, thus improving the performance of search through - the granted list. - -Severity : major -Frequency : only if OST filesystem is corrupted -Bugzilla : 9829 -Description: client incorrectly hits assertion in ptlrpc_replay_req() -Details : for a short time RPCs with bulk IO are in the replay list, - but replay of bulk IOs is unimplemented. If the OST filesystem - is corrupted due to disk cache incoherency and then replay is - started it is possible to trip an assertion. Avoid putting - committed RPCs into the replay list at all to avoid this issue. - -Severity : major -Frequency : liblustre (e.g. catamount) on a large cluster with >= 8 OSTs/OSS -Bugzilla : 11684 -Description: System hang on startup -Details : This bug allowed the liblustre (e.g. catamount) client to - return to the app before handling all startup RPCs. This - could leave the node unresponsive to lustre network traffic - and manifested as a server ptllnd timeout. - -Severity : enhancement -Bugzilla : 11667 -Description: Add "/proc/sys/lustre/debug_peer_on_timeout" -Details : liblustre envirable: LIBLUSTRE_DEBUG_PEER_ON_TIMEOUT - boolean to control whether to print peer debug info when a - client's RPC times out. - -Severity : minor -Frequency : only for kernels with patches from Lustre below 1.4.3 -Bugzilla : 11248 -Description: Remove old rdonly API -Details : Remove old rdonly API which unused from at least lustre 1.4.3 - -Severity : major -Frequency : only for devices with external journals -Bugzilla : 10719 -Description: Set external device read-only also -Details : During a commanded failover stop, we set the disk device - read-only while the server shuts down. We now also set any - external journal device read-only at the same time. - -Severity : minor -Frequency : when upgrading from 1.4 while trying to change parameters -Bugzilla : 11692 -Description: The wrong (new) MDC name was used when setting parameters for - upgraded MDT's. Also allows changing of OSC (and MDC) - parameters if --writeconf is specified at tunefs upgrade time. - -Severity : major -Frequency : when setting specific ost indicies -Bugzilla : 11149 -Description: QOS code breaks on skipped indicies -Details : Add checks for missing OST indicies in the QOS code, so OSTs - created with --index need not be sequential. - -Severity : enhancement -Bugzilla : 11264 -Description: Add uninit_groups feature to ldiskfs2 to speed up e2fsck -Details : The uninit_groups feature works in conjunction with the kernel - filesystem code (ldiskfs2 only) and e2fsprogs-1.39-cfs6 to speed - up the pass1 processing of e2fsck. This is a read-only feature - in ldiskfs2 only, so older kernels and current ldiskfs cannot - mount filesystems that have had this feature enabled. - -Severity : enhancement -Bugzilla : 10816 -Description: Improve multi-block allocation algorithm to avoid fragmentation -Details : The mballoc3 code (ldiskfs2 only) adds new mechanisms to improve - allocation locality and avoid filesystem fragmentation. - -Severity : normal -Frequency : rare -Bugzilla : 14036 -Description: lfs quota fails with deactivated OSTS -Details : With this patch, three improvements are included: - 1. detete the softlimit in mds and osts when use "lfs quota". - 2. display the inaccurate data in the output of "lfs quota". - 3. try to get quota info when "lfs quota" is executed. - ------------------------------------------------------------------------------- - -2007-04-01 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.10 - * Support for kernels: - 2.4.21-47.0.1.EL (RHEL 3) - 2.6.5-7.283 (SLES 9) - 2.6.9-42.0.10.EL (RHEL 4) - 2.6.12.6 vanilla (kernel.org) - 2.6.16.27-0.9 (SLES 10) - * Recommended e2fsprogs version: 1.39.cfs5 - - * Note that reiserfs quotas are disabled on SLES 10 in this kernel - * bug fixes - -Severity : critical -Frequency : occasional, depends on client load and configuration -Bugzilla : 12181, 12203 -Description: data loss for recently-modified files -Introduced : 1.4.6 -Details : In some cases it is possible that recently written or created - files may not be written to disk in a timely manner (this should - normally be within 30s unless client IO load is very high). - The problem appears as zero-length files or files that are a - multiple of 1MB in size after a client crash or client eviction - that are missing data at the end of the file. - - This problem is more likely to be hit on clients where files are - repeatedly created and unlinked in the same directory, clients - have a large amount of RAM, have many CPUs, the filesystem has - many OSTs, the clients are rebooted frequently, and/or the files - are not accessed by other nodes after being written. - - The presence of the problem can be detected by looking at - /proc/sys/fs/inode-state. If the first number (nr_inodes) is - smaller than the second (nr_unused) then dirty files will not - be flushed automatically to disk. "sync; sleep 10" should be - run several times on the node before unmounting it to update - Lustre (this is also safe to run on nodes without this problem). - - There is also a related kernel bug in the RHEL4 4 2.6.9 kernel - that can cause this same problem, so customers using that kernel - also need to update the kernel in addition to Lustre. In order - to properly fix this bug, the RHEL3 2.4.21 kernel is also updated. - - It is normal that files written just before a client crash (less - than 30s) may not yet have been flushed to disk, even for local - filesystems. - -Severity : normal -Frequency : frequent on thin XT3 nodes -Bugzilla : 10802 -Description: UUID collision on thin XT3 Linux nodes -Details : UUIDs on Compute Node Linux XT3 nodes were not generated - randomly, since we relied on an insufficiently-seeded PRNG. - -Severity : normal -Frequency : rare -Bugzilla : 11693 -Description: OSS hangs after "All ost request buffers busy" -Details : A deadlock between quota and journal operations caused OSS - hangs after printing "All ost request buffers busy." - -Severity : minor -Frequency : always on liblustre builds -Bugzilla : 11175 -Description: Cleanup compiler warnings on liblustre - -Severity : minor -Frequency : always on liblustre builds on XT3 -Bugzilla : 12146 -Description: LC_CONFIG_CDEBUG don't run while build liblustre on XT3. - -Frequency : always -Bugzilla : 3244 -Description: Addition of EXT3_FEATURE_RO_COMPAT_DIR_NLINKS flag for - > 32000 subdirectories -Details : Add EXT3_FEATURE_RO_COMPAT_DIR_NLINK flag to - EXT3_FEATURE_RO_COMPAT_SUPP. This flag will be set whenever - subdirectory count crosses 32000. This will aid e2fsck to - correctly handle more than 32000 subdirectories. - -Severity : major -Frequency : liblustre (e.g. catamount) on a large cluster with >= 8 OSTs/OSS -Bugzilla : 11684 -Description: System hang on startup -Details : This bug allowed the liblustre (e.g. catamount) client to - return to the app before handling all startup RPCs. This - could leave the node unresponsive to lustre network traffic - and manifested as a server ptllnd timeout. - -Severity : enhancement -Bugzilla : 11667 -Description: Add "/proc/sys/lustre/debug_peer_on_timeout" - (liblustre envirable: LIBLUSTRE_DEBUG_PEER_ON_TIMEOUT) - boolean to control whether to print peer debug info when a - client's RPC times out. - -Severity : normal -Frequency : always -Bugzilla : 10214 -Description: make O_SYNC working on 2.6 kernels -Details : 2.6 kernels use different method for mark pages for write, - so need add a code to lustre for O_SYNC work. - -Severity : minor -Frequency : always -Bugzilla : 11110 -Description: Failure to close file and release space on NFS -Details : Put inode details into lock acquired in ll_intent_file_open. - Use mdc_intent_lock in ll_intent_open to properly - detect all kind of errors unhandled by mdc_enqueue. - -Severity : major -Frequency : rare -Bugzilla : 10866 -Description: proc file read during shutdown sometimes raced obd removal, - causing node crash -Details : Add lock to prevent obd access after proc file removal. - -Severity : normal -Frequency : Only for files larger than 4GB on 32-bit clients. -Bugzilla : 11237 -Description: improperly doing page alignment of locks -Details : Modify lustre core code to use CFS_PAGE_* defines instead of - PAGE_*. Make CFS_PAGE_MASK a 64-bit mask. - -Severity : normal -Frequency : rarely -Bugzilla : 11203 -Description: RPCs being resent when they shouldn't be -Details : Some RPCs that should not be resent are being resent. This - can cause inconsistencies in the RPC state machine. Do not - resend such requests. - -Severity : normal -Frequency : rare, only with NFS export -Bugzilla : 11669 -Description: Crash on NFS re-export node -Details : under very unusual load conditions an assertion is hit in - ll_intent_file_open() - -Severity : major -Frequency : only if OST filesystem is corrupted -Bugzilla : 9829 -Description: client incorrectly hits assertion in ptlrpc_replay_req() -Details : for a short time RPCs with bulk IO are in the replay list, - but replay of bulk IOs is unimplemented. If the OST filesystem - is corrupted due to disk cache incoherency and then replay is - started it is possible to trip an assertion. Avoid putting - committed RPCs into the replay list at all to avoid this issue. - -Severity : normal -Frequency : always -Bugzilla : 10901 -Description: large O_DIRECT requests fail under memory pressure/fragmentation -Details : Large single O_DIRECT read and write calls can fail to allocate - a sufficiently large buffer to process the request. In case of - allocation failure the allocation is retried with a smaller - buffer and broken into smaller requests. - -Severity : enhancement -Bugzilla : 11563 -Description: Add -o localflock option to simulate old noflock behaviour. -Details : This will achieve local-only flock/fcntl locks coherentness. - -Severity : normal -Frequency : always -Bugzilla : 11090 -Description: versioning check is incomplete -Details : Checking the version difference of client vs. server, report - error if the gap is too big. - -Severity : major -Bugzilla : 11710 -Frequency : always -Description: add support PG_writeback bit -Details : add support for PG_writeback bit for Lustre, for more carefull - work with page cache in 2.6 kernel. This also fix some deadlocks - and remove hack for work O_SYNC with 2.6 kernel. - -Severity : enhancement -Bugzilla : 11264 -Description: Add uninit_groups feature to ldiskfs2 to speed up e2fsck -Details : The uninit_groups feature works in conjunction with the kernel - filesystem code (ldiskfs2 only) and e2fsprogs-1.39-cfs6 to speed - up the pass1 processing of e2fsck. This is a read-only feature - in ldiskfs2 only, so older kernels and current ldiskfs cannot - mount filesystems that have had this feature enabled. - -Severity : enhancement -Bugzilla : 10816 -Description: Improve multi-block allocation algorithm to avoid fragmentation -Details : The mballoc3 code (ldiskfs2 only) adds new mechanisms to improve - allocation locality and avoid filesystem fragmentation. - ------------------------------------------------------------------------------- - -2007-02-09 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.9 - * Support for kernels: - 2.6.9-42.0.3.EL (RHEL 4) - 2.6.5-7.276 (SLES 9) - 2.4.21-47.0.1.EL (RHEL 3) - 2.6.12.6 vanilla (kernel.org) - 2.6.16.21-0.8 (SLES10) - * Recommended e2fsprogs version: 1.39.cfs2-0 - - * The backwards-compatible /proc/sys/portals symlink has been removed - in this release. Before upgrading, please ensure that you change - any configuration scripts or /etc/sysctl.conf files that access - /proc/sys/portals/* or sysctl portals.* to use the corresponding - entry in /proc/sys/lnet or sysctl lnet.*. This change can be made - in advance of the upgrade on any system running Lustre 1.4.6 or - newer, since /proc/sys/lnet was added in that version. - * Note that reiserfs quotas are disabled on SLES 10 in this kernel - * bug fixes - -Severity : minor -Frequency : only when quota is used -Bugzilla : 11286 -Description: avoid scanning export list for quota master -Details : Change the algorithms to avoid scanning export list in order - to improve the efficiency. - -Severity : critical -Frequency : MDS failover only, very rarely -Bugzilla : 11125 -Description: "went back in time" messages on mds failover -Details : The greatest transno may be lost when the current operation - finishes with an error (transno==0) and the client's last_rcvd - record is over-written. Save the greatest transno in the - mds_last_transno for this case. - -Severity : minor -Frequency : always for specific kernels and striping counts -Bugzilla : 11042 -Description: client may get "Matching packet too big" without ACL support -Details : Clients compiled without CONFIG_FS_POSIX_ACL get an error message - when trying to access files in certain configurations. The - clients should in fact be denied when mounting because they do - not understand ACLs. - -Severity : major -Frequency : Cray XT3 with more than 4000 clients and multiple jobs -Bugzilla : 10906 -Description: many clients connecting with IO in progress causes connect timeouts -Details : Avoid synchronous journal commits to avoid delays caused by many - clients connecting/disconnecting when bulk IO is in progress. - Queue liblustre connect requests on OST_REQUEST_PORTAL instead of - OST_IO_PORTAL to avoid delays behind potentially many pending - slow IO requests. - -Severity : normal -Frequency : occasionally with multiple writers to a single file -Bugzilla : 11081 -Description: shared writes to file may result in wrong size reported by stat() -Details : Allow growing of kms when extent lock is cancelled - -Severity : minor -Frequency : always with random mmap IO to multi-striped file -Bugzilla : 10919 -Description: mmap write might be lost if we are writing to a 'hole' in stripe -Details : Only if the hole is at the end of OST object so that kms is too - small. Fix is to increase kms accordingly in ll_nopage. - -Severity : normal -Frequency : rare, only if OST filesystem is inconsistent with MDS filesystem -Bugzilla : 11211 -Description: writes to a missing object would leak memory on the OST -Details : If there is an inconsistency between the MDS and OST filesystems, - such that the MDS references an object that doesn't exist, writes - to that object will leak memory due to incorrect cleanup in the - error handling path, eventually running out of memory on the OST. - -Severity : minor -Frequency : rare -Bugzilla : 11040 -Description: Creating too long symlink causes lustre errors -Details : Check symlink and name lengths before sending requests to MDS. - -Severity : normal -Frequency : only if flock is enabled (not on by default) -Bugzilla : 11415 -Description: posix locks not released on fd closure on 2.6.9+ -Details : We failed to add posix locks to list of inode locks on 2.6.9+ - kernels, this caused such locks not to be released on fd close and - then assertions on fs unmount about still used locks. - -Severity : minor -Frequency : MDS failover only, very rarely -Bugzilla : 11277 -Description: clients may get ASSERTION(granted_lock != NULL) -Details : When request was taking a long time, and a client was resending - a getattr by name lock request. The were multiple lock requests - with the same client lock handle and - mds_getattr_name->fixup_handle_for_resent_request found one of the - lock handles but later failed with ASSERTION(granted_lock != NULL). - -Severity : major -Frequency : rare -Bugzilla : 10891 -Description: handle->h_buffer_credits > 0, assertion failure -Details : h_buffer_credits is zero after truncate, causing assertion - failure. This patch extends the transaction or creates a new - one after truncate. - -Severity : normal -Frequency : NFS re-export or patchless client -Bugzilla : 11179, 10796 -Description: Crash on NFS re-export node (__d_move) -Details : We do not want to hash the dentry if we don't have a lock. - But if this dentry is later used in d_move, we'd hit uninitialised - list head d_hash, so we just do this to init d_hash field but - leave dentry unhashed. - -Severity : normal -Frequency : NFS re-export or patchless client -Bugzilla : 11135 -Description: NFS exports has problem with symbolic link -Details : lustre client didn't properly install dentry when re-exported - to NFS or running patchless client. - -Severity : normal -Frequency : NFS re-export or patchless client -Bugzilla : 10796 -Description: Various nfs/patchless fixes. -Details : fixes reuse disconected alias for lookup process - this fixes - warning "find_exported_dentry: npd != pd", - fix permission error with open files at nfs. - fix apply umask when do revalidate. - -Severity : normal -Frequency : occasional -Bugzilla : 11191 -Description: Crash on NFS re-export node -Details : calling clear_page() on the wrong pointer triggered oops in - generic_mapping_read(). - -Severity : normal -Frequency : rarely, using O_DIRECT IO -Bugzilla : 10903 -Description: unaligned directio crashes client with LASSERT -Details : check for unaligned buffers before trying any requests. - -Severity : major -Frequency : rarely, using CFS RAID5 patches in non-standard kernel series -Bugzilla : 11313 -Description: stale data returned from RAID cache -Details : If only a small amount of IO is done to the RAID device before - reading it again it is possible to get stale data from the RAID - cache instead of reading it from disk. - -Severity : normal -Frequency : always for sles10 kernel -Bugzilla : 10947 -Description: sles10 support -Details : ll_follow_link: compile fixes and using of nd_set_link - under newer kernels. - -Severity : major -Frequency : depends on arch, kernel and compiler version, always on sles10 - kernel and x86_64 -Bugzilla : 11562 -Description: recursive or deep enough symlinks cause stack overflow -Details : getting rid of large stack-allocated variable in - __vfs_follow_link - -Severity : minor -Frequency : depends on hardware -Bugzilla : 11540 -Description: lustre write performance loss in the SLES10 kernel -Details : the performance loss is caused by using of write barriers in the - ext3 code. The SLES10 kernel turns barrier support on by - default. The fix is to undo that change for ldiskfs. - ------------------------------------------------------------------------------- - -2006-12-09 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.8 - * Support for kernels: - 2.6.9-42.0.3EL (RHEL 4) - 2.6.5-7.276 (SLES 9) - 2.4.21-47.0.1.EL (RHEL 3) - 2.6.12.6 vanilla (kernel.org) - * bug fixes - -Severity : major -Frequency : quota enabled and large files being deleted -Bugzilla : 10707 -Description: releasing more than 4GB of quota at once hangs OST -Details : If a user deletes more than 4GB of files on a single OST it - will cause the OST to spin in an infinite loop. Release - quota in < 4GB chunks, or use a 64-bit value for 1.4.7.1+. - -Severity : minor -Frequency : rare -Bugzilla : 10845 -Description: statfs data retrieved from /proc may be stale or zero -Details : When reading per-device statfs data from /proc, in the - {kbytes,files}_{total,free,avail} files, it may appear - as zero or be out of date. - -Severity : minor -Frequency : systems with MD RAID1 external journal devices -Bugzilla : 10832 -Description: lconf's call to blkid is confused by RAID1 journal devices -Details : Use the "blkid -l" flag to locate the MD RAID device instead - of returning all block devices that match the journal UUID. - -Severity : normal -Frequency : always, for aggregate stripe size over 4GB -Bugzilla : 10725 -Description: "lfs setstripe" fails assertion when setting 4GB+ stripe width -Details : Using "lfs setstripe" to set stripe size * stripe count over 4GB - will fail the kernel with "ASSERTION(lsm->lsm_xfersize != 0)" - -Severity : minor -Frequency : always if "lfs find" used on a local file/directory -Bugzilla : 10864 -Description: "lfs find" segfaults if used on a local file/directory -Details : The case where a directory component was not specified wasn't - handled correctly. Handle this properly. - -Severity : normal -Frequency : always on ppc64 -Bugzilla : 10634 -Description: the write to an ext3 filesystem mounted with mballoc got stuck -Details : ext3_mb_generate_buddy() uses find_next_bit() which does not - perform endianness conversion. - -Severity : major -Frequency : rarely (truncate to non-zero file size after write under load) -Bugzilla : 10730, 10687 -Description: Files padded with zeros to next 4K multiple -Details : With filesystems mounted using the "extents" option (2.6 kernels) - it is possible that files that are truncated to a non-zero size - immediately after being written are filled with zero bytes beyond - the truncated size. No file data is lost. - -Severity : enhancement -Bugzilla : 10452 -Description: Allow recovery/failover for liblustre clients. -Details : liblustre clients were unaware of failover configurations until - now. - -Severity : enhancement -Bugzilla : 10743 -Description: user file locks should fail when not mounting with flock option -Details : Set up an error-returning stub in ll_file_operations.lock field - to prevent incorrect behaviour when client is mounted without - flock option. Also, set up properly f_op->flock field for - RHEL4 kernels. - -Severity : minor -Frequency : always on ia64 -Bugzilla : 10905 -Description: "lfs df" loops on printing out MDS statfs information -Details : The obd_ioctl_data was not initialized and in some systems - this caused a failure during the ioctl that did not return - an error. Initialize the struct and return an error on failure. - -Severity : minor -Frequency : SLES 9 only -Bugzilla : 10667 -Description: Error of copying files with lustre special EAs as root -Details : Client side always return success for setxattr call for lustre - special xattr (currently only "trusted.lov"). - -Severity : normal -Frequency : rarely on clusters with both ia64+i386 clients -Bugzilla : 10672 -Description: ia64+i686 clients doing shared IO on the same file may LBUG -Details : In rare cases when both ia64+i686 (or other mixed-PAGE_SIZE) - clients are doing concurrent writes to the same file it is - possible that the ia64 clients may LASSERT because the OST - extent locks are not PAGE_SIZE aligned. Ensure that grown - locks are always aligned on the request boundary. - -Severity : normal -Frequency : specific use, occasional -Bugzilla : 7040 -Description: Overwriting in use executable truncates on-disk binary image -Details : If one node attempts to overwrite an executable in use by - another node, we now correctly return ETXTBSY instead of - truncating the file. - -Severity : enhancement -Bugzilla : 4900 -Description: Async OSC create to avoid the blocking unnecessarily. -Details : If a OST has no remain object, system will block on the creating - when need to create a new object on this OST. Now, ways use - pre-created objects when available, instead of blocking on an - empty osc while others are not empty. If we must block, we block - for the shortest possible period of time. - -Severity : normal -Frequency : rare -Bugzilla : 2707 -Description: chmod on Lustre root is propagated to other clients -Details : Re-validate root's dentry in ll_lookup_it to avoid having it - invalid by the follow_mount time. - -Severity : minor -Frequency : liblustre clients only -Bugzilla : 10883 -Description: Race in 'instant cancel' lock handling could lead to such locks - never to be granted in case of SMP MDS -Details : Do not destroy not yet granted but cbpending locks in - handle_enqueue - -Severity : minor -Frequency : replay/resend of open -Bugzilla : 10991 -Description: non null lock assetion failure in mds_intent_policy -Details : Trying to replay/resend lockless open requests resulted in - mds_open() returning 0 with no lock. Now it sets a flag if - a lock is going to be returned. - -Severity : enhancement -Bugzilla : 10889 -Description: Checksum enhancements -Details : New checksum enhancements allow for resending RPCs that failed - checksum checks. - -Severity : enhancement -Bugzilla : 7376 -Description: Tunables on number of dirty pages in cacche -Details : Allow to set limit on number of dirty pages cached. - -Severity : normal -Frequency : rare -Bugzilla : 10643 -Description: client crash on unmount - lock still has references -Details : In some error handling cases it was possible to leak a lock - reference on a client while accessing a file. This was not - harmful to the client during operation, but would cause the - client to crash when the filesystem is unmounted. - -Severity : normal -Frequency : specific case, rare -Bugzilla : 10921 -Description: ETXTBSY on mds though file not in use by client -Details : ETXTBSY is no longer incorrectly returned when attempting to - chmod or chown a directory that the user previously tried to - execute or a currently-executing binary. - -Severity : major -Frequency : extremely rare except on liblustre-based clients -Bugzilla : 10480 -Description: Lustre space not freed when files are deleted -Details : Clean up open-unlinked files after client eviction. Previously - the unlink was skipped and the files remained as orphans. - -Severity : normal -Frequency : rare -Bugzilla : 10999 -Description: OST failure "would be an LBUG" in waiting_locks_callback() -Details : In some cases it was possible to send a blocking callback to - a client doing a glimpse, even though that client didn't get - a lock granted. When the glimpse lock is cancelled on the OST - the freed lock is left on the waiting list and corrupted the list. - -Severity : major -Frequency : all core dumps -Bugzilla : 11103 -Description: Broke core dumps to lustre -Details : Negative dentry may be unhashed if parent does not have UPDATE - lock, but some callers, e.g. do_coredump, expect dentry to be - hashed after successful create, hash it in ll_create_it. - ------------------------------------------------------------------------------- - -2006-09-13 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.7.1 - * Support for kernels: - 2.6.9-42.0.2.EL (RHEL 4) - 2.6.5-7.276 (SLES 9) - 2.4.21-40.EL (RHEL 3) - 2.6.12.6 vanilla (kernel.org) - * bug fix - -Severity : major -Frequency : always on RHEL 3 -Bugzilla : 10867 -Description: Number of open files grows over time -Details : The number of open files grows over time, whether or not - Lustre is started. This was due to a filp leak introduced - by one of our kernel patches. - ------------------------------------------------------------------------------- - -2006-08-20 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.7 - * Support for kernels: - 2.6.9-42.EL (RHEL 4) - 2.6.5-7.267 (SLES 9) - 2.4.21-40.EL (RHEL 3) - 2.6.12.6 vanilla (kernel.org) - * bug fixes - -Severity : major -Frequency : rare -Bugzilla : 5719, 9635, 9792, 9684 -Description: OST (or MDS) trips assertions in (re)connection under heavy load -Details : If a server is under heavy load and cannot reply to new - connection requests before the client resends the (re)connect, - the connection handling code can behave badly if two service - threads are concurrently handing separate (re)connections from - the same client. Add better locking to the connection handling - code, and ensure that only a single connection will be processed - for a given client UUID, even if the lock is dropped. - -Severity : enhancement -Bugzilla : 3627 -Description: add TCP zero-copy support to kernel -Details : Add support to the kernel TCP stack to allow zero-copy bulk - sends if the hardware supports scatter-gather and checksumming. - This allows socklnd to do client-write and server-read more - efficiently and reduce CPU utilization from skbuf copying. - -Severity : minor -Frequency : only if NFS exporting from client -Bugzilla : 10258 -Description: NULL pointer deref in ll_iocontrol() if chattr mknod file -Details : If setting attributes on a file created under NFS that had - never been opened it would be possible to oops the client - if the file had no objects. - -Severity : major -Frequency : rare -Bugzilla : 9326, 10402, 10897 -Description: client crash in ptlrpcd_wake() thread when sending async RPC -Details : It is possible that ptlrpcd_wake() dereferences a freed async - RPC. In rare cases the ptlrpcd thread alread processed the RPC - before ptlrpcd_wake() was called and the request was freed. - -Severity : minor -Frequency : always for liblustre -Bugzilla : 10290 -Description: liblustre client does MDS+OSTs setattr RPC for each write -Details : When doing a write from a liblustre client, the client - incorrectly issued an RPC to the MDS and each OST the file was - striped over in order to update the timestamps. When writing - with small chunks and many clients this could overwhelm the MDS - with RPCs. In all cases it would slow down the write because - these RPCs are unnecessary. - -Severity : enhancement -Bugzilla : 9340 -Description: allow number of MDS service threads to be changed at module load -Details : It is now possible to change the number of MDS service threads - running. Adding "options mds mds_num_threads={N}" to the MDS's - /etc/modprobe.conf will set the number of threads for the next - time Lustre is restarted (assuming the "mds" module is also - reloaded at that time). The default number of threads will - stay the same, 32 for most systems. - -Severity : major -Frequency : rare -Bugzilla : 10300 -Description: OST crash if filesystem is unformatted or corrupt -Details : If an OST is started on a device that has never been formatted - or if the filesystem is corrupt and cannot even mount then the - error handling cleanup routines would dereference a NULL pointer. - -Severity : normal -Frequency : rare -Bugzilla : 10047 -Description: NULL pointer deref in llap_from_page. -Details : get_cache_page_nowait can return a page with NULL (or otherwise - incorrect) mapping if the page was truncated/reclaimed while it was - searched for. Check for this condition and skip such pages when - doing readahead. Introduce extra check to llap_from_page() to - verify page->mapping->host is non-NULL (so page is not anonymous). - -Severity : minor -Frequency : Sometimes when using sys_sendfile -Bugzilla : 7020 -Description: "page not covered by a lock" warnings from ll_readpage -Details : sendfile called ll_readpage without right page locks present. - Now we introduced ll_file_sendfile that does necessary locking - around call to generic_file_sendfile() much like we do in - ll_file_read(). - -Severity : normal -Frequency : with certain MDS communication failures at client mount time -Bugzilla : 10268 -Description: NULL pointer deref after failed client mount -Details : a client connection request may delayed by the network layer - and not be sent until after the PTLRPC layer has timed out the - request. If the client fails the mount immediately it will try - to clean up before the network times out the request. Add a - reference from the request import to the obd device and delay - the cleanup until the network drops the request. - -Severity : normal -Frequency : occasionally during client (re)connect -Bugzilla : 9387 -Description: assertion failure during client (re)connect -Details : processing a client connection request may be delayed by the - client or server longer than the client connect timeout. This - causes the client to resend the connection request. If the - original connection request is replied in this interval, the - client may trip an assertion failure in ptlrpc_connect_interpret() - which thought it would be the only running connect process. - -Severity : normal -Frequency : only with obd_echo servers and clients that are rebooted -Bugzilla : 10140 -Description: kernel BUG accessing uninitialized data structure -Details : When running an obd_echo server it did not start the ping_evictor - thread, and when a client was evicted an uninitialized data - structure was accessed. Start the ping_evictor in the RPC - service startup instead of the OBD startup. - -Severity : enhancement -Bugzilla : 10193 (patchless) -Description: Remove dependency on various unexported kernel interfaces. -Details : No longer need reparent_to_init, exit_mm, exit_files, - sock_getsockopt, filemap_populate, FMODE_EXEC, put_filp. - -Severity : minor -Frequency : rare (only users of deprecated and unsupported LDAP config) -Bugzilla : 9337 -Description: write_conf for zeroconf mount queried LDAP incorrectly for client -Details : LDAP apparently contains 'lustreName' attributes instead of - 'name'. A simple remapping of the name is sufficient. - -Severity : major -Frequency : rare (only with non-default dump_on_timeout debug enabled) -Bugzilla : 10397 -Description: waiting_locks_callback trips kernel BUG if client is evicted -Details : Running with the dump_on_timeout debug flag turned on makes - it possible that the waiting_locks_callback() can try to dump - the Lustre kernel debug logs from an interrupt handler. Defer - this log dumping to the expired_lock_main() thread. - -Severity : enhancement -Bugzilla : 10420 -Description: Support NFS exporting on 2.6 kernels. -Details : Implement non-rawops metadata methods for NFS server to use without - changing NFS server code. - -Severity : normal -Frequency : very rare (synthetic metadata workload only) -Bugzilla : 9974 -Description: two racing renames might cause an MDS thread to deadlock -Details : Running the "racer" program may cause one MDS thread to rename - a file from being the source of a rename to being the target of - a rename at exactly the same time that another thread is doing - so, and the second thread has already enqueued these locks after - doing a lookup of the target and is trying to relock them in - order. Ensure that we don't try to re-lock the same resource. - -Severity : major -Frequency : only very large systems with liblustre clients -Bugzilla : 7304 -Description: slow eviction of liblustre clients with the "evict_by_nid" RPC -Details : Use asynchronous set_info RPCs to send the "evict_by_nid" to - all OSTs in parallel. This allows the eviction of stale liblustre - clients to proceed much faster than if they were done in series, - and also offers similar improvements for other set_info RPCs. - -Severity : minor -Frequency : common -Bugzilla : 10265 -Description: excessive CPU usage during initial read phase on client -Details : During the initial read phase on a client, it would agressively - retry readahead on the file, consuming too much CPU and impacting - performance (since 1.4.5.8). Improve the readahead algorithm - to avoid this, and also improve some other common cases (read - of small files in particular, where "small" is files smaller than - /proc/fs/lustre/llite/*/max_read_ahead_whole_mb, 2MB by default). - -Severity : minor -Frequency : rare -Bugzilla : 10450 -Description: MDS crash when receiving packet with unknown intent. -Details : Do not LBUG in unknown intent case, just return -EFAULT - -Severity : enhancement -Bugzilla : 9293, 9385 -Description: MDS RPCs are serialised on client. This is unnecessary for some. -Details : Do not serialize getattr (non-intent version) and statfs. - -Severity : minor -Frequency : occasional, when OST network is overloaded/intermittent -Bugzilla : 10416 -Description: client evicted by OST after bulk IO timeout -Details : If a client sends a bulk IO request (read or write) the OST - may evict the client if it is unresposive to its data GET/PUT - request. This is incorrect if the network is overloaded (takes - too long to transfer the RPC data) or dropped the OST GET/PUT - request. There is no need to evict the client at all, since - the pinger and/or lock callbacks will handle this, and the - client can restart the bulk request. - -Severity : minor -Frequency : Always when mmapping file with no objects -Bugzilla : 10438 -Description: client crashes when mmapping file with no objects -Details : Check that we actually have objects in a file before doing any - operations on objects in ll_vm_open, ll_vm_close and - ll_glimpse_size. - -Severity : minor -Frequency : Rare -Bugzilla : 10484 -Description: Request leak when working with deleted CWD -Details : Introduce advanced request refcount tracking for requests - referenced from lustre intent. - -Severity : Enhancement -Bugzilla : 10482 -Description: Cache open file handles on client. -Details : MDS now will return special lock along with openhandle, if - requested and client is allowed to hold openhandle, even if unused, - until such a lock is revoked. Helps NFS a lot, since NFS is opening - closing files for every read/write openration. - -Severity : Enhancement -Bugzilla : 9291 -Description: Cache open negative dentries on client when possible. -Details : Guard negative dentries with UPDATE lock on parent dir, drop - negative dentries on lock revocation. - -Severity : minor -Frequency : Always -Bugzilla : 10510 -Description: Remounting a client read-only wasn't possible with a zconf mount -Details : It wasn't possible to remount a client read-only with llmount. - -Severity : enhancement -Description: Include MPICH 1.2.6 Lustre ADIO interface patch -Details : In lustre/contrib/ or /usr/share/lustre in RPM a patch for - MPICH is included to add Lustre-specific ADIO interfaces. - This is based closely on the UFS ADIO layer and only differs - in file creation, in order to allow the OST striping to be set. - This is user-contributed code and not supported by CFS. - -Severity : minor -Frequency : Always -Bugzilla : 9486 -Description: extended inode attributes (immutable, append-only) work improperly - when 2.4 and 2.6 kernels are used on client/server or vice versa -Details : Introduce kernel-independent values for these flags. - -Severity : enhancement -Frequency : Always -Bugzilla : 10248 -Description: Allow fractional MB tunings for lustre in /proc/ filesystem. -Details : Many of the /proc/ tunables can only be tuned at a megabyte - granularity. Now, Fractional MB granularity is be supported, - this is very useful for low memory system. - -Severity : enhancement -Bugzilla : 9292 -Description: Getattr by fid -Details : Getting a file attributes by its fid, obtaining UPDATE|LOOKUP - locks, avoids extra getattr rpc requests to MDS, allows '/' to - have locks and avoids getattr rpc requests for it on every stat. - -Severity : major -Frequency : Always, for filesystems larger than 2TB -Bugzilla : 6191 -Description: ldiskfs crash at mount for filesystem larger than 2TB with mballoc -Details : Kenrel kmalloc limits allocations to 128kB and this prevents - filesystems larger than 2TB to be mounted with mballoc enabled. - -Severity : critical -Frequency : Always, for 32-bit kernel without CONFIG_LBD and filesystem > 2TB -Bugzilla : 6191 -Description: filesystem corruption for non-standard kernels and very large OSTs -Details : If a 32-bit kernel is compiled without CONFIG_LBD enabled and a - filesystems larger than 2TB is mounted then the kernel will - silently corrupt the start of the filesystem. CONFIG_LBD is - enabled for all CFS-supported kernels, but the possibility of - this happening with a modified kernel config exists. - -Severity : enhancement -Bugzilla : 10462 -Description: add client O_DIRECT support for 2.6 kernels -Details : It is now possible to do O_DIRECT reads and writes to files - in the Lustre client mountpoint on 2.6 kernel clients. - -Severity : enhancement -Bugzilla : 10446 -Description: parallel glimpse, setattr, statfs, punch, destroy requests -Details : Sends glimpse, setattr, statfs, punch, destroy requests to OSTs in - parallel, not waiting for response from every OST before sending - a rpc to the next OST. - -Severity : minor -Frequency : rare -Bugzilla : 10150 -Description: setattr vs write race when updating file timestamps -Details : Client processes that update a file timestamp into the past - right after writing to the file (e.g. tar) it is possible that - the updated file modification time can be reset to the current - time due to a race between processing the setattr and write RPC. - -Severity : enhancement -Bugzilla : 10318 -Description: Bring 'lfs find' closer in line with regular Linux find. -Details : lfs find util supports -atime, -mtime, -ctime, -maxdepth, -print, - -print0 options and obtains all the needed info through the lustre - ioctls. - -Severity : enhancement -Bugzilla : 6221 -Description: support up to 1024 configured devices on one node -Details : change obd_dev array from statically allocated to dynamically - allocated structs as they are first used to reduce memory usage - -Severity : minor -Frequency : rare -Bugzilla : 10437 -Description: Flush dirty partially truncated pages during truncate -Details : Immediatelly flush partially truncated pages in filter_setattr, - this way we completely avoid having any pages in page cache on OST - and can retire ugly workarounds during writes to flush such pages. - -Severity : minor -Frequency : rare -Bugzilla : 10409 -Description: i_sem vs transaction deadlock in mds_obd_destroy during unlink. -Details : protect inode from truncation within vfs_unlink() context - just take a reference before calling vfs_unlink() and release it - when parent's i_sem is free. - -Severity : minor -Frequency : always, if extents are used on OSTs -Bugzilla : 10703 -Description: index ei_leaf_hi (48-bit extension) is not zeroed in extent index -Details : OSTs using the extents format would not zero the high 16 bits of - the index physical block number. This is not a problem for any - OST filesystems smaller than 16TB, and no kernels support ext3 - filesystems larger than 16TB yet. This is fixed in 1.4.7 (all - new/modified files) and can be fixed for existing filesystems - with e2fsprogs-1.39-cfs1. - -Severity : minor -Frequency : rare -Bugzilla : 9387 -Description: import connection selection may be incorrect if timer wraps -Details : Using a 32-bit jiffies timer with HZ=1000 may cause backup - import connections to be ignored if the 32-bit jiffies counter - wraps. Use a 64-bit jiffies counter. - -Severity : major -Frequency : during server recovery -Bugzilla : 10479 -Description: crash after server is denying duplicate export -Details : If clients are resending connect requests to the server, the - server refuses to allow a client to connect multiple times. - Fixed a bug in the handling of this case. - -Severity : minor -Frequency : very large clusters immediately after boot -Bugzilla : 10083 -Description: LNET request buffers exhausted under heavy short-term load -Details : If a large number of client requests are generated on a service - that has previously never seen so many requests it is possible - that the request buffer growth cannot keep up with the spike in - demand. Instead of dropping incoming requests, they are held in - the LND until the RPC service can accept more requests. - -Severity : minor -Frequency : Sometimes during replay -Bugzilla : 9314 -Description: Assertion failure in ll_local_open after replay. -Details : If replay happened on an open request reply before we were able - to set replay handler, reply will become not swabbed tripping the - assertion in ll_local_open. Now we set the handler right after - recognising of open request - -Severity : minor -Frequency : very rare -Bugzilla : 10584 -Description: kernel reports "badness in vsnprintf" -Details : Reading from the "recovery_status" /proc file in small chunks - may cause a negative length in lprocfs_obd_rd_recovery_status() - call to vsnprintf() (which is otherwise harmless). Exit early - if there is no more space in the output buffer. - -Severity : enhancement -Bugzilla : 2259 -Description: clear OBD RPC statistics by writing to them -Details : It is now possible to clear the OBD RPC statistics by writing - to the "stats" file. - -Severity : minor -Frequency : rare -Bugzilla : 10641 -Description: Client mtime is not the same on different clients after utimes -Details : In some cases, the client was using the utimes() syscall on - a file cached on another node. The clients now validate the - ctime from the MDS + OSTs to determine which one is right. - -Severity : minor -Frequency : always -Bugzilla : 10611 -Description: Inability to activate failout mode -Details : lconf script incorrectly assumed that in python string's numeric - value is used in comparisons. - -Severity : minor -Frequency : always with multiple stripes per file -Bugzilla : 10671 -Description: Inefficient object allocation for mutli-stripe files -Details : When selecting which OSTs to stripe files over, for files with - a stripe count that divides evenly into the number of OSTs, - the MDS is always picking the same starting OST for each file. - Return the OST selection heuristic to the original design. - -Severity : minor -Frequency : rare -Bugzilla : 10673 -Description: mount failures may take full timeout to return an error -Details : Under some heavy load conditions it is possible that a - failed mount can wait for the full obd_timeout interval, - possibly several minutes, before reporting an error. - Instead return an error as soon as the status is known. - ------------------------------------------------------------------------------- - -2006-02-14 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.6 - * WIRE PROTOCOL CHANGE. This version of Lustre networking WILL NOT - INTEROPERATE with older versions automatically. Please read the - user documentation before upgrading any part of a live system. - * WARNING: Lustre networking configuration changes are required with - this release. See https://bugzilla.clusterfs.com/show_bug.cgi?id=10052 - for details. - * bug fixes - * Support for kernels: - 2.6.9-22.0.2.EL (RHEL 4) - 2.6.5-7.244 (SLES 9) - 2.6.12.6 vanilla (kernel.org) - - -Severity : enhancement -Bugzilla : 7981/8208 -Description: Introduced Lustre Networking (LNET) -Details : LNET is new networking infrastructure for Lustre, it includes - a reorganized network configuration mode (see the user - documentation for full details) as well as support for routing - between different network fabrics. Lustre Networking Devices - (LNDs) for the supported network fabrics have also been - created for this new infrastructure. - -Severity : enhancement -Description: Introduced Access control lists -Details : clients can set ACLs on files and directories in order to have - more fine-grained permissions than the standard Unix UGO+RWX. - The MDS must be started with the "-o acl" mount option. - -Severity : enhancement -Description: Introduced filesystem quotas -Details : Administrators may now establish per-user quotas on the - filesystem. - -Severity : enhancement -Bugzilla : 7982 -Description: Configuration change for the XT3 - The PTLLND is now used to run Lustre over Portals on the XT3 - The configure option(s) --with-cray-portals are no longer used. - Rather --with-portals=<path-to-portals-includes> is used to - enable building on the XT3. In addition to enable XT3 specific - features the option --enable-cray-xt3 must be used. - -Severity : major -Frequency : rare -Bugzilla : 7407 -Description: Running on many-way SMP OSTs can trigger oops in llcd_send() -Details : A race between allocating a new llcd and re-getting the llcd_lock - allowed another thread to grab newly-allocated llcd. - -Severity : enhancement -Bugzilla : 7116 -Description: 2.6 OST async journal commit and locking fix to improve performance -Details : The filter_direct_io()+filter_commitrw_write() journal commits for - 2.6 kernels are now async as they already were in 2.4 kernels so - that they can commit concurrently with the network bulk transfer. - For block-allocated files the filter allocation semaphore is held - to avoid filesystem fragmentation during allocation. BKL lock - removed for 2.6 xattr operations where it is no longer needed. - -Severity : minor -Frequency : rare -Bugzilla : 8320 -Description: lconf incorrectly determined whether two IP networks could talk -Details : In some more complicated routing and multiple-network - configurations, lconf will avoid trying to make a network - connection to a disjoint part of the IP space. It was doing the - math incorrectly for one set of cases. - -Severity : major -Frequency : rare -Bugzilla : 7359 -Description: Fix for potential infinite loop processing records in an llog. -Details : If an llog record is corrupted/zeroed, it is possible to loop - forever in llog_process(). Validate the llog record length - and skip the remainder of the block on error. - -Severity : minor -Frequency : occasional (liblustre only) -Bugzilla : 6363 -Description: liblustre could not open files whose last component is a symlink -Details : sysio_path_walk() would incorrectly pass the open intent to - intermediate path components. - -Severity : minor -Frequency : rare (liblustre only with non-standard tuning) -Bugzilla : 7201 (7350) -Description: Tuning the MDC DLM LRU size to zero triggers client LASSERT -Details : llu_lookup_finish_locks() tries to set lock data on a lock - after it has been released, only do this for referenced locks - -Severity : enhancement -Bugzilla : 7328 -Description: specifying an (invalid) directory default stripe_size of -1 - would reset the directory default striping -Details : stripe_size -1 was used internally to signal directory stripe - removal, now use "all default" to signal dir stripe removal - as a directory striping of "all default" is not useful - -Severity : minor -Frequency : common for large clusters running liblustre clients -Bugzilla : 7198 -Description: doing an ls when liblustre clients are running is slow -Details : sending a glimpse AST to a liblustre client waits for every AST - to time out, as liblustre clients will not respond. Since they - cannot cache data we refresh the OST lock LVB from disk instead. - -Severity : enhancement -Bugzilla : 7198 -Description: doing an ls at the same time as file IO can be slow -Details : enqueue and other "small" requests can be blocked behind many - large IO requests. Create a new OST IO portal for non-IO - requests so they can be processed faster. - -Severity : minor -Frequency : rare (only HPUX clients mounting unsupported re-exported NFS vol) -Bugzilla : 5781 -Description: an HPUX NFS client would get -EACCESS when ftruncate()ing a newly - created file with mode 000 -Details : the Linux NFS server relies on an MDS_OPEN_OWNEROVERRIDE hack to - allow an ftruncate() as a non-root user to a file with mode 000. - Lustre now respects this flag to disable mode checks when - truncating a file owned by the user - -Severity : minor -Frequency : liblustre-only, when liblustre client dies unexpectedly or becomes - busy -Bugzilla : 7313 -Description: Revoking locks from clients that went dead or catatonic might take - a lot of time. -Details : New lock flags FL_CANCEL_ON_BLOCK used by liblustre makes - cancellation of such locks instant on servers without waiting for - any reply from clients. Clients drops these locks when cancel - notification from server is received without replying. - -Severity : minor -Frequency : liblustre-only, when liblustre client dies or becomes busy -Bugzilla : 7311 -Description: Doing ls on Linux clients can take a long time with active - liblustre clients -Details : Liblustre client cannot handle ASTs in timely manner, so avoid - granting such locks to it in the first place if possible. Locks - are taken by proxy on the OST during the read or write and - dropped immediately afterward. Add connect flags handling, do - not grant locks to liblustre clients for glimpse ASTs. - -Severity : enhancement -Bugzilla : 6252 -Description: Improve read-ahead algorithm to avoid excessive IO for random reads -Details : Existing read-ahead algorithm is tuned for the case of streamlined - sequential reads and behaves badly with applications doing random - reads. Improve it by reading ahead at least read region, and - avoiding excessive large RPC for small reads. - -Severity : enhancement -Bugzilla : 8330 -Description: Creating more than 1000 files for a single job may cause a load - imbalance on the OSTs if there are also a large number of OSTs. -Details : qos_prep_create() uses an OST index reseed value that is an - even multiple of the number of available OSTs so that if the - reseed happens in the middle of the object allocation it will - still utilize the OSTs as uniformly as possible. - -Severity : major -Frequency : rare -Bugzilla : 8322 -Description: OST or MDS may oops in ping_evictor_main() -Details : ping_evictor_main() drops obd_dev_lock if deleting a stale export - but doesn't restart at beginning of obd_exports_timed list - afterward. - -Severity : enhancement -Bugzilla : 7304 -Description: improve by-nid export eviction on the MDS and OST -Details : allow multiple exports with the same NID to be evicted at one - time without re-searching the exports list. - -Severity : major -Frequency : rare, only with supplementary groups enabled on SMP 2.6 kernels -Bugzilla : 7273 -Description: MDS may oops in groups_free() -Details : in rare race conditions a newly allocated group_info struct is - freed again, and this can be NULL. The 2.4 compatibility code - for groups_free() checked for a NULL pointer, but 2.6 did not. - -Severity : minor -Frequency : common for liblustre clients doing little filesystem IO -Bugzilla : 9352, 7313 -Description: server may evict liblustre clients accessing contended locks -Details : if a client is granted a lock or receives a completion AST - with a blocking AST already set it would not reply to the AST - for LDLM_FL_CANCEL_ON_BLOCK locks. It now replies to such ASTs. - -Severity : minor -Frequency : lfs setstripe, only systems with more than 160 OSTs -Bugzilla : 9440 -Description: unable to set striping with a starting offset beyond OST 160 -Details : llapi_create_file() incorrectly limited the starting stripe - index to the maximum single-file stripe count. - -Severity : minor -Frequency : LDAP users only -Bugzilla : 6163 -Description: lconf did not handle in-kernel recovery with LDAP properly -Details : lconf/LustreDB get_refs() is searching the wrong namespace - -Severity : enhancement -Bugzilla : 7342 -Description: bind OST threads to NUMA nodes to improve performance -Details : all OST threads are uniformly bound to CPUs on a single NUMA - node and do their allocations there to localize memory access - -Severity : enhancement -Bugzilla : 7979 -Description: llmount can determine client NID directly from Myrinet (GM) -Details : the client NID code from gmnalnid was moved directly into - llmount, removing the need to use this or specifying the - client NID explicitly when mounting GM clients with zeroconf - -Severity : minor -Frequency : if client is started with down MDS -Bugzilla : 7184 -Description: if client is started with down MDS mount hangs in ptlrpc_queue_wait -Details : Having an LWI_INTR() wait event (interruptible, but no timeout) - will wait indefinitely in ptlrpc_queue_wait->l_wait_event() after - ptlrpc_import_delayed_req() because we didn't check if the - request was interrupted, and we also didn't break out of the - event loop if there was no timeout - -Severity : major -Frequency : rare -Bugzilla : 5047 -Description: data loss during non-page-aligned writes to a single file from - both multiple nodes and multiple threads on one node at same time -Details : updates to KMS and lsm weren't protected by common lock. Resulting - inconsistency led to false short-reads, that were cached and later - used by ->prepare_write() to fill in partially written page, - leading to data loss. - -Severity : minor -Frequency : always, if lconf --abort_recovery used -Bugzilla : 7047 -Description: lconf --abort_recovery fails with 'Operation not supported' -Details : lconf was attempting to abort recovery on the MDT device and not - the MDS device - -Severity : enhancement -Bugzilla : 9445 -Description: remove cleanup logs -Details : replace lconf-generated cleanup logs with lustre internal - cleanup routines. Eliminates the need for client-cleanup and - mds-cleanup logs. - -Severity : enhancement -Bugzilla : 8592 -Description: add support for EAs (user and system) on lustre filesystems -Details : it is now possible to store extended attributes in the Lustre - client filesystem, and with the user_xattr mount option it - is possible to allow users to store EAs on their files also - -Severity : enhancement -Bugzilla : 7293 -Description: Add possibility (config option) to show minimal available OST free - space. -Details : When compiled with --enable-mindf configure option, statfs(2) - (and so, df) will return least minimal free space available from - all OSTs as amount of free space on FS, instead of summary of - free spaces of all OSTs. - -Severity : enhancement -Bugzilla : 7311 -Description: do not expand extent locks acquired on OST-side -Details : Modify ldlm_extent_policy() to not expand local locks, acquired - by server: they are not cached anyway. - -Severity : major -Frequency : when mmap is used/binaries executed from Lustre -Bugzilla : 9482 -Description: Unmmap pages before throwing them away from read cache. -Details : llap_shrink cache now attempts to unmap pages before discarding - them (if unmapping failed - do not discard). SLES9 kernel has - extra checks that trigger if this unmapping is not done first. - -Severity : minor -Frequency : rare -Bugzilla : 6034 -Description: lconf didn't resolve symlinks before checking to see whether a - given mountpoint was already in use - -Severity : minor -Frequency : when migrating failover services -Bugzilla : 6395, 9514 -Description: When migrating a subset of services from a node (e.g. failback - from a failover service node) the remaining services would - time out and evict clients. -Details : lconf --force (implied by --failover) sets the global obd_timeout - to 5 seconds in order to quickly disconnect, but this caused - other RPCs to time out too quickly. Do not change the global - obd_timeout for force cleanup, only set it for DISCONNECT RPCs. - -Severity : enhancement -Frequency : if MDS is started with down OST -Bugzilla : 9439,5706 -Description: Allow startup/shutdown of an MDS without depending on the - availability of the OSTs. -Details : Asynchronously call mds_lov_synchronize during MDS startup. - Add appropriate locking and lov-osc refcounts for safe - cleaning. Add osc abort_inflight calls in case the - synchronize never started. - -Severity : minor -Frequency : occasional (Cray XT3 only) -Bugzilla : 7305 -Description: root not authorized to access files in CRAY_PORTALS environment -Details : The client process capabilities were not honoured on the MDS in - a CRAY_PORTALS/CRAY_XT3 environment. If the file had previously - been accessed by an authorized user then root was able to access - the file on the local client also. The root user capabilities - are now allowed on the MDS, as this environment has secure UID. - -Severity : minor -Frequency : occasional -Bugzilla : 6449 -Description: ldiskfs "too long searching" message happens too often -Details : A debugging message (otherwise harmless) prints too often on - the OST console. This has been reduced to only happen when - there are fragmentation problems on the filesystem. - -Severity : minor -Frequency : rare -Bugzilla : 9598 -Description: Division by zero in statfs when all OSCs are inactive -Details : lov_get_stripecnt() returns zero due to incorrect order of checks, - lov_statfs divides by value returned by lov_get_stripecnt(). - -Severity : minor -Frequency : common -Bugzilla : 9489, 3273 -Description: First write from each client to each OST was only 4kB in size, - to initialize client writeback cache, which caused sub-optimal - RPCs and poor layout on disk for the first writen file. -Details : Clients now request an initial cache grant at (re)connect time - and so that they can start streaming writes to the cache right - away and always do full-sized RPCs if there is enough data. - If the OST is rebooted the client also re-establishes its grant - so that client cached writes will be honoured under the grant. - -Severity : minor -Frequency : common -Bugzilla : 7198 -Description: Slow ls (and stat(2) syscall) on files residing on IO-loaded OSTs -Details : Now I/O RPCs go to different portal number and (presumably) fast - lock requests (and glimses) and other RPCs get their own service - threads pool that should be able to service those RPCs - immediatelly. - -Severity : enhancement -Bugzilla : 7417 -Description: Ability to exchange lustre version between client and servers and - issue warnings at client side if client is too old. Also for - liblustre clients there is ability to refuse connection of too old - clients. -Details : New 'version' field is added to connect data structure that is - filled with version info. That info is later checked by server and - by client. - -Severity : minor -Frequency : rare, liblustre only. -Bugzilla : 9296, 9581 -Description: Two simultaneous writes from liblustre at offset within same page - might proceed at the same time overwriting eachother with stale - data. -Details : I/O lock withing llu_file_prwv was released too early, before data - actually was hitting the wire. Extended lock-holding time until - server acknowledges receiving data. - -Severity : minor -Frequency : extremely rare. Never observed in practice. -Bugzilla : 9652 -Description: avoid generating lustre_handle cookie of 0. -Details : class_handle_hash() generates handle cookies by incrementing - global counter, and can hit 0 occasionaly (this is unlikely, but - not impossible, because initial value of cookie counter is - selected randonly). Value of 0 is used as a sentinel meaning - "unassigned handle" --- avoid it. Also coalesce two critical - sections in this function into one. - -Severity : enhancement -Bugzilla : 9528 -Description: allow liblustre clients to delegate truncate locking to OST -Details : To avoid overhead of locking, liblustre client instructs OST to - take extent lock in ost_punch() on client's behalf. New connection - flag is added to handle backward compatibility. - -Severity : enhancement -Bugzilla : 4928, 7341, 9758 -Description: allow number of OST service threads to be specified -Details : a module parameter allows the number of OST service threads - to be specified via "options ost ost_num_threads={N}" in the - OSS's /etc/modules.conf or /etc/modprobe.conf. - -Severity : major -Frequency : rare -Bugzilla : 6146, 9635, 9895 -Description: servers crash with bad pointer in target_handle_connect() -Details : In rare cases when a client is reconnecting it was possible that - the connection request was the last reference for that export. - We would temporarily drop the export reference and get a new - one, but this may have been the last reference and the export - was just destroyed. Get new reference before dropping old one. - -Severity : enhancement -Frequency : if client is started with failover MDS -Bugzilla : 9818 -Description: Allow multiple MDS hostnames in the mount command -Details : Try to read the configuration from all specified MDS - hostnames during a client mount in case the "primary" - MDS is down. - -Severity : enhancement -Bugzilla : 9297 -Description: Stop sending data to evicted clients as soon as possible. -Details : Check if the client we are about to send or are sending data to - was evicted already. (Check is done every second of waiting, - for which l_wait_event interface was extended to allow checking - of exit condition at specified intervals). - -Severity : minor -Frequency : rare, normally only when NFS exporting is done from client -Bugzilla : 9301 -Description: 'bad disk LOV MAGIC: 0x00000000' error when chown'ing files - without objects -Details : Make mds_get_md() recognise empty md case and set lmm size to 0. - -Severity : minor -Frequency : always, if srand() is called before liblustre initialization -Bugzilla : 9794 -Description: Liblustre uses system PRNG disturbing its usage by user application -Details : Introduce internal to lustre fast and high-quality PRNG for - lustre usage and make liblustre and some other places in generic - lustre code to use it. - -Severity : enhancement -Bugzilla : 9477, 9557, 9870 -Description: Verify that the MDS configuration logs are updated when xml is -Details : Check if the .xml configuration logs are newer than the config - logs stored on the MDS and report an error if this is the case. - Request --write-conf, or allow starting with --old_conf. - -Severity : enhancement -Bugzilla : 6034 -Description: Handle symlinks in the path when checking if Lustre is mounted. -Details : Resolve intermediate symlinks when checking if a client has - mounted a filesystem to avoid duplicate client mounts. - -Severity : minor -Frequency : rare -Bugzilla : 9309 -Description: lconf can hit an error exception but still return success. -Details : The lconf command catches the Command error exception at the top - level script context and will exit with the associated exit - status, but doesn't ensure that this exit status is non-zero. - -Severity : minor -Frequency : rare -Bugzilla : 9493 -Description: failure of ptlrpc thread startup can cause oops -Details : Starting a ptlrpc service thread can fail if there are a large - number of threads or the server memory is very fragmented. - Handle this without oopsing. - -Severity : minor -Frequency : always, only if liblustre and non-default acceptor port was used -Bugzilla : 9933 -Description: liblustre cannot connect to servers with non-default acceptor port -Details : tcpnal_set_default_params() was not called and was therefore - ignoring the environment varaible TCPNAL_PORT, as well as other - TCPNAL_ environment variables - -Severity : minor -Frequency : rare -Bugzilla : 9923 -Description: two objects could be created on the same OST for a single file -Details : If an OST is down, in some cases it was possible to create two - objects on a single OST for a single file. No problems other - than potential performance impact and spurious error messages. - -Severity : minor -Frequency : rare -Bugzilla : 5681, 9562 -Description: Client may oops in ll_unhash_aliases -Details : Client dcache may become inconsistent in race condition. - In some cases "getcwd" can fail if the current directory is - modified. - -Severity : minor -Frequency : always -Bugzilla : 9942 -Description: Inode refcounting problems in NFS export code -Details : link_raw functions used to call d_instantiate without obtaining - extra inode reference first. - -Severity : minor -Frequency : rare -Bugzilla : 9942, 9903 -Description: Referencing freed requests leading to crash, memleaks with NFS. -Details : We used to require that call to ll_revalidate_it was always - followed by ll_lookup_it. Also with revalidate_special() it is - possible to call ll_revalidate_it() twice for the same dentry - even if first occurence returned success. This fix changes semantic - between DISP_ENQ_COMPLETE disposition flag to mean there is extra - reference on a request referred from the intent. - ll_intent_release() then releases such a request. - -Severity : minor -Frequency : rare, normally benchmark loads only -Bugzilla : 1443 -Description: unlinked inodes were kept in memory on the client -Details : If a client is repeatedly creating and unlinking files it - can accumulate a lot of stale inodes in the inode slab cache. - If there is no other client load running this can cause the - client node to run out of memory. Instead flush old inodes - from client cache that have the same inode number as a new inode. - -Severity : minor -Frequency : SLES9 2.6.5 kernel and long filenames only -Bugzilla : 9969, 10379 -Description: utime reports stale NFS file handle -Details : SLES9 uses out-of-dentry names in some cases, which confused - the lustre dentry revalidation. Change it to always use the - in-dentry qstr. - -Severity : major -Frequency : rare, unless heavy write-truncate concurrency is continuous -Bugzilla : 4180, 6984, 7171, 9963, 9331 -Description: OST becomes very slow and/or deadlocked during object unlink -Details : filter_destroy() was holding onto the parent directory lock - while truncating+unlinking objects. For very large objects this - may block other threads for a long time and slow overall OST - responsiveness. It may also be possible to get a lock ordering - deadlock in this case, or run out of journal credits because of - the combined truncate+unlink. Solution is to do object truncate - first in one transaction without parent lock, and then do the - final unlink in a new transaction with the parent lock. This - reduces the lock hold time dramatically. - -Severity : major -Frequency : rare, 2.4 kernels only -Bugzilla : 9967 -Description: MDS or OST cleanup may trip kernel BUG when dropping kernel lock -Details : mds_cleanup() and filter_cleanup() need to drop the kernel lock - before unmounting their filesystem in order to avoid deadlock. - The kernel_locked() function in 2.4 kernels only checks whether - the kernel lock is held, not whether it is this process that is - holding it as 2.6 kernels do. - -Severity : major -Frequency : rare -Bugzilla : 9635 -Description: MDS or OST may oops/LBUG if a client is connecting multiple times -Details : The client ptlrpc code may be trying to reconnect to a down - server before a previous connection attempt has timed out. - Increase the reconnect interval to be longer than the connection - timeout interval to avoid sending duplicate connections to - servers. - -Severity : minor -Frequency : echo_client brw_test command -Bugzilla : 9919 -Description: fix echo_client to work with OST preallocated code -Details : OST preallocation code (5137) didn't take echo_client IO path - into account: echo_client calls filter methods outside of any - OST thread and, hence, there is no per-thread preallocated - pages and buffers to use. Solution: hijack pga pages for IO. As - a byproduct, this avoids unnecessary data copying. - -Severity : minor -Frequency : rare -Bugzilla : 3555, 5962, 6025, 6155, 6296, 9574 -Description: Client can oops in mdc_commit_close() after open replay -Details : It was possible for the MDS to return an open request with no - transaction number in mds_finish_transno() if the client was - evicted, but without actually returning an error. Clients - would later try to replay that open and may trip an assertion - Simplify the client close codepath, and always return an error - from the MDS in case the open is not successful. - -Severity : major -Frequency : rare, 2.6 OSTs only -Bugzilla : 10076 -Description: OST may deadlock under high load on fragmented files -Details : If there was a heavy load and highly-fragmented OST filesystems - it was possible to have all the OST threads deadlock waiting on - allocation of biovecs, because the biovecs were not released - until the entire RPC IO was completed. Instead, release biovecs - as soon as they are complete to ensure forward IO progress. - -Severity : enhancement -Bugzilla : 9578 -Description: Support for specifying external journal device at mount -Details : If an OST or MDS device is formatted with an external journal - device, this device major/minor is stored in the ext3 superblock - and may not be valid for failover. Allow detecting and - specifying the external journal at mount time. - -Severity : major -Frequency : rare -Bugzilla : 10235 -Description: Mounting an MDS with pending unlinked files may cause oops -Details : target_finish_recovery() calls mds_postrecov() which returned - the number of orphans unlinked. mds_lov_connect->mds_postsetup() - considers this an error and immediately begins cleaning up the - lov, just after starting the mds_lov process - -Severity : enhancement -Bugzilla : 9461 -Description: Implement 'lfs df' to report actual free space on per-OST basis -Details : Add sub-command 'df' on 'lfs' to report the disk space usage of - MDS/OSDs. Usage: lfs df [-i][-h]. Command Options: '-i' to report - usage of objects; '-h' to report in human readable format. - ------------------------------------------------------------------------------- - -2005-08-26 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.5 - * bug fixes - -Severity : major -Frequency : rare -Bugzilla : 7264 -Description: Mounting an ldiskfs file system with mballoc may crash OST node. -Details : ldiskfs mballoc code may reference an uninitialized buddy struct - at startup during orphan unlinking. Instead, skip buddy update - before setup, as it will be regenerated after recovery is complete. - -Severity : minor -Frequency : rare -Bugzilla : 7039 -Description: If an OST is inactive, its locks might reference stale inodes. -Details : lov_change_cbdata() must iterate over all namespaces, even if - they are inactive to clear inode references from the lock. - -Severity : enhancement -Frequency : occasional, if non-standard max_dirty_mb used -Bugzilla : 7138 -Description: Client will block write RPCs if not enough grant -Details : If a client has max_dirty_mb smaller than max_rpcs_in_flight, - then the client will block writes while waiting for another RPC - to complete instead of consuming its dirty limit. With change - we get improved performance when max_dirty_mb is small. - -Severity : enhancement -Bugzilla : 3389, 6253 -Description: Add support for supplementary groups on the MDS. -Details : The MDS has an upcall /proc/fs/lustre/mds/{mds}/group_upcall - (set to /usr/sbin/l_getgroups if enabled) which will do MDS-side - lookups for user supplementary groups into a cache. - -Severity : minor -Bugzilla : 7278 -Description: O_CREAT|O_EXCL open flags in liblustre always return -EEXIST -Details : Make libsysio to not enforce O_EXCL by clearing the flag, - for liblustre O_EXCL is enforced by MDS. - -Severity : minor -Bugzilla : 6455 -Description: readdir never returns NULL in liblustre. -Details : Corrected llu_iop_getdirentries logic, to return offset of next - dentry in struct dirent. - -Severity : minor -Bugzilla : 7137 -Frequency : liblustre only, depends on application IO pattern -Description: liblustre clients evicted if not contacting servers -Details : Don't put liblustre clients into the ping_evictor list, so - they will not be evicted by the pinger ever. - -Severity : enhancement -Bugzilla : 6902 -Description: Add ability to evict clients by NID from MDS. -Details : By echoing "nid:$NID" string into - /proc/fs/lustre/mds/.../evict_client client with nid that equals to - $NID would be instantly evicted from this MDS and from all active - OSTs connected to it. - -Severity : minor -Bugzilla : 7198 -Description: Do not query file size twice, somewhat slowing stat(2) calls. -Details : lookup_it_finish() used to query file size from OSTs that was not - needed. - -Severity : minor -Bugzilla : 6237 -Description: service threads change working directory to that of init -Details : Starting lustre service threads may pin the working directory - of the parent thread, making that filesystem busy. Threads - now change to the working directory of init to avoid this. - -Severity : minor -Bugzilla : 6827 -Frequency : during shutdown only -Description: shutdown with a failed MDS or OST can cause unmount to hang -Details : Don't resend DISCONNECT messages in ptlrpc_disconnect_import() - if server is down. - -Severity : minor -Bugzilla : 7331 -Frequency : 2.6 only -Description: chmod/chown may include an extra supplementary group -Details : ll{,u}_mdc_pack_op_data() does not properly initialize the - supplementary group and if none is specified this is used. - -Severity : minor -Bugzilla : 5479 (6816) -Frequency : rare -Description: Racing open + rm can assert client in mdc_set_open_replay_data() -Details : If lookup is in progress on a file that is unlinked we might try - to revalidate the inode and fail in revalidate after lookup is - complete and ll_file_open() enqueues the open again but - it_open_error() was not checking DISP_OPEN_OPEN errors correctly. - -Severity : minor -Frequency : always, if lconf --abort_recovery used -Bugzilla : 7047 -Description: lconf --abort_recovery fails with 'Operation not supported' -Details : lconf was attempting to abort recovery on the MDT device and not - the MDS device - ------------------------------------------------------------------------------- - -2005-08-08 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.4 - * bug fixes - -Severity : major -Frequency : rare (only unsupported configurations with a node running as an - OST and a client) -Bugzilla : 6514, 5137 -Description: Mounting a Lustre file system on a node running as an OST could - lead to deadlocks -Details : OSTs now preallocates memory needed to write out data at - startup, instead of when needed, to avoid having to - allocate memory in possibly low memory situations. - Specifically, if the file system is mounted on on OST, - memory pressure could force it to try to write out data, - which it needed to allocate memory to do. Due to the low - memory, it would be unable to do so and the node would - become unresponsive. - -Severity : enhancement -Bugzilla : 7015 -Description: Addition of lconf --service command line option -Details : lconf now accepts a '--service <arg>' option, which is - shorthand for 'lconf --group <arg> --select <arg>=<hostname>' - -Severity : enhancement -Bugzilla : 6101 -Description: Failover mode is now the default for OSTs. -Details : By default, OSTs will now run in failover mode. To return to - the old behaviour, add '--failout' to the lmc line for OSTs. - -Severity : enhancement -Bugzilla : 1693 -Description: Health checks are now provided for MDS and OSTs -Details : Additional detailed health check information on MSD and OSTs - is now provided through the procfs health_check value. - -Severity : minor -Frequency : occasional, depends on IO load -Bugzilla : 4466 -Description: Disk fragmentation on the OSTs could eventually cause slowdowns - after numerous create/delete cycles -Details : The ext3 inode allocation policy would not allocate new inodes - very well on the OSTs because there are no new directories - being created. Instead we look for groups with free space if - the parent directories are nearly full. - -Severity : major -Bugzilla : 6302 -Frequency : rare -Description: Network or server problems during mount may cause partially - mounted clients instead of returning an error. -Details : The config llog parsing code may overwrite the error return - code during mount error handling, returning success instead - of an error. - -Severity : minor -Bugzilla : 6422 -Frequency : rare -Description: MDS can fail to allocate large reply buffers -Details : After long uptimes the MDS can fail to allocate large reply - buffers (e.g. zconf client mount config records) due to memory - fragmentation or consumption by the buffer cache. Preallocate - some large reply buffers so that these replies can be sent even - under memory pressure. - -Severity : minor -Bugzilla : 6266 -Frequency : rare (liblustre) -Description: fsx running with liblustre complained that using truncate() to - extend the file doesn't work. This patch corrects that issue. -Details : This is the liblustre equivalent of the fix for bug 6196. Fixes - ATTR_SIZE and lsm use in llu_setattr_raw. - -Severity : critical -Bugzilla : 6866 -Frequency : rare, only 2.6 kernels -Description: Unusual file access patterns on the MDS may result in inode - data being lost in very rare circumstances. -Details : Bad interaction between the ea-in-inode patch and the "no-read" - code in the 2.6 kernel caused the inode and/or EA data not to - be read from disk, causing single-file corruption. - -Severity : critical -Bugzilla : 6998 -Frequency : rare, only 2.6 filesystems using extents -Description: Heavy concurrent write and delete load may cause data corruption. -Details : It was possible under high-load situations to have an extent - metadata block in the block device cache from a just-unlinked - file overwrite a newly-allocated data block. We now unmap any - metadata buffers that alias just-allocated data blocks. - -Severity : minor -Bugzilla : 7241 -Frequency : filesystems with default stripe_count larger than 77 -Description: lconf+mke2fs fail when formatting filesystem with > 77 stripes -Details : lconf specifies an inode size of 4096 bytes when the default - stripe_count is larger than 77. This conflicts with the default - inode density of 1 per 4096 bytes. Allocate smaller inodes in - this case to avoid pinning too much memory for large EAs. - ------------------------------------------------------------------------------- - -2005-07-07 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.3 - * bug fixes - -Severity : minor -Frequency : rare (extremely heavy IO load with hundreds of clients) -Bugzilla : 6172 -Description: Client is evicted, gets IO error writing to file -Details : lock ordering changes for bug 5492 reintroduced bug 3267 and - caused clients to be evicted for AST timeouts. The fixes in - bug 5192 mean we no longer need to have such short AST timeouts - so ldlm_timeout has been increased. - -Severity : major -Frequency : occasional during --force or --failover shutdown under load -Bugzilla : 5949, 4834 -Description: Server oops/LBUG if stopped with --force or --failover under load -Details : a collection of import/export refcount and cleanup ordering - issues fixed for safer force cleanup - -Severity : major -Frequency : only filesystems larger than 120 OSTs -Bugzilla : 5990, 6223 -Description: lfs getstripe would oops on a very large filesystem -Details : lov_getconfig used kfree on vmalloc'd memory - -Severity : minor -Frequency : only filesystems exporting via NFS to Solaris 10 clients -Bugzilla : 6242, 6243 -Description: reading from files that had been truncated to a non-zero size - but never opened returned no data -Details : ll_file_read() reads zeros from no-object files to EOF - -Severity : major -Frequency : rare -Bugzilla : 6200 -Description: A bug in MDS/OSS recovery could cause the OSS to fail an assertion -Details : There's little harm in aborting MDS/OSS recovery and letting it - try again, so I removed the LASSERT and return an error instead. - -Severity : enhancement -Bugzilla : 5902 -Description: New debugging infrastructure for tracking down data corruption -Details : The I/O checksum code was replaced to: (a) control it at runtime, - (b) cover more of the client-side code path, and (c) try to narrow - down where problems occurred - -Severity : major -Frequency : rare -Bugzilla : 3819, 4364, 4397, 6313 -Description: Racing close and eviction MDS could cause assertion in mds_close -Details : It was possible to get multiple mfd references during close and - client eviction, leading to one thread referencing a freed mfd. - -Severity: : enhancement -Bugzilla : 3262, 6359 -Description: Attempts to reconnect to servers are now more aggressive. -Details : This builds on the enhanced upcall-less recovery that was added - in 1.4.2. When trying to reconnect to servers, clients will - now try each server in the failover group every 10 seconds. By - default, clients would previously try one server every 25 seconds. - -Severity : major -Frequency : rare -Bugzilla : 6371 -Description: After recovery, certain operations trigger a failed - assertion on a client. -Details : Failing over an mds, using lconf -d --failover, while a - client was doing a readdir() call would cause the client to - LBUG after recovery completed and the readdir() was resent. - -Severity : enhancement -Bugzilla : 6296 -Description: Default groups are now added by lconf -Details : You can now run lconf --group <servicename> without having to - manually add groups with lmc. - -Severity : major -Frequency : occasional -Bugzilla : 6412 -Description: Nodes with an elan id of 0 trigger a failed assertion - -Severity : minor -Frequency : always when accessing e.g. tty/console device nodes -Bugzilla : 3790 -Description: tty and some other devices nodes cannot be used on lustre -Details : file's private_data field is used by device data and lustre - values in there got lost. New field was added to struct file to - store fs-specific private data. - -Severity : minor -Frequency : when exporting Lustre via NFS -Bugzilla : 5275 -Description: NFSD failed occasionally when looking up a path component -Details : NFSD is looking up ".." which was broken in ext3 directories - that had grown large enough to become hashed. - -Severity : minor -Frequency : Clusters with multiple interfaces not on the same subnet -Bugzilla : 5541 -Description: Nodes will repeatedly try to reconnect to an interface which it - cannot reach and report an error to the log. -Details : Extra peer list entries will be created by lconf with some peers - unreachable. lconf now validates the peer before adding it. - -Severity : major -Frequency : Only if a default stripe is set on the filesystem root. -Bugzilla : 6367 -Description: Setting a default stripe on the filesystem root prevented the - filesystem from being remounted. -Details : The client was sending extra request flags in the root getattr - request and did not allocate a reply buffer for the dir EA. - -Severity : major -Frequency : occasional, higher if lots of files are accessed by one client -Bugzilla : 6159, 6097 -Description: Client trips assertion regarding lsm mismatch/magic -Details : While revalidating inodes the VFS looks up inodes with ifind() - and in rare cases can find an inode that is being freed. - The ll_test_inode() code will free the lsm during ifind() - when it finds an existing inode and then the VFS later attaches - this free lsm to a new inode. - -Severity : major -Frequency : rare -Bugzilla : 6422, 7030 -Description: MDS deadlock between mkdir and client eviction -Details : Creating a new file via mkdir or mknod (starting a transaction - and getting the ns lock) can deadlock with client eviction - (gets ns lock and trying to finish a synchronous transaction). - -Severity : minor -Frequency : occasional -Description: While starting a server, the fsfilt_ext3 module could not be - loaded. -Details : CFS's improved ext3 filesystem is named ldiskfs for 2.6 - kernels. Previously, lconf would still use the ext3 name - when trying to load modules. Now, it will correctly use - ext3 on 2.4 and ldiskfs on 2.6. - -Severity : enhancement -Description: The default stripe count has been changed to 1 -Details : The interpretation of the default stripe count (0, to lfs - or lmc) has been changed to mean striping across a single - OST, rather than all available. For general usage we have - found a stripe count of 1 or 2 works best. - -Severity : enhancement -Description: Add support for compiling against Cray portals. -Details : Conditional compiling for some areas that are different - on Cray Portals. - -Severity : major -Frequency : occasional -Bugzilla : 6409, 6834 -Description: Creating files with an explicit stripe count may lead to - a failed assertion on the MDS -Details : If some OSTs are full or unavailable, creating files may - trigger a failed assertion on the MDS. Now, Lustre will - try to use other servers or return an error to the - client. - -Severity : minor -Frequency : occasional -Bugzilla : 6469 -Description: Multiple concurrent overlapping read+write on multiple SMP nodes - caused lock timeout during readahead (since 1.4.2). -Details : Processes doing readahead might match a lock that hasn't been - granted yet if there are overlapping and conflicting lock - requests. The readahead process waits on ungranted lock - (original lock is CBPENDING), while OST waits for that process - to cancel CBPENDING read lock and eventually evicts client. - -Severity : enhancement -Bugzilla : 6931 -Description: Initial enabling of flock support for clients -Details : Implements fcntl advisory locking and file status functions. - This feature is provided as an optional mount flag (default - off), and is NOT CURRENTLY SUPPORTED. Not all types of record - locking are implemented yet, and those that are are not guaranteed - to be completely correct in production environments. - mount -t lustre -o [flock|noflock] ... - -Severity : major -Frequency : occasional -Bugzilla : 6198 -Description: OSTs running 2.4 kernels but with extents enabled might trip an - assertion in the ext3 JBD (journaling) layer. -Details : The b_committed_data struct is protected by the big kernel lock - in 2.4 kernels, serializing journal_commit_transaction() and - ext3_get_block_handle->ext3_new_block->find_next_usable_block() - access to this struct. In 2.6 kernels there is finer grained - locking to improve SMP performance of the JBD layer. - -Severity : minor -Bugzilla : 6147 -Description: Changes the "SCSI I/O Stats" kernel patch to default to "enabled" - ------------------------------------------------------------------------------ - -2005-05-05 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.2 - NOTE: Lustre 1.4.2 uses an incompatible network protocol than previous - versions of Lustre. Please update all servers and clients to - version 1.4.2 or later at the same time. You must also run - "lconf --write-conf {config}.xml" on the MDS while it is stopped - to update the configuration logs. - * bug fixes - - fix for HPUX NFS client breakage when NFS exporting Lustre (5781) - - mdc_enqueue does not need max_mds_easize request buffer on send (5707) - - swab llog records of type '0' so we get proper header size/idx (5861) - - send llog cancel req to DLM cancel portal instead of cb portal (5515) - - fix rename of one directory over another leaking an inode (5953) - - avoid SetPageDirty on 2.6 (5981) - - don't re-add just-being-destroyed locks to the waiting list (5653) - - when creating new directories, inherit the parent's custom - striping settings if present parent (3048) - - flush buffers from cache before direct IO in 2.6 obdfilter (4982) - - don't hold i_size_sem in ll_nopage() and ll_ap_refresh_count (6077) - - don't hold client locks on temporary worklist from l_lru (5666) - - handle IO errors in 2.6 obdfilter bio completion routine (6046) - - automatically evict dead clients (5921) - - Update file size properly in create+truncate+fstat case (6196) - - Do not unhash mountpoint dentries, do not allow removal of - mountpoints (5907) - - Avoid lock ordering deadlock issue with write/truncate (6203,5654) - - reserve enough journal credits in fsfilt_start_log for setattr (4554) - - ldlm_enqueue freed-export error path would always LBUG (6149,6184) - - don't reference lr_lvb_data until after we hold lr_lvb_sem (6170) - - don't overwrite last_rcvd if there is a *_client_add() error (6086) - - Correctly handle reads of files with no objects (6243) - - lctl recover will also mark a device active if deactivate used (5933) - * miscellania - - by default create 1 inode per 4kB space on MDS, per 16kB on OSTs - - allow --write-conf on an MDS with different nettype than client (5619) - - don't write config llogs to MDS for mounts not from that MDS (5617) - - lconf should create multiple TCP connections from a client (5201) - - init scripts are now turned off by default; run chkconfig --on - lustre and chkconfig --on lustrefs to use them - - upcalls are no longer needed for clients to recover to failover - servers (3262) - - add --abort-recovery option to lconf to abort recovery on device - startup (6017) - - add support for an arbitrary number of OSTs (3026) - - Quota support protocol changes. - - forward compatibility changes to wire structs (6007) - - rmmod NALs that might be loaded because of /etc/modules.conf (6133) - - support for mountfsoptions and clientoptions to the Lustre LDAP (5873) - - improved "lustre status" script - - initialize blocksize for non-regular files (6062) - - added --disable-server and --disable-client configure options (5782) - - introduce a lookup cache for lconf to avoid repeated DB scans (6204) - - Vanilla 2.4.29 support - - increase maximum number of obd devices to 520 (6242) - - remove the tcp-zero-copy patch from the suse-2.4 series (5902) - - Quadrics Elan drivers are now included for the RHEL 3 2.4.21 and - SLES 9 2.6.5 kernels - - limit stripes per file to 160 (the maximum EA size) (6093) - -2005-03-22 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.1 - * bug fixes - - don't LASSERT in ll_release on NULL lld with NFS export (4655, 5760) - - hold NS lock when calling handle_ast_error->del_waiting_lock (5746) - - fix setattr mtime regression from lovcleanup merge (4829, 5669) - - workaround for 2.6 crash in ll_unhash_aliases (5687, 5210) - - small ext3 extents cleanups and fixes (5733) - - improved mballoc code, several small races and bugs fixed (5733, 5638) - - kernel version 43 - fix remove_suid bugs in both 2.4 and 2.6 (5695) - - avoid needless client->OST connect, fix handle mismatch (5317) - - fix DLM error path that led to out-of-sync client, long delays (5779) - - support common vfs-enforced mount options (nodev,nosuid,noexec) (5637) - - fix several locking issues related to i_size (5492,5624,5654,5672) - - don't move pending lock onto export if it is already evicted (5683) - - fix kernel oops when creating .foo in unlinked directory (5548) - - fix deadlock in obdfilter statistics vs. object create (5811) - - use time_{before,after} to avoid timer jiffies wrap (5882) - - shutdown --force/--failover stability (3607,3651,4797,5203,4834) - - Do not leak request if server was not able to process it (5154) - - If mds_open unable to find parent dir, make that negative lookup(5154) - - don't create new directories with extent-mapping (5909, 5936) - * miscellania - - fix lustre/lustrefs init scripts for SuSE (patch from Scali, 5702) - - don't hold the pinger_sem in ptlrpc_pinger_sending_on_import - - change obd_increase_kms to obd_adjust_kms (up or down) (5654) - - lconf, lmc search both /usr/lib and /usr/lib64 for Python libs (5800) - - support for RHEL4 kernel on i686 (5773) - - provide error messages when incompatible logs are encountered (5898) - -2005-02-18 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.0.10 (1.4.1 release candidate 1) - * bug fixes - - don't keep a lock reference when lock is not granted (4238) - - unsafe list practices (rarely) led to infinite eviction loop (4908) - - add per-fs limit of Lustre pages in page cache, avoid OOM (4699) - - drop import inflight refcount on signal_completed_replay error (5255) - - unlock page after async write error during send (3677) - - handle missing objects in filter_preprw_read properly (5265) - - no transno return for symlink open, don't save no-trasno open (3440) - - don't try to complete elan receive that already failed (4012) - - free RPC server reply state on error (5406) - - clean up thread from ptlrpc_start_thread() on error (5160) - - readahead could read extra page into cache that wasn't ejected (5388) - - prevent races in class_attach/setup/cleanup/detach (5260) - - don't dereference de->d_inode after l_dput of de (5458) - - use "int" for stripe value returned from lock_to_stripe (5544) - - mballoc allocation and error-checking fixes in 2.6 (5504) - - block device patches to fix I/O request sizes in 2.6 (5482) - - look up hostnames for IB nals (5602) - - 2.6 changed lock ordering of 2 semaphores, caused deadlock (5654) - - don't start multiple acceptors for the same port (5277) - - fix incorrect LASSERT in mds_getattr_name (5635) - - export a proc file for general "ping" checking (5628) - - fix "lfs check" to not block when the MDS is down (5628) - * miscellania - - service request history (4965) - - put {ll,lov,osc}_async_page structs in a single slab (4699) - - create an "evict_client" /proc entry on OSTs, like the MDS has - - fix mount usage message, return errors per mount(8) (5168) - - change grep [] to grep "[]" in tests so they work in more UMLs - - fix ppc64/x86_64 spec to use %{_libdir} instead of /usr/lib (5389) - - remove ancient LOV_MAGIC_V0 EA support (5047) - - add "disk I/Os in flight" and "I/O req time" stats in obdfilter - - align r/w RPCs to PTLRPC_MAX_BRW_SIZE boundary for performance (3451) - - allow readahead allocations to fail when low on memory (5383) - - mmap locking landed again, after considerable improvement (2828) - - add get_hostaddr() to lustreDB.py for LDAP support (5459) - -2004-11-23 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.4.0 - * bug fixes - - send OST transaction number in read/write reply to free req (4966) - - don't ASSERT in ptl_send_rpc() if we run out of memory (5119) - - lock /proc/sys/portals/routes internal state, avoiding oops (4827) - - the watchdog thread now runs as interruptible (5246) - - flock/lockf fixes (but it's still disabled, pending 5135) - - don't use EXT3 constants in llite code (5094) - - memory shortage at startup could cause assertion (5176) - * miscellania - - reorganization of lov code - - single portals codebase - - Infiniband NAL - - add extents/mballoc support (5025) - - direct I/O reads in the obdfilter (4048) - - kernel patches from LNXI for 2.6 (bluesmoke, perfctr, mtd, kexec) - -tbd Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.9 - * bug fixes - - send OST transaction number in read/write reply to free req (4966) - - don't ASSERT in ptl_send_rpc() if we run out of memory (5119) - - lock /proc/sys/portals/routes internal state, avoiding oops (4827) - - the watchdog thread now runs as interruptible (5246) - - handle missing objects in filter_preprw_read properly (5265) - - unsafe list practices (rarely) led to infinite eviction loop (4908) - - drop import inflight refcount on signal_completed_replay error (5255) - - unlock page after async write error during send (3677) - - return original error code on reconstructed replies (3761) - - no transno return for symlink open, don't save no-trasno open (3440) - * miscellania - - add pid to ldlm debugging output (4922) - - bump the watchdog timeouts -- we can't handle 30sec yet - - extra debugging for orphan dentry/inode bug (5259) - -2004-11-16 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.8 - * bug fixes - - fix TCP_NODELAY bug, which caused extreme perf regression (5134) - - allocate qswnal tx descriptors singly to avoid fragmentation (4504) - - don't LBUG on obdo_alloc() failure, use OBD_SLAB_ALLOC() (4800) - - fix NULL dereference in /proc/sys/portals/routes (4827) - - allow failed mdc_close() operations to be interrupted (4561) - - stop precreate on OST before MDS would time out on it (4778) - - don't send partial-page writes before EOF from client (4410) - - discard client grant for sub-page writes on large-page clients (4520) - - don't free dentries not owned by NFS code, check generation (4806) - - fix lsm leak if mds_create_objects() fails (4801) - - limit debug_daemon file size, always print CERROR messages (4789) - - use transno after validating reply (3892) - - process timed out requests if import state changes (3754) - - update mtime on OST during writes, return in glimpse (4829) - - add mkfsoptions to LDAP (4679) - - use ->max_readahead method instead of zapping global ra (5039) - - don't interrupt __l_wait_event() during strace - * miscellania - - add software watchdogs to catch hung threads quickly (4941) - - make lustrefs init script start after nfs is mounted - - fix CWARN/ERROR duplication (4930) - - return async write errors to application if possible (2248) - - add /proc/sys/portal/memused (bytes allocated by PORTALS_ALLOC) - - print NAL number in %x format (4645) - - update barely-supported suse-2.4.21-171 series (4842) - - support for sles 9 %post scripts - - support for building 2.6 kernel-source packages - - support for sles km_* packages - -2004-10-07 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.7 - * bug fixes - - ignore -ENOENT errors in osc_destroy (3639) - - notify osc create thread that OSC is being cleaned up (4600) - - add nettype argument for llmount in #5d in conf-sanity.sh (3936) - - reconstruct ost_handle() like mds_handle() (4657) - - create a new thread to do import eviction to avoid deadlock (3969) - - let lconf resolve symlinked-to devices (4629) - - don't unlink "objects" from directory with default EA (4554) - - hold socknal file ref over connect in case target is down (4394) - - allow more than 32000 subdirectories in a single directory (3244) - - fix blocks count for O_DIRECT writes (3751) - - OST returns ENOSPC from object create when no space left (4539) - - don't send truncate RPC if file size isn't changing (4410) - - limit OSC precreate to 1/2 of value OST considers bogus (4778) - - bind to privileged port in socknal and tcpnal (3689) - * miscellania - - rate limit CERROR/CWARN console message to avoid overload (4519) - - GETFILEINFO dir ioctl returns LOV EA + MDS stat in 1 call (3327) - - basic mmap support (3918) - - kernel patch series update from b1_4 (4711) - -2004-09-16 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.6 - * bug fixes - - avoid crash during MDS cleanup with OST shut down (2775) - - fix loi_list_lock/oig_lock inversion on interrupted IO (4136) - - don't use bad inodes on the MDS (3744) - - dynamic object preallocation to improve recovery speed (4236) - - don't hold spinlock over lock dumping or change debug flags (4401) - - don't zero obd_dev when it is force cleaned (3651) - - print grants to console if they go negative (4431) - - "lctl deactivate" will stop automatic recovery attempts (3406) - - look for existing locks in ldlm_handle_enqueue() (3764) - - don't resolve lock handle twice in recovery avoiding race (4401) - - revalidate should check working dir is a directory (4134) - * miscellania - - don't always mark "slow" obdfilter messages as errors (4418) - -2004-08-24 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.5 - * bug fixes - - don't close LustreDB during write_conf until it is done (3860) - - fix typo in lconf for_each_profile (3821) - - allow dumping logs from multiple threads at one time (3820) - - don't allow multiple threads in OSC recovery (3812) - - fix debug_size parameters (3864) - - fix mds_postrecov to initialize import for llog ctxt (3121) - - replace config semaphore with spinlock (3306) - - be sure to send a reply for a CANCEL rpc with bad export (3863) - - don't allow enqueue to complete on a destroyed export (3822) - - down write_lock before checking llog header bitmap (3825) - - recover from lock replay timeout (3764) - - up llog sem before sending rpc (3652) - - reduce ns lock hold times when setting kms (3267) - - change a dlm LBUG to LASSERTF, to maybe learn something (4228) - - fix NULL deref and obd_dev leak on setup error (3312) - - replace some LBUG about llog ops with error handling (3841) - - don't match INVALID dentries from d_lookup and spin (3784) - - hold dcache_lock while marking dentries INVALID and hashing (4255) - - fix invalid assertion in ptlrpc_set_wait (3880) - * miscellania - - add libwrap support for the TCP acceptor (3996) - - add /proc/sys/portals/routes for non-root route listing (3994) - - allow setting MDS UUID in .xml (2580) - - print the stack of a process that LBUGs (4228) - -2004-07-14 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.4 - * bug fixes - - don't cleanup request in ll_file_open() on failed MDS open (3430) - - make sure to unset replay flag from failed open requests (3440) - - if default stripe count is 0, use OST count for inode size (3636) - - update parent mtime/ctime on client for create/unlink (2611) - - drop dentry ref in ext3_add_link from open_connect_dentry (3266) - - free recovery state on server during a forced cleanup (3571) - - unregister_reply for resent reqs (3063) - - loop back devices mounting and status check on 2.6 (3563) - - fix resource-creation race that can provoke i_size == 0 (3513) - - don't try to use bad inodes returned from MDS/OST fs lookup (3688) - - more debugging for page-accounting assertion (3746) - - return -ENOENT instead of asserting if ost getattr+unlink race (3558) - - avoid deadlock after precreation failure (3758) - - fix race and lock order deadlock in orphan handling (3450, 3750) - - add validity checks when grabbing inodes from l_ast_data (3599) - * miscellania - - add /proc/.../recovery_status to obdfilter (3428) - - lightweight CDEBUG infrastructure, debug daemon (3668) - - change default OSC RPC parameters to be better on small clusters - - turn off OST read cache for files smaller than 32MB - - install man pages and include them in rpms (3100) - - add new init script for (un)mounting lustre filesystems (2593) - - run chkconfig in %post for init scripts (3701) - - drop scimac NAL (unmaintained) - -2004-06-17 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.3 - * bug fixes - - clean kiobufs before and after use (3485) - - strip trailing '/'s before comparing paths with /proc/mounts (3486) - - remove assertions to work around "in-flight rpcs" recovery bug (3063) - - change init script to fail more clearly if not run as root (1528) - - allow clients to reconnect during replay (1742) - - fix ns_lock/i_sem lock ordering deadlock for kms update (3477) - - don't do DNS lookups on NIDs too small for IP addresses (3442) - - re-awaken ptlrpcd if new requests arrive during check_set (3554) - - fix cond_resched (3554) - - only evict unfinished clients after recovery (3515) - - allow bulk resend, prevent data loss (3570) - - dynamic ptlrpc request buffer allocation (2102) - - don't allow unlinking open directory if it isn't empty (2904) - - set MDS/OST threads to umask 0 to not clobber client modes (3359) - - remove extraneous obd dereference causing LASSERT failure (3334) - - don't use get_cycles() when creating temp. files on the mds (3156) - - hold i_sem when setting i_size in ll_extent_lock() (3564) - - handle EEXIST for set-stripe, set proper directory name (3336) - * miscellania - - servers can dump a log evicting a client - lustre.dump_on_timeout=1 - - fix ksocknal_fmb_callback() error messages (2918) - -2004-05-27 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.2 - * bug fixes - - don't copy lvb into (possibly NULL) reply on error (2983) - - don't deref dentry after dput, don't free lvb on error (2922) - - use the kms to determine writeback rpc length (2947) - - increment oti_logcookies when osc is inactive (2948) - - update client's i_blocks count via lvb messages (2543) - - handle intent open/close of special files properly (1557) - - mount MDS with errors=remount-ro, like obdfilter (2009) - - initialize lock handle to avoid ASSERT on error cleanup (3057) - - don't use cancelling-locks' kms values (2947) - - use highest lock extent for kms, not last one (2925) - - don't dereference ERR_PTR() dentry in error handling path (3107) - - fix thread race in portals_debug_dumplog() (3122) - - create lprocfs device entries at setup instead of at attach (1519) - - common AST error handler, don't evict client on completion race (3145) - - zero nameidata in detach_mnt in 2.6 (3118) - - verify d_inode after revalidate_special is valid in 2.6 (3116) - - use lustre_put_super() to handle zconf unmounts in 2.6 (3064) - - initialize RPC timeout timer earlier for 2.6 (3219) - - don't dereference NULL reply buffer if mdc_close was never sent (2410) - - print nal/nid for unknown nid (3258) - - additional checks for oscc recovery before doing precreate (3284) - - fix ll_extent_lock() error return code for 64-bit systems (3043) - - don't crash in mdc_close for bad permissions on open (3285) - - zero i_rdev for non-device files (3147) - - clear page->private before handing to FS, better assertion (3119) - - tune the read pipeline (3236) - - fix incorrect decref of invalidated dentry (2350) - - provide read-ahead stats and refine rpc in flight stats (3328) - - don't hold journal transaction open across create RPC (3313) - - update atime on MDS at close time (3265) - - close LDAP connection when recovering to avoid server load (3315) - - update iopen-2.6 patch with fixes from 2399,2517,2904 (3301) - - don't leak open file on MDS after open resend (3325) - - serialize filter_precreate and filter_destroy_precreated (3329) - - loop device shouldn't call sync_dev() for nul device (3092) - - clear page cache after eviction (2766) - - resynchronize MDS->OST in background (2824) - - refuse to mount the same filesystem twice on same mountpoint (3394) - - allow llmount to create routes for mounting behind routers (3320) - - push lock cancellation to blocking thread for glimpse ASTs (3409) - - don't call osc_set_data_with_check() for TEST_LOCK matches (3159) - - fix rare problem with rename on htree directories (3417) - * miscellania - - allow default OST striping configuration per directory (1414) - - fix compilation for qswnal for 2.6 kernels (3125) - - increase maximum number of MDS request buffers for large systems - - change liblustreapi to be useful for external progs like lfsck (3098) - - increase local configuration timeout for slow disks (3353) - - allow configuring ldlm AST timeout - lustre.ldlm_timeout=<seconds> - -2004-03-22 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.1 - * bug fixes - - fixes for glimpse AST timeouts / incorrectly 0-sized files (2818) - - don't overwrite extent policy data in reply if lock was blocked (2901) - - drop filter export grants atomically with removal from device (2663) - - del obd_self_export from work_list in class_disconnect_exports (2908) - - don't LBUG if MDS recovery times out during orphan cleanup (2530) - - swab reply message in mdc_close, other PPC fixes (2464) - - fix destroying of named logs (2325) - - overwrite old logs when running lconf --write_conf (2264) - - bump LLOG_CHUNKSIZE to 8k to allow for larger clusters (2306) - - fix race in target_handle_connect (2898) - - mds_reint_create() should take same inode create lock (2926) - - correct journal credits calculated for CANCEL_UNLINK_LOG (2931) - - don't close files for self_export to avoid uninitialized obd (2936) - - allow MDS with the same name as client node (2939) - - hold dentry reference for closed log files for unlink (2325) - - reserve space for all logs during transactions (2059) - - don't evict page beyond end of stripe extent (2925) - - don't oops on a deleted current working directory (2399) - - handle hard links to targets without a parent properly (2517) - - don't dereference NULL lock when racing during eviction (2867) - - don't grow lock extents when lots of conflicting locks (2919) - -2004-03-04 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.2.0 - * bug fixes - - account for cache space usage on clients to avoid data loss (974) - - lfsck support in lustre kernel code (2349) - - reduce journal credits needed for BRW writes (2370) - - orphan handling to avoid losing space on client/server crashes - - ptlrpcd can be blocked, stopping ALL progress (2477) - - use lock value blocks to assist in proper KMS, faster stat (1021) - - takes i_sem instead of DLM locks internally on obdfilter (2720) - - recovery for initial connections (2355) - - fixes for mds_cleanup_orphans (1934) - - abort_recovery crashes MDS in b_eq (mds_unlink_orphan) (2584) - - block all file creations until orphan recovery completes (1901) - - client remove rq_connection from request struct (2423) - - conf-sanity test_5, proper cleanup in umount log not availale (2640) - - recovery timer race (2670) - - mdc_close recovey bug (2532) - - ptlrpc cleanup bug (2710) - - mds timeout on local locks (2588) - - namespace lock held during RPCs (2431) - - handle interrupted sync write properly (2503) - - don't try to handle a message that hasn't been replied to (2699) - - client assert failure during cleanup after abort recovery (2701) - - leak mdc device after failed mount (2712) - - ptlrpc_check_set allows timedout requests to complete (2714) - - wait for inflight reqs when ptlrpcd finishes (2710) - - make sure unregistered services are removed from the srv_list - - reset bulk XID's when resending them (caught by 1138 test) - - unregister_bulk after timeout - - fix lconf error (2694) - - handle write after unfinished setstripe, stripe-only getstripe (2388) - - readahead locks pages, leaves pending causing memory pressure (2673) - - increase OST request buffers to 4096 on large machines (2729) - - fix up permission of existing directories in simple_mkdir (2661) - - init deleted item, add assertions ptlrpc_abort_inflight() (2725) - - don't assign transno to errored transactions (2742) - - don't delete objects on OST if given a bogus objid from MDS (2751) - - handle large client PAGE_SIZE readdir on small PAGE_SIZE MDS (2777) - - if rq_no_resend, then timeout request after recovery (2432) - - fix MDS llog_logid record size, 64-bit array alignment (2733) - - don't call usermode_helper from ptlrpcd, DEFAULT upcall (2773) - - put magic in mount.lustre data, check for bad/NULL mount data (2529) - - MDS recovery shouldn't delete objects that it has given out (2730) - - if enqueue arrives after completion, don't clobber LVB (2819) - - don't unlock pages twice when trigger_group_io returns error (2814) - - don't deref NULL rq_repmsg if ldlm_handle_enqueue failed (2822) - - don't write pages to disk if there was an error (1450) - - don't ping imports that have recovery disabled (2676) - - take buffered bytes into account when balancing socknal conn (2817) - - hold a DLM lock over readdir always, use truncate_inode_pages (2706) - - reconnect unlink llog connection after MDS reconnects to OST (2816) - - remove little-endian swabbing of llog records (1987) - - set/limit i_blksize to LL_MAX_BLKSIZE on client (2884) - - retry reposting request buffers if they fail (1191) - - grow extent at grant time to avoid granting a revoked lock (2809) - - lock revoke doesn't evict page if covered by a second lock (2765) - - disable VM readahead to avoid reading outside lock extents (2805) - * miscellania - - return LL_SUPER_MAGIC from statfs for the filesystem type (1972) - - updated kernel patches for hp-2.4.20 kernel (2681) - -2004-02-07 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.0.4 - * kernel patches - - fix truncated write corruption (2366) - - fix for failed assertion in iopen_connect_dentry (1792,2517) - * bug fixes - - don't flag the ptlrpcd thread with PF_MEMALLOC (2636) - - ensure len(uuid) < 37 in lmc (1171) - - fix ia64 OOPS in llog_test (2255) - - zero end of page at obdfilter for partial page writes (2648) - - don't leave stale dentries around after renames (bug 2428) - - fix timeouts when evicting a client with a single lock held (2642) - - set deadline for the initial HELLO message to drain (2634) - - print out dotted-quad IP addresses in the socknal (2302) - * miscellania - - additional debugging for MDS client eviction problem (2443) - - fix mkfsoptions support for osts (2603, 2604) - -2004-01-27 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.0.3 - * kernel patches - - add series for the vanilla 2.6.0 kernel - - add series for the vanilla 2.4.24 kernel - - add series for a cray x86/64 UL kernel drop - - fix xattr patches for the vanilla 2.4.19 series - * bug fixes - - generate true UUIDs in lmc (1171) - - have portals stack dumping break in UML (2466) - - avoid bad dchild deref; avoid inum lock w/o creation (2362) - - allocate with _NOFS in ldlm to avoid deadlock (1933) - - wake callback waiting threads on client eviction (2460) - - Add --ptldebug and --subsystem to lmc (1719) - - update assertion to allow safe interrupt allocation - - set rq_no_resend for cancel requests (2432) - - recalculate ptlrpcd timeout after resend (2494) - - call vfs_rmdir when removing pending directories (2368) - - fix renaming a file to itself (2429) - - lmc creates a default one-stripe lov (2454) - - expand procfs space to handle large clusters (2326) - - increase UML stack to avoid overflow - - update lconf's list of debug and subsystem masks - - fix lfs find --obd (2510) - - /proc tunable for disabling filter read caching (2591) - - stop rpm packages from altering slapd.conf (2301) - - disable nagle in the socknal under 0conf (2578) - - choose mds inode size based on stripe count (2572) - - fix kernel-source rpm problems (2516) - * miscellania - - add --disable-doc to avoid pdf generation (2421) - - update documentation, tests, type-os, comments - - avoid format warnings on ia64 - - remove the TOE NAL - - tiny code cleanups by removing unused fields - -2004-01-07 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.0.2 - * bug fixes - - fix obvious semaphore misuse in as-yet-unused setattr path (2348) - - remove the most blatant lies from BUILDING file (2371) - - change default debug level to reasonable production setting - - reduce client side cache size to reduce cache flush time - - reduce max RPCs in flight to avoid unnecessary file fragmentation - - make TCP zerocopy and pinger support enabled by default (2476) - - sync writes completed after process exits caused crashes (2319) - - maintain correct mount count on the MDS (2356) - - backout 1557, because 2316 wasn't really fixed - - better file I/O statistics gathering in /proc - - don't take unnecessary, deadlock-inducing bug in readpage (2383) - - another kernel patch to fix zero-copy TCP function export - - don't take duplicate lock when processing re-sent getattr (2420) - - lctl uses obd_self_export instead of creating new conn (2353) - - MDS/OST recovery case which requires object creation asserted (2425) - - move lfs from /usr/sbin to /usr/bin in packages - - fix race between mds_client_add and mds_client_free (2417) - - use kmalloc instead of slabs in portals (2430) - - don't create duplicate records when a failover MDS is present (2442) - - remove unnecessary mount age check (2332) - - don't remove directory inodes from locks prematurely (2451) - - don't break if MDS service name is the same as hostname (2103) - - fix races in client write RPC generation when cache full (2482) - -2003-12-13 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.0.1 - * bug fixes - - remove now-unused request->rq_obd (278) - - if an allocation fails, print out how much memory we've used (1933) - - use PORTAL_SLAB_ALLOC for structures, to get GFP_MEMALLOC (1933) - - add the "configurable stack size" patch to most series files (1256) - - ability to write large log records, for 100+ OST configs (2306) - - fix NULL deref when filter_prep fails (2314) - - fix operator precedence error in filter_sync - - dynamic allocation of socknal TX descriptors (2315) - - fix a missed case in the GFP_MEMALLOC patch, can cause deadlock (2310) - - fix gcc 2.96 compilation problem in xattr kernel patch (2294) - - ensure that CWARN messages in Portals always get to the syslog - - __init/__exit are not for prototype decls (ldlm_init/exit) - - x86-64 compile warning fixes - - fix gateway LMC keyword conflict (2318) - - fix MDS lock inversions in getattr/reint paths (1844) - - fix a rare lock re-ordering bug, which caused deadlock (2322) - - fix i_sem/journal inversion in fsfilt_ext3_write_record (2306) - - DLM race condition prevented some lock evictions (2328) - - ENOMEM detection and retry on socknal sends (2230) - - use GFP_NOFS throughout Lustre, to combat ENOMEM (2230) - - move osc_rpcd into ptlrpc, for use in MDC and others (2329) - - protect MDS inode fsdata with stronger locking; fixes assertion (2313) - - better error messages when a client is rejected during recovery (1505) - - avoid cancelling locks which were never granted, after failure (2330) - - fix i_sem/journal inversion in mds_client_add (2333) - - fix truncate/getattr lock cycle deadlock (2334) - - use rpcd to send close; allows resend after timeout, avoid leak (1897) - - fix two rare exit paths which could leak an l_lock() ref (2321) - - fencepost error in MDS/OST orphan recovery (2226) - - make log record alignment 8 bytes (1988) - - lstripe now fails when requested offset > ost_count (2237) - - ensure that all kernel series have a complete list.h (1607) - - fix crashes in special-file operations (2316) - - lctl create/brw OID mismatch, caused by obsolete filter loop (2339) - * miscellania - - allow configurable automake binary, for testing new versions - - small update to the lfs documentation - -2003-12-03 Cluster File Systems, Inc. <info@clusterfs.com> - * version 1.0.0 - * fix negative export reference count in fsfilt_sync (2312) - -2003-12-01 Cluster File Systems, Inc. <info@clusterfs.com> - * release candidate 0.9.1 - * bug fixes - - orphans are moved into the PENDING directory for possible recovery - - replayed opens now open by fid for orphan/rename safety (1042) - - last close of an orphan inode generates a transno (683) - - chdir() and mount() now pin the directory entry (1020) - - avoid CERROR in normal ll_setattr_raw() error case (1500) - - discard very old requests without processing them (1502) - - remove some common, well-understood CERRORs (1505) - - require O_DIRECT I/O to be page-sized to workaround IA64 crash (1609) - - clear "grant" flags in OST replies until OST grant code lands (1644) - - fix read performance by not clobbering i_blksize on client (1598) - - fix __ldlm_handle2lock oops by not dereferencing lock after PUT (1625) - - make LRU size a /proc tunable, clears locks when reduced (707) - - fix some lprocfs rot that prevented ptlbd from loading (1732) - - server locks take references on exports now (1558) - - build fixes for 2.4.20-rh trees (1663) - - return an error from lov_create if all OSCs are inactive (1751) - - fix import levels when a reconnect happens without a timeout (1597) - - exit early from mds_open if we get a lookup error (1749) - - partial page read at EOF wouldn't wait for disk before sending (1642) - - avoid NULL deref in obdfilter when reading page past EOF (1592) - - avoid LASSERT in ll_intent_lock if server failed very early (1090) - - fix LBUG in ll_it_open_error with rc = -2 (1861) - - write/truncate lock inversion (1639) - - Don't auto-load obdclass, portals modules during cleanup (1495) - - fix timestamps from jumping to "now" (1763) - - extra journal assertions (1648) - - add an extra multiunlink test (1771) - - fix read_record/write_record API (1776) - - fix leak of offset_extent, possible incorrect i_size later (1772) - - fix lasserts in mis-matched transnos during open-unlink testing (1541) - - Debugging for the kqswnal_get_idle_tx problems (1820) - - Allow recovery to be attempted multiple times (1536) - - Write out MDS last_rcvd file after it is first created (1600) - - Fix tx_descriptor leak in failed transmit situations (1827) - - ext3 journaling fixes for assertion failure after IO error (1871) - - class_export_put() on freed export after completion AST error (1896) - - Fix revalidate looping in VFS (1322) - - Don't access a freed export during MDS_REINT timeout (1521) - - Add open-unlink recovery support on the MDS (1673,1764) - - Return an error if no MDS data was read from last_rcvd (1946) - - Fix for lookup "." or ".." crash on error (1932,1931,1935) - - Don't setup a disk device that doesn't match exported UUID (317) - - Reduce bulk RPC timeout to avoid cascading client/OST failures (1845) - - avoid committing NULL handle in force close - - local.sh is now a one-stripe LOV configuration - - POSIX utime.4 -EPERM on FIFO not owned by user (56) - - fix ext3 htree duplicate directory entry corruption (1516) - - POSIX creat.13, fstat.1, open.18, stat.3 new file atime/mtime (2020) - - update to new LOV EA format (2097) - - interoperability for different PAGE_SIZE/wordsize (686,1821,1343,2042) - -2003-06-15 Phil Schwan <phil@clusterfs.com> - * version v0_7 - * bug fixes - - imports and exports cleanup too early, need refcounts (349, 879, 1045) - - per-import/export recovery handling (958, 931, 959) - - multiple last-rcvd slots, for serving multiple FSes (949) - - connections are again shared between multiple imp/exports (963, 964) - - "umount -f" would hang if any requests needed to be sent (393, 978) - - avoid pinning large req buffer by copying for queued messages (989) - - add "uuid" to "lctl device" command to help upcalls (991) - - "open" RPCs with transnos would confuse recovery counters (1037) - - do proper endian conversion of all wire messages (288, 340, 891) - - remove OST bulk get LBUGs, fix ost_brw_write cleanup (1126) - - call waiting locks callback from LDLM recovery thread (1127, 1151) - - fix ptlrpc_connection leak in target_handle_connect (1174) - - fix import refcounting bug in OST and MDS cleanup (1134) - - if an invalid-at-open-time OSC returned before close(), LBUG (1150) - - fix very unlikely obd_types race condition (501) - - remove osc_open hack for echo_client (1187) - - we leaked exports/dlmimps for forcibly disconnected clients (1143) - - a failure in read_inode2 leads to deadlock (1139) - - cancel ack-locks as soon as transaction is committed (1072) - - fix major leaks and crashes in the bulk I/O path (937, 1057) - - make sure to commitrw after any preprw to avoid deadlock (1162) - - failing to execute a file in a lustre FS would lock inode (1203) - - small DEBUG_REQ fix to avoid dereferencing a NULL (1227) - - don't ASSERT while cleaning up an incompletely-setup obd (1248) - - obd_uuid2tgt would walk off the end of the list (1255) - - on IA64 the osc would give portals incorrect bulk size (1258) - - fix debug daemon ioctl interface; allows daemon on ia64 (1274) - - fix lock inversion caused by new llite matching code (1282) - - limit the number of dirty pages on a client to 10MB (1286) - - timed out locks were not being corrected cancelled (1289) - - fix O_DIRECT above 4GB on IA-32 (1292) - * major user-visible changes - - fail out/fail over policy now controlled by the upcall (993) - * protocol changes - - add OBD_PING to check server availability and failure (954) - - lustre messages are now sent in sending host order (288, 340, 891) - - add eadatalen to MDS getattr reply (340) - - OST read replies may contain second buffer, with per-page status (593) - -2003-03-11 Phil Schwan <phil@clusterfs.com> - * version v0_6 - * bug fixes - - LDLM_DEBUG macro fix, for gcc 3.2 (850) - - failed open()s could cause deadlock; fixed (867, 869) - - stop cancelling OST locks when files are closed (481) - - overlapping XID spaces caused network corruption (851, 853) - - fix unsafe fsfilt counter arithmetic; change to atomic_t - - setattr_raw added, to do single-RPC, server-side setattrs - - lmc/lconf syntax change for OST UUIDs - - fix crashy race condition between ptlrpc_free_req and osc_close - - don't use request in mdc_enqueue if we hit a timeout (889) - - don't set the inode i_size for regular files from the MDS (896) - - handle out of order completion AST (842) - - don't LBUG if a lock request times out after receiving AST (913) - - avoid d_rehash race in ll_find_alias by rehashing inside dcache_lock - - if a bad lock AST arrives, send an error instead of dropping entirely - - return 0 from revalidate2 if ll_intent_lock returns -EINTR (912) - - fix leak in bulk IO when only partially completed (899, 900, 926) - - fix O_DIRECT for ia64 (55) - - (almost) eliminate Lustre-kernel-thread effects on load average (722) - - C-z after timeout could hang a process forever; fixed (977) - * Features - - client-side I/O cache (678, 924, 929, 941, 970) - * protocol changes - - READPAGE and SETATTRs which don't take server-side locks get - their own portal - -2003-02-11 Phil Schwan <phil@clusterfs.com> - * version v0_5_20 - * bug fixes - - Fix ldlm_lock_match on the MDS to avoid matching remote locks (592) - - Fix fsfilt_extN_readpage() to read a full page of directory - entries, or fake the remainder if PAGE_SIZE != blocksize (500) - - Avoid extra mdc_getattr() in ll_intent_lock when possible (534, 604) - - Fix imbalanced LOV object allocation and out-of-bound access (469) - - Most intent operations were removed, in favour of a new RPC mode - that does a single RPC to the server and bypasses most of the VFS - - All LDLM resource ID arrays were removed in favour of ldlm_res_id - - Aggressively cancel local locks on DLM servers - - mds_reint_unlink sends EA to the client if it's the last nlink. - client uses that EA to unlink OST objects. - - mds_reint_{rename,unlink,link} were rewritten to take ordered locks - - recursive symlinks were fixed (439) - - fixed NULL deref in DEBUG_REQ - - filter_update_lastobjid no longer calls sync, which annoyed extN - - fixed multi-client small-writes to a single file problem (445) - - fixed mtime updates during file writes (607) - - fixed vector writes on obdfilter causing problems when ENOSPC (670) - - fixed bug in obd_brw_read/write() (under guise of testing 367) - - fixed Linux OST size reporting problem (444, 656) - - OST now updates object mtime with writes or setattr (607, 619) - - client verifies file size before zeroing page past EOF (445) - - OST now writes last allocated objid to disk with allocation (108) - - LOV on echo now works (409) - * protocol changes - - mds_reint_unlink sends a new buffer, with the EA included. this - buffer is only valid if body->valid & OBD_MD_FLEASIZE, which is only - set if a regular file was being unlinked, and it was the last link - - use PtlGet from the target for bulk writes (315) - - OST now updates object mtime with writes or setattr (607, 619) - - LDLM now has a grant-time callback to revalidate locked items, if - necessary (604) - - Many MDS operations were reorganized to combat race conditions - * other changes - - Merge b_intel branch (updated lprocfs code) - now at /proc/fs/lustre - - configure check to avoid gcc version 2.96 20000731-2.96-98) (606) - -2003-01-06 Andreas Dilger <adilger@clusterfs.com> - * version v0_5_19 - * bug fixes - - Fully reactivate OST imports after reconnection (512, others) - - Make sure client sees our -ENOTCONN from mds_handle (513 - partial) - - More graceful error handling for truncating on dead OST (515) - - Don't error out unless we're actually accessing dead stripes (474) - - Fix garbage sizes when stripes are missing (410) - - LRU counters were broken, causing constant lock purge (433, 432) - - garbage on read from stripes with failed OSTs (441) - - mark OSCs as active before reconnecting during recovery (438) - - lov_enqueue and lov_cancel need to handle inactive OSTs (403) - - lfind did not preserve OST order in output (443) - - symlinks cause hung clients, incorrect data (439) - - stop dereferencing request after dropping refcount (457) - - don't LASSERT(spin_is_locked) on non-SMP (455) - - fixes for many rename() bugs - - fstat didn't correctly synchronize attributes (399) - - server must handle lock cancellation during blocking AST prep (487) - - bulk descriptors were free()d too soon (511) - - fix paths in lconf, which would load incorrect modules (451, 507) - - fix confusing lconf 'host not found' error message (386) - - fix lock order deadlock on OST (O/R i_sem before journal ops, 478) - - fix race condition in mdc_blocking_ast() for inode access (526) - - fix lov_unpackmd() unpacking wrong number of stripes (537) - - fix lov_set_osc_active() marking wrong OSC inactive (440) - - fix bad lstripe lov_unpackmd() assertion (fix layering too) (527) - - fix multiple writes of stripe MD to MDS (358, maybe 519) - - fix lstripe in several ways (kernel side) (527) - - fix request leak in ldlm_cli_enqueue (262) - - incorrect OSC was marked inactive after OST failure - - call mds_fs_cleanup before unmounting filesystem (524) - - fix races between taking ns_lock and ldlm_lock_change_resource - - fix races updating LOV export open file list - - fix lov_enqueue error path, avoid decref-ing bad lock handle - - fix recovery NULL deref in ldlm_cli_cancel_unused - - fix some DLM races by using new hash table for lock handles (419) - - permit the client to specify desired inodes, at replay - - duplicate requests when we queue them for replay reintegration - - fix last_rcvd offset calculation - - sync after each recovered transaction, so we always make progress - - never, not always, ERESTART requests without transnos - - store the lov_desc in the MDS, so we don't depend on getlovinfo to - set it - - skip replay if the MDS says that the client is already connected - - don't check for a recovery-enabled export to match lctl's UUID - - don't INC_USE_COUNT for phantom exports - - don't crash when cleaning up phantom exports (567) - - don't double-finish or set replay data for errored mdc_open requests - - abort requests when they time out, so we don't get old replies - - send/receive replies for AST messages again - - if the client says that it doesn't have the lock, cancel it on the - server - - if we timeout during I/O, don't try to cancel an in-use lock; instead - mark it as destroyed, it will all work out when decref is called - - fix module use counts (22, 581) - * protocol changes - - ASTs now expect a reply (server cancels lock on error reply) - -2002-12-02 Andreas Dilger <adilger@clusterfs.com> - * version v0_5_18 - * bug fixes - - fix many simultaneous client startup (392) - - fix dentry->d_it clobbering - - credentials weren't being shipped for readdir/getattr operations - - remove invalid assertions triggered during some concurrent MD - updates - - proper Lustre versions added (336, 389) - - fix memory leak for create error case (398) - - fix LOV locking bug that would get cli/srv out of sync - - fix echo client over LOV (409) - - fix dbench 2, extN refcount problem (170, 258, 356, 418) - - fix double-O_EXCL intent crash (424) - - avoid sending multiple lock CANCELs (352) - * Features - - MDS can do multi-client recovery (modulo bugs in new code) - * Documentation - - many updates, edits, cleanups - -2002-11-18 Phil Schwan <phil@clusterfs.com> - * version v0_5_17 - * bug fixes - - fix null d_it dereference (346) - - fix full OST/dbench hang (333) - - fix permission problem with file removal (286) - - fix removal of OSCs from LOV when they fail - - fix NULL deref during bulk timeout (214) - - fix problems related to multiple filesystems on one MDS (241) - - fixed serious subtle metadata locking bugs - - free locks on clients when inodes are removed due to memory - pressure (201) - - fix inode pointer in lock data (285) - - partial support for multiple MDS on a single host (241) - - data locks weren't cancelled at clear_inode time (290, 311) - - intent locks could lead to unbounded lock growth (205) - - added a maximum lock count, an LRU list, and a flusher - - fix multiple rename (365) - - properly abstracted the echo client - - OSC locked 1 byte too many; fixed - - rewrote brw callback code: - - fixed recovery bugs related to LOVs (306) - - fixed too-many-pages-in-one-write crash (191) - - fixed (again) crash in sync_io_timeout (214) - - probably fixed callback-related race (385) - * protocol change - - Add capability to MDS protocol - - LDLM cancellations and callbacks on different portals - -2002-10-28 Andreas Dilger <adilger@clusterfs.com> - * version v0_5_16 - * bug fixes: - - limit client IOV size to PTL_MD_MAX_IOV (611336, 191) - - defer open object destruction to close time (601981, 138) - - open/close OST file handle in obdo (OBD_MD_FLHANDLE) (601981, 138) - - move LDLM_ENQUEUE/CONVERT back to MDS portal (625069) - - abstract ll_lookup2, fix ll_revalidate2 to use abstraction (256) - - don't call obd_setattr in ll_file_release for destroyed objects - * protocol change to lustre_msg: move |version| and add |flags| - * protocol change to osc_punch: "start" in "o_size", "end" in "o_blocks" - * lock replay: for LDLM_FL_REPLAY trust client to do right thing - * added replay of create, unlink, link and rename operations during - MDS failover; recovery should be much more robust now - * remove failed OSCs from LOVs (only lov_create uses this so far) - * the lustre-HOWTO was brought (more) up to date (582544) - -2002-10-23 Phil Schwan <phil@clusterfs.com> - * version v0_5_15 - * bug fixes: - - in-use dentries weren't being reused properly (617851) - - prevent multiple LDLM setup (599178) - - fix LOV size calculations for truncate (617853) - - fix client handling of MDS intent errors (POSIX) - - fix permission bug in lovstripe.c test (624321) - - fix MDS thread deadlock - move LDLM handler to DLM portal (625069) - - truncate past end of file could corrupt data - - proper cleanup after timeouts, crashes, etc (592524, 550815) - - a race in recovery could return ETIMEDOUT to apps (623947) - - building outside the source directory was fixed - * the lustre-HOWTO was brought (more) up to date (582544) - * major progress was made on recovery functionality - -2002-10-10 Phil Schwan <phil@clusterfs.com> - * version v0_5_14 - * bug fixes: - - recovery deadlock fix - - rm -rf causes LBUG fix (617817) - - file open by multiple tasks fix (618962) - - directory permissions bugs (602707 and 620007) - - journal_stop fixed with locking (611313) - - O_APPEND failures resolved (618273, perhaps 614459) - - lconf PATH fix (619770) - - IA64 build fix (621450) - - RPC buffer sizes scale with amount of memory - -2002-10-01 Phil Schwan <phil@clusterfs.com> - * version v0_5_13 - * bug fixes: - - locks would be cancelled without throwing away data pages, - resulting in inconsistent data (605627) - - inode attributes were not always being refreshed (605627, 612449) - - lconf now continues to cleanup after lctl reports an error - - MDS now enforces user permissions (602707) - - lprocfs cleanup fixed, but not yet enabled (614157) - - fixed infinite server hang, should a client not respond to an AST - - avoid going into recovery if user calls readlink() with a buffer - that's too small (613941) - - AST RPCs no longer require replies (614867) -- this may be changed - - don't crash server if client sends an IOV that's too big (611336) - - fixed lock conversion deadlock (611892) - - fixed the following of symlinks (614622) - * recovery: the server can remove locks from a client that dies, other - clients can make progress - * more extN patch fixes - * compile-time configurable ptlrpc buffer allocations - * documentation - - collaborative read cache document - - Lustre Lite Performance CDR document-in-progress - -2002-09-20 Andreas Dilger <adilger@clusterfs.com> - * version v0_5_12 - * bug fix - - fix typo in patch-2.4.18 - -2002-09-20 Andreas Dilger <adilger@clusterfs.com> - * version v0_5_11 - * bug fixes - - clear ptlrpc request each time in handle_incoming_request() - - unlink of files now destroys the object on the OST - -2002-09-19 Peter Braam <braam@clusterfs.com> - * version 0_5_10 - * add hard link support - * change obdfile creation method - * kernel patch changed - -2002-09-19 Peter Braam <braam@clusterfs.com> - * version 0_5_9 - * bug fix - - stack overflow bug in extN fixed - -2002-09-18 Andreas Dilger <adilger@clusterfs.com> - * version 0_5_8 - * documentation updates - - add man pages for config tools - - update tests/README to describe testing with new config tools - - finish metadata API descriptions - * bug fixes and cleanups - - statfs workaround for 16TB limit - - LOV stripe allocation improved, can stripe on subset of OSTs - - LOV file size/IO offset was wrong for files > 4GB in size - - object EA data was being dropped, caused files to be unreadable - - memory overflow with non-LOV OST caused memory corruption - - fixed regression tests to work with new config tools, obdfilter - - fixed bug when directory size became larger than 1 block - - fixed bug (for single client case) when PWD was deleted - - invalidate local directory pages when doing intent-based ops - - avoid LDLM oops when lock callback contained bad data - -2002-09-09 Andreas Dilger <adilger@clusterfs.com> - * version 0_5_7 - * documentation updates - * bug fixes and cleanups - - configuration tools - - LOV - - imports/exports - - 64-bit compile warnings - - 64-bit internal statfs data - - many more - * test_brw on persistent OST devices - * MDS recovery - * lprocfs (disabled) - -2002-09-04 Andreas Dilger <adilger@clusterfs.com> - * version 0_5_6 - * documentation updates - * bug fixes and cleanups - * configuration tools - -2002-08-30 Peter J. Braam <braam@clusterfs.com> - - * version v0_5_5 - * many small fixes to 0_5_4 - * io/network handling - * thinkos in MDS operations - -2002-08-24 Peter J. Braam <braam@clusterfs.com> - - * version v0_5_4 - * crucial basic fixes to 0.5.3 - * IOR, Iozone work over Elan - * EOF locks added - -2002-08-07 Phil Schwan <phil@clusterfs.com> - * version 0_5_3, our first alpha - * we use the new Portals iovs - * documentation updates - * bug fixes and cleanups - * small changes in the DLM wire protocol - -2002-07-25 Peter J. Braam <braam@clusterfs.com> - * version 0_5_1 with some initial stability, - * locking on MD and file I/O. - * documentation updates - * several bug fixes since 0.5.0 - * small changes in wire protocol - -2002-07-18 Phil Schwan <phil@clusterfs.com> - * version v0_4_5 - * delivered as Lustre Light Alpha - * fixed a crash after handling invalid MDS requests - * fixed directory pages for architectures with non-4k pages sizes - -2002-07-11 Andreas Dilger <adilger@clusterfs.com> - * release version v0_4_4 - * Moves TCP acceptor to be on port 2432 (unused Coda port) instead - of 1234. - * Fixes a number of interruption problems with OST operations. - * Update documentation for portals header changes - * Move all wire protocol structs/defines to lustre_idl.h - * Fixes symlink length bug. - * Add tcpdump to repository. - -2002-07-05 Andreas Dilger <adilger@clusterfs.com> - * release version v0_4_3 - * Fixes statfs for inodes on extN. - * Fixes bug in runtests which would delete /etc/hosts. - * Use 64-bit object IDs wherever possible (not into VFS though) - Remove ost_get_info, which is unused by lustre, and out of date. - -2002-07-03 Peter Braam <braam@clusterfs.com> - * release version v0_4_2 Fixes a lookup error (type not passed) - * move forward to head of Portals - * move forward to latest Lustre kernel - -2002-06-25 Peter Braam <braam@clusterfs.com> - * release version v0_4_1. Hopefully stable on single node use. diff --git a/lustre/FDL b/lustre/FDL deleted file mode 100644 index b42936beb3..0000000000 --- a/lustre/FDL +++ /dev/null @@ -1,355 +0,0 @@ - GNU Free Documentation License - Version 1.1, March 2000 - - Copyright (C) 2000 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - -0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other -written document "free" in the sense of freedom: to assure everyone -the effective freedom to copy and redistribute it, with or without -modifying it, either commercially or noncommercially. Secondarily, -this License preserves for the author and publisher a way to get -credit for their work, while not being considered responsible for -modifications made by others. - -This License is a kind of "copyleft", which means that derivative -works of the document must themselves be free in the same sense. It -complements the GNU General Public License, which is a copyleft -license designed for free software. - -We have designed this License in order to use it for manuals for free -software, because free software needs free documentation: a free -program should come with manuals providing the same freedoms that the -software does. But this License is not limited to software manuals; -it can be used for any textual work, regardless of subject matter or -whether it is published as a printed book. We recommend this License -principally for works whose purpose is instruction or reference. - - -1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work that contains a -notice placed by the copyright holder saying it can be distributed -under the terms of this License. The "Document", below, refers to any -such manual or work. Any member of the public is a licensee, and is -addressed as "you". - -A "Modified Version" of the Document means any work containing the -Document or a portion of it, either copied verbatim, or with -modifications and/or translated into another language. - -A "Secondary Section" is a named appendix or a front-matter section of -the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall subject -(or to related matters) and contains nothing that could fall directly -within that overall subject. (For example, if the Document is in part a -textbook of mathematics, a Secondary Section may not explain any -mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding -them. - -The "Invariant Sections" are certain Secondary Sections whose titles -are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. - -The "Cover Texts" are certain short passages of text that are listed, -as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. - -A "Transparent" copy of the Document means a machine-readable copy, -represented in a format whose specification is available to the -general public, whose contents can be viewed and edited directly and -straightforwardly with generic text editors or (for images composed of -pixels) generic paint programs or (for drawings) some widely available -drawing editor, and that is suitable for input to text formatters or -for automatic translation to a variety of formats suitable for input -to text formatters. A copy made in an otherwise Transparent file -format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, LaTeX input format, SGML -or XML using a publicly available DTD, and standard-conforming simple -HTML designed for human modification. Opaque formats include -PostScript, PDF, proprietary formats that can be read and edited only -by proprietary word processors, SGML or XML for which the DTD and/or -processing tools are not generally available, and the -machine-generated HTML produced by some word processors for output -purposes only. - -The "Title Page" means, for a printed book, the title page itself, -plus such following pages as are needed to hold, legibly, the material -this License requires to appear in the title page. For works in -formats which do not have any title page as such, "Title Page" means -the text near the most prominent appearance of the work's title, -preceding the beginning of the body of the text. - - -2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either -commercially or noncommercially, provided that this License, the -copyright notices, and the license notice saying this License applies -to the Document are reproduced in all copies, and that you add no other -conditions whatsoever to those of this License. You may not use -technical measures to obstruct or control the reading or further -copying of the copies you make or distribute. However, you may accept -compensation in exchange for copies. If you distribute a large enough -number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and -you may publicly display copies. - - -3. COPYING IN QUANTITY - -If you publish printed copies of the Document numbering more than 100, -and the Document's license notice requires Cover Texts, you must enclose -the copies in covers that carry, clearly and legibly, all these Cover -Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -the back cover. Both covers must also clearly and legibly identify -you as the publisher of these copies. The front cover must present -the full title with all words of the title equally prominent and -visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve -the title of the Document and satisfy these conditions, can be treated -as verbatim copying in other respects. - -If the required texts for either cover are too voluminous to fit -legibly, you should put the first ones listed (as many as fit -reasonably) on the actual cover, and continue the rest onto adjacent -pages. - -If you publish or distribute Opaque copies of the Document numbering -more than 100, you must either include a machine-readable Transparent -copy along with each Opaque copy, or state in or with each Opaque copy -a publicly-accessible computer-network location containing a complete -Transparent copy of the Document, free of added material, which the -general network-using public has access to download anonymously at no -charge using public-standard network protocols. If you use the latter -option, you must take reasonably prudent steps, when you begin -distribution of Opaque copies in quantity, to ensure that this -Transparent copy will remain thus accessible at the stated location -until at least one year after the last time you distribute an Opaque -copy (directly or through your agents or retailers) of that edition to -the public. - -It is requested, but not required, that you contact the authors of the -Document well before redistributing any large number of copies, to give -them a chance to provide you with an updated version of the Document. - - -4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under -the conditions of sections 2 and 3 above, provided that you release -the Modified Version under precisely this License, with the Modified -Version filling the role of the Document, thus licensing distribution -and modification of the Modified Version to whoever possesses a copy -of it. In addition, you must do these things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct - from that of the Document, and from those of previous versions - (which should, if there were any, be listed in the History section - of the Document). You may use the same title as a previous version - if the original publisher of that version gives permission. -B. List on the Title Page, as authors, one or more persons or entities - responsible for authorship of the modifications in the Modified - Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has less than five). -C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. -D. Preserve all the copyright notices of the Document. -E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. -F. Include, immediately after the copyright notices, a license notice - giving the public permission to use the Modified Version under the - terms of this License, in the form shown in the Addendum below. -G. Preserve in that license notice the full lists of Invariant Sections - and required Cover Texts given in the Document's license notice. -H. Include an unaltered copy of this License. -I. Preserve the section entitled "History", and its title, and add to - it an item stating at least the title, year, new authors, and - publisher of the Modified Version as given on the Title Page. If - there is no section entitled "History" in the Document, create one - stating the title, year, authors, and publisher of the Document as - given on its Title Page, then add an item describing the Modified - Version as stated in the previous sentence. -J. Preserve the network location, if any, given in the Document for - public access to a Transparent copy of the Document, and likewise - the network locations given in the Document for previous versions - it was based on. These may be placed in the "History" section. - You may omit a network location for a work that was published at - least four years before the Document itself, or if the original - publisher of the version it refers to gives permission. -K. In any section entitled "Acknowledgements" or "Dedications", - preserve the section's title, and preserve in the section all the - substance and tone of each of the contributor acknowledgements - and/or dedications given therein. -L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section titles. -M. Delete any section entitled "Endorsements". Such a section - may not be included in the Modified Version. -N. Do not retitle any existing section as "Endorsements" - or to conflict in title with any Invariant Section. - -If the Modified Version includes new front-matter sections or -appendices that qualify as Secondary Sections and contain no material -copied from the Document, you may at your option designate some or all -of these sections as invariant. To do this, add their titles to the -list of Invariant Sections in the Modified Version's license notice. -These titles must be distinct from any other section titles. - -You may add a section entitled "Endorsements", provided it contains -nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has -been approved by an organization as the authoritative definition of a -standard. - -You may add a passage of up to five words as a Front-Cover Text, and a -passage of up to 25 words as a Back-Cover Text, to the end of the list -of Cover Texts in the Modified Version. Only one passage of -Front-Cover Text and one of Back-Cover Text may be added by (or -through arrangements made by) any one entity. If the Document already -includes a cover text for the same cover, previously added by you or -by arrangement made by the same entity you are acting on behalf of, -you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License -give permission to use their names for publicity for or to assert or -imply endorsement of any Modified Version. - - -5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this -License, under the terms defined in section 4 above for modified -versions, provided that you include in the combination all of the -Invariant Sections of all of the original documents, unmodified, and -list them all as Invariant Sections of your combined work in its -license notice. - -The combined work need only contain one copy of this License, and -multiple identical Invariant Sections may be replaced with a single -copy. If there are multiple Invariant Sections with the same name but -different contents, make the title of each such section unique by -adding at the end of it, in parentheses, the name of the original -author or publisher of that section if known, or else a unique number. -Make the same adjustment to the section titles in the list of -Invariant Sections in the license notice of the combined work. - -In the combination, you must combine any sections entitled "History" -in the various original documents, forming one section entitled -"History"; likewise combine any sections entitled "Acknowledgements", -and any sections entitled "Dedications". You must delete all sections -entitled "Endorsements." - - -6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents -released under this License, and replace the individual copies of this -License in the various documents with a single copy that is included in -the collection, provided that you follow the rules of this License for -verbatim copying of each of the documents in all other respects. - -You may extract a single document from such a collection, and distribute -it individually under this License, provided you insert a copy of this -License into the extracted document, and follow this License in all -other respects regarding verbatim copying of that document. - - -7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate -and independent documents or works, in or on a volume of a storage or -distribution medium, does not as a whole count as a Modified Version -of the Document, provided no compilation copyright is claimed for the -compilation. Such a compilation is called an "aggregate", and this -License does not apply to the other self-contained works thus compiled -with the Document, on account of their being thus compiled, if they -are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one quarter -of the entire aggregate, the Document's Cover Texts may be placed on -covers that surround only the Document within the aggregate. -Otherwise they must appear on covers around the whole aggregate. - - -8. TRANSLATION - -Translation is considered a kind of modification, so you may -distribute translations of the Document under the terms of section 4. -Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include -translations of some or all Invariant Sections in addition to the -original versions of these Invariant Sections. You may include a -translation of this License provided that you also include the -original English version of this License. In case of a disagreement -between the translation and the original English version of this -License, the original English version will prevail. - - -9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except -as expressly provided for under this License. Any other attempt to -copy, modify, sublicense or distribute the Document is void, and will -automatically terminate your rights under this License. However, -parties who have received copies, or rights, from you under this -License will not have their licenses terminated so long as such -parties remain in full compliance. - - -10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions -of the GNU Free Documentation License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. See -http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. -If the Document specifies that a particular numbered version of this -License "or any later version" applies to it, you have the option of -following the terms and conditions either of that specified version or -of any later version that has been published (not as a draft) by the -Free Software Foundation. If the Document does not specify a version -number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. - - -ADDENDUM: How to use this License for your documents - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and -license notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled "GNU - Free Documentation License". - -If you have no Invariant Sections, write "with no Invariant Sections" -instead of saying which ones are invariant. If you have no -Front-Cover Texts, write "no Front-Cover Texts" instead of -"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. - -If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, -to permit their use in free software. diff --git a/lustre/LICENSE b/lustre/LICENSE deleted file mode 100644 index edb73cdedc..0000000000 --- a/lustre/LICENSE +++ /dev/null @@ -1,372 +0,0 @@ -Each file in this distribution contains a header stating the copyright -owner(s), and the licensing terms for that file. Some files are not -eligible for copyright protection, and contain neither. - -There are many files which may be covered by a separate license that -you signed or otherwise agreed to before downloading this software. -If you did not agree to such an agreement, or if the file does not -mention that license, then you can redistribute and/or modify it under -the terms of version 2 of the GNU General Public License. Each file -is very clear about which license is applicable. - -In any case, Lustre is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license -text for more details. - -Reproduced below is the GNU General Public License version 2, and -Linus's clarifying statement from the Linux kernel source code: - ----------------------------------------- - - NOTE! This copyright does *not* cover user programs that use kernel - services by normal system calls - this is merely considered normal use - of the kernel, and does *not* fall under the heading of "derived work". - Also note that the GPL below is copyrighted by the Free Software - Foundation, but the instance of code that it refers to (the Linux - kernel) is copyrighted by me and others who actually wrote it. - - Linus Torvalds - ----------------------------------------- - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/lustre/Makefile.in b/lustre/Makefile.in deleted file mode 100644 index c06794a376..0000000000 --- a/lustre/Makefile.in +++ /dev/null @@ -1,13 +0,0 @@ -subdir-m += lvfs -subdir-m += obdclass -subdir-m += lov -subdir-m += ptlrpc -subdir-m += osc -subdir-m += obdecho -subdir-m += mgc - -@SERVER_TRUE@subdir-m += mds obdfilter ost mgs -@CLIENT_TRUE@subdir-m += mdc llite -@QUOTA_TRUE@subdir-m += quota - -@INCLUDE_RULES@ diff --git a/lustre/autoMakefile.am b/lustre/autoMakefile.am deleted file mode 100644 index 53ae48a629..0000000000 --- a/lustre/autoMakefile.am +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -AUTOMAKE_OPTIONS = foreign - -# also update lustre/autoconf/lustre-core.m4 AC_CONFIG_FILES -ALWAYS_SUBDIRS := include lvfs obdclass ldlm ptlrpc osc lov obdecho \ - mgc doc utils tests scripts autoconf contrib - -SERVER_SUBDIRS := obdfilter ost mds mgs - -CLIENT_SUBDIRS := mdc llite - -QUOTA_SUBDIRS := quota - -LIBLUSTRE_SUBDIRS := liblustre - -SUBDIRS := $(ALWAYS_SUBDIRS) - -if SERVER -SUBDIRS += $(SERVER_SUBDIRS) -endif - -if CLIENT -SUBDIRS += $(CLIENT_SUBDIRS) -endif - -if QUOTA -SUBDIRS += $(QUOTA_SUBDIRS) -endif - -# this needs to be after the client subdirs -if LIBLUSTRE -if !CLIENT -SUBDIRS += $(CLIENT_SUBDIRS) -endif -SUBDIRS += $(LIBLUSTRE_SUBDIRS) -endif - -DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS) \ - $(LIBLUSTRE_SUBDIRS) $(QUOTA_SUBDIRS) - -EXTRA_DIST = BUGS FDL kernel_patches - -lvfs-sources: - $(MAKE) sources -C lvfs -obdclass-sources: - $(MAKE) sources -C obdclass - -sources: $(LDISKFS) lvfs-sources obdclass-sources lustre_build_version - -all-recursive: lustre_build_version - -BUILD_VER_H=$(top_builddir)/lustre/include/lustre/lustre_build_version.h - -lustre_build_version: - perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver - echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver - cmp -s $(BUILD_VER_H) tmpver > tmpdiff 2> /dev/null && \ - $(RM) tmpver tmpdiff || \ - mv -f tmpver $(BUILD_VER_H) diff --git a/lustre/autoconf/.cvsignore b/lustre/autoconf/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/lustre/autoconf/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/lustre/autoconf/Makefile.am b/lustre/autoconf/Makefile.am deleted file mode 100644 index 7a747da129..0000000000 --- a/lustre/autoconf/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST := lustre-core.m4 lustre-version.ac diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 deleted file mode 100644 index ff695410ed..0000000000 --- a/lustre/autoconf/lustre-core.m4 +++ /dev/null @@ -1,1693 +0,0 @@ -#* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- -#* vim:expandtab:shiftwidth=8:tabstop=8: -# -# LC_CONFIG_SRCDIR -# -# Wrapper for AC_CONFIG_SUBDIR -# -AC_DEFUN([LC_CONFIG_SRCDIR], -[AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c]) -]) - -# -# LC_PATH_DEFAULTS -# -# lustre specific paths -# -AC_DEFUN([LC_PATH_DEFAULTS], -[# ptlrpc kernel build requires this -LUSTRE="$PWD/lustre" -AC_SUBST(LUSTRE) - -# mount.lustre -rootsbindir='/sbin' -AC_SUBST(rootsbindir) - -demodir='$(docdir)/demo' -AC_SUBST(demodir) - -pkgexampledir='${pkgdatadir}/examples' -AC_SUBST(pkgexampledir) -]) - -# -# LC_TARGET_SUPPORTED -# -# is the target os supported? -# -AC_DEFUN([LC_TARGET_SUPPORTED], -[case $target_os in - linux* | darwin*) -$1 - ;; - *) -$2 - ;; -esac -]) - -# -# LC_CONFIG_EXT3 -# -# that ext3 is enabled in the kernel -# -AC_DEFUN([LC_CONFIG_EXT3], -[LB_LINUX_CONFIG([EXT3_FS],[],[ - LB_LINUX_CONFIG([EXT3_FS_MODULE],[],[$2]) -]) -LB_LINUX_CONFIG([EXT3_FS_XATTR],[$1],[$3]) -]) - -# -# LC_FSHOOKS -# -# If we have (and can build) fshooks.h -# -AC_DEFUN([LC_FSHOOKS], -[LB_CHECK_FILE([$LINUX/include/linux/fshooks.h],[ - AC_MSG_CHECKING([if fshooks.h can be compiled]) - LB_LINUX_TRY_COMPILE([ - #include <linux/fshooks.h> - ],[],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_WARN([You might have better luck with gcc 3.3.x.]) - AC_MSG_WARN([You can set CC=gcc33 before running configure.]) - AC_MSG_ERROR([Your compiler cannot build fshooks.h.]) - ]) -$1 -],[ -$2 -]) -]) - -# -# LC_STRUCT_KIOBUF -# -# rh 2.4.18 has iobuf->dovary, but other kernels do not -# -AC_DEFUN([LC_STRUCT_KIOBUF], -[AC_MSG_CHECKING([if struct kiobuf has a dovary field]) -LB_LINUX_TRY_COMPILE([ - #include <linux/iobuf.h> -],[ - struct kiobuf iobuf; - iobuf.dovary = 1; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_COND_RESCHED -# -# cond_resched() was introduced in 2.4.20 -# -AC_DEFUN([LC_FUNC_COND_RESCHED], -[AC_MSG_CHECKING([if kernel offers cond_resched]) -LB_LINUX_TRY_COMPILE([ - #include <linux/sched.h> -],[ - cond_resched(); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_COND_RESCHED, 1, [cond_resched found]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_ZAP_PAGE_RANGE -# -# if zap_page_range() takes a vma arg -# -AC_DEFUN([LC_FUNC_ZAP_PAGE_RANGE], -[AC_MSG_CHECKING([if zap_page_range with vma parameter]) -ZAP_PAGE_RANGE_VMA="`grep -c 'zap_page_range.*struct vm_area_struct' $LINUX/include/linux/mm.h`" -if test "$ZAP_PAGE_RANGE_VMA" != 0 ; then - AC_DEFINE(ZAP_PAGE_RANGE_VMA, 1, [zap_page_range with vma parameter]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi -]) - -# -# LC_FUNC_PDE -# -# if proc_fs.h defines PDE() -# -AC_DEFUN([LC_FUNC_PDE], -[AC_MSG_CHECKING([if kernel defines PDE]) -HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`" -if test "$HAVE_PDE" != 0 ; then - AC_DEFINE(HAVE_PDE, 1, [the kernel defines PDE]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi -]) - -# -# LC_FUNC_FILEMAP_FDATASYNC -# -# if filemap_fdatasync() exists -# -AC_DEFUN([LC_FUNC_FILEMAP_FDATAWRITE], -[AC_MSG_CHECKING([whether filemap_fdatawrite() is defined]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - int (*foo)(struct address_space *)= filemap_fdatawrite; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_FILEMAP_FDATAWRITE, 1, [filemap_fdatawrite() found]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_DIRECT_IO -# -# if direct_IO takes a struct file argument -# -AC_DEFUN([LC_FUNC_DIRECT_IO], -[AC_MSG_CHECKING([if kernel passes struct file to direct_IO]) -HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`" -if test "$HAVE_DIO_FILE" != 0 ; then - AC_DEFINE(HAVE_DIO_FILE, 1, [the kernel passes struct file to direct_IO]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -]) - -# -# LC_HEADER_MM_INLINE -# -# RHEL kernels define page_count in mm_inline.h -# -AC_DEFUN([LC_HEADER_MM_INLINE], -[AC_MSG_CHECKING([if kernel has mm_inline.h header]) -LB_LINUX_TRY_COMPILE([ - #include <linux/mm_inline.h> -],[ - #ifndef page_count - #error mm_inline.h does not define page_count - #endif -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_MM_INLINE, 1, [mm_inline found]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_STRUCT_INODE -# -# if inode->i_alloc_sem exists -# -AC_DEFUN([LC_STRUCT_INODE], -[AC_MSG_CHECKING([if struct inode has i_alloc_sem]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> - #include <linux/version.h> -],[ - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,24)) - #error "down_read_trylock broken before 2.4.24" - #endif - struct inode i; - return (char *)&i.i_alloc_sem - (char *)&i; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_I_ALLOC_SEM, 1, [struct inode has i_alloc_sem]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_REGISTER_CACHE -# -# if register_cache() is defined by kernel -# -AC_DEFUN([LC_FUNC_REGISTER_CACHE], -[AC_MSG_CHECKING([if kernel defines register_cache()]) -LB_LINUX_TRY_COMPILE([ - #include <linux/list.h> - #include <linux/cache_def.h> -],[ - struct cache_definition cache; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_REGISTER_CACHE, 1, [register_cache found]) - AC_MSG_CHECKING([if kernel expects return from cache shrink function]) - HAVE_CACHE_RETURN_INT="`grep -c 'int.*shrink' $LINUX/include/linux/cache_def.h`" - if test "$HAVE_CACHE_RETURN_INT" != 0 ; then - AC_DEFINE(HAVE_CACHE_RETURN_INT, 1, [kernel expects return from shrink_cache]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP -# -# check for our patched grab_cache_page_nowait_gfp() function -# -AC_DEFUN([LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP], -[AC_MSG_CHECKING([if kernel defines grab_cache_page_nowait_gfp()]) -HAVE_GCPN_GFP="`grep -c 'grab_cache_page_nowait_gfp' $LINUX/include/linux/pagemap.h`" -if test "$HAVE_GCPN_GFP" != 0 ; then - AC_DEFINE(HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP, 1, - [kernel has grab_cache_page_nowait_gfp()]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -]) - -# -# LC_FUNC_DEV_SET_RDONLY -# -# check for the old-style dev_set_rdonly which took an extra "devno" param -# and can only set a single device to discard writes at one time -# -AC_DEFUN([LC_FUNC_DEV_SET_RDONLY], -[AC_MSG_CHECKING([if kernel has new dev_set_rdonly]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - #ifndef HAVE_CLEAR_RDONLY_ON_PUT - #error needs to be patched by lustre kernel patches from Lustre version 1.4.3 or above. - #endif -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel has new dev_set_rdonly]) -],[ - AC_MSG_RESULT([no, Linux kernel source needs to be patches by lustre -kernel patches from Lustre version 1.4.3 or above.]) -]) -]) - -# -# LC_CONFIG_BACKINGFS -# -# setup, check the backing filesystem -# -AC_DEFUN([LC_CONFIG_BACKINGFS], -[ -BACKINGFS="ldiskfs" - -if test x$with_ldiskfs = xno ; then - BACKINGFS="ext3" - - if test x$linux25$enable_server = xyesyes ; then - AC_MSG_ERROR([ldiskfs is required for 2.6-based servers.]) - fi - - # --- Check that ext3 and ext3 xattr are enabled in the kernel - LC_CONFIG_EXT3([],[ - AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel]) - ],[ - AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel]) - AC_MSG_WARN([This build may fail.]) - ]) -else - # ldiskfs is enabled - LB_DEFINE_LDISKFS_OPTIONS -fi #ldiskfs - -AC_MSG_CHECKING([which backing filesystem to use]) -AC_MSG_RESULT([$BACKINGFS]) -AC_SUBST(BACKINGFS) -]) - -# -# LC_CONFIG_PINGER -# -# the pinger is temporary, until we have the recovery node in place -# -AC_DEFUN([LC_CONFIG_PINGER], -[AC_MSG_CHECKING([whether to enable pinger support]) -AC_ARG_ENABLE([pinger], - AC_HELP_STRING([--disable-pinger], - [disable recovery pinger support]), - [],[enable_pinger='yes']) -AC_MSG_RESULT([$enable_pinger]) -if test x$enable_pinger != xno ; then - AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger) -fi -]) - -# -# LC_CONFIG_CHECKSUM -# -# do checksum of bulk data between client and OST -# -AC_DEFUN([LC_CONFIG_CHECKSUM], -[AC_MSG_CHECKING([whether to enable data checksum support]) -AC_ARG_ENABLE([checksum], - AC_HELP_STRING([--disable-checksum], - [disable data checksum support]), - [],[enable_checksum='yes']) -AC_MSG_RESULT([$enable_checksum]) -if test x$enable_checksum != xno ; then - AC_DEFINE(ENABLE_CHECKSUM, 1, do data checksums) -fi -]) - -# -# LC_CONFIG_HEALTH_CHECK_WRITE -# -# Turn on the actual write to the disk -# -AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE], -[AC_MSG_CHECKING([whether to enable a write with the health check]) -AC_ARG_ENABLE([health-write], - AC_HELP_STRING([--enable-health-write], - [enable disk writes when doing health check]), - [],[enable_health_write='no']) -AC_MSG_RESULT([$enable_health_write]) -if test x$enable_health_write == xyes ; then - AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, Write when Checking Health) -fi -]) - -# -# LC_CONFIG_LIBLUSTRE_RECOVERY -# -AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY], -[AC_MSG_CHECKING([whether to enable liblustre recovery support]) -AC_ARG_ENABLE([liblustre-recovery], - AC_HELP_STRING([--disable-liblustre-recovery], - [disable liblustre recovery support]), - [],[enable_liblustre_recovery='yes']) -AC_MSG_RESULT([$enable_liblustre_recovery]) -if test x$enable_liblustre_recovery != xno ; then - AC_DEFINE(ENABLE_LIBLUSTRE_RECOVERY, 1, Liblustre Can Recover) -fi -]) - -# -# LC_CONFIG_OBD_BUFFER_SIZE -# -# the maximum buffer size of lctl ioctls -# -AC_DEFUN([LC_CONFIG_OBD_BUFFER_SIZE], -[AC_MSG_CHECKING([maximum OBD ioctl size]) -AC_ARG_WITH([obd-buffer-size], - AC_HELP_STRING([--with-obd-buffer-size=[size]], - [set lctl ioctl maximum bytes (default=8192)]), - [ - OBD_BUFFER_SIZE=$with_obd_buffer_size - ],[ - OBD_BUFFER_SIZE=8192 - ]) -AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes]) -AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size]) -]) - -# -# LC_STRUCT_STATFS -# -# AIX does not have statfs.f_namelen -# -AC_DEFUN([LC_STRUCT_STATFS], -[AC_MSG_CHECKING([if struct statfs has a f_namelen field]) -LB_LINUX_TRY_COMPILE([ - #include <linux/vfs.h> -],[ - struct statfs sfs; - sfs.f_namelen = 1; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_STATFS_NAMELEN, 1, [struct statfs has a namelen field]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_READLINK_SSIZE_T -# -AC_DEFUN([LC_READLINK_SSIZE_T], -[AC_MSG_CHECKING([if readlink returns ssize_t]) -AC_TRY_COMPILE([ - #include <unistd.h> -],[ - ssize_t readlink(const char *, char *, size_t); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_POSIX_1003_READLINK, 1, [readlink returns ssize_t]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -AC_DEFUN([LC_FUNC_PAGE_MAPPED], -[AC_MSG_CHECKING([if kernel offers page_mapped]) -LB_LINUX_TRY_COMPILE([ - #include <linux/mm.h> -],[ - page_mapped(NULL); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_PAGE_MAPPED, 1, [page_mapped found]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -AC_DEFUN([LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL], -[AC_MSG_CHECKING([if struct file_operations has an unlocked_ioctl field]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - struct file_operations fops; - &fops.unlocked_ioctl; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_UNLOCKED_IOCTL, 1, [struct file_operations has an unlock ed_ioctl field]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -AC_DEFUN([LC_FILEMAP_POPULATE], -[AC_MSG_CHECKING([for exported filemap_populate]) -LB_LINUX_TRY_COMPILE([ - #include <asm/page.h> - #include <linux/mm.h> -],[ - filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_FILEMAP_POPULATE, 1, [Kernel exports filemap_populate]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -AC_DEFUN([LC_D_ADD_UNIQUE], -[AC_MSG_CHECKING([for d_add_unique]) -LB_LINUX_TRY_COMPILE([ - #include <linux/dcache.h> -],[ - d_add_unique(NULL, NULL); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_D_ADD_UNIQUE, 1, [Kernel has d_add_unique]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -AC_DEFUN([LC_BIT_SPINLOCK_H], -[LB_CHECK_FILE([$LINUX/include/linux/bit_spinlock.h],[ - AC_MSG_CHECKING([if bit_spinlock.h can be compiled]) - LB_LINUX_TRY_COMPILE([ - #include <asm/processor.h> - #include <linux/spinlock.h> - #include <linux/bit_spinlock.h> - ],[],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_BIT_SPINLOCK_H, 1, [Kernel has bit_spinlock.h]) - ],[ - AC_MSG_RESULT([no]) - ]) -], -[]) -]) - -# -# LC_POSIX_ACL_XATTR -# -# If we have xattr_acl.h -# -AC_DEFUN([LC_XATTR_ACL], -[LB_CHECK_FILE([$LINUX/include/linux/xattr_acl.h],[ - AC_MSG_CHECKING([if xattr_acl.h can be compiled]) - LB_LINUX_TRY_COMPILE([ - #include <linux/xattr_acl.h> - ],[],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_XATTR_ACL, 1, [Kernel has xattr_acl]) - ],[ - AC_MSG_RESULT([no]) - ]) -], -[]) -]) - -AC_DEFUN([LC_STRUCT_INTENT_FILE], -[AC_MSG_CHECKING([if struct open_intent has a file field]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> - #include <linux/namei.h> -],[ - struct open_intent intent; - &intent.file; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_FILE_IN_STRUCT_INTENT, 1, [struct open_intent has a file field]) -],[ - AC_MSG_RESULT([no]) -]) -]) - - -AC_DEFUN([LC_POSIX_ACL_XATTR_H], -[LB_CHECK_FILE([$LINUX/include/linux/posix_acl_xattr.h],[ - AC_MSG_CHECKING([if linux/posix_acl_xattr.h can be compiled]) - LB_LINUX_TRY_COMPILE([ - #include <linux/posix_acl_xattr.h> - ],[],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_LINUX_POSIX_ACL_XATTR_H, 1, [linux/posix_acl_xattr.h found]) - - ],[ - AC_MSG_RESULT([no]) - ]) -$1 -],[ -AC_MSG_RESULT([no]) -]) -]) - -# -# LC_EXPORT___IGET -# starting from 2.6.19 linux kernel exports __iget() -# -AC_DEFUN([LC_EXPORT___IGET], -[LB_CHECK_SYMBOL_EXPORT([__iget], -[fs/inode.c],[ - AC_DEFINE(HAVE_EXPORT___IGET, 1, [kernel exports __iget]) -],[ -]) -]) - - -AC_DEFUN([LC_LUSTRE_VERSION_H], -[LB_CHECK_FILE([$LINUX/include/linux/lustre_version.h],[ - rm -f "$LUSTRE/include/linux/lustre_version.h" -],[ - touch "$LUSTRE/include/linux/lustre_version.h" - if test x$enable_server = xyes ; then - AC_MSG_WARN([Unpatched kernel detected.]) - AC_MSG_WARN([Lustre servers cannot be built with an unpatched kernel;]) - AC_MSG_WARN([disabling server build]) - enable_server='no' - fi -]) -]) - -AC_DEFUN([LC_FUNC_SET_FS_PWD], -[LB_CHECK_SYMBOL_EXPORT([set_fs_pwd], -[fs/namespace.c],[ - AC_DEFINE(HAVE_SET_FS_PWD, 1, [set_fs_pwd is exported]) -],[ -]) -]) - - -# -# LC_FUNC_MS_FLOCK_LOCK -# -# SLES9 kernel has MS_FLOCK_LOCK sb flag -# -AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK], -[AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - int flags = MS_FLOCK_LOCK; -],[ - AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1, - [kernel has MS_FLOCK_LOCK flag]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_HAVE_CAN_SLEEP_ARG -# -# SLES9 kernel has third arg can_sleep -# in fs/locks.c: flock_lock_file_wait() -# -AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG], -[AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - int cansleep; - struct file *file; - struct file_lock *file_lock; - flock_lock_file_wait(file, file_lock, cansleep); -],[ - AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1, - [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_F_OP_FLOCK -# -# rhel4.2 kernel has f_op->flock field -# -AC_DEFUN([LC_FUNC_F_OP_FLOCK], -[AC_MSG_CHECKING([if struct file_operations has flock field]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - struct file_operations ll_file_operations_flock; - ll_file_operations_flock.flock = NULL; -],[ - AC_DEFINE(HAVE_F_OP_FLOCK, 1, - [struct file_operations has flock field]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_MS_FLOCK_LOCK -# -# SLES9 kernel has MS_FLOCK_LOCK sb flag -# -AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK], -[AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - int flags = MS_FLOCK_LOCK; -],[ - AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1, - [kernel has MS_FLOCK_LOCK flag]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_HAVE_CAN_SLEEP_ARG -# -# SLES9 kernel has third arg can_sleep -# in fs/locks.c: flock_lock_file_wait() -# -AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG], -[AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - int cansleep; - struct file *file; - struct file_lock *file_lock; - flock_lock_file_wait(file, file_lock, cansleep); -],[ - AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1, - [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_TASK_PPTR -# -# task struct has p_pptr instead of parent -# -AC_DEFUN([LC_TASK_PPTR], -[AC_MSG_CHECKING([task p_pptr found]) -LB_LINUX_TRY_COMPILE([ - #include <linux/sched.h> -],[ - struct task_struct *p; - - p = p->p_pptr; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_TASK_PPTR, 1, [task p_pptr found]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_F_OP_FLOCK -# -# rhel4.2 kernel has f_op->flock field -# -AC_DEFUN([LC_FUNC_F_OP_FLOCK], -[AC_MSG_CHECKING([if struct file_operations has flock field]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - struct file_operations ll_file_operations_flock; - ll_file_operations_flock.flock = NULL; -],[ - AC_DEFINE(HAVE_F_OP_FLOCK, 1, - [struct file_operations has flock field]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# LC_INODE_I_MUTEX -# after 2.6.15 inode have i_mutex intead of i_sem -AC_DEFUN([LC_INODE_I_MUTEX], -[AC_MSG_CHECKING([use inode have i_mutex ]) -LB_LINUX_TRY_COMPILE([ - #include <linux/mutex.h> - #include <linux/fs.h> - #undef i_mutex -],[ - struct inode i; - - mutex_unlock(&i.i_mutex); -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_I_MUTEX, 1, - [after 2.6.15 inode have i_mutex intead of i_sem]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# LC_SYMVERFILE -# SLES 9 uses a different name for this file - unsure about vanilla kernels -# around this version, but it matters for servers only. -AC_DEFUN([LC_SYMVERFILE], - [AC_MSG_CHECKING([name of symverfile]) - if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost ; then - SYMVERFILE=Modules.symvers - else - SYMVERFILE=Module.symvers - fi - AC_MSG_RESULT($SYMVERFILE) - AC_SUBST(SYMVERFILE)]) - -# LC_DQUOTOFF_MUTEX -# after 2.6.17 dquote use mutex instead if semaphore -AC_DEFUN([LC_DQUOTOFF_MUTEX], -[AC_MSG_CHECKING([use dqonoff_mutex]) -LB_LINUX_TRY_COMPILE([ - #include <linux/mutex.h> - #include <linux/fs.h> - #include <linux/quota.h> -],[ - struct quota_info dq; - - mutex_unlock(&dq.dqonoff_mutex); -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DQUOTOFF_MUTEX, 1, - [after 2.6.17 dquote use mutex instead if semaphore]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# -# LC_STATFS_DENTRY_PARAM -# starting from 2.6.18 linux kernel uses dentry instead of -# super_block for first vfs_statfs argument -# -AC_DEFUN([LC_STATFS_DENTRY_PARAM], -[AC_MSG_CHECKING([first vfs_statfs parameter is dentry]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - int vfs_statfs(struct dentry *, struct kstatfs *); -],[ - AC_DEFINE(HAVE_STATFS_DENTRY_PARAM, 1, - [first parameter of vfs_statfs is dentry]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_VFS_KERN_MOUNT -# starting from 2.6.18 kernel don't export do_kern_mount -# and want to use vfs_kern_mount instead. -# -AC_DEFUN([LC_VFS_KERN_MOUNT], -[AC_MSG_CHECKING([vfs_kern_mount exist in kernel]) -LB_LINUX_TRY_COMPILE([ - #include <linux/mount.h> -],[ - vfs_kern_mount(NULL, 0, NULL, NULL); -],[ - AC_DEFINE(HAVE_VFS_KERN_MOUNT, 1, - [vfs_kern_mount exist in kernel]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_INVALIDATEPAGE_RETURN_INT -# more 2.6 api changes. return type for the invalidatepage -# address_space_operation is 'void' in new kernels but 'int' in old -# -AC_DEFUN([LC_INVALIDATEPAGE_RETURN_INT], -[AC_MSG_CHECKING([invalidatepage has return int]) -LB_LINUX_TRY_COMPILE([ - #include <linux/buffer_head.h> -],[ - int rc = block_invalidatepage(NULL, 0); -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INVALIDATEPAGE_RETURN_INT, 1, - [Define if return type of invalidatepage should be int]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# LC_UMOUNTBEGIN_HAS_VFSMOUNT -# more 2.6 API changes. 2.6.18 umount_begin has different parameters -AC_DEFUN([LC_UMOUNTBEGIN_HAS_VFSMOUNT], -[AC_MSG_CHECKING([if umount_begin needs vfsmount parameter instead of super_block]) -tmp_flags="$EXTRA_KCFLAGS" -EXTRA_KCFLAGS="-Werror" -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> - - struct vfsmount; - static void cfg_umount_begin (struct vfsmount *v, int flags) - { - ; - } - - static struct super_operations cfg_super_operations = { - .umount_begin = cfg_umount_begin, - }; -],[ - cfg_super_operations.umount_begin(NULL,0); -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_UMOUNTBEGIN_VFSMOUNT, 1, - [Define umount_begin need second argument]) -],[ - AC_MSG_RESULT(NO) -]) -EXTRA_KCFLAGS="$tmp_flags" -]) - -# 2.6.19 API changes -# inode don't have i_blksize field -AC_DEFUN([LC_INODE_BLKSIZE], -[AC_MSG_CHECKING([inode has i_blksize field]) -LB_LINUX_TRY_COMPILE([ -#include <linux/fs.h> -],[ - struct inode i; - i.i_blksize = 0; -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_BLKSIZE, 1, - [struct inode has i_blksize field]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# LC_VFS_READDIR_U64_INO -# 2.6.19 use u64 for inode number instead of inode_t -AC_DEFUN([LC_VFS_READDIR_U64_INO], -[AC_MSG_CHECKING([check vfs_readdir need 64bit inode number]) -tmp_flags="$EXTRA_KCFLAGS" -EXTRA_KCFLAGS="-Werror" -LB_LINUX_TRY_COMPILE([ -#include <linux/fs.h> - int fillonedir(void * __buf, const char * name, int namlen, loff_t offset, - u64 ino, unsigned int d_type) - { - return 0; - } -],[ - filldir_t filter; - - filter = fillonedir; - return 1; -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_VFS_READDIR_U64_INO, 1, - [if vfs_readdir need 64bit inode number]) -],[ - AC_MSG_RESULT(NO) -]) -EXTRA_KCFLAGS="$tmp_flags" -]) - -# LC_FILE_WRITEV -# 2.6.19 replaced writev with aio_write -AC_DEFUN([LC_FILE_WRITEV], -[AC_MSG_CHECKING([writev in fops]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - struct file_operations *fops; - fops->writev = NULL; -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_WRITEV, 1, - [use fops->writev]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# LC_GENERIC_FILE_READ -# 2.6.19 replaced readv with aio_read -AC_DEFUN([LC_FILE_READV], -[AC_MSG_CHECKING([readv in fops]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - struct file_operations *fops; - fops->readv = NULL; -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_READV, 1, - [use fops->readv]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# LC_NR_PAGECACHE -# 2.6.18 don't export nr_pagecahe -AC_DEFUN([LC_NR_PAGECACHE], -[AC_MSG_CHECKING([kernel export nr_pagecache]) -LB_LINUX_TRY_COMPILE([ - #include <linux/pagemap.h> -],[ - return atomic_read(&nr_pagecache); -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_NR_PAGECACHE, 1, - [is kernel export nr_pagecache]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# LC_CANCEL_DIRTY_PAGE -# 2.6.20 introduse cancel_dirty_page instead of -# clear_page_dirty. -AC_DEFUN([LC_CANCEL_DIRTY_PAGE], -[AC_MSG_CHECKING([kernel has cancel_dirty_page]) -LB_LINUX_TRY_COMPILE([ - #include <linux/page-flags.h> -],[ - cancel_dirty_page(NULL, 0); -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CANCEL_DIRTY_PAGE, 1, - [kernel has cancel_dirty_page instead of clear_page_dirty]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# -# LC_PAGE_CONSTANT -# -# In order to support raid5 zerocopy patch, we have to patch the kernel to make -# it support constant page, which means the page won't be modified during the -# IO. -# -AC_DEFUN([LC_PAGE_CONSTANT], -[AC_MSG_CHECKING([if kernel have PageConstant defined]) -LB_LINUX_TRY_COMPILE([ - #include <linux/page-flags.h> -],[ - #ifndef PG_constant - #error "Have no raid5 zcopy patch" - #endif -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PAGE_CONSTANT, 1, [kernel have PageConstant supported]) -],[ - AC_MSG_RESULT(no); -]) -]) - -# RHEL5 in FS-cache patch rename PG_checked flag -# into PG_fs_misc -AC_DEFUN([LC_PG_FS_MISC], -[AC_MSG_CHECKING([kernel has PG_fs_misc]) -LB_LINUX_TRY_COMPILE([ - #include <linux/page-flags.h> -],[ - #ifndef PG_fs_misc - #error PG_fs_misc not defined in kernel - #endif -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PG_FS_MISC, 1, - [is kernel have PG_fs_misc]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -# RHEL5 PageChecked and SetPageChecked defined -AC_DEFUN([LC_PAGE_CHECKED], -[AC_MSG_CHECKING([kernel has PageChecked and SetPageChecked]) -LB_LINUX_TRY_COMPILE([ - #include <linux/page-flags.h> -],[ - #ifndef PageChecked - #error PageChecked not defined in kernel - #endif - #ifndef SetPageChecked - #error SetPageChecked not defined in kernel - #endif -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PAGE_CHECKED, 1, - [does kernel have PageChecked and SetPageChecked]) -],[ - AC_MSG_RESULT(NO) -]) -]) - -AC_DEFUN([LC_EXPORT_TRUNCATE_COMPLETE], -[LB_CHECK_SYMBOL_EXPORT([truncate_complete_page], -[mm/truncate.c],[ -AC_DEFINE(HAVE_TRUNCATE_COMPLETE_PAGE, 1, - [kernel export truncate_complete_page]) -],[ -]) -]) - -AC_DEFUN([LC_EXPORT_D_REHASH_COND], -[LB_CHECK_SYMBOL_EXPORT([d_rehash_cond], -[fs/dcache.c],[ -AC_DEFINE(HAVE_D_REHASH_COND, 1, - [d_rehash_cond is exported by the kernel]) -],[ -]) -]) - -AC_DEFUN([LC_EXPORT___D_REHASH], -[LB_CHECK_SYMBOL_EXPORT([__d_rehash], -[fs/dcache.c],[ -AC_DEFINE(HAVE___D_REHASH, 1, - [__d_rehash is exported by the kernel]) -],[ -]) -]) - -AC_DEFUN([LC_EXPORT_D_MOVE_LOCKED], -[LB_CHECK_SYMBOL_EXPORT([d_move_locked], -[fs/dcache.c],[ -AC_DEFINE(HAVE_D_MOVE_LOCKED, 1, - [d_move_locked is exported by the kernel]) -],[ -]) -]) - -AC_DEFUN([LC_EXPORT___D_MOVE], -[LB_CHECK_SYMBOL_EXPORT([__d_move], -[fs/dcache.c],[ -AC_DEFINE(HAVE___D_MOVE, 1, - [__d_move is exported by the kernel]) -],[ -]) -]) - -# The actual symbol exported varies among architectures, so we need -# to check many symbols (but only in the current architecture.) No -# matter what symbol is exported, the kernel #defines node_to_cpumask -# to the appropriate function and that's what we use. -AC_DEFUN([LC_EXPORT_NODE_TO_CPUMASK], - [LB_LINUX_ARCH - LB_CHECK_SYMBOL_EXPORT([node_to_cpumask], - [arch/$LINUX_ARCH/mm/numa.c], - [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1, - [node_to_cpumask is exported by - the kernel])]) # x86_64 - LB_CHECK_SYMBOL_EXPORT([node_to_cpu_mask], - [arch/$LINUX_ARCH/kernel/smpboot.c], - [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1, - [node_to_cpumask is exported by - the kernel])]) # ia64 - LB_CHECK_SYMBOL_EXPORT([node_2_cpu_mask], - [arch/$LINUX_ARCH/kernel/smpboot.c], - [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1, - [node_to_cpumask is exported by - the kernel])]) # i386 - ]) - -# -# LC_VFS_INTENT_PATCHES -# -# check if the kernel has the VFS intent patches -AC_DEFUN([LC_VFS_INTENT_PATCHES], -[AC_MSG_CHECKING([if the kernel has the VFS intent patches]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> - #include <linux/namei.h> -],[ - struct nameidata nd; - struct lookup_intent *it; - - it = &nd.intent; - intent_init(it, IT_OPEN); - it->d.lustre.it_disposition = 0; - it->d.lustre.it_data = NULL; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_VFS_INTENT_PATCHES, 1, [VFS intent patches are applied]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# 2.6.22 lost second parameter for invalidate_bdev -AC_DEFUN([LC_INVALIDATE_BDEV_2ARG], -[AC_MSG_CHECKING([if invalidate_bdev has second argument]) -LB_LINUX_TRY_COMPILE([ - #include <linux/buffer_head.h> -],[ - invalidate_bdev(NULL,0); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_INVALIDATE_BDEV_2ARG, 1, - [invalidate_bdev has second argument]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# 2.6.23 have return type 'void' for unregister_blkdev -AC_DEFUN([LC_UNREGISTER_BLKDEV_RETURN_INT], -[AC_MSG_CHECKING([if unregister_blkdev return int]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - int i = unregister_blkdev(0,NULL); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_UNREGISTER_BLKDEV_RETURN_INT, 1, - [unregister_blkdev return int]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# 2.6.23 change .sendfile to .splice_read -AC_DEFUN([LC_KERNEL_SPLICE_READ], -[AC_MSG_CHECKING([if kernel has .splice_read]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - struct file_operations file; - - file.splice_read = NULL; -], [ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_KERNEL_SPLICE_READ, 1, - [kernel has .slice_read]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# 2.6.23 extract nfs export related data into exportfs.h -AC_DEFUN([LC_HAVE_EXPORTFS_H], -[ -tmpfl="$CFLAGS" -CFLAGS="$CFLAGS -I$LINUX_OBJ/include" -AC_CHECK_HEADERS([linux/exportfs.h]) -CFLAGS="$tmpfl" -]) - -# -# LC_PROG_LINUX -# -# Lustre linux kernel checks -# -AC_DEFUN([LC_PROG_LINUX], - [LC_LUSTRE_VERSION_H - if test x$enable_server = xyes ; then - LC_CONFIG_BACKINGFS - fi - LC_CONFIG_PINGER - LC_CONFIG_CHECKSUM - LC_CONFIG_LIBLUSTRE_RECOVERY - LC_CONFIG_QUOTA - LC_CONFIG_HEALTH_CHECK_WRITE - LC_CONFIG_LRU_RESIZE - LC_CONFIG_ADAPTIVE_TIMEOUTS - - LC_TASK_PPTR - # RHEL4 patches - LC_EXPORT_TRUNCATE_COMPLETE - LC_EXPORT_D_REHASH_COND - LC_EXPORT___D_REHASH - LC_EXPORT_D_MOVE_LOCKED - LC_EXPORT___D_MOVE - LC_EXPORT_NODE_TO_CPUMASK - - LC_STRUCT_KIOBUF - LC_FUNC_COND_RESCHED - LC_FUNC_ZAP_PAGE_RANGE - LC_FUNC_PDE - LC_FUNC_DIRECT_IO - LC_HEADER_MM_INLINE - LC_STRUCT_INODE - LC_FUNC_REGISTER_CACHE - LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP - LC_FUNC_DEV_SET_RDONLY - LC_FUNC_FILEMAP_FDATAWRITE - LC_STRUCT_STATFS - LC_FUNC_PAGE_MAPPED - LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL - LC_FILEMAP_POPULATE - LC_D_ADD_UNIQUE - LC_BIT_SPINLOCK_H - LC_XATTR_ACL - LC_STRUCT_INTENT_FILE - LC_POSIX_ACL_XATTR_H - LC_EXPORT___IGET - LC_FUNC_SET_FS_PWD - LC_FUNC_MS_FLOCK_LOCK - LC_FUNC_HAVE_CAN_SLEEP_ARG - LC_FUNC_F_OP_FLOCK - LC_QUOTA_READ - LC_COOKIE_FOLLOW_LINK - LC_FUNC_RCU - - # does the kernel have VFS intent patches? - LC_VFS_INTENT_PATCHES - - # 2.6.15 - LC_INODE_I_MUTEX - - # SLES 10 (at least) - LC_SYMVERFILE - - # 2.6.17 - LC_DQUOTOFF_MUTEX - - # 2.6.18 - LC_NR_PAGECACHE - LC_STATFS_DENTRY_PARAM - LC_VFS_KERN_MOUNT - LC_INVALIDATEPAGE_RETURN_INT - LC_UMOUNTBEGIN_HAS_VFSMOUNT - - #2.6.18 + RHEL5 (fc6) - LC_PG_FS_MISC - LC_PAGE_CHECKED - - # 2.6.19 - LC_INODE_BLKSIZE - LC_VFS_READDIR_U64_INO - LC_FILE_WRITEV - LC_FILE_READV - - # 2.6.20 - LC_CANCEL_DIRTY_PAGE - - # raid5-zerocopy patch - LC_PAGE_CONSTANT - - # 2.6.22 - LC_INVALIDATE_BDEV_2ARG - # 2.6.23 - LC_UNREGISTER_BLKDEV_RETURN_INT - LC_KERNEL_SPLICE_READ - LC_HAVE_EXPORTFS_H -]) - -# -# LC_CONFIG_CLIENT_SERVER -# -# Build client/server sides of Lustre -# -AC_DEFUN([LC_CONFIG_CLIENT_SERVER], -[AC_MSG_CHECKING([whether to build Lustre server support]) -AC_ARG_ENABLE([server], - AC_HELP_STRING([--disable-server], - [disable Lustre server support]), - [],[enable_server='yes']) -AC_MSG_RESULT([$enable_server]) - -AC_MSG_CHECKING([whether to build Lustre client support]) -AC_ARG_ENABLE([client], - AC_HELP_STRING([--disable-client], - [disable Lustre client support]), - [],[enable_client='yes']) -AC_MSG_RESULT([$enable_client])]) - -# -# LC_CONFIG_LIBLUSTRE -# -# whether to build liblustre -# -AC_DEFUN([LC_CONFIG_LIBLUSTRE], -[AC_MSG_CHECKING([whether to build Lustre library]) -AC_ARG_ENABLE([liblustre], - AC_HELP_STRING([--disable-liblustre], - [disable building of Lustre library]), - [],[enable_liblustre=$with_sysio]) -AC_MSG_RESULT([$enable_liblustre]) -# only build sysio if liblustre is built -with_sysio="$enable_liblustre" - -AC_MSG_CHECKING([whether to build liblustre tests]) -AC_ARG_ENABLE([liblustre-tests], - AC_HELP_STRING([--enable-liblustre-tests], - [enable liblustre tests, if --disable-tests is used]), - [],[enable_liblustre_tests=$enable_tests]) -if test x$enable_liblustre != xyes ; then - enable_liblustre_tests='no' -fi -AC_MSG_RESULT([$enable_liblustre_tests]) - -AC_MSG_CHECKING([whether to enable liblustre acl]) -AC_ARG_ENABLE([liblustre-acl], - AC_HELP_STRING([--disable-liblustre-acl], - [disable ACL support for liblustre]), - [],[enable_liblustre_acl=yes]) -if test x$enable_liblustre != xyes ; then - enable_liblustre_acl='no' -fi -AC_MSG_RESULT([$enable_liblustre_acl]) -if test x$enable_liblustre_acl != xno ; then - AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS) -fi - -AC_MSG_CHECKING([whether to build mpitests]) -AC_ARG_ENABLE([mpitests], - AC_HELP_STRING([--enable-mpitests], - [build liblustre mpi tests]), - [],[enable_mpitests=no]) -AC_MSG_RESULT([$enable_mpitests]) - -AC_MSG_NOTICE([Enabling Lustre configure options for libsysio]) -ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets" - -LC_CONFIG_PINGER -LC_CONFIG_LIBLUSTRE_RECOVERY -]) - -AC_DEFUN([LC_CONFIG_LRU_RESIZE], -[AC_MSG_CHECKING([whether to enable lru self-adjusting]) -AC_ARG_ENABLE([lru_resize], - AC_HELP_STRING([--enable-lru-resize], - [enable lru resize support]), - [],[enable_lru_resize='yes']) -AC_MSG_RESULT([$enable_lru_resize]) -if test x$enable_lru_resize != xno; then - AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support]) -fi -]) - -AC_DEFUN([LC_CONFIG_ADAPTIVE_TIMEOUTS], -[AC_MSG_CHECKING([whether to enable ptlrpc adaptive timeouts support]) -AC_ARG_ENABLE([adaptive_timeouts], - AC_HELP_STRING([--enable-adaptive-timeouts], - [enable ptlrpc adaptive timeouts support]), - [],[enable_adaptive_timeouts='no']) -AC_MSG_RESULT([$enable_adaptive_timeouts]) -if test x$enable_adaptive_timeouts == xyes; then - AC_DEFINE(HAVE_AT_SUPPORT, 1, [Enable adaptive timeouts support]) -fi -]) - -# -# LC_CONFIG_QUOTA -# -# whether to enable quota support -# -AC_DEFUN([LC_CONFIG_QUOTA], -[AC_MSG_CHECKING([whether to enable quota support]) -AC_ARG_ENABLE([quota], - AC_HELP_STRING([--enable-quota], - [enable quota support]), - [],[enable_quota='yes']) -AC_MSG_RESULT([$enable_quota]) -if test x$linux25 != xyes; then - enable_quota='no' -fi -if test x$enable_quota != xno; then - AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support]) -fi -]) - -AC_DEFUN([LC_QUOTA_READ], -[AC_MSG_CHECKING([if kernel supports quota_read]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> -],[ - struct super_operations sp; - void *i = (void *)sp.quota_read; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(KERNEL_SUPPORTS_QUOTA_READ, 1, [quota_read found]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_COOKIE_FOLLOW_LINK -# -# kernel 2.6.13+ ->follow_link returns a cookie -# - -AC_DEFUN([LC_COOKIE_FOLLOW_LINK], -[AC_MSG_CHECKING([if inode_operations->follow_link returns a cookie]) -LB_LINUX_TRY_COMPILE([ - #include <linux/fs.h> - #include <linux/namei.h> -],[ - struct dentry dentry; - struct nameidata nd; - - dentry.d_inode->i_op->put_link(&dentry, &nd, NULL); -],[ - AC_DEFINE(HAVE_COOKIE_FOLLOW_LINK, 1, [inode_operations->follow_link returns a cookie]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_FUNC_RCU -# -# kernels prior than 2.6.0(?) have no RCU supported; in kernel 2.6.5(SUSE), -# call_rcu takes three parameters. -# -AC_DEFUN([LC_FUNC_RCU], -[AC_MSG_CHECKING([if kernel have RCU supported]) -LB_LINUX_TRY_COMPILE([ - #include <linux/rcupdate.h> -],[],[ - AC_DEFINE(HAVE_RCU, 1, [have RCU defined]) - AC_MSG_RESULT([yes]) - - AC_MSG_CHECKING([if call_rcu takes three parameters]) - LB_LINUX_TRY_COMPILE([ - #include <linux/rcupdate.h> - ],[ - struct rcu_head rh; - call_rcu(&rh, (void (*)(struct rcu_head *))1, NULL); - ],[ - AC_DEFINE(HAVE_CALL_RCU_PARAM, 1, [call_rcu takes three parameters]) - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - ]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LC_CONFIGURE -# -# other configure checks -# -AC_DEFUN([LC_CONFIGURE], -[LC_CONFIG_OBD_BUFFER_SIZE - -# include/liblustre.h -AC_CHECK_HEADERS([asm/page.h sys/user.h sys/vfs.h stdint.h blkid/blkid.h]) - -# include/lustre/lustre_user.h -# See note there re: __ASM_X86_64_PROCESSOR_H -AC_CHECK_HEADERS([linux/fs.h linux/quota.h]) - -# liblustre/llite_lib.h -AC_CHECK_HEADERS([xtio.h file.h]) - -# liblustre/dir.c -AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h]) - -# liblustre/lutil.c -AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h]) -AC_CHECK_FUNCS([inet_ntoa]) - -# libsysio/src/readlink.c -LC_READLINK_SSIZE_T - -# utils/llverfs.c -AC_CHECK_HEADERS([ext2fs/ext2fs.h]) - -# check for -lz support -ZLIB="" -AC_CHECK_LIB([z], - [adler32], - [AC_CHECK_HEADERS([zlib.h], - [ZLIB="-lz" - AC_DEFINE([HAVE_ADLER], 1, - [support alder32 checksum type])], - [AC_MSG_WARN([No zlib-devel package found, - unable to use adler32 checksum])])], - [AC_MSG_WARN([No zlib package found, unable to use adler32 checksum])] -) -AC_SUBST(ZLIB) - -# Super safe df -AC_ARG_ENABLE([mindf], - AC_HELP_STRING([--enable-mindf], - [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]), - [],[]) -if test "$enable_mindf" = "yes" ; then - AC_DEFINE([MIN_DF], 1, [Report minimum OST free space]) -fi - -AC_ARG_ENABLE([fail_alloc], - AC_HELP_STRING([--disable-fail-alloc], - [disable randomly alloc failure]), - [],[enable_fail_alloc=yes]) -AC_MSG_CHECKING([whether to randomly failing memory alloc]) -AC_MSG_RESULT([$enable_fail_alloc]) -if test x$enable_fail_alloc != xno ; then - AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure]) -fi - -]) - -# -# LC_CONDITIONALS -# -# AM_CONDITIONALS for lustre -# -AC_DEFUN([LC_CONDITIONALS], -[AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes) -AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno) -AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes) -AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests) -AM_CONDITIONAL(CLIENT, test x$enable_client = xyes) -AM_CONDITIONAL(SERVER, test x$enable_server = xyes) -AM_CONDITIONAL(QUOTA, test x$enable_quota = xyes) -AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes) -AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes) -AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes) -]) - -# -# LC_CONFIG_FILES -# -# files that should be generated with AC_OUTPUT -# -AC_DEFUN([LC_CONFIG_FILES], -[AC_CONFIG_FILES([ -lustre/Makefile -lustre/autoMakefile -lustre/autoconf/Makefile -lustre/contrib/Makefile -lustre/doc/Makefile -lustre/include/Makefile -lustre/include/lustre_ver.h -lustre/include/linux/Makefile -lustre/include/lustre/Makefile -lustre/kernel_patches/targets/2.6-suse.target -lustre/kernel_patches/targets/2.6-vanilla.target -lustre/kernel_patches/targets/2.6-rhel4.target -lustre/kernel_patches/targets/2.6-rhel5.target -lustre/kernel_patches/targets/2.6-fc5.target -lustre/kernel_patches/targets/2.6-patchless.target -lustre/kernel_patches/targets/2.6-sles10.target -lustre/kernel_patches/targets/hp_pnnl-2.4.target -lustre/kernel_patches/targets/rh-2.4.target -lustre/kernel_patches/targets/rhel-2.4.target -lustre/kernel_patches/targets/suse-2.4.21-2.target -lustre/kernel_patches/targets/sles-2.4.target -lustre/ldlm/Makefile -lustre/liblustre/Makefile -lustre/liblustre/tests/Makefile -lustre/llite/Makefile -lustre/llite/autoMakefile -lustre/lov/Makefile -lustre/lov/autoMakefile -lustre/lvfs/Makefile -lustre/lvfs/autoMakefile -lustre/mdc/Makefile -lustre/mdc/autoMakefile -lustre/mds/Makefile -lustre/mds/autoMakefile -lustre/obdclass/Makefile -lustre/obdclass/autoMakefile -lustre/obdclass/linux/Makefile -lustre/obdecho/Makefile -lustre/obdecho/autoMakefile -lustre/obdfilter/Makefile -lustre/obdfilter/autoMakefile -lustre/osc/Makefile -lustre/osc/autoMakefile -lustre/ost/Makefile -lustre/ost/autoMakefile -lustre/mgc/Makefile -lustre/mgc/autoMakefile -lustre/mgs/Makefile -lustre/mgs/autoMakefile -lustre/ptlrpc/Makefile -lustre/ptlrpc/autoMakefile -lustre/quota/Makefile -lustre/quota/autoMakefile -lustre/scripts/Makefile -lustre/scripts/version_tag.pl -lustre/tests/Makefile -lustre/utils/Makefile -]) -case $lb_target_os in - darwin) - AC_CONFIG_FILES([ lustre/obdclass/darwin/Makefile ]) - ;; -esac - -]) diff --git a/lustre/autoconf/lustre-version.ac b/lustre/autoconf/lustre-version.ac deleted file mode 100644 index f2fcd810a8..0000000000 --- a/lustre/autoconf/lustre-version.ac +++ /dev/null @@ -1,36 +0,0 @@ -m4_define([LUSTRE_MAJOR],[1]) -m4_define([LUSTRE_MINOR],[6]) -m4_define([LUSTRE_PATCH],[4]) -m4_define([LUSTRE_FIX],[56]) -# Note: we're starting prerelease versions at 50 this time. - -dnl # liblustre delta is 0.0.1.32 , next version with fixes is ok, but -dnl # after following release candidate/beta would spill this warning already. -m4_define([LUSTRE_VER_ALLOWED_OFFSET],["OBD_OCD_VERSION(0,0,1,32)"]) -m4_define([LUSTRE_LIB_VER_OFFSET_WARN],["OBD_OCD_VERSION(0,0,1,32)"]) - -dnl # linux lustre delta is 0.2.0.0 , next major release version is ok -m4_define([LUSTRE_CLI_VER_OFFSET_WARN],["OBD_OCD_VERSION(0,2,0,0)"]) - -dnl # User editable part ends here. ----------------------------------------- - -m4_pattern_allow(AC_LUSTRE) -m4_define([LUSTRE_VERSION],m4_if(LUSTRE_FIX,[0],LUSTRE_MAJOR.LUSTRE_MINOR.LUSTRE_PATCH,LUSTRE_MAJOR.LUSTRE_MINOR.LUSTRE_PATCH.LUSTRE_FIX)) - -[AC_LUSTRE_MAJOR]=LUSTRE_MAJOR -[AC_LUSTRE_MINOR]=LUSTRE_MINOR -[AC_LUSTRE_PATCH]=LUSTRE_PATCH -[AC_LUSTRE_FIX]=LUSTRE_FIX -[AC_LUSTRE_VERSION_STRING]=LUSTRE_VERSION -[AC_LUSTRE_VER_ALLOWED_OFFSET]=LUSTRE_VER_ALLOWED_OFFSET -[AC_LUSTRE_LIB_VER_OFFSET_WARN]=LUSTRE_LIB_VER_OFFSET_WARN -[AC_LUSTRE_CLI_VER_OFFSET_WARN]=LUSTRE_CLI_VER_OFFSET_WARN - -AC_SUBST([AC_LUSTRE_MAJOR]) -AC_SUBST([AC_LUSTRE_MINOR]) -AC_SUBST([AC_LUSTRE_PATCH]) -AC_SUBST([AC_LUSTRE_FIX]) -AC_SUBST([AC_LUSTRE_VERSION_STRING]) -AC_SUBST([AC_LUSTRE_VER_ALLOWED_OFFSET]) -AC_SUBST([AC_LUSTRE_LIB_VER_OFFSET_WARN]) -AC_SUBST([AC_LUSTRE_CLI_VER_OFFSET_WARN]) diff --git a/lustre/conf/.cvsignore b/lustre/conf/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/lustre/conf/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/lustre/conf/Makefile.am b/lustre/conf/Makefile.am deleted file mode 100644 index 978cf293c1..0000000000 --- a/lustre/conf/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -EXTRA_DIST = lustre.dtd lustre.schema slapd-lustre.conf lustre2ldif.xsl top.ldif -ldapconfdir = $(sysconfdir)/openldap -ldapschemadir = $(sysconfdir)/openldap/schema - -if UTILS -ldapconf_SCRIPTS = slapd-lustre.conf -ldapschema_SCRIPTS = lustre.schema -pkgdata_DATA = top.ldif lustre2ldif.xsl -endif diff --git a/lustre/conf/lustre.dtd b/lustre/conf/lustre.dtd deleted file mode 100644 index 360f4a03b4..0000000000 --- a/lustre/conf/lustre.dtd +++ /dev/null @@ -1,145 +0,0 @@ -<!-- Lustre Management DTD --> - -<!-- basic entities --> -<!ENTITY % object.content "(#PCDATA)"> -<!ENTITY % object.attr " - name CDATA #REQUIRED - uuid CDATA #REQUIRED"> - -<!ENTITY % objref.content "(#PCDATA)"> -<!ENTITY % objref.attr "uuidref CDATA #REQUIRED"> - -<!-- main elements --> -<!ELEMENT lustre (node | profile | mountpoint | ldlm | ptlrpc |echoclient | - mds | mdsdev| ost | osd | lov | lovconfig)*> -<!ATTLIST lustre version CDATA #REQUIRED> - -<!ELEMENT node (network | routetbl | profile_ref | timeout | - lustreUpcall | portalsUpcall | ptldebug | subsystem)*> -<!ATTLIST node %object.attr; - router CDATA #IMPLIED> - -<!ELEMENT network (nid | port | route_tbl | sendmem | recvmem)*> -<!ATTLIST network %object.attr; - nettype (tcp | elan | gm) 'tcp'> - -<!ELEMENT routetbl (route)*> -<!ATTLIST routetbl %object.attr;> -<!ELEMENT route %object.content;> -<!ATTLIST route type (elan | tcp | gm) #REQUIRED - gw CDATA #REQUIRED - lo CDATA #REQUIRED - hi CDATA #IMPLIED > - -<!ELEMENT profile (ldlm_ref | ptlrpc_ref | network_ref | routetbl_ref | - osd_ref | mdsdev_ref | lovconfig_ref| - echoclient_ref | mountpoint_ref)*> -<!ATTLIST profile %object.attr;> - -<!ELEMENT mountpoint path #REQUIRED - clientoptions #REQUIRED > - filesystem_ref #REQUIRED > -<!ATTLIST mountpoint %object.attr;> - -<!ELEMENT echoclient (obd_ref)> -<!ATTLIST echoclient %object.attr;> - -<!ELEMENT ldlm EMPTY> -<!ATTLIST ldlm %object.attr;> - -<!ELEMENT ptlrpc EMPTY> -<!ATTLIST ptlrpc %object.attr;> - -<!ELEMENT osd (fstype | devpath | devsize | autoformat | - target_ref | node_ref | journalsize | mkfsoptions | mountfsoptions)*> -<!ATTLIST osd %object.attr; - osdtype (obdfilter | obdecho) 'obdfilter'> - -<!ELEMENT ost (active_ref | group)*> -<!ATTLIST ost %object.attr; - failover ( 1 | 0 ) #IMPLIED> - -<!ELEMENT filesystem mds_ref #REQUIRED - obd_ref #REQUIRED> -<!ATTLIST filesystem %object.attr;> - -<!ELEMENT mds (active_ref | lovconfig_ref | group)*> -<!ATTLIST mds %object.attr; - failover ( 1 | 0 ) #IMPLIED> - -<!ELEMENT mdsdev (fstype | devpath | devsize | autoformat | - target_ref | node_ref | journalsize | mkfsoptions | mountfsoptions)*> -<!ATTLIST mdsdev %object.attr;> - -<!ELEMENT lov (mds_ref |(obd_ref)+)*> -<!ATTLIST lov %object.attr; - stripesize CDATA #REQUIRED - stripecount CDATA #REQUIRED - stripeoffset CDATA #IMPLIED - stripepattern CDATA #REQUIRED> - -<!ELEMENT lovconfig (lov_ref)> -<!ATTLIST lovconfig %object.attr;> - -<!-- basic elements --> -<!ELEMENT recoveryUpcall %object.content;> -<!ELEMENT timeout %object.content;> -<!ELEMENT ptldebug %object.content;> -<!ELEMENT subsystem %object.content;> -<!ELEMENT journalsize %object.content;> -<!ELEMENT mkfsoptions %object.content;> -<!ELEMENT mountfsoptions %object.content;> -<!ELEMENT clientoptions %object.content;> -<!ELEMENT fstype %object.content;> -<!ELEMENT nid %object.content;> -<!ELEMENT port %object.content;> -<!ELEMENT sendmem %object.content;> -<!ELEMENT recvmem %object.content;> -<!ELEMENT autoformat %object.content;> -<!ELEMENT activetarget %object.content;> -<!ELEMENT devpath %object.content;> -<!ELEMENT devsize %object.content;> -<!ELEMENT path %object.content;> -<!ELEMENT fileset %object.content;> - -<!-- object reference tag elements --> -<!ELEMENT network_ref %objref.content;> -<!ATTLIST network_ref %objref.attr;> -<!ELEMENT routetbl_ref %objref.content;> -<!ATTLIST routetbl_ref %objref.attr;> -<!ELEMENT node_ref %objref.content;> -<!ATTLIST node_ref %objref.attr;> -<!ELEMENT profile_ref %objref.content;> -<!ATTLIST profile_ref %objref.attr;> -<!ELEMENT osd_ref %objref.content;> -<!ATTLIST osd_ref %objref.attr;> -<!ELEMENT mds_ref %objref.content;> -<!ATTLIST mds_ref %objref.attr;> -<!ELEMENT mdsdev_ref %objref.content;> -<!ATTLIST mdsdev_ref %objref.attr;> -<!ELEMENT obd_ref %objref.content;> -<!ATTLIST obd_ref %objref.attr;> -<!ELEMENT ost_ref %objref.content;> -<!ATTLIST ost_ref %objref.attr;> -<!ELEMENT active_ref %objref.content;> -<!ATTLIST active_ref %objref.attr;> -<!ELEMENT target_ref %objref.content;> -<!ATTLIST target_ref %objref.attr;> -<!ELEMENT lov_ref %objref.content;> -<!ATTLIST lov_ref %objref.attr;> -<!ELEMENT lovconfig_ref %objref.content;> -<!ATTLIST lovconfig_ref %objref.attr;> -<!ELEMENT mountpoint_ref %objref.content;> -<!ATTLIST mountpoint_ref %objref.attr;> -<!ELEMENT filesystem_ref %objref.content;> -<!ATTLIST filesystem_ref %objref.attr;> -<!ELEMENT echoclient_ref %objref.content;> -<!ATTLIST echoclient_ref %objref.attr;> -<!ELEMENT failover_ref %objref.content;> -<!ATTLIST failover_ref %objref.attr;> -<!ELEMENT ldlm_ref %objref.content;> -<!ATTLIST ldlm_ref %objref.attr;> -<!ELEMENT ptlrpc_ref %objref.content;> -<!ATTLIST ptlrpc_ref %objref.attr;> - - diff --git a/lustre/conf/lustre2ldif.xsl b/lustre/conf/lustre2ldif.xsl deleted file mode 100644 index 58b0649136..0000000000 --- a/lustre/conf/lustre2ldif.xsl +++ /dev/null @@ -1,308 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> -<output omit-xml-declaration="yes" /> -<strip-space elements="*"/> -<param name="config">fs=lustre</param> -<variable name="basedn">config=<value-of select="$config"/>,fs=lustre</variable> - -<template match="lustre"> -dn: <value-of select="$basedn"/> -uuid: CONFIG_UUID -objectClass: LUSTRECONFIG -config: <value-of select="$config"/> -version: <value-of select="@version"/> -<text> -</text><apply-templates/> -</template> - -<template match="node"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: NODE -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -networkRef: <value-of select="network/@uuid"/> -<for-each select="profile_ref"> -profileRef: <value-of select="@uuidref"/> -</for-each> -<if test="timeout"> -timeout: <value-of select="timeout"/> -</if> -<if test="lustreUpcall"> -lustreUpcall: <value-of select="lustreUpcall"/> -</if> -<if test="portalsUpcall"> -portalsUpcall: <value-of select="portalsUpcall"/> -</if> -<if test="ptldebug"> -ptldebug: <value-of select="ptldebug"/> -</if> -<if test="subsystem"> -subsystem: <value-of select="subsystem"/> -</if> -<text> -</text> -<for-each select="network"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: NETWORK -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -nettype: <value-of select="@nettype"/> -nid: <value-of select="nid"/> -<if test="port"> -port: <value-of select="port"/> -</if> -<text> -</text> -</for-each> -</template> - -<template match="profile"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: PROFILE -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/><apply-templates/> -<text> -</text> -</template> - -<template match="network"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: NETWORK -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -nettype: <value-of select="@nettype"/> -nid: <value-of select="nid"/> -<if test="port"> -port: <value-of select="port"/> -</if> -<text> -</text> -</template> - - -<template match="mds"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: MDS -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -activeRef: <value-of select="active_ref/@uuidref"/> -<if test="lovconfig_ref"> -lovconfigRef: <value-of select="lovconfig_ref/@uuidref"/> -</if> -<if test="filesystem_ref"> -filesystemRef: <value-of select="filesystem_ref/@uuidref"/> -</if> -<if test="@failover"> -failover: <value-of select="@failover"/> -</if> -<if test="group"> -group: <value-of select="group"/> -</if> -<text> -</text> -</template> - -<template match="mdsdev"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: MDSDEV -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -<if test="fstype"> -fstype: <value-of select="fstype"/> -</if> -<if test="autoformat"> -autoformat: <value-of select="autoformat"/> -</if> -<if test="devpath"> -devpath: <value-of select="devpath"/> -</if> -<if test="devsize"> -devsize: <value-of select="devsize"/> -</if> -<if test="journalsize"> -journalsize: <value-of select="journalsize"/> -</if> -<if test="mkfsoptions"> -mkfsoptions: <value-of select="mkfsoptions"/> -</if> -<if test="mountfsoptions"> -mountfsoptions: <value-of select="mountfsoptions"/> -</if> -nodeRef: <value-of select="node_ref/@uuidref"/> -targetRef: <value-of select="target_ref/@uuidref"/> -<text> -</text> -</template> - -<template match="lov"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: LOV -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -mdsRef: <value-of select="mds_ref/@uuidref"/> -stripepattern: <value-of select="@stripepattern"/> -stripesize: <value-of select="@stripesize"/> -stripecount: <value-of select="@stripecount"/><apply-templates/> -<text> -</text> -</template> - -<template match="lovconfig"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: LOVCONFIG -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/><apply-templates/> -<text> -</text> -</template> - -<template match="osd"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: OSD -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -nodeRef: <value-of select="node_ref/@uuidref"/> -targetRef: <value-of select="target_ref/@uuidref"/> -osdtype: <value-of select="@osdtype"/> -<if test="fstype"> -fstype: <value-of select="fstype"/> -</if> -<if test="autoformat"> -autoformat: <value-of select="autoformat"/> -</if> -<if test="devpath"> -devpath: <value-of select="devpath"/> -</if> -<if test="devsize"> -devsize: <value-of select="devsize"/> -</if> -<if test="journalsize"> -journalsize: <value-of select="journalsize"/> -</if> -<if test="mkfsoptions"> -mkfsoptions: <value-of select="mkfsoptions"/> -</if> -<if test="mountfsoptions"> -mountfsoptions: <value-of select="mountfsoptions"/> -</if> -<text> -</text> -</template> - -<template match="ost"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: OST -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -activeRef: <value-of select="active_ref/@uuidref"/> -<if test="@failover"> -failover: <value-of select="@failover"/> -</if> -<if test="group"> -group: <value-of select="group"/> -</if> -<text> -</text> -</template> - -<template match="filesystem"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: FILESYSTEM -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/><apply-templates/> -<text> -</text> -</template> - -<template match="mountpoint"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: MOUNTPOINT -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/><apply-templates/> -<if test="clientoptions"> -clientoptions: <value-of select="clientoptions"/> -</if> -<text> -</text> -</template> - -<template match="echoclient"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: ECHOCLIENT -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/><apply-templates/> -<text> -</text> -</template> - -<template match="ldlm"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: LDLM -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -<text> -</text> -</template> - -<template match="ptlrpc"> -dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/> -objectClass: PTLRPC -lustreName: <value-of select="@name"/> -uuid: <value-of select="@uuid"/> -<text> -</text> -</template> - -<template match="ldlm_ref"> -ldlmRef: <value-of select="@uuidref"/> -</template> - -<template match="ptlrpc_ref"> -ptlrpcRef: <value-of select="@uuidref"/> -</template> - -<template match="obd_ref"> -obdRef: <value-of select="@uuidref"/> -</template> - -<template match="osd_ref"> -osdRef: <value-of select="@uuidref"/> -</template> - -<template match="ost_ref"> -ostRef: <value-of select="@uuidref"/> -</template> - -<template match="network_ref"> -networkRef: <value-of select="@uuidref"/> -</template> - -<template match="mds_ref"> -mdsRef: <value-of select="@uuidref"/> -</template> - -<template match="mdsdev_ref"> -mdsdevRef: <value-of select="@uuidref"/> -</template> - -<template match="mountpoint_ref"> -mountpointRef: <value-of select="@uuidref"/> -</template> - -<template match="filesystem_ref"> -filesystemRef: <value-of select="@uuidref"/> -</template> - -<template match="echoclient_ref"> -echoclientRef: <value-of select="@uuidref"/> -</template> - -<template match="lov_ref"> -lovRef: <value-of select="@uuidref"/> -</template> - -<template match="path"> -path: <value-of select="."/> -</template> - -</stylesheet> diff --git a/lustre/conf/modules.conf b/lustre/conf/modules.conf deleted file mode 100644 index a5bdefa692..0000000000 --- a/lustre/conf/modules.conf +++ /dev/null @@ -1,8 +0,0 @@ -# sample modules.conf for autoloading lustre modules on zeroconf clients - -add below kptlrouter portals -#add below ksocknal kptlrouter -#add below kqswnal kptlrouter -add below ptlrpc ksocknal -add below llite lov osc -alias lustre llite diff --git a/lustre/conf/slapd-lustre.conf b/lustre/conf/slapd-lustre.conf deleted file mode 100644 index b93b411244..0000000000 --- a/lustre/conf/slapd-lustre.conf +++ /dev/null @@ -1,11 +0,0 @@ -####################################################################### -# lustre ldap config database -####################################################################### - -database ldbm -suffix "fs=lustre" -rootdn "cn=Manager,fs=lustre" -include /etc/openldap/schema/lustre.schema -rootpw secret -directory /var/lib/ldap/lustre -index objectClass,uuid eq diff --git a/lustre/conf/top.ldif b/lustre/conf/top.ldif deleted file mode 100644 index d0cfdac4cf..0000000000 --- a/lustre/conf/top.ldif +++ /dev/null @@ -1,4 +0,0 @@ -dn: fs=lustre -fs:lustre -objectClass: lustre -lustreDesc: Lustre Config diff --git a/lustre/contrib/.cvsignore b/lustre/contrib/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/lustre/contrib/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/lustre/contrib/Makefile.am b/lustre/contrib/Makefile.am deleted file mode 100644 index 5a8e66c843..0000000000 --- a/lustre/contrib/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# Contributions Makefile - -EXTRA_DIST = mpich-*.patch -pkgdata_DATA = $(EXTRA_DIST) - diff --git a/lustre/contrib/README b/lustre/contrib/README deleted file mode 100644 index 0741258310..0000000000 --- a/lustre/contrib/README +++ /dev/null @@ -1,6 +0,0 @@ -The files in this directory are user-contributed and are not supported by -CFS in any way. - -. mpich2-1.0.3.patch & adio-lustre-mpich2-v03.patch : came from weikuan ORNL - (wyu@ornl.gov) and you can get detail information http://ft.ornl.gov/projects/io/ - diff --git a/lustre/contrib/adio-lustre-mpich2-v03.patch b/lustre/contrib/adio-lustre-mpich2-v03.patch deleted file mode 100644 index 250c7afb00..0000000000 --- a/lustre/contrib/adio-lustre-mpich2-v03.patch +++ /dev/null @@ -1,1221 +0,0 @@ -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre.c romio-ornl/adio/ad_lustre/ad_lustre.c ---- romio-orig/adio/ad_lustre/ad_lustre.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre.c 2007-11-10 07:13:32.554840000 -0500 -@@ -0,0 +1,34 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * Copyright (C) 2001 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#include "ad_lustre.h" -+ -+struct ADIOI_Fns_struct ADIO_LUSTRE_operations = { -+ ADIOI_LUSTRE_Open, /* Open */ -+ ADIOI_LUSTRE_ReadContig, /* ReadContig */ -+ ADIOI_LUSTRE_WriteContig, /* WriteContig */ -+ ADIOI_LUSTRE_ReadStridedColl, /* ReadStridedColl */ -+ ADIOI_LUSTRE_WriteStridedColl, /* WriteStridedColl */ -+ ADIOI_GEN_SeekIndividual, /* SeekIndividual */ -+ ADIOI_LUSTRE_Fcntl, /* Fcntl */ -+ ADIOI_LUSTRE_SetInfo, /* SetInfo */ -+ ADIOI_GEN_ReadStrided, /* ReadStrided */ -+ ADIOI_GEN_WriteStrided, /* WriteStrided */ -+ ADIOI_LUSTRE_Close, /* Close */ -+ ADIOI_GEN_IreadContig, /* IreadContig */ -+ ADIOI_GEN_IwriteContig, /* IwriteContig */ -+ ADIOI_GEN_IODone, /* ReadDone */ -+ ADIOI_GEN_IODone, /* WriteDone */ -+ ADIOI_GEN_IOComplete, /* ReadComplete */ -+ ADIOI_GEN_IOComplete, /* WriteComplete */ -+ ADIOI_GEN_IreadStrided, /* IreadStrided */ -+ ADIOI_GEN_IwriteStrided, /* IwriteStrided */ -+ ADIOI_GEN_Flush, /* Flush */ -+ ADIOI_GEN_Resize, /* Resize */ -+ ADIOI_GEN_Delete, /* Delete */ -+}; -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_close.c romio-ornl/adio/ad_lustre/ad_lustre_close.c ---- romio-orig/adio/ad_lustre/ad_lustre_close.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre_close.c 2007-11-10 07:13:32.557840000 -0500 -@@ -0,0 +1,40 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#include "ad_lustre.h" -+ -+#ifdef PROFILE -+#include "mpe.h" -+#endif -+ -+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code) -+{ -+ int err, derr=0; -+ static char myname[] = "ADIOI_LUSTRE_CLOSE"; -+ -+#ifdef PROFILE -+ MPE_Log_event(9, 0, "start close"); -+#endif -+ -+ err = close(fd->fd_sys); -+ -+#ifdef PROFILE -+ MPE_Log_event(10, 0, "end close"); -+#endif -+ -+ fd->fd_sys = -1; -+ -+ if (err == -1 || derr == -1) { -+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, -+ myname, __LINE__, MPI_ERR_IO, -+ "**io", -+ "**io %s", strerror(errno)); -+ } -+ else *error_code = MPI_SUCCESS; -+} -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_fcntl.c romio-ornl/adio/ad_lustre/ad_lustre_fcntl.c ---- romio-orig/adio/ad_lustre/ad_lustre_fcntl.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre_fcntl.c 2007-11-10 07:13:32.561833000 -0500 -@@ -0,0 +1,97 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#include "ad_lustre.h" -+#include "adio_extern.h" -+ -+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code) -+{ -+ int i, ntimes; -+ ADIO_Offset curr_fsize, alloc_size, size, len, done; -+ ADIO_Status status; -+ char *buf; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_FCNTL"; -+#endif -+ -+ switch(flag) { -+ case ADIO_FCNTL_GET_FSIZE: -+ fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END); -+ if (fd->fp_sys_posn != -1) -+ lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); -+ if (fcntl_struct->fsize == -1) { -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, myname, __LINE__, -+ MPI_ERR_IO, "**io", "**io %s", strerror(errno)); -+ } -+ else *error_code = MPI_SUCCESS; -+ break; -+ -+ case ADIO_FCNTL_SET_DISKSPACE: -+ /* will be called by one process only */ -+ /* On file systems with no preallocation function, I have to -+ explicitly write -+ to allocate space. Since there could be holes in the file, -+ I need to read up to the current file size, write it back, -+ and then write beyond that depending on how much -+ preallocation is needed. -+ read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */ -+ -+ curr_fsize = lseek(fd->fd_sys, 0, SEEK_END); -+ alloc_size = fcntl_struct->diskspace; -+ -+ size = ADIOI_MIN(curr_fsize, alloc_size); -+ -+ ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; -+ buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ); -+ done = 0; -+ -+ for (i=0; i<ntimes; i++) { -+ len = ADIOI_MIN(size-done, ADIOI_PREALLOC_BUFSZ); -+ ADIO_ReadContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done, -+ &status, error_code); -+ if (*error_code != MPI_SUCCESS) { -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, myname, __LINE__, -+ MPI_ERR_IO, "**io", "**io %s", strerror(errno)); -+ return; -+ } -+ ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, -+ done, &status, error_code); -+ if (*error_code != MPI_SUCCESS) return; -+ done += len; -+ } -+ -+ if (alloc_size > curr_fsize) { -+ memset(buf, 0, ADIOI_PREALLOC_BUFSZ); -+ size = alloc_size - curr_fsize; -+ ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; -+ for (i=0; i<ntimes; i++) { -+ len = ADIOI_MIN(alloc_size-done, ADIOI_PREALLOC_BUFSZ); -+ ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, -+ done, &status, error_code); -+ if (*error_code != MPI_SUCCESS) return; -+ done += len; -+ } -+ } -+ ADIOI_Free(buf); -+ if (fd->fp_sys_posn != -1) -+ lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); -+ *error_code = MPI_SUCCESS; -+ break; -+ -+ case ADIO_FCNTL_SET_ATOMICITY: -+ fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1; -+ *error_code = MPI_SUCCESS; -+ break; -+ -+ default: -+ FPRINTF(stderr, "Unknown flag passed to ADIOI_LUSTRE_Fcntl\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+} -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre.h romio-ornl/adio/ad_lustre/ad_lustre.h ---- romio-orig/adio/ad_lustre/ad_lustre.h 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre.h 2007-11-10 07:13:32.565828000 -0500 -@@ -0,0 +1,34 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#ifndef AD_UNIX_INCLUDE -+#define AD_UNIX_INCLUDE -+ -+/* temp*/ -+#define HAVE_ASM_TYPES_H 1 -+ -+#include <unistd.h> -+#include <linux/types.h> -+#include <fcntl.h> -+#include <sys/ioctl.h> -+#include "lustre/lustre_user.h" -+#include "adio.h" -+/*#include "adioi.h"*/ -+ -+#ifdef HAVE_SIGNAL_H -+#include <signal.h> -+#endif -+ -+#ifdef HAVE_AIO_H -+#include <aio.h> -+#ifdef HAVE_SYS_AIO_H -+#include <sys/aio.h> -+#endif -+#endif /* End of HAVE_SYS_AIO_H */ -+ -+#endif /* End of AD_UNIX_INCLUDE */ -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_hints.c romio-ornl/adio/ad_lustre/ad_lustre_hints.c ---- romio-orig/adio/ad_lustre/ad_lustre_hints.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre_hints.c 2007-11-10 07:13:32.569824000 -0500 -@@ -0,0 +1,122 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) -+{ -+ char *value, *value_in_fd; -+ int flag, tmp_val[3], str_factor=-1, str_unit=0, start_iodev=-1; -+ struct lov_user_md lum = { 0 }; -+ int err, myrank, fd_sys, perm, amode, old_mask; -+ -+ if ( (fd->info) == MPI_INFO_NULL) { -+ /* This must be part of the open call. can set striping parameters -+ if necessary. */ -+ MPI_Info_create(&(fd->info)); -+ -+ /* has user specified striping or server buffering parameters -+ and do they have the same value on all processes? */ -+ if (users_info != MPI_INFO_NULL) { -+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); -+ -+ MPI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ str_unit=atoi(value); -+ } -+ -+ MPI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ str_factor=atoi(value); -+ } -+ -+ MPI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ start_iodev=atoi(value); -+ } -+ -+ ADIOI_Free(value); -+ } -+ -+ MPI_Comm_rank(fd->comm, &myrank); -+ if (myrank == 0) { -+ tmp_val[0] = str_factor; -+ tmp_val[1] = str_unit; -+ tmp_val[2] = start_iodev; -+ } -+ MPI_Bcast(tmp_val, 3, MPI_INT, 0, fd->comm); -+ -+ if (tmp_val[0] != str_factor -+ || tmp_val[1] != str_unit -+ || tmp_val[2] != start_iodev) { -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: All keys" -+ "-striping_factor:striping_unit:start_iodevice " -+ "need to be identical across all processes\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } else if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) { -+ /* if user has specified striping info, process 0 tries to set it */ -+ if (!myrank) { -+ if (fd->perm == ADIO_PERM_NULL) { -+ old_mask = umask(022); -+ umask(old_mask); -+ perm = old_mask ^ 0666; -+ } -+ else perm = fd->perm; -+ -+ amode = 0; -+ if (fd->access_mode & ADIO_CREATE) -+ amode = amode | O_CREAT; -+ if (fd->access_mode & ADIO_RDONLY) -+ amode = amode | O_RDONLY; -+ if (fd->access_mode & ADIO_WRONLY) -+ amode = amode | O_WRONLY; -+ if (fd->access_mode & ADIO_RDWR) -+ amode = amode | O_RDWR; -+ if (fd->access_mode & ADIO_EXCL) -+ amode = amode | O_EXCL; -+ -+ /* we need to create file so ensure this is set */ -+ amode = amode | O_LOV_DELAY_CREATE | O_CREAT; -+ -+ fd_sys = open(fd->filename, amode, perm); -+ if (fd_sys == -1) { -+ if (errno != EEXIST) -+ fprintf(stderr, -+ "Failure to open file %s %d %d\n",strerror(errno), amode, perm); -+ } else { -+ lum.lmm_magic = LOV_USER_MAGIC; -+ lum.lmm_pattern = 0; -+ lum.lmm_stripe_size = str_unit; -+ lum.lmm_stripe_count = str_factor; -+ lum.lmm_stripe_offset = start_iodev; -+ -+ err = ioctl(fd_sys, LL_IOC_LOV_SETSTRIPE, &lum); -+ if (err == -1 && errno != EEXIST) { -+ fprintf(stderr, "Failure to set stripe info %s \n", strerror(errno)); -+ } -+ close(fd_sys); -+ } -+ } /* End of striping parameters validation */ -+ } -+ -+ MPI_Barrier(fd->comm); -+ /* set the values for collective I/O and data sieving parameters */ -+ ADIOI_GEN_SetInfo(fd, users_info, error_code); -+ } else { -+ /* The file has been opened previously and fd->fd_sys is a valid -+ file descriptor. cannot set striping parameters now. */ -+ -+ /* set the values for collective I/O and data sieving parameters */ -+ ADIOI_GEN_SetInfo(fd, users_info, error_code); -+ } -+ -+ *error_code = MPI_SUCCESS; -+} -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_open.c romio-ornl/adio/ad_lustre/ad_lustre_open.c ---- romio-orig/adio/ad_lustre/ad_lustre_open.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre_open.c 2007-11-10 08:22:01.202750000 -0500 -@@ -0,0 +1,120 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code) -+{ -+ int perm, old_mask, amode; -+ struct lov_user_md lum = { 0 }; -+ char *value; -+ -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_OPEN"; -+#endif -+ -+ if (fd->perm == ADIO_PERM_NULL) { -+ old_mask = umask(022); -+ umask(old_mask); -+ perm = old_mask ^ 0666; -+ } -+ else perm = fd->perm; -+ -+ amode = 0; -+ if (fd->access_mode & ADIO_CREATE) -+ amode = amode | O_CREAT; -+ if (fd->access_mode & ADIO_RDONLY) -+ amode = amode | O_RDONLY; -+ if (fd->access_mode & ADIO_WRONLY) -+ amode = amode | O_WRONLY; -+ if (fd->access_mode & ADIO_RDWR) -+ amode = amode | O_RDWR; -+ if (fd->access_mode & ADIO_EXCL) -+ amode = amode | O_EXCL; -+ -+ fd->fd_sys = open(fd->filename, amode, perm); -+ -+ if (fd->fd_sys != -1) { -+ int err; -+ -+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); -+ -+ /* get file striping information and set it in info */ -+ lum.lmm_magic = LOV_USER_MAGIC; -+ err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *) &lum); -+ -+ if (!err) { -+ sprintf(value, "%d", lum.lmm_stripe_size); -+ MPI_Info_set(fd->info, "striping_unit", value); -+ -+ sprintf(value, "%d", lum.lmm_stripe_count); -+ MPI_Info_set(fd->info, "striping_factor", value); -+ -+ sprintf(value, "%d", lum.lmm_stripe_offset); -+ MPI_Info_set(fd->info, "start_iodevice", value); -+ } -+ ADIOI_Free(value); -+ -+ if (fd->access_mode & ADIO_APPEND) -+ fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); -+ } -+ -+ if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND)) -+ fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); -+ -+ /* --BEGIN ERROR HANDLING-- */ -+ if (fd->fd_sys == -1) { -+ if (errno == ENAMETOOLONG) -+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, myname, -+ __LINE__, MPI_ERR_BAD_FILE, -+ "**filenamelong", -+ "**filenamelong %s %d", -+ fd->filename, -+ strlen(fd->filename)); -+ else if (errno == ENOENT) -+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, myname, -+ __LINE__, MPI_ERR_NO_SUCH_FILE, -+ "**filenoexist", -+ "**filenoexist %s", -+ fd->filename); -+ else if (errno == ENOTDIR || errno == ELOOP) -+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, -+ myname, __LINE__, -+ MPI_ERR_BAD_FILE, -+ "**filenamedir", -+ "**filenamedir %s", -+ fd->filename); -+ else if (errno == EACCES) { -+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, myname, -+ __LINE__, MPI_ERR_ACCESS, -+ "**fileaccess", -+ "**fileaccess %s", -+ fd->filename ); -+ } -+ else if (errno == EROFS) { -+ /* Read only file or file system and write access requested */ -+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, myname, -+ __LINE__, MPI_ERR_READ_ONLY, -+ "**ioneedrd", 0 ); -+ } -+ else { -+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, myname, -+ __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ } -+ } -+ /* --END ERROR HANDLING-- */ -+ else *error_code = MPI_SUCCESS; -+ -+} -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c romio-ornl/adio/ad_lustre/ad_lustre_rdcoll.c ---- romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre_rdcoll.c 2007-11-10 07:13:32.577816000 -0500 -@@ -0,0 +1,18 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_rwcontig.c romio-ornl/adio/ad_lustre/ad_lustre_rwcontig.c ---- romio-orig/adio/ad_lustre/ad_lustre_rwcontig.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre_rwcontig.c 2007-11-10 07:13:32.581814000 -0500 -@@ -0,0 +1,85 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#include "ad_lustre.h" -+ -+static void ADIOI_LUSTRE_IOContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, -+ int io_mode, int *error_code); -+ -+static void ADIOI_LUSTRE_IOContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, -+ int io_mode, int *error_code) -+{ -+ int err=-1, datatype_size, len; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_IOCONTIG"; -+#endif -+ -+ MPI_Type_size(datatype, &datatype_size); -+ len = datatype_size * count; -+ -+ if (file_ptr_type == ADIO_INDIVIDUAL) { -+ offset = fd->fp_ind; -+ } -+ -+ if (fd->fp_sys_posn != offset) { -+ err = lseek(fd->fd_sys, offset, SEEK_SET); -+ if (err == -1) goto ioerr; -+ } -+ -+ if (io_mode) -+ err = write(fd->fd_sys, buf, len); -+ else -+ err = read(fd->fd_sys, buf, len); -+ -+ if (err == -1) goto ioerr; -+ fd->fp_sys_posn = offset + err; -+ -+ if (file_ptr_type == ADIO_INDIVIDUAL) { -+ fd->fp_ind += err; -+ } -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (status) MPIR_Status_set_bytes(status, datatype, err); -+#endif -+ *error_code = MPI_SUCCESS; -+ -+ioerr: -+ /* --BEGIN ERROR HANDLING-- */ -+ if (err == -1) { -+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, -+ MPIR_ERR_RECOVERABLE, -+ myname, __LINE__, -+ MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ fd->fp_sys_posn = -1; -+ return; -+ } -+ /* --END ERROR HANDLING-- */ -+} -+ -+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int *error_code) -+{ -+ ADIOI_LUSTRE_IOContig(fd, buf, count, -+ datatype, file_ptr_type, -+ offset, status, 1, error_code); -+} -+ -+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int *error_code) -+{ -+ ADIOI_LUSTRE_IOContig(fd, buf, count, -+ datatype, file_ptr_type, -+ offset, status, 0, error_code); -+} -diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c romio-ornl/adio/ad_lustre/ad_lustre_wrcoll.c ---- romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/ad_lustre_wrcoll.c 2007-11-10 07:13:32.585808000 -0500 -@@ -0,0 +1,18 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -ruNp romio-orig/adio/ad_lustre/Makefile.in romio-ornl/adio/ad_lustre/Makefile.in ---- romio-orig/adio/ad_lustre/Makefile.in 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/Makefile.in 2007-11-10 07:13:32.589807000 -0500 -@@ -0,0 +1,49 @@ -+CC = @CC@ -+AR = @AR@ -+RANLIB = @RANLIB@ -+LIBNAME = @LIBNAME@ -+srcdir = @srcdir@ -+CC_SHL = @CC_SHL@ -+SHLIBNAME = @SHLIBNAME@ -+ -+INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include -I../../include -I${srcdir}/../../../../include -I../../../../include -+CFLAGS = @CPPFLAGS@ @CFLAGS@ $(INCLUDE_DIR) -+ -+top_builddir = @master_topbuild_dir@ -+LIBTOOL = @LIBTOOL@ -+C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR) -+ -+@VPATH@ -+ -+AD_LUSTRE_OBJECTS = ad_lustre.o ad_lustre_open.o \ -+ ad_lustre_rwcontig.o \ -+ ad_lustre_wrcoll.o ad_lustre_rdcoll.o \ -+ ad_lustre_fcntl.o ad_lustre_hints.o ad_lustre_close.o -+ -+default: $(LIBNAME) -+ @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ -+ $(MAKE) $(SHLIBNAME).la ;\ -+ fi -+ -+.SUFFIXES: $(SUFFIXES) .p .lo -+ -+.c.o: -+ $(CC) $(CFLAGS) -c $< -+.c.lo: -+ $(C_COMPILE_SHL) -c $< -o _s$*.o -+ @mv -f _s$*.o $*.lo -+ -+$(LIBNAME): $(AD_LUSTRE_OBJECTS) -+ $(AR) $(LIBNAME) $(AD_LUSTRE_OBJECTS) -+ $(RANLIB) $(LIBNAME) -+ -+AD_LUSTRE_LOOBJECTS=$(AD_LUSTRE_OBJECTS:.o=.lo) -+$(SHLIBNAME).la: $(AD_LUSTRE_LOOBJECTS) -+ $(AR) $(SHLIBNAME).la $(AD_LUSTRE_LOOBJECTS) -+ -+coverage: -+ -@for file in ${AD_LUSTRE_OBJECTS:.o=.c} ; do \ -+ gcov -b -f $$file ; done -+ -+clean: -+ @rm -f *.o *.lo -diff -ruNp romio-orig/adio/ad_lustre/README romio-ornl/adio/ad_lustre/README ---- romio-orig/adio/ad_lustre/README 1969-12-31 19:00:00.000000000 -0500 -+++ romio-ornl/adio/ad_lustre/README 2007-11-10 08:41:15.992364000 -0500 -@@ -0,0 +1,29 @@ -+----------------------------------------------------- -+V03: -+----------------------------------------------------- -+ o Correct detection of fs_type when lustre: prefix is not given -+ o Further fix on stripe alignment -+ o Tested/Enabled striping hints over Cray XT (Catamount and CNL) -+ -+----------------------------------------------------- -+V02: -+----------------------------------------------------- -+The Lustre ADIO driver has been cleaned up quite a lot. Compared -+to the intital posting, here are the changes: -+ o Removal of dead/redundant code -+ o Removal of asynchronous IO piece as it appears outdated -+ o Bug fixes for setting Lustre Hints -+ o Bug fixes for data sieving -+ o Improved Setsize operation with one process calling ftruncate -+ o Improved collective IO with domain partitioning on -+ Lustre stripe boundary -+ -+Contributing: -+ o You may contribute via many different ways, such as -+ testing results, bug reports, and new feature patches. -+ o We appreciate any courtesy reference of this work. -+ o Disclaimer: you are welcome to try the code, but at your own risk. -+ -+Contact info: -+ For more info, visit http://ft.ornl.gov/projects/io/ -+ -diff -ruNp romio-orig/adio/common/ad_aggregate.c romio-ornl/adio/common/ad_aggregate.c ---- romio-orig/adio/common/ad_aggregate.c 2007-11-10 07:12:18.105362000 -0500 -+++ romio-ornl/adio/common/ad_aggregate.c 2007-11-10 07:30:02.418363000 -0500 -@@ -2,6 +2,8 @@ - /* - * Copyright (C) 1997-2001 University of Chicago. - * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory - */ - - #include "adio.h" -@@ -9,6 +11,8 @@ - - #undef AGG_DEBUG - -+#define ALIGNDOWN(sz, al) ((sz)/al*al) -+ - /* This file contains four functions: - * - * ADIOI_Calc_aggregator() -@@ -87,7 +91,12 @@ int ADIOI_Calc_aggregator(ADIO_File fd, - #endif - - /* get an index into our array of aggregators */ -- rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1); -+ if (fd->file_system == ADIO_LUSTRE) -+ rank_index = (int) ((off - ALIGNDOWN(min_off, fd_size) + fd_size)/ -+ fd_size - 1); -+ else -+ rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1); -+ - - /* we index into fd_end with rank_index, and fd_end was allocated to be no - * bigger than fd->hins->cb_nodes. If we ever violate that, we're -@@ -130,6 +139,7 @@ void ADIOI_Calc_file_domains(ADIO_Offset - * do that, but this routine would be the place for it */ - - ADIO_Offset min_st_offset, max_end_offset, *fd_start, *fd_end, fd_size; -+ int alignment = *fd_size_ptr; - int i; - - #ifdef AGG_DEBUG -@@ -154,6 +164,10 @@ void ADIOI_Calc_file_domains(ADIO_Offset - processes */ - fd_size = ((max_end_offset - min_st_offset + 1) + nprocs_for_coll - - 1)/nprocs_for_coll; -+ if (alignment) { -+ fd_size = (fd_size + alignment -1 ) / alignment * alignment; -+ } -+ - /* ceiling division as in HPF block distribution */ - - *fd_start_ptr = (ADIO_Offset *) -@@ -165,7 +179,10 @@ void ADIOI_Calc_file_domains(ADIO_Offset - fd_end = *fd_end_ptr; - - fd_start[0] = min_st_offset; -- fd_end[0] = min_st_offset + fd_size - 1; -+ if (alignment) -+ fd_end[0] = ALIGNDOWN(min_st_offset, fd_size) + fd_size - 1; -+ else -+ fd_end[0] = min_st_offset + fd_size - 1; - - for (i=1; i<nprocs_for_coll; i++) { - fd_start[i] = fd_end[i-1] + 1; -diff -ruNp romio-orig/adio/common/ad_fstype.c romio-ornl/adio/common/ad_fstype.c ---- romio-orig/adio/common/ad_fstype.c 2007-11-10 07:12:18.128343000 -0500 -+++ romio-ornl/adio/common/ad_fstype.c 2007-11-10 08:21:48.329637000 -0500 -@@ -317,6 +317,15 @@ static void ADIO_FileSysType_fncall(char - } - # endif - -+/*#if defined(LINUX) && defined(ROMIO_LUSTRE)*/ -+#ifdef ROMIO_LUSTRE -+#define LL_SUPER_MAGIC 0x0BD00BD0 -+ if (fsbuf.f_type == LL_SUPER_MAGIC) { -+ *fstype = ADIO_LUSTRE; -+ return; -+ } -+# endif -+ - # ifdef PAN_KERNEL_FS_CLIENT_SUPER_MAGIC - if (fsbuf.f_type == PAN_KERNEL_FS_CLIENT_SUPER_MAGIC) { - *fstype = ADIO_PANFS; -@@ -467,6 +476,11 @@ static void ADIO_FileSysType_prefix(char - { - *fstype = ADIO_GRIDFTP; - } -+ else if (!strncmp(filename, "lustre:", 7) -+ || !strncmp(filename, "LUSTRE:", 7)) -+ { -+ *fstype = ADIO_LUSTRE; -+ } - else { - #ifdef ROMIO_NTFS - *fstype = ADIO_NTFS; -@@ -681,6 +695,14 @@ void ADIO_ResolveFileType(MPI_Comm comm, - *ops = &ADIO_GRIDFTP_operations; - #endif - } -+ if (file_system == ADIO_LUSTRE) { -+#ifndef ROMIO_LUSTRE -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0); -+ return; -+#else -+ *ops = &ADIO_LUSTRE_operations; -+#endif -+ } - *error_code = MPI_SUCCESS; - *fstype = file_system; - return; -diff -ruNp romio-orig/adio/common/ad_read_coll.c romio-ornl/adio/common/ad_read_coll.c ---- romio-orig/adio/common/ad_read_coll.c 2007-11-10 07:12:18.174296000 -0500 -+++ romio-ornl/adio/common/ad_read_coll.c 2007-11-10 07:37:15.747604000 -0500 -@@ -3,6 +3,8 @@ - * - * Copyright (C) 1997 University of Chicago. - * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory - */ - - #include "adio.h" -@@ -67,7 +69,7 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File - int i, filetype_is_contig, nprocs, nprocs_for_coll, myrank; - int contig_access_count=0, interleave_count = 0, buftype_is_contig; - int *count_my_req_per_proc, count_my_req_procs, count_others_req_procs; -- ADIO_Offset start_offset, end_offset, orig_fp, fd_size, min_st_offset, off; -+ ADIO_Offset start_offset, end_offset, orig_fp, fd_size=0, min_st_offset, off; - ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *fd_start = NULL, - *fd_end = NULL, *end_offsets = NULL; - int *len_list = NULL, *buf_idx = NULL; -@@ -126,6 +128,8 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File - if (fd->hints->cb_read == ADIOI_HINT_DISABLE - || (!interleave_count && (fd->hints->cb_read == ADIOI_HINT_AUTO))) - { -+ int filerange_is_contig = 0; -+ - /* don't do aggregation */ - if (fd->hints->cb_read != ADIOI_HINT_DISABLE) { - ADIOI_Free(offset_list); -@@ -136,8 +140,13 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File - - fd->fp_ind = orig_fp; - ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); -+ if (!filetype_is_contig) -+ ADIOI_Filetype_range_iscontig(fd, offset, file_ptr_type, -+ datatype, count, &filerange_is_contig); -+ -+ if (buftype_is_contig && (filetype_is_contig || -+ filerange_is_contig)) { - -- if (buftype_is_contig && filetype_is_contig) { - if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { - off = fd->disp + (fd->etype_size) * offset; - ADIO_ReadContig(fd, buf, count, datatype, ADIO_EXPLICIT_OFFSET, -@@ -168,6 +177,19 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File - * needs to be mapped to an actual rank in the communicator later. - * - */ -+ if (fd->file_system == ADIO_LUSTRE) { -+ char *value; -+ int sflag; -+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); -+ MPI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL, -+ value, &sflag); -+ if (sflag) -+ fd_size = atoi(value); -+ else -+ fd_size = ADIOI_LUSTRE_STRIPE_DFLT; -+ ADIOI_Free(value); -+ } -+ - ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs, - nprocs_for_coll, &min_st_offset, - &fd_start, &fd_end, &fd_size); -diff -ruNp romio-orig/adio/common/ad_write_coll.c romio-ornl/adio/common/ad_write_coll.c ---- romio-orig/adio/common/ad_write_coll.c 2007-11-10 07:12:18.203267000 -0500 -+++ romio-ornl/adio/common/ad_write_coll.c 2007-11-10 07:38:00.351958000 -0500 -@@ -3,6 +3,8 @@ - * - * Copyright (C) 1997 University of Chicago. - * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory - */ - - #include "adio.h" -@@ -69,7 +71,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil - int i, filetype_is_contig, nprocs, nprocs_for_coll, myrank; - int contig_access_count=0, interleave_count = 0, buftype_is_contig; - int *count_my_req_per_proc, count_my_req_procs, count_others_req_procs; -- ADIO_Offset orig_fp, start_offset, end_offset, fd_size, min_st_offset, off; -+ ADIO_Offset orig_fp, start_offset, end_offset, fd_size=0, min_st_offset, off; - ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *fd_start = NULL, - *fd_end = NULL, *end_offsets = NULL; - int *buf_idx = NULL, *len_list = NULL; -@@ -123,6 +125,8 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil - if (fd->hints->cb_write == ADIOI_HINT_DISABLE || - (!interleave_count && (fd->hints->cb_write == ADIOI_HINT_AUTO))) - { -+ int filerange_is_contig = 0; -+ - /* use independent accesses */ - if (fd->hints->cb_write != ADIOI_HINT_DISABLE) { - ADIOI_Free(offset_list); -@@ -133,8 +137,12 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil - - fd->fp_ind = orig_fp; - ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); -+ if (!filetype_is_contig) -+ ADIOI_Filetype_range_iscontig(fd, offset, file_ptr_type, -+ datatype, count, &filerange_is_contig); - -- if (buftype_is_contig && filetype_is_contig) { -+ if (buftype_is_contig && (filetype_is_contig || -+ filerange_is_contig)) { - if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { - off = fd->disp + (fd->etype_size) * offset; - ADIO_WriteContig(fd, buf, count, datatype, -@@ -154,6 +162,19 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil - done by (logically) dividing the file into file domains (FDs); each - process may directly access only its own file domain. */ - -+ if (fd->file_system == ADIO_LUSTRE) { -+ char *value; -+ int sflag; -+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); -+ MPI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL, -+ value, &sflag); -+ if (sflag) -+ fd_size = atoi(value); -+ else -+ fd_size = ADIOI_LUSTRE_STRIPE_DFLT; -+ ADIOI_Free(value); -+ } -+ - ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs, - nprocs_for_coll, &min_st_offset, - &fd_start, &fd_end, &fd_size); -diff -ruNp romio-orig/adio/common/iscontig.c romio-ornl/adio/common/iscontig.c ---- romio-orig/adio/common/iscontig.c 2007-11-10 07:12:18.258209000 -0500 -+++ romio-ornl/adio/common/iscontig.c 2007-11-10 07:13:32.648745000 -0500 -@@ -2,9 +2,12 @@ - /* - * Copyright (C) 1997 University of Chicago. - * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory - */ - - #include "adio.h" -+#include "adio_extern.h" - /* #ifdef MPISGI - #include "mpisgi2.h" - #endif */ -@@ -101,3 +104,85 @@ void ADIOI_Datatype_iscontig(MPI_Datatyp - in other cases as well.*/ - } - #endif -+ -+void ADIOI_Filetype_range_start(ADIO_File fd, ADIO_Offset offset, int file_ptr_type, -+ int *start_index, int *start_ftype, int *start_offset, int *start_io_size) -+{ -+ ADIOI_Flatlist_node *flat_file; -+ ADIO_Offset disp, abs_off_in_filetype=0; -+ MPI_Aint filetype_extent; -+ -+ int i, st_io_size=0, st_index=0; -+ int sum, n_etypes_in_filetype, size_in_filetype; -+ int n_filetypes, etype_in_filetype; -+ int flag, filetype_size, etype_size; -+ -+ flat_file = ADIOI_Flatlist; -+ while (flat_file->type != fd->filetype) flat_file = flat_file->next; -+ disp = fd->disp; -+ -+ MPI_Type_size(fd->filetype, &filetype_size); -+ MPI_Type_extent(fd->filetype, &filetype_extent); -+ etype_size = fd->etype_size; -+ -+ if (file_ptr_type == ADIO_INDIVIDUAL) { -+ offset = fd->fp_ind; /* in bytes */ -+ n_filetypes = -1; -+ flag = 0; -+ while (!flag) { -+ n_filetypes++; -+ for (i=0; i<flat_file->count; i++) { -+ if (disp + flat_file->indices[i] + -+ (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] -+ >= offset) { -+ st_index = i; -+ st_io_size = (int) (disp + flat_file->indices[i] + -+ (ADIO_Offset) n_filetypes*filetype_extent -+ + flat_file->blocklens[i] - offset); -+ flag = 1; -+ break; -+ } -+ } -+ } -+ } else { -+ n_etypes_in_filetype = filetype_size/etype_size; -+ n_filetypes = (int) (offset / n_etypes_in_filetype); -+ etype_in_filetype = (int) (offset % n_etypes_in_filetype); -+ size_in_filetype = etype_in_filetype * etype_size; -+ -+ sum = 0; -+ for (i=0; i<flat_file->count; i++) { -+ sum += flat_file->blocklens[i]; -+ if (sum > size_in_filetype) { -+ st_index = i; -+ st_io_size = sum - size_in_filetype; -+ abs_off_in_filetype = flat_file->indices[i] + -+ size_in_filetype - (sum - flat_file->blocklens[i]); -+ break; -+ } -+ } -+ -+ /* abs. offset in bytes in the file */ -+ offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + abs_off_in_filetype; -+ } -+ -+ *start_index = st_index; -+ *start_io_size = st_io_size; -+ *start_offset = offset; -+ *start_ftype = n_filetypes; -+} -+ -+void ADIOI_Filetype_range_iscontig(ADIO_File fd, ADIO_Offset offset, -+ int file_ptr_type, MPI_Datatype datatype, int count, int *flag) -+{ -+ int srclen, datatype_size; -+ int st_index, st_ftype, st_offset, st_io_size; -+ -+ MPI_Type_size(datatype, &datatype_size); -+ srclen = datatype_size * count; -+ -+ ADIOI_Filetype_range_start(fd, offset, file_ptr_type, -+ &st_index, &st_ftype, &st_offset, &st_io_size); -+ *flag = st_io_size >= srclen ? 1 : 0; -+} -+ -diff -ruNp romio-orig/adio/include/adio.h romio-ornl/adio/include/adio.h ---- romio-orig/adio/include/adio.h 2007-11-10 07:12:18.302169000 -0500 -+++ romio-ornl/adio/include/adio.h 2007-11-10 07:13:32.654738000 -0500 -@@ -289,6 +289,7 @@ typedef struct { - #define ADIO_PVFS2 160 /* PVFS2: 2nd generation PVFS */ - #define ADIO_PANFS 161 /* Panasas FS */ - #define ADIO_GRIDFTP 162 /* Globus GridFTP */ -+#define ADIO_LUSTRE 163 /* Lustre */ - - #define ADIO_SEEK_SET SEEK_SET - #define ADIO_SEEK_CUR SEEK_CUR -diff -ruNp romio-orig/adio/include/adioi_fs_proto.h romio-ornl/adio/include/adioi_fs_proto.h ---- romio-orig/adio/include/adioi_fs_proto.h 2007-11-10 07:12:18.318156000 -0500 -+++ romio-ornl/adio/include/adioi_fs_proto.h 2007-11-10 07:13:32.658735000 -0500 -@@ -49,6 +49,32 @@ extern struct ADIOI_Fns_struct ADIO_SFS_ - /* prototypes are in adio/ad_sfs/ad_sfs.h */ - #endif - -+#ifdef ROMIO_LUSTRE -+extern struct ADIOI_Fns_struct ADIO_LUSTRE_operations; -+ -+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code); -+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code); -+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, -+ int *error_code); -+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); -+#endif -+ - #ifdef ROMIO_NTFS - extern struct ADIOI_Fns_struct ADIO_NTFS_operations; - /* prototypes are in adio/ad_ntfs/ad_ntfs.h */ -diff -ruNp romio-orig/adio/include/adioi.h romio-ornl/adio/include/adioi.h ---- romio-orig/adio/include/adioi.h 2007-11-10 07:12:18.310161000 -0500 -+++ romio-ornl/adio/include/adioi.h 2007-11-10 07:36:19.895514000 -0500 -@@ -3,6 +3,8 @@ - * - * Copyright (C) 1997 University of Chicago. - * See COPYRIGHT notice in top-level directory. -+ * -+ * Copyright (C) 2007 Oak Ridge National Laboratory - */ - - -@@ -184,6 +186,7 @@ struct ADIOI_Fns_struct { - #define ADIOI_PREALLOC_BUFSZ 16777216 /* buffer size used to - preallocate disk space */ - -+#define ADIOI_LUSTRE_STRIPE_DFLT (1<<20) - - /* default values for some hints */ - /* buffer size for collective I/O = 16 MB */ -@@ -295,6 +298,10 @@ void *ADIOI_Calloc_fn(size_t nelem, size - void *ADIOI_Realloc_fn(void *ptr, size_t size, int lineno, char *fname); - void ADIOI_Free_fn(void *ptr, int lineno, char *fname); - void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag); -+void ADIOI_Filetype_range_iscontig(ADIO_File fd, ADIO_Offset offset, -+ int file_ptr_type, MPI_Datatype datatype, int count, int *flag); -+void ADIOI_Filetype_range_start(ADIO_File fd, ADIO_Offset offset, int file_ptr_type, -+ int *start_index, int *start_ftype, int *start_offset, int *start_io_size); - void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset); - void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset); - void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset, -diff -ruNp romio-orig/adio/include/mpio_error.h romio-ornl/adio/include/mpio_error.h ---- romio-orig/adio/include/mpio_error.h 2007-11-10 07:12:18.321147000 -0500 -+++ romio-ornl/adio/include/mpio_error.h 2007-11-10 07:13:32.669723000 -0500 -@@ -63,6 +63,7 @@ - #define MPIR_ERR_FILETYPE 33 - #define MPIR_ERR_NO_NTFS 35 - #define MPIR_ERR_NO_TESTFS 36 -+#define MPIR_ERR_NO_LUSTRE 37 - - /* MPI_ERR_COMM */ - #ifndef MPIR_ERR_COMM_NULL -diff -ruNp romio-orig/adio/include/romioconf.h.in romio-ornl/adio/include/romioconf.h.in ---- romio-orig/adio/include/romioconf.h.in 2007-11-10 07:12:18.331143000 -0500 -+++ romio-ornl/adio/include/romioconf.h.in 2007-11-10 07:13:32.675717000 -0500 -@@ -282,6 +282,9 @@ - /* Define for ROMIO with PVFS2 */ - #undef ROMIO_PVFS2 - -+/* Define for ROMIO with LUSTRE */ -+#undef ROMIO_LUSTRE -+ - /* Define if int64_t must be defined for PVFS */ - #undef ROMIO_PVFS_NEEDS_INT64_DEFINITION - -diff -ruNp romio-orig/configure romio-ornl/configure ---- romio-orig/configure 2007-11-10 07:12:19.455013000 -0500 -+++ romio-ornl/configure 2007-11-10 07:15:22.506785000 -0500 -@@ -1402,7 +1402,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai - # - have_aio=no - # --known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp" -+known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre" - known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi" - # - # Defaults -@@ -7630,6 +7630,14 @@ _ACEOF - - fi - -+if test -n "$file_system_lustre"; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define ROMIO_LUSTRE 1 -+_ACEOF -+ -+fi -+ - # - # Check for presence and characteristics of async. I/O calls if - # not disabled. -@@ -12139,7 +12147,7 @@ rm -f adio/include/romioconf.h ${use_top - # are active will be called by the top level ROMIO make - ac_config_commands="$ac_config_commands default-1" - -- ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile common/dataloop/Makefile" -+ ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile adio/ad_lustre/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile common/dataloop/Makefile" - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure - # tests run on this system so they can be shared between configure -@@ -12697,6 +12705,7 @@ do - "adio/ad_pvfs/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs/Makefile" ;; - "adio/ad_pvfs2/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs2/Makefile" ;; - "adio/ad_gridftp/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_gridftp/Makefile" ;; -+ "adio/ad_lustre/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_lustre/Makefile" ;; - "mpi-io/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi-io/fortran/Makefile" ;; - "mpi2-other/info/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/info/fortran/Makefile" ;; - "mpi2-other/array/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/array/fortran/Makefile" ;; -diff -ruNp romio-orig/configure.in romio-ornl/configure.in ---- romio-orig/configure.in 2007-11-10 07:12:18.367105000 -0500 -+++ romio-ornl/configure.in 2007-11-10 07:13:32.707687000 -0500 -@@ -93,7 +93,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai - # - have_aio=no - # --known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp" -+known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre" - known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi" - # - # Defaults -@@ -1097,6 +1097,9 @@ fi - if test -n "$file_system_testfs"; then - AC_DEFINE(ROMIO_TESTFS,1,[Define for ROMIO with TESTFS]) - fi -+if test -n "$file_system_lustre"; then -+ AC_DEFINE(ROMIO_LUSTRE,1,[Define for ROMIO with LUSTRE]) -+fi - - if test -n "$file_system_xfs"; then - AC_DEFINE(ROMIO_XFS,1,[Define for ROMIO with XFS]) -@@ -2101,6 +2104,7 @@ AC_OUTPUT(Makefile localdefs mpi-io/Make - adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \ - adio/ad_pvfs2/Makefile \ - adio/ad_gridftp/Makefile \ -+ adio/ad_lustre/Makefile \ - mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \ - mpi2-other/array/fortran/Makefile test/fmisc.f \ - test/fcoll_test.f test/pfcoll_test.f test/fperf.f \ -diff -ruNp romio-orig/Makefile.in romio-ornl/Makefile.in ---- romio-orig/Makefile.in 2007-11-10 07:12:18.357110000 -0500 -+++ romio-ornl/Makefile.in 2007-11-10 07:13:32.712681000 -0500 -@@ -15,7 +15,7 @@ DIRS = mpi-io adio/common @GLUE_D - MPIO_DIRS = mpi-io - EXTRA_SRC_DIRS = @EXTRA_SRC_DIRS@ - FILE_SYS_DIRS = @FILE_SYS_DIRS@ --ALL_DIRS = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp test mpi-io/glue/default mpi-io/glue/mpich1 mpi-io/glue/mpich2 -+ALL_DIRS = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp adio/ad_lustre test mpi-io/glue/default mpi-io/glue/mpich1 mpi-io/glue/mpich2 - SHELL = /bin/sh - - @VPATH@ diff --git a/lustre/contrib/mpich-1.2.6-lustre.patch b/lustre/contrib/mpich-1.2.6-lustre.patch deleted file mode 100644 index d32fab9336..0000000000 --- a/lustre/contrib/mpich-1.2.6-lustre.patch +++ /dev/null @@ -1,1829 +0,0 @@ -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.c 2005-12-06 11:54:37.883130927 -0500 -@@ -0,0 +1,37 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 2001 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+/* adioi.h has the ADIOI_Fns_struct define */ -+#include "adioi.h" -+ -+struct ADIOI_Fns_struct ADIO_LUSTRE_operations = { -+ ADIOI_LUSTRE_Open, /* Open */ -+ ADIOI_LUSTRE_ReadContig, /* ReadContig */ -+ ADIOI_LUSTRE_WriteContig, /* WriteContig */ -+ ADIOI_GEN_ReadStridedColl, /* ReadStridedColl */ -+ ADIOI_GEN_WriteStridedColl, /* WriteStridedColl */ -+ ADIOI_GEN_SeekIndividual, /* SeekIndividual */ -+ ADIOI_LUSTRE_Fcntl, /* Fcntl */ -+ ADIOI_LUSTRE_SetInfo, /* SetInfo */ -+ ADIOI_GEN_ReadStrided, /* ReadStrided */ -+ ADIOI_GEN_WriteStrided, /* WriteStrided */ -+ ADIOI_LUSTRE_Close, /* Close */ -+ ADIOI_LUSTRE_IreadContig, /* IreadContig */ -+ ADIOI_LUSTRE_IwriteContig, /* IwriteContig */ -+ ADIOI_LUSTRE_ReadDone, /* ReadDone */ -+ ADIOI_LUSTRE_WriteDone, /* WriteDone */ -+ ADIOI_LUSTRE_ReadComplete, /* ReadComplete */ -+ ADIOI_LUSTRE_WriteComplete, /* WriteComplete */ -+ ADIOI_LUSTRE_IreadStrided, /* IreadStrided */ -+ ADIOI_LUSTRE_IwriteStrided, /* IwriteStrided */ -+ ADIOI_GEN_Flush, /* Flush */ -+ ADIOI_LUSTRE_Resize, /* Resize */ -+ ADIOI_GEN_Delete, /* Delete */ -+}; -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_close.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_close.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_close.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_close.c 2005-12-06 11:54:37.895129327 -0500 -@@ -0,0 +1,32 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_close.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code) -+{ -+ int err; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_CLOSE"; -+#endif -+ -+ err = close(fd->fd_sys); -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_done.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_done.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_done.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_done.c 2005-12-06 11:54:37.898128927 -0500 -@@ -0,0 +1,188 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_done.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code) -+{ -+#ifndef NO_AIO -+ int done=0; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_READDONE"; -+#endif -+#ifdef AIO_SUN -+ aio_result_t *result=0, *tmp; -+#else -+ int err; -+#endif -+#ifdef AIO_HANDLE_IN_AIOCB -+ struct aiocb *tmp1; -+#endif -+#endif -+ -+ if (*request == ADIO_REQUEST_NULL) { -+ *error_code = MPI_SUCCESS; -+ return 1; -+ } -+ -+#ifdef NO_AIO -+/* HP, FreeBSD, Linux */ -+#ifdef HAVE_STATUS_SET_BYTES -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ (*request)->fd->async_count--; -+ ADIOI_Free_request((ADIOI_Req_node *) (*request)); -+ *request = ADIO_REQUEST_NULL; -+ *error_code = MPI_SUCCESS; -+ return 1; -+#endif -+ -+#ifdef AIO_SUN -+ if ((*request)->queued) { -+ tmp = (aio_result_t *) (*request)->handle; -+ if (tmp->aio_return == AIO_INPROGRESS) { -+ done = 0; -+ *error_code = MPI_SUCCESS; -+ } -+ else if (tmp->aio_return != -1) { -+ result = (aio_result_t *) aiowait(0); /* dequeue any one request */ -+ done = 1; -+ (*request)->nbytes = tmp->aio_return; -+ *error_code = MPI_SUCCESS; -+ } -+ else { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(tmp->aio_errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(tmp->aio_errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ } /* if ((*request)->queued) ... */ -+ else { -+ /* ADIOI_Complete_Async completed this request, but request object -+ was not freed. */ -+ done = 1; -+ *error_code = MPI_SUCCESS; -+ } -+#ifdef HAVE_STATUS_SET_BYTES -+ if (done && ((*request)->nbytes != -1)) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#endif -+ -+#ifdef AIO_HANDLE_IN_AIOCB -+/* IBM */ -+ if ((*request)->queued) { -+ tmp1 = (struct aiocb *) (*request)->handle; -+ errno = aio_error(tmp1->aio_handle); -+ if (errno == EINPROG) { -+ done = 0; -+ *error_code = MPI_SUCCESS; -+ } -+ else { -+ err = aio_return(tmp1->aio_handle); -+ (*request)->nbytes = err; -+ errno = aio_error(tmp1->aio_handle); -+ -+ done = 1; -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ } -+ } /* if ((*request)->queued) */ -+ else { -+ done = 1; -+ *error_code = MPI_SUCCESS; -+ } -+#ifdef HAVE_STATUS_SET_BYTES -+ if (done && ((*request)->nbytes != -1)) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#elif (!defined(NO_AIO) && !defined(AIO_SUN)) -+/* DEC, SGI IRIX 5 and 6 */ -+ if ((*request)->queued) { -+ errno = aio_error((const struct aiocb *) (*request)->handle); -+ if (errno == EINPROGRESS) { -+ done = 0; -+ *error_code = MPI_SUCCESS; -+ } -+ else { -+ err = aio_return((struct aiocb *) (*request)->handle); -+ (*request)->nbytes = err; -+ errno = aio_error((struct aiocb *) (*request)->handle); -+ -+ done = 1; -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ } -+ } /* if ((*request)->queued) */ -+ else { -+ done = 1; -+ *error_code = MPI_SUCCESS; -+ } -+#ifdef HAVE_STATUS_SET_BYTES -+ if (done && ((*request)->nbytes != -1)) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#endif -+ -+#ifndef NO_AIO -+ if (done) { -+ /* if request is still queued in the system, it is also there -+ on ADIOI_Async_list. Delete it from there. */ -+ if ((*request)->queued) ADIOI_Del_req_from_list(request); -+ -+ (*request)->fd->async_count--; -+ if ((*request)->handle) ADIOI_Free((*request)->handle); -+ ADIOI_Free_request((ADIOI_Req_node *) (*request)); -+ *request = ADIO_REQUEST_NULL; -+ } -+ return done; -+#endif -+ -+} -+ -+ -+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code) -+{ -+ return ADIOI_LUSTRE_ReadDone(request, status, error_code); -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_fcntl.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_fcntl.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_fcntl.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_fcntl.c 2005-12-06 11:54:37.901128527 -0500 -@@ -0,0 +1,126 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_fcntl.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+#include "adio_extern.h" -+/* #ifdef MPISGI -+#include "mpisgi2.h" -+#endif */ -+ -+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code) -+{ -+ int i, ntimes; -+ ADIO_Offset curr_fsize, alloc_size, size, len, done; -+ ADIO_Status status; -+ char *buf; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_FCNTL"; -+#endif -+ -+ switch(flag) { -+ case ADIO_FCNTL_GET_FSIZE: -+ fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END); -+ if (fd->fp_sys_posn != -1) -+ lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); -+ if (fcntl_struct->fsize == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ break; -+ -+ case ADIO_FCNTL_SET_DISKSPACE: -+ /* will be called by one process only */ -+ /* On file systems with no preallocation function, I have to -+ explicitly write -+ to allocate space. Since there could be holes in the file, -+ I need to read up to the current file size, write it back, -+ and then write beyond that depending on how much -+ preallocation is needed. -+ read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */ -+ -+ curr_fsize = lseek(fd->fd_sys, 0, SEEK_END); -+ alloc_size = fcntl_struct->diskspace; -+ -+ size = ADIOI_MIN(curr_fsize, alloc_size); -+ -+ ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; -+ buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ); -+ done = 0; -+ -+ for (i=0; i<ntimes; i++) { -+ len = ADIOI_MIN(size-done, ADIOI_PREALLOC_BUFSZ); -+ ADIO_ReadContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done, -+ &status, error_code); -+ if (*error_code != MPI_SUCCESS) { -+ ADIOI_Free(buf); -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ FPRINTF(stderr, "ADIOI_LUSTRE_Fcntl: To preallocate disk space, ROMIO needs to read the file and write it back, but is unable to read the file. Please give the file read permission and open it with MPI_MODE_RDWR.\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_PREALLOC_PERM, -+ myname, (char *) 0, (char *) 0); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ return; -+ } -+ ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, -+ done, &status, error_code); -+ if (*error_code != MPI_SUCCESS) return; -+ done += len; -+ } -+ -+ if (alloc_size > curr_fsize) { -+ memset(buf, 0, ADIOI_PREALLOC_BUFSZ); -+ size = alloc_size - curr_fsize; -+ ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; -+ for (i=0; i<ntimes; i++) { -+ len = ADIOI_MIN(alloc_size-done, ADIOI_PREALLOC_BUFSZ); -+ ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, -+ done, &status, error_code); -+ if (*error_code != MPI_SUCCESS) return; -+ done += len; -+ } -+ } -+ ADIOI_Free(buf); -+ if (fd->fp_sys_posn != -1) -+ lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); -+ *error_code = MPI_SUCCESS; -+ break; -+ -+ case ADIO_FCNTL_SET_IOMODE: -+ /* for implementing PFS I/O modes. will not occur in MPI-IO -+ implementation.*/ -+ if (fd->iomode != fcntl_struct->iomode) { -+ fd->iomode = fcntl_struct->iomode; -+ MPI_Barrier(MPI_COMM_WORLD); -+ } -+ *error_code = MPI_SUCCESS; -+ break; -+ -+ case ADIO_FCNTL_SET_ATOMICITY: -+ fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1; -+ *error_code = MPI_SUCCESS; -+ break; -+ -+ default: -+ FPRINTF(stderr, "Unknown flag passed to ADIOI_LUSTRE_Fcntl\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_flush.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_flush.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_flush.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_flush.c 2005-12-06 11:54:37.903128261 -0500 -@@ -0,0 +1,14 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_flush.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code) -+{ -+ ADIOI_GEN_Flush(fd, error_code); -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.h mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.h ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.h 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.h 2005-12-06 11:54:37.891129861 -0500 -@@ -0,0 +1,36 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre.h,v 1.2 2005/07/07 14:38:17 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#ifndef AD_UNIX_INCLUDE -+#define AD_UNIX_INCLUDE -+ -+/* temp*/ -+#define HAVE_ASM_TYPES_H 1 -+ -+#include <unistd.h> -+#include <linux/types.h> -+#include <fcntl.h> -+#include <sys/ioctl.h> -+#include "lustre/lustre_user.h" -+#include "adio.h" -+ -+#ifndef NO_AIO -+#ifdef AIO_SUN -+#include <sys/asynch.h> -+#else -+#include <aio.h> -+#ifdef NEEDS_ADIOCB_T -+typedef struct adiocb adiocb_t; -+#endif -+#endif -+#endif -+ -+int ADIOI_LUSTRE_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, -+ int wr, void *handle); -+ -+#endif -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_hints.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_hints.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_hints.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_hints.c 2005-12-06 11:54:37.904128127 -0500 -@@ -0,0 +1,130 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_hints.c,v 1.2 2005/07/07 14:38:17 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) -+{ -+ char *value, *value_in_fd; -+ int flag, tmp_val, str_factor=-1, str_unit=0, start_iodev=-1; -+ struct lov_user_md lum = { 0 }; -+ int err, myrank, fd_sys, perm, amode, old_mask; -+ -+ if ( (fd->info) == MPI_INFO_NULL) { -+ /* This must be part of the open call. can set striping parameters -+ if necessary. */ -+ MPI_Info_create(&(fd->info)); -+ -+ /* has user specified striping or server buffering parameters -+ and do they have the same value on all processes? */ -+ if (users_info != MPI_INFO_NULL) { -+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); -+ -+ MPI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ str_factor=atoi(value); -+ tmp_val = str_factor; -+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm); -+ if (tmp_val != str_factor) { -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"striping_factor\" must be the same on all processes\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ MPI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ str_unit=atoi(value); -+ tmp_val = str_unit; -+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm); -+ if (tmp_val != str_unit) { -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"striping_unit\" must be the same on all processes\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ MPI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ start_iodev=atoi(value); -+ tmp_val = start_iodev; -+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm); -+ if (tmp_val != start_iodev) { -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"start_iodevice\" must be the same on all processes\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ /* if user has specified striping info, process 0 tries to set it */ -+ if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) { -+ MPI_Comm_rank(fd->comm, &myrank); -+ if (!myrank) { -+ if (fd->perm == ADIO_PERM_NULL) { -+ old_mask = umask(022); -+ umask(old_mask); -+ perm = old_mask ^ 0666; -+ } -+ else perm = fd->perm; -+ -+ amode = 0; -+ if (fd->access_mode & ADIO_CREATE) -+ amode = amode | O_CREAT; -+ if (fd->access_mode & ADIO_RDWR || -+ (fd->access_mode & ADIO_RDONLY && -+ fd->access_mode & ADIO_WRONLY)) -+ amode = amode | O_RDWR; -+ else if (fd->access_mode & ADIO_WRONLY) -+ amode = amode | O_WRONLY; -+ else if (fd->access_mode & ADIO_RDONLY) -+ amode = amode | O_RDONLY; -+ if (fd->access_mode & ADIO_EXCL) -+ amode = amode | O_EXCL; -+ -+ /* we need to create file so ensure this is set */ -+ amode = amode | O_LOV_DELAY_CREATE | O_CREAT; -+ -+ fd_sys = open(fd->filename, amode, perm); -+ if (fd_sys == -1) { -+ if (errno != EEXIST) -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: Failure to open file %s %d %d\n",strerror(errno), amode, perm); -+ } else { -+ lum.lmm_magic = LOV_USER_MAGIC; -+ lum.lmm_pattern = 0; -+ lum.lmm_stripe_size = str_unit; -+ lum.lmm_stripe_count = str_factor; -+ lum.lmm_stripe_offset = start_iodev; -+ -+ err = ioctl(fd_sys, LL_IOC_LOV_SETSTRIPE, &lum); -+ if (err == -1 && errno != EEXIST) { -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: Failure to set stripe info %s \n",strerror(errno)); -+ } -+ -+ close(fd_sys); -+ } -+ -+ } -+ MPI_Barrier(fd->comm); -+ } -+ -+ ADIOI_Free(value); -+ } -+ -+ /* set the values for collective I/O and data sieving parameters */ -+ ADIOI_GEN_SetInfo(fd, users_info, error_code); -+ } -+ -+ else { -+ /* The file has been opened previously and fd->fd_sys is a valid -+ file descriptor. cannot set striping parameters now. */ -+ -+ /* set the values for collective I/O and data sieving parameters */ -+ ADIOI_GEN_SetInfo(fd, users_info, error_code); -+ -+ } -+ -+ *error_code = MPI_SUCCESS; -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iread.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iread.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iread.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iread.c 2005-12-06 11:54:37.904128127 -0500 -@@ -0,0 +1,106 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_iread.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int *error_code) -+{ -+ int len, typesize; -+#ifdef NO_AIO -+ ADIO_Status status; -+#else -+ int err=-1; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_IREADCONTIG"; -+#endif -+#endif -+ -+ (*request) = ADIOI_Malloc_request(); -+ (*request)->optype = ADIOI_READ; -+ (*request)->fd = fd; -+ (*request)->datatype = datatype; -+ -+ MPI_Type_size(datatype, &typesize); -+ len = count * typesize; -+ -+#ifdef NO_AIO -+ /* HP, FreeBSD, Linux */ -+ /* no support for nonblocking I/O. Use blocking I/O. */ -+ -+ ADIOI_LUSTRE_ReadContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset, -+ &status, error_code); -+ (*request)->queued = 0; -+#ifdef HAVE_STATUS_SET_BYTES -+ if (*error_code == MPI_SUCCESS) { -+ MPI_Get_elements(&status, MPI_BYTE, &len); -+ (*request)->nbytes = len; -+ } -+#endif -+ -+#else -+ if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind; -+ err = ADIOI_LUSTRE_aio(fd, buf, len, offset, 0, &((*request)->handle)); -+ if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; -+ -+ (*request)->queued = 1; -+ ADIOI_Add_req_to_list(request); -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+#endif /* NO_AIO */ -+ -+ fd->fp_sys_posn = -1; /* set it to null. */ -+ fd->async_count++; -+} -+ -+ -+ -+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code) -+{ -+ ADIO_Status status; -+#ifdef HAVE_STATUS_SET_BYTES -+ int typesize; -+#endif -+ -+ *request = ADIOI_Malloc_request(); -+ (*request)->optype = ADIOI_READ; -+ (*request)->fd = fd; -+ (*request)->datatype = datatype; -+ (*request)->queued = 0; -+ (*request)->handle = 0; -+ -+/* call the blocking version. It is faster because it does data sieving. */ -+ ADIOI_LUSTRE_ReadStrided(fd, buf, count, datatype, file_ptr_type, -+ offset, &status, error_code); -+ -+ fd->async_count++; -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (*error_code == MPI_SUCCESS) { -+ MPI_Type_size(datatype, &typesize); -+ (*request)->nbytes = count * typesize; -+ } -+#endif -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iwrite.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iwrite.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iwrite.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iwrite.c 2005-12-06 11:54:37.906127861 -0500 -@@ -0,0 +1,268 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_iwrite.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int *error_code) -+{ -+ int len, typesize; -+#ifdef NO_AIO -+ ADIO_Status status; -+#else -+ int err=-1; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_IWRITECONTIG"; -+#endif -+#endif -+ -+ *request = ADIOI_Malloc_request(); -+ (*request)->optype = ADIOI_WRITE; -+ (*request)->fd = fd; -+ (*request)->datatype = datatype; -+ -+ MPI_Type_size(datatype, &typesize); -+ len = count * typesize; -+ -+#ifdef NO_AIO -+ /* HP, FreeBSD, Linux */ -+ /* no support for nonblocking I/O. Use blocking I/O. */ -+ -+ ADIOI_LUSTRE_WriteContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset, -+ &status, error_code); -+ (*request)->queued = 0; -+#ifdef HAVE_STATUS_SET_BYTES -+ if (*error_code == MPI_SUCCESS) { -+ MPI_Get_elements(&status, MPI_BYTE, &len); -+ (*request)->nbytes = len; -+ } -+#endif -+ -+#else -+ if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind; -+ err = ADIOI_LUSTRE_aio(fd, buf, len, offset, 1, &((*request)->handle)); -+ if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; -+ -+ (*request)->queued = 1; -+ ADIOI_Add_req_to_list(request); -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+#endif /* NO_AIO */ -+ -+ fd->fp_sys_posn = -1; /* set it to null. */ -+ fd->async_count++; -+} -+ -+ -+ -+ -+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code) -+{ -+ ADIO_Status status; -+#ifdef HAVE_STATUS_SET_BYTES -+ int typesize; -+#endif -+ -+ *request = ADIOI_Malloc_request(); -+ (*request)->optype = ADIOI_WRITE; -+ (*request)->fd = fd; -+ (*request)->datatype = datatype; -+ (*request)->queued = 0; -+ (*request)->handle = 0; -+ -+/* call the blocking version. It is faster because it does data sieving. */ -+ ADIOI_LUSTRE_WriteStrided(fd, buf, count, datatype, file_ptr_type, -+ offset, &status, error_code); -+ -+ fd->async_count++; -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (*error_code == MPI_SUCCESS) { -+ MPI_Type_size(datatype, &typesize); -+ (*request)->nbytes = count * typesize; -+ } -+#endif -+} -+ -+ -+/* This function is for implementation convenience. It is not user-visible. -+ It takes care of the differences in the interface for nonblocking I/O -+ on various Unix machines! If wr==1 write, wr==0 read. */ -+ -+int ADIOI_LUSTRE_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, -+ int wr, void *handle) -+{ -+ int err=-1, fd_sys; -+ -+#ifndef NO_AIO -+ int error_code; -+#ifdef AIO_SUN -+ aio_result_t *result; -+#else -+ struct aiocb *aiocbp; -+#endif -+#endif -+ -+ fd_sys = fd->fd_sys; -+ -+#ifdef AIO_SUN -+ result = (aio_result_t *) ADIOI_Malloc(sizeof(aio_result_t)); -+ result->aio_return = AIO_INPROGRESS; -+ if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); -+ else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result); -+ -+ if (err == -1) { -+ if (errno == EAGAIN) { -+ /* the man pages say EPROCLIM, but in reality errno is set to EAGAIN! */ -+ -+ /* exceeded the max. no. of outstanding requests. -+ complete all previous async. requests and try again.*/ -+ -+ ADIOI_Complete_async(&error_code); -+ if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); -+ else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result); -+ -+ while (err == -1) { -+ if (errno == EAGAIN) { -+ /* sleep and try again */ -+ sleep(1); -+ if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); -+ else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result); -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ *((aio_result_t **) handle) = result; -+#endif -+ -+#ifdef NO_FD_IN_AIOCB -+/* IBM */ -+ aiocbp = (struct aiocb *) ADIOI_Malloc(sizeof(struct aiocb)); -+ aiocbp->aio_whence = SEEK_SET; -+ aiocbp->aio_offset = offset; -+ aiocbp->aio_buf = buf; -+ aiocbp->aio_nbytes = len; -+ if (wr) err = aio_write(fd_sys, aiocbp); -+ else err = aio_read(fd_sys, aiocbp); -+ -+ if (err == -1) { -+ if (errno == EAGAIN) { -+ /* exceeded the max. no. of outstanding requests. -+ complete all previous async. requests and try again. */ -+ -+ ADIOI_Complete_async(&error_code); -+ if (wr) err = aio_write(fd_sys, aiocbp); -+ else err = aio_read(fd_sys, aiocbp); -+ -+ while (err == -1) { -+ if (errno == EAGAIN) { -+ /* sleep and try again */ -+ sleep(1); -+ if (wr) err = aio_write(fd_sys, aiocbp); -+ else err = aio_read(fd_sys, aiocbp); -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ *((struct aiocb **) handle) = aiocbp; -+ -+#elif (!defined(NO_AIO) && !defined(AIO_SUN)) -+/* DEC, SGI IRIX 5 and 6 */ -+ -+ aiocbp = (struct aiocb *) ADIOI_Calloc(sizeof(struct aiocb), 1); -+ aiocbp->aio_fildes = fd_sys; -+ aiocbp->aio_offset = offset; -+ aiocbp->aio_buf = buf; -+ aiocbp->aio_nbytes = len; -+ -+#ifdef AIO_PRIORITY_DEFAULT -+/* DEC */ -+ aiocbp->aio_reqprio = AIO_PRIO_DFL; /* not needed in DEC Unix 4.0 */ -+ aiocbp->aio_sigevent.sigev_signo = 0; -+#else -+ aiocbp->aio_reqprio = 0; -+#endif -+ -+#ifdef AIO_SIGNOTIFY_NONE -+/* SGI IRIX 6 */ -+ aiocbp->aio_sigevent.sigev_notify = SIGEV_NONE; -+#else -+ aiocbp->aio_sigevent.sigev_signo = 0; -+#endif -+ -+ if (wr) err = aio_write(aiocbp); -+ else err = aio_read(aiocbp); -+ -+ if (err == -1) { -+ if (errno == EAGAIN) { -+ /* exceeded the max. no. of outstanding requests. -+ complete all previous async. requests and try again. */ -+ -+ ADIOI_Complete_async(&error_code); -+ if (wr) err = aio_write(aiocbp); -+ else err = aio_read(aiocbp); -+ -+ while (err == -1) { -+ if (errno == EAGAIN) { -+ /* sleep and try again */ -+ sleep(1); -+ if (wr) err = aio_write(aiocbp); -+ else err = aio_read(aiocbp); -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ *((struct aiocb **) handle) = aiocbp; -+#endif -+ -+ return err; -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_open.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_open.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_open.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_open.c 2005-12-06 11:54:37.906127861 -0500 -@@ -0,0 +1,100 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_open.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code) -+{ -+ int perm, old_mask, amode; -+ struct lov_user_md lum = { 0 }; -+ char *value; -+ -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_OPEN"; -+#endif -+ -+ if (fd->perm == ADIO_PERM_NULL) { -+ old_mask = umask(022); -+ umask(old_mask); -+ perm = old_mask ^ 0666; -+ } -+ else perm = fd->perm; -+ -+ amode = 0; -+ if (fd->access_mode & ADIO_CREATE) -+ amode = amode | O_CREAT; -+ if (fd->access_mode & ADIO_RDONLY) -+ amode = amode | O_RDONLY; -+ if (fd->access_mode & ADIO_WRONLY) -+ amode = amode | O_WRONLY; -+ if (fd->access_mode & ADIO_RDWR) -+ amode = amode | O_RDWR; -+ if (fd->access_mode & ADIO_EXCL) -+ amode = amode | O_EXCL; -+ -+ fd->fd_sys = open(fd->filename, amode, perm); -+ -+ if (fd->fd_sys != -1) { -+ int err; -+ -+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); -+ -+ /* get file striping information and set it in info */ -+ lum.lmm_magic = LOV_USER_MAGIC; -+ err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *) &lum); -+ -+ if (!err) { -+ sprintf(value, "%d", lum.lmm_stripe_size); -+ MPI_Info_set(fd->info, "striping_unit", value); -+ -+ sprintf(value, "%d", lum.lmm_stripe_count); -+ MPI_Info_set(fd->info, "striping_factor", value); -+ -+ sprintf(value, "%d", lum.lmm_stripe_offset); -+ MPI_Info_set(fd->info, "start_iodevice", value); -+ } -+ ADIOI_Free(value); -+ -+ if (fd->access_mode & ADIO_APPEND) -+ fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); -+ } -+ -+ -+ if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND)) -+ fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); -+ -+ if (fd->fd_sys == -1) { -+#ifdef MPICH2 -+ if (errno == ENAMETOOLONG) -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_BAD_FILE, "**filenamelong", "**filenamelong %s %d", fd->filename, strlen(fd->filename) ); -+ else if (errno == ENOENT) -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_NO_SUCH_FILE, "**filenoexist", "**filenoexist %s", fd->filename ); -+ else if (errno == ENOTDIR || errno == ELOOP) -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_BAD_FILE, "**filenamedir", "**filenamedir %s", fd->filename ); -+ else if (errno == EACCES) { -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_ACCESS, "**fileaccess", "**fileaccess %s", -+ fd->filename ); -+ } -+ else if (errno == EROFS) { -+ /* Read only file or file system and write access requested */ -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_READ_ONLY, "**ioneedrd", 0 ); -+ } -+ else { -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ } -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(ADIO_FILE_NULL, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_rdcoll.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_rdcoll.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_rdcoll.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_rdcoll.c 2005-12-06 11:54:37.907127727 -0500 -@@ -0,0 +1,18 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_rdcoll.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_read.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_read.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_read.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_read.c 2005-12-06 11:54:37.907127727 -0500 -@@ -0,0 +1,67 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_read.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int *error_code) -+{ -+ int err=-1, datatype_size, len; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_READCONTIG"; -+#endif -+ -+ MPI_Type_size(datatype, &datatype_size); -+ len = datatype_size * count; -+ -+ if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { -+ if (fd->fp_sys_posn != offset) -+ lseek(fd->fd_sys, offset, SEEK_SET); -+ err = read(fd->fd_sys, buf, len); -+ fd->fp_sys_posn = offset + len; -+ /* individual file pointer not updated */ -+ } -+ else { /* read from curr. location of ind. file pointer */ -+ if (fd->fp_sys_posn != fd->fp_ind) -+ lseek(fd->fd_sys, fd->fp_ind, SEEK_SET); -+ err = read(fd->fd_sys, buf, len); -+ fd->fp_ind += err; -+ fd->fp_sys_posn = fd->fp_ind; -+ } -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (err != -1) MPIR_Status_set_bytes(status, datatype, err); -+#endif -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -+ -+ -+ -+ -+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_ReadStrided(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_resize.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_resize.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_resize.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_resize.c 2005-12-06 11:54:37.909127460 -0500 -@@ -0,0 +1,32 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_resize.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) -+{ -+ int err; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_RESIZE"; -+#endif -+ -+ err = ftruncate(fd->fd_sys, size); -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_seek.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_seek.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_seek.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_seek.c 2005-12-06 11:54:37.911127194 -0500 -@@ -0,0 +1,15 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_seek.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset, -+ int whence, int *error_code) -+{ -+ return ADIOI_GEN_SeekIndividual(fd, offset, whence, error_code); -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wait.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wait.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wait.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wait.c 2005-12-06 11:54:37.914126794 -0500 -@@ -0,0 +1,188 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_wait.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int *error_code) -+{ -+#ifndef NO_AIO -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_READCOMPLETE"; -+#endif -+#ifdef AIO_SUN -+ aio_result_t *result=0, *tmp; -+#else -+ int err; -+#endif -+#ifdef AIO_HANDLE_IN_AIOCB -+ struct aiocb *tmp1; -+#endif -+#endif -+ -+ if (*request == ADIO_REQUEST_NULL) { -+ *error_code = MPI_SUCCESS; -+ return; -+ } -+ -+#ifdef AIO_SUN -+ if ((*request)->queued) { /* dequeue it */ -+ tmp = (aio_result_t *) (*request)->handle; -+ while (tmp->aio_return == AIO_INPROGRESS) usleep(1000); -+ /* sleep for 1 ms., until done. Is 1 ms. a good number? */ -+ /* when done, dequeue any one request */ -+ result = (aio_result_t *) aiowait(0); -+ -+ (*request)->nbytes = tmp->aio_return; -+ -+ if (tmp->aio_return == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(tmp->aio_errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(tmp->aio_errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ -+/* aiowait only dequeues a request. The completion of a request can be -+ checked by just checking the aio_return flag in the handle passed -+ to the original aioread()/aiowrite(). Therefore, I need to ensure -+ that aiowait() is called exactly once for each previous -+ aioread()/aiowrite(). This is also taken care of in ADIOI_xxxDone */ -+ } -+ else *error_code = MPI_SUCCESS; -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if ((*request)->nbytes != -1) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#endif -+ -+#ifdef AIO_HANDLE_IN_AIOCB -+/* IBM */ -+ if ((*request)->queued) { -+ do { -+ err = aio_suspend(1, (struct aiocb **) &((*request)->handle)); -+ } while ((err == -1) && (errno == EINTR)); -+ -+ tmp1 = (struct aiocb *) (*request)->handle; -+ if (err != -1) { -+ err = aio_return(tmp1->aio_handle); -+ (*request)->nbytes = err; -+ errno = aio_error(tmp1->aio_handle); -+ } -+ else (*request)->nbytes = -1; -+ -+/* on DEC, it is required to call aio_return to dequeue the request. -+ IBM man pages don't indicate what function to use for dequeue. -+ I'm assuming it is aio_return! POSIX says aio_return may be called -+ only once on a given handle. */ -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ } /* if ((*request)->queued) */ -+ else *error_code = MPI_SUCCESS; -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if ((*request)->nbytes != -1) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#elif (!defined(NO_AIO) && !defined(AIO_SUN)) -+/* DEC, SGI IRIX 5 and 6 */ -+ if ((*request)->queued) { -+ do { -+ err = aio_suspend((const aiocb_t **) &((*request)->handle), 1, 0); -+ } while ((err == -1) && (errno == EINTR)); -+ -+ if (err != -1) { -+ err = aio_return((struct aiocb *) (*request)->handle); -+ (*request)->nbytes = err; -+ errno = aio_error((struct aiocb *) (*request)->handle); -+ } -+ else (*request)->nbytes = -1; -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ } /* if ((*request)->queued) */ -+ else *error_code = MPI_SUCCESS; -+#ifdef HAVE_STATUS_SET_BYTES -+ if ((*request)->nbytes != -1) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+#endif -+ -+#ifndef NO_AIO -+ if ((*request)->queued != -1) { -+ -+ /* queued = -1 is an internal hack used when the request must -+ be completed, but the request object should not be -+ freed. This is used in ADIOI_Complete_async, because the user -+ will call MPI_Wait later, which would require status to -+ be filled. Ugly but works. queued = -1 should be used only -+ in ADIOI_Complete_async. -+ This should not affect the user in any way. */ -+ -+ /* if request is still queued in the system, it is also there -+ on ADIOI_Async_list. Delete it from there. */ -+ if ((*request)->queued) ADIOI_Del_req_from_list(request); -+ -+ (*request)->fd->async_count--; -+ if ((*request)->handle) ADIOI_Free((*request)->handle); -+ ADIOI_Free_request((ADIOI_Req_node *) (*request)); -+ *request = ADIO_REQUEST_NULL; -+ } -+ -+#else -+/* HP, FreeBSD, Linux */ -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ (*request)->fd->async_count--; -+ ADIOI_Free_request((ADIOI_Req_node *) (*request)); -+ *request = ADIO_REQUEST_NULL; -+ *error_code = MPI_SUCCESS; -+#endif -+} -+ -+ -+void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status, int *error_code) -+{ -+ ADIOI_LUSTRE_ReadComplete(request, status, error_code); -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wrcoll.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wrcoll.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wrcoll.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wrcoll.c 2005-12-06 11:54:37.914126794 -0500 -@@ -0,0 +1,18 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_wrcoll.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_write.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_write.c ---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_write.c 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_write.c 2005-12-06 11:54:37.914126794 -0500 -@@ -0,0 +1,66 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_write.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int *error_code) -+{ -+ int err=-1, datatype_size, len; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_WRITECONTIG"; -+#endif -+ -+ MPI_Type_size(datatype, &datatype_size); -+ len = datatype_size * count; -+ -+ if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { -+ if (fd->fp_sys_posn != offset) -+ lseek(fd->fd_sys, offset, SEEK_SET); -+ err = write(fd->fd_sys, buf, len); -+ fd->fp_sys_posn = offset + err; -+ /* individual file pointer not updated */ -+ } -+ else { /* write from curr. location of ind. file pointer */ -+ if (fd->fp_sys_posn != fd->fp_ind) -+ lseek(fd->fd_sys, fd->fp_ind, SEEK_SET); -+ err = write(fd->fd_sys, buf, len); -+ fd->fp_ind += err; -+ fd->fp_sys_posn = fd->fp_ind; -+ } -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (err != -1 && status) MPIR_Status_set_bytes(status, datatype, err); -+#endif -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -+ -+ -+ -+void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/Makefile.in mpich-1.2.6/romio/adio/ad_lustre/Makefile.in ---- mpich-1.2.6/romio/adio/ad_lustre/Makefile.in 1969-12-31 19:00:00.000000000 -0500 -+++ mpich-1.2.6/romio/adio/ad_lustre/Makefile.in 2005-12-06 11:54:37.883130927 -0500 -@@ -0,0 +1,47 @@ -+CC = @CC@ -+AR = @AR@ -+LIBNAME = @LIBNAME@ -+srcdir = @srcdir@ -+CC_SHL = @CC_SHL@ -+SHLIBNAME = @SHLIBNAME@ -+ -+INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include -+CFLAGS = @CFLAGS@ $(INCLUDE_DIR) -+ -+C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR) -+ -+@VPATH@ -+ -+AD_LUSTRE_OBJECTS = ad_lustre_close.o ad_lustre_read.o \ -+ ad_lustre_open.o ad_lustre_write.o ad_lustre_done.o \ -+ ad_lustre_fcntl.o ad_lustre_iread.o ad_lustre_iwrite.o ad_lustre_wait.o \ -+ ad_lustre_resize.o ad_lustre_hints.o \ -+ ad_lustre.o -+ -+ -+default: $(LIBNAME) -+ @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ -+ $(MAKE) $(SHLIBNAME).la ;\ -+ fi -+ -+.SUFFIXES: $(SUFFIXES) .p .lo -+ -+.c.o: -+ $(CC) $(CFLAGS) -c $< -+.c.lo: -+ $(C_COMPILE_SHL) -c $< -+ @mv -f $*.o $*.lo -+ -+$(LIBNAME): $(AD_LUSTRE_OBJECTS) -+ $(AR) $(LIBNAME) $(AD_LUSTRE_OBJECTS) -+ -+AD_LUSTRE_LOOBJECTS=$(AD_LUSTRE_OBJECTS:.o=.lo) -+$(SHLIBNAME).la: $(AD_LUSTRE_LOOBJECTS) -+ $(AR) $(SHLIBNAME).la $(AD_LUSTRE_LOOBJECTS) -+ -+coverage: -+ -@for file in ${AD_LUSTRE_OBJECTS:.o=.c} ; do \ -+ gcov -b -f $$file ; done -+ -+clean: -+ @rm -f *.o *.lo ---- mpich-1.2.6/romio/Makefile.in 2004-01-27 18:27:35.000000000 -0500 -+++ mpich-1.2.6/romio/Makefile.in 2005-12-06 11:54:38.000000000 -0500 -@@ -14,7 +14,7 @@ DIRS = mpi-io adio/common - MPIO_DIRS = mpi-io - EXTRA_SRC_DIRS = @EXTRA_SRC_DIRS@ - FILE_SYS_DIRS = @FILE_SYS_DIRS@ --ALL_DIRS = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 test -+ALL_DIRS = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_lustre test - SHELL = /bin/sh - - @VPATH@ ---- mpich-1.2.6/romio/configure.in 2004-08-02 09:37:31.000000000 -0400 -+++ mpich-1.2.6/romio/configure.in 2005-12-06 11:54:38.000000000 -0500 -@@ -90,7 +90,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai - # - have_aio=no - # --known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs" -+known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs lustre" - known_mpi_impls="mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi" - # - # Defaults -@@ -1270,6 +1270,9 @@ fi - if test -n "$file_system_testfs"; then - AC_DEFINE(ROMIO_TESTFS,1,[Define for TESTFS]) - fi -+if test -n "$file_system_lustre"; then -+ AC_DEFINE(ROMIO_LUSTRE,1,[Define for LUSTRE]) -+fi - if test -n "$file_system_piofs"; then - AC_DEFINE(PIOFS,1,[Define for PIOFS]) - USER_CFLAGS="$USER_CFLAGS -bI:/usr/include/piofs/piofs.exp" -@@ -1634,7 +1637,7 @@ AC_OUTPUT(Makefile localdefs mpi-io/Make - adio/ad_nfs/Makefile adio/ad_ufs/Makefile \ - adio/ad_xfs/Makefile adio/ad_hfs/Makefile \ - adio/ad_sfs/Makefile adio/ad_pfs/Makefile \ -- adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \ -+ adio/ad_testfs/Makefile adio/ad_lustre/Makefile adio/ad_pvfs/Makefile \ - adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \ - mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \ - mpi2-other/array/fortran/Makefile test/fmisc.f \ ---- mpich-1.2.6/romio/configure 2004-08-04 12:08:28.000000000 -0400 -+++ mpich-1.2.6/romio/configure 2005-12-06 11:54:38.000000000 -0500 -@@ -623,7 +623,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai - # - have_aio=no - # --known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs" -+known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs lustre xfs hfs sfs" - known_mpi_impls="mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi" - # - # Defaults -@@ -4022,6 +4022,13 @@ if test -n "$file_system_testfs"; then - EOF - - fi -+if test -n "$file_system_lustre"; then -+ cat >> confdefs.h <<\EOF -+#define LUSTRE 1 -+EOF -+ -+fi -+ - if test -n "$file_system_piofs"; then - cat >> confdefs.h <<\EOF - #define PIOFS 1 -@@ -4746,7 +4753,7 @@ trap 'rm -fr `echo "Makefile localdefs m - adio/ad_xfs/Makefile adio/ad_hfs/Makefile \ - adio/ad_sfs/Makefile adio/ad_pfs/Makefile \ - adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \ -- adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \ -+ adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile adio/ad_lustre/Makefile\ - mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \ - mpi2-other/array/fortran/Makefile test/fmisc.f \ - test/fcoll_test.f test/pfcoll_test.f test/fperf.f adio/include/romioconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -@@ -4912,7 +4919,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile l - adio/ad_nfs/Makefile adio/ad_ufs/Makefile \ - adio/ad_xfs/Makefile adio/ad_hfs/Makefile \ - adio/ad_sfs/Makefile adio/ad_pfs/Makefile \ -- adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \ -+ adio/ad_testfs/Makefile adio/ad_lustre/Makefile adio/ad_pvfs/Makefile \ - adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \ - mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \ - mpi2-other/array/fortran/Makefile test/fmisc.f \ ---- mpich-1.2.6/romio/adio/include/romioconf.h.in 2004-08-04 12:08:28.000000000 -0400 -+++ mpich-1.2.6/romio/adio/include/romioconf.h.in 2005-12-06 11:54:38.000000000 -0500 -@@ -192,6 +192,9 @@ - /* Define for TESTFS */ - #undef ROMIO_TESTFS - -+/* Define for LUSTRE */ -+#undef LUSTRE -+ - /* Define for PIOFS */ - #undef PIOFS - ---- mpich-1.2.6/romio/adio/include/mpio_error.h 2002-11-15 11:26:23.000000000 -0500 -+++ mpich-1.2.6/romio/adio/include/mpio_error.h 2005-12-06 11:54:38.000000000 -0500 -@@ -62,6 +62,7 @@ - #define MPIR_ERR_FILETYPE 33 - #define MPIR_ERR_NO_NTFS 35 - #define MPIR_ERR_NO_TESTFS 36 -+#define MPIR_ERR_NO_LUSTRE 37 - - /* MPI_ERR_COMM */ - #ifndef MPIR_ERR_COMM_NULL ---- mpich-1.2.6/romio/adio/include/adioi_fs_proto.h 2003-06-24 18:48:23.000000000 -0400 -+++ mpich-1.2.6/romio/adio/include/adioi_fs_proto.h 2005-12-06 11:54:38.000000000 -0500 -@@ -261,6 +261,68 @@ ADIO_Offset ADIOI_UFS_SeekIndividual(ADI - void ADIOI_UFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); - #endif - -+#ifdef LUSTRE -+extern struct ADIOI_Fns_struct ADIO_LUSTRE_operations; -+ -+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code); -+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code); -+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code); -+void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code); -+int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int -+ *error_code); -+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status, -+ int *error_code); -+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int -+ *error_code); -+void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code); -+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code); -+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code); -+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); -+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset, -+ int whence, int *error_code); -+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); -+#endif -+ - #ifdef ROMIO_NTFS - extern struct ADIOI_Fns_struct ADIO_NTFS_operations; - ---- mpich-1.2.6/romio/adio/include/adio.h 2004-06-07 13:59:57.000000000 -0400 -+++ mpich-1.2.6/romio/adio/include/adio.h 2005-12-06 11:54:38.000000000 -0500 -@@ -276,6 +276,7 @@ typedef struct { - #define ADIO_NTFS 158 /* NTFS for Windows NT */ - #define ADIO_TESTFS 159 /* fake file system for testing */ - #define ADIO_PVFS2 160 /* PVFS2: 2nd generation PVFS */ -+#define ADIO_LUSTRE 161 /* Lustre */ - - #define ADIO_SEEK_SET SEEK_SET - #define ADIO_SEEK_CUR SEEK_CUR ---- mpich-1.2.6/romio/adio/common/setfn.c 2003-06-24 18:48:18.000000000 -0400 -+++ mpich-1.2.6/romio/adio/common/setfn.c 2005-12-06 11:54:38.000000000 -0500 -@@ -114,6 +114,16 @@ void ADIOI_SetFunctions(ADIO_File fd) - #endif - break; - -+ case ADIO_LUSTRE: -+#ifdef LUSTRE -+ *(fd->fns) = ADIO_LUSTRE_operations; -+#else -+ FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the LUSTRE file system\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+#endif -+ break; -+ -+ - default: - FPRINTF(stderr, "ADIOI_SetFunctions: Unsupported file system type\n"); - MPI_Abort(MPI_COMM_WORLD, 1); ---- mpich-1.2.6/romio/adio/common/ad_fstype.c 2003-09-04 16:24:44.000000000 -0400 -+++ mpich-1.2.6/romio/adio/common/ad_fstype.c 2005-12-06 11:54:38.000000000 -0500 -@@ -204,6 +204,11 @@ static void ADIO_FileSysType_fncall(char - } - } - #elif defined(LINUX) -+#warning use correct include -+# if defined (LUSTRE) -+#define LL_SUPER_MAGIC 0x0BD00BD0 -+# endif -+ - do { - err = statfs(filename, &fsbuf); - } while (err && (errno == ESTALE)); -@@ -218,6 +223,9 @@ static void ADIO_FileSysType_fncall(char - else { - /* FPRINTF(stderr, "%d\n", fsbuf.f_type);*/ - if (fsbuf.f_type == NFS_SUPER_MAGIC) *fstype = ADIO_NFS; -+# if defined (LUSTRE) -+ else if (fsbuf.f_type == LL_SUPER_MAGIC) *fstype = ADIO_LUSTRE; -+#endif - # if defined(ROMIO_PVFS) - else if (fsbuf.f_type == PVFS_SUPER_MAGIC) *fstype = ADIO_PVFS; - # endif -@@ -359,6 +367,11 @@ static void ADIO_FileSysType_prefix(char - { - *fstype = ADIO_TESTFS; - } -+ else if (!strncmp(filename, "lustre:", 7) -+ || !strncmp(filename, "LUSTRE:", 7)) -+ { -+ *fstype = ADIO_LUSTRE; -+ } - else { - #ifdef ROMIO_NTFS - *fstype = ADIO_NTFS; -@@ -644,6 +657,24 @@ void ADIO_ResolveFileType(MPI_Comm comm, - *ops = &ADIO_TESTFS_operations; - #endif - } -+ if (file_system == ADIO_LUSTRE) { -+#ifndef LUSTRE -+# ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0); -+ return; -+# elif defined(PRINT_ERR_MSG) -+ FPRINTF(stderr, "ADIO_ResolveFileType: ROMIO has not been configured to use the LUSTRE file system\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+# else /* MPICH-1 */ -+ myerrcode = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ERR_NO_LUSTRE, -+ myname, (char *) 0, (char *) 0); -+ *error_code = ADIOI_Error(MPI_FILE_NULL, myerrcode, myname); -+# endif -+ return; -+#else -+ *ops = &ADIO_LUSTRE_operations; -+#endif -+ } - *error_code = MPI_SUCCESS; - *fstype = file_system; - return; diff --git a/lustre/contrib/mpich2-1.0.3.patch b/lustre/contrib/mpich2-1.0.3.patch deleted file mode 100644 index 78dda9bef6..0000000000 --- a/lustre/contrib/mpich2-1.0.3.patch +++ /dev/null @@ -1,1831 +0,0 @@ -Date: Fri, 08 Jun 2007 14:04:34 -0400 -From: Weikuan Yu <weikuan.yu@gmail.com> -To: Weikuan Yu <weikuan.yu@gmail.com> -Subject: Re: [Lustre-discuss] MPI-IO for Lustre -Cc: lustre-discuss@clusterfs.com - - -This is the MPICH2 patch I originally started as a base for some ROMIO -optimizations over Lustre. It should work fine for MPICH2-1.0.3 on -experimental systems. However, use it as your risk :) - -Given time, I will try to push out my optimizations after some cleanup. I -would very happy to hear feedbacks on what features people would need most -at the time. - --- -Weikuan - - -diff -ruN romio-orig/adio/ad_lustre/ad_lustre.c romio/adio/ad_lustre/ad_lustre.c ---- romio-orig/adio/ad_lustre/ad_lustre.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre.c 2006-09-06 18:40:56.000844619 -0400 -@@ -0,0 +1,37 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 2001 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+/* adioi.h has the ADIOI_Fns_struct define */ -+#include "adioi.h" -+ -+struct ADIOI_Fns_struct ADIO_LUSTRE_operations = { -+ ADIOI_LUSTRE_Open, /* Open */ -+ ADIOI_LUSTRE_ReadContig, /* ReadContig */ -+ ADIOI_LUSTRE_WriteContig, /* WriteContig */ -+ ADIOI_GEN_ReadStridedColl, /* ReadStridedColl */ -+ ADIOI_GEN_WriteStridedColl, /* WriteStridedColl */ -+ ADIOI_GEN_SeekIndividual, /* SeekIndividual */ -+ ADIOI_LUSTRE_Fcntl, /* Fcntl */ -+ ADIOI_LUSTRE_SetInfo, /* SetInfo */ -+ ADIOI_GEN_ReadStrided, /* ReadStrided */ -+ ADIOI_GEN_WriteStrided, /* WriteStrided */ -+ ADIOI_LUSTRE_Close, /* Close */ -+ ADIOI_LUSTRE_IreadContig, /* IreadContig */ -+ ADIOI_LUSTRE_IwriteContig, /* IwriteContig */ -+ ADIOI_LUSTRE_ReadDone, /* ReadDone */ -+ ADIOI_LUSTRE_WriteDone, /* WriteDone */ -+ ADIOI_LUSTRE_ReadComplete, /* ReadComplete */ -+ ADIOI_LUSTRE_WriteComplete, /* WriteComplete */ -+ ADIOI_LUSTRE_IreadStrided, /* IreadStrided */ -+ ADIOI_LUSTRE_IwriteStrided, /* IwriteStrided */ -+ ADIOI_GEN_Flush, /* Flush */ -+ ADIOI_LUSTRE_Resize, /* Resize */ -+ ADIOI_GEN_Delete, /* Delete */ -+}; -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_close.c romio/adio/ad_lustre/ad_lustre_close.c ---- romio-orig/adio/ad_lustre/ad_lustre_close.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_close.c 2006-09-06 17:10:35.000683211 -0400 -@@ -0,0 +1,32 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_close.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code) -+{ -+ int err; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_CLOSE"; -+#endif -+ -+ err = close(fd->fd_sys); -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_done.c romio/adio/ad_lustre/ad_lustre_done.c ---- romio-orig/adio/ad_lustre/ad_lustre_done.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_done.c 2006-09-06 17:10:35.000692922 -0400 -@@ -0,0 +1,188 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_done.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code) -+{ -+#ifndef NO_AIO -+ int done=0; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_READDONE"; -+#endif -+#ifdef AIO_SUN -+ aio_result_t *result=0, *tmp; -+#else -+ int err; -+#endif -+#ifdef AIO_HANDLE_IN_AIOCB -+ struct aiocb *tmp1; -+#endif -+#endif -+ -+ if (*request == ADIO_REQUEST_NULL) { -+ *error_code = MPI_SUCCESS; -+ return 1; -+ } -+ -+#ifdef NO_AIO -+/* HP, FreeBSD, Linux */ -+#ifdef HAVE_STATUS_SET_BYTES -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ (*request)->fd->async_count--; -+ ADIOI_Free_request((ADIOI_Req_node *) (*request)); -+ *request = ADIO_REQUEST_NULL; -+ *error_code = MPI_SUCCESS; -+ return 1; -+#endif -+ -+#ifdef AIO_SUN -+ if ((*request)->queued) { -+ tmp = (aio_result_t *) (*request)->handle; -+ if (tmp->aio_return == AIO_INPROGRESS) { -+ done = 0; -+ *error_code = MPI_SUCCESS; -+ } -+ else if (tmp->aio_return != -1) { -+ result = (aio_result_t *) aiowait(0); /* dequeue any one request */ -+ done = 1; -+ (*request)->nbytes = tmp->aio_return; -+ *error_code = MPI_SUCCESS; -+ } -+ else { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(tmp->aio_errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(tmp->aio_errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ } /* if ((*request)->queued) ... */ -+ else { -+ /* ADIOI_Complete_Async completed this request, but request object -+ was not freed. */ -+ done = 1; -+ *error_code = MPI_SUCCESS; -+ } -+#ifdef HAVE_STATUS_SET_BYTES -+ if (done && ((*request)->nbytes != -1)) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#endif -+ -+#ifdef AIO_HANDLE_IN_AIOCB -+/* IBM */ -+ if ((*request)->queued) { -+ tmp1 = (struct aiocb *) (*request)->handle; -+ errno = aio_error(tmp1->aio_handle); -+ if (errno == EINPROG) { -+ done = 0; -+ *error_code = MPI_SUCCESS; -+ } -+ else { -+ err = aio_return(tmp1->aio_handle); -+ (*request)->nbytes = err; -+ errno = aio_error(tmp1->aio_handle); -+ -+ done = 1; -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ } -+ } /* if ((*request)->queued) */ -+ else { -+ done = 1; -+ *error_code = MPI_SUCCESS; -+ } -+#ifdef HAVE_STATUS_SET_BYTES -+ if (done && ((*request)->nbytes != -1)) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#elif (!defined(NO_AIO) && !defined(AIO_SUN)) -+/* DEC, SGI IRIX 5 and 6 */ -+ if ((*request)->queued) { -+ errno = aio_error((const struct aiocb *) (*request)->handle); -+ if (errno == EINPROGRESS) { -+ done = 0; -+ *error_code = MPI_SUCCESS; -+ } -+ else { -+ err = aio_return((struct aiocb *) (*request)->handle); -+ (*request)->nbytes = err; -+ errno = aio_error((struct aiocb *) (*request)->handle); -+ -+ done = 1; -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ } -+ } /* if ((*request)->queued) */ -+ else { -+ done = 1; -+ *error_code = MPI_SUCCESS; -+ } -+#ifdef HAVE_STATUS_SET_BYTES -+ if (done && ((*request)->nbytes != -1)) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#endif -+ -+#ifndef NO_AIO -+ if (done) { -+ /* if request is still queued in the system, it is also there -+ on ADIOI_Async_list. Delete it from there. */ -+ if ((*request)->queued) ADIOI_Del_req_from_list(request); -+ -+ (*request)->fd->async_count--; -+ if ((*request)->handle) ADIOI_Free((*request)->handle); -+ ADIOI_Free_request((ADIOI_Req_node *) (*request)); -+ *request = ADIO_REQUEST_NULL; -+ } -+ return done; -+#endif -+ -+} -+ -+ -+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code) -+{ -+ return ADIOI_LUSTRE_ReadDone(request, status, error_code); -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_fcntl.c romio/adio/ad_lustre/ad_lustre_fcntl.c ---- romio-orig/adio/ad_lustre/ad_lustre_fcntl.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_fcntl.c 2006-09-06 18:43:11.000365177 -0400 -@@ -0,0 +1,127 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_fcntl.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+#include "adio_extern.h" -+/* #ifdef MPISGI -+#include "mpisgi2.h" -+#endif */ -+ -+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code) -+{ -+ int i, ntimes; -+ ADIO_Offset curr_fsize, alloc_size, size, len, done; -+ ADIO_Status status; -+ char *buf; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_FCNTL"; -+#endif -+ -+ switch(flag) { -+ case ADIO_FCNTL_GET_FSIZE: -+ fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END); -+ if (fd->fp_sys_posn != -1) -+ lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); -+ if (fcntl_struct->fsize == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ break; -+ -+ case ADIO_FCNTL_SET_DISKSPACE: -+ /* will be called by one process only */ -+ /* On file systems with no preallocation function, I have to -+ explicitly write -+ to allocate space. Since there could be holes in the file, -+ I need to read up to the current file size, write it back, -+ and then write beyond that depending on how much -+ preallocation is needed. -+ read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */ -+ -+ curr_fsize = lseek(fd->fd_sys, 0, SEEK_END); -+ alloc_size = fcntl_struct->diskspace; -+ -+ size = ADIOI_MIN(curr_fsize, alloc_size); -+ -+ ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; -+ buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ); -+ done = 0; -+ -+ for (i=0; i<ntimes; i++) { -+ len = ADIOI_MIN(size-done, ADIOI_PREALLOC_BUFSZ); -+ ADIO_ReadContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done, -+ &status, error_code); -+ if (*error_code != MPI_SUCCESS) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ FPRINTF(stderr, "ADIOI_LUSTRE_Fcntl: To preallocate disk space, ROMIO needs to read the file and write it back, but is unable to read the file. Please give the file read permission and open it with MPI_MODE_RDWR.\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_PREALLOC_PERM, -+ myname, (char *) 0, (char *) 0); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ return; -+ } -+ ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, -+ done, &status, error_code); -+ if (*error_code != MPI_SUCCESS) return; -+ done += len; -+ } -+ -+ if (alloc_size > curr_fsize) { -+ memset(buf, 0, ADIOI_PREALLOC_BUFSZ); -+ size = alloc_size - curr_fsize; -+ ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; -+ for (i=0; i<ntimes; i++) { -+ len = ADIOI_MIN(alloc_size-done, ADIOI_PREALLOC_BUFSZ); -+ ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, -+ done, &status, error_code); -+ if (*error_code != MPI_SUCCESS) return; -+ done += len; -+ } -+ } -+ ADIOI_Free(buf); -+ if (fd->fp_sys_posn != -1) -+ lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); -+ *error_code = MPI_SUCCESS; -+ break; -+ -+#if 0 -+ case ADIO_FCNTL_SET_IOMODE: -+ /* for implementing PFS I/O modes. will not occur in MPI-IO -+ implementation.*/ -+ if (fd->iomode != fcntl_struct->iomode) { -+ fd->iomode = fcntl_struct->iomode; -+ MPI_Barrier(MPI_COMM_WORLD); -+ } -+ *error_code = MPI_SUCCESS; -+ break; -+#endif -+ -+ case ADIO_FCNTL_SET_ATOMICITY: -+ fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1; -+ *error_code = MPI_SUCCESS; -+ break; -+ -+ default: -+ FPRINTF(stderr, "Unknown flag passed to ADIOI_LUSTRE_Fcntl\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_flush.c romio/adio/ad_lustre/ad_lustre_flush.c ---- romio-orig/adio/ad_lustre/ad_lustre_flush.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_flush.c 2006-09-06 17:10:35.000711888 -0400 -@@ -0,0 +1,14 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_flush.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code) -+{ -+ ADIOI_GEN_Flush(fd, error_code); -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre.h romio/adio/ad_lustre/ad_lustre.h ---- romio-orig/adio/ad_lustre/ad_lustre.h 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre.h 2006-09-06 17:10:35.000722616 -0400 -@@ -0,0 +1,36 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre.h,v 1.2 2005/07/07 14:38:17 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#ifndef AD_UNIX_INCLUDE -+#define AD_UNIX_INCLUDE -+ -+/* temp*/ -+#define HAVE_ASM_TYPES_H 1 -+ -+#include <unistd.h> -+#include <linux/types.h> -+#include <fcntl.h> -+#include <sys/ioctl.h> -+#include "lustre/lustre_user.h" -+#include "adio.h" -+ -+#ifndef NO_AIO -+#ifdef AIO_SUN -+#include <sys/asynch.h> -+#else -+#include <aio.h> -+#ifdef NEEDS_ADIOCB_T -+typedef struct adiocb adiocb_t; -+#endif -+#endif -+#endif -+ -+int ADIOI_LUSTRE_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, -+ int wr, void *handle); -+ -+#endif -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_hints.c romio/adio/ad_lustre/ad_lustre_hints.c ---- romio-orig/adio/ad_lustre/ad_lustre_hints.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_hints.c 2006-09-06 17:10:35.000741994 -0400 -@@ -0,0 +1,130 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_hints.c,v 1.2 2005/07/07 14:38:17 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) -+{ -+ char *value, *value_in_fd; -+ int flag, tmp_val, str_factor=-1, str_unit=0, start_iodev=-1; -+ struct lov_user_md lum = { 0 }; -+ int err, myrank, fd_sys, perm, amode, old_mask; -+ -+ if ( (fd->info) == MPI_INFO_NULL) { -+ /* This must be part of the open call. can set striping parameters -+ if necessary. */ -+ MPI_Info_create(&(fd->info)); -+ -+ /* has user specified striping or server buffering parameters -+ and do they have the same value on all processes? */ -+ if (users_info != MPI_INFO_NULL) { -+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); -+ -+ MPI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ str_factor=atoi(value); -+ tmp_val = str_factor; -+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm); -+ if (tmp_val != str_factor) { -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"striping_factor\" must be the same on all processes\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ MPI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ str_unit=atoi(value); -+ tmp_val = str_unit; -+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm); -+ if (tmp_val != str_unit) { -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"striping_unit\" must be the same on all processes\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ MPI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, -+ value, &flag); -+ if (flag) { -+ start_iodev=atoi(value); -+ tmp_val = start_iodev; -+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm); -+ if (tmp_val != start_iodev) { -+ FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"start_iodevice\" must be the same on all processes\n"); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ /* if user has specified striping info, process 0 tries to set it */ -+ if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) { -+ MPI_Comm_rank(fd->comm, &myrank); -+ if (!myrank) { -+ if (fd->perm == ADIO_PERM_NULL) { -+ old_mask = umask(022); -+ umask(old_mask); -+ perm = old_mask ^ 0666; -+ } -+ else perm = fd->perm; -+ -+ amode = 0; -+ if (fd->access_mode & ADIO_CREATE) -+ amode = amode | O_CREAT; -+ if (fd->access_mode & ADIO_RDONLY) -+ amode = amode | O_RDONLY; -+ if (fd->access_mode & ADIO_WRONLY) -+ amode = amode | O_WRONLY; -+ if (fd->access_mode & ADIO_RDWR) -+ amode = amode | O_RDWR; -+ if (fd->access_mode & ADIO_EXCL) -+ amode = amode | O_EXCL; -+ -+ /* we need to create file so ensure this is set */ -+ amode = amode | O_LOV_DELAY_CREATE | O_CREAT; -+ -+ fd_sys = open(fd->filename, amode, perm); -+ if (fd_sys == -1) { -+ if (errno != EEXIST) -+ printf("Failure to open file %s %d %d\n",strerror(errno), amode, perm); -+ } else { -+ lum.lmm_magic = LOV_USER_MAGIC; -+ lum.lmm_pattern = 0; -+ lum.lmm_stripe_size = str_unit; -+ lum.lmm_stripe_count = str_factor; -+ lum.lmm_stripe_offset = start_iodev; -+ -+ err = ioctl(fd_sys, LL_IOC_LOV_SETSTRIPE, &lum); -+ if (err == -1 && errno != EEXIST) { -+ printf("Failure to set stripe info %s \n",strerror(errno)); -+ } -+ -+ close(fd_sys); -+ } -+ -+ } -+ MPI_Barrier(fd->comm); -+ } -+ -+ ADIOI_Free(value); -+ } -+ -+ /* set the values for collective I/O and data sieving parameters */ -+ ADIOI_GEN_SetInfo(fd, users_info, error_code); -+ } -+ -+ else { -+ /* The file has been opened previously and fd->fd_sys is a valid -+ file descriptor. cannot set striping parameters now. */ -+ -+ /* set the values for collective I/O and data sieving parameters */ -+ ADIOI_GEN_SetInfo(fd, users_info, error_code); -+ -+ } -+ -+ *error_code = MPI_SUCCESS; -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_iread.c romio/adio/ad_lustre/ad_lustre_iread.c ---- romio-orig/adio/ad_lustre/ad_lustre_iread.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_iread.c 2006-09-06 17:10:35.000751765 -0400 -@@ -0,0 +1,106 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_iread.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int *error_code) -+{ -+ int len, typesize; -+#ifdef NO_AIO -+ ADIO_Status status; -+#else -+ int err=-1; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_IREADCONTIG"; -+#endif -+#endif -+ -+ (*request) = ADIOI_Malloc_request(); -+ (*request)->optype = ADIOI_READ; -+ (*request)->fd = fd; -+ (*request)->datatype = datatype; -+ -+ MPI_Type_size(datatype, &typesize); -+ len = count * typesize; -+ -+#ifdef NO_AIO -+ /* HP, FreeBSD, Linux */ -+ /* no support for nonblocking I/O. Use blocking I/O. */ -+ -+ ADIOI_LUSTRE_ReadContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset, -+ &status, error_code); -+ (*request)->queued = 0; -+#ifdef HAVE_STATUS_SET_BYTES -+ if (*error_code == MPI_SUCCESS) { -+ MPI_Get_elements(&status, MPI_BYTE, &len); -+ (*request)->nbytes = len; -+ } -+#endif -+ -+#else -+ if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind; -+ err = ADIOI_LUSTRE_aio(fd, buf, len, offset, 0, &((*request)->handle)); -+ if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; -+ -+ (*request)->queued = 1; -+ ADIOI_Add_req_to_list(request); -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+#endif /* NO_AIO */ -+ -+ fd->fp_sys_posn = -1; /* set it to null. */ -+ fd->async_count++; -+} -+ -+ -+ -+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code) -+{ -+ ADIO_Status status; -+#ifdef HAVE_STATUS_SET_BYTES -+ int typesize; -+#endif -+ -+ *request = ADIOI_Malloc_request(); -+ (*request)->optype = ADIOI_READ; -+ (*request)->fd = fd; -+ (*request)->datatype = datatype; -+ (*request)->queued = 0; -+ (*request)->handle = 0; -+ -+/* call the blocking version. It is faster because it does data sieving. */ -+ ADIOI_LUSTRE_ReadStrided(fd, buf, count, datatype, file_ptr_type, -+ offset, &status, error_code); -+ -+ fd->async_count++; -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (*error_code == MPI_SUCCESS) { -+ MPI_Type_size(datatype, &typesize); -+ (*request)->nbytes = count * typesize; -+ } -+#endif -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_iwrite.c romio/adio/ad_lustre/ad_lustre_iwrite.c ---- romio-orig/adio/ad_lustre/ad_lustre_iwrite.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_iwrite.c 2006-09-06 17:10:35.000761678 -0400 -@@ -0,0 +1,268 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_iwrite.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int *error_code) -+{ -+ int len, typesize; -+#ifdef NO_AIO -+ ADIO_Status status; -+#else -+ int err=-1; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_IWRITECONTIG"; -+#endif -+#endif -+ -+ *request = ADIOI_Malloc_request(); -+ (*request)->optype = ADIOI_WRITE; -+ (*request)->fd = fd; -+ (*request)->datatype = datatype; -+ -+ MPI_Type_size(datatype, &typesize); -+ len = count * typesize; -+ -+#ifdef NO_AIO -+ /* HP, FreeBSD, Linux */ -+ /* no support for nonblocking I/O. Use blocking I/O. */ -+ -+ ADIOI_LUSTRE_WriteContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset, -+ &status, error_code); -+ (*request)->queued = 0; -+#ifdef HAVE_STATUS_SET_BYTES -+ if (*error_code == MPI_SUCCESS) { -+ MPI_Get_elements(&status, MPI_BYTE, &len); -+ (*request)->nbytes = len; -+ } -+#endif -+ -+#else -+ if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind; -+ err = ADIOI_LUSTRE_aio(fd, buf, len, offset, 1, &((*request)->handle)); -+ if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; -+ -+ (*request)->queued = 1; -+ ADIOI_Add_req_to_list(request); -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+#endif /* NO_AIO */ -+ -+ fd->fp_sys_posn = -1; /* set it to null. */ -+ fd->async_count++; -+} -+ -+ -+ -+ -+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code) -+{ -+ ADIO_Status status; -+#ifdef HAVE_STATUS_SET_BYTES -+ int typesize; -+#endif -+ -+ *request = ADIOI_Malloc_request(); -+ (*request)->optype = ADIOI_WRITE; -+ (*request)->fd = fd; -+ (*request)->datatype = datatype; -+ (*request)->queued = 0; -+ (*request)->handle = 0; -+ -+/* call the blocking version. It is faster because it does data sieving. */ -+ ADIOI_LUSTRE_WriteStrided(fd, buf, count, datatype, file_ptr_type, -+ offset, &status, error_code); -+ -+ fd->async_count++; -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (*error_code == MPI_SUCCESS) { -+ MPI_Type_size(datatype, &typesize); -+ (*request)->nbytes = count * typesize; -+ } -+#endif -+} -+ -+ -+/* This function is for implementation convenience. It is not user-visible. -+ It takes care of the differences in the interface for nonblocking I/O -+ on various Unix machines! If wr==1 write, wr==0 read. */ -+ -+int ADIOI_LUSTRE_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, -+ int wr, void *handle) -+{ -+ int err=-1, fd_sys; -+ -+#ifndef NO_AIO -+ int error_code; -+#ifdef AIO_SUN -+ aio_result_t *result; -+#else -+ struct aiocb *aiocbp; -+#endif -+#endif -+ -+ fd_sys = fd->fd_sys; -+ -+#ifdef AIO_SUN -+ result = (aio_result_t *) ADIOI_Malloc(sizeof(aio_result_t)); -+ result->aio_return = AIO_INPROGRESS; -+ if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); -+ else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result); -+ -+ if (err == -1) { -+ if (errno == EAGAIN) { -+ /* the man pages say EPROCLIM, but in reality errno is set to EAGAIN! */ -+ -+ /* exceeded the max. no. of outstanding requests. -+ complete all previous async. requests and try again.*/ -+ -+ ADIOI_Complete_async(&error_code); -+ if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); -+ else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result); -+ -+ while (err == -1) { -+ if (errno == EAGAIN) { -+ /* sleep and try again */ -+ sleep(1); -+ if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); -+ else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result); -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ *((aio_result_t **) handle) = result; -+#endif -+ -+#ifdef NO_FD_IN_AIOCB -+/* IBM */ -+ aiocbp = (struct aiocb *) ADIOI_Malloc(sizeof(struct aiocb)); -+ aiocbp->aio_whence = SEEK_SET; -+ aiocbp->aio_offset = offset; -+ aiocbp->aio_buf = buf; -+ aiocbp->aio_nbytes = len; -+ if (wr) err = aio_write(fd_sys, aiocbp); -+ else err = aio_read(fd_sys, aiocbp); -+ -+ if (err == -1) { -+ if (errno == EAGAIN) { -+ /* exceeded the max. no. of outstanding requests. -+ complete all previous async. requests and try again. */ -+ -+ ADIOI_Complete_async(&error_code); -+ if (wr) err = aio_write(fd_sys, aiocbp); -+ else err = aio_read(fd_sys, aiocbp); -+ -+ while (err == -1) { -+ if (errno == EAGAIN) { -+ /* sleep and try again */ -+ sleep(1); -+ if (wr) err = aio_write(fd_sys, aiocbp); -+ else err = aio_read(fd_sys, aiocbp); -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ *((struct aiocb **) handle) = aiocbp; -+ -+#elif (!defined(NO_AIO) && !defined(AIO_SUN)) -+/* DEC, SGI IRIX 5 and 6 */ -+ -+ aiocbp = (struct aiocb *) ADIOI_Calloc(sizeof(struct aiocb), 1); -+ aiocbp->aio_fildes = fd_sys; -+ aiocbp->aio_offset = offset; -+ aiocbp->aio_buf = buf; -+ aiocbp->aio_nbytes = len; -+ -+#ifdef AIO_PRIORITY_DEFAULT -+/* DEC */ -+ aiocbp->aio_reqprio = AIO_PRIO_DFL; /* not needed in DEC Unix 4.0 */ -+ aiocbp->aio_sigevent.sigev_signo = 0; -+#else -+ aiocbp->aio_reqprio = 0; -+#endif -+ -+#ifdef AIO_SIGNOTIFY_NONE -+/* SGI IRIX 6 */ -+ aiocbp->aio_sigevent.sigev_notify = SIGEV_NONE; -+#else -+ aiocbp->aio_sigevent.sigev_signo = 0; -+#endif -+ -+ if (wr) err = aio_write(aiocbp); -+ else err = aio_read(aiocbp); -+ -+ if (err == -1) { -+ if (errno == EAGAIN) { -+ /* exceeded the max. no. of outstanding requests. -+ complete all previous async. requests and try again. */ -+ -+ ADIOI_Complete_async(&error_code); -+ if (wr) err = aio_write(aiocbp); -+ else err = aio_read(aiocbp); -+ -+ while (err == -1) { -+ if (errno == EAGAIN) { -+ /* sleep and try again */ -+ sleep(1); -+ if (wr) err = aio_write(aiocbp); -+ else err = aio_read(aiocbp); -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ } -+ else { -+ FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno); -+ MPI_Abort(MPI_COMM_WORLD, 1); -+ } -+ } -+ -+ *((struct aiocb **) handle) = aiocbp; -+#endif -+ -+ return err; -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_open.c romio/adio/ad_lustre/ad_lustre_open.c ---- romio-orig/adio/ad_lustre/ad_lustre_open.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_open.c 2006-09-06 17:10:35.000771351 -0400 -@@ -0,0 +1,100 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_open.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code) -+{ -+ int perm, old_mask, amode; -+ struct lov_user_md lum = { 0 }; -+ char *value; -+ -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_OPEN"; -+#endif -+ -+ if (fd->perm == ADIO_PERM_NULL) { -+ old_mask = umask(022); -+ umask(old_mask); -+ perm = old_mask ^ 0666; -+ } -+ else perm = fd->perm; -+ -+ amode = 0; -+ if (fd->access_mode & ADIO_CREATE) -+ amode = amode | O_CREAT; -+ if (fd->access_mode & ADIO_RDONLY) -+ amode = amode | O_RDONLY; -+ if (fd->access_mode & ADIO_WRONLY) -+ amode = amode | O_WRONLY; -+ if (fd->access_mode & ADIO_RDWR) -+ amode = amode | O_RDWR; -+ if (fd->access_mode & ADIO_EXCL) -+ amode = amode | O_EXCL; -+ -+ fd->fd_sys = open(fd->filename, amode, perm); -+ -+ if (fd->fd_sys != -1) { -+ int err; -+ -+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); -+ -+ /* get file striping information and set it in info */ -+ lum.lmm_magic = LOV_USER_MAGIC; -+ err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *) &lum); -+ -+ if (!err) { -+ sprintf(value, "%d", lum.lmm_stripe_size); -+ MPI_Info_set(fd->info, "striping_unit", value); -+ -+ sprintf(value, "%d", lum.lmm_stripe_count); -+ MPI_Info_set(fd->info, "striping_factor", value); -+ -+ sprintf(value, "%d", lum.lmm_stripe_offset); -+ MPI_Info_set(fd->info, "start_iodevice", value); -+ } -+ ADIOI_Free(value); -+ -+ if (fd->access_mode & ADIO_APPEND) -+ fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); -+ } -+ -+ -+ if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND)) -+ fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); -+ -+ if (fd->fd_sys == -1) { -+#ifdef MPICH2 -+ if (errno == ENAMETOOLONG) -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_BAD_FILE, "**filenamelong", "**filenamelong %s %d", fd->filename, strlen(fd->filename)); -+ else if (errno == ENOENT) -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_NO_SUCH_FILE, "**filenoexist", "**filenoexist %s", fd->filename); -+ else if (errno == ENOTDIR || errno == ELOOP) -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_BAD_FILE, "**filenamedir", "**filenamedir %s", fd->filename); -+ else if (errno == EACCES) { -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_ACCESS, "**fileaccess", "**fileaccess %s", -+ fd->filename); -+ } -+ else if (errno == EROFS) { -+ /* Read only file or file system and write access requested */ -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_READ_ONLY, "**ioneedrd", 0); -+ } -+ else { -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ } -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(ADIO_FILE_NULL, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c romio/adio/ad_lustre/ad_lustre_rdcoll.c ---- romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_rdcoll.c 2006-09-06 17:10:35.000780880 -0400 -@@ -0,0 +1,18 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_rdcoll.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_read.c romio/adio/ad_lustre/ad_lustre_read.c ---- romio-orig/adio/ad_lustre/ad_lustre_read.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_read.c 2006-09-06 17:10:35.000790846 -0400 -@@ -0,0 +1,67 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_read.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int *error_code) -+{ -+ int err=-1, datatype_size, len; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_READCONTIG"; -+#endif -+ -+ MPI_Type_size(datatype, &datatype_size); -+ len = datatype_size * count; -+ -+ if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { -+ if (fd->fp_sys_posn != offset) -+ lseek(fd->fd_sys, offset, SEEK_SET); -+ err = read(fd->fd_sys, buf, len); -+ fd->fp_sys_posn = offset + len; -+ /* individual file pointer not updated */ -+ } -+ else { /* read from curr. location of ind. file pointer */ -+ if (fd->fp_sys_posn != fd->fp_ind) -+ lseek(fd->fd_sys, fd->fp_ind, SEEK_SET); -+ err = read(fd->fd_sys, buf, len); -+ fd->fp_ind += err; -+ fd->fp_sys_posn = fd->fp_ind; -+ } -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (err != -1) MPIR_Status_set_bytes(status, datatype, err); -+#endif -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -+ -+ -+ -+ -+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_ReadStrided(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_resize.c romio/adio/ad_lustre/ad_lustre_resize.c ---- romio-orig/adio/ad_lustre/ad_lustre_resize.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_resize.c 2006-09-06 17:10:35.000807397 -0400 -@@ -0,0 +1,32 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_resize.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) -+{ -+ int err; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_RESIZE"; -+#endif -+ -+ err = ftruncate(fd->fd_sys, size); -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_seek.c romio/adio/ad_lustre/ad_lustre_seek.c ---- romio-orig/adio/ad_lustre/ad_lustre_seek.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_seek.c 2006-09-06 17:10:35.000816583 -0400 -@@ -0,0 +1,15 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_seek.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset, -+ int whence, int *error_code) -+{ -+ return ADIOI_GEN_SeekIndividual(fd, offset, whence, error_code); -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_wait.c romio/adio/ad_lustre/ad_lustre_wait.c ---- romio-orig/adio/ad_lustre/ad_lustre_wait.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_wait.c 2006-09-06 18:45:39.000190529 -0400 -@@ -0,0 +1,188 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_wait.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int *error_code) -+{ -+#ifndef NO_AIO -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_READCOMPLETE"; -+#endif -+#ifdef AIO_SUN -+ aio_result_t *result=0, *tmp; -+#else -+ int err; -+#endif -+#ifdef AIO_HANDLE_IN_AIOCB -+ struct aiocb *tmp1; -+#endif -+#endif -+ -+ if (*request == ADIO_REQUEST_NULL) { -+ *error_code = MPI_SUCCESS; -+ return; -+ } -+ -+#ifdef AIO_SUN -+ if ((*request)->queued) { /* dequeue it */ -+ tmp = (aio_result_t *) (*request)->handle; -+ while (tmp->aio_return == AIO_INPROGRESS) usleep(1000); -+ /* sleep for 1 ms., until done. Is 1 ms. a good number? */ -+ /* when done, dequeue any one request */ -+ result = (aio_result_t *) aiowait(0); -+ -+ (*request)->nbytes = tmp->aio_return; -+ -+ if (tmp->aio_return == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(tmp->aio_errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(tmp->aio_errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ -+/* aiowait only dequeues a request. The completion of a request can be -+ checked by just checking the aio_return flag in the handle passed -+ to the original aioread()/aiowrite(). Therefore, I need to ensure -+ that aiowait() is called exactly once for each previous -+ aioread()/aiowrite(). This is also taken care of in ADIOI_xxxDone */ -+ } -+ else *error_code = MPI_SUCCESS; -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if ((*request)->nbytes != -1) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#endif -+ -+#ifdef AIO_HANDLE_IN_AIOCB -+/* IBM */ -+ if ((*request)->queued) { -+ do { -+ err = aio_suspend(1, (struct aiocb **) &((*request)->handle)); -+ } while ((err == -1) && (errno == EINTR)); -+ -+ tmp1 = (struct aiocb *) (*request)->handle; -+ if (err != -1) { -+ err = aio_return(tmp1->aio_handle); -+ (*request)->nbytes = err; -+ errno = aio_error(tmp1->aio_handle); -+ } -+ else (*request)->nbytes = -1; -+ -+/* on DEC, it is required to call aio_return to dequeue the request. -+ IBM man pages don't indicate what function to use for dequeue. -+ I'm assuming it is aio_return! POSIX says aio_return may be called -+ only once on a given handle. */ -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ } /* if ((*request)->queued) */ -+ else *error_code = MPI_SUCCESS; -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if ((*request)->nbytes != -1) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ -+#elif (!defined(NO_AIO) && !defined(AIO_SUN)) -+/* DEC, SGI IRIX 5 and 6 */ -+ if ((*request)->queued) { -+ do { -+ err = aio_suspend((const struct aiocb_t **) &((*request)->handle), 1, 0); -+ } while ((err == -1) && (errno == EINTR)); -+ -+ if (err != -1) { -+ err = aio_return((struct aiocb *) (*request)->handle); -+ (*request)->nbytes = err; -+ errno = aio_error((struct aiocb *) (*request)->handle); -+ } -+ else (*request)->nbytes = -1; -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+ return; -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else /* MPICH-1 */ -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error((*request)->fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+ } /* if ((*request)->queued) */ -+ else *error_code = MPI_SUCCESS; -+#ifdef HAVE_STATUS_SET_BYTES -+ if ((*request)->nbytes != -1) -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+#endif -+ -+#ifndef NO_AIO -+ if ((*request)->queued != -1) { -+ -+ /* queued = -1 is an internal hack used when the request must -+ be completed, but the request object should not be -+ freed. This is used in ADIOI_Complete_async, because the user -+ will call MPI_Wait later, which would require status to -+ be filled. Ugly but works. queued = -1 should be used only -+ in ADIOI_Complete_async. -+ This should not affect the user in any way. */ -+ -+ /* if request is still queued in the system, it is also there -+ on ADIOI_Async_list. Delete it from there. */ -+ if ((*request)->queued) ADIOI_Del_req_from_list(request); -+ -+ (*request)->fd->async_count--; -+ if ((*request)->handle) ADIOI_Free((*request)->handle); -+ ADIOI_Free_request((ADIOI_Req_node *) (*request)); -+ *request = ADIO_REQUEST_NULL; -+ } -+ -+#else -+/* HP, FreeBSD, Linux */ -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); -+#endif -+ (*request)->fd->async_count--; -+ ADIOI_Free_request((ADIOI_Req_node *) (*request)); -+ *request = ADIO_REQUEST_NULL; -+ *error_code = MPI_SUCCESS; -+#endif -+} -+ -+ -+void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status, int *error_code) -+{ -+ ADIOI_LUSTRE_ReadComplete(request, status, error_code); -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c romio/adio/ad_lustre/ad_lustre_wrcoll.c ---- romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_wrcoll.c 2006-09-06 17:10:35.000835460 -0400 -@@ -0,0 +1,18 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_wrcoll.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -ruN romio-orig/adio/ad_lustre/ad_lustre_write.c romio/adio/ad_lustre/ad_lustre_write.c ---- romio-orig/adio/ad_lustre/ad_lustre_write.c 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/ad_lustre_write.c 2006-09-06 17:10:35.000844658 -0400 -@@ -0,0 +1,66 @@ -+/* -*- Mode: C; c-basic-offset:4 ; -*- */ -+/* -+ * $Id: ad_lustre_write.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $ -+ * -+ * Copyright (C) 1997 University of Chicago. -+ * See COPYRIGHT notice in top-level directory. -+ */ -+ -+#include "ad_lustre.h" -+ -+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int *error_code) -+{ -+ int err=-1, datatype_size, len; -+#if defined(MPICH2) || !defined(PRINT_ERR_MSG) -+ static char myname[] = "ADIOI_LUSTRE_WRITECONTIG"; -+#endif -+ -+ MPI_Type_size(datatype, &datatype_size); -+ len = datatype_size * count; -+ -+ if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { -+ if (fd->fp_sys_posn != offset) -+ lseek(fd->fd_sys, offset, SEEK_SET); -+ err = write(fd->fd_sys, buf, len); -+ fd->fp_sys_posn = offset + err; -+ /* individual file pointer not updated */ -+ } -+ else { /* write from curr. location of ind. file pointer */ -+ if (fd->fp_sys_posn != fd->fp_ind) -+ lseek(fd->fd_sys, fd->fp_ind, SEEK_SET); -+ err = write(fd->fd_sys, buf, len); -+ fd->fp_ind += err; -+ fd->fp_sys_posn = fd->fp_ind; -+ } -+ -+#ifdef HAVE_STATUS_SET_BYTES -+ if (err != -1 && status) MPIR_Status_set_bytes(status, datatype, err); -+#endif -+ -+ if (err == -1) { -+#ifdef MPICH2 -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", -+ "**io %s", strerror(errno)); -+#elif defined(PRINT_ERR_MSG) -+ *error_code = MPI_ERR_UNKNOWN; -+#else -+ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, -+ myname, "I/O Error", "%s", strerror(errno)); -+ ADIOI_Error(fd, *error_code, myname); -+#endif -+ } -+ else *error_code = MPI_SUCCESS; -+} -+ -+ -+ -+void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code) -+{ -+ ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type, -+ offset, status, error_code); -+} -diff -ruN romio-orig/adio/ad_lustre/Makefile.in romio/adio/ad_lustre/Makefile.in ---- romio-orig/adio/ad_lustre/Makefile.in 1969-12-31 19:00:00.000000000 -0500 -+++ romio/adio/ad_lustre/Makefile.in 2006-09-06 18:48:56.000800829 -0400 -@@ -0,0 +1,51 @@ -+CC = @CC@ -+AR = @AR@ -+RANLIB = @RANLIB@ -+LIBNAME = @LIBNAME@ -+srcdir = @srcdir@ -+CC_SHL = @CC_SHL@ -+SHLIBNAME = @SHLIBNAME@ -+ -+INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include -I../../include -I${srcdir}/../../../../include -I../../../../include -+CFLAGS = @CPPFLAGS@ @CFLAGS@ $(INCLUDE_DIR) -+ -+top_builddir = @master_topbuild_dir@ -+LIBTOOL = @LIBTOOL@ -+C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR) -+ -+@VPATH@ -+ -+AD_LUSTRE_OBJECTS = ad_lustre.o ad_lustre_close.o ad_lustre_read.o \ -+ ad_lustre_open.o ad_lustre_write.o ad_lustre_done.o \ -+ ad_lustre_fcntl.o ad_lustre_iread.o ad_lustre_iwrite.o ad_lustre_wait.o \ -+ ad_lustre_resize.o ad_lustre_hints.o -+ -+default: $(LIBNAME) -+ @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ -+ $(MAKE) $(SHLIBNAME).la ;\ -+ fi -+ -+.SUFFIXES: $(SUFFIXES) .p .lo -+ -+.c.o: -+ $(CC) $(CFLAGS) -c $< -+.c.lo: -+ $(C_COMPILE_SHL) -c $< -o _s$*.o -+ @mv -f _s$*.o $*.lo -+# $(C_COMPILE_SHL) -c $< -+# @mv -f $*.o $*.lo -+ -+$(LIBNAME): $(AD_LUSTRE_OBJECTS) -+ $(AR) $(LIBNAME) $(AD_LUSTRE_OBJECTS) -+ $(RANLIB) $(LIBNAME) -+ -+AD_LUSTRE_LOOBJECTS=$(AD_LUSTRE_OBJECTS:.o=.lo) -+$(SHLIBNAME).la: $(AD_LUSTRE_LOOBJECTS) -+ $(AR) $(SHLIBNAME).la $(AD_LUSTRE_LOOBJECTS) -+ -+coverage: -+ -@for file in ${AD_LUSTRE_OBJECTS:.o=.c} ; do \ -+ gcov -b -f $$file ; done -+ -+clean: -+ @rm -f *.o *.lo -diff -ruN romio-orig/adio/common/ad_fstype.c romio/adio/common/ad_fstype.c ---- romio-orig/adio/common/ad_fstype.c 2005-08-11 19:33:46.000000000 -0400 -+++ romio/adio/common/ad_fstype.c 2006-09-06 17:41:20.000830936 -0400 -@@ -265,6 +265,9 @@ - /* if UFS support is enabled, default to that */ - *fstype = ADIO_UFS; - return; -+# elif defined(LINUX) && defined(ROMIO_LUSTRE) -+# warning use correct include -+# define LL_SUPER_MAGIC 0x0BD00BD0 - # endif - - /* --BEGIN ERROR HANDLING-- */ -@@ -308,6 +311,13 @@ - } - # endif - -+# ifdef LL_SUPER_MAGIC -+ if (fsbuf.f_type == LL_SUPER_MAGIC) { -+ *fstype = ADIO_LUSTRE; -+ return; -+ } -+# endif -+ - # ifdef PAN_KERNEL_FS_CLIENT_SUPER_MAGIC - if (fsbuf.f_type == PAN_KERNEL_FS_CLIENT_SUPER_MAGIC) { - *fstype = ADIO_PANFS; -@@ -458,6 +468,11 @@ - { - *fstype = ADIO_GRIDFTP; - } -+ else if (!strncmp(filename, "lustre:", 7) -+ || !strncmp(filename, "LUSTRE:", 7)) -+ { -+ *fstype = ADIO_LUSTRE; -+ } - else { - #ifdef ROMIO_NTFS - *fstype = ADIO_NTFS; -@@ -657,6 +672,14 @@ - *ops = &ADIO_GRIDFTP_operations; - #endif - } -+ if (file_system == ADIO_LUSTRE) { -+#ifndef ROMIO_LUSTRE -+ *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0); -+ return; -+#else -+ *ops = &ADIO_LUSTRE_operations; -+#endif -+ } - *error_code = MPI_SUCCESS; - *fstype = file_system; - return; -diff -ruN romio-orig/adio/include/adio.h romio/adio/include/adio.h ---- romio-orig/adio/include/adio.h 2006-06-09 17:45:04.000000000 -0400 -+++ romio/adio/include/adio.h 2006-09-06 17:44:16.000614058 -0400 -@@ -302,6 +302,7 @@ - #define ADIO_PVFS2 160 /* PVFS2: 2nd generation PVFS */ - #define ADIO_PANFS 161 /* Panasas FS */ - #define ADIO_GRIDFTP 162 /* Globus GridFTP */ -+#define ADIO_LUSTRE 163 /* Lustre */ - - #define ADIO_SEEK_SET SEEK_SET - #define ADIO_SEEK_CUR SEEK_CUR -diff -ruN romio-orig/adio/include/adioi_fs_proto.h romio/adio/include/adioi_fs_proto.h ---- romio-orig/adio/include/adioi_fs_proto.h 2005-06-08 17:16:39.000000000 -0400 -+++ romio/adio/include/adioi_fs_proto.h 2006-09-06 17:48:11.000523566 -0400 -@@ -49,6 +49,68 @@ - /* prototypes are in adio/ad_sfs/ad_sfs.h */ - #endif - -+#ifdef ROMIO_LUSTRE -+extern struct ADIOI_Fns_struct ADIO_LUSTRE_operations; -+ -+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code); -+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code); -+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code); -+void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code); -+int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int -+ *error_code); -+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status, -+ int *error_code); -+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int -+ *error_code); -+void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Status *status, int -+ *error_code); -+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code); -+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count, -+ MPI_Datatype datatype, int file_ptr_type, -+ ADIO_Offset offset, ADIO_Request *request, int -+ *error_code); -+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code); -+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); -+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset, -+ int whence, int *error_code); -+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); -+#endif -+ - #ifdef ROMIO_NTFS - extern struct ADIOI_Fns_struct ADIO_NTFS_operations; - /* prototypes are in adio/ad_ntfs/ad_ntfs.h */ -diff -ruN romio-orig/adio/include/mpio_error.h romio/adio/include/mpio_error.h ---- romio-orig/adio/include/mpio_error.h 2005-05-23 19:27:50.000000000 -0400 -+++ romio/adio/include/mpio_error.h 2006-09-06 17:10:35.000984078 -0400 -@@ -63,6 +63,7 @@ - #define MPIR_ERR_FILETYPE 33 - #define MPIR_ERR_NO_NTFS 35 - #define MPIR_ERR_NO_TESTFS 36 -+#define MPIR_ERR_NO_LUSTRE 37 - - /* MPI_ERR_COMM */ - #ifndef MPIR_ERR_COMM_NULL -diff -ruN romio-orig/adio/include/romioconf.h.in romio/adio/include/romioconf.h.in ---- romio-orig/adio/include/romioconf.h.in 2006-08-11 09:48:44.000000000 -0400 -+++ romio/adio/include/romioconf.h.in 2006-09-06 17:43:08.000599274 -0400 -@@ -276,6 +276,9 @@ - /* Define for ROMIO with PVFS2 */ - #undef ROMIO_PVFS2 - -+/* Define for ROMIO with LUSTRE */ -+#undef ROMIO_LUSTRE -+ - /* Define if int64_t must be defined for PVFS */ - #undef ROMIO_PVFS_NEEDS_INT64_DEFINITION - -diff -ruN romio-orig/configure romio/configure ---- romio-orig/configure 2006-08-11 09:48:45.000000000 -0400 -+++ romio/configure 2006-09-06 17:20:57.000555513 -0400 -@@ -1400,7 +1400,7 @@ - # - have_aio=no - # --known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp" -+known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre" - known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi" - # - # Defaults -@@ -7490,6 +7490,14 @@ - - fi - -+if test -n "$file_system_lustre"; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define ROMIO_LUSTRE 1 -+_ACEOF -+ -+fi -+ - # - # Check for presence and characteristics of async. I/O calls if - # not disabled. -@@ -11977,7 +11985,7 @@ - # are active will be called by the top level ROMIO make - ac_config_commands="$ac_config_commands default-1" - -- ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile" -+ ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile adio/ad_lustre/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile" - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure - # tests run on this system so they can be shared between configure -@@ -12535,6 +12543,7 @@ - "adio/ad_pvfs/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs/Makefile" ;; - "adio/ad_pvfs2/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs2/Makefile" ;; - "adio/ad_gridftp/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_gridftp/Makefile" ;; -+ "adio/ad_lustre/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_lustre/Makefile" ;; - "mpi-io/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi-io/fortran/Makefile" ;; - "mpi2-other/info/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/info/fortran/Makefile" ;; - "mpi2-other/array/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/array/fortran/Makefile" ;; -diff -ruN romio-orig/configure.in romio/configure.in ---- romio-orig/configure.in 2006-07-24 17:55:57.000000000 -0400 -+++ romio/configure.in 2006-09-06 17:16:13.000525117 -0400 -@@ -93,7 +93,7 @@ - # - have_aio=no - # --known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp" -+known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre" - known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi" - # - # Defaults -@@ -1062,6 +1062,9 @@ - if test -n "$file_system_testfs"; then - AC_DEFINE(ROMIO_TESTFS,1,[Define for ROMIO with TESTFS]) - fi -+if test -n "$file_system_lustre"; then -+ AC_DEFINE(ROMIO_LUSTRE,1,[Define for ROMIO with LUSTRE]) -+fi - - if test -n "$file_system_xfs"; then - AC_DEFINE(ROMIO_XFS,1,[Define for ROMIO with XFS]) -@@ -2024,6 +2027,7 @@ - adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \ - adio/ad_pvfs2/Makefile \ - adio/ad_gridftp/Makefile \ -+ adio/ad_lustre/Makefile \ - mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \ - mpi2-other/array/fortran/Makefile test/fmisc.f \ - test/fcoll_test.f test/pfcoll_test.f test/fperf.f \ -diff -ruN romio-orig/Makefile.in romio/Makefile.in ---- romio-orig/Makefile.in 2005-05-24 18:53:11.000000000 -0400 -+++ romio/Makefile.in 2006-09-06 17:13:25.000393429 -0400 -@@ -14,7 +14,7 @@ - MPIO_DIRS = mpi-io - EXTRA_SRC_DIRS = @EXTRA_SRC_DIRS@ - FILE_SYS_DIRS = @FILE_SYS_DIRS@ --ALL_DIRS = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp test -+ALL_DIRS = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp adio/ad_lustre test - SHELL = /bin/sh - - @VPATH@ diff --git a/lustre/cvstest b/lustre/cvstest deleted file mode 100644 index 10e63100ff..0000000000 --- a/lustre/cvstest +++ /dev/null @@ -1,9 +0,0 @@ -Adding more - - -$test 5 - -More testing -ddtest -Fri Jan 4 14:34:14 MST 2008 -Fri Jan 4 14:41:16 MST 2008 diff --git a/lustre/doc/.cvsignore b/lustre/doc/.cvsignore deleted file mode 100644 index fdf16421c6..0000000000 --- a/lustre/doc/.cvsignore +++ /dev/null @@ -1,23 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -Makefile.in -.deps -tags -TAGS -OBD-HOWTO.html -OBD-HOWTO.txt -lustre-HOWTO.lyx -lustre-HOWTO.txt -lustre-pdf.bbl -lustre-pdf.blg -lustre-pdf.log -lustre-pdf.out -lustre-pdf.toc -*.eps -lustre.lyx -*.tex -*.pdf -*.aux diff --git a/lustre/doc/Makefile.am b/lustre/doc/Makefile.am deleted file mode 100644 index 549e740cf4..0000000000 --- a/lustre/doc/Makefile.am +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2001, 2002 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution -LYX2PDF = GS_OPTIONS=-dCompatibilityLevel=1.1 $(srcdir)/tex2pdf -overwrite -TEX2PDF = GS_OPTIONS=-dCompatibilityLevel=1.1 $(srcdir)/tex2pdf -overwrite -LYX2PS = lyx --export ps -LYX2TEX = lyx --export latex -LYX2TXT = lyx --export text -LYX2HTML = lyx --export html -LATEX = latex -DVIPS = dvips -PS2PDF = ps2pdf -TEXEXPAND = texexpand -SUFFIXES = .lin .lyx .pdf .ps .sgml .html .txt .tex .fig .eps .dvi - -MANFILES = lustre.7 lfs.1 mount.lustre.8 mkfs.lustre.8 tunefs.lustre.8 lctl.8 \ - llverdev.8 llbackup.8 -if UTILS -man_MANS = $(MANFILES) -endif - -LYXFILES= $(filter-out $(patsubst %.lin,%.lyx,$(wildcard *.lin)),\ - $(wildcard *.lin *.lyx)) - -CLEANFILES = *.aux *.tex *.log *.pdf - -EXTRA_DIST = tex2pdf $(MANFILES) $(LYXFILES) - -all: - -# These variables are set by lbuild/check-build. -RPMRELEASE ?= RELEASE -KERNTYPE ?= chaos -KERNRPM ?= kernel-2.4.18lustre13-RELEASE.i386.rpm - -.lyx.pdf: - @echo $(LYX2PDF) $< && $(LYX2PDF) $< || printf "\n*** Warning: not creating PDF docs; install lyx to rectify this\n" - -.lyx.ps: - @echo $(LYX2PS) $< && $(LYX2PS) $< || printf "\n*** Warning: not creating PostScript docs; install lyx to rectify this\n" - -.lyx.tex: - @echo $(LYX2TEX) $< && $(LYX2TEX) $< || printf "\n*** Warning: not creating LaTeX docs; install lyx to rectify this\n" - -.lyx.txt: - @echo $(LYX2TXT) $< && $(LYX2TXT) $< || printf "\n*** Warning: not creating text docs; install lyx to rectify this\n" - -.lyx.html: - @echo $(LYX2HTML) $< && $(LYX2HTML) $< || printf "\n*** Warning: not creating HTML docs; install lyx to rectify this\n" - -.tex.pdf: - $(TEX2PDF) $< - -.tex.dvi: - $(LATEX) $< - $(LATEX) $< - -.dvi.ps: - $(DVIPS) $< -o $@ - -.ps.pdf: - $(PS2PDF) $< $@ diff --git a/lustre/doc/VERSIONING b/lustre/doc/VERSIONING deleted file mode 100644 index a719103ea5..0000000000 --- a/lustre/doc/VERSIONING +++ /dev/null @@ -1,90 +0,0 @@ -Lustre versioning -================= - -0.0.1 2/19/2002 <braam@clusterfs.com> -0.0.2 3/14/2002 <braam@clusterfs.com> describe branches / stable tag -0.0.3 6/10/2002 <braam@clusterfs.com> describe release mechanisms - -This document describes versioning of source and binaries for Lustre. - -Packages -======== - -RPM's that you build should get 3 figure versions, CVS versions will -be 4 digits, and can correspond to test RPM's, and lead up to the -package version. So let's plan on releasing - -So you'd build 2 sets of test rpms this week: - -1.6.8.91 -1.6.8.92 - -we decide it's fine then and we release: - -1.6.9 - -If there are critical hotfixes that need to be released to customers -(e.g. data corruption fixes) then point releases would be created: - -1.6.9.{1,2,3,...} - -We go on developing with - -1.6.9.{91,92,93,94,...} - -as test releases and then we release: - -1.6.10 - -The 1.7 sequence would be an unstable sequence, like 2.5 for the kernel -is. So we expect lots of 1.7.X releases leading up to a stable 1.8 (or -2.0) at the time of deployment. - -CVS -=== - -Versions will have 4 digits: - major.minor.patch.test - -Such versions will be tagged in CVS as: - v1_6_9_97 -and referred to as: - 1.6.9.97 -encoded as: - 0x01060961 - -Usage: ------- - -New numbers are used as follows: - -1. major: - - increased when major new functionality becomes available -2. minor: - - even: for each new release with new functionality - - odd : when a new development cycle starts after a release -3. patch: - - when a development snapshot or release update becomes available - - all these are announced on lustre-{announce,devel}@clusterfs.com -4. test: - - when developers feel it is time to exchange a named version - -What will run, what won't ? ---------------------------- - -1. If the test level is non-zero, i.e. there are 4 digits in the - version, no guarantees of any kind are made. - -2. For three digit releases/tags the code should perform - according to the announcement. - -Branches --------- - -Any and all development must be done on branches, and can only merge to the -HEAD if _at_least_ tests/acceptance-small.sh and IOR with 5 SMP nodes and -2 clients/node with 1GB file/client pass without any errors or cleanup -problems. Additional tests may be added in the future, so the tests in the -current CVS head must pass before a branch can be merged back to the trunk. - -See http://lustre.org/docs/branches.html for details on CVS branch usage. diff --git a/lustre/doc/chbar.sh b/lustre/doc/chbar.sh deleted file mode 100755 index 782524142e..0000000000 --- a/lustre/doc/chbar.sh +++ /dev/null @@ -1,243 +0,0 @@ -#!/bin/sh -# Gadget to take two LaTeX files and produce a third which -# has changebars highlighting the difference between them. -# -# Version 1.2 -# Author: -# Don Ward, Careful Computing (don@careful.co.uk) -# v1.0 April 1989 -# v1.1 Feb 93 Amended to use changebar.sty (v3.0) and dvips -# v1.2 Aug 95 Added support for LaTeX209/LaTeX2e -# Added RCS support to retrive old files - -CMD=`basename $0` - -SED=sed -RM="rm -f" -DIFF=diff -ED=ed -AWK=awk -GREP=grep -MV=mv -CAT=cat -MKDIR=mkdir -CO="co" - -TMPDIR=${TMP-/tmp}/$CMD.$$ -trap 'test $DEBUG = NO && rm -rf $TMPDIR' 0 1 2 3 6 7 13 15 -mkdir $TMPDIR || { echo "cannot create directory \`$TMPDIR'." >&2; exit 1; } -TMPFILE=${TMPDIR}/$CMD.$$ -SED_CMD_FILE=$TMPFILE.sed - -usage() -{ -$CAT << _END_ -Usage: - $CMD [-hgG] [-d dir] old new [output] - default output is stdout - - $CMD [-hgG] [-d dir] old - new file on stdin, output on stdout - - $CMD [-hgG] -d dir -r rev files - old file retrieved using RCS - - Gadget to take two LaTeX files and produce a third which - has changebars highlighting the difference between them. - Changebars are inserted for differences after '\begin{document}'. - - Feature: \`new' can not be named \`-'. - - Options are: - -d dir : Write the output to file \`dir/new', if \`new' is given or - to file \`dir/old'. - If \`dir' does not exist, it is created. - If \`output' is given, it is discarded. - - -r rev : If the LaTeX \`files' are kept under control of the - Revision Control System RCS, the old files of - the revision \`rev' can be retrived. - \`rev' is specified using the RCS conventions. - This option must be used together with the \`-d dir' option. - \`files' must be a nonempty list of files. - - -h : Print this info text. - -g : Print some debugging info. - -G : Even more debug info. - - Version 1.2: August 3. 1995 -_END_ -exit 1 -} - -# parse options and arguments -DEBUG="NO" -DIR= -REV= -# process options -while getopts d:r:gGh i $* -do - case $i in - d ) DIR=$OPTARG;; - r ) REV=$OPTARG;; - g ) DEBUG="YES" ;; - G ) set -x; DEBUG="YES";; - h | \ - * ) usage ;; - esac -done - -shift `expr $OPTIND - 1` - -case $# in - 1 ) OLD=$1; NEW="-"; OUT="" ;; - 2 ) OLD=$1; NEW=$2; OUT="" ;; - 3 ) OLD=$1; NEW=$2; OUT="$3" ;; - * ) usage ;; -esac - -# check correct options -if [ ! -z "$DIR" ] -then - [ -d $DIR ] || $MKDIR $DIR -fi - -if [ ! -z "$REV" ] -then - [ -z "$DIR" ] && usage - FILES=$* -else - FILES=$NEW -fi - -# do the work -for NEW in $FILES -do - if [ ! -z "$DIR" ] - then - if [ $NEW = "-" ] - then - OUT=$DIR/$OLD - else - OUT=$DIR/$NEW - fi - fi - if [ ! -z "$REV" ] - then - OLD=${TMPFILE}.old - $CO -p"$REV" -q $NEW > $OLD - fi - - [ $DEBUG = "YES" ] && echo "OLD=\`$OLD' NEW=\`$NEW' OUT=\`$OUT'" - - # gather some info about the file - # Since we have for sure only the name of the OLD file, ... - $GREP "^\\\\begin{document}" $OLD > /dev/null - if [ $? -eq 0 ] - then - [ $DEBUG = "YES" ] && echo "contains a \\begin{document}" - HAS_BEGIN_DOC="YES" - else - [ $DEBUG = "YES" ] && echo "contains no \\begin{document}" - HAS_BEGIN_DOC="NO" - fi - - # Method to do the work: - # 1 Use diff to get an ed script to go from file1 to file2. - # 2 Breath on it a bit (with sed) to insert changebar commands. - # 3 Apply modified ed script to produce (nearly) the output. - # 4 Use awk to insert the changebars option into the \documentstyle - # and to handle changebar commands inside verbatim environments. - # 5 Remove changebars before \begin{document} with sed - - # SED commands to edit ED commands to edit old file - $CAT > $SED_CMD_FILE <<\_END_ -/^\.$/i\ -\\cbend{}% -/^[0-9][0-9]*[ac]$/a\ -\\cbstart{}% -/^[0-9][0-9]*,[0-9][0-9]*[ac]$/a\ -\\cbstart{}% -/^[0-9][0-9]*d$/a\ -i\ -\\cbdelete{}%\ -. -/^[0-9][0-9]*,[0-9][0-9]*d$/a\ -i\ -\\cbdelete{}%\ -. -_END_ - - # note DIFF accepts `-' as stdin - $DIFF -b -e $OLD $NEW | \ - ( $SED -f $SED_CMD_FILE ; echo w ${TMPFILE}.1 ; echo q ) | \ - $ED - $OLD - - # AWK commands to insert Changebars style and to protect - # changebar commands in verbatim environments - # and to tell what driver is in use; we assume the `dvips' driver - - $AWK ' - BEGIN {kind=""; # we saw now \documentXXX[]{} - } - /^\\documentstyle/{ - kind = "209"; - if (index($0, "changebar") == 0 ) { - opts = index($0, "[") - if (opts > 0) - printf "%schangebar,%s\n",substr($0,1,opts),substr($0,opts+1) - else - printf "\\documentstyle[changebar]%s\n", substr($0,15) - next - } - } - /^\\documentclass/{ - kind = "2e"; - printf "%s\n", $0 - printf "\\usepackage[dvips]{changebar}\n" - next - } - /\\begin{document}/ {if (kind == "209" ) {print "\\driver{dvips}"}} - /\\begin{verbatim}/{++nesting} - /\\end{verbatim}/{--nesting} - /\\cbstart{}%|\\cbend{}%|\cbdelete{}%/ { - if ( nesting > 0) { - # changebar command in a verbatim environment: Temporarily exit, - # do the changebar command and reenter. - # - # The obvious ( printf "\\end{verbatim}%s\\begin{verbatim} , $0 ) - # leaves too much vertical space around the changed line(s). - # The following magic seeems to work - # - print "\\end{verbatim}\\nointerlineskip" - print "\\vskip -\\ht\\strutbox\\vskip -\\ht\\strutbox" - printf "\\vbox to 0pt{\\vskip \\ht\\strutbox%s\\vss}\n", $0 - print "\\begin{verbatim}" - next - } - } - { print $0 } - ' ${TMPFILE}.1 > ${TMPFILE}.2 - - # if a \begin{document} is contained in the file, - # remove the changebar commands before them - - if [ $HAS_BEGIN_DOC = "YES" ] - then - SED_CMD="1,/\\\\begin{document}/s/\(\\\\cb[sed][tne][adl][^{}]*{}%\)$/%%\1/" - $SED "$SED_CMD" ${TMPFILE}.2 > ${TMPFILE}.3 - else - $CAT ${TMPFILE}.2 > ${TMPFILE}.3 - fi - if [ -z "$OUT" ] - then - $CAT ${TMPFILE}.3 - else - $MV ${TMPFILE}.3 $OUT - fi - -done - -[ $DEBUG = "NO" ] && $RM ${TMPFILE}.* - -############################################################### diff --git a/lustre/doc/lctl.8 b/lustre/doc/lctl.8 deleted file mode 100644 index 92438634ff..0000000000 --- a/lustre/doc/lctl.8 +++ /dev/null @@ -1,190 +0,0 @@ -.TH lctl 1 "2003 Oct 8" Lustre "configuration utilities" -.SH NAME -lctl \- Low level Lustre filesystem configuration utility -.SH SYNOPSIS -.br -.B lctl -.br -.B lctl --device <devno> <command [args]> -.br -.SH DESCRIPTION -.B lctl -is used to directly control Lustre via an ioctl interface, allowing -various configuration, maintenance, and debugging features to be accessed. - -.B lctl -can be invoked in interactive mode by issuing lctl command. After that, commands are issued as below. The most common commands in lctl are -.B dl -, -.B device -, -.B network -.I <up/down> -, -.B list_nids -, -.B ping -.I nid -, -.B help -, -.B quit. - -To get a complete listing of available commands, type -.B help -at the lctl prompt. To get basic help on the meaning and syntax of a -command, type -.B help -.I command -. Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys. - -For non-interactive use, one uses the second invocation, which runs command after connecting to the device. - -.SS Network Configuration -.TP -.BI network " <up/down>|<tcp/elan/myrinet>" -Start or stop LNET, or select a network type for other -.I lctl -LNET commands -.TP -.BI list_nids -Print all Network Identifiers on the local node. LNET must be running. -.TP -.BI which_nid " <nidlist>" -From a list of nids for a remote node, show which interface communication -will take place on. -.TP -.BI ping " <nid> " -Check LNET connectivity via an LNET ping. This will use the fabric -appropriate to the specified NID. -.TP -.BI interface_list -Print the network interface information for a given -.B network -type. -.TP -.BI peer_list -Print the known peers for a given -.B network -type. -.TP -.BI conn_list -Print all the connected remote NIDs for a given -.B network -type. -.TP -.BI active_tx -This command should print active transmits, and it is only used for elan network type. -.TP -.BI route_list -Print the complete routing table. -.PP -.SS Device Selection -.TP -.BI device " <devname> " -This will select the specified OBD device. All other commands depend on the device being set. -.TP -.BI device_list -Show all the local Lustre OBDs. AKA -.B dl -.PP -.SS Device Operations -.TP -.BI conf_param " <device> <parameter>" -Set a permanent configuration parameter for any device via the MGS. This -command must be run on the MGS node. -.TP -.BI activate -Reactivate an import after deactivating, below. -.TP -.BI deactivate -Deactivate an import, in particular meaning do not assign new file stripes -to an OSC. This command should be used on the OSC in the MDT LOV -corresponding to a failed OST device, to prevent further attempts at -communication with the failed OST. -.TP -.BI abort_recovery -Abort the recovery process on a restarting MDT or OST device -.PP -.SS Virtual Block Device Operation -Lustre is able to emulate a virtual block device upon regular file. It is necessary to be used when you are trying to setup a swap space via file. -.TP -.BI blockdev_attach " <file name> <device node>" -Attach the lustre regular file to a block device. If the device node is not existent, lctl will create it \- it is recommended to create it by lctl since the emulator uses a dynamical major number. -.TP -.BI blockdev_detach " <device node>" -Detach the virtual block device. -.TP -.BI blockdev_info " <device node>" -Acquire which lustre file was attached to the device node. -.PP -.SS Debug -.TP -.BI debug_daemon -Start and stop the debug daemon, and control the output filename and size. -.TP -.BI debug_kernel " [file] [raw]" -Dump the kernel debug buffer to stdout or file. -.TP -.BI debug_file " <input> [output]" -Convert kernel-dumped debug log from binary to plain text format. -.TP -.BI clear -Clear the kernel debug buffer. -.TP -.BI mark " <text>" -Insert marker text in the kernel debug buffer. -.TP -.BI filter " <subsystem id/debug mask>" -Filter kernel debug messages by subsystem or mask. -.TP -.BI show " <subsystem id/debug mask>" -Show specific type of messages. -.TP -.BI debug_list " <subs/types>" -List all the subsystem and debug types. -.TP -.BI modules " <path>" -Provide gdb-friendly module information. - -.SH OPTIONS -The following options can be used to invoke lctl. -.TP -.B --device -The device to be used for the operation. This can be specified by name or -number. See -.B device_list -.TP -.B --ignore_errors | ignore_errors -Ignore errors during script processing -.TP -.SH EXAMPLES -# lctl -.br -lctl > dl - 0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5 - 1 UP ost OSS OSS_uuid 3 - 2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3 -.br -lctl > dk /tmp/log -Debug log: 87 lines, 87 kept, 0 dropped. -.br -lctl > quit -.PP -# lctl conf_param testfs-MDT0000 sys.timeout=40 - -.SH BUGS -Please report all bugs to ClusterFileSystems, support@clusterfs.com -.SH AVAILABILITY -.B lctl -is part of the -.BR Lustre (7) -filesystem package and is available from CFS -.br -http://clusterfs.com -.SH SEE ALSO -.BR Lustre (7), -.BR mkfs.lustre (8), -.BR mount.lustre (8), -.BR lctl (8), -.BR lfs (1) diff --git a/lustre/doc/lfs.1 b/lustre/doc/lfs.1 deleted file mode 100644 index 7f24109638..0000000000 --- a/lustre/doc/lfs.1 +++ /dev/null @@ -1,165 +0,0 @@ -.TH lfs 1 "2008 Mar 15" Lustre "user utilities" -.SH NAME -lfs \- Lustre utility to create a file with specific striping pattern, find the striping pattern of exiting files -.SH SYNOPSIS -.br -.B lfs -.br -.B lfs check <mds|osts|servers> -.br -.B lfs df [-i] [-h] [path] -.br -.B lfs find [[!] --atime|-A [-+]N] [[!] --mtime|-M [-+]N] - \fB[[!] --ctime|-C [-+]N] [--maxdepth|-D N] [--name|-n pattern] - \fB[--print|-p] \fB[--print0|-P] [--obd|-O <uuid>] - \fB[[!] --size|-S [-+]N[kMGTPE]] [--type |-t {bcdflpsD}] - \fB<dirname|filename>\fR -.br -.B lfs getstripe [--obd|-O <uuid>] [--quiet|-q] [--verbose|-v] - \fB[--recursive|-r] <dirname|filename>\fR -.br -.B lfs setstripe [--size|-s stripe-size] [--count|-c stripe-cnt] - \fB[--index|-i start-ost] <filename|dirname>\fR -.br -.B lfs setstripe -d <dirname> -.br -.B lfs quotachown [-i] <filesystem> -.br -.B lfs quotacheck [-ug] <filesystem> -.br -.B lfs quotaon [-ugf] <filesystem> -.br -.B lfs quotaoff [-ug] <filesystem> -.br -.B lfs quotainv [-ug] <filesystem> -.br -.B lfs setquota [-u|-g] <username|groupname> <block-softlimit> - \fB<block-hardlimit> <inode-softlimit> <inode-hardlimit> - \fB<filesystem>\fR -.br -.B lfs setquota -t [-u|-g] <block-grace> <inode-grace> <filesystem> -.br -.B lfs quota [-o obd_uuid] [-u|-g] <username|groupname> <filesystem> -.br -.B lfs quota -t [-u|-g] <filesystem> -.br -.B lfs help -.SH DESCRIPTION -.B lfs -can be used to create a new file with a specific striping pattern, determine the default striping pattern, gather the extended attributes (object numbers and location) for a specific file. It can be invoked interactively without any arguments or in a non-interactive mode with one of the arguements supported. -.SH OPTIONS -The various options supported by lctl are listed and explained below: -.TP -.B check -Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs) -.TP -.B df -Report filesystem disk space usage or inodes usage of each MDT/OST. -.TP -.B find -To search the directory tree rooted at the given dir/file name for the files that match the given parameters: \fB--atime\fR (file was last accessed N*24 hours ago), \fB--ctime\fR (file's status was last changed N*24 hours ago), \fB--mtime\fR (file's data was last modified N*24 hours ago), \fB--obd\fR (file has an object on a specific OST), \fB--size\fR (file has size in bytes, or \fBk\fRilo-, \fBM\fRega-, \fBG\fRiga-, \fBT\fRera-, \fBP\fReta-, or \fBE\fRxabytes if a suffix is given), \fB--type\fR (file has the type: \fBb\fRlock, \fBc\fRharacter, \fBd\fRirectory, \fBp\fRipe, \fBf\fRile, sym\fBl\fRink, \fBs\fRocket, or \fBD\fRoor (Solaris)). The option \fB--maxdepth\fR allows find to decend at most N levels of directory tree. The options \fB--print\fR and \fB--print0\fR print full file name, followed by a newline or NUL character correspondingly. Using \fB!\fR before an option negates its meaning (\fIfiles NOT matching the parameter\fR). Using \fB+\fR before a numeric value means \fIfiles with the parameter OR MORE\fR, while \fB-\fR before a numeric value means \fIfiles with the parameter OR LESS\fR. -.TP -.B getstripe -To list the striping info for a given filename or files in a directory, optionally recursively, for all files in a directory tree: \fB--quiet\fR (don't print object IDs), \fB--verbose\fR (print striping parameters), \fB--recursive\fR (recurse into subdirectories). -.TP -.B osts -List all the OSTs for the filesystem -.TP -.B setstripe -To create a new file with a specific striping pattern -.TP -.B quotachown -To change files' owner and group on OSTs of the specified filesystem -.TP -.B quotacheck [-ugf] <filesystem> -To scan the specified filesystem for disk usage, and create or update quota files. Options specify quota for users (-u) groups (-g) and force (-f) -.TP -.B quotaon [-ugf] <filesystem> -To turn filesystem quotas on. Options specify quota for users (-u) groups (-g) and force (-f) -.TP -.B quotaoff [-ugf] <filesystem> -To turn filesystem quotas off. Options specify quota for users (-u) groups (-g) and force (-f) -.TP -.B quotainv [-ug] <filesystem> -Clear quota files, all of their quota entries, for (-u) users or (-g) groups; after quotainv one must use quotacheck before using quotas. USE THIS COMMAND WITH EXTREME CARE, ITS RESULTS CANNOT BE UNDONE. -.TP -.B setquota [-u|-g] <name> <block-softlimit> <block-hardlimit> <inode-softlimit> <inode-hardlimit> <filesystem> -To set filesystem quotas for users or groups. Limits are specific as blocks and inodes, see EXAMPLES -.TP -.B setquota -t [-u|-g] <block-grace> <inode-grace> <filesystem> -To set filesystem quota grace times for users or groups. Grace time is specified in "XXwXXdXXhXXmXXs" format or as an integer seconds value, see EXAMPLES -.TP -.B quota [-o obd_uuid] [-u|-g] <username|groupname> <filesystem> -To display disk usage and limits, either for the full filesystem, or for objects on a specific obd. A user or group name must be specified. -.TP -.B quota -t [-u|-g] <filesystem> -To display block and inode grace times for user (-u) or group (-g) quotas -.TP -.B help -Provides brief help on the various arguments -.TP -.B exit/quit -Quit the interactive lfs session -.SH EXAMPLES -.TP -.B $ lfs setstripe -s 128k -c 2 /mnt/lustre/file1 -This creats a file striped on two OSTs with 128kB on each stripe. -.TP -.B $ lfs setstripe -d /mnt/lustre/dir -This deletes a default stripe pattern on dir. New files will use the default striping pattern created therein. -.TP -.B $ lfs getstripe -v /mnt/lustre/file1 -Lists the detailed object allocation of a given file -.TP -.B $ lfs find /mnt/lustre -Efficiently lists all files in a given directory and its subdirectories -.TP -.B $ lfs find /mnt/lustre -mtime +30 -type f -print -Recursively list all regular files in given directory more than 30 days old -.TP -.B $ lfs find --obd OST2-UUID /mnt/lustre/ -Recursively list all files in a given directory that have objects on OST2-UUID. -.tP -.B $ lfs check servers -Check the status of all servers (MDT, OST) -.TP -.B $ lfs osts -List all the OSTs -.TP -.B $ lfs df -h -Lists space usage per OST and MDT in human readable format. -.TP -.B $ lfs df -i -Lists inode usage per OST and MDT -.TP -.B $ lfs quotachown -i /mnt/lustre -Change file owner and group -.TP -.B $ lfs quotacheck -ug /mnt/lustre -Quotacheck for user and group - will turn on quotas after making the check. -.TP -.B $ lfs quotaon -ug /mnt/lustre -Turn quotas of user and group on -.TP -.B $ lfs quotaoff -ug /mnt/lustre -Turn quotas of user and group off -.TP -.B $ lfs setquota -u bob 0 1000000 0 10000 /mnt/lustre -Set quotas of user `bob': 1GB block quota and 10,000 file quota -.TP -.B $ lfs setquota -t -u 1000 1w4d /mnt/lustre -Set grace times for user quotas: 1000 seconds for block quotas, 1 week and 4 days for inode quotas -.TP -.B $ lfs quota -u bob /mnt/lustre -List quotas of user `bob' -.TP -.B $ lfs quota -t -u /mnt/lustre -Show grace times for user quotas on /mnt/lustre -.SH BUGS -The \fBlfs find\fR command isn't as comprehensive as \fBfind\fR(1). -Report bugs using http://bugzilla.lustre.org. -.SH AUTHOR -The lfs command is part of the Lustre filesystem. Contact info@clusterfs.com. -.SH SEE ALSO -.BR lctl (8), -.BR lustre (7) diff --git a/lustre/doc/llbackup.8 b/lustre/doc/llbackup.8 deleted file mode 100644 index 62441eb493..0000000000 --- a/lustre/doc/llbackup.8 +++ /dev/null @@ -1,258 +0,0 @@ -.\" -*- nroff -*- -.\" Copyright 2008 by Sun Microsystems. All Rights Reserved. -.\" This file may be copied under the terms of the GNU Public License, v2. -.\" -.TH llbackup 8 "2008 Mar 15" Lustre "System management commands" -.SH NAME -llbackup \- backup a list of files, maybe running on multiple nodes -.SH SYNOPSIS -.B llbackup -c -.RB [ -hjvxz "] [" -C -.IR directory ] -.RB [ -e -.IR rsh ] -.RB [ -i -.IR inputlist ] -.RB [ -l -.IR logdir ] -.RB [ -n -.IR nodes ] -.RB [ -s -.IR splitmb ] -.RB [ -S -.IR splitcount ] -.RB [ -T -.IR tar ] -.BI -f outputfilebase -.br - -.B llbackup -.RB { -x | -t } -.RB [ -chjvz "] [" -C -.IR directory ] -.RB [ -e -.IR rsh ] -.RB [ -l -.IR logdir ] -.RB [ -n -.IR nodes ] -.RB [ -T -.IR tar ] -.BI -f tarfilelist -.SH DESCRIPTION -.B llbackup -takes a list of files to backup or restore, either from standard input, or -from a list of files supplied as a parameter and produces one or more archive -files containing the files. -.B llbackup -uses the -.BR tar (1) -or -.BR htar (1) -programs to produce archive files, and has many of the same options (though -not identical in some cases). The reason for using llbackup instead of those -programs directly is that llbackup can run in parallel on multiple -nodes to do high-speed backups on clustered or distributed filesystems and -will split the work among multiple client nodes to increase performance. -.br - -The archive files produced by -.B llbackup -are identical to normal tar files (having been created by the local tar -command) and can be extracted or listed by -.B tar -directly. -.br - -The clients will pause and print status messages if they think there is not -enough free space in the output directory to avoid running out of space. -Backup tarfiles should be moved to offline storage or otherwise purged to -allow the backups to continue. If the client is doing a restore it will -similarly pause and print status messages if the tarfile it was asked to -restore is not available on that node. -.SH OPERATIONS -The following options control what operation -.B llbackup -will perform: -.TP -.B -c -create archive. This is the default operation if no other is given. -.TP -.B -x -extract tarfiles from the -.I tarfilelist -given to -.B -f -instead of backing them up. -.TP -.B -t -list table of contents of the -.I tarfilelist -given by -.BR -f . -.SH OPTIONS -.TP -.BI -C directory -change the backup command to run in -.I directory -instead of the current working directory so filenames given in the input -file are backed up or restored relative to -.IR directory . -Note that this affects all pathname components used during backup and restore -so the -.I inputlist -and -.I outputbase -should be specified by absolute pathname if they are not also in -.IR directory . -.TP -.BI -e rsh -specify the passwordless remote shell command (default -.BR ssh (1)). -.TP -.BI -f outputbase -specify base output filename for backup tar archives, to which a suffix will -be appended to ensure that multiple clients doing backup into the same -directory do not have conflicting filenames. The -.I outputbase -file can be a tape or disk device, but must be the same device on each client -running the backup, in which case only a single process can run on each client. -Specifying -.B - -means write to standard output. -.TP -.BI -f tarfilelist -specify a file containing a list of tarfiles, one per line, to restore or -list the table of contents of. Specifying -.B - -means read the list of tarfiles from standard input. The -.I tarfilelist -can also be a tape or disk device, but since the individual tarfiles are -sent to individual clients, the same files must be accessible on all clients. -.TP -.B -h -print this help message and exit. Use -.B -x -.B -h -or -.B -t -.B -h -to get the help options for restore or list operations. -.TP -.BI -i inputlist -list of files to backup when creating an archive. If no -.B -i -option is specified or if -.I inputlist -is - then the list of files to back up is read from standard input. The input -file list is a list of pathnames, one file per line, as generated by -.BR find (8), -.BR "lfs find" (8), -or -.BR e2scan (8) -for example. For restore this option is currently unused. -.TP -.B -j -use -.BR bzip2 (1) -compression on input or output tar file(s). This option is not -currently supported by the underlying -.BR htar (8) -implementation. -.TP -.BI -l logdir -directory for output logs. -.TP -.BI -n nodes -comma-separated list of client nodes to run backups. It is possible to -specify the same client node multiple times in order to have multiple -instances of the backup or restore running in parallel on that node. -This is useful to maximize the bandwidth of the backup or restore process -and avoid client nodes underutilizing their bandwidth while generating -file lists or compressing files. -.TP -.BI -s splitmb -target size for backup chunks in megabytes (default 8192MiB). Increasing this -size can improve performance and compression ratios, but may cause -underutilization of clients if the files are not evenly distributed. -This option has no meaning for restore or list operations. -.TP -.BI -S splitcount -number of files sent to each client before sending files to the next client -(default 200). Increasing the -.I splitcount -keeps more related files together in individual tar files (meaning fewer -archives need to be processed when restoring files for a particular -subdirectory), but can lead to performance imbalance if files vary greatly -in size and one client has to back up many of them due to proximity of -filenames in the input list, while other clients back up smaller files. -Decreasing the -.I splitcount -means a more uniform distribution of files and usage among clients, but -means nearly every archive will have to be extracted to get only a subset -of files needed. -This option has no meaning for restore or list operations. -.TP -.BI -T tar -specify the backup command (default tar). Optionally the -.BI htar (8) -command can be used to back up directly to an HPSS archive, if available. -.TP -.B -v -be verbose - list all files being processed. By default, individual files -being backed up or restored are only reported in the log files because they -would all be intermixed coming from multiple clients in parallel and the -overall progress would be hard to determine. -.TP -.B -V -print version number and exit. -.TP -.B -z -use gzip compression on input or output tar file(s). This option is not -currently supported by the underlying -.BR htar (8) -implementation. -.SH EXAMPLES -.TP -.B lfs find /home -mtime -7 | llbackup -c -n c1,c2 -f /bkup/bk2008-03-15 -Create a backup of the -.B /home -filesystem finding files modified in the last 7 days, compress the output -using -.B gzip -and run on client nodes -.B c1 -nodes, putting the output tar files into the -.B /bkup -directory using filenames starting with -.BR bk2008-03-15 . -.TP -.B find /bkup -name bk2007-11-28* | llbackup -x -n c1,c1,c2,c2 -C /tmp -f- -Restore -.B gzip -compressed files from the -.B bk2007-11-28 -backup from the -.B /bkup -directory, using two restore processes on each of the client nodes -.B c1 -and -.BR c2 , -reading the list of tar files to restore from standard input and restoring -into the -.B /tmp -directory. -.SH BUGS -It is currently not possible to extract only a subset of files from the -tarfiles. If that is necessary, then tar should be run directly on the -individual tar files after checking in the backup logs which tarfiles -have the relevant files. -.SH SEE ALSO -.BR lustre (7), -.BR tar (8), -.BR htar (8), -.BR ssh (1), -.BR rsh (1), -.BR find (1), -.BR lfs "(1) " find , -.BR e2scan (8). diff --git a/lustre/doc/llverdev.8 b/lustre/doc/llverdev.8 deleted file mode 100644 index fb41540a0b..0000000000 --- a/lustre/doc/llverdev.8 +++ /dev/null @@ -1,103 +0,0 @@ -.\" -*- nroff -*- -.\" Copyright 2006 by Cluster FileSystems. All Rights Reserved. -.\" Copyright 2008 by Sun Microsystems. All Rights Reserved. -.\" This file may be copied under the terms of the GNU Public License, v2. -.\" -.TH llverdev 8 "2008 Mar 15" Lustre "configuration utilities" -.SH NAME -llverdev - verify a block device is functioning properly over its full size -.SH SYNOPSIS -.BI llverdev -.RB [ -c -.IR chunksize ] -.RB [ -f "] [" -h ] -.RB [ -o -.IR offset ] -.RB [ -l "] [" -p "] [" -r ] -.RB [ -t -.IR timestamp ] -.RB [ -v "] [" -w ] -.I device -.SH DESCRIPTION -Sometimes kernel drivers or hardware devices have bugs that prevent them from -accessing the full device size correctly, or possibly have bad sectors on disk -or other problems which prevent proper data storage. There are often defects -associated with major system boundaries such as 2^32 bytes, 2^31 sectors, -2^31 blocks, 2^32 blocks, etc. -.PP -The -.B llverdev -tool will write and verify a unique test pattern across the entire device in -order to ensure that not only is data accessible after it was written, but -also that data written to one part of the disk is not overwriting data on -another part of the disk. -.PP -It is expected that llverdev tool will be run on large size devices (TB), -so it is always better to run llverdev tool in verbose mode, so that one -can easily restart device testing from the point at which it had stopped. -.PP -Running a full verification can be time consuming for very large devices, -so it is advisable to start with a partial verification to ensure the -device is minimally sane before investing the time in a full verification. -.SH OPTIONS -.TP -.BR -c | --chunksize -IO chunk size in bytes (default=1048576). -.TP -.BR -f | --force -force test to run without confirmation that the device will be overwritten -and all data therein will be permanently destroyed. -.TP -.BR -h | --help -display a brief help message. -.TP -.BI -o offset -offset in kilobytes of start of test (default=0). -.TP -.BR -l | --long -Run a full check, writing and then reading and verifying every block on the -disk. -.TP -.BR -p | --partial -Run a partial check, only doing periodic checks across the device (1GB steps). -.TP -.BR -r | --read -Run test in read (verify) mode only, after having run the test in -.B -w -mode previously. -.TP -.BI -t timestamp -Set test start time as printed at the start of a previously interrupted test -to ensure that the validation data is the same across the whole filesystem -(default=current time()) -.TP -.BR -v | --verbose -Run test in verbose mode, listing each read and write operation. -.TP -.BR -w | --write -Run test in write (test-pattern) mode (default run both read and write) -.SH EXAMPLES -.TP -Run a partial device verification on \fB/dev/sda\fR: -.B llverdev -v -p /dev/sda -.br -llverdev: permanently overwrite all data on /dev/sda (yes/no)? y -.br -llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size -.br -Timestamp: 1009839028 -.br -Current write offset: 4096 kB -.TP -Continue an interrupted verification at offset \fB4096\fRkB from the start of the device, using the same timestamp as the previous run: -.B llverdev -f -v -p --offset=4096 --timestamp=1009839028 /dev/sda -.br -llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size -.br -Timestamp: 1009839028 -.br -write complete -.br -read complete -.SH SEE ALSO -.BR llverfs (8) diff --git a/lustre/doc/llverfs.txt b/lustre/doc/llverfs.txt deleted file mode 100644 index 0321d75399..0000000000 --- a/lustre/doc/llverfs.txt +++ /dev/null @@ -1,48 +0,0 @@ -FILESYSTEM VERIFICATION TOOL. ( ext3vt ) -========================================== - -Building tool: - To build this tool you just need to invoke make at command prompt. - e.g. $ make - - this will compile the sources and build ext3vt in this directory. - -Usage: -Syntax: - -./ext3vt [OPTION]... <filesystem path> ... - -[OPTION] - -t {seconds} for --timestamp, set test time(default=current time()) - -o {fileOffset} for --fileOffset, full path of file from which tests should start - -r run test in read (verify) mode - -w run test in write (test-pattern) mode (default=r&w) - -v for verbose - -p for --partial, for partial check (1MB files) - -l for --long, full check (4GB file with 4k blocks) - -c for --chunksize, IO chunk size (default=1048576) - -h display this help and exit - --help display this help and exit - -Guide lines for using this tool: - It is expected that ext3vt tool will be run on large size -filesystem (TB), So it is always better to run ext3vt tool in verbose mode, -So that one can easily restart device testing from the point at which it -had stoped. -for example: - - [root@Matrix ext3vt]# ./ext3vtnew -v -f -w --timestamp=1145009417 /mnt/store/ - Timestamp: 1145009417 - write File name: /mnt/store/dir00004/file005 - -If due to some reason sombody breaks execution at this point then one can -easily restart device from the same point by picking the same file offset -displayed in by verbose as explained below. - - [root@tucker ext3vt]# ./bdevt -v -f -w --fileOffset=/home/dir00004/file005 - --timestamp=1145009417 /mnt/store/ - Timestamp: 1145009417 - write File name: /mnt/store/dir00008/file007 - write complete - [root@tucker ext3vt]# -One can use similar things for read only and read write modes also. diff --git a/lustre/doc/lustre.7 b/lustre/doc/lustre.7 deleted file mode 100644 index 682246f992..0000000000 --- a/lustre/doc/lustre.7 +++ /dev/null @@ -1,73 +0,0 @@ -.\" -*- nroff -*- -.\" Copyright 2006 by Cluster FileSystems. All Rights Reserved. -.\" This file may be copied under the terms of the GNU Public License. -.\" -.TH Lustre 7 "2006 Jun 15" Lustre "A high-performance cluster file system" -.SH NAME -Lustre -.SH SYNOPSIS -A high-performance file system designed for clusters. -.SH DESCRIPTION -.B Lustre® -is a high-performance, massively-scalable, POSIX-compliant network file system -designed for the world's largest high-performance compute clusters. Lustre -is under active development from Sun Microsystems (http://www.lustre.org). - -Lustre filesystems are made up of multiple services typically distributed -across multiple nodes. Lustre clients can contact these server nodes over -multiple high-speed network fabrics via LNET, the Lustre NETworking -system. Clients then present the filesystem at a mount point to userspace. - -A filesystem is comprised of a -.I MDT -, MetaData Target, which stores directory and file meta-information such as -file ownership, timestamps, access permissions, etc, and a -series of -.I OSTs -, Object Storage Targets, which hold the file data in one or more objects. -There is typically not a 1:1 mapping of OST objects and what is presented -as a file on a Lustre client. - -Lustre and LNET are implemented as a series of kernel modules, for both -servers and clients. LNET networks are defined in the modprobe.conf file on -all nodes. Lustre is started on the clients and servers using the -.BR mount (8) -command. - -.SH COMMANDS -.TP -.BR mkfs.lustre (8) -Format a physical disk for use as a Lustre server's backend storage (aka -target). -.TP -.BR tunefs.lustre (8) -Modify configuration information on a Lustre target disk. -.TP -.BR mount.lustre (8) -A helper program for -.BR mount (8) -that starts Lustre servers and clients mounts the client filesystem. -.TP -.BR lctl (8) -A low-level interface to control various aspects of Lustre -.TP -.BR lfs (1) -A user-level interface to control Lustre-specific information for -individual files. -.B lustre_config.sh -Format multiple Lustre targets simultaneously from definitions in a CSV -file. -.SH BUGS -Please report all bugs to Sun Microsystems via http://bugzilla.lustre.org/ -.SH AVAILABILITY -.B The -.BR Lustre (7) -filesystem package is available from Sun Microsystems, Inc via -.br -http://downloads.lustre.org/ -.SH SEE ALSO -.BR mkfs.lustre (8), -.BR tunefs.lustre (8), -.BR mount.lustre (8), -.BR lctl (8), -.BR lfs (1) diff --git a/lustre/doc/mkfs.lustre.8 b/lustre/doc/mkfs.lustre.8 deleted file mode 100644 index 43b9876117..0000000000 --- a/lustre/doc/mkfs.lustre.8 +++ /dev/null @@ -1,133 +0,0 @@ -.\" -*- nroff -*- -.\" Copyright 2006 by Cluster File Systems, Inc. All Rights Reserved. -.\" Copyright 2008 by Sun Microsystems. All Rights Reserved. -.\" This file may be copied under the terms of the GNU Public License, v2. -.\" -.TH mkfs.lustre 8 "2008 Mar 15" Lustre "configuration utilities" -.SH NAME -mkfs.lustre \- format a disk for a Lustre service -.SH SYNOPSIS -.br -.BR mkfs.lustre { --ost | --mdt | --mgs } -.I [options] -.I device -.br -.B <target_type> -is one of -.TP -.BI \--ost -object storage target -.TP -.BI \--mdt -metadata storage target -.TP -.BI \--mgs -configuration management service - one per site. This service can be -combined with one -.BI \--mdt -service by specifying both types -.SH DESCRIPTION -.B mkfs.lustre -is used to format a disk device for use as part of a Lustre -filesystem. After formatting, a disk can be mounted to start the Lustre -service defined by this command. - -.SH OPTIONS -.TP -.BI \--backfstype= fstype -Force a particular format for the backing fs (ext3, ldiskfs) -.TP -.BI \--comment= comment -Set user comment about this disk, ignored by Lustre. -.TP -.BI \--device-size= KB -Set device size for loop devices -.TP -.BI \--dryrun -Only print what would be done; does not affect the disk -.TP -.BI \--failnode= nid,... -Set the NID(s) of a failover partner. This option can be repeated as desired. -.TP -.BI \--fsname= filesystem_name -The Lustre filesystem this service will be part of. The maximum -filesystem_name length is 8 characters. Default is 'lustre' -.TP -.BI \--index= index -Force a particular OST or MDT index -.TP -.BI \--mkfsoptions= opts -Format options for the backing fs. For example, ext3 options could be set here. -.TP -.BI \--mountfsoptions= opts -Set permanent mount options, equivalent to setting in /etc/fstab -.TP -.BI \--mgsnode= nid,... -Set the NID(s) of the MGS node, required for all targets other than the MGS. -.TP -.BI \--param " key=value" -Set permanent parameter -.I key -to value -.IR value . -This option can be repeated as desired. Typical options might include: -.RS -.I \--param sys.timeout=40 -.RS -System obd timeout -.RE -.I \--param lov.stripesize=2M -.RS -Default stripe size -.RE -.I \--param lov.stripecount=2 -.RS -Default stripe count -.RE -.I \--param failover.mode=failout -.RS -Return errors instead of waiting for recovery -.RE -.RE -.TP -.BI \--quiet -Print less information. -.TP -.BI \--reformat -Reformat an existing Lustre disk -.TP -.BI \--stripe-count-hint= stripes -Used for optizing MDT inode size -.TP -.BI \--verbose -Print more information. - -.SH EXAMPLES -.TP -.B mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1 -Combined MGS and MDT for filesystem 'testfs' on node e.g. cfs21 -.TP -.B mkfs.lustre --fsname=testfs --ost --mgsnode=cfs21@tcp0 /dev/sdb -OST for filesystem 'testfs' on any node using the above MGS. -.TP -.B mkfs.lustre --mgs /dev/sda1 -Standalone MGS on e.g. node cfs22 -.TP -.B mkfs.lustre --fsname=myfs1 --mdt --mgsnode=cfs22@tcp0 /dev/sda2 -MDT for filesystem 'myfs1' on any node, using the above MGS - -.SH BUGS -Please report all bugs to Sun Microsystems via http://bugzilla.lustre.org/ -.SH AVAILABILITY -.B mkfs.lustre -is part of the -.BR Lustre (7) -filesystem package and is available from Sun Microsystems via -.br -http://downloads.lustre.org/ -.SH SEE ALSO -.BR lustre (7), -.BR mount.lustre (8), -.BR tunefs.lustre (8), -.BR lctl (8), -.BR lfs (1) diff --git a/lustre/doc/mount.lustre.8 b/lustre/doc/mount.lustre.8 deleted file mode 100644 index ae3c8423fb..0000000000 --- a/lustre/doc/mount.lustre.8 +++ /dev/null @@ -1,134 +0,0 @@ -.\" -*- nroff -*- -.\" Copyright 2006 by Cluster FileSystems. All Rights Reserved. -.\" Copyright 2008 by Sun Microsystems. All Rights Reserved. -.\" This file may be copied under the terms of the GNU Public License v2. -.\" -.TH mount.lustre 8 "2008 Mar 15" Lustre "configuration utilities" -.SH NAME -mount.lustre \- start a Lustre client or target service -.SH SYNOPSIS -.br -.BI "mount \-t lustre [\-o " options "] " directory -.SH DESCRIPTION -.B mount.lustre -is used to start a Lustre client or target service. This program should not be -called directly; rather it is a helper program invoked through -.BR mount (8) -as above. Lustre clients and targets are stopped by using the -.BR umount (8) -command. -.br - -There are two forms for the -.I device -option, depending on whether a client or a target service is started: -.TP -.IR <mgsspec> :/ <fsname> -mounts the Lustre filesystem named -.I fsname -on the client by contacting the Management Service at -.IR mgsspec -on the pathname given by -.IR directory . -The format for -.I mgsspec -is defined below. A mounted client filesystem appears in -.BR fstab (5) -and is usable like any local filesystem and provides a full -POSIX-compilant interface. -.TP -.I disk_device -starts the target service defined by the -.I mkfs.lustre -command on the physical disk -.IR disk_device . -A mounted target service filesystem is only useful for -.BR df (1) -operations and appears in -.BR fstab (5) -to show the device is in use. -.SH OPTIONS -.TP -.BI <mgsspec>:= <mgsnode>[:<mgsnode>] -The mgs specification may be a colon-separated list of nodes: -.TP -.BI <mgsnode>:= <mgsnid>[,<mgsnid>] -each node may be specified by a comma-separated list of NIDs. -.PP -In addition to the standard options listed in -.BR mount (8), -Lustre understands the following -.B client-specific -options: -.TP -.BI flock -Enable full flock support, coherent across all client nodes. -.TP -.BI localflock -Enable local flock support, using only client-local flock (faster, for applications that require flock but do not run on multiple nodes). -.TP -.BI noflock -Disable flock support entirely. Applications calling flock will get an error. -.TP -.BI user_xattr -Enable get/set of extended attributes by regular users. See the -.BR attr (5) -manual page. -.TP -.BI nouser_xattr -Disable use of extended attributes by regular users. Root and system processes can still use extended attributes. -.TP -.BI acl -Enable POSIX Access Control List support. See the -.BR acl (5) -manual page. -.TP -.BI noacl -Disable Access Control List support. -.PP -In addition to the standard mount options and backing disk type -(e.g. ext3) options listed in -.BR mount (8), -Lustre understands the following -.B server-specific -options: -.TP -.BI nosvc -Only start the MGC (and MGS, if co-located) for a target service, and not the actual service. -.TP -.BI exclude= ostlist -Start a client or MDT with a (colon-separated) list of known inactive OSTs. -.TP -.BI abort_recov -Abort client recovery and start the target service immediately. -.SH EXAMPLES -.TP -.B mount -t lustre cfs21@tcp0:/testfs /mnt/myfilesystem -Start a client for the Lustre filesystem 'testfs' at the mount point -/mnt/myfilesystem. The Management Service is running on a node reachable -from this client via the nid cfs21@tcp0. -.TP -.B mount -t lustre /dev/sda1 /mnt/test/mdt -Start the Lustre metadata target service from /dev/sda1 on mountpoint /mnt/test/mdt. -.TP -.B mount -t lustre -L testfs-MDT0000 -o abort_recov /mnt/test/mdt -Start the testfs-MDT0000 service (by using the disk label), but abort the -recovery process. -.SH BUGS -Not very many mount options can be changed with -.BR "-o remount" . -Please report all bugs to Sun Microsystems using http://bugzilla.lustre.org/ -.SH AVAILABILITY -.B mount.lustre -is part of the -.BR Lustre (7) -filesystem package and is available from Sun Microsystems, Inc. -.br -http://downloads.lustre.org -.SH SEE ALSO -.BR Lustre (7), -.BR mount (8), -.BR mkfs.lustre (8), -.BR tunefs.lustre (8), -.BR lctl (8), -.BR lfs (1) diff --git a/lustre/doc/postbar b/lustre/doc/postbar deleted file mode 100755 index 349d41c6b6..0000000000 --- a/lustre/doc/postbar +++ /dev/null @@ -1,151 +0,0 @@ -#! /usr/bin/perl -# postbar - Massage chbar.sh output into valid LaTeX -# Copyright (C) 2002 Cluster File Systems, Inc. -# Gord Eagle <gord@clusterfs.com>, 2002-08-10 - -my $progname = $0; -$progname =~ s|^.*/||; -my $CHANGE_ENVIRONMENT = '\\\\(begin|end)\\{([^\\}]+)\\}'; -my (@envname, @envdepth, @envbuf); -my $phony_preamble = 0; -my $cbdepth = 0; -my $cbfound = 0; - -# Tell whether an environment cannot have arbitrary changebars. -sub fragile_environment -{ - my ($env) = @_; - return $env ne 'document'; -} - - -# Tell whether we can hava arbitrary stuff. -sub toplevel -{ - my ($env) = @_; - return $env eq 'document'; -} - - -sub out -{ - my (@msg) = @_; - if ($#envbuf < 0 || toplevel($envname[0])) { - print @msg; - } else { - $envbuf[0] .= join('', @msg); - } -} - - -# Leave an environment. -sub end_environment -{ - my ($env) = @_; - - #out("%$progname end $env\n"); - if ($envname[0] ne $env) { - die "Expecting \\end{$envname[0]} but got \\end{$env}\n"; - } - - if ($cbfound) { - # Did we find a changebar? - $cbfound = !toplevel($envname[1]); - if (!$cbfound) { - # We found one, and the parent environment is the top level. - if ($cbdepth == $envdepth[0]) { - # There was no change in depth, so mark the environment. - $envbuf[0] = "\\cbstart{}%$progname\n" . $envbuf[0]; - out("\\cbend{}%$progname\n"); - } elsif ($envdepth[0] > $cbdepth) { - # There were more ends in the environment, so append them. - for (my $i = 0; $i < $envdepth[0] - $cbdepth; $i ++) { - out("\\cbend{}%$progname\n"); - } - } else { - # There were more starts, so prepend them. - my $starts; - for (my $i = 0; $i < $cbdepth - $envdepth[0]; $i ++) { - $starts .= "\\cbstart{}%$progname\n"; - } - $envbuf[0] = $starts . $envbuf[0]; - } - } - } - - # Drop the environment from the list. - shift(@envname); - shift(@envdepth); - out(shift(@envbuf)); -} - - -while ($_ = <STDIN>) { - chomp; - my $env; - if (!/\\begin.*\\end/ && /$CHANGE_ENVIRONMENT/o) { - $env = $2; - if ($1 eq 'begin') { - # Enter the new environment. - unshift(@envname, $env); - unshift(@envdepth, $cbdepth); - unshift(@envbuf, ''); - #out("%$progname depth=$cbdepth, $#envname ($env)\n"); - } elsif (!$phony_preamble) { - out("$_\n"); - end_environment($env); - next; - } - } - - if ($#envname >= 0 && /^\\documentclass/) { - $phony_preamble = 1; - } - - if ($phony_preamble) { - # Comment out and ignore the redundant preambles. - out("%$progname $_\n"); - $phony_preamble = 0 if ($env eq 'document'); - next; - } elsif ($#envname >= 0) { - # Track the current changebar depth. - if (/^\\cbstart/) { - $cbdepth ++; - if (!toplevel($envname[0])) { - $cbfound = 1; - out("%$progname $_\n"); - next; - } - } elsif (/^\\cbend/) { - if ($cbdepth == 0) { - die "$progname: Too many \\cbend{}s\n"; - } - $cbdepth --; - if (!toplevel($envname[0])) { - $cbfound = 1; - out("%$progname $_\n"); - next; - } - } elsif (/^\\cbdelete/ && fragile_environment($envname[0])) { - # What to do with delete bars? - out("%$progname $_\n"); - next; - } - out("$_\n"); - } else { - out("$_\n"); - # Add the options to the usepackage. - if (/^\\usepackage.*\{changebar\}$/) { - # Prevent PostScript dictionary overflow errors. - out("\\def\\cb\@maxpoint{15}\n"); - - # Show the bars. - out("\\outerbarstrue\n"); - } - } - - if (defined($env)) { - } -} - -exit(0); diff --git a/lustre/doc/tex2pdf b/lustre/doc/tex2pdf deleted file mode 100755 index d9a7176b5b..0000000000 --- a/lustre/doc/tex2pdf +++ /dev/null @@ -1,3043 +0,0 @@ -#!/usr/bin/perl -w - -# tex2pdf - script for translating latex docs to pdf -# -# Copyright (C) 2000-2002 by Steffen Evers and others -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# The GNU General Public License is also available online: -# http://www.gnu.org/licenses/gpl.html -# -# Thanks a lot to all the people that have already contributed to this project! -# -# The changelog including the credits has become too long. So, I have removed it -# from the script, but it is still available online (see below). -# -# Special thanks to the following people for their contribution -# (see the changelog for details): -# Matej Cepl, Herbert Voss, Nicolas Marsgui, Bruce Foster, Mark van Rossum, -# Matt Bandy, Garrick Chien Welsh, Stacy J. Prowell, Pavel Sedivy, -# Holger Daszler, Olaf Gabler, Ahmet Sekercioglui, Richard, Steffen Macke, -# Rainer Dorsch & friends, Jean-Pierre Chretien, Fernando Perez, -# Ha Duong Minh, Oscar Lopez -# -# Project Homepage: http://tex2pdf.berlios.de -# Developer Homepage: http://developer.berlios.de/projects/tex2pdf -# Mailing lists: http://developer.berlios.de/mail/?group_id=57 -# Changelog: http://tex2pdf.berlios.de/changelog.html -# -# Anyone is invited to help to improve tex2pdf. Therefore any kind of feedback -# is welcome. Maybe you even would like to hack the code and send us your -# changes. This would help a lot and is highly appreciated. Think about it :-) -# Subscribing to the developer mailing list might be a first step (see above). -# -# Send feedback to: tex2pdf-devel@lists.berlios.de -# - -######## Imports - -use File::Basename; -use File::Copy; -use Getopt::Long; -use Sys::Hostname; -use Cwd; -use strict; - -####### global variables - -my $MYRELEASE="3.0.21"; -my $MYHOSTNAME=hostname; -my $MYNAME=basename $0; -my $MYUSER=$ENV{'USER'}; -my $USER_HOME=$ENV{'HOME'}; -if (not $MYUSER) { $MYUSER = 'nobody'; } -if (not $USER_HOME) { $USER_HOME = '/tmp'; } - -my @TMPFILES=(); -my @TMP_TEX_FILES=(); -my $NUM_PARAM_MIN=0; -my $NUM_PARAM_MAX=9; -my @REF_DOCS; -my $MTP_PREAMBLE_FILENAME="preamble.cfg"; -my $MTP_TMP_BASESUFFIX="-mp"; -my @EPS_SUFFIXES=('eps','ps','ps.gz','eps.gz' ); -my $PDF_ORIG_SUFFIX='pdf.orig'; -my @BITMAP_SUFFIXES=( 'jpg', 'png', 'tif' ); - -# (initial) log file of this script -# this log file will be moved to the specified log_dir after configuration -# and the variable will be updated to the new name -my $MYLOGFILE="$USER_HOME/tex2pdf-$$.log"; -my $LOGFILE_VERBOSITY=9; - -### text token for no value -my $NIL="NOVALUE"; -my $UNDEF="undefined"; - -### token for boolean 'false', 'no' -my $NO="no"; -my $FALSE=0; - -### token for boolean 'true', 'yes' -my $YES="yes"; -my $TRUE=1; - -### file to store private parameters -# If you only want to change your private parameters change them there -# default: $HOME/.tex2pdf3rc -my $RC_FILENAME="$USER_HOME/.tex2pdf3rc"; -my $MYRCFILE_VERSION=7; -my $RCVERSION_STRING="rcfile_version"; - -## set global variable configured to prevent access to configuration -# parameters before configuration process is finished -my $CONFIGURED=$FALSE; -my $PRE_CONFIG_VERBOSITY=4; - -########################## NEW PERL CONFIGURATON - -my %CONFIGURATION = (); -my %PARAMETER_LIST = (); -my @PARAMETER_ORDER = (); -my %PARAMETER_TYPES = (); - -## Array index for the various information in each parameter specifcation -## referenced by %PARAMETER_LIST -my $TYPE=0; -my $OPT_ALIAS=1; -my $OPT_SPEC=2; -my $DEF_VALUE=3; -my $DESCRIPTION=4; -my $QUESTION=5; -my $EXPLANATION=6; - -&add_param_type('paper', - [ ['a4paper' , 'a4 paper' ], - [ 'letterpaper', 'letter paper' ], - [ 'legalpaper', 'legal paper' ], - [ 'executivepaper', 'executive paper' ], - [ $NIL, 'do not set value - leave it to hyperref' ] - ] ); - -&add_param_type('color', - [ [ 'yellow', 'LaTeX color yellow' ], - [ 'red', 'LaTeX color red' ], - [ 'green', 'LaTeX color green' ], - [ 'cyan', 'LaTeX color cyan' ], - [ 'blue', 'LaTeX color blue' ], - [ 'magenta', 'LaTeX color magenta' ], - [ 'black', 'LaTeX color black' ], - [ $NIL , 'do not set this value - leave it to hyperref' ] - ] ); - -&add_param_type('destination', - [ [ 'source', 'directory of the LaTeX source document' ] , - [ 'input', 'root directory of referenced material' ], - [ 'custom', 'custom directory as specified' ] - ] ); - -### Option parameters: these parameters have no default value and can not -# be configured interactively, but only as a command line option -# an option parameter is not allowed to have a default value, question or -# explanation -# and all parameter of type action are treated as option parameters -# $key, $type, $def_value, $opt_alias, $opt_spec, $description, $question, $explanation - -&add_param('help', 'action', undef, '|h', '', - 'print a short help text and exit'); - -&add_param('version', 'action', undef, '|v', '', - 'print the version of this script and exit'); - -&add_param('print_config', 'action', undef, '|o', '', - 'print the current configuration and exit'); - -&add_param('configure', 'action', undef, '|c', '', - 'configure all parameters interactivly, store them and exit'); - -&add_param('title', 'text', undef, '|t', '=s', - 'set PDF info title for specified document'); - -&add_param('author', 'text', undef, '|a', '=s', - 'set PDF info author for specified document'); - -&add_param('input_path', 'directory', undef, '', '=s', - 'set path for referenced material in main document'); - -### Full parameters -# parameter type action is not allowed -# $key, $type, $def_value, $opt_alias, $opt_spec, $description, $question, $explanation - -&add_param('logdir', 'directory',"$USER_HOME/tex2pdf-log/", '', '=s', - 'set directory for saving log files', - 'What log directory should be used?', - "The log directory is used to store information about the generation\n" - ."process for later review, e.g. for debugging."); - -&add_param('lyxrc_path', 'directory', "$USER_HOME/.lyx/", '', '=s', - 'set the configuration directory of LyX', - 'What is the directory for your LyX configuration data?', - "If I have to generate a LateX file from a LyX file I need to clear two " - ."temporary\nfiles in your LyX configuration directory. They will " - ."be backuped and normally\ndo not contain any valuable data anyway. If " - ."you do not use LyX, simply leave\nthe default."); - -&add_param('lyx_exec', 'text', "lyx", '', '=s', - 'specify the LyX executable for converting lyx to latex', - 'Which executable should I use for converting LyX docs to LaTeX?', - "I use LyX to generate a LateX file from a LyX file. As you might use\n" - ."several versions of LyX at the same time or do not have it in your path" - ."\nyou can give me the apropriate executable here (e.g. '/usr/bin/lyx')." - ."\nIn most cases the default 'lyx' should be fine."); - -&add_param('debug', 'bool', $NO, '', '!', -'do not delete temporary files after execution and be as verbose as possible', - 'Do you want to debug this script?', - "I will not remove any temporary files. This could cause problems on a " - ."second\nexecution as I might refuse to overwrite these files for security " - ."reasons.\nYou have to remove them manually in this case. Additionally, I " - ."will provide\nas much information during execution as possible."); - -&add_param('delete_pdf_images', 'bool', $NO, '', '!', - 'delete generated PDF image files after execution', - 'Should generated PDF image files be deleted after execution?', - "Pdflatex cannot handle EPS images. Therefore all such images need to be\n" - ."translated to PDF in advance. After a successful generation of the final " - ."PDF \ndocument or after encountering an error I could leave this PDF " - ."images for\n later executions or simply delete them."); - -&add_param('clean_on_abort', 'bool', $YES, '', '!', - 'also delete temporary files after abort', - 'Should temporary files be deleted when aborting?', - "When the generation of the PDF file fails for some reason you might still " - ."want\nto keep already generated temporary files for some reason, e.g. " - ."debugging.\nIf you do not want to keep them set this parameter to 'yes'."); - -&add_param('tmp_base_suffix', 'text', '-pdf', '', '=s', - 'specify the extension of the basename for temporary TeX files', - 'What string should be used as basename suffix for temporary files?', - "I have to find names for my temporary files. Therefore I construct a new " - ."name\nfrom the original filename and this string. Me and various called " - ."applications\nwill then create several files with this constructed " - ."basename and different\nextensions. When cleaning up I will simple " - ."delete all files with the\nconstructed basenames I have used."); - -&add_param('overwrite', 'bool', $NO, '', '!', - 'ignore existence of files with same basename as temporary TeX files', - 'Should I overwrite existing (temporary) files?', - "In spite of the precaution with the appended base suffix, there still " - ."might\nexist files with an identical basename. If you set this option I " - ."will consider\nsuch files as old temporary files and overwrite them " - ."during generation.\nHowever, I will not remove any files with this " - ."constructed basename on the\nclean up. You have to remove them manually."); - -&add_param('clean_logs', 'bool', $YES, '|l', '!', - 'delete all log files in log directory before execution', - 'Should the old log files be removed before execution?', - "I can remove old log files prior to execution. However, you might " - ."experience\nproblems if you run the script on several documents at the " - ."same time. If you\nwant to be on the safe side, answer '$NO'. Than you " - ."have to remove the logs\nmanually from time to time."); - -&add_param('check_commands', 'bool', $YES, '', '!', - 'make sure that required shell commands does exist before start', - 'Should I look for required executables?', - "As I use several different applications for PDF generation you might want " - ."to \nmake sure that they are available before the real work starts."); - -&add_param('destination', 'destination', 'source', '', '=s', - 'specifiy final location of generated PDF document', - 'Where should I store the resulting PDF document?', - "Depending on the application that starts this script (or you if you call " - ."it\ndirectly) you might want to have the resulting PDF document located " - ."at\ndifferent places."); - -&add_param('custom_path', 'directory', $USER_HOME.'/', '|d', '=s', - "specify custom path for 'destination' parameter", - 'What custom directory should be used?', - "When ever you specifiy to store the generated PDF document (command line " - ."or\nconfiguration) in a custom directory I will put it here."); - -&add_param('colorlinks', 'three', $YES, '', '!', - 'activate colored links in PDF doc (hyperref)', - 'Should colors be used for links?', - "I can use different colors for links inside the PDF document.\nYou can " - ."use '$UNDEF' to tell me that you would like to leave this up to\n" - ."independent hyperref configuration."); - -&add_param('paper', 'paper', 'a4paper', '|p', '=s', - 'specify papersize of the PDF doc (hyperref)', - 'What papersize should be used?', - "I can set the papersize of the resulting PDF document"); - -&add_param('citecolor', 'color', 'blue', '', '=s', - 'specify color of citations in PDF doc (hyperref)', - 'What color should be used for citation?', ""); - -&add_param('urlcolor', 'color', 'blue', '', '=s', - 'specify color of URLs in PDF doc (hyperref)', - 'What color should be used for URLs?', ""); - -&add_param('linkcolor', 'color', 'blue', '', '=s', - 'specify color of internal links in PDF doc (hyperref)', - 'What color should be used for normal internal links?', ""); - -&add_param('pagecolor', 'color', 'blue', '', '=s', - 'specify color of links to other pages in PDF doc (hyperref)', - 'What color should be used for page links?', ""); - -&add_param('link_toc_page', 'bool', $YES, '', '!', - 'link table of contents to pages instead of sections (hyperref)', - 'Should TOC be linked to pages?', - "The table of contents of the resulting PDF document is normally linked to " - ."the\ncorresponding section. However, you can also link it to the " - ."corresponding page\ninstead."); - -&add_param('default_title', 'text', $NIL, '', '=s', - 'set default PDF info title', - 'What is the default title?', - "A PDF document contains meta data about itself: the document info.\nOne " - ."of the info fields is the document title. You can set a default value\n" - ."which will be used in the case the script cannot determine a proper " - ."title from\nthe LaTeX document and you have not set one on the command " - ."line.\nYou can use '$NIL' to tell me that you would like to leave this " - ."up to\nindependent hyperref configuration."); - -&add_param('default_author', 'text', $NIL, '', '=s', - 'set default PDF info author', - 'What is the default author?', - "A PDF document contains meta data about itself: the document info.\nOne " - ."of the info fields is the document author. You can set a default value\n" - ."which will be used in the case the script cannot determine a proper " - ."author\nfrom the LaTeX document and you have not set one on the command " - ."line.\nYou can use '$NIL' to tell me that you would like to leave this " - ."up to\nindependent hyperref configuration."); - -&add_param('force_index', 'bool', $NO, '|i', '!', - 'force explicit inclusion of (existing) index in PDF doc', - 'Should the call of makeindex be forced?', - "Older versions of pdflatex have not included the index of a document\n" - ."automatically. If you are missing the index in your document you can " - ."force the\ncall of makeindex on the condition that an index file was " - ."generated."); - -&add_param('makeindex_opts', 'text', '', '', '=s', - 'specify extra options for shell execution of makeindex', - 'What additional options for makeindex should be used?', - "Sometimes, people would like to pass some extra options over to makeindex. " - ."This\nis the right place to do that. Everyone else can leave this empty."); - -&add_param('bibtex', 'three', $NIL, '|b', '!', - 'set bibtex behavior', - 'How should bibtex be used?', - "The bibtex usage can be specified.\nPossible values are: '$YES' (always " - ."run bibtex), '$NO' (never run bibtex)\nand '$UNDEF' (scan tex file for " - ."a bibtex entry and run it if required)."); - -&add_param('gloss', 'three', $NIL, '', '!', - 'set gloss behavior', - 'How should gloss be used?', - "The gloss usage can be specified.\nPossible values are: '$YES' (always " - ."run bibtex on file.gls), '$NO' (never run bibtex on file.gls)\nand '$UNDEF' (scan tex file for " - ."a gloss entry and run it if required)."); - -&add_param('thumbpdf', 'bool', $NO, '|n', '!', - 'generate thumbnails for PDF document', - 'Should PNG thumbnails be created?', - "I can use thumbpdf to include thumbnails of the document pages in the PDF " - ."file.\nThis requires Ghostscript 5.50 or higher."); - -&add_param('ppower', 'bool', $NO, '|w', '!', - 'postprocess PDF document with ppower', - 'Should ppower postprocess the PDF document?', - "I can use ppower to postprocess the PDF " - ."file.\nThis requires ppower 4.0 or higher."); - -&add_param('authorindex', 'bool', $NO, '', '!', - 'generate author index for PDF document', - 'Should authorindex process the PDF document?', - "I can use authorindex to process to include an author index in the PDF " - ."file.\nThis requires authorindex."); - - -&add_param('mtp_preamble', 'bool', $NO, '|r', '!', - "add the file $MTP_PREAMBLE_FILENAME at the current dir to metapost files", - "Should the $MTP_PREAMBLE_FILENAME file be added to the metapost files?", - "I can add $MTP_PREAMBLE_FILENAME to metapost " - ."files.\nThis requires an existing $MTP_PREAMBLE_FILENAME file."); - -&add_param('maxrun', 'integer', 6, '', '=i', - 'specify maximal number of pdflatex runs if problems are detected', - 'What should be the maximum number of runs for pdflatex (1-6)?', ""); - -&add_param('minrun', 'integer', 2, '', '=i', - 'specify minimal number of pdflatex runs if no problems are detected', - 'What should be the minimum number of runs for pdflatex (1-6)?', ""); - -&add_param('verbosity', 'integer', 5, '', '=i', - 'set the level of verbosity', - 'Which level of verbosity do you want (0-9)', - "Different people want different amounts of information about what the " - ."script\nactually does. Therefore you can adjust the verbosity to your " - ."personal needs\nby setting this parameter to a value from 0 to 9. 0 " - ."means no output at all\nand 9 means maximal output."); - -&add_param('pdftex_opts', 'text', '', '', '=s', - 'specify extra options for shell execution of pdflatex', - 'What additional options for pdflatex should be used?', - "Sometimes, people would like to pass some extra options over to pdflatex. " - ."This\nis the right place to do that. Everyone else can leave this empty."); - -&add_param('hyperref_args', 'text', '', '', '=s', - 'specify extra arguments for the hyperref package', - 'What additional arguments should be passed to the hyperref package?', - "Sometimes, people would like to pass some extra options over to hyperref. " - ."This\nis the right place to do that. Everyone else can leave this empty."); - -# the following parameter types should be set now: -# 'color' => \@VALUES, -# 'destination' => \@VALUES, -# 'paper' => \@VALUES, -# 'action' => undef, -# 'three' => undef, -# 'bool' => undef, -# 'integer' => undef, -# 'text' => undef, -# 'directory' => undef - -##### Functions ########################################### - -### handle a status report with a given priority level -# write it to the log file if log file if configuration is done -# write it to stdout if verbosity is set lower or equal -# -# The following priority levels exist: -# 1: minimal fatal error messages -# 2: additional information about fatal error -# 3: non-fatal error message -# 4: warning -# 5: major step of the process -# 6: minor step of the process -# 7: progress report of minor step -# 8: long status report from called applications -# 9: debug info -# -# parameter 1: priority level -# parameter 2: list of output strings -# return value: none - -sub report { - my $level; - my $verbosity; - my $log_verbosity; - my @output; - - if (@_ < 2 ) { - @output = ( "Oppss! Report function got only 1 argument!" ); - $level = 9; - } else { - ($level, @output) = @_; - } - - if($CONFIGURED) { - if( ¶m_value('debug') eq $NO ) { - $verbosity = ¶m_value('verbosity'); - $log_verbosity = $LOGFILE_VERBOSITY; - } else { - $verbosity = 9; - $log_verbosity = 9; - } - } else { - $verbosity = $PRE_CONFIG_VERBOSITY; - $log_verbosity = $LOGFILE_VERBOSITY; - } - - if ( $level <= $log_verbosity ) { - open LOGFILE, ">> $MYLOGFILE"; - print LOGFILE @output,"\n"; - close LOGFILE; - } - - if( $level <= $verbosity ) { - print @output,"\n"; - } -} - -### process system command and do the appropriate reports -# parameter 1: the system command to process -# parameter 2: flag - TRUE: abort on failure, FALSE: continue on failures -# parameter 3: priority level for output of system command -# parameter 4: specific failure message -# return value: TRUE - success, FALSE - failure - -sub system_command { - my $command = $_[0]; - my $fatal_failure= $_[1]; - my $output_priority = $_[2]; - my $fail_message = $_[3]; - my $system_out; - - $system_out = `$command 2>&1`; - - if ($?) { - if ($fatal_failure) { - &report(2, $system_out) if ($system_out); - &abort($fail_message.": $!"); - } else { - &report($output_priority, $system_out) if ($system_out); - &report(3, $fail_message.": $!"); - } - return $FALSE; - } - - return $TRUE; -} - -### Index of the first occurence of a string in an array -# parameter 1: text -# parameter 2: list -# return value: index or -1 if not element of the array - -sub array_index { - my ($text, @list) = @_; - - if(!defined($text)) { - &report(9, "Oppss! Cannot compare nothing."); - return -1; - } - - foreach (0..$#list) { - if ( $list[$_] eq $text ) { return $_; } - } - - return -1; -} - -### extract the last N lines of a text file -# abort on failures -# parameter 1: file to read -# parameter 2: N - number of lines to print (undef/0: all lines) -# return value: last N lines - -sub file_tail { - my $file_name = $_[0]; - my $no_of_lines = defined($_[1]) ? $_[1] : 0; - my @cache=(); - - &check_file($file_name); - open(TAIL_SOURCE, "<$file_name") - or &abort("Could not read file $file_name: $!"); - - if($no_of_lines == 0) { - # use entire file - while(<TAIL_SOURCE>) { - if(!$_) { $_="\n"; } - push(@cache, $_); - } - } else { - # only last N lines - - # fill up cache - while(@cache < $no_of_lines and <TAIL_SOURCE>) { - if(!$_) { $_="\n"; } - push(@cache, $_); - } - - # always cache the last N lines up to the end of the file - while(<TAIL_SOURCE>) { - if(!$_) { $_="\n"; } - shift(@cache); - push(@cache, $_); - } - } - - close TAIL_SOURCE; - - return @cache; -} - -### return all lines of FILE which match match regexp EXPR -# parameter 1: FILE - file to read -# parameter 2: EXPR - regular expression to match -# parameter 3: true: exit on first occurence, otherwise get all (default: false) -# return value: array of matching lines - -sub grep_file { - my $file_name = $_[0]; - my $regexp = $_[1]; - my $first_only = $_[2] ? $TRUE : $FALSE; - my @result=(); - - ### open file and abort if not possible - &check_file($file_name); - open(GREP_SOURCE, "<$file_name") - or &abort("Could not read file $file_name: $!"); - - while(<GREP_SOURCE>) { - if(m#$regexp#) { - push(@result, $_); - if($first_only) { last; } - } - } - - close GREP_SOURCE; - return @result; -} - -### Removing all temporary files - -sub clean_up { - &report(6, "Removing temporary files ..."); - foreach (@TMPFILES) { - unlink($_) if(-f $_); - } - - foreach (@TMP_TEX_FILES) { - # make sure that we have a good tex file name in order - # to avoid unintended removals - if( $_ ne "" and -f $_.'.tex' ) { - unlink glob($_.".???"); - } else { - &report(3, "Bad file in temp tex files list: $_"); - } - } -} - -### Output of all temp files - -sub print_temp_files { - if (scalar @TMPFILES > 0) { - print "Stored the following explicit temporary files:\n"; - foreach (@TMPFILES) { - if (-f $_) { - print "> ".$_."\n"; - } else { - print "> ".$_." (does not exist)\n"; - } - } - print "\n"; - } - - if (scalar @TMP_TEX_FILES > 0) { - print "Stored the following temporary TeX base names:\n"; - foreach (@TMP_TEX_FILES) { - if( $_ ne "" and -f $_.'.tex' ) { - print "> ".$_.": "; - foreach my $file (glob($_.".???")) { - print basename($file)." "; - } - print "\n"; - } else { - print "> ".$_.": bad file for temp TeX file\n"; - } - } - print "\n"; - } -} - -### exit with an error message - -sub abort { - &report(1, @_); - if ( $CONFIGURED and ¶m_value('clean_on_abort') eq $YES - and ¶m_value('debug') eq $NO) { - &clean_up; - } else { - &print_temp_files; - } - &report(2, "Aborting ..."); - exit 1; -} - -### Check for required command with 'which'; abort if not found -# parameter $1: command to check -# parameter $2: remark if specified command is not found - -sub checkCommand { - my $command = $_[0]; - my $message = $_[1]; - my $which_output; - - $which_output = `which $command 2>&1`; - chomp $which_output; - $_ = $which_output; - s|^(.*/)?([^/]+)$|$2|; - - if ( $_ ne $command ) { - &report(2, "\n$which_output"); - &report(1, "\nRequired command '$command' seems not to be in your path."); - if ( defined($message) ) { - &report(2, "$message"); - } - &report(2, "Aborting ..."); - exit 1; - } -} - -###################### Generic configuration functions - -### interactively answer a question with yes or no -# parameter 1: question -# parameter 2: default value (not set means $NIL) -# parameter 3: yes: allow undefined as third value -# no : only yes/no allowed (default) -# return value: the given answer - -sub question_ynu { - my $user_input; - my $question = $_[0]; - my $default = defined($_[1]) ? $_[1] : $NIL; - my $undef_allowed = $_[2]; - my $response = undef; - - if (defined($undef_allowed) and $undef_allowed eq $YES) { - $undef_allowed = $TRUE; - } else { - $undef_allowed = $FALSE; - } - - if( $default =~ /^y(es)?/i ) { - $question .= ' [y]: '; - $default = $YES; - } elsif ( $default eq $NIL and $undef_allowed ) { - $question .= ' [u]: '; - $default = $NIL; - } else { - $question .= ' [n]: '; - $default = $NO; - } - while (! defined($response)) { - print $question; - $user_input = <STDIN>; - chomp($user_input); - - if( $user_input =~ /^y(es)?/i ) { - $response=$YES; - } elsif ( $user_input =~ /^no?/i ) { - $response=$NO; - } elsif ( $user_input =~ /^u(ndef(ined)?)?/i and $undef_allowed ) { - $response=$NIL; - } elsif ( $user_input eq "" ) { - $response=$default; - } else { - print "Please respond with y(es)"; - print ", u(ndefined)" if($undef_allowed); - print " or n(o).\n"; - } - } - return $response; -} - -### interactively input a positive integer number -# parameter 1: question -# parameter 2: default value -# parameter 3: min value -# parameter 4: max value -# return value: the input number - -sub input_number { - my $question = $_[0]; - my $default = $_[1]; - my $min_limit = $_[2]; - my $max_limit = $_[3]; - my $response= undef; - - while (! defined($response)) { - print "$question [$default]: "; - my $user_input = <STDIN>; - chomp($user_input); - - if ($user_input eq "") { - $response=$default; - } else { - $_ = $user_input; - if (s/^([0-9]+)$/$1/ and $_ >= $min_limit and $_ <= $max_limit ) { - $response = $_; - } else { - print "Invalid input. Please enter a positve integer from $min_limit to $max_limit.\n"; - } - } - } - return $response; -} - -### interactively choose between several given values -# parameter 1: question -# parameter 2: default value -# parameter 3: reference to an array of possible values arrays -# return value: the chosen value - -sub choose_value { - my ($question, $default, $enum_array_ref)=@_; - my $default_no=1; - my $chosen_no; - my @possible_values = @$enum_array_ref; - my @value_array; - my $value_key; - my $value_output; - - print "$question\n"; - foreach (0..$#possible_values) { - my $no = $_ + 1; - @value_array = @{$possible_values[$_]}; - $value_key = $value_array[0]; - $value_output = $value_array[1]; - - print "$no) " . $value_output . "\n"; - if ( $default eq $value_key ) { $default_no=$no; } - } - - $chosen_no=&input_number("Please enter the corresponding number", $default_no, 1, $#possible_values); - - @value_array = @{$possible_values[$chosen_no - 1]}; - $value_key = $value_array[0]; - return $value_key; -} - -### interactively answer a question -# parameter 1: question -# parameter 2: current value -# return value: the new value - -sub input_text { - my $question=$_[0]; - my $default=$_[1]; - my $response= undef; - - print "Suggested value: $default\n"; - if ( &question_ynu("Do you want to keep this value?", $YES) eq $YES ) { - $response= $default; - } else { - print "$question "; - my $user_input = <STDIN>; - chomp($user_input); - - $response = $user_input; - } - return $response; -} - -##### Make sure that specified file exists and is readable; abort if missing -# parameter 1: file to check -# parameter 2: remark if check fails on specified file - -sub check_file { - my $file = $_[0]; - my $message = defined($_[1]) ? $_[1] : "Required file cannot be accessed!"; - - if ( ! -f $file ) { - &report(2, "\nSorry. I cannot find '$file'."); - &abort($message); - } elsif ( ! -r $file ) { - &report(2, "\nSorry. File '$file' exists, but is not readable."); - &abort($message); - } -} - -##### Make sure that specified directory exists and is writable -# parameter 1: directory to check -# parameter 2: remark if check fails on specified directory -# parameter 3: if yes, creation is allowed -# return value: $TRUE - ok; $FALSE - error - -sub check_dir { - my $directory = $_[0]; - my $message = defined($_[1]) ? $_[1] : "Not a valid path!"; - my $allow_creation = defined($_[2]) ? $_[2] : $NO; - - if ( index($directory, "/") != 0 ) { - &report(3, "\nSorry. '$directory' is not an absolute path."); - &report(3, $message); - return $FALSE; - } elsif ( ! -d $directory ) { - # dir does not exist - if ( $allow_creation eq $YES ) { - # creation allowed - &report(4, "\nI cannot find '$directory'. Try to create it."); - if ( mkdir($directory, 0755) ) { - &report(7, "Creation of '$directory' was successful."); - return $TRUE; - } else { - &report(3, "Creation of '$directory' failed."); - &report(3, $message); - return $FALSE; - } - } else { - # creation not allowed - &report(3, "\nSorry. Directory '$directory' does not exist."); - &report(3, $message); - return $FALSE; - } - } elsif ( ! -w $directory ) { - # dir not writable - &report(3, "\nSorry. Directory '$directory' exists, but is not writable."); - &report(3, $message); - return $FALSE; - } - return $TRUE; -} - -### interactively input a directory for data storage (absolute path) -# parameter 1: question -# parameter 2: default dir -# parameter 3: if 'yes' allow creation of directory -# return value: the specified directory - -sub input_dir { - my $question = $_[0]; - my $default_dir = $_[1]; - my $allow_creation = defined($_[2]) ? $_[2] : $NO; - my $user_input; - my $response = undef; - - if ( defined($default_dir) and index($default_dir, "/") == 0 - and ( (! -d $default_dir and $allow_creation eq $YES) - or (-d $default_dir and -w $default_dir) ) ) { - $question .= " [$default_dir]: "; - } else { - $default_dir = undef; - $question .= ": "; - } - - while (! defined($response)) { - print "$question"; - $user_input = <STDIN>; - chomp($user_input); - - if( $user_input eq "" and defined($default_dir) ) { - # user has only pressed <ENTER> and thereby confirmed default value - if( ! &check_dir($default_dir,"Default value was not valid. Please, give different directory.", $allow_creation ) ) { - # default dir does not exist and cannot be created - $default_dir = undef; - $question = "$_[0]: "; - } else { - # valid default dir has already existed or has been created - $response = $default_dir; - } - } else { - # user has given a directory - if( &check_dir($user_input,"This is not a valid directory!", $allow_creation) ) { - $response = $user_input; - } - } - } - return $response; -} - -#### add a new parameter type with corresponding additional data argument -#### parameters types -# parameter 1: type key -# parameter 2: additonal data for the type -# e.g. for enum type: reference to list of arrays -# return value: none - -sub add_param_type { - - my ($type, $scalar_argument) = @_; - - $PARAMETER_TYPES{$type} = $scalar_argument; -} - -#### add a new parameter to the adminstrated parameters -#### -# parameter 1: key -# parameter 2: type -# parameter 3: default value -# parameter 4: alias for command line options -# parameter 5: specification for command line options -# parameter 6: short description for help -# parameter 7: question -# parameter 8: explanation -# return value: none - -sub add_param { - - my ($key, $type, $def_value, $opt_alias, $opt_spec, $description, $question, $explanation) = @_; - - $CONFIGURATION{$key} = $def_value; - - $PARAMETER_LIST{$key} = [ $type, $opt_alias, $opt_spec, $def_value, $description, $question, $explanation ]; - - push(@PARAMETER_ORDER, $key); - - if (! exists $PARAMETER_TYPES{$type}) { - $PARAMETER_TYPES{$type} = undef; - } -} - -### get the value of an existing parameter -# parameter 1: a parameter key -# return value: reference to the array of possible value entries -# (undef if not valid) - -sub type_enum_array { - my $key = $_[0]; - my $values_ref; - - if(! exists($PARAMETER_TYPES{$key})) { - &abort("unknown type: $key"); - } - - $values_ref = $PARAMETER_TYPES{$key}; - - if(ref $values_ref ne 'ARRAY') { - $values_ref = undef; - } - - return $values_ref; -} - -### get the value of an existing parameter -# parameter 1: a parameter key -# return value: parameter value - -sub param_value { - my $key = $_[0]; - my $current_value; - - exists($CONFIGURATION{$key}) - or &abort("unknown parameter: $key"); - $current_value = $CONFIGURATION{$key}; - - return $current_value; -} - -### get the type of an existing parameter -# parameter 1: a parameter key -# return value: parameter value - -sub param_type { - my $key = $_[0]; - my $def_ref; - my $type; - - exists($PARAMETER_LIST{$key}) - or &abort("unknown parameter: $key"); - $def_ref = $PARAMETER_LIST{$key}; - $type = @{$def_ref}[$TYPE]; - - exists($PARAMETER_TYPES{$type}) - or &abort("parameter has unknown type: $key (type: $type)"); - - return $type; -} - -### determine if the given parameter is a full one (instead of option only) -# parameter 1: a parameter key -# return value: $TRUE - full parameter; $FALSE otherwise - -sub full_param { - my $key = $_[0]; - my @param_def; - - exists($PARAMETER_LIST{$key}) - or &abort("unknown parameter: $key"); - @param_def = @{$PARAMETER_LIST{$key}}; - - if ($param_def[$TYPE] ne 'action' and defined ($param_def[$QUESTION])) { - return $TRUE; - } else { - return $FALSE; - } -} - -### get the output needed for configuration of this parameter -# parameter 1: a parameter key -# return value: array - (description, explanation, question) - -sub param_config_output { - my $key = $_[0]; - my @param_def; - my $description; - my $explanation; - my $question; - - exists($PARAMETER_LIST{$key}) - or &abort("unknown parameter: $key"); - @param_def = @{$PARAMETER_LIST{$key}}; - $description = $param_def[$DESCRIPTION]; - $explanation = $param_def[$EXPLANATION]; - $question = $param_def[$QUESTION]; - - return ($description, $explanation, $question); -} - -### set the value of an existing parameter -# parameter 1: a parameter key -# parameter 2: the new value -# return value: none - -sub set_param_value { - my $key = $_[0]; - my $new_value = $_[1]; - - exists($CONFIGURATION{$key}) - or &abort("unknown parameter: $key"); - $CONFIGURATION{$key}=$new_value; -} - -### get option specifier for getopts -# parameter 1: option key -# return value: string - option specifier - -sub option_specifier { - my $key = $_[0]; - my $spec; - my $def_ref; - - exists($PARAMETER_LIST{$key}) - or &abort("unknown parameter: $key"); - $def_ref = $PARAMETER_LIST{$key}; - $spec = $key . ${$def_ref}[$OPT_ALIAS] . ${$def_ref}[$OPT_SPEC]; - - return $spec; -} - -### handle an option -# parameter 1: a parameter/option key -# parameter 2: the option value -# return value: none - -sub handle_option { - my $key = $_[0]; - my $value = $_[1]; - my $type; - - $type = ¶m_type($key); - - if ($type eq 'action') { - &handle_action_opt($key, $value); - } elsif ( $type eq 'bool' or $type eq 'three') { - my $bool_value = $value ? $YES : $NO; - &set_param_value($key, $bool_value); - } elsif ( $type eq 'directory') { - if (! &check_dir($value)) { - &report(2, "$key requires an existing writable directory as an absolute path."); - &abort("Illegal value: $value"); - } - &set_param_value($key, $value); - } elsif (defined(&type_enum_array($type))){ - &set_enum_param($key, $value); - } else { - &set_param_value($key, $value); - } -} - -### handle all action options -# parameter 1: a option key -# parameter 2: the option value -# return value: none - -sub handle_action_opt { - my $key = $_[0]; - my $value = $_[1]; - - if ($key eq 'help') { - &print_help; - - } elsif ($key eq 'version') { - &print_version; - - } elsif ($key eq 'configure') { - if ( -f $RC_FILENAME ) { - &read_configuration($RC_FILENAME); - } - &configure; - &write_configuration($RC_FILENAME); - &print_configuration; - - } elsif ($key eq 'print_config') { - if ( -f $RC_FILENAME ) { - &read_configuration($RC_FILENAME); - } - &print_configuration; - - } else { - &print_usage; - exit 1; - } - exit 0; -} - -### set a variable by a command line option to a possible values; abort on error -# parameter 1: parameter key -# parameter 2: value - -sub set_enum_value { - my ($key, $value) = @_; - my $type; - my $enum_array_ref; - my @allowed_values=(); - - $type = ¶m_type($key); - $enum_array_ref = &type_enum_array($type); - &abort("Internal error: No value array for parameter $key.") - if(!defined($enum_array_ref)); - - ### find out if the given value is allowed - foreach my $value_array_ref (${$enum_array_ref}) { - if(${$value_array_ref}[0] eq $value) { - ### found it, so it is okay! - &set_param_value($key, $value); - return; - } - } - - ### value is not listed, so not allowed - ### make a list of all allowed values - foreach my $value_array_ref (${$enum_array_ref}) { - push(@allowed_values, ${$value_array_ref}[0]); - } - - &report(2, "\n$key allows: " . @allowed_values . ".\n"); - &abort("Illegal value: $value"); -} - -### configure an existing parameter interactively -# parameter 1: a parameter key -# return value: none - -sub config_param { - my $key = $_[0]; - my $type; - my $new_value; - my $current_value; - my $description; - my $explanation; - my $question; - - ### get required information about this parameter - $type = ¶m_type($key); - $current_value = ¶m_value($key); - ($description, $explanation, $question) = ¶m_config_output($key); - - ### tell the user the facts - print "\n\n--------------------------------------------\n"; - print "Parameter: ".$key."\n"; - print $description."\n\n"; - print $explanation."\n\n" if($explanation ne ""); - - ### ask him what he wants - if ($type eq 'bool') { - $new_value=&question_ynu($question, $current_value, $NO); - } elsif ($type eq 'three') { - $new_value=&question_ynu($question, $current_value, $YES); - } elsif ($type eq 'directory') { - $new_value=&input_dir($question, $current_value, $YES); - } elsif ($type eq 'text') { - $new_value=&input_text($question, $current_value); - } elsif ($type eq 'integer') { - $new_value=&input_number($question, $current_value, - $NUM_PARAM_MIN, $NUM_PARAM_MAX); - } else { - my $enum_array_ref; - - $enum_array_ref=&type_enum_array($type); - if (! defined($enum_array_ref)) { - &abort("Do not know how to configure this parameter: $key (type: $type)"); - } - - $new_value=&choose_value($question,$current_value,$enum_array_ref); - } - - ### store his choice - &set_param_value($key, $new_value); -} - -### save configuration in rc file -# parameter 1: file name -# return value: none - -sub write_configuration { - my $file_name = $_[0]; - my $date; - - open(RCFILE, ">$file_name") or - &abort("Could not open configuration file for writing ($file_name)"); - select RCFILE; - - $date = `date`; - chomp($date); - - print "# Configuration file for $MYNAME V$MYRELEASE\n"; - print "# Generated $date by $MYUSER on $MYHOSTNAME\n"; - print "$RCVERSION_STRING=$MYRCFILE_VERSION\n"; - - foreach my $key (@PARAMETER_ORDER) { - my $value = $CONFIGURATION{$key}; - if(&full_param($key)) { - print $key.'='.$value."\n"; - } - } - - print "# EOF\n"; - select STDOUT; - close RCFILE; -} - -### print the configuration parameters - -sub print_configuration { - print "\nConfiguration for $MYNAME V$MYRELEASE\n"; - - foreach my $key (@PARAMETER_ORDER) { - my $value = $CONFIGURATION{$key}; - if(&full_param($key)) { - print $key.'='.$value."\n"; - } - } - - print "\n"; -} - -### load parameters from rc file -# parameter 1: file name -# return value: version of read rc file or 0 if no version given - -sub read_configuration { - my $file_name = $_[0]; - my $file_version= 0; - - &check_file($file_name, "Could not access configuration file"); - open(RCFILE, "<$file_name") or - &abort("Could not open configuration file for reading ($file_name)"); - - while (<RCFILE>) { - chomp; - if( /^([^#=]+)=(.*)$/ ) { - if( exists $CONFIGURATION{$1} ) { - $CONFIGURATION{$1} = $2; - } elsif ( $1 eq $RCVERSION_STRING ) { - $file_version = $2; - } else { - print "Ignoring unknown parameter in RC file: $1=$2\n"; - } - } - } - close RCFILE; - - return $file_version; -} - -### print script version - -sub print_version { - print "\n$MYNAME Version $MYRELEASE\n"; -} - -###################### Specific functions (for use with this script only) - -### print usage of command - -sub print_usage { - print "\nUsage: $MYNAME [OPTIONS] DOCUMENT.lyx\n"; - print " $MYNAME [OPTIONS] DOCUMENT[.tex]\n\n"; - print " $MYNAME -c | --configure modify/set up configuration\n"; - print " $MYNAME -h | --help give a short help\n"; - print " $MYNAME -o | --print_config print current configuration\n"; - print " $MYNAME -v | --version print my version\n\n"; -} - -### print command help - -sub print_help { - &print_version; - &print_usage; - - foreach my $key (@PARAMETER_ORDER) { - my @param_def = @{$PARAMETER_LIST{$key}}; - my $description = $param_def[$DESCRIPTION]; - my $takes_value = $param_def[$OPT_SPEC] =~ /[=:]/ ? $TRUE : $FALSE; - my $negation = $param_def[$OPT_SPEC] eq '!' ? $TRUE : $FALSE; - my $alias = $param_def[$OPT_ALIAS]; - - $alias =~ s/\|(([a-zA-Z])(\||$))/ | -$1/g; - $alias =~ s/\|(([a-zA-Z][a-zA-Z0-9_]+)(\||$))/ | --$1/g; - - print "--"; - print "[no]" if($negation); - print $key.$alias; - print " VALUE" if ($takes_value); - print ":\n ".$description."\n\n"; - } - print "\n"; -} - -### configure all tex2pdf parameters interactively -# parameters: none -# return value: none - -sub configure { - - print "\n--------------------------------------------------------\n"; - print "\n***** Configuration for $MYNAME *****\n\n"; - print "The following answers are considered as defaults in later "; - print "executions\n"; - print "of $MYNAME. You can change these values by using the option "; - print "--configure \nagain."; - print "Additionally, all command-line options override these settings.\n"; - print "Many parameters can be set to '$NIL' or '$UNDEF'. This means that NO"; - print "\nvalue at all (not even an empty value) is passed over to the "; - print "called\napplication (e.g. latex package hyperref).\n"; - - $NUM_PARAM_MIN=1; - $NUM_PARAM_MAX=9; - - foreach my $key (@PARAMETER_ORDER) { - if(&full_param($key)) { - &config_param($key); - } - } - - print "\nConfiguration for $MYNAME finished.\n\n"; -} - -### check if the most important executables are installed on the system -# parameters: none - -sub check_commands { - my $exec_epstopdf; - ### check for which command - &checkCommand("which","You can switch off all command checks to fix this."); - - ### pdftex executables - # Homepage: http://tug.org/applications/pdftex - &checkCommand("pdflatex","See pdftex homepage for details: http://tug.org/applications/pdftex"); - &checkCommand("epstopdf","See pdftex homepage for details: http://tug.org/applications/pdftex"); - $exec_epstopdf = `which epstopdf`; - chomp $exec_epstopdf; - my $compat = "-dCompatibilityLevel=1\\.1"; - if (defined($ENV{'GS_OPTIONS'}) && $ENV{'GS_OPTIONS'} =~ /$compat/o) { - &report(9, "Good: ghostscript option '-dCompatibilityLevel=1.1' detected " - ."in\n'\$GS_OPTIONS'."); - } elsif (&grep_file($exec_epstopdf, $compat, $TRUE) > 0) { - &report(9, "Good: ghostscript option '-dCompatibilityLevel=1.1' detected " - ."in\n'$exec_epstopdf'."); - } else { - &report(4, "\nWARNING: no ghostscript option '-dCompatibilityLevel=1.1' " - ."in\n'$exec_epstopdf'.\n" - ."You might run into trouble with the conversions of bitmaps.\n" - ."Adjusting epstopdf or setting the environment variable GS_OPTIONS " - ."to \n".'"$GS_OPTIONS -dCompatibilityLevel=1.1" before calling this ' - ."script\nmight help in this case.\n"); - } - - if ( ¶m_value('thumbpdf') eq $YES ) { - &checkCommand("thumbpdf","You can switch off thumbpdf support to fix this."); - } - - if ( ¶m_value('ppower') eq $YES ) { - &checkCommand("ppower","You can switch off ppower support to fix this."); - } - - ### authorindex perl script - if ( ¶m_value('authorindex') eq $YES ) { - &checkCommand("authorindex","You can switch off authorindex support to fix this."); - } - - ### bibtex executable - if ( ¶m_value('bibtex') ne $NO or ¶m_value('gloss') ne $NO) { - &checkCommand("bibtex","You can switch off BibTeX support to fix this."); - } -} - -#### generate the tmp file name from the original tex filename -#### and make sure that they are not the same -# parameter 1: orignal filename (with or without a path or .tex) -# parameter 2: path for the tmp file (default: doc path) -# return value: tmp name - -sub reserve_tmp_texname { - my $original_name = $_[0]; - my $tmp_path = $_[1]; - my $tmp_base_suffix = ¶m_value('tmp_base_suffix'); - my $overwrite = ¶m_value('overwrite'); - my $original_path; - my $original_base; - my $suffix; - my $pathed_tmp_base; - my @existing_files; - - # separate path, base and suffix - ($original_base,$original_path,$suffix) = fileparse($original_name, '\.tex'); - - # set the path of the tmp file - if(!$tmp_path) { - $tmp_path=$original_path; - } else { - $tmp_path .= '/' if( $tmp_path ne "" and ! ($tmp_path =~ m#/$#) ); - } - - # abort if no absolute path is given - if( index($tmp_path, "/") != 0 ) { - &abort("Internal error: Illegal argument for reserve_tmp_texname:". - "Given file has no absolute path: $original_name"); - } - - # make sure that tmp_base_suffix is set correctly - if($tmp_base_suffix eq "") { - &abort("Temporary filename base suffix is empty."); - } - - $pathed_tmp_base = $tmp_path.$original_base.$tmp_base_suffix; - - # make sure no file with this base exists in this directory - @existing_files = glob "$pathed_tmp_base.*"; - if (@existing_files != 0) { - &report(3, "Problems detected while reserving temporay file name!\n", - "In this directory are already files with this basename.\n", - "A list of the conflicting, existing files:\n", - join("\n", @existing_files), "\n"); - if ($overwrite eq $YES) { - &report(4, "As you have activated the parameter 'overwrite' I will " - ."continue.\n", - "However, in order to protect the existing files I will not\n", - "delete any files with this basename at the final clean-up."); - } else { - &report(2, "You could activate the parameter 'overwrite' or remove ", - "the\n corresponding files in order to avoid these problems."); - &abort("No temporary name found for $original_name."); - } - } else { - push(@TMP_TEX_FILES, $pathed_tmp_base); - } - - return $pathed_tmp_base.$suffix; -} - -### generate LaTeX file from LyX document with LyX itself -# parameter ($1): Lyx document -# parameter ($2): Latex document - -sub generate_tex_file { - my $lyx_doc = $_[0]; - my $tex_doc = $_[1]; - my $lyx_dir; - my $lyx_output; - my $lyx_exec=¶m_value('lyx_exec'); - - $lyx_dir = ¶m_value('lyxrc_path'); - $lyx_dir .= '/' if( ! ($lyx_dir =~ m#/$#) ); - $lyx_dir .= '/' if( ! ($lyx_dir =~ m#/$#) ); - - ### Check if LyX file can be accessed - &check_file($lyx_doc,"Cannot read the specified LyX document!"); - - ### Check if LaTeX file exists and is newer than the LyX file - if ( -f $tex_doc and -M $tex_doc < -M $lyx_doc ) { - &report(4, "\nLaTeX file is newer than LyX document ($lyx_doc).\n", - "Using existing TeX file: $tex_doc\n", - "Remove it to force its new generation."); - } else { - ### export LaTeX file with LyX (needs a display!) - &checkCommand($lyx_exec, "Cannot generate LaTeX document without LyX!"); - &report(6, "\nExporting LaTeX file"); - - ### move some files out of the way that stop LyX from exporting - foreach my $file ($lyx_dir."lyxpipe.out",$lyx_dir."lyxpipe.in",$tex_doc) { - if ( -f $file ) { rename($file, $file.'~'); } - } - - $lyx_output = `$lyx_exec --export latex $lyx_doc 2>&1`; - - ### check if LaTeX file now really exists - if ( ! -f $tex_doc ) { - &report(2, "Lyx Output:\n$lyx_output"); - &report(2, "\nSorry. I cannot find '$tex_doc'."); - &abort("The LaTeX document was not generated by LyX!"); - } else { - &report(8, "Lyx Output:\n$lyx_output"); - } - } -} - -#### search TeX document for a certain text tag (e.g. author, title) -# parameter 1: file to parse -# parameter 2: full TeX tag name -# return value: list of the contents strings of all matching tags - -sub extract_tag_contents { - my $source=$_[0]; - my $tag_name=$_[1]; - my $contents; - my @results=(); - my $error_message="Could not read TeX document to extract $tag_name"; - - &check_file($source, $error_message.'.'); - open(EXTRACT_SOURCE, "<$source") or - &abort($error_message." ($source)."); - - - while(<EXTRACT_SOURCE>) { - ### ignore comments - s/(^|[^\\])%.*/$1/; - # ignore \thanks{} - s/\\thanks\{.*?\}//g; - # change \and to and - s/\\and/ and/g; - - $contents .= $_; - } - - close EXTRACT_SOURCE; - - $_ = $contents; - - # add contents of all occurences of this tag in a line to result list - while ( /\\($tag_name)(\[[^]]*?\])*?{+([^{}]*?)}/s ) { - my $text = $3; - $_ = $'; - # remove newlines - $text =~ s/\n//g; - $text="" if (!defined($text)); - push(@results, $text); - } - - return @results; -} - -#### search for filenames in given TeX Tag in entire document -### skip all comments and duplicates while parsing -# parameter 1: file to parse -# parameter 2: full TeX tag name -# parameter 3: reference to a list of possible filename suffixes (without '.') -# parameter 4: regexp for suffix to ignore when specified in TeX file -# (undef if not used) -# return value: list of identified files - -sub identify_files { - my $source=$_[0]; - my $tag_name=$_[1]; - my @suffixes=@{$_[2]}; - my $ignore_suffix=$_[3]; - my @matched_tags; - my @found_files=(); - my $regexp_suffixes; - - # create one large regexp from given suffixes and escape dots in them - $regexp_suffixes= '.('.join('|', @suffixes).')'; - $regexp_suffixes =~ s/\./\\./g; - - @matched_tags = &extract_tag_contents($source, $tag_name); - - foreach my $tag_contents (@matched_tags) { - my $path; - my $base; - my $suffix; - my $kpse_result; - my $working_dir = cwd."/"; - - ($base,$path,$suffix) = fileparse($tag_contents, $regexp_suffixes); - - # if a suffix is specified in the tag_contents handle it as requested - # - # 1. $suffix: TRUE if $suffix is defined and not of zero length - # means: a valid suffix has been found in the filename - # 2. defined($ignore_suffix): TRUE if $ignore_suffix is defined - # means: a regexp for suffixes to be ignored has been specified as - # parameter4 - # 3. $suffix =~ /$ignore_suffix/: TRUE if $suffix matches the regexp - # means: the suffix in the filename is wanted to be ignored - # - # The IF statement will be executed when: - # a valid suffix has been found in the filename (1) - # AND regexp for suffixes to be ignored has NOT been specified (not 2) - # OR - # a valid suffix has been found in the filename (1) - # AND regexp for suffixes to be ignored has been specified (2) - # AND the suffix in the filename is NOT wanted to be ignored (not 3) - # - # The stuff that is executed if the entire IF statement is TRUE does the - # following: accept the found suffix and consider it as the only possible - # file name. - if($suffix and not (defined($ignore_suffix) and $suffix =~ /$ignore_suffix/)){ - $kpse_result=`kpsewhich $tag_contents`; - # print warning and skip this tag if kpsewhich could not find it - if (!$kpse_result) { - &report(4, "WARNING - Could not identify referenced file:\n", - " Ignoring '$tag_contents'."); - next; - } - } else { - # if there is a '.' in the basename assume that this is a reference - # to a file of another type and skip it - if( $base =~ /\./ ) { - &report(9, "Found an unknown extension. Ignoring '$tag_contents'."); - next; - } - - # search for all possible files with allowed suffixes - foreach my $allowed_suffix (@suffixes) { - if (not $allowed_suffix =~ /[\]\)\(\|\[\\]/ ) { - # suffix is not a regexp, but a real extension - my $possible_file= $path.$base.'.'.$allowed_suffix; - $kpse_result=`kpsewhich $possible_file`; - if ($kpse_result) { - last; - } - } - } - } - - # if kpsewhich could not find any file with an allowed suffix - # assume that this reference is of a different type and skip it - # quietly - if (!$kpse_result) { - &report(9, "No suitable file found. Ignoring '$tag_contents'."); - next; - } - - # expand '.' in kpsewhich output to the current path - $kpse_result =~ s#^\./#$working_dir#; - - # remove trailing newline - chomp($kpse_result); - - # add file to the found file list if it is not already on it - if( &array_index($kpse_result, @found_files) < 0 ) { - push(@found_files, $kpse_result); - } - } - - return @found_files; -} - -### Build a list of all files which are included from the root file. -# This function recurses, and is maybe smart enough to detect cycles. -# Be sure to set REF_DOCS to the empty string prior to calling this. -# parameter 1: tex file to start with -# no return value -# result is appended to global variable @REF_DOCS - -sub get_file_list { - my $source = $_[0]; - my @imports = (); - - # This is the cycle avoidance logic. - if ( &array_index($source, @REF_DOCS) < 0 ) { - # Make sure the file can be accessed - &check_file($source, "Included TeX file seems not to be available. Path problem?"); - - # Save the argument in the list of files. - push(@REF_DOCS, $source); - - # Get the list of files included by the argument. - @imports=&identify_files($source, 'include|input', ['tex']); - - # Recurse. - foreach my $file (@imports) { - if( ! ($file =~ /\.tex$/) ) { $file .= '.tex'; } - &get_file_list($file); - } - } -} - -### do the required modifications in the LaTeX preamble -# parameter 1: original preamble from the source file -# lines before \begin{document} tag (without this tag) -# parameter 2: reference to hyperref parameter list -# return value: adjusted preamble - -sub adjust_preamble { - my $preamble = $_[0]; - my $hyperref_params_ref = $_[1]; - my $extra_code; - my $result; - - $_ = $preamble; - - # protect pdflatex execution mode - s/^(\\batchmode)$/% $1/m; - - # insert a4paper in the documentclass when a4wide is used - # fixes problem that hyperref defaults to letter otherwise - if ( /^[^%]*\\usepackage(\[widemargins\])?\{(a4|a4wide)\}/m ) { - # check if package parameters with [] brackets are present - if ( not s/^(\\documentclass\[.*?)\]/$1,a4paper]/m ) { - s/^\\documentclass/$&\[a4paper\]/m; - } - } - - ### collect additional LaTeX code - - $extra_code = "\n" . '\usepackage{pslatex}' . "\n"; - - if ( ¶m_value('thumbpdf') eq $YES ) { - $extra_code .= '\usepackage{thumbpdf}' . "\n"; - } else { - $extra_code .= "% no thumbpdf support\n"; - } - -# if ( ¶m_value('ppower') eq $YES ) { -# $extra_code .= '\usepackage{mpmulti}' . "\n"; -# } else { -# $extra_code .= "% no ppower support\n"; -# } - - if ( ¶m_value('authorindex') eq $YES ) { - $extra_code .= '\usepackage[pages]{authorindex}' . "\n"; - $extra_code .= '\let\cite=\aicite' . "\n"; - } else { - $extra_code .= "% no authorindex support\n"; - } - - $extra_code .= '\makeatletter' . "\n"; - $extra_code .= '\usepackage[' . join(',', @$hyperref_params_ref) - . ']{hyperref}' . "\n"; - $extra_code .= '\makeatother' . "\n"; - - ### insert the extra LaTeX code directly after documentclass - m/^(\\documentclass)(\[[^]]*\])?(\{.*\})/m; - return $` . $& . $extra_code . $'; -} - -### adjust all filenames in the LaTeX code to the tmp files -# parameter 1: original LaTeX code from the source file -# return value: adjusted code - -sub adjust_filenames { - my $code = $_[0]; - my $tmp_suffix = ¶m_value('tmp_base_suffix'); - my $result; - - $_ = $code; - - # cut off the suffix of eps, ps, *.gz and pstex graphics - s/((\\includegraphics)(\[[^]]*?\])?(\{[^}]+?))\.(e?ps|pstex|e?ps\.gz)\n?\}/$1}/sg; - - # replace the suffix 'pstex_t' with 'pdf_t' - s/(\\input\{[^}]+?\.)pstex_t\n?\}/$1pdf_t}/sg; - - if ( ¶m_value('mtp_preamble') eq $NO ) { - # cut off the suffix of mmp graphics - s/(\\multiinclude(\[[^]]*?\])?\{[^}]+?)\.mmp\n?\}/$1}/sg; - } else { - # replace the suffix '.#' with '-mp.#' - s/(\\includegraphics(\[[^]]*?\])?\{[^}]+?)\.(\d+?)\n?\}/$1$MTP_TMP_BASESUFFIX\.$3}/sg; - - # replace the suffix '.#' with '-mp.#' - s/(\\convertMPtoPDF(\[[^]]*?\])?\{[^}]+?)\.(\d+?)\n?\}/$1$MTP_TMP_BASESUFFIX\.$3}/sg; - - # cut off optional suffix '.mmp' and append '-mp' in any case - s/(\\multiinclude(\[[^]]*?\])?\{[^}]+?)(\.mmp)?\n?\}/$1$MTP_TMP_BASESUFFIX}/sg; - } - - # insert the tmp_suffix in tex filenames - # I assume that files with no extension are TeX files as well; correct? - s#(\\(input|include)\{([^}]*?/)?[^}/.]+?)((\.tex)?\n?\})#$1$tmp_suffix$4#sg; - - return $_; -} - -### Convert given tex file to the temp tex file we need for pdftex -### major task is to change the reference in the tex files to the -### corresponding tmp files -# parameter 1: tex source file -# parameter 2: tex tmp file -# parameter 3: reference to hyperref parameter list or -# 'undef' if preamble should not be changed - -sub convert_tex2tmp { - my $source = $_[0]; - my $target = $_[1]; - my $hyperref_params_ref = $_[2]; - my $contents; - my $preamble; - my $body; - my $adjust_preamble = defined($hyperref_params_ref) ? $YES : $NO; - my $read_err_msg = "Could not read original TeX document to generate temporary document"; - - ### open source and target file - &check_file($source, $read_err_msg . '.'); - open(SOURCE_FILE, "<$source") or - &abort($read_err_msg . " ($source)."); - - ### read in the LaTeX source file - $contents = ""; - while(<SOURCE_FILE>) { - $contents .= $_; - } - - close SOURCE_FILE; - - ### prepare the LaTeX code for PDF generation - if ( $adjust_preamble eq $YES ) { - $contents =~ m/^ *\\begin\{document\} *$/m; - $preamble = $`; - $body = $&.$'; - $preamble = &adjust_preamble($preamble, $hyperref_params_ref); - $preamble = &adjust_filenames($preamble); - } else { - $preamble = ""; - $body = $contents; - } - - $body = &adjust_filenames($body); - - ### write the new LaTeX target file - open(TARGET_FILE, ">$target") or - &abort("Could not open file to write temporary TeX document ($target)."); - - print TARGET_FILE $preamble.$body; - - close TARGET_FILE; -} - -### Convert the given EPS image to PDF -# parameters $1: EPS image filename with absolute path -# return value: none - -sub convert_eps2pdf { - my $image = $_[0]; - my $image_path; - my $image_base; - my $image_name; - my $suffix; - my $image_target; - my $zipped = 0; - my $dummy; - - ($image_base,$image_path,$suffix) = fileparse($image, '\.eps', '\.ps', '\.pstex', '\.gz'); - if ($suffix eq "\.gz") { - $zipped = 1; - ($image_base,$dummy,$suffix) = fileparse($image_base, '\.eps', '\.ps', '\.pstex'); - } - $image_name = $image_base . $suffix; - $image_target = $image_path . $image_base . '.pdf'; - - #### check if image file really exists - #&check_file($image, "Could not convert referenced image."); - - ### return if image directory is not writeable - if (! -w $image_path) { - &report(4, "WARNING - Image directory not writable: $image_path\n", - " Skipping '$image_name', assume you have converted it manually."); - return; - } - - if ( ! -f $image_target or -M $image_target > -M $image ) { - &report(7, "Converting image $image_name to $image_target ...\n"); - if ($zipped > 0) { - &system_command("gunzip -c $image | epstopdf -f -outfile=$image_target", - $TRUE, 8, "epstopdf failed on $image_name"); - } else { - &system_command("epstopdf -outfile=$image_target $image", - $TRUE, 8, "epstopdf failed on $image_name"); - } - if (¶m_value('delete_pdf_images') eq $YES) { - push(@TMPFILES, $image_target); - } - } else { - &report(7, "$image_base.pdf newer than $image_name, conversion skipped..."); - } -} - -### Convert the given PSTEX_T file to PDF_T -# parameters 1: PSTEX_T filename with absolute path -# return value: none - -sub convert_pstex2pdf { - my $pstex_file = $_[0]; - my $pstex_path; - my $pstex_base; - my $pstex_name; - my $suffix; - my $pstex_target; - my @eps_images; - - ($pstex_base,$pstex_path,$suffix) = fileparse($pstex_file, ('\.pstex_t')); - $pstex_name = $pstex_base . $suffix; - $pstex_target = $pstex_path . $pstex_base . '.pdf_t'; - - #### check if image file really exists - #&check_file($pstex_file, "Could not convert referenced file."); - - ### return if directory is not writeable - if (! -w $pstex_path) { - &report(4, "WARNING - Directory not writable: $pstex_path\n", - " Skipping '$pstex_name', assume you have converted it manually."); - return; - } - - # descend into file - &report(7, "Converting file $pstex_name ...\n"); - - # find included EPS image(s) - @eps_images=&identify_files($pstex_file, 'includegraphics', - ['pstex', 'pstex\.gz']); - - # create .pdf_t file - &convert_tex2tmp($pstex_file, $pstex_target, undef); - - # put tmp file in the tmp file list - push(@TMPFILES, $pstex_target); - - # convert image(s) to pdf - foreach my $image (@eps_images) { - &convert_eps2pdf($image); - } -} - -### Convert the given MP image to PDF -# parameters $1: MP image filename with absolute path -# return value: none - -sub convert_mp2pdf { - my $image = $_[0]; - my $image_path; - my $image_base; - my $image_name; - my $suffix; - my $image_target; - my $image_src; - my @mps_fig=(); - my $mp_fig; - - ($image_base,$image_path,$suffix) = fileparse($image, '\.mp|\.mmp'); - $image_name = $image_base . $suffix; - $image_src=$image_path . $image_base . $suffix; - - @mps_fig= &grep_file($image_path.$image_name,'beginfig',$TRUE); - $_=$mps_fig[0]; - /(\d)/; - $mp_fig=$1; - if (¶m_value('mtp_preamble') eq $YES) { - $image_target = $image_path . $image_base . $MTP_TMP_BASESUFFIX . '.' . $mp_fig; - $image_name=$image_base.$MTP_TMP_BASESUFFIX.$suffix; - } else { - $image_target = $image_path . $image_base . '.' . $mp_fig; - } - - #### check if image file really exists - #&check_file($image, "Could not convert referenced image."); - - ### return if image directory is not writeable - if (! -w $image_path) { - &report(4, "$MYNAME: WARNING - Image directory not writable: $image_path\n", - " Skipping '$image_name', assume you have converted it manually."); - return; - } - - if ( ! -f $image_target - or (-M $image_target > -M $image_src) - or ( ( ¶m_value('mtp_preamble') eq $YES) - and (-M $image_target > -M $image_path.$MTP_PREAMBLE_FILENAME) ) ) { - &report(7, "Converting image $image_name ...\n"); - my $working_dir = cwd."/"; - chdir("$image_path") or &abort("cannot cd to $image_path($!)"); - if ( ¶m_value('mtp_preamble') eq $YES ) { - &modify_mp_file($image_base,$suffix); - } - &system_command("mpost $image_name", - $TRUE, 8, "mpost failed on $image_name"); - chdir("$working_dir") or &abort("cannot cd to $working_dir($!)"); - if (¶m_value('delete_pdf_images') eq $YES) { - push(@TMPFILES, $image_target); - } - } else { - if ( ¶m_value('mtp_preamble') eq $YES ) { - &report(7, "$image_base$MTP_TMP_BASESUFFIX.$mp_fig newer than $image_base$suffix, conversion skipped..."); - } else { - &report(7, "$image_base.$mp_fig newer than $image_base$suffix, conversion skipped..."); - } - } -} - -### Convert the given MP image to PDF -# parameters $1: MP image filename with absolute path -# return value: none - -sub modify_mp_file { - my $base=$_[0]; - my $suffix=$_[1]; - my $preamble_file=$MTP_PREAMBLE_FILENAME; - - my $mp_source=$base.$suffix; - my $mp_target=$base.$MTP_TMP_BASESUFFIX.$suffix; - - ### open source and target file - open(SOURCE_FILE, "<$mp_source") or - &abort("Could not open $mp_source to add $preamble_file ($mp_source)."); - - open(TARGET_FILE, ">$mp_target") or - &abort("Could not open $mp_target to add $preamble_file ($mp_source)."); - - open(PREAMBLE_FILE, "<$preamble_file") or - &abort("Could not open $preamble_file to be added to metapost files ($mp_source)."); - - ### set target file as stdout - select TARGET_FILE; - print 'verbatimtex' . "\n"; - print '%&latex' . "\n"; # This forces metapost to use latex in the compilation - print '\documentclass[english]{article}' . "\n"; # we have to decide if this sentence goes in preamble.cfg or here - # english must be added - # to preamble in order to - # make work mpost, why ??? - while(<PREAMBLE_FILE>) { - print $_ - } - print '\begin{document}' . "\n"; # we have to decide if this sentence goes in preamble.cfg or here - print 'etex' . "\n"; - while(<SOURCE_FILE>) { - print $_ - } - print 'verbatimtex' . "\n"; - print '\end{document}' . "\n"; - print 'etex' . "\n"; - - ### set STDOUT as stdout again - select STDOUT; - - ### close files - close SOURCE_FILE; - close TARGET_FILE; - close PREAMBLE_FILE; - -} - - -### Convert included images to pdf -# parameter 1: tex source file -# no return value - -sub convert_images { - my $tex_source=$_[0]; - my @pstex_file_list; - my @image_list; - my @mp_image_list; - my @mmp_image_list; - my @major_suffixes; - my $ignore_regexp; - - &report(6, "\nConverting images referenced in $tex_source."); - - ##### Get images of major type from the source file - @major_suffixes = (@BITMAP_SUFFIXES, $PDF_ORIG_SUFFIX, @EPS_SUFFIXES); - $ignore_regexp = '.('.join('|',@EPS_SUFFIXES).')'; - $ignore_regexp =~ s/\./\\./g; - - &report(6, "\nScanning for major image types (".join(', ',@major_suffixes)."):"); - @image_list = &identify_files($tex_source,'includegraphics', - \@major_suffixes, $ignore_regexp ); - - if ( @image_list > 0 ) { - &report(7, join("\n", @image_list)); - } else { - &report(7, "None."); - } - - ##### Get PSTEX_T files from the source file - &report(6, "\nScanning for PSTEX_T files (.pstex_t):"); - @pstex_file_list=&identify_files($tex_source, 'input', ['pstex_t']); - if ( @pstex_file_list > 0 ) { - &report(7, join("\n", @pstex_file_list)); - } else { - &report(7, "None."); - } - - ##### Get MP images from the source file - &report(6, "\nScanning for MP images (.mp):"); - @mp_image_list=&identify_files($tex_source, - 'convertMPtoPDF|includegraphics',['mp','(\d+)'],'\.(\d+)'); - # FIXME - # fixed for now by ignoring strange extension in identify_files - # - # the above could cause problems as identify_files is expecting a list of - # real extensions and not of regexps - # maybe the only way to fix this is to adjust identify_files to ignore - # invalid extension when testing them with kpsewhich - # ALTERNATIVE: design identify_files to use preffered_suffixes instead - # of ignore_suffixes - - if ( @mp_image_list > 0 ) { - &report(7, join("\n", @mp_image_list)); - } else { - &report(7, "None."); - } - - ##### Get MMP images from the source file - &report(6, "\nScanning for MMP images (.mmp):"); - @mmp_image_list=&identify_files($tex_source,'multiinclude',['mmp']); - if ( @mmp_image_list > 0 ) { - &report(7, join("\n", @mmp_image_list)); - } else { - &report(7, "None."); - } - - ### Convert EPS images to PDF, copy pdf.orig image files to pdf, - ### and simply ignore all other - if ( @image_list > 0) { - my $handled_suffixes; - - &report(6, "\nProcessing images of major types:"); - - # create one large regexp from suffixes and escape dots in them - $handled_suffixes = '.('.join('|',(@EPS_SUFFIXES, $PDF_ORIG_SUFFIX)).')'; - $handled_suffixes =~ s/\./\\./g; - - foreach my $image (@image_list) { - my $path; - my $base; - my $suffix; - ($base,$path,$suffix) = fileparse($image, $handled_suffixes); - if (not $suffix) { - &report(7, "No special handling required for image: $base$suffix"); - } elsif ($suffix eq ('.'.$PDF_ORIG_SUFFIX) ) { - my $image_target = $path.$base.'.pdf'; - - if ( ! -f $image_target or -M $image_target > -M $image ) { - &report(7, "Create temporary PDF file from original: $base$suffix"); - copy($image, $image_target) - or &abort("Could not create tmp file: $!"); - if (¶m_value('delete_pdf_images') eq $YES) { - push(@TMPFILES, $image_target); - } - } else { - &report(7, "$base.pdf newer than $base$suffix, copy skipped ..."); - } - } else { - &convert_eps2pdf($image); - } - } - } - - ### Convert all PSTEX_T files to PDF_T - if ( @pstex_file_list > 0 ) { - &report(6, "\nConverting pstex_t docs to pdf_t docs"); - foreach my $image (@pstex_file_list) { - &convert_pstex2pdf($image); - } - } - - ### Convert all MP images to PDF - if ( @mp_image_list > 0) { - &report(6, "\nConverting MP images to PDF"); - foreach my $image (@mp_image_list) { - &convert_mp2pdf($image); - } - } - - ### Convert all MMP images to PDF - if ( @mmp_image_list > 0) { - &report(6, "\nConverting MMP images to PDF"); - foreach my $image (@mmp_image_list) { - &convert_mp2pdf($image); - } - } - - &report(6, "\nFinished converting for ${tex_source}."); -} - -### run pdflatex -# parameter 1: LaTeX file without extension -# parameter 2: log-file where the full out put is stored -# return value: 0 - no errors (no rerun); 1 - errors (rerun required) - -sub run_pdflatex { - my $texfile=$_[0]; - my $logfile=$_[1]; - my @errors=(); - my $exit_status=0; - my $extra_options=¶m_value('pdftex_opts'); - - if( !defined($extra_options) or $extra_options eq $NIL ) { - $extra_options = ""; - } - - &report(7, "Running pdflatex. This may take a while.\n"); - system("pdflatex --interaction nonstopmode $extra_options $texfile > $logfile 2>&1"); - $exit_status=$?; - &report(7, "Pdflatex finished. Errors:"); - - ### extract all errors and warnings from the log file - @errors = &grep_file($logfile, '(Emergency stop|Error|Warning).*:'); - - ### make sure thumbpdf package does not spoil rerun detection - ### as it will be processed very last - if(grep(/Package thumbpdf/, @errors) == @errors) { @errors=(); } - - if ( @errors != 0 or $exit_status != 0 ) { - if ( grep(/Emergency stop/, @errors) != 0 ) { - &report(2, &file_tail($logfile,10)); - &report(2, "\nSee $logfile for details."); - &abort("Fatal error occured. I am lost."); - } - if( @errors != 0 ) { - &report(8, @errors); - } else { - &report(8, &file_tail($logfile,10)); - } - &report(7, "\nSee $logfile for details."); - return $FALSE; - } else { - &report(7, "None detected (log file: $logfile)."); - return $TRUE; - } -} - -#### run bibtex if BIBTEX=$YES or a bibliography tag is found -# included tex files are not parsed for a bibliography -# parameter 1: filename of the aux file without .aux suffix -# parameter 2: log-file where the full out put is stored - -sub handle_bibtex { - my $auxfile=$_[0]; - my $logfile=$_[1]; - my $run_bibtex=$FALSE; - my $bibtex_param=¶m_value('bibtex'); - - if ( $bibtex_param eq $YES ) { - $run_bibtex=$TRUE; - &report(7, "BibTeX parameter set to '$YES':"); - } else { - &report(7, "Checking for BibTeX bibliography in main document: "); - if( &grep_file($auxfile.'.tex', '^[^%]*\\\\bibliography{') != 0) { - $run_bibtex=$TRUE; - &report(7, "Bibliography detected."); - } else { - if ( @REF_DOCS > 0 ) { - &report(7, "Checking for BibTeX bibliography in included documents:"); - foreach my $file (@REF_DOCS) { - if( &grep_file($file, '^[^%]*\\\\bibliography{') != 0) { - $run_bibtex=$TRUE; - &report(7, "Bibliography detected."); - } else { - &report(7, "No bibliography detected in $file."); - } - } - } else { - &report(7, "No bibliography detected."); - } - } - } - - if ( $run_bibtex ) { - my @errors=(); - my $exit_status=0; - - &report(7, "Running bibtex. This may take a while.\n"); - system "bibtex $auxfile > $logfile"; - $exit_status=$?; - &report(7, "Bibtex finished. Errors:"); - - ### extract all errors and warnings from the log file - @errors=&grep_file($logfile, 'error message'); - - if ( @errors != 0 or $exit_status != 0 ) { - &report(4, &file_tail($logfile)); - &report(4, "\nYou can switch off BibTeX support by setting the bibtex parameter accordingly."); - } else { - &report(7, "None detected (log file: $logfile)."); - } - } -} - -#### run bibtex on file.gls if BIBTEX=$YES or a bibliography tag is found -# included tex files are not parsed for a bibliography -# parameter 1: filename of the aux file without .aux suffix -# parameter 2: log-file where the full out put is stored - -sub handle_gloss { - my $auxfile=$_[0]; - my $logfile=$_[1]; - my $run_gloss=$FALSE; - my $gloss_param=¶m_value('gloss'); - my $glsfile=$auxfile.'.gls'; - - if ( $gloss_param eq $YES ) { - $run_gloss=$TRUE; - &report(7, "Gloss parameter set to '$YES':"); - } else { - &report(7, "Checking for Gloss bibliography in main document: "); - if( &grep_file($auxfile.'.tex', '^[^%]*\\\\printgloss{') != 0) { - $run_gloss=$TRUE; - &report(7, "Gloss bibliography detected."); - } else { - if ( @REF_DOCS > 0 ) { - &report(7, "Checking for Gloss bibliography in included documents:"); - foreach my $file (@REF_DOCS) { - if( &grep_file($file, '^[^%]*\\\\printgloss') != 0) { - $run_gloss=$TRUE; - &report(7, "Gloss bibliography detected."); - } else { - &report(7, "No gloss database detected in $file."); - } - } - } else { - &report(7, "No gloss database detected."); - } - } - } - if ( $run_gloss ) { - my @errors=(); - my $exit_status=0; - - &report(7, "Running bibtex on $glsfile. This may take a while.\n"); - system "bibtex $glsfile > $logfile 2>&1"; - $exit_status=$?; - &report(7, "Bibtex finished. Errors:"); - - ### extract all errors and warnings from the log file - @errors=&grep_file($logfile, 'error message'); - - if ( @errors != 0 or $exit_status != 0 ) { - &report(4, &file_tail($logfile)); - &report(4, "\nYou can switch off Gloss support by setting the gloss parameter accordingly."); - } else { - &report(7, "None detected (log file: $logfile)."); - } - } -} - -#### run thumbpdf command to make thumbnails -# more informations: /usr/share/texmf/doc/pdftex/thumbpdf/readme.txt -# parameter 1: LaTeX file without extension -# parameter 2: log-file where the full out put is stored - -sub run_thumbpdf { - my $texfile=$_[0]; - my $logfile=$_[1]; - my $exit_status=0; - - &report(7, "\nCreating thumbnails with 'thumbpdf'\n"); - &system_command("thumbpdf $texfile", $FALSE, 8, - "thumbpdf failed.\n" - ."I will continue, but maybe there will not be thumbs in the PDF doc."); - - if ( -f 'thumbpdf.log' ) { - move('thumbpdf.log', $logfile); - &report(7, "\nSee $logfile for details."); - } - - ### store possible tmp files - push(@TMPFILES, glob 'thumb???.png'); - push(@TMPFILES, 'thumbpdf.pdf'); - push(@TMPFILES, 'thumbdta.tex'); - push(@TMPFILES, $texfile.'.tpt'); -} - - -#### run ppower command to make presentations -# more informations: -# parameter 1: LaTeX file without extension -# parameter 2: log-file where the full out put is stored - -sub run_ppower { - my $texfile=$_[0]; - my $logfile=$_[1]; - my $exit_status=0; - my $infile; - my $outfile; - my $texfile_base; - my $texfile_path; - my $texfile_suffix; - - ##### Getting document name, suffix and path - ($texfile_base,$texfile_path,$texfile_suffix) = fileparse($texfile,¶m_value('tmp_base_suffix')); - - $infile=$texfile_base.'.pdf'; - $outfile=$texfile_base.'_p4.pdf'; - - &report(7, "\nPostprocessing PDF file with 'ppower'\n"); - if(&system_command("ppower $infile $outfile", $FALSE, 8, - "ppower failed.\nI will continue, " - ."but maybe there will not be pause effects in the PDF doc.")) { - &report(7, "\nThe postprocessed pdf file is: $outfile\n"); - } - - if ( -f 'ppower.log' ) { - move('ppower.log', $logfile); - &report(7, "See $logfile for details."); - } -} - -#### run authorindex command to obtain an author index -# more informations: -# parameter 1: LaTeX file without extension -# parameter 2: log-file where the full out put is stored - -sub run_authorindex { - my $texfile=$_[0]; - my $logfile=$_[1]; - my $exit_status=0; - - &report(7, "\nProcessing file with 'authorindex'\n"); - &system_command("authorindex $texfile", $FALSE, 8, - "authorindex failed.\nI will continue, " - ."but maybe there will not be an author index in the PDF doc."); - - if ( -f 'authorindex.log' ) { - move('authorindex.log', $logfile); - &report(7, "\nSee $logfile for details."); - } - -} - - -##### read and analyse configuration and options and adjust basic variables -##### accordingly -#### The following sources are considered (last value overrides previous) -## 1. general configuration (global variables in the script) -## 2. private configuration (in user's RC file) -## 3. command line options -# parameters: none -# return value: given document argument - -sub adjust_configuration { - my $valid_rcfile = $FALSE; - my %opt_specs =(); - - ### Check number of arguments - if ( @ARGV == 0 ) { - &report(1, "\nI need at least one argument!"); - &print_usage; - exit 1; - } - - ##### command line options and private configuration files handling - - ### set parameters from rc file - if ( -f $RC_FILENAME ) { - my $rcfile_version; - $rcfile_version = &read_configuration($RC_FILENAME); - if( $rcfile_version == $MYRCFILE_VERSION ) { - $valid_rcfile = $TRUE; - } elsif ( $rcfile_version == 0 ) { - &report(4, "Could not determine version of read RC file."); - } else { - &report(4, "Version of read RC file ($rcfile_version) and ", - "this script ($MYRCFILE_VERSION) differs."); - } - } - - ### scan parameters - foreach (keys %PARAMETER_LIST) { - $opt_specs{&option_specifier($_)} = \&handle_option; - } - if(! GetOptions(%opt_specs)) { - &print_usage; - &abort("An error occured while processing command line options"); - } - - if( ! $valid_rcfile ) { - &report(3,"No valid configuration file found. Please run '$MYNAME " - ."--configure'.\nUsing default values for missing parameters in this " - ."session."); - } - - ### As the configuration process is done now, it is time to set the - # global configuration flag - $CONFIGURED = $TRUE; - - #### do some test in order to secure as good as possible that we will - #### succeed before to much work was done and maybe some data as damaged - - ### make sure that tmp_base_suffix is not empty - if ( ¶m_value('tmp_base_suffix') eq "" ) { - &report(2, "\nCAUTION: Empty tmp_base_suffix would destroy the original files!"); - &abort("Parameter tmp_base_suffix is not set."); - } - - ##### check for required commands - if (¶m_value('check_commands') ne $NO ) { - &check_commands; - } - - ### Check number of arguments - if ( @ARGV != 1 ) { - &report(1, "\nWrong number of arguments. I need exactly one file."); - &print_usage; - exit 1; - } - - return $ARGV[0]; -} - -#### prepare the logdir for the log files of the various called appplications - -sub prepare_logdir { - my $log_dir= ¶m_value('logdir'); - my $my_new_log; - - ##### Preparing the LOGDIR - if (! &check_dir($log_dir, "Could not create log directory", $YES)) { - &abort("Please, set a different path and restart"); - } - - # make sure there is a slash at the end of the path - $log_dir .= '/' if( ! ($log_dir =~ m#/$#) ); - - if( <$log_dir/*.log> and ¶m_value('clean_logs') eq $YES ) { - &report(6, "\nRemoving old log files ($log_dir)."); - unlink (<$log_dir/pdflatex-*.log>, <$log_dir/bibtex-*.log>, - <$log_dir/gloss-*.log>, <$log_dir/thumbpdf-*.log>, - <$log_dir/ppower-*.log>, <$log_dir/authorindex-*.log>, - <$log_dir/tex2pdf-*.log>); - } else { - &report(6, "\nAll log files will be stored in ($log_dir)."); - } - - ### move my pre-configuration log file to specified log directory - $my_new_log = "$log_dir/tex2pdf-$$.log"; - if ( move($MYLOGFILE, $my_new_log) ) { - $MYLOGFILE = $my_new_log; - } else { - &report(3, "Could not move '$MYLOGFILE' to logdir: $!"); - } -} - -##### analyse document argument -#### process the one and only argument (besides the options) which specifies -#### which LaTeX document the user wants to translate to PDF -#### a lyx file will be translated to LaTeX first -# parameter 1: argument - -sub process_doc_argument { - my $argument = $_[0]; - my $doc_base; - my $doc_path; - my $arg_suffix; - - ##### Getting document name, suffix and path - ($doc_base,$doc_path,$arg_suffix) = fileparse($argument, ('\.tex', '\.lyx')); - - if (! defined($arg_suffix) or $arg_suffix eq "") { - $arg_suffix = '.tex'; - } - - ###### change working directory to document directory - if ( $doc_path ne "" ) { - chdir $doc_path; - } - - ###### make DOCPATH an absolute path - $doc_path = cwd.'/'; - - ###### Cut off suffix and do lyx or tex specific stuff - if ( $arg_suffix eq '.lyx' ) { - # Lyx document argument: generate Latex document if required - &generate_tex_file($doc_base.'.lyx', $doc_base.'.tex'); - } else { - # LaTeX document argument: check access to given LaTeX document - &check_file($doc_base.'.tex', "Cannot read the specified LaTeX document!"); - } - - return $doc_path.$doc_base.'.tex'; -} - -#### handle the dir of the input path if the document has one and -# parameter 1: main tex doc -# return value: absolute input path - -sub process_inputpath { - my $texdoc = $_[0]; - my $doc_base; - my $doc_path; - my $doc_suffix; - my $input_path; - my @matches; - - ### Maybe the user has given us a different inputpath - $input_path = ¶m_value('input_path'); - if(defined($input_path) and $input_path ne "") { - &report(6, "Setting input path to specified directory: $input_path"); - - &report(7, "Change working directory to input path."); - chdir $input_path; - - return $input_path; - } - - ##### Getting document name, suffix and path - ($doc_base,$doc_path,$doc_suffix) = fileparse($texdoc, ('\.tex')); - - ###### change working directory to input_path if set - # When the files' path (images, included documents, etc.) in your document is - # relative to another directory than the PASSED document's directory. - # This is useful when the calling application (e.g. LyX) generates a - # temporary - # TeX file and calls the tex2pdf with it instead of the original file. - - @matches=&extract_tag_contents($texdoc, 'def\\\\input@path'); - $input_path=$matches[0]; - - ## check if input_path is ok - if ($input_path) { - &report(7, "Found an input path in the latex document: $input_path"); - if( &check_dir($input_path, 'The retrieved input@path seems not to be valid.', $NO)) { - &set_param_value('input_path', $input_path); - &report(7, "Change working directory to input path."); - chdir $input_path; - } else { - &abort ('I am lost.'); - } - } else { - &report(4, "No input path in the latex document found."); - &report(7, "Resources are expected to be relative to document's location: $doc_path"); - $input_path=$doc_path; - } - - return $input_path; -} - -#### set the working dir to the input path if the document has one and -#### and determine the path for the result -# parameter 1: main tex doc -# parameter 2: absolute input path -# return value: absolute path were the resulting pdf doc should be stored - -sub get_target_name { - my $texdoc = $_[0]; - my $input_path=$_[1]; - - my $doc_base; - my $doc_path; - my $doc_suffix; - my $destination; - my $pdf_path; - - ##### Getting document name, suffix and path - ($doc_base,$doc_path,$doc_suffix) = fileparse($texdoc, ('\.tex')); - - ##### set the directory where the final pdf will be stored - $destination=¶m_value('destination'); - $pdf_path=undef; - - if ($destination eq 'custom' ) { - $pdf_path=¶m_value('custom_path'); - } elsif ($destination eq 'input') { - $pdf_path=$input_path; - } else { - $pdf_path=$doc_path; - } - - if( ! defined($pdf_path) or $pdf_path eq "" or ! &check_dir($pdf_path, - 'The specified destination directory for the final PDF documents is not valid.', $NO)) { - &report(7, "Using document's instead of destination path: $doc_path"); - $pdf_path=$doc_path; - } - - # make sure there is a slash at the end of the path - $pdf_path .= '/' if( ! ($pdf_path =~ m#/$#) ); - - return $pdf_path.$doc_base.'.pdf'; -} - -### generate hyperref parameters from given settings -# parameter 1: main tex doc -# return_value: result - -sub generate_hyperref_params { - my $texdoc = $_[0]; - my $para; - my @params = ('pdftex'); - - ##### Set title and author from main LaTeX document or parameters - foreach my $info (('title', 'author')) { - my $value; - - $value=¶m_value("$info"); - if (! defined($value) ) { - my @matches=&extract_tag_contents($texdoc, $info); - $value= $matches[0]; - if (! defined($value) ) { - &report(4, "\nWARNING: Could not identify document's $info correctly."); - &report(7, "Maybe you have used a LaTeX tag inside the $info which confuses me.\n", - "Adjust the $info of the LaTeX file in order to avoid the problem or\n", - "you could set the $info parameter manually."); - $value= ¶m_value("default_$info"); - &report(7, "Using default-$info: $value"); - } - } - if (! defined($value) or $value eq $NIL ) { - &report(7, "$info field set to $NIL - no value will be passed."); - } else { - &report(7, "Document's $info: $value"); - push(@params, "pdf$info={$value}"); - } - } - - $para=¶m_value('paper'); - if ( $para ne $NIL ) { push(@params, $para); } - - $para=¶m_value('link_toc_page'); - if ( $para eq $YES ) { push(@params, 'linktocpage'); } - - $para=¶m_value('colorlinks'); - if ( $para ne $NIL ) { - $para= $para eq $YES ? 'true' : 'false'; - push(@params, "colorlinks=$para"); - } - - if ( $para ne 'false' ) { - foreach (('linkcolor', 'pagecolor', 'urlcolor', 'citecolor')) { - $para=¶m_value($_); - if ( $para ne $NIL ) { push(@params, "$_={$para}"); } - } - } - - $para=¶m_value('hyperref_args'); - if(defined($para) and $para ne "" and $para ne $NIL) { - push(@params, $para); - } - - return @params; -} - -#### Prepare the main document and all referenced ones for the generation -#### of the PDF document (including referenced images) -# parameter 1: top level tex document -# parameter 2: parameter list of hyperref parameters - -sub prepare_documents { - my ($main_tex_doc, $input_path, @hyperref_params) = @_; - @REF_DOCS=(); - - ## get a name for the tmp tex file - my $main_tmp_doc = &reserve_tmp_texname($main_tex_doc, $input_path); - - ## Get the list of imported files from the tex file - &get_file_list($main_tex_doc); - - ## remove main file from list (first element; needs special handling) - shift @REF_DOCS; - - ## tell user about the identified refereneced docs - if ( @REF_DOCS > 0 ) { - &report(7, "\nFound the following referenced TeX files:"); - foreach my $file (@REF_DOCS) { - &report(7, ">>>>> $file"); - } - } else { - &report(7, "\nFound no referenced TeX files."); - } - - ##### Generate adjusted temp tex files and convert all their images - ## main doc - &report(6, "\nGenerating main temporary LaTeX document: $main_tmp_doc"); - &convert_tex2tmp($main_tex_doc, $main_tmp_doc, \@hyperref_params); - &convert_images($main_tex_doc); - - ## referenced docs - foreach my $file (@REF_DOCS) { - my $tmp_file = &reserve_tmp_texname($file); - - ### Insert pdf conversation tags in tex file and write it to tmp_file - &report(7, "\nGenerating temporary LaTeX document: $tmp_file"); - &convert_tex2tmp($file, $tmp_file, undef); - &convert_images($file); - } - - return $main_tmp_doc; -} - -##### Generate the final PDF document -# parameter 1: filename of the source LaTeX document (with extension) - -sub generate_pdf_doc { - my $source = $_[0]; - my $runno=1; - my $rerun=$TRUE; - my $doc; - my $pdf_doc; - my $base; - my $path; - my $suffix; - - my $max_run_no= ¶m_value('maxrun'); - my $min_run_no= ¶m_value('minrun'); - my $log_dir= ¶m_value('logdir'); - $log_dir .= '/' if( ! ($log_dir =~ m#/$#) ); - my $makeindex_options=¶m_value('makeindex_opts'); - - # setting the log files for the output of pdflatex, bibtex, gloss, - # thumbpdf, ppower and authorindex - my $pdflog_base = $log_dir."pdflatex-$$-"; - my $bibtex_log = $log_dir."bibtex-$$.log"; - my $gloss_log = $log_dir."gloss-$$.log"; - my $thumbpdf_log = $log_dir."thumbpdf-$$.log"; - my $ppower_log = $log_dir."ppower-$$.log"; - my $authorindex_log = $log_dir."authorindex-$$.log"; - - ##### Getting document name, suffix and path - ($base,$path,$suffix) = fileparse($source, ('\.tex')); - $doc = $path.$base; - $pdf_doc = $base.'.pdf'; - - ### run pdflatex until no more errors are reported (max MAXRUNNO) - while ( $rerun and $runno <= $max_run_no ) - { - &report(6, "\n************ Pdflatex run no. $runno *************"); - if ( &run_pdflatex($doc, $pdflog_base.$runno.'.log') == $TRUE - and ( $min_run_no <= $runno )) { - # no errors detected and min. no. of runs are done - $rerun=$FALSE; - } else { - # errors appeared or max run no. has not been reached - $rerun=$TRUE; - } - - ### Execute BibTeX after first run if set (and required) - if ( $runno == 1 and ¶m_value('bibtex') ne $NO ) { - &report(6, "\n****************** BibTeX handling ***********************"); - &handle_bibtex($doc, $bibtex_log); - } - - ### Execute BibTeX on file.gls after first run if set (and required) - if ( $runno == 1 and ¶m_value('gloss') ne $NO ) { - &report(6, "\n****************** Gloss handling ***********************"); - &handle_gloss($doc, $gloss_log); - } - - ### generated index file exists - if ( $runno == 1 and -f $doc.'.idx' and ¶m_value('force_index') ne $NO ) { - if( !defined($makeindex_options) or $makeindex_options eq $NIL ) { - $makeindex_options = ""; - } - &report(6, "\n****************** Extra index generation ***************"); - &report(7, "Document seems to have an index. Generating ...\n"); - &system_command("makeindex $makeindex_options $doc.idx", $FALSE, 8, - "makeindex failed.\nI will continue, " - ."but maybe there will not be an index in the PDF doc."); - } - - $runno += 1; - } - - $rerun = $FALSE; - - ### if the authorindex option is switched on then run authorindex - if ( ¶m_value('authorindex') eq $YES ) { - &report(6, "\n****************** authorindex generation *****************"); - &run_authorindex($doc, $authorindex_log); - } - - ### generated index file exists - if ( -f $doc.'.idx' and ¶m_value('force_index') ne $NO ) { - if( !defined($makeindex_options) or $makeindex_options eq $NIL ) { - $makeindex_options = ""; - } - &report(6, "\n****************** Extra index generation ***************"); - &report(7, "Document seems to have an index. Generating ...\n"); - &system_command("makeindex $makeindex_options $doc.idx", $FALSE, 8, - "makeindex failed.\nI will continue, " - ."but maybe there will not be an index in the PDF doc."); - $rerun=$TRUE; - } - - ### if the thumbpdf option is switched on then make thumbnails - if ( ¶m_value('thumbpdf') eq $YES ) { - &report(6, "\n****************** Thumbnail generation *****************"); - &run_thumbpdf($doc, $thumbpdf_log); - $rerun=$TRUE; - } - - ### One final pdflatex run if requested - if ( $rerun ) { - &report(6, "\n************ One final pdflatex run no. $runno *************"); - &run_pdflatex($doc, $pdflog_base.$runno.'.log'); - } - - ### if the ppower option is switched on then run ppower - if ( ¶m_value('ppower') eq $YES ) { - &report(6, "\n****************** ppower postprocess *****************"); - &run_ppower($doc, $ppower_log); - } - - if ( ! -f $pdf_doc ) { - &abort("\nThe new PDF file could not be generated: ".$pdf_doc); - } - - return $pdf_doc; -} - -################## Lift off !!!! (main part) ################## - -my $texdoc; -my $doc_argument; -my $input_path; -my $target_name; -my @hyperref_params; -my $new_pdf_doc; -my $tmp_tex_doc; - -&report(5, "\nScript starts ($MYRELEASE)"); - -##### read and analyse configuration and options and adjust basic variables -##### accordingly -##### write RC file on config request -#### use the finished configuration to get all further settings before we -#### actually start doing something - -&report(5, "\nProcessing given parameters and arguments."); -$doc_argument = &adjust_configuration; - -#### prepare the script to write some information to specified log files - -&report(5, "\nPreparing directory for log files."); -&prepare_logdir; - -#### process the one and only argument (besides the options) which specifies -#### which LaTeX document the user wants to translate to PDF -#### a lyx file will be translated to LaTeX first - -&report(5, "\nAnalysing your document argument."); -$texdoc = &process_doc_argument($doc_argument); - -#### we would like to get some more information from the actual -#### main LaTeX document before we really start -#### parse the document and try to get the info - -## translate hyperref settings to the actual package parameters - -&report(5, "\nSetting up parameters for hyperref."); -@hyperref_params = &generate_hyperref_params($texdoc); - -## set the working dir to the input path if the document has one and - -&report(5, "\nProcessing input path for main tex document."); -$input_path = &process_inputpath($texdoc); - -## determine the name for the result - -&report(5, "\nSetting the correct name for the result."); -$target_name = &get_target_name($texdoc, $input_path); - -## as much as possible is prepared in advance at this point -## so hopefully we will succeed in generating the PDF document - -##### real work starts NOW - -##### Generate adjusted temp tex files and convert all their images - -&report(5, "\nPreparing all documents and images."); -$tmp_tex_doc = &prepare_documents($texdoc, $input_path, @hyperref_params); - -##### Generate the final PDF document - -&report(5, "\nProcessing the actual generation of the PDF document."); -$new_pdf_doc = &generate_pdf_doc($tmp_tex_doc); - -##### Finalize -move($new_pdf_doc, $target_name) or &abort("Could not move PDF file to final destination: $!"); - -if ( ¶m_value('debug') eq $NO ) { - &clean_up; -} else { - &print_temp_files; -} - -&report(5, "\nThe new pdf file is: $target_name\n"); - diff --git a/lustre/doc/tunefs.lustre.8 b/lustre/doc/tunefs.lustre.8 deleted file mode 100644 index e99e15ab8c..0000000000 --- a/lustre/doc/tunefs.lustre.8 +++ /dev/null @@ -1,102 +0,0 @@ -.\" -*- nroff -*- -.\" Copyright 2006 by Cluster File Systems, Inc. All Rights Reserved. -.\" Copyright 2008 by Sun Microsystems, Inc. All Rights Reserved. -.\" This file may be copied under the terms of the GNU Public License, v2. -.\" -.TH tunefs.lustre 8 "2008 Mar 15" Lustre "configuration utilities" -.SH NAME -tunefs.lustre \- modify the Lustre configuration information on a disk -.SH SYNOPSIS -.br -.B tunefs.lustre -[options] -.I device -.br -.SH DESCRIPTION -.B tunefs.lustre -is used to modify the configuration information on a Lustre target -disk. This includes upgrading old (pre-Lustre 1.6) disks. This does not -reformat the disk or erase the target information, but modifying the -configuration information can result in an unusable filesystem. You have -been warned. -.br -Changes made here will affect a filesystem only when the target is next -mounted. - -.SH OPTIONS -.TP -.BI \--comment= comment -Set user comment about this disk, ignored by Lustre. -.TP -.BI \--dryrun -Only print what would be done; does not affect the disk -.TP -.BI \--erase-params -Remove all previous parameter info -.TP -.BI \--failnode= nid,... -Set the NID(s) of a failover partner. This option can be repeated as desired. -.TP -.BI \--fsname= filesystem_name -The Lustre filesystem this service will be part of. Default is 'lustre' -.TP -.BI \--index= index -Force a particular OST or MDT index -.TP -.BI \--mountfsoptions= opts -Set permanent mount options, equivalent to setting in /etc/fstab -.TP -.BI \--mgs -Add a configuration management service to this target -.TP -.BI \--mgsnode= nid,... -Set the NID(s) of the MGS node, required for all targets other than the MGS. -.TP -.BI \--nomgs -Remove a configuration management service to this target -.TP -.BI \--quiet -Print less information. -.TP -.BI \--verbose -Print more information. -.TP -.BI \--writeconf -Erase all config logs for the filesystem that this MDT is part of, and -regenerate them. This is very dangerous. All clients and servers should -be stopped. -All targets must then be restarted to regenerate the logs. -No clients should be started until all targets have restarted. -In general this should be executed on the MDT only, not the OSTs. - -.SH EXAMPLES -.TP -.B tunefs.lustre --erase-param --mgsnode=<new_nid> --writeconf /dev/sda -Change the MGS NID address. (This should be done on every target disk, -since they should all be contacting the same MGS.) -.TP -.B tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda -Add a failover NID location for this target -.TP -.B tunefs.lustre --mgs --mdt --fsname=testfs /dev/sda -Upgrade an old 1.4.X Lustre MDT to 1.6. The new filesystem name is "testfs". -.TP -.B tunefs.lustre --writeconf --mgs --mdt --fsname=testfs /dev/sda1 -Upgrade an old 1.4.X Lustre MDT to 1.6, and start with brand-new 1.6 -configuration logs. All old servers and clients must be stopped. - -.SH BUGS -Please report all bugs to Sun Microsystems using http://bugzilla.lustre.org/ -.SH AVAILABILITY -.B tunefs.lustre -is part of the -.BR Lustre (7) -filesystem package and is available from Sun Microsystems, Inc via -.br -http://downloads.lustre.org -.SH SEE ALSO -.BR lustre (7), -.BR mkfs.lustre (8), -.BR mount.lustre (8), -.BR lctl (8), -.BR lfs (1) diff --git a/lustre/include/.cvsignore b/lustre/include/.cvsignore deleted file mode 100644 index e2f41760b8..0000000000 --- a/lustre/include/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -.Xrefs -config.log -config.status -configure -config.h -config.h.in -stamp-h -stamp-h1 -stamp-h.in -Makefile -Makefile.in -.deps -TAGS -lustre_ver.h diff --git a/lustre/include/Makefile.am b/lustre/include/Makefile.am deleted file mode 100644 index c641829de6..0000000000 --- a/lustre/include/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ - -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -SUBDIRS = linux lustre - -EXTRA_DIST = ioctl.h liblustre.h lprocfs_status.h lustre_cfg.h \ - lustre_commit_confd.h lustre_debug.h lustre_disk.h \ - lustre_dlm.h lustre_export.h lustre_fsfilt.h lustre_ha.h \ - lustre_handles.h lustre_import.h lustre_lib.h class_hash.h \ - lustre_lite.h lustre_log.h lustre_mds.h lustre_net.h \ - lustre_param.h lustre_quota.h lustre_ucache.h lvfs.h \ - obd_cache.h obd_class.h obd_echo.h obd.h obd_lov.h \ - obd_ost.h obd_support.h lustre_cache.h lustre_ver.h \ - interval_tree.h - diff --git a/lustre/include/class_hash.h b/lustre/include/class_hash.h deleted file mode 100644 index f27a046722..0000000000 --- a/lustre/include/class_hash.h +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef __CLASS_HASH_H -#define __CLASS_HASH_H - -#include <lustre_lib.h> - -/* #define LUSTRE_HASH_DEBUG 1 */ - -/* define the hash bucket*/ -struct lustre_hash_bucket { - struct hlist_head lhb_head; - spinlock_t lhb_lock; -#ifdef LUSTRE_HASH_DEBUG - /* the number of hash item per bucket, - * it will help us to analyse the hash distribute - */ - int lhb_item_count; -#endif -}; - -struct lustre_hash_operations; - -struct lustre_class_hash_body { - char hashname[128]; - spinlock_t lchb_lock; /* body lock */ - struct lustre_hash_bucket *lchb_hash_tables; - __u32 lchb_hash_max_size; /* define the hash tables size */ - /* define the hash operations */ - struct lustre_hash_operations *lchb_hash_operations; -}; - -/* hash operations method define */ -struct lustre_hash_operations { - __u32 (*lustre_hashfn) (struct lustre_class_hash_body *hash_body, - void *key); - int (*lustre_hash_key_compare) (void *key, - struct hlist_node *compared_hnode); - /* add refcount */ - void* (*lustre_hash_object_refcount_get) (struct hlist_node *hash_item); - /* dec refcount */ - void (*lustre_hash_object_refcount_put) (struct hlist_node *hash_item); -}; - -static inline struct hlist_node * -lustre_hash_getitem_in_bucket_nolock(struct lustre_class_hash_body *hash_body, - int hashent, void *key) -{ - struct lustre_hash_bucket *bucket; - struct hlist_node *hash_item_node; - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - int find = 0; - ENTRY; - - bucket = &hash_body->lchb_hash_tables[hashent]; - hlist_for_each(hash_item_node, &(bucket->lhb_head)) { - find = hop->lustre_hash_key_compare(key, hash_item_node); - if (find == 1) - break; - } - RETURN(find == 1 ? hash_item_node : NULL); -} - -static inline int -lustre_hash_delitem_nolock(struct lustre_class_hash_body *hash_body, - int hashent, struct hlist_node * hash_item) -{ - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - - hlist_del_init(hash_item); - - hop->lustre_hash_object_refcount_put(hash_item); - -#ifdef LUSTRE_HASH_DEBUG - hash_body->lchb_hash_tables[hashent].lhb_item_count--; - CDEBUG(D_INFO, "hashname[%s] bucket[%d] has [%d] hashitem\n", - hash_body->hashname, hashent, - hash_body->lchb_hash_tables[hashent].lhb_item_count); -#endif - - RETURN(0); -} - -typedef void (*hash_item_iterate_cb) (void *obj, void *data); - -int lustre_hash_init(struct lustre_class_hash_body **hash_body, - char *hashname, __u32 hashsize, - struct lustre_hash_operations *hash_operations); -void lustre_hash_exit(struct lustre_class_hash_body **hash_body); -int lustre_hash_additem_unique(struct lustre_class_hash_body *hash_body, - void *key, struct hlist_node *actual_hnode); -void *lustre_hash_findadd_unique(struct lustre_class_hash_body *hash_body, - void *key, struct hlist_node *actual_hnode); -int lustre_hash_additem(struct lustre_class_hash_body *hash_body, void *key, - struct hlist_node *actual_hnode); -int lustre_hash_delitem_by_key(struct lustre_class_hash_body *hash_body, - void *key); -int lustre_hash_delitem(struct lustre_class_hash_body *hash_body, void *key, - struct hlist_node *hash_item); -void lustre_hash_bucket_iterate(struct lustre_class_hash_body *hash_body, - void *key, hash_item_iterate_cb, - void *data); -void lustre_hash_iterate_all(struct lustre_class_hash_body *hash_body, - hash_item_iterate_cb, void *data); - -void * lustre_hash_get_object_by_key(struct lustre_class_hash_body *hash_body, - void *key); - -__u32 djb2_hashfn(struct lustre_class_hash_body *hash_body, void* key, - size_t size); - -/* ( uuid <-> export ) hash operations define */ -__u32 uuid_hashfn(struct lustre_class_hash_body *hash_body, void * key); -int uuid_hash_key_compare(void *key, struct hlist_node * compared_hnode); -void * uuid_export_refcount_get(struct hlist_node * actual_hnode); -void uuid_export_refcount_put(struct hlist_node * actual_hnode); - -/* ( nid <-> export ) hash operations define */ -__u32 nid_hashfn(struct lustre_class_hash_body *hash_body, void * key); -int nid_hash_key_compare(void *key, struct hlist_node * compared_hnode); -void * nid_export_refcount_get(struct hlist_node * actual_hnode); -void nid_export_refcount_put(struct hlist_node * actual_hnode); - -/* ( net_peer <-> connection ) hash operations define */ -__u32 conn_hashfn(struct lustre_class_hash_body *hash_body, void * key); -int conn_hash_key_compare(void *key, struct hlist_node * compared_hnode); -void * conn_refcount_get(struct hlist_node * actual_hnode); -void conn_refcount_put(struct hlist_node * actual_hnode); - -/* ( nid <-> nidstats ) hash operations define. uses nid_hashfn */ -int nidstats_hash_key_compare(void *key, struct hlist_node * compared_hnode); -void* nidstats_refcount_get(struct hlist_node * actual_hnode); -void nidstats_refcount_put(struct hlist_node * actual_hnode); -extern struct lustre_hash_operations nid_stat_hash_operations; - -#ifdef __KERNEL__ -/* ( lqs <-> qctxt ) hash operations define b=10600 */ -__u32 lqs_hashfn(struct lustre_class_hash_body *hash_body, void * key); -int lqs_hash_key_compare(void *key, struct hlist_node * compared_hnode); -void * lqs_refcount_get(struct hlist_node * actual_hnode); -void lqs_refcount_put(struct hlist_node * actual_hnode); -#endif - -#endif /* __CLASS_HASH_H */ diff --git a/lustre/include/darwin/lprocfs_status.h b/lustre/include/darwin/lprocfs_status.h deleted file mode 100644 index dc17b9f9f2..0000000000 --- a/lustre/include/darwin/lprocfs_status.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Top level header file for LProc SNMP - * Author: Hariharan Thantry thantry@users.sourceforge.net - */ -#ifndef _DARWIN_LPROCFS_SNMP_H -#define _DARWIN_LPROCFS_SNMP_H - -#ifndef _LPROCFS_SNMP_H -#error Do not #include this file directly. #include <lprocfs_status.h> instead -#endif - -#ifdef LPROCFS -#undef LPROCFS -#endif - -#include <libcfs/libcfs.h> -#define kstatfs statfs - -/* - * XXX nikita: temporary! Stubs for naked procfs calls made by Lustre - * code. Should be replaced with our own procfs-like API. - */ - -static inline cfs_proc_dir_entry_t *proc_symlink(const char *name, - cfs_proc_dir_entry_t *parent, - const char *dest) -{ - return NULL; -} - -static inline cfs_proc_dir_entry_t *create_proc_entry(const char *name, - mode_t mode, - cfs_proc_dir_entry_t *p) -{ - return NULL; -} - -#endif /* XNU_LPROCFS_SNMP_H */ diff --git a/lustre/include/darwin/lustre_compat.h b/lustre/include/darwin/lustre_compat.h deleted file mode 100644 index d11c8d6801..0000000000 --- a/lustre/include/darwin/lustre_compat.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef __DARWIN_LUSTRE_COMPAT_H__ -#define __DARWIN_LUSTRE_COMPAT_H__ - -#include <libcfs/libcfs.h> - -#ifdef __KERNEL__ - -#ifndef HLIST_HEAD -#define hlist_entry list_entry -#define hlist_head list_head -#define hlist_node list_head -#define hlist_del_init list_del_init -#define hlist_add_head list_add -#define hlist_for_each_safe list_for_each_safe - -/* XXX */ -#define LOOKUP_COBD 4096 -#define CURRENT_SECONDS cfs_unix_seconds() - -#endif - -struct module; -static inline int try_module_get(struct module *module) -{ - return 1; -} - -static inline void module_put(struct module *module) -{ -} - -#define THIS_MODULE NULL - -static inline void lustre_daemonize_helper(void) -{ - return; -} - -static inline int32_t ext2_set_bit(int nr, void *a) -{ - int32_t old = test_bit(nr, a); - set_bit(nr, a); - return old; -} - -static inline int32_t ext2_clear_bit(int nr, void *a) -{ - int32_t old = test_bit(nr, a); - clear_bit(nr, a); - return old; -} - -struct nameidata; - -#if !defined(__DARWIN8__) -static inline int ll_path_lookup(const char *path, unsigned int flags, struct nameidata *nd) -{ - int ret = 0; - NDINIT(nd, LOOKUP, FOLLOW, UIO_SYSSPACE, (char *)path, current_proc()); - if (ret = namei(nd)){ - CERROR("ll_path_lookup fail!\n"); - } - return ret; -} -#endif - -#define to_kdev_t(dev) (dev) -#define kdev_t_to_nr(dev) (dev) -#define val_to_kdev(dev) (dev) - -#define ext2_test_bit test_bit - -#endif /* __KERNEL__ */ - -#endif diff --git a/lustre/include/darwin/lustre_debug.h b/lustre/include/darwin/lustre_debug.h deleted file mode 100644 index b2b72f6100..0000000000 --- a/lustre/include/darwin/lustre_debug.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _DARWIN_LUSTRE_DEBUG_H -#define _DARWIN_LUSTRE_DEBUG_H - -#ifndef _LUSTRE_DEBUG_H -#error Do not #include this file directly. #include <lprocfs_status.h> instead -#endif - -#ifdef __KERNEL__ -#define LL_CDEBUG_PAGE(mask, page, fmt, arg...) do {} while (0) -#else -#define LL_CDEBUG_PAGE(mask, page, fmt, arg...) do {} while (0) -#endif - -#endif diff --git a/lustre/include/darwin/lustre_dlm.h b/lustre/include/darwin/lustre_dlm.h deleted file mode 100644 index 98587f37aa..0000000000 --- a/lustre/include/darwin/lustre_dlm.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * (visit-tags-table FILE) - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _DARWIN_LUSTRE_DLM_H__ -#define _DARWIN_LUSTRE_DLM_H__ - -#ifndef _LUSTRE_DLM_H__ -#error Do not #include this file directly. #include <lprocfs_status.h> instead -#endif - -#define IT_OPEN 0x0001 -#define IT_CREAT 0x0002 -#define IT_READDIR 0x0004 -#define IT_GETATTR 0x0008 -#define IT_LOOKUP 0x0010 -#define IT_UNLINK 0x0020 -#define IT_GETXATTR 0x0040 -#define IT_EXEC 0x0080 -#define IT_PIN 0x0100 -#define IT_CHDIR 0x0200 - - -#endif diff --git a/lustre/include/darwin/lustre_fsfilt.h b/lustre/include/darwin/lustre_fsfilt.h deleted file mode 100644 index e3d9a7e0b2..0000000000 --- a/lustre/include/darwin/lustre_fsfilt.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2004 Cluster File Systems, Inc. <info@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Filesystem interface helper. - * - */ - -#ifndef _DARWIN_LUSTRE_FSFILT_H -#define _DARWIN_LUSTRE_FSFILT_H - -#ifndef _LUSTRE_FSFILT_H -#error Do not #include this file directly. #include <lustre_fsfilt.h> instead -#endif - -#endif diff --git a/lustre/include/darwin/lustre_handles.h b/lustre/include/darwin/lustre_handles.h deleted file mode 100644 index 341a25bbf8..0000000000 --- a/lustre/include/darwin/lustre_handles.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __DARWIN_LUSTRE_HANDLES_H_ -#define __DARWIN_LUSTR_HANDLES_H_ - -#ifndef __LUSTRE_HANDLES_H_ -#error Do not #include this file directly. #include <lustre_handles.h> instead -#endif - -#include <libcfs/list.h> -#include <libcfs/libcfs.h> - -#endif - diff --git a/lustre/include/darwin/lustre_lib.h b/lustre/include/darwin/lustre_lib.h deleted file mode 100644 index 5adadaed32..0000000000 --- a/lustre/include/darwin/lustre_lib.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Basic Lustre library routines. - * - */ - -#ifndef _DARWIN_LUSTRE_LIB_H -#define _DARWIN_LUSTRE_LIB_H - -#ifndef _LUSTRE_LIB_H -#error Do not #include this file directly. #include <lustre_lib.h> instead -#endif - -#include <string.h> -#include <libcfs/libcfs.h> -#include <libcfs/kp30.h> - -#ifndef LP_POISON -#define LI_POISON ((int)0x5a5a5a5a) -#define LL_POISON ((long)0x5a5a5a5a) -#define LP_POISON ((void *)(long)0x5a5a5a5a) -#endif - -#ifndef LPU64 -#define LPU64 "%llu" -#define LPD64 "%lld" -#define LPX64 "%llx" -#endif - -struct obd_ioctl_data; -#define OBD_IOC_DATA_TYPE struct obd_ioctl_data - -#define LUSTRE_FATAL_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | \ - sigmask(SIGTERM) | sigmask(SIGQUIT) | \ - sigmask(SIGALRM) | sigmask(SIGHUP)) - -#ifdef __KERNEL__ -static inline sigset_t l_w_e_set_sigs(sigset_t sigs) -{ - sigset_t old = 0; - - /* XXX Liang: how to change sigmask in Darwin8.x? - * there is syscall like pthread_sigmask() but we cannot - * use in kernel */ -#if !defined(__DARWIN8__) - struct proc *p = current_proc(); - extern int block_procsigmask(struct proc *p, int bit); - old = cfs_current()->uu_sigmask; - block_procsigmask(p, ~sigs); -#endif - - return old; -} -#endif - -#endif - - diff --git a/lustre/include/darwin/lustre_lite.h b/lustre/include/darwin/lustre_lite.h deleted file mode 100644 index 611c2a8520..0000000000 --- a/lustre/include/darwin/lustre_lite.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre lite cluster file system - * - * This code is issued under the GNU General Public License. - * See the file COPYING in this distribution - * - * Copyright (C) 2002 Cluster File Systems, Inc. <info@clusterfs.com> - */ - -#ifndef _DARWIN_LL_H -#define _DARWIN_LL_H - -#ifndef _LL_H -#error Do not #include this file directly. #include <lustre_lite.h> instead -#endif - -#include <libcfs/libcfs.h> - -#ifdef __KERNEL__ - -struct iattr { - unsigned int ia_valid; - umode_t ia_mode; - uid_t ia_uid; - gid_t ia_gid; - loff_t ia_size; - time_t ia_atime; - time_t ia_mtime; - time_t ia_ctime; - unsigned int ia_attr_flags; -}; - -/* - * intent data-structured. For Linux they are defined in - * linux/include/linux/dcache.h - */ -#define IT_OPEN 0x0001 -#define IT_CREAT 0x0002 -#define IT_READDIR 0x0004 -#define IT_GETATTR 0x0008 -#define IT_LOOKUP 0x0010 -#define IT_UNLINK 0x0020 -#define IT_GETXATTR 0x0040 -#define IT_EXEC 0x0080 -#define IT_PIN 0x0100 - -#define IT_FL_LOCKED 0x0001 -#define IT_FL_FOLLOWED 0x0002 /* set by vfs_follow_link */ - -#define INTENT_MAGIC 0x19620323 /* Happy birthday! */ - -struct lustre_intent_data { - int it_disposition; - int it_status; - __u64 it_lock_handle; - void *it_data; - int it_lock_mode; -}; - -/* - * Liang: We keep the old lookup_intent struct in XNU - * to avoid unnecessary allocate/free. - */ -#define LUSTRE_IT(it) ((struct lustre_intent_data *)(&(it)->d.lustre)) - -struct lookup_intent { - int it_magic; - void (*it_op_release)(struct lookup_intent *); - int it_op; - int it_flags; - int it_create_mode; - union { - struct lustre_intent_data lustre; - void *fs_data; - } d; -}; - -struct super_operations{ -}; -#endif - -#endif diff --git a/lustre/include/darwin/lustre_log.h b/lustre/include/darwin/lustre_log.h deleted file mode 100644 index d777465702..0000000000 --- a/lustre/include/darwin/lustre_log.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _DARWIN_LUSTRE_LOG_H -#define _DARWIN_LUSTRE_LOG_H - -#ifndef _LUSTRE_LOG_H -#error Do not #include this file directly. #include <lustre_log.h> instead -#endif - -#undef LUSTRE_LOG_SERVER -#include <darwin/lustre_compat.h> - -#endif diff --git a/lustre/include/darwin/lustre_mds.h b/lustre/include/darwin/lustre_mds.h deleted file mode 100644 index 7fd85496a4..0000000000 --- a/lustre/include/darwin/lustre_mds.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. <info@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _DARWIN_LUSTRE_MDS_H -#define _DARWIN_LUSTRE_MDS_H - -#ifndef _LUSTRE_MDS_H -#error Do not #include this file directly. #include <lustre_mds.h> instead -#endif - -#include <lustre_lite.h> -#include <libcfs/darwin/darwin-prim.h> - -#endif diff --git a/lustre/include/darwin/lustre_net.h b/lustre/include/darwin/lustre_net.h deleted file mode 100644 index f028545669..0000000000 --- a/lustre/include/darwin/lustre_net.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _DARWIN_LUSTRE_NET_H -#define _DARWIN_LUSTRE_NET_H - -#ifndef _LUSTRE_NET_H -#error Do not #include this file directly. #include <lustre_net.h> instead -#endif - -#include <libcfs/libcfs.h> - -#undef WITH_GROUP_INFO - -#endif diff --git a/lustre/include/darwin/lustre_quota.h b/lustre/include/darwin/lustre_quota.h deleted file mode 100644 index 5d0864f49c..0000000000 --- a/lustre/include/darwin/lustre_quota.h +++ /dev/null @@ -1,16 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ -#ifndef _DARWIN_LUSTRE_QUOTA_H -#define _DARWIN_LUSTRE_QUOTA_H - -#ifndef _LUSTRE_QUOTA_H -#error Do not #include this file directly. #include <lustre_quota.h> instead -#endif - -#ifdef __KERNEL__ -#include <libcfs/libcfs.h> -#endif - - -#endif /* _LUSTRE_QUOTA_H */ diff --git a/lustre/include/darwin/lustre_types.h b/lustre/include/darwin/lustre_types.h deleted file mode 100644 index 651cf2d31b..0000000000 --- a/lustre/include/darwin/lustre_types.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _LUSTRE_DARWIN_TYPES_H -#define _LUSTRE_DARWIN_TYPES_H - -#include <string.h> -#include <libcfs/libcfs.h> - -#endif diff --git a/lustre/include/darwin/lustre_user.h b/lustre/include/darwin/lustre_user.h deleted file mode 100644 index a495e60dc4..0000000000 --- a/lustre/include/darwin/lustre_user.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * Lustre public user-space interface definitions. - */ - -#ifndef _DARWIN_LUSTRE_USER_H -#define _DARWIN_LUSTRE_USER_H - -#include <lustre/types.h> - -#ifndef __KERNEL__ -/* for llmount */ -# define _GNU_SOURCE -# include <getopt.h> -# include <sys/utsname.h> -# include <sys/stat.h> -# include <errno.h> -# include <sys/mount.h> -# include <sys/fcntl.h> -# include <sys/ioccom.h> -# include <sys/wait.h> -# include <string.h> -#endif - -typedef struct stat lstat_t; -#define HAVE_LOV_USER_MDS_DATA - -#ifndef LPU64 -#if (BITS_PER_LONG == 32 || __WORDSIZE == 32) -# define LPU64 "%llu" -# define LPD64 "%lld" -# define LPX64 "%#llx" -# define LPSZ "%u" -# define LPSSZ "%d" -#elif (BITS_PER_LONG == 64 || __WORDSIZE == 64) -# define LPU64 "%lu" -# define LPD64 "%ld" -# define LPX64 "%#lx" -# define LPSZ "%lu" -# define LPSSZ "%ld" -#endif -#endif /* !LPU64 */ - -#endif /* _LUSTRE_USER_H */ diff --git a/lustre/include/darwin/lvfs.h b/lustre/include/darwin/lvfs.h deleted file mode 100644 index d27185450d..0000000000 --- a/lustre/include/darwin/lvfs.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __DARWIN_LVFS_H__ -#define __DARWIN_LVFS_H__ - -#ifndef __LVFS_H__ -#error Do not #include this file directly. #include <lvfs.h> instead -#endif - -#ifdef LLOG_LVFS -#undef LLOG_LVFS -#endif - -struct lvfs_ucred { - __u32 luc_fsuid; - __u32 luc_fsgid; - __u32 luc_cap; - __u32 luc_uid; - __u32 luc_umask; -}; - -struct lvfs_run_ctxt { - int pid; -}; - -#endif diff --git a/lustre/include/darwin/obd.h b/lustre/include/darwin/obd.h deleted file mode 100644 index 175758ec14..0000000000 --- a/lustre/include/darwin/obd.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001, 2002 Cluster File Systems, Inc. - * - * This code is issued under the GNU General Public License. - * See the file COPYING in this distribution - */ - -#ifndef __DARWIN_OBD_H -#define __DARWIN_OBD_H - -#ifndef __OBD_H -#error Do not #include this file directly. #include <obd.h> instead -#endif - -#include <libcfs/libcfs.h> - -typedef struct semaphore client_obd_lock_t; - -static inline void client_obd_list_lock_init(client_obd_lock_t *lock) -{ - sema_init(lock, 1); -} - -static inline void client_obd_list_lock_done(client_obd_lock_t *lock) -{} - -static inline void client_obd_list_lock(client_obd_lock_t *lock) -{ - mutex_down(lock); -} - -static inline void client_obd_list_unlock(client_obd_lock_t *lock) -{ - mutex_up(lock); -} - -#endif /* __DARWIN_OBD_H */ diff --git a/lustre/include/darwin/obd_class.h b/lustre/include/darwin/obd_class.h deleted file mode 100644 index 833da61890..0000000000 --- a/lustre/include/darwin/obd_class.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __DARWIN_CLASS_OBD_H -#define __DARWIN_CLASS_OBD_H - -#ifndef __CLASS_OBD_H -#error Do not #include this file directly. #include <obd_class.h> instead -#endif - -#if !defined(__KERNEL__) -#define to_kdev_t(dev) (dev) -#endif - -#endif /* __XNU_OBD_CLASS_H */ diff --git a/lustre/include/darwin/obd_support.h b/lustre/include/darwin/obd_support.h deleted file mode 100644 index 8ff72009ec..0000000000 --- a/lustre/include/darwin/obd_support.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001, 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _DARWIN_OBD_SUPPORT -#define _DARWIN_OBD_SUPPORT - -#ifndef _OBD_SUPPORT -#error Do not #include this file directly. #include <obd_support.h> instead -#endif - -#include <darwin/lustre_compat.h> - -#define CRCPOLY_LE 0xedb88320 -/** - * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32 - * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for - * other uses, or the previous crc32 value if computing incrementally. - * @p - pointer to buffer over which CRC is run - * @len - length of buffer @p - */ -static inline __u32 crc32_le(__u32 crc, unsigned char const *p, size_t len) -{ - int i; - while (len--) { - crc ^= *p++; - for (i = 0; i < 8; i++) - crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); - } - return crc; -} - -#define OBD_SLEEP_ON(wq) sleep_on(wq) - -/* for obd_class.h */ -# ifndef ERR_PTR -# define ERR_PTR(a) ((void *)(a)) -# endif - -#endif diff --git a/lustre/include/interval_tree.h b/lustre/include/interval_tree.h deleted file mode 100644 index 41436c1fde..0000000000 --- a/lustre/include/interval_tree.h +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * (visit-tags-table FILE) - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2002, 2007 Cluster File Systems, Inc. - * Author: Huang Wei <huangwei@clusterfs.com> - * Author: Jay Xiong <jinshan.xiong@sun.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef _INTERVAL_H__ -#define _INTERVAL_H__ - -#include <libcfs/types.h> /* __u8, __u64 etc. */ -#include <libcfs/kp30.h> /* LASSERT. */ - -struct interval_node { - struct interval_node *in_left; - struct interval_node *in_right; - struct interval_node *in_parent; - __u8 in_color; - __u8 res1[7]; /* tags, 8-bytes aligned */ - __u64 in_max_high; - struct interval_node_extent { - __u64 start; - __u64 end; - } in_extent; -}; - -enum interval_iter { - INTERVAL_ITER_CONT = 1, - INTERVAL_ITER_STOP = 2 -}; - -static inline __u64 interval_low(struct interval_node *node) -{ - return node->in_extent.start; -} - -static inline __u64 interval_high(struct interval_node *node) -{ - return node->in_extent.end; -} - -static inline void interval_set(struct interval_node *node, - __u64 start, __u64 end) -{ - LASSERT(start <= end); - node->in_extent.start = start; - node->in_extent.end = end; - node->in_max_high = end; -} - -/* Rules to write an interval callback. - * - the callback returns INTERVAL_ITER_STOP when it thinks the iteration - * should be stopped. It will then cause the iteration function to return - * immediately with return value INTERVAL_ITER_STOP. - * - callbacks for interval_iterate and interval_iterate_reverse: Every - * nodes in the tree will be set to @node before the callback being called - * - callback for interval_search: Only overlapped node will be set to @node - * before the callback being called. - */ -typedef enum interval_iter (*interval_callback_t)(struct interval_node *node, - void *args); - -struct interval_node *interval_insert(struct interval_node *node, - struct interval_node **root); -void interval_erase(struct interval_node *node, struct interval_node **root); - -/* Search the extents in the tree and call @func for each overlapped - * extents. */ -enum interval_iter interval_search(struct interval_node *root, - struct interval_node_extent *ex, - interval_callback_t func, void *data); - -/* Iterate every node in the tree - by reverse order or regular order. */ -enum interval_iter interval_iterate(struct interval_node *root, - interval_callback_t func, void *data); -enum interval_iter interval_iterate_reverse(struct interval_node *root, - interval_callback_t func,void *data); - -void interval_expand(struct interval_node *root, - struct interval_node_extent *ext, - struct interval_node_extent *limiter); -int interval_is_overlapped(struct interval_node *root, - struct interval_node_extent *ex); -struct interval_node *interval_find(struct interval_node *root, - struct interval_node_extent *ex); -#endif diff --git a/lustre/include/ioctl.h b/lustre/include/ioctl.h deleted file mode 100644 index fc2207bb9a..0000000000 --- a/lustre/include/ioctl.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _IOWR - -/* On i386 and x86_64, _ASM_I386_IOCTL_H is defined by the kernel's ioctl.h, - * and on newer kernels this header is shared as _ASM_GENERIC_IOCTL_H. - * - * We can avoid any problems with the kernel header being included again by - * defining _ASM_I386_IOCTL_H here so that a later occurence of <asm/ioctl.h> - * does not include the kernel's ioctl.h after this one. b=14746 */ -#define _ASMI386_IOCTL_H -#define _ASM_GENERIC_IOCTL_H - -/* ioctl command encoding: 32 bits total, command in lower 16 bits, - * size of the parameter structure in the lower 14 bits of the - * upper 16 bits. - * Encoding the size of the parameter structure in the ioctl request - * The highest 2 bits are reserved for indicating the ``access mode''. - * NOTE: This limits the max parameter size to 16kB -1 ! - */ - -/* - * The following is for compatibility across the various Linux - * platforms. The i386 ioctl numbering scheme doesn't really enforce - * a type field. De facto, however, the top 8 bits of the lower 16 - * bits are indeed used as a type field, so we might just as well make - * this explicit here. Please be sure to use the decoding macros - * below from now on. - */ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 14 -#define _IOC_DIRBITS 2 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits. - */ -#define _IOC_NONE 0U -#define _IOC_WRITE 1U -#define _IOC_READ 2U - -#define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode ioctl numbers.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -#endif /* _ASMI386_IOCTL_H */ diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h deleted file mode 100644 index 79b35fd9c7..0000000000 --- a/lustre/include/liblustre.h +++ /dev/null @@ -1,906 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <info@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * User-space Lustre headers. - * - */ -#ifndef LIBLUSTRE_H__ -#define LIBLUSTRE_H__ - -#ifdef __KERNEL__ -#error Kernel files should not #include <liblustre.h> -#else -/* - * The userspace implementations of linux/spinlock.h vary; we just - * include our own for all of them - */ -#define __LINUX_SPINLOCK_H -#endif - -#include <sys/mman.h> -#ifdef HAVE_STDINT_H -# include <stdint.h> -#endif -#ifdef HAVE_ASM_PAGE_H -# include <asm/page.h> -#endif -#ifdef HAVE_SYS_USER_H -# include <sys/user.h> -#endif -#ifdef HAVE_SYS_IOCTL_H -# include <sys/ioctl.h> -#endif -#ifndef _IOWR -# include "ioctl.h" -#endif - -#include <stdio.h> -#include <sys/ioctl.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <sys/stat.h> -#ifdef HAVE_SYS_VFS_H -# include <sys/vfs.h> -#endif -#include <unistd.h> -#include <fcntl.h> - -#include <libcfs/list.h> -#include <lnet/lnet.h> -#include <libcfs/kp30.h> -#include <libcfs/user-bitops.h> - -/* definitions for liblustre */ - -#ifdef __CYGWIN__ - -#define CFS_PAGE_SHIFT 12 -#define CFS_PAGE_SIZE (1UL << CFS_PAGE_SHIFT) -#define CFS_PAGE_MASK (~((__u64)CFS_PAGE_SIZE-1)) -#define loff_t long long -#define ERESTART 2001 -typedef unsigned short umode_t; - -#endif - -#ifndef CURRENT_SECONDS -# define CURRENT_SECONDS time(0) -#endif - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(a) ((sizeof (a))/(sizeof ((a)[0]))) -#endif - -/* This is because lprocfs_status.h gets included here indirectly. It would - * be much better to just avoid lprocfs being included into liblustre entirely - * but that requires more header surgery than I can handle right now. - */ -#ifndef smp_processor_id -#define smp_processor_id() 0 -#endif -#ifndef num_online_cpus -#define num_online_cpus() 1 -#endif -#ifndef num_possible_cpus -#define num_possible_cpus() 1 -#endif - -/* always adopt 2.5 definitions */ -#define KERNEL_VERSION(a,b,c) ((a)*100+(b)*10+c) -#define LINUX_VERSION_CODE KERNEL_VERSION(2,5,0) - -#ifndef page_private -#define page_private(page) ((page)->private) -#define set_page_private(page, v) ((page)->private = (v)) -#endif - - -static inline void inter_module_put(void *a) -{ - return; -} - -void *inter_module_get(char *arg); - -/* cheats for now */ - -struct work_struct { - void (*ws_task)(void *arg); - void *ws_arg; -}; - -static inline void prepare_work(struct work_struct *q, void (*t)(void *), - void *arg) -{ - q->ws_task = t; - q->ws_arg = arg; - return; -} - -static inline void schedule_work(struct work_struct *q) -{ - q->ws_task(q->ws_arg); -} - - -#define strnlen(a,b) strlen(a) -static inline void *kmalloc(int size, int prot) -{ - return malloc(size); -} -#define vmalloc malloc -#define vfree free -#define kfree(a) free(a) -#define GFP_KERNEL 1 -#define GFP_HIGHUSER 1 -#define GFP_ATOMIC 1 -#define GFP_NOFS 1 -#define IS_ERR(a) ((unsigned long)(a) > (unsigned long)-1000L) -#define PTR_ERR(a) ((long)(a)) -#define ERR_PTR(a) ((void*)((long)(a))) - -typedef struct { - void *cwd; -}mm_segment_t; - -typedef int (read_proc_t)(char *page, char **start, off_t off, - int count, int *eof, void *data); - -struct file; /* forward ref */ -typedef int (write_proc_t)(struct file *file, const char *buffer, - unsigned long count, void *data); - -#define NIPQUAD(addr) \ - ((unsigned char *)&addr)[0], \ - ((unsigned char *)&addr)[1], \ - ((unsigned char *)&addr)[2], \ - ((unsigned char *)&addr)[3] - -#if defined(__LITTLE_ENDIAN) -#define HIPQUAD(addr) \ - ((unsigned char *)&addr)[3], \ - ((unsigned char *)&addr)[2], \ - ((unsigned char *)&addr)[1], \ - ((unsigned char *)&addr)[0] -#elif defined(__BIG_ENDIAN) -#define HIPQUAD NIPQUAD -#else -#error "Undefined byteorder??" -#endif /* __LITTLE_ENDIAN */ - -/* bits ops */ - -/* a long can be more than 32 bits, so use BITS_PER_LONG - * to allow the compiler to adjust the bit shifting accordingly - */ - -static __inline__ int ext2_set_bit(int nr, void *addr) -{ - return set_bit(nr, addr); -} - -static __inline__ int ext2_clear_bit(int nr, void *addr) -{ - return clear_bit(nr, addr); -} - -static __inline__ int ext2_test_bit(int nr, void *addr) -{ - return test_bit(nr, addr); -} - -/* modules */ - -struct module { - int count; -}; - -static inline void MODULE_AUTHOR(char *name) -{ - printf("%s\n", name); -} -#define MODULE_DESCRIPTION(name) MODULE_AUTHOR(name) -#define MODULE_LICENSE(name) MODULE_AUTHOR(name) - -#define THIS_MODULE NULL -#define __init -#define __exit - -/* devices */ - -static inline int misc_register(void *foo) -{ - return 0; -} - -static inline int misc_deregister(void *foo) -{ - return 0; -} - -static inline int request_module(char *name) -{ - return (-EINVAL); -} - -#define __MOD_INC_USE_COUNT(m) do {} while (0) -#define __MOD_DEC_USE_COUNT(m) do {} while (0) -#define MOD_INC_USE_COUNT do {} while (0) -#define MOD_DEC_USE_COUNT do {} while (0) -static inline void __module_get(struct module *module) -{ -} - -static inline int try_module_get(struct module *module) -{ - return 1; -} - -static inline void module_put(struct module *module) -{ -} - -/* module initialization */ -extern int init_obdclass(void); -extern int ptlrpc_init(void); -extern int ldlm_init(void); -extern int osc_init(void); -extern int lov_init(void); -extern int mdc_init(void); -extern int mgc_init(void); -extern int echo_client_init(void); - - - -/* general stuff */ - -#define EXPORT_SYMBOL(S) - -struct rcu_head { }; - -typedef struct { } spinlock_t; -typedef __u64 kdev_t; - -#define SPIN_LOCK_UNLOCKED (spinlock_t) { } -#define LASSERT_SPIN_LOCKED(lock) do {} while(0) -#define LASSERT_SEM_LOCKED(sem) do {} while(0) - -static inline void spin_lock(spinlock_t *l) {return;} -static inline void spin_unlock(spinlock_t *l) {return;} -static inline void spin_lock_init(spinlock_t *l) {return;} -static inline void local_irq_save(unsigned long flag) {return;} -static inline void local_irq_restore(unsigned long flag) {return;} -static inline int spin_is_locked(spinlock_t *l) {return 1;} - -static inline void spin_lock_bh(spinlock_t *l) {} -static inline void spin_unlock_bh(spinlock_t *l) {} -static inline void spin_lock_irqsave(spinlock_t *a, unsigned long b) {} -static inline void spin_unlock_irqrestore(spinlock_t *a, unsigned long b) {} - -#define min(x,y) ((x)<(y) ? (x) : (y)) -#define max(x,y) ((x)>(y) ? (x) : (y)) - -#ifndef min_t -#define min_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) -#endif -#ifndef max_t -#define max_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) -#endif - -#define simple_strtol strtol - -/* registering symbols */ -#ifndef ERESTARTSYS -#define ERESTARTSYS ERESTART -#endif -#define HZ 1 - -/* random */ - -void get_random_bytes(void *ptr, int size); - -/* memory */ - -/* memory size: used for some client tunables */ -#define num_physpages (256 * 1024) /* 1GB */ - -static inline int copy_from_user(void *a,void *b, int c) -{ - memcpy(a,b,c); - return 0; -} - -static inline int copy_to_user(void *a,void *b, int c) -{ - memcpy(a,b,c); - return 0; -} - - -/* slabs */ -typedef struct { - int size; -} kmem_cache_t; -#define SLAB_HWCACHE_ALIGN 0 -static inline kmem_cache_t * -kmem_cache_create(const char *name, size_t objsize, size_t cdum, - unsigned long d, - void (*e)(void *, kmem_cache_t *, unsigned long), - void (*f)(void *, kmem_cache_t *, unsigned long)) -{ - kmem_cache_t *c; - c = malloc(sizeof(*c)); - if (!c) - return NULL; - c->size = objsize; - CDEBUG(D_MALLOC, "alloc slab cache %s at %p, objsize %d\n", - name, c, (int)objsize); - return c; -}; - -static inline int kmem_cache_destroy(kmem_cache_t *a) -{ - CDEBUG(D_MALLOC, "destroy slab cache %p, objsize %u\n", a, a->size); - free(a); - return 0; -} - -/* struct page decl moved out from here into portals/include/libcfs/user-prim.h */ - -/* 2.4 defines */ -#define PAGE_LIST_ENTRY list -#define PAGE_LIST(page) ((page)->list) - -#define kmap(page) (page)->addr -#define kunmap(a) do {} while (0) - -static inline cfs_page_t *alloc_pages(int mask, unsigned long order) -{ - cfs_page_t *pg = malloc(sizeof(*pg)); - - if (!pg) - return NULL; -#if 0 //#ifdef MAP_ANONYMOUS - pg->addr = mmap(0, PAGE_SIZE << order, PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0); -#else - pg->addr = malloc(CFS_PAGE_SIZE << order); -#endif - - if (!pg->addr) { - free(pg); - return NULL; - } - return pg; -} -#define cfs_alloc_pages(mask, order) alloc_pages((mask), (order)) - -#define alloc_page(mask) alloc_pages((mask), 0) -#define cfs_alloc_page(mask) alloc_page(mask) - -static inline void __free_pages(cfs_page_t *pg, int what) -{ -#if 0 //#ifdef MAP_ANONYMOUS - munmap(pg->addr, PAGE_SIZE); -#else - free(pg->addr); -#endif - free(pg); -} -#define __cfs_free_pages(pg, order) __free_pages((pg), (order)) - -#define __free_page(page) __free_pages((page), 0) -#define free_page(page) __free_page(page) -#define __cfs_free_page(page) __cfs_free_pages((page), 0) - -static inline cfs_page_t* __grab_cache_page(unsigned long index) -{ - cfs_page_t *pg = alloc_pages(0, 0); - - if (pg) - pg->index = index; - return pg; -} - -#define grab_cache_page(index) __grab_cache_page(index) -#define page_cache_release(page) __free_pages(page, 0) - -/* arithmetic */ -#define do_div(a,b) \ - ({ \ - unsigned long remainder;\ - remainder = (a) % (b); \ - (a) = (a) / (b); \ - (remainder); \ - }) - -/* VFS stuff */ -#define ATTR_MODE 0x0001 -#define ATTR_UID 0x0002 -#define ATTR_GID 0x0004 -#define ATTR_SIZE 0x0008 -#define ATTR_ATIME 0x0010 -#define ATTR_MTIME 0x0020 -#define ATTR_CTIME 0x0040 -#define ATTR_ATIME_SET 0x0080 -#define ATTR_MTIME_SET 0x0100 -#define ATTR_FORCE 0x0200 /* Not a change, but a change it */ -#define ATTR_ATTR_FLAG 0x0400 -#define ATTR_RAW 0x0800 /* file system, not vfs will massage attrs */ -#define ATTR_FROM_OPEN 0x1000 /* called from open path, ie O_TRUNC */ -#define ATTR_CTIME_SET 0x2000 -#define ATTR_KILL_SUID 0 -#define ATTR_KILL_SGID 0 - -struct iattr { - unsigned int ia_valid; - umode_t ia_mode; - uid_t ia_uid; - gid_t ia_gid; - loff_t ia_size; - time_t ia_atime; - time_t ia_mtime; - time_t ia_ctime; - unsigned int ia_attr_flags; -}; -#define ll_iattr_struct iattr - -#define IT_OPEN 0x0001 -#define IT_CREAT 0x0002 -#define IT_READDIR 0x0004 -#define IT_GETATTR 0x0008 -#define IT_LOOKUP 0x0010 -#define IT_UNLINK 0x0020 -#define IT_GETXATTR 0x0040 -#define IT_EXEC 0x0080 -#define IT_PIN 0x0100 - -#define IT_FL_LOCKED 0x0001 -#define IT_FL_FOLLOWED 0x0002 /* set by vfs_follow_link */ - -#define INTENT_MAGIC 0x19620323 - -struct lustre_intent_data { - int it_disposition; - int it_status; - __u64 it_lock_handle; - void *it_data; - int it_lock_mode; - int it_int_flags; -}; -struct lookup_intent { - int it_magic; - void (*it_op_release)(struct lookup_intent *); - int it_op; - int it_flags; - int it_create_mode; - union { - struct lustre_intent_data lustre; - } d; -}; - -static inline void intent_init(struct lookup_intent *it, int op, int flags) -{ - memset(it, 0, sizeof(*it)); - it->it_magic = INTENT_MAGIC; - it->it_op = op; - it->it_flags = flags; -} - - -struct dentry { - int d_count; -}; - -struct vfsmount { - void *pwd; -}; - -/* semaphores */ -struct rw_semaphore { - int count; -}; - -/* semaphores */ -struct semaphore { - int count; -}; - -/* use the macro's argument to avoid unused warnings */ -#define down(a) do { (void)a; } while (0) -#define mutex_down(a) down(a) -#define up(a) do { (void)a; } while (0) -#define mutex_up(a) up(a) -#define down_read(a) do { (void)a; } while (0) -#define up_read(a) do { (void)a; } while (0) -#define down_write(a) do { (void)a; } while (0) -#define up_write(a) do { (void)a; } while (0) -#define sema_init(a,b) do { (void)a; } while (0) -#define init_rwsem(a) do { (void)a; } while (0) -#define DECLARE_MUTEX(name) \ - struct semaphore name = { 1 } -static inline void init_MUTEX (struct semaphore *sem) -{ - sema_init(sem, 1); -} -static inline void init_MUTEX_LOCKED (struct semaphore *sem) -{ - sema_init(sem, 0); -} - -#define init_mutex(s) init_MUTEX(s) - -typedef struct { - struct list_head sleepers; -} wait_queue_head_t; - -typedef struct { - struct list_head sleeping; - void *process; -} wait_queue_t; - -struct signal { - int signal; -}; - -struct task_struct { - int state; - struct signal pending; - char comm[32]; - int pid; - int fsuid; - int fsgid; - int max_groups; - int ngroups; - gid_t *groups; - __u32 cap_effective; -}; - -typedef struct task_struct cfs_task_t; -#define cfs_current() current -#define cfs_curproc_pid() (current->pid) -#define cfs_curproc_comm() (current->comm) - -extern struct task_struct *current; -int in_group_p(gid_t gid); -static inline int capable(int cap) -{ - if (current->cap_effective & (1 << cap)) - return 1; - else - return 0; -} - -#define set_current_state(foo) do { current->state = foo; } while (0) - -#define init_waitqueue_entry(q,p) do { (q)->process = p; } while (0) -#define add_wait_queue(q,p) do { list_add(&(q)->sleepers, &(p)->sleeping); } while (0) -#define del_wait_queue(p) do { list_del(&(p)->sleeping); } while (0) -#define remove_wait_queue(q,p) do { list_del(&(p)->sleeping); } while (0) - -#define DECLARE_WAIT_QUEUE_HEAD(HEAD) \ - wait_queue_head_t HEAD = { \ - .sleepers = CFS_LIST_HEAD_INIT(HEAD.sleepers) \ - } -#define init_waitqueue_head(l) CFS_INIT_LIST_HEAD(&(l)->sleepers) -#define wake_up(l) do { int a = 0; a++; } while (0) -#define TASK_INTERRUPTIBLE 0 -#define TASK_UNINTERRUPTIBLE 1 -#define TASK_RUNNING 2 - -#define wait_event_interruptible(wq, condition) \ -({ \ - struct l_wait_info lwi; \ - int timeout = 100000000;/* for ever */ \ - int ret; \ - \ - lwi = LWI_TIMEOUT(timeout, NULL, NULL); \ - ret = l_wait_event(NULL, condition, &lwi); \ - \ - ret; \ -}) - -#define in_interrupt() (0) - -#define schedule() do {} while (0) -static inline int schedule_timeout(signed long t) -{ - return 0; -} - -#define lock_kernel() do {} while (0) -#define unlock_kernel() do {} while (0) -#define daemonize(l) do {} while (0) -#define sigfillset(l) do {} while (0) -#define recalc_sigpending(l) do {} while (0) -#define kernel_thread(l,m,n) LBUG() - -#define USERMODEHELPER(path, argv, envp) (0) -#define SIGNAL_MASK_ASSERT() -#define KERN_INFO - -#include <sys/time.h> -#if HZ != 1 -#error "liblustre's jiffies currently expects HZ to be 1" -#endif -#define jiffies \ -({ \ - unsigned long _ret = 0; \ - struct timeval tv; \ - if (gettimeofday(&tv, NULL) == 0) \ - _ret = tv.tv_sec; \ - _ret; \ -}) -#define get_jiffies_64() (__u64)jiffies -#define time_after(a, b) ((long)(b) - (long)(a) < 0) -#define time_before(a, b) time_after(b,a) -#define time_after_eq(a,b) ((long)(a) - (long)(b) >= 0) - -struct timer_list { - struct list_head tl_list; - void (*function)(unsigned long unused); - unsigned long data; - long expires; -}; - -static inline int timer_pending(struct timer_list *l) -{ - if (time_after(l->expires, jiffies)) - return 1; - else - return 0; -} - -static inline int init_timer(struct timer_list *l) -{ - CFS_INIT_LIST_HEAD(&l->tl_list); - return 0; -} - -static inline void mod_timer(struct timer_list *l, int thetime) -{ - l->expires = thetime; -} - -static inline void del_timer(struct timer_list *l) -{ - free(l); -} - -typedef struct { volatile int counter; } atomic_t; - -#define ATOMIC_INIT(i) { i } - -#define atomic_read(a) ((a)->counter) -#define atomic_set(a,b) do {(a)->counter = b; } while (0) -#define atomic_dec_and_test(a) ((--((a)->counter)) == 0) -#define atomic_dec_and_lock(a,b) ((--((a)->counter)) == 0) -#define atomic_inc(a) (((a)->counter)++) -#define atomic_dec(a) do { (a)->counter--; } while (0) -#define atomic_add(b,a) do {(a)->counter += b;} while (0) -#define atomic_add_return(n,a) ((a)->counter += n) -#define atomic_inc_return(a) atomic_add_return(1,a) -#define atomic_sub(b,a) do {(a)->counter -= b;} while (0) -#define atomic_sub_return(n,a) ((a)->counter -= n) -#define atomic_dec_return(a) atomic_sub_return(1,a) - -#ifndef likely -#define likely(exp) (exp) -#endif -#ifndef unlikely -#define unlikely(exp) (exp) -#endif - -/* FIXME sys/capability will finally included linux/fs.h thus - * cause numerous trouble on x86-64. as temporary solution for - * build broken at cary, we copy definition we need from capability.h - * FIXME - */ -struct _cap_struct; -typedef struct _cap_struct *cap_t; -typedef int cap_value_t; -typedef enum { - CAP_EFFECTIVE=0, - CAP_PERMITTED=1, - CAP_INHERITABLE=2 -} cap_flag_t; -typedef enum { - CAP_CLEAR=0, - CAP_SET=1 -} cap_flag_value_t; - -#define CAP_DAC_OVERRIDE 1 -#define CAP_DAC_READ_SEARCH 2 -#define CAP_FOWNER 3 -#define CAP_FSETID 4 -#define CAP_SYS_ADMIN 21 - -cap_t cap_get_proc(void); -int cap_get_flag(cap_t, cap_value_t, cap_flag_t, cap_flag_value_t *); - -static inline void libcfs_run_lbug_upcall(char *file, const char *fn, - const int l){} - -/* completion */ -struct completion { - unsigned int done; - cfs_waitq_t wait; -}; - -#define COMPLETION_INITIALIZER(work) \ - { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } - -#define DECLARE_COMPLETION(work) \ - struct completion work = COMPLETION_INITIALIZER(work) - -#define INIT_COMPLETION(x) ((x).done = 0) - -static inline void init_completion(struct completion *x) -{ - x->done = 0; - init_waitqueue_head(&x->wait); -} - -struct liblustre_wait_callback { - struct list_head llwc_list; - const char *llwc_name; - int (*llwc_fn)(void *arg); - void *llwc_arg; -}; - -void *liblustre_register_wait_callback(const char *name, - int (*fn)(void *arg), void *arg); -void liblustre_deregister_wait_callback(void *notifier); -int liblustre_wait_event(int timeout); - -void *liblustre_register_idle_callback(const char *name, - int (*fn)(void *arg), void *arg); -void liblustre_deregister_idle_callback(void *notifier); -void liblustre_wait_idle(void); - -/* flock related */ -struct nfs_lock_info { - __u32 state; - __u32 flags; - void *host; -}; - -typedef struct file_lock { - struct file_lock *fl_next; /* singly linked list for this inode */ - struct list_head fl_link; /* doubly linked list of all locks */ - struct list_head fl_block; /* circular list of blocked processes */ - void *fl_owner; - unsigned int fl_pid; - cfs_waitq_t fl_wait; - struct file *fl_file; - unsigned char fl_flags; - unsigned char fl_type; - loff_t fl_start; - loff_t fl_end; - - void (*fl_notify)(struct file_lock *); /* unblock callback */ - void (*fl_insert)(struct file_lock *); /* lock insertion callback */ - void (*fl_remove)(struct file_lock *); /* lock removal callback */ - - void *fl_fasync; /* for lease break notifications */ - unsigned long fl_break_time; /* for nonblocking lease breaks */ - - union { - struct nfs_lock_info nfs_fl; - } fl_u; -} cfs_flock_t; - -#define cfs_flock_type(fl) ((fl)->fl_type) -#define cfs_flock_set_type(fl, type) do { (fl)->fl_type = (type); } while(0) -#define cfs_flock_pid(fl) ((fl)->fl_pid) -#define cfs_flock_set_pid(fl, pid) do { (fl)->fl_pid = (pid); } while(0) -#define cfs_flock_start(fl) ((fl)->fl_start) -#define cfs_flock_set_start(fl, start) do { (fl)->fl_start = (start); } while(0) -#define cfs_flock_end(fl) ((fl)->fl_end) -#define cfs_flock_set_end(fl, end) do { (fl)->fl_end = (end); } while(0) - -#ifndef OFFSET_MAX -#define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1))) -#define OFFSET_MAX INT_LIMIT(loff_t) -#endif - -/* XXX: defined in kernel */ -#define FL_POSIX 1 -#define FL_SLEEP 128 - -/* quota */ -#define QUOTA_OK 0 -#define NO_QUOTA 1 - -/* ACL */ -struct posix_acl_entry { - short e_tag; - unsigned short e_perm; - unsigned int e_id; -}; - -struct posix_acl { - atomic_t a_refcount; - unsigned int a_count; - struct posix_acl_entry a_entries[0]; -}; - -typedef struct { - __u16 e_tag; - __u16 e_perm; - __u32 e_id; -} xattr_acl_entry; - -typedef struct { - __u32 a_version; - xattr_acl_entry a_entries[0]; -} xattr_acl_header; - -static inline size_t xattr_acl_size(int count) -{ - return sizeof(xattr_acl_header) + count * sizeof(xattr_acl_entry); -} - -static inline -struct posix_acl * posix_acl_from_xattr(const void *value, size_t size) -{ - return NULL; -} - -static inline -int posix_acl_valid(const struct posix_acl *acl) -{ - return 0; -} - -static inline -void posix_acl_release(struct posix_acl *acl) -{ -} - -#ifdef LIBLUSTRE_POSIX_ACL - #ifndef posix_acl_xattr_entry - #define posix_acl_xattr_entry xattr_acl_entry - #endif - #ifndef posix_acl_xattr_header - #define posix_acl_xattr_header xattr_acl_header - #endif - #ifndef posix_acl_xattr_size - #define posix_acl_xattr_size(entry) xattr_acl_size(entry) - #endif - #ifndef CONFIG_FS_POSIX_ACL - #define CONFIG_FS_POSIX_ACL 1 - #endif -#endif - -#ifndef ENOTSUPP -#define ENOTSUPP ENOTSUP -#endif - -#include <obd_support.h> -#include <lustre/lustre_idl.h> -#include <lustre_lib.h> -#include <lustre_import.h> -#include <lustre_export.h> -#include <lustre_net.h> - -#endif diff --git a/lustre/include/linux/.cvsignore b/lustre/include/linux/.cvsignore deleted file mode 100644 index b731c89d98..0000000000 --- a/lustre/include/linux/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -Makefile.in -.deps -TAGS -extN_fs.h -extN_fs_i.h -extN_fs_sb.h -extN_jbd.h -extN_xattr.h -xattr.h -lustre_build_version.h diff --git a/lustre/include/linux/Makefile.am b/lustre/include/linux/Makefile.am deleted file mode 100644 index 9604a6a162..0000000000 --- a/lustre/include/linux/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -linuxdir = $(includedir)/linux - -if UTILS -linux_HEADERS = lustre_types.h lustre_user.h -endif - -EXTRA_DIST = lprocfs_status.h lustre_debug.h lustre_lib.h \ - lustre_dlm.h lustre_handles.h lustre_net.h obd_class.h obd_support.h \ - lustre_log.h lustre_compat25.h lustre_fsfilt.h lustre_mds.h obd.h \ - lvfs.h lvfs_linux.h lustre_lite.h lustre_quota.h \ - lustre_user.h lustre_types.h lustre_patchless_compat.h lustre_intent.h - diff --git a/lustre/include/linux/lprocfs_status.h b/lustre/include/linux/lprocfs_status.h deleted file mode 100644 index 85574fa0d3..0000000000 --- a/lustre/include/linux/lprocfs_status.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Top level header file for LProc SNMP - * Author: Hariharan Thantry thantry@users.sourceforge.net - */ -#ifndef _LINUX_LPROCFS_SNMP_H -#define _LINUX_LPROCFS_SNMP_H - -#ifndef _LPROCFS_SNMP_H -#error Do not #include this file directly. #include <lprocfs_status.h> instead -#endif - -#ifdef __KERNEL__ -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/autoconf.h> -#include <linux/proc_fs.h> -#include <linux/seq_file.h> -#include <linux/version.h> -#include <linux/smp.h> -#include <linux/rwsem.h> -#include <libcfs/kp30.h> - -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# include <linux/statfs.h> -# else -# define kstatfs statfs -# endif - -#else -# define kstatfs statfs -#endif - -#endif /* LPROCFS_SNMP_H */ diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h deleted file mode 100644 index 1ff876555b..0000000000 --- a/lustre/include/linux/lustre_compat25.h +++ /dev/null @@ -1,542 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _LINUX_COMPAT25_H -#define _LINUX_COMPAT25_H - -#ifdef __KERNEL__ - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) && LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69) -#error sorry, lustre requires at least 2.5.69 -#endif - -#include <libcfs/linux/portals_compat25.h> - -#include <linux/lustre_patchless_compat.h> - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) -struct ll_iattr_struct { - struct iattr iattr; - unsigned int ia_attr_flags; -}; -#else -#define ll_iattr_struct iattr -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) */ - -#ifndef HAVE_SET_FS_PWD -static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, - struct dentry *dentry) -{ - struct dentry *old_pwd; - struct vfsmount *old_pwdmnt; - - write_lock(&fs->lock); - old_pwd = fs->pwd; - old_pwdmnt = fs->pwdmnt; - fs->pwdmnt = mntget(mnt); - fs->pwd = dget(dentry); - write_unlock(&fs->lock); - - if (old_pwd) { - dput(old_pwd); - mntput(old_pwdmnt); - } -} -#else -#define ll_set_fs_pwd set_fs_pwd -#endif /* HAVE_SET_FS_PWD */ - -#ifdef HAVE_INODE_I_MUTEX -#define UNLOCK_INODE_MUTEX(inode) do {mutex_unlock(&(inode)->i_mutex); } while(0) -#define LOCK_INODE_MUTEX(inode) do {mutex_lock(&(inode)->i_mutex); } while(0) -#define TRYLOCK_INODE_MUTEX(inode) mutex_trylock(&(inode)->i_mutex) -#else -#define UNLOCK_INODE_MUTEX(inode) do {up(&(inode)->i_sem); } while(0) -#define LOCK_INODE_MUTEX(inode) do {down(&(inode)->i_sem); } while(0) -#define TRYLOCK_INODE_MUTEX(inode) (!down_trylock(&(inode)->i_sem)) -#endif /* HAVE_INODE_I_MUTEX */ - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) -#define d_child d_u.d_child -#define d_rcu d_u.d_rcu -#endif - -#ifdef HAVE_DQUOTOFF_MUTEX -#define UNLOCK_DQONOFF_MUTEX(dqopt) do {mutex_unlock(&(dqopt)->dqonoff_mutex); } while(0) -#define LOCK_DQONOFF_MUTEX(dqopt) do {mutex_lock(&(dqopt)->dqonoff_mutex); } while(0) -#else -#define UNLOCK_DQONOFF_MUTEX(dqopt) do {up(&(dqopt)->dqonoff_sem); } while(0) -#define LOCK_DQONOFF_MUTEX(dqopt) do {down(&(dqopt)->dqonoff_sem); } while(0) -#endif /* HAVE_DQUOTOFF_MUTEX */ - - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4) -#define NGROUPS_SMALL NGROUPS -#define NGROUPS_PER_BLOCK ((int)(EXEC_PAGESIZE / sizeof(gid_t))) - -struct group_info { - int ngroups; - atomic_t usage; - gid_t small_block[NGROUPS_SMALL]; - int nblocks; - gid_t *blocks[0]; -}; -#define current_ngroups current->ngroups -#define current_groups current->groups - -struct group_info *groups_alloc(int gidsetsize); -void groups_free(struct group_info *ginfo); -#else /* >= 2.6.4 */ - -#define current_ngroups current->group_info->ngroups -#define current_groups current->group_info->small_block - -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4) */ - -#ifndef page_private -#define page_private(page) ((page)->private) -#define set_page_private(page, v) ((page)->private = (v)) -#endif - -#ifndef HAVE_GFP_T -#define gfp_t int -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) - -#define lock_dentry(___dentry) spin_lock(&(___dentry)->d_lock) -#define unlock_dentry(___dentry) spin_unlock(&(___dentry)->d_lock) - -#define lock_24kernel() do {} while (0) -#define unlock_24kernel() do {} while (0) -#define ll_kernel_locked() kernel_locked() - -/* - * OBD need working random driver, thus all our - * initialization routines must be called after device - * driver initialization - */ -#ifndef MODULE -#undef module_init -#define module_init(a) late_initcall(a) -#endif - -/* XXX our code should be using the 2.6 calls, not the other way around */ -#define TryLockPage(page) TestSetPageLocked(page) -#define Page_Uptodate(page) PageUptodate(page) -#define ll_redirty_page(page) set_page_dirty(page) - -#define KDEVT_INIT(val) (val) - -#define LTIME_S(time) (time.tv_sec) -#define ll_path_lookup path_lookup -#define ll_permission(inode,mask,nd) permission(inode,mask,nd) - -#define ll_pgcache_lock(mapping) spin_lock(&mapping->page_lock) -#define ll_pgcache_unlock(mapping) spin_unlock(&mapping->page_lock) -#define ll_call_writepage(inode, page) \ - (inode)->i_mapping->a_ops->writepage(page, NULL) -#define ll_invalidate_inode_pages(inode) \ - invalidate_inode_pages((inode)->i_mapping) -#define ll_truncate_complete_page(page) \ - truncate_complete_page(page->mapping, page) - -#define ll_vfs_create(a,b,c,d) vfs_create(a,b,c,d) -#define ll_dev_t dev_t -#define kdev_t dev_t -#define to_kdev_t(dev) (dev) -#define kdev_t_to_nr(dev) (dev) -#define val_to_kdev(dev) (dev) -#define ILOOKUP(sb, ino, test, data) ilookup5(sb, ino, test, data); - -#include <linux/writeback.h> - -static inline int cleanup_group_info(void) -{ - struct group_info *ginfo; - - ginfo = groups_alloc(0); - if (!ginfo) - return -ENOMEM; - - set_current_groups(ginfo); - put_group_info(ginfo); - - return 0; -} - -#define __set_page_ll_data(page, llap) \ - do { \ - page_cache_get(page); \ - SetPagePrivate(page); \ - set_page_private(page, (unsigned long)llap); \ - } while (0) -#define __clear_page_ll_data(page) \ - do { \ - ClearPagePrivate(page); \ - set_page_private(page, 0); \ - page_cache_release(page); \ - } while(0) - -#define kiobuf bio - -#include <linux/proc_fs.h> - -#if !defined(HAVE_D_REHASH_COND) && defined(HAVE___D_REHASH) -#define d_rehash_cond(dentry, lock) __d_rehash(dentry, lock) -extern void __d_rehash(struct dentry *dentry, int lock); -#endif - -#if !defined(HAVE_D_MOVE_LOCKED) && defined(HAVE___D_MOVE) -#define d_move_locked(dentry, target) __d_move(dentry, target) -extern void __d_move(struct dentry *dentry, struct dentry *target); -#endif - -#ifdef HAVE_CAN_SLEEP_ARG -#define ll_flock_lock_file_wait(file, lock, can_sleep) \ - flock_lock_file_wait(file, lock, can_sleep) -#else -#define ll_flock_lock_file_wait(file, lock, can_sleep) \ - flock_lock_file_wait(file, lock) -#endif - -#define CheckWriteback(page, cmd) \ - (!(!PageWriteback(page) && cmd == OBD_BRW_WRITE)) - -#else /* 2.4.. */ - -#define ll_flock_lock_file_wait(file, lock, can_sleep) \ - do {} while(0) - -#define lock_dentry(___dentry) -#define unlock_dentry(___dentry) - -#define lock_24kernel() lock_kernel() -#define unlock_24kernel() unlock_kernel() -#define ll_kernel_locked() (current->lock_depth >= 0) - -/* 2.4 kernels have HZ=100 on i386/x86_64, this should be reasonably safe */ -#define get_jiffies_64() (__u64)jiffies - -#ifdef HAVE_MM_INLINE -#include <linux/mm_inline.h> -#endif - -#ifndef pgoff_t -#define pgoff_t unsigned long -#endif - -#define ll_vfs_create(a,b,c,d) vfs_create(a,b,c) -#define ll_permission(inode,mask,nd) permission(inode,mask) -#define ILOOKUP(sb, ino, test, data) ilookup4(sb, ino, test, data); -#define DCACHE_DISCONNECTED DCACHE_NFSD_DISCONNECTED -#define ll_dev_t int -#define old_encode_dev(dev) (dev) - -/* 2.5 uses hlists for some things, like the d_hash. we'll treat them - * as 2.5 and let macros drop back.. */ -#ifndef HLIST_HEAD /* until we get a kernel newer than l28 */ -#define hlist_entry list_entry -#define hlist_head list_head -#define hlist_node list_head -#define HLIST_HEAD LIST_HEAD -#define INIT_HLIST_HEAD INIT_LIST_HEAD -#define hlist_del_init list_del_init -#define hlist_add_head list_add -#endif - -#ifndef INIT_HLIST_NODE -#define INIT_HLIST_NODE(p) ((p)->next = NULL, (p)->prev = NULL) -#endif - -#ifndef hlist_for_each -#define hlist_for_each list_for_each -#endif - -#ifndef hlist_for_each_safe -#define hlist_for_each_safe list_for_each_safe -#endif - -#define KDEVT_INIT(val) (val) -#define ext3_xattr_set_handle ext3_xattr_set -#define try_module_get __MOD_INC_USE_COUNT -#define module_put __MOD_DEC_USE_COUNT -#define LTIME_S(time) (time) - -#if !defined(CONFIG_RH_2_4_20) && !defined(cpu_online) -#define cpu_online(cpu) test_bit(cpu, &(cpu_online_map)) -#endif - -static inline int ll_path_lookup(const char *path, unsigned flags, - struct nameidata *nd) -{ - int error = 0; - if (path_init(path, flags, nd)) - error = path_walk(path, nd); - return error; -} -#define ll_permission(inode,mask,nd) permission(inode,mask) -typedef long sector_t; - -#define ll_pgcache_lock(mapping) spin_lock(&pagecache_lock) -#define ll_pgcache_unlock(mapping) spin_unlock(&pagecache_lock) -#define ll_call_writepage(inode, page) \ - (inode)->i_mapping->a_ops->writepage(page) -#define ll_invalidate_inode_pages(inode) invalidate_inode_pages(inode) -#define ll_truncate_complete_page(page) truncate_complete_page(page) - -static inline void clear_page_dirty(struct page *page) -{ - if (PageDirty(page)) - ClearPageDirty(page); -} - -static inline int clear_page_dirty_for_io(struct page *page) -{ - struct address_space *mapping = page->mapping; - - if (page->mapping && PageDirty(page)) { - ClearPageDirty(page); - ll_pgcache_lock(mapping); - list_del(&page->list); - list_add(&page->list, &mapping->locked_pages); - ll_pgcache_unlock(mapping); - return 1; - } - return 0; -} - -static inline void ll_redirty_page(struct page *page) -{ - SetPageDirty(page); - ClearPageLaunder(page); -} - -static inline void __d_drop(struct dentry *dentry) -{ - list_del_init(&dentry->d_hash); -} - -static inline int cleanup_group_info(void) -{ - /* Get rid of unneeded supplementary groups */ - current->ngroups = 0; - memset(current->groups, 0, sizeof(current->groups)); - return 0; -} - -#ifndef HAVE_COND_RESCHED -static inline void cond_resched(void) -{ - if (unlikely(need_resched())) { - set_current_state(TASK_RUNNING); - schedule(); - } -} -#endif - -/* to find proc_dir_entry from inode. 2.6 has native one -bzzz */ -#ifndef HAVE_PDE -#define PDE(ii) ((ii)->u.generic_ip) -#endif - -#define __set_page_ll_data(page, llap) set_page_private(page, (unsigned long)llap) -#define __clear_page_ll_data(page) set_page_private(page, 0) -#define PageWriteback(page) 0 -#define CheckWriteback(page, cmd) 1 -#define set_page_writeback(page) do {} while (0) -#define end_page_writeback(page) do {} while (0) - -static inline int mapping_mapped(struct address_space *mapping) -{ - if (mapping->i_mmap_shared) - return 1; - if (mapping->i_mmap) - return 1; - return 0; -} - -#ifdef ZAP_PAGE_RANGE_VMA -#define ll_zap_page_range(vma, addr, len) zap_page_range(vma, addr, len) -#else -#define ll_zap_page_range(vma, addr, len) zap_page_range(vma->vm_mm, addr, len) -#endif - -#ifndef HAVE_PAGE_MAPPED -/* Poor man's page_mapped. substract from page count, counts from - buffers/pagecache and our own count (we are supposed to hold one reference). - What is left are user mappings and also others who work with this page now, - but there are supposedly none. */ -static inline int page_mapped(struct page *page) -{ - return page_count(page) - !!page->mapping - !!page->buffers - 1; -} -#endif /* !HAVE_PAGE_MAPPED */ - -static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry) -{ - update_atime(dentry->d_inode); -} - -static inline void file_accessed(struct file *file) -{ -#ifdef O_NOATIME - if (file->f_flags & O_NOATIME) - return; -#endif - touch_atime(file->f_vfsmnt, file->f_dentry); -} - -#ifndef typecheck -/* - * Check at compile time that something is of a particular type. - * Always evaluates to 1 so you may use it easily in comparisons. - */ -#define typecheck(type,x) \ -({ type __dummy; \ - typeof(x) __dummy2; \ - (void)(&__dummy == &__dummy2); \ - 1; \ -}) -#endif - -#endif /* end of 2.4 compat macros */ - -#ifdef HAVE_PAGE_LIST -static inline int mapping_has_pages(struct address_space *mapping) -{ - int rc = 1; - - ll_pgcache_lock(mapping); - if (list_empty(&mapping->dirty_pages) && - list_empty(&mapping->clean_pages) && - list_empty(&mapping->locked_pages)) { - rc = 0; - } - ll_pgcache_unlock(mapping); - - return rc; -} -#else -static inline int mapping_has_pages(struct address_space *mapping) -{ - return mapping->nrpages > 0; -} -#endif - -#ifdef HAVE_KIOBUF_KIO_BLOCKS -#define KIOBUF_GET_BLOCKS(k) ((k)->kio_blocks) -#else -#define KIOBUF_GET_BLOCKS(k) ((k)->blocks) -#endif - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)) -#define ll_set_dflags(dentry, flags) do { dentry->d_vfs_flags |= flags; } while(0) -#define ll_vfs_symlink(dir, dentry, path, mode) vfs_symlink(dir, dentry, path) -#else -#define ll_set_dflags(dentry, flags) do { \ - spin_lock(&dentry->d_lock); \ - dentry->d_flags |= flags; \ - spin_unlock(&dentry->d_lock); \ - } while(0) -#define ll_vfs_symlink(dir, dentry, path, mode) vfs_symlink(dir, dentry, path, mode) -#endif - -#ifndef container_of -#define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) -#endif - -#ifdef HAVE_I_ALLOC_SEM -#define UP_WRITE_I_ALLOC_SEM(i) do { up_write(&(i)->i_alloc_sem); } while (0) -#define DOWN_WRITE_I_ALLOC_SEM(i) do { down_write(&(i)->i_alloc_sem); } while(0) -#define LASSERT_I_ALLOC_SEM_WRITE_LOCKED(i) LASSERT(down_read_trylock(&(i)->i_alloc_sem) == 0) - -#define UP_READ_I_ALLOC_SEM(i) do { up_read(&(i)->i_alloc_sem); } while (0) -#define DOWN_READ_I_ALLOC_SEM(i) do { down_read(&(i)->i_alloc_sem); } while (0) -#define LASSERT_I_ALLOC_SEM_READ_LOCKED(i) LASSERT(down_write_trylock(&(i)->i_alloc_sem) == 0) -#else -#define UP_READ_I_ALLOC_SEM(i) do { } while (0) -#define DOWN_READ_I_ALLOC_SEM(i) do { } while (0) -#define LASSERT_I_ALLOC_SEM_READ_LOCKED(i) do { } while (0) - -#define UP_WRITE_I_ALLOC_SEM(i) do { } while (0) -#define DOWN_WRITE_I_ALLOC_SEM(i) do { } while (0) -#define LASSERT_I_ALLOC_SEM_WRITE_LOCKED(i) do { } while (0) -#endif - -#ifndef HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP -#define grab_cache_page_nowait_gfp(x, y, z) grab_cache_page_nowait((x), (y)) -#endif - -#ifndef HAVE_FILEMAP_FDATAWRITE -#define filemap_fdatawrite(mapping) filemap_fdatasync(mapping) -#endif - -#ifdef HAVE_VFS_KERN_MOUNT -static inline -struct vfsmount * -ll_kern_mount(const char *fstype, int flags, const char *name, void *data) -{ - struct file_system_type *type = get_fs_type(fstype); - struct vfsmount *mnt; - if (!type) - return ERR_PTR(-ENODEV); - mnt = vfs_kern_mount(type, flags, name, data); - module_put(type->owner); - return mnt; -} -#else -#define ll_kern_mount(fstype, flags, name, data) do_kern_mount((fstype), (flags), (name), (data)) -#endif - -#ifdef HAVE_STATFS_DENTRY_PARAM -#define ll_do_statfs(sb, sfs) (sb)->s_op->statfs((sb)->s_root, (sfs)) -#else -#define ll_do_statfs(sb, sfs) (sb)->s_op->statfs((sb), (sfs)) -#endif - -/* task_struct */ -#ifndef HAVE_TASK_PPTR -#define p_pptr parent -#endif - -#ifdef HAVE_UNREGISTER_BLKDEV_RETURN_INT -#define ll_unregister_blkdev(a,b) unregister_blkdev((a),(b)) -#else -static inline -int ll_unregister_blkdev(unsigned int dev, const char *name) -{ - unregister_blkdev(dev, name); - return 0; -} -#endif - -#ifdef HAVE_INVALIDATE_BDEV_2ARG -#define ll_invalidate_bdev(a,b) invalidate_bdev((a),(b)) -#else -#define ll_invalidate_bdev(a,b) invalidate_bdev((a)) -#endif - -#endif /* __KERNEL__ */ -#endif /* _COMPAT25_H */ diff --git a/lustre/include/linux/lustre_debug.h b/lustre/include/linux/lustre_debug.h deleted file mode 100644 index db872a93bd..0000000000 --- a/lustre/include/linux/lustre_debug.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _LINUX_LUSTRE_DEBUG_H -#define _LINUX_LUSTRE_DEBUG_H - -#ifndef _LUSTRE_DEBUG_H -#error Do not #include this file directly. #include <lprocfs_status.h> instead -#endif - -#ifdef __KERNEL__ -#define LL_CDEBUG_PAGE(mask, page, fmt, arg...) \ - CDEBUG(mask, "page %p map %p index %lu flags %lx count %u priv %0lx: "\ - fmt, page, page->mapping, page->index, (long)page->flags, \ - page_count(page), page_private(page), ## arg) -#else -#define LL_CDEBUG_PAGE(mask, page, fmt, arg...) \ - CDEBUG(mask, "page %p index %lu priv %0lx: "\ - fmt, page, page->index, page_private(page), ## arg) -#endif - -#endif diff --git a/lustre/include/linux/lustre_dlm.h b/lustre/include/linux/lustre_dlm.h deleted file mode 100644 index a19f31a835..0000000000 --- a/lustre/include/linux/lustre_dlm.h +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * (visit-tags-table FILE) - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _LINUX_LUSTRE_DLM_H__ -#define _LINUX_LUSTRE_DLM_H__ - -#ifndef _LUSTRE_DLM_H__ -#error Do not #include this file directly. #include <lprocfs_status.h> instead -#endif - -#ifdef __KERNEL__ -# include <linux/proc_fs.h> -# ifdef HAVE_BIT_SPINLOCK_H -# include <asm/processor.h> -# include <linux/bit_spinlock.h> -# endif -#endif - -#endif diff --git a/lustre/include/linux/lustre_fsfilt.h b/lustre/include/linux/lustre_fsfilt.h deleted file mode 100644 index f1698e5ce8..0000000000 --- a/lustre/include/linux/lustre_fsfilt.h +++ /dev/null @@ -1,477 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2004 Cluster File Systems, Inc. <info@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Filesystem interface helper. - * - */ - -#ifndef _LINUX_LUSTRE_FSFILT_H -#define _LINUX_LUSTRE_FSFILT_H - -#ifndef _LUSTRE_FSFILT_H -#error Do not #include this file directly. #include <lustre_fsfilt.h> instead -#endif - -#ifdef __KERNEL__ - -#include <obd.h> -#include <obd_class.h> - -typedef void (*fsfilt_cb_t)(struct obd_device *obd, __u64 last_rcvd, - void *data, int error); - -struct fsfilt_objinfo { - struct dentry *fso_dentry; - int fso_bufcnt; -}; - -#define XATTR_LUSTRE_MDS_LOV_EA "lov" - -struct lustre_dquot; -struct fsfilt_operations { - struct list_head fs_list; - struct module *fs_owner; - char *fs_type; - char *(* fs_getlabel)(struct super_block *sb); - int (* fs_setlabel)(struct super_block *sb, char *label); - char *(* fs_uuid)(struct super_block *sb); - void *(* fs_start)(struct inode *inode, int op, void *desc_private, - int logs); - void *(* fs_brw_start)(int objcount, struct fsfilt_objinfo *fso, - int niocount, struct niobuf_local *nb, - void *desc_private, int logs); - int (* fs_extend)(struct inode *inode, unsigned nblocks, void *h); - int (* fs_commit)(struct inode *inode, void *handle,int force_sync); - int (* fs_commit_async)(struct inode *inode, void *handle, - void **wait_handle); - int (* fs_commit_wait)(struct inode *inode, void *handle); - int (* fs_setattr)(struct dentry *dentry, void *handle, - struct iattr *iattr, int do_trunc); - int (* fs_iocontrol)(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg); - int (* fs_set_md)(struct inode *inode, void *handle, void *md, - int size, const char *name); - int (* fs_get_md)(struct inode *inode, void *md, int size, - const char *name); - /* - * this method is needed to make IO operation fsfilt nature depend. - * - * This operation maybe synchronous or asynchronous. - * - * Return convention: positive number of bytes written (synchronously) - * on success. Negative errno value on failure. Zero if asynchronous - * IO was submitted successfully. - * - */ - int (* fs_send_bio)(int rw, struct inode *inode,struct kiobuf *bio); - ssize_t (* fs_readpage)(struct file *file, char *buf, size_t count, - loff_t *offset); - int (* fs_add_journal_cb)(struct obd_device *obd, __u64 last_rcvd, - void *handle, fsfilt_cb_t cb_func, - void *cb_data); - int (* fs_statfs)(struct super_block *sb, struct obd_statfs *osfs); - int (* fs_sync)(struct super_block *sb); - int (* fs_map_inode_pages)(struct inode *inode, struct page **page, - int pages, unsigned long *blocks, - int *created, int create, - struct semaphore *sem); - int (* fs_write_record)(struct file *, void *, int size, loff_t *, - int force_sync); - int (* fs_read_record)(struct file *, void *, int size, loff_t *); - int (* fs_setup)(struct super_block *sb); - int (* fs_get_op_len)(int, struct fsfilt_objinfo *, int); - int (* fs_quotacheck)(struct super_block *sb, - struct obd_quotactl *oqctl); - __u64 (* fs_get_version) (struct inode *inode); - __u64 (* fs_set_version) (struct inode *inode, __u64 new_version); - int (* fs_quotactl)(struct super_block *sb, - struct obd_quotactl *oqctl); - int (* fs_quotainfo)(struct lustre_quota_info *lqi, int type, - int cmd); - int (* fs_qids)(struct file *file, struct inode *inode, int type, - struct list_head *list); - int (* fs_dquot)(struct lustre_dquot *dquot, int cmd); - lvfs_sbdev_type (* fs_journal_sbdev)(struct super_block *sb); -}; - -extern int fsfilt_register_ops(struct fsfilt_operations *fs_ops); -extern void fsfilt_unregister_ops(struct fsfilt_operations *fs_ops); -extern struct fsfilt_operations *fsfilt_get_ops(const char *type); -extern void fsfilt_put_ops(struct fsfilt_operations *fs_ops); - -static inline char *fsfilt_get_label(struct obd_device *obd, - struct super_block *sb) -{ - if (obd->obd_fsops->fs_getlabel == NULL) - return NULL; - if (obd->obd_fsops->fs_getlabel(sb)[0] == '\0') - return NULL; - - return obd->obd_fsops->fs_getlabel(sb); -} - -static inline int fsfilt_set_label(struct obd_device *obd, - struct super_block *sb, char *label) -{ - if (obd->obd_fsops->fs_setlabel == NULL) - return -ENOSYS; - return (obd->obd_fsops->fs_setlabel(sb, label)); -} - -static inline __u8 *fsfilt_uuid(struct obd_device *obd, struct super_block *sb) -{ - if (obd->obd_fsops->fs_uuid == NULL) - return NULL; - - return obd->obd_fsops->fs_uuid(sb); -} - -static inline lvfs_sbdev_type fsfilt_journal_sbdev(struct obd_device *obd, - struct super_block *sb) -{ - if (obd && obd->obd_fsops && obd->obd_fsops->fs_journal_sbdev) - return obd->obd_fsops->fs_journal_sbdev(sb); - return (lvfs_sbdev_type)0; -} - -#define FSFILT_OP_UNLINK 1 -#define FSFILT_OP_RMDIR 2 -#define FSFILT_OP_RENAME 3 -#define FSFILT_OP_CREATE 4 -#define FSFILT_OP_MKDIR 5 -#define FSFILT_OP_SYMLINK 6 -#define FSFILT_OP_MKNOD 7 -#define FSFILT_OP_SETATTR 8 -#define FSFILT_OP_LINK 9 -#define FSFILT_OP_CANCEL_UNLINK 10 -#define FSFILT_OP_JOIN 11 -#define FSFILT_OP_NOOP 15 - -#define __fsfilt_check_slow(obd, start, msg) \ -do { \ - if (time_before(jiffies, start + 15 * HZ)) \ - break; \ - else if (time_before(jiffies, start + 30 * HZ)) \ - CDEBUG(D_VFSTRACE, "%s: slow %s %lus\n", obd->obd_name, \ - msg, (jiffies-start) / HZ); \ - else if (time_before(jiffies, start + DISK_TIMEOUT * HZ)) \ - CWARN("%s: slow %s %lus\n", obd->obd_name, msg, \ - (jiffies - start) / HZ); \ - else \ - CERROR("%s: slow %s %lus\n", obd->obd_name, msg, \ - (jiffies - start) / HZ); \ -} while (0) - -#define fsfilt_check_slow(obd, start, msg) \ -do { \ - __fsfilt_check_slow(obd, start, msg); \ - start = jiffies; \ -} while (0) - -static inline void *fsfilt_start_log(struct obd_device *obd, - struct inode *inode, int op, - struct obd_trans_info *oti, int logs) -{ - unsigned long now = jiffies; - void *parent_handle = oti ? oti->oti_handle : NULL; - void *handle; - - if (obd->obd_fail) - return ERR_PTR(-EROFS); - - handle = obd->obd_fsops->fs_start(inode, op, parent_handle, logs); - CDEBUG(D_INFO, "started handle %p (%p)\n", handle, parent_handle); - - if (oti != NULL) { - if (parent_handle == NULL) { - oti->oti_handle = handle; - } else if (handle != parent_handle) { - CERROR("mismatch: parent %p, handle %p, oti %p\n", - parent_handle, handle, oti); - LBUG(); - } - } - fsfilt_check_slow(obd, now, "journal start"); - return handle; -} - -static inline void *fsfilt_start(struct obd_device *obd, struct inode *inode, - int op, struct obd_trans_info *oti) -{ - return fsfilt_start_log(obd, inode, op, oti, 0); -} - -static inline void *fsfilt_brw_start_log(struct obd_device *obd, int objcount, - struct fsfilt_objinfo *fso, - int niocount, struct niobuf_local *nb, - struct obd_trans_info *oti, int logs) -{ - unsigned long now = jiffies; - void *parent_handle = oti ? oti->oti_handle : NULL; - void *handle; - - if (obd->obd_fail) - return ERR_PTR(-EROFS); - - handle = obd->obd_fsops->fs_brw_start(objcount, fso, niocount, nb, - parent_handle, logs); - CDEBUG(D_INFO, "started handle %p (%p)\n", handle, parent_handle); - - if (oti != NULL) { - if (parent_handle == NULL) { - oti->oti_handle = handle; - } else if (handle != parent_handle) { - CERROR("mismatch: parent %p, handle %p, oti %p\n", - parent_handle, handle, oti); - LBUG(); - } - } - fsfilt_check_slow(obd, now, "journal start"); - - return handle; -} - -static inline void *fsfilt_brw_start(struct obd_device *obd, int objcount, - struct fsfilt_objinfo *fso, int niocount, - struct niobuf_local *nb, - struct obd_trans_info *oti) -{ - return fsfilt_brw_start_log(obd, objcount, fso, niocount, nb, oti, 0); -} - -static inline int fsfilt_extend(struct obd_device *obd, struct inode *inode, - unsigned int nblocks, void *handle) -{ - unsigned long now = jiffies; - int rc = obd->obd_fsops->fs_extend(inode, nblocks, handle); - CDEBUG(D_INFO, "extending handle %p with %u blocks\n", handle, nblocks); - - fsfilt_check_slow(obd, now, "journal extend"); - - return rc; -} - -static inline int fsfilt_commit(struct obd_device *obd, struct inode *inode, - void *handle, int force_sync) -{ - unsigned long now = jiffies; - int rc = obd->obd_fsops->fs_commit(inode, handle, force_sync); - CDEBUG(D_INFO, "committing handle %p\n", handle); - - fsfilt_check_slow(obd, now, "journal start"); - - return rc; -} - -static inline int fsfilt_commit_async(struct obd_device *obd, - struct inode *inode, void *handle, - void **wait_handle) -{ - unsigned long now = jiffies; - int rc = obd->obd_fsops->fs_commit_async(inode, handle, wait_handle); - - CDEBUG(D_INFO, "committing handle %p (async)\n", *wait_handle); - fsfilt_check_slow(obd, now, "journal start"); - - return rc; -} - -static inline int fsfilt_commit_wait(struct obd_device *obd, - struct inode *inode, void *handle) -{ - unsigned long now = jiffies; - int rc = obd->obd_fsops->fs_commit_wait(inode, handle); - CDEBUG(D_INFO, "waiting for completion %p\n", handle); - fsfilt_check_slow(obd, now, "journal start"); - return rc; -} - -static inline int fsfilt_setattr(struct obd_device *obd, struct dentry *dentry, - void *handle, struct iattr *iattr,int do_trunc) -{ - unsigned long now = jiffies; - int rc; - rc = obd->obd_fsops->fs_setattr(dentry, handle, iattr, do_trunc); - fsfilt_check_slow(obd, now, "setattr"); - return rc; -} - -static inline int fsfilt_iocontrol(struct obd_device *obd, struct inode *inode, - struct file *file, unsigned int cmd, - unsigned long arg) -{ - return obd->obd_fsops->fs_iocontrol(inode, file, cmd, arg); -} - -static inline int fsfilt_set_md(struct obd_device *obd, struct inode *inode, - void *handle, void *md, int size, - const char *name) -{ - return obd->obd_fsops->fs_set_md(inode, handle, md, size, name); -} - -static inline int fsfilt_get_md(struct obd_device *obd, struct inode *inode, - void *md, int size, const char *name) -{ - return obd->obd_fsops->fs_get_md(inode, md, size, name); -} - -static inline int fsfilt_send_bio(int rw, struct obd_device *obd, - struct inode *inode, void *bio) -{ - LASSERTF(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ, "%x\n", rw); - - if (rw == OBD_BRW_READ) - return obd->obd_fsops->fs_send_bio(READ, inode, bio); - return obd->obd_fsops->fs_send_bio(WRITE, inode, bio); -} - -static inline ssize_t fsfilt_readpage(struct obd_device *obd, - struct file *file, char *buf, - size_t count, loff_t *offset) -{ - return obd->obd_fsops->fs_readpage(file, buf, count, offset); -} - -static inline int fsfilt_add_journal_cb(struct obd_device *obd, __u64 last_rcvd, - void *handle, fsfilt_cb_t cb_func, - void *cb_data) -{ - return obd->obd_fsops->fs_add_journal_cb(obd, last_rcvd, - handle, cb_func, cb_data); -} - -/* very similar to obd_statfs(), but caller already holds obd_osfs_lock */ -static inline int fsfilt_statfs(struct obd_device *obd, struct super_block *sb, - __u64 max_age) -{ - int rc = 0; - - CDEBUG(D_SUPER, "osfs "LPU64", max_age "LPU64"\n", - obd->obd_osfs_age, max_age); - if (cfs_time_before_64(obd->obd_osfs_age, max_age)) { - rc = obd->obd_fsops->fs_statfs(sb, &obd->obd_osfs); - if (rc == 0) /* N.B. statfs can't really fail */ - obd->obd_osfs_age = cfs_time_current_64(); - } else { - CDEBUG(D_SUPER, "using cached obd_statfs data\n"); - } - - return rc; -} - -static inline int fsfilt_sync(struct obd_device *obd, struct super_block *sb) -{ - return obd->obd_fsops->fs_sync(sb); -} - -static inline int fsfilt_quotacheck(struct obd_device *obd, - struct super_block *sb, - struct obd_quotactl *oqctl) -{ - if (obd->obd_fsops->fs_quotacheck) - return obd->obd_fsops->fs_quotacheck(sb, oqctl); - return -ENOTSUPP; -} - -static inline int fsfilt_quotactl(struct obd_device *obd, - struct super_block *sb, - struct obd_quotactl *oqctl) -{ - if (obd->obd_fsops->fs_quotactl) - return obd->obd_fsops->fs_quotactl(sb, oqctl); - return -ENOTSUPP; -} - -static inline int fsfilt_quotainfo(struct obd_device *obd, - struct lustre_quota_info *lqi, - int type, int cmd) -{ - if (obd->obd_fsops->fs_quotainfo) - return obd->obd_fsops->fs_quotainfo(lqi, type, cmd); - return -ENOTSUPP; -} - -static inline int fsfilt_qids(struct obd_device *obd, struct file *file, - struct inode *inode, int type, - struct list_head *list) -{ - if (obd->obd_fsops->fs_qids) - return obd->obd_fsops->fs_qids(file, inode, type, list); - return -ENOTSUPP; -} - -static inline int fsfilt_dquot(struct obd_device *obd, - struct lustre_dquot *dquot, int cmd) -{ - if (obd->obd_fsops->fs_dquot) - return obd->obd_fsops->fs_dquot(dquot, cmd); - return -ENOTSUPP; -} - -static inline int fsfilt_map_inode_pages(struct obd_device *obd, - struct inode *inode, - struct page **page, int pages, - unsigned long *blocks, int *created, - int create, struct semaphore *sem) -{ - return obd->obd_fsops->fs_map_inode_pages(inode, page, pages, blocks, - created, create, sem); -} - -static inline int fsfilt_read_record(struct obd_device *obd, struct file *file, - void *buf, loff_t size, loff_t *offs) -{ - return obd->obd_fsops->fs_read_record(file, buf, size, offs); -} - -static inline int fsfilt_write_record(struct obd_device *obd, struct file *file, - void *buf, loff_t size, loff_t *offs, - int force_sync) -{ - return obd->obd_fsops->fs_write_record(file, buf, size,offs,force_sync); -} - -static inline int fsfilt_setup(struct obd_device *obd, struct super_block *fs) -{ - if (obd->obd_fsops->fs_setup) - return obd->obd_fsops->fs_setup(fs); - return 0; -} - -static inline __u64 fsfilt_set_version(struct obd_device *obd, - struct inode *inode, __u64 new_version) -{ - if (obd->obd_fsops->fs_set_version) - return obd->obd_fsops->fs_set_version(inode, new_version); - return -EOPNOTSUPP; -} - -static inline __u64 fsfilt_get_version(struct obd_device *obd, - struct inode *inode) -{ - if (obd->obd_fsops->fs_set_version) - return obd->obd_fsops->fs_get_version(inode); - return -EOPNOTSUPP; -} - -#endif /* __KERNEL__ */ - -#endif diff --git a/lustre/include/linux/lustre_handles.h b/lustre/include/linux/lustre_handles.h deleted file mode 100644 index 166beb3d37..0000000000 --- a/lustre/include/linux/lustre_handles.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __LINUX_LUSTRE_HANDLES_H_ -#define __LINUX_LUSTRE_HANDLES_H_ - -#ifndef __LUSTRE_HANDLES_H_ -#error Do not #include this file directly. #include <lustre_handles.h> instead -#endif - -#ifdef __KERNEL__ -#include <asm/types.h> -#include <asm/atomic.h> -#include <linux/list.h> -#include <linux/random.h> -#include <linux/version.h> -#include <linux/spinlock.h> -#include <linux/types.h> - -# ifdef HAVE_RCU -# include <linux/rcupdate.h> /* for rcu_head{} */ -# else -struct rcu_head { }; -# endif - -#endif /* ifdef __KERNEL__ */ - -#endif diff --git a/lustre/include/linux/lustre_intent.h b/lustre/include/linux/lustre_intent.h deleted file mode 100644 index 380853aa1d..0000000000 --- a/lustre/include/linux/lustre_intent.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef LUSTRE_INTENT_H -#define LUSTRE_INTENT_H - -#include <linux/lustre_version.h> - -#ifndef HAVE_VFS_INTENT_PATCHES -#define IT_OPEN (1) -#define IT_CREAT (1<<1) -#define IT_READDIR (1<<2) -#define IT_GETATTR (1<<3) -#define IT_LOOKUP (1<<4) -#define IT_UNLINK (1<<5) -#define IT_TRUNC (1<<6) -#define IT_GETXATTR (1<<7) - -struct lustre_intent_data { - int it_disposition; - int it_status; - __u64 it_lock_handle; - void *it_data; - int it_lock_mode; -}; - -struct lookup_intent { - int it_op; - int it_flags; - int it_create_mode; - union { - struct lustre_intent_data lustre; - } d; -}; - - -#endif -#endif diff --git a/lustre/include/linux/lustre_lib.h b/lustre/include/linux/lustre_lib.h deleted file mode 100644 index a2fd8baf3d..0000000000 --- a/lustre/include/linux/lustre_lib.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Basic Lustre library routines. - * - */ - -#ifndef _LINUX_LUSTRE_LIB_H -#define _LINUX_LUSTRE_LIB_H - -#ifndef _LUSTRE_LIB_H -#error Do not #include this file directly. #include <lustre_lib.h> instead -#endif - -#ifndef __KERNEL__ -# include <string.h> -# include <sys/types.h> -#else -# include <asm/semaphore.h> -# include <linux/rwsem.h> -# include <linux/sched.h> -# include <linux/signal.h> -# include <linux/types.h> -#endif -#include <linux/lustre_compat25.h> - -#ifndef LP_POISON -#if BITS_PER_LONG > 32 -# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a) -# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a) -# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a) -#else -# define LI_POISON ((int)0x5a5a5a5a) -# define LL_POISON ((long)0x5a5a5a5a) -# define LP_POISON ((void *)(long)0x5a5a5a5a) -#endif -#endif - -#define OBD_IOC_DATA_TYPE long - -#define LUSTRE_FATAL_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | \ - sigmask(SIGTERM) | sigmask(SIGQUIT) | \ - sigmask(SIGALRM)) - -#ifdef __KERNEL__ -static inline sigset_t l_w_e_set_sigs(int sigs) -{ - sigset_t old; - unsigned long irqflags; - - SIGNAL_MASK_LOCK(current, irqflags); - old = current->blocked; - siginitsetinv(¤t->blocked, sigs); - RECALC_SIGPENDING; - SIGNAL_MASK_UNLOCK(current, irqflags); - - return old; -} -#endif - -#ifdef __KERNEL__ -/* initialize ost_lvb according to inode */ -static inline void inode_init_lvb(struct inode *inode, struct ost_lvb *lvb) -{ - lvb->lvb_size = i_size_read(inode); - lvb->lvb_blocks = inode->i_blocks; - lvb->lvb_mtime = LTIME_S(inode->i_mtime); - lvb->lvb_atime = LTIME_S(inode->i_atime); - lvb->lvb_ctime = LTIME_S(inode->i_ctime); -} -#else -/* defined in liblustre/llite_lib.h */ -#endif - -#endif /* _LUSTRE_LIB_H */ - diff --git a/lustre/include/linux/lustre_lite.h b/lustre/include/linux/lustre_lite.h deleted file mode 100644 index 7a63f2e8de..0000000000 --- a/lustre/include/linux/lustre_lite.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _LINUX_LL_H -#define _LINUX_LL_H - -#ifndef _LL_H -#error Do not #include this file directly. #include <lustre_lite.h> instead -#endif - -#ifdef __KERNEL__ - -#include <linux/version.h> - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -#include <asm/statfs.h> -#endif - -#include <linux/fs.h> -#include <linux/dcache.h> -#include <linux/proc_fs.h> - -#include <obd_class.h> -#include <lustre_net.h> -#include <lustre_mds.h> -#include <lustre_ha.h> - -#include <linux/rbtree.h> -#include <linux/lustre_compat25.h> -#include <linux/pagemap.h> - -/* lprocfs.c */ -enum { - LPROC_LL_DIRTY_HITS = 0, - LPROC_LL_DIRTY_MISSES, - LPROC_LL_WB_WRITEPAGE, - LPROC_LL_WB_PRESSURE, - LPROC_LL_WB_OK, - LPROC_LL_WB_FAIL, - LPROC_LL_READ_BYTES, - LPROC_LL_WRITE_BYTES, - LPROC_LL_BRW_READ, - LPROC_LL_BRW_WRITE, - LPROC_LL_IOCTL, - LPROC_LL_OPEN, - LPROC_LL_RELEASE, - LPROC_LL_MAP, - LPROC_LL_LLSEEK, - LPROC_LL_FSYNC, - LPROC_LL_SETATTR, - LPROC_LL_TRUNC, - LPROC_LL_FLOCK, - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - LPROC_LL_GETATTR, -#else - LPROC_LL_REVALIDATE, -#endif - LPROC_LL_STAFS, - LPROC_LL_ALLOC_INODE, - LPROC_LL_SETXATTR, - LPROC_LL_GETXATTR, - LPROC_LL_LISTXATTR, - LPROC_LL_REMOVEXATTR, - LPROC_LL_INODE_PERM, - LPROC_LL_DIRECT_READ, - LPROC_LL_DIRECT_WRITE, - LPROC_LL_LOCKLESS_READ, - LPROC_LL_LOCKLESS_WRITE, - LPROC_LL_FILE_OPCODES -}; - -#else -#include <lustre/lustre_idl.h> -#endif /* __KERNEL__ */ - -#endif diff --git a/lustre/include/linux/lustre_log.h b/lustre/include/linux/lustre_log.h deleted file mode 100644 index 65e1c51a4a..0000000000 --- a/lustre/include/linux/lustre_log.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <info@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Generic infrastructure for managing a collection of logs. - * - * These logs are used for: - * - * - orphan recovery: OST adds record on create - * - mtime/size consistency: the OST adds a record on first write - * - open/unlinked objects: OST adds a record on destroy - * - * - mds unlink log: the MDS adds an entry upon delete - * - * - raid1 replication log between OST's - * - MDS replication logs - */ - -#ifndef _LINUX_LUSTRE_LOG_H -#define _LINUX_LUSTRE_LOG_H - -#ifndef _LUSTRE_LOG_H -#error Do not #include this file directly. #include <lustre_log.h> instead -#endif - -#define LUSTRE_LOG_SERVER - -#endif diff --git a/lustre/include/linux/lustre_mds.h b/lustre/include/linux/lustre_mds.h deleted file mode 100644 index 00e5d2c0f4..0000000000 --- a/lustre/include/linux/lustre_mds.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * MDS data structures. - * See also lustre_idl.h for wire formats of requests. - */ - -#ifndef _LINUX_LUSTRE_MDS_H -#define _LINUX_LUSTRE_MDS_H - -#ifndef _LUSTRE_MDS_H -#error Do not #include this file directly. #include <lustre_mds.h> instead -#endif - -#ifdef __KERNEL__ -# include <linux/fs.h> -# include <linux/dcache.h> -# ifdef CONFIG_FS_POSIX_ACL -# ifdef HAVE_XATTR_ACL -# include <linux/xattr_acl.h> -# endif -# ifdef HAVE_LINUX_POSIX_ACL_XATTR_H -# include <linux/posix_acl_xattr.h> -# endif -# endif -# ifndef HAVE_VFS_INTENT_PATCHES -# include <linux/lustre_intent.h> -# endif -#endif - -struct ldlm_lock_desc; -struct mds_obd; -struct ptlrpc_connection; -struct ptlrpc_client; -struct obd_export; -struct ptlrpc_request; -struct obd_device; -struct ll_file_data; - -/* mds/handler.c */ -#ifdef __KERNEL__ -struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid, - struct vfsmount **mnt, int lock_mode, - struct lustre_handle *lockh, - char *name, int namelen, __u64 lockpart); -struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid, - struct vfsmount **mnt); -int mds_update_server_data(struct obd_device *, int force_sync); - -/* mds/mds_fs.c */ -int mds_fs_setup(struct obd_device *obddev, struct vfsmount *mnt); -int mds_fs_cleanup(struct obd_device *obddev); -#endif - -#endif diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h deleted file mode 100644 index 1d2f17e5c6..0000000000 --- a/lustre/include/linux/lustre_net.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _LINUX_LUSTRE_NET_H -#define _LINUX_LUSTRE_NET_H - -#ifndef _LUSTRE_NET_H -#error Do not #include this file directly. #include <lustre_net.h> instead -#endif - -#ifdef __KERNEL__ -#include <linux/version.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include <linux/tqueue.h> -#else -#include <linux/workqueue.h> -#endif -#endif - -/* XXX Liang: should be moved to other header instead of here */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) -#ifndef WITH_GROUP_INFO -#define WITH_GROUP_INFO -#endif -#endif - -#endif diff --git a/lustre/include/linux/lustre_patchless_compat.h b/lustre/include/linux/lustre_patchless_compat.h deleted file mode 100644 index afb599eff7..0000000000 --- a/lustre/include/linux/lustre_patchless_compat.h +++ /dev/null @@ -1,118 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef LUSTRE_PATCHLESS_COMPAT_H -#define LUSTRE_PATCHLESS_COMPAT_H - -#include <linux/lustre_version.h> -#include <linux/fs.h> - -#ifndef HAVE_TRUNCATE_COMPLETE_PAGE -#include <linux/list.h> -#include <linux/mm.h> -#include <linux/hash.h> - -/* XXX copy & paste from 2.6.15 kernel */ -static inline void ll_remove_from_page_cache(struct page *page) -{ - struct address_space *mapping = page->mapping; - - BUG_ON(!PageLocked(page)); - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) - write_lock_irq(&mapping->tree_lock); -#else - spin_lock_irq(&mapping->tree_lock); -#endif - radix_tree_delete(&mapping->page_tree, page->index); - page->mapping = NULL; - mapping->nrpages--; -#ifdef HAVE_NR_PAGECACHE - atomic_add(-1, &nr_pagecache); // XXX pagecache_acct(-1); -#else - __dec_zone_page_state(page, NR_FILE_PAGES); -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) - write_unlock_irq(&mapping->tree_lock); -#else - spin_unlock_irq(&mapping->tree_lock); -#endif -} - -static inline void -truncate_complete_page(struct address_space *mapping, struct page *page) -{ - if (page->mapping != mapping) - return; - - if (PagePrivate(page)) - page->mapping->a_ops->invalidatepage(page, 0); - -#ifdef HAVE_CANCEL_DIRTY_PAGE - cancel_dirty_page(page, PAGE_SIZE); -#else - clear_page_dirty(page); -#endif - ClearPageUptodate(page); - ClearPageMappedToDisk(page); - ll_remove_from_page_cache(page); - page_cache_release(page); /* pagecache ref */ -} -#endif /* HAVE_TRUNCATE_COMPLETE_PAGE */ - -#if !defined(HAVE_D_REHASH_COND) && !defined(HAVE___D_REHASH) -/* megahack */ -static inline void d_rehash_cond(struct dentry * entry, int lock) -{ - if (!lock) - spin_unlock(&dcache_lock); - - d_rehash(entry); - - if (!lock) - spin_lock(&dcache_lock); -} - -#define __d_rehash(dentry, lock) d_rehash_cond(dentry, lock) -#endif /* !HAVE_D_REHASH_COND && !HAVE___D_REHASH*/ - -#ifdef ATTR_OPEN -# define ATTR_FROM_OPEN ATTR_OPEN -#else -# ifndef ATTR_FROM_OPEN -# define ATTR_FROM_OPEN 0 -# endif -#endif /* ATTR_OPEN */ - -#ifndef ATTR_RAW -#define ATTR_RAW 0 -#endif - -#ifndef ATTR_CTIME_SET -/* - * set ATTR_CTIME_SET to a high value to avoid any risk of collision with other - * ATTR_* attributes (see bug 13828) - */ -#define ATTR_CTIME_SET (1 << 28) -#endif - -#endif /* LUSTRE_PATCHLESS_COMPAT_H */ diff --git a/lustre/include/linux/lustre_quota.h b/lustre/include/linux/lustre_quota.h deleted file mode 100644 index 248bd5d26d..0000000000 --- a/lustre/include/linux/lustre_quota.h +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ -#ifndef _LINUX_LUSTRE_QUOTA_H -#define _LINUX_LUSTRE_QUOTA_H - -#ifndef _LUSTRE_QUOTA_H -#error Do not #include this file directly. #include <lustre_quota.h> instead -#endif - -#ifdef __KERNEL__ -#include <linux/version.h> -#include <linux/fs.h> -#include <linux/quota.h> -#include <linux/quotaops.h> -#endif - -#endif /* _LUSTRE_QUOTA_H */ diff --git a/lustre/include/linux/lustre_types.h b/lustre/include/linux/lustre_types.h deleted file mode 100644 index 3aec53f66e..0000000000 --- a/lustre/include/linux/lustre_types.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _LUSTRE_LINUX_TYPES_H -#define _LUSTRE_LINUX_TYPES_H - -#ifdef HAVE_ASM_TYPES_H -#include <asm/types.h> -#endif - -#ifdef __KERNEL__ -# include <linux/types.h> -# include <linux/fs.h> /* to check for FMODE_EXEC, dev_t, lest we redefine */ -#else -#ifdef __CYGWIN__ -# include <sys/types.h> -#elif defined(_AIX) -# include <inttypes.h> -#else -# include <stdint.h> -#endif -#endif - -#if !defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \ - !defined(_EXT2_TYPES_H) && !defined(_I386_TYPES_H) && \ - !defined(_ASM_IA64_TYPES_H) && !defined(_X86_64_TYPES_H) && \ - !defined(_PPC_TYPES_H) && !defined(_PPC64_TYPES_H) && \ - !defined(_ASM_POWERPC_TYPES_H) && !defined(__mips64__) && \ - !defined(_CRAYNV_TYPES_H) - /* yuck, would be nicer with _ASM_TYPES_H */ - -typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#endif - -#endif diff --git a/lustre/include/linux/lustre_user.h b/lustre/include/linux/lustre_user.h deleted file mode 100644 index 1b7fb8aee2..0000000000 --- a/lustre/include/linux/lustre_user.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * Lustre public user-space interface definitions. - */ - -#ifndef _LINUX_LUSTRE_USER_H -#define _LINUX_LUSTRE_USER_H - -#ifdef HAVE_ASM_TYPES_H -#include <asm/types.h> -#else -#include <lustre/types.h> -#endif - - -#ifndef __KERNEL__ -# define NEED_QUOTA_DEFS -# ifdef HAVE_QUOTA_SUPPORT -# include <sys/quota.h> -# endif -#else -# include <linux/version.h> -# if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21) -# define NEED_QUOTA_DEFS -# endif -# ifdef HAVE_QUOTA_SUPPORT -# include <linux/quota.h> -# endif -#endif - -/* - * asm-x86_64/processor.h on some SLES 9 distros seems to use - * kernel-only typedefs. fortunately skipping it altogether is ok - * (for now). - */ -#define __ASM_X86_64_PROCESSOR_H - -#ifdef __KERNEL__ -#include <linux/string.h> -#else -#include <string.h> -#include <sys/stat.h> -#endif - -#if defined(__x86_64__) || defined(__ia64__) || defined(__ppc64__) || \ - defined(__craynv) || defined (__mips64__) -typedef struct stat lstat_t; -#define lstat_f lstat -#define HAVE_LOV_USER_MDS_DATA -#elif defined(__USE_LARGEFILE64) || defined(__KERNEL__) -typedef struct stat64 lstat_t; -#define lstat_f lstat64 -#define HAVE_LOV_USER_MDS_DATA -#endif - -#endif /* _LUSTRE_USER_H */ diff --git a/lustre/include/linux/lvfs.h b/lustre/include/linux/lvfs.h deleted file mode 100644 index 04829c5a33..0000000000 --- a/lustre/include/linux/lvfs.h +++ /dev/null @@ -1,139 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * lustre VFS/process permission interface - */ - -#ifndef __LINUX_LVFS_H__ -#define __LINUX_LVFS_H__ - -#ifndef __LVFS_H__ -#error Do not #include this file directly. #include <lvfs.h> instead -#endif - -#if defined __KERNEL__ -#include <linux/lustre_compat25.h> -#include <linux/lvfs_linux.h> -#else -struct group_info { /* unused */ }; -#endif - -#define LLOG_LVFS - -/* lvfs.c */ -int obd_alloc_fail(const void *ptr, const char *name, const char *type, - size_t size, const char *file, int line); - -/* simple.c */ - -struct lvfs_ucred { - struct upcall_cache_entry *luc_uce; - __u32 luc_fsuid; - __u32 luc_fsgid; - __u32 luc_cap; - __u32 luc_suppgid1; - __u32 luc_suppgid2; - __u32 luc_umask; -}; - -struct lvfs_callback_ops { - struct dentry *(*l_fid2dentry)(__u64 id_ino, __u32 gen, __u64 gr, void *data); -}; - -#define OBD_RUN_CTXT_MAGIC 0xC0FFEEAA -#define OBD_CTXT_DEBUG /* development-only debugging */ -struct lvfs_run_ctxt { - struct vfsmount *pwdmnt; - struct dentry *pwd; - mm_segment_t fs; - struct lvfs_ucred luc; - int ngroups; - struct lvfs_callback_ops cb_ops; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) - struct group_info *group_info; -#else - struct group_info group_info; -#endif -#ifdef OBD_CTXT_DEBUG - __u32 magic; -#endif -}; - -#ifdef OBD_CTXT_DEBUG -#define OBD_SET_CTXT_MAGIC(ctxt) (ctxt)->magic = OBD_RUN_CTXT_MAGIC -#else -#define OBD_SET_CTXT_MAGIC(ctxt) do {} while(0) -#endif - -#ifdef __KERNEL__ - -struct dentry *simple_mkdir(struct dentry *dir, char *name, int mode, int fix); -struct dentry *simple_mknod(struct dentry *dir, char *name, int mode, int fix); -int lustre_rename(struct dentry *dir, char *oldname, char *newname); -int lustre_fread(struct file *file, void *buf, int len, loff_t *off); -int lustre_fwrite(struct file *file, const void *buf, int len, loff_t *off); -int lustre_fsync(struct file *file); -long l_readdir(struct file * file, struct list_head *dentry_list); - -static inline void l_dput(struct dentry *de) -{ - if (!de || IS_ERR(de)) - return; - //shrink_dcache_parent(de); - LASSERT(atomic_read(&de->d_count) > 0); - dput(de); -} - -/* We need to hold the inode semaphore over the dcache lookup itself, or we - * run the risk of entering the filesystem lookup path concurrently on SMP - * systems, and instantiating two inodes for the same entry. We still - * protect against concurrent addition/removal races with the DLM locking. - */ -static inline struct dentry *ll_lookup_one_len(const char *fid_name, - struct dentry *dparent, - int fid_namelen) -{ - struct dentry *dchild; - - LOCK_INODE_MUTEX(dparent->d_inode); - dchild = lookup_one_len(fid_name, dparent, fid_namelen); - UNLOCK_INODE_MUTEX(dparent->d_inode); - - if (IS_ERR(dchild) || dchild->d_inode == NULL) - return dchild; - - if (is_bad_inode(dchild->d_inode)) { - CERROR("bad inode returned %lu/%u\n", - dchild->d_inode->i_ino, dchild->d_inode->i_generation); - dput(dchild); - dchild = ERR_PTR(-ENOENT); - } - return dchild; -} - -static inline void ll_sleep(int t) -{ - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(t * HZ); - set_current_state(TASK_RUNNING); -} -#endif - -#endif diff --git a/lustre/include/linux/lvfs_linux.h b/lustre/include/linux/lvfs_linux.h deleted file mode 100644 index c7b0f7d679..0000000000 --- a/lustre/include/linux/lvfs_linux.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ -#ifndef __LVFS_LINUX_H__ -#define __LVFS_LINUX_H__ - -#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/fs.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -#include <linux/namei.h> -#endif -#include <linux/sched.h> - -#include <lvfs.h> - -#define l_file file -#define l_dentry dentry -#define l_inode inode - -#define l_filp_open filp_open - -struct lvfs_run_ctxt; -struct l_file *l_dentry_open(struct lvfs_run_ctxt *, struct l_dentry *, - int flags); - -struct l_linux_dirent { - struct list_head lld_list; - ino_t lld_ino; - unsigned long lld_off; - char lld_name[LL_FID_NAMELEN]; -}; -struct l_readdir_callback { - struct l_linux_dirent *lrc_dirent; - struct list_head *lrc_list; -}; - -#define LVFS_DENTRY_PARAM_MAGIC 20070216UL -struct lvfs_dentry_params -{ - unsigned long ldp_inum; - void *ldp_ptr; - __u32 ldp_magic; -}; -#define LVFS_DENTRY_PARAMS_INIT { .ldp_magic = LVFS_DENTRY_PARAM_MAGIC } - -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# define BDEVNAME_DECLARE_STORAGE(foo) char foo[BDEVNAME_SIZE] -# define ll_bdevname(SB, STORAGE) __bdevname(kdev_t_to_nr(SB->s_dev), STORAGE) -# define lvfs_sbdev(SB) ((SB)->s_bdev) -# define lvfs_sbdev_type struct block_device * - int fsync_bdev(struct block_device *); -# define lvfs_sbdev_sync fsync_bdev -# else -# define BDEVNAME_DECLARE_STORAGE(foo) char __unused_##foo -# define ll_bdevname(SB,STORAGE) ((void)__unused_##STORAGE,bdevname(lvfs_sbdev(SB))) -# define lvfs_sbdev(SB) (kdev_t_to_nr((SB)->s_dev)) -# define lvfs_sbdev_type kdev_t -# define lvfs_sbdev_sync fsync_dev -# endif - -/* Instead of calling within lvfs (a layering violation) */ -#define lvfs_set_rdonly(obd, sb) \ - __lvfs_set_rdonly(lvfs_sbdev(sb), fsfilt_journal_sbdev(obd, sb)) - -void __lvfs_set_rdonly(lvfs_sbdev_type dev, lvfs_sbdev_type jdev); -int lvfs_check_rdonly(lvfs_sbdev_type dev); - -#endif /* __LVFS_LINUX_H__ */ diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h deleted file mode 100644 index 747bff2511..0000000000 --- a/lustre/include/linux/obd.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef __LINUX_OBD_H -#define __LINUX_OBD_H - -#ifndef __OBD_H -#error Do not #include this file directly. #include <obd.h> instead -#endif - -#ifdef __KERNEL__ -# include <linux/fs.h> -# include <linux/list.h> -# include <linux/sched.h> /* for struct task_struct, for current.h */ -# include <asm/current.h> /* for smp_lock.h */ -# include <linux/smp_lock.h> -# include <linux/proc_fs.h> -# include <linux/mount.h> -#endif - -typedef spinlock_t client_obd_lock_t; - -static inline void client_obd_list_lock_init(client_obd_lock_t *lock) -{ - spin_lock_init(lock); -} - -static inline void client_obd_list_lock_done(client_obd_lock_t *lock) -{} - -static inline void client_obd_list_lock(client_obd_lock_t *lock) -{ - spin_lock(lock); -} - -static inline void client_obd_list_unlock(client_obd_lock_t *lock) -{ - spin_unlock(lock); -} - -#if defined(__KERNEL__) && !defined(HAVE_ADLER) -/* zlib_adler() is an inline function defined in zutil.h */ -#define HAVE_ADLER -#endif -#endif /* __LINUX_OBD_H */ diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h deleted file mode 100644 index 75a77cd333..0000000000 --- a/lustre/include/linux/obd_class.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __LINUX_CLASS_OBD_H -#define __LINUX_CLASS_OBD_H - -#ifndef __CLASS_OBD_H -#error Do not #include this file directly. #include <obd_class.h> instead -#endif - -#ifndef __KERNEL__ -#include <sys/types.h> -#include <libcfs/list.h> -#else -#include <asm/uaccess.h> -#include <linux/types.h> -#include <linux/fs.h> -#include <linux/time.h> -#include <linux/timer.h> -#endif - -void obd_zombie_impexp_init(void); -void obd_zombie_impexp_cull(void); -extern void (*obd_zombie_impexp_notify)(void); - -/* obdo.c */ -#ifdef __KERNEL__ -void obdo_from_iattr(struct obdo *oa, struct iattr *attr, unsigned ia_valid); -void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid); -void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid); -void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid); -void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid); -#endif - -#if !defined(__KERNEL__) || (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#define to_kdev_t(dev) dev -#define kdev_t_to_nr(dev) dev -#endif - -#endif /* __LINUX_OBD_CLASS_H */ diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h deleted file mode 100644 index a2201d382a..0000000000 --- a/lustre/include/linux/obd_support.h +++ /dev/null @@ -1,182 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001, 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _LINUX_OBD_SUPPORT -#define _LINUX_OBD_SUPPORT - -#ifndef _OBD_SUPPORT -#error Do not #include this file directly. #include <obd_support.h> instead -#endif - -#ifdef __KERNEL__ -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/autoconf.h> -#include <linux/slab.h> -#include <linux/highmem.h> -#endif -#include <libcfs/kp30.h> -#include <linux/lustre_compat25.h> -#include <lustre/lustre_idl.h> - -/* Prefer the kernel's version, if it exports it, because it might be - * optimized for this CPU. */ -#if defined(__KERNEL__) && (defined(CONFIG_CRC32) || defined(CONFIG_CRC32_MODULE)) -# include <linux/crc32.h> -#else -/* crc32_le lifted from the Linux kernel, which had the following to say: - * - * This code is in the public domain; copyright abandoned. - * Liability for non-performance of this code is limited to the amount - * you paid for it. Since it is distributed for free, your refund will - * be very very small. If it breaks, you get to keep both pieces. - */ -#define CRCPOLY_LE 0xedb88320 -/** - * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32 - * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for - * other uses, or the previous crc32 value if computing incrementally. - * @p - pointer to buffer over which CRC is run - * @len - length of buffer @p - */ -static inline __u32 crc32_le(__u32 crc, unsigned char const *p, size_t len) -{ - int i; - while (len--) { - crc ^= *p++; - for (i = 0; i < 8; i++) - crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); - } - return crc; -} -#endif - -#ifdef __KERNEL__ -# include <linux/zutil.h> -# ifndef HAVE_ADLER -# define HAVE_ADLER -# endif -#else /* ! __KERNEL__ */ -# ifdef HAVE_ADLER -# include <zlib.h> - -static inline __u32 zlib_adler32(__u32 adler, unsigned char const *p, - size_t len) -{ - return adler32(adler, p, len); -} -# endif -#endif /* __KERNEL__ */ - -static inline __u32 init_checksum(cksum_type_t cksum_type) -{ - switch(cksum_type) { - case OBD_CKSUM_CRC32: - return ~0U; -#ifdef HAVE_ADLER - case OBD_CKSUM_ADLER: - return 1U; -#endif - default: - CERROR("Unknown checksum type (%x)!!!\n", cksum_type); - LBUG(); - } - return 0; -} - -static inline __u32 compute_checksum(__u32 cksum, unsigned char const *p, - size_t len, cksum_type_t cksum_type) -{ - switch(cksum_type) { - case OBD_CKSUM_CRC32: - return crc32_le(cksum, p, len); -#ifdef HAVE_ADLER - case OBD_CKSUM_ADLER: - return zlib_adler32(cksum, p, len); -#endif - default: - CERROR("Unknown checksum type (%x)!!!\n", cksum_type); - LBUG(); - } - return 0; -} - -static inline obd_flag cksum_type_pack(cksum_type_t cksum_type) -{ - switch(cksum_type) { - case OBD_CKSUM_CRC32: - return OBD_FL_CKSUM_CRC32; -#ifdef HAVE_ADLER - case OBD_CKSUM_ADLER: - return OBD_FL_CKSUM_ADLER; -#endif - default: - CWARN("unknown cksum type %x\n", cksum_type); - } - return OBD_FL_CKSUM_CRC32; -} - -static inline cksum_type_t cksum_type_unpack(obd_flag o_flags) -{ - o_flags &= OBD_FL_CKSUM_ALL; - if ((o_flags - 1) & o_flags) - CWARN("several checksum types are set: %x\n", o_flags); - if (o_flags & OBD_FL_CKSUM_ADLER) -#ifdef HAVE_ADLER - return OBD_CKSUM_ADLER; -#else - CWARN("checksum type is set to adler32, but adler32 is not " - "supported (%x)\n", o_flags); -#endif - return OBD_CKSUM_CRC32; -} - -#ifdef __KERNEL__ -# include <linux/types.h> -# include <linux/blkdev.h> -# include <lvfs.h> - -#define OBD_FAIL_WRITE(obd, id, sb) \ -{ \ - if (OBD_FAIL_CHECK(id)) { \ - BDEVNAME_DECLARE_STORAGE(tmp); \ - CERROR("obd_fail_loc=%x, fail write operation on %s\n", \ - id, ll_bdevname(sb, tmp)); \ - lvfs_set_rdonly(obd, sb); \ - /* We set FAIL_ONCE because we never "un-fail" a device */ \ - obd_fail_loc |= OBD_FAILED | OBD_FAIL_ONCE; \ - } \ -} - -#define OBD_SLEEP_ON(wq, state) wait_event_interruptible(wq, state) - - -#else /* !__KERNEL__ */ -# define LTIME_S(time) (time) -/* for obd_class.h */ -# ifndef ERR_PTR -# define ERR_PTR(a) ((void *)(a)) -# endif -#endif /* __KERNEL__ */ - -#endif diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h deleted file mode 100644 index cceec77bf2..0000000000 --- a/lustre/include/lprocfs_status.h +++ /dev/null @@ -1,716 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Top level header file for LProc SNMP - * Author: Hariharan Thantry thantry@users.sourceforge.net - */ -#ifndef _LPROCFS_SNMP_H -#define _LPROCFS_SNMP_H - -#include <lustre/lustre_idl.h> -#if defined(__linux__) -#include <linux/lprocfs_status.h> -#elif defined(__APPLE__) -#include <darwin/lprocfs_status.h> -#elif defined(__WINNT__) -#include <winnt/lprocfs_status.h> -#else -#error Unsupported operating system. -#endif - -#undef LPROCFS -#if (defined(__KERNEL__) && defined(CONFIG_PROC_FS)) -# define LPROCFS -#endif - -struct lprocfs_vars { - const char *name; - cfs_read_proc_t *read_fptr; - cfs_write_proc_t *write_fptr; - void *data; - struct file_operations *fops; -}; - -struct lprocfs_static_vars { - struct lprocfs_vars *module_vars; - struct lprocfs_vars *obd_vars; -}; - -/* if we find more consumers this could be generalized */ -#define OBD_HIST_MAX 32 -struct obd_histogram { - spinlock_t oh_lock; - unsigned long oh_buckets[OBD_HIST_MAX]; -}; - -enum { - BRW_R_PAGES = 0, - BRW_W_PAGES, - BRW_R_RPC_HIST, - BRW_W_RPC_HIST, - BRW_R_IO_TIME, - BRW_W_IO_TIME, - BRW_R_DISCONT_PAGES, - BRW_W_DISCONT_PAGES, - BRW_R_DISCONT_BLOCKS, - BRW_W_DISCONT_BLOCKS, - BRW_R_DISK_IOSIZE, - BRW_W_DISK_IOSIZE, - BRW_R_DIO_FRAGS, - BRW_W_DIO_FRAGS, - BRW_LAST, -}; - -struct brw_stats { - struct obd_histogram hist[BRW_LAST]; -}; - - -/* An lprocfs counter can be configured using the enum bit masks below. - * - * LPROCFS_CNTR_EXTERNALLOCK indicates that an external lock already - * protects this counter from concurrent updates. If not specified, - * lprocfs an internal per-counter lock variable. External locks are - * not used to protect counter increments, but are used to protect - * counter readout and resets. - * - * LPROCFS_CNTR_AVGMINMAX indicates a multi-valued counter samples, - * (i.e. counter can be incremented by more than "1"). When specified, - * the counter maintains min, max and sum in addition to a simple - * invocation count. This allows averages to be be computed. - * If not specified, the counter is an increment-by-1 counter. - * min, max, sum, etc. are not maintained. - * - * LPROCFS_CNTR_STDDEV indicates that the counter should track sum of - * squares (for multi-valued counter samples only). This allows - * external computation of standard deviation, but involves a 64-bit - * multiply per counter increment. - */ - -enum { - LPROCFS_CNTR_EXTERNALLOCK = 0x0001, - LPROCFS_CNTR_AVGMINMAX = 0x0002, - LPROCFS_CNTR_STDDEV = 0x0004, - - /* counter data type */ - LPROCFS_TYPE_REGS = 0x0100, - LPROCFS_TYPE_BYTES = 0x0200, - LPROCFS_TYPE_PAGES = 0x0400, - LPROCFS_TYPE_CYCLE = 0x0800, -}; - -struct lprocfs_atomic { - atomic_t la_entry; - atomic_t la_exit; -}; - -#define LC_MIN_INIT ((~(__u64)0) >> 1) - -struct lprocfs_counter { - struct lprocfs_atomic lc_cntl; /* may need to move to per set */ - unsigned int lc_config; - __s64 lc_count; - __s64 lc_sum; - __s64 lc_min; - __s64 lc_max; - __s64 lc_sumsquare; - const char *lc_name; /* must be static */ - const char *lc_units; /* must be static */ -}; - -struct lprocfs_percpu { - struct lprocfs_counter lp_cntr[0]; -}; - -#define LPROCFS_GET_NUM_CPU 0x0001 -#define LPROCFS_GET_SMP_ID 0x0002 - -enum lprocfs_stats_flags { - LPROCFS_STATS_FLAG_PERCPU = 0x0000, /* per cpu counter */ - LPROCFS_STATS_FLAG_NOPERCPU = 0x0001, /* stats have no percpu - * area and need locking */ -}; - -enum lprocfs_fields_flags { - LPROCFS_FIELDS_FLAGS_CONFIG = 0x0001, - LPROCFS_FIELDS_FLAGS_SUM = 0x0002, - LPROCFS_FIELDS_FLAGS_MIN = 0x0003, - LPROCFS_FIELDS_FLAGS_MAX = 0x0004, - LPROCFS_FIELDS_FLAGS_AVG = 0x0005, - LPROCFS_FIELDS_FLAGS_SUMSQUARE = 0x0006, - LPROCFS_FIELDS_FLAGS_COUNT = 0x0007, -}; - -struct lprocfs_stats { - unsigned int ls_num; /* # of counters */ - unsigned int ls_percpu_size; - int ls_flags; /* See LPROCFS_STATS_FLAG_* */ - spinlock_t ls_lock; /* Lock used only when there are - * no percpu stats areas */ - struct lprocfs_percpu *ls_percpu[0]; -}; - -static inline int opcode_offset(__u32 opc) { - if (opc < OST_LAST_OPC) { - /* OST opcode */ - return (opc - OST_FIRST_OPC); - } else if (opc < MDS_LAST_OPC) { - /* MDS opcode */ - return (opc - MDS_FIRST_OPC + - (OST_LAST_OPC - OST_FIRST_OPC)); - } else if (opc < LDLM_LAST_OPC) { - /* LDLM Opcode */ - return (opc - LDLM_FIRST_OPC + - (MDS_LAST_OPC - MDS_FIRST_OPC) + - (OST_LAST_OPC - OST_FIRST_OPC)); - } else if (opc < MGS_LAST_OPC) { - /* MGS Opcode */ - return (opc - MGS_FIRST_OPC + - (LDLM_LAST_OPC - LDLM_FIRST_OPC) + - (MDS_LAST_OPC - MDS_FIRST_OPC) + - (OST_LAST_OPC - OST_FIRST_OPC)); - } else if (opc < OBD_LAST_OPC) { - /* OBD Ping */ - return (opc - OBD_FIRST_OPC + - (MGS_LAST_OPC - MGS_FIRST_OPC) + - (LDLM_LAST_OPC - LDLM_FIRST_OPC) + - (MDS_LAST_OPC - MDS_FIRST_OPC) + - (OST_LAST_OPC - OST_FIRST_OPC)); - } else if (opc < LLOG_LAST_OPC) { - /* LLOG Opcode */ - return (opc - LLOG_FIRST_OPC + - (OBD_LAST_OPC - OBD_FIRST_OPC) + - (MGS_LAST_OPC - MGS_FIRST_OPC) + - (LDLM_LAST_OPC - LDLM_FIRST_OPC) + - (MDS_LAST_OPC - MDS_FIRST_OPC) + - (OST_LAST_OPC - OST_FIRST_OPC)); - } else { - /* Unknown Opcode */ - return -1; - } -} - -#define LUSTRE_MAX_OPCODES ((OST_LAST_OPC - OST_FIRST_OPC) + \ - (MDS_LAST_OPC - MDS_FIRST_OPC) + \ - (LDLM_LAST_OPC - LDLM_FIRST_OPC) + \ - (MGS_LAST_OPC - MGS_FIRST_OPC) + \ - (OBD_LAST_OPC - OBD_FIRST_OPC) + \ - (LLOG_LAST_OPC - LLOG_FIRST_OPC)) - -#define EXTRA_MAX_OPCODES ((PTLRPC_LAST_CNTR - PTLRPC_FIRST_CNTR) + \ - (EXTRA_LAST_OPC - EXTRA_FIRST_OPC)) - -enum { - PTLRPC_REQWAIT_CNTR = 0, - PTLRPC_REQQDEPTH_CNTR, - PTLRPC_REQACTIVE_CNTR, - PTLRPC_TIMEOUT, - PTLRPC_REQBUF_AVAIL_CNTR, - PTLRPC_LAST_CNTR -}; - -#define PTLRPC_FIRST_CNTR PTLRPC_REQWAIT_CNTR - -enum { - LDLM_GLIMPSE_ENQUEUE = 0, - LDLM_PLAIN_ENQUEUE, - LDLM_EXTENT_ENQUEUE, - LDLM_FLOCK_ENQUEUE, - LDLM_IBITS_ENQUEUE, - MDS_REINT_CREATE, - MDS_REINT_LINK, - MDS_REINT_OPEN, - MDS_REINT_SETATTR, - MDS_REINT_RENAME, - MDS_REINT_UNLINK, - EXTRA_LAST_OPC -}; - -#define EXTRA_FIRST_OPC LDLM_GLIMPSE_ENQUEUE -/* class_obd.c */ -extern cfs_proc_dir_entry_t *proc_lustre_root; - -struct obd_device; -struct file; -struct obd_histogram; - -/* Days / hours / mins / seconds format */ -struct dhms { - int d,h,m,s; -}; -static inline void s2dhms(struct dhms *ts, time_t secs) -{ - ts->d = secs / 86400; - secs = secs % 86400; - ts->h = secs / 3600; - secs = secs % 3600; - ts->m = secs / 60; - ts->s = secs % 60; -} -#define DHMS_FMT "%dd%dh%02dm%02ds" -#define DHMS_VARS(x) (x)->d, (x)->h, (x)->m, (x)->s - - -#ifdef LPROCFS - -static inline int lprocfs_stats_lock(struct lprocfs_stats *stats, int type) -{ - int rc = 0; - - if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) { - if (type & LPROCFS_GET_NUM_CPU) - rc = 1; - if (type & LPROCFS_GET_SMP_ID) - rc = 0; - spin_lock(&stats->ls_lock); - } else { - if (type & LPROCFS_GET_NUM_CPU) - rc = num_possible_cpus(); - if (type & LPROCFS_GET_SMP_ID) - rc = smp_processor_id(); - } - return rc; -} - -static inline void lprocfs_stats_unlock(struct lprocfs_stats *stats) -{ - if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) - spin_unlock(&stats->ls_lock); -} - -/* Two optimized LPROCFS counter increment functions are provided: - * lprocfs_counter_incr(cntr, value) - optimized for by-one counters - * lprocfs_counter_add(cntr) - use for multi-valued counters - * Counter data layout allows config flag, counter lock and the - * count itself to reside within a single cache line. - */ - -extern void lprocfs_counter_add(struct lprocfs_stats *stats, int idx, - long amount); -extern void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx, - long amount); - -#define lprocfs_counter_incr(stats, idx) \ - lprocfs_counter_add(stats, idx, 1) -#define lprocfs_counter_decr(stats, idx) \ - lprocfs_counter_sub(stats, idx, 1) - -extern __s64 lprocfs_read_helper(struct lprocfs_counter *lc, - enum lprocfs_fields_flags field); - -static inline __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, - int idx, - enum lprocfs_fields_flags field) -{ - __u64 ret = 0; - int i; - - LASSERT(stats != NULL); - for (i = 0; i < num_possible_cpus(); i++) - ret += lprocfs_read_helper(&(stats->ls_percpu[i]->lp_cntr[idx]), - field); - return ret; -} - -extern struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num, - enum lprocfs_stats_flags flags); -extern void lprocfs_clear_stats(struct lprocfs_stats *stats); -extern void lprocfs_free_stats(struct lprocfs_stats **stats); -extern void lprocfs_init_ops_stats(int num_private_stats, - struct lprocfs_stats *stats); -extern int lprocfs_alloc_obd_stats(struct obd_device *obddev, - unsigned int num_private_stats); -extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index, - unsigned conf, const char *name, - const char *units); -extern void lprocfs_free_obd_stats(struct obd_device *obddev); -struct obd_export; -extern int lprocfs_add_clear_entry(struct obd_device * obd, - cfs_proc_dir_entry_t *entry); -extern int lprocfs_exp_setup(struct obd_export *exp, - lnet_nid_t peer_nid, int *newnid); -extern int lprocfs_exp_cleanup(struct obd_export *exp); -extern int lprocfs_add_simple(struct proc_dir_entry *root, - char *name, read_proc_t *read_proc, - write_proc_t *write_proc, void *data); -extern int lprocfs_register_stats(cfs_proc_dir_entry_t *root, const char *name, - struct lprocfs_stats *stats); - -/* lprocfs_status.c */ -extern int lprocfs_add_vars(cfs_proc_dir_entry_t *root, - struct lprocfs_vars *var, - void *data); - -extern cfs_proc_dir_entry_t *lprocfs_register(const char *name, - cfs_proc_dir_entry_t *parent, - struct lprocfs_vars *list, - void *data); - -extern void lprocfs_remove(cfs_proc_dir_entry_t **root); - -extern cfs_proc_dir_entry_t *lprocfs_srch(cfs_proc_dir_entry_t *root, - const char *name); - -extern int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list); -extern int lprocfs_obd_cleanup(struct obd_device *obd); -extern int lprocfs_add_simple(struct proc_dir_entry *root, char *name, - read_proc_t *read_proc, write_proc_t *write_proc, - void *data); -struct nid_stat; -extern void lprocfs_free_per_client_stats(struct obd_device *obd); -extern int lprocfs_nid_stats_clear_write(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_nid_stats_clear_read(char *page, char **start, off_t off, - int count, int *eof, void *data); - - -extern struct file_operations lprocfs_evict_client_fops; - -extern int lprocfs_seq_create(cfs_proc_dir_entry_t *parent, char *name, - mode_t mode, struct file_operations *seq_fops, - void *data); -extern int lprocfs_obd_seq_create(struct obd_device *dev, char *name, - mode_t mode, struct file_operations *seq_fops, - void *data); - -/* Generic callbacks */ - -extern int lprocfs_rd_u64(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_atomic(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_wr_atomic(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_rd_uint(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_wr_uint(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_rd_uuid(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_name(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_fstype(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_server_uuid(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_conn_uuid(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_connect_flags(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_num_exports(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_numrefs(char *page, char **start, off_t off, - int count, int *eof, void *data); -struct adaptive_timeout; -extern int lprocfs_at_hist_helper(char *page, int count, int rc, - struct adaptive_timeout *at); -extern int lprocfs_rd_timeouts(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_wr_timeouts(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_wr_evict_client(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_wr_ping(struct file *file, const char *buffer, - unsigned long count, void *data); - -/* Statfs helpers */ -extern int lprocfs_rd_blksize(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_kbytestotal(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_kbytesfree(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_kbytesavail(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_filestotal(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_filesfree(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_rd_filegroups(char *page, char **start, off_t off, - int count, int *eof, void *data); - -extern int lprocfs_write_helper(const char *buffer, unsigned long count, - int *val); -extern int lprocfs_write_frac_helper(const char *buffer, unsigned long count, - int *val, int mult); -extern int lprocfs_read_frac_helper(char *buffer, unsigned long count, - long val, int mult); -extern int lprocfs_write_u64_helper(const char *buffer, unsigned long count, - __u64 *val); -extern int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count, - __u64 *val, int mult); -void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value); -void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value); -void lprocfs_oh_clear(struct obd_histogram *oh); -unsigned long lprocfs_oh_sum(struct obd_histogram *oh); - -/* lprocfs_status.c: counter read/write functions */ -extern int lprocfs_counter_read(char *page, char **start, off_t off, - int count, int *eof, void *data); -extern int lprocfs_counter_write(struct file *file, const char *buffer, - unsigned long count, void *data); - -/* lprocfs_status.c: recovery status */ -int lprocfs_obd_rd_recovery_status(char *page, char **start, off_t off, - int count, int *eof, void *data); - -extern int lprocfs_seq_release(struct inode *, struct file *); - -/* in lprocfs_stat.c, to protect the private data for proc entries */ -extern struct rw_semaphore _lprocfs_lock; -#define LPROCFS_ENTRY() do { \ - down_read(&_lprocfs_lock); \ -} while(0) -#define LPROCFS_EXIT() do { \ - up_read(&_lprocfs_lock); \ -} while(0) -#define LPROCFS_ENTRY_AND_CHECK(dp) do { \ - typecheck(struct proc_dir_entry *, dp); \ - LPROCFS_ENTRY(); \ - if ((dp)->deleted) { \ - LPROCFS_EXIT(); \ - return -ENODEV; \ - } \ -} while(0) - -/* You must use these macros when you want to refer to - * the import in a client obd_device for a lprocfs entry */ -#define LPROCFS_CLIMP_CHECK(obd) do { \ - typecheck(struct obd_device *, obd); \ - mutex_down(&(obd)->u.cli.cl_sem); \ - if ((obd)->u.cli.cl_import == NULL) { \ - mutex_up(&(obd)->u.cli.cl_sem); \ - return -ENODEV; \ - } \ -} while(0) -#define LPROCFS_CLIMP_EXIT(obd) \ - mutex_up(&(obd)->u.cli.cl_sem); - - -/* write the name##_seq_show function, call LPROC_SEQ_FOPS_RO for read-only - proc entries; otherwise, you will define name##_seq_write function also for - a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally, - call lprocfs_obd_seq_create(obd, filename, 0444, &name#_fops, data); */ -#define __LPROC_SEQ_FOPS(name, custom_seq_write) \ -static int name##_seq_open(struct inode *inode, struct file *file) { \ - struct proc_dir_entry *dp = PDE(inode); \ - int rc; \ - LPROCFS_ENTRY_AND_CHECK(dp); \ - rc = single_open(file, name##_seq_show, dp->data); \ - if (rc) { \ - LPROCFS_EXIT(); \ - return rc; \ - } \ - return 0; \ -} \ -struct file_operations name##_fops = { \ - .owner = THIS_MODULE, \ - .open = name##_seq_open, \ - .read = seq_read, \ - .write = custom_seq_write, \ - .llseek = seq_lseek, \ - .release = lprocfs_seq_release, \ -} - -#define LPROC_SEQ_FOPS_RO(name) __LPROC_SEQ_FOPS(name, NULL) -#define LPROC_SEQ_FOPS(name) __LPROC_SEQ_FOPS(name, name##_seq_write) - -/* lproc_ptlrpc.c */ -struct ptlrpc_request; -extern void target_print_req(void *seq_file, struct ptlrpc_request *req); - -#ifdef CRAY_XT3 -/* lprocfs_status.c: read recovery max time bz13079 */ -int lprocfs_obd_rd_recovery_maxtime(char *page, char **start, off_t off, - int count, int *eof, void *data); - -/* lprocfs_status.c: write recovery max time bz13079 */ -int lprocfs_obd_wr_recovery_maxtime(struct file *file, const char *buffer, - unsigned long count, void *data); -#endif - -#else -/* LPROCFS is not defined */ -static inline void lprocfs_counter_add(struct lprocfs_stats *stats, - int index, long amount) { return; } -static inline void lprocfs_counter_incr(struct lprocfs_stats *stats, - int index) { return; } -static inline void lprocfs_counter_sub(struct lprocfs_stats *stats, - int index, long amount) { return; } -static inline void lprocfs_counter_init(struct lprocfs_stats *stats, - int index, unsigned conf, - const char *name, const char *units) -{ return; } - -static inline __u64 lc_read_helper(struct lprocfs_counter *lc, - enum lprocfs_fields_flags field) -{ return 0; } - -static inline struct lprocfs_stats* lprocfs_alloc_stats(unsigned int num, - enum lprocfs_stats_flags flags) -{ return NULL; } -static inline void lprocfs_clear_stats(struct lprocfs_stats *stats) -{ return; } -static inline void lprocfs_free_stats(struct lprocfs_stats **stats) -{ return; } -static inline int lprocfs_register_stats(cfs_proc_dir_entry_t *root, - const char *name, - struct lprocfs_stats *stats) -{ return 0; } -static inline void lprocfs_init_ops_stats(int num_private_stats, - struct lprocfs_stats *stats) -{ return; } -static inline int lprocfs_alloc_obd_stats(struct obd_device *obddev, - unsigned int num_private_stats) -{ return 0; } -static inline void lprocfs_free_obd_stats(struct obd_device *obddev) -{ return; } - -struct obd_export; -static inline int lprocfs_add_clear_entry(struct obd_export *exp) -{ return 0; } -static inline int lprocfs_exp_setup(struct obd_export *exp) -{ return 0; } -static inline int lprocfs_exp_cleanup(struct obd_export *exp) -{ return 0; } -static inline int lprocfs_add_simple(struct proc_dir_entry *root, - char *name, - read_proc_t *read_proc, - write_proc_t *write_proc, - void *data) -{return 0; } -struct nid_stat; -static inline void lprocfs_free_per_client_stats(struct obd_device *obd) -{} -static inline -int lprocfs_nid_stats_clear_write(struct file *file, const char *buffer, - unsigned long count, void *data) -{return count;} -static inline -int lprocfs_nid_stats_clear_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{return count;} - - -static inline cfs_proc_dir_entry_t * -lprocfs_register(const char *name, cfs_proc_dir_entry_t *parent, - struct lprocfs_vars *list, void *data) { return NULL; } -static inline int lprocfs_add_vars(cfs_proc_dir_entry_t *root, - struct lprocfs_vars *var, - void *data) { return 0; } -static inline void lprocfs_remove(cfs_proc_dir_entry_t **root) {}; -static inline cfs_proc_dir_entry_t *lprocfs_srch(cfs_proc_dir_entry_t *head, - const char *name) {return 0;} -static inline int lprocfs_obd_setup(struct obd_device *dev, - struct lprocfs_vars *list) { return 0; } -static inline int lprocfs_obd_cleanup(struct obd_device *dev) { return 0; } -static inline int lprocfs_rd_u64(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline int lprocfs_rd_uuid(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline int lprocfs_rd_name(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline int lprocfs_rd_server_uuid(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ return 0; } -static inline int lprocfs_rd_conn_uuid(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ return 0; } -static inline int lprocfs_rd_connect_flags(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ return 0; } -static inline int lprocfs_rd_num_exports(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ return 0; } -static inline int lprocfs_rd_numrefs(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ return 0; } -struct adaptive_timeout; -static inline int lprocfs_at_hist_helper(char *page, int count, int rc, - struct adaptive_timeout *at) -{ return 0; } -static inline int lprocfs_rd_timeouts(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ return 0; } -static inline int lprocfs_wr_timeouts(struct file *file, const char *buffer, - unsigned long count, void *data) -{ return 0; } -static inline int lprocfs_wr_evict_client(struct file *file, const char *buffer, - unsigned long count, void *data) -{ return 0; } -static inline int lprocfs_wr_ping(struct file *file, const char *buffer, - unsigned long count, void *data) -{ return 0; } - - -/* Statfs helpers */ -static inline -int lprocfs_rd_blksize(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline -int lprocfs_rd_kbytestotal(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline -int lprocfs_rd_kbytesfree(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline -int lprocfs_rd_kbytesavail(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline -int lprocfs_rd_filestotal(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline -int lprocfs_rd_filesfree(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline -int lprocfs_rd_filegroups(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline -void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value) {} -static inline -void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value) {} -static inline -void lprocfs_oh_clear(struct obd_histogram *oh) {} -static inline -unsigned long lprocfs_oh_sum(struct obd_histogram *oh) { return 0; } -static inline -int lprocfs_counter_read(char *page, char **start, off_t off, - int count, int *eof, void *data) { return 0; } -static inline -int lprocfs_counter_write(struct file *file, const char *buffer, - unsigned long count, void *data) { return 0; } - -static inline -__u64 lprocfs_stats_collector(struct lprocfs_stats *stats, int idx, - enum lprocfs_fields_flags field) -{ return (__u64)0; } - -#define LPROCFS_ENTRY() -#define LPROCFS_EXIT() -#define LPROCFS_ENTRY_AND_CHECK(dp) -#define LPROC_SEQ_FOPS_RO(name) -#define LPROC_SEQ_FOPS(name) - -/* lproc_ptlrpc.c */ -#define target_print_req NULL - -#endif /* LPROCFS */ - -#endif /* LPROCFS_SNMP_H */ diff --git a/lustre/include/lustre/.cvsignore b/lustre/include/lustre/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/lustre/include/lustre/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/lustre/include/lustre/Makefile.am b/lustre/include/lustre/Makefile.am deleted file mode 100644 index 0acd90fc2a..0000000000 --- a/lustre/include/lustre/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -if UTILS -pkginclude_HEADERS = lustre_idl.h lustre_user.h liblustreapi.h types.h -endif - -EXTRA_DIST = lustre_idl.h lustre_user.h liblustreapi.h types.h diff --git a/lustre/include/lustre/liblustreapi.h b/lustre/include/lustre/liblustreapi.h deleted file mode 100644 index 4d6c802ae3..0000000000 --- a/lustre/include/lustre/liblustreapi.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - */ -#ifndef _LIBLUSTREAPI_H_ -#define _LIBLUSTREAPI_H_ - -#include <lustre/lustre_user.h> - -/* Initially allocate for these many OSTs, realloc if needed */ -#define INIT_ALLOC_NUM_OSTS 1024 - -/* Maximum number of osts that can be specified to lfs find */ -#define FIND_MAX_OSTS 1024 - -typedef void (*llapi_cb_t)(char *obd_type_name, char *obd_name, char *obd_uuid, void *args); - -/* liblustreapi message severity level */ -enum llapi_message_level { - LLAPI_MSG_OFF = 0, - LLAPI_MSG_FATAL = 1, - LLAPI_MSG_ERROR = 2, - LLAPI_MSG_WARN = 3, - LLAPI_MSG_NORMAL = 4, - LLAPI_MSG_INFO = 5, - LLAPI_MSG_DEBUG = 6, - LLAPI_MSG_MAX -}; - -/* the bottom three bits reserved for llapi_message_level */ -#define LLAPI_MSG_MASK 0x00000007 -#define LLAPI_MSG_NO_ERRNO 0x00000010 - -/* liblustreapi.c */ -extern void llapi_msg_set_level(int level); -extern void llapi_err(int level, char *fmt, ...); -extern void llapi_printf(int level, char *fmt, ...); -extern int llapi_file_create(const char *name, unsigned long stripe_size, - int stripe_offset, int stripe_count, - int stripe_pattern); -extern int llapi_file_open(const char *name, int flags, int mode, - unsigned long stripe_size, int stripe_offset, - int stripe_count, int stripe_pattern); -extern int llapi_file_get_stripe(const char *path, struct lov_user_md *lum); -#define HAVE_LLAPI_FILE_LOOKUP -extern int llapi_file_lookup(int dirfd, const char *name); - -struct find_param { - unsigned int maxdepth; - time_t atime; - time_t mtime; - time_t ctime; - int asign; - int csign; - int msign; - int type; - unsigned long long size; - int size_sign; - unsigned long long size_units; - int size_check; - - unsigned long zeroend:1, - recursive:1, - got_uuids:1, - obds_printed:1, - exclude_pattern:1, - exclude_type:1, - have_fileinfo:1; - - int verbose; - int quiet; - - /* regular expression */ - char *pattern; - - char *print_fmt; - - struct obd_uuid *obduuid; - int num_obds; - int num_alloc_obds; - int obdindex; - int *obdindexes; - - int lumlen; - struct lov_user_mds_data *lmd; - - /* In-precess parameters. */ - unsigned int depth; - dev_t st_dev; -}; - -extern int llapi_getstripe(char *path, struct find_param *param); -extern int llapi_find(char *path, struct find_param *param); - -extern int llapi_obd_statfs(char *path, __u32 type, __u32 index, - struct obd_statfs *stat_buf, - struct obd_uuid *uuid_buf); -extern int llapi_ping(char *obd_type, char *obd_name); -extern int llapi_target_check(int num_types, char **obd_types, char *dir); -extern int llapi_catinfo(char *dir, char *keyword, char *node_name); -extern int llapi_lov_get_uuids(int fd, struct obd_uuid *uuidp, int *ost_count); -extern int llapi_is_lustre_mnttype(const char *type); -extern int parse_size(char *optarg, unsigned long long *size, - unsigned long long *size_units); -struct mntent; -#define HAVE_LLAPI_IS_LUSTRE_MNT -extern int llapi_is_lustre_mnt(struct mntent *mnt); -extern int llapi_quotachown(char *path, int flag); -extern int llapi_quotacheck(char *mnt, int check_type); -extern int llapi_poll_quotacheck(char *mnt, struct if_quotacheck *qchk); -extern int llapi_quotactl(char *mnt, struct if_quotactl *qctl); -extern int llapi_target_iterate(int type_num, char **obd_type, void *args, llapi_cb_t cb); -#endif diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h deleted file mode 100644 index 8caf3cd601..0000000000 --- a/lustre/include/lustre/lustre_idl.h +++ /dev/null @@ -1,1612 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * Lustre wire protocol definitions. - * - * ALL structs passing over the wire should be declared here. Structs - * that are used in interfaces with userspace should go in lustre_user.h. - * - * All structs being declared here should be built from simple fixed-size - * types (__u8, __u16, __u32, __u64) or be built from other types or - * structs also declared in this file. Similarly, all flags and magic - * values in those structs should also be declared here. This ensures - * that the Lustre wire protocol is not influenced by external dependencies. - * - * The only other acceptable items in this file are VERY SIMPLE accessor - * functions to avoid callers grubbing inside the structures, and the - * prototypes of the swabber functions for each struct. Nothing that - * depends on external functions or definitions should be in here. - * - * Structs must be properly aligned to put 64-bit values on an 8-byte - * boundary. Any structs being added here must also be added to - * utils/wirecheck.c and "make newwiretest" run to regenerate the - * utils/wiretest.c sources. This allows us to verify that wire structs - * have the proper alignment/size on all architectures. - * - * DO NOT CHANGE any of the structs, flags, values declared here and used - * in released Lustre versions. Some structs may have padding fields that - * can be used. Some structs might allow addition at the end (verify this - * in the code to ensure that new/old clients that see this larger struct - * do not fail, otherwise you need to implement protocol compatibility). - * - * We assume all nodes are either little-endian or big-endian, and we - * always send messages in the sender's native format. The receiver - * detects the message format by checking the 'magic' field of the message - * (see lustre_msg_swabbed() below). - * - * Each wire type has corresponding 'lustre_swab_xxxtypexxx()' routines, - * implemented either here, inline (trivial implementations) or in - * ptlrpc/pack_generic.c. These 'swabbers' convert the type from "other" - * endian, in-place in the message buffer. - * - * A swabber takes a single pointer argument. The caller must already have - * verified that the length of the message buffer >= sizeof (type). - * - * For variable length types, a second 'lustre_swab_v_xxxtypexxx()' routine - * may be defined that swabs just the variable part, after the caller has - * verified that the message buffer is large enough. - */ - -#ifndef _LUSTRE_IDL_H_ -#define _LUSTRE_IDL_H_ - -#if defined(__linux__) -#include <linux/lustre_types.h> -#elif defined(__APPLE__) -#include <darwin/lustre_types.h> -#elif defined(__WINNT__) -#include <winnt/lustre_types.h> -#else -#error Unsupported operating system. -#endif - -/* Defn's shared with user-space. */ -#include <lustre/lustre_user.h> -#include <lustre_ver.h> - -/* - * this file contains all data structures used in Lustre interfaces: - * - obdo and obd_request records - * - mds_request records - * - ldlm data - * - ioctl's - */ - -/* - * GENERAL STUFF - */ -/* FOO_REQUEST_PORTAL is for incoming requests on the FOO - * FOO_REPLY_PORTAL is for incoming replies on the FOO - * FOO_BULK_PORTAL is for incoming bulk on the FOO - */ - -#define CONNMGR_REQUEST_PORTAL 1 -#define CONNMGR_REPLY_PORTAL 2 -//#define OSC_REQUEST_PORTAL 3 -#define OSC_REPLY_PORTAL 4 -//#define OSC_BULK_PORTAL 5 -#define OST_IO_PORTAL 6 -#define OST_CREATE_PORTAL 7 -#define OST_BULK_PORTAL 8 -//#define MDC_REQUEST_PORTAL 9 -#define MDC_REPLY_PORTAL 10 -//#define MDC_BULK_PORTAL 11 -#define MDS_REQUEST_PORTAL 12 -//#define MDS_REPLY_PORTAL 13 -#define MDS_BULK_PORTAL 14 -#define LDLM_CB_REQUEST_PORTAL 15 -#define LDLM_CB_REPLY_PORTAL 16 -#define LDLM_CANCEL_REQUEST_PORTAL 17 -#define LDLM_CANCEL_REPLY_PORTAL 18 -//#define PTLBD_REQUEST_PORTAL 19 -//#define PTLBD_REPLY_PORTAL 20 -//#define PTLBD_BULK_PORTAL 21 -#define MDS_SETATTR_PORTAL 22 -#define MDS_READPAGE_PORTAL 23 - -#define MGC_REPLY_PORTAL 25 -#define MGS_REQUEST_PORTAL 26 -#define MGS_REPLY_PORTAL 27 -#define OST_REQUEST_PORTAL 28 - -#define SVC_KILLED 1 -#define SVC_EVENT 2 -#define SVC_SIGNAL 4 -#define SVC_RUNNING 8 -#define SVC_STOPPING 16 -#define SVC_STOPPED 32 - -/* packet types */ -#define PTL_RPC_MSG_REQUEST 4711 -#define PTL_RPC_MSG_ERR 4712 -#define PTL_RPC_MSG_REPLY 4713 - -/* DON'T use swabbed values of MAGIC as magic! */ -#define LUSTRE_MSG_MAGIC_V1 0x0BD00BD0 -#define LUSTRE_MSG_MAGIC_V2 0x0BD00BD3 - -#define LUSTRE_MSG_MAGIC_V1_SWABBED 0xD00BD00B -#define LUSTRE_MSG_MAGIC_V2_SWABBED 0xD30BD00B - -#define LUSTRE_MSG_MAGIC LUSTRE_MSG_MAGIC_V2 - -#define PTLRPC_MSG_VERSION 0x00000003 -#define LUSTRE_VERSION_MASK 0xffff0000 -#define LUSTRE_OBD_VERSION 0x00010000 -#define LUSTRE_MDS_VERSION 0x00020000 -#define LUSTRE_OST_VERSION 0x00030000 -#define LUSTRE_DLM_VERSION 0x00040000 -#define LUSTRE_LOG_VERSION 0x00050000 -#define LUSTRE_MGS_VERSION 0x00060000 - -struct lustre_handle { - __u64 cookie; -}; -#define DEAD_HANDLE_MAGIC 0xdeadbeefcafebabeULL - -static inline int lustre_handle_is_used(struct lustre_handle *lh) -{ - return lh->cookie != 0ull; -} - -static inline int lustre_handle_equal(struct lustre_handle *lh1, - struct lustre_handle *lh2) -{ - return lh1->cookie == lh2->cookie; -} - -static inline void lustre_handle_copy(struct lustre_handle *tgt, - struct lustre_handle *src) -{ - tgt->cookie = src->cookie; -} - -/* we depend on this structure to be 8-byte aligned */ -/* this type is only endian-adjusted in lustre_unpack_msg() */ -struct lustre_msg_v1 { - struct lustre_handle lm_handle; - __u32 lm_magic; - __u32 lm_type; - __u32 lm_version; - __u32 lm_opc; - __u64 lm_last_xid; - __u64 lm_last_committed; - __u64 lm_transno; - __u32 lm_status; - __u32 lm_flags; - __u32 lm_conn_cnt; - __u32 lm_bufcount; - __u32 lm_buflens[0]; -}; - -/* flags for lm_flags */ -#define MSGHDR_AT_SUPPORT 0x1 - -#define lustre_msg lustre_msg_v2 -/* we depend on this structure to be 8-byte aligned */ -/* this type is only endian-adjusted in lustre_unpack_msg() */ -struct lustre_msg_v2 { - __u32 lm_bufcount; - __u32 lm_secflvr; - __u32 lm_magic; - __u32 lm_repsize; - __u32 lm_cksum; - __u32 lm_flags; - __u32 lm_padding_2; - __u32 lm_padding_3; - __u32 lm_buflens[0]; -}; - -/* without security, ptlrpc_body is put in the first buffer. */ -struct ptlrpc_body { - struct lustre_handle pb_handle; - __u32 pb_type; - __u32 pb_version; - __u32 pb_opc; - __u32 pb_status; - __u64 pb_last_xid; - __u64 pb_last_seen; - __u64 pb_last_committed; - __u64 pb_transno; - __u32 pb_flags; - __u32 pb_op_flags; - __u32 pb_conn_cnt; - __u32 pb_timeout; /* for req, the deadline, for rep, the service est */ - __u32 pb_service_time; /* for rep, actual service time */ - __u32 pb_limit; - __u64 pb_slv; -}; - -extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); - -/* message body offset for lustre_msg_v2 */ -/* ptlrpc body offset in all request/reply messages */ -#define MSG_PTLRPC_BODY_OFF 0 - -/* normal request/reply message record offset */ -#define REQ_REC_OFF 1 -#define REPLY_REC_OFF 1 - -/* ldlm request message body offset */ -#define DLM_LOCKREQ_OFF 1 /* lockreq offset */ -#define DLM_REQ_REC_OFF 2 /* normal dlm request record offset */ - -/* ldlm intent lock message body offset */ -#define DLM_INTENT_IT_OFF 2 /* intent lock it offset */ -#define DLM_INTENT_REC_OFF 3 /* intent lock record offset */ - -/* ldlm reply message body offset */ -#define DLM_LOCKREPLY_OFF 1 /* lockrep offset */ -#define DLM_REPLY_REC_OFF 2 /* reply record offset */ - -/* Flags that are operation-specific go in the top 16 bits. */ -#define MSG_OP_FLAG_MASK 0xffff0000 -#define MSG_OP_FLAG_SHIFT 16 - -/* Flags that apply to all requests are in the bottom 16 bits */ -#define MSG_GEN_FLAG_MASK 0x0000ffff -#define MSG_LAST_REPLAY 1 -#define MSG_RESENT 2 -#define MSG_REPLAY 4 -/* #define MSG_AT_SUPPORT 8 avoid until 1.10+ */ - -/* - * Flags for all connect opcodes (MDS_CONNECT, OST_CONNECT) - */ - -#define MSG_CONNECT_RECOVERING 0x1 -#define MSG_CONNECT_RECONNECT 0x2 -#define MSG_CONNECT_REPLAYABLE 0x4 -//#define MSG_CONNECT_PEER 0x8 -#define MSG_CONNECT_LIBCLIENT 0x10 -#define MSG_CONNECT_INITIAL 0x20 -#define MSG_CONNECT_ASYNC 0x40 -#define MSG_CONNECT_NEXT_VER 0x80 /* use next version of lustre_msg */ - -/* Connect flags */ -#define OBD_CONNECT_RDONLY 0x1ULL /*client allowed read-only access*/ -#define OBD_CONNECT_INDEX 0x2ULL /*connect to specific LOV idx */ -#define OBD_CONNECT_GRANT 0x8ULL /*OSC acquires grant at connect */ -#define OBD_CONNECT_SRVLOCK 0x10ULL /*server takes locks for client */ -#define OBD_CONNECT_VERSION 0x20ULL /*Lustre versions in ocd */ -#define OBD_CONNECT_REQPORTAL 0x40ULL /*Separate non-IO request portal */ -#define OBD_CONNECT_ACL 0x80ULL /*access control lists */ -#define OBD_CONNECT_XATTR 0x100ULL /*client use extended attributes */ -#define OBD_CONNECT_CROW 0x200ULL /*MDS+OST create objects on write*/ -#define OBD_CONNECT_TRUNCLOCK 0x400ULL /*locks on server for punch */ -#define OBD_CONNECT_TRANSNO 0x800ULL /*replay sends initial transno */ -#define OBD_CONNECT_IBITS 0x1000ULL /*support for inodebits locks */ -#define OBD_CONNECT_JOIN 0x2000ULL /*files can be concatenated */ -#define OBD_CONNECT_ATTRFID 0x4000ULL /*Server supports GetAttr By Fid */ -#define OBD_CONNECT_NODEVOH 0x8000ULL /*No open handle on special nodes*/ -#define OBD_CONNECT_LCL_CLIENT 0x10000ULL /*local 1.8 client */ -#define OBD_CONNECT_RMT_CLIENT 0x20000ULL /*Remote 1.8 client */ -#define OBD_CONNECT_BRW_SIZE 0x40000ULL /*Max bytes per rpc */ -#define OBD_CONNECT_QUOTA64 0x80000ULL /*64bit qunit_data.qd_count */ -#define OBD_CONNECT_MDS_CAPA 0x100000ULL /*MDS capability */ -#define OBD_CONNECT_OSS_CAPA 0x200000ULL /*OSS capability */ -#define OBD_CONNECT_CANCELSET 0x400000ULL /*Early batched cancels. */ -#define OBD_CONNECT_SOM 0x00800000ULL /*Size on MDS */ -#define OBD_CONNECT_AT 0x01000000ULL /*client uses adaptive timeouts */ -#define OBD_CONNECT_LRU_RESIZE 0x02000000ULL /*Lru resize feature. */ -#define OBD_CONNECT_MDS_MDS 0x04000000ULL /*MDS-MDS connection */ -#define OBD_CONNECT_REAL 0x08000000ULL /*real connection */ -#define OBD_CONNECT_CHANGE_QS 0x10000000ULL /*shrink/enlarge qunit size - *b=10600 */ -#define OBD_CONNECT_CKSUM 0x20000000ULL /*support several cksum algos */ -#define OBD_CONNECT_FID 0x40000000ULL /* FID is supported */ -/* also update obd_connect_names[] for lprocfs_rd_connect_flags() - * and lustre/utils/wirecheck.c */ - -#ifdef HAVE_LRU_RESIZE_SUPPORT -#define LRU_RESIZE_CONNECT_FLAG OBD_CONNECT_LRU_RESIZE -#else -#define LRU_RESIZE_CONNECT_FLAG 0 -#endif - -#define MDS_CONNECT_SUPPORTED (OBD_CONNECT_RDONLY | OBD_CONNECT_VERSION | \ - OBD_CONNECT_ACL | OBD_CONNECT_XATTR | \ - OBD_CONNECT_IBITS | OBD_CONNECT_JOIN | \ - OBD_CONNECT_NODEVOH | OBD_CONNECT_ATTRFID | \ - OBD_CONNECT_CANCELSET | OBD_CONNECT_AT | \ - LRU_RESIZE_CONNECT_FLAG) -#define OST_CONNECT_SUPPORTED (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \ - OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \ - OBD_CONNECT_TRUNCLOCK | OBD_CONNECT_INDEX | \ - OBD_CONNECT_BRW_SIZE | OBD_CONNECT_QUOTA64 | \ - OBD_CONNECT_CANCELSET | OBD_CONNECT_AT | \ - LRU_RESIZE_CONNECT_FLAG | OBD_CONNECT_CKSUM | \ - OBD_CONNECT_CHANGE_QS) -#define ECHO_CONNECT_SUPPORTED (0) -#define MGS_CONNECT_SUPPORTED (OBD_CONNECT_VERSION | OBD_CONNECT_AT) - -#define MAX_QUOTA_COUNT32 (0xffffffffULL) - -#define OBD_OCD_VERSION(major,minor,patch,fix) (((major)<<24) + ((minor)<<16) +\ - ((patch)<<8) + (fix)) -#define OBD_OCD_VERSION_MAJOR(version) ((int)((version)>>24)&255) -#define OBD_OCD_VERSION_MINOR(version) ((int)((version)>>16)&255) -#define OBD_OCD_VERSION_PATCH(version) ((int)((version)>>8)&255) -#define OBD_OCD_VERSION_FIX(version) ((int)(version)&255) - -/* This structure is used for both request and reply. - * - * If we eventually have separate connect data for different types, which we - * almost certainly will, then perhaps we stick a union in here. */ -struct obd_connect_data { - __u64 ocd_connect_flags; /* OBD_CONNECT_* per above */ - __u32 ocd_version; /* lustre release version number */ - __u32 ocd_grant; /* initial cache grant amount (bytes) */ - __u32 ocd_index; /* LOV index to connect to */ - __u32 ocd_brw_size; /* Maximum BRW size in bytes */ - __u64 ocd_ibits_known; /* inode bits this client understands */ - __u32 ocd_nllu; /* non-local-lustre-user */ - __u32 ocd_nllg; /* non-local-lustre-group */ - __u64 ocd_transno; /* Used in lustre 1.8 */ - __u32 ocd_group; /* Used in lustre 1.8 */ - __u32 ocd_cksum_types; /* supported checksum algorithms */ - __u64 padding1; /* also fix lustre_swab_connect */ - __u64 padding2; /* also fix lustre_swab_connect */ -}; - -extern void lustre_swab_connect(struct obd_connect_data *ocd); - -/* - * Supported checksum algorithms. Up to 32 checksum types are supported. - * (32-bit mask stored in obd_connect_data::ocd_cksum_types) - * Please update DECLARE_CKSUM_NAME/OBD_CKSUM_ALL in obd.h when adding a new - * algorithm and also the OBD_FL_CKSUM* flags. - */ -typedef enum { - OBD_CKSUM_CRC32 = 0x00000001, - OBD_CKSUM_ADLER = 0x00000002, -} cksum_type_t; - -/* - * OST requests: OBDO & OBD request records - */ - -/* opcodes */ -typedef enum { - OST_REPLY = 0, /* reply ? */ - OST_GETATTR = 1, - OST_SETATTR = 2, - OST_READ = 3, - OST_WRITE = 4, - OST_CREATE = 5, - OST_DESTROY = 6, - OST_GET_INFO = 7, - OST_CONNECT = 8, - OST_DISCONNECT = 9, - OST_PUNCH = 10, - OST_OPEN = 11, - OST_CLOSE = 12, - OST_STATFS = 13, -/* OST_SAN_READ = 14, deprecated */ -/* OST_SAN_WRITE = 15, deprecated */ - OST_SYNC = 16, - OST_SET_INFO = 17, - OST_QUOTACHECK = 18, - OST_QUOTACTL = 19, - OST_QUOTA_ADJUST_QUNIT = 20, - OST_LAST_OPC -} ost_cmd_t; -#define OST_FIRST_OPC OST_REPLY - -typedef __u64 obd_id; -typedef __u64 obd_gr; -typedef __u64 obd_time; -typedef __u64 obd_size; -typedef __u64 obd_off; -typedef __u64 obd_blocks; -typedef __u64 obd_valid; -typedef __u32 obd_blksize; -typedef __u32 obd_mode; -typedef __u32 obd_uid; -typedef __u32 obd_gid; -typedef __u32 obd_flag; -typedef __u32 obd_count; - -#define OBD_FL_INLINEDATA (0x00000001) -#define OBD_FL_OBDMDEXISTS (0x00000002) -#define OBD_FL_DELORPHAN (0x00000004) /* if set in o_flags delete orphans */ -#define OBD_FL_NORPC (0x00000008) /* set in o_flags do in OSC not OST */ -#define OBD_FL_IDONLY (0x00000010) /* set in o_flags only adjust obj id*/ -#define OBD_FL_RECREATE_OBJS (0x00000020) /* recreate missing obj */ -#define OBD_FL_DEBUG_CHECK (0x00000040) /* echo client/server debug check */ -#define OBD_FL_NO_USRQUOTA (0x00000100) /* the object's owner is over quota */ -#define OBD_FL_NO_GRPQUOTA (0x00000200) /* the object's group is over quota */ -#define OBD_FL_CREATE_CROW (0x00000400) /* object should be create on write */ - -/* - * set this to delegate DLM locking during obd_punch() to the OSTs. Only OSTs - * that declared OBD_CONNECT_TRUNCLOCK in their connect flags support this - * functionality. - */ -#define OBD_FL_TRUNCLOCK (0x00000800) - -/* - * Checksum types - */ -#define OBD_FL_CKSUM_CRC32 (0x00001000) -#define OBD_FL_CKSUM_ADLER (0x00002000) -#define OBD_FL_CKSUM_ALL (OBD_FL_CKSUM_CRC32 | OBD_FL_CKSUM_ADLER) - -/* this should be not smaller than sizeof(struct lustre_handle) + sizeof(struct - * llog_cookie) + sizeof(ll_fid). Nevertheless struct ll_fid is not longer - * stored in o_inline, we keep this just for case. */ -#define OBD_INLINESZ 80 - -/* Note: 64-bit types are 64-bit aligned in structure */ -struct obdo { - obd_valid o_valid; /* hot fields in this obdo */ - obd_id o_id; - obd_gr o_gr; - obd_id o_fid; - obd_size o_size; /* o_size-o_blocks == ost_lvb */ - obd_time o_mtime; - obd_time o_atime; - obd_time o_ctime; - obd_blocks o_blocks; /* brw: cli sent cached bytes */ - obd_size o_grant; - - /* 32-bit fields start here: keep an even number of them via padding */ - obd_blksize o_blksize; /* optimal IO blocksize */ - obd_mode o_mode; /* brw: cli sent cache remain */ - obd_uid o_uid; - obd_gid o_gid; - obd_flag o_flags; - obd_count o_nlink; /* brw: checksum */ - obd_count o_generation; - obd_count o_misc; /* brw: o_dropped */ - __u32 o_easize; /* epoch in ost writes */ - __u32 o_mds; - __u32 o_stripe_idx; /* holds stripe idx */ - __u32 o_padding_1; - char o_inline[OBD_INLINESZ]; - /* lustre_handle + llog_cookie */ -}; - -#define o_dirty o_blocks -#define o_undirty o_mode -#define o_dropped o_misc -#define o_cksum o_nlink - -extern void lustre_swab_obdo (struct obdo *o); - - -#define LOV_MAGIC_V1 0x0BD10BD0 -#define LOV_MAGIC LOV_MAGIC_V1 -#define LOV_MAGIC_JOIN 0x0BD20BD0 - -#define LOV_PATTERN_RAID0 0x001 /* stripes are used round-robin */ -#define LOV_PATTERN_RAID1 0x002 /* stripes are mirrors of each other */ -#define LOV_PATTERN_FIRST 0x100 /* first stripe is not in round-robin */ -#define LOV_PATTERN_CMOBD 0x200 - -#define LOV_OBJECT_GROUP_DEFAULT ~0ULL -#define LOV_OBJECT_GROUP_CLEAR 0ULL - -#define lov_ost_data lov_ost_data_v1 -struct lov_ost_data_v1 { /* per-stripe data structure (little-endian)*/ - __u64 l_object_id; /* OST object ID */ - __u64 l_object_gr; /* OST object group (creating MDS number) */ - __u32 l_ost_gen; /* generation of this l_ost_idx */ - __u32 l_ost_idx; /* OST index in LOV (lov_tgt_desc->tgts) */ -}; - -#define lov_mds_md lov_mds_md_v1 -struct lov_mds_md_v1 { /* LOV EA mds/wire data (little-endian) */ - __u32 lmm_magic; /* magic number = LOV_MAGIC_V1 */ - __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */ - __u64 lmm_object_id; /* LOV object ID */ - __u64 lmm_object_gr; /* LOV object group */ - __u32 lmm_stripe_size; /* size of stripe in bytes */ - __u32 lmm_stripe_count; /* num stripes in use for this object */ - struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */ -}; - -#define OBD_MD_FLID (0x00000001ULL) /* object ID */ -#define OBD_MD_FLATIME (0x00000002ULL) /* access time */ -#define OBD_MD_FLMTIME (0x00000004ULL) /* data modification time */ -#define OBD_MD_FLCTIME (0x00000008ULL) /* change time */ -#define OBD_MD_FLSIZE (0x00000010ULL) /* size */ -#define OBD_MD_FLBLOCKS (0x00000020ULL) /* allocated blocks count */ -#define OBD_MD_FLBLKSZ (0x00000040ULL) /* block size */ -#define OBD_MD_FLMODE (0x00000080ULL) /* access bits (mode & ~S_IFMT) */ -#define OBD_MD_FLTYPE (0x00000100ULL) /* object type (mode & S_IFMT) */ -#define OBD_MD_FLUID (0x00000200ULL) /* user ID */ -#define OBD_MD_FLGID (0x00000400ULL) /* group ID */ -#define OBD_MD_FLFLAGS (0x00000800ULL) /* flags word */ -#define OBD_MD_FLNLINK (0x00002000ULL) /* link count */ -#define OBD_MD_FLGENER (0x00004000ULL) /* generation number */ -#define OBD_MD_FLINLINE (0x00008000ULL) /* inline data */ -#define OBD_MD_FLRDEV (0x00010000ULL) /* device number */ -#define OBD_MD_FLEASIZE (0x00020000ULL) /* extended attribute data */ -#define OBD_MD_LINKNAME (0x00040000ULL) /* symbolic link target */ -#define OBD_MD_FLHANDLE (0x00080000ULL) /* file handle */ -#define OBD_MD_FLCKSUM (0x00100000ULL) /* bulk data checksum */ -#define OBD_MD_FLQOS (0x00200000ULL) /* quality of service stats */ -#define OBD_MD_FLOSCOPQ (0x00400000ULL) /* osc opaque data */ -#define OBD_MD_FLCOOKIE (0x00800000ULL) /* log cancellation cookie */ -#define OBD_MD_FLGROUP (0x01000000ULL) /* group */ -#define OBD_MD_FLFID (0x02000000ULL) /* ->ost write inline fid */ -#define OBD_MD_FLEPOCH (0x04000000ULL) /* ->ost write easize is epoch */ -#define OBD_MD_FLGRANT (0x08000000ULL) /* ost preallocation space grant */ -#define OBD_MD_FLDIREA (0x10000000ULL) /* dir's extended attribute data */ -#define OBD_MD_FLUSRQUOTA (0x20000000ULL) /* over quota flags sent from ost */ -#define OBD_MD_FLGRPQUOTA (0x40000000ULL) /* over quota flags sent from ost */ -#define OBD_MD_FLMODEASIZE (0x80000000ULL) /* EA size will be changed */ - -#define OBD_MD_MDS (0x0000000100000000ULL) /* where an inode lives on */ -#define OBD_MD_REINT (0x0000000200000000ULL) /* reintegrate oa */ - -#define OBD_MD_FLXATTR (0x0000001000000000ULL) /* xattr */ -#define OBD_MD_FLXATTRLS (0x0000002000000000ULL) /* xattr list */ -#define OBD_MD_FLXATTRRM (0x0000004000000000ULL) /* xattr remove */ -#define OBD_MD_FLACL (0x0000008000000000ULL) /* ACL */ - -#define OBD_MD_FLGETATTR (OBD_MD_FLID | OBD_MD_FLATIME | OBD_MD_FLMTIME | \ - OBD_MD_FLCTIME | OBD_MD_FLSIZE | OBD_MD_FLBLKSZ | \ - OBD_MD_FLMODE | OBD_MD_FLTYPE | OBD_MD_FLUID | \ - OBD_MD_FLGID | OBD_MD_FLFLAGS | OBD_MD_FLNLINK | \ - OBD_MD_FLGENER | OBD_MD_FLRDEV | OBD_MD_FLGROUP) - -static inline struct lustre_handle *obdo_handle(struct obdo *oa) -{ - return (struct lustre_handle *)oa->o_inline; -} - -static inline struct llog_cookie *obdo_logcookie(struct obdo *oa) -{ - return (struct llog_cookie *)(oa->o_inline + - sizeof(struct lustre_handle)); -} -/* don't forget obdo_fid which is way down at the bottom so it can - * come after the definition of llog_cookie */ - -struct obd_statfs { - __u64 os_type; - __u64 os_blocks; - __u64 os_bfree; - __u64 os_bavail; - __u64 os_files; - __u64 os_ffree; - __u8 os_fsid[40]; - __u32 os_bsize; - __u32 os_namelen; - __u64 os_maxbytes; - __u32 os_state; /* positive error code on server */ - __u32 os_spare1; - __u32 os_spare2; - __u32 os_spare3; - __u32 os_spare4; - __u32 os_spare5; - __u32 os_spare6; - __u32 os_spare7; - __u32 os_spare8; - __u32 os_spare9; -}; - -extern void lustre_swab_obd_statfs (struct obd_statfs *os); -#define OBD_STATFS_NODELAY 0x0001 /* requests should be send without delay - * and resends for avoid deadlocks */ - -/* ost_body.data values for OST_BRW */ - -#define OBD_BRW_READ 0x01 -#define OBD_BRW_WRITE 0x02 -#define OBD_BRW_RWMASK (OBD_BRW_READ | OBD_BRW_WRITE) -#define OBD_BRW_SYNC 0x08 -#define OBD_BRW_CHECK 0x10 -#define OBD_BRW_FROM_GRANT 0x20 /* the osc manages this under llite */ -#define OBD_BRW_GRANTED 0x40 /* the ost manages this */ -#define OBD_BRW_DROP 0x80 /* drop the page after IO */ -#define OBD_BRW_NOQUOTA 0x100 -#define OBD_BRW_SRVLOCK 0x200 /* Client holds no lock over this page */ - -#define OBD_OBJECT_EOF 0xffffffffffffffffULL - -#define OST_MIN_PRECREATE 32 -#define OST_MAX_PRECREATE 20000 - -struct obd_ioobj { - obd_id ioo_id; - obd_gr ioo_gr; - __u32 ioo_type; - __u32 ioo_bufcnt; -}; - -extern void lustre_swab_obd_ioobj (struct obd_ioobj *ioo); - -/* multiple of 8 bytes => can array */ -struct niobuf_remote { - __u64 offset; - __u32 len; - __u32 flags; -}; - -extern void lustre_swab_niobuf_remote (struct niobuf_remote *nbr); - -/* request structure for OST's */ - -struct ost_body { - struct obdo oa; -}; - -extern void lustre_swab_ost_body (struct ost_body *b); -extern void lustre_swab_ost_last_id(obd_id *id); - -/* lock value block communicated between the filter and llite */ - -/* OST_LVB_ERR_INIT is needed because the return code in rc is - * negative, i.e. because ((MASK + rc) & MASK) != MASK. */ -#define OST_LVB_ERR_INIT 0xffbadbad80000000ULL -#define OST_LVB_ERR_MASK 0xffbadbad00000000ULL -#define OST_LVB_IS_ERR(blocks) \ - ((blocks & OST_LVB_ERR_MASK) == OST_LVB_ERR_MASK) -#define OST_LVB_SET_ERR(blocks, rc) \ - do { blocks = OST_LVB_ERR_INIT + rc; } while (0) -#define OST_LVB_GET_ERR(blocks) (int)(blocks - OST_LVB_ERR_INIT) - -struct ost_lvb { - __u64 lvb_size; - __u64 lvb_mtime; - __u64 lvb_atime; - __u64 lvb_ctime; - __u64 lvb_blocks; -}; - -extern void lustre_swab_ost_lvb(struct ost_lvb *); - -/* - * MDS REQ RECORDS - */ - -/* opcodes */ -typedef enum { - MDS_GETATTR = 33, - MDS_GETATTR_NAME = 34, - MDS_CLOSE = 35, - MDS_REINT = 36, - MDS_READPAGE = 37, - MDS_CONNECT = 38, - MDS_DISCONNECT = 39, - MDS_GETSTATUS = 40, - MDS_STATFS = 41, - MDS_PIN = 42, - MDS_UNPIN = 43, - MDS_SYNC = 44, - MDS_DONE_WRITING = 45, - MDS_SET_INFO = 46, - MDS_QUOTACHECK = 47, - MDS_QUOTACTL = 48, - MDS_GETXATTR = 49, - MDS_SETXATTR = 50, - MDS_LAST_OPC -} mds_cmd_t; - -#define MDS_FIRST_OPC MDS_GETATTR - -/* - * Do not exceed 63 - */ - -typedef enum { - REINT_SETATTR = 1, - REINT_CREATE = 2, - REINT_LINK = 3, - REINT_UNLINK = 4, - REINT_RENAME = 5, - REINT_OPEN = 6, -// REINT_CLOSE = 7, -// REINT_WRITE = 8, - REINT_MAX -} mds_reint_t; - -/* the disposition of the intent outlines what was executed */ -#define DISP_IT_EXECD 0x00000001 -#define DISP_LOOKUP_EXECD 0x00000002 -#define DISP_LOOKUP_NEG 0x00000004 -#define DISP_LOOKUP_POS 0x00000008 -#define DISP_OPEN_CREATE 0x00000010 -#define DISP_OPEN_OPEN 0x00000020 -#define DISP_ENQ_COMPLETE 0x00400000 -#define DISP_ENQ_OPEN_REF 0x00800000 -#define DISP_ENQ_CREATE_REF 0x01000000 -#define DISP_OPEN_LOCK 0x02000000 - -/* INODE LOCK PARTS */ -#define MDS_INODELOCK_LOOKUP 0x000001 /* dentry, mode, owner, group */ -#define MDS_INODELOCK_UPDATE 0x000002 /* size, links, timestamps */ -#define MDS_INODELOCK_OPEN 0x000004 /* For opened files */ - -/* Do not forget to increase MDS_INODELOCK_MAXSHIFT when adding new bits */ -#define MDS_INODELOCK_MAXSHIFT 2 -/* This FULL lock is useful to take on unlink sort of operations */ -#define MDS_INODELOCK_FULL ((1<<(MDS_INODELOCK_MAXSHIFT+1))-1) - -struct ll_fid { - __u64 id; /* holds object id */ - __u32 generation; /* holds object generation */ - - __u32 f_type; /* holds object type or stripe idx when passing it to - * OST for saving into EA. */ -}; - -extern void lustre_swab_ll_fid (struct ll_fid *fid); - -#define MDS_STATUS_CONN 1 -#define MDS_STATUS_LOV 2 - -struct mds_status_req { - __u32 flags; - __u32 repbuf; -}; - -extern void lustre_swab_mds_status_req (struct mds_status_req *r); - -#define MDS_BFLAG_UNCOMMITTED_WRITES 0x1 -#define MDS_BFLAG_EXT_FLAGS 0x80000000 /* == EXT3_RESERVED_FL */ - -/* these should be identical to their EXT3_*_FL counterparts, and are - * redefined here only to avoid dragging in ext3_fs.h */ -#define MDS_SYNC_FL 0x00000008 /* Synchronous updates */ -#define MDS_IMMUTABLE_FL 0x00000010 /* Immutable file */ -#define MDS_APPEND_FL 0x00000020 /* writes to file may only append */ -#define MDS_NOATIME_FL 0x00000080 /* do not update atime */ -#define MDS_DIRSYNC_FL 0x00010000 /* dirsync behaviour (dir only) */ - -#ifdef __KERNEL__ -/* If MDS_BFLAG_IOC_FLAGS is set it means we requested EXT3_*_FL inode flags - * and we need to decode these into local S_* flags in the inode. Otherwise - * we pass flags straight through (see bug 9486). */ -static inline int ll_ext_to_inode_flags(int flags) -{ - return (flags & MDS_BFLAG_EXT_FLAGS) ? - (((flags & MDS_SYNC_FL) ? S_SYNC : 0) | - ((flags & MDS_NOATIME_FL) ? S_NOATIME : 0) | - ((flags & MDS_APPEND_FL) ? S_APPEND : 0) | -#if defined(S_DIRSYNC) - ((flags & MDS_DIRSYNC_FL) ? S_DIRSYNC : 0) | -#endif - ((flags & MDS_IMMUTABLE_FL) ? S_IMMUTABLE : 0)) : - (flags & ~MDS_BFLAG_EXT_FLAGS); -} - -/* If keep is set, we do not do anything with iflags, if it is not set, we - * assume that iflags are inode flags and we need to conver those to - * EXT3_*_FL flags (see bug 9486 and 12848) */ -static inline int ll_inode_to_ext_flags(int iflags, int keep) -{ - return keep ? (iflags & ~MDS_BFLAG_EXT_FLAGS) : - (((iflags & S_SYNC) ? MDS_SYNC_FL : 0) | - ((iflags & S_NOATIME) ? MDS_NOATIME_FL : 0) | - ((iflags & S_APPEND) ? MDS_APPEND_FL : 0) | -#if defined(S_DIRSYNC) - ((iflags & S_DIRSYNC) ? MDS_DIRSYNC_FL : 0) | -#endif - ((iflags & S_IMMUTABLE) ? MDS_IMMUTABLE_FL : 0)); -} -#endif - -struct mds_body { - struct ll_fid fid1; - struct ll_fid fid2; - struct lustre_handle handle; - __u64 valid; - __u64 size; /* Offset, in the case of MDS_READPAGE */ - __u64 mtime; - __u64 atime; - __u64 ctime; - __u64 blocks; /* XID, in the case of MDS_READPAGE */ - __u64 io_epoch; - __u64 ino; - __u32 fsuid; - __u32 fsgid; - __u32 capability; - __u32 mode; - __u32 uid; - __u32 gid; - __u32 flags; /* from vfs for pin/unpin, MDS_BFLAG for close */ - __u32 rdev; - __u32 nlink; /* #bytes to read in the case of MDS_READPAGE */ - __u32 generation; - __u32 suppgid; - __u32 eadatasize; - __u32 aclsize; - __u32 max_mdsize; - __u32 max_cookiesize; /* also fix lustre_swab_mds_body */ - __u32 padding_4; /* also fix lustre_swab_mds_body */ -}; - -extern void lustre_swab_mds_body (struct mds_body *b); - -#define Q_QUOTACHECK 0x800100 -#define Q_INITQUOTA 0x800101 /* init slave limits */ -#define Q_GETOINFO 0x800102 /* get obd quota info */ -#define Q_GETOQUOTA 0x800103 /* get obd quotas */ - -#define Q_TYPESET(oqc, type) \ - ((oqc)->qc_type == type || (oqc)->qc_type == UGQUOTA) - -#define Q_GETOCMD(oqc) \ - ((oqc)->qc_cmd == Q_GETOINFO || (oqc)->qc_cmd == Q_GETOQUOTA) - -struct obd_quotactl { - __u32 qc_cmd; - __u32 qc_type; - __u32 qc_id; - __u32 qc_stat; - struct obd_dqinfo qc_dqinfo; - struct obd_dqblk qc_dqblk; -}; - -extern void lustre_swab_obd_quotactl(struct obd_quotactl *q); - -struct quota_adjust_qunit { - __u32 qaq_flags; - __u32 qaq_id; - __u64 qaq_bunit_sz; - __u64 qaq_iunit_sz; - __u64 padding1; -}; -extern void lustre_swab_quota_adjust_qunit(struct quota_adjust_qunit *q); - -/* flags in qunit_data and quota_adjust_qunit will use macroes below */ -#define LQUOTA_FLAGS_GRP 1UL /* 0 is user, 1 is group */ -#define LQUOTA_FLAGS_BLK 2UL /* 0 is inode, 1 is block */ -#define LQUOTA_FLAGS_ADJBLK 4UL /* adjust the block qunit size */ -#define LQUOTA_FLAGS_ADJINO 8UL /* adjust the inode qunit size */ -#define LQUOTA_FLAGS_CHG_QS 16UL /* indicate whether it has capability of - * OBD_CONNECT_CHANGE_QS */ - -/* the status of lqs_flags in struct lustre_qunit_size */ -#define LQUOTA_QUNIT_FLAGS (LQUOTA_FLAGS_GRP | LQUOTA_FLAGS_BLK) - -#define QAQ_IS_GRP(qaq) ((qaq)->qaq_flags & LQUOTA_FLAGS_GRP) -#define QAQ_IS_ADJBLK(qaq) ((qaq)->qaq_flags & LQUOTA_FLAGS_ADJBLK) -#define QAQ_IS_ADJINO(qaq) ((qaq)->qaq_flags & LQUOTA_FLAGS_ADJINO) - -#define QAQ_SET_GRP(qaq) ((qaq)->qaq_flags |= LQUOTA_FLAGS_GRP) -#define QAQ_SET_ADJBLK(qaq) ((qaq)->qaq_flags |= LQUOTA_FLAGS_ADJBLK) -#define QAQ_SET_ADJINO(qaq) ((qaq)->qaq_flags |= LQUOTA_FLAGS_ADJINO) - -struct mds_rec_setattr { - __u32 sa_opcode; - __u32 sa_fsuid; - __u32 sa_fsgid; - __u32 sa_cap; - __u32 sa_suppgid; - __u32 sa_mode; - struct ll_fid sa_fid; - __u64 sa_valid; /* MDS_ATTR_* attributes */ - __u64 sa_size; - __u64 sa_mtime; - __u64 sa_atime; - __u64 sa_ctime; - __u32 sa_uid; - __u32 sa_gid; - __u32 sa_attr_flags; - __u32 sa_padding; /* also fix lustre_swab_mds_rec_setattr */ -}; - -/* - * Attribute flags used in mds_rec_setattr::sa_valid. - * The kernel's #defines for ATTR_* should not be used over the network - * since the client and MDS may run different kernels (see bug 13828) - * Therefore, we should only use MDS_ATTR_* attributes for sa_valid. - */ -#define MDS_ATTR_MODE 0x1ULL /* = 1 */ -#define MDS_ATTR_UID 0x2ULL /* = 2 */ -#define MDS_ATTR_GID 0x4ULL /* = 4 */ -#define MDS_ATTR_SIZE 0x8ULL /* = 8 */ -#define MDS_ATTR_ATIME 0x10ULL /* = 16 */ -#define MDS_ATTR_MTIME 0x20ULL /* = 32 */ -#define MDS_ATTR_CTIME 0x40ULL /* = 64 */ -#define MDS_ATTR_ATIME_SET 0x80ULL /* = 128 */ -#define MDS_ATTR_MTIME_SET 0x100ULL /* = 256 */ -#define MDS_ATTR_FORCE 0x200ULL /* = 512, Not a change, but a change it */ -#define MDS_ATTR_ATTR_FLAG 0x400ULL /* = 1024 */ -#define MDS_ATTR_KILL_SUID 0x800ULL /* = 2048 */ -#define MDS_ATTR_KILL_SGID 0x1000ULL /* = 4096 */ -#define MDS_ATTR_CTIME_SET 0x2000ULL /* = 8192 */ -#define MDS_ATTR_FROM_OPEN 0x4000ULL /* = 16384, called from open path, ie O_TRUNC */ - -extern void lustre_swab_mds_rec_setattr (struct mds_rec_setattr *sa); - -#ifndef FMODE_READ -#define FMODE_READ 00000001 -#define FMODE_WRITE 00000002 -#endif -#define MDS_FMODE_EXEC 00000004 -#define MDS_OPEN_CREAT 00000100 -#define MDS_OPEN_EXCL 00000200 -#define MDS_OPEN_TRUNC 00001000 -#define MDS_OPEN_APPEND 00002000 -#define MDS_OPEN_SYNC 00010000 -#define MDS_OPEN_DIRECTORY 00200000 - -#define MDS_OPEN_DELAY_CREATE 0100000000 /* delay initial object create */ -#define MDS_OPEN_OWNEROVERRIDE 0200000000 /* NFSD rw-reopen ro file for owner */ -#define MDS_OPEN_JOIN_FILE 0400000000 /* open for join file*/ -#define MDS_OPEN_LOCK 04000000000 /* This open requires open lock */ -#define MDS_OPEN_HAS_EA 010000000000 /* specify object create pattern */ -#define MDS_OPEN_HAS_OBJS 020000000000 /* Just set the EA the obj exist */ - -struct mds_rec_create { - __u32 cr_opcode; - __u32 cr_fsuid; - __u32 cr_fsgid; - __u32 cr_cap; - __u32 cr_flags; /* for use with open */ - __u32 cr_mode; - struct ll_fid cr_fid; - struct ll_fid cr_replayfid; - __u64 cr_time; - __u64 cr_rdev; - __u32 cr_suppgid; - __u32 cr_padding_1; /* also fix lustre_swab_mds_rec_create */ - __u32 cr_padding_2; /* also fix lustre_swab_mds_rec_create */ - __u32 cr_padding_3; /* also fix lustre_swab_mds_rec_create */ - __u32 cr_padding_4; /* also fix lustre_swab_mds_rec_create */ - __u32 cr_padding_5; /* also fix lustre_swab_mds_rec_create */ -}; - -extern void lustre_swab_mds_rec_create (struct mds_rec_create *cr); - -struct mds_rec_join { - struct ll_fid jr_fid; - __u64 jr_headsize; -}; - -extern void lustre_swab_mds_rec_join (struct mds_rec_join *jr); - -struct mds_rec_link { - __u32 lk_opcode; - __u32 lk_fsuid; - __u32 lk_fsgid; - __u32 lk_cap; - __u32 lk_suppgid1; - __u32 lk_suppgid2; - struct ll_fid lk_fid1; - struct ll_fid lk_fid2; - __u64 lk_time; - __u32 lk_padding_1; /* also fix lustre_swab_mds_rec_link */ - __u32 lk_padding_2; /* also fix lustre_swab_mds_rec_link */ - __u32 lk_padding_3; /* also fix lustre_swab_mds_rec_link */ - __u32 lk_padding_4; /* also fix lustre_swab_mds_rec_link */ -}; - -extern void lustre_swab_mds_rec_link (struct mds_rec_link *lk); - -struct mds_rec_unlink { - __u32 ul_opcode; - __u32 ul_fsuid; - __u32 ul_fsgid; - __u32 ul_cap; - __u32 ul_suppgid; - __u32 ul_mode; - struct ll_fid ul_fid1; - struct ll_fid ul_fid2; - __u64 ul_time; - __u32 ul_padding_1; /* also fix lustre_swab_mds_rec_unlink */ - __u32 ul_padding_2; /* also fix lustre_swab_mds_rec_unlink */ - __u32 ul_padding_3; /* also fix lustre_swab_mds_rec_unlink */ - __u32 ul_padding_4; /* also fix lustre_swab_mds_rec_unlink */ -}; - -extern void lustre_swab_mds_rec_unlink (struct mds_rec_unlink *ul); - -struct mds_rec_rename { - __u32 rn_opcode; - __u32 rn_fsuid; - __u32 rn_fsgid; - __u32 rn_cap; - __u32 rn_suppgid1; - __u32 rn_suppgid2; - struct ll_fid rn_fid1; - struct ll_fid rn_fid2; - __u64 rn_time; - __u32 rn_padding_1; /* also fix lustre_swab_mds_rec_rename */ - __u32 rn_padding_2; /* also fix lustre_swab_mds_rec_rename */ - __u32 rn_padding_3; /* also fix lustre_swab_mds_rec_rename */ - __u32 rn_padding_4; /* also fix lustre_swab_mds_rec_rename */ -}; - -extern void lustre_swab_mds_rec_rename (struct mds_rec_rename *rn); - -/* - * LOV data structures - */ - -#define LOV_MIN_STRIPE_SIZE 65536 /* maximum PAGE_SIZE (ia64), power of 2 */ -#define LOV_MAX_STRIPE_COUNT 160 /* until bug 4424 is fixed */ -#define LOV_V1_INSANE_STRIPE_COUNT 65532 /* maximum stripe count bz13933 */ - -#define LOV_MAX_UUID_BUFFER_SIZE 8192 -/* The size of the buffer the lov/mdc reserves for the - * array of UUIDs returned by the MDS. With the current - * protocol, this will limit the max number of OSTs per LOV */ - -#define LOV_DESC_MAGIC 0xB0CCDE5C - -/* LOV settings descriptor (should only contain static info) */ -struct lov_desc { - __u32 ld_tgt_count; /* how many OBD's */ - __u32 ld_active_tgt_count; /* how many active */ - __u32 ld_default_stripe_count; /* how many objects are used */ - __u32 ld_pattern; /* default PATTERN_RAID0 */ - __u64 ld_default_stripe_size; /* in bytes */ - __u64 ld_default_stripe_offset; /* in bytes */ - __u32 ld_padding_0; /* unused */ - __u32 ld_qos_maxage; /* in second */ - __u32 ld_padding_1; /* also fix lustre_swab_lov_desc */ - __u32 ld_padding_2; /* also fix lustre_swab_lov_desc */ - struct obd_uuid ld_uuid; -}; - -#define ld_magic ld_active_tgt_count /* for swabbing from llogs */ - -extern void lustre_swab_lov_desc (struct lov_desc *ld); - -/* - * LDLM requests: - */ -/* opcodes -- MUST be distinct from OST/MDS opcodes */ -typedef enum { - LDLM_ENQUEUE = 101, - LDLM_CONVERT = 102, - LDLM_CANCEL = 103, - LDLM_BL_CALLBACK = 104, - LDLM_CP_CALLBACK = 105, - LDLM_GL_CALLBACK = 106, - LDLM_LAST_OPC -} ldlm_cmd_t; -#define LDLM_FIRST_OPC LDLM_ENQUEUE - -#define RES_NAME_SIZE 4 -struct ldlm_res_id { - __u64 name[RES_NAME_SIZE]; -}; - -extern void lustre_swab_ldlm_res_id (struct ldlm_res_id *id); - -/* lock types */ -typedef enum { - LCK_MINMODE = 0, - LCK_EX = 1, - LCK_PW = 2, - LCK_PR = 4, - LCK_CW = 8, - LCK_CR = 16, - LCK_NL = 32, - LCK_GROUP = 64, - LCK_MAXMODE -} ldlm_mode_t; - -#define LCK_MODE_NUM 7 - -typedef enum { - LDLM_PLAIN = 10, - LDLM_EXTENT = 11, - LDLM_FLOCK = 12, - LDLM_IBITS = 13, - LDLM_MAX_TYPE -} ldlm_type_t; - -#define LDLM_MIN_TYPE LDLM_PLAIN - -struct ldlm_extent { - __u64 start; - __u64 end; - __u64 gid; -}; - -static inline int ldlm_extent_overlap(struct ldlm_extent *ex1, - struct ldlm_extent *ex2) -{ - return (ex1->start <= ex2->end) && (ex2->start <= ex1->end); -} - -struct ldlm_inodebits { - __u64 bits; -}; - -struct ldlm_flock { - __u64 start; - __u64 end; - __u64 blocking_export; /* not actually used over the wire */ - __u32 blocking_pid; /* not actually used over the wire */ - __u32 pid; -}; - -/* it's important that the fields of the ldlm_extent structure match - * the first fields of the ldlm_flock structure because there is only - * one ldlm_swab routine to process the ldlm_policy_data_t union. if - * this ever changes we will need to swab the union differently based - * on the resource type. */ - -typedef union { - struct ldlm_extent l_extent; - struct ldlm_flock l_flock; - struct ldlm_inodebits l_inodebits; -} ldlm_policy_data_t; - -extern void lustre_swab_ldlm_policy_data (ldlm_policy_data_t *d); - -struct ldlm_intent { - __u64 opc; -}; - -extern void lustre_swab_ldlm_intent (struct ldlm_intent *i); - -struct ldlm_resource_desc { - ldlm_type_t lr_type; - __u32 lr_padding; /* also fix lustre_swab_ldlm_resource_desc */ - struct ldlm_res_id lr_name; -}; - -extern void lustre_swab_ldlm_resource_desc (struct ldlm_resource_desc *r); - -struct ldlm_lock_desc { - struct ldlm_resource_desc l_resource; - ldlm_mode_t l_req_mode; - ldlm_mode_t l_granted_mode; - ldlm_policy_data_t l_policy_data; -}; - -extern void lustre_swab_ldlm_lock_desc (struct ldlm_lock_desc *l); - -#define LDLM_LOCKREQ_HANDLES 2 -#define LDLM_ENQUEUE_CANCEL_OFF 1 - -struct ldlm_request { - __u32 lock_flags; - __u32 lock_count; - struct ldlm_lock_desc lock_desc; - struct lustre_handle lock_handle[LDLM_LOCKREQ_HANDLES]; -}; - -/* If LDLM_ENQUEUE, 1 slot is already occupied, 1 is available. - * Otherwise, 2 are available. */ -#define ldlm_request_bufsize(count,type) \ -({ \ - int _avail = LDLM_LOCKREQ_HANDLES; \ - _avail -= (type == LDLM_ENQUEUE ? LDLM_ENQUEUE_CANCEL_OFF : 0); \ - sizeof(struct ldlm_request) + \ - (count - _avail > 0 ? count - _avail : 0) * \ - sizeof(struct lustre_handle); \ -}) - -extern void lustre_swab_ldlm_request (struct ldlm_request *rq); - -struct ldlm_reply { - __u32 lock_flags; - __u32 lock_padding; /* also fix lustre_swab_ldlm_reply */ - struct ldlm_lock_desc lock_desc; - struct lustre_handle lock_handle; - __u64 lock_policy_res1; - __u64 lock_policy_res2; -}; - -extern void lustre_swab_ldlm_reply (struct ldlm_reply *r); - - -/* - * Opcodes for mountconf (mgs and mgc) - */ -typedef enum { - MGS_CONNECT = 250, - MGS_DISCONNECT, - MGS_EXCEPTION, /* node died, etc. */ - MGS_TARGET_REG, /* whenever target starts up */ - MGS_TARGET_DEL, - MGS_SET_INFO, - MGS_LAST_OPC -} mgs_cmd_t; -#define MGS_FIRST_OPC MGS_CONNECT - -#define MGS_PARAM_MAXLEN 1024 -#define KEY_SET_INFO "set_info" - -struct mgs_send_param { - char mgs_param[MGS_PARAM_MAXLEN]; -}; - -/* We pass this info to the MGS so it can write config logs */ -#define MTI_NAME_MAXLEN 64 -#define MTI_PARAM_MAXLEN 4096 -#define MTI_NIDS_MAX 32 -struct mgs_target_info { - __u32 mti_lustre_ver; - __u32 mti_stripe_index; - __u32 mti_config_ver; - __u32 mti_flags; - __u32 mti_nid_count; - __u32 padding; /* 64 bit align */ - char mti_fsname[MTI_NAME_MAXLEN]; - char mti_svname[MTI_NAME_MAXLEN]; - char mti_uuid[sizeof(struct obd_uuid)]; - __u64 mti_nids[MTI_NIDS_MAX]; /* host nids (lnet_nid_t)*/ - char mti_params[MTI_PARAM_MAXLEN]; -}; - -extern void lustre_swab_mgs_target_info(struct mgs_target_info *oinfo); - -/* Config marker flags (in config log) */ -#define CM_START 0x01 -#define CM_END 0x02 -#define CM_SKIP 0x04 -#define CM_UPGRADE146 0x08 -#define CM_EXCLUDE 0x10 -#define CM_START_SKIP (CM_START | CM_SKIP) - -struct cfg_marker { - __u32 cm_step; /* aka config version */ - __u32 cm_flags; - __u32 cm_vers; /* lustre release version number */ - __u32 padding; /* 64 bit align */ - time_t cm_createtime; /*when this record was first created */ - time_t cm_canceltime; /*when this record is no longer valid*/ - char cm_tgtname[MTI_NAME_MAXLEN]; - char cm_comment[MTI_NAME_MAXLEN]; -}; - -/* - * Opcodes for multiple servers. - */ - -typedef enum { - OBD_PING = 400, - OBD_LOG_CANCEL, - OBD_QC_CALLBACK, - OBD_LAST_OPC -} obd_cmd_t; -#define OBD_FIRST_OPC OBD_PING - -/* catalog of log objects */ - -/* Identifier for a single log object */ -struct llog_logid { - __u64 lgl_oid; - __u64 lgl_ogr; - __u32 lgl_ogen; -} __attribute__((packed)); - -/* Records written to the CATALOGS list */ -#define CATLIST "CATALOGS" -struct llog_catid { - struct llog_logid lci_logid; - __u32 lci_padding1; - __u32 lci_padding2; - __u32 lci_padding3; -} __attribute__((packed)); - -/*join file lov mds md*/ -struct lov_mds_md_join { - struct lov_mds_md lmmj_md; - /*join private info*/ - struct llog_logid lmmj_array_id; /*array object id*/ - __u32 lmmj_extent_count; /*array extent count*/ -}; - -/* Log data record types - there is no specific reason that these need to - * be related to the RPC opcodes, but no reason not to (may be handy later?) - */ -#define LLOG_OP_MAGIC 0x10600000 -#define LLOG_OP_MASK 0xfff00000 - -typedef enum { - LLOG_PAD_MAGIC = LLOG_OP_MAGIC | 0x00000, - OST_SZ_REC = LLOG_OP_MAGIC | 0x00f00, - OST_RAID1_REC = LLOG_OP_MAGIC | 0x01000, - MDS_UNLINK_REC = LLOG_OP_MAGIC | 0x10000 | (MDS_REINT << 8) | REINT_UNLINK, - MDS_SETATTR_REC = LLOG_OP_MAGIC | 0x10000 | (MDS_REINT << 8) | REINT_SETATTR, - OBD_CFG_REC = LLOG_OP_MAGIC | 0x20000, - PTL_CFG_REC = LLOG_OP_MAGIC | 0x30000, /* obsolete */ - LLOG_GEN_REC = LLOG_OP_MAGIC | 0x40000, - LLOG_JOIN_REC = LLOG_OP_MAGIC | 0x50000, - LLOG_HDR_MAGIC = LLOG_OP_MAGIC | 0x45539, - LLOG_LOGID_MAGIC = LLOG_OP_MAGIC | 0x4553b, -} llog_op_type; - -/* - * for now, continue to support old pad records which have 0 for their - * type but still need to be swabbed for their length - */ -#define LLOG_REC_HDR_NEEDS_SWABBING(r) \ - (((r)->lrh_type & __swab32(LLOG_OP_MASK)) == \ - __swab32(LLOG_OP_MAGIC) || \ - (((r)->lrh_type == 0) && ((r)->lrh_len > LLOG_CHUNK_SIZE))) - -/* Log record header - stored in little endian order. - * Each record must start with this struct, end with a llog_rec_tail, - * and be a multiple of 256 bits in size. - */ -struct llog_rec_hdr { - __u32 lrh_len; - __u32 lrh_index; - __u32 lrh_type; - __u32 padding; -}; - -struct llog_rec_tail { - __u32 lrt_len; - __u32 lrt_index; -}; - -struct llog_logid_rec { - struct llog_rec_hdr lid_hdr; - struct llog_logid lid_id; - __u32 padding1; - __u32 padding2; - __u32 padding3; - __u32 padding4; - __u32 padding5; - struct llog_rec_tail lid_tail; -} __attribute__((packed)); - -/* MDS extent description - * It is for joined file extent info, each extent info for joined file - * just like (start, end, lmm). - */ -struct mds_extent_desc { - __u64 med_start; /* extent start */ - __u64 med_len; /* extent length */ - struct lov_mds_md med_lmm; /* extent's lmm */ -}; -/*Joined file array extent log record*/ -struct llog_array_rec { - struct llog_rec_hdr lmr_hdr; - struct mds_extent_desc lmr_med; - struct llog_rec_tail lmr_tail; -}; - -struct llog_create_rec { - struct llog_rec_hdr lcr_hdr; - struct ll_fid lcr_fid; - obd_id lcr_oid; - obd_count lcr_ogen; - __u32 padding; - struct llog_rec_tail lcr_tail; -} __attribute__((packed)); - -struct llog_orphan_rec { - struct llog_rec_hdr lor_hdr; - obd_id lor_oid; - obd_count lor_ogen; - __u32 padding; - struct llog_rec_tail lor_tail; -} __attribute__((packed)); - -struct llog_unlink_rec { - struct llog_rec_hdr lur_hdr; - obd_id lur_oid; - obd_count lur_ogen; - __u32 padding; - struct llog_rec_tail lur_tail; -} __attribute__((packed)); - -struct llog_setattr_rec { - struct llog_rec_hdr lsr_hdr; - obd_id lsr_oid; - obd_count lsr_ogen; - __u32 lsr_uid; - __u32 lsr_gid; - __u32 padding; - struct llog_rec_tail lsr_tail; -} __attribute__((packed)); - -struct llog_size_change_rec { - struct llog_rec_hdr lsc_hdr; - struct ll_fid lsc_fid; - __u32 lsc_io_epoch; - __u32 padding; - struct llog_rec_tail lsc_tail; -} __attribute__((packed)); - -struct llog_gen { - __u64 mnt_cnt; - __u64 conn_cnt; -} __attribute__((packed)); - -struct llog_gen_rec { - struct llog_rec_hdr lgr_hdr; - struct llog_gen lgr_gen; - struct llog_rec_tail lgr_tail; -}; -/* On-disk header structure of each log object, stored in little endian order */ -#define LLOG_CHUNK_SIZE 8192 -#define LLOG_HEADER_SIZE (96) -#define LLOG_BITMAP_BYTES (LLOG_CHUNK_SIZE - LLOG_HEADER_SIZE) - -#define LLOG_MIN_REC_SIZE (24) /* round(llog_rec_hdr + llog_rec_tail) */ - -/* flags for the logs */ -#define LLOG_F_ZAP_WHEN_EMPTY 0x1 -#define LLOG_F_IS_CAT 0x2 -#define LLOG_F_IS_PLAIN 0x4 - -struct llog_log_hdr { - struct llog_rec_hdr llh_hdr; - __u64 llh_timestamp; - __u32 llh_count; - __u32 llh_bitmap_offset; - __u32 llh_size; - __u32 llh_flags; - __u32 llh_cat_idx; - /* for a catalog the first plain slot is next to it */ - struct obd_uuid llh_tgtuuid; - __u32 llh_reserved[LLOG_HEADER_SIZE/sizeof(__u32) - 23]; - __u32 llh_bitmap[LLOG_BITMAP_BYTES/sizeof(__u32)]; - struct llog_rec_tail llh_tail; -} __attribute__((packed)); - -#define LLOG_BITMAP_SIZE(llh) ((llh->llh_hdr.lrh_len - \ - llh->llh_bitmap_offset - \ - sizeof(llh->llh_tail)) * 8) - -/* log cookies are used to reference a specific log file and a record therein */ -struct llog_cookie { - struct llog_logid lgc_lgl; - __u32 lgc_subsys; - __u32 lgc_index; - __u32 lgc_padding; -} __attribute__((packed)); - -/* llog protocol */ -typedef enum { - LLOG_ORIGIN_HANDLE_CREATE = 501, - LLOG_ORIGIN_HANDLE_NEXT_BLOCK = 502, - LLOG_ORIGIN_HANDLE_READ_HEADER = 503, - LLOG_ORIGIN_HANDLE_WRITE_REC = 504, - LLOG_ORIGIN_HANDLE_CLOSE = 505, - LLOG_ORIGIN_CONNECT = 506, - LLOG_CATINFO = 507, /* for lfs catinfo */ - LLOG_ORIGIN_HANDLE_PREV_BLOCK = 508, - LLOG_ORIGIN_HANDLE_DESTROY = 509, /* for destroy llog object*/ - LLOG_LAST_OPC -} llog_cmd_t; -#define LLOG_FIRST_OPC LLOG_ORIGIN_HANDLE_CREATE - -struct llogd_body { - struct llog_logid lgd_logid; - __u32 lgd_ctxt_idx; - __u32 lgd_llh_flags; - __u32 lgd_index; - __u32 lgd_saved_index; - __u32 lgd_len; - __u64 lgd_cur_offset; -} __attribute__((packed)); - -struct llogd_conn_body { - struct llog_gen lgdc_gen; - struct llog_logid lgdc_logid; - __u32 lgdc_ctxt_idx; -} __attribute__((packed)); - -struct lov_user_ost_data_join { /* per-stripe data structure */ - __u64 l_extent_start; /* extent start*/ - __u64 l_extent_end; /* extent end*/ - __u64 l_object_id; /* OST object ID */ - __u64 l_object_gr; /* OST object group (creating MDS number) */ - __u32 l_ost_gen; /* generation of this OST index */ - __u32 l_ost_idx; /* OST index in LOV */ -} __attribute__((packed)); - -struct lov_user_md_join { /* LOV EA user data (host-endian) */ - __u32 lmm_magic; /* magic number = LOV_MAGIC_JOIN */ - __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */ - __u64 lmm_object_id; /* LOV object ID */ - __u64 lmm_object_gr; /* LOV object group */ - __u32 lmm_stripe_size; /* size of stripe in bytes */ - __u32 lmm_stripe_count; /* num stripes in use for this object */ - __u32 lmm_extent_count; /* extent count of lmm*/ - __u64 lmm_tree_id; /* mds tree object id */ - __u64 lmm_tree_gen; /* mds tree object gen */ - struct llog_logid lmm_array_id; /* mds extent desc llog object id */ - struct lov_user_ost_data_join lmm_objects[0]; /* per-stripe data */ -} __attribute__((packed)); - -extern void lustre_swab_lov_user_md(struct lov_user_md *lum); -extern void lustre_swab_lov_user_md_objects(struct lov_user_md *lum); -extern void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj); - -/* llog_swab.c */ -extern void lustre_swab_llogd_body (struct llogd_body *d); -extern void lustre_swab_llog_hdr (struct llog_log_hdr *h); -extern void lustre_swab_llogd_conn_body (struct llogd_conn_body *d); -extern void lustre_swab_llog_rec(struct llog_rec_hdr *rec, - struct llog_rec_tail *tail); - -struct lustre_cfg; -extern void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg); - -/* this will be used when OBD_CONNECT_CHANGE_QS is set */ -struct qunit_data { - __u32 qd_id; /* ID appiles to (uid, gid) */ - __u32 qd_flags; /* LQUOTA_FLAGS_* affect the responding bits */ - __u64 qd_count; /* acquire/release count (bytes for block quota) */ - __u64 qd_qunit; /* when a master returns the reply to a slave, it will - * contain the current corresponding qunit size */ - __u64 padding; -}; - -#define QDATA_IS_GRP(qdata) ((qdata)->qd_flags & LQUOTA_FLAGS_GRP) -#define QDATA_IS_BLK(qdata) ((qdata)->qd_flags & LQUOTA_FLAGS_BLK) -#define QDATA_IS_ADJBLK(qdata) ((qdata)->qd_flags & LQUOTA_FLAGS_ADJBLK) -#define QDATA_IS_ADJINO(qdata) ((qdata)->qd_flags & LQUOTA_FLAGS_ADJINO) -#define QDATA_IS_CHANGE_QS(qdata) ((qdata)->qd_flags & LQUOTA_FLAGS_CHG_QS) - -#define QDATA_SET_GRP(qdata) ((qdata)->qd_flags |= LQUOTA_FLAGS_GRP) -#define QDATA_SET_BLK(qdata) ((qdata)->qd_flags |= LQUOTA_FLAGS_BLK) -#define QDATA_SET_ADJBLK(qdata) ((qdata)->qd_flags |= LQUOTA_FLAGS_ADJBLK) -#define QDATA_SET_ADJINO(qdata) ((qdata)->qd_flags |= LQUOTA_FLAGS_ADJINO) -#define QDATA_SET_CHANGE_QS(qdata) ((qdata)->qd_flags |= LQUOTA_FLAGS_CHG_QS) - -#define QDATA_CLR_GRP(qdata) ((qdata)->qd_flags &= ~LQUOTA_FLAGS_GRP) -#define QDATA_CLR_CHANGE_QS(qdata) ((qdata)->qd_flags &= ~LQUOTA_FLAGS_CHG_QS) - -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0) -/* this will be used when OBD_CONNECT_QUOTA64 is set */ -struct qunit_data_old2 { - __u32 qd_id; /* ID appiles to (uid, gid) */ - __u32 qd_flags; /* Quota type (USRQUOTA, GRPQUOTA) occupy one bit; - * Block quota or file quota occupy one bit */ - __u64 qd_count; /* acquire/release count (bytes for block quota) */ -}; -#else -#warning "remove quota code above for format absolete in new release" -#endif - -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0) -struct qunit_data_old { - __u32 qd_id; /* ID appiles to (uid, gid) */ - __u32 qd_type; /* Quota type (USRQUOTA, GRPQUOTA) */ - __u32 qd_count; /* acquire/release count (bytes for block quota) */ - __u32 qd_isblk; /* Block quota or file quota */ -}; -#else -#warning "remove quota code above for format absolete in new release" -#endif - -extern void lustre_swab_qdata(struct qunit_data *d); -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0) -extern void lustre_swab_qdata_old(struct qunit_data_old *d); -#else -#warning "remove quota code above for format absolete in new release" -#endif -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0) -extern void lustre_swab_qdata_old2(struct qunit_data_old2 *d); -#else -#warning "remove quota code above for format absolete in new release" -#endif -extern int quota_get_qdata(void*req, struct qunit_data *qdata, - int is_req, int is_exp); -extern int quota_copy_qdata(void *request, struct qunit_data *qdata, - int is_req, int is_exp); - -typedef enum { - QUOTA_DQACQ = 601, - QUOTA_DQREL = 602, -} quota_cmd_t; - -#define JOIN_FILE_ALIGN 4096 - -#define QUOTA_REQUEST 1 -#define QUOTA_REPLY 0 -#define QUOTA_EXPORT 1 -#define QUOTA_IMPORT 0 - -/* quota check function */ -#define QUOTA_RET_OK 0 /* return successfully */ -#define QUOTA_RET_NOQUOTA 1 /* not support quota */ -#define QUOTA_RET_NOLIMIT 2 /* quota limit isn't set */ -#define QUOTA_RET_ACQUOTA 4 /* need to acquire extra quota */ -#define QUOTA_RET_INC_PENDING 8 /* pending value is increased */ - -extern int quota_get_qunit_data_size(__u64 flag); -#endif diff --git a/lustre/include/lustre/lustre_user.h b/lustre/include/lustre/lustre_user.h deleted file mode 100644 index 354127c0e5..0000000000 --- a/lustre/include/lustre/lustre_user.h +++ /dev/null @@ -1,266 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * Lustre public user-space interface definitions. - */ - -#ifndef _LUSTRE_USER_H -#define _LUSTRE_USER_H - -#if defined(__linux__) -#include <linux/lustre_user.h> -#elif defined(__APPLE__) -#include <darwin/lustre_user.h> -#elif defined(__WINNT__) -#include <winnt/lustre_user.h> -#else -#error Unsupported operating system. -#endif - -/* for statfs() */ -#define LL_SUPER_MAGIC 0x0BD00BD0 - -#ifndef EXT3_IOC_GETFLAGS -#define EXT3_IOC_GETFLAGS _IOR('f', 1, long) -#define EXT3_IOC_SETFLAGS _IOW('f', 2, long) -#define EXT3_IOC_GETVERSION _IOR('f', 3, long) -#define EXT3_IOC_SETVERSION _IOW('f', 4, long) -#define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long) -#define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long) -#endif - -struct obd_statfs; - -/* - * The ioctl naming rules: - * LL_* - works on the currently opened filehandle instead of parent dir - * *_OBD_* - gets data for both OSC or MDC (LOV, LMV indirectly) - * *_MDC_* - gets/sets data related to MDC - * *_LOV_* - gets/sets data related to OSC/LOV - * *FILE* - called on parent dir and passes in a filename - * *STRIPE* - set/get lov_user_md - * *INFO - set/get lov_user_mds_data - */ -#define LL_IOC_GETFLAGS _IOR ('f', 151, long) -#define LL_IOC_SETFLAGS _IOW ('f', 152, long) -#define LL_IOC_CLRFLAGS _IOW ('f', 153, long) -#define LL_IOC_LOV_SETSTRIPE _IOW ('f', 154, long) -#define LL_IOC_LOV_GETSTRIPE _IOW ('f', 155, long) -#define LL_IOC_LOV_SETEA _IOW ('f', 156, long) -#define LL_IOC_RECREATE_OBJ _IOW ('f', 157, long) -#define LL_IOC_GROUP_LOCK _IOW ('f', 158, long) -#define LL_IOC_GROUP_UNLOCK _IOW ('f', 159, long) -#define LL_IOC_QUOTACHECK _IOW ('f', 160, int) -#define LL_IOC_POLL_QUOTACHECK _IOR ('f', 161, struct if_quotacheck *) -#define LL_IOC_QUOTACTL _IOWR('f', 162, struct if_quotactl *) -#define LL_IOC_JOIN _IOW ('f', 163, long) -#define IOC_OBD_STATFS _IOWR('f', 164, struct obd_statfs *) -#define IOC_LOV_GETINFO _IOWR('f', 165, struct lov_user_mds_data *) - -#define LL_IOC_LLOOP_ATTACH _IOWR('f', 166, OBD_IOC_DATA_TYPE) -#define LL_IOC_LLOOP_DETACH _IOWR('f', 167, OBD_IOC_DATA_TYPE) -#define LL_IOC_LLOOP_INFO _IOWR('f', 168, OBD_IOC_DATA_TYPE) -#define LL_IOC_LLOOP_DETACH_BYDEV _IOWR('f', 169, OBD_IOC_DATA_TYPE) - -#define LL_STATFS_MDC 1 -#define LL_STATFS_LOV 2 - -#define IOC_MDC_TYPE 'i' -#define IOC_MDC_LOOKUP _IOWR(IOC_MDC_TYPE, 20, struct obd_device *) -#define IOC_MDC_GETFILESTRIPE _IOWR(IOC_MDC_TYPE, 21, struct lov_user_md *) -#define IOC_MDC_GETFILEINFO _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data *) -#define LL_IOC_MDC_GETINFO _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data *) - -/* Keep these for backward compartability. */ -#define LL_IOC_OBD_STATFS IOC_OBD_STATFS -#define IOC_MDC_GETSTRIPE IOC_MDC_GETFILESTRIPE - -#define O_LOV_DELAY_CREATE 0100000000 /* hopefully this does not conflict */ -#define O_JOIN_FILE 0400000000 /* hopefully this does not conflict */ - -#define LL_FILE_IGNORE_LOCK 0x00000001 -#define LL_FILE_GROUP_LOCKED 0x00000002 -#define LL_FILE_READAHEAD 0x00000004 - -#define LOV_USER_MAGIC_V1 0x0BD10BD0 -#define LOV_USER_MAGIC LOV_USER_MAGIC_V1 - -#define LOV_USER_MAGIC_JOIN 0x0BD20BD0 - -#define LOV_PATTERN_RAID0 0x001 -#define LOV_PATTERN_RAID1 0x002 -#define LOV_PATTERN_FIRST 0x100 - -#define lov_user_ost_data lov_user_ost_data_v1 -struct lov_user_ost_data_v1 { /* per-stripe data structure */ - __u64 l_object_id; /* OST object ID */ - __u64 l_object_gr; /* OST object group (creating MDS number) */ - __u32 l_ost_gen; /* generation of this OST index */ - __u32 l_ost_idx; /* OST index in LOV */ -} __attribute__((packed)); - -#define lov_user_md lov_user_md_v1 -struct lov_user_md_v1 { /* LOV EA user data (host-endian) */ - __u32 lmm_magic; /* magic number = LOV_USER_MAGIC_V1 */ - __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */ - __u64 lmm_object_id; /* LOV object ID */ - __u64 lmm_object_gr; /* LOV object group */ - __u32 lmm_stripe_size; /* size of stripe in bytes */ - __u16 lmm_stripe_count; /* num stripes in use for this object */ - __u16 lmm_stripe_offset; /* starting stripe offset in lmm_objects */ - struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */ -} __attribute__((packed)); - -/* Compile with -D_LARGEFILE64_SOURCE or -D_GNU_SOURCE (or #define) to - * use this. It is unsafe to #define those values in this header as it - * is possible the application has already #included <sys/stat.h>. */ -#ifdef HAVE_LOV_USER_MDS_DATA -#define lov_user_mds_data lov_user_mds_data_v1 -struct lov_user_mds_data_v1 { - lstat_t lmd_st; /* MDS stat struct */ - struct lov_user_md_v1 lmd_lmm; /* LOV EA user data */ -} __attribute__((packed)); -#endif - -struct ll_recreate_obj { - __u64 lrc_id; - __u32 lrc_ost_idx; -}; - -struct obd_uuid { - char uuid[40]; -}; - -static inline int obd_uuid_equals(struct obd_uuid *u1, struct obd_uuid *u2) -{ - return strcmp((char *)u1->uuid, (char *)u2->uuid) == 0; -} - -static inline int obd_uuid_empty(struct obd_uuid *uuid) -{ - return uuid->uuid[0] == '\0'; -} - -static inline void obd_str2uuid(struct obd_uuid *uuid, char *tmp) -{ - strncpy((char *)uuid->uuid, tmp, sizeof(*uuid)); - uuid->uuid[sizeof(*uuid) - 1] = '\0'; -} - -/* For printf's only, make sure uuid is terminated */ -static inline char *obd_uuid2str(struct obd_uuid *uuid) -{ - if (uuid->uuid[sizeof(*uuid) - 1] != '\0') { - /* Obviously not safe, but for printfs, no real harm done... - we're always null-terminated, even in a race. */ - static char temp[sizeof(*uuid)]; - memcpy(temp, uuid->uuid, sizeof(*uuid) - 1); - temp[sizeof(*uuid) - 1] = '\0'; - return temp; - } - return (char *)(uuid->uuid); -} - -/* these must be explicitly translated into linux Q_* in ll_dir_ioctl */ -#define LUSTRE_Q_QUOTAON 0x800002 /* turn quotas on */ -#define LUSTRE_Q_QUOTAOFF 0x800003 /* turn quotas off */ -#define LUSTRE_Q_GETINFO 0x800005 /* get information about quota files */ -#define LUSTRE_Q_SETINFO 0x800006 /* set information about quota files */ -#define LUSTRE_Q_GETQUOTA 0x800007 /* get user quota structure */ -#define LUSTRE_Q_SETQUOTA 0x800008 /* set user quota structure */ -/* lustre-specific control commands */ -#define LUSTRE_Q_INVALIDATE 0x80000b /* invalidate quota data */ - -#define UGQUOTA 2 /* set both USRQUOTA and GRPQUOTA */ - -#define QFMT_LDISKFS 2 /* QFMT_VFS_V0(2), quota format for ldiskfs */ - -struct if_quotacheck { - char obd_type[16]; - struct obd_uuid obd_uuid; -}; - -#define MDS_GRP_DOWNCALL_MAGIC 0x6d6dd620 - -struct mds_grp_downcall_data { - __u32 mgd_magic; - __u32 mgd_err; - __u32 mgd_uid; - __u32 mgd_gid; - __u32 mgd_ngroups; - __u32 mgd_groups[0]; -}; - -#ifdef NEED_QUOTA_DEFS -#ifndef QUOTABLOCK_BITS -#define QUOTABLOCK_BITS 10 -#endif - -#ifndef QUOTABLOCK_SIZE -#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS) -#endif - -#ifndef toqb -#define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS) -#endif - -#ifndef QIF_BLIMITS -#define QIF_BLIMITS 1 -#define QIF_SPACE 2 -#define QIF_ILIMITS 4 -#define QIF_INODES 8 -#define QIF_BTIME 16 -#define QIF_ITIME 32 -#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS) -#define QIF_USAGE (QIF_SPACE | QIF_INODES) -#define QIF_TIMES (QIF_BTIME | QIF_ITIME) -#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES) -#endif - -#endif /* !__KERNEL__ */ - -typedef enum lustre_quota_version { - LUSTRE_QUOTA_V1 = 0, - LUSTRE_QUOTA_V2 = 1 -} lustre_quota_version_t; - -/* XXX: same as if_dqinfo struct in kernel */ -struct obd_dqinfo { - __u64 dqi_bgrace; - __u64 dqi_igrace; - __u32 dqi_flags; - __u32 dqi_valid; -}; - -/* XXX: same as if_dqblk struct in kernel, plus one padding */ -struct obd_dqblk { - __u64 dqb_bhardlimit; - __u64 dqb_bsoftlimit; - __u64 dqb_curspace; - __u64 dqb_ihardlimit; - __u64 dqb_isoftlimit; - __u64 dqb_curinodes; - __u64 dqb_btime; - __u64 dqb_itime; - __u32 dqb_valid; - __u32 padding; -}; - -struct if_quotactl { - __u32 qc_cmd; - __u32 qc_type; - __u32 qc_id; - __u32 qc_stat; - struct obd_dqinfo qc_dqinfo; - struct obd_dqblk qc_dqblk; - char obd_type[16]; - struct obd_uuid obd_uuid; -}; - -#ifndef offsetof -# define offsetof(typ,memb) ((unsigned long)((char *)&(((typ *)0)->memb))) -#endif - -#endif /* _LUSTRE_USER_H */ diff --git a/lustre/include/lustre/types.h b/lustre/include/lustre/types.h deleted file mode 100644 index a5da5923e1..0000000000 --- a/lustre/include/lustre/types.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _LUSTRE_TYPES_H -#define _LUSTRE_TYPES_H - -#if defined(__linux__) -#include <linux/lustre_types.h> -#elif defined(__APPLE__) -#include <darwin/lustre_types.h> -#elif defined(__WINNT__) -#include <winnt/lustre_types.h> -#else -#error Unsupported operating system. -#endif - -#endif diff --git a/lustre/include/lustre_cache.h b/lustre/include/lustre_cache.h deleted file mode 100644 index 291d882936..0000000000 --- a/lustre/include/lustre_cache.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef LUSTRE_CACHE_H -#define LUSTRE_CACHE_H -#include <obd.h> -#include <lustre/lustre_idl.h> -#include <lustre_dlm.h> - -struct lustre_cache; -struct osc_async_page; -struct page_removal_cb_element { - struct list_head prce_list; - obd_page_removal_cb_t prce_callback; -}; - -typedef int (*cache_iterate_extents_cb_t)(struct lustre_cache *, - struct lustre_handle *, - struct osc_async_page *, - void *); -typedef int (*cache_iterate_locks_cb_t)(struct lustre_cache *, - struct ldlm_res_id *, - struct lustre_handle *, void *); - -struct lustre_cache { - struct list_head lc_locks_list; - spinlock_t lc_locks_list_lock; - struct list_head lc_page_removal_callback_list; - struct obd_device *lc_obd; - obd_pin_extent_cb lc_pin_extent_cb; -}; - -int cache_add_lock(struct lustre_cache *cache, struct lustre_handle *lockh); -int cache_add_extent(struct lustre_cache *cache, struct ldlm_res_id *res, - struct osc_async_page *extent, - struct lustre_handle *lockh); -void cache_remove_extent(struct lustre_cache *, struct osc_async_page *); -int cache_add_extent_removal_cb(struct lustre_cache *cache, - obd_page_removal_cb_t func_cb, - obd_pin_extent_cb pin_cb); -int cache_del_extent_removal_cb(struct lustre_cache *cache, - obd_page_removal_cb_t func_cb); -int cache_iterate_extents(struct lustre_cache *cache, struct lustre_handle *lockh, - cache_iterate_extents_cb_t cb_func, void *data); -int cache_remove_lock(struct lustre_cache *cache, struct lustre_handle *lockh); -int cache_iterate_locks(struct lustre_cache *cache, struct ldlm_res_id *res, - cache_iterate_locks_cb_t cb_fun, void *data); -struct lustre_cache *cache_create(struct obd_device *obd); -int cache_destroy(struct lustre_cache *cache); - - -#endif /* LUSTRE_CACHE_H */ diff --git a/lustre/include/lustre_cfg.h b/lustre/include/lustre_cfg.h deleted file mode 100644 index 3b770d3f6e..0000000000 --- a/lustre/include/lustre_cfg.h +++ /dev/null @@ -1,256 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _LUSTRE_CFG_H -#define _LUSTRE_CFG_H - -/* - * 1cf6 - * lcfG - */ -#define LUSTRE_CFG_VERSION 0x1cf60001 -#define LUSTRE_CFG_MAX_BUFCOUNT 8 - -#define LCFG_HDR_SIZE(count) \ - size_round(offsetof (struct lustre_cfg, lcfg_buflens[(count)])) - -/* If not LCFG_REQUIRED, we can ignore this cmd and go on. */ -#define LCFG_REQUIRED 0x0001000 - -enum lcfg_command_type { - LCFG_ATTACH = 0x00cf001, - LCFG_DETACH = 0x00cf002, - LCFG_SETUP = 0x00cf003, - LCFG_CLEANUP = 0x00cf004, - LCFG_ADD_UUID = 0x00cf005, - LCFG_DEL_UUID = 0x00cf006, - LCFG_MOUNTOPT = 0x00cf007, - LCFG_DEL_MOUNTOPT = 0x00cf008, - LCFG_SET_TIMEOUT = 0x00cf009, - LCFG_SET_UPCALL = 0x00cf00a, - LCFG_ADD_CONN = 0x00cf00b, - LCFG_DEL_CONN = 0x00cf00c, - LCFG_LOV_ADD_OBD = 0x00cf00d, - LCFG_LOV_DEL_OBD = 0x00cf00e, - LCFG_PARAM = 0x00cf00f, - LCFG_MARKER = 0x00cf010, - LCFG_LOG_START = 0x00ce011, - LCFG_LOG_END = 0x00ce012, - LCFG_LOV_ADD_INA = 0x00ce013, -}; - -struct lustre_cfg_bufs { - void *lcfg_buf[LUSTRE_CFG_MAX_BUFCOUNT]; - __u32 lcfg_buflen[LUSTRE_CFG_MAX_BUFCOUNT]; - __u32 lcfg_bufcount; -}; - -/* Mountconf transitional hack, should go away after 1.6 */ -#define LCFG_FLG_MOUNTCONF 0x400 - -struct lustre_cfg { - __u32 lcfg_version; - __u32 lcfg_command; - - __u32 lcfg_num; - __u32 lcfg_flags; - __u64 lcfg_nid; - __u32 lcfg_nal; /* not used any more */ - - __u32 lcfg_bufcount; - __u32 lcfg_buflens[0]; -}; - -#define LUSTRE_CFG_BUFLEN(lcfg, idx) \ - ((lcfg)->lcfg_bufcount <= (idx) \ - ? 0 \ - : (lcfg)->lcfg_buflens[(idx)]) - -static inline void lustre_cfg_bufs_set(struct lustre_cfg_bufs *bufs, - __u32 index, - void *buf, - __u32 buflen) -{ - if (index >= LUSTRE_CFG_MAX_BUFCOUNT) - return; - if (bufs == NULL) - return; - - if (bufs->lcfg_bufcount <= index) - bufs->lcfg_bufcount = index + 1; - - bufs->lcfg_buf[index] = buf; - bufs->lcfg_buflen[index] = buflen; -} - -static inline void lustre_cfg_bufs_set_string(struct lustre_cfg_bufs *bufs, - __u32 index, - char *str) -{ - lustre_cfg_bufs_set(bufs, index, str, str ? strlen(str) + 1 : 0); -} - -static inline void lustre_cfg_bufs_reset(struct lustre_cfg_bufs *bufs, char *name) -{ - memset((bufs), 0, sizeof(*bufs)); - if (name) - lustre_cfg_bufs_set_string(bufs, 0, name); -} - -static inline void *lustre_cfg_buf(struct lustre_cfg *lcfg, int index) -{ - int i; - int offset; - int bufcount; - LASSERT (lcfg != NULL); - LASSERT (index >= 0); - - bufcount = lcfg->lcfg_bufcount; - if (index >= bufcount) - return NULL; - - offset = LCFG_HDR_SIZE(lcfg->lcfg_bufcount); - for (i = 0; i < index; i++) - offset += size_round(lcfg->lcfg_buflens[i]); - return (char *)lcfg + offset; -} - -static inline void lustre_cfg_bufs_init(struct lustre_cfg_bufs *bufs, - struct lustre_cfg *lcfg) -{ - int i; - bufs->lcfg_bufcount = lcfg->lcfg_bufcount; - for (i = 0; i < bufs->lcfg_bufcount; i++) { - bufs->lcfg_buflen[i] = lcfg->lcfg_buflens[i]; - bufs->lcfg_buf[i] = lustre_cfg_buf(lcfg, i); - } -} - -static inline char *lustre_cfg_string(struct lustre_cfg *lcfg, int index) -{ - char *s; - - if (!lcfg->lcfg_buflens[index]) - return NULL; - - s = lustre_cfg_buf(lcfg, index); - if (!s) - return NULL; - - /* make sure it's NULL terminated, even if this kills a char - * of data. Try to use the padding first though. - */ - if (s[lcfg->lcfg_buflens[index] - 1] != '\0') { - int last = min((int)lcfg->lcfg_buflens[index], - size_round(lcfg->lcfg_buflens[index]) - 1); - char lost = s[last]; - s[last] = '\0'; - if (lost != '\0') { - CWARN("Truncated buf %d to '%s' (lost '%c'...)\n", - index, s, lost); - } - } - return s; -} - -static inline int lustre_cfg_len(__u32 bufcount, __u32 *buflens) -{ - int i; - int len; - ENTRY; - - len = LCFG_HDR_SIZE(bufcount); - for (i = 0; i < bufcount; i++) - len += size_round(buflens[i]); - - RETURN(size_round(len)); -} - - -#include <obd_support.h> - -static inline struct lustre_cfg *lustre_cfg_new(int cmd, - struct lustre_cfg_bufs *bufs) -{ - struct lustre_cfg *lcfg; - char *ptr; - int i; - - ENTRY; - - OBD_ALLOC(lcfg, lustre_cfg_len(bufs->lcfg_bufcount, - bufs->lcfg_buflen)); - if (!lcfg) - RETURN(lcfg); - - lcfg->lcfg_version = LUSTRE_CFG_VERSION; - lcfg->lcfg_command = cmd; - lcfg->lcfg_bufcount = bufs->lcfg_bufcount; - - ptr = (char *)lcfg + LCFG_HDR_SIZE(lcfg->lcfg_bufcount); - for (i = 0; i < lcfg->lcfg_bufcount; i++) { - lcfg->lcfg_buflens[i] = bufs->lcfg_buflen[i]; - LOGL((char *)bufs->lcfg_buf[i], bufs->lcfg_buflen[i], ptr); - } - RETURN(lcfg); -} - -static inline void lustre_cfg_free(struct lustre_cfg *lcfg) -{ - int len; - - len = lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens); - - OBD_FREE(lcfg, len); - EXIT; - return; -} - -static inline int lustre_cfg_sanity_check(void *buf, int len) -{ - struct lustre_cfg *lcfg = (struct lustre_cfg *)buf; - ENTRY; - if (!lcfg) - RETURN(-EINVAL); - - /* check that the first bits of the struct are valid */ - if (len < LCFG_HDR_SIZE(0)) - RETURN(-EINVAL); - - if (lcfg->lcfg_version != LUSTRE_CFG_VERSION) - RETURN(-EINVAL); - - if (lcfg->lcfg_bufcount >= LUSTRE_CFG_MAX_BUFCOUNT) - RETURN(-EINVAL); - - /* check that the buflens are valid */ - if (len < LCFG_HDR_SIZE(lcfg->lcfg_bufcount)) - RETURN(-EINVAL); - - /* make sure all the pointers point inside the data */ - if (len < lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens)) - RETURN(-EINVAL); - - RETURN(0); -} - -#endif // _LUSTRE_CFG_H diff --git a/lustre/include/lustre_commit_confd.h b/lustre/include/lustre_commit_confd.h deleted file mode 100644 index 87e8c91172..0000000000 --- a/lustre/include/lustre_commit_confd.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * Structures relating to the log commit thread. - */ - -#ifndef _LUSTRE_COMMIT_CONFD_H -#define _LUSTRE_COMMIT_CONFD_H - -#include <lustre_log.h> - -struct llog_canceld_ctxt { - struct list_head llcd_list; /* free or pending struct list */ - struct llog_ctxt *llcd_ctxt; - struct llog_commit_master *llcd_lcm; - int llcd_size; - int llcd_cookiebytes; - struct llog_cookie llcd_cookies[0]; -}; - -struct llog_commit_master { - struct list_head lcm_thread_busy; /* list of busy daemons */ - struct list_head lcm_thread_idle; /* list of idle daemons */ - spinlock_t lcm_thread_lock; /* protects thread_list */ - atomic_t lcm_thread_numidle;/* number of idle threads */ - atomic_t lcm_thread_total; /* total number of threads */ - int lcm_thread_max; /* <= num_osts normally */ - - int lcm_flags; - cfs_waitq_t lcm_waitq; - - struct list_head lcm_llcd_pending; /* llog_canceld_ctxt to send */ - struct list_head lcm_llcd_resend; /* try to resend this data */ - struct list_head lcm_llcd_free; /* free llog_canceld_ctxt */ - spinlock_t lcm_llcd_lock; /* protects llcd_free */ - atomic_t lcm_llcd_numfree; /* items on llcd_free */ - int lcm_llcd_minfree; /* min free on llcd_free */ - int lcm_llcd_maxfree; /* max free on llcd_free */ -}; - -#define LLOG_LCM_FL_EXIT 0x01 -#define LLOG_LCM_FL_EXIT_FORCE 0x02 - -/* the thread data that collects local commits and makes rpc's */ -struct llog_commit_daemon { - struct list_head lcd_lcm_list; /* list of daemon threads */ - struct list_head lcd_llcd_list; /* list of pending RPCs */ - struct llog_commit_master *lcd_lcm; /* pointer back to parent */ - int lcd_index; /* the index of the llog daemon */ -}; - -/* ptlrpc/recov_thread.c */ -int llog_start_commit_thread(struct llog_commit_master *); - -int llog_init_commit_master(struct llog_commit_master *); -int llog_cleanup_commit_master(struct llog_commit_master *lcm, int force); -#endif /* _LUSTRE_COMMIT_CONFD_H */ diff --git a/lustre/include/lustre_debug.h b/lustre/include/lustre_debug.h deleted file mode 100644 index c6bd7bab5d..0000000000 --- a/lustre/include/lustre_debug.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _LUSTRE_DEBUG_H -#define _LUSTRE_DEBUG_H - -#include <lustre_net.h> - -#if defined(__linux__) -#include <linux/lustre_debug.h> -#elif defined(__APPLE__) -#include <darwin/lustre_debug.h> -#elif defined(__WINNT__) -#include <winnt/lustre_debug.h> -#else -#error Unsupported operating system. -#endif - -#define ASSERT_MAX_SIZE_MB 60000ULL -#define ASSERT_PAGE_INDEX(index, OP) \ -do { if (index > ASSERT_MAX_SIZE_MB << (20 - CFS_PAGE_SHIFT)) { \ - CERROR("bad page index %lu > %Lu\n", index, \ - ASSERT_MAX_SIZE_MB << (20 - CFS_PAGE_SHIFT)); \ - libcfs_debug = ~0UL; \ - OP; \ -}} while(0) - -#define ASSERT_FILE_OFFSET(offset, OP) \ -do { if (offset > ASSERT_MAX_SIZE_MB << 20) { \ - CERROR("bad file offset %Lu > %Lu\n", offset, \ - ASSERT_MAX_SIZE_MB << 20); \ - libcfs_debug = ~0UL; \ - OP; \ -}} while(0) - -/* lib/debug.c */ -int dump_lniobuf(struct niobuf_local *lnb); -int dump_rniobuf(struct niobuf_remote *rnb); -int dump_ioo(struct obd_ioobj *nb); -int dump_req(struct ptlrpc_request *req); -int dump_obdo(struct obdo *oa); -void dump_lsm(int level, struct lov_stripe_md *lsm); -int block_debug_setup(void *addr, int len, __u64 off, __u64 id); -int block_debug_check(char *who, void *addr, int len, __u64 off, __u64 id); -#endif diff --git a/lustre/include/lustre_disk.h b/lustre/include/lustre_disk.h deleted file mode 100644 index 805cf40fba..0000000000 --- a/lustre/include/lustre_disk.h +++ /dev/null @@ -1,288 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nathan Rutman <nathan@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * - * Lustre disk format definitions. - */ - -#ifndef _LUSTRE_DISK_H -#define _LUSTRE_DISK_H - -#include <lnet/types.h> - -/****************** on-disk files *********************/ - -#define MDT_LOGS_DIR "LOGS" /* COMPAT_146 */ -#define MOUNT_CONFIGS_DIR "CONFIGS" -/* Persistent mount data are stored on the disk in this file. */ -#define MOUNT_DATA_FILE MOUNT_CONFIGS_DIR"/mountdata" -#define LAST_RCVD "last_rcvd" -#define LOV_OBJID "lov_objid" -#define HEALTH_CHECK "health_check" - - -/****************** persistent mount data *********************/ - -#define LDD_F_SV_TYPE_MDT 0x0001 -#define LDD_F_SV_TYPE_OST 0x0002 -#define LDD_F_SV_TYPE_MGS 0x0004 -#define LDD_F_NEED_INDEX 0x0010 /* need an index assignment */ -#define LDD_F_VIRGIN 0x0020 /* never registered */ -#define LDD_F_UPDATE 0x0040 /* update all related config logs */ -#define LDD_F_REWRITE_LDD 0x0080 /* rewrite the LDD */ -#define LDD_F_WRITECONF 0x0100 /* regenerate all logs for this fs */ -#define LDD_F_UPGRADE14 0x0200 /* COMPAT_14 */ -#define LDD_F_PARAM 0x0400 /* process as lctl conf_param */ - -enum ldd_mount_type { - LDD_MT_EXT3 = 0, - LDD_MT_LDISKFS, - LDD_MT_SMFS, - LDD_MT_REISERFS, - LDD_MT_LDISKFS2, - LDD_MT_LAST -}; - -static inline char *mt_str(enum ldd_mount_type mt) -{ - static char *mount_type_string[] = { - "ext3", - "ldiskfs", - "smfs", - "reiserfs", - "ldiskfs2", - }; - return mount_type_string[mt]; -} - -#define LDD_INCOMPAT_SUPP 0 -#define LDD_ROCOMPAT_SUPP 0 - -#define LDD_MAGIC 0x1dd00001 - -/* On-disk configuration file. In host-endian order. */ -struct lustre_disk_data { - __u32 ldd_magic; - __u32 ldd_feature_compat; /* compatible feature flags */ - __u32 ldd_feature_rocompat;/* read-only compatible feature flags */ - __u32 ldd_feature_incompat;/* incompatible feature flags */ - - __u32 ldd_config_ver; /* config rewrite count - not used */ - __u32 ldd_flags; /* LDD_SV_TYPE */ - __u32 ldd_svindex; /* server index (0001), must match - svname */ - __u32 ldd_mount_type; /* target fs type LDD_MT_* */ - char ldd_fsname[64]; /* filesystem this server is part of */ - char ldd_svname[64]; /* this server's name (lustre-mdt0001)*/ - __u8 ldd_uuid[40]; /* server UUID (COMPAT_146) */ - -/*200*/ char ldd_userdata[1024 - 200]; /* arbitrary user string */ -/*1024*/__u8 ldd_padding[4096 - 1024]; -/*4096*/char ldd_mount_opts[4096]; /* target fs mount opts */ -/*8192*/char ldd_params[4096]; /* key=value pairs */ -}; - -#define IS_MDT(data) ((data)->ldd_flags & LDD_F_SV_TYPE_MDT) -#define IS_OST(data) ((data)->ldd_flags & LDD_F_SV_TYPE_OST) -#define IS_MGS(data) ((data)->ldd_flags & LDD_F_SV_TYPE_MGS) -#define MT_STR(data) mt_str((data)->ldd_mount_type) - -/* Make the mdt/ost server obd name based on the filesystem name */ -static inline int server_make_name(__u32 flags, __u16 index, char *fs, - char *name) -{ - if (flags & (LDD_F_SV_TYPE_MDT | LDD_F_SV_TYPE_OST)) { - sprintf(name, "%.8s-%s%04x", fs, - (flags & LDD_F_SV_TYPE_MDT) ? "MDT" : "OST", - index); - } else if (flags & LDD_F_SV_TYPE_MGS) { - sprintf(name, "MGS"); - } else { - CERROR("unknown server type %#x\n", flags); - return 1; - } - return 0; -} - -/* Get the index from the obd name */ -int server_name2index(char *svname, __u32 *idx, char **endptr); - - -/****************** mount command *********************/ - -/* The lmd is only used internally by Lustre; mount simply passes - everything as string options */ - -#define LMD_MAGIC 0xbdacbd03 - -/* gleaned from the mount command - no persistent info here */ -struct lustre_mount_data { - __u32 lmd_magic; - __u32 lmd_flags; /* lustre mount flags */ - int lmd_mgs_failnodes; /* mgs failover node count */ - int lmd_exclude_count; - char *lmd_dev; /* device name */ - char *lmd_profile; /* client only */ - char *lmd_opts; /* lustre mount options (as opposed to - _device_ mount options) */ - __u32 *lmd_exclude; /* array of OSTs to ignore */ -}; - -#define LMD_FLG_SERVER 0x0001 /* Mounting a server */ -#define LMD_FLG_CLIENT 0x0002 /* Mounting a client */ -#define LMD_FLG_ABORT_RECOV 0x0008 /* Abort recovery */ -#define LMD_FLG_NOSVC 0x0010 /* Only start MGS/MGC for servers, - no other services */ - -#define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT) - - -/****************** last_rcvd file *********************/ - -#define LR_SERVER_SIZE 512 -#define LR_CLIENT_START 8192 -#define LR_CLIENT_SIZE 128 -#if LR_CLIENT_START < LR_SERVER_SIZE -#error "Can't have LR_CLIENT_START < LR_SERVER_SIZE" -#endif -/* This limit is arbitrary (32k clients on x86), but it is convenient to use - * 2^n * CFS_PAGE_SIZE * 8 for the number of bits that fit an order-n allocation. */ -#define LR_MAX_CLIENTS (CFS_PAGE_SIZE * 8) - - -/* COMPAT_146 */ -#define OBD_COMPAT_OST 0x00000002 /* this is an OST (temporary) */ -#define OBD_COMPAT_MDT 0x00000004 /* this is an MDT (temporary) */ -/* end COMPAT_146 */ - -#define OBD_ROCOMPAT_LOVOBJID 0x00000001 /* MDS handles LOV_OBJID file */ -#define OBD_ROCOMPAT_CROW 0x00000002 /* OST will CROW create objects */ - -#define OBD_INCOMPAT_GROUPS 0x00000001 /* OST handles group subdirs */ -#define OBD_INCOMPAT_OST 0x00000002 /* this is an OST */ -#define OBD_INCOMPAT_MDT 0x00000004 /* this is an MDT */ -#define OBD_INCOMPAT_COMMON_LR 0x00000008 /* common last_rvcd format */ - - -/* Data stored per server at the head of the last_rcvd file. In le32 order. - This should be common to filter_internal.h, lustre_mds.h */ -struct lr_server_data { - __u8 lsd_uuid[40]; /* server UUID */ - __u64 lsd_last_transno; /* last completed transaction ID */ - __u64 lsd_compat14; /* reserved - compat with old last_rcvd */ - __u64 lsd_mount_count; /* incarnation number */ - __u32 lsd_feature_compat; /* compatible feature flags */ - __u32 lsd_feature_rocompat;/* read-only compatible feature flags */ - __u32 lsd_feature_incompat;/* incompatible feature flags */ - __u32 lsd_server_size; /* size of server data area */ - __u32 lsd_client_start; /* start of per-client data area */ - __u16 lsd_client_size; /* size of per-client data area */ - __u16 lsd_subdir_count; /* number of subdirectories for objects */ - __u64 lsd_catalog_oid; /* recovery catalog object id */ - __u32 lsd_catalog_ogen; /* recovery catalog inode generation */ - __u8 lsd_peeruuid[40]; /* UUID of MDS associated with this OST */ - __u32 lsd_ost_index; /* index number of OST in LOV */ - __u32 lsd_mdt_index; /* index number of MDT in LMV */ - __u8 lsd_padding[LR_SERVER_SIZE - 148]; -}; - -/* Data stored per client in the last_rcvd file. In le32 order. */ -struct lsd_client_data { - __u8 lcd_uuid[40]; /* client UUID */ - __u64 lcd_last_transno; /* last completed transaction ID */ - __u64 lcd_last_xid; /* xid for the last transaction */ - __u32 lcd_last_result; /* result from last RPC */ - __u32 lcd_last_data; /* per-op data (disposition for open &c.) */ - /* for MDS_CLOSE requests */ - __u64 lcd_last_close_transno; /* last completed transaction ID */ - __u64 lcd_last_close_xid; /* xid for the last transaction */ - __u32 lcd_last_close_result; /* result from last RPC */ - __u32 lcd_last_close_data; /* per-op data */ - __u8 lcd_padding[LR_CLIENT_SIZE - 88]; -}; - - -#ifdef __KERNEL__ -/****************** superblock additional info *********************/ -struct ll_sb_info; - -struct lustre_sb_info { - int lsi_flags; - struct obd_device *lsi_mgc; /* mgc obd */ - struct lustre_mount_data *lsi_lmd; /* mount command info */ - struct lustre_disk_data *lsi_ldd; /* mount info on-disk */ - struct ll_sb_info *lsi_llsbi; /* add'l client sbi info */ - struct vfsmount *lsi_srv_mnt; /* the one server mount */ - atomic_t lsi_mounts; /* references to the srv_mnt */ -}; - -#define LSI_SERVER 0x00000001 -#define LSI_UMOUNT_FORCE 0x00000010 -#define LSI_UMOUNT_FAILOVER 0x00000020 - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# define s2lsi(sb) ((struct lustre_sb_info *)((sb)->s_fs_info)) -# define s2lsi_nocast(sb) ((sb)->s_fs_info) -#else /* 2.4 here */ -# define s2lsi(sb) ((struct lustre_sb_info *)((sb)->u.generic_sbp)) -# define s2lsi_nocast(sb) ((sb)->u.generic_sbp) -#endif - -#define get_profile_name(sb) (s2lsi(sb)->lsi_lmd->lmd_profile) - -#endif /* __KERNEL__ */ - -/****************** mount lookup info *********************/ - -struct lustre_mount_info { - char *lmi_name; - struct super_block *lmi_sb; - struct vfsmount *lmi_mnt; - struct list_head lmi_list_chain; -}; - -/****************** prototypes *********************/ - -#ifdef __KERNEL__ -#include <obd_class.h> - -/* obd_mount.c */ -void lustre_register_client_fill_super(int (*cfs)(struct super_block *sb)); -void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb)); - - -int lustre_common_put_super(struct super_block *sb); -int lustre_process_log(struct super_block *sb, char *logname, - struct config_llog_instance *cfg); -int lustre_end_log(struct super_block *sb, char *logname, - struct config_llog_instance *cfg); -struct lustre_mount_info *server_get_mount(char *name); -int server_put_mount(char *name, struct vfsmount *mnt); -int server_register_target(struct super_block *sb); -struct mgs_target_info; -int server_mti_print(char *title, struct mgs_target_info *mti); - -/* mgc_request.c */ -int mgc_fsname2resid(char *fsname, struct ldlm_res_id *res_id); - -#endif - -#endif // _LUSTRE_DISK_H diff --git a/lustre/include/lustre_dlm.h b/lustre/include/lustre_dlm.h deleted file mode 100644 index 55696b55a1..0000000000 --- a/lustre/include/lustre_dlm.h +++ /dev/null @@ -1,834 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * (visit-tags-table FILE) - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _LUSTRE_DLM_H__ -#define _LUSTRE_DLM_H__ - -#if defined(__linux__) -#include <linux/lustre_dlm.h> -#elif defined(__APPLE__) -#include <darwin/lustre_dlm.h> -#elif defined(__WINNT__) -#include <winnt/lustre_dlm.h> -#else -#error Unsupported operating system. -#endif - -#include <lustre_lib.h> -#include <lustre_net.h> -#include <lustre_import.h> -#include <lustre_handles.h> -#include <lustre_export.h> /* for obd_export, for LDLM_DEBUG */ -#include <interval_tree.h> /* for interval_node{}, ldlm_extent */ - -struct obd_ops; -struct obd_device; - -#define OBD_LDLM_DEVICENAME "ldlm" - -#define LDLM_DEFAULT_LRU_SIZE (100 * num_online_cpus()) -#define LDLM_DEFAULT_MAX_ALIVE (cfs_time_seconds(36000)) - -typedef enum { - ELDLM_OK = 0, - - ELDLM_LOCK_CHANGED = 300, - ELDLM_LOCK_ABORTED = 301, - ELDLM_LOCK_REPLACED = 302, - ELDLM_NO_LOCK_DATA = 303, - - ELDLM_NAMESPACE_EXISTS = 400, - ELDLM_BAD_NAMESPACE = 401 -} ldlm_error_t; - -typedef enum { - LDLM_NAMESPACE_SERVER = 1 << 0, - LDLM_NAMESPACE_CLIENT = 1 << 1 -} ldlm_side_t; - -#define LDLM_FL_LOCK_CHANGED 0x000001 /* extent, mode, or resource changed */ - -/* If the server returns one of these flags, then the lock was put on that list. - * If the client sends one of these flags (during recovery ONLY!), it wants the - * lock added to the specified list, no questions asked. -p */ -#define LDLM_FL_BLOCK_GRANTED 0x000002 -#define LDLM_FL_BLOCK_CONV 0x000004 -#define LDLM_FL_BLOCK_WAIT 0x000008 - -#define LDLM_FL_CBPENDING 0x000010 /* this lock is being destroyed */ -#define LDLM_FL_AST_SENT 0x000020 /* blocking or cancel packet was sent */ -#define LDLM_FL_WAIT_NOREPROC 0x000040 /* not a real flag, not saved in lock */ -#define LDLM_FL_CANCEL 0x000080 /* cancellation callback already run */ - -/* Lock is being replayed. This could probably be implied by the fact that one - * of BLOCK_{GRANTED,CONV,WAIT} is set, but that is pretty dangerous. */ -#define LDLM_FL_REPLAY 0x000100 - -#define LDLM_FL_INTENT_ONLY 0x000200 /* don't grant lock, just do intent */ -#define LDLM_FL_LOCAL_ONLY 0x000400 /* see ldlm_cli_cancel_unused */ - -/* don't run the cancel callback under ldlm_cli_cancel_unused */ -#define LDLM_FL_FAILED 0x000800 - -#define LDLM_FL_HAS_INTENT 0x001000 /* lock request has intent */ -#define LDLM_FL_CANCELING 0x002000 /* lock cancel has already been sent */ -#define LDLM_FL_LOCAL 0x004000 /* local lock (ie, no srv/cli split) */ -#define LDLM_FL_WARN 0x008000 /* see ldlm_cli_cancel_unused */ -#define LDLM_FL_DISCARD_DATA 0x010000 /* discard (no writeback) on cancel */ - -#define LDLM_FL_NO_TIMEOUT 0x020000 /* Blocked by group lock - wait - * indefinitely */ - -/* file & record locking */ -#define LDLM_FL_BLOCK_NOWAIT 0x040000 // server told not to wait if blocked -#define LDLM_FL_TEST_LOCK 0x080000 // return blocking lock - -/* XXX FIXME: This is being added to b_size as a low-risk fix to the fact that - * the LVB filling happens _after_ the lock has been granted, so another thread - * can match`t before the LVB has been updated. As a dirty hack, we set - * LDLM_FL_LVB_READY only after we've done the LVB poop. - * this is only needed on lov/osc now, where lvb is actually used and callers - * must set it in input flags. - * - * The proper fix is to do the granting inside of the completion AST, which can - * be replaced with a LVB-aware wrapping function for OSC locks. That change is - * pretty high-risk, though, and would need a lot more testing. */ - -#define LDLM_FL_LVB_READY 0x100000 - -/* A lock contributes to the kms calculation until it has finished the part - * of it's cancelation that performs write back on its dirty pages. It - * can remain on the granted list during this whole time. Threads racing - * to update the kms after performing their writeback need to know to - * exclude each others locks from the calculation as they walk the granted - * list. */ -#define LDLM_FL_KMS_IGNORE 0x200000 - -/* Don't drop lock covering mmapped file in LRU */ -#define LDLM_FL_NO_LRU 0x400000 - -/* Immediatelly cancel such locks when they block some other locks. Send - cancel notification to original lock holder, but expect no reply. */ -#define LDLM_FL_CANCEL_ON_BLOCK 0x800000 - -/* Flags flags inherited from parent lock when doing intents. */ -#define LDLM_INHERIT_FLAGS (LDLM_FL_CANCEL_ON_BLOCK) - -/* These are flags that are mapped into the flags and ASTs of blocking locks */ -#define LDLM_AST_DISCARD_DATA 0x80000000 /* Add FL_DISCARD to blocking ASTs */ -/* Flags sent in AST lock_flags to be mapped into the receiving lock. */ -#define LDLM_AST_FLAGS (LDLM_FL_DISCARD_DATA) - -/* completion ast to be executed */ -#define LDLM_FL_CP_REQD 0x1000000 - -/* cleanup_resource has already handled the lock */ -#define LDLM_FL_CLEANED 0x2000000 - -/* optimization hint: LDLM can run blocking callback from current context - * w/o involving separate thread. in order to decrease cs rate */ -#define LDLM_FL_ATOMIC_CB 0x4000000 - -/* It may happen that a client initiate 2 operations, e.g. unlink and mkdir, - * such that server send blocking ast for conflict locks to this client for - * the 1st operation, whereas the 2nd operation has canceled this lock and - * is waiting for rpc_lock which is taken by the 1st operation. - * LDLM_FL_BL_AST is to be set by ldlm_callback_handler() to the lock not allow - * ELC code to cancel it. - * LDLM_FL_BL_DONE is to be set by ldlm_cancel_callback() when lock cache is - * droped to let ldlm_callback_handler() return EINVAL to the server. It is - * used when ELC rpc is already prepared and is waiting for rpc_lock, too late - * to send a separate CANCEL rpc. */ -#define LDLM_FL_BL_AST 0x10000000 -#define LDLM_FL_BL_DONE 0x20000000 - -/* measure lock contention and return -EUSERS if locking contention is high */ -#define LDLM_FL_DENY_ON_CONTENTION 0x40000000 - -/* The blocking callback is overloaded to perform two functions. These flags - * indicate which operation should be performed. */ -#define LDLM_CB_BLOCKING 1 -#define LDLM_CB_CANCELING 2 - -/* position flag of skip list pointers */ -#define LDLM_SL_HEAD(skip_list) ((skip_list)->next != NULL) -#define LDLM_SL_TAIL(skip_list) ((skip_list)->prev != NULL) -#define LDLM_SL_EMPTY(skip_list) ((skip_list)->next == NULL && \ - (skip_list)->prev == NULL) - -/* compatibility matrix */ -#define LCK_COMPAT_EX LCK_NL -#define LCK_COMPAT_PW (LCK_COMPAT_EX | LCK_CR) -#define LCK_COMPAT_PR (LCK_COMPAT_PW | LCK_PR) -#define LCK_COMPAT_CW (LCK_COMPAT_PW | LCK_CW) -#define LCK_COMPAT_CR (LCK_COMPAT_CW | LCK_PR | LCK_PW) -#define LCK_COMPAT_NL (LCK_COMPAT_CR | LCK_EX | LCK_GROUP) -#define LCK_COMPAT_GROUP (LCK_GROUP | LCK_NL) - -extern ldlm_mode_t lck_compat_array[]; - -static inline void lockmode_verify(ldlm_mode_t mode) -{ - LASSERT(mode > LCK_MINMODE && mode < LCK_MAXMODE); -} - -static inline int lockmode_compat(ldlm_mode_t exist, ldlm_mode_t new) -{ - return (lck_compat_array[exist] & new); -} - -/* - * - * cluster name spaces - * - */ - -#define DLM_OST_NAMESPACE 1 -#define DLM_MDS_NAMESPACE 2 - -/* XXX - - do we just separate this by security domains and use a prefix for - multiple namespaces in the same domain? - - -*/ - -/* - * Locking rules: - * - * lr_lock - * - * lr_lock - * waiting_locks_spinlock - * - * lr_lock - * led_lock - * - * lr_lock - * ns_unused_lock - * - * lr_lvb_sem - * lr_lock - * - */ - -struct ldlm_pool; -struct ldlm_lock; -struct ldlm_resource; -struct ldlm_namespace; - -struct ldlm_pool_ops { - int (*po_recalc)(struct ldlm_pool *pl); - int (*po_shrink)(struct ldlm_pool *pl, int nr, - unsigned int gfp_mask); - int (*po_setup)(struct ldlm_pool *pl, int limit); -}; - -/* One second for pools thread check interval. */ -#define LDLM_POOLS_THREAD_PERIOD (1) - -/* 5% margin for modest pools. See ldlm_pool.c for details. */ -#define LDLM_POOLS_MODEST_MARGIN (5) - -/* A change to SLV in % after which we want to wake up pools thread asap. */ -#define LDLM_POOLS_FAST_SLV_CHANGE (50) - -struct ldlm_pool { - /* Common pool fields */ - cfs_proc_dir_entry_t *pl_proc_dir; /* Pool proc directory. */ - char pl_name[100]; /* Pool name, should be long - * enough to contain complex - * proc entry name. */ - spinlock_t pl_lock; /* Lock for protecting slv/clv - * updates. */ - atomic_t pl_limit; /* Number of allowed locks in - * in pool, both, client and - * server side. */ - atomic_t pl_granted; /* Number of granted locks. */ - atomic_t pl_grant_rate; /* Grant rate per T. */ - atomic_t pl_cancel_rate; /* Cancel rate per T. */ - atomic_t pl_grant_speed; /* Grant speed (GR-CR) per T. */ - __u64 pl_server_lock_volume; /* Server lock volume. - * Protected by pl_lock */ - atomic_t pl_lock_volume_factor; /* Lock volume factor. */ - - time_t pl_recalc_time; /* Time when last slv from - * server was obtained. */ - struct ldlm_pool_ops *pl_ops; /* Recalc and shrink ops. */ - - int pl_grant_plan; /* Planned number of granted - * locks for next T. */ - int pl_grant_step; /* Grant plan step for next - * T. */ - - struct lprocfs_stats *pl_stats; /* Pool statistics. */ -}; - -typedef int (*ldlm_res_policy)(struct ldlm_namespace *, struct ldlm_lock **, - void *req_cookie, ldlm_mode_t mode, int flags, - void *data); - -struct ldlm_valblock_ops { - int (*lvbo_init)(struct ldlm_resource *res); - int (*lvbo_update)(struct ldlm_resource *res, struct lustre_msg *m, - int buf_idx, int increase); -}; - -typedef enum { - LDLM_NAMESPACE_GREEDY = 1 << 0, - LDLM_NAMESPACE_MODEST = 1 << 1 -} ldlm_appetite_t; - -/* default values for the "max_nolock_size", "contention_time" - * and "contended_locks" namespace tunables */ -#define NS_DEFAULT_MAX_NOLOCK_BYTES 0 -#define NS_DEFAULT_CONTENTION_SECONDS 2 -#define NS_DEFAULT_CONTENDED_LOCKS 32 - -/* Default value for ->ns_shrink_thumb. If lock is not extent one its cost - * is one page. Here we have 256 pages which is 1M on i386. Thus by default - * all extent locks which have more than 1M long extent will be kept in lru, - * others (including ibits locks) will be canceled on memory pressure event. */ -#define LDLM_LOCK_SHRINK_THUMB 256 - -struct ldlm_namespace { - char *ns_name; - ldlm_side_t ns_client; /* is this a client-side lock tree? */ - __u64 ns_connect_flags; /* ns connect flags supported - * by server (may be changed via proc, - * lru resize may be disabled/enabled) */ - __u64 ns_orig_connect_flags; /* client side orig connect - * flags supported by server */ - struct list_head *ns_hash; /* hash table for ns */ - spinlock_t ns_hash_lock; - __u32 ns_refcount; /* count of resources in the hash */ - struct list_head ns_root_list; /* all root resources in ns */ - struct list_head ns_list_chain; /* position in global NS list */ - - struct list_head ns_unused_list; /* all root resources in ns */ - int ns_nr_unused; - spinlock_t ns_unused_lock; - - unsigned int ns_max_unused; - unsigned int ns_max_age; - - /* Lower limit to number of pages in lock to keep it in cache */ - unsigned int ns_shrink_thumb; - cfs_time_t ns_next_dump; /* next debug dump, jiffies */ - - atomic_t ns_locks; - __u64 ns_resources; - ldlm_res_policy ns_policy; - struct ldlm_valblock_ops *ns_lvbo; - void *ns_lvbp; - cfs_waitq_t ns_waitq; - struct ldlm_pool ns_pool; - ldlm_appetite_t ns_appetite; - - /* if more than @ns_contented_locks found, the resource considered - * as contended */ - unsigned ns_contended_locks; - /* the resource remembers contended state during @ns_contention_time, - * in seconds */ - unsigned ns_contention_time; - /* limit size of nolock requests, in bytes */ - unsigned ns_max_nolock_size; - - struct adaptive_timeout ns_at_estimate;/* estimated lock callback time*/ -}; - -static inline int ns_is_client(struct ldlm_namespace *ns) -{ - LASSERT(ns != NULL); - LASSERT(!(ns->ns_client & ~(LDLM_NAMESPACE_CLIENT | - LDLM_NAMESPACE_SERVER))); - LASSERT(ns->ns_client == LDLM_NAMESPACE_CLIENT || - ns->ns_client == LDLM_NAMESPACE_SERVER); - return ns->ns_client == LDLM_NAMESPACE_CLIENT; -} - -static inline int ns_is_server(struct ldlm_namespace *ns) -{ - LASSERT(ns != NULL); - LASSERT(!(ns->ns_client & ~(LDLM_NAMESPACE_CLIENT | - LDLM_NAMESPACE_SERVER))); - LASSERT(ns->ns_client == LDLM_NAMESPACE_CLIENT || - ns->ns_client == LDLM_NAMESPACE_SERVER); - return ns->ns_client == LDLM_NAMESPACE_SERVER; -} - -static inline int ns_connect_lru_resize(struct ldlm_namespace *ns) -{ - LASSERT(ns != NULL); - return !!(ns->ns_connect_flags & OBD_CONNECT_LRU_RESIZE); -} - -/* - * - * Resource hash table - * - */ - -#define RES_HASH_BITS 10 -#define RES_HASH_SIZE (1UL << RES_HASH_BITS) -#define RES_HASH_MASK (RES_HASH_SIZE - 1) - -struct ldlm_lock; - -typedef int (*ldlm_blocking_callback)(struct ldlm_lock *lock, - struct ldlm_lock_desc *new, void *data, - int flag); -typedef int (*ldlm_completion_callback)(struct ldlm_lock *lock, int flags, - void *data); -typedef int (*ldlm_glimpse_callback)(struct ldlm_lock *lock, void *data); - -/* Interval node data for each LDLM_EXTENT lock */ -struct ldlm_interval { - struct interval_node li_node; /* node for tree mgmt */ - struct list_head li_group; /* the locks which have the same - * policy - group of the policy */ -}; -#define to_ldlm_interval(n) container_of(n, struct ldlm_interval, li_node) - -/* the interval tree must be accessed inside the resource lock. */ -struct ldlm_interval_tree { - /* tree size, this variable is used to count - * granted PW locks in ldlm_extent_policy()*/ - int lit_size; - ldlm_mode_t lit_mode; /* lock mode */ - struct interval_node *lit_root; /* actually ldlm_interval */ -}; - -struct ldlm_lock { - struct portals_handle l_handle; // must be first in the structure - atomic_t l_refc; - - /* internal spinlock protects l_resource. we should hold this lock - * first before grabbing res_lock.*/ - spinlock_t l_lock; - - /* ldlm_lock_change_resource() can change this */ - struct ldlm_resource *l_resource; - - /* protected by ns_hash_lock. FIXME */ - struct list_head l_lru; - - /* protected by lr_lock */ - struct list_head l_res_link; // position in one of three res lists - - struct list_head l_sl_mode; // skip pointer for request mode - struct list_head l_sl_policy; // skip pointer for inodebits - - struct ldlm_interval *l_tree_node; /* tree node for ldlm_extent */ - - /* protected by led_lock */ - struct list_head l_export_chain; // per-export chain of locks - - /* protected by lr_lock */ - ldlm_mode_t l_req_mode; - ldlm_mode_t l_granted_mode; - - ldlm_completion_callback l_completion_ast; - ldlm_blocking_callback l_blocking_ast; - ldlm_glimpse_callback l_glimpse_ast; - - struct obd_export *l_export; - struct obd_export *l_conn_export; - - struct lustre_handle l_remote_handle; - ldlm_policy_data_t l_policy_data; - - /* protected by lr_lock */ - __u32 l_flags; - __u32 l_readers; - __u32 l_writers; - __u8 l_destroyed; - - /* If the lock is granted, a process sleeps on this waitq to learn when - * it's no longer in use. If the lock is not granted, a process sleeps - * on this waitq to learn when it becomes granted. */ - cfs_waitq_t l_waitq; - struct timeval l_enqueued_time; - - cfs_time_t l_last_used; /* jiffies */ - struct ldlm_extent l_req_extent; - - /* Client-side-only members */ - __u32 l_lvb_len; /* temporary storage for */ - void *l_lvb_data; /* an LVB received during */ - void *l_lvb_swabber; /* an enqueue */ - void *l_ast_data; - spinlock_t l_extents_list_lock; - struct list_head l_extents_list; - - struct list_head l_cache_locks_list; - - /* Server-side-only members */ - - /* protected by elt_lock */ - struct list_head l_pending_chain; /* callbacks pending */ - cfs_time_t l_callback_timeout; /* jiffies */ - - __u32 l_pid; /* pid which created this lock */ - - /* for ldlm_add_ast_work_item() */ - struct list_head l_bl_ast; - struct list_head l_cp_ast; - struct ldlm_lock *l_blocking_lock; - int l_bl_ast_run; -}; - -struct ldlm_resource { - struct ldlm_namespace *lr_namespace; - - /* protected by ns_hash_lock */ - struct list_head lr_hash; - struct ldlm_resource *lr_parent; /* 0 for a root resource */ - struct list_head lr_children; /* list head for child resources */ - struct list_head lr_childof; /* part of ns_root_list if root res, - * part of lr_children if child */ - spinlock_t lr_lock; - - /* protected by lr_lock */ - struct list_head lr_granted; - struct list_head lr_converting; - struct list_head lr_waiting; - ldlm_mode_t lr_most_restr; - ldlm_type_t lr_type; /* LDLM_{PLAIN,EXTENT,FLOCK} */ - struct ldlm_res_id lr_name; - atomic_t lr_refcount; - - struct ldlm_interval_tree lr_itree[LCK_MODE_NUM]; /* interval trees*/ - - /* Server-side-only lock value block elements */ - struct semaphore lr_lvb_sem; - __u32 lr_lvb_len; - void *lr_lvb_data; - - /* when the resource was considered as contended */ - cfs_time_t lr_contention_time; -}; - -struct ldlm_ast_work { - struct ldlm_lock *w_lock; - int w_blocking; - struct ldlm_lock_desc w_desc; - struct list_head w_list; - int w_flags; - void *w_data; - int w_datalen; -}; - -/* ldlm_enqueue parameters common */ -struct ldlm_enqueue_info { - __u32 ei_type; /* Type of the lock being enqueued. */ - __u32 ei_mode; /* Mode of the lock being enqueued. */ - void *ei_cb_bl; /* Different callbacks for lock handling (blocking, */ - void *ei_cb_cp; /* completion, glimpse) */ - void *ei_cb_gl; - void *ei_cbdata; /* Data to be passed into callbacks. */ -}; - -extern struct obd_ops ldlm_obd_ops; - -extern char *ldlm_lockname[]; -extern char *ldlm_typename[]; -extern char *ldlm_it2str(int it); - -#define ldlm_lock_debug(cdls, level, lock, file, func, line, fmt, a...) do { \ - CHECK_STACK(); \ - \ - if (((level) & D_CANTMASK) != 0 || \ - ((libcfs_debug & (level)) != 0 && \ - (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0)) { \ - static struct libcfs_debug_msg_data _ldlm_dbg_data = \ - DEBUG_MSG_DATA_INIT(cdls, DEBUG_SUBSYSTEM, \ - file, func, line); \ - _ldlm_lock_debug(lock, level, &_ldlm_dbg_data, fmt, \ - ##a ); \ - } \ -} while(0) - -void _ldlm_lock_debug(struct ldlm_lock *lock, __u32 mask, - struct libcfs_debug_msg_data *data, const char *fmt, - ...) - __attribute__ ((format (printf, 4, 5))); - -#define LDLM_ERROR(lock, fmt, a...) do { \ - static cfs_debug_limit_state_t _ldlm_cdls; \ - ldlm_lock_debug(&_ldlm_cdls, D_ERROR, lock, \ - __FILE__, __FUNCTION__, __LINE__, \ - "### " fmt , ##a); \ -} while (0) - -#define LDLM_DEBUG(lock, fmt, a...) do { \ - ldlm_lock_debug(NULL, D_DLMTRACE, lock, \ - __FILE__, __FUNCTION__, __LINE__, \ - "### " fmt , ##a); \ -} while (0) - -#define LDLM_DEBUG_NOLOCK(format, a...) \ - CDEBUG(D_DLMTRACE, "### " format "\n" , ##a) - -typedef int (*ldlm_processing_policy)(struct ldlm_lock *lock, int *flags, - int first_enq, ldlm_error_t *err, - struct list_head *work_list); - -/* - * Iterators. - */ - -#define LDLM_ITER_CONTINUE 1 /* keep iterating */ -#define LDLM_ITER_STOP 2 /* stop iterating */ - -typedef int (*ldlm_iterator_t)(struct ldlm_lock *, void *); -typedef int (*ldlm_res_iterator_t)(struct ldlm_resource *, void *); - -int ldlm_resource_foreach(struct ldlm_resource *res, ldlm_iterator_t iter, - void *closure); -int ldlm_namespace_foreach(struct ldlm_namespace *ns, ldlm_iterator_t iter, - void *closure); -int ldlm_namespace_foreach_res(struct ldlm_namespace *ns, - ldlm_res_iterator_t iter, void *closure); - -int ldlm_replay_locks(struct obd_import *imp); -void ldlm_resource_iterate(struct ldlm_namespace *, struct ldlm_res_id *, - ldlm_iterator_t iter, void *data); - -/* ldlm_flock.c */ -int ldlm_flock_completion_ast(struct ldlm_lock *lock, int flags, void *data); - -/* ldlm_extent.c */ -__u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms); - - -/* ldlm_lockd.c */ -int ldlm_server_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *, - void *data, int flag); -int ldlm_server_completion_ast(struct ldlm_lock *lock, int flags, void *data); -int ldlm_server_glimpse_ast(struct ldlm_lock *lock, void *data); -int ldlm_handle_enqueue(struct ptlrpc_request *req, ldlm_completion_callback, - ldlm_blocking_callback, ldlm_glimpse_callback); -int ldlm_handle_convert(struct ptlrpc_request *req); -int ldlm_handle_cancel(struct ptlrpc_request *req); -int ldlm_request_cancel(struct ptlrpc_request *req, - struct ldlm_request *dlm_req, int first); -int ldlm_del_waiting_lock(struct ldlm_lock *lock); -int ldlm_refresh_waiting_lock(struct ldlm_lock *lock); -int ldlm_get_ref(void); -void ldlm_put_ref(int force); - -/* ldlm_lock.c */ -ldlm_processing_policy ldlm_get_processing_policy(struct ldlm_resource *res); -void ldlm_register_intent(struct ldlm_namespace *ns, ldlm_res_policy arg); -void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh); -struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *, int flags); -void ldlm_cancel_callback(struct ldlm_lock *); -int ldlm_lock_set_data(struct lustre_handle *, void *data); -int ldlm_lock_remove_from_lru(struct ldlm_lock *); -struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *, - struct lustre_handle *); - -static inline struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *h) -{ - return __ldlm_handle2lock(h, 0); -} - -static inline int ldlm_res_lvbo_update(struct ldlm_resource *res, - struct lustre_msg *m, int buf_idx, - int increase) -{ - if (res->lr_namespace->ns_lvbo && - res->lr_namespace->ns_lvbo->lvbo_update) { - return res->lr_namespace->ns_lvbo->lvbo_update(res, m, buf_idx, - increase); - } - return 0; -} - -#define LDLM_LOCK_PUT(lock) \ -do { \ - /*LDLM_DEBUG((lock), "put");*/ \ - ldlm_lock_put(lock); \ -} while (0) - -#define LDLM_LOCK_GET(lock) \ -({ \ - ldlm_lock_get(lock); \ - /*LDLM_DEBUG((lock), "get");*/ \ - lock; \ -}) - -#define ldlm_lock_list_put(head, member, count) \ -({ \ - struct ldlm_lock *_lock, *_next; \ - int c = count; \ - list_for_each_entry_safe(_lock, _next, head, member) { \ - if (c-- == 0) \ - break; \ - list_del_init(&_lock->member); \ - LDLM_LOCK_PUT(_lock); \ - } \ - LASSERT(c <= 0); \ -}) - -struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock); -void ldlm_lock_put(struct ldlm_lock *lock); -void ldlm_lock_destroy(struct ldlm_lock *lock); -void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc); -void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode); -void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode); -void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode); -void ldlm_lock_allow_match(struct ldlm_lock *lock); -ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, int flags, - struct ldlm_res_id *, ldlm_type_t type, - ldlm_policy_data_t *, ldlm_mode_t mode, - struct lustre_handle *); -struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode, - __u32 *flags); -void ldlm_lock_cancel(struct ldlm_lock *lock); -void ldlm_cancel_locks_for_export(struct obd_export *export); -void ldlm_reprocess_all(struct ldlm_resource *res); -void ldlm_reprocess_all_ns(struct ldlm_namespace *ns); -void ldlm_lock_dump(int level, struct ldlm_lock *lock, int pos); -void ldlm_lock_dump_handle(int level, struct lustre_handle *); -void ldlm_unlink_lock_skiplist(struct ldlm_lock *req); - -/* resource.c */ -struct ldlm_namespace *ldlm_namespace_new(char *name, ldlm_side_t client, - ldlm_appetite_t apt); -int ldlm_namespace_cleanup(struct ldlm_namespace *ns, int flags); -int ldlm_namespace_free(struct ldlm_namespace *ns, int force); -void ldlm_namespace_move(struct ldlm_namespace *ns, ldlm_side_t client); -struct ldlm_namespace *ldlm_namespace_first(ldlm_side_t client); -void ldlm_namespace_get(struct ldlm_namespace *ns); -void ldlm_namespace_put(struct ldlm_namespace *ns, int wakeup); -void ldlm_namespace_get_nolock(struct ldlm_namespace *ns); -void ldlm_namespace_put_nolock(struct ldlm_namespace *ns, int wakeup); -int ldlm_proc_setup(void); -#ifdef LPROCFS -void ldlm_proc_cleanup(void); -#else -static inline void ldlm_proc_cleanup(void) {} -#endif - -/* resource.c - internal */ -struct ldlm_resource *ldlm_resource_get(struct ldlm_namespace *ns, - struct ldlm_resource *parent, - struct ldlm_res_id, ldlm_type_t type, - int create); -struct ldlm_resource *ldlm_resource_getref(struct ldlm_resource *res); -int ldlm_resource_putref(struct ldlm_resource *res); -void ldlm_resource_add_lock(struct ldlm_resource *res, struct list_head *head, - struct ldlm_lock *lock); -void ldlm_resource_unlink_lock(struct ldlm_lock *lock); -void ldlm_res2desc(struct ldlm_resource *res, struct ldlm_resource_desc *desc); -void ldlm_dump_all_namespaces(ldlm_side_t client, int level); -void ldlm_namespace_dump(int level, struct ldlm_namespace *); -void ldlm_resource_dump(int level, struct ldlm_resource *); -int ldlm_lock_change_resource(struct ldlm_namespace *, struct ldlm_lock *, - struct ldlm_res_id); - -/* ldlm_request.c */ -int ldlm_expired_completion_wait(void *data); -int ldlm_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, - void *data, int flag); -int ldlm_glimpse_ast(struct ldlm_lock *lock, void *reqp); -int ldlm_completion_ast(struct ldlm_lock *lock, int flags, void *data); -int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **req, - struct ldlm_enqueue_info *einfo, struct ldlm_res_id res_id, - ldlm_policy_data_t *policy, int *flags, - void *lvb, __u32 lvb_len, void *lvb_swabber, - struct lustre_handle *lockh, int async); -struct ptlrpc_request *ldlm_prep_enqueue_req(struct obd_export *exp, - int bufcount, int *size, - struct list_head *head, int count); -struct ptlrpc_request *ldlm_prep_elc_req(struct obd_export *exp, int version, - int opc, int bufcount, int *size, - int bufoff, int canceloff, - struct list_head *cancels, int count); -int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, - ldlm_type_t type, __u8 with_policy, ldlm_mode_t mode, - int *flags, void *lvb, __u32 lvb_len, - void *lvb_swabber, struct lustre_handle *lockh, - int rc); -int ldlm_cli_enqueue_local(struct ldlm_namespace *ns, - struct ldlm_res_id *res_id, - ldlm_type_t type, ldlm_policy_data_t *policy, - ldlm_mode_t mode, int *flags, - ldlm_blocking_callback blocking, - ldlm_completion_callback completion, - ldlm_glimpse_callback glimpse, - void *data, __u32 lvb_len, void *lvb_swabber, - struct lustre_handle *lockh); -int ldlm_server_ast(struct lustre_handle *lockh, struct ldlm_lock_desc *new, - void *data, __u32 data_len); -int ldlm_cli_convert(struct lustre_handle *, int new_mode, __u32 *flags); -int ldlm_cli_update_pool(struct ptlrpc_request *req); -int ldlm_cli_cancel(struct lustre_handle *lockh); -int ldlm_cli_cancel_unused(struct ldlm_namespace *, struct ldlm_res_id *, - int flags, void *opaque); -int ldlm_cli_cancel_req(struct obd_export *exp, - struct list_head *head, int count); -int ldlm_cli_join_lru(struct ldlm_namespace *, struct ldlm_res_id *, int join); -int ldlm_cancel_resource_local(struct ldlm_resource *res, - struct list_head *cancels, - ldlm_policy_data_t *policy, ldlm_mode_t mode, - int lock_flags, int cancel_flags, void *opaque); -int ldlm_cli_cancel_list(struct list_head *head, int count, - struct ptlrpc_request *req, int off); -/* mds/handler.c */ -/* This has to be here because recursive inclusion sucks. */ -int intent_disposition(struct ldlm_reply *rep, int flag); -void intent_set_disposition(struct ldlm_reply *rep, int flag); - - -/* ioctls for trying requests */ -#define IOC_LDLM_TYPE 'f' -#define IOC_LDLM_MIN_NR 40 - -#define IOC_LDLM_TEST _IOWR('f', 40, long) -#define IOC_LDLM_DUMP _IOWR('f', 41, long) -#define IOC_LDLM_REGRESS_START _IOWR('f', 42, long) -#define IOC_LDLM_REGRESS_STOP _IOWR('f', 43, long) -#define IOC_LDLM_MAX_NR 43 - -static inline void lock_res(struct ldlm_resource *res) -{ - spin_lock(&res->lr_lock); -} - -static inline void unlock_res(struct ldlm_resource *res) -{ - spin_unlock(&res->lr_lock); -} - -static inline void check_res_locked(struct ldlm_resource *res) -{ - LASSERT_SPIN_LOCKED(&res->lr_lock); -} - -struct ldlm_resource * lock_res_and_lock(struct ldlm_lock *lock); -void unlock_res_and_lock(struct ldlm_lock *lock); - -/* ldlm_pool.c */ -void ldlm_pools_recalc(ldlm_side_t client); -int ldlm_pools_init(void); -void ldlm_pools_fini(void); -void ldlm_pools_wakeup(void); - -int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns, - int idx, ldlm_side_t client); -int ldlm_pool_shrink(struct ldlm_pool *pl, int nr, - unsigned int gfp_mask); -void ldlm_pool_fini(struct ldlm_pool *pl); -int ldlm_pool_setup(struct ldlm_pool *pl, int limit); -int ldlm_pool_recalc(struct ldlm_pool *pl); -__u64 ldlm_pool_get_slv(struct ldlm_pool *pl); -__u32 ldlm_pool_get_limit(struct ldlm_pool *pl); -void ldlm_pool_set_slv(struct ldlm_pool *pl, __u64 slv); -void ldlm_pool_set_limit(struct ldlm_pool *pl, __u32 limit); -void ldlm_pool_add(struct ldlm_pool *pl, struct ldlm_lock *lock); -void ldlm_pool_del(struct ldlm_pool *pl, struct ldlm_lock *lock); -#endif diff --git a/lustre/include/lustre_export.h b/lustre/include/lustre_export.h deleted file mode 100644 index 7ece7a25bf..0000000000 --- a/lustre/include/lustre_export.h +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef __EXPORT_H -#define __EXPORT_H - -#include <lustre/lustre_idl.h> -#include <lustre_dlm.h> -#include <lprocfs_status.h> - -/* Data stored per client in the last_rcvd file. In le32 order. */ -struct mds_client_data; - -struct mds_export_data { - struct list_head med_open_head; - spinlock_t med_open_lock; /* lock med_open_head, mfd_list*/ - struct mds_client_data *med_mcd; - __u64 med_ibits_known; - loff_t med_lr_off; - int med_lr_idx; -}; - -struct osc_creator { - spinlock_t oscc_lock; - struct list_head oscc_list; - struct obd_device *oscc_obd; - obd_id oscc_last_id;//last available pre-created object - obd_id oscc_next_id;// what object id to give out next - int oscc_grow_count; - struct obdo oscc_oa; - int oscc_flags; - cfs_waitq_t oscc_waitq; /* creating procs wait on this */ -}; - -struct ldlm_export_data { - struct list_head led_held_locks; /* protected by led_lock below */ - spinlock_t led_lock; -}; - -struct ec_export_data { /* echo client */ - struct list_head eced_locks; -}; - -/* In-memory access to client data from OST struct */ -struct filter_client_data; -struct filter_export_data { - spinlock_t fed_lock; /* protects fed_open_head */ - struct filter_client_data *fed_fcd; - loff_t fed_lr_off; - int fed_lr_idx; - long fed_dirty; /* in bytes */ - long fed_grant; /* in bytes */ - struct list_head fed_mod_list; /* files being modified */ - int fed_mod_count;/* items in fed_writing list */ - long fed_pending; /* bytes just being written */ - struct brw_stats fed_brw_stats; -}; - -typedef struct nid_stat { - lnet_nid_t nid; - struct hlist_node nid_hash; - struct list_head nid_list; - struct obd_device *nid_obd; - struct proc_dir_entry *nid_proc; - struct lprocfs_stats *nid_stats; - struct brw_stats *nid_brw_stats; - int nid_exp_ref_count; -}nid_stat_t; - -struct obd_export { - struct portals_handle exp_handle; - atomic_t exp_refcount; - atomic_t exp_rpc_count; - struct obd_uuid exp_client_uuid; - struct list_head exp_obd_chain; - struct hlist_node exp_uuid_hash; /* uuid-export hash*/ - struct hlist_node exp_nid_hash; /* nid-export hash */ - /* exp_obd_chain_timed fo ping evictor, protected by obd_dev_lock */ - struct list_head exp_obd_chain_timed; - struct obd_device *exp_obd; - struct obd_import *exp_imp_reverse; /* to make RPCs backwards */ - struct nid_stat *exp_nid_stats; - struct lprocfs_stats *exp_ldlm_stats; - struct lprocfs_stats *exp_ops_stats; - struct ptlrpc_connection *exp_connection; - __u32 exp_conn_cnt; - struct ldlm_export_data exp_ldlm_data; - struct list_head exp_outstanding_replies; - time_t exp_last_request_time; - spinlock_t exp_lock; /* protects flags int below */ - /* ^ protects exp_outstanding_replies too */ - __u64 exp_connect_flags; - int exp_flags; - unsigned long exp_failed:1, - exp_disconnected:1, - exp_connecting:1, - exp_replay_needed:1, - exp_need_sync:1, /* needs sync from connect */ - exp_libclient:1; /* liblustre client? */ - union { - struct mds_export_data eu_mds_data; - struct filter_export_data eu_filter_data; - struct ec_export_data eu_ec_data; - } u; -}; - -#define exp_mds_data u.eu_mds_data -#define exp_lov_data u.eu_lov_data -#define exp_filter_data u.eu_filter_data -#define exp_ec_data u.eu_ec_data - -static inline int exp_connect_cancelset(struct obd_export *exp) -{ - LASSERT(exp != NULL); - return !!(exp->exp_connect_flags & OBD_CONNECT_CANCELSET); -} - -static inline int exp_connect_lru_resize(struct obd_export *exp) -{ - LASSERT(exp != NULL); - return !!(exp->exp_connect_flags & OBD_CONNECT_LRU_RESIZE); -} - -static inline int imp_connect_lru_resize(struct obd_import *imp) -{ - struct obd_connect_data *ocd; - - LASSERT(imp != NULL); - ocd = &imp->imp_connect_data; - return !!(ocd->ocd_connect_flags & OBD_CONNECT_LRU_RESIZE); -} - -extern struct obd_export *class_conn2export(struct lustre_handle *conn); -extern struct obd_device *class_conn2obd(struct lustre_handle *conn); - -#endif /* __EXPORT_H */ diff --git a/lustre/include/lustre_fsfilt.h b/lustre/include/lustre_fsfilt.h deleted file mode 100644 index 41b943143f..0000000000 --- a/lustre/include/lustre_fsfilt.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2004 Cluster File Systems, Inc. <info@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Filesystem interface helper. - * - */ - -#ifndef _LUSTRE_FSFILT_H -#define _LUSTRE_FSFILT_H - -#if defined(__linux__) -#include <linux/lustre_fsfilt.h> -#elif defined(__APPLE__) -#include <darwin/lustre_fsfilt.h> -#elif defined(__WINNT__) -#include <winnt/lustre_fsfilt.h> -#else -#error Unsupported operating system. -#endif - -#endif diff --git a/lustre/include/lustre_ha.h b/lustre/include/lustre_ha.h deleted file mode 100644 index 43071ba41f..0000000000 --- a/lustre/include/lustre_ha.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _LUSTRE_HA_H -#define _LUSTRE_HA_H - -struct obd_import; -struct obd_export; -struct obd_device; -struct ptlrpc_request; - - -int ptlrpc_replay(struct obd_import *imp); -int ptlrpc_resend(struct obd_import *imp); -void ptlrpc_free_committed(struct obd_import *imp); -void ptlrpc_wake_delayed(struct obd_import *imp); -int ptlrpc_recover_import(struct obd_import *imp, char *new_uuid); -int ptlrpc_set_import_active(struct obd_import *imp, int active); -void ptlrpc_activate_import(struct obd_import *imp); -void ptlrpc_deactivate_import(struct obd_import *imp); -void ptlrpc_invalidate_import(struct obd_import *imp); -void ptlrpc_fail_import(struct obd_import *imp, __u32 conn_cnt); - -#endif diff --git a/lustre/include/lustre_handles.h b/lustre/include/lustre_handles.h deleted file mode 100644 index 918617391c..0000000000 --- a/lustre/include/lustre_handles.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef __LUSTRE_HANDLES_H_ -#define __LUSTRE_HANDLES_H_ - -#if defined(__linux__) -#include <linux/lustre_handles.h> -#elif defined(__APPLE__) -#include <darwin/lustre_handles.h> -#elif defined(__WINNT__) -#include <winnt/lustre_handles.h> -#else -#error Unsupported operating system. -#endif - -typedef void (*portals_handle_addref_cb)(void *object); - -/* These handles are most easily used by having them appear at the very top of - * whatever object that you want to make handles for. ie: - * - * struct ldlm_lock { - * struct portals_handle handle; - * ... - * }; - * - * Now you're able to assign the results of cookie2handle directly to an - * ldlm_lock. If it's not at the top, you'll want to hack up a macro that - * uses some offsetof() magic. */ - -struct portals_handle { - struct list_head h_link; - __u64 h_cookie; - portals_handle_addref_cb h_addref; - - /* newly added fields to handle the RCU issue. -jxiong */ - spinlock_t h_lock; - void *h_ptr; - void (*h_free_cb)(void *, size_t); - struct rcu_head h_rcu; - unsigned int h_size; - __u8 h_in:1; - __u8 h_unused[3]; -}; -#define RCU2HANDLE(rcu) container_of(rcu, struct portals_handle, h_rcu) - -/* handles.c */ - -/* Add a handle to the hash table */ -void class_handle_hash(struct portals_handle *, portals_handle_addref_cb); -void class_handle_unhash(struct portals_handle *); -void *class_handle2object(__u64 cookie); -void class_handle_free_cb(struct rcu_head *); -int class_handle_init(void); -void class_handle_cleanup(void); - -#endif diff --git a/lustre/include/lustre_import.h b/lustre/include/lustre_import.h deleted file mode 100644 index fb663237e7..0000000000 --- a/lustre/include/lustre_import.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef __IMPORT_H -#define __IMPORT_H - -#include <lustre_handles.h> -#include <lustre/lustre_idl.h> - - -/* Adaptive Timeout stuff */ -#define D_ADAPTTO D_OTHER -#define AT_BINS 4 /* "bin" means "N seconds of history" */ -#define AT_FLG_NOHIST 0x1 /* use last reported value only */ - -struct adaptive_timeout { - time_t at_binstart; /* bin start time */ - unsigned int at_hist[AT_BINS]; /* timeout history bins */ - unsigned int at_flags; - unsigned int at_current; /* current timeout value */ - unsigned int at_worst_ever; /* worst-ever timeout value */ - time_t at_worst_time; /* worst-ever timeout timestamp */ - spinlock_t at_lock; -}; - -enum lustre_imp_state { - LUSTRE_IMP_CLOSED = 1, - LUSTRE_IMP_NEW = 2, - LUSTRE_IMP_DISCON = 3, - LUSTRE_IMP_CONNECTING = 4, - LUSTRE_IMP_REPLAY = 5, - LUSTRE_IMP_REPLAY_LOCKS = 6, - LUSTRE_IMP_REPLAY_WAIT = 7, - LUSTRE_IMP_RECOVER = 8, - LUSTRE_IMP_FULL = 9, - LUSTRE_IMP_EVICTED = 10, -}; - -static inline char * ptlrpc_import_state_name(enum lustre_imp_state state) -{ - static char* import_state_names[] = { - "<UNKNOWN>", "CLOSED", "NEW", "DISCONN", - "CONNECTING", "REPLAY", "REPLAY_LOCKS", "REPLAY_WAIT", - "RECOVER", "FULL", "EVICTED", - }; - - LASSERT (state <= LUSTRE_IMP_EVICTED); - return import_state_names[state]; -} - -enum obd_import_event { - IMP_EVENT_DISCON = 0x808001, - IMP_EVENT_INACTIVE = 0x808002, - IMP_EVENT_INVALIDATE = 0x808003, - IMP_EVENT_ACTIVE = 0x808004, - IMP_EVENT_OCD = 0x808005, -}; - -struct obd_import_conn { - struct list_head oic_item; - struct ptlrpc_connection *oic_conn; - struct obd_uuid oic_uuid; - __u64 oic_last_attempt; /* jiffies, 64-bit */ -}; - -#define IMP_AT_MAX_PORTALS 4 -struct imp_at { - int iat_portal[IMP_AT_MAX_PORTALS]; - struct adaptive_timeout iat_net_latency; - struct adaptive_timeout iat_service_estimate[IMP_AT_MAX_PORTALS]; -}; - -struct obd_import { - struct portals_handle imp_handle; - atomic_t imp_refcount; - struct lustre_handle imp_dlm_handle; /* client's ldlm export */ - struct ptlrpc_connection *imp_connection; - struct ptlrpc_client *imp_client; - struct list_head imp_pinger_chain; - struct list_head imp_zombie_chain; /* queue for destruction */ - - /* Lists of requests that are retained for replay, waiting for a reply, - * or waiting for recovery to complete, respectively. - */ - struct list_head imp_replay_list; - struct list_head imp_sending_list; - struct list_head imp_delayed_list; - - struct obd_device *imp_obd; - cfs_waitq_t imp_recovery_waitq; - - atomic_t imp_inflight; - atomic_t imp_replay_inflight; - atomic_t imp_inval_count; - enum lustre_imp_state imp_state; - int imp_generation; - __u32 imp_conn_cnt; - int imp_last_generation_checked; - __u64 imp_last_replay_transno; - __u64 imp_peer_committed_transno; - __u64 imp_last_transno_checked; - struct lustre_handle imp_remote_handle; - cfs_time_t imp_next_ping; /* jiffies */ - __u64 imp_last_success_conn; /* jiffies, 64-bit */ - - /* all available obd_import_conn linked here */ - struct list_head imp_conn_list; - struct obd_import_conn *imp_conn_current; - - /* Protects flags, level, generation, conn_cnt, *_list */ - spinlock_t imp_lock; - - /* flags */ - unsigned long imp_invalid:1, /* evicted */ - imp_deactive:1, /* administratively disabled */ - imp_replayable:1, /* try to recover the import */ - imp_dlm_fake:1, /* don't run recovery (timeout instead) */ - imp_server_timeout:1, /* use 1/2 timeout on MDS' OSCs */ - imp_initial_recov:1, /* retry the initial connection */ - imp_initial_recov_bk:1, /* turn off init_recov after trying all failover nids */ - imp_force_verify:1, /* force an immidiate ping */ - imp_pingable:1, /* pingable */ - imp_resend_replay:1, /* resend for replay */ - imp_recon_bk:1, /* turn off reconnect if all failovers fail */ - imp_last_recon:1; /* internally used by above */ - __u32 imp_connect_op; - struct obd_connect_data imp_connect_data; - __u64 imp_connect_flags_orig; - - __u32 imp_msg_magic; - __u32 imp_msghdr_flags; /* adjusted based on server capability */ - - struct ptlrpc_request_pool *imp_rq_pool; /* emergency request pool */ - - struct imp_at imp_at; /* adaptive timeout data */ - time_t imp_last_reply_time; /* for health check */ -}; - -/* import.c */ -static inline void at_init(struct adaptive_timeout *at, int val, int flags) { - memset(at, 0, sizeof(*at)); - at->at_current = val; - at->at_worst_ever = val; - at->at_worst_time = cfs_time_current_sec(); - at->at_flags = flags; - spin_lock_init(&at->at_lock); -} -static inline int at_get(struct adaptive_timeout *at) { - return at->at_current; -} -int at_add(struct adaptive_timeout *at, unsigned int val); -int import_at_get_index(struct obd_import *imp, int portal); -extern unsigned int at_max; -#define AT_OFF (at_max == 0) - -/* genops.c */ -struct obd_export; -extern struct obd_import *class_exp2cliimp(struct obd_export *); -extern struct obd_import *class_conn2cliimp(struct lustre_handle *); - -#endif /* __IMPORT_H */ diff --git a/lustre/include/lustre_lib.h b/lustre/include/lustre_lib.h deleted file mode 100644 index 67c20a09c9..0000000000 --- a/lustre/include/lustre_lib.h +++ /dev/null @@ -1,762 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Basic Lustre library routines. - * - */ - -#ifndef _LUSTRE_LIB_H -#define _LUSTRE_LIB_H - -#include <libcfs/kp30.h> -#include <lustre/lustre_idl.h> -#include <lustre_ver.h> -#include <lustre_cfg.h> -#if defined(__linux__) -#include <linux/lustre_lib.h> -#elif defined(__APPLE__) -#include <darwin/lustre_lib.h> -#elif defined(__WINNT__) -#include <winnt/lustre_lib.h> -#else -#error Unsupported operating system. -#endif - -/* prng.c */ -unsigned int ll_rand(void); /* returns a random 32-bit integer */ -void ll_srand(unsigned int, unsigned int); /* seed the generator */ -void ll_get_random_bytes(void *buf, int size); - -/* target.c */ -struct ptlrpc_request; -struct recovd_data; -struct recovd_obd; -struct obd_export; -#include <lustre_ha.h> -#include <lustre_net.h> -#include <lvfs.h> - -void target_client_add_cb(struct obd_device *obd, __u64 transno, void *cb_data, - int error); -int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler); -int target_handle_disconnect(struct ptlrpc_request *req); -void target_destroy_export(struct obd_export *exp); -int target_handle_reconnect(struct lustre_handle *conn, struct obd_export *exp, - struct obd_uuid *cluuid); -int target_handle_ping(struct ptlrpc_request *req); -int target_pack_pool_reply(struct ptlrpc_request *req); -void target_committed_to_req(struct ptlrpc_request *req); - -#ifdef HAVE_QUOTA_SUPPORT -/* quotacheck callback, dqacq/dqrel callback handler */ -int target_handle_qc_callback(struct ptlrpc_request *req); -int target_handle_dqacq_callback(struct ptlrpc_request *req); -#else -#define target_handle_dqacq_callback(req) ldlm_callback_reply(req, -ENOTSUPP) -#define target_handle_qc_callback(req) (0) -#endif - -void target_cancel_recovery_timer(struct obd_device *obd); -void target_abort_recovery(void *data); -void target_cleanup_recovery(struct obd_device *obd); -int target_queue_recovery_request(struct ptlrpc_request *req, - struct obd_device *obd); -int target_queue_last_replay_reply(struct ptlrpc_request *req, int rc); -void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id); - -/* client.c */ - -int client_sanobd_setup(struct obd_device *obddev, obd_count len, void *buf); -struct client_obd *client_conn2cli(struct lustre_handle *conn); - -struct mdc_open_data; -struct obd_client_handle { - struct lustre_handle och_fh; - struct llog_cookie och_cookie; - struct mdc_open_data *och_mod; - __u32 och_magic; -}; -#define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed - -/* statfs_pack.c */ -void statfs_pack(struct obd_statfs *osfs, struct kstatfs *sfs); -void statfs_unpack(struct kstatfs *sfs, struct obd_statfs *osfs); - -/* l_lock.c */ -struct lustre_lock { - int l_depth; - cfs_task_t *l_owner; - struct semaphore l_sem; - spinlock_t l_spin; -}; - -void l_lock_init(struct lustre_lock *); -void l_lock(struct lustre_lock *); -void l_unlock(struct lustre_lock *); -int l_has_lock(struct lustre_lock *); - - -/* - * OBD IOCTLS - */ -#define OBD_IOCTL_VERSION 0x00010004 - -struct obd_ioctl_data { - __u32 ioc_len; - __u32 ioc_version; - - __u64 ioc_cookie; - __u32 ioc_conn1; - __u32 ioc_conn2; - - struct obdo ioc_obdo1; - struct obdo ioc_obdo2; - - obd_size ioc_count; - obd_off ioc_offset; - __u32 ioc_dev; - __u32 ioc_command; - - __u64 ioc_nid; - __u32 ioc_nal; - __u32 ioc_type; - - /* buffers the kernel will treat as user pointers */ - __u32 ioc_plen1; - char *ioc_pbuf1; - __u32 ioc_plen2; - char *ioc_pbuf2; - - /* inline buffers for various arguments */ - __u32 ioc_inllen1; - char *ioc_inlbuf1; - __u32 ioc_inllen2; - char *ioc_inlbuf2; - __u32 ioc_inllen3; - char *ioc_inlbuf3; - __u32 ioc_inllen4; - char *ioc_inlbuf4; - - char ioc_bulk[0]; -}; - -struct obd_ioctl_hdr { - __u32 ioc_len; - __u32 ioc_version; -}; - -static inline int obd_ioctl_packlen(struct obd_ioctl_data *data) -{ - int len = size_round(sizeof(struct obd_ioctl_data)); - len += size_round(data->ioc_inllen1); - len += size_round(data->ioc_inllen2); - len += size_round(data->ioc_inllen3); - len += size_round(data->ioc_inllen4); - return len; -} - - -static inline int obd_ioctl_is_invalid(struct obd_ioctl_data *data) -{ - if (data->ioc_len > (1<<30)) { - CERROR("OBD ioctl: ioc_len larger than 1<<30\n"); - return 1; - } - if (data->ioc_inllen1 > (1<<30)) { - CERROR("OBD ioctl: ioc_inllen1 larger than 1<<30\n"); - return 1; - } - if (data->ioc_inllen2 > (1<<30)) { - CERROR("OBD ioctl: ioc_inllen2 larger than 1<<30\n"); - return 1; - } - if (data->ioc_inllen3 > (1<<30)) { - CERROR("OBD ioctl: ioc_inllen3 larger than 1<<30\n"); - return 1; - } - if (data->ioc_inllen4 > (1<<30)) { - CERROR("OBD ioctl: ioc_inllen4 larger than 1<<30\n"); - return 1; - } - if (data->ioc_inlbuf1 && !data->ioc_inllen1) { - CERROR("OBD ioctl: inlbuf1 pointer but 0 length\n"); - return 1; - } - if (data->ioc_inlbuf2 && !data->ioc_inllen2) { - CERROR("OBD ioctl: inlbuf2 pointer but 0 length\n"); - return 1; - } - if (data->ioc_inlbuf3 && !data->ioc_inllen3) { - CERROR("OBD ioctl: inlbuf3 pointer but 0 length\n"); - return 1; - } - if (data->ioc_inlbuf4 && !data->ioc_inllen4) { - CERROR("OBD ioctl: inlbuf4 pointer but 0 length\n"); - return 1; - } - if (data->ioc_pbuf1 && !data->ioc_plen1) { - CERROR("OBD ioctl: pbuf1 pointer but 0 length\n"); - return 1; - } - if (data->ioc_pbuf2 && !data->ioc_plen2) { - CERROR("OBD ioctl: pbuf2 pointer but 0 length\n"); - return 1; - } - if (data->ioc_plen1 && !data->ioc_pbuf1) { - CERROR("OBD ioctl: plen1 set but NULL pointer\n"); - return 1; - } - if (data->ioc_plen2 && !data->ioc_pbuf2) { - CERROR("OBD ioctl: plen2 set but NULL pointer\n"); - return 1; - } - if (obd_ioctl_packlen(data) > data->ioc_len) { - CERROR("OBD ioctl: packlen exceeds ioc_len (%d > %d)\n", - obd_ioctl_packlen(data), data->ioc_len); - return 1; - } - return 0; -} - -#ifndef __KERNEL__ -static inline int obd_ioctl_pack(struct obd_ioctl_data *data, char **pbuf, - int max) -{ - char *ptr; - struct obd_ioctl_data *overlay; - data->ioc_len = obd_ioctl_packlen(data); - data->ioc_version = OBD_IOCTL_VERSION; - - if (*pbuf && data->ioc_len > max) - return -EINVAL; - if (*pbuf == NULL) { - *pbuf = malloc(data->ioc_len); - } - if (!*pbuf) - return -ENOMEM; - overlay = (struct obd_ioctl_data *)*pbuf; - memcpy(*pbuf, data, sizeof(*data)); - - ptr = overlay->ioc_bulk; - if (data->ioc_inlbuf1) - LOGL(data->ioc_inlbuf1, data->ioc_inllen1, ptr); - if (data->ioc_inlbuf2) - LOGL(data->ioc_inlbuf2, data->ioc_inllen2, ptr); - if (data->ioc_inlbuf3) - LOGL(data->ioc_inlbuf3, data->ioc_inllen3, ptr); - if (data->ioc_inlbuf4) - LOGL(data->ioc_inlbuf4, data->ioc_inllen4, ptr); - if (obd_ioctl_is_invalid(overlay)) - return -EINVAL; - - return 0; -} - -static inline int obd_ioctl_unpack(struct obd_ioctl_data *data, char *pbuf, - int max) -{ - char *ptr; - struct obd_ioctl_data *overlay; - - if (!pbuf) - return 1; - overlay = (struct obd_ioctl_data *)pbuf; - - /* Preserve the caller's buffer pointers */ - overlay->ioc_inlbuf1 = data->ioc_inlbuf1; - overlay->ioc_inlbuf2 = data->ioc_inlbuf2; - overlay->ioc_inlbuf3 = data->ioc_inlbuf3; - overlay->ioc_inlbuf4 = data->ioc_inlbuf4; - - memcpy(data, pbuf, sizeof(*data)); - - ptr = overlay->ioc_bulk; - if (data->ioc_inlbuf1) - LOGU(data->ioc_inlbuf1, data->ioc_inllen1, ptr); - if (data->ioc_inlbuf2) - LOGU(data->ioc_inlbuf2, data->ioc_inllen2, ptr); - if (data->ioc_inlbuf3) - LOGU(data->ioc_inlbuf3, data->ioc_inllen3, ptr); - if (data->ioc_inlbuf4) - LOGU(data->ioc_inlbuf4, data->ioc_inllen4, ptr); - - return 0; -} -#endif - -#include <obd_support.h> - -#ifdef __KERNEL__ -/* function defined in lustre/obdclass/<platform>/<platform>-module.c */ -int obd_ioctl_getdata(char **buf, int *len, void *arg); -int obd_ioctl_popdata(void *arg, void *data, int len); -#else -/* buffer MUST be at least the size of obd_ioctl_hdr */ -static inline int obd_ioctl_getdata(char **buf, int *len, void *arg) -{ - struct obd_ioctl_hdr hdr; - struct obd_ioctl_data *data; - int err; - int offset = 0; - ENTRY; - - err = copy_from_user(&hdr, (void *)arg, sizeof(hdr)); - if (err) - RETURN(err); - - if (hdr.ioc_version != OBD_IOCTL_VERSION) { - CERROR("Version mismatch kernel vs application\n"); - RETURN(-EINVAL); - } - - if (hdr.ioc_len > OBD_MAX_IOCTL_BUFFER) { - CERROR("User buffer len %d exceeds %d max buffer\n", - hdr.ioc_len, OBD_MAX_IOCTL_BUFFER); - RETURN(-EINVAL); - } - - if (hdr.ioc_len < sizeof(struct obd_ioctl_data)) { - CERROR("User buffer too small for ioctl (%d)\n", hdr.ioc_len); - RETURN(-EINVAL); - } - - /* XXX allocate this more intelligently, using kmalloc when - * appropriate */ - OBD_VMALLOC(*buf, hdr.ioc_len); - if (*buf == NULL) { - CERROR("Cannot allocate control buffer of len %d\n", - hdr.ioc_len); - RETURN(-EINVAL); - } - *len = hdr.ioc_len; - data = (struct obd_ioctl_data *)*buf; - - err = copy_from_user(*buf, (void *)arg, hdr.ioc_len); - if (err) { - OBD_VFREE(*buf, hdr.ioc_len); - RETURN(err); - } - - if (obd_ioctl_is_invalid(data)) { - CERROR("ioctl not correctly formatted\n"); - OBD_VFREE(*buf, hdr.ioc_len); - RETURN(-EINVAL); - } - - if (data->ioc_inllen1) { - data->ioc_inlbuf1 = &data->ioc_bulk[0]; - offset += size_round(data->ioc_inllen1); - } - - if (data->ioc_inllen2) { - data->ioc_inlbuf2 = &data->ioc_bulk[0] + offset; - offset += size_round(data->ioc_inllen2); - } - - if (data->ioc_inllen3) { - data->ioc_inlbuf3 = &data->ioc_bulk[0] + offset; - offset += size_round(data->ioc_inllen3); - } - - if (data->ioc_inllen4) { - data->ioc_inlbuf4 = &data->ioc_bulk[0] + offset; - } - - RETURN(0); -} - -static inline int obd_ioctl_popdata(void *arg, void *data, int len) -{ - int err = copy_to_user(arg, data, len); - if (err) - err = -EFAULT; - return err; -} -#endif - -static inline void obd_ioctl_freedata(char *buf, int len) -{ - ENTRY; - - OBD_VFREE(buf, len); - EXIT; - return; -} - -/* - * BSD ioctl description: - * #define IOC_V1 _IOR(g, n1, long) - * #define IOC_V2 _IOW(g, n2, long) - * - * ioctl(f, IOC_V1, arg); - * arg will be treated as a long value, - * - * ioctl(f, IOC_V2, arg) - * arg will be treated as a pointer, bsd will call - * copyin(buf, arg, sizeof(long)) - * - * To make BSD ioctl handles argument correctly and simplely, - * we change _IOR to _IOWR so BSD will copyin obd_ioctl_data - * for us. Does this change affect Linux? (XXX Liang) - */ -#define OBD_IOC_CREATE _IOWR('f', 101, OBD_IOC_DATA_TYPE) -#define OBD_IOC_DESTROY _IOW ('f', 104, OBD_IOC_DATA_TYPE) -#define OBD_IOC_PREALLOCATE _IOWR('f', 105, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_SETATTR _IOW ('f', 107, OBD_IOC_DATA_TYPE) -#define OBD_IOC_GETATTR _IOWR ('f', 108, OBD_IOC_DATA_TYPE) -#define OBD_IOC_READ _IOWR('f', 109, OBD_IOC_DATA_TYPE) -#define OBD_IOC_WRITE _IOWR('f', 110, OBD_IOC_DATA_TYPE) - - -#define OBD_IOC_STATFS _IOWR('f', 113, OBD_IOC_DATA_TYPE) -#define OBD_IOC_SYNC _IOW ('f', 114, OBD_IOC_DATA_TYPE) -#define OBD_IOC_READ2 _IOWR('f', 115, OBD_IOC_DATA_TYPE) -#define OBD_IOC_FORMAT _IOWR('f', 116, OBD_IOC_DATA_TYPE) -#define OBD_IOC_PARTITION _IOWR('f', 117, OBD_IOC_DATA_TYPE) -#define OBD_IOC_COPY _IOWR('f', 120, OBD_IOC_DATA_TYPE) -#define OBD_IOC_MIGR _IOWR('f', 121, OBD_IOC_DATA_TYPE) -#define OBD_IOC_PUNCH _IOWR('f', 122, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_MODULE_DEBUG _IOWR('f', 124, OBD_IOC_DATA_TYPE) -#define OBD_IOC_BRW_READ _IOWR('f', 125, OBD_IOC_DATA_TYPE) -#define OBD_IOC_BRW_WRITE _IOWR('f', 126, OBD_IOC_DATA_TYPE) -#define OBD_IOC_NAME2DEV _IOWR('f', 127, OBD_IOC_DATA_TYPE) -#define OBD_IOC_UUID2DEV _IOWR('f', 130, OBD_IOC_DATA_TYPE) -/* OBD_IOC_GETNAME_OLD is for compatibility with 1.4.x */ -#define OBD_IOC_GETNAME_OLD _IOR ('f', 131, OBD_IOC_DATA_TYPE) -#define OBD_IOC_GETNAME _IOWR('f', 131, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_LOV_GET_CONFIG _IOWR('f', 132, OBD_IOC_DATA_TYPE) -#define OBD_IOC_CLIENT_RECOVER _IOW ('f', 133, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139 ) -#define OBD_IOC_NO_TRANSNO _IOW ('f', 140, OBD_IOC_DATA_TYPE) -#define OBD_IOC_SET_READONLY _IOW ('f', 141, OBD_IOC_DATA_TYPE) -#define OBD_IOC_ABORT_RECOVERY _IOR ('f', 142, OBD_IOC_DATA_TYPE) - -#define OBD_GET_VERSION _IOWR ('f', 144, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_CLOSE_UUID _IOWR ('f', 147, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_GETDEVICE _IOWR ('f', 149, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_LOV_SETSTRIPE _IOW ('f', 154, OBD_IOC_DATA_TYPE) -#define OBD_IOC_LOV_GETSTRIPE _IOW ('f', 155, OBD_IOC_DATA_TYPE) -#define OBD_IOC_LOV_SETEA _IOW ('f', 156, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_QUOTACHECK _IOW ('f', 160, int) -#define OBD_IOC_POLL_QUOTACHECK _IOR ('f', 161, struct if_quotacheck *) -#define OBD_IOC_QUOTACTL _IOWR('f', 162, struct if_quotactl *) - -#define OBD_IOC_MOUNTOPT _IOWR('f', 170, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_RECORD _IOWR('f', 180, OBD_IOC_DATA_TYPE) -#define OBD_IOC_ENDRECORD _IOWR('f', 181, OBD_IOC_DATA_TYPE) -#define OBD_IOC_PARSE _IOWR('f', 182, OBD_IOC_DATA_TYPE) -#define OBD_IOC_DORECORD _IOWR('f', 183, OBD_IOC_DATA_TYPE) -#define OBD_IOC_PROCESS_CFG _IOWR('f', 184, OBD_IOC_DATA_TYPE) -#define OBD_IOC_DUMP_LOG _IOWR('f', 185, OBD_IOC_DATA_TYPE) -#define OBD_IOC_CLEAR_LOG _IOWR('f', 186, OBD_IOC_DATA_TYPE) -#define OBD_IOC_PARAM _IOW ('f', 187, OBD_IOC_DATA_TYPE) - -#define OBD_IOC_CATLOGLIST _IOWR('f', 190, OBD_IOC_DATA_TYPE) -#define OBD_IOC_LLOG_INFO _IOWR('f', 191, OBD_IOC_DATA_TYPE) -#define OBD_IOC_LLOG_PRINT _IOWR('f', 192, OBD_IOC_DATA_TYPE) -#define OBD_IOC_LLOG_CANCEL _IOWR('f', 193, OBD_IOC_DATA_TYPE) -#define OBD_IOC_LLOG_REMOVE _IOWR('f', 194, OBD_IOC_DATA_TYPE) -#define OBD_IOC_LLOG_CHECK _IOWR('f', 195, OBD_IOC_DATA_TYPE) -#define OBD_IOC_LLOG_CATINFO _IOWR('f', 196, OBD_IOC_DATA_TYPE) - -#define ECHO_IOC_GET_STRIPE _IOWR('f', 200, OBD_IOC_DATA_TYPE) -#define ECHO_IOC_SET_STRIPE _IOWR('f', 201, OBD_IOC_DATA_TYPE) -#define ECHO_IOC_ENQUEUE _IOWR('f', 202, OBD_IOC_DATA_TYPE) -#define ECHO_IOC_CANCEL _IOWR('f', 203, OBD_IOC_DATA_TYPE) - -/* XXX _IOWR('f', 250, long) has been defined in - * lnet/include/libcfs/kp30.h for debug, don't use it - */ - -/* Until such time as we get_info the per-stripe maximum from the OST, - * we define this to be 2T - 4k, which is the ext3 maxbytes. */ -#define LUSTRE_STRIPE_MAXBYTES 0x1fffffff000ULL - -/* #define POISON_BULK 0 */ - -/* - * l_wait_event is a flexible sleeping function, permitting simple caller - * configuration of interrupt and timeout sensitivity along with actions to - * be performed in the event of either exception. - * - * The first form of usage looks like this: - * - * struct l_wait_info lwi = LWI_TIMEOUT_INTR(timeout, timeout_handler, - * intr_handler, callback_data); - * rc = l_wait_event(waitq, condition, &lwi); - * - * l_wait_event() makes the current process wait on 'waitq' until 'condition' - * is TRUE or a "killable" signal (SIGTERM, SIKGILL, SIGINT) is pending. It - * returns 0 to signify 'condition' is TRUE, but if a signal wakes it before - * 'condition' becomes true, it optionally calls the specified 'intr_handler' - * if not NULL, and returns -EINTR. - * - * If a non-zero timeout is specified, signals are ignored until the timeout - * has expired. At this time, if 'timeout_handler' is not NULL it is called. - * If it returns FALSE l_wait_event() continues to wait as described above with - * signals enabled. Otherwise it returns -ETIMEDOUT. - * - * LWI_INTR(intr_handler, callback_data) is shorthand for - * LWI_TIMEOUT_INTR(0, NULL, intr_handler, callback_data) - * - * The second form of usage looks like this: - * - * struct l_wait_info lwi = LWI_TIMEOUT(timeout, timeout_handler); - * rc = l_wait_event(waitq, condition, &lwi); - * - * This form is the same as the first except that it COMPLETELY IGNORES - * SIGNALS. The caller must therefore beware that if 'timeout' is zero, or if - * 'timeout_handler' is not NULL and returns FALSE, then the ONLY thing that - * can unblock the current process is 'condition' becoming TRUE. - * - * Another form of usage is: - * struct l_wait_info lwi = LWI_TIMEOUT_INTERVAL(timeout, interval, - * timeout_handler); - * rc = l_wait_event(waitq, condition, &lwi); - * This is the same as previous case, but condition is checked once every - * 'interval' jiffies (if non-zero). - * - * Subtle synchronization point: this macro does *not* necessary takes - * wait-queue spin-lock before returning, and, hence, following idiom is safe - * ONLY when caller provides some external locking: - * - * Thread1 Thread2 - * - * l_wait_event(&obj->wq, ....); (1) - * - * wake_up(&obj->wq): (2) - * spin_lock(&q->lock); (2.1) - * __wake_up_common(q, ...); (2.2) - * spin_unlock(&q->lock, flags); (2.3) - * - * OBD_FREE_PTR(obj); (3) - * - * As l_wait_event() may "short-cut" execution and return without taking - * wait-queue spin-lock, some additional synchronization is necessary to - * guarantee that step (3) can begin only after (2.3) finishes. - * - * XXX nikita: some ptlrpc daemon threads have races of that sort. - * - */ - -#define LWI_ON_SIGNAL_NOOP ((void (*)(void *))(-1)) - -struct l_wait_info { - cfs_duration_t lwi_timeout; - cfs_duration_t lwi_interval; - int (*lwi_on_timeout)(void *); - void (*lwi_on_signal)(void *); - void *lwi_cb_data; -}; - -/* NB: LWI_TIMEOUT ignores signals completely */ -#define LWI_TIMEOUT(time, cb, data) \ -((struct l_wait_info) { \ - .lwi_timeout = time, \ - .lwi_on_timeout = cb, \ - .lwi_cb_data = data, \ - .lwi_interval = 0 \ -}) - -#define LWI_TIMEOUT_INTERVAL(time, interval, cb, data) \ -((struct l_wait_info) { \ - .lwi_timeout = time, \ - .lwi_on_timeout = cb, \ - .lwi_cb_data = data, \ - .lwi_interval = interval \ -}) - -#define LWI_TIMEOUT_INTR(time, time_cb, sig_cb, data) \ -((struct l_wait_info) { \ - .lwi_timeout = time, \ - .lwi_on_timeout = time_cb, \ - .lwi_on_signal = sig_cb, \ - .lwi_cb_data = data, \ - .lwi_interval = 0 \ -}) - -#define LWI_INTR(cb, data) LWI_TIMEOUT_INTR(0, NULL, cb, data) - -#ifdef __KERNEL__ - -/* - * wait for @condition to become true, but no longer than timeout, specified - * by @info. - */ -#define __l_wait_event(wq, condition, info, ret, excl) \ -do { \ - cfs_waitlink_t __wait; \ - cfs_duration_t __timeout = info->lwi_timeout; \ - cfs_sigset_t __blocked; \ - \ - ret = 0; \ - if (condition) \ - break; \ - \ - cfs_waitlink_init(&__wait); \ - if (excl) \ - cfs_waitq_add_exclusive(&wq, &__wait); \ - else \ - cfs_waitq_add(&wq, &__wait); \ - \ - /* Block all signals (just the non-fatal ones if no timeout). */ \ - if (info->lwi_on_signal != NULL && __timeout == 0) \ - __blocked = l_w_e_set_sigs(LUSTRE_FATAL_SIGS); \ - else \ - __blocked = l_w_e_set_sigs(0); \ - \ - for (;;) { \ - set_current_state(TASK_INTERRUPTIBLE); \ - \ - if (condition) \ - break; \ - \ - if (__timeout == 0) { \ - cfs_waitq_wait(&__wait, CFS_TASK_INTERRUPTIBLE); \ - } else { \ - cfs_duration_t interval = info->lwi_interval? \ - min_t(cfs_duration_t, \ - info->lwi_interval,__timeout):\ - __timeout; \ - cfs_duration_t remaining = cfs_waitq_timedwait(&__wait,\ - CFS_TASK_INTERRUPTIBLE, \ - interval); \ - __timeout = cfs_time_sub(__timeout, \ - cfs_time_sub(interval, remaining));\ - if (__timeout == 0) { \ - if (info->lwi_on_timeout == NULL || \ - info->lwi_on_timeout(info->lwi_cb_data)) { \ - ret = -ETIMEDOUT; \ - break; \ - } \ - /* Take signals after the timeout expires. */ \ - if (info->lwi_on_signal != NULL) \ - (void)l_w_e_set_sigs(LUSTRE_FATAL_SIGS); \ - } \ - } \ - \ - if (condition) \ - break; \ - if (cfs_signal_pending()) { \ - if (info->lwi_on_signal != NULL && __timeout == 0) { \ - if (info->lwi_on_signal != LWI_ON_SIGNAL_NOOP) \ - info->lwi_on_signal(info->lwi_cb_data);\ - ret = -EINTR; \ - break; \ - } \ - /* We have to do this here because some signals */ \ - /* are not blockable - ie from strace(1). */ \ - /* In these cases we want to schedule_timeout() */ \ - /* again, because we don't want that to return */ \ - /* -EINTR when the RPC actually succeeded. */ \ - /* the RECALC_SIGPENDING below will deliver the */ \ - /* signal properly. */ \ - cfs_clear_sigpending(); \ - } \ - } \ - \ - cfs_block_sigs(__blocked); \ - \ - set_current_state(TASK_RUNNING); \ - cfs_waitq_del(&wq, &__wait); \ -} while (0) - -#else /* !__KERNEL__ */ -#define __l_wait_event(wq, condition, info, ret, excl) \ -do { \ - long __timeout = info->lwi_timeout; \ - long __now; \ - long __then = 0; \ - int __timed_out = 0; \ - int __interval = obd_timeout; \ - \ - ret = 0; \ - if (condition) \ - break; \ - \ - if (__timeout != 0) \ - __then = time(NULL); \ - \ - if (__timeout && __timeout < __interval) \ - __interval = __timeout; \ - if (info->lwi_interval && info->lwi_interval < __interval) \ - __interval = info->lwi_interval; \ - \ - while (!(condition)) { \ - liblustre_wait_event(__interval); \ - if (condition) \ - break; \ - \ - if (!__timed_out && info->lwi_timeout != 0) { \ - __now = time(NULL); \ - __timeout -= __now - __then; \ - __then = __now; \ - \ - if (__timeout > 0) \ - continue; \ - \ - __timeout = 0; \ - __timed_out = 1; \ - if (info->lwi_on_timeout == NULL || \ - info->lwi_on_timeout(info->lwi_cb_data)) { \ - ret = -ETIMEDOUT; \ - break; \ - } \ - } \ - } \ -} while (0) - -#endif /* __KERNEL__ */ - -#define l_wait_event(wq, condition, info) \ -({ \ - int __ret; \ - struct l_wait_info *__info = (info); \ - \ - __l_wait_event(wq, condition, __info, __ret, 0); \ - __ret; \ -}) - -#define l_wait_event_exclusive(wq, condition, info) \ -({ \ - int __ret; \ - struct l_wait_info *__info = (info); \ - \ - __l_wait_event(wq, condition, __info, __ret, 1); \ - __ret; \ -}) - -#ifdef __KERNEL__ -#define LIBLUSTRE_CLIENT (0) -#else -#define LIBLUSTRE_CLIENT (1) -#endif - -#endif /* _LUSTRE_LIB_H */ - diff --git a/lustre/include/lustre_lite.h b/lustre/include/lustre_lite.h deleted file mode 100644 index e4e8ee856f..0000000000 --- a/lustre/include/lustre_lite.h +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _LL_H -#define _LL_H - -#if defined(__linux__) -#include <linux/lustre_lite.h> -#elif defined(__APPLE__) -#include <darwin/lustre_lite.h> -#elif defined(__WINNT__) -#include <winnt/lustre_lite.h> -#else -#error Unsupported operating system. -#endif - -#include <obd_class.h> -#include <obd_ost.h> -#include <lustre_net.h> -#include <lustre_mds.h> -#include <lustre_ha.h> - -#ifdef __KERNEL__ - -/* careful, this is easy to screw up */ -#define PAGE_CACHE_MAXBYTES ((__u64)(~0UL) << CFS_PAGE_SHIFT) - -#endif - -#define LLAP_FROM_COOKIE(c) \ - (LASSERT(((struct ll_async_page *)(c))->llap_magic == LLAP_MAGIC), \ - (struct ll_async_page *)(c)) - -// 4*1024*1024 -#define LL_MAX_BLKSIZE_BITS (22) -#define LL_MAX_BLKSIZE (1UL<<LL_MAX_BLKSIZE_BITS) - -#include <lustre/lustre_user.h> - - -struct lustre_rw_params { - int lrp_lock_mode; - ldlm_policy_data_t lrp_policy; - obd_flag lrp_brw_flags; - int lrp_ast_flags; -}; - -/* - * XXX nikita: this function lives in the header because it is used by both - * llite kernel module and liblustre library, and there is no (?) better place - * to put it in. - */ -static inline void lustre_build_lock_params(int cmd, unsigned long open_flags, - __u64 connect_flags, - loff_t pos, ssize_t len, - struct lustre_rw_params *params) -{ - params->lrp_lock_mode = (cmd == OBD_BRW_READ) ? LCK_PR : LCK_PW; - params->lrp_brw_flags = 0; - - params->lrp_policy.l_extent.start = pos; - params->lrp_policy.l_extent.end = pos + len - 1; - /* - * for now O_APPEND always takes local locks. - */ - if (cmd == OBD_BRW_WRITE && (open_flags & O_APPEND)) { - params->lrp_policy.l_extent.start = 0; - params->lrp_policy.l_extent.end = OBD_OBJECT_EOF; - } else if (LIBLUSTRE_CLIENT && (connect_flags & OBD_CONNECT_SRVLOCK)) { - /* - * liblustre: OST-side locking for all non-O_APPEND - * reads/writes. - */ - params->lrp_lock_mode = LCK_NL; - params->lrp_brw_flags = OBD_BRW_SRVLOCK; - } else { - /* - * nothing special for the kernel. In the future llite may use - * OST-side locks for small writes into highly contended - * files. - */ - } - params->lrp_ast_flags = (open_flags & O_NONBLOCK) ? - LDLM_FL_BLOCK_NOWAIT : 0; -} - -/* - * This is embedded into liblustre and llite super-blocks to keep track of - * connect flags (capabilities) supported by all imports given mount is - * connected to. - */ -struct lustre_client_ocd { - /* - * This is conjunction of connect_flags across all imports (LOVs) this - * mount is connected to. This field is updated by ll_ocd_update() - * under ->lco_lock. - */ - __u64 lco_flags; - spinlock_t lco_lock; -}; - -/* - * This function is used as an upcall-callback hooked by liblustre and llite - * clients into obd_notify() listeners chain to handle notifications about - * change of import connect_flags. See llu_fsswop_mount() and - * lustre_common_fill_super(). - * - * Again, it is dumped into this header for the lack of a better place. - */ -static inline int ll_ocd_update(struct obd_device *host, - struct obd_device *watched, - enum obd_notify_event ev, void *owner) -{ - struct lustre_client_ocd *lco; - struct client_obd *cli; - __u64 flags; - int result; - - ENTRY; - if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) { - cli = &watched->u.cli; - lco = owner; - flags = cli->cl_import->imp_connect_data.ocd_connect_flags; - CDEBUG(D_SUPER, "Changing connect_flags: "LPX64" -> "LPX64"\n", - lco->lco_flags, flags); - spin_lock(&lco->lco_lock); - lco->lco_flags &= flags; - spin_unlock(&lco->lco_lock); - result = 0; - } else { - CERROR("unexpected notification from %s %s!\n", - watched->obd_type->typ_name, - watched->obd_name); - result = -EINVAL; - } - RETURN(result); -} - -#endif diff --git a/lustre/include/lustre_log.h b/lustre/include/lustre_log.h deleted file mode 100644 index 565d08dc96..0000000000 --- a/lustre/include/lustre_log.h +++ /dev/null @@ -1,483 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <info@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Generic infrastructure for managing a collection of logs. - * - * These logs are used for: - * - * - orphan recovery: OST adds record on create - * - mtime/size consistency: the OST adds a record on first write - * - open/unlinked objects: OST adds a record on destroy - * - * - mds unlink log: the MDS adds an entry upon delete - * - * - raid1 replication log between OST's - * - MDS replication logs - */ - -#ifndef _LUSTRE_LOG_H -#define _LUSTRE_LOG_H - -#if defined(__linux__) -#include <linux/lustre_log.h> -#elif defined(__APPLE__) -#include <darwin/lustre_log.h> -#elif defined(__WINNT__) -#include <winnt/lustre_log.h> -#else -#error Unsupported operating system. -#endif - -#include <obd.h> -#include <obd_ost.h> -#include <lustre/lustre_idl.h> - -#define LOG_NAME_LIMIT(logname, name) \ - snprintf(logname, sizeof(logname), "LOGS/%s", name) -#define LLOG_EEMPTY 4711 - -struct plain_handle_data { - struct list_head phd_entry; - struct llog_handle *phd_cat_handle; - struct llog_cookie phd_cookie; /* cookie of this log in its cat */ - int phd_last_idx; -}; - -struct cat_handle_data { - struct list_head chd_head; - struct llog_handle *chd_current_log; /* currently open log */ -}; - -/* In-memory descriptor for a log object or log catalog */ -struct llog_handle { - struct rw_semaphore lgh_lock; - struct llog_logid lgh_id; /* id of this log */ - struct llog_log_hdr *lgh_hdr; - struct file *lgh_file; - int lgh_last_idx; - int lgh_cur_idx; /* used during llog_process */ - __u64 lgh_cur_offset; /* used during llog_process */ - struct llog_ctxt *lgh_ctxt; - union { - struct plain_handle_data phd; - struct cat_handle_data chd; - } u; -}; - -/* llog.c - general API */ -typedef int (*llog_cb_t)(struct llog_handle *, struct llog_rec_hdr *, void *); -typedef int (*llog_fill_rec_cb_t)(struct llog_rec_hdr *rec, void *data); -extern struct llog_handle *llog_alloc_handle(void); -int llog_init_handle(struct llog_handle *handle, int flags, - struct obd_uuid *uuid); -extern void llog_free_handle(struct llog_handle *handle); -int llog_process(struct llog_handle *loghandle, llog_cb_t cb, - void *data, void *catdata); -int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb, - void *data, void *catdata); -extern int llog_cancel_rec(struct llog_handle *loghandle, int index); -extern int llog_close(struct llog_handle *cathandle); -extern int llog_get_size(struct llog_handle *loghandle); - -/* llog_cat.c - catalog api */ -struct llog_process_data { - void *lpd_data; - llog_cb_t lpd_cb; -}; - -struct llog_process_cat_data { - int first_idx; - int last_idx; - /* to process catalog across zero record */ -}; - -int llog_cat_put(struct llog_handle *cathandle); -int llog_cat_add_rec(struct llog_handle *cathandle, struct llog_rec_hdr *rec, - struct llog_cookie *reccookie, void *buf); -int llog_cat_cancel_records(struct llog_handle *cathandle, int count, - struct llog_cookie *cookies); -int llog_cat_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data); -int llog_cat_reverse_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data); -int llog_cat_set_first_idx(struct llog_handle *cathandle, int index); - -/* llog_obd.c */ -int llog_setup(struct obd_device *obd, int index, struct obd_device *disk_obd, - int count, struct llog_logid *logid,struct llog_operations *op); -int __llog_ctxt_put(struct llog_ctxt *ctxt); -int llog_cleanup(struct llog_ctxt *); -int llog_sync(struct llog_ctxt *ctxt, struct obd_export *exp); -int llog_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec, - struct lov_stripe_md *lsm, struct llog_cookie *logcookies, - int numcookies); -int llog_cancel(struct llog_ctxt *, struct lov_stripe_md *lsm, - int count, struct llog_cookie *cookies, int flags); - -int llog_obd_origin_setup(struct obd_device *obd, int index, - struct obd_device *disk_obd, int count, - struct llog_logid *logid); -int llog_obd_origin_cleanup(struct llog_ctxt *ctxt); -int llog_obd_origin_add(struct llog_ctxt *ctxt, - struct llog_rec_hdr *rec, struct lov_stripe_md *lsm, - struct llog_cookie *logcookies, int numcookies); - -int llog_cat_initialize(struct obd_device *obd, int count, - struct obd_uuid *uuid); -int obd_llog_init(struct obd_device *obd, struct obd_device *disk_obd, - int count, struct llog_catid *logid, struct obd_uuid *uuid); - -int obd_llog_finish(struct obd_device *obd, int count); - -/* llog_ioctl.c */ -int llog_ioctl(struct llog_ctxt *ctxt, int cmd, struct obd_ioctl_data *data); -int llog_catalog_list(struct obd_device *obd, int count, - struct obd_ioctl_data *data); - -/* llog_net.c */ -int llog_initiator_connect(struct llog_ctxt *ctxt); -int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp); -int llog_origin_connect(struct llog_ctxt *ctxt, int count, - struct llog_logid *logid, struct llog_gen *gen, - struct obd_uuid *uuid); -int llog_handle_connect(struct ptlrpc_request *req); - -/* recov_thread.c */ -int llog_obd_repl_cancel(struct llog_ctxt *ctxt, - struct lov_stripe_md *lsm, int count, - struct llog_cookie *cookies, int flags); -int llog_obd_repl_sync(struct llog_ctxt *ctxt, struct obd_export *exp); -int llog_repl_connect(struct llog_ctxt *ctxt, int count, - struct llog_logid *logid, struct llog_gen *gen, - struct obd_uuid *uuid); - -struct llog_operations { - int (*lop_write_rec)(struct llog_handle *loghandle, - struct llog_rec_hdr *rec, - struct llog_cookie *logcookies, int numcookies, - void *, int idx); - int (*lop_destroy)(struct llog_handle *handle); - int (*lop_next_block)(struct llog_handle *h, int *curr_idx, - int next_idx, __u64 *offset, void *buf, int len); - int (*lop_prev_block)(struct llog_handle *h, - int prev_idx, void *buf, int len); - int (*lop_create)(struct llog_ctxt *ctxt, struct llog_handle **, - struct llog_logid *logid, char *name); - int (*lop_close)(struct llog_handle *handle); - int (*lop_read_header)(struct llog_handle *handle); - - int (*lop_setup)(struct obd_device *obd, int ctxt_idx, - struct obd_device *disk_obd, int count, - struct llog_logid *logid); - int (*lop_sync)(struct llog_ctxt *ctxt, struct obd_export *exp); - int (*lop_cleanup)(struct llog_ctxt *ctxt); - int (*lop_add)(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec, - struct lov_stripe_md *lsm, - struct llog_cookie *logcookies, int numcookies); - int (*lop_cancel)(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm, - int count, struct llog_cookie *cookies, int flags); - int (*lop_connect)(struct llog_ctxt *ctxt, int count, - struct llog_logid *logid, struct llog_gen *gen, - struct obd_uuid *uuid); - /* XXX add 2 more: commit callbacks and llog recovery functions */ -}; - -/* llog_lvfs.c */ -extern struct llog_operations llog_lvfs_ops; -int llog_get_cat_list(struct obd_device *obd, struct obd_device *disk_obd, - char *name, int count, struct llog_catid *idarray); - -struct llog_ctxt { - int loc_idx; /* my index the obd array of ctxt's */ - struct llog_gen loc_gen; - struct obd_device *loc_obd; /* points back to the containing obd*/ - struct obd_export *loc_exp; /* parent "disk" export (e.g. MDS) */ - struct obd_import *loc_imp; /* to use in RPC's: can be backward - pointing import */ - struct llog_operations *loc_logops; - struct llog_handle *loc_handle; - struct llog_canceld_ctxt *loc_llcd; - struct semaphore loc_sem; /* protects loc_llcd and loc_imp */ - atomic_t loc_refcount; - struct llog_commit_master *loc_lcm; - void *llog_proc_cb; -}; - -#ifndef __KERNEL__ - -#define cap_raise(c, flag) do {} while(0) - -#define CAP_SYS_RESOURCE 24 - -#endif /* !__KERNEL__ */ - -static inline void llog_gen_init(struct llog_ctxt *ctxt) -{ - struct obd_device *obd = ctxt->loc_exp->exp_obd; - - if (!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME)) - ctxt->loc_gen.mnt_cnt = obd->u.mds.mds_mount_count; - else if (!strstr(obd->obd_type->typ_name, LUSTRE_OST_NAME)) - ctxt->loc_gen.mnt_cnt = obd->u.filter.fo_mount_count; - else - ctxt->loc_gen.mnt_cnt = 0; -} - -static inline int llog_gen_lt(struct llog_gen a, struct llog_gen b) -{ - if (a.mnt_cnt < b.mnt_cnt) - return 1; - if (a.mnt_cnt > b.mnt_cnt) - return 0; - return(a.conn_cnt < b.conn_cnt ? 1 : 0); -} - -#define LLOG_GEN_INC(gen) ((gen).conn_cnt ++) -#define LLOG_PROC_BREAK 0x0001 -#define LLOG_DEL_RECORD 0x0002 - -static inline int llog_obd2ops(struct llog_ctxt *ctxt, - struct llog_operations **lop) -{ - if (ctxt == NULL) - return -ENOTCONN; - - *lop = ctxt->loc_logops; - if (*lop == NULL) - return -EOPNOTSUPP; - - return 0; -} - -static inline int llog_handle2ops(struct llog_handle *loghandle, - struct llog_operations **lop) -{ - if (loghandle == NULL) - return -EINVAL; - - return llog_obd2ops(loghandle->lgh_ctxt, lop); -} - -static inline int llog_data_len(int len) -{ - return size_round(len); -} - -#define llog_ctxt_get(ctxt) \ -({ \ - struct llog_ctxt *ctxt_ = ctxt; \ - LASSERT(atomic_read(&ctxt_->loc_refcount) > 0); \ - atomic_inc(&ctxt_->loc_refcount); \ - CDEBUG(D_INFO, "GETting ctxt %p : new refcount %d\n", ctxt_, \ - atomic_read(&ctxt_->loc_refcount)); \ - ctxt_; \ -}) - -#define llog_ctxt_put(ctxt) \ -do { \ - if ((ctxt) == NULL) \ - break; \ - CDEBUG(D_INFO, "PUTting ctxt %p : new refcount %d\n", (ctxt), \ - atomic_read(&(ctxt)->loc_refcount) - 1); \ - LASSERT(atomic_read(&(ctxt)->loc_refcount) > 0); \ - LASSERT(atomic_read(&(ctxt)->loc_refcount) < 0x5a5a5a); \ - __llog_ctxt_put(ctxt); \ -} while (0) - -static inline struct llog_ctxt *llog_get_context(struct obd_device *obd, - int index) -{ - struct llog_ctxt *ctxt; - - if (index < 0 || index >= LLOG_MAX_CTXTS) - return NULL; - - spin_lock(&obd->obd_dev_lock); - if (obd->obd_llog_ctxt[index] == NULL) { - spin_unlock(&obd->obd_dev_lock); - CDEBUG(D_INFO, "obd %p and ctxt index %d is NULL \n", obd, index); - return NULL; - } - ctxt = llog_ctxt_get(obd->obd_llog_ctxt[index]); - spin_unlock(&obd->obd_dev_lock); - return ctxt; -} - -static inline int llog_ctxt_null(struct obd_device *obd, int index) -{ - return (obd->obd_llog_ctxt[index] == NULL); -} - -static inline int llog_write_rec(struct llog_handle *handle, - struct llog_rec_hdr *rec, - struct llog_cookie *logcookies, - int numcookies, void *buf, int idx) -{ - struct llog_operations *lop; - __u32 cap; - int rc, buflen; - ENTRY; - - rc = llog_handle2ops(handle, &lop); - if (rc) - RETURN(rc); - if (lop->lop_write_rec == NULL) - RETURN(-EOPNOTSUPP); - - if (buf) - buflen = rec->lrh_len + sizeof(struct llog_rec_hdr) - + sizeof(struct llog_rec_tail); - else - buflen = rec->lrh_len; - LASSERT(size_round(buflen) == buflen); - - cap = current->cap_effective; - cap_raise(current->cap_effective, CAP_SYS_RESOURCE); - rc = lop->lop_write_rec(handle, rec, logcookies, numcookies, buf, idx); - current->cap_effective = cap; - RETURN(rc); -} - -static inline int llog_read_header(struct llog_handle *handle) -{ - struct llog_operations *lop; - int rc; - ENTRY; - - rc = llog_handle2ops(handle, &lop); - if (rc) - RETURN(rc); - if (lop->lop_read_header == NULL) - RETURN(-EOPNOTSUPP); - - rc = lop->lop_read_header(handle); - RETURN(rc); -} - -static inline int llog_destroy(struct llog_handle *handle) -{ - struct llog_operations *lop; - int rc; - ENTRY; - - rc = llog_handle2ops(handle, &lop); - if (rc) - RETURN(rc); - if (lop->lop_destroy == NULL) - RETURN(-EOPNOTSUPP); - - rc = lop->lop_destroy(handle); - RETURN(rc); -} - -#if 0 -static inline int llog_cancel(struct obd_export *exp, - struct lov_stripe_md *lsm, int count, - struct llog_cookie *cookies, int flags) -{ - struct llog_operations *lop; - int rc; - ENTRY; - - rc = llog_handle2ops(loghandle, &lop); - if (rc) - RETURN(rc); - if (lop->lop_cancel == NULL) - RETURN(-EOPNOTSUPP); - - rc = lop->lop_cancel(exp, lsm, count, cookies, flags); - RETURN(rc); -} -#endif - -static inline int llog_next_block(struct llog_handle *loghandle, int *cur_idx, - int next_idx, __u64 *cur_offset, void *buf, - int len) -{ - struct llog_operations *lop; - int rc; - ENTRY; - - rc = llog_handle2ops(loghandle, &lop); - if (rc) - RETURN(rc); - if (lop->lop_next_block == NULL) - RETURN(-EOPNOTSUPP); - - rc = lop->lop_next_block(loghandle, cur_idx, next_idx, cur_offset, buf, - len); - RETURN(rc); -} - -static inline int llog_prev_block(struct llog_handle *loghandle, - int prev_idx, void *buf, int len) -{ - struct llog_operations *lop; - int rc; - ENTRY; - - rc = llog_handle2ops(loghandle, &lop); - if (rc) - RETURN(rc); - if (lop->lop_prev_block == NULL) - RETURN(-EOPNOTSUPP); - - rc = lop->lop_prev_block(loghandle, prev_idx, buf, len); - RETURN(rc); -} - -static inline int llog_create(struct llog_ctxt *ctxt, struct llog_handle **res, - struct llog_logid *logid, char *name) -{ - struct llog_operations *lop; - __u32 cap; - int rc; - ENTRY; - - rc = llog_obd2ops(ctxt, &lop); - if (rc) - RETURN(rc); - if (lop->lop_create == NULL) - RETURN(-EOPNOTSUPP); - - cap = current->cap_effective; - cap_raise(current->cap_effective, CAP_SYS_RESOURCE); - rc = lop->lop_create(ctxt, res, logid, name); - current->cap_effective = cap; - RETURN(rc); -} - -static inline int llog_connect(struct llog_ctxt *ctxt, int count, - struct llog_logid *logid, struct llog_gen *gen, - struct obd_uuid *uuid) -{ - struct llog_operations *lop; - int rc; - ENTRY; - - rc = llog_obd2ops(ctxt, &lop); - if (rc) - RETURN(rc); - if (lop->lop_connect == NULL) - RETURN(-EOPNOTSUPP); - - rc = lop->lop_connect(ctxt, count, logid, gen, uuid); - RETURN(rc); -} - -#endif diff --git a/lustre/include/lustre_mds.h b/lustre/include/lustre_mds.h deleted file mode 100644 index 47d5073807..0000000000 --- a/lustre/include/lustre_mds.h +++ /dev/null @@ -1,255 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * MDS data structures. - * See also lustre_idl.h for wire formats of requests. - */ - -#ifndef _LUSTRE_MDS_H -#define _LUSTRE_MDS_H - -#include <lustre_handles.h> -#include <libcfs/kp30.h> -#include <lustre/lustre_idl.h> -#include <lustre_lib.h> -#include <lustre_dlm.h> -#include <lustre_log.h> -#include <lustre_export.h> - -#if defined(__linux__) -#include <linux/lustre_mds.h> -#elif defined(__APPLE__) -#include <darwin/lustre_mds.h> -#elif defined(__WINNT__) -#include <winnt/lustre_mds.h> -#else -#error Unsupported operating system. -#endif - -struct ldlm_lock_desc; -struct mds_obd; -struct ptlrpc_connection; -struct ptlrpc_client; -struct obd_export; -struct ptlrpc_request; -struct obd_device; -struct ll_file_data; - -struct lustre_md { - struct mds_body *body; - struct lov_stripe_md *lsm; -#ifdef CONFIG_FS_POSIX_ACL - struct posix_acl *posix_acl; -#endif -}; - -struct mdc_op_data { - struct ll_fid fid1; - struct ll_fid fid2; - struct ll_fid fid3; - struct ll_fid fid4; - __u64 mod_time; - const char *name; - int namelen; - __u32 create_mode; - __u32 suppgids[2]; - void *data; -}; - -struct mds_update_record { - __u32 ur_opcode; - struct ll_fid *ur_fid1; - struct ll_fid *ur_fid2; - int ur_namelen; - char *ur_name; - int ur_tgtlen; - char *ur_tgt; - int ur_eadatalen; - void *ur_eadata; - int ur_cookielen; - struct llog_cookie *ur_logcookies; - struct iattr ur_iattr; - struct lvfs_ucred ur_uc; - __u64 ur_rdev; - __u64 ur_time; - __u32 ur_mode; - __u32 ur_flags; - struct lvfs_grp_hash_entry *ur_grp_entry; - struct ldlm_request *ur_dlm; -}; - -/* file data for open files on MDS */ -struct mds_file_data { - struct portals_handle mfd_handle; /* must be first */ - atomic_t mfd_refcount; - struct list_head mfd_list; /* protected by med_open_lock */ - __u64 mfd_xid; - int mfd_mode; - struct dentry *mfd_dentry; -}; - -/* ACL */ -#ifdef CONFIG_FS_POSIX_ACL -# ifdef HAVE_XATTR_ACL -# define MDS_XATTR_NAME_ACL_ACCESS XATTR_NAME_ACL_ACCESS -# define mds_xattr_acl_size(entry) xattr_acl_size(entry) -# else /* HAVE_XATTR_ACL */ -# define MDS_XATTR_NAME_ACL_ACCESS POSIX_ACL_XATTR_ACCESS -# define mds_xattr_acl_size(entry) posix_acl_xattr_size(entry) -# endif /* HAVE_XATTR_ACL */ - -# define LUSTRE_POSIX_ACL_MAX_ENTRIES (32) -# define LUSTRE_POSIX_ACL_MAX_SIZE \ - (mds_xattr_acl_size(LUSTRE_POSIX_ACL_MAX_ENTRIES)) -#else /* CONFIG_FS_POSIX_ACL */ -# define LUSTRE_POSIX_ACL_MAX_SIZE 0 -#endif /* CONFIG_FS_POSIX_ACL */ - -/* mds/mds_reint.c */ -int mds_reint_rec(struct mds_update_record *r, int offset, - struct ptlrpc_request *req, struct lustre_handle *); - -/* mds/mds_lov.c */ - -/* mdc/mdc_locks.c */ -struct md_enqueue_info; - -int it_disposition(struct lookup_intent *it, int flag); -void it_set_disposition(struct lookup_intent *it, int flag); -void it_clear_disposition(struct lookup_intent *it, int flag); -int it_open_error(int phase, struct lookup_intent *it); -void mdc_set_lock_data(__u64 *lockh, void *data); -int mdc_change_cbdata(struct obd_export *exp, struct ll_fid *fid, - ldlm_iterator_t it, void *data); -int mdc_revalidate_lock(struct obd_export *exp, - struct lookup_intent *it, - struct ll_fid *fid); -int mdc_intent_lock(struct obd_export *exp, - struct mdc_op_data *, - void *lmm, int lmmsize, - struct lookup_intent *, int, - struct ptlrpc_request **reqp, - ldlm_blocking_callback cb_blocking, int extra_lock_flags); -int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, - struct lookup_intent *it, struct mdc_op_data *data, - struct lustre_handle *lockh, void *lmm, int lmmlen, - int extra_lock_flags); -int mdc_intent_getattr_async(struct obd_export *exp, - struct md_enqueue_info *minfo, - struct ldlm_enqueue_info *einfo); - -/* mdc/mdc_request.c */ -int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp); -int mdc_req2lustre_md(struct ptlrpc_request *req, int offset, - struct obd_export *exp, struct lustre_md *md); -void mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md); -int mdc_getstatus(struct obd_export *exp, struct ll_fid *rootfid); -int mdc_getattr(struct obd_export *exp, struct ll_fid *fid, - obd_valid valid, unsigned int ea_size, - struct ptlrpc_request **request); -int mdc_getattr_name(struct obd_export *exp, struct ll_fid *fid, - const char *filename, int namelen, unsigned long valid, - unsigned int ea_size, struct ptlrpc_request **request); -int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data, - struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len, - struct ptlrpc_request **request); -int mdc_setxattr(struct obd_export *exp, struct ll_fid *fid, - obd_valid valid, const char *xattr_name, - const char *input, int input_size, - int output_size, int flags, - struct ptlrpc_request **request); -int mdc_getxattr(struct obd_export *exp, struct ll_fid *fid, - obd_valid valid, const char *xattr_name, - const char *input, int input_size, - int output_size, struct ptlrpc_request **request); -int mdc_open(struct obd_export *exp, obd_id ino, int type, int flags, - struct lov_mds_md *lmm, int lmm_size, struct lustre_handle *fh, - struct ptlrpc_request **); -struct obd_client_handle; -void mdc_set_open_replay_data(struct obd_client_handle *och, - struct ptlrpc_request *open_req); -void mdc_clear_open_replay_data(struct obd_client_handle *och); -int mdc_close(struct obd_export *, struct obdo *, struct obd_client_handle *, - struct ptlrpc_request **); -int mdc_readpage(struct obd_export *exp, struct ll_fid *mdc_fid, __u64 offset, - struct page *, struct ptlrpc_request **); -int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data, - const void *data, int datalen, int mode, __u32 uid, __u32 gid, - __u32 cap_effective, __u64 rdev,struct ptlrpc_request **request); -int mdc_unlink(struct obd_export *exp, struct mdc_op_data *data, - struct ptlrpc_request **request); -int mdc_link(struct obd_export *exp, struct mdc_op_data *data, - struct ptlrpc_request **); -int mdc_rename(struct obd_export *exp, struct mdc_op_data *data, - const char *old, int oldlen, const char *new, int newlen, - struct ptlrpc_request **request); -int mdc_sync(struct obd_export *exp, struct ll_fid *fid, - struct ptlrpc_request **); -int mdc_create_client(struct obd_uuid uuid, struct ptlrpc_client *cl); -int mdc_resource_get_unused(struct obd_export *exp, struct ll_fid *fid, - struct list_head *cancels, ldlm_mode_t mode, - __u64 bits); - -/* Store the generation of a newly-created inode in |req| for replay. */ -void mdc_store_inode_generation(struct ptlrpc_request *req, int reqoff, - int repoff); -int mdc_llog_process(struct obd_export *, char *logname, llog_cb_t, void *data); -int mdc_done_writing(struct obd_export *exp, struct obdo *); - -static inline void mdc_pack_fid(struct ll_fid *fid, obd_id ino, __u32 gen, - int type) -{ - fid->id = ino; - fid->generation = gen; - fid->f_type = type; -} - -static inline int it_to_lock_mode(struct lookup_intent *it) -{ - /* CREAT needs to be tested before open (both could be set) */ - if (it->it_op & IT_CREAT) - return LCK_CW; - else if (it->it_op & (IT_READDIR | IT_GETATTR | IT_OPEN | IT_LOOKUP)) - return LCK_CR; - - LBUG(); - return -EINVAL; -} - -/* ioctls for trying requests */ -#define IOC_REQUEST_TYPE 'f' -#define IOC_REQUEST_MIN_NR 30 - -#define IOC_REQUEST_GETATTR _IOWR('f', 30, long) -#define IOC_REQUEST_READPAGE _IOWR('f', 31, long) -#define IOC_REQUEST_SETATTR _IOWR('f', 32, long) -#define IOC_REQUEST_CREATE _IOWR('f', 33, long) -#define IOC_REQUEST_OPEN _IOWR('f', 34, long) -#define IOC_REQUEST_CLOSE _IOWR('f', 35, long) -#define IOC_REQUEST_MAX_NR 35 - -/* metadata stat-ahead */ -typedef int (* md_enqueue_cb_t)(struct obd_export *exp, - struct ptlrpc_request *req, - struct md_enqueue_info *minfo, - int rc); - -struct md_enqueue_info { - struct obd_export *mi_exp; - struct mdc_op_data mi_data; - struct lookup_intent mi_it; - struct lustre_handle mi_lockh; - struct dentry *mi_dentry; - md_enqueue_cb_t mi_cb; - unsigned int mi_generation; - void *mi_cbdata; -}; - -struct mdc_enqueue_args { - struct md_enqueue_info *ma_mi; - struct ldlm_enqueue_info *ma_ei; -}; - -#endif diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h deleted file mode 100644 index 1bd2eabc5e..0000000000 --- a/lustre/include/lustre_net.h +++ /dev/null @@ -1,938 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _LUSTRE_NET_H -#define _LUSTRE_NET_H - -#if defined(__linux__) -#include <linux/lustre_net.h> -#elif defined(__APPLE__) -#include <darwin/lustre_net.h> -#elif defined(__WINNT__) -#include <winnt/lustre_net.h> -#else -#error Unsupported operating system. -#endif - -#include <libcfs/kp30.h> -// #include <obd.h> -#include <lnet/lnet.h> -#include <lustre/lustre_idl.h> -#include <lustre_ha.h> -#include <lustre_import.h> -#include <lprocfs_status.h> - -/* MD flags we _always_ use */ -#define PTLRPC_MD_OPTIONS 0 - -/* Define maxima for bulk I/O - * CAVEAT EMPTOR, with multinet (i.e. routers forwarding between networks) - * these limits are system wide and not interface-local. */ -#define PTLRPC_MAX_BRW_BITS LNET_MTU_BITS -#define PTLRPC_MAX_BRW_SIZE (1<<LNET_MTU_BITS) -#define PTLRPC_MAX_BRW_PAGES (PTLRPC_MAX_BRW_SIZE >> CFS_PAGE_SHIFT) - -/* When PAGE_SIZE is a constant, we can check our arithmetic here with cpp! */ -#ifdef __KERNEL__ -# if ((PTLRPC_MAX_BRW_PAGES & (PTLRPC_MAX_BRW_PAGES - 1)) != 0) -# error "PTLRPC_MAX_BRW_PAGES isn't a power of two" -# endif -# if (PTLRPC_MAX_BRW_SIZE != (PTLRPC_MAX_BRW_PAGES * CFS_PAGE_SIZE)) -# error "PTLRPC_MAX_BRW_SIZE isn't PTLRPC_MAX_BRW_PAGES * CFS_PAGE_SIZE" -# endif -# if (PTLRPC_MAX_BRW_SIZE > LNET_MTU) -# error "PTLRPC_MAX_BRW_SIZE too big" -# endif -# if (PTLRPC_MAX_BRW_PAGES > LNET_MAX_IOV) -# error "PTLRPC_MAX_BRW_PAGES too big" -# endif -#endif /* __KERNEL__ */ - -/* Size over which to OBD_VMALLOC() rather than OBD_ALLOC() service request - * buffers */ -#define SVC_BUF_VMALLOC_THRESHOLD (2 * CFS_PAGE_SIZE) - -/* The following constants determine how memory is used to buffer incoming - * service requests. - * - * ?_NBUFS # buffers to allocate when growing the pool - * ?_BUFSIZE # bytes in a single request buffer - * ?_MAXREQSIZE # maximum request service will receive - * - * When fewer than ?_NBUFS/2 buffers are posted for receive, another chunk - * of ?_NBUFS is added to the pool. - * - * Messages larger than ?_MAXREQSIZE are dropped. Request buffers are - * considered full when less than ?_MAXREQSIZE is left in them. - */ - -#define LDLM_THREADS_AUTO_MIN \ - min((int)(num_online_cpus() * num_online_cpus() * 2), 8) -#define LDLM_THREADS_AUTO_MAX (LDLM_THREADS_AUTO_MIN * 16) -#define LDLM_BL_THREADS LDLM_THREADS_AUTO_MIN -#define LDLM_NBUFS (64 * num_online_cpus()) -#define LDLM_BUFSIZE (8 * 1024) -#define LDLM_MAXREQSIZE (5 * 1024) -#define LDLM_MAXREPSIZE (1024) - -/* Absolute limits */ -#define MDS_THREADS_MIN 2 -#define MDS_THREADS_MAX 512 -#define MDS_THREADS_MIN_READPAGE 2 -#define MDS_NBUFS (64 * num_online_cpus()) -#define MDS_BUFSIZE (8 * 1024) -/* Assume file name length = FNAME_MAX = 256 (true for ext3). - * path name length = PATH_MAX = 4096 - * LOV MD size max = EA_MAX = 4000 - * symlink: FNAME_MAX + PATH_MAX <- largest - * link: FNAME_MAX + PATH_MAX (mds_rec_link < mds_rec_create) - * rename: FNAME_MAX + FNAME_MAX - * open: FNAME_MAX + EA_MAX - * - * MDS_MAXREQSIZE ~= 4736 bytes = - * lustre_msg + ldlm_request + mds_body + mds_rec_create + FNAME_MAX + PATH_MAX - * MDS_MAXREPSIZE ~= 8300 bytes = lustre_msg + llog_header - * or, for mds_close() and mds_reint_unlink() on a many-OST filesystem: - * = 9210 bytes = lustre_msg + mds_body + 160 * (easize + cookiesize) - * - * Realistic size is about 512 bytes (20 character name + 128 char symlink), - * except in the open case where there are a large number of OSTs in a LOV. - */ -#define MDS_MAXREQSIZE (5 * 1024) -#define MDS_MAXREPSIZE max(9 * 1024, 280 + LOV_MAX_STRIPE_COUNT * 56) - -#define MGS_THREADS_AUTO_MIN 2 -#define MGS_THREADS_AUTO_MAX 32 -#define MGS_NBUFS (64 * num_online_cpus()) -#define MGS_BUFSIZE (8 * 1024) -#define MGS_MAXREQSIZE (8 * 1024) -#define MGS_MAXREPSIZE (9 * 1024) - -/* Absolute limits */ -#define OSS_THREADS_MIN 2 -#define OSS_THREADS_MAX 512 -#define OST_NBUFS (64 * num_online_cpus()) -#define OST_BUFSIZE (8 * 1024) -/* OST_MAXREQSIZE ~= 4768 bytes = - * lustre_msg + obdo + 16 * obd_ioobj + 256 * niobuf_remote - * - * - single object with 16 pages is 512 bytes - * - OST_MAXREQSIZE must be at least 1 page of cookies plus some spillover - */ -#define OST_MAXREQSIZE (5 * 1024) -#define OST_MAXREPSIZE (9 * 1024) - -struct ptlrpc_connection { - struct list_head c_link; - struct hlist_node c_hash; - lnet_nid_t c_self; - lnet_process_id_t c_peer; - struct obd_uuid c_remote_uuid; - atomic_t c_refcount; -}; - -struct ptlrpc_client { - __u32 cli_request_portal; - __u32 cli_reply_portal; - char *cli_name; -}; - -/* state flags of requests */ -/* XXX only ones left are those used by the bulk descs as well! */ -#define PTL_RPC_FL_INTR (1 << 0) /* reply wait was interrupted by user */ -#define PTL_RPC_FL_TIMEOUT (1 << 7) /* request timed out waiting for reply */ - -#define REQ_MAX_ACK_LOCKS 8 - -union ptlrpc_async_args { - /* Scratchpad for passing args to completion interpreter. Users - * cast to the struct of their choosing, and LASSERT that this is - * big enough. For _tons_ of context, OBD_ALLOC a struct and store - * a pointer to it here. The pointer_arg ensures this struct is at - * least big enough for that. */ - void *pointer_arg[9]; - __u64 space[4]; -}; - -struct ptlrpc_request_set; -typedef int (*set_interpreter_func)(struct ptlrpc_request_set *, void *, int); - -struct ptlrpc_request_set { - int set_remaining; /* # uncompleted requests */ - cfs_waitq_t set_waitq; - cfs_waitq_t *set_wakeup_ptr; - struct list_head set_requests; - struct list_head set_cblist; /* list of completion callbacks */ - set_interpreter_func set_interpret; /* completion callback */ - void *set_arg; /* completion context */ - /* locked so that any old caller can communicate requests to - * the set holder who can then fold them into the lock-free set */ - spinlock_t set_new_req_lock; - struct list_head set_new_requests; -}; - -struct ptlrpc_set_cbdata { - struct list_head psc_item; - set_interpreter_func psc_interpret; - void *psc_data; -}; - -struct ptlrpc_bulk_desc; - -/* - * ptlrpc callback & work item stuff - */ -struct ptlrpc_cb_id { - void (*cbid_fn)(lnet_event_t *ev); /* specific callback fn */ - void *cbid_arg; /* additional arg */ -}; - -#define RS_MAX_LOCKS 4 -#define RS_DEBUG 1 - -struct ptlrpc_reply_state { - struct ptlrpc_cb_id rs_cb_id; - struct list_head rs_list; - struct list_head rs_exp_list; - struct list_head rs_obd_list; -#if RS_DEBUG - struct list_head rs_debug_list; -#endif - /* updates to following flag serialised by srv_request_lock */ - unsigned long rs_difficult:1; /* ACK/commit stuff */ - unsigned long rs_scheduled:1; /* being handled? */ - unsigned long rs_scheduled_ever:1;/* any schedule attempts? */ - unsigned long rs_handled:1; /* been handled yet? */ - unsigned long rs_on_net:1; /* reply_out_callback pending? */ - unsigned long rs_prealloc:1; /* rs from prealloc list */ - - int rs_size; - __u64 rs_transno; - __u64 rs_xid; - struct obd_export *rs_export; - struct ptlrpc_service *rs_service; - lnet_handle_md_t rs_md_h; - atomic_t rs_refcount; - - /* locks awaiting client reply ACK */ - int rs_nlocks; - struct lustre_handle rs_locks[RS_MAX_LOCKS]; - ldlm_mode_t rs_modes[RS_MAX_LOCKS]; - /* last member: variable sized reply message */ - struct lustre_msg *rs_msg; -}; - -struct ptlrpc_thread; - -enum rq_phase { - RQ_PHASE_NEW = 0xebc0de00, - RQ_PHASE_RPC = 0xebc0de01, - RQ_PHASE_BULK = 0xebc0de02, - RQ_PHASE_INTERPRET = 0xebc0de03, - RQ_PHASE_COMPLETE = 0xebc0de04, -}; - -struct ptlrpc_request_pool { - spinlock_t prp_lock; - struct list_head prp_req_list; /* list of ptlrpc_request structs */ - int prp_rq_size; - void (*prp_populate)(struct ptlrpc_request_pool *, int); -}; - -struct ptlrpc_request { - int rq_type; /* one of PTL_RPC_MSG_* */ - struct list_head rq_list; - struct list_head rq_timed_list; /* server-side early replies */ - struct list_head rq_history_list; /* server-side history */ - __u64 rq_history_seq; /* history sequence # */ - int rq_status; - spinlock_t rq_lock; - /* client-side flags are serialized by rq_lock */ - unsigned long rq_intr:1, rq_replied:1, rq_err:1, - rq_timedout:1, rq_resend:1, rq_restart:1, - /* - * when ->rq_replay is set, request is kept by the client even - * after server commits corresponding transaction. This is - * used for operations that require sequence of multiple - * requests to be replayed. The only example currently is file - * open/close. When last request in such a sequence is - * committed, ->rq_replay is cleared on all requests in the - * sequence. - */ - rq_replay:1, - rq_no_resend:1, rq_waiting:1, rq_receiving_reply:1, - rq_no_delay:1, rq_net_err:1, rq_early:1, rq_must_unlink:1, - /* server-side flags */ - rq_packed_final:1, /* packed final reply */ - rq_sent_final:1; /* stop sending early replies */ - enum rq_phase rq_phase; /* one of RQ_PHASE_* */ - atomic_t rq_refcount; /* client-side refcount for SENT race, - server-side refcounf for multiple replies */ - - struct ptlrpc_thread *rq_svc_thread; /* initial thread servicing req */ - - int rq_request_portal; /* XXX FIXME bug 249 */ - int rq_reply_portal; /* XXX FIXME bug 249 */ - - int rq_nob_received; /* client-side # reply bytes actually received */ - - int rq_reqlen; - struct lustre_msg *rq_reqmsg; - - int rq_replen; - struct lustre_msg *rq_repbuf; /* client only, buf may be bigger than msg */ - struct lustre_msg *rq_repmsg; - __u64 rq_transno; - __u64 rq_xid; - struct list_head rq_replay_list; - - __u32 rq_req_swab_mask; - __u32 rq_rep_swab_mask; - - int rq_import_generation; - enum lustre_imp_state rq_send_state; - - int rq_early_count; /* how many early replies (for stats) */ - - /* client+server request */ - lnet_handle_md_t rq_req_md_h; - struct ptlrpc_cb_id rq_req_cbid; - - /* server-side... */ - struct timeval rq_arrival_time; /* request arrival time */ - struct ptlrpc_reply_state *rq_reply_state; /* separated reply state */ - struct ptlrpc_request_buffer_desc *rq_rqbd; /* incoming request buffer*/ -#ifdef CRAY_XT3 - __u32 rq_uid; /* peer uid, used in MDS only */ -#endif - - /* client-only incoming reply */ - lnet_handle_md_t rq_reply_md_h; - cfs_waitq_t rq_reply_waitq; - struct ptlrpc_cb_id rq_reply_cbid; - - lnet_nid_t rq_self; - lnet_process_id_t rq_peer; - struct obd_export *rq_export; - struct obd_import *rq_import; - - void (*rq_replay_cb)(struct ptlrpc_request *); - void (*rq_commit_cb)(struct ptlrpc_request *); - void *rq_cb_data; - - struct ptlrpc_bulk_desc *rq_bulk; /* client side bulk */ - /* client outgoing req */ - time_t rq_sent; /* when request sent, seconds, - * or time when request should - * be sent */ - volatile time_t rq_deadline; /* when request must finish. volatile - so that servers' early reply updates to the deadline aren't - kept in per-cpu cache */ - int rq_timeout; /* service time estimate (secs) */ - - /* Multi-rpc bits */ - struct list_head rq_set_chain; - struct ptlrpc_request_set *rq_set; - void *rq_interpret_reply; /* Async completion handler */ - union ptlrpc_async_args rq_async_args; /* Async completion context */ - struct ptlrpc_request_pool *rq_pool; /* Pool if request from - preallocated list */ -}; - -static inline void lustre_set_req_swabbed(struct ptlrpc_request *req, int index) -{ - LASSERT(index < sizeof(req->rq_req_swab_mask) * 8); - LASSERT((req->rq_req_swab_mask & (1 << index)) == 0); - req->rq_req_swab_mask |= 1 << index; -} - -static inline void lustre_set_rep_swabbed(struct ptlrpc_request *req, int index) -{ - LASSERT(index < sizeof(req->rq_rep_swab_mask) * 8); - LASSERT((req->rq_rep_swab_mask & (1 << index)) == 0); - req->rq_rep_swab_mask |= 1 << index; -} - -static inline int lustre_req_swabbed(struct ptlrpc_request *req, int index) -{ - LASSERT(index < sizeof(req->rq_req_swab_mask) * 8); - return req->rq_req_swab_mask & (1 << index); -} - -static inline int lustre_rep_swabbed(struct ptlrpc_request *req, int index) -{ - LASSERT(index < sizeof(req->rq_rep_swab_mask) * 8); - return req->rq_rep_swab_mask & (1 << index); -} - -static inline const char * -ptlrpc_rqphase2str(struct ptlrpc_request *req) -{ - switch (req->rq_phase) { - case RQ_PHASE_NEW: - return "New"; - case RQ_PHASE_RPC: - return "Rpc"; - case RQ_PHASE_BULK: - return "Bulk"; - case RQ_PHASE_INTERPRET: - return "Interpret"; - case RQ_PHASE_COMPLETE: - return "Complete"; - default: - return "?Phase?"; - } -} - -/* Spare the preprocessor, spoil the bugs. */ -#define FLAG(field, str) (field ? str : "") - -#define DEBUG_REQ_FLAGS(req) \ - ptlrpc_rqphase2str(req), \ - FLAG(req->rq_intr, "I"), FLAG(req->rq_replied, "R"), \ - FLAG(req->rq_err, "E"), \ - FLAG(req->rq_timedout, "X") /* eXpired */, FLAG(req->rq_resend, "S"), \ - FLAG(req->rq_restart, "T"), FLAG(req->rq_replay, "P"), \ - FLAG(req->rq_no_resend, "N"), \ - FLAG(req->rq_waiting, "W") - -#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s" - -void _debug_req(struct ptlrpc_request *req, __u32 mask, - struct libcfs_debug_msg_data *data, const char *fmt, ...) - __attribute__ ((format (printf, 4, 5))); - -#define debug_req(cdls, level, req, file, func, line, fmt, a...) \ -do { \ - CHECK_STACK(); \ - \ - if (((level) & D_CANTMASK) != 0 || \ - ((libcfs_debug & (level)) != 0 && \ - (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0)) { \ - static struct libcfs_debug_msg_data _req_dbg_data = \ - DEBUG_MSG_DATA_INIT(cdls, DEBUG_SUBSYSTEM, file, func, line); \ - _debug_req((req), (level), &_req_dbg_data, fmt, ##a); \ - } \ -} while(0) - -/* for most callers (level is a constant) this is resolved at compile time */ -#define DEBUG_REQ(level, req, fmt, args...) \ -do { \ - if ((level) & (D_ERROR | D_WARNING)) { \ - static cfs_debug_limit_state_t cdls; \ - debug_req(&cdls, level, req, __FILE__, __func__, __LINE__, \ - "@@@ "fmt" ", ## args); \ - } else \ - debug_req(NULL, level, req, __FILE__, __func__, __LINE__, \ - "@@@ "fmt" ", ## args); \ -} while (0) - -struct ptlrpc_bulk_page { - struct list_head bp_link; - int bp_buflen; - int bp_pageoffset; /* offset within a page */ - struct page *bp_page; -}; - -#define BULK_GET_SOURCE 0 -#define BULK_PUT_SINK 1 -#define BULK_GET_SINK 2 -#define BULK_PUT_SOURCE 3 - -struct ptlrpc_bulk_desc { - unsigned long bd_success:1; /* completed successfully */ - unsigned long bd_network_rw:1; /* accessible to the network */ - unsigned long bd_type:2; /* {put,get}{source,sink} */ - unsigned long bd_registered:1; /* client side */ - spinlock_t bd_lock; /* serialise with callback */ - int bd_import_generation; - struct obd_export *bd_export; - struct obd_import *bd_import; - __u32 bd_portal; - struct ptlrpc_request *bd_req; /* associated request */ - cfs_waitq_t bd_waitq; /* server side only WQ */ - int bd_iov_count; /* # entries in bd_iov */ - int bd_max_iov; /* allocated size of bd_iov */ - int bd_nob; /* # bytes covered */ - int bd_nob_transferred; /* # bytes GOT/PUT */ - - __u64 bd_last_xid; - - struct ptlrpc_cb_id bd_cbid; /* network callback info */ - lnet_handle_md_t bd_md_h; /* associated MD */ - lnet_nid_t bd_sender; /* stash event::sender */ - -#if defined(__KERNEL__) - lnet_kiov_t bd_iov[0]; -#else - lnet_md_iovec_t bd_iov[0]; -#endif -}; - -struct ptlrpc_thread { - - struct list_head t_link; /* active threads for service, from svc->srv_threads */ - - void *t_data; /* thread-private data (preallocated memory) */ - __u32 t_flags; - - unsigned int t_id; /* service thread index, from ptlrpc_start_threads */ - cfs_waitq_t t_ctl_waitq; -}; - -struct ptlrpc_request_buffer_desc { - struct list_head rqbd_list; - struct list_head rqbd_reqs; - struct ptlrpc_service *rqbd_service; - lnet_handle_md_t rqbd_md_h; - int rqbd_refcount; - char *rqbd_buffer; - struct ptlrpc_cb_id rqbd_cbid; - struct ptlrpc_request rqbd_req; -}; - -typedef int (*svc_handler_t)(struct ptlrpc_request *req); -typedef void (*svcreq_printfn_t)(void *, struct ptlrpc_request *); - -struct ptlrpc_service { - struct list_head srv_list; /* chain thru all services */ - int srv_max_req_size; /* biggest request to receive */ - int srv_max_reply_size; /* biggest reply to send */ - int srv_buf_size; /* size of individual buffers */ - int srv_nbuf_per_group; /* # buffers to allocate in 1 group */ - int srv_nbufs; /* total # req buffer descs allocated */ - int srv_threads_min; /* threads to start at SOW */ - int srv_threads_max; /* thread upper limit */ - int srv_threads_started; /* index of last started thread */ - int srv_threads_running; /* # running threads */ - int srv_n_difficult_replies; /* # 'difficult' replies */ - int srv_n_active_reqs; /* # reqs being served */ - cfs_duration_t srv_rqbd_timeout; /* timeout before re-posting reqs, in tick */ - int srv_watchdog_factor; /* soft watchdog timeout mutiplier */ - unsigned srv_cpu_affinity:1; /* bind threads to CPUs */ - unsigned srv_at_check:1; /* check early replies */ - - __u32 srv_req_portal; - __u32 srv_rep_portal; - - /* AT stuff */ - struct adaptive_timeout srv_at_estimate;/* estimated rpc service time */ - spinlock_t srv_at_lock; - struct list_head srv_at_list; /* reqs waiting for replies */ - cfs_timer_t srv_at_timer; /* early reply timer */ - - int srv_n_queued_reqs; /* # reqs in either of the queues below */ - struct list_head srv_req_in_queue; /* incoming reqs */ - struct list_head srv_request_queue; /* reqs waiting for service */ - - struct list_head srv_request_history; /* request history */ - __u64 srv_request_seq; /* next request sequence # */ - __u64 srv_request_max_cull_seq; /* highest seq culled from history */ - svcreq_printfn_t srv_request_history_print_fn; /* service-specific print fn */ - - struct list_head srv_idle_rqbds; /* request buffers to be reposted */ - struct list_head srv_active_rqbds; /* req buffers receiving */ - struct list_head srv_history_rqbds; /* request buffer history */ - int srv_nrqbd_receiving; /* # posted request buffers */ - int srv_n_history_rqbds; /* # request buffers in history */ - int srv_max_history_rqbds;/* max # request buffers in history */ - - atomic_t srv_outstanding_replies; - struct list_head srv_active_replies; /* all the active replies */ - struct list_head srv_reply_queue; /* replies waiting for service */ - - cfs_waitq_t srv_waitq; /* all threads sleep on this. This - * wait-queue is signalled when new - * incoming request arrives and when - * difficult reply has to be handled. */ - - struct list_head srv_threads; /* service thread list */ - svc_handler_t srv_handler; - - char *srv_name; /* only statically allocated strings here; we don't clean them */ - char *srv_thread_name; /* only statically allocated strings here; we don't clean them */ - - spinlock_t srv_lock; - - cfs_proc_dir_entry_t *srv_procroot; - struct lprocfs_stats *srv_stats; - - /* List of free reply_states */ - struct list_head srv_free_rs_list; - /* waitq to run, when adding stuff to srv_free_rs_list */ - cfs_waitq_t srv_free_rs_waitq; - - /* - * if non-NULL called during thread creation (ptlrpc_start_thread()) - * to initialize service specific per-thread state. - */ - int (*srv_init)(struct ptlrpc_thread *thread); - /* - * if non-NULL called during thread shutdown (ptlrpc_main()) to - * destruct state created by ->srv_init(). - */ - void (*srv_done)(struct ptlrpc_thread *thread); - - //struct ptlrpc_srv_ni srv_interfaces[0]; -}; - -/* ptlrpc/events.c */ -extern lnet_handle_eq_t ptlrpc_eq_h; -extern int ptlrpc_uuid_to_peer(struct obd_uuid *uuid, - lnet_process_id_t *peer, lnet_nid_t *self); -extern void request_out_callback (lnet_event_t *ev); -extern void reply_in_callback(lnet_event_t *ev); -extern void client_bulk_callback (lnet_event_t *ev); -extern void request_in_callback(lnet_event_t *ev); -extern void reply_out_callback(lnet_event_t *ev); -extern void server_bulk_callback (lnet_event_t *ev); - -/* ptlrpc/connection.c */ -void ptlrpc_dump_connections(void); -void ptlrpc_readdress_connection(struct ptlrpc_connection *, struct obd_uuid *); -struct ptlrpc_connection *ptlrpc_get_connection(lnet_process_id_t peer, - lnet_nid_t self, struct obd_uuid *uuid); -int ptlrpc_put_connection(struct ptlrpc_connection *c); -struct ptlrpc_connection *ptlrpc_connection_addref(struct ptlrpc_connection *); -int ptlrpc_init_connection(void); -void ptlrpc_cleanup_connection(void); -extern lnet_pid_t ptl_get_pid(void); - -/* ptlrpc/niobuf.c */ -int ptlrpc_start_bulk_transfer(struct ptlrpc_bulk_desc *desc); -void ptlrpc_abort_bulk(struct ptlrpc_bulk_desc *desc); -int ptlrpc_register_bulk(struct ptlrpc_request *req); -void ptlrpc_unregister_bulk (struct ptlrpc_request *req); - -static inline int ptlrpc_bulk_active (struct ptlrpc_bulk_desc *desc) -{ - int rc; - - spin_lock(&desc->bd_lock); - rc = desc->bd_network_rw; - spin_unlock(&desc->bd_lock); - return (rc); -} - -#define PTLRPC_REPLY_MAYBE_DIFFICULT 0x01 -#define PTLRPC_REPLY_EARLY 0x02 -int ptlrpc_send_reply(struct ptlrpc_request *req, int flags); -int ptlrpc_reply(struct ptlrpc_request *req); -int ptlrpc_error(struct ptlrpc_request *req); -void ptlrpc_resend_req(struct ptlrpc_request *request); -int ptlrpc_at_get_net_latency(struct ptlrpc_request *req); -int ptl_send_rpc(struct ptlrpc_request *request, int noreply); -int ptlrpc_register_rqbd (struct ptlrpc_request_buffer_desc *rqbd); - -/* ptlrpc/client.c */ -void ptlrpc_init_client(int req_portal, int rep_portal, char *name, - struct ptlrpc_client *); -void ptlrpc_cleanup_client(struct obd_import *imp); -struct ptlrpc_connection *ptlrpc_uuid_to_connection(struct obd_uuid *uuid); - -static inline int -ptlrpc_client_recv_or_unlink (struct ptlrpc_request *req) -{ - int rc; - - spin_lock(&req->rq_lock); - rc = req->rq_receiving_reply || req->rq_must_unlink; - spin_unlock(&req->rq_lock); - return (rc); -} - -static inline void -ptlrpc_wake_client_req (struct ptlrpc_request *req) -{ - if (req->rq_set == NULL) - cfs_waitq_signal(&req->rq_reply_waitq); - else - cfs_waitq_signal(&req->rq_set->set_waitq); -} - -int ptlrpc_queue_wait(struct ptlrpc_request *req); -int ptlrpc_replay_req(struct ptlrpc_request *req); -void ptlrpc_unregister_reply(struct ptlrpc_request *req); -void ptlrpc_restart_req(struct ptlrpc_request *req); -void ptlrpc_abort_inflight(struct obd_import *imp); - -struct ptlrpc_request_set *ptlrpc_prep_set(void); -int ptlrpc_set_add_cb(struct ptlrpc_request_set *set, - set_interpreter_func fn, void *data); -int ptlrpc_set_next_timeout(struct ptlrpc_request_set *); -int ptlrpc_check_set(struct ptlrpc_request_set *set); -int ptlrpc_set_wait(struct ptlrpc_request_set *); -int ptlrpc_expired_set(void *data); -void ptlrpc_interrupted_set(void *data); -void ptlrpc_mark_interrupted(struct ptlrpc_request *req); -void ptlrpc_set_destroy(struct ptlrpc_request_set *); -void ptlrpc_set_add_req(struct ptlrpc_request_set *, struct ptlrpc_request *); -void ptlrpc_set_add_new_req(struct ptlrpc_request_set *, - struct ptlrpc_request *); - -void ptlrpc_free_rq_pool(struct ptlrpc_request_pool *pool); -void ptlrpc_add_rqs_to_pool(struct ptlrpc_request_pool *pool, int num_rq); -struct ptlrpc_request_pool *ptlrpc_init_rq_pool(int, int, - void (*populate_pool)(struct ptlrpc_request_pool *, int)); -void ptlrpc_at_set_req_timeout(struct ptlrpc_request *req); -struct ptlrpc_request *ptlrpc_prep_req(struct obd_import *imp, __u32 version, - int opcode, int count, int *lengths, - char **bufs); -struct ptlrpc_request *ptlrpc_prep_req_pool(struct obd_import *imp, - __u32 version, int opcode, - int count, int *lengths, char **bufs, - struct ptlrpc_request_pool *pool); -void ptlrpc_free_req(struct ptlrpc_request *request); -void ptlrpc_req_finished(struct ptlrpc_request *request); -void ptlrpc_req_finished_with_imp_lock(struct ptlrpc_request *request); -struct ptlrpc_request *ptlrpc_request_addref(struct ptlrpc_request *req); -struct ptlrpc_bulk_desc *ptlrpc_prep_bulk_imp (struct ptlrpc_request *req, - int npages, int type, int portal); -struct ptlrpc_bulk_desc *ptlrpc_prep_bulk_exp(struct ptlrpc_request *req, - int npages, int type, int portal); -void ptlrpc_free_bulk(struct ptlrpc_bulk_desc *bulk); -void ptlrpc_prep_bulk_page(struct ptlrpc_bulk_desc *desc, - cfs_page_t *page, int pageoffset, int len); -void ptlrpc_retain_replayable_request(struct ptlrpc_request *req, - struct obd_import *imp); -__u64 ptlrpc_next_xid(void); -__u64 ptlrpc_sample_next_xid(void); -__u64 ptlrpc_req_xid(struct ptlrpc_request *request); - -/* ptlrpc/service.c */ -void ptlrpc_save_lock (struct ptlrpc_request *req, - struct lustre_handle *lock, int mode); -void ptlrpc_commit_replies (struct obd_device *obd); -void ptlrpc_schedule_difficult_reply (struct ptlrpc_reply_state *rs); -struct ptlrpc_service *ptlrpc_init_svc(int nbufs, int bufsize, int max_req_size, - int max_reply_size, - int req_portal, int rep_portal, - int watchdog_factor, - svc_handler_t, char *name, - cfs_proc_dir_entry_t *proc_entry, - svcreq_printfn_t, - int min_threads, int max_threads, - char *threadname); -void ptlrpc_stop_all_threads(struct ptlrpc_service *svc); - -int ptlrpc_start_threads(struct obd_device *dev, struct ptlrpc_service *svc); -int ptlrpc_start_thread(struct obd_device *dev, struct ptlrpc_service *svc); -int ptlrpc_unregister_service(struct ptlrpc_service *service); -int liblustre_check_services (void *arg); -void ptlrpc_daemonize(char *name); -int ptlrpc_service_health_check(struct ptlrpc_service *); - - -struct ptlrpc_svc_data { - char *name; - struct ptlrpc_service *svc; - struct ptlrpc_thread *thread; - struct obd_device *dev; -}; - -/* ptlrpc/import.c */ -int ptlrpc_connect_import(struct obd_import *imp, char * new_uuid); -int ptlrpc_init_import(struct obd_import *imp); -int ptlrpc_disconnect_import(struct obd_import *imp, int noclose); -int ptlrpc_import_recovery_state_machine(struct obd_import *imp); -void ptlrpc_import_setasync(struct obd_import *imp, int count); -int ptlrpc_reconnect_import(struct obd_import *imp); - -/* ptlrpc/pack_generic.c */ -int lustre_msg_swabbed(struct lustre_msg *msg); -int lustre_msg_check_version(struct lustre_msg *msg, __u32 version); -int lustre_pack_request(struct ptlrpc_request *, __u32 magic, int count, - int *lens, char **bufs); -int lustre_pack_reply(struct ptlrpc_request *, int count, int *lens, - char **bufs); -#define LPRFL_EARLY_REPLY 1 -int lustre_pack_reply_flags(struct ptlrpc_request *, int count, int *lens, - char **bufs, int flags); -void lustre_shrink_reply(struct ptlrpc_request *req, int segment, - unsigned int newlen, int move_data); -void lustre_free_reply_state(struct ptlrpc_reply_state *rs); -int lustre_msg_size(__u32 magic, int count, int *lengths); -int lustre_packed_msg_size(struct lustre_msg *msg); -int lustre_msg_early_size(void); -int lustre_unpack_msg(struct lustre_msg *m, int len); -void *lustre_msg_buf(struct lustre_msg *m, int n, int minlen); -int lustre_msg_buflen(struct lustre_msg *m, int n); -void lustre_msg_set_buflen(struct lustre_msg *m, int n, int len); -int lustre_msg_bufcount(struct lustre_msg *m); -char *lustre_msg_string (struct lustre_msg *m, int n, int max_len); -void *lustre_swab_buf(struct lustre_msg *, int n, int minlen, void *swabber); -void *lustre_swab_reqbuf(struct ptlrpc_request *req, int n, int minlen, - void *swabber); -void *lustre_swab_repbuf(struct ptlrpc_request *req, int n, int minlen, - void *swabber); -__u32 lustre_msghdr_get_flags(struct lustre_msg *msg); -void lustre_msghdr_set_flags(struct lustre_msg *msg, __u32 flags); -__u32 lustre_msg_get_flags(struct lustre_msg *msg); -void lustre_msg_add_flags(struct lustre_msg *msg, int flags); -void lustre_msg_set_flags(struct lustre_msg *msg, int flags); -void lustre_msg_clear_flags(struct lustre_msg *msg, int flags); -__u32 lustre_msg_get_op_flags(struct lustre_msg *msg); -void lustre_msg_add_op_flags(struct lustre_msg *msg, int flags); -void lustre_msg_set_op_flags(struct lustre_msg *msg, int flags); -struct lustre_handle *lustre_msg_get_handle(struct lustre_msg *msg); -__u32 lustre_msg_get_type(struct lustre_msg *msg); -__u32 lustre_msg_get_version(struct lustre_msg *msg); -void lustre_msg_add_version(struct lustre_msg *msg, int version); -__u32 lustre_msg_get_opc(struct lustre_msg *msg); -__u64 lustre_msg_get_last_xid(struct lustre_msg *msg); -__u64 lustre_msg_get_last_committed(struct lustre_msg *msg); -__u64 lustre_msg_get_transno(struct lustre_msg *msg); -__u64 lustre_msg_get_slv(struct lustre_msg *msg); -__u32 lustre_msg_get_limit(struct lustre_msg *msg); -void lustre_msg_set_slv(struct lustre_msg *msg, __u64 slv); -void lustre_msg_set_limit(struct lustre_msg *msg, __u64 limit); -int lustre_msg_get_status(struct lustre_msg *msg); -__u32 lustre_msg_get_conn_cnt(struct lustre_msg *msg); -int lustre_msg_is_v1(struct lustre_msg *msg); -__u32 lustre_msg_get_magic(struct lustre_msg *msg); -__u32 lustre_msg_get_timeout(struct lustre_msg *msg); -__u32 lustre_msg_get_service_time(struct lustre_msg *msg); -__u32 lustre_msg_get_cksum(struct lustre_msg *msg); -__u32 lustre_msg_calc_cksum(struct lustre_msg *msg); -void lustre_msg_set_handle(struct lustre_msg *msg,struct lustre_handle *handle); -void lustre_msg_set_type(struct lustre_msg *msg, __u32 type); -void lustre_msg_set_opc(struct lustre_msg *msg, __u32 opc); -void lustre_msg_set_last_xid(struct lustre_msg *msg, __u64 last_xid); -void lustre_msg_set_last_committed(struct lustre_msg *msg,__u64 last_committed); -void lustre_msg_set_transno(struct lustre_msg *msg, __u64 transno); -void lustre_msg_set_status(struct lustre_msg *msg, __u32 status); -void lustre_msg_set_conn_cnt(struct lustre_msg *msg, __u32 conn_cnt); -void lustre_msg_set_timeout(struct lustre_msg *msg, __u32 timeout); -void lustre_msg_set_service_time(struct lustre_msg *msg, __u32 service_time); -void lustre_msg_set_cksum(struct lustre_msg *msg, __u32 cksum); - -static inline void -ptlrpc_rs_addref(struct ptlrpc_reply_state *rs) -{ - LASSERT(atomic_read(&rs->rs_refcount) > 0); - atomic_inc(&rs->rs_refcount); -} - -static inline void -ptlrpc_rs_decref(struct ptlrpc_reply_state *rs) -{ - LASSERT(atomic_read(&rs->rs_refcount) > 0); - if (atomic_dec_and_test(&rs->rs_refcount)) - lustre_free_reply_state(rs); -} - -/* Should only be called once per req */ -static inline void ptlrpc_req_drop_rs(struct ptlrpc_request *req) -{ - if (req->rq_reply_state == NULL) - return; /* shouldn't occur */ - ptlrpc_rs_decref(req->rq_reply_state); - req->rq_reply_state = NULL; - req->rq_repmsg = NULL; -} - -static inline __u32 lustre_request_magic(struct ptlrpc_request *req) -{ - return lustre_msg_get_magic(req->rq_reqmsg); -} - -static inline int ptlrpc_req_get_repsize(struct ptlrpc_request *req) -{ - switch (req->rq_reqmsg->lm_magic) { - case LUSTRE_MSG_MAGIC_V1: - CERROR("function not supported for lustre_msg V1!\n"); - return -ENOTSUPP; - case LUSTRE_MSG_MAGIC_V2: - return req->rq_reqmsg->lm_repsize; - default: - LASSERTF(0, "incorrect message magic: %08x\n", - req->rq_reqmsg->lm_magic); - return -EFAULT; - } -} - -static inline void -ptlrpc_req_set_repsize(struct ptlrpc_request *req, int count, int *lens) -{ - int size = lustre_msg_size(req->rq_reqmsg->lm_magic, count, lens); - - req->rq_replen = size + lustre_msg_early_size(); - if (req->rq_reqmsg->lm_magic == LUSTRE_MSG_MAGIC_V2) - req->rq_reqmsg->lm_repsize = size; -} - -/* ldlm/ldlm_lib.c */ -int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf); -int client_obd_cleanup(struct obd_device * obddev); -int client_connect_import(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid, struct obd_connect_data *, - void *localdata); -int client_disconnect_export(struct obd_export *exp); -int client_import_add_conn(struct obd_import *imp, struct obd_uuid *uuid, - int priority); -int client_import_del_conn(struct obd_import *imp, struct obd_uuid *uuid); -int import_set_conn_priority(struct obd_import *imp, struct obd_uuid *uuid); - -/* ptlrpc/pinger.c */ -int ptlrpc_pinger_add_import(struct obd_import *imp); -int ptlrpc_pinger_del_import(struct obd_import *imp); -#ifdef __KERNEL__ -void ping_evictor_start(void); -void ping_evictor_stop(void); -#else -#define ping_evictor_start() do {} while (0) -#define ping_evictor_stop() do {} while (0) -#endif - -/* ptlrpc/ptlrpcd.c */ -void ptlrpcd_wake(struct ptlrpc_request *req); -void ptlrpcd_add_req(struct ptlrpc_request *req); -int ptlrpcd_addref(void); -void ptlrpcd_decref(void); - -/* ptlrpc/lproc_ptlrpc.c */ -const char* ll_opcode2str(__u32 opcode); -#ifdef LPROCFS -void ptlrpc_lprocfs_register_obd(struct obd_device *obd); -void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd); -void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int opc, int bytes); -#else -static inline void ptlrpc_lprocfs_register_obd(struct obd_device *obd) {} -static inline void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd) {} -static inline void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int opc, - int bytes) {} -#endif - -/* ptlrpc/llog_server.c */ -int llog_origin_handle_create(struct ptlrpc_request *req); -int llog_origin_handle_destroy(struct ptlrpc_request *req); -int llog_origin_handle_prev_block(struct ptlrpc_request *req); -int llog_origin_handle_next_block(struct ptlrpc_request *req); -int llog_origin_handle_read_header(struct ptlrpc_request *req); -int llog_origin_handle_close(struct ptlrpc_request *req); -int llog_origin_handle_cancel(struct ptlrpc_request *req); -int llog_catinfo(struct ptlrpc_request *req); - -/* ptlrpc/llog_client.c */ -extern struct llog_operations llog_client_ops; - -#endif diff --git a/lustre/include/lustre_param.h b/lustre/include/lustre_param.h deleted file mode 100644 index 281cf6e521..0000000000 --- a/lustre/include/lustre_param.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nathan Rutman <nathan@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * - * User-settable parameter keys - */ - -#ifndef _LUSTRE_PARAM_H -#define _LUSTRE_PARAM_H - -/* obd_config.c */ -int class_find_param(char *buf, char *key, char **valp); -int class_match_param(char *buf, char *key, char **valp); -int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh); -/* obd_mount.c */ -int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd, - char *s1, char *s2, char *s3, char *s4); - - - -/****************** User-settable parameter keys *********************/ -/* e.g. - tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda - lctl conf_param testfs-OST0000 failover.node=3@elan,192.168.0.3@tcp0 - ... testfs-MDT0000.lov.stripesize=4M - ... testfs-OST0000.ost.client_cache_seconds=15 - ... testfs.sys.timeout=<secs> - ... testfs.llite.max_read_ahead_mb=16 -*/ - -/* System global or special params not handled in obd's proc */ -#define PARAM_SYS_TIMEOUT "sys.timeout=" /* global */ -#define PARAM_MGSNODE "mgsnode=" /* during mount */ -#define PARAM_FAILNODE "failover.node=" /* llog generation */ -#define PARAM_FAILMODE "failover.mode=" /* llog generation */ -#define PARAM_ACTIVE "active=" /* llog generation */ -#define PARAM_MDT_UPCALL "mdt.group_upcall=" /* mds group upcall */ - -/* Prefixes for parameters handled by obd's proc methods (XXX_process_config) */ -#define PARAM_OST "ost." -#define PARAM_OSC "osc." -#define PARAM_MDT "mdt." -#define PARAM_MDC "mdc." -#define PARAM_LLITE "llite." -#define PARAM_LOV "lov." - -#endif /* _LUSTRE_PARAM_H */ diff --git a/lustre/include/lustre_quota.h b/lustre/include/lustre_quota.h deleted file mode 100644 index eb8b227d99..0000000000 --- a/lustre/include/lustre_quota.h +++ /dev/null @@ -1,594 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ -#ifndef _LUSTRE_QUOTA_H -#define _LUSTRE_QUOTA_H - -#if defined(__linux__) -#include <linux/lustre_quota.h> -#elif defined(__APPLE__) -#include <darwin/lustre_quota.h> -#elif defined(__WINNT__) -#include <winnt/lustre_quota.h> -#else -#error Unsupported operating system. -#endif - -#include <lustre/lustre_idl.h> -#include <lustre_net.h> -#include <lvfs.h> -#include <obd_support.h> - -struct obd_device; -struct client_obd; - -#ifndef NR_DQHASH -#define NR_DQHASH 45 -#endif - -#ifdef HAVE_QUOTA_SUPPORT - -#ifdef __KERNEL__ - -/* structures to access admin quotafile */ -struct lustre_mem_dqinfo { - unsigned int dqi_bgrace; - unsigned int dqi_igrace; - unsigned long dqi_flags; - unsigned int dqi_blocks; - unsigned int dqi_free_blk; - unsigned int dqi_free_entry; -}; - -struct lustre_quota_info { - struct file *qi_files[MAXQUOTAS]; - struct lustre_mem_dqinfo qi_info[MAXQUOTAS]; - lustre_quota_version_t qi_version; -}; - -#define DQ_STATUS_AVAIL 0x0 /* Available dquot */ -#define DQ_STATUS_SET 0x01 /* Sombody is setting dquot */ -#define DQ_STATUS_RECOVERY 0x02 /* dquot is in recovery */ - -struct lustre_mem_dqblk { - __u64 dqb_bhardlimit; /* absolute limit on disk blks alloc */ - __u64 dqb_bsoftlimit; /* preferred limit on disk blks */ - __u64 dqb_curspace; /* current used space */ - __u64 dqb_ihardlimit; /* absolute limit on allocated inodes */ - __u64 dqb_isoftlimit; /* preferred inode limit */ - __u64 dqb_curinodes; /* current # allocated inodes */ - time_t dqb_btime; /* time limit for excessive disk use */ - time_t dqb_itime; /* time limit for excessive inode use */ -}; - -struct lustre_dquot { - /* Hash list in memory, protect by dquot_hash_lock */ - struct list_head dq_hash; - /* Protect the data in lustre_dquot */ - struct semaphore dq_sem; - /* Use count */ - int dq_refcnt; - /* Pointer of quota info it belongs to */ - struct lustre_quota_info *dq_info; - - loff_t dq_off; /* Offset of dquot on disk */ - unsigned int dq_id; /* ID this applies to (uid, gid) */ - int dq_type; /* Type fo quota (USRQUOTA, GRPQUOUTA) */ - unsigned short dq_status; /* See DQ_STATUS_ */ - unsigned long dq_flags; /* See DQ_ in quota.h */ - struct lustre_mem_dqblk dq_dqb; /* Diskquota usage */ -}; - -struct dquot_id { - struct list_head di_link; - __u32 di_id; -}; - -#define QFILE_CHK 1 -#define QFILE_RD_INFO 2 -#define QFILE_WR_INFO 3 -#define QFILE_INIT_INFO 4 -#define QFILE_RD_DQUOT 5 -#define QFILE_WR_DQUOT 6 -#define QFILE_CONVERT 7 - -/* admin quotafile operations */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) -int lustre_check_quota_file(struct lustre_quota_info *lqi, int type); -int lustre_read_quota_info(struct lustre_quota_info *lqi, int type); -int lustre_write_quota_info(struct lustre_quota_info *lqi, int type); -int lustre_read_dquot(struct lustre_dquot *dquot); -int lustre_commit_dquot(struct lustre_dquot *dquot); -int lustre_init_quota_info(struct lustre_quota_info *lqi, int type); -int lustre_get_qids(struct file *file, struct inode *inode, int type, - struct list_head *list); -int lustre_quota_convert(struct lustre_quota_info *lqi, int type); -#else - -#ifndef DQ_FAKE_B -#define DQ_FAKE_B 6 -#endif - -static inline int lustre_check_quota_file(struct lustre_quota_info *lqi, - int type) -{ - return 0; -} -static inline int lustre_read_quota_info(struct lustre_quota_info *lqi, - int type) -{ - return 0; -} -static inline int lustre_write_quota_info(struct lustre_quota_info *lqi, - int type) -{ - return 0; -} -static inline int lustre_read_dquot(struct lustre_dquot *dquot) -{ - return 0; -} -static inline int lustre_commit_dquot(struct lustre_dquot *dquot) -{ - return 0; -} -static inline int lustre_init_quota_info(struct lustre_quota_info *lqi, - int type) -{ - return 0; -} -static inline int lustre_quota_convert(struct lustre_quota_info *lqi, - int type) -{ - return 0; -} -#endif /* KERNEL_VERSION(2,5,0) */ - -#define LL_DQUOT_OFF(sb) DQUOT_OFF(sb) - -typedef int (*dqacq_handler_t) (struct obd_device * obd, struct qunit_data * qd, - int opc); -struct lustre_quota_ctxt { - struct super_block *lqc_sb; /* superblock this applies to */ - struct obd_import *lqc_import; /* import used to send dqacq/dqrel RPC */ - dqacq_handler_t lqc_handler; /* dqacq/dqrel RPC handler, only for quota master */ - unsigned long lqc_recovery:1, /* Doing recovery */ - lqc_atype:2, /* Turn on user/group quota at setup automatically, - * 0: none, 1: user quota, 2: group quota, 3: both */ - lqc_status:1, /* Quota status. 0:Off, 1:On */ - lqc_switch_qs:1; /* the function of change qunit size - * 0:Off, 1:On */ - unsigned long lqc_iunit_sz; /* original unit size of file quota and - * upper limitation for adjust file - * qunit */ - unsigned long lqc_itune_sz; /* Trigger dqacq when available file - * quota less than this value, trigger - * dqrel when available file quota - * more than this value + 1 iunit */ - unsigned long lqc_bunit_sz; /* original unit size of block quota and - * upper limitation for adjust block - * qunit */ - unsigned long lqc_btune_sz; /* See comment of lqc_itune_sz */ - struct lustre_class_hash_body *lqc_lqs_hash_body; - /* all lustre_qunit_size structure in - * it */ - /* the values below are relative to how master change its qunit sizes */ - unsigned long lqc_cqs_boundary_factor; /* this affects the boundary of - * shrinking and enlarging qunit - * size. default=4 */ - unsigned long lqc_cqs_least_bunit; /* the least value of block qunit */ - unsigned long lqc_cqs_least_iunit; /* the least value of inode qunit */ - unsigned long lqc_cqs_qs_factor; /* when enlarging, qunit size will - * mutilple it; when shrinking, - * qunit size will divide it */ - int lqc_switch_seconds; /* avoid ping-pong effect of - * adjusting qunit size. How many - * seconds must be waited between - * enlarging and shinking qunit */ - spinlock_t lqc_lock; /* guard lqc_imp_valid now */ -}; - -#define LQC_HASH_BODY(qctxt) (qctxt->lqc_lqs_hash_body) - -struct lustre_qunit_size { - struct hlist_node lqs_hash; /* the hash entry */ - unsigned int lqs_id; /* id of user/group */ - unsigned long lqs_flags; /* is user/group; FULLBUF or LESSBUF */ - unsigned long lqs_iunit_sz; /* Unit size of file quota currently */ - unsigned long lqs_itune_sz; /* Trigger dqacq when available file quota - * less than this value, trigger dqrel - * when more than this value + 1 iunit */ - unsigned long lqs_bunit_sz; /* Unit size of block quota currently */ - unsigned long lqs_btune_sz; /* See comment of lqs itune sz */ - unsigned long lqs_bwrite_pending; /* the blocks reached ost and don't - * finish */ - unsigned long lqs_iwrite_pending; /* the inodes reached mds and don't - * finish */ - long long lqs_ino_rec; /* when inodes are allocated/released, - * this value will record it */ - long long lqs_blk_rec; /* when blocks are allocated/released, - * this value will record it */ - atomic_t lqs_refcount; - cfs_time_t lqs_last_bshrink; /* time of last block shrink */ - cfs_time_t lqs_last_ishrink; /* time of last inode shrink */ - spinlock_t lqs_lock; -}; - -#define LQS_IS_GRP(lqs) ((lqs)->lqs_flags & LQUOTA_FLAGS_GRP) -#define LQS_IS_ADJBLK(lqs) ((lqs)->lqs_flags & LQUOTA_FLAGS_ADJBLK) -#define LQS_IS_ADJINO(lqs) ((lqs)->lqs_flags & LQUOTA_FLAGS_ADJINO) - -#define LQS_SET_GRP(lqs) ((lqs)->lqs_flags |= LQUOTA_FLAGS_GRP) -#define LQS_SET_ADJBLK(lqs) ((lqs)->lqs_flags |= LQUOTA_FLAGS_ADJBLK) -#define LQS_SET_ADJINO(lqs) ((lqs)->lqs_flags |= LQUOTA_FLAGS_ADJINO) - -static inline void lqs_getref(struct lustre_qunit_size *lqs) -{ - atomic_inc(&lqs->lqs_refcount); -} - -static inline void lqs_putref(struct lustre_qunit_size *lqs) -{ - if (atomic_dec_and_test(&lqs->lqs_refcount)) { - spin_lock(&lqs->lqs_lock); - hlist_del_init(&lqs->lqs_hash); - spin_unlock(&lqs->lqs_lock); - OBD_FREE_PTR(lqs); - } -} - -static inline void lqs_initref(struct lustre_qunit_size *lqs) -{ - atomic_set(&lqs->lqs_refcount, 0); -} - -#else - -struct lustre_quota_info { -}; - -struct lustre_quota_ctxt { -}; - -#endif /* !__KERNEL__ */ - -#else - -#define LL_DQUOT_OFF(sb) do {} while(0) - -struct lustre_quota_info { -}; - -struct lustre_quota_ctxt { -}; - -#endif /* !HAVE_QUOTA_SUPPORT */ - -/* If the (quota limit < qunit * slave count), the slave which can't - * acquire qunit should set it's local limit as MIN_QLIMIT */ -#define MIN_QLIMIT 1 - -struct quotacheck_thread_args { - struct obd_export *qta_exp; /* obd export */ - struct obd_quotactl qta_oqctl; /* obd_quotactl args */ - struct super_block *qta_sb; /* obd super block */ - atomic_t *qta_sem; /* obt_quotachecking */ -}; - -typedef int (*quota_acquire)(struct obd_device *obd, - unsigned int uid, unsigned int gid); - -typedef struct { - int (*quota_init) (void); - int (*quota_exit) (void); - int (*quota_setup) (struct obd_device *); - int (*quota_cleanup) (struct obd_device *); - /* For quota master, close admin quota files */ - int (*quota_fs_cleanup) (struct obd_device *); - int (*quota_ctl) (struct obd_export *, struct obd_quotactl *); - int (*quota_check) (struct obd_export *, struct obd_quotactl *); - int (*quota_recovery) (struct obd_device *); - - /* For quota master/slave, adjust quota limit after fs operation */ - int (*quota_adjust) (struct obd_device *, unsigned int[], - unsigned int[], int, int); - - /* For quota slave, set import, trigger quota recovery */ - int (*quota_setinfo) (struct obd_export *, struct obd_device *); - - /* For quota slave, clear import when relative import is invalid */ - int (*quota_clearinfo) (struct obd_export *, struct obd_device *); - - /* For quota slave, set proper thread resoure capability */ - int (*quota_enforce) (struct obd_device *, unsigned int); - - /* For quota slave, check whether specified uid/gid is over quota */ - int (*quota_getflag) (struct obd_device *, struct obdo *); - - /* For quota slave, acquire/release quota from master if needed */ - int (*quota_acquire) (struct obd_device *, unsigned int, unsigned int); - - /* For quota slave, check whether specified uid/gid's remaining quota - * can finish a block_write or inode_create rpc. It updates the pending - * record of block and inode, acquires quota if necessary */ - int (*quota_chkquota) (struct obd_device *, unsigned int, unsigned int, - int, int *, quota_acquire); - - /* For quota client, poll if the quota check done */ - int (*quota_poll_check) (struct obd_export *, struct if_quotacheck *); - - /* For quota client, check whether specified uid/gid is over quota */ - int (*quota_chkdq) (struct client_obd *, unsigned int, unsigned int); - - /* For quota client, the actions after the pending write is committed */ - int (*quota_pending_commit) (struct obd_device *, unsigned int, - unsigned int, int); - - /* For quota client, set over quota flag for specifed uid/gid */ - int (*quota_setdq) (struct client_obd *, unsigned int, unsigned int, - obd_flag, obd_flag); - - /* For adjusting qunit size b=10600 */ - int (*quota_adjust_qunit) (struct obd_export *exp, struct - quota_adjust_qunit *oqaq); - -} quota_interface_t; - -#define Q_COPY(out, in, member) (out)->member = (in)->member - -#define QUOTA_OP(interface, op) interface->quota_ ## op - -#define QUOTA_CHECK_OP(interface, op) \ -do { \ - if (!interface) \ - RETURN(0); \ - if (!QUOTA_OP(interface, op)) { \ - CERROR("no quota operation: " #op "\n"); \ - RETURN(-EOPNOTSUPP); \ - } \ -} while(0) - -static inline int lquota_init(quota_interface_t *interface) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, init); - rc = QUOTA_OP(interface, init)(); - RETURN(rc); -} - -static inline int lquota_exit(quota_interface_t *interface) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, exit); - rc = QUOTA_OP(interface, exit)(); - RETURN(rc); -} - -static inline int lquota_setup(quota_interface_t *interface, - struct obd_device *obd) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, setup); - rc = QUOTA_OP(interface, setup)(obd); - RETURN(rc); -} - -static inline int lquota_cleanup(quota_interface_t *interface, - struct obd_device *obd) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, cleanup); - rc = QUOTA_OP(interface, cleanup)(obd); - RETURN(rc); -} - -static inline int lquota_fs_cleanup(quota_interface_t *interface, - struct obd_device *obd) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, fs_cleanup); - rc = QUOTA_OP(interface, fs_cleanup)(obd); - RETURN(rc); -} - -static inline int lquota_recovery(quota_interface_t *interface, - struct obd_device *obd) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, recovery); - rc = QUOTA_OP(interface, recovery)(obd); - RETURN(rc); -} - -static inline int lquota_adjust(quota_interface_t *interface, - struct obd_device *obd, - unsigned int qcids[], - unsigned int qpids[], - int rc, int opc) -{ - int ret; - ENTRY; - - QUOTA_CHECK_OP(interface, adjust); - ret = QUOTA_OP(interface, adjust)(obd, qcids, qpids, rc, opc); - RETURN(ret); -} - -static inline int lquota_chkdq(quota_interface_t *interface, - struct client_obd *cli, - unsigned int uid, unsigned int gid) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, chkdq); - rc = QUOTA_OP(interface, chkdq)(cli, uid, gid); - RETURN(rc); -} - -static inline int lquota_setdq(quota_interface_t *interface, - struct client_obd *cli, - unsigned int uid, unsigned int gid, - obd_flag valid, obd_flag flags) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, setdq); - rc = QUOTA_OP(interface, setdq)(cli, uid, gid, valid, flags); - RETURN(rc); -} - -static inline int lquota_poll_check(quota_interface_t *interface, - struct obd_export *exp, - struct if_quotacheck *qchk) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, poll_check); - rc = QUOTA_OP(interface, poll_check)(exp, qchk); - RETURN(rc); -} - -static inline int lquota_setinfo(quota_interface_t *interface, - struct obd_export *exp, - struct obd_device *obd) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, setinfo); - rc = QUOTA_OP(interface, setinfo)(exp, obd); - RETURN(rc); -} - -static inline int lquota_clearinfo(quota_interface_t *interface, - struct obd_export *exp, - struct obd_device *obd) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, clearinfo); - rc = QUOTA_OP(interface, clearinfo)(exp, obd); - RETURN(rc); -} - -static inline int lquota_enforce(quota_interface_t *interface, - struct obd_device *obd, - unsigned int ignore) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, enforce); - rc = QUOTA_OP(interface, enforce)(obd, ignore); - RETURN(rc); -} - -static inline int lquota_getflag(quota_interface_t *interface, - struct obd_device *obd, struct obdo *oa) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, getflag); - rc = QUOTA_OP(interface, getflag)(obd, oa); - RETURN(rc); -} - -static inline int lquota_acquire(quota_interface_t *interface, - struct obd_device *obd, - unsigned int uid, unsigned int gid) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, acquire); - rc = QUOTA_OP(interface, acquire)(obd, uid, gid); - RETURN(rc); -} - -static inline int lquota_chkquota(quota_interface_t *interface, - struct obd_device *obd, - unsigned int uid, unsigned int gid, - int count, int *flag) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, chkquota); - QUOTA_CHECK_OP(interface, acquire); - rc = QUOTA_OP(interface, chkquota)(obd, uid, gid, count, flag, - QUOTA_OP(interface, acquire)); - RETURN(rc); -} - -static inline int lquota_pending_commit(quota_interface_t *interface, - struct obd_device *obd, - unsigned int uid, unsigned int gid, - int npage) -{ - int rc; - ENTRY; - - QUOTA_CHECK_OP(interface, pending_commit); - rc = QUOTA_OP(interface, pending_commit)(obd, uid, gid, npage); - RETURN(rc); -} - -int lprocfs_quota_rd_bunit(char *page, char **start, off_t off, int count, - int *eof, void *data); -int lprocfs_quota_wr_bunit(struct file *file, const char *buffer, - unsigned long count, void *data); -int lprocfs_quota_rd_btune(char *page, char **start, off_t off, int count, - int *eof, void *data); -int lprocfs_quota_wr_btune(struct file *file, const char *buffer, - unsigned long count, void *data); -int lprocfs_quota_rd_iunit(char *page, char **start, off_t off, int count, - int *eof, void *data); -int lprocfs_quota_wr_iunit(struct file *file, const char *buffer, - unsigned long count, void *data); -int lprocfs_quota_rd_itune(char *page, char **start, off_t off, int count, - int *eof, void *data); -int lprocfs_quota_wr_itune(struct file *file, const char *buffer, - unsigned long count, void *data); -int lprocfs_quota_rd_type(char *page, char **start, off_t off, int count, - int *eof, void *data); -int lprocfs_quota_wr_type(struct file *file, const char *buffer, - unsigned long count, void *data); -int lprocfs_quota_rd_switch_seconds(char *page, char **start, off_t off, - int count, int *eof, void *data); -int lprocfs_quota_wr_switch_seconds(struct file *file, const char *buffer, - unsigned long count, void *data); - -#ifndef __KERNEL__ -extern quota_interface_t osc_quota_interface; -extern quota_interface_t mdc_quota_interface; -extern quota_interface_t lov_quota_interface; -#endif - -#define LUSTRE_ADMIN_QUOTAFILES_V1 {\ - "admin_quotafile.usr", /* user admin quotafile */\ - "admin_quotafile.grp" /* group admin quotafile */\ -} - -#define LUSTRE_ADMIN_QUOTAFILES_V2 {\ - "admin_quotafile_v2.usr", /* user admin quotafile */\ - "admin_quotafile_v2.grp" /* group admin quotafile */\ -} - -#endif /* _LUSTRE_QUOTA_H */ diff --git a/lustre/include/lustre_ucache.h b/lustre/include/lustre_ucache.h deleted file mode 100644 index 16b5c1a95e..0000000000 --- a/lustre/include/lustre_ucache.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _UPCALL_CACHE_H -#define _UPCALL_CACHE_H - -#define UC_CACHE_NEW 0x01 -#define UC_CACHE_ACQUIRING 0x02 -#define UC_CACHE_INVALID 0x04 -#define UC_CACHE_EXPIRED 0x08 - -#define UC_CACHE_IS_NEW(i) ((i)->ue_flags & UC_CACHE_NEW) -#define UC_CACHE_IS_INVALID(i) ((i)->ue_flags & UC_CACHE_INVALID) -#define UC_CACHE_IS_ACQUIRING(i) ((i)->ue_flags & UC_CACHE_ACQUIRING) -#define UC_CACHE_IS_EXPIRED(i) ((i)->ue_flags & UC_CACHE_EXPIRED) -#define UC_CACHE_IS_VALID(i) ((i)->ue_flags == 0) - -#define UC_CACHE_SET_NEW(i) (i)->ue_flags |= UC_CACHE_NEW -#define UC_CACHE_SET_INVALID(i) (i)->ue_flags |= UC_CACHE_INVALID -#define UC_CACHE_SET_ACQUIRING(i) (i)->ue_flags |= UC_CACHE_ACQUIRING -#define UC_CACHE_SET_EXPIRED(i) (i)->ue_flags |= UC_CACHE_EXPIRED -#define UC_CACHE_SET_VALID(i) (i)->ue_flags = 0 - -#define UC_CACHE_CLEAR_NEW(i) (i)->ue_flags &= ~UC_CACHE_NEW -#define UC_CACHE_CLEAR_ACQUIRING(i) (i)->ue_flags &= ~UC_CACHE_ACQUIRING -#define UC_CACHE_CLEAR_INVALID(i) (i)->ue_flags &= ~UC_CACHE_INVALID -#define UC_CACHE_CLEAR_EXPIRED(i) (i)->ue_flags &= ~UC_CACHE_EXPIRED - -struct upcall_cache_entry { - struct list_head ue_hash; - __u64 ue_key; - __u64 ue_primary; - struct group_info *ue_group_info; - atomic_t ue_refcount; - int ue_flags; - cfs_waitq_t ue_waitq; - cfs_time_t ue_acquire_expire; - cfs_time_t ue_expire; -}; - -#define UC_CACHE_HASH_SIZE (128) -#define UC_CACHE_HASH_INDEX(id) ((id) & (UC_CACHE_HASH_SIZE - 1)) -#define UC_CACHE_UPCALL_MAXPATH (1024UL) - -struct upcall_cache { - struct list_head uc_hashtable[UC_CACHE_HASH_SIZE]; - spinlock_t uc_lock; - - char uc_name[40]; /* for upcall */ - char uc_upcall[UC_CACHE_UPCALL_MAXPATH]; - cfs_time_t uc_acquire_expire; /* jiffies */ - cfs_time_t uc_entry_expire; /* jiffies */ -}; - -struct upcall_cache_entry *upcall_cache_get_entry(struct upcall_cache *hash, - __u64 key, __u32 primary, - __u32 ngroups, __u32 *groups); -void upcall_cache_put_entry(struct upcall_cache *hash, - struct upcall_cache_entry *entry); -int upcall_cache_downcall(struct upcall_cache *hash, __u32 err, __u64 key, - __u32 primary, __u32 ngroups, __u32 *groups); -void upcall_cache_flush_idle(struct upcall_cache *cache); -void upcall_cache_flush_all(struct upcall_cache *cache); -struct upcall_cache *upcall_cache_init(const char *name); -void upcall_cache_cleanup(struct upcall_cache *hash); - -#endif /* _UPCALL_CACHE_H */ diff --git a/lustre/include/lustre_ver.h.in b/lustre/include/lustre_ver.h.in deleted file mode 100644 index 1c63510944..0000000000 --- a/lustre/include/lustre_ver.h.in +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _LUSTRE_VER_H_ -#define _LUSTRE_VER_H_ -/* This file automatically generated from lustre/include/lustre_ver.h.in, - * based on parameters in lustre/autoconf/lustre-version.ac. - * Changes made directly to this file will be lost. */ - -#define LUSTRE_MAJOR @AC_LUSTRE_MAJOR@ -#define LUSTRE_MINOR @AC_LUSTRE_MINOR@ -#define LUSTRE_PATCH @AC_LUSTRE_PATCH@ -#define LUSTRE_FIX @AC_LUSTRE_FIX@ -#define LUSTRE_VERSION_STRING "@AC_LUSTRE_VERSION_STRING@" - -#define LUSTRE_VERSION_CODE OBD_OCD_VERSION(LUSTRE_MAJOR,LUSTRE_MINOR,LUSTRE_PATCH,LUSTRE_FIX) - -/* liblustre clients are only allowed to connect if their LUSTRE_FIX mismatches - * by this amount (set in lustre/autoconf/lustre-version.ac). */ -#define LUSTRE_VERSION_ALLOWED_OFFSET @AC_LUSTRE_VER_ALLOWED_OFFSET@ - -#ifdef __KERNEL__ -/* If lustre version of client and servers it connects to differs by more - * than this amount, client would issue a warning. - * (set in lustre/autoconf/lustre-version.ac) */ -#define LUSTRE_VERSION_OFFSET_WARN @AC_LUSTRE_CLI_VER_OFFSET_WARN@ -#else -/* If liblustre version of client and servers it connects to differs by more - * than this amount, client would issue a warning. - * (set in lustre/autoconf/lustre-version.ac) */ -#define LUSTRE_VERSION_OFFSET_WARN @AC_LUSTRE_LIB_VER_OFFSET_WARN@ -#endif - - -#endif diff --git a/lustre/include/lvfs.h b/lustre/include/lvfs.h deleted file mode 100644 index 42e854427f..0000000000 --- a/lustre/include/lvfs.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * lustre VFS/process permission interface - */ - -#ifndef __LVFS_H__ -#define __LVFS_H__ - -#define LL_FID_NAMELEN (16 + 1 + 8 + 1) - -#include <libcfs/kp30.h> -#if defined(__linux__) -#include <linux/lvfs.h> -#elif defined(__APPLE__) -#include <darwin/lvfs.h> -#elif defined(__WINNT__) -#include <winnt/lvfs.h> -#else -#error Unsupported operating system. -#endif - -#include <lustre_ucache.h> - - -#ifdef LIBLUSTRE -#include <lvfs_user_fs.h> -#endif - -/* lvfs_common.c */ -struct dentry *lvfs_fid2dentry(struct lvfs_run_ctxt *, __u64, __u32, __u64 ,void *data); - -void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, - struct lvfs_ucred *cred); -void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx, - struct lvfs_ucred *cred); - - -static inline int ll_fid2str(char *str, __u64 id, __u32 generation) -{ - return sprintf(str, "%llx:%08x", (unsigned long long)id, generation); -} - -#endif diff --git a/lustre/include/obd.h b/lustre/include/obd.h deleted file mode 100644 index 5b55e25db9..0000000000 --- a/lustre/include/obd.h +++ /dev/null @@ -1,1158 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef __OBD_H -#define __OBD_H - -#if defined(__linux__) -#include <linux/obd.h> -#elif defined(__APPLE__) -#include <darwin/obd.h> -#elif defined(__WINNT__) -#include <winnt/obd.h> -#else -#error Unsupported operating system. -#endif - -#define IOC_OSC_TYPE 'h' -#define IOC_OSC_MIN_NR 20 -#define IOC_OSC_SET_ACTIVE _IOWR(IOC_OSC_TYPE, 21, struct obd_device *) -#define IOC_OSC_MAX_NR 50 - -#define IOC_MDC_TYPE 'i' -#define IOC_MDC_MIN_NR 20 -/* Moved to lustre_user.h -#define IOC_MDC_LOOKUP _IOWR(IOC_MDC_TYPE, 20, struct obd_ioctl_data *) -#define IOC_MDC_GETSTRIPE _IOWR(IOC_MDC_TYPE, 21, struct lov_mds_md *) */ -#define IOC_MDC_MAX_NR 50 - -#include <lustre_lib.h> -#include <lustre/lustre_idl.h> -#include <lustre_export.h> -#include <lustre_quota.h> -#include <class_hash.h> - -#include <libcfs/bitmap.h> - - -#define MAX_OBD_DEVICES 8192 - -/* this is really local to the OSC */ -struct loi_oap_pages { - struct list_head lop_pending; - struct list_head lop_urgent; - struct list_head lop_pending_group; - int lop_num_pending; -}; - -struct osc_async_rc { - int ar_rc; - int ar_force_sync; - __u64 ar_min_xid; -}; - -struct lov_oinfo { /* per-stripe data structure */ - __u64 loi_id; /* object ID on the target OST */ - __u64 loi_gr; /* object group on the target OST */ - int loi_ost_idx; /* OST stripe index in lov_tgt_desc->tgts */ - int loi_ost_gen; /* generation of this loi_ost_idx */ - - /* used by the osc to keep track of what objects to build into rpcs */ - struct loi_oap_pages loi_read_lop; - struct loi_oap_pages loi_write_lop; - /* _cli_ is poorly named, it should be _ready_ */ - struct list_head loi_cli_item; - struct list_head loi_write_item; - struct list_head loi_read_item; - - unsigned long loi_kms_valid:1; - __u64 loi_kms; /* known minimum size */ - struct ost_lvb loi_lvb; - struct osc_async_rc loi_ar; -}; - -static inline void loi_init(struct lov_oinfo *loi) -{ - CFS_INIT_LIST_HEAD(&loi->loi_read_lop.lop_pending); - CFS_INIT_LIST_HEAD(&loi->loi_read_lop.lop_urgent); - CFS_INIT_LIST_HEAD(&loi->loi_read_lop.lop_pending_group); - CFS_INIT_LIST_HEAD(&loi->loi_write_lop.lop_pending); - CFS_INIT_LIST_HEAD(&loi->loi_write_lop.lop_urgent); - CFS_INIT_LIST_HEAD(&loi->loi_write_lop.lop_pending_group); - CFS_INIT_LIST_HEAD(&loi->loi_cli_item); - CFS_INIT_LIST_HEAD(&loi->loi_write_item); - CFS_INIT_LIST_HEAD(&loi->loi_read_item); -} - -/*extent array item for describing the joined file extent info*/ -struct lov_extent { - __u64 le_start; /* extent start */ - __u64 le_len; /* extent length */ - int le_loi_idx; /* extent #1 loi's index in lsm loi array */ - int le_stripe_count; /* extent stripe count*/ -}; - -/*Lov array info for describing joined file array EA info*/ -struct lov_array_info { - struct llog_logid lai_array_id; /* MDS med llog object id */ - unsigned lai_ext_count; /* number of extent count */ - struct lov_extent *lai_ext_array; /* extent desc array */ -}; - -struct lov_stripe_md { - spinlock_t lsm_lock; - void *lsm_lock_owner; /* debugging */ - - struct { - /* Public members. */ - __u64 lw_object_id; /* lov object id */ - __u64 lw_object_gr; /* lov object group */ - __u64 lw_maxbytes; /* maximum possible file size */ - - /* LOV-private members start here -- only for use in lov/. */ - __u32 lw_magic; - __u32 lw_stripe_size; /* size of the stripe */ - __u32 lw_pattern; /* striping pattern (RAID0, RAID1) */ - unsigned lw_stripe_count; /* number of objects being striped over */ - } lsm_wire; - - struct lov_array_info *lsm_array; /*Only for joined file array info*/ - struct lov_oinfo *lsm_oinfo[0]; -}; - -#define lsm_object_id lsm_wire.lw_object_id -#define lsm_object_gr lsm_wire.lw_object_gr -#define lsm_maxbytes lsm_wire.lw_maxbytes -#define lsm_magic lsm_wire.lw_magic -#define lsm_stripe_size lsm_wire.lw_stripe_size -#define lsm_pattern lsm_wire.lw_pattern -#define lsm_stripe_count lsm_wire.lw_stripe_count - -struct obd_info; - -typedef int (*obd_enqueue_update_f)(struct obd_info *oinfo, int rc); - -/* obd info for a particular level (lov, osc). */ -struct obd_info { - /* Lock policy. It keeps an extent which is specific for a particular - * OSC. (e.g. lov_prep_enqueue_set initialises extent of the policy, - * and osc_enqueue passes it into ldlm_lock_match & ldlm_cli_enqueue. */ - ldlm_policy_data_t oi_policy; - /* Flags used for set request specific flags: - - while lock handling, the flags obtained on the enqueue - request are set here. - - while stats, the flags used for control delay/resend. - */ - int oi_flags; - /* Lock handle specific for every OSC lock. */ - struct lustre_handle *oi_lockh; - /* lsm data specific for every OSC. */ - struct lov_stripe_md *oi_md; - /* obdo data specific for every OSC, if needed at all. */ - struct obdo *oi_oa; - /* statfs data specific for every OSC, if needed at all. */ - struct obd_statfs *oi_osfs; - /* An update callback which is called to update some data on upper - * level. E.g. it is used for update lsm->lsm_oinfo at every recieved - * request in osc level for enqueue requests. It is also possible to - * update some caller data from LOV layer if needed. */ - obd_enqueue_update_f oi_cb_up; -}; - -/* compare all relevant fields. */ -static inline int lov_stripe_md_cmp(struct lov_stripe_md *m1, - struct lov_stripe_md *m2) -{ - /* - * ->lsm_wire contains padding, but it should be zeroed out during - * allocation. - */ - return memcmp(&m1->lsm_wire, &m2->lsm_wire, sizeof m1->lsm_wire); -} - -void lov_stripe_lock(struct lov_stripe_md *md); -void lov_stripe_unlock(struct lov_stripe_md *md); - -struct obd_type { - struct list_head typ_chain; - struct obd_ops *typ_ops; - cfs_proc_dir_entry_t *typ_procroot; - char *typ_name; - int typ_refcnt; - spinlock_t obd_type_lock; -}; - -struct brw_page { - obd_off off; - cfs_page_t *pg; - int count; - obd_flag flag; -}; - -enum async_flags { - ASYNC_READY = 0x1, /* ap_make_ready will not be called before this - page is added to an rpc */ - ASYNC_URGENT = 0x2, /* page must be put into an RPC before return */ - ASYNC_COUNT_STABLE = 0x4, /* ap_refresh_count will not be called - to give the caller a chance to update - or cancel the size of the io */ - ASYNC_GROUP_SYNC = 0x8, /* ap_completion will not be called, instead - the page is accounted for in the - obd_io_group given to - obd_queue_group_io */ -}; - -struct obd_async_page_ops { - int (*ap_make_ready)(void *data, int cmd); - int (*ap_refresh_count)(void *data, int cmd); - void (*ap_fill_obdo)(void *data, int cmd, struct obdo *oa); - void (*ap_update_obdo)(void *data, int cmd, struct obdo *oa, - obd_valid valid); - int (*ap_completion)(void *data, int cmd, struct obdo *oa, int rc); -}; - -/* the `oig' is passed down from a caller of obd rw methods. the callee - * records enough state such that the caller can sleep on the oig and - * be woken when all the callees have finished their work */ -struct obd_io_group { - spinlock_t oig_lock; - atomic_t oig_refcount; - int oig_pending; - int oig_rc; - struct list_head oig_occ_list; - cfs_waitq_t oig_waitq; -}; - -/* the oig callback context lets the callee of obd rw methods register - * for callbacks from the caller. */ -struct oig_callback_context { - struct list_head occ_oig_item; - /* called when the caller has received a signal while sleeping. - * callees of this method are encouraged to abort their state - * in the oig. This may be called multiple times. */ - void (*occ_interrupted)(struct oig_callback_context *occ); - unsigned long interrupted:1; -}; - -/* Individual type definitions */ - -struct ost_server_data; - -/* hold common fields for "target" device */ -struct obd_device_target { - struct super_block *obt_sb; - atomic_t obt_quotachecking; - struct lustre_quota_ctxt obt_qctxt; -}; - -typedef void (*obd_pin_extent_cb)(void *data); -typedef int (*obd_page_removal_cb_t)(void *data, int discard); -typedef int (*obd_lock_cancel_cb)(struct ldlm_lock *,struct ldlm_lock_desc *, - void *, int); - -#define FILTER_GROUP_LLOG 1 -#define FILTER_GROUP_ECHO 2 - -struct filter_ext { - __u64 fe_start; - __u64 fe_end; -}; - -struct filter_obd { - /* NB this field MUST be first */ - struct obd_device_target fo_obt; - const char *fo_fstype; - struct vfsmount *fo_vfsmnt; - cfs_dentry_t *fo_dentry_O; - cfs_dentry_t **fo_dentry_O_groups; - cfs_dentry_t **fo_dentry_O_sub; - spinlock_t fo_objidlock; /* protect fo_lastobjid */ - spinlock_t fo_translock; /* protect fsd_last_transno */ - struct file *fo_rcvd_filp; - struct file *fo_health_check_filp; - struct lr_server_data *fo_fsd; - unsigned long *fo_last_rcvd_slots; - __u64 fo_mount_count; - - int fo_destroy_in_progress; - struct semaphore fo_create_lock; - - struct list_head fo_export_list; - int fo_subdir_count; - - obd_size fo_tot_dirty; /* protected by obd_osfs_lock */ - obd_size fo_tot_granted; /* all values in bytes */ - obd_size fo_tot_pending; - - obd_size fo_readcache_max_filesize; - - struct obd_import *fo_mdc_imp; - struct obd_uuid fo_mdc_uuid; - struct lustre_handle fo_mdc_conn; - struct file **fo_last_objid_files; - __u64 *fo_last_objids; /* last created objid for groups, - * protected by fo_objidlock */ - - struct semaphore fo_alloc_lock; - - atomic_t fo_r_in_flight; - atomic_t fo_w_in_flight; - - /* - * per-filter pool of kiobuf's allocated by filter_common_setup() and - * torn down by filter_cleanup(). Contains OST_NUM_THREADS elements of - * which ->fo_iobuf_count were allocated. - * - * This pool contains kiobuf used by - * filter_{prep,commit}rw_{read,write}() and is shared by all OST - * threads. - * - * Locking: none, each OST thread uses only one element, determined by - * its "ordinal number", ->t_id. - */ - struct filter_iobuf **fo_iobuf_pool; - int fo_iobuf_count; - - struct brw_stats fo_filter_stats; - struct lustre_quota_ctxt fo_quota_ctxt; - spinlock_t fo_quotacheck_lock; - atomic_t fo_quotachecking; - - int fo_fmd_max_num; /* per exp filter_mod_data */ - int fo_fmd_max_age; /* jiffies to fmd expiry */ - void *fo_lcm; -}; - -#define OSC_MAX_RIF_DEFAULT 8 -#define OSC_MAX_RIF_MAX 256 -#define OSC_MAX_DIRTY_DEFAULT (OSC_MAX_RIF_DEFAULT * 4) -#define OSC_MAX_DIRTY_MB_MAX 2048 /* arbitrary, but < MAX_LONG bytes */ -#define OSC_DEFAULT_RESENDS 10 - -#define MDC_MAX_RIF_DEFAULT 8 -#define MDC_MAX_RIF_MAX 512 - -struct mdc_rpc_lock; -struct obd_import; -struct lustre_cache; -struct client_obd { - struct semaphore cl_sem; - struct obd_uuid cl_target_uuid; - struct obd_import *cl_import; /* ptlrpc connection state */ - int cl_conn_count; - /* max_mds_easize is purely a performance thing so we don't have to - * call obd_size_diskmd() all the time. */ - int cl_default_mds_easize; - int cl_max_mds_easize; - int cl_max_mds_cookiesize; - - //struct llog_canceld_ctxt *cl_llcd; /* it's included by obd_llog_ctxt */ - void *cl_llcd_offset; - - /* the grant values are protected by loi_list_lock below */ - long cl_dirty; /* all _dirty_ in bytes */ - long cl_dirty_max; /* allowed w/o rpc */ - long cl_avail_grant; /* bytes of credit for ost */ - long cl_lost_grant; /* lost credits (trunc) */ - struct list_head cl_cache_waiters; /* waiting for cache/grant */ - - /* keep track of objects that have lois that contain pages which - * have been queued for async brw. this lock also protects the - * lists of osc_client_pages that hang off of the loi */ - /* - * ->cl_loi_list_lock protects consistency of - * ->cl_loi_{ready,read,write}_list. ->ap_make_ready() and - * ->ap_completion() call-backs are executed under this lock. As we - * cannot guarantee that these call-backs never block on all platforms - * (as a matter of fact they do block on Mac OS X), type of - * ->cl_loi_list_lock is platform dependent: it's a spin-lock on Linux - * and blocking mutex on Mac OS X. (Alternative is to make this lock - * blocking everywhere, but we don't want to slow down fast-path of - * our main platform.) - * - * Exact type of ->cl_loi_list_lock is defined in arch/obd.h together - * with client_obd_list_{un,}lock() and - * client_obd_list_lock_{init,done}() functions. - */ - client_obd_lock_t cl_loi_list_lock; - struct list_head cl_loi_ready_list; - struct list_head cl_loi_write_list; - struct list_head cl_loi_read_list; - int cl_r_in_flight; - int cl_w_in_flight; - /* just a sum of the loi/lop pending numbers to be exported by /proc */ - int cl_pending_w_pages; - int cl_pending_r_pages; - int cl_max_pages_per_rpc; - int cl_max_rpcs_in_flight; - struct obd_histogram cl_read_rpc_hist; - struct obd_histogram cl_write_rpc_hist; - struct obd_histogram cl_read_page_hist; - struct obd_histogram cl_write_page_hist; - struct obd_histogram cl_read_offset_hist; - struct obd_histogram cl_write_offset_hist; - - /* number of in flight destroy rpcs is limited to max_rpcs_in_flight */ - atomic_t cl_destroy_in_flight; - cfs_waitq_t cl_destroy_waitq; - - struct mdc_rpc_lock *cl_rpc_lock; - struct mdc_rpc_lock *cl_setattr_lock; - struct mdc_rpc_lock *cl_close_lock; - struct osc_creator cl_oscc; - - /* mgc datastruct */ - struct semaphore cl_mgc_sem; - struct vfsmount *cl_mgc_vfsmnt; - struct dentry *cl_mgc_configs_dir; - atomic_t cl_mgc_refcount; - struct obd_export *cl_mgc_mgsexp; - - /* checksumming for data sent over the network */ - unsigned int cl_checksum:1; /* 0 = disabled, 1 = enabled */ - /* supported checksum types that are worked out at connect time */ - __u32 cl_supp_cksum_types; - /* checksum algorithm to be used */ - cksum_type_t cl_cksum_type; - - /* also protected by the poorly named _loi_list_lock lock above */ - struct osc_async_rc cl_ar; - - /* used by quotacheck */ - int cl_qchk_stat; /* quotacheck stat of the peer */ - atomic_t cl_resends; /* resend count */ - /* Cache of triples */ - struct lustre_cache *cl_cache; - obd_lock_cancel_cb cl_ext_lock_cancel_cb; -}; -#define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid) - -#define CL_NOT_QUOTACHECKED 1 /* client->cl_qchk_stat init value */ - -struct mgs_obd { - struct ptlrpc_service *mgs_service; - struct vfsmount *mgs_vfsmnt; - struct super_block *mgs_sb; - struct dentry *mgs_configs_dir; - struct dentry *mgs_fid_de; - struct list_head mgs_fs_db_list; - struct semaphore mgs_sem; - cfs_proc_dir_entry_t *mgs_proc_live; -}; - -struct mds_obd { - /* NB this field MUST be first */ - struct obd_device_target mds_obt; - struct ptlrpc_service *mds_service; - struct ptlrpc_service *mds_setattr_service; - struct ptlrpc_service *mds_readpage_service; - struct vfsmount *mds_vfsmnt; - cfs_dentry_t *mds_fid_de; - int mds_max_mdsize; - int mds_max_cookiesize; - struct file *mds_rcvd_filp; - spinlock_t mds_transno_lock; - __u64 mds_last_transno; - __u64 mds_mount_count; - __u64 mds_io_epoch; - unsigned long mds_atime_diff; - struct semaphore mds_epoch_sem; - struct ll_fid mds_rootfid; - struct lr_server_data *mds_server_data; - cfs_dentry_t *mds_pending_dir; - cfs_dentry_t *mds_logs_dir; - cfs_dentry_t *mds_objects_dir; - struct llog_handle *mds_cfg_llh; -// struct llog_handle *mds_catalog; - struct obd_device *mds_osc_obd; /* XXX lov_obd */ - struct obd_uuid mds_lov_uuid; - char *mds_profile; - struct obd_export *mds_osc_exp; /* XXX lov_exp */ - struct lov_desc mds_lov_desc; - - /* mark pages dirty for write. */ - bitmap_t *mds_lov_page_dirty; - /* array for store pages with obd_id */ - void **mds_lov_page_array; - /* file for store objid */ - struct file *mds_lov_objid_filp; - __u32 mds_lov_objid_count; - __u32 mds_lov_objid_lastpage; - __u32 mds_lov_objid_lastidx; - - struct file *mds_health_check_filp; - unsigned long *mds_client_bitmap; - struct upcall_cache *mds_group_hash; - - struct lustre_quota_info mds_quota_info; - struct semaphore mds_qonoff_sem; - struct semaphore mds_health_sem; - unsigned long mds_fl_user_xattr:1, - mds_fl_acl:1, - mds_fl_cfglog:1, - mds_fl_synced:1, - mds_evict_ost_nids:1; - - uid_t mds_squash_uid; - gid_t mds_squash_gid; - lnet_nid_t mds_nosquash_nid; -}; - -/* lov objid */ -#define mds_max_ost_index (0xFFFF) -#define MDS_LOV_ALLOC_SIZE (CFS_PAGE_SIZE) - -#define OBJID_PER_PAGE() (MDS_LOV_ALLOC_SIZE / sizeof(obd_id)) - -#define MDS_LOV_OBJID_PAGES_COUNT (mds_max_ost_index/OBJID_PER_PAGE()) - -extern int mds_lov_init_objids(struct obd_device *obd); -extern void mds_lov_destroy_objids(struct obd_device *obd); - -struct obd_id_info { - __u32 idx; - obd_id *data; -}; - -/* */ - -struct echo_obd { - struct obdo eo_oa; - spinlock_t eo_lock; - __u64 eo_lastino; - struct lustre_handle eo_nl_lock; - atomic_t eo_prep; -}; - -struct ost_obd { - struct ptlrpc_service *ost_service; - struct ptlrpc_service *ost_create_service; - struct ptlrpc_service *ost_io_service; - struct semaphore ost_health_sem; -}; - -struct echo_client_obd { - struct obd_export *ec_exp; /* the local connection to osc/lov */ - spinlock_t ec_lock; - struct list_head ec_objects; - int ec_nstripes; - __u64 ec_unique; -}; - -struct lov_qos_oss { - struct obd_uuid lqo_uuid; /* ptlrpc's c_remote_uuid */ - struct list_head lqo_oss_list; /* link to lov_qos */ - __u32 lqo_ost_count; /* number of osts on this oss */ - __u64 lqo_bavail; /* total bytes avail on OSS */ - __u64 lqo_penalty; /* current penalty */ - __u64 lqo_penalty_per_obj; /* penalty decrease every obj*/ -}; - -struct ltd_qos { - struct lov_qos_oss *ltq_oss; /* oss info */ - __u64 ltq_penalty; /* current penalty */ - __u64 ltq_penalty_per_obj; /* penalty decrease every obj*/ - __u64 ltq_weight; /* net weighting */ - unsigned int ltq_usable:1; /* usable for striping */ -}; - -struct lov_qos { - struct list_head lq_oss_list; /* list of OSSs that targets use */ - struct rw_semaphore lq_rw_sem; - __u32 lq_active_oss_count; - __u32 *lq_rr_array; /* round-robin optimized list */ - unsigned int lq_rr_size; /* rr array size */ - unsigned int lq_prio_free; /* priority for free space */ - unsigned long lq_dirty:1, /* recalc qos data */ - lq_dirty_rr:1, /* recalc round-robin list */ - lq_same_space:1,/* the ost's all have approx. - the same space avail */ - lq_reset:1; /* zero current penalties */ -}; - -struct lov_tgt_desc { - struct obd_uuid ltd_uuid; - struct obd_export *ltd_exp; - struct ltd_qos ltd_qos; /* qos info per target */ - __u32 ltd_gen; - __u32 ltd_index; /* index in lov_obd->tgts */ - unsigned long ltd_active:1,/* is this target up for requests */ - ltd_activate:1,/* should this target be activated */ - ltd_reap:1; /* should this target be deleted */ -}; - -struct lov_obd { - struct lov_desc desc; - struct lov_tgt_desc **lov_tgts; - struct semaphore lov_lock; - struct obd_connect_data lov_ocd; - struct lov_qos lov_qos; /* qos info per lov */ - atomic_t lov_refcount; - __u32 lov_tgt_count; /* how many OBD's */ - __u32 lov_active_tgt_count; /* how many active */ - __u32 lov_death_row;/* tgts scheduled to be deleted */ - __u32 lov_tgt_size; /* size of tgts array */ - __u32 lov_start_idx; /* start index of new inode */ - __u32 lov_offset_idx; /* aliasing for start_idx */ - int lov_start_count;/* reseed counter */ - int lov_connects; - obd_page_removal_cb_t lov_page_removal_cb; - obd_pin_extent_cb lov_page_pin_cb; - obd_lock_cancel_cb lov_lock_cancel_cb; -}; - -struct niobuf_local { - __u64 offset; - __u32 len; - __u32 flags; - cfs_page_t *page; - cfs_dentry_t *dentry; - int lnb_grant_used; - int rc; -}; - -/* obd device type names */ - /* FIXME all the references to LUSTRE_MDS_NAME should be swapped with LUSTRE_MDT_NAME */ -#define LUSTRE_MDS_NAME "mds" -#define LUSTRE_MDT_NAME "mdt" -#define LUSTRE_MDC_NAME "mdc" -#define LUSTRE_OSS_NAME "ost" /*FIXME change name to oss*/ -#define LUSTRE_OST_NAME "obdfilter" /* FIXME change name to ost*/ -#define LUSTRE_OSC_NAME "osc" -#define LUSTRE_LOV_NAME "lov" -#define LUSTRE_MGS_NAME "mgs" -#define LUSTRE_MGC_NAME "mgc" - -#define LUSTRE_CACHEOBD_NAME "cobd" -#define LUSTRE_ECHO_NAME "obdecho" -#define LUSTRE_ECHO_CLIENT_NAME "echo_client" - -/* Constant obd names (post-rename) */ -#define LUSTRE_MDS_OBDNAME "MDS" -#define LUSTRE_OSS_OBDNAME "OSS" -#define LUSTRE_MGS_OBDNAME "MGS" -#define LUSTRE_MGC_OBDNAME "MGC" - -/* Don't conflict with on-wire flags OBD_BRW_WRITE, etc */ -#define N_LOCAL_TEMP_PAGE 0x10000000 - -struct obd_trans_info { - __u64 oti_transno; - __u64 oti_xid; - /* Only used on the server side for tracking acks. */ - struct oti_req_ack_lock { - struct lustre_handle lock; - __u32 mode; - } oti_ack_locks[4]; - void *oti_handle; - struct llog_cookie oti_onecookie; - struct llog_cookie *oti_logcookies; - int oti_numcookies; - - /* initial thread handling transaction */ - int oti_thread_id; - __u32 oti_conn_cnt; -}; - -static inline void oti_init(struct obd_trans_info *oti, - struct ptlrpc_request *req) -{ - if (oti == NULL) - return; - memset(oti, 0, sizeof(*oti)); - - if (req == NULL) - return; - - oti->oti_xid = req->rq_xid; - - if (req->rq_repmsg != NULL) - oti->oti_transno = lustre_msg_get_transno(req->rq_repmsg); - oti->oti_thread_id = req->rq_svc_thread ? req->rq_svc_thread->t_id : -1; - if (req->rq_reqmsg != NULL) - oti->oti_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg); -} - -static inline void oti_alloc_cookies(struct obd_trans_info *oti,int num_cookies) -{ - if (!oti) - return; - - if (num_cookies == 1) - oti->oti_logcookies = &oti->oti_onecookie; - else - OBD_ALLOC(oti->oti_logcookies, - num_cookies * sizeof(oti->oti_onecookie)); - - oti->oti_numcookies = num_cookies; -} - -static inline void oti_free_cookies(struct obd_trans_info *oti) -{ - if (!oti || !oti->oti_logcookies) - return; - - if (oti->oti_logcookies == &oti->oti_onecookie) - LASSERT(oti->oti_numcookies == 1); - else - OBD_FREE(oti->oti_logcookies, - oti->oti_numcookies * sizeof(oti->oti_onecookie)); - oti->oti_logcookies = NULL; - oti->oti_numcookies = 0; -} - -/* llog contexts */ -enum llog_ctxt_id { - LLOG_CONFIG_ORIG_CTXT = 0, - LLOG_CONFIG_REPL_CTXT = 1, - LLOG_MDS_OST_ORIG_CTXT = 2, - LLOG_MDS_OST_REPL_CTXT = 3, - LLOG_SIZE_ORIG_CTXT = 4, - LLOG_SIZE_REPL_CTXT = 5, - LLOG_MD_ORIG_CTXT = 6, - LLOG_MD_REPL_CTXT = 7, - LLOG_RD1_ORIG_CTXT = 8, - LLOG_RD1_REPL_CTXT = 9, - LLOG_TEST_ORIG_CTXT = 10, - LLOG_TEST_REPL_CTXT = 11, - LLOG_LOVEA_ORIG_CTXT = 12, - LLOG_LOVEA_REPL_CTXT = 13, - LLOG_MAX_CTXTS -}; - -/* - * Events signalled through obd_notify() upcall-chain. - */ -enum obd_notify_event { - /* Device activated */ - OBD_NOTIFY_ACTIVE, - /* Device deactivated */ - OBD_NOTIFY_INACTIVE, - /* Connect data for import were changed */ - OBD_NOTIFY_OCD, - /* Sync request */ - OBD_NOTIFY_SYNC_NONBLOCK, - OBD_NOTIFY_SYNC, - /* Configuration event */ - OBD_NOTIFY_CONFIG -}; - -#define CONFIG_LOG 0x1 /* finished processing config log */ -#define CONFIG_SYNC 0x2 /* mdt synced 1 ost */ - -/* - * Data structure used to pass obd_notify()-event to non-obd listeners (llite - * and liblustre being main examples). - */ -struct obd_notify_upcall { - int (*onu_upcall)(struct obd_device *host, struct obd_device *watched, - enum obd_notify_event ev, void *owner); - /* Opaque datum supplied by upper layer listener */ - void *onu_owner; -}; - -/* corresponds to one of the obd's */ -#define MAX_OBD_NAME 128 -#define OBD_DEVICE_MAGIC 0XAB5CD6EF -struct obd_device { - struct obd_type *obd_type; - __u32 obd_magic; - - /* common and UUID name of this device */ - char obd_name[MAX_OBD_NAME]; - struct obd_uuid obd_uuid; - - int obd_minor; - unsigned long obd_attached:1, /* finished attach */ - obd_set_up:1, /* finished setup */ - obd_recovering:1, /* there are recoverable clients */ - obd_abort_recovery:1,/* somebody ioctl'ed us to abort */ - obd_replayable:1, /* recovery is enabled; inform clients */ - obd_no_transno:1, /* no committed-transno notification */ - obd_no_recov:1, /* fail instead of retry messages */ - obd_stopping:1, /* started cleanup */ - obd_starting:1, /* started setup */ - obd_force:1, /* cleanup with > 0 obd refcount */ - obd_fail:1, /* cleanup with failover */ - obd_async_recov:1, /* allow asyncronous orphan cleanup */ - obd_no_conn:1, /* deny new connections */ - obd_inactive:1; /* device active/inactive - * (for /proc/status only!!) */ - /* uuid-export hash body */ - struct lustre_class_hash_body *obd_uuid_hash_body; - /* nid-export hash body */ - struct lustre_class_hash_body *obd_nid_hash_body; - /* nid stats body */ - struct lustre_class_hash_body *obd_nid_stats_hash_body; - struct list_head obd_nid_stats; - atomic_t obd_refcount; - cfs_waitq_t obd_refcount_waitq; - cfs_waitq_t obd_llog_waitq; - struct list_head obd_exports; - int obd_num_exports; - spinlock_t nid_lock; - struct ldlm_namespace *obd_namespace; - struct ptlrpc_client obd_ldlm_client; /* XXX OST/MDS only */ - /* a spinlock is OK for what we do now, may need a semaphore later */ - spinlock_t obd_dev_lock; - struct semaphore obd_dev_sem; - __u64 obd_last_committed; - struct fsfilt_operations *obd_fsops; - spinlock_t obd_osfs_lock; - struct obd_statfs obd_osfs; /* locked by obd_osfs_lock */ - __u64 obd_osfs_age; - struct lvfs_run_ctxt obd_lvfs_ctxt; - struct llog_ctxt *obd_llog_ctxt[LLOG_MAX_CTXTS]; - struct obd_device *obd_observer; - struct obd_notify_upcall obd_upcall; - struct obd_export *obd_self_export; - /* list of exports in LRU order, for ping evictor, with obd_dev_lock */ - struct list_head obd_exports_timed; - time_t obd_eviction_timer; /* for ping evictor */ - - /* XXX encapsulate all this recovery data into one struct */ - svc_handler_t obd_recovery_handler; - int obd_max_recoverable_clients; - int obd_connected_clients; - int obd_recoverable_clients; - spinlock_t obd_processing_task_lock; /* BH lock (timer) */ - pid_t obd_processing_task; - __u64 obd_next_recovery_transno; - int obd_replayed_requests; - int obd_requests_queued_for_recovery; - cfs_waitq_t obd_next_transno_waitq; - struct list_head obd_uncommitted_replies; - spinlock_t obd_uncommitted_replies_lock; - cfs_timer_t obd_recovery_timer; - struct list_head obd_recovery_queue; - struct list_head obd_delayed_reply_queue; - time_t obd_recovery_start; /* seconds */ - time_t obd_recovery_end; /* seconds, for lprocfs_status */ -#ifdef CRAY_XT3 - time_t obd_recovery_max_time; /* seconds, bz13079 */ -#endif - int obd_recovery_timeout; - - union { - struct obd_device_target obt; - struct filter_obd filter; - struct mds_obd mds; - struct client_obd cli; - struct ost_obd ost; - struct echo_client_obd echo_client; - struct echo_obd echo; - struct lov_obd lov; - struct mgs_obd mgs; - } u; - /* Fields used by LProcFS */ - cfs_proc_dir_entry_t *obd_proc_entry; - cfs_proc_dir_entry_t *obd_proc_exports_entry; - cfs_proc_dir_entry_t *obd_svc_procroot; - struct lprocfs_stats *obd_stats; - struct lprocfs_stats *obd_svc_stats; - unsigned int obd_cntr_base; - atomic_t obd_evict_inprogress; - cfs_waitq_t obd_evict_inprogress_waitq; -}; - -#define OBD_OPT_FORCE 0x0001 -#define OBD_OPT_FAILOVER 0x0002 - -#define OBD_LLOG_FL_SENDNOW 0x0001 - -enum obd_cleanup_stage { -/* Special case hack for MDS LOVs */ - OBD_CLEANUP_EARLY, -/* Precleanup stage 1, we must make sure all exports (other than the - self-export) get destroyed. */ - OBD_CLEANUP_EXPORTS, -/* Precleanup stage 2, do other type-specific cleanup requiring the - self-export. */ - OBD_CLEANUP_SELF_EXP, -/* FIXME we should eliminate the "precleanup" function and make them stages - of the "cleanup" function. */ - OBD_CLEANUP_OBD, -}; - -/* get/set_info keys */ -#define KEY_MDS_CONN "mds_conn" -#define KEY_NEXT_ID "next_id" -#define KEY_LOVDESC "lovdesc" -#define KEY_INIT_RECOV "initial_recov" -#define KEY_INIT_RECOV_BACKUP "init_recov_bk" -#define KEY_LOV_IDX "lov_idx" -#define KEY_LAST_ID "last_id" - -struct obd_ops { - struct module *o_owner; - int (*o_iocontrol)(unsigned int cmd, struct obd_export *exp, int len, - void *karg, void *uarg); - int (*o_get_info)(struct obd_export *, __u32 keylen, void *key, - __u32 *vallen, void *val); - int (*o_set_info_async)(struct obd_export *, __u32 keylen, void *key, - __u32 vallen, void *val, - struct ptlrpc_request_set *set); - int (*o_attach)(struct obd_device *dev, obd_count len, void *data); - int (*o_detach)(struct obd_device *dev); - int (*o_setup) (struct obd_device *dev, obd_count len, void *data); - int (*o_precleanup)(struct obd_device *dev, - enum obd_cleanup_stage cleanup_stage); - int (*o_cleanup)(struct obd_device *dev); - int (*o_process_config)(struct obd_device *dev, obd_count len, - void *data); - int (*o_postrecov)(struct obd_device *dev); - int (*o_add_conn)(struct obd_import *imp, struct obd_uuid *uuid, - int priority); - int (*o_del_conn)(struct obd_import *imp, struct obd_uuid *uuid); - /* connect to the target device with given connection - * data. @ocd->ocd_connect_flags is modified to reflect flags actually - * granted by the target, which are guaranteed to be a subset of flags - * asked for. If @ocd == NULL, use default parameters. */ - int (*o_connect)(struct lustre_handle *conn, struct obd_device *src, - struct obd_uuid *cluuid, struct obd_connect_data *ocd, - void *localdata); - int (*o_reconnect)(struct obd_export *exp, struct obd_device *src, - struct obd_uuid *cluuid, - struct obd_connect_data *ocd); - int (*o_disconnect)(struct obd_export *exp); - - int (*o_statfs)(struct obd_device *obd, struct obd_statfs *osfs, - __u64 max_age, __u32 flags); - int (*o_statfs_async)(struct obd_device *obd, struct obd_info *oinfo, - __u64 max_age, struct ptlrpc_request_set *set); - int (*o_packmd)(struct obd_export *exp, struct lov_mds_md **disk_tgt, - struct lov_stripe_md *mem_src); - int (*o_unpackmd)(struct obd_export *exp,struct lov_stripe_md **mem_tgt, - struct lov_mds_md *disk_src, int disk_len); - int (*o_checkmd)(struct obd_export *exp, struct obd_export *md_exp, - struct lov_stripe_md *mem_tgt); - int (*o_preallocate)(struct lustre_handle *, obd_count *req, - obd_id *ids); - int (*o_precreate)(struct obd_export *exp); - int (*o_create)(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md **ea, struct obd_trans_info *oti); - int (*o_destroy)(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md *ea, struct obd_trans_info *oti, - struct obd_export *md_exp); - int (*o_setattr)(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti); - int (*o_setattr_async)(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct ptlrpc_request_set *rqset); - int (*o_getattr)(struct obd_export *exp, struct obd_info *oinfo); - int (*o_getattr_async)(struct obd_export *exp, struct obd_info *oinfo, - struct ptlrpc_request_set *set); - int (*o_brw)(int rw, struct obd_export *exp, struct obd_info *oinfo, - obd_count oa_bufs, struct brw_page *pgarr, - struct obd_trans_info *oti); - int (*o_brw_async)(int rw, struct obd_export *exp, - struct obd_info *oinfo, obd_count oa_bufs, - struct brw_page *pgarr, struct obd_trans_info *oti, - struct ptlrpc_request_set *); - int (*o_prep_async_page)(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, - cfs_page_t *page, obd_off offset, - struct obd_async_page_ops *ops, void *data, - void **res, int nocache, - struct lustre_handle *lockh); - int (*o_queue_async_io)(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie, - int cmd, obd_off off, int count, - obd_flag brw_flags, obd_flag async_flags); - int (*o_queue_group_io)(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, - struct obd_io_group *oig, - void *cookie, int cmd, obd_off off, int count, - obd_flag brw_flags, obd_flag async_flags); - int (*o_trigger_group_io)(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, - struct obd_io_group *oig); - int (*o_set_async_flags)(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie, - obd_flag async_flags); - int (*o_teardown_async_page)(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie); - int (*o_merge_lvb)(struct obd_export *exp, struct lov_stripe_md *lsm, - struct ost_lvb *lvb, int kms_only); - int (*o_adjust_kms)(struct obd_export *exp, struct lov_stripe_md *lsm, - obd_off size, int shrink); - int (*o_punch)(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct ptlrpc_request_set *rqset); - int (*o_sync)(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md *ea, obd_size start, obd_size end); - int (*o_migrate)(struct lustre_handle *conn, struct lov_stripe_md *dst, - struct lov_stripe_md *src, obd_size start, - obd_size end, struct obd_trans_info *oti); - int (*o_copy)(struct lustre_handle *dstconn, struct lov_stripe_md *dst, - struct lustre_handle *srconn, struct lov_stripe_md *src, - obd_size start, obd_size end, struct obd_trans_info *); - int (*o_iterate)(struct lustre_handle *conn, - int (*)(obd_id, obd_gr, void *), - obd_id *startid, obd_gr group, void *data); - int (*o_preprw)(int cmd, struct obd_export *exp, struct obdo *oa, - int objcount, struct obd_ioobj *obj, - int niocount, struct niobuf_remote *remote, - struct niobuf_local *local, struct obd_trans_info *oti); - int (*o_commitrw)(int cmd, struct obd_export *exp, struct obdo *oa, - int objcount, struct obd_ioobj *obj, - int niocount, struct niobuf_local *local, - struct obd_trans_info *oti, int rc); - int (*o_enqueue)(struct obd_export *, struct obd_info *oinfo, - struct ldlm_enqueue_info *einfo, - struct ptlrpc_request_set *rqset); - int (*o_match)(struct obd_export *, struct lov_stripe_md *, __u32 type, - ldlm_policy_data_t *, __u32 mode, int *flags, void *data, - struct lustre_handle *lockh); - int (*o_change_cbdata)(struct obd_export *, struct lov_stripe_md *, - ldlm_iterator_t it, void *data); - int (*o_cancel)(struct obd_export *, struct lov_stripe_md *md, - __u32 mode, struct lustre_handle *); - int (*o_cancel_unused)(struct obd_export *, struct lov_stripe_md *, - int flags, void *opaque); - int (*o_join_lru)(struct obd_export *, struct lov_stripe_md *, - int join); - int (*o_init_export)(struct obd_export *exp); - int (*o_destroy_export)(struct obd_export *exp); - int (*o_extent_calc)(struct obd_export *, struct lov_stripe_md *, - int cmd, obd_off *); - - /* llog related obd_methods */ - int (*o_llog_init)(struct obd_device *obd, struct obd_device *disk_obd, - int count, struct llog_catid *logid, - struct obd_uuid *uuid); - int (*o_llog_finish)(struct obd_device *obd, int count); - - /* metadata-only methods */ - int (*o_pin)(struct obd_export *, obd_id ino, __u32 gen, int type, - struct obd_client_handle *, int flag); - int (*o_unpin)(struct obd_export *, struct obd_client_handle *, int); - - int (*o_import_event)(struct obd_device *, struct obd_import *, - enum obd_import_event); - - int (*o_notify)(struct obd_device *obd, struct obd_device *watched, - enum obd_notify_event ev, void *data); - - int (*o_health_check)(struct obd_device *); - - /* quota methods */ - int (*o_quotacheck)(struct obd_export *, struct obd_quotactl *); - int (*o_quotactl)(struct obd_export *, struct obd_quotactl *); - int (*o_quota_adjust_qunit)(struct obd_export *exp, - struct quota_adjust_qunit *oqaq); - - - int (*o_ping)(struct obd_export *exp); - - int (*o_register_page_removal_cb)(struct obd_export *exp, - obd_page_removal_cb_t cb, - obd_pin_extent_cb pin_cb); - int (*o_unregister_page_removal_cb)(struct obd_export *exp, - obd_page_removal_cb_t cb); - int (*o_register_lock_cancel_cb)(struct obd_export *exp, - obd_lock_cancel_cb cb); - int (*o_unregister_lock_cancel_cb)(struct obd_export *exp, - obd_lock_cancel_cb cb); - - /* - * NOTE: If adding ops, add another LPROCFS_OBD_OP_INIT() line - * to lprocfs_alloc_obd_stats() in obdclass/lprocfs_status.c. - * Also, add a wrapper function in include/linux/obd_class.h. */ -}; - -struct lsm_operations { - void (*lsm_free)(struct lov_stripe_md *); - int (*lsm_destroy)(struct lov_stripe_md *, struct obdo *oa, - struct obd_export *md_exp); - void (*lsm_stripe_by_index)(struct lov_stripe_md *, int *, obd_off *, - unsigned long *); - void (*lsm_stripe_by_offset)(struct lov_stripe_md *, int *, obd_off *, - unsigned long *); - obd_off (*lsm_stripe_offset_by_index)(struct lov_stripe_md *, int); - obd_off (*lsm_stripe_offset_by_offset)(struct lov_stripe_md *, obd_off); - int (*lsm_stripe_index_by_offset)(struct lov_stripe_md *, obd_off); - int (*lsm_revalidate) (struct lov_stripe_md *, struct obd_device *obd); - int (*lsm_lmm_verify) (struct lov_mds_md *lmm, int lmm_bytes, - int *stripe_count); - int (*lsm_unpackmd) (struct lov_obd *lov, struct lov_stripe_md *lsm, - struct lov_mds_md *lmm); -}; - -extern struct lsm_operations lsm_plain_ops; -extern struct lsm_operations lsm_join_ops; -static inline struct lsm_operations *lsm_op_find(int magic) -{ - switch(magic) { - case LOV_MAGIC: - return &lsm_plain_ops; - case LOV_MAGIC_JOIN: - return &lsm_join_ops; - default: - CERROR("Cannot recognize lsm_magic %d", magic); - return NULL; - } -} - -int lvfs_check_io_health(struct obd_device *obd, struct file *file); - -/* Requests for obd_extent_calc() */ -#define OBD_CALC_STRIPE_START 1 -#define OBD_CALC_STRIPE_END 2 - -static inline void obd_transno_commit_cb(struct obd_device *obd, __u64 transno, - int error) -{ - if (error) { - CERROR("%s: transno "LPD64" commit error: %d\n", - obd->obd_name, transno, error); - return; - } - CDEBUG(D_HA, "%s: transno "LPD64" committed\n", - obd->obd_name, transno); - if (transno > obd->obd_last_committed) { - obd->obd_last_committed = transno; - ptlrpc_commit_replies (obd); - } -} - -static inline void init_obd_quota_ops(quota_interface_t *interface, - struct obd_ops *obd_ops) -{ - if (!interface) - return; - - LASSERT(obd_ops); - obd_ops->o_quotacheck = QUOTA_OP(interface, check); - obd_ops->o_quotactl = QUOTA_OP(interface, ctl); - obd_ops->o_quota_adjust_qunit = QUOTA_OP(interface, adjust_qunit); -} - -/* - * Checksums - */ - -#ifdef HAVE_ADLER -/* Default preferred checksum algorithm to use (if supported by the server) */ -#define OSC_DEFAULT_CKSUM OBD_CKSUM_ADLER -/* Adler-32 is supported */ -#define CHECKSUM_ADLER OBD_CKSUM_ADLER -#else -#define OSC_DEFAULT_CKSUM OBD_CKSUM_CRC32 -#define CHECKSUM_ADLER 0 -#endif - -#define OBD_CKSUM_ALL (OBD_CKSUM_CRC32 | CHECKSUM_ADLER) - -/* Checksum algorithm names. Must be defined in the same order as the - * OBD_CKSUM_* flags. */ -#define DECLARE_CKSUM_NAME char *cksum_name[] = {"crc32", "adler"} - -#endif /* __OBD_H */ diff --git a/lustre/include/obd_cache.h b/lustre/include/obd_cache.h deleted file mode 100644 index c5ec3261ca..0000000000 --- a/lustre/include/obd_cache.h +++ /dev/null @@ -1,11 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _OBD_CACHE_H__ -#define _OBD_CACHE_H__ - -#ifdef __KERNEL__ - -#endif -#endif diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h deleted file mode 100644 index e2a99e7166..0000000000 --- a/lustre/include/obd_class.h +++ /dev/null @@ -1,1509 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __CLASS_OBD_H -#define __CLASS_OBD_H - -#include <obd_support.h> -#include <lustre_import.h> -#include <lustre_net.h> -#include <obd.h> -#include <lustre_lib.h> -#include <lustre/lustre_idl.h> -#include <lprocfs_status.h> - -#if defined(__linux__) -#include <linux/obd_class.h> -#elif defined(__APPLE__) -#include <darwin/obd_class.h> -#elif defined(__WINNT__) -#include <winnt/obd_class.h> -#else -#error Unsupported operating system. -#endif - -/* OBD Device Declarations */ -extern struct obd_device *obd_devs[MAX_OBD_DEVICES]; -extern spinlock_t obd_dev_lock; - -/* OBD Operations Declarations */ -extern struct obd_device *class_conn2obd(struct lustre_handle *); -extern struct obd_device *class_exp2obd(struct obd_export *); - -/* genops.c */ -struct obd_export *class_conn2export(struct lustre_handle *); -int class_register_type(struct obd_ops *ops, struct lprocfs_vars *, - const char *nm); -int class_unregister_type(const char *nm); - -struct obd_device *class_newdev(const char *type_name, const char *name); -void class_release_dev(struct obd_device *obd); - -int class_name2dev(const char *name); -struct obd_device *class_name2obd(const char *name); -int class_uuid2dev(struct obd_uuid *uuid); -struct obd_device *class_uuid2obd(struct obd_uuid *uuid); -void class_obd_list(void); -struct obd_device * class_find_client_obd(struct obd_uuid *tgt_uuid, - const char * typ_name, - struct obd_uuid *grp_uuid); -struct obd_device * class_find_client_notype(struct obd_uuid *tgt_uuid, - struct obd_uuid *grp_uuid); -struct obd_device * class_devices_in_group(struct obd_uuid *grp_uuid, - int *next); -struct obd_device * class_num2obd(int num); - -int oig_init(struct obd_io_group **oig); -int oig_add_one(struct obd_io_group *oig, struct oig_callback_context *occ); -void oig_complete_one(struct obd_io_group *oig, - struct oig_callback_context *occ, int rc); -void oig_release(struct obd_io_group *oig); -int oig_wait(struct obd_io_group *oig); - -char *obd_export_nid2str(struct obd_export *exp); - -int obd_export_evict_by_nid(struct obd_device *obd, char *nid); -int obd_export_evict_by_uuid(struct obd_device *obd, char *uuid); - -/* obd_config.c */ -int class_process_config(struct lustre_cfg *lcfg); -int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, - struct lustre_cfg *lcfg, void *data); -int class_attach(struct lustre_cfg *lcfg); -int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg); -int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg); -int class_detach(struct obd_device *obd, struct lustre_cfg *lcfg); -struct obd_device *class_incref(struct obd_device *obd); -void class_decref(struct obd_device *obd); - -/*obdecho*/ -#ifdef LPROCFS -extern void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars); -#else -static inline void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars) -{ - memset(lvars, 0, sizeof(*lvars)); -} -#endif - -#define CFG_F_START 0x01 /* Set when we start updating from a log */ -#define CFG_F_MARKER 0x02 /* We are within a maker */ -#define CFG_F_SKIP 0x04 /* We should ignore this cfg command */ -#define CFG_F_COMPAT146 0x08 /* Allow old-style logs */ -#define CFG_F_EXCLUDE 0x10 /* OST exclusion list */ - -/* Passed as data param to class_config_parse_llog */ -struct config_llog_instance { - char * cfg_instance; - struct super_block *cfg_sb; - struct obd_uuid cfg_uuid; - int cfg_last_idx; /* for partial llog processing */ - int cfg_flags; -}; -int class_config_parse_llog(struct llog_ctxt *ctxt, char *name, - struct config_llog_instance *cfg); -int class_config_dump_llog(struct llog_ctxt *ctxt, char *name, - struct config_llog_instance *cfg); - -/* list of active configuration logs */ -struct config_llog_data { - char *cld_logname; - struct ldlm_res_id cld_resid; - struct config_llog_instance cld_cfg; - struct list_head cld_list_chain; - atomic_t cld_refcount; - struct obd_export *cld_mgcexp; - unsigned int cld_stopping:1; /* we were told to stop watching */ - unsigned int cld_lostlock:1; /* lock not requeued */ -}; - -struct lustre_profile { - struct list_head lp_list; - char * lp_profile; - char * lp_osc; - char * lp_mdc; -}; - -struct lustre_profile *class_get_profile(char * prof); -void class_del_profile(char *prof); -void class_del_profiles(void); - -#define class_export_rpc_get(exp) \ -({ \ - atomic_inc(&(exp)->exp_rpc_count); \ - CDEBUG(D_INFO, "RPC GETting export %p : new rpc_count %d\n", \ - (exp), atomic_read(&(exp)->exp_rpc_count)); \ - class_export_get(exp); \ -}) - -#define class_export_rpc_put(exp) \ -({ \ - atomic_dec(&(exp)->exp_rpc_count); \ - CDEBUG(D_INFO, "RPC PUTting export %p : new rpc_count %d\n", \ - (exp), atomic_read(&(exp)->exp_rpc_count)); \ - class_export_put(exp); \ -}) - -/* genops.c */ -#define class_export_get(exp) \ -({ \ - struct obd_export *exp_ = exp; \ - atomic_inc(&exp_->exp_refcount); \ - CDEBUG(D_INFO, "GETting export %p : new refcount %d\n", exp_, \ - atomic_read(&exp_->exp_refcount)); \ - exp_; \ -}) - -#define class_export_put(exp) \ -do { \ - LASSERT((exp) != NULL); \ - CDEBUG(D_INFO, "PUTting export %p : new refcount %d\n", (exp), \ - atomic_read(&(exp)->exp_refcount) - 1); \ - LASSERT(atomic_read(&(exp)->exp_refcount) > 0); \ - LASSERT(atomic_read(&(exp)->exp_refcount) < 0x5a5a5a); \ - __class_export_put(exp); \ -} while (0) - -void __class_export_put(struct obd_export *); -struct obd_export *class_new_export(struct obd_device *obddev, - struct obd_uuid *cluuid); -void class_unlink_export(struct obd_export *exp); - -struct obd_import *class_import_get(struct obd_import *); -void class_import_put(struct obd_import *); -struct obd_import *class_new_import(struct obd_device *obd); -void class_destroy_import(struct obd_import *exp); - -struct obd_type *class_search_type(const char *name); -struct obd_type *class_get_type(const char *name); -void class_put_type(struct obd_type *type); -int class_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid); -int class_disconnect(struct obd_export *exp); -void class_fail_export(struct obd_export *exp); -void class_disconnect_exports(struct obd_device *obddev); -void class_disconnect_stale_exports(struct obd_device *obddev); -int class_manual_cleanup(struct obd_device *obd); - -/* obdo.c */ -void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid); -void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj); - - -#define OBT(dev) (dev)->obd_type -#define OBP(dev, op) (dev)->obd_type->typ_ops->o_ ## op -#define CTXTP(ctxt, op) (ctxt)->loc_logops->lop_##op - -/* Ensure obd_setup: used for cleanup which must be called - while obd is stopping */ -#define OBD_CHECK_DEV(obd) \ -do { \ - if (!(obd)) { \ - CERROR("NULL device\n"); \ - RETURN(-ENODEV); \ - } \ -} while (0) - -/* ensure obd_setup and !obd_stopping */ -#define OBD_CHECK_DEV_ACTIVE(obd) \ -do { \ - OBD_CHECK_DEV(obd); \ - if (!(obd)->obd_set_up || (obd)->obd_stopping) { \ - CERROR("Device %d not setup\n", \ - (obd)->obd_minor); \ - RETURN(-ENODEV); \ - } \ -} while (0) - - -#ifdef LPROCFS -#define OBD_COUNTER_OFFSET(op) \ - ((offsetof(struct obd_ops, o_ ## op) - \ - offsetof(struct obd_ops, o_iocontrol)) \ - / sizeof(((struct obd_ops *)(0))->o_iocontrol)) - -#define OBD_COUNTER_INCREMENT(obdx, op) \ - if ((obdx)->obd_stats != NULL) { \ - unsigned int coffset; \ - coffset = (unsigned int)((obdx)->obd_cntr_base) + \ - OBD_COUNTER_OFFSET(op); \ - LASSERT(coffset < (obdx)->obd_stats->ls_num); \ - lprocfs_counter_incr((obdx)->obd_stats, coffset); \ - } - -#define EXP_COUNTER_INCREMENT(export, op) \ - if ((export)->exp_obd->obd_stats != NULL) { \ - unsigned int coffset; \ - coffset = (unsigned int)((export)->exp_obd->obd_cntr_base) + \ - OBD_COUNTER_OFFSET(op); \ - LASSERT(coffset < (export)->exp_obd->obd_stats->ls_num); \ - lprocfs_counter_incr((export)->exp_obd->obd_stats, coffset); \ - if ((export)->exp_nid_stats != NULL && \ - (export)->exp_nid_stats->nid_stats != NULL) \ - lprocfs_counter_incr( \ - (export)->exp_nid_stats->nid_stats, coffset);\ - } - -#else -#define OBD_COUNTER_OFFSET(op) -#define OBD_COUNTER_INCREMENT(obd, op) -#define EXP_COUNTER_INCREMENT(exp, op); -#endif - -#define OBD_CHECK_OP(obd, op, err) \ -do { \ - if (!OBT(obd) || !OBP((obd), op)) {\ - if (err) \ - CERROR("obd_" #op ": dev %d no operation\n", \ - obd->obd_minor); \ - RETURN(err); \ - } \ -} while (0) - -#define EXP_CHECK_OP(exp, op) \ -do { \ - if ((exp) == NULL) { \ - CERROR("obd_" #op ": NULL export\n"); \ - RETURN(-ENODEV); \ - } \ - if ((exp)->exp_obd == NULL || !OBT((exp)->exp_obd)) { \ - CERROR("obd_" #op ": cleaned up obd\n"); \ - RETURN(-EOPNOTSUPP); \ - } \ - if (!OBT((exp)->exp_obd) || !OBP((exp)->exp_obd, op)) { \ - CERROR("obd_" #op ": dev %d no operation\n", \ - (exp)->exp_obd->obd_minor); \ - RETURN(-EOPNOTSUPP); \ - } \ -} while (0) - -#define CTXT_CHECK_OP(ctxt, op, err) \ -do { \ - if (!OBT(ctxt->loc_obd) || !CTXTP((ctxt), op)) { \ - if (err) \ - CERROR("lop_" #op ": dev %d no operation\n", \ - ctxt->loc_obd->obd_minor); \ - RETURN(err); \ - } \ -} while (0) - -static inline int class_devno_max(void) -{ - return MAX_OBD_DEVICES; -} - -static inline int obd_get_info(struct obd_export *exp, __u32 keylen, - void *key, __u32 *vallen, void *val) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, get_info); - EXP_COUNTER_INCREMENT(exp, get_info); - - rc = OBP(exp->exp_obd, get_info)(exp, keylen, key, vallen, val); - RETURN(rc); -} - -static inline int obd_set_info_async(struct obd_export *exp, obd_count keylen, - void *key, obd_count vallen, void *val, - struct ptlrpc_request_set *set) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, set_info_async); - EXP_COUNTER_INCREMENT(exp, set_info_async); - - rc = OBP(exp->exp_obd, set_info_async)(exp, keylen, key, vallen, val, - set); - RETURN(rc); -} - -static inline int obd_setup(struct obd_device *obd, int datalen, void *data) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(obd, setup, -EOPNOTSUPP); - OBD_COUNTER_INCREMENT(obd, setup); - - rc = OBP(obd, setup)(obd, datalen, data); - RETURN(rc); -} - -static inline int obd_precleanup(struct obd_device *obd, - enum obd_cleanup_stage cleanup_stage) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(obd, precleanup, 0); - OBD_COUNTER_INCREMENT(obd, precleanup); - - rc = OBP(obd, precleanup)(obd, cleanup_stage); - RETURN(rc); -} - -static inline int obd_cleanup(struct obd_device *obd) -{ - int rc; - ENTRY; - - OBD_CHECK_DEV(obd); - OBD_CHECK_OP(obd, cleanup, 0); - OBD_COUNTER_INCREMENT(obd, cleanup); - - rc = OBP(obd, cleanup)(obd); - RETURN(rc); -} - -static inline int -obd_process_config(struct obd_device *obd, int datalen, void *data) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(obd, process_config, -EOPNOTSUPP); - OBD_COUNTER_INCREMENT(obd, process_config); - - rc = OBP(obd, process_config)(obd, datalen, data); - RETURN(rc); -} - -/* Pack an in-memory MD struct for storage on disk. - * Returns +ve size of packed MD (0 for free), or -ve error. - * - * If @disk_tgt == NULL, MD size is returned (max size if @mem_src == NULL). - * If @*disk_tgt != NULL and @mem_src == NULL, @*disk_tgt will be freed. - * If @*disk_tgt == NULL, it will be allocated - */ -static inline int obd_packmd(struct obd_export *exp, - struct lov_mds_md **disk_tgt, - struct lov_stripe_md *mem_src) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, packmd); - EXP_COUNTER_INCREMENT(exp, packmd); - - rc = OBP(exp->exp_obd, packmd)(exp, disk_tgt, mem_src); - RETURN(rc); -} - -static inline int obd_size_diskmd(struct obd_export *exp, - struct lov_stripe_md *mem_src) -{ - return obd_packmd(exp, NULL, mem_src); -} - -/* helper functions */ -static inline int obd_alloc_diskmd(struct obd_export *exp, - struct lov_mds_md **disk_tgt) -{ - LASSERT(disk_tgt); - LASSERT(*disk_tgt == NULL); - return obd_packmd(exp, disk_tgt, NULL); -} - -static inline int obd_free_diskmd(struct obd_export *exp, - struct lov_mds_md **disk_tgt) -{ - LASSERT(disk_tgt); - LASSERT(*disk_tgt); - return obd_packmd(exp, disk_tgt, NULL); -} - -/* Unpack an MD struct from disk to in-memory format. - * Returns +ve size of unpacked MD (0 for free), or -ve error. - * - * If @mem_tgt == NULL, MD size is returned (max size if @disk_src == NULL). - * If @*mem_tgt != NULL and @disk_src == NULL, @*mem_tgt will be freed. - * If @*mem_tgt == NULL, it will be allocated - */ -static inline int obd_unpackmd(struct obd_export *exp, - struct lov_stripe_md **mem_tgt, - struct lov_mds_md *disk_src, - int disk_len) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, unpackmd); - EXP_COUNTER_INCREMENT(exp, unpackmd); - - rc = OBP(exp->exp_obd, unpackmd)(exp, mem_tgt, disk_src, disk_len); - RETURN(rc); -} - -/* helper functions */ -static inline int obd_alloc_memmd(struct obd_export *exp, - struct lov_stripe_md **mem_tgt) -{ - LASSERT(mem_tgt); - LASSERT(*mem_tgt == NULL); - return obd_unpackmd(exp, mem_tgt, NULL, 0); -} - -static inline int obd_free_memmd(struct obd_export *exp, - struct lov_stripe_md **mem_tgt) -{ - LASSERT(mem_tgt); - LASSERT(*mem_tgt); - return obd_unpackmd(exp, mem_tgt, NULL, 0); -} - -static inline int obd_checkmd(struct obd_export *exp, - struct obd_export *md_exp, - struct lov_stripe_md *mem_tgt) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, checkmd); - EXP_COUNTER_INCREMENT(exp, checkmd); - - rc = OBP(exp->exp_obd, checkmd)(exp, md_exp, mem_tgt); - RETURN(rc); -} - -static inline int obd_precreate(struct obd_export *exp) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, precreate); - OBD_COUNTER_INCREMENT(exp->exp_obd, precreate); - - rc = OBP(exp->exp_obd, precreate)(exp); - RETURN(rc); -} - -static inline int obd_create(struct obd_export *exp, struct obdo *obdo, - struct lov_stripe_md **ea, - struct obd_trans_info *oti) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, create); - EXP_COUNTER_INCREMENT(exp, create); - - rc = OBP(exp->exp_obd, create)(exp, obdo, ea, oti); - RETURN(rc); -} - -static inline int obd_destroy(struct obd_export *exp, struct obdo *obdo, - struct lov_stripe_md *ea, - struct obd_trans_info *oti, - struct obd_export *md_exp) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, destroy); - EXP_COUNTER_INCREMENT(exp, destroy); - - rc = OBP(exp->exp_obd, destroy)(exp, obdo, ea, oti, md_exp); - RETURN(rc); -} - -static inline int obd_getattr(struct obd_export *exp, struct obd_info *oinfo) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, getattr); - EXP_COUNTER_INCREMENT(exp, getattr); - - rc = OBP(exp->exp_obd, getattr)(exp, oinfo); - RETURN(rc); -} - -static inline int obd_getattr_async(struct obd_export *exp, - struct obd_info *oinfo, - struct ptlrpc_request_set *set) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, getattr_async); - EXP_COUNTER_INCREMENT(exp, getattr_async); - - rc = OBP(exp->exp_obd, getattr_async)(exp, oinfo, set); - RETURN(rc); -} - -static inline int obd_setattr(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, setattr); - EXP_COUNTER_INCREMENT(exp, setattr); - - rc = OBP(exp->exp_obd, setattr)(exp, oinfo, oti); - RETURN(rc); -} - -/* This performs all the requests set init/wait/destroy actions. */ -static inline int obd_setattr_rqset(struct obd_export *exp, - struct obd_info *oinfo, - struct obd_trans_info *oti) -{ - struct ptlrpc_request_set *set = NULL; - int rc; - ENTRY; - - EXP_CHECK_OP(exp, setattr_async); - EXP_COUNTER_INCREMENT(exp, setattr_async); - - set = ptlrpc_prep_set(); - if (set == NULL) - RETURN(-ENOMEM); - - rc = OBP(exp->exp_obd, setattr_async)(exp, oinfo, oti, set); - if (rc == 0) - rc = ptlrpc_set_wait(set); - ptlrpc_set_destroy(set); - RETURN(rc); -} - -/* This adds all the requests into @set if @set != NULL, otherwise - all requests are sent asynchronously without waiting for response. */ -static inline int obd_setattr_async(struct obd_export *exp, - struct obd_info *oinfo, - struct obd_trans_info *oti, - struct ptlrpc_request_set *set) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, setattr_async); - EXP_COUNTER_INCREMENT(exp, setattr_async); - - rc = OBP(exp->exp_obd, setattr_async)(exp, oinfo, oti, set); - RETURN(rc); -} - -static inline int obd_add_conn(struct obd_import *imp, struct obd_uuid *uuid, - int priority) -{ - struct obd_device *obd = imp->imp_obd; - int rc; - ENTRY; - - OBD_CHECK_DEV_ACTIVE(obd); - OBD_CHECK_OP(obd, add_conn, -EOPNOTSUPP); - OBD_COUNTER_INCREMENT(obd, add_conn); - - rc = OBP(obd, add_conn)(imp, uuid, priority); - RETURN(rc); -} - -static inline int obd_del_conn(struct obd_import *imp, struct obd_uuid *uuid) -{ - struct obd_device *obd = imp->imp_obd; - int rc; - ENTRY; - - OBD_CHECK_DEV_ACTIVE(obd); - OBD_CHECK_OP(obd, del_conn, -EOPNOTSUPP); - OBD_COUNTER_INCREMENT(obd, del_conn); - - rc = OBP(obd, del_conn)(imp, uuid); - RETURN(rc); -} - -static inline int obd_connect(struct lustre_handle *conn,struct obd_device *obd, - struct obd_uuid *cluuid, - struct obd_connect_data *d, - void *localdata) -{ - int rc; - __u64 ocf = d ? d->ocd_connect_flags : 0; /* for post-condition check */ - ENTRY; - - OBD_CHECK_DEV_ACTIVE(obd); - OBD_CHECK_OP(obd, connect, -EOPNOTSUPP); - OBD_COUNTER_INCREMENT(obd, connect); - - rc = OBP(obd, connect)(conn, obd, cluuid, d, localdata); - /* check that only subset is granted */ - LASSERT(ergo(d != NULL, - (d->ocd_connect_flags & ocf) == d->ocd_connect_flags)); - RETURN(rc); -} - -static inline int obd_reconnect(struct obd_export *exp, - struct obd_device *obd, - struct obd_uuid *cluuid, - struct obd_connect_data *d) -{ - int rc; - __u64 ocf = d ? d->ocd_connect_flags : 0; /* for post-condition check */ - ENTRY; - - OBD_CHECK_DEV_ACTIVE(obd); - OBD_CHECK_OP(obd, reconnect, 0); - OBD_COUNTER_INCREMENT(obd, reconnect); - - rc = OBP(obd, reconnect)(exp, obd, cluuid, d); - /* check that only subset is granted */ - LASSERT(ergo(d != NULL, - (d->ocd_connect_flags & ocf) == d->ocd_connect_flags)); - RETURN(rc); -} - -static inline int obd_disconnect(struct obd_export *exp) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, disconnect); - EXP_COUNTER_INCREMENT(exp, disconnect); - - rc = OBP(exp->exp_obd, disconnect)(exp); - RETURN(rc); -} - -static inline int obd_ping(struct obd_export *exp) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, ping, 0); - EXP_COUNTER_INCREMENT(exp, ping); - - rc = OBP(exp->exp_obd, ping)(exp); - RETURN(rc); -} - -static inline int obd_init_export(struct obd_export *exp) -{ - int rc = 0; - - ENTRY; - if ((exp)->exp_obd != NULL && OBT((exp)->exp_obd) && - OBP((exp)->exp_obd, init_export)) - rc = OBP(exp->exp_obd, init_export)(exp); - RETURN(rc); -} - -static inline int obd_destroy_export(struct obd_export *exp) -{ - ENTRY; - if ((exp)->exp_obd != NULL && OBT((exp)->exp_obd) && - OBP((exp)->exp_obd, destroy_export)) - OBP(exp->exp_obd, destroy_export)(exp); - RETURN(0); -} - -static inline int obd_extent_calc(struct obd_export *exp, - struct lov_stripe_md *md, - int cmd, obd_off *offset) -{ - int rc; - ENTRY; - EXP_CHECK_OP(exp, extent_calc); - rc = OBP(exp->exp_obd, extent_calc)(exp, md, cmd, offset); - RETURN(rc); -} - -static inline struct dentry * -obd_lvfs_fid2dentry(struct obd_export *exp, __u64 id_ino, __u32 gen, __u64 gr) -{ - LASSERT(exp->exp_obd); - - return lvfs_fid2dentry(&exp->exp_obd->obd_lvfs_ctxt, id_ino, gen, gr, - exp->exp_obd); -} - -#ifndef time_before -#define time_before(t1, t2) ((long)t2 - (long)t1 > 0) -#endif - -/* @max_age is the oldest time in jiffies that we accept using a cached data. - * If the cache is older than @max_age we will get a new value from the - * target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */ -static inline int obd_statfs_async(struct obd_device *obd, - struct obd_info *oinfo, - __u64 max_age, - struct ptlrpc_request_set *rqset) -{ - int rc = 0; - ENTRY; - - if (obd == NULL) - RETURN(-EINVAL); - - OBD_CHECK_OP(obd, statfs, -EOPNOTSUPP); - OBD_COUNTER_INCREMENT(obd, statfs); - - CDEBUG(D_SUPER, "%s: osfs %p age "LPU64", max_age "LPU64"\n", - obd->obd_name, &obd->obd_osfs, obd->obd_osfs_age, max_age); - if (cfs_time_before_64(obd->obd_osfs_age, max_age)) { - rc = OBP(obd, statfs_async)(obd, oinfo, max_age, rqset); - } else { - CDEBUG(D_SUPER,"%s: use %p cache blocks "LPU64"/"LPU64 - " objects "LPU64"/"LPU64"\n", - obd->obd_name, &obd->obd_osfs, - obd->obd_osfs.os_bavail, obd->obd_osfs.os_blocks, - obd->obd_osfs.os_ffree, obd->obd_osfs.os_files); - spin_lock(&obd->obd_osfs_lock); - memcpy(oinfo->oi_osfs, &obd->obd_osfs, sizeof(*oinfo->oi_osfs)); - spin_unlock(&obd->obd_osfs_lock); - if (oinfo->oi_cb_up) - oinfo->oi_cb_up(oinfo, 0); - } - RETURN(rc); -} - -static inline int obd_statfs_rqset(struct obd_device *obd, - struct obd_statfs *osfs, __u64 max_age, - __u32 flags) -{ - struct ptlrpc_request_set *set = NULL; - struct obd_info oinfo = { { { 0 } } }; - int rc = 0; - ENTRY; - - set = ptlrpc_prep_set(); - if (set == NULL) - RETURN(-ENOMEM); - - oinfo.oi_osfs = osfs; - oinfo.oi_flags = flags; - rc = obd_statfs_async(obd, &oinfo, max_age, set); - if (rc == 0) - rc = ptlrpc_set_wait(set); - ptlrpc_set_destroy(set); - RETURN(rc); -} - -/* @max_age is the oldest time in jiffies that we accept using a cached data. - * If the cache is older than @max_age we will get a new value from the - * target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */ -static inline int obd_statfs(struct obd_device *obd, struct obd_statfs *osfs, - __u64 max_age, __u32 flags) -{ - int rc = 0; - ENTRY; - - if (obd == NULL) - RETURN(-EINVAL); - - OBD_CHECK_OP(obd, statfs, -EOPNOTSUPP); - OBD_COUNTER_INCREMENT(obd, statfs); - - CDEBUG(D_SUPER, "osfs "LPU64", max_age "LPU64"\n", - obd->obd_osfs_age, max_age); - if (cfs_time_before_64(obd->obd_osfs_age, max_age)) { - rc = OBP(obd, statfs)(obd, osfs, max_age, flags); - if (rc == 0) { - spin_lock(&obd->obd_osfs_lock); - memcpy(&obd->obd_osfs, osfs, sizeof(obd->obd_osfs)); - obd->obd_osfs_age = cfs_time_current_64(); - spin_unlock(&obd->obd_osfs_lock); - } - } else { - CDEBUG(D_SUPER,"%s: use %p cache blocks "LPU64"/"LPU64 - " objects "LPU64"/"LPU64"\n", - obd->obd_name, &obd->obd_osfs, - obd->obd_osfs.os_bavail, obd->obd_osfs.os_blocks, - obd->obd_osfs.os_ffree, obd->obd_osfs.os_files); - spin_lock(&obd->obd_osfs_lock); - memcpy(osfs, &obd->obd_osfs, sizeof(*osfs)); - spin_unlock(&obd->obd_osfs_lock); - } - RETURN(rc); -} - -static inline int obd_sync(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md *ea, obd_size start, - obd_size end) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, sync, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, sync); - - rc = OBP(exp->exp_obd, sync)(exp, oa, ea, start, end); - RETURN(rc); -} - -static inline int obd_punch_rqset(struct obd_export *exp, - struct obd_info *oinfo, - struct obd_trans_info *oti) -{ - struct ptlrpc_request_set *set = NULL; - int rc; - ENTRY; - - EXP_CHECK_OP(exp, punch); - EXP_COUNTER_INCREMENT(exp, punch); - - set = ptlrpc_prep_set(); - if (set == NULL) - RETURN(-ENOMEM); - - rc = OBP(exp->exp_obd, punch)(exp, oinfo, oti, set); - if (rc == 0) - rc = ptlrpc_set_wait(set); - ptlrpc_set_destroy(set); - RETURN(rc); -} - -static inline int obd_punch(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct ptlrpc_request_set *rqset) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, punch); - EXP_COUNTER_INCREMENT(exp, punch); - - rc = OBP(exp->exp_obd, punch)(exp, oinfo, oti, rqset); - RETURN(rc); -} - -static inline int obd_brw(int cmd, struct obd_export *exp, - struct obd_info *oinfo, obd_count oa_bufs, - struct brw_page *pg, struct obd_trans_info *oti) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, brw); - EXP_COUNTER_INCREMENT(exp, brw); - - if (!(cmd & (OBD_BRW_RWMASK | OBD_BRW_CHECK))) { - CERROR("obd_brw: cmd must be OBD_BRW_READ, OBD_BRW_WRITE, " - "or OBD_BRW_CHECK\n"); - LBUG(); - } - - rc = OBP(exp->exp_obd, brw)(cmd, exp, oinfo, oa_bufs, pg, oti); - RETURN(rc); -} - -static inline int obd_brw_async(int cmd, struct obd_export *exp, - struct obd_info *oinfo, obd_count oa_bufs, - struct brw_page *pg, struct obd_trans_info *oti, - struct ptlrpc_request_set *set) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, brw_async); - EXP_COUNTER_INCREMENT(exp, brw_async); - - if (!(cmd & OBD_BRW_RWMASK)) { - CERROR("obd_brw: cmd must be OBD_BRW_READ or OBD_BRW_WRITE\n"); - LBUG(); - } - - rc = OBP(exp->exp_obd, brw_async)(cmd, exp, oinfo, oa_bufs, pg,oti,set); - RETURN(rc); -} - -static inline int obd_brw_rqset(int cmd, struct obd_export *exp, - struct obdo *oa, struct lov_stripe_md *lsm, - obd_count oa_bufs, struct brw_page *pg, - struct obd_trans_info *oti) -{ - struct ptlrpc_request_set *set = NULL; - struct obd_info oinfo = { { { 0 } } }; - int rc = 0; - ENTRY; - - set = ptlrpc_prep_set(); - if (set == NULL) - RETURN(-ENOMEM); - - oinfo.oi_oa = oa; - oinfo.oi_md = lsm; - rc = obd_brw_async(cmd, exp, &oinfo, oa_bufs, pg, oti, set); - if (rc == 0) { - rc = ptlrpc_set_wait(set); - if (rc) - CERROR("error from callback: rc = %d\n", rc); - } else { - CDEBUG(rc == -ENOSPC ? D_INODE : D_ERROR, - "error from obd_brw_async: rc = %d\n", rc); - } - ptlrpc_set_destroy(set); - RETURN(rc); -} - -static inline int obd_prep_async_page(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, - cfs_page_t *page, obd_off offset, - struct obd_async_page_ops *ops, - void *data, void **res, int nocache, - struct lustre_handle *lockh) -{ - int ret; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, prep_async_page, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, prep_async_page); - - ret = OBP(exp->exp_obd, prep_async_page)(exp, lsm, loi, page, offset, - ops, data, res, nocache, - lockh); - RETURN(ret); -} - -static inline int obd_queue_async_io(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie, - int cmd, obd_off off, int count, - obd_flag brw_flags, obd_flag async_flags) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, queue_async_io, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, queue_async_io); - LASSERT(cmd & OBD_BRW_RWMASK); - - rc = OBP(exp->exp_obd, queue_async_io)(exp, lsm, loi, cookie, cmd, off, - count, brw_flags, async_flags); - RETURN(rc); -} - -static inline int obd_set_async_flags(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie, - obd_flag async_flags) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, set_async_flags, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, set_async_flags); - - rc = OBP(exp->exp_obd, set_async_flags)(exp, lsm, loi, cookie, - async_flags); - RETURN(rc); -} - -static inline int obd_queue_group_io(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, - struct obd_io_group *oig, - void *cookie, int cmd, obd_off off, - int count, obd_flag brw_flags, - obd_flag async_flags) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, queue_group_io, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, queue_group_io); - LASSERT(cmd & OBD_BRW_RWMASK); - - rc = OBP(exp->exp_obd, queue_group_io)(exp, lsm, loi, oig, cookie, - cmd, off, count, brw_flags, - async_flags); - RETURN(rc); -} - -static inline int obd_trigger_group_io(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, - struct obd_io_group *oig) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, trigger_group_io, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, trigger_group_io); - - rc = OBP(exp->exp_obd, trigger_group_io)(exp, lsm, loi, oig); - RETURN(rc); -} - -static inline int obd_teardown_async_page(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, teardown_async_page, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, teardown_async_page); - - rc = OBP(exp->exp_obd, teardown_async_page)(exp, lsm, loi, cookie); - RETURN(rc); -} - -static inline int obd_preprw(int cmd, struct obd_export *exp, struct obdo *oa, - int objcount, struct obd_ioobj *obj, - int niocount, struct niobuf_remote *remote, - struct niobuf_local *local, - struct obd_trans_info *oti) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, preprw, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, preprw); - - rc = OBP(exp->exp_obd, preprw)(cmd, exp, oa, objcount, obj, niocount, - remote, local, oti); - RETURN(rc); -} - -static inline int obd_commitrw(int cmd, struct obd_export *exp, struct obdo *oa, - int objcount, struct obd_ioobj *obj, - int niocount, struct niobuf_local *local, - struct obd_trans_info *oti, int rc) -{ - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, commitrw, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, commitrw); - - rc = OBP(exp->exp_obd, commitrw)(cmd, exp, oa, objcount, obj, niocount, - local, oti, rc); - RETURN(rc); -} - -static inline int obd_merge_lvb(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct ost_lvb *lvb, int kms_only) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, merge_lvb, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, merge_lvb); - - rc = OBP(exp->exp_obd, merge_lvb)(exp, lsm, lvb, kms_only); - RETURN(rc); -} - -static inline int obd_adjust_kms(struct obd_export *exp, - struct lov_stripe_md *lsm, obd_off size, - int shrink) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, adjust_kms, -EOPNOTSUPP); - EXP_COUNTER_INCREMENT(exp, adjust_kms); - - rc = OBP(exp->exp_obd, adjust_kms)(exp, lsm, size, shrink); - RETURN(rc); -} - -static inline int obd_iocontrol(unsigned int cmd, struct obd_export *exp, - int len, void *karg, void *uarg) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, iocontrol); - EXP_COUNTER_INCREMENT(exp, iocontrol); - - rc = OBP(exp->exp_obd, iocontrol)(cmd, exp, len, karg, uarg); - RETURN(rc); -} - -static inline int obd_enqueue_rqset(struct obd_export *exp, - struct obd_info *oinfo, - struct ldlm_enqueue_info *einfo) -{ - struct ptlrpc_request_set *set = NULL; - int rc; - ENTRY; - - EXP_CHECK_OP(exp, enqueue); - EXP_COUNTER_INCREMENT(exp, enqueue); - - set = ptlrpc_prep_set(); - if (set == NULL) - RETURN(-ENOMEM); - - rc = OBP(exp->exp_obd, enqueue)(exp, oinfo, einfo, set); - if (rc == 0) - rc = ptlrpc_set_wait(set); - ptlrpc_set_destroy(set); - RETURN(rc); -} - -static inline int obd_enqueue(struct obd_export *exp, - struct obd_info *oinfo, - struct ldlm_enqueue_info *einfo, - struct ptlrpc_request_set *set) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, enqueue); - EXP_COUNTER_INCREMENT(exp, enqueue); - - rc = OBP(exp->exp_obd, enqueue)(exp, oinfo, einfo, set); - RETURN(rc); -} - -static inline int obd_match(struct obd_export *exp, struct lov_stripe_md *ea, - __u32 type, ldlm_policy_data_t *policy, __u32 mode, - int *flags, void *data, struct lustre_handle *lockh) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, match); - EXP_COUNTER_INCREMENT(exp, match); - - rc = OBP(exp->exp_obd, match)(exp, ea, type, policy, mode, flags, data, - lockh); - RETURN(rc); -} - -static inline int obd_change_cbdata(struct obd_export *exp, - struct lov_stripe_md *lsm, - ldlm_iterator_t it, void *data) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, change_cbdata); - EXP_COUNTER_INCREMENT(exp, change_cbdata); - - rc = OBP(exp->exp_obd, change_cbdata)(exp, lsm, it, data); - RETURN(rc); -} - -static inline int obd_cancel(struct obd_export *exp, - struct lov_stripe_md *ea, __u32 mode, - struct lustre_handle *lockh) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, cancel); - EXP_COUNTER_INCREMENT(exp, cancel); - - rc = OBP(exp->exp_obd, cancel)(exp, ea, mode, lockh); - RETURN(rc); -} - -static inline int obd_cancel_unused(struct obd_export *exp, - struct lov_stripe_md *ea, int flags, - void *opaque) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, cancel_unused); - EXP_COUNTER_INCREMENT(exp, cancel_unused); - - rc = OBP(exp->exp_obd, cancel_unused)(exp, ea, flags, opaque); - RETURN(rc); -} - -static inline int obd_join_lru(struct obd_export *exp, - struct lov_stripe_md *ea, int join) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, join_lru); - EXP_COUNTER_INCREMENT(exp, join_lru); - - rc = OBP(exp->exp_obd, join_lru)(exp, ea, join); - RETURN(rc); -} - -static inline int obd_pin(struct obd_export *exp, obd_id ino, __u32 gen, - int type, struct obd_client_handle *handle, int flag) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, pin); - EXP_COUNTER_INCREMENT(exp, pin); - - rc = OBP(exp->exp_obd, pin)(exp, ino, gen, type, handle, flag); - RETURN(rc); -} - -static inline int obd_unpin(struct obd_export *exp, - struct obd_client_handle *handle, int flag) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, unpin); - EXP_COUNTER_INCREMENT(exp, unpin); - - rc = OBP(exp->exp_obd, unpin)(exp, handle, flag); - RETURN(rc); -} - - -static inline void obd_import_event(struct obd_device *obd, - struct obd_import *imp, - enum obd_import_event event) -{ - ENTRY; - if (!obd) { - CERROR("NULL device\n"); - EXIT; - return; - } - if (obd->obd_set_up && OBP(obd, import_event)) { - OBD_COUNTER_INCREMENT(obd, import_event); - OBP(obd, import_event)(obd, imp, event); - } - EXIT; -} - -static inline int obd_notify(struct obd_device *obd, - struct obd_device *watched, - enum obd_notify_event ev, void *data) -{ - ENTRY; - OBD_CHECK_DEV(obd); - - /* the check for async_recov is a complete hack - I'm hereby - overloading the meaning to also mean "this was called from - mds_postsetup". I know that my mds is able to handle notifies - by this point, and it needs to get them to execute mds_postrecov. */ - if (!obd->obd_set_up && !obd->obd_async_recov) { - CDEBUG(D_HA, "obd %s not set up\n", obd->obd_name); - RETURN(-EINVAL); - } - - if (!OBP(obd, notify)) - RETURN(-ENOSYS); - - OBD_COUNTER_INCREMENT(obd, notify); - RETURN(OBP(obd, notify)(obd, watched, ev, data)); -} - -static inline int obd_notify_observer(struct obd_device *observer, - struct obd_device *observed, - enum obd_notify_event ev, void *data) -{ - int rc1; - int rc2; - - struct obd_notify_upcall *onu; - - if (observer->obd_observer) - rc1 = obd_notify(observer->obd_observer, observed, ev, data); - else - rc1 = 0; - /* - * Also, call non-obd listener, if any - */ - onu = &observer->obd_upcall; - if (onu->onu_upcall != NULL) - rc2 = onu->onu_upcall(observer, observed, ev, onu->onu_owner); - else - rc2 = 0; - - return rc1 ?: rc2; - } - -static inline int obd_quotacheck(struct obd_export *exp, - struct obd_quotactl *oqctl) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, quotacheck); - EXP_COUNTER_INCREMENT(exp, quotacheck); - - rc = OBP(exp->exp_obd, quotacheck)(exp, oqctl); - RETURN(rc); -} - -static inline int obd_quotactl(struct obd_export *exp, - struct obd_quotactl *oqctl) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, quotactl); - EXP_COUNTER_INCREMENT(exp, quotactl); - - rc = OBP(exp->exp_obd, quotactl)(exp, oqctl); - RETURN(rc); -} - -static inline int obd_quota_adjust_qunit(struct obd_export *exp, - struct quota_adjust_qunit *oqaq) -{ - int rc; - ENTRY; - - EXP_CHECK_OP(exp, quota_adjust_qunit); - EXP_COUNTER_INCREMENT(exp, quota_adjust_qunit); - - rc = OBP(exp->exp_obd, quota_adjust_qunit)(exp, oqaq); - RETURN(rc); -} - -static inline int obd_health_check(struct obd_device *obd) -{ - /* returns: 0 on healthy - * >0 on unhealthy + reason code/flag - * however the only suppored reason == 1 right now - * We'll need to define some better reasons - * or flags in the future. - * <0 on error - */ - int rc; - ENTRY; - - /* don't use EXP_CHECK_OP, because NULL method is normal here */ - if (obd == NULL || !OBT(obd)) { - CERROR("cleaned up obd\n"); - RETURN(-EOPNOTSUPP); - } - if (!obd->obd_set_up || obd->obd_stopping) - RETURN(0); - if (!OBP(obd, health_check)) - RETURN(0); - - rc = OBP(obd, health_check)(obd); - RETURN(rc); -} - -static inline int obd_register_observer(struct obd_device *obd, - struct obd_device *observer) -{ - ENTRY; - OBD_CHECK_DEV(obd); - if (obd->obd_observer && observer) - RETURN(-EALREADY); - obd->obd_observer = observer; - RETURN(0); -} - -static inline int obd_register_page_removal_cb(struct obd_export *exp, - obd_page_removal_cb_t cb, - obd_pin_extent_cb pin_cb) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, register_page_removal_cb, 0); - OBD_COUNTER_INCREMENT(exp->exp_obd, register_page_removal_cb); - - rc = OBP(exp->exp_obd, register_page_removal_cb)(exp, cb, pin_cb); - RETURN(rc); -} - -static inline int obd_unregister_page_removal_cb(struct obd_export *exp, - obd_page_removal_cb_t cb) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, unregister_page_removal_cb, 0); - OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_page_removal_cb); - - rc = OBP(exp->exp_obd, unregister_page_removal_cb)(exp, cb); - RETURN(rc); -} - -static inline int obd_register_lock_cancel_cb(struct obd_export *exp, - obd_lock_cancel_cb cb) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, register_lock_cancel_cb, 0); - OBD_COUNTER_INCREMENT(exp->exp_obd, register_lock_cancel_cb); - - rc = OBP(exp->exp_obd, register_lock_cancel_cb)(exp, cb); - RETURN(rc); -} - -static inline int obd_unregister_lock_cancel_cb(struct obd_export *exp, - obd_lock_cancel_cb cb) -{ - int rc; - ENTRY; - - OBD_CHECK_OP(exp->exp_obd, unregister_lock_cancel_cb, 0); - OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_lock_cancel_cb); - - rc = OBP(exp->exp_obd, unregister_lock_cancel_cb)(exp, cb); - RETURN(rc); -} - -/* OBD Metadata Support */ - -extern int obd_init_caches(void); -extern void obd_cleanup_caches(void); - -/* support routines */ -extern cfs_mem_cache_t *obdo_cachep; - -#define OBDO_ALLOC(ptr) \ -do { \ - OBD_SLAB_ALLOC_PTR((ptr), obdo_cachep); \ -} while(0) - -#define OBDO_FREE(ptr) \ -do { \ - OBD_SLAB_FREE_PTR((ptr), obdo_cachep); \ -} while(0) - -/* I'm as embarrassed about this as you are. - * - * <shaver> // XXX do not look into _superhack with remaining eye - * <shaver> // XXX if this were any uglier, I'd get my own show on MTV */ -extern int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c); - -/* sysctl.c */ -extern void obd_sysctl_init (void); -extern void obd_sysctl_clean (void); - -/* uuid.c */ -typedef __u8 class_uuid_t[16]; -void class_uuid_unparse(class_uuid_t in, struct obd_uuid *out); - -/* lustre_peer.c */ -int lustre_uuid_to_peer(char *uuid, lnet_nid_t *peer_nid, int index); -int class_add_uuid(char *uuid, __u64 nid); -int class_del_uuid (char *uuid); -void class_init_uuidlist(void); -void class_exit_uuidlist(void); - -/* prng.c */ -void ll_generate_random_uuid(class_uuid_t uuid_out); - -#endif /* __LINUX_OBD_CLASS_H */ diff --git a/lustre/include/obd_echo.h b/lustre/include/obd_echo.h deleted file mode 100644 index 53b0e6b282..0000000000 --- a/lustre/include/obd_echo.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _OBD_ECHO_H -#define _OBD_ECHO_H - -/* The persistent object (i.e. actually stores stuff!) */ -#define ECHO_PERSISTENT_OBJID 1ULL -#define ECHO_PERSISTENT_SIZE ((__u64)(1<<20)) - -/* block size to use for data verification */ -#define OBD_ECHO_BLOCK_SIZE (4<<10) - -struct ec_object { - struct list_head eco_obj_chain; - struct obd_device *eco_device; - int eco_refcount; - int eco_deleted; - obd_id eco_id; - struct lov_stripe_md *eco_lsm; -}; - -struct ec_lock { - struct list_head ecl_exp_chain; - struct ec_object *ecl_object; - __u64 ecl_cookie; - struct lustre_handle ecl_lock_handle; - ldlm_policy_data_t ecl_policy; - __u32 ecl_mode; -}; - -#endif diff --git a/lustre/include/obd_lov.h b/lustre/include/obd_lov.h deleted file mode 100644 index c0f302dac2..0000000000 --- a/lustre/include/obd_lov.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _OBD_LOV_H__ -#define _OBD_LOV_H__ - -static inline int lov_stripe_md_size(int stripes) -{ - return sizeof(struct lov_stripe_md) + stripes*sizeof(struct lov_oinfo*); -} - -#define lov_mds_md_size(stripes) lov_mds_md_v1_size(stripes) -static inline int lov_mds_md_v1_size(int stripes) -{ - return sizeof(struct lov_mds_md_v1) + - stripes * sizeof(struct lov_ost_data_v1); -} - -#define IOC_LOV_TYPE 'g' -#define IOC_LOV_MIN_NR 50 -#define IOC_LOV_SET_OSC_ACTIVE _IOWR('g', 50, long) -#define IOC_LOV_MAX_NR 50 - -#define QOS_DEFAULT_THRESHOLD 10 /* MB */ -#define QOS_DEFAULT_MAXAGE 5 /* Seconds */ - -#endif diff --git a/lustre/include/obd_ost.h b/lustre/include/obd_ost.h deleted file mode 100644 index d2b399e0ce..0000000000 --- a/lustre/include/obd_ost.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * Data structures for object storage targets and client: OST & OSC's - * - * See also lustre_idl.h for wire formats of requests. - */ - -#ifndef _LUSTRE_OST_H -#define _LUSTRE_OST_H - -#include <obd_class.h> - -struct osc_brw_async_args { - struct obdo *aa_oa; - int aa_requested_nob; - int aa_nio_count; - obd_count aa_page_count; - int aa_resends; - struct brw_page **aa_ppga; - struct client_obd *aa_cli; - struct list_head aa_oaps; -}; - -struct osc_async_args { - struct obd_info *aa_oi; -}; - -struct osc_enqueue_args { - struct obd_export *oa_exp; - struct obd_info *oa_oi; - struct ldlm_enqueue_info*oa_ei; -}; - -int osc_extent_blocking_cb(struct ldlm_lock *lock, - struct ldlm_lock_desc *new, void *data, - int flag); - -#endif diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h deleted file mode 100644 index e97b58d908..0000000000 --- a/lustre/include/obd_support.h +++ /dev/null @@ -1,677 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001, 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _OBD_SUPPORT -#define _OBD_SUPPORT - -#include <libcfs/kp30.h> -#include <lvfs.h> -#include <lprocfs_status.h> -#include <lustre/lustre_idl.h> - -/* global variables */ -extern struct lprocfs_stats *obd_memory; -enum { - OBD_MEMORY_STAT = 0, - OBD_MEMORY_PAGES_STAT = 1, - OBD_STATS_NUM, -}; - -extern unsigned int obd_fail_loc; -extern unsigned int obd_fail_val; -extern unsigned int obd_debug_peer_on_timeout; -extern unsigned int obd_dump_on_timeout; -extern unsigned int obd_dump_on_eviction; -/* obd_timeout should only be used for recovery, not for - networking / disk / timings affected by load (use Adaptive Timeouts) */ -extern unsigned int obd_timeout; /* seconds */ -extern unsigned int ldlm_timeout; /* seconds */ -extern unsigned int obd_sync_filter; -extern unsigned int obd_max_dirty_pages; -extern atomic_t obd_dirty_pages; -extern cfs_waitq_t obd_race_waitq; -extern int obd_race_state; -extern unsigned int obd_alloc_fail_rate; - -/* Timeout definitions */ -#define OBD_TIMEOUT_DEFAULT 100 -#define LDLM_TIMEOUT_DEFAULT 20 -#ifdef CRAY_XT3 - #define OBD_RECOVERY_MAX_TIME (obd_timeout * 18) /* b13079 */ -#endif -/* Time to wait for all clients to reconnect during recovery */ -/* Should be very conservative; must catch the first reconnect after reboot */ -#define OBD_RECOVERY_FACTOR (3) /* times obd_timeout */ -/* Change recovery-small 26b time if you change this */ -#define PING_INTERVAL max(obd_timeout / 4, 1U) -/* Client may skip 1 ping; we must wait at least 2.5. But for multiple - * failover targets the client only pings one server at a time, and pings - * can be lost on a loaded network. Since eviction has serious consequences, - * and there's no urgent need to evict a client just because it's idle, we - * should be very conservative here. */ -#define PING_EVICT_TIMEOUT (PING_INTERVAL * 6) -#define DISK_TIMEOUT 50 /* Beyond this we warn about disk speed */ -#define CONNECTION_SWITCH_MIN 5U /* Connection switching rate limiter */ - /* Max connect interval for nonresponsive servers; ~50s to avoid building up - connect requests in the LND queues, but within obd_timeout so we don't - miss the recovery window */ -#define CONNECTION_SWITCH_MAX min(50U, max(CONNECTION_SWITCH_MIN,obd_timeout)) -#define CONNECTION_SWITCH_INC 5 /* Connection timeout backoff */ -#ifndef CRAY_XT3 -/* In general this should be low to have quick detection of a system - running on a backup server. (If it's too low, import_select_connection - will increase the timeout anyhow.) */ -#define INITIAL_CONNECT_TIMEOUT max(CONNECTION_SWITCH_MIN,obd_timeout/20) -#else -/* ...but for very large systems (e.g. CRAY) we need to keep the initial - connect t.o. high (bz 10803), because they will nearly ALWAYS be doing the - connects for the first time (clients "reboot" after every process, so no - chance to generate adaptive timeout data. */ -#define INITIAL_CONNECT_TIMEOUT max(CONNECTION_SWITCH_MIN,obd_timeout/2) -#endif -#define LONG_UNLINK 300 /* Unlink should happen before now */ - - -#define OBD_FAIL_MDS 0x100 -#define OBD_FAIL_MDS_HANDLE_UNPACK 0x101 -#define OBD_FAIL_MDS_GETATTR_NET 0x102 -#define OBD_FAIL_MDS_GETATTR_PACK 0x103 -#define OBD_FAIL_MDS_READPAGE_NET 0x104 -#define OBD_FAIL_MDS_READPAGE_PACK 0x105 -#define OBD_FAIL_MDS_SENDPAGE 0x106 -#define OBD_FAIL_MDS_REINT_NET 0x107 -#define OBD_FAIL_MDS_REINT_UNPACK 0x108 -#define OBD_FAIL_MDS_REINT_SETATTR 0x109 -#define OBD_FAIL_MDS_REINT_SETATTR_WRITE 0x10a -#define OBD_FAIL_MDS_REINT_CREATE 0x10b -#define OBD_FAIL_MDS_REINT_CREATE_WRITE 0x10c -#define OBD_FAIL_MDS_REINT_UNLINK 0x10d -#define OBD_FAIL_MDS_REINT_UNLINK_WRITE 0x10e -#define OBD_FAIL_MDS_REINT_LINK 0x10f -#define OBD_FAIL_MDS_REINT_LINK_WRITE 0x110 -#define OBD_FAIL_MDS_REINT_RENAME 0x111 -#define OBD_FAIL_MDS_REINT_RENAME_WRITE 0x112 -#define OBD_FAIL_MDS_OPEN_NET 0x113 -#define OBD_FAIL_MDS_OPEN_PACK 0x114 -#define OBD_FAIL_MDS_CLOSE_NET 0x115 -#define OBD_FAIL_MDS_CLOSE_PACK 0x116 -#define OBD_FAIL_MDS_CONNECT_NET 0x117 -#define OBD_FAIL_MDS_CONNECT_PACK 0x118 -#define OBD_FAIL_MDS_REINT_NET_REP 0x119 -#define OBD_FAIL_MDS_DISCONNECT_NET 0x11a -#define OBD_FAIL_MDS_GETSTATUS_NET 0x11b -#define OBD_FAIL_MDS_GETSTATUS_PACK 0x11c -#define OBD_FAIL_MDS_STATFS_PACK 0x11d -#define OBD_FAIL_MDS_STATFS_NET 0x11e -#define OBD_FAIL_MDS_GETATTR_NAME_NET 0x11f -#define OBD_FAIL_MDS_PIN_NET 0x120 -#define OBD_FAIL_MDS_UNPIN_NET 0x121 -#define OBD_FAIL_MDS_ALL_REPLY_NET 0x122 -#define OBD_FAIL_MDS_ALL_REQUEST_NET 0x123 -#define OBD_FAIL_MDS_SYNC_NET 0x124 -#define OBD_FAIL_MDS_SYNC_PACK 0x125 -#define OBD_FAIL_MDS_DONE_WRITING_NET 0x126 -#define OBD_FAIL_MDS_DONE_WRITING_PACK 0x127 -#define OBD_FAIL_MDS_ALLOC_OBDO 0x128 -#define OBD_FAIL_MDS_PAUSE_OPEN 0x129 -#define OBD_FAIL_MDS_STATFS_LCW_SLEEP 0x12a -#define OBD_FAIL_MDS_OPEN_CREATE 0x12b -#define OBD_FAIL_MDS_OST_SETATTR 0x12c -#define OBD_FAIL_MDS_QUOTACHECK_NET 0x12d -#define OBD_FAIL_MDS_QUOTACTL_NET 0x12e -#define OBD_FAIL_MDS_CLIENT_ADD 0x12f -#define OBD_FAIL_MDS_GETXATTR_NET 0x130 -#define OBD_FAIL_MDS_GETXATTR_PACK 0x131 -#define OBD_FAIL_MDS_SETXATTR_NET 0x132 -#define OBD_FAIL_MDS_SETXATTR 0x133 -#define OBD_FAIL_MDS_SETXATTR_WRITE 0x134 -#define OBD_FAIL_MDS_FS_SETUP 0x135 -#define OBD_FAIL_MDS_RESEND 0x136 -#define OBD_FAIL_MDS_LLOG_CREATE_FAILED 0x137 -#define OBD_FAIL_MDS_LOV_SYNC_RACE 0x138 -#define OBD_FAIL_MDS_OSC_PRECREATE 0x139 -#define OBD_FAIL_MDS_LLOG_SYNC_TIMEOUT 0x13a -#define OBD_FAIL_MDS_CLOSE_NET_REP 0x13b -#define OBD_FAIL_MDS_BLOCK_QUOTA_REQ 0x13c -#define OBD_FAIL_MDS_DROP_QUOTA_REQ 0x13d - -#define OBD_FAIL_OST 0x200 -#define OBD_FAIL_OST_CONNECT_NET 0x201 -#define OBD_FAIL_OST_DISCONNECT_NET 0x202 -#define OBD_FAIL_OST_GET_INFO_NET 0x203 -#define OBD_FAIL_OST_CREATE_NET 0x204 -#define OBD_FAIL_OST_DESTROY_NET 0x205 -#define OBD_FAIL_OST_GETATTR_NET 0x206 -#define OBD_FAIL_OST_SETATTR_NET 0x207 -#define OBD_FAIL_OST_OPEN_NET 0x208 -#define OBD_FAIL_OST_CLOSE_NET 0x209 -#define OBD_FAIL_OST_BRW_NET 0x20a -#define OBD_FAIL_OST_PUNCH_NET 0x20b -#define OBD_FAIL_OST_STATFS_NET 0x20c -#define OBD_FAIL_OST_HANDLE_UNPACK 0x20d -#define OBD_FAIL_OST_BRW_WRITE_BULK 0x20e -#define OBD_FAIL_OST_BRW_READ_BULK 0x20f -#define OBD_FAIL_OST_SYNC_NET 0x210 -#define OBD_FAIL_OST_ALL_REPLY_NET 0x211 -#define OBD_FAIL_OST_ALL_REQUEST_NET 0x212 -#define OBD_FAIL_OST_LDLM_REPLY_NET 0x213 -#define OBD_FAIL_OST_BRW_PAUSE_BULK 0x214 -#define OBD_FAIL_OST_ENOSPC 0x215 -#define OBD_FAIL_OST_EROFS 0x216 -#define OBD_FAIL_OST_ENOENT 0x217 -#define OBD_FAIL_OST_QUOTACHECK_NET 0x218 -#define OBD_FAIL_OST_QUOTACTL_NET 0x219 -#define OBD_FAIL_OST_CHECKSUM_RECEIVE 0x21a -#define OBD_FAIL_OST_CHECKSUM_SEND 0x21b -#define OBD_FAIL_OST_BRW_SIZE 0x21c -#define OBD_FAIL_OST_DROP_REQ 0x21d -#define OBD_FAIL_OST_SETATTR_CREDITS 0x21e -#define OBD_FAIL_OST_HOLD_WRITE_RPC 0x21f -#define OBD_FAIL_OST_BRW_WRITE_BULK2 0x220 -#define OBD_FAIL_OST_LLOG_RECOVERY_TIMEOUT 0x221 -#define OBD_FAIL_OST_CANCEL_COOKIE_TIMEOUT 0x222 -#define OBD_FAIL_OST_PAUSE_CREATE 0x223 -#define OBD_FAIL_OST_BRW_PAUSE_PACK 0x224 -#define OBD_FAIL_OST_CONNECT_NET2 0x225 - -#define OBD_FAIL_LDLM 0x300 -#define OBD_FAIL_LDLM_NAMESPACE_NEW 0x301 -#define OBD_FAIL_LDLM_ENQUEUE 0x302 -#define OBD_FAIL_LDLM_CONVERT 0x303 -#define OBD_FAIL_LDLM_CANCEL 0x304 -#define OBD_FAIL_LDLM_BL_CALLBACK 0x305 -#define OBD_FAIL_LDLM_CP_CALLBACK 0x306 -#define OBD_FAIL_LDLM_GL_CALLBACK 0x307 -#define OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR 0x308 -#define OBD_FAIL_LDLM_ENQUEUE_INTENT_ERR 0x309 -#define OBD_FAIL_LDLM_CREATE_RESOURCE 0x30a -#define OBD_FAIL_LDLM_ENQUEUE_BLOCKED 0x30b -#define OBD_FAIL_LDLM_REPLY 0x30c -#define OBD_FAIL_LDLM_RECOV_CLIENTS 0x30d -#define OBD_FAIL_LDLM_ENQUEUE_OLD_EXPORT 0x30e -#define OBD_FAIL_LDLM_GLIMPSE 0x30f -#define OBD_FAIL_LDLM_CANCEL_RACE 0x310 -#define OBD_FAIL_LDLM_CANCEL_EVICT_RACE 0x311 -#define OBD_FAIL_LDLM_PAUSE_CANCEL 0x312 -#define OBD_FAIL_LDLM_CLOSE_THREAD 0x313 -#define OBD_FAIL_LDLM_CANCEL_BL_CB_RACE 0x314 - -#define OBD_FAIL_OSC 0x400 -#define OBD_FAIL_OSC_BRW_READ_BULK 0x401 -#define OBD_FAIL_OSC_BRW_WRITE_BULK 0x402 -#define OBD_FAIL_OSC_LOCK_BL_AST 0x403 -#define OBD_FAIL_OSC_LOCK_CP_AST 0x404 -#define OBD_FAIL_OSC_MATCH 0x405 -#define OBD_FAIL_OSC_BRW_PREP_REQ 0x406 -#define OBD_FAIL_OSC_SHUTDOWN 0x407 -#define OBD_FAIL_OSC_CHECKSUM_RECEIVE 0x408 -#define OBD_FAIL_OSC_CHECKSUM_SEND 0x409 -#define OBD_FAIL_OSC_BRW_PREP_REQ2 0x40a -#define OBD_FAIL_OSC_CONNECT_CKSUM 0x40b -#define OBD_FAIL_OSC_CKSUM_ADLER_ONLY 0x40c - -#define OBD_FAIL_PTLRPC 0x500 -#define OBD_FAIL_PTLRPC_ACK 0x501 -#define OBD_FAIL_PTLRPC_RQBD 0x502 -#define OBD_FAIL_PTLRPC_BULK_GET_NET 0x503 -#define OBD_FAIL_PTLRPC_BULK_PUT_NET 0x504 -#define OBD_FAIL_PTLRPC_DROP_RPC 0x505 -#define OBD_FAIL_PTLRPC_DELAY_SEND 0x506 -#define OBD_FAIL_PTLRPC_DELAY_RECOV 0x507 -#define OBD_FAIL_PTLRPC_CLIENT_BULK_CB 0x508 -#define OBD_FAIL_PTLRPC_PAUSE_REQ 0x50a -#define OBD_FAIL_PTLRPC_PAUSE_REP 0x50c - -#define OBD_FAIL_OBD_PING_NET 0x600 -#define OBD_FAIL_OBD_LOG_CANCEL_NET 0x601 -#define OBD_FAIL_OBD_LOGD_NET 0x602 -#define OBD_FAIL_OBD_QC_CALLBACK_NET 0x603 -#define OBD_FAIL_OBD_DQACQ 0x604 - -#define OBD_FAIL_TGT_REPLY_NET 0x700 -#define OBD_FAIL_TGT_CONN_RACE 0x701 -#define OBD_FAIL_TGT_FORCE_RECONNECT 0x702 -#define OBD_FAIL_TGT_DELAY_CONNECT 0x703 -#define OBD_FAIL_TGT_DELAY_RECONNECT 0x704 -#define OBD_FAIL_TGT_DELAY_PRECREATE 0x705 - -#define OBD_FAIL_MDC_REVALIDATE_PAUSE 0x800 -#define OBD_FAIL_MDC_ENQUEUE_PAUSE 0x801 -#define OBD_FAIL_MDC_OLD_EXT_FLAGS 0x802 -#define OBD_FAIL_MDC_GETATTR_ENQUEUE 0x803 - -#define OBD_FAIL_MGS 0x900 -#define OBD_FAIL_MGS_ALL_REQUEST_NET 0x901 -#define OBD_FAIL_MGS_ALL_REPLY_NET 0x902 -#define OBD_FAIL_MGC_PAUSE_PROCESS_LOG 0x903 -#define OBD_FAIL_MGS_PAUSE_REQ 0x904 -#define OBD_FAIL_MGS_PAUSE_TARGET_REG 0x905 - -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0) -#define OBD_FAIL_QUOTA_QD_COUNT_32BIT 0xA00 -#else -#warning "remove quota code above for format obsolete in new release" -#endif -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0) -#define OBD_FAIL_QUOTA_WITHOUT_CHANGE_QS 0xA01 -#else -#warning "remove quota code above for format obsolete in new release" -#endif - -#define OBD_FAIL_QUOTA_RET_QDATA 0xA02 - -#define OBD_FAIL_LPROC_REMOVE 0xB00 - -#define OBD_FAIL_GENERAL_ALLOC 0xC00 - -/* Failure injection control */ -#define OBD_FAIL_MASK_SYS 0x0000FF00 -#define OBD_FAIL_MASK_LOC (0x000000FF | OBD_FAIL_MASK_SYS) -#define OBD_FAIL_ONCE 0x80000000 -#define OBD_FAILED 0x40000000 -/* The following flags aren't made to be combined */ -#define OBD_FAIL_SKIP 0x20000000 /* skip N then fail */ -#define OBD_FAIL_SOME 0x10000000 /* fail N times */ -#define OBD_FAIL_RAND 0x08000000 /* fail 1/N of the time */ -#define OBD_FAIL_USR1 0x04000000 /* user flag */ - -int obd_fail_check(__u32 id); -#define OBD_FAIL_CHECK(id) \ -({ \ - int _ret_ = 0; \ - if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) { \ - CERROR("*** obd_fail_loc=%x ***\n", id); \ - } \ - _ret_; \ -}) - -#define OBD_FAIL_CHECK_QUIET(id) \ - (unlikely(obd_fail_loc) ? obd_fail_check(id) : 0) - -/* deprecated - just use OBD_FAIL_CHECK */ -#define OBD_FAIL_CHECK_ONCE OBD_FAIL_CHECK - -#define OBD_FAIL_RETURN(id, ret) \ -do { \ - if (unlikely(obd_fail_loc && obd_fail_check(id))) { \ - CERROR("*** obd_fail_return=%x rc=%d ***\n", id, ret); \ - RETURN(ret); \ - } \ -} while(0) - -#define OBD_FAIL_TIMEOUT(id, secs) \ -({ int _ret_ = 0; \ - if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) { \ - CERROR("obd_fail_timeout id %x sleeping for %d secs\n", \ - (id), (secs)); \ - set_current_state(TASK_UNINTERRUPTIBLE); \ - cfs_schedule_timeout(CFS_TASK_UNINT, \ - cfs_time_seconds(secs)); \ - set_current_state(TASK_RUNNING); \ - CERROR("obd_fail_timeout id %x awake\n", (id)); \ - } \ - _ret_; \ -}) - -#define OBD_FAIL_TIMEOUT_MS(id, ms) \ -({ int _ret_ = 0; \ - if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) { \ - CERROR("obd_fail_timeout id %x sleeping for %d ms\n", \ - (id), (ms)); \ - set_current_state(TASK_UNINTERRUPTIBLE); \ - cfs_schedule_timeout(CFS_TASK_UNINT, \ - cfs_time_seconds(ms)/1000); \ - set_current_state(TASK_RUNNING); \ - CERROR("obd_fail_timeout id %x awake\n", (id)); \ - } \ - _ret_; \ -}) - -#ifdef __KERNEL__ -/* The idea here is to synchronise two threads to force a race. The - * first thread that calls this with a matching fail_loc is put to - * sleep. The next thread that calls with the same fail_loc wakes up - * the first and continues. */ -#define OBD_RACE(id) \ -do { \ - if (unlikely(obd_fail_loc && obd_fail_check(id))) { \ - obd_race_state = 0; \ - CERROR("obd_race id %x sleeping\n", (id)); \ - OBD_SLEEP_ON(obd_race_waitq, obd_race_state != 0); \ - CERROR("obd_fail_race id %x awake\n", (id)); \ - } else if ((obd_fail_loc & OBD_FAIL_MASK_LOC) == \ - ((id) & OBD_FAIL_MASK_LOC)) { \ - CERROR("obd_fail_race id %x waking\n", (id)); \ - obd_race_state = 1; \ - wake_up(&obd_race_waitq); \ - } \ -} while(0) -#else -/* sigh. an expedient fix until OBD_RACE is fixed up */ -#define OBD_RACE(foo) do {} while(0) -#endif - -#define fixme() CDEBUG(D_OTHER, "FIXME\n"); - -extern atomic_t libcfs_kmemory; - -#ifdef RANDOM_FAIL_ALLOC -#define HAS_FAIL_ALLOC_FLAG OBD_FAIL_CHECK_QUIET(OBD_FAIL_GENERAL_ALLOC) -#else -#define HAS_FAIL_ALLOC_FLAG 0 -#endif - -#define OBD_ALLOC_FAIL_BITS 24 -#define OBD_ALLOC_FAIL_MASK ((1 << OBD_ALLOC_FAIL_BITS) - 1) -#define OBD_ALLOC_FAIL_MULT (OBD_ALLOC_FAIL_MASK / 100) - -#ifdef LPROCFS -#define obd_memory_add(size) \ - lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size)) -#define obd_memory_sub(size) \ - lprocfs_counter_sub(obd_memory, OBD_MEMORY_STAT, (long)(size)) -#define obd_memory_sum() \ - lprocfs_stats_collector(obd_memory, OBD_MEMORY_STAT, \ - LPROCFS_FIELDS_FLAGS_SUM) -#define obd_pages_add(order) \ - lprocfs_counter_add(obd_memory, OBD_MEMORY_PAGES_STAT, \ - (long)(1 << (order))) -#define obd_pages_sub(order) \ - lprocfs_counter_sub(obd_memory, OBD_MEMORY_PAGES_STAT, \ - (long)(1 << (order))) -#define obd_pages_sum() \ - lprocfs_stats_collector(obd_memory, OBD_MEMORY_PAGES_STAT, \ - LPROCFS_FIELDS_FLAGS_SUM) - -extern void obd_update_maxusage(void); -extern __u64 obd_memory_max(void); -extern __u64 obd_pages_max(void); - -#else - -extern __u64 obd_alloc; -extern __u64 obd_pages; - -extern __u64 obd_max_alloc; -extern __u64 obd_max_pages; - -static inline void obd_memory_add(long size) -{ - obd_alloc += size; - if (obd_alloc > obd_max_alloc) - obd_max_alloc = obd_alloc; -} - -static inline void obd_memory_sub(long size) -{ - obd_alloc -= size; -} - -static inline void obd_pages_add(int order) -{ - obd_pages += 1<< order; - if (obd_pages > obd_max_pages) - obd_max_pages = obd_pages; -} - -static inline void obd_pages_sub(int order) -{ - obd_pages -= 1<< order; -} - -#define obd_memory_sum() (obd_alloc) -#define obd_pages_sum() (obd_pages) - -#define obd_memory_max() (obd_max_alloc) -#define obd_pages_max() (obd_max_pages) - -#endif - -#if defined(LUSTRE_UTILS) /* this version is for utils only */ -#define OBD_ALLOC_GFP(ptr, size, gfp_mask) \ -do { \ - (ptr) = cfs_alloc(size, (gfp_mask)); \ - if (unlikely((ptr) == NULL)) { \ - CERROR("kmalloc of '" #ptr "' (%d bytes) failed\n", \ - (int)(size)); \ - } else { \ - memset(ptr, 0, size); \ - CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %d at %p\n", \ - (int)(size), ptr); \ - } \ -} while (0) -#else /* this version is for the kernel and liblustre */ -#define OBD_FREE_RTN0(ptr) \ -({ \ - cfs_free(ptr); \ - (ptr) = NULL; \ - 0; \ -}) -#define OBD_ALLOC_GFP(ptr, size, gfp_mask) \ -do { \ - (ptr) = cfs_alloc(size, (gfp_mask)); \ - if (likely((ptr) != NULL && \ - (!HAS_FAIL_ALLOC_FLAG || obd_alloc_fail_rate == 0 || \ - !obd_alloc_fail(ptr, #ptr, "km", size, \ - __FILE__, __LINE__) || \ - OBD_FREE_RTN0(ptr)))){ \ - memset(ptr, 0, size); \ - obd_memory_add(size); \ - CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %d at %p.\n", \ - (int)(size), ptr); \ - } \ -} while (0) -#endif - -#ifndef OBD_ALLOC_MASK -# define OBD_ALLOC_MASK CFS_ALLOC_IO -#endif - -#define OBD_ALLOC(ptr, size) OBD_ALLOC_GFP(ptr, size, OBD_ALLOC_MASK) -#define OBD_ALLOC_WAIT(ptr, size) OBD_ALLOC_GFP(ptr, size, CFS_ALLOC_STD) -#define OBD_ALLOC_PTR(ptr) OBD_ALLOC(ptr, sizeof *(ptr)) -#define OBD_ALLOC_PTR_WAIT(ptr) OBD_ALLOC_WAIT(ptr, sizeof *(ptr)) - -#ifdef __arch_um__ -# define OBD_VMALLOC(ptr, size) OBD_ALLOC(ptr, size) -#else -# define OBD_VMALLOC(ptr, size) \ -do { \ - (ptr) = cfs_alloc_large(size); \ - if (unlikely((ptr) == NULL)) { \ - CERROR("vmalloc of '" #ptr "' (%d bytes) failed\n", \ - (int)(size)); \ - CERROR(LPU64" total bytes allocated by Lustre, %d by LNET\n", \ - obd_memory_sum(), atomic_read(&libcfs_kmemory)); \ - } else { \ - memset(ptr, 0, size); \ - obd_memory_add(size); \ - CDEBUG(D_MALLOC, "vmalloced '" #ptr "': %d at %p.\n", \ - (int)(size), ptr); \ - } \ -} while (0) -#endif - -#ifdef CONFIG_DEBUG_SLAB -#define POISON(ptr, c, s) do {} while (0) -#else -#define POISON(ptr, c, s) memset(ptr, c, s) -#endif - -#ifdef POISON_BULK -#define POISON_PAGE(page, val) do { memset(kmap(page), val, CFS_PAGE_SIZE); \ - kunmap(page); } while (0) -#else -#define POISON_PAGE(page, val) do { } while (0) -#endif - -#ifdef __KERNEL__ -#define OBD_FREE(ptr, size) \ -do { \ - LASSERT(ptr); \ - obd_memory_sub(size); \ - CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p.\n", \ - (int)(size), ptr); \ - POISON(ptr, 0x5a, size); \ - cfs_free(ptr); \ - (ptr) = (void *)0xdeadbeef; \ -} while (0) - -#ifdef HAVE_RCU -# ifdef HAVE_CALL_RCU_PARAM -# define my_call_rcu(rcu, cb) call_rcu(rcu, cb, rcu) -# else -# define my_call_rcu(rcu, cb) call_rcu(rcu, cb) -# endif -#else -# define my_call_rcu(rcu, cb) (cb)(rcu) -#endif - -#define OBD_FREE_RCU_CB(ptr, size, handle, free_cb) \ -do { \ - struct portals_handle *__h = (handle); \ - LASSERT(handle); \ - __h->h_ptr = (ptr); \ - __h->h_size = (size); \ - __h->h_free_cb = (void (*)(void *, size_t))(free_cb); \ - my_call_rcu(&__h->h_rcu, class_handle_free_cb); \ - (ptr) = (void *)0xdeadbeef; \ -} while(0) -#define OBD_FREE_RCU(ptr, size, handle) OBD_FREE_RCU_CB(ptr, size, handle, NULL) -#else -#define OBD_FREE(ptr, size) ((void)(size), free((ptr))) -#define OBD_FREE_RCU(ptr, size, handle) (OBD_FREE(ptr, size)) -#define OBD_FREE_RCU_CB(ptr, size, handle, cb) ((*(cb))(ptr, size)) -#endif - -#ifdef __arch_um__ -# define OBD_VFREE(ptr, size) OBD_FREE(ptr, size) -#else -# define OBD_VFREE(ptr, size) \ -do { \ - LASSERT(ptr); \ - obd_memory_sub(size); \ - CDEBUG(D_MALLOC, "vfreed '" #ptr "': %d at %p.\n", \ - (int)(size), ptr); \ - POISON(ptr, 0x5a, size); \ - cfs_free_large(ptr); \ - (ptr) = (void *)0xdeadbeef; \ -} while (0) -#endif - -/* we memset() the slab object to 0 when allocation succeeds, so DO NOT - * HAVE A CTOR THAT DOES ANYTHING. its work will be cleared here. we'd - * love to assert on that, but slab.c keeps kmem_cache_s all to itself. */ -#define OBD_SLAB_FREE_RTN0(ptr, slab) \ -({ \ - cfs_mem_cache_free((slab), (ptr)); \ - (ptr) = NULL; \ - 0; \ -}) -#define OBD_SLAB_ALLOC(ptr, slab, type, size) \ -do { \ - LASSERT(!in_interrupt()); \ - (ptr) = cfs_mem_cache_alloc(slab, (type)); \ - if (likely((ptr) != NULL && \ - (!HAS_FAIL_ALLOC_FLAG || obd_alloc_fail_rate == 0 || \ - !obd_alloc_fail(ptr, #ptr, "slab-", size, \ - __FILE__, __LINE__) || \ - OBD_SLAB_FREE_RTN0(ptr, slab)))) { \ - memset(ptr, 0, size); \ - obd_memory_add(size); \ - CDEBUG(D_MALLOC, "slab-alloced '"#ptr"': %d at %p.\n", \ - (int)(size), ptr); \ - } \ -} while (0) - -#define OBD_FREE_PTR(ptr) OBD_FREE(ptr, sizeof *(ptr)) - -#define OBD_SLAB_FREE(ptr, slab, size) \ -do { \ - LASSERT(ptr); \ - CDEBUG(D_MALLOC, "slab-freed '" #ptr "': %d at %p.\n", \ - (int)(size), ptr); \ - obd_memory_sub(size); \ - POISON(ptr, 0x5a, size); \ - cfs_mem_cache_free(slab, ptr); \ - (ptr) = (void *)0xdeadbeef; \ -} while (0) - -#define OBD_SLAB_ALLOC_PTR(ptr, slab) \ - OBD_SLAB_ALLOC((ptr), (slab), CFS_ALLOC_STD, sizeof *(ptr)) -#define OBD_SLAB_FREE_PTR(ptr, slab) \ - OBD_SLAB_FREE((ptr), (slab), sizeof *(ptr)) - -#define KEY_IS(str) (keylen >= strlen(str) && strcmp(key, str) == 0) - -/* Wrapper for contiguous page frame allocation */ -#define OBD_PAGES_ALLOC(ptr, order, gfp_mask) \ -do { \ - (ptr) = cfs_alloc_pages(gfp_mask, order); \ - if (unlikely((ptr) == NULL)) { \ - CERROR("alloc_pages of '" #ptr "' %d page(s) / "LPU64" bytes "\ - "failed\n", (int)(1 << (order)), \ - (__u64)((1 << (order)) << CFS_PAGE_SHIFT)); \ - CERROR(LPU64" total bytes and "LPU64" total pages " \ - "("LPU64" bytes) allocated by Lustre, " \ - "%d total bytes by LNET\n", \ - obd_memory_sum(), \ - obd_pages_sum() << CFS_PAGE_SHIFT, \ - obd_pages_sum(), \ - atomic_read(&libcfs_kmemory)); \ - } else { \ - obd_pages_add(order); \ - CDEBUG(D_MALLOC, "alloc_pages '" #ptr "': %d page(s) / " \ - LPU64" bytes at %p.\n", \ - (int)(1 << (order)), \ - (__u64)((1 << (order)) << CFS_PAGE_SHIFT), ptr); \ - } \ -} while (0) - -#define OBD_PAGE_ALLOC(ptr, gfp_mask) \ - OBD_PAGES_ALLOC(ptr, 0, gfp_mask) - -#define OBD_PAGES_FREE(ptr, order) \ -do { \ - LASSERT(ptr); \ - obd_pages_sub(order); \ - CDEBUG(D_MALLOC, "free_pages '" #ptr "': %d page(s) / "LPU64" bytes " \ - "at %p.\n", \ - (int)(1 << (order)), (__u64)((1 << (order)) << CFS_PAGE_SHIFT),\ - ptr); \ - __cfs_free_pages(ptr, order); \ - (ptr) = (void *)0xdeadbeef; \ -} while (0) - -#define OBD_PAGE_FREE(ptr) OBD_PAGES_FREE(ptr, 0) - -#if defined(__linux__) -#include <linux/obd_support.h> -#elif defined(__APPLE__) -#include <darwin/obd_support.h> -#elif defined(__WINNT__) -#include <winnt/obd_support.h> -#else -#error Unsupported operating system. -#endif - -#endif diff --git a/lustre/kernel-tests/.cvsignore b/lustre/kernel-tests/.cvsignore deleted file mode 100644 index 124a277173..0000000000 --- a/lustre/kernel-tests/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.cmd -.*.flags -*.ko -*.c -.tmp_versions diff --git a/lustre/kernel-tests/Makefile b/lustre/kernel-tests/Makefile deleted file mode 100644 index 73609356f2..0000000000 --- a/lustre/kernel-tests/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -ifeq ($(PATCHLEVEL),) - -ifneq ($(LUSTRE_LINUX_CONFIG),) -include $(LUSTRE_LINUX_CONFIG) -endif -include Makefile - -else - -ifneq ($(LUSTRE_KERNEL_TEST),) -ifeq ($(PATCHLEVEL),4) -all: $(LUSTRE_KERNEL_TEST) -else -extra-y = $(LUSTRE_KERNEL_TEST) -endif -endif - -obj-m := conftest.o - -ifeq ($(PATCHLEVEL),4) -include $(TOPDIR)/Rules.make -endif - -endif diff --git a/lustre/kernel_patches/LICENSE b/lustre/kernel_patches/LICENSE deleted file mode 100644 index dd7f676fdc..0000000000 --- a/lustre/kernel_patches/LICENSE +++ /dev/null @@ -1,359 +0,0 @@ -All files in this subtree are licensed under the terms and conditions -of the GNU General Public License version 2. - -Reproduced below is the GPL v2, and Linus's clarifying statement from -the Linux kernel source code: - ----------------------------------------- - - NOTE! This copyright does *not* cover user programs that use kernel - services by normal system calls - this is merely considered normal use - of the kernel, and does *not* fall under the heading of "derived work". - Also note that the GPL below is copyrighted by the Free Software - Foundation, but the instance of code that it refers to (the Linux - kernel) is copyrighted by me and others who actually wrote it. - - Linus Torvalds - ----------------------------------------- - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/lustre/kernel_patches/README b/lustre/kernel_patches/README deleted file mode 100644 index 7899f24c4c..0000000000 --- a/lustre/kernel_patches/README +++ /dev/null @@ -1,3 +0,0 @@ -The Linux kernel patches for Lustre. -See https://mail.clusterfs.com/wikis/lustre/LustreHowto for information on -how to patch your kernel. diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686-smp.config deleted file mode 100644 index 8b2043a383..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686-smp.config +++ /dev/null @@ -1,1598 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-prep -# Wed May 31 10:45:28 2006 -# -CONFIG_X86_32=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -# CONFIG_CPUSETS is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -CONFIG_MPENTIUM4=y -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_SMP=y -# CONFIG_SMP_ALTERNATIVES is not set -CONFIG_NR_CPUS=32 -# CONFIG_SCHED_SMT is not set -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -# CONFIG_X86_MCE_P4THERMAL is not set -# CONFIG_TOSHIBA is not set -# CONFIG_I8K is not set -# CONFIG_X86_REBOOTFIXUPS is not set -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set -# CONFIG_SWIOTLB is not set - -# -# Firmware Drivers -# -# CONFIG_EDD is not set -# CONFIG_DELL_RBU is not set -# CONFIG_DCDBAS is not set -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -CONFIG_IRQBALANCE=y -# CONFIG_REGPARM is not set -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -# CONFIG_HOTPLUG_CPU is not set -CONFIG_DOUBLEFAULT=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=y -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_ASUS=m -# CONFIG_ACPI_IBM is not set -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -# CONFIG_ACPI_CONTAINER is not set - -# -# APM (Advanced Power Management) BIOS Support -# -# CONFIG_APM is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set -CONFIG_TUX=y - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_DISKDUMP is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -# CONFIG_BLK_DEV_CS5535 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -CONFIG_LANCE=m -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_AC3200 is not set -# CONFIG_APRICOT is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_INPORT is not set -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -# CONFIG_INPUT_WISTRON_BTNS is not set -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_ESPSERIAL is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -# CONFIG_IBMASR is not set -CONFIG_WAFER_WDT=m -# CONFIG_I6300ESB_WDT is not set -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -# CONFIG_W83977F_WDT is not set -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -# CONFIG_MIXCOMWD is not set -CONFIG_WDT=m -# CONFIG_WDT_501 is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_SONYPI is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -# CONFIG_DRM is not set -# CONFIG_MWAVE is not set -# CONFIG_CS5535_GPIO is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_HDAPS is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I810 is not set -# CONFIG_FB_INTEL is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_CYBLA is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -# CONFIG_EDAC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -# CONFIG_DEBUG_SLAB_LEAK is not set -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_DELAY is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_AES_586 is not set -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -# CONFIG_CRYPTO_SIGNATURE is not set -# CONFIG_CRYPTO_MPILIB is not set - -# -# Hardware crypto devices -# -# CONFIG_CRYPTO_DEV_PADLOCK is not set - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_X86_SYSENTER=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686.config deleted file mode 100644 index 691606a4e6..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686.config +++ /dev/null @@ -1,1591 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-prep -# Wed May 31 14:11:18 2006 -# -CONFIG_X86_32=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_LBD=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -CONFIG_MPENTIUM4=y -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -# CONFIG_SMP is not set -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -# CONFIG_X86_UP_APIC is not set -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -# CONFIG_TOSHIBA is not set -# CONFIG_I8K is not set -# CONFIG_X86_REBOOTFIXUPS is not set -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set -# CONFIG_SWIOTLB is not set - -# -# Firmware Drivers -# -# CONFIG_EDD is not set -# CONFIG_DELL_RBU is not set -# CONFIG_DCDBAS is not set -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -# CONFIG_REGPARM is not set -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_DOUBLEFAULT=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_SOFTWARE_SUSPEND is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=y -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_ASUS=m -# CONFIG_ACPI_IBM is not set -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -# CONFIG_ACPI_CONTAINER is not set - -# -# APM (Advanced Power Management) BIOS Support -# -# CONFIG_APM is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCIEPORTBUS is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set -CONFIG_TUX=y - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_DISKDUMP is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -# CONFIG_BLK_DEV_CS5535 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -CONFIG_LANCE=m -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_AC3200 is not set -# CONFIG_APRICOT is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_INPORT is not set -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -# CONFIG_INPUT_WISTRON_BTNS is not set -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_ESPSERIAL is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -CONFIG_STALDRV=y -# CONFIG_STALLION is not set -# CONFIG_ISTALLION is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -# CONFIG_IBMASR is not set -CONFIG_WAFER_WDT=m -# CONFIG_I6300ESB_WDT is not set -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -# CONFIG_W83977F_WDT is not set -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -# CONFIG_MIXCOMWD is not set -CONFIG_WDT=m -# CONFIG_WDT_501 is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_SONYPI is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -# CONFIG_DRM is not set -# CONFIG_MWAVE is not set -# CONFIG_CS5535_GPIO is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_ELEKTOR is not set -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_HDAPS is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I810 is not set -# CONFIG_FB_INTEL is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_CYBLA is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -# CONFIG_EDAC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -# CONFIG_DEBUG_SLAB_LEAK is not set -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_DELAY is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_AES_586 is not set -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -# CONFIG_CRYPTO_SIGNATURE is not set -# CONFIG_CRYPTO_MPILIB is not set - -# -# Hardware crypto devices -# -# CONFIG_CRYPTO_DEV_PADLOCK is not set - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_SYSENTER=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-fc5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.15-fc5-i686.config deleted file mode 100644 index 8b2043a383..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-fc5-i686.config +++ /dev/null @@ -1,1598 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-prep -# Wed May 31 10:45:28 2006 -# -CONFIG_X86_32=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -# CONFIG_CPUSETS is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -CONFIG_MPENTIUM4=y -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_SMP=y -# CONFIG_SMP_ALTERNATIVES is not set -CONFIG_NR_CPUS=32 -# CONFIG_SCHED_SMT is not set -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -# CONFIG_X86_MCE_P4THERMAL is not set -# CONFIG_TOSHIBA is not set -# CONFIG_I8K is not set -# CONFIG_X86_REBOOTFIXUPS is not set -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set -# CONFIG_SWIOTLB is not set - -# -# Firmware Drivers -# -# CONFIG_EDD is not set -# CONFIG_DELL_RBU is not set -# CONFIG_DCDBAS is not set -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -CONFIG_IRQBALANCE=y -# CONFIG_REGPARM is not set -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -# CONFIG_HOTPLUG_CPU is not set -CONFIG_DOUBLEFAULT=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=y -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_ASUS=m -# CONFIG_ACPI_IBM is not set -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -# CONFIG_ACPI_CONTAINER is not set - -# -# APM (Advanced Power Management) BIOS Support -# -# CONFIG_APM is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set -CONFIG_TUX=y - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_DISKDUMP is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -# CONFIG_BLK_DEV_CS5535 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -CONFIG_LANCE=m -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_AC3200 is not set -# CONFIG_APRICOT is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_INPORT is not set -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -# CONFIG_INPUT_WISTRON_BTNS is not set -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_ESPSERIAL is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -# CONFIG_IBMASR is not set -CONFIG_WAFER_WDT=m -# CONFIG_I6300ESB_WDT is not set -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -# CONFIG_W83977F_WDT is not set -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -# CONFIG_MIXCOMWD is not set -CONFIG_WDT=m -# CONFIG_WDT_501 is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_SONYPI is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -# CONFIG_DRM is not set -# CONFIG_MWAVE is not set -# CONFIG_CS5535_GPIO is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_HDAPS is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I810 is not set -# CONFIG_FB_INTEL is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_CYBLA is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -# CONFIG_EDAC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -# CONFIG_DEBUG_SLAB_LEAK is not set -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_DELAY is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_AES_586 is not set -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -# CONFIG_CRYPTO_SIGNATURE is not set -# CONFIG_CRYPTO_MPILIB is not set - -# -# Hardware crypto devices -# -# CONFIG_CRYPTO_DEV_PADLOCK is not set - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_X86_SYSENTER=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686-smp.config deleted file mode 100644 index 86afdbbd2e..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686-smp.config +++ /dev/null @@ -1,1620 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.22 -# Thu Jan 25 23:54:30 2007 -# -CONFIG_X86_32=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -# CONFIG_CPUSETS is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_SMP=y -CONFIG_NR_CPUS=32 -# CONFIG_SCHED_SMT is not set -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -# CONFIG_X86_MCE_P4THERMAL is not set -# CONFIG_TOSHIBA is not set -# CONFIG_I8K is not set -# CONFIG_X86_REBOOTFIXUPS is not set -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set - -# -# Firmware Drivers -# -# CONFIG_EDD is not set -# CONFIG_DELL_RBU is not set -# CONFIG_DCDBAS is not set -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -CONFIG_IRQBALANCE=y -# CONFIG_REGPARM is not set -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -# CONFIG_HOTPLUG_CPU is not set -CONFIG_DOUBLEFAULT=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=y -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_ASUS=m -# CONFIG_ACPI_IBM is not set -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -# CONFIG_ACPI_CONTAINER is not set - -# -# APM (Advanced Power Management) BIOS Support -# -# CONFIG_APM is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -# CONFIG_BLK_DEV_CS5535 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -# CONFIG_CASSINI is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_EL1=m -CONFIG_EL2=m -CONFIG_ELPLUS=m -CONFIG_EL16=m -CONFIG_EL3=m -CONFIG_3C515=m -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -# CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -CONFIG_WD80x3=m -CONFIG_ULTRA=m -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -CONFIG_NI52=m -CONFIG_NI65=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -# CONFIG_TULIP_NAPI_HW_MITIGATION is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -CONFIG_HP100=m -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -# CONFIG_AC3200 is not set -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -# CONFIG_DL2K is not set -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_INPORT is not set -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -# CONFIG_INPUT_WISTRON_BTNS is not set -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_ESPSERIAL is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -# CONFIG_IBMASR is not set -CONFIG_WAFER_WDT=m -# CONFIG_I6300ESB_WDT is not set -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -# CONFIG_W83977F_WDT is not set -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -# CONFIG_MIXCOMWD is not set -CONFIG_WDT=m -# CONFIG_WDT_501 is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_SONYPI is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -# CONFIG_DRM is not set -# CONFIG_MWAVE is not set -# CONFIG_CS5535_GPIO is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_HDAPS is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I810 is not set -# CONFIG_FB_INTEL is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_CYBLA is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -# CONFIG_EDAC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_CIFS_EXPERIMENTAL=y -CONFIG_CIFS_UPCALL=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# -# CONFIG_CRYPTO_DEV_PADLOCK is not set - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686.config deleted file mode 100644 index d71fd23d54..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686.config +++ /dev/null @@ -1,1616 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.22 -# Thu Jan 25 23:53:17 2007 -# -CONFIG_X86_32=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_LBD=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -# CONFIG_SMP is not set -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -# CONFIG_X86_UP_APIC is not set -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -# CONFIG_TOSHIBA is not set -# CONFIG_I8K is not set -# CONFIG_X86_REBOOTFIXUPS is not set -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set - -# -# Firmware Drivers -# -# CONFIG_EDD is not set -# CONFIG_DELL_RBU is not set -# CONFIG_DCDBAS is not set -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -# CONFIG_REGPARM is not set -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_DOUBLEFAULT=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_SOFTWARE_SUSPEND is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=y -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_ASUS=m -# CONFIG_ACPI_IBM is not set -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -# CONFIG_ACPI_CONTAINER is not set - -# -# APM (Advanced Power Management) BIOS Support -# -# CONFIG_APM is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCIEPORTBUS is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -# CONFIG_BLK_DEV_CS5535 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -# CONFIG_CASSINI is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_EL1=m -CONFIG_EL2=m -CONFIG_ELPLUS=m -CONFIG_EL16=m -CONFIG_EL3=m -CONFIG_3C515=m -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -# CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -CONFIG_WD80x3=m -CONFIG_ULTRA=m -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -CONFIG_NI5010=m -CONFIG_NI52=m -CONFIG_NI65=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -# CONFIG_TULIP_NAPI_HW_MITIGATION is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -CONFIG_HP100=m -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -# CONFIG_AC3200 is not set -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -# CONFIG_DL2K is not set -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_INPORT is not set -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -# CONFIG_INPUT_WISTRON_BTNS is not set -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_ESPSERIAL is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -CONFIG_RIO=m -# CONFIG_RIO_OLDPCI is not set -CONFIG_STALDRV=y -CONFIG_STALLION=m -CONFIG_ISTALLION=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -# CONFIG_IBMASR is not set -CONFIG_WAFER_WDT=m -# CONFIG_I6300ESB_WDT is not set -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -# CONFIG_W83977F_WDT is not set -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -# CONFIG_MIXCOMWD is not set -CONFIG_WDT=m -# CONFIG_WDT_501 is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_SONYPI is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -# CONFIG_DRM is not set -# CONFIG_MWAVE is not set -# CONFIG_CS5535_GPIO is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_ELEKTOR is not set -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_HDAPS is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I810 is not set -# CONFIG_FB_INTEL is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_CYBLA is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -# CONFIG_EDAC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_CIFS_EXPERIMENTAL=y -CONFIG_CIFS_UPCALL=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# -# CONFIG_CRYPTO_DEV_PADLOCK is not set - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64-smp.config deleted file mode 100644 index 7d8d068c67..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64-smp.config +++ /dev/null @@ -1,1422 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.22 -# Thu Jan 25 23:51:07 2007 -# - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -# CONFIG_CPUSETS is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_SWIOTLB=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_EFI=y -CONFIG_GENERIC_IOMAP=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_IA64_UNCACHED_ALLOCATOR=y -CONFIG_DMA_IS_DMA32=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_HP_ZX1_SWIOTLB is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_PGTABLE_3=y -# CONFIG_PGTABLE_4 is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_IA64_L1_CACHE_SHIFT=7 -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_IA64_SGI_SN_XP=m -CONFIG_FORCE_MAX_ZONEORDER=17 -CONFIG_SMP=y -CONFIG_NR_CPUS=32 -# CONFIG_HOTPLUG_CPU is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_PREEMPT is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_NEED_MULTIPLE_NODES=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y -CONFIG_NUMA=y -CONFIG_VIRTUAL_MEM_MAP=y -CONFIG_HOLES_IN_ZONE=y -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -# CONFIG_IA32_SUPPORT is not set -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y -CONFIG_SGI_SN=y - -# -# Firmware Drivers -# -CONFIG_EFI_VARS=y -CONFIG_EFI_PCDP=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -# CONFIG_ACPI_CONTAINER is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_IDE_MAX_HWIFS=4 -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=m -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -# CONFIG_CASSINI is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -# CONFIG_TULIP_NAPI_HW_MITIGATION is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -# CONFIG_DL2K is not set -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -CONFIG_STALDRV=y -CONFIG_SGI_SNSC=y -# CONFIG_SGI_TIOCX is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_SGI_L1_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_SERIAL_SGI_IOC4=m -CONFIG_SERIAL_SGI_IOC3=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -CONFIG_EFI_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_I460=y -CONFIG_AGP_HP_ZX1=y -CONFIG_AGP_SGI_TIOCA=m -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_CFB_FILLRECT is not set -# CONFIG_FB_CFB_COPYAREA is not set -# CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# SN Devices -# -CONFIG_SGI_IOC4=m -CONFIG_SGI_IOC3=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_CIFS_EXPERIMENTAL=y -CONFIG_CIFS_UPCALL=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64.config deleted file mode 100644 index 1db1bdb71c..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64.config +++ /dev/null @@ -1,1419 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.22 -# Thu Jan 25 23:49:55 2007 -# - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_SWIOTLB=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_EFI=y -CONFIG_GENERIC_IOMAP=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_IA64_UNCACHED_ALLOCATOR=y -CONFIG_DMA_IS_DMA32=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_HP_ZX1_SWIOTLB is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_PGTABLE_3=y -# CONFIG_PGTABLE_4 is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_IA64_L1_CACHE_SHIFT=7 -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_IA64_SGI_SN_XP=m -CONFIG_FORCE_MAX_ZONEORDER=17 -# CONFIG_SMP is not set -# CONFIG_PREEMPT is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_NEED_MULTIPLE_NODES=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y -CONFIG_NUMA=y -CONFIG_VIRTUAL_MEM_MAP=y -CONFIG_HOLES_IN_ZONE=y -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -# CONFIG_IA32_SUPPORT is not set -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y -CONFIG_SGI_SN=y - -# -# Firmware Drivers -# -CONFIG_EFI_VARS=y -CONFIG_EFI_PCDP=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -# CONFIG_ACPI_CONTAINER is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_IDE_MAX_HWIFS=4 -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=m -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -# CONFIG_CASSINI is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -# CONFIG_TULIP_NAPI_HW_MITIGATION is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -# CONFIG_DL2K is not set -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -CONFIG_STALDRV=y -CONFIG_STALLION=m -CONFIG_ISTALLION=m -CONFIG_SGI_SNSC=y -# CONFIG_SGI_TIOCX is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_SGI_L1_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_SERIAL_SGI_IOC4=m -CONFIG_SERIAL_SGI_IOC3=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -CONFIG_EFI_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_I460=y -CONFIG_AGP_HP_ZX1=y -CONFIG_AGP_SGI_TIOCA=m -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_CFB_FILLRECT is not set -# CONFIG_FB_CFB_COPYAREA is not set -# CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# SN Devices -# -CONFIG_SGI_IOC4=m -CONFIG_SGI_IOC3=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_CIFS_EXPERIMENTAL=y -CONFIG_CIFS_UPCALL=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64-smp.config deleted file mode 100644 index a995f65ca7..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64-smp.config +++ /dev/null @@ -1,1463 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.22 -# Thu Jan 25 23:56:18 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -# CONFIG_CPUSETS is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set -CONFIG_X86_HT=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -# CONFIG_SCHED_SMT is not set -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -# CONFIG_NUMA is not set -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_NR_CPUS=32 -# CONFIG_HOTPLUG_CPU is not set -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_GART_IOMMU=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_INTEL is not set -# CONFIG_X86_MCE_AMD is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y -CONFIG_GENERIC_PENDING_IRQ=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=y -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_ASUS=m -# CONFIG_ACPI_IBM is not set -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -# CONFIG_ACPI_CONTAINER is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_UNORDERED_IO is not set -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -# CONFIG_CASSINI is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -# CONFIG_TULIP_NAPI_HW_MITIGATION is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -# CONFIG_DL2K is not set -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -# CONFIG_IBMASR is not set -CONFIG_WAFER_WDT=m -# CONFIG_I6300ESB_WDT is not set -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -# CONFIG_W83977F_WDT is not set -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -# CONFIG_DRM is not set -# CONFIG_MWAVE is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_HDAPS is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -# CONFIG_EDAC is not set - -# -# Firmware Drivers -# -# CONFIG_EDD is not set -# CONFIG_DELL_RBU is not set -# CONFIG_DCDBAS is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_CIFS_EXPERIMENTAL=y -CONFIG_CIFS_UPCALL=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_IOMMU_DEBUG is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64.config deleted file mode 100644 index a328d34c19..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64.config +++ /dev/null @@ -1,1462 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.22 -# Thu Jan 25 23:55:28 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_LBD=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -# CONFIG_SMP is not set -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_GART_IOMMU=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_INTEL is not set -# CONFIG_X86_MCE_AMD is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_SOFTWARE_SUSPEND is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=y -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_ASUS=m -# CONFIG_ACPI_IBM is not set -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -# CONFIG_ACPI_CONTAINER is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_UNORDERED_IO is not set -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -# CONFIG_CASSINI is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -# CONFIG_TULIP_NAPI_HW_MITIGATION is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -# CONFIG_DL2K is not set -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=y -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -CONFIG_MOUSE_VSXXXAA=m -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -# CONFIG_SYNCLINK_GT is not set -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -CONFIG_STALDRV=y -CONFIG_STALLION=m -CONFIG_ISTALLION=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -# CONFIG_IBMASR is not set -CONFIG_WAFER_WDT=m -# CONFIG_I6300ESB_WDT is not set -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -# CONFIG_W83977F_WDT is not set -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -# CONFIG_DRM is not set -# CONFIG_MWAVE is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_I801 is not set -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_HDAPS is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -# CONFIG_EDAC is not set - -# -# Firmware Drivers -# -# CONFIG_EDD is not set -# CONFIG_DELL_RBU is not set -# CONFIG_DCDBAS is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_CIFS_EXPERIMENTAL=y -CONFIG_CIFS_UPCALL=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_IOMMU_DEBUG is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686-bigsmp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686-bigsmp.config deleted file mode 100644 index 013ad4368c..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686-bigsmp.config +++ /dev/null @@ -1,3496 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.46 -# Tue Jul 3 17:56:03 2007 -# -CONFIG_X86_32=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SUSE_KERNEL=y -CONFIG_SLE_VERSION=10 -CONFIG_SLE_SP=1 -CONFIG_SLE_SP_SUBLEVEL=0 -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASKSTATS=y -CONFIG_TASK_XACCT=y -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=m - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - -# -# Processor type and features -# -# CONFIG_X86_PC is not set -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -CONFIG_X86_GENERICARCH=y -# CONFIG_X86_ES7000 is not set -CONFIG_X86_CYCLONE_TIMER=y -# CONFIG_M386 is not set -# CONFIG_M486 is not set -CONFIG_M586=y -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_F00F_BUG=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_ALIGNMENT_16=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_SMP=y -CONFIG_SMP_ALTERNATIVES=y -CONFIG_NR_CPUS=128 -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -# CONFIG_PREEMPT_BKL is not set -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_X86_MCE_P4THERMAL=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_X86_REBOOTFIXUPS=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m -# CONFIG_SWIOTLB is not set - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -# CONFIG_HIGHMEM4G is not set -CONFIG_HIGHMEM64G=y -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_X86_PAE=y -# CONFIG_NUMA is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -# CONFIG_IRQBALANCE is not set -CONFIG_REGPARM=y -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_KEXEC=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_HOTPLUG_CPU=y -CONFIG_DOUBLEFAULT=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_SLEEP_PROC_SLEEP=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=m -# CONFIG_ACPI_ASUS is not set -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_SONY=m -CONFIG_ACPI_PCC=m -# CONFIG_ACPI_CUSTOM_DSDT is not set -CONFIG_ACPI_BLACKLIST_YEAR=2001 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=m -CONFIG_ACPI_INITRD=y - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -CONFIG_APM_DO_ENABLE=y -# CONFIG_APM_CPU_IDLE is not set -CONFIG_APM_DISPLAY_BLANK=y -# CONFIG_APM_RTC_IS_GMT is not set -CONFIG_APM_ALLOW_INTS=y -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=m -# CONFIG_CPU_FREQ_DEBUG is not set -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -CONFIG_X86_POWERNOW_K6=m -CONFIG_X86_POWERNOW_K7=m -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_GX_SUSPMOD=m -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_ICH=m -CONFIG_X86_SPEEDSTEP_SMI=m -CONFIG_X86_P4_CLOCKMOD=m -CONFIG_X86_CPUFREQ_NFORCE2=m -CONFIG_X86_LONGRUN=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_SPEEDSTEP_LIB=m -CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -CONFIG_SCx200=m - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=m -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=m -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -CONFIG_I82092=m -CONFIG_I82365=m -CONFIG_TCIC=m -CONFIG_PCMCIA_PROBE=y -CONFIG_PCCARD_NONSTATIC=m - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=m -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -CONFIG_IP_NF_CONNTRACK_MARK=y -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_IPV4OPTIONS=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_POLICY=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DECnet: Netfilter Configuration -# -CONFIG_DECNET_NF_GRABULATOR=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_IP_DCCP_UNLOAD_HACK is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -CONFIG_DECNET_ROUTER=y -CONFIG_DECNET_ROUTE_FWMARK=y -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_LTPC=m -CONFIG_COPS=m -CONFIG_COPS_DAYNA=y -CONFIG_COPS_TANGENT=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_MKISS=m -CONFIG_6PACK=m -CONFIG_BPQETHER=m -CONFIG_SCC=m -CONFIG_SCC_DELAY=y -CONFIG_SCC_TRXECHO=y -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_BAYCOM_EPP=m -CONFIG_YAM=m -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_TOSHIBA_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -# CONFIG_STANDALONE is not set -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_AMDSTD_RETRY=1 -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -CONFIG_MTD_PNC2000=m -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -CONFIG_MTD_SBC_GXX=m -CONFIG_MTD_SCx200_DOCFLASH=m -CONFIG_MTD_AMD76XROM=m -CONFIG_MTD_ICHXROM=m -CONFIG_MTD_SCB2_FLASH=m -CONFIG_MTD_NETtel=m -CONFIG_MTD_DILNETPC=m -CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000 -CONFIG_MTD_L440GX=m -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_PHRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCECC=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -CONFIG_MTD_ONENAND=m -# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_ISAPNP=y -CONFIG_PNPBIOS=y -CONFIG_PNPBIOS_PROC_FS=y -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -CONFIG_BLK_DEV_XD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=64000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -CONFIG_CDROM_PKTCDVD_WCACHE=y -CONFIG_CIPHER_TWOFISH=m -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=m -CONFIG_BLK_DEV_IDE=m - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=m -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=m -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEACPI=y -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=m -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=m -CONFIG_BLK_DEV_OPTI621=m -CONFIG_BLK_DEV_RZ1000=m -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=m -CONFIG_BLK_DEV_ALI15X3=m -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=m -CONFIG_BLK_DEV_ATIIXP=m -CONFIG_BLK_DEV_CMD64X=m -CONFIG_BLK_DEV_TRIFLEX=m -CONFIG_BLK_DEV_CY82C693=m -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_CS5535=m -CONFIG_BLK_DEV_HPT34X=m -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=m -CONFIG_BLK_DEV_SC1200=m -CONFIG_BLK_DEV_PIIX=m -CONFIG_BLK_DEV_IT821X=m -CONFIG_BLK_DEV_NS87415=m -CONFIG_BLK_DEV_PDC202XX_OLD=m -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=m -CONFIG_BLK_DEV_SVWKS=m -CONFIG_BLK_DEV_SIIMAGE=m -CONFIG_BLK_DEV_SIS5513=m -CONFIG_BLK_DEV_SLC90E66=m -CONFIG_BLK_DEV_TRM290=m -CONFIG_BLK_DEV_VIA82CXXX=m -# CONFIG_IDE_ARM is not set -CONFIG_IDE_CHIPSETS=y - -# -# Note: most of these also require special kernel boot parameters -# -CONFIG_BLK_DEV_4DRIVES=y -CONFIG_BLK_DEV_ALI14XX=m -CONFIG_BLK_DEV_DTC2278=m -CONFIG_BLK_DEV_HT6560B=m -CONFIG_BLK_DEV_QD65XX=m -CONFIG_BLK_DEV_UMC8672=m -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_ISCSI_TARGET=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_7000FASST=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AHA152X=m -CONFIG_SCSI_AHA1542=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC94XX=m -CONFIG_AIC94XX_DEBUG=y -CONFIG_SCSI_DPT_I2O=m -CONFIG_SCSI_ADVANSYS=m -CONFIG_SCSI_IN2000=m -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_DTC3280=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_GENERIC_NCR5380=m -CONFIG_SCSI_GENERIC_NCR5380_MMIO=m -CONFIG_SCSI_GENERIC_NCR53C400=y -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_NCR53C406A=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -CONFIG_SCSI_PAS16=m -CONFIG_SCSI_PSI240I=m -CONFIG_SCSI_QLOGIC_FAS=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_SYM53C416=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_T128=m -CONFIG_SCSI_U14_34F=m -CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y -CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y -CONFIG_SCSI_U14_34F_MAX_TAGS=8 -CONFIG_SCSI_ULTRASTOR=m -CONFIG_SCSI_NSP32=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_NINJA_SCSI=m -CONFIG_PCMCIA_QLOGIC=m -CONFIG_PCMCIA_SYM53C500=m - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_ATA_ACPI=y -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -CONFIG_PATA_ARTOP=m -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CS5535 is not set -# CONFIG_PATA_CYPRESS is not set -CONFIG_PATA_EFAR=m -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -CONFIG_PATA_HPT37X=m -CONFIG_PATA_HPT3X2N=m -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_ISAPNP is not set -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -# CONFIG_PATA_LEGACY is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -CONFIG_PATA_NETCELL=m -# CONFIG_PATA_NS87410 is not set -CONFIG_PATA_OPTI=m -CONFIG_PATA_OPTIDMA=m -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_QDI is not set -CONFIG_PATA_RADISYS=m -CONFIG_PATA_RZ1000=m -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -# CONFIG_PATA_PDC2027X is not set -CONFIG_PATA_SIL680=m -# CONFIG_PATA_SIS is not set -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set -# CONFIG_PATA_WINBOND_VLB is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -CONFIG_CD_NO_IDESCSI=y -CONFIG_AZTCD=m -CONFIG_GSCD=m -CONFIG_MCDX=m -CONFIG_OPTCD=m -CONFIG_SJCD=m -# CONFIG_ISP16_CDI is not set -CONFIG_CDU535=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_HP_SW=m -CONFIG_DM_MULTIPATH_RDAC=m -CONFIG_DM_NL_EVT=y - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -CONFIG_FUSION_MAX_FC_SGE=256 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y -CONFIG_IEEE1394_EXPORT_FULL_API=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -# CONFIG_I2O_CONFIG_OLD_IOCTL is not set -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_NET_SB1000=m - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -# CONFIG_ARCNET_CAP is not set -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -CONFIG_ARCNET_COM20020=m -CONFIG_ARCNET_COM20020_ISA=m -CONFIG_ARCNET_COM20020_PCI=m - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_EL1=m -CONFIG_EL2=m -CONFIG_ELPLUS=m -CONFIG_EL16=m -CONFIG_EL3=m -CONFIG_3C515=m -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -CONFIG_LANCE=m -CONFIG_NET_VENDOR_SMC=y -CONFIG_WD80x3=m -CONFIG_ULTRA=m -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -CONFIG_NI52=m -CONFIG_NI65=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -CONFIG_AT1700=m -CONFIG_DEPCA=m -CONFIG_HP100=m -CONFIG_NET_ISA=y -CONFIG_E2100=m -CONFIG_EWRK3=m -CONFIG_EEXPRESS=m -CONFIG_EEXPRESS_PRO=m -CONFIG_HPLAN_PLUS=m -CONFIG_HPLAN=m -CONFIG_LP486E=m -CONFIG_ETH16I=m -CONFIG_NE2000=m -CONFIG_ZNET=m -CONFIG_SEEQ8005=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -# CONFIG_AMD8111E_NAPI is not set -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_AC3200=m -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_CS89x0=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set -CONFIG_NET_POCKET=y -CONFIG_ATP=m -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -# CONFIG_R8169_NAPI is not set -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMTR=m -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_SKISA=m -CONFIG_PROTEON=m -CONFIG_ABYSS=m -CONFIG_SMCTR=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -# CONFIG_ARLAN is not set -CONFIG_WAVELAN=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_ARCNET_COM20020_CS=m -CONFIG_PCMCIA_IBMTR=m - -# -# Wan interfaces -# -CONFIG_WAN=y -CONFIG_HOSTESS_SV11=m -# CONFIG_COSA is not set -CONFIG_DSCC4=m -CONFIG_DSCC4_PCISYNC=y -CONFIG_DSCC4_PCI_RST=y -CONFIG_LANMEDIA=m -CONFIG_SEALEVEL_4021=m -CONFIG_SYNCLINK_SYNCPPP=m -CONFIG_HDLC=m -CONFIG_HDLC_RAW=y -CONFIG_HDLC_RAW_ETH=y -CONFIG_HDLC_CISCO=y -CONFIG_HDLC_FR=y -CONFIG_HDLC_PPP=y -CONFIG_HDLC_X25=y -CONFIG_PCI200SYN=m -CONFIG_WANXL=m -CONFIG_PC300=m -CONFIG_PC300_MLPPP=y -CONFIG_N2=m -CONFIG_C101=m -CONFIG_FARSYNC=m -CONFIG_DLCI=m -CONFIG_DLCI_COUNT=24 -CONFIG_DLCI_MAX=8 -CONFIG_SDLA=m -# CONFIG_WAN_ROUTER_DRIVERS is not set -CONFIG_LAPBETHER=m -CONFIG_X25_ASY=m -# CONFIG_SBNI is not set - -# -# ATM drivers -# -CONFIG_ATM_DUMMY=m -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -CONFIG_ATM_ZATM=m -# CONFIG_ATM_ZATM_DEBUG is not set -CONFIG_ATM_NICSTAR=m -CONFIG_ATM_NICSTAR_USE_SUNI=y -CONFIG_ATM_NICSTAR_USE_IDT77105=y -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -CONFIG_ATM_IDT77252_RCV_ALL=y -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_IA=m -# CONFIG_ATM_IA_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -CONFIG_ATM_FORE200E_PCA=y -CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y -CONFIG_ATM_FORE200E_USE_TASKLET=y -CONFIG_ATM_FORE200E_TX_RETRY=16 -CONFIG_ATM_FORE200E_DEBUG=0 -CONFIG_ATM_FORE200E=m -CONFIG_ATM_HE=m -CONFIG_ATM_HE_USE_SUNI=y -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NET_FC=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_0=y -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_AVM_A1=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_IX1MICROR2=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_ASUSCOM=y -CONFIG_HISAX_TELEINT=y -CONFIG_HISAX_HFCS=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_SPORTSTER=y -CONFIG_HISAX_MIC=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_ISURF=y -CONFIG_HISAX_HSTSAPHIR=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_ICN=m -CONFIG_ISDN_DRV_PCBIT=m -CONFIG_ISDN_DRV_SC=m -CONFIG_ISDN_DRV_ACT2000=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_T1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_INPORT=m -CONFIG_MOUSE_ATIXL=y -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=m -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_WISTRON_BTNS=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_COMPUTONE=m -CONFIG_ROCKETPORT=m -CONFIG_CYCLADES=m -CONFIG_CYZ_INTR=y -CONFIG_DIGIEPCA=m -CONFIG_ESPSERIAL=m -CONFIG_MOXA_INTELLIO=m -CONFIG_MOXA_SMARTIO=m -CONFIG_ISI=m -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -CONFIG_SPECIALIX=m -# CONFIG_SPECIALIX_RTSCTS is not set -CONFIG_SX=m -CONFIG_STALDRV=y -CONFIG_NOZOMI=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=8 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_8250_FOURPORT=m -CONFIG_SERIAL_8250_ACCENT=m -CONFIG_SERIAL_8250_BOCA=m -CONFIG_SERIAL_8250_HUB6=m - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=64 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -CONFIG_IPMI_PANIC_STRING=y -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_IBMASR=m -CONFIG_WAFER_WDT=m -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_SCx200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_SBC8360_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -CONFIG_SBC_EPX_C3_WATCHDOG=m - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -CONFIG_MIXCOMWD=m -CONFIG_WDT=m -CONFIG_WDT_501=y - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=m -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=m -CONFIG_AGP_ALI=m -CONFIG_AGP_ATI=m -CONFIG_AGP_AMD=m -CONFIG_AGP_AMD64=m -CONFIG_AGP_INTEL=m -CONFIG_AGP_NVIDIA=m -CONFIG_AGP_SIS=m -CONFIG_AGP_SWORKS=m -CONFIG_AGP_VIA=m -CONFIG_AGP_EFFICEON=m -CONFIG_DRM=m -CONFIG_DRM_TDFX=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_SCx200_GPIO=m -CONFIG_CS5535_GPIO=m -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -CONFIG_HPET_MMAP=y -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m -CONFIG_TELCLOCK=m -CONFIG_CRASHER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_I2C=m -CONFIG_SCx200_I2C_SCL=12 -CONFIG_SCx200_I2C_SDA=13 -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -CONFIG_I2C_PCA_ISA=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -CONFIG_SENSORS_MAX6875=m -CONFIG_RTC_X1205_I2C=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=m -CONFIG_SPI_BUTTERFLY=m - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -CONFIG_W1=m -CONFIG_W1_MATROX=m -CONFIG_W1_DS9490=m -CONFIG_W1_DS9490_BRIDGE=m -CONFIG_W1_THERM=m -CONFIG_W1_SMEM=m -CONFIG_W1_DS2433=m -CONFIG_W1_DS2433_CRC=y - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_PC87427=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y -CONFIG_VIDEO_SAA6588=m -CONFIG_VIDEO_PMS=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_MEYE=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_SAA7134_ALSA=m -# CONFIG_VIDEO_SAA7134_OSS is not set -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m -CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_CX88_VP3054=m -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_VIDEO_AUDIO_DECODER=m -CONFIG_VIDEO_DECODER=m - -# -# Radio Adapters -# -CONFIG_RADIO_CADET=m -CONFIG_RADIO_RTRACK=m -CONFIG_RADIO_RTRACK2=m -CONFIG_RADIO_AZTECH=m -CONFIG_RADIO_GEMTEK=m -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_RADIO_MIROPCM20=m -# CONFIG_RADIO_MIROPCM20_RDS is not set -CONFIG_RADIO_SF16FMI=m -CONFIG_RADIO_SF16FMR2=m -CONFIG_RADIO_TERRATEC=m -CONFIG_RADIO_TRUST=m -CONFIG_RADIO_TYPHOON=m -CONFIG_RADIO_TYPHOON_PROC_FS=y -CONFIG_RADIO_ZOLTRIX=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -# CONFIG_DVB_USB_CXUSB is not set -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -# CONFIG_DVB_CINERGYT2_TUNING is not set - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -# CONFIG_DVB_PLUTO2 is not set - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terresterial DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -CONFIG_FB_PM2=m -CONFIG_FB_PM2_FIFO_DISCONNECT=y -CONFIG_FB_CYBER2000=m -CONFIG_FB_ARC=m -# CONFIG_FB_ASILIANT is not set -CONFIG_FB_IMSTT=y -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_HGA_ACCEL=y -CONFIG_FB_S1D13XXX=m -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -CONFIG_FB_RIVA_I2C=y -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_I810_I2C=y -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -# CONFIG_FB_MATROX_I2C is not set -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GENERIC_LCD=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_3DFX_ACCEL=y -CONFIG_FB_VOODOO1=m -CONFIG_FB_CYBLA=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_TRIDENT_ACCEL=y -CONFIG_FB_GEODE=y -CONFIG_FB_GEODE_GX1=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_OPL4_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# ISA devices -# -CONFIG_SND_AD1848_LIB=m -CONFIG_SND_CS4231_LIB=m -CONFIG_SND_AD1816A=m -CONFIG_SND_AD1848=m -CONFIG_SND_ALS100=m -CONFIG_SND_AZT2320=m -CONFIG_SND_CMI8330=m -CONFIG_SND_CS4231=m -CONFIG_SND_CS4232=m -CONFIG_SND_CS4236=m -CONFIG_SND_DT019X=m -CONFIG_SND_ES968=m -CONFIG_SND_ES1688=m -CONFIG_SND_ES18XX=m -CONFIG_SND_GUS_SYNTH=m -CONFIG_SND_GUSCLASSIC=m -CONFIG_SND_GUSEXTREME=m -CONFIG_SND_GUSMAX=m -CONFIG_SND_INTERWAVE=m -CONFIG_SND_INTERWAVE_STB=m -CONFIG_SND_OPL3SA2=m -CONFIG_SND_OPTI92X_AD1848=m -CONFIG_SND_OPTI92X_CS4231=m -CONFIG_SND_OPTI93X=m -CONFIG_SND_SB8=m -CONFIG_SND_SB16=m -CONFIG_SND_SBAWE=m -CONFIG_SND_SB16_CSP=y -CONFIG_SND_SGALAXY=m -CONFIG_SND_SSCAPE=m -CONFIG_SND_WAVEFRONT=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_OBSOLETE_OSS_DRIVER=y -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -# CONFIG_SOUND_AD1816 is not set -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_SGALAXY=m -CONFIG_SOUND_ADLIB=m -CONFIG_SOUND_ACI_MIXER=m -CONFIG_SOUND_CS4232=m -CONFIG_SOUND_SSCAPE=m -CONFIG_SOUND_GUS=m -# CONFIG_SOUND_GUS16 is not set -CONFIG_SOUND_GUSMAX=y -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_TRIX=m -CONFIG_SOUND_MSS=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -CONFIG_SOUND_MAD16=m -CONFIG_MAD16_OLDCARD=y -CONFIG_SOUND_PAS=m -CONFIG_SOUND_PSS=m -CONFIG_PSS_MIXER=y -# CONFIG_PSS_HAVE_BOOT is not set -CONFIG_SOUND_SB=m -# CONFIG_SOUND_AWE32_SYNTH is not set -CONFIG_SOUND_WAVEFRONT=m -CONFIG_SOUND_MAUI=m -CONFIG_SOUND_YM3812=m -CONFIG_SOUND_OPL3SA1=m -CONFIG_SOUND_OPL3SA2=m -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_AEDSP16=m -CONFIG_SC6600=y -CONFIG_SC6600_JOY=y -CONFIG_SC6600_CDROM=4 -CONFIG_SC6600_CDROMBASE=0x0 -# CONFIG_AEDSP16_MSS is not set -# CONFIG_AEDSP16_SBPRO is not set -CONFIG_AEDSP16_MPU401=y -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_KAHLUA=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_ITMTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_YEALINK=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_ET61X251=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_ZD1201=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ANYDATA=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_BERRY_CHARGE=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_WBSD=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_MTHCA=m -# CONFIG_INFINIBAND_MTHCA_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_DEBUG is not set -CONFIG_INFINIBAND_SRP=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y -CONFIG_DMA_TESTCLIENT=m - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=m -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_XFS_RT=y -# CONFIG_XFS_DEBUG is not set -# CONFIG_XFS_TRACE is not set -CONFIG_OCFS2_FS=m -CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -CONFIG_NTFS_RW=y - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS_PROC_FS=y -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_STATS2=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m -CONFIG_9P_FS=m -CONFIG_GENERIC_ACL=y - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_FORCED_INLINING=y -CONFIG_RCU_TORTURE_TEST=m -# CONFIG_LKCD_DUMP is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Page alloc debug is incompatible with Software Suspend on i386 -# -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y -# CONFIG_KDB is not set - -# -# Security options -# -# CONFIG_KEYS is not set -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SECLVL=m -# CONFIG_SECURITY_SELINUX is not set -CONFIG_SECURITY_APPARMOR=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# -CONFIG_CRYPTO_DEV_PADLOCK=m -CONFIG_CRYPTO_DEV_PADLOCK_AES=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686.config deleted file mode 100644 index 3d04f51795..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686.config +++ /dev/null @@ -1,3496 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.46 -# Tue Jul 3 17:46:57 2007 -# -CONFIG_X86_32=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SUSE_KERNEL=y -CONFIG_SLE_VERSION=10 -CONFIG_SLE_SP=1 -CONFIG_SLE_SP_SUBLEVEL=0 -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASKSTATS=y -CONFIG_TASK_XACCT=y -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=m - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - -# -# Processor type and features -# -# CONFIG_X86_PC is not set -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -CONFIG_X86_GENERICARCH=y -# CONFIG_X86_ES7000 is not set -CONFIG_X86_CYCLONE_TIMER=y -# CONFIG_M386 is not set -# CONFIG_M486 is not set -CONFIG_M586=y -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_F00F_BUG=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_ALIGNMENT_16=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_SMP=y -CONFIG_SMP_ALTERNATIVES=y -CONFIG_NR_CPUS=128 -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -# CONFIG_PREEMPT_BKL is not set -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_X86_MCE_P4THERMAL=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_X86_REBOOTFIXUPS=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m -# CONFIG_SWIOTLB is not set - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -# CONFIG_HIGHMEM4G is not set -CONFIG_HIGHMEM64G=y -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_X86_PAE=y -# CONFIG_NUMA is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -# CONFIG_IRQBALANCE is not set -CONFIG_REGPARM=y -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_KEXEC=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_HOTPLUG_CPU=y -CONFIG_DOUBLEFAULT=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_SLEEP_PROC_SLEEP=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=m -# CONFIG_ACPI_ASUS is not set -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_SONY=m -CONFIG_ACPI_PCC=m -# CONFIG_ACPI_CUSTOM_DSDT is not set -CONFIG_ACPI_BLACKLIST_YEAR=2001 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=m -CONFIG_ACPI_INITRD=y - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -CONFIG_APM_DO_ENABLE=y -# CONFIG_APM_CPU_IDLE is not set -CONFIG_APM_DISPLAY_BLANK=y -# CONFIG_APM_RTC_IS_GMT is not set -CONFIG_APM_ALLOW_INTS=y -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=m -# CONFIG_CPU_FREQ_DEBUG is not set -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -CONFIG_X86_POWERNOW_K6=m -CONFIG_X86_POWERNOW_K7=m -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_GX_SUSPMOD=m -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_ICH=m -CONFIG_X86_SPEEDSTEP_SMI=m -CONFIG_X86_P4_CLOCKMOD=m -CONFIG_X86_CPUFREQ_NFORCE2=m -CONFIG_X86_LONGRUN=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_SPEEDSTEP_LIB=m -CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -CONFIG_SCx200=m - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=m -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=m -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -CONFIG_I82092=m -CONFIG_I82365=m -CONFIG_TCIC=m -CONFIG_PCMCIA_PROBE=y -CONFIG_PCCARD_NONSTATIC=m - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=m -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -CONFIG_IP_NF_CONNTRACK_MARK=y -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_IPV4OPTIONS=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_POLICY=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DECnet: Netfilter Configuration -# -CONFIG_DECNET_NF_GRABULATOR=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_IP_DCCP_UNLOAD_HACK is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -CONFIG_DECNET_ROUTER=y -CONFIG_DECNET_ROUTE_FWMARK=y -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_LTPC=m -CONFIG_COPS=m -CONFIG_COPS_DAYNA=y -CONFIG_COPS_TANGENT=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_MKISS=m -CONFIG_6PACK=m -CONFIG_BPQETHER=m -CONFIG_SCC=m -CONFIG_SCC_DELAY=y -CONFIG_SCC_TRXECHO=y -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_BAYCOM_EPP=m -CONFIG_YAM=m -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_TOSHIBA_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -# CONFIG_STANDALONE is not set -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_AMDSTD_RETRY=1 -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -CONFIG_MTD_PNC2000=m -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -CONFIG_MTD_SBC_GXX=m -CONFIG_MTD_SCx200_DOCFLASH=m -CONFIG_MTD_AMD76XROM=m -CONFIG_MTD_ICHXROM=m -CONFIG_MTD_SCB2_FLASH=m -CONFIG_MTD_NETtel=m -CONFIG_MTD_DILNETPC=m -CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000 -CONFIG_MTD_L440GX=m -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_PHRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCECC=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -CONFIG_MTD_ONENAND=m -# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_ISAPNP=y -CONFIG_PNPBIOS=y -CONFIG_PNPBIOS_PROC_FS=y -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -CONFIG_BLK_DEV_XD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=64000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -CONFIG_CDROM_PKTCDVD_WCACHE=y -CONFIG_CIPHER_TWOFISH=m -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=m -CONFIG_BLK_DEV_IDE=m - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=m -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=m -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEACPI=y -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=m -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=m -CONFIG_BLK_DEV_OPTI621=m -CONFIG_BLK_DEV_RZ1000=m -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=m -CONFIG_BLK_DEV_ALI15X3=m -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=m -CONFIG_BLK_DEV_ATIIXP=m -CONFIG_BLK_DEV_CMD64X=m -CONFIG_BLK_DEV_TRIFLEX=m -CONFIG_BLK_DEV_CY82C693=m -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_CS5535=m -CONFIG_BLK_DEV_HPT34X=m -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=m -CONFIG_BLK_DEV_SC1200=m -CONFIG_BLK_DEV_PIIX=m -CONFIG_BLK_DEV_IT821X=m -CONFIG_BLK_DEV_NS87415=m -CONFIG_BLK_DEV_PDC202XX_OLD=m -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=m -CONFIG_BLK_DEV_SVWKS=m -CONFIG_BLK_DEV_SIIMAGE=m -CONFIG_BLK_DEV_SIS5513=m -CONFIG_BLK_DEV_SLC90E66=m -CONFIG_BLK_DEV_TRM290=m -CONFIG_BLK_DEV_VIA82CXXX=m -# CONFIG_IDE_ARM is not set -CONFIG_IDE_CHIPSETS=y - -# -# Note: most of these also require special kernel boot parameters -# -CONFIG_BLK_DEV_4DRIVES=y -CONFIG_BLK_DEV_ALI14XX=m -CONFIG_BLK_DEV_DTC2278=m -CONFIG_BLK_DEV_HT6560B=m -CONFIG_BLK_DEV_QD65XX=m -CONFIG_BLK_DEV_UMC8672=m -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_ISCSI_TARGET=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_7000FASST=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AHA152X=m -CONFIG_SCSI_AHA1542=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC94XX=m -CONFIG_AIC94XX_DEBUG=y -CONFIG_SCSI_DPT_I2O=m -CONFIG_SCSI_ADVANSYS=m -CONFIG_SCSI_IN2000=m -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_DTC3280=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_GENERIC_NCR5380=m -CONFIG_SCSI_GENERIC_NCR5380_MMIO=m -CONFIG_SCSI_GENERIC_NCR53C400=y -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_NCR53C406A=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -CONFIG_SCSI_PAS16=m -CONFIG_SCSI_PSI240I=m -CONFIG_SCSI_QLOGIC_FAS=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_SYM53C416=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_T128=m -CONFIG_SCSI_U14_34F=m -CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y -CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y -CONFIG_SCSI_U14_34F_MAX_TAGS=8 -CONFIG_SCSI_ULTRASTOR=m -CONFIG_SCSI_NSP32=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_NINJA_SCSI=m -CONFIG_PCMCIA_QLOGIC=m -CONFIG_PCMCIA_SYM53C500=m - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_ATA_ACPI=y -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -CONFIG_PATA_ARTOP=m -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CS5535 is not set -# CONFIG_PATA_CYPRESS is not set -CONFIG_PATA_EFAR=m -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -CONFIG_PATA_HPT37X=m -CONFIG_PATA_HPT3X2N=m -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_ISAPNP is not set -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -# CONFIG_PATA_LEGACY is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -CONFIG_PATA_NETCELL=m -# CONFIG_PATA_NS87410 is not set -CONFIG_PATA_OPTI=m -CONFIG_PATA_OPTIDMA=m -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_QDI is not set -CONFIG_PATA_RADISYS=m -CONFIG_PATA_RZ1000=m -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -# CONFIG_PATA_PDC2027X is not set -CONFIG_PATA_SIL680=m -# CONFIG_PATA_SIS is not set -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set -# CONFIG_PATA_WINBOND_VLB is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -CONFIG_CD_NO_IDESCSI=y -CONFIG_AZTCD=m -CONFIG_GSCD=m -CONFIG_MCDX=m -CONFIG_OPTCD=m -CONFIG_SJCD=m -# CONFIG_ISP16_CDI is not set -CONFIG_CDU535=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_HP_SW=m -CONFIG_DM_MULTIPATH_RDAC=m -CONFIG_DM_NL_EVT=y - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -CONFIG_FUSION_MAX_FC_SGE=256 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y -CONFIG_IEEE1394_EXPORT_FULL_API=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -# CONFIG_I2O_CONFIG_OLD_IOCTL is not set -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_NET_SB1000=m - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -# CONFIG_ARCNET_CAP is not set -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -CONFIG_ARCNET_COM20020=m -CONFIG_ARCNET_COM20020_ISA=m -CONFIG_ARCNET_COM20020_PCI=m - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_EL1=m -CONFIG_EL2=m -CONFIG_ELPLUS=m -CONFIG_EL16=m -CONFIG_EL3=m -CONFIG_3C515=m -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -CONFIG_LANCE=m -CONFIG_NET_VENDOR_SMC=y -CONFIG_WD80x3=m -CONFIG_ULTRA=m -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -CONFIG_NI52=m -CONFIG_NI65=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -CONFIG_AT1700=m -CONFIG_DEPCA=m -CONFIG_HP100=m -CONFIG_NET_ISA=y -CONFIG_E2100=m -CONFIG_EWRK3=m -CONFIG_EEXPRESS=m -CONFIG_EEXPRESS_PRO=m -CONFIG_HPLAN_PLUS=m -CONFIG_HPLAN=m -CONFIG_LP486E=m -CONFIG_ETH16I=m -CONFIG_NE2000=m -CONFIG_ZNET=m -CONFIG_SEEQ8005=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -# CONFIG_AMD8111E_NAPI is not set -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_AC3200=m -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_CS89x0=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set -CONFIG_NET_POCKET=y -CONFIG_ATP=m -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -# CONFIG_R8169_NAPI is not set -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMTR=m -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_SKISA=m -CONFIG_PROTEON=m -CONFIG_ABYSS=m -CONFIG_SMCTR=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -# CONFIG_ARLAN is not set -CONFIG_WAVELAN=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_ARCNET_COM20020_CS=m -CONFIG_PCMCIA_IBMTR=m - -# -# Wan interfaces -# -CONFIG_WAN=y -CONFIG_HOSTESS_SV11=m -# CONFIG_COSA is not set -CONFIG_DSCC4=m -CONFIG_DSCC4_PCISYNC=y -CONFIG_DSCC4_PCI_RST=y -CONFIG_LANMEDIA=m -CONFIG_SEALEVEL_4021=m -CONFIG_SYNCLINK_SYNCPPP=m -CONFIG_HDLC=m -CONFIG_HDLC_RAW=y -CONFIG_HDLC_RAW_ETH=y -CONFIG_HDLC_CISCO=y -CONFIG_HDLC_FR=y -CONFIG_HDLC_PPP=y -CONFIG_HDLC_X25=y -CONFIG_PCI200SYN=m -CONFIG_WANXL=m -CONFIG_PC300=m -CONFIG_PC300_MLPPP=y -CONFIG_N2=m -CONFIG_C101=m -CONFIG_FARSYNC=m -CONFIG_DLCI=m -CONFIG_DLCI_COUNT=24 -CONFIG_DLCI_MAX=8 -CONFIG_SDLA=m -# CONFIG_WAN_ROUTER_DRIVERS is not set -CONFIG_LAPBETHER=m -CONFIG_X25_ASY=m -# CONFIG_SBNI is not set - -# -# ATM drivers -# -CONFIG_ATM_DUMMY=m -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -CONFIG_ATM_ZATM=m -# CONFIG_ATM_ZATM_DEBUG is not set -CONFIG_ATM_NICSTAR=m -CONFIG_ATM_NICSTAR_USE_SUNI=y -CONFIG_ATM_NICSTAR_USE_IDT77105=y -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -CONFIG_ATM_IDT77252_RCV_ALL=y -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_IA=m -# CONFIG_ATM_IA_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -CONFIG_ATM_FORE200E_PCA=y -CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y -CONFIG_ATM_FORE200E_USE_TASKLET=y -CONFIG_ATM_FORE200E_TX_RETRY=16 -CONFIG_ATM_FORE200E_DEBUG=0 -CONFIG_ATM_FORE200E=m -CONFIG_ATM_HE=m -CONFIG_ATM_HE_USE_SUNI=y -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NET_FC=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_0=y -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_AVM_A1=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_IX1MICROR2=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_ASUSCOM=y -CONFIG_HISAX_TELEINT=y -CONFIG_HISAX_HFCS=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_SPORTSTER=y -CONFIG_HISAX_MIC=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_ISURF=y -CONFIG_HISAX_HSTSAPHIR=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_ICN=m -CONFIG_ISDN_DRV_PCBIT=m -CONFIG_ISDN_DRV_SC=m -CONFIG_ISDN_DRV_ACT2000=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_T1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_INPORT=m -CONFIG_MOUSE_ATIXL=y -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=m -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_WISTRON_BTNS=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_COMPUTONE=m -CONFIG_ROCKETPORT=m -CONFIG_CYCLADES=m -CONFIG_CYZ_INTR=y -CONFIG_DIGIEPCA=m -CONFIG_ESPSERIAL=m -CONFIG_MOXA_INTELLIO=m -CONFIG_MOXA_SMARTIO=m -CONFIG_ISI=m -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -CONFIG_SPECIALIX=m -# CONFIG_SPECIALIX_RTSCTS is not set -CONFIG_SX=m -CONFIG_STALDRV=y -CONFIG_NOZOMI=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=8 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_8250_FOURPORT=m -CONFIG_SERIAL_8250_ACCENT=m -CONFIG_SERIAL_8250_BOCA=m -CONFIG_SERIAL_8250_HUB6=m - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=64 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -CONFIG_IPMI_PANIC_STRING=y -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_IBMASR=m -CONFIG_WAFER_WDT=m -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_SCx200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_SBC8360_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -CONFIG_SBC_EPX_C3_WATCHDOG=m - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -CONFIG_MIXCOMWD=m -CONFIG_WDT=m -CONFIG_WDT_501=y - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=m -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=m -CONFIG_AGP_ALI=m -CONFIG_AGP_ATI=m -CONFIG_AGP_AMD=m -CONFIG_AGP_AMD64=m -CONFIG_AGP_INTEL=m -CONFIG_AGP_NVIDIA=m -CONFIG_AGP_SIS=m -CONFIG_AGP_SWORKS=m -CONFIG_AGP_VIA=m -CONFIG_AGP_EFFICEON=m -CONFIG_DRM=m -CONFIG_DRM_TDFX=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_SCx200_GPIO=m -CONFIG_CS5535_GPIO=m -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -CONFIG_HPET_MMAP=y -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m -CONFIG_TELCLOCK=m -CONFIG_CRASHER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_I2C=m -CONFIG_SCx200_I2C_SCL=12 -CONFIG_SCx200_I2C_SDA=13 -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -CONFIG_I2C_PCA_ISA=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -CONFIG_SENSORS_MAX6875=m -CONFIG_RTC_X1205_I2C=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=m -CONFIG_SPI_BUTTERFLY=m - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -CONFIG_W1=m -CONFIG_W1_MATROX=m -CONFIG_W1_DS9490=m -CONFIG_W1_DS9490_BRIDGE=m -CONFIG_W1_THERM=m -CONFIG_W1_SMEM=m -CONFIG_W1_DS2433=m -CONFIG_W1_DS2433_CRC=y - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_PC87427=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y -CONFIG_VIDEO_SAA6588=m -CONFIG_VIDEO_PMS=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_MEYE=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_SAA7134_ALSA=m -# CONFIG_VIDEO_SAA7134_OSS is not set -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m -CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_CX88_VP3054=m -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_VIDEO_AUDIO_DECODER=m -CONFIG_VIDEO_DECODER=m - -# -# Radio Adapters -# -CONFIG_RADIO_CADET=m -CONFIG_RADIO_RTRACK=m -CONFIG_RADIO_RTRACK2=m -CONFIG_RADIO_AZTECH=m -CONFIG_RADIO_GEMTEK=m -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_RADIO_MIROPCM20=m -# CONFIG_RADIO_MIROPCM20_RDS is not set -CONFIG_RADIO_SF16FMI=m -CONFIG_RADIO_SF16FMR2=m -CONFIG_RADIO_TERRATEC=m -CONFIG_RADIO_TRUST=m -CONFIG_RADIO_TYPHOON=m -CONFIG_RADIO_TYPHOON_PROC_FS=y -CONFIG_RADIO_ZOLTRIX=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -# CONFIG_DVB_USB_CXUSB is not set -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -# CONFIG_DVB_CINERGYT2_TUNING is not set - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -# CONFIG_DVB_PLUTO2 is not set - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terresterial DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -CONFIG_FB_PM2=m -CONFIG_FB_PM2_FIFO_DISCONNECT=y -CONFIG_FB_CYBER2000=m -CONFIG_FB_ARC=m -# CONFIG_FB_ASILIANT is not set -CONFIG_FB_IMSTT=y -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_HGA_ACCEL=y -CONFIG_FB_S1D13XXX=m -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -CONFIG_FB_RIVA_I2C=y -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_I810_I2C=y -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -# CONFIG_FB_MATROX_I2C is not set -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GENERIC_LCD=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_3DFX_ACCEL=y -CONFIG_FB_VOODOO1=m -CONFIG_FB_CYBLA=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_TRIDENT_ACCEL=y -CONFIG_FB_GEODE=y -CONFIG_FB_GEODE_GX1=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_OPL4_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# ISA devices -# -CONFIG_SND_AD1848_LIB=m -CONFIG_SND_CS4231_LIB=m -CONFIG_SND_AD1816A=m -CONFIG_SND_AD1848=m -CONFIG_SND_ALS100=m -CONFIG_SND_AZT2320=m -CONFIG_SND_CMI8330=m -CONFIG_SND_CS4231=m -CONFIG_SND_CS4232=m -CONFIG_SND_CS4236=m -CONFIG_SND_DT019X=m -CONFIG_SND_ES968=m -CONFIG_SND_ES1688=m -CONFIG_SND_ES18XX=m -CONFIG_SND_GUS_SYNTH=m -CONFIG_SND_GUSCLASSIC=m -CONFIG_SND_GUSEXTREME=m -CONFIG_SND_GUSMAX=m -CONFIG_SND_INTERWAVE=m -CONFIG_SND_INTERWAVE_STB=m -CONFIG_SND_OPL3SA2=m -CONFIG_SND_OPTI92X_AD1848=m -CONFIG_SND_OPTI92X_CS4231=m -CONFIG_SND_OPTI93X=m -CONFIG_SND_SB8=m -CONFIG_SND_SB16=m -CONFIG_SND_SBAWE=m -CONFIG_SND_SB16_CSP=y -CONFIG_SND_SGALAXY=m -CONFIG_SND_SSCAPE=m -CONFIG_SND_WAVEFRONT=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_OBSOLETE_OSS_DRIVER=y -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -# CONFIG_SOUND_AD1816 is not set -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_SGALAXY=m -CONFIG_SOUND_ADLIB=m -CONFIG_SOUND_ACI_MIXER=m -CONFIG_SOUND_CS4232=m -CONFIG_SOUND_SSCAPE=m -CONFIG_SOUND_GUS=m -# CONFIG_SOUND_GUS16 is not set -CONFIG_SOUND_GUSMAX=y -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_TRIX=m -CONFIG_SOUND_MSS=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -CONFIG_SOUND_MAD16=m -CONFIG_MAD16_OLDCARD=y -CONFIG_SOUND_PAS=m -CONFIG_SOUND_PSS=m -CONFIG_PSS_MIXER=y -# CONFIG_PSS_HAVE_BOOT is not set -CONFIG_SOUND_SB=m -# CONFIG_SOUND_AWE32_SYNTH is not set -CONFIG_SOUND_WAVEFRONT=m -CONFIG_SOUND_MAUI=m -CONFIG_SOUND_YM3812=m -CONFIG_SOUND_OPL3SA1=m -CONFIG_SOUND_OPL3SA2=m -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_AEDSP16=m -CONFIG_SC6600=y -CONFIG_SC6600_JOY=y -CONFIG_SC6600_CDROM=4 -CONFIG_SC6600_CDROMBASE=0x0 -# CONFIG_AEDSP16_MSS is not set -# CONFIG_AEDSP16_SBPRO is not set -CONFIG_AEDSP16_MPU401=y -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_KAHLUA=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_ITMTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_YEALINK=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_ET61X251=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_ZD1201=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ANYDATA=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_BERRY_CHARGE=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_WBSD=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_MTHCA=m -# CONFIG_INFINIBAND_MTHCA_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_DEBUG is not set -CONFIG_INFINIBAND_SRP=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y -CONFIG_DMA_TESTCLIENT=m - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=m -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_XFS_RT=y -# CONFIG_XFS_DEBUG is not set -# CONFIG_XFS_TRACE is not set -CONFIG_OCFS2_FS=m -CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -CONFIG_NTFS_RW=y - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS_PROC_FS=y -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_STATS2=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m -CONFIG_9P_FS=m -CONFIG_GENERIC_ACL=y - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_FORCED_INLINING=y -CONFIG_RCU_TORTURE_TEST=m -# CONFIG_LKCD_DUMP is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Page alloc debug is incompatible with Software Suspend on i386 -# -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y -# CONFIG_KDB is not set - -# -# Security options -# -# CONFIG_KEYS is not set -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SECLVL=m -# CONFIG_SECURITY_SELINUX is not set -CONFIG_SECURITY_APPARMOR=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# -CONFIG_CRYPTO_DEV_PADLOCK=m -CONFIG_CRYPTO_DEV_PADLOCK_AES=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64-smp.config deleted file mode 100644 index 73918274b7..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64-smp.config +++ /dev/null @@ -1,3058 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.46 -# Tue Jul 3 18:35:09 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SUSE_KERNEL=y -CONFIG_SLE_VERSION=10 -CONFIG_SLE_SP=1 -CONFIG_SLE_SP_SUBLEVEL=0 -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASKSTATS=y -CONFIG_TASK_XACCT=y -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=m - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -# CONFIG_X86_64_XEN is not set -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m -CONFIG_X86_HT=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -# CONFIG_PREEMPT_BKL is not set -CONFIG_NUMA=y -CONFIG_K8_NUMA=y -CONFIG_X86_64_ACPI_NUMA=y -CONFIG_NUMA_EMU=y -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -CONFIG_DISCONTIGMEM_MANUAL=y -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_DISCONTIGMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_NEED_MULTIPLE_NODES=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_NR_CPUS=128 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_GART_IOMMU=y -CONFIG_CALGARY_IOMMU=y -# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_INTEL=y -CONFIG_X86_MCE_AMD=y -CONFIG_KEXEC=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y -CONFIG_GENERIC_PENDING_IRQ=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_SLEEP_PROC_SLEEP=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_SONY=m -CONFIG_ACPI_PCC=m -# CONFIG_ACPI_CUSTOM_DSDT is not set -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=m -CONFIG_ACPI_HOTPLUG_MEMORY=y -CONFIG_ACPI_INITRD=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=m -# CONFIG_CPU_FREQ_DEBUG is not set -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_UNORDERED_IO is not set -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=m -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=m -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -CONFIG_I82092=m -CONFIG_PCCARD_NONSTATIC=m - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m -CONFIG_IA32_EMULATION=y -CONFIG_IA32_AOUT=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=m -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_IPV4OPTIONS=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_POLICY=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DECnet: Netfilter Configuration -# -# CONFIG_DECNET_NF_GRABULATOR is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_IP_DCCP_UNLOAD_HACK is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -# CONFIG_DECNET_ROUTER is not set -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -CONFIG_IPX_INTERN=y -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_MKISS=m -CONFIG_6PACK=m -CONFIG_BPQETHER=m -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_YAM=m -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -# CONFIG_STANDALONE is not set -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_AMDSTD_RETRY=1 -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -# CONFIG_MTD_PNC2000 is not set -# CONFIG_MTD_SC520CDP is not set -# CONFIG_MTD_NETSC520 is not set -CONFIG_MTD_TS5500=m -# CONFIG_MTD_SBC_GXX is not set -CONFIG_MTD_AMD76XROM=m -CONFIG_MTD_ICHXROM=m -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_PHRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCECC=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -CONFIG_MTD_ONENAND=m -# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=128000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -CONFIG_CDROM_PKTCDVD_WCACHE=y -CONFIG_CIPHER_TWOFISH=m -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=m -CONFIG_BLK_DEV_IDE=m - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=m -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=m -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEACPI=y -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=m -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=m -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=m -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=m -CONFIG_BLK_DEV_ALI15X3=m -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=m -CONFIG_BLK_DEV_ATIIXP=m -CONFIG_BLK_DEV_CMD64X=m -CONFIG_BLK_DEV_TRIFLEX=m -CONFIG_BLK_DEV_CY82C693=m -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=m -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=m -CONFIG_BLK_DEV_SC1200=m -CONFIG_BLK_DEV_PIIX=m -CONFIG_BLK_DEV_IT821X=m -CONFIG_BLK_DEV_NS87415=m -CONFIG_BLK_DEV_PDC202XX_OLD=m -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=m -CONFIG_BLK_DEV_SVWKS=m -CONFIG_BLK_DEV_SIIMAGE=m -CONFIG_BLK_DEV_SIS5513=m -CONFIG_BLK_DEV_SLC90E66=m -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=m -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_ISCSI_TARGET=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC94XX=m -CONFIG_AIC94XX_DEBUG=y -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_QLOGIC=m -CONFIG_PCMCIA_SYM53C500=m - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_ATA_ACPI=y -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -CONFIG_PATA_ARTOP=m -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CYPRESS is not set -CONFIG_PATA_EFAR=m -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -CONFIG_PATA_HPT37X=m -CONFIG_PATA_HPT3X2N=m -# CONFIG_PATA_HPT3X3 is not set -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -CONFIG_PATA_NETCELL=m -# CONFIG_PATA_NS87410 is not set -CONFIG_PATA_OPTI=m -CONFIG_PATA_OPTIDMA=m -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -CONFIG_PATA_RADISYS=m -CONFIG_PATA_RZ1000=m -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -# CONFIG_PATA_PDC2027X is not set -CONFIG_PATA_SIL680=m -# CONFIG_PATA_SIS is not set -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_HP_SW=m -CONFIG_DM_MULTIPATH_RDAC=m -CONFIG_DM_NL_EVT=y - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -CONFIG_FUSION_MAX_FC_SGE=256 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y -CONFIG_IEEE1394_EXPORT_FULL_API=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -CONFIG_ARCNET_CAP=m -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -# CONFIG_ARCNET_COM20020 is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -# CONFIG_AMD8111E_NAPI is not set -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -# CONFIG_R8169_NAPI is not set -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_ABYSS=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NET_FC=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=m -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_COMPUTONE=m -CONFIG_ROCKETPORT=m -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -CONFIG_DIGIEPCA=m -CONFIG_MOXA_INTELLIO=m -CONFIG_MOXA_SMARTIO=m -CONFIG_ISI=m -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -CONFIG_SPECIALIX=m -# CONFIG_SPECIALIX_RTSCTS is not set -CONFIG_SX=m -CONFIG_STALDRV=y -CONFIG_NOZOMI=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=64 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -# CONFIG_IPMI_PANIC_STRING is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_IBMASR=m -CONFIG_WAFER_WDT=m -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_SBC8360_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -CONFIG_SBC_EPX_C3_WATCHDOG=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=m -CONFIG_DRM=m -CONFIG_DRM_TDFX=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -# CONFIG_DRM_I830 is not set -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -CONFIG_HPET_MMAP=y -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_ATMEL=m -CONFIG_TELCLOCK=m -CONFIG_CRASHER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -CONFIG_I2C_PCA_ISA=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -CONFIG_SENSORS_MAX6875=m -CONFIG_RTC_X1205_I2C=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=m -CONFIG_SPI_BUTTERFLY=m - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -CONFIG_W1=m -CONFIG_W1_MATROX=m -CONFIG_W1_DS9490=m -CONFIG_W1_DS9490_BRIDGE=m -CONFIG_W1_THERM=m -CONFIG_W1_SMEM=m -CONFIG_W1_DS2433=m -CONFIG_W1_DS2433_CRC=y - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_PC87427=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y -CONFIG_VIDEO_SAA6588=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_SAA7134_ALSA=m -# CONFIG_VIDEO_SAA7134_OSS is not set -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m -CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_CX88_VP3054=m -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_VIDEO_AUDIO_DECODER=m -CONFIG_VIDEO_DECODER=m - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -# CONFIG_DVB_CINERGYT2_TUNING is not set - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terresterial DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -CONFIG_FB_CYBER2000=m -CONFIG_FB_ARC=m -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_HGA_ACCEL=y -CONFIG_FB_S1D13XXX=m -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -CONFIG_FB_RIVA_I2C=y -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GENERIC_LCD=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_3DFX_ACCEL=y -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_TRIDENT_ACCEL=y -CONFIG_FB_GEODE=y -CONFIG_FB_GEODE_GX1=m -CONFIG_FB_VIRTUAL=m - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_OBSOLETE_OSS_DRIVER=y -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -# CONFIG_SOUND_SB is not set -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_ITMTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_YEALINK=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_ET61X251=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_ZD1201=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ANYDATA=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_BERRY_CHARGE=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_WBSD=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_MTHCA=m -# CONFIG_INFINIBAND_MTHCA_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_DEBUG is not set -CONFIG_INFINIBAND_SRP=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y -CONFIG_DMA_TESTCLIENT=m - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=m -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_XFS_RT=y -# CONFIG_XFS_DEBUG is not set -# CONFIG_XFS_TRACE is not set -CONFIG_OCFS2_FS=m -CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -CONFIG_NTFS_RW=y - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS_PROC_FS=y -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_STATS2=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m -CONFIG_9P_FS=m -CONFIG_GENERIC_ACL=y - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_FORCED_INLINING=y -CONFIG_RCU_TORTURE_TEST=m -# CONFIG_LKCD_DUMP is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_KDB is not set -# CONFIG_IOMMU_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SECLVL=m -# CONFIG_SECURITY_SELINUX is not set -CONFIG_SECURITY_APPARMOR=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64.config deleted file mode 100644 index d5e00e788c..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64.config +++ /dev/null @@ -1,3046 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.46 -# Tue Jul 3 18:30:50 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SUSE_KERNEL=y -CONFIG_SLE_VERSION=10 -CONFIG_SLE_SP=1 -CONFIG_SLE_SP_SUBLEVEL=0 -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASKSTATS=y -CONFIG_TASK_XACCT=y -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=m - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -# CONFIG_X86_64_XEN is not set -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -# CONFIG_SMP is not set -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_GART_IOMMU=y -CONFIG_CALGARY_IOMMU=y -# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_INTEL=y -CONFIG_X86_MCE_AMD=y -CONFIG_KEXEC=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_SLEEP_PROC_SLEEP=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_SONY=m -CONFIG_ACPI_PCC=m -# CONFIG_ACPI_CUSTOM_DSDT is not set -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=m -CONFIG_ACPI_HOTPLUG_MEMORY=y -CONFIG_ACPI_INITRD=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=m -# CONFIG_CPU_FREQ_DEBUG is not set -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_UNORDERED_IO is not set -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=m -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=m -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -CONFIG_I82092=m -CONFIG_PCCARD_NONSTATIC=m - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m -CONFIG_IA32_EMULATION=y -CONFIG_IA32_AOUT=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=m -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_IPV4OPTIONS=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_POLICY=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DECnet: Netfilter Configuration -# -# CONFIG_DECNET_NF_GRABULATOR is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_IP_DCCP_UNLOAD_HACK is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -# CONFIG_DECNET_ROUTER is not set -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -CONFIG_IPX_INTERN=y -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_MKISS=m -CONFIG_6PACK=m -CONFIG_BPQETHER=m -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_YAM=m -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# -# CONFIG_IRPORT_SIR is not set - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -# CONFIG_STANDALONE is not set -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_AMDSTD_RETRY=1 -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -# CONFIG_MTD_PNC2000 is not set -# CONFIG_MTD_SC520CDP is not set -# CONFIG_MTD_NETSC520 is not set -CONFIG_MTD_TS5500=m -# CONFIG_MTD_SBC_GXX is not set -CONFIG_MTD_AMD76XROM=m -CONFIG_MTD_ICHXROM=m -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_PHRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCECC=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -CONFIG_MTD_ONENAND=m -# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=128000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -CONFIG_CDROM_PKTCDVD_WCACHE=y -CONFIG_CIPHER_TWOFISH=m -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=m -CONFIG_BLK_DEV_IDE=m - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=m -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=m -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEACPI=y -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=m -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=m -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=m -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=m -CONFIG_BLK_DEV_ALI15X3=m -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=m -CONFIG_BLK_DEV_ATIIXP=m -CONFIG_BLK_DEV_CMD64X=m -CONFIG_BLK_DEV_TRIFLEX=m -CONFIG_BLK_DEV_CY82C693=m -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=m -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=m -CONFIG_BLK_DEV_SC1200=m -CONFIG_BLK_DEV_PIIX=m -CONFIG_BLK_DEV_IT821X=m -CONFIG_BLK_DEV_NS87415=m -CONFIG_BLK_DEV_PDC202XX_OLD=m -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=m -CONFIG_BLK_DEV_SVWKS=m -CONFIG_BLK_DEV_SIIMAGE=m -CONFIG_BLK_DEV_SIS5513=m -CONFIG_BLK_DEV_SLC90E66=m -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=m -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_ISCSI_TARGET=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC94XX=m -CONFIG_AIC94XX_DEBUG=y -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_QLOGIC=m -CONFIG_PCMCIA_SYM53C500=m - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_ATA_ACPI=y -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -CONFIG_PATA_ARTOP=m -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CYPRESS is not set -CONFIG_PATA_EFAR=m -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -CONFIG_PATA_HPT37X=m -CONFIG_PATA_HPT3X2N=m -# CONFIG_PATA_HPT3X3 is not set -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -CONFIG_PATA_NETCELL=m -# CONFIG_PATA_NS87410 is not set -CONFIG_PATA_OPTI=m -CONFIG_PATA_OPTIDMA=m -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -CONFIG_PATA_RADISYS=m -CONFIG_PATA_RZ1000=m -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -# CONFIG_PATA_PDC2027X is not set -CONFIG_PATA_SIL680=m -# CONFIG_PATA_SIS is not set -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_HP_SW=m -CONFIG_DM_MULTIPATH_RDAC=m -CONFIG_DM_NL_EVT=y - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -CONFIG_FUSION_MAX_FC_SGE=256 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y -CONFIG_IEEE1394_EXPORT_FULL_API=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -CONFIG_ARCNET_CAP=m -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -# CONFIG_ARCNET_COM20020 is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -# CONFIG_AMD8111E_NAPI is not set -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -# CONFIG_R8169_NAPI is not set -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_ABYSS=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NET_FC=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -# CONFIG_HYSDN is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=m -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_COMPUTONE=m -CONFIG_ROCKETPORT=m -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -CONFIG_DIGIEPCA=m -CONFIG_MOXA_INTELLIO=m -CONFIG_MOXA_SMARTIO=m -CONFIG_ISI=m -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -CONFIG_SPECIALIX=m -# CONFIG_SPECIALIX_RTSCTS is not set -CONFIG_SX=m -CONFIG_STALDRV=y -# CONFIG_STALLION is not set -# CONFIG_ISTALLION is not set -CONFIG_NOZOMI=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=64 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -# CONFIG_IPMI_PANIC_STRING is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_IBMASR=m -CONFIG_WAFER_WDT=m -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_SBC8360_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -CONFIG_SBC_EPX_C3_WATCHDOG=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=m -CONFIG_DRM=m -CONFIG_DRM_TDFX=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -# CONFIG_DRM_I830 is not set -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -CONFIG_HPET_MMAP=y -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_ATMEL=m -CONFIG_TELCLOCK=m -CONFIG_CRASHER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -CONFIG_I2C_PCA_ISA=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -CONFIG_SENSORS_MAX6875=m -CONFIG_RTC_X1205_I2C=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=m -CONFIG_SPI_BUTTERFLY=m - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -CONFIG_W1=m -CONFIG_W1_MATROX=m -CONFIG_W1_DS9490=m -CONFIG_W1_DS9490_BRIDGE=m -CONFIG_W1_THERM=m -CONFIG_W1_SMEM=m -CONFIG_W1_DS2433=m -CONFIG_W1_DS2433_CRC=y - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_PC87427=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y -CONFIG_VIDEO_SAA6588=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_SAA7134_ALSA=m -# CONFIG_VIDEO_SAA7134_OSS is not set -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m -CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_CX88_VP3054=m -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_VIDEO_AUDIO_DECODER=m -CONFIG_VIDEO_DECODER=m - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -# CONFIG_DVB_CINERGYT2_TUNING is not set - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terresterial DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -CONFIG_FB_CYBER2000=m -CONFIG_FB_ARC=m -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_HGA_ACCEL=y -CONFIG_FB_S1D13XXX=m -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -CONFIG_FB_RIVA_I2C=y -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GENERIC_LCD=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_3DFX_ACCEL=y -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_TRIDENT_ACCEL=y -CONFIG_FB_GEODE=y -CONFIG_FB_GEODE_GX1=m -CONFIG_FB_VIRTUAL=m - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_OBSOLETE_OSS_DRIVER=y -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -# CONFIG_SOUND_SB is not set -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_ITMTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_YEALINK=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_ET61X251=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_ZD1201=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ANYDATA=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_BERRY_CHARGE=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_WBSD=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_MTHCA=m -# CONFIG_INFINIBAND_MTHCA_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_DEBUG is not set -CONFIG_INFINIBAND_SRP=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y -CONFIG_DMA_TESTCLIENT=m - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=m -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_XFS_RT=y -# CONFIG_XFS_DEBUG is not set -# CONFIG_XFS_TRACE is not set -CONFIG_OCFS2_FS=m -CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -CONFIG_NTFS_RW=y - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS_PROC_FS=y -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_STATS2=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m -CONFIG_9P_FS=m -CONFIG_GENERIC_ACL=y - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=18 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_FORCED_INLINING=y -CONFIG_RCU_TORTURE_TEST=m -# CONFIG_LKCD_DUMP is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_KDB is not set -# CONFIG_IOMMU_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SECLVL=m -# CONFIG_SECURITY_SELINUX is not set -CONFIG_SECURITY_APPARMOR=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686-smp.config deleted file mode 100644 index 24286e7cd4..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686-smp.config +++ /dev/null @@ -1,3094 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-prep -# Sat Nov 24 08:00:02 2007 -# -CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Process debugging support -# -CONFIG_PTRACE=y -CONFIG_UTRACE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_SMP=y -# CONFIG_X86_PC is not set -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -CONFIG_X86_GENERICARCH=y -# CONFIG_X86_ES7000 is not set -CONFIG_X86_CYCLONE_TIMER=y -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_TICK_DIVIDER=y -CONFIG_NR_CPUS=32 -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_X86_MCE_P4THERMAL=y -CONFIG_VM86=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -# CONFIG_X86_REBOOTFIXUPS is not set -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m -# CONFIG_SWIOTLB is not set - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_EFI_VARS=y -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -# CONFIG_IRQBALANCE is not set -CONFIG_BOOT_IOREMAP=y -CONFIG_REGPARM=y -# CONFIG_SECCOMP is not set -# CONFIG_VGA_NOPROBE is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_RELOCATABLE=y -CONFIG_PHYSICAL_ALIGN=0x400000 -CONFIG_HOTPLUG_CPU=y -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_BAY=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_IBM_BAY=y -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=1999 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -# CONFIG_APM_DO_ENABLE is not set -CONFIG_APM_CPU_IDLE=y -# CONFIG_APM_DISPLAY_BLANK is not set -CONFIG_APM_RTC_IS_GMT=y -# CONFIG_APM_ALLOW_INTS is not set -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_POWERNOW_K6 is not set -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_GX_SUSPMOD is not set -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_ICH=y -CONFIG_X86_SPEEDSTEP_SMI=y -CONFIG_X86_P4_CLOCKMOD=m -# CONFIG_X86_CPUFREQ_NFORCE2 is not set -CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -# CONFIG_ISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set -CONFIG_K8_NB=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_SUBTREES is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_ROUTE_FWMARK=y -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_NETLABEL=y -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_NET_WIRELESS_RTNETLINK=y -CONFIG_MAC80211=m -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -CONFIG_MAC80211_DEBUG=y -# CONFIG_MAC80211_VERBOSE_DEBUG is not set -# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set -# CONFIG_TKIP_DEBUG is not set -# CONFIG_MAC80211_DEBUG_COUNTERS is not set -# CONFIG_MAC80211_IBSS_DEBUG is not set -# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_CS5535=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CS5535 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set -CONFIG_ATA_INTEL_COMBINED=y - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_RDAC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T3=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y -CONFIG_IWLWIFI=y -CONFIG_IWLWIFI_DEBUG=y -CONFIG_IWL4965=m -# CONFIG_IWL3945 is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_PCMCIA_IBMTR=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_WISTRON_BTNS=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_CS5535_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_MEYE is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -# CONFIG_FB_IMAC is not set -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_I810_I2C=y -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -CONFIG_FB_CYBLA=m -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_MTS64 is not set -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -# CONFIG_SND_PORTMAN2X4 is not set - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# SoC audio support -# -# CONFIG_SND_SOC is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -CONFIG_DLM_DEBUG=y - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_HIGHMEM=y -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FRAME_POINTER is not set -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y - -# -# Page alloc debug is incompatible with Software Suspend on i386 -# -CONFIG_DEBUG_RODATA=y -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y -CONFIG_DOUBLEFAULT=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# -CONFIG_CRYPTO_DEV_PADLOCK=m -CONFIG_CRYPTO_DEV_PADLOCK_AES=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config deleted file mode 100644 index 16b233dd7a..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config +++ /dev/null @@ -1,3081 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-prep -# Sat Nov 24 08:01:09 2007 -# -CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y - -# -# Process debugging support -# -CONFIG_PTRACE=y -CONFIG_UTRACE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -# CONFIG_SMP is not set -CONFIG_X86_PC=y -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_TICK_DIVIDER=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -# CONFIG_X86_UP_APIC is not set -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_VM86=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -# CONFIG_X86_REBOOTFIXUPS is not set -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m -# CONFIG_SWIOTLB is not set - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_EFI_VARS=y -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -CONFIG_BOOT_IOREMAP=y -CONFIG_REGPARM=y -# CONFIG_SECCOMP is not set -# CONFIG_VGA_NOPROBE is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_RELOCATABLE=y -CONFIG_PHYSICAL_ALIGN=0x400000 -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_BAY=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_IBM_BAY=y -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=1999 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -# CONFIG_APM_DO_ENABLE is not set -CONFIG_APM_CPU_IDLE=y -# CONFIG_APM_DISPLAY_BLANK is not set -CONFIG_APM_RTC_IS_GMT=y -# CONFIG_APM_ALLOW_INTS is not set -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_POWERNOW_K6 is not set -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_GX_SUSPMOD is not set -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_ICH=y -CONFIG_X86_SPEEDSTEP_SMI=y -CONFIG_X86_P4_CLOCKMOD=m -# CONFIG_X86_CPUFREQ_NFORCE2 is not set -CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -# CONFIG_ISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set -CONFIG_K8_NB=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_SUBTREES is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_ROUTE_FWMARK=y -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_NETLABEL=y -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_NET_WIRELESS_RTNETLINK=y -CONFIG_MAC80211=m -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -CONFIG_MAC80211_DEBUG=y -# CONFIG_MAC80211_VERBOSE_DEBUG is not set -# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set -# CONFIG_TKIP_DEBUG is not set -# CONFIG_MAC80211_DEBUG_COUNTERS is not set -# CONFIG_MAC80211_IBSS_DEBUG is not set -# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_CS5535=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CS5535 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set -CONFIG_ATA_INTEL_COMBINED=y - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_RDAC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T3=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y -CONFIG_IWLWIFI=y -CONFIG_IWLWIFI_DEBUG=y -CONFIG_IWL4965=m -# CONFIG_IWL3945 is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_PCMCIA_IBMTR=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -# CONFIG_HYSDN is not set - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_WISTRON_BTNS=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_CS5535_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_MEYE is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -# CONFIG_FB_IMAC is not set -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_I810_I2C=y -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -CONFIG_FB_CYBLA=m -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_MTS64 is not set -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -# CONFIG_SND_PORTMAN2X4 is not set - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# SoC audio support -# -# CONFIG_SND_SOC is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -CONFIG_DLM_DEBUG=y - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_HIGHMEM=y -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FRAME_POINTER is not set -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y - -# -# Page alloc debug is incompatible with Software Suspend on i386 -# -CONFIG_DEBUG_RODATA=y -# CONFIG_4KSTACKS is not set -CONFIG_DOUBLEFAULT=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# -CONFIG_CRYPTO_DEV_PADLOCK=m -CONFIG_CRYPTO_DEV_PADLOCK_AES=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64-smp.config deleted file mode 100644 index 057c8574b2..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64-smp.config +++ /dev/null @@ -1,2733 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-prep -# Sat Nov 24 07:57:21 2007 -# -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Process debugging support -# -CONFIG_PTRACE=y -CONFIG_UTRACE=y - -# -# Block layer -# -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_SWIOTLB=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_DMI=y -CONFIG_EFI=y -CONFIG_GENERIC_IOMAP=y -# CONFIG_XEN is not set -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_IA64_UNCACHED_ALLOCATOR=y -CONFIG_DMA_IS_DMA32=y -CONFIG_AUDIT_ARCH=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_HP_ZX1_SWIOTLB is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_IA64_XEN is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_PGTABLE_3=y -# CONFIG_PGTABLE_4 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_IA64_L1_CACHE_SHIFT=7 -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_IA64_SGI_SN_XP=m -CONFIG_FORCE_MAX_ZONEORDER=17 -CONFIG_SMP=y -CONFIG_NR_CPUS=1024 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_SCHED_SMT=y -# CONFIG_PERMIT_BSP_REMOVE is not set -# CONFIG_PREEMPT is not set -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_MEMORY_HOTPLUG=y -CONFIG_MEMORY_HOTPLUG_SPARSE=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y -CONFIG_NUMA=y -CONFIG_NODES_SHIFT=10 -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y -# CONFIG_IA32_SUPPORT is not set -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y -CONFIG_SGI_SN=y - -# -# SN Devices -# -CONFIG_SGI_IOC4=y -CONFIG_SGI_IOC3=m -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y - -# -# Firmware Drivers -# -CONFIG_EFI_VARS=y -CONFIG_EFI_PCDP=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -# CONFIG_ACPI_DOCK is not set -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_HOTPLUG_MEMORY=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=m -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_IA64_ACPI_CPUFREQ=m - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SGI=m - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_SUBTREES is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_ROUTE_FWMARK=y -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_NETLABEL=y -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_NET_WIRELESS_RTNETLINK=y -CONFIG_MAC80211=m -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -CONFIG_MAC80211_DEBUG=y -# CONFIG_MAC80211_VERBOSE_DEBUG is not set -# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set -# CONFIG_TKIP_DEBUG is not set -# CONFIG_MAC80211_DEBUG_COUNTERS is not set -# CONFIG_MAC80211_IBSS_DEBUG is not set -# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_IDE_MAX_HWIFS=4 -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=y -CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set -CONFIG_ATA_INTEL_COMBINED=y - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_RDAC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T3=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -# CONFIG_BCM43XX is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y -CONFIG_IWLWIFI=y -CONFIG_IWLWIFI_DEBUG=y -CONFIG_IWL4965=m -# CONFIG_IWL3945 is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set -CONFIG_SGI_SNSC=y -CONFIG_SGI_TIOCX=y -CONFIG_SGI_MBCS=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=16 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_SGI_L1_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_SERIAL_SGI_IOC4=m -CONFIG_SERIAL_SGI_IOC3=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -CONFIG_EFI_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_I460=y -CONFIG_AGP_HP_ZX1=y -CONFIG_AGP_SGI_TIOCA=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=y - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -CONFIG_I2C_STUB=m -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_MTS64 is not set -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -# CONFIG_SND_PORTMAN2X4 is not set - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# SoC audio support -# -# CONFIG_SND_SOC is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -CONFIG_DLM_DEBUG=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_IRQ_PER_CPU=y - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config deleted file mode 100644 index d4e7b3ce1d..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config +++ /dev/null @@ -1,2729 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-prep -# Sat Nov 24 07:58:17 2007 -# -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y - -# -# Process debugging support -# -CONFIG_PTRACE=y -CONFIG_UTRACE=y - -# -# Block layer -# -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_SWIOTLB=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_DMI=y -CONFIG_EFI=y -CONFIG_GENERIC_IOMAP=y -# CONFIG_XEN is not set -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_IA64_UNCACHED_ALLOCATOR=y -CONFIG_DMA_IS_DMA32=y -CONFIG_AUDIT_ARCH=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_HP_ZX1_SWIOTLB is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_IA64_XEN is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_PGTABLE_3=y -# CONFIG_PGTABLE_4 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_IA64_L1_CACHE_SHIFT=7 -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_IA64_SGI_SN_XP=m -CONFIG_FORCE_MAX_ZONEORDER=17 -# CONFIG_SMP is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -# CONFIG_PREEMPT is not set -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_MEMORY_HOTPLUG=y -CONFIG_MEMORY_HOTPLUG_SPARSE=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y -CONFIG_NUMA=y -CONFIG_NODES_SHIFT=10 -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y -# CONFIG_IA32_SUPPORT is not set -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y -CONFIG_SGI_SN=y - -# -# SN Devices -# -CONFIG_SGI_IOC4=y -CONFIG_SGI_IOC3=m -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y - -# -# Firmware Drivers -# -CONFIG_EFI_VARS=y -CONFIG_EFI_PCDP=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -# CONFIG_ACPI_DOCK is not set -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_HOTPLUG_MEMORY=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=m -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_IA64_ACPI_CPUFREQ=m - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SGI=m - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_SUBTREES is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_ROUTE_FWMARK=y -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_NETLABEL=y -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_NET_WIRELESS_RTNETLINK=y -CONFIG_MAC80211=m -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -CONFIG_MAC80211_DEBUG=y -# CONFIG_MAC80211_VERBOSE_DEBUG is not set -# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set -# CONFIG_TKIP_DEBUG is not set -# CONFIG_MAC80211_DEBUG_COUNTERS is not set -# CONFIG_MAC80211_IBSS_DEBUG is not set -# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_IDE_MAX_HWIFS=4 -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=y -CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set -CONFIG_ATA_INTEL_COMBINED=y - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_RDAC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T3=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -# CONFIG_BCM43XX is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y -CONFIG_IWLWIFI=y -CONFIG_IWLWIFI_DEBUG=y -CONFIG_IWL4965=m -# CONFIG_IWL3945 is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -# CONFIG_HYSDN is not set - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set -CONFIG_SGI_SNSC=y -CONFIG_SGI_TIOCX=y -CONFIG_SGI_MBCS=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=16 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_SGI_L1_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_SERIAL_SGI_IOC4=m -CONFIG_SERIAL_SGI_IOC3=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -CONFIG_EFI_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_I460=y -CONFIG_AGP_HP_ZX1=y -CONFIG_AGP_SGI_TIOCA=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=y - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -CONFIG_I2C_STUB=m -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_MTS64 is not set -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -# CONFIG_SND_PORTMAN2X4 is not set - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# SoC audio support -# -# CONFIG_SND_SOC is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -CONFIG_DLM_DEBUG=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_IRQ_PER_CPU=y - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config deleted file mode 100644 index 10310a3df4..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config +++ /dev/null @@ -1,2974 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-prep -# Sat Nov 24 07:53:07 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Process debugging support -# -CONFIG_PTRACE=y -CONFIG_UTRACE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -# CONFIG_X86_64_XEN is not set -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_HT=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_NUMA=y -CONFIG_K8_NUMA=y -CONFIG_NODES_SHIFT=6 -CONFIG_X86_64_ACPI_NUMA=y -# CONFIG_NUMA_EMU is not set -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_MEMORY_PROBE=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_MEMORY_HOTPLUG=y - -# -# Memory hotplug is not guaranteed to work with Software Suspend -# -CONFIG_MEMORY_HOTPLUG_SPARSE=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_NR_CPUS=255 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_TRACK_DIRTY_PAGES=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_TICK_DIVIDER=y -CONFIG_IOMMU=y -CONFIG_CALGARY_IOMMU=y -# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_INTEL=y -CONFIG_X86_MCE_AMD=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -# CONFIG_SECCOMP is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_REORDER=y -CONFIG_K8_NB=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y -CONFIG_GENERIC_PENDING_IRQ=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_BAY=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_IBM_BAY=y -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_HOTPLUG_MEMORY=m -CONFIG_ACPI_SBS=m - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_SUBTREES is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_ROUTE_FWMARK=y -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_NETLABEL=y -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_NET_WIRELESS_RTNETLINK=y -CONFIG_MAC80211=m -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -CONFIG_MAC80211_DEBUG=y -# CONFIG_MAC80211_VERBOSE_DEBUG is not set -# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set -# CONFIG_TKIP_DEBUG is not set -# CONFIG_MAC80211_DEBUG_COUNTERS is not set -# CONFIG_MAC80211_IBSS_DEBUG is not set -# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set -CONFIG_ATA_INTEL_COMBINED=y - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_RDAC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T3=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y -CONFIG_IWLWIFI=y -CONFIG_IWLWIFI_DEBUG=y -CONFIG_IWL4965=m -# CONFIG_IWL3945 is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_MTS64 is not set -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -# CONFIG_SND_PORTMAN2X4 is not set - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# SoC audio support -# -# CONFIG_SND_SOC is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -CONFIG_DLM_DEBUG=y - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FRAME_POINTER is not set -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_IOMMU_DEBUG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config deleted file mode 100644 index 226d89036f..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config +++ /dev/null @@ -1,2958 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-prep -# Sat Nov 24 07:56:00 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y - -# -# Process debugging support -# -CONFIG_PTRACE=y -CONFIG_UTRACE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -# CONFIG_X86_64_XEN is not set -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -# CONFIG_SMP is not set -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_MEMORY_PROBE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_MEMORY_HOTPLUG=y - -# -# Memory hotplug is not guaranteed to work with Software Suspend -# -CONFIG_MEMORY_HOTPLUG_SPARSE=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_TRACK_DIRTY_PAGES=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_TICK_DIVIDER=y -CONFIG_IOMMU=y -CONFIG_CALGARY_IOMMU=y -# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_INTEL=y -CONFIG_X86_MCE_AMD=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -# CONFIG_SECCOMP is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_REORDER=y -CONFIG_K8_NB=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_BAY=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_IBM_BAY=y -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_HOTPLUG_MEMORY=m -CONFIG_ACPI_SBS=m - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_SUBTREES is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_ROUTE_FWMARK=y -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_NETLABEL=y -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_NET_WIRELESS_RTNETLINK=y -CONFIG_MAC80211=m -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -CONFIG_MAC80211_DEBUG=y -# CONFIG_MAC80211_VERBOSE_DEBUG is not set -# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set -# CONFIG_TKIP_DEBUG is not set -# CONFIG_MAC80211_DEBUG_COUNTERS is not set -# CONFIG_MAC80211_IBSS_DEBUG is not set -# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -# CONFIG_PATA_SERVERWORKS is not set -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set -CONFIG_ATA_INTEL_COMBINED=y - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_MULTIPATH_RDAC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T3=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y -CONFIG_IWLWIFI=y -CONFIG_IWLWIFI_DEBUG=y -CONFIG_IWL4965=m -# CONFIG_IWL3945 is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -# CONFIG_HYSDN is not set - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_MTS64 is not set -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -# CONFIG_SND_PORTMAN2X4 is not set - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# SoC audio support -# -# CONFIG_SND_SOC is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -CONFIG_DLM_DEBUG=y - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FRAME_POINTER is not set -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_IOMMU_DEBUG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686-smp.config deleted file mode 100644 index bb8485425e..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686-smp.config +++ /dev/null @@ -1,2936 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.8 -# Wed Aug 29 15:44:54 2007 -# -CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_SMP=y -# CONFIG_X86_PC is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -CONFIG_X86_GENERICARCH=y -# CONFIG_X86_ES7000 is not set -CONFIG_X86_CYCLONE_TIMER=y -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_NR_CPUS=32 -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_NONFATAL=y -CONFIG_X86_MCE_P4THERMAL=y -CONFIG_VM86=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -# CONFIG_X86_REBOOTFIXUPS is not set -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_EFI_VARS=y -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -# CONFIG_IRQBALANCE is not set -CONFIG_BOOT_IOREMAP=y -CONFIG_REGPARM=y -# CONFIG_SECCOMP is not set -CONFIG_HZ_100=y -# CONFIG_HZ_250 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=100 -CONFIG_KEXEC=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -CONFIG_HOTPLUG_CPU=y -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -# CONFIG_APM_DO_ENABLE is not set -CONFIG_APM_CPU_IDLE=y -# CONFIG_APM_DISPLAY_BLANK is not set -CONFIG_APM_RTC_IS_GMT=y -# CONFIG_APM_ALLOW_INTS is not set -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_POWERNOW_K6 is not set -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_GX_SUSPMOD is not set -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_ICH=y -CONFIG_X86_SPEEDSTEP_SMI=y -CONFIG_X86_P4_CLOCKMOD=m -# CONFIG_X86_CPUFREQ_NFORCE2 is not set -CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -# CONFIG_ISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set -CONFIG_K8_NB=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_CS5535=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=m -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_MV=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIL24=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_SATA_INTEL_COMBINED=y -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_PCMCIA_IBMTR=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_WISTRON_BTNS=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_CS5535_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_MEYE is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -# CONFIG_FB_VESA is not set -# CONFIG_FB_IMAC is not set -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_I810_I2C=y -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -CONFIG_FB_CYBLA=m -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=850 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_UNWIND_INFO is not set -# CONFIG_FORCED_INLINING is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y - -# -# Page alloc debug is incompatible with Software Suspend on i386 -# -CONFIG_DEBUG_RODATA=y -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y -CONFIG_DOUBLEFAULT=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# -CONFIG_CRYPTO_DEV_PADLOCK=m -CONFIG_CRYPTO_DEV_PADLOCK_AES=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686.config deleted file mode 100644 index 96c2171cf1..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686.config +++ /dev/null @@ -1,2956 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.8 -# Wed Aug 29 17:42:10 2007 -# -CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -# CONFIG_SMP is not set -CONFIG_X86_PC=y -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_X86_UP_APIC=y -CONFIG_X86_UP_IOAPIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_NONFATAL=y -# CONFIG_X86_MCE_P4THERMAL is not set -CONFIG_VM86=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -# CONFIG_X86_REBOOTFIXUPS is not set -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_EFI_VARS=y -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -CONFIG_BOOT_IOREMAP=y -CONFIG_REGPARM=y -# CONFIG_SECCOMP is not set -CONFIG_HZ_100=y -# CONFIG_HZ_250 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=100 -CONFIG_KEXEC=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x100000 -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -# CONFIG_APM_DO_ENABLE is not set -CONFIG_APM_CPU_IDLE=y -# CONFIG_APM_DISPLAY_BLANK is not set -CONFIG_APM_RTC_IS_GMT=y -# CONFIG_APM_ALLOW_INTS is not set -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_POWERNOW_K6 is not set -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_GX_SUSPMOD is not set -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_ICH=y -CONFIG_X86_SPEEDSTEP_SMI=y -CONFIG_X86_P4_CLOCKMOD=m -# CONFIG_X86_CPUFREQ_NFORCE2 is not set -CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -# CONFIG_ISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set -CONFIG_K8_NB=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_CS5535=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=m -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_MV=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIL24=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_SATA_INTEL_COMBINED=y -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -CONFIG_PCMCIA_XIRTULIP=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_PCMCIA_IBMTR=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DRV_LOOP=m -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_HYSDN=m -# CONFIG_HYSDN_CAPI is not set - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_WISTRON_BTNS=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -CONFIG_RISCOM8=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -CONFIG_FTAPE=m -CONFIG_ZFTAPE=m -CONFIG_ZFT_DFLT_BLK_SZ=10240 - -# -# The compressor will be built as a module only! -# -CONFIG_ZFT_COMPRESSOR=m -CONFIG_FT_NR_BUFFERS=3 -CONFIG_FT_PROC_FS=y -CONFIG_FT_NORMAL_DEBUG=y -# CONFIG_FT_FULL_DEBUG is not set -# CONFIG_FT_NO_TRACE is not set -# CONFIG_FT_NO_TRACE_AT_ALL is not set - -# -# Hardware configuration -# -CONFIG_FT_STD_FDC=y -# CONFIG_FT_MACH2 is not set -# CONFIG_FT_PROBE_FC10 is not set -# CONFIG_FT_ALT_FDC is not set -CONFIG_FT_FDC_THR=8 -CONFIG_FT_FDC_MAX_RATE=2000 -CONFIG_FT_ALPHA_CLOCK=0 -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_CS5535_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_MEYE is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -# CONFIG_FB_VESA is not set -# CONFIG_FB_IMAC is not set -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_I810_I2C=y -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -CONFIG_FB_CYBLA=m -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=850 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_UNWIND_INFO is not set -# CONFIG_FORCED_INLINING is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y - -# -# Page alloc debug is incompatible with Software Suspend on i386 -# -CONFIG_DEBUG_RODATA=y -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y -CONFIG_DOUBLEFAULT=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# -CONFIG_CRYPTO_DEV_PADLOCK=m -CONFIG_CRYPTO_DEV_PADLOCK_AES=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64-smp.config deleted file mode 100644 index d0613a926e..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64-smp.config +++ /dev/null @@ -1,2818 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.8 -# Wed Aug 29 17:59:08 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_HT=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_NUMA=y -CONFIG_K8_NUMA=y -CONFIG_NODES_SHIFT=6 -CONFIG_X86_64_ACPI_NUMA=y -# CONFIG_NUMA_EMU is not set -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y - -# -# Memory hotplug is currently incompatible with Software Suspend -# -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_NR_CPUS=32 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_IOMMU=y -# CONFIG_CALGARY_IOMMU is not set -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_INTEL=y -CONFIG_X86_MCE_AMD=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_PHYSICAL_START=0x200000 -# CONFIG_SECCOMP is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_REORDER=y -CONFIG_K8_NB=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y -CONFIG_GENERIC_PENDING_IRQ=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -CONFIG_IA32_AOUT=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=4000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=m -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_MV=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIL24=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_SATA_INTEL_COMBINED=y -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=256 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -# CONFIG_FB_VESA is not set -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_IPATH_CORE=m -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y -# CONFIG_FORCED_INLINING is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_IOMMU_DEBUG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64.config deleted file mode 100644 index a4d598b765..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64.config +++ /dev/null @@ -1,2796 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.8 -# Wed Aug 29 18:06:13 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -# CONFIG_SMP is not set -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y - -# -# Memory hotplug is currently incompatible with Software Suspend -# -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_IOMMU=y -CONFIG_CALGARY_IOMMU=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_INTEL=y -CONFIG_X86_MCE_AMD=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_PHYSICAL_START=0x200000 -# CONFIG_SECCOMP is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -# CONFIG_REORDER is not set -CONFIG_K8_NB=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -# CONFIG_PCI_MSI is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -# CONFIG_IA32_EMULATION is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=4000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=m -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_MV=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIL24=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_SATA_INTEL_COMBINED=y -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -# CONFIG_HYSDN is not set - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=256 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -# CONFIG_FB_VESA is not set -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y -# CONFIG_FORCED_INLINING is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_IOMMU_DEBUG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_AES_X86_64 is not set -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686-bigsmp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686-bigsmp.config deleted file mode 100644 index 555489db8a..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686-bigsmp.config +++ /dev/null @@ -1,3324 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.5 -# Wed Feb 20 01:04:06 2008 -# -CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_CLOCKSOURCE_WATCHDOG=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_ZONE_DMA=y -CONFIG_QUICKLIST=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -# CONFIG_TASK_XACCT is not set -# CONFIG_UTS_NS is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CPUSETS=y -CONFIG_SYSFS_DEPRECATED=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_ANON_INODES=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLAB=y -# CONFIG_SLUB is not set -# CONFIG_SLOB is not set -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_BLOCK=y -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -# CONFIG_TICK_ONESHOT is not set -# CONFIG_NO_HZ is not set -# CONFIG_HIGH_RES_TIMERS is not set -CONFIG_SMP=y -# CONFIG_X86_PC is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -CONFIG_X86_GENERICARCH=y -# CONFIG_X86_ES7000 is not set -# CONFIG_PARAVIRT is not set -CONFIG_X86_CYCLONE_TIMER=y -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MCORE2 is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -# CONFIG_MVIAC7 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_XADD=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_X86_CMOV=y -CONFIG_X86_MINIMUM_CPU_MODEL=4 -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_NR_CPUS=32 -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_NONFATAL=y -CONFIG_X86_MCE_P4THERMAL=y -CONFIG_VM86=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_X86_REBOOTFIXUPS=y -CONFIG_MICROCODE=m -CONFIG_MICROCODE_OLD_INTERFACE=y -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_EFI_VARS=y -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_ARCH_POPULATES_NODE_MAP=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_NR_QUICK=1 -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -# CONFIG_IRQBALANCE is not set -CONFIG_BOOT_IOREMAP=y -# CONFIG_SECCOMP is not set -CONFIG_HZ_100=y -# CONFIG_HZ_250 is not set -# CONFIG_HZ_300 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=100 -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_PHYSICAL_START=0x100000 -# CONFIG_RELOCATABLE is not set -CONFIG_PHYSICAL_ALIGN=0x100000 -CONFIG_HOTPLUG_CPU=y -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_PROCFS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_BAY=m -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -# CONFIG_APM_DO_ENABLE is not set -CONFIG_APM_CPU_IDLE=y -# CONFIG_APM_DISPLAY_BLANK is not set -# CONFIG_APM_ALLOW_INTS is not set -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_POWERNOW_K6 is not set -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_GX_SUSPMOD is not set -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_ICH=y -CONFIG_X86_SPEEDSTEP_SMI=y -CONFIG_X86_P4_CLOCKMOD=m -# CONFIG_X86_CPUFREQ_NFORCE2 is not set -CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set -CONFIG_X86_E_POWERSAVER=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCIEAER=y -CONFIG_ARCH_SUPPORTS_MSI=y -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set -CONFIG_HT_IRQ=y -CONFIG_ISA_DMA_API=y -# CONFIG_ISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set -CONFIG_K8_NB=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -CONFIG_NET_KEY=m -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m -CONFIG_TCP_CONG_YEAH=m -CONFIG_TCP_CONG_ILLINOIS=m -CONFIG_DEFAULT_BIC=y -# CONFIG_DEFAULT_CUBIC is not set -# CONFIG_DEFAULT_HTCP is not set -# CONFIG_DEFAULT_VEGAS is not set -# CONFIG_DEFAULT_WESTWOOD is not set -# CONFIG_DEFAULT_RENO is not set -CONFIG_DEFAULT_TCP_CONG="bic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -# CONFIG_IPV6_MIP6 is not set -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_SIT=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_NETLABEL is not set -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NF_CONNTRACK_ENABLED=m -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CT_ACCT=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -# CONFIG_NF_CONNTRACK_EVENTS is not set -CONFIG_NF_CT_PROTO_GRE=m -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m - -# -# IP: Netfilter Configuration -# -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_NF_NAT_PROTO_GRE=m -CONFIG_NF_NAT_FTP=m -CONFIG_NF_NAT_IRC=m -CONFIG_NF_NAT_TFTP=m -CONFIG_NF_NAT_AMANDA=m -CONFIG_NF_NAT_PPTP=m -CONFIG_NF_NAT_H323=m -CONFIG_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -# CONFIG_IP_DCCP_CCID2_DEBUG is not set -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m -# CONFIG_IP_DCCP_CCID3_DEBUG is not set -CONFIG_IP_DCCP_CCID3_RTO=100 - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_NET_DCCPPROBE is not set -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_FIFO=y - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_AF_RXRPC=m -# CONFIG_AF_RXRPC_DEBUG is not set -CONFIG_RXKAD=m -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_MAC80211=m -# CONFIG_MAC80211_LEDS is not set -# CONFIG_MAC80211_DEBUGFS is not set -# CONFIG_MAC80211_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_RFKILL=m -CONFIG_RFKILL_INPUT=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLKDEVS=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m -CONFIG_SSFDC=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_ESB2ROM=m -CONFIG_MTD_CK804XROM=m -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -# CONFIG_MTD_NAND_MUSEUM_IDS is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CAFE=m -CONFIG_MTD_NAND_CS553X=m -CONFIG_MTD_NAND_NANDSIM=m -CONFIG_MTD_NAND_PLATFORM=m -# CONFIG_MTD_ONENAND is not set - -# -# UBI - Unsorted block images -# -CONFIG_MTD_UBI=m -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_RESERVE=1 -# CONFIG_MTD_UBI_GLUEBI is not set - -# -# UBI debugging options -# -# CONFIG_MTD_UBI_DEBUG is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y -CONFIG_PARPORT_NOT_PC=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# Misc devices -# -CONFIG_IBM_ASM=m -CONFIG_PHANTOM=m -CONFIG_SGI_IOC4=m -CONFIG_TIFM_CORE=m -CONFIG_TIFM_7XX1=m -CONFIG_ASUS_LAPTOP=m -CONFIG_MSI_LAPTOP=m -CONFIG_SONY_LAPTOP=m -# CONFIG_SONYPI_COMPAT is not set -CONFIG_THINKPAD_ACPI=m -# CONFIG_THINKPAD_ACPI_DEBUG is not set -CONFIG_THINKPAD_ACPI_BAY=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEACPI=y -CONFIG_IDE_TASK_IOCTL=y -CONFIG_IDE_PROC_FS=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_IDEPCI_PCIBUS_ORDER=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_CS5535=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_JMICRON=m -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8213=m -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_TC86C001=m -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_TGT=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_SCSI_WAIT_SCAN=m - -# -# SCSI Transports -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set -CONFIG_SCSI_SRP=m - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -CONFIG_PATA_ALI=m -CONFIG_PATA_AMD=m -CONFIG_PATA_ARTOP=m -CONFIG_PATA_ATIIXP=m -CONFIG_PATA_CMD640_PCI=m -CONFIG_PATA_CMD64X=m -CONFIG_PATA_CS5520=m -CONFIG_PATA_CS5530=m -CONFIG_PATA_CS5535=m -CONFIG_PATA_CYPRESS=m -CONFIG_PATA_EFAR=m -CONFIG_ATA_GENERIC=m -CONFIG_PATA_HPT366=m -CONFIG_PATA_HPT37X=m -CONFIG_PATA_HPT3X2N=m -CONFIG_PATA_HPT3X3=m -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -CONFIG_PATA_TRIFLEX=m -CONFIG_PATA_MARVELL=m -CONFIG_PATA_MPIIX=m -CONFIG_PATA_OLDPIIX=m -CONFIG_PATA_NETCELL=m -CONFIG_PATA_NS87410=m -CONFIG_PATA_OPTI=m -CONFIG_PATA_OPTIDMA=m -CONFIG_PATA_PCMCIA=m -CONFIG_PATA_PDC_OLD=m -CONFIG_PATA_RADISYS=m -CONFIG_PATA_RZ1000=m -CONFIG_PATA_SC1200=m -CONFIG_PATA_SERVERWORKS=m -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_SIL680=m -CONFIG_PATA_SIS=m -CONFIG_PATA_VIA=m -CONFIG_PATA_WINBOND=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_DELAY=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m -CONFIG_MACINTOSH_DRIVERS=y -CONFIG_MAC_EMUMOUSEBTN=y - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set -# CONFIG_ARCNET is not set -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_BROADCOM_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -# CONFIG_PCNET32_NAPI is not set -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_FORCEDETH_NAPI is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_SC92031=m -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set -CONFIG_NETDEV_1000=y -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m -CONFIG_ATL1=m -CONFIG_NETDEV_10000=y -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T1_1G=y -CONFIG_CHELSIO_T1_NAPI=y -CONFIG_CHELSIO_T3=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m -CONFIG_MLX4_CORE=m -CONFIG_MLX4_DEBUG=y -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN -# -CONFIG_WLAN_PRE80211=y -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m -CONFIG_WLAN_80211=y -# CONFIG_PCMCIA_RAYCS is not set -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -# CONFIG_LIBERTAS_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET_MII=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_DM9601=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_PCMCIA_IBMTR=m -# CONFIG_WAN is not set -CONFIG_ATM_DRIVERS=y -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLHC=m -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -CONFIG_GIGASET_M101=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_CAPI_TRACE=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y -CONFIG_INPUT_FF_MEMLESS=y -CONFIG_INPUT_POLLDEV=m - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_STOWAWAY=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_LIFEBOOK=y -CONFIG_MOUSE_PS2_TRACKPOINT=y -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_APPLETOUCH=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_JOYSTICK_XPAD=m -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_TOUCHSCREEN_PENMOUNT=m -CONFIG_TOUCHSCREEN_TOUCHRIGHT=m -CONFIG_TOUCHSCREEN_TOUCHWIN=m -CONFIG_TOUCHSCREEN_UCB1400=m -CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -CONFIG_TOUCHSCREEN_USB_EGALAX=y -CONFIG_TOUCHSCREEN_USB_PANJIT=y -CONFIG_TOUCHSCREEN_USB_3M=y -CONFIG_TOUCHSCREEN_USB_ITM=y -CONFIG_TOUCHSCREEN_USB_ETURBO=y -CONFIG_TOUCHSCREEN_USB_GUNZE=y -CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_WISTRON_BTNS=m -CONFIG_INPUT_ATLAS_BTNS=m -CONFIG_INPUT_ATI_REMOTE=m -CONFIG_INPUT_ATI_REMOTE2=m -CONFIG_INPUT_KEYSPAN_REMOTE=m -CONFIG_INPUT_POWERMATE=m -CONFIG_INPUT_YEALINK=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -CONFIG_MOXA_SMARTIO_NEW=m -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_ITCO_WDT=m -# CONFIG_ITCO_VENDOR_SUPPORT is not set -# CONFIG_SC1200_WDT is not set -CONFIG_PC87413_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_SMSC37B787_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83697HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m -CONFIG_NVRAM=y -CONFIG_RTC=y -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_SONYPI=m -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_CS5535_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set -CONFIG_DEVPORT=y -CONFIG_I2C=m -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_I2C_SIMTEC=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_TINY_USB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_AD7418=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1029=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_CORETEMP=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_MAX6650=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_PC87427=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT1211=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83793=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -CONFIG_SENSORS_APPLESMC=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Multifunction device drivers -# -CONFIG_MFD_SM501=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y -CONFIG_VIDEO_CAPTURE_DRIVERS=y -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_HELPER_CHIPS_AUTO=y -CONFIG_VIDEO_TVAUDIO=m -CONFIG_VIDEO_TDA7432=m -CONFIG_VIDEO_TDA9875=m -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_OV7670=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_TVP5150=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_BT848_DVB is not set -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_MEYE is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_IVTV=m -CONFIG_VIDEO_CAFE_CCIC=m -CONFIG_V4L_USB_DRIVERS=y -CONFIG_VIDEO_PVRUSB2=m -# CONFIG_VIDEO_PVRUSB2_29XXX is not set -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVISION=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set -CONFIG_USB_ZR364XX=m -CONFIG_RADIO_ADAPTERS=y -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m -CONFIG_DVB_CORE=m -# CONFIG_DVB_CORE_ATTACH is not set -CONFIG_DVB_CAPTURE_DRIVERS=y - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_DIB0700=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_M920X=m -CONFIG_DVB_USB_GL861=m -CONFIG_DVB_USB_AU6610=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_TTUSB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_USB_OPERA1=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -# CONFIG_DVB_CINERGYT2_TUNING is not set - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_FE_CUSTOMISE is not set - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m -CONFIG_DVB_TDA10086=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m -CONFIG_DVB_DIB7000M=m -CONFIG_DVB_DIB7000P=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_TDA10023=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Tuners/PLL support -# -CONFIG_DVB_PLL=m -CONFIG_DVB_TDA826X=m -CONFIG_DVB_TDA827X=m -CONFIG_DVB_TUNER_QT1010=m -CONFIG_DVB_TUNER_MT2060=m - -# -# Miscellaneous devices -# -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m -CONFIG_DVB_TUA6100=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_DAB=y -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_BACKLIGHT_PROGEAR=m -CONFIG_BACKLIGHT_CARILLO_RANCH=m - -# -# Display device support -# -CONFIG_DISPLAY_SUPPORT=m - -# -# Display hardware drivers -# -CONFIG_VGASTATE=m -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB_DDC=m -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -CONFIG_FB_SYS_FILLRECT=m -CONFIG_FB_SYS_COPYAREA=m -CONFIG_FB_SYS_IMAGEBLIT=m -CONFIG_FB_SYS_FOPS=m -CONFIG_FB_DEFERRED_IO=y -CONFIG_FB_SVGALIB=m -# CONFIG_FB_MACMODES is not set -CONFIG_FB_BACKLIGHT=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -# CONFIG_FB_VESA is not set -# CONFIG_FB_IMAC is not set -CONFIG_FB_HECUBA=m -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -# CONFIG_FB_NVIDIA_DEBUG is not set -CONFIG_FB_NVIDIA_BACKLIGHT=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_RIVA_BACKLIGHT=y -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_I810_I2C=y -CONFIG_FB_LE80578=m -CONFIG_FB_CARILLO_RANCH=m -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -CONFIG_FB_INTEL_I2C=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_S3=m -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -CONFIG_FB_VT8623=m -CONFIG_FB_CYBLA=m -# CONFIG_FB_TRIDENT is not set -CONFIG_FB_ARK=m -CONFIG_FB_PM3=m -# CONFIG_FB_GEODE is not set -CONFIG_FB_SM501=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_MTS64=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -CONFIG_SND_PORTMAN2X4=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m -CONFIG_SND_USB_CAIAQ=m -# CONFIG_SND_USB_CAIAQ_INPUT is not set - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# System on Chip audio support -# -CONFIG_SND_SOC=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# HID Devices -# -CONFIG_HID=y -# CONFIG_HID_DEBUG is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT_POWERBOOK=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_THRUSTMASTER_FF=y -# CONFIG_ZEROPLUS_FF is not set -CONFIG_USB_HIDDEV=y - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -CONFIG_USB_DEVICE_CLASS=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_U132_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRCABLE=m -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_MOS7720=m -CONFIG_USB_SERIAL_MOS7840=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -# CONFIG_USB_SERIAL_DEBUG is not set -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_ADUTUX=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_BERRY_CHARGE=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGET=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETMOTORCONTROL=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_FTDI_ELAN=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TRANCEVIBRATOR=m -CONFIG_USB_IOWARRIOR=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -# CONFIG_MMC_UNSAFE_RESUME is not set - -# -# MMC/SD Card Drivers -# -CONFIG_MMC_BLOCK=m - -# -# MMC/SD Host Controller Drivers -# -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m -CONFIG_MMC_TIFM_SD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_USER_MEM=y -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_MLX4_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_MAX6900=m -CONFIG_RTC_DRV_RS5C372=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -CONFIG_RTC_DRV_CMOS=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_DS1742=m -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_V3020=m - -# -# on-CPU RTC drivers -# - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Auxiliary Display support -# -CONFIG_KS0108=m -CONFIG_KS0108_PORT=0x378 -CONFIG_KS0108_DELAY=2 -CONFIG_CFAG12864B=m -CONFIG_CFAG12864B_RATE=20 - -# -# Virtualization -# -CONFIG_KVM=m -CONFIG_KVM_INTEL=m -CONFIG_KVM_AMD=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4DEV_FS=m -CONFIG_EXT4DEV_FS_XATTR=y -CONFIG_EXT4DEV_FS_POSIX_ACL=y -CONFIG_EXT4DEV_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=m -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=850 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_ECRYPT_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -# CONFIG_SUNRPC_BIND34 is not set -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y -# CONFIG_SYSV68_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -# CONFIG_DLM_DEBUG is not set - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_LKDTM is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_EARLY_PRINTK=y -# CONFIG_DEBUG_STACKOVERFLOW is not set -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Page alloc debug is incompatible with Software Suspend on i386 -# -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y -CONFIG_DOUBLEFAULT=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SELINUX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ABLKCIPHER=m -CONFIG_CRYPTO_BLKCIPHER=m -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_GF128MUL=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_LRW is not set -CONFIG_CRYPTO_CRYPTD=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_FCRYPT=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_TWOFISH_COMMON=m -CONFIG_CRYPTO_TWOFISH_586=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CAMELLIA=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# -CONFIG_CRYPTO_DEV_PADLOCK=m -CONFIG_CRYPTO_DEV_PADLOCK_AES=m -CONFIG_CRYPTO_DEV_PADLOCK_SHA=m -CONFIG_CRYPTO_DEV_GEODE=m - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC_ITU_T=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686.config deleted file mode 100644 index cc945369a6..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686.config +++ /dev/null @@ -1,3313 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.5 -# Wed Feb 20 01:06:07 2008 -# -CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_CLOCKSOURCE_WATCHDOG=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_ZONE_DMA=y -CONFIG_QUICKLIST=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -# CONFIG_TASK_XACCT is not set -# CONFIG_UTS_NS is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_ANON_INODES=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLAB=y -# CONFIG_SLUB is not set -# CONFIG_SLOB is not set -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_BLOCK=y -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -# CONFIG_TICK_ONESHOT is not set -# CONFIG_NO_HZ is not set -# CONFIG_HIGH_RES_TIMERS is not set -# CONFIG_SMP is not set -CONFIG_X86_PC=y -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_PARAVIRT is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MCORE2 is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -# CONFIG_MVIAC7 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_XADD=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_TSC=y -CONFIG_X86_CMOV=y -CONFIG_X86_MINIMUM_CPU_MODEL=4 -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -# CONFIG_X86_UP_APIC is not set -CONFIG_X86_MCE=y -CONFIG_X86_MCE_NONFATAL=y -CONFIG_VM86=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_X86_REBOOTFIXUPS=y -CONFIG_MICROCODE=m -CONFIG_MICROCODE_OLD_INTERFACE=y -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_EFI_VARS=y -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y -CONFIG_NEED_NODE_MEMMAP_SIZE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_POPULATES_NODE_MAP=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y -CONFIG_SPARSEMEM_STATIC=y - -# -# Memory hotplug is currently incompatible with Software Suspend -# -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_NR_QUICK=1 -# CONFIG_HIGHPTE is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -CONFIG_BOOT_IOREMAP=y -# CONFIG_SECCOMP is not set -CONFIG_HZ_100=y -# CONFIG_HZ_250 is not set -# CONFIG_HZ_300 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=100 -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_PHYSICAL_START=0x100000 -# CONFIG_RELOCATABLE is not set -CONFIG_PHYSICAL_ALIGN=0x100000 -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_PROCFS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_BAY=m -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -# CONFIG_APM_DO_ENABLE is not set -CONFIG_APM_CPU_IDLE=y -# CONFIG_APM_DISPLAY_BLANK is not set -# CONFIG_APM_ALLOW_INTS is not set -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_POWERNOW_K6 is not set -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_GX_SUSPMOD is not set -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_ICH=y -CONFIG_X86_SPEEDSTEP_SMI=y -CONFIG_X86_P4_CLOCKMOD=m -# CONFIG_X86_CPUFREQ_NFORCE2 is not set -CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set -CONFIG_X86_E_POWERSAVER=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCIEAER=y -# CONFIG_ARCH_SUPPORTS_MSI is not set -# CONFIG_PCI_DEBUG is not set -CONFIG_ISA_DMA_API=y -# CONFIG_ISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set -CONFIG_K8_NB=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -CONFIG_NET_KEY=m -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m -CONFIG_TCP_CONG_YEAH=m -CONFIG_TCP_CONG_ILLINOIS=m -CONFIG_DEFAULT_BIC=y -# CONFIG_DEFAULT_CUBIC is not set -# CONFIG_DEFAULT_HTCP is not set -# CONFIG_DEFAULT_VEGAS is not set -# CONFIG_DEFAULT_WESTWOOD is not set -# CONFIG_DEFAULT_RENO is not set -CONFIG_DEFAULT_TCP_CONG="bic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -# CONFIG_IPV6_MIP6 is not set -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_SIT=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_NETLABEL is not set -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NF_CONNTRACK_ENABLED=m -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CT_ACCT=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -# CONFIG_NF_CONNTRACK_EVENTS is not set -CONFIG_NF_CT_PROTO_GRE=m -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m - -# -# IP: Netfilter Configuration -# -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_NF_NAT_PROTO_GRE=m -CONFIG_NF_NAT_FTP=m -CONFIG_NF_NAT_IRC=m -CONFIG_NF_NAT_TFTP=m -CONFIG_NF_NAT_AMANDA=m -CONFIG_NF_NAT_PPTP=m -CONFIG_NF_NAT_H323=m -CONFIG_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -# CONFIG_IP_DCCP_CCID2_DEBUG is not set -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m -# CONFIG_IP_DCCP_CCID3_DEBUG is not set -CONFIG_IP_DCCP_CCID3_RTO=100 - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_NET_DCCPPROBE is not set -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_FIFO=y - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_AF_RXRPC=m -# CONFIG_AF_RXRPC_DEBUG is not set -CONFIG_RXKAD=m -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_MAC80211=m -# CONFIG_MAC80211_LEDS is not set -# CONFIG_MAC80211_DEBUGFS is not set -# CONFIG_MAC80211_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_RFKILL=m -CONFIG_RFKILL_INPUT=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLKDEVS=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m -CONFIG_SSFDC=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_ESB2ROM=m -CONFIG_MTD_CK804XROM=m -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -# CONFIG_MTD_NAND_MUSEUM_IDS is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CAFE=m -CONFIG_MTD_NAND_CS553X=m -CONFIG_MTD_NAND_NANDSIM=m -CONFIG_MTD_NAND_PLATFORM=m -# CONFIG_MTD_ONENAND is not set - -# -# UBI - Unsorted block images -# -CONFIG_MTD_UBI=m -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_RESERVE=1 -# CONFIG_MTD_UBI_GLUEBI is not set - -# -# UBI debugging options -# -# CONFIG_MTD_UBI_DEBUG is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y -CONFIG_PARPORT_NOT_PC=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# Misc devices -# -CONFIG_IBM_ASM=m -CONFIG_PHANTOM=m -CONFIG_SGI_IOC4=m -CONFIG_TIFM_CORE=m -CONFIG_TIFM_7XX1=m -CONFIG_ASUS_LAPTOP=m -CONFIG_MSI_LAPTOP=m -CONFIG_SONY_LAPTOP=m -# CONFIG_SONYPI_COMPAT is not set -CONFIG_THINKPAD_ACPI=m -# CONFIG_THINKPAD_ACPI_DEBUG is not set -CONFIG_THINKPAD_ACPI_BAY=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEACPI=y -CONFIG_IDE_TASK_IOCTL=y -CONFIG_IDE_PROC_FS=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_IDEPCI_PCIBUS_ORDER=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_CS5535=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_JMICRON=m -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8213=m -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_TC86C001=m -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_TGT=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_SCSI_WAIT_SCAN=m - -# -# SCSI Transports -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set -CONFIG_SCSI_SRP=m - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -CONFIG_PATA_ALI=m -CONFIG_PATA_AMD=m -CONFIG_PATA_ARTOP=m -CONFIG_PATA_ATIIXP=m -CONFIG_PATA_CMD640_PCI=m -CONFIG_PATA_CMD64X=m -CONFIG_PATA_CS5520=m -CONFIG_PATA_CS5530=m -CONFIG_PATA_CS5535=m -CONFIG_PATA_CYPRESS=m -CONFIG_PATA_EFAR=m -CONFIG_ATA_GENERIC=m -CONFIG_PATA_HPT366=m -CONFIG_PATA_HPT37X=m -CONFIG_PATA_HPT3X2N=m -CONFIG_PATA_HPT3X3=m -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -CONFIG_PATA_TRIFLEX=m -CONFIG_PATA_MARVELL=m -CONFIG_PATA_MPIIX=m -CONFIG_PATA_OLDPIIX=m -CONFIG_PATA_NETCELL=m -CONFIG_PATA_NS87410=m -CONFIG_PATA_OPTI=m -CONFIG_PATA_OPTIDMA=m -CONFIG_PATA_PCMCIA=m -CONFIG_PATA_PDC_OLD=m -CONFIG_PATA_RADISYS=m -CONFIG_PATA_RZ1000=m -CONFIG_PATA_SC1200=m -CONFIG_PATA_SERVERWORKS=m -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_SIL680=m -CONFIG_PATA_SIS=m -CONFIG_PATA_VIA=m -CONFIG_PATA_WINBOND=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_DELAY=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m -CONFIG_MACINTOSH_DRIVERS=y -CONFIG_MAC_EMUMOUSEBTN=y - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set -# CONFIG_ARCNET is not set -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_BROADCOM_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -# CONFIG_PCNET32_NAPI is not set -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_FORCEDETH_NAPI is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_SC92031=m -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set -CONFIG_NETDEV_1000=y -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m -CONFIG_ATL1=m -CONFIG_NETDEV_10000=y -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T1_1G=y -CONFIG_CHELSIO_T1_NAPI=y -CONFIG_CHELSIO_T3=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m -CONFIG_MLX4_CORE=m -CONFIG_MLX4_DEBUG=y -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN -# -CONFIG_WLAN_PRE80211=y -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m -CONFIG_WLAN_80211=y -# CONFIG_PCMCIA_RAYCS is not set -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -# CONFIG_LIBERTAS_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET_MII=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_DM9601=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_PCMCIA_IBMTR=m -# CONFIG_WAN is not set -CONFIG_ATM_DRIVERS=y -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLHC=m -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -# CONFIG_HYSDN is not set - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -CONFIG_GIGASET_M101=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_CAPI_TRACE=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y -CONFIG_INPUT_FF_MEMLESS=y -CONFIG_INPUT_POLLDEV=m - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_STOWAWAY=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_LIFEBOOK=y -CONFIG_MOUSE_PS2_TRACKPOINT=y -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_APPLETOUCH=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_JOYSTICK_XPAD=m -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_TOUCHSCREEN_PENMOUNT=m -CONFIG_TOUCHSCREEN_TOUCHRIGHT=m -CONFIG_TOUCHSCREEN_TOUCHWIN=m -CONFIG_TOUCHSCREEN_UCB1400=m -CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -CONFIG_TOUCHSCREEN_USB_EGALAX=y -CONFIG_TOUCHSCREEN_USB_PANJIT=y -CONFIG_TOUCHSCREEN_USB_3M=y -CONFIG_TOUCHSCREEN_USB_ITM=y -CONFIG_TOUCHSCREEN_USB_ETURBO=y -CONFIG_TOUCHSCREEN_USB_GUNZE=y -CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_WISTRON_BTNS=m -CONFIG_INPUT_ATLAS_BTNS=m -CONFIG_INPUT_ATI_REMOTE=m -CONFIG_INPUT_ATI_REMOTE2=m -CONFIG_INPUT_KEYSPAN_REMOTE=m -CONFIG_INPUT_POWERMATE=m -CONFIG_INPUT_YEALINK=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -CONFIG_MOXA_SMARTIO_NEW=m -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_ITCO_WDT=m -# CONFIG_ITCO_VENDOR_SUPPORT is not set -# CONFIG_SC1200_WDT is not set -CONFIG_PC87413_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_SMSC37B787_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83697HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m -CONFIG_NVRAM=y -CONFIG_RTC=y -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_SONYPI=m -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_CS5535_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set -CONFIG_DEVPORT=y -CONFIG_I2C=m -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_I2C_SIMTEC=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_TINY_USB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_AD7418=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1029=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_CORETEMP=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_MAX6650=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_PC87427=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT1211=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83793=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -CONFIG_SENSORS_APPLESMC=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Multifunction device drivers -# -CONFIG_MFD_SM501=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y -CONFIG_VIDEO_CAPTURE_DRIVERS=y -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_HELPER_CHIPS_AUTO=y -CONFIG_VIDEO_TVAUDIO=m -CONFIG_VIDEO_TDA7432=m -CONFIG_VIDEO_TDA9875=m -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_OV7670=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_TVP5150=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_BT848_DVB is not set -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_MEYE is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_IVTV=m -CONFIG_VIDEO_CAFE_CCIC=m -CONFIG_V4L_USB_DRIVERS=y -CONFIG_VIDEO_PVRUSB2=m -# CONFIG_VIDEO_PVRUSB2_29XXX is not set -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVISION=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set -CONFIG_USB_ZR364XX=m -CONFIG_RADIO_ADAPTERS=y -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m -CONFIG_DVB_CORE=m -# CONFIG_DVB_CORE_ATTACH is not set -CONFIG_DVB_CAPTURE_DRIVERS=y - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_DIB0700=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_M920X=m -CONFIG_DVB_USB_GL861=m -CONFIG_DVB_USB_AU6610=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_TTUSB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_USB_OPERA1=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -# CONFIG_DVB_CINERGYT2_TUNING is not set - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_FE_CUSTOMISE is not set - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m -CONFIG_DVB_TDA10086=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m -CONFIG_DVB_DIB7000M=m -CONFIG_DVB_DIB7000P=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_TDA10023=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Tuners/PLL support -# -CONFIG_DVB_PLL=m -CONFIG_DVB_TDA826X=m -CONFIG_DVB_TDA827X=m -CONFIG_DVB_TUNER_QT1010=m -CONFIG_DVB_TUNER_MT2060=m - -# -# Miscellaneous devices -# -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m -CONFIG_DVB_TUA6100=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_DAB=y -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_BACKLIGHT_PROGEAR=m -CONFIG_BACKLIGHT_CARILLO_RANCH=m - -# -# Display device support -# -CONFIG_DISPLAY_SUPPORT=m - -# -# Display hardware drivers -# -CONFIG_VGASTATE=m -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB_DDC=m -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -CONFIG_FB_SYS_FILLRECT=m -CONFIG_FB_SYS_COPYAREA=m -CONFIG_FB_SYS_IMAGEBLIT=m -CONFIG_FB_SYS_FOPS=m -CONFIG_FB_DEFERRED_IO=y -CONFIG_FB_SVGALIB=m -# CONFIG_FB_MACMODES is not set -CONFIG_FB_BACKLIGHT=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -# CONFIG_FB_VESA is not set -# CONFIG_FB_IMAC is not set -CONFIG_FB_HECUBA=m -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -# CONFIG_FB_NVIDIA_DEBUG is not set -CONFIG_FB_NVIDIA_BACKLIGHT=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_RIVA_BACKLIGHT=y -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_I810_I2C=y -CONFIG_FB_LE80578=m -CONFIG_FB_CARILLO_RANCH=m -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -CONFIG_FB_INTEL_I2C=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_S3=m -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -CONFIG_FB_VT8623=m -CONFIG_FB_CYBLA=m -# CONFIG_FB_TRIDENT is not set -CONFIG_FB_ARK=m -CONFIG_FB_PM3=m -# CONFIG_FB_GEODE is not set -CONFIG_FB_SM501=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_MTS64=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -CONFIG_SND_PORTMAN2X4=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m -CONFIG_SND_USB_CAIAQ=m -# CONFIG_SND_USB_CAIAQ_INPUT is not set - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# System on Chip audio support -# -CONFIG_SND_SOC=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# HID Devices -# -CONFIG_HID=y -# CONFIG_HID_DEBUG is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT_POWERBOOK=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_THRUSTMASTER_FF=y -# CONFIG_ZEROPLUS_FF is not set -CONFIG_USB_HIDDEV=y - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -CONFIG_USB_DEVICE_CLASS=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_U132_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRCABLE=m -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_MOS7720=m -CONFIG_USB_SERIAL_MOS7840=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -# CONFIG_USB_SERIAL_DEBUG is not set -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_ADUTUX=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_BERRY_CHARGE=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGET=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETMOTORCONTROL=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_FTDI_ELAN=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TRANCEVIBRATOR=m -CONFIG_USB_IOWARRIOR=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -# CONFIG_MMC_UNSAFE_RESUME is not set - -# -# MMC/SD Card Drivers -# -CONFIG_MMC_BLOCK=m - -# -# MMC/SD Host Controller Drivers -# -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m -CONFIG_MMC_TIFM_SD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_USER_MEM=y -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_MLX4_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_MAX6900=m -CONFIG_RTC_DRV_RS5C372=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -CONFIG_RTC_DRV_CMOS=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_DS1742=m -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_V3020=m - -# -# on-CPU RTC drivers -# - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Auxiliary Display support -# -CONFIG_KS0108=m -CONFIG_KS0108_PORT=0x378 -CONFIG_KS0108_DELAY=2 -CONFIG_CFAG12864B=m -CONFIG_CFAG12864B_RATE=20 - -# -# Virtualization -# -CONFIG_KVM=m -CONFIG_KVM_INTEL=m -CONFIG_KVM_AMD=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4DEV_FS=m -CONFIG_EXT4DEV_FS_XATTR=y -CONFIG_EXT4DEV_FS_POSIX_ACL=y -CONFIG_EXT4DEV_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=m -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=850 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_ECRYPT_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -# CONFIG_SUNRPC_BIND34 is not set -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y -# CONFIG_SYSV68_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -# CONFIG_DLM_DEBUG is not set - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_LKDTM is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_EARLY_PRINTK=y -# CONFIG_DEBUG_STACKOVERFLOW is not set -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Page alloc debug is incompatible with Software Suspend on i386 -# -# CONFIG_DEBUG_RODATA is not set -# CONFIG_4KSTACKS is not set -CONFIG_DOUBLEFAULT=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SELINUX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ABLKCIPHER=m -CONFIG_CRYPTO_BLKCIPHER=m -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_GF128MUL=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_LRW is not set -CONFIG_CRYPTO_CRYPTD=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_FCRYPT=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_TWOFISH_COMMON=m -CONFIG_CRYPTO_TWOFISH_586=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CAMELLIA=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# -CONFIG_CRYPTO_DEV_PADLOCK=m -CONFIG_CRYPTO_DEV_PADLOCK_AES=m -CONFIG_CRYPTO_DEV_PADLOCK_SHA=m -CONFIG_CRYPTO_DEV_GEODE=m - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC_ITU_T=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_KTIME_SCALAR=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64-smp.config deleted file mode 100644 index 63f31dc3fa..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64-smp.config +++ /dev/null @@ -1,3192 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.5 -# Tue Feb 19 23:02:41 2008 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_GENERIC_TIME=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_ZONE_DMA32=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_ZONE_DMA=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_ARCH_POPULATES_NODE_MAP=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_GENERIC_BUG=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -# CONFIG_TASK_XACCT is not set -# CONFIG_UTS_NS is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_CPUSETS=y -CONFIG_SYSFS_DEPRECATED=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_ANON_INODES=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLAB=y -# CONFIG_SLUB is not set -# CONFIG_SLOB is not set -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_BLOCK=y -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -# CONFIG_MCORE2 is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_MICROCODE_OLD_INTERFACE=y -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_HT=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_NUMA=y -CONFIG_K8_NUMA=y -CONFIG_NODES_SHIFT=6 -CONFIG_X86_64_ACPI_NUMA=y -# CONFIG_NUMA_EMU is not set -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y - -# -# Memory hotplug is currently incompatible with Software Suspend -# -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_NR_CPUS=32 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_IOMMU=y -CONFIG_CALGARY_IOMMU=y -CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_INTEL=y -CONFIG_X86_MCE_AMD=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -# CONFIG_RELOCATABLE is not set -CONFIG_PHYSICAL_START=0x200000 -# CONFIG_SECCOMP is not set -# CONFIG_CC_STACKPROTECTOR is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_300 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_K8_NB=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y -CONFIG_GENERIC_PENDING_IRQ=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" -CONFIG_SUSPEND_SMP=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_PROCFS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_BAY=m -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCIEAER=y -CONFIG_ARCH_SUPPORTS_MSI=y -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set -CONFIG_HT_IRQ=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -CONFIG_IA32_AOUT=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -CONFIG_NET_KEY=m -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m -CONFIG_TCP_CONG_YEAH=m -CONFIG_TCP_CONG_ILLINOIS=m -CONFIG_DEFAULT_BIC=y -# CONFIG_DEFAULT_CUBIC is not set -# CONFIG_DEFAULT_HTCP is not set -# CONFIG_DEFAULT_VEGAS is not set -# CONFIG_DEFAULT_WESTWOOD is not set -# CONFIG_DEFAULT_RENO is not set -CONFIG_DEFAULT_TCP_CONG="bic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -# CONFIG_IPV6_MIP6 is not set -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_SIT=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_NETLABEL is not set -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NF_CONNTRACK_ENABLED=m -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CT_ACCT=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -# CONFIG_NF_CONNTRACK_EVENTS is not set -CONFIG_NF_CT_PROTO_GRE=m -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m - -# -# IP: Netfilter Configuration -# -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_NF_NAT_PROTO_GRE=m -CONFIG_NF_NAT_FTP=m -CONFIG_NF_NAT_IRC=m -CONFIG_NF_NAT_TFTP=m -CONFIG_NF_NAT_AMANDA=m -CONFIG_NF_NAT_PPTP=m -CONFIG_NF_NAT_H323=m -CONFIG_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -# CONFIG_IP_DCCP_CCID2_DEBUG is not set -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m -# CONFIG_IP_DCCP_CCID3_DEBUG is not set -CONFIG_IP_DCCP_CCID3_RTO=100 - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_NET_DCCPPROBE is not set -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_FIFO=y - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_AF_RXRPC=m -# CONFIG_AF_RXRPC_DEBUG is not set -CONFIG_RXKAD=m -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_MAC80211=m -# CONFIG_MAC80211_LEDS is not set -# CONFIG_MAC80211_DEBUGFS is not set -# CONFIG_MAC80211_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_RFKILL=m -CONFIG_RFKILL_INPUT=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLKDEVS=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m -CONFIG_SSFDC=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_ESB2ROM=m -CONFIG_MTD_CK804XROM=m -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -# CONFIG_MTD_NAND_MUSEUM_IDS is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CAFE=m -CONFIG_MTD_NAND_NANDSIM=m -CONFIG_MTD_NAND_PLATFORM=m -# CONFIG_MTD_ONENAND is not set - -# -# UBI - Unsorted block images -# -CONFIG_MTD_UBI=m -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_RESERVE=1 -# CONFIG_MTD_UBI_GLUEBI is not set - -# -# UBI debugging options -# -# CONFIG_MTD_UBI_DEBUG is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y -CONFIG_PARPORT_NOT_PC=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set -CONFIG_PHANTOM=m -CONFIG_SGI_IOC4=m -CONFIG_TIFM_CORE=m -CONFIG_TIFM_7XX1=m -CONFIG_ASUS_LAPTOP=m -CONFIG_MSI_LAPTOP=m -CONFIG_SONY_LAPTOP=m -# CONFIG_SONYPI_COMPAT is not set -CONFIG_THINKPAD_ACPI=m -# CONFIG_THINKPAD_ACPI_DEBUG is not set -CONFIG_THINKPAD_ACPI_BAY=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEACPI=y -CONFIG_IDE_TASK_IOCTL=y -CONFIG_IDE_PROC_FS=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_IDEPCI_PCIBUS_ORDER=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_JMICRON=m -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8213=m -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_TC86C001=m -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_TGT=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_SCSI_WAIT_SCAN=m - -# -# SCSI Transports -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=4000 -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set -CONFIG_SCSI_SRP=m - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -CONFIG_PATA_ALI=m -CONFIG_PATA_AMD=m -CONFIG_PATA_ARTOP=m -CONFIG_PATA_ATIIXP=m -CONFIG_PATA_CMD640_PCI=m -CONFIG_PATA_CMD64X=m -CONFIG_PATA_CS5520=m -CONFIG_PATA_CS5530=m -CONFIG_PATA_CYPRESS=m -CONFIG_PATA_EFAR=m -CONFIG_ATA_GENERIC=m -CONFIG_PATA_HPT366=m -CONFIG_PATA_HPT37X=m -CONFIG_PATA_HPT3X2N=m -CONFIG_PATA_HPT3X3=m -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -CONFIG_PATA_TRIFLEX=m -CONFIG_PATA_MARVELL=m -CONFIG_PATA_MPIIX=m -CONFIG_PATA_OLDPIIX=m -CONFIG_PATA_NETCELL=m -CONFIG_PATA_NS87410=m -CONFIG_PATA_OPTI=m -CONFIG_PATA_OPTIDMA=m -CONFIG_PATA_PCMCIA=m -CONFIG_PATA_PDC_OLD=m -CONFIG_PATA_RADISYS=m -CONFIG_PATA_RZ1000=m -CONFIG_PATA_SC1200=m -CONFIG_PATA_SERVERWORKS=m -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_SIL680=m -CONFIG_PATA_SIS=m -CONFIG_PATA_VIA=m -CONFIG_PATA_WINBOND=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_DELAY=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m -CONFIG_MACINTOSH_DRIVERS=y -CONFIG_MAC_EMUMOUSEBTN=y - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set -# CONFIG_ARCNET is not set -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_BROADCOM_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -# CONFIG_PCNET32_NAPI is not set -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_FORCEDETH_NAPI is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_SC92031=m -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set -CONFIG_NETDEV_1000=y -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m -CONFIG_ATL1=m -CONFIG_NETDEV_10000=y -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T1_1G=y -CONFIG_CHELSIO_T1_NAPI=y -# CONFIG_CHELSIO_T3 is not set -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m -CONFIG_MLX4_CORE=m -CONFIG_MLX4_DEBUG=y -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN -# -CONFIG_WLAN_PRE80211=y -CONFIG_STRIP=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m -CONFIG_WLAN_80211=y -CONFIG_PCMCIA_RAYCS=m -CONFIG_IPW2100=m -# CONFIG_IPW2100_MONITOR is not set -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -# CONFIG_IPW2200_MONITOR is not set -# CONFIG_IPW2200_QOS is not set -# CONFIG_IPW2200_DEBUG is not set -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -# CONFIG_LIBERTAS_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET_MII=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_DM9601=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -# CONFIG_WAN is not set -CONFIG_ATM_DRIVERS=y -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLHC=m -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -CONFIG_GIGASET_M101=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_CAPI_TRACE=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y -CONFIG_INPUT_FF_MEMLESS=y -CONFIG_INPUT_POLLDEV=m - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_STOWAWAY=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_LIFEBOOK=y -CONFIG_MOUSE_PS2_TRACKPOINT=y -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_APPLETOUCH=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_JOYSTICK_XPAD=m -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_TOUCHSCREEN_PENMOUNT=m -CONFIG_TOUCHSCREEN_TOUCHRIGHT=m -CONFIG_TOUCHSCREEN_TOUCHWIN=m -CONFIG_TOUCHSCREEN_UCB1400=m -CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -CONFIG_TOUCHSCREEN_USB_EGALAX=y -CONFIG_TOUCHSCREEN_USB_PANJIT=y -CONFIG_TOUCHSCREEN_USB_3M=y -CONFIG_TOUCHSCREEN_USB_ITM=y -CONFIG_TOUCHSCREEN_USB_ETURBO=y -CONFIG_TOUCHSCREEN_USB_GUNZE=y -CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_ATLAS_BTNS=m -CONFIG_INPUT_ATI_REMOTE=m -CONFIG_INPUT_ATI_REMOTE2=m -CONFIG_INPUT_KEYSPAN_REMOTE=m -CONFIG_INPUT_POWERMATE=m -CONFIG_INPUT_YEALINK=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -CONFIG_MOXA_SMARTIO_NEW=m -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_ITCO_WDT=m -# CONFIG_ITCO_VENDOR_SUPPORT is not set -# CONFIG_SC1200_WDT is not set -CONFIG_PC87413_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_SMSC37B787_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83697HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=256 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set -CONFIG_DEVPORT=y -CONFIG_I2C=m -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_I2C_SIMTEC=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_TINY_USB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_AD7418=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1029=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_CORETEMP=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_MAX6650=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_PC87427=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT1211=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83793=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -CONFIG_SENSORS_APPLESMC=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Multifunction device drivers -# -CONFIG_MFD_SM501=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y -CONFIG_VIDEO_CAPTURE_DRIVERS=y -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_HELPER_CHIPS_AUTO=y -CONFIG_VIDEO_TVAUDIO=m -CONFIG_VIDEO_TDA7432=m -CONFIG_VIDEO_TDA9875=m -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_OV7670=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_TVP5150=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_BT848_DVB is not set -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -CONFIG_VIDEO_MEYE=m -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_IVTV=m -CONFIG_VIDEO_CAFE_CCIC=m -CONFIG_V4L_USB_DRIVERS=y -CONFIG_VIDEO_PVRUSB2=m -# CONFIG_VIDEO_PVRUSB2_29XXX is not set -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVISION=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set -CONFIG_USB_ZR364XX=m -CONFIG_RADIO_ADAPTERS=y -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m -CONFIG_DVB_CORE=m -# CONFIG_DVB_CORE_ATTACH is not set -CONFIG_DVB_CAPTURE_DRIVERS=y - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_DIB0700=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_M920X=m -CONFIG_DVB_USB_GL861=m -CONFIG_DVB_USB_AU6610=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_TTUSB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_USB_OPERA1=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -# CONFIG_DVB_CINERGYT2_TUNING is not set - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_FE_CUSTOMISE is not set - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m -CONFIG_DVB_TDA10086=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m -CONFIG_DVB_DIB7000M=m -CONFIG_DVB_DIB7000P=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_TDA10023=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Tuners/PLL support -# -CONFIG_DVB_PLL=m -CONFIG_DVB_TDA826X=m -CONFIG_DVB_TDA827X=m -CONFIG_DVB_TUNER_QT1010=m -CONFIG_DVB_TUNER_MT2060=m - -# -# Miscellaneous devices -# -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m -CONFIG_DVB_TUA6100=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_DAB=y -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_BACKLIGHT_PROGEAR=m -CONFIG_BACKLIGHT_CARILLO_RANCH=m - -# -# Display device support -# -CONFIG_DISPLAY_SUPPORT=m - -# -# Display hardware drivers -# -CONFIG_VGASTATE=m -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB_DDC=m -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -CONFIG_FB_SYS_FILLRECT=m -CONFIG_FB_SYS_COPYAREA=m -CONFIG_FB_SYS_IMAGEBLIT=m -CONFIG_FB_SYS_FOPS=m -CONFIG_FB_DEFERRED_IO=y -CONFIG_FB_SVGALIB=m -# CONFIG_FB_MACMODES is not set -CONFIG_FB_BACKLIGHT=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -# CONFIG_FB_VESA is not set -CONFIG_FB_HECUBA=m -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -# CONFIG_FB_NVIDIA_DEBUG is not set -CONFIG_FB_NVIDIA_BACKLIGHT=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_RIVA_BACKLIGHT=y -CONFIG_FB_LE80578=m -CONFIG_FB_CARILLO_RANCH=m -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -CONFIG_FB_INTEL_I2C=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_S3=m -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -CONFIG_FB_VT8623=m -# CONFIG_FB_TRIDENT is not set -CONFIG_FB_ARK=m -CONFIG_FB_PM3=m -# CONFIG_FB_GEODE is not set -CONFIG_FB_SM501=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_MTS64=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -CONFIG_SND_PORTMAN2X4=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m -CONFIG_SND_USB_CAIAQ=m -# CONFIG_SND_USB_CAIAQ_INPUT is not set - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# System on Chip audio support -# -CONFIG_SND_SOC=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# HID Devices -# -CONFIG_HID=y -# CONFIG_HID_DEBUG is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_THRUSTMASTER_FF=y -# CONFIG_ZEROPLUS_FF is not set -CONFIG_USB_HIDDEV=y - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -CONFIG_USB_DEVICE_CLASS=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_U132_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRCABLE=m -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_MOS7720=m -CONFIG_USB_SERIAL_MOS7840=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -# CONFIG_USB_SERIAL_DEBUG is not set -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_ADUTUX=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_BERRY_CHARGE=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGET=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETMOTORCONTROL=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_FTDI_ELAN=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TRANCEVIBRATOR=m -CONFIG_USB_IOWARRIOR=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -# CONFIG_MMC_UNSAFE_RESUME is not set - -# -# MMC/SD Card Drivers -# -CONFIG_MMC_BLOCK=m - -# -# MMC/SD Host Controller Drivers -# -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m -CONFIG_MMC_TIFM_SD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_USER_MEM=y -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_MLX4_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_MAX6900=m -CONFIG_RTC_DRV_RS5C372=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -CONFIG_RTC_DRV_CMOS=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_DS1742=m -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_V3020=m - -# -# on-CPU RTC drivers -# - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Auxiliary Display support -# -CONFIG_KS0108=m -CONFIG_KS0108_PORT=0x378 -CONFIG_KS0108_DELAY=2 -CONFIG_CFAG12864B=m -CONFIG_CFAG12864B_RATE=20 - -# -# Virtualization -# -CONFIG_KVM=m -CONFIG_KVM_INTEL=m -CONFIG_KVM_AMD=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4DEV_FS=m -CONFIG_EXT4DEV_FS_XATTR=y -CONFIG_EXT4DEV_FS_POSIX_ACL=y -CONFIG_EXT4DEV_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=m -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_ECRYPT_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -# CONFIG_SUNRPC_BIND34 is not set -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y -# CONFIG_SYSV68_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -# CONFIG_DLM_DEBUG is not set - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_LKDTM is not set -# CONFIG_FAULT_INJECTION is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_IOMMU_DEBUG is not set -# CONFIG_DEBUG_STACKOVERFLOW is not set -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SELINUX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ABLKCIPHER=m -CONFIG_CRYPTO_BLKCIPHER=m -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_GF128MUL=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_LRW is not set -CONFIG_CRYPTO_CRYPTD=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_FCRYPT=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_TWOFISH_COMMON=m -CONFIG_CRYPTO_TWOFISH_X86_64=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CAMELLIA=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC_ITU_T=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64.config deleted file mode 100644 index 0fead82d42..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64.config +++ /dev/null @@ -1,3175 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.5 -# Wed Feb 20 01:00:44 2008 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_GENERIC_TIME=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_ZONE_DMA32=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_ZONE_DMA=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_ARCH_POPULATES_NODE_MAP=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_GENERIC_BUG=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -# CONFIG_TASK_XACCT is not set -# CONFIG_UTS_NS is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_SYSFS_DEPRECATED=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_ANON_INODES=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLAB=y -# CONFIG_SLUB is not set -# CONFIG_SLOB is not set -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_BLOCK=y -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -# CONFIG_MCORE2 is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_MICROCODE_OLD_INTERFACE=y -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -# CONFIG_SMP is not set -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y - -# -# Memory hotplug is currently incompatible with Software Suspend -# -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_IOMMU=y -CONFIG_CALGARY_IOMMU=y -CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_INTEL=y -CONFIG_X86_MCE_AMD=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -# CONFIG_RELOCATABLE is not set -CONFIG_PHYSICAL_START=0x200000 -# CONFIG_SECCOMP is not set -# CONFIG_CC_STACKPROTECTOR is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_300 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_K8_NB=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set -CONFIG_ACPI_PROCFS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=y -CONFIG_ACPI_BAY=m -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_PCIEAER=y -CONFIG_ARCH_SUPPORTS_MSI=y -CONFIG_PCI_MSI=y -# CONFIG_PCI_DEBUG is not set -CONFIG_HT_IRQ=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_PCCARD_NONSTATIC=y -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -CONFIG_IA32_AOUT=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -CONFIG_NET_KEY=m -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m -CONFIG_TCP_CONG_YEAH=m -CONFIG_TCP_CONG_ILLINOIS=m -CONFIG_DEFAULT_BIC=y -# CONFIG_DEFAULT_CUBIC is not set -# CONFIG_DEFAULT_HTCP is not set -# CONFIG_DEFAULT_VEGAS is not set -# CONFIG_DEFAULT_WESTWOOD is not set -# CONFIG_DEFAULT_RENO is not set -CONFIG_DEFAULT_TCP_CONG="bic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -# CONFIG_IPV6_MIP6 is not set -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_SIT=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_NETLABEL is not set -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NF_CONNTRACK_ENABLED=m -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CT_ACCT=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -# CONFIG_NF_CONNTRACK_EVENTS is not set -CONFIG_NF_CT_PROTO_GRE=m -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m - -# -# IP: Netfilter Configuration -# -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_NF_NAT_PROTO_GRE=m -CONFIG_NF_NAT_FTP=m -CONFIG_NF_NAT_IRC=m -CONFIG_NF_NAT_TFTP=m -CONFIG_NF_NAT_AMANDA=m -CONFIG_NF_NAT_PPTP=m -CONFIG_NF_NAT_H323=m -CONFIG_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -# CONFIG_IP_DCCP_CCID2_DEBUG is not set -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m -# CONFIG_IP_DCCP_CCID3_DEBUG is not set -CONFIG_IP_DCCP_CCID3_RTO=100 - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_NET_DCCPPROBE is not set -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_FIFO=y - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_AF_RXRPC=m -# CONFIG_AF_RXRPC_DEBUG is not set -CONFIG_RXKAD=m -CONFIG_FIB_RULES=y - -# -# Wireless -# -CONFIG_CFG80211=m -CONFIG_WIRELESS_EXT=y -CONFIG_MAC80211=m -# CONFIG_MAC80211_LEDS is not set -# CONFIG_MAC80211_DEBUGFS is not set -# CONFIG_MAC80211_DEBUG is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_RFKILL=m -CONFIG_RFKILL_INPUT=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLKDEVS=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set -CONFIG_RFD_FTL=m -CONFIG_SSFDC=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_ESB2ROM=m -CONFIG_MTD_CK804XROM=m -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -# CONFIG_MTD_NAND_MUSEUM_IDS is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CAFE=m -CONFIG_MTD_NAND_NANDSIM=m -CONFIG_MTD_NAND_PLATFORM=m -# CONFIG_MTD_ONENAND is not set - -# -# UBI - Unsorted block images -# -CONFIG_MTD_UBI=m -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_RESERVE=1 -# CONFIG_MTD_UBI_GLUEBI is not set - -# -# UBI debugging options -# -# CONFIG_MTD_UBI_DEBUG is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y -CONFIG_PARPORT_NOT_PC=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set -CONFIG_PHANTOM=m -CONFIG_SGI_IOC4=m -CONFIG_TIFM_CORE=m -CONFIG_TIFM_7XX1=m -CONFIG_ASUS_LAPTOP=m -CONFIG_MSI_LAPTOP=m -CONFIG_SONY_LAPTOP=m -# CONFIG_SONYPI_COMPAT is not set -CONFIG_THINKPAD_ACPI=m -# CONFIG_THINKPAD_ACPI_DEBUG is not set -CONFIG_THINKPAD_ACPI_BAY=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEACPI=y -CONFIG_IDE_TASK_IOCTL=y -CONFIG_IDE_PROC_FS=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_IDEPCI_PCIBUS_ORDER=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_JMICRON=m -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8213=m -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_TC86C001=m -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_TGT=m -CONFIG_SCSI_NETLINK=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_SCSI_WAIT_SCAN=m - -# -# SCSI Transports -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=4000 -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC94XX=m -# CONFIG_AIC94XX_DEBUG is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_HPTIOP=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_STEX=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_QLA_ISCSI=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set -CONFIG_SCSI_SRP=m - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INIC162X=m -CONFIG_PATA_ALI=m -CONFIG_PATA_AMD=m -CONFIG_PATA_ARTOP=m -CONFIG_PATA_ATIIXP=m -CONFIG_PATA_CMD640_PCI=m -CONFIG_PATA_CMD64X=m -CONFIG_PATA_CS5520=m -CONFIG_PATA_CS5530=m -CONFIG_PATA_CYPRESS=m -CONFIG_PATA_EFAR=m -CONFIG_ATA_GENERIC=m -CONFIG_PATA_HPT366=m -CONFIG_PATA_HPT37X=m -CONFIG_PATA_HPT3X2N=m -CONFIG_PATA_HPT3X3=m -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -CONFIG_PATA_TRIFLEX=m -CONFIG_PATA_MARVELL=m -CONFIG_PATA_MPIIX=m -CONFIG_PATA_OLDPIIX=m -CONFIG_PATA_NETCELL=m -CONFIG_PATA_NS87410=m -CONFIG_PATA_OPTI=m -CONFIG_PATA_OPTIDMA=m -CONFIG_PATA_PCMCIA=m -CONFIG_PATA_PDC_OLD=m -CONFIG_PATA_RADISYS=m -CONFIG_PATA_RZ1000=m -CONFIG_PATA_SC1200=m -CONFIG_PATA_SERVERWORKS=m -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_SIL680=m -CONFIG_PATA_SIS=m -CONFIG_PATA_VIA=m -CONFIG_PATA_WINBOND=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_DELAY=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_FIREWIRE=m -CONFIG_FIREWIRE_OHCI=m -CONFIG_FIREWIRE_SBP2=m -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m -CONFIG_MACINTOSH_DRIVERS=y -CONFIG_MAC_EMUMOUSEBTN=y - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set -# CONFIG_ARCNET is not set -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_BROADCOM_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -# CONFIG_PCNET32_NAPI is not set -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_FORCEDETH_NAPI is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_SC92031=m -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set -CONFIG_NETDEV_1000=y -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m -CONFIG_ATL1=m -CONFIG_NETDEV_10000=y -CONFIG_CHELSIO_T1=m -CONFIG_CHELSIO_T1_1G=y -CONFIG_CHELSIO_T1_NAPI=y -# CONFIG_CHELSIO_T3 is not set -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m -CONFIG_MLX4_CORE=m -CONFIG_MLX4_DEBUG=y -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN -# -CONFIG_WLAN_PRE80211=y -CONFIG_STRIP=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m -CONFIG_WLAN_80211=y -CONFIG_PCMCIA_RAYCS=m -CONFIG_IPW2100=m -# CONFIG_IPW2100_MONITOR is not set -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -# CONFIG_IPW2200_MONITOR is not set -# CONFIG_IPW2200_QOS is not set -# CONFIG_IPW2200_DEBUG is not set -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -# CONFIG_LIBERTAS_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET_MII=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_DM9601=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -# CONFIG_WAN is not set -CONFIG_ATM_DRIVERS=y -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLHC=m -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -# CONFIG_HYSDN is not set - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -CONFIG_GIGASET_M101=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_CAPI_TRACE=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y -CONFIG_INPUT_FF_MEMLESS=y -CONFIG_INPUT_POLLDEV=m - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_STOWAWAY=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_LIFEBOOK=y -CONFIG_MOUSE_PS2_TRACKPOINT=y -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_APPLETOUCH=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -CONFIG_JOYSTICK_TWIDJOY=m -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_JOYSTICK_XPAD=m -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_TOUCHSCREEN_PENMOUNT=m -CONFIG_TOUCHSCREEN_TOUCHRIGHT=m -CONFIG_TOUCHSCREEN_TOUCHWIN=m -CONFIG_TOUCHSCREEN_UCB1400=m -CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -CONFIG_TOUCHSCREEN_USB_EGALAX=y -CONFIG_TOUCHSCREEN_USB_PANJIT=y -CONFIG_TOUCHSCREEN_USB_3M=y -CONFIG_TOUCHSCREEN_USB_ITM=y -CONFIG_TOUCHSCREEN_USB_ETURBO=y -CONFIG_TOUCHSCREEN_USB_GUNZE=y -CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_ATLAS_BTNS=m -CONFIG_INPUT_ATI_REMOTE=m -CONFIG_INPUT_ATI_REMOTE2=m -CONFIG_INPUT_KEYSPAN_REMOTE=m -CONFIG_INPUT_POWERMATE=m -CONFIG_INPUT_YEALINK=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -CONFIG_MOXA_SMARTIO_NEW=m -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_ITCO_WDT=m -# CONFIG_ITCO_VENDOR_SUPPORT is not set -# CONFIG_SC1200_WDT is not set -CONFIG_PC87413_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_SMSC37B787_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83697HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_DRM=m -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=256 -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set -CONFIG_DEVPORT=y -CONFIG_I2C=m -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_I2C_SIMTEC=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_TINY_USB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_AD7418=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1029=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_CORETEMP=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_MAX6650=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_PC87427=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT1211=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83793=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -CONFIG_SENSORS_APPLESMC=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Multifunction device drivers -# -CONFIG_MFD_SM501=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y -CONFIG_VIDEO_CAPTURE_DRIVERS=y -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_HELPER_CHIPS_AUTO=y -CONFIG_VIDEO_TVAUDIO=m -CONFIG_VIDEO_TDA7432=m -CONFIG_VIDEO_TDA9875=m -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_OV7670=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_TVP5150=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_BT848_DVB is not set -CONFIG_VIDEO_SAA6588=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_CPIA2=m -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -CONFIG_VIDEO_MEYE=m -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_IVTV=m -CONFIG_VIDEO_CAFE_CCIC=m -CONFIG_V4L_USB_DRIVERS=y -CONFIG_VIDEO_PVRUSB2=m -# CONFIG_VIDEO_PVRUSB2_29XXX is not set -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVISION=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set -CONFIG_USB_ZR364XX=m -CONFIG_RADIO_ADAPTERS=y -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -CONFIG_USB_DSBR=m -CONFIG_DVB_CORE=m -# CONFIG_DVB_CORE_ATTACH is not set -CONFIG_DVB_CAPTURE_DRIVERS=y - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_DIB0700=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_M920X=m -CONFIG_DVB_USB_GL861=m -CONFIG_DVB_USB_AU6610=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_TTUSB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_USB_OPERA1=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -# CONFIG_DVB_CINERGYT2_TUNING is not set - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_FE_CUSTOMISE is not set - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m -CONFIG_DVB_TDA10086=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m -CONFIG_DVB_DIB7000M=m -CONFIG_DVB_DIB7000P=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_TDA10023=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Tuners/PLL support -# -CONFIG_DVB_PLL=m -CONFIG_DVB_TDA826X=m -CONFIG_DVB_TDA827X=m -CONFIG_DVB_TUNER_QT1010=m -CONFIG_DVB_TUNER_MT2060=m - -# -# Miscellaneous devices -# -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m -CONFIG_DVB_TUA6100=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_DAB=y -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_BACKLIGHT_PROGEAR=m -CONFIG_BACKLIGHT_CARILLO_RANCH=m - -# -# Display device support -# -CONFIG_DISPLAY_SUPPORT=m - -# -# Display hardware drivers -# -CONFIG_VGASTATE=m -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB_DDC=m -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m -CONFIG_FB_SYS_FILLRECT=m -CONFIG_FB_SYS_COPYAREA=m -CONFIG_FB_SYS_IMAGEBLIT=m -CONFIG_FB_SYS_FOPS=m -CONFIG_FB_DEFERRED_IO=y -CONFIG_FB_SVGALIB=m -# CONFIG_FB_MACMODES is not set -CONFIG_FB_BACKLIGHT=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -# CONFIG_FB_VESA is not set -CONFIG_FB_HECUBA=m -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -# CONFIG_FB_NVIDIA_DEBUG is not set -CONFIG_FB_NVIDIA_BACKLIGHT=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_RIVA_BACKLIGHT=y -CONFIG_FB_LE80578=m -CONFIG_FB_CARILLO_RANCH=m -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -CONFIG_FB_INTEL_I2C=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_S3=m -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -CONFIG_FB_VT8623=m -# CONFIG_FB_TRIDENT is not set -CONFIG_FB_ARK=m -CONFIG_FB_PM3=m -# CONFIG_FB_GEODE is not set -CONFIG_FB_SM501=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_MTS64=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m -CONFIG_SND_PORTMAN2X4=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y -# CONFIG_SND_AC97_POWER_SAVE is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m -CONFIG_SND_USB_CAIAQ=m -# CONFIG_SND_USB_CAIAQ_INPUT is not set - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# System on Chip audio support -# -CONFIG_SND_SOC=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m - -# -# HID Devices -# -CONFIG_HID=y -# CONFIG_HID_DEBUG is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_THRUSTMASTER_FF=y -# CONFIG_ZEROPLUS_FF is not set -CONFIG_USB_HIDDEV=y - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -CONFIG_USB_DEVICE_CLASS=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_U132_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRCABLE=m -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_MOS7720=m -CONFIG_USB_SERIAL_MOS7840=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -# CONFIG_USB_SERIAL_DEBUG is not set -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_ADUTUX=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_BERRY_CHARGE=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGET=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETMOTORCONTROL=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_FTDI_ELAN=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TRANCEVIBRATOR=m -CONFIG_USB_IOWARRIOR=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -# CONFIG_MMC_UNSAFE_RESUME is not set - -# -# MMC/SD Card Drivers -# -CONFIG_MMC_BLOCK=m - -# -# MMC/SD Host Controller Drivers -# -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m -CONFIG_MMC_TIFM_SD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_USER_MEM=y -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_MLX4_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_IPOIB_CM is not set -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_MAX6900=m -CONFIG_RTC_DRV_RS5C372=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -CONFIG_RTC_DRV_CMOS=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_DS1742=m -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_V3020=m - -# -# on-CPU RTC drivers -# - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Auxiliary Display support -# -CONFIG_KS0108=m -CONFIG_KS0108_PORT=0x378 -CONFIG_KS0108_DELAY=2 -CONFIG_CFAG12864B=m -CONFIG_CFAG12864B_RATE=20 - -# -# Virtualization -# -CONFIG_KVM=m -CONFIG_KVM_INTEL=m -CONFIG_KVM_AMD=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4DEV_FS=m -CONFIG_EXT4DEV_FS_XATTR=y -CONFIG_EXT4DEV_FS_POSIX_ACL=y -CONFIG_EXT4DEV_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=m -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_NOLOCK=m -CONFIG_GFS2_FS_LOCKING_DLM=m -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_ECRYPT_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -# CONFIG_SUNRPC_BIND34 is not set -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y -# CONFIG_SYSV68_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -CONFIG_DLM=m -# CONFIG_DLM_DEBUG is not set - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_LKDTM is not set -# CONFIG_FAULT_INJECTION is not set -# CONFIG_DEBUG_RODATA is not set -# CONFIG_IOMMU_DEBUG is not set -# CONFIG_DEBUG_STACKOVERFLOW is not set -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_NETWORK_XFRM=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SELINUX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ABLKCIPHER=m -CONFIG_CRYPTO_BLKCIPHER=m -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_GF128MUL=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_LRW is not set -CONFIG_CRYPTO_CRYPTD=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_FCRYPT=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_TWOFISH_COMMON=m -CONFIG_CRYPTO_TWOFISH_X86_64=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CAMELLIA=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC_ITU_T=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-bigsmp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-bigsmp.config deleted file mode 100644 index 2e4f3053dd..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-bigsmp.config +++ /dev/null @@ -1,2950 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -# CONFIG_STANDALONE is not set - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_RES_BLKIO=y -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_IOSCHED_PS=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -# CONFIG_X86_PC is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -CONFIG_X86_GENERICARCH=y -# CONFIG_X86_ES7000 is not set -CONFIG_X86_CYCLONE_TIMER=y -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -CONFIG_MPENTIUMII=y -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_SMP=y -CONFIG_NR_CPUS=128 -CONFIG_SCHED_SMT=y -# CONFIG_PREEMPT is not set -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_TSC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_X86_MCE_P4THERMAL=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -# CONFIG_HIGHMEM4G is not set -CONFIG_HIGHMEM64G=y -CONFIG_HIGHMEM=y -CONFIG_X86_PAE=y -# CONFIG_NUMA is not set -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -CONFIG_IRQBALANCE=y -CONFIG_HAVE_DEC_LOCK=y -CONFIG_BOOT_IOREMAP=y -CONFIG_REGPARM=y - -# -# Special options -# -CONFIG_PROC_MM=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -# CONFIG_SOFTWARE_SUSPEND is not set -# CONFIG_PM_DISK is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -# CONFIG_ACPI_ASUS is not set -CONFIG_ACPI_TOSHIBA=m -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_INITRD=y - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -CONFIG_APM_DO_ENABLE=y -# CONFIG_APM_CPU_IDLE is not set -CONFIG_APM_DISPLAY_BLANK=y -# CONFIG_APM_RTC_IS_GMT is not set -CONFIG_APM_ALLOW_INTS=y -# CONFIG_APM_REAL_MODE_POWER_OFF is not set -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_PROC_INTF=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_POWERNOW_K6=m -CONFIG_X86_POWERNOW_K7=m -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_GX_SUSPMOD=m -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_ICH=m -CONFIG_X86_SPEEDSTEP_SMI=m -CONFIG_X86_P4_CLOCKMOD=m -CONFIG_X86_SPEEDSTEP_LIB=m -CONFIG_X86_LONGRUN=m -CONFIG_X86_LONGHAUL=m - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCI_USE_VECTOR is not set -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -CONFIG_SCx200=m - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_I82365=m -CONFIG_TCIC=m -CONFIG_PCMCIA_PROBE=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_AMD=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=m -CONFIG_MTD_CONCAT=m -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_CMDLINE_PARTS=m - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -CONFIG_MTD_OBSOLETE_CHIPS=y -CONFIG_MTD_AMDSTD=m -CONFIG_MTD_SHARP=m -CONFIG_MTD_JEDEC=m - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BUSWIDTH=2 -CONFIG_MTD_PNC2000=m -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_SBC_GXX=m -CONFIG_MTD_ELAN_104NC=m -CONFIG_MTD_OCTAGON=m -CONFIG_MTD_VMAX=m -CONFIG_MTD_SCx200_DOCFLASH=m -CONFIG_MTD_AMD76XROM=m -CONFIG_MTD_ICH2ROM=m -CONFIG_MTD_SCB2_FLASH=m -CONFIG_MTD_NETtel=m -CONFIG_MTD_DILNETPC=m -CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000 -CONFIG_MTD_L440GX=m -CONFIG_MTD_PCI=m - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_ISAPNP=y -CONFIG_PNPBIOS=y -CONFIG_PNPBIOS_PROC_FS=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -CONFIG_BLK_DEV_XD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_CARMEL=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=64000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_IDEDISK_STROKE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_BLK_DEV_OPTI621=y -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -CONFIG_IDEDMA_ONLYDISK=y -CONFIG_BLK_DEV_ADMA=y -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=y -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_SC1200=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_NS87415=y -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -CONFIG_BLK_DEV_TRM290=y -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_IDE_CHIPSETS=y - -# -# Note: most of these also require special kernel boot parameters -# -CONFIG_BLK_DEV_4DRIVES=y -CONFIG_BLK_DEV_ALI14XX=y -CONFIG_BLK_DEV_DTC2278=y -CONFIG_BLK_DEV_HT6560B=y -# CONFIG_BLK_DEV_PDC4030 is not set -CONFIG_BLK_DEV_QD65XX=y -CONFIG_BLK_DEV_UMC8672=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_7000FASST=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AHA152X=m -CONFIG_SCSI_AHA1542=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_DPT_I2O=m -CONFIG_SCSI_ADVANSYS=m -CONFIG_SCSI_IN2000=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_CPQFCTS is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_DTC3280=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_EATA_PIO=m -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_GENERIC_NCR5380=m -CONFIG_SCSI_GENERIC_NCR5380_MMIO=m -CONFIG_SCSI_GENERIC_NCR53C400=y -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_NCR53C406A=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -CONFIG_SCSI_PAS16=m -CONFIG_SCSI_PSI240I=m -CONFIG_SCSI_QLOGIC_FAS=m -CONFIG_SCSI_QLOGIC_ISP=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -CONFIG_SCSI_SYM53C416=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_T128=m -CONFIG_SCSI_U14_34F=m -CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y -CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y -CONFIG_SCSI_U14_34F_MAX_TAGS=8 -CONFIG_SCSI_ULTRASTOR=m -CONFIG_SCSI_NSP32=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -CONFIG_PCMCIA_AHA152X=m -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_NINJA_SCSI=m -CONFIG_PCMCIA_QLOGIC=m -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -# CONFIG_SATA_INIC162X is not set -CONFIG_PATA_ALI=m -CONFIG_PATA_AMD=m -# CONFIG_PATA_ARTOP is not set -CONFIG_PATA_ATIIXP=m -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CS5535 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -CONFIG_PATA_HPT3X2N=m -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_ISAPNP is not set -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -# CONFIG_PATA_LEGACY is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_QDI is not set -CONFIG_PATA_RADISYS=m -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -CONFIG_PATA_SERVERWORKS=m -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -CONFIG_PATA_VIA=m -CONFIG_PATA_WINBOND=m -# CONFIG_PATA_WINBOND_VLB is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -CONFIG_CD_NO_IDESCSI=y -CONFIG_AZTCD=m -CONFIG_GSCD=m -CONFIG_MCD=m -CONFIG_MCD_IRQ=11 -CONFIG_MCD_BASE=0x300 -CONFIG_OPTCD=m -CONFIG_SJCD=m -CONFIG_ISP16_CDI=m -CONFIG_CDU535=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -CONFIG_DECNET=m -CONFIG_DECNET_SIOCGIFCONF=y -# CONFIG_DECNET_ROUTER is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -# CONFIG_IP_NF_NAT_LOCAL is not set -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# DECnet: Netfilter Configuration -# -CONFIG_DECNET_NF_GRABULATOR=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=y -CONFIG_ATM_CLIP=y -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_LTPC=m -CONFIG_COPS=m -CONFIG_COPS_DAYNA=y -CONFIG_COPS_TANGENT=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_ATM=y -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -CONFIG_ARCNET_COM20020=m -CONFIG_ARCNET_COM20020_ISA=m -CONFIG_ARCNET_COM20020_PCI=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_ETHERTAP=m -CONFIG_NET_SB1000=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_EL1=m -CONFIG_EL2=m -CONFIG_ELPLUS=m -CONFIG_EL16=m -CONFIG_EL3=m -CONFIG_3C515=m -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -CONFIG_LANCE=m -CONFIG_NET_VENDOR_SMC=y -CONFIG_WD80x3=m -CONFIG_ULTRA=m -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -CONFIG_NI52=m -CONFIG_NI65=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -CONFIG_AT1700=m -CONFIG_DEPCA=m -CONFIG_HP100=m -CONFIG_NET_ISA=y -CONFIG_E2100=m -CONFIG_EWRK3=m -CONFIG_EEXPRESS=m -CONFIG_EEXPRESS_PRO=m -CONFIG_HPLAN_PLUS=m -CONFIG_HPLAN=m -CONFIG_LP486E=m -CONFIG_ETH16I=m -CONFIG_NE2000=m -CONFIG_ZNET=m -CONFIG_SEEQ8005=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_AC3200=m -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_CS89x0=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_8139_RXBUF_IDX=2 -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set -CONFIG_NET_POCKET=y -CONFIG_ATP=m -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_IGB=m -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_SIS190=m -CONFIG_SK98LIN=m -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BCM44=m -CONFIG_BNX2=m -# CONFIG_2BUFF_MODE is not set - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_QLA3XXX=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -# CONFIG_ARLAN is not set -CONFIG_WAVELAN=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMTR=m -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_SKISA=m -CONFIG_PROTEON=m -CONFIG_ABYSS=m -CONFIG_SMCTR=m -CONFIG_NET_FC=y -CONFIG_RCPCI=m -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -CONFIG_WAN=y -CONFIG_HOSTESS_SV11=m -# CONFIG_COSA is not set -CONFIG_DSCC4=m -CONFIG_DSCC4_PCISYNC=y -CONFIG_DSCC4_PCI_RST=y -CONFIG_LANMEDIA=m -CONFIG_SEALEVEL_4021=m -CONFIG_SYNCLINK_SYNCPPP=m -CONFIG_HDLC=m -CONFIG_HDLC_RAW=y -CONFIG_HDLC_RAW_ETH=y -CONFIG_HDLC_CISCO=y -CONFIG_HDLC_FR=y -CONFIG_HDLC_PPP=y -CONFIG_HDLC_X25=y -CONFIG_PCI200SYN=m -CONFIG_WANXL=m -# CONFIG_WANXL_BUILD_FIRMWARE is not set -CONFIG_PC300=m -CONFIG_PC300_MLPPP=y -CONFIG_N2=m -CONFIG_C101=m -CONFIG_FARSYNC=m -CONFIG_DLCI=m -CONFIG_DLCI_COUNT=24 -CONFIG_DLCI_MAX=8 -CONFIG_SDLA=m -# CONFIG_WAN_ROUTER_DRIVERS is not set -CONFIG_LAPBETHER=m -CONFIG_X25_ASY=m -# CONFIG_SBNI is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_ARCNET_COM20020_CS=m -CONFIG_PCMCIA_IBMTR=m - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -CONFIG_ATM_ZATM=m -# CONFIG_ATM_ZATM_DEBUG is not set -CONFIG_ATM_NICSTAR=m -CONFIG_ATM_NICSTAR_USE_SUNI=y -CONFIG_ATM_NICSTAR_USE_IDT77105=y -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -CONFIG_ATM_IDT77252_RCV_ALL=y -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_IA=m -# CONFIG_ATM_IA_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -CONFIG_ATM_FORE200E_PCA=y -CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y -CONFIG_ATM_FORE200E_TX_RETRY=16 -CONFIG_ATM_FORE200E_DEBUG=0 -CONFIG_ATM_FORE200E=m -CONFIG_ATM_HE=m -CONFIG_ATM_HE_USE_SUNI=y - -# -# Amateur Radio support -# -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_BPQETHER=m -CONFIG_SCC=m -CONFIG_SCC_DELAY=y -CONFIG_SCC_TRXECHO=y -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_BAYCOM_EPP=m -CONFIG_YAM=m - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_TOSHIBA_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m - -# -# Bluetooth support -# -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_0=y -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_AVM_A1=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_IX1MICROR2=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_ASUSCOM=y -CONFIG_HISAX_TELEINT=y -CONFIG_HISAX_HFCS=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_SPORTSTER=y -CONFIG_HISAX_MIC=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_ISURF=y -CONFIG_HISAX_HSTSAPHIR=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_ICN=m -CONFIG_ISDN_DRV_PCBIT=m -CONFIG_ISDN_DRV_SC=m -CONFIG_ISDN_DRV_ACT2000=m -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_T1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -CONFIG_GAMEPORT=m -CONFIG_SOUND_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_VORTEX=m -CONFIG_GAMEPORT_FM801=m -CONFIG_GAMEPORT_CS461x=m -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_INPORT=m -CONFIG_MOUSE_ATIXL=y -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDDLER=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -# CONFIG_INPUT_JOYDUMP is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_ECC=m -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_ROCKETPORT=m -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_ICOM is not set -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m -CONFIG_QIC02_TAPE=m -CONFIG_QIC02_DYNCONF=y - -# -# Setting runtime QIC-02 configuration is done with qic02conf -# - -# -# from the tpqic02-support package. It is available at -# - -# -# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/ -# - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -CONFIG_IPMI_PANIC_STRING=y -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_AMD7XX_TCO=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_SCx200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -CONFIG_MIXCOMWD=m -CONFIG_WDT=m -CONFIG_WDT_501=y - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=m -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_AGP=m -CONFIG_AGP_ALI=m -CONFIG_AGP_ATI=m -CONFIG_AGP_AMD=m -CONFIG_AGP_AMD64=m -CONFIG_AGP_INTEL=m -CONFIG_AGP_INTEL_MCH=m -CONFIG_AGP_NVIDIA=m -CONFIG_AGP_SIS=m -CONFIG_AGP_SWORKS=m -CONFIG_AGP_VIA=m -CONFIG_AGP_EFFICEON=m -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -# CONFIG_MWAVE is not set -CONFIG_SCx200_GPIO=m -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HANGCHECK_TIMER=m -CONFIG_VTUNE=m - -# -# Linux InfraRed Controller -# -CONFIG_LIRC_SUPPORT=m -CONFIG_LIRC_MAX_DEV=2 -CONFIG_LIRC_BT829=m -CONFIG_LIRC_IT87=m -CONFIG_LIRC_ATIUSB=m -CONFIG_LIRC_SERIAL=m -# CONFIG_LIRC_HOMEBREW is not set -CONFIG_LIRC_PORT_SERIAL=0x3f8 -CONFIG_LIRC_IRQ_SERIAL=4 -CONFIG_LIRC_SIR=m -CONFIG_LIRC_PORT_SIR=0x3f8 -CONFIG_LIRC_IRQ_SIR=4 - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_I2C=m -CONFIG_SCx200_I2C_SCL=12 -CONFIG_SCx200_I2C_SDA=13 -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_VIA686A=m -# CONFIG_SENSORS_VT1211 is not set -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_PCF8574=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_PMS=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m - -# -# Radio Adapters -# -CONFIG_RADIO_CADET=m -CONFIG_RADIO_RTRACK=m -CONFIG_RADIO_RTRACK2=m -CONFIG_RADIO_AZTECH=m -CONFIG_RADIO_GEMTEK=m -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_RADIO_MIROPCM20=m -# CONFIG_RADIO_MIROPCM20_RDS is not set -CONFIG_RADIO_SF16FMI=m -CONFIG_RADIO_SF16FMR2=m -CONFIG_RADIO_TERRATEC=m -CONFIG_RADIO_TRUST=m -CONFIG_RADIO_TYPHOON=m -CONFIG_RADIO_TYPHOON_PROC_FS=y -CONFIG_RADIO_ZOLTRIX=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported Frontend Modules -# -CONFIG_DVB_TWINHAN_DST=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc" -CONFIG_DVB_ALPS_TDLB7=m -CONFIG_DVB_ALPS_TDMB7=m -CONFIG_DVB_ATMEL_AT76C651=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_GRUNDIG_29504_491=m -CONFIG_DVB_GRUNDIG_29504_401=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1820=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin" -CONFIG_DVB_NXT6000=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_SKYSTAR=m - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_PM2=m -CONFIG_FB_PM2_FIFO_DISCONNECT=y -CONFIG_FB_CYBER2000=m -CONFIG_FB_IMSTT=y -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_RIVA=m -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_XL_INIT=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_MEMORY=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_OPL4_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# ISA devices -# -CONFIG_SND_AD1816A=m -CONFIG_SND_AD1848=m -CONFIG_SND_CS4231=m -CONFIG_SND_CS4232=m -CONFIG_SND_CS4236=m -CONFIG_SND_ES968=m -CONFIG_SND_ES1688=m -CONFIG_SND_ES18XX=m -CONFIG_SND_GUSCLASSIC=m -CONFIG_SND_GUSEXTREME=m -CONFIG_SND_GUSMAX=m -CONFIG_SND_INTERWAVE=m -CONFIG_SND_INTERWAVE_STB=m -CONFIG_SND_OPTI92X_AD1848=m -CONFIG_SND_OPTI92X_CS4231=m -CONFIG_SND_OPTI93X=m -CONFIG_SND_SB8=m -CONFIG_SND_SB16=m -CONFIG_SND_SBAWE=m -CONFIG_SND_SB16_CSP=y -CONFIG_SND_WAVEFRONT=m -CONFIG_SND_ALS100=m -CONFIG_SND_AZT2320=m -CONFIG_SND_CMI8330=m -CONFIG_SND_DT019X=m -CONFIG_SND_OPL3SA2=m -CONFIG_SND_SGALAXY=m -CONFIG_SND_SSCAPE=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m -CONFIG_SND_HDA_INTEL=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_VXP440 is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_FMIO=0x388 -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_MPUIO=0x330 -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_CMPCI_CM8738=y -# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set -CONFIG_SOUND_CMPCI_SPDIFLOOP=y -CONFIG_SOUND_CMPCI_SPEAKERS=2 -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -# CONFIG_SOUND_AD1816 is not set -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_SGALAXY=m -CONFIG_SOUND_ADLIB=m -CONFIG_SOUND_ACI_MIXER=m -CONFIG_SOUND_CS4232=m -CONFIG_SOUND_SSCAPE=m -CONFIG_SOUND_GUS=m -# CONFIG_SOUND_GUS16 is not set -CONFIG_SOUND_GUSMAX=y -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_TRIX=m -CONFIG_SOUND_MSS=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -CONFIG_SOUND_MAD16=m -CONFIG_MAD16_OLDCARD=y -CONFIG_SOUND_PAS=m -CONFIG_SOUND_PSS=m -CONFIG_PSS_MIXER=y -# CONFIG_PSS_HAVE_BOOT is not set -CONFIG_SOUND_SB=m -# CONFIG_SOUND_AWE32_SYNTH is not set -CONFIG_SOUND_WAVEFRONT=m -CONFIG_SOUND_MAUI=m -CONFIG_SOUND_YM3812=m -CONFIG_SOUND_OPL3SA1=m -CONFIG_SOUND_OPL3SA2=m -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_AEDSP16=m -CONFIG_SC6600=y -CONFIG_SC6600_JOY=y -CONFIG_SC6600_CDROM=4 -CONFIG_SC6600_CDROMBASE=0x0 -# CONFIG_AEDSP16_MSS is not set -# CONFIG_AEDSP16_SBPRO is not set -CONFIG_AEDSP16_MPU401=y -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_KAHLUA=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -CONFIG_USB_AUDIO=m - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_TIGL=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_SPEEDTOUCH=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_UDAPL_HELPER=m -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_DMAPI=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_OCFS2_FS=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -# CONFIG_QNX4FS_RW is not set -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_CRASH_DUMP=m -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -CONFIG_EARLY_PRINTK=y -# CONFIG_KPROBES is not set -# CONFIG_DEBUGREG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_KDB is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y -# CONFIG_HOOK is not set - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -# CONFIG_SECURITY_SELINUX_MLS is not set -CONFIG_SECURITY_SUBDOMAIN=m - -# -# IBM Crypto Hardware support -# -CONFIG_IBM_CRYPTO=m -CONFIG_ICA_LEEDSLITE=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="bigsmp" -CONFIG_RELEASE="7.308" -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_PC=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-smp.config deleted file mode 100644 index 9971cfae0f..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-smp.config +++ /dev/null @@ -1,2888 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_GENERIC_ISA_DMA=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -# CONFIG_STANDALONE is not set - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_RES_BLKIO=y -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_IOSCHED_PS=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -# CONFIG_X86_PC is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -CONFIG_X86_GENERICARCH=y -# CONFIG_X86_ES7000 is not set -CONFIG_X86_CYCLONE_TIMER=y -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -CONFIG_MPENTIUMII=y -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -# CONFIG_HPET_TIMER is not set -# CONFIG_HPET_EMULATE_RTC is not set -CONFIG_SMP=y -CONFIG_NR_CPUS=128 -CONFIG_SCHED_SMT=y -# CONFIG_PREEMPT is not set -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_TSC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_X86_MCE_P4THERMAL=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -# CONFIG_HIGHMEM4G is not set -CONFIG_HIGHMEM64G=y -CONFIG_HIGHMEM=y -CONFIG_X86_PAE=y -# CONFIG_NUMA is not set -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -CONFIG_IRQBALANCE=y -CONFIG_HAVE_DEC_LOCK=y -CONFIG_BOOT_IOREMAP=y -CONFIG_REGPARM=y - -# -# Special options -# -CONFIG_PROC_MM=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -# CONFIG_SOFTWARE_SUSPEND is not set -# CONFIG_PM_DISK is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -# CONFIG_ACPI_ASUS is not set -CONFIG_ACPI_TOSHIBA=m -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_INITRD=y - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -CONFIG_APM_DO_ENABLE=y -# CONFIG_APM_CPU_IDLE is not set -CONFIG_APM_DISPLAY_BLANK=y -# CONFIG_APM_RTC_IS_GMT is not set -CONFIG_APM_ALLOW_INTS=y -# CONFIG_APM_REAL_MODE_POWER_OFF is not set -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_PROC_INTF=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_POWERNOW_K6=m -CONFIG_X86_POWERNOW_K7=m -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_GX_SUSPMOD=m -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -# CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI is not set -CONFIG_X86_SPEEDSTEP_ICH=m -CONFIG_X86_SPEEDSTEP_SMI=m -CONFIG_X86_P4_CLOCKMOD=m -CONFIG_X86_SPEEDSTEP_LIB=m -CONFIG_X86_LONGRUN=m -CONFIG_X86_LONGHAUL=m - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCI_USE_VECTOR is not set -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -CONFIG_SCx200=m - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_I82365=m -CONFIG_TCIC=m -CONFIG_PCMCIA_PROBE=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_AMD=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set -CONFIG_MTD_CONCAT=m - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -CONFIG_MTD_OBSOLETE_CHIPS=y -CONFIG_MTD_AMDSTD=m -CONFIG_MTD_SHARP=m -CONFIG_MTD_JEDEC=m - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BUSWIDTH=2 -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_OCTAGON=m -CONFIG_MTD_VMAX=m -CONFIG_MTD_SCx200_DOCFLASH=m -CONFIG_MTD_AMD76XROM=m -CONFIG_MTD_ICH2ROM=m -CONFIG_MTD_SCB2_FLASH=m -CONFIG_MTD_L440GX=m -CONFIG_MTD_PCI=m - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_ISAPNP=y -CONFIG_PNPBIOS=y -CONFIG_PNPBIOS_PROC_FS=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -CONFIG_BLK_DEV_XD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_CARMEL=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=64000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_IDEDISK_STROKE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_BLK_DEV_OPTI621=y -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -CONFIG_IDEDMA_ONLYDISK=y -CONFIG_BLK_DEV_ADMA=y -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=y -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_SC1200=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_NS87415=y -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -CONFIG_BLK_DEV_TRM290=y -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_IDE_CHIPSETS=y - -# -# Note: most of these also require special kernel boot parameters -# -CONFIG_BLK_DEV_4DRIVES=y -CONFIG_BLK_DEV_ALI14XX=y -CONFIG_BLK_DEV_DTC2278=y -CONFIG_BLK_DEV_HT6560B=y -# CONFIG_BLK_DEV_PDC4030 is not set -CONFIG_BLK_DEV_QD65XX=y -CONFIG_BLK_DEV_UMC8672=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_7000FASST=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AHA152X=m -CONFIG_SCSI_AHA1542=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_DPT_I2O=m -CONFIG_SCSI_ADVANSYS=m -CONFIG_SCSI_IN2000=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=y -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PATA_PDC2027X=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_CPQFCTS is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_DTC3280=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_EATA_PIO=m -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_GENERIC_NCR5380=m -CONFIG_SCSI_GENERIC_NCR5380_MMIO=m -CONFIG_SCSI_GENERIC_NCR53C400=y -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_NCR53C406A=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -CONFIG_SCSI_PAS16=m -CONFIG_SCSI_PSI240I=m -CONFIG_SCSI_QLOGIC_FAS=m -CONFIG_SCSI_QLOGIC_ISP=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -CONFIG_SCSI_SYM53C416=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_T128=m -CONFIG_SCSI_U14_34F=m -CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y -CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y -CONFIG_SCSI_U14_34F_MAX_TAGS=8 -CONFIG_SCSI_ULTRASTOR=m -CONFIG_SCSI_NSP32=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -CONFIG_PCMCIA_AHA152X=m -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_NINJA_SCSI=m -CONFIG_PCMCIA_QLOGIC=m - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -CONFIG_CD_NO_IDESCSI=y -CONFIG_AZTCD=m -CONFIG_GSCD=m -CONFIG_MCD=m -CONFIG_MCD_IRQ=11 -CONFIG_MCD_BASE=0x300 -CONFIG_OPTCD=m -CONFIG_SJCD=m -CONFIG_ISP16_CDI=m -CONFIG_CDU535=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -CONFIG_DECNET=m -CONFIG_DECNET_SIOCGIFCONF=y -# CONFIG_DECNET_ROUTER is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -# CONFIG_IP_NF_NAT_LOCAL is not set -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# DECnet: Netfilter Configuration -# -CONFIG_DECNET_NF_GRABULATOR=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=y -CONFIG_ATM_CLIP=y -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_LTPC=m -CONFIG_COPS=m -CONFIG_COPS_DAYNA=y -CONFIG_COPS_TANGENT=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_ATM=y -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -CONFIG_ARCNET_COM20020=m -CONFIG_ARCNET_COM20020_ISA=m -CONFIG_ARCNET_COM20020_PCI=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_ETHERTAP=m -CONFIG_NET_SB1000=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_EL1=m -CONFIG_EL2=m -CONFIG_ELPLUS=m -CONFIG_EL16=m -CONFIG_EL3=m -CONFIG_3C515=m -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -CONFIG_LANCE=m -CONFIG_NET_VENDOR_SMC=y -CONFIG_WD80x3=m -CONFIG_ULTRA=m -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -CONFIG_NI52=m -CONFIG_NI65=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -CONFIG_AT1700=m -CONFIG_DEPCA=m -CONFIG_HP100=m -CONFIG_NET_ISA=y -CONFIG_E2100=m -CONFIG_EWRK3=m -CONFIG_EEXPRESS=m -CONFIG_EEXPRESS_PRO=m -CONFIG_HPLAN_PLUS=m -CONFIG_HPLAN=m -CONFIG_LP486E=m -CONFIG_ETH16I=m -CONFIG_NE2000=m -CONFIG_ZNET=m -CONFIG_SEEQ8005=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_AC3200=m -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_CS89x0=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_8139_RXBUF_IDX=2 -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set -CONFIG_NET_POCKET=y -CONFIG_ATP=m -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_SIS190=m -CONFIG_SK98LIN=m -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BCM44=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -# CONFIG_2BUFF_MODE is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -# CONFIG_ARLAN is not set -CONFIG_WAVELAN=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMTR=m -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_SKISA=m -CONFIG_PROTEON=m -CONFIG_ABYSS=m -CONFIG_SMCTR=m - -# -# Quadrics QsNet -# -CONFIG_QSNET=m -CONFIG_ELAN3=m -CONFIG_ELAN4=m -CONFIG_EP=m -CONFIG_EIP=m -CONFIG_RMS=m -CONFIG_JTAG=m -CONFIG_NET_FC=y -CONFIG_RCPCI=m -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -CONFIG_WAN=y -CONFIG_HOSTESS_SV11=m -# CONFIG_COSA is not set -CONFIG_DSCC4=m -CONFIG_DSCC4_PCISYNC=y -CONFIG_DSCC4_PCI_RST=y -CONFIG_LANMEDIA=m -CONFIG_SEALEVEL_4021=m -CONFIG_SYNCLINK_SYNCPPP=m -CONFIG_HDLC=m -CONFIG_HDLC_RAW=y -CONFIG_HDLC_RAW_ETH=y -CONFIG_HDLC_CISCO=y -CONFIG_HDLC_FR=y -CONFIG_HDLC_PPP=y -CONFIG_HDLC_X25=y -CONFIG_PCI200SYN=m -CONFIG_WANXL=m -# CONFIG_WANXL_BUILD_FIRMWARE is not set -CONFIG_PC300=m -CONFIG_PC300_MLPPP=y -CONFIG_N2=m -CONFIG_C101=m -CONFIG_FARSYNC=m -CONFIG_DLCI=m -CONFIG_DLCI_COUNT=24 -CONFIG_DLCI_MAX=8 -CONFIG_SDLA=m -# CONFIG_WAN_ROUTER_DRIVERS is not set -CONFIG_LAPBETHER=m -CONFIG_X25_ASY=m -# CONFIG_SBNI is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_ARCNET_COM20020_CS=m -CONFIG_PCMCIA_IBMTR=m - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -CONFIG_ATM_ZATM=m -# CONFIG_ATM_ZATM_DEBUG is not set -CONFIG_ATM_NICSTAR=m -CONFIG_ATM_NICSTAR_USE_SUNI=y -CONFIG_ATM_NICSTAR_USE_IDT77105=y -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -CONFIG_ATM_IDT77252_RCV_ALL=y -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_IA=m -# CONFIG_ATM_IA_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -CONFIG_ATM_FORE200E_PCA=y -CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y -CONFIG_ATM_FORE200E_TX_RETRY=16 -CONFIG_ATM_FORE200E_DEBUG=0 -CONFIG_ATM_FORE200E=m -CONFIG_ATM_HE=m -CONFIG_ATM_HE_USE_SUNI=y - -# -# Amateur Radio support -# -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_BPQETHER=m -CONFIG_SCC=m -CONFIG_SCC_DELAY=y -CONFIG_SCC_TRXECHO=y -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_BAYCOM_EPP=m -CONFIG_YAM=m - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_TOSHIBA_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m - -# -# Bluetooth support -# -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_0=y -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_AVM_A1=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_IX1MICROR2=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_ASUSCOM=y -CONFIG_HISAX_TELEINT=y -CONFIG_HISAX_HFCS=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_SPORTSTER=y -CONFIG_HISAX_MIC=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_ISURF=y -CONFIG_HISAX_HSTSAPHIR=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_ICN=m -CONFIG_ISDN_DRV_PCBIT=m -CONFIG_ISDN_DRV_SC=m -CONFIG_ISDN_DRV_ACT2000=m -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_T1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -CONFIG_GAMEPORT=m -CONFIG_SOUND_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_VORTEX=m -CONFIG_GAMEPORT_FM801=m -CONFIG_GAMEPORT_CS461x=m -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_INPORT=m -CONFIG_MOUSE_ATIXL=y -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDDLER=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -# CONFIG_INPUT_JOYDUMP is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_ECC=m -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_ROCKETPORT=m -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_ICOM is not set -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m -CONFIG_QIC02_TAPE=m -CONFIG_QIC02_DYNCONF=y - -# -# Setting runtime QIC-02 configuration is done with qic02conf -# - -# -# from the tpqic02-support package. It is available at -# - -# -# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/ -# - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -CONFIG_IPMI_PANIC_STRING=y -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_AMD7XX_TCO=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_SCx200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -CONFIG_MIXCOMWD=m -CONFIG_WDT=m -CONFIG_WDT_501=y - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=m -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_AGP=m -CONFIG_AGP_ALI=m -CONFIG_AGP_ATI=m -CONFIG_AGP_AMD=m -CONFIG_AGP_AMD64=m -CONFIG_AGP_INTEL=m -CONFIG_AGP_INTEL_MCH=m -CONFIG_AGP_NVIDIA=m -CONFIG_AGP_SIS=m -CONFIG_AGP_SWORKS=m -CONFIG_AGP_VIA=m -CONFIG_AGP_EFFICEON=m -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -# CONFIG_MWAVE is not set -CONFIG_SCx200_GPIO=m -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HANGCHECK_TIMER=m -CONFIG_VTUNE=m - -# -# Linux InfraRed Controller -# -CONFIG_LIRC_SUPPORT=m -CONFIG_LIRC_MAX_DEV=2 -CONFIG_LIRC_BT829=m -CONFIG_LIRC_IT87=m -CONFIG_LIRC_ATIUSB=m -CONFIG_LIRC_SERIAL=m -# CONFIG_LIRC_HOMEBREW is not set -CONFIG_LIRC_PORT_SERIAL=0x3f8 -CONFIG_LIRC_IRQ_SERIAL=4 -CONFIG_LIRC_SIR=m -CONFIG_LIRC_PORT_SIR=0x3f8 -CONFIG_LIRC_IRQ_SIR=4 - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_I2C=m -CONFIG_SCx200_I2C_SCL=12 -CONFIG_SCx200_I2C_SDA=13 -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT1211=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_PCF8574=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_PMS=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m - -# -# Radio Adapters -# -CONFIG_RADIO_CADET=m -CONFIG_RADIO_RTRACK=m -CONFIG_RADIO_RTRACK2=m -CONFIG_RADIO_AZTECH=m -CONFIG_RADIO_GEMTEK=m -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_RADIO_MIROPCM20=m -# CONFIG_RADIO_MIROPCM20_RDS is not set -CONFIG_RADIO_SF16FMI=m -CONFIG_RADIO_SF16FMR2=m -CONFIG_RADIO_TERRATEC=m -CONFIG_RADIO_TRUST=m -CONFIG_RADIO_TYPHOON=m -CONFIG_RADIO_TYPHOON_PROC_FS=y -CONFIG_RADIO_ZOLTRIX=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported Frontend Modules -# -CONFIG_DVB_TWINHAN_DST=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc" -CONFIG_DVB_ALPS_TDLB7=m -CONFIG_DVB_ALPS_TDMB7=m -CONFIG_DVB_ATMEL_AT76C651=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_GRUNDIG_29504_491=m -CONFIG_DVB_GRUNDIG_29504_401=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1820=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin" -CONFIG_DVB_NXT6000=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_SKYSTAR=m - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_PM2=m -CONFIG_FB_PM2_FIFO_DISCONNECT=y -CONFIG_FB_CYBER2000=m -CONFIG_FB_IMSTT=y -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_RIVA=m -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_XL_INIT=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_MEMORY=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_OPL4_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# ISA devices -# -CONFIG_SND_AD1816A=m -CONFIG_SND_AD1848=m -CONFIG_SND_CS4231=m -CONFIG_SND_CS4232=m -CONFIG_SND_CS4236=m -CONFIG_SND_ES968=m -CONFIG_SND_ES1688=m -CONFIG_SND_ES18XX=m -CONFIG_SND_GUSCLASSIC=m -CONFIG_SND_GUSEXTREME=m -CONFIG_SND_GUSMAX=m -CONFIG_SND_INTERWAVE=m -CONFIG_SND_INTERWAVE_STB=m -CONFIG_SND_OPTI92X_AD1848=m -CONFIG_SND_OPTI92X_CS4231=m -CONFIG_SND_OPTI93X=m -CONFIG_SND_SB8=m -CONFIG_SND_SB16=m -CONFIG_SND_SBAWE=m -CONFIG_SND_SB16_CSP=y -CONFIG_SND_WAVEFRONT=m -CONFIG_SND_ALS100=m -CONFIG_SND_AZT2320=m -CONFIG_SND_CMI8330=m -CONFIG_SND_DT019X=m -CONFIG_SND_OPL3SA2=m -CONFIG_SND_SGALAXY=m -CONFIG_SND_SSCAPE=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m -CONFIG_SND_HDA_INTEL=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_VXP440 is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_FMIO=0x388 -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_MPUIO=0x330 -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_CMPCI_CM8738=y -# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set -CONFIG_SOUND_CMPCI_SPDIFLOOP=y -CONFIG_SOUND_CMPCI_SPEAKERS=2 -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -# CONFIG_SOUND_AD1816 is not set -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_SGALAXY=m -CONFIG_SOUND_ADLIB=m -CONFIG_SOUND_ACI_MIXER=m -CONFIG_SOUND_CS4232=m -CONFIG_SOUND_SSCAPE=m -CONFIG_SOUND_GUS=m -# CONFIG_SOUND_GUS16 is not set -CONFIG_SOUND_GUSMAX=y -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_TRIX=m -CONFIG_SOUND_MSS=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -CONFIG_SOUND_MAD16=m -CONFIG_MAD16_OLDCARD=y -CONFIG_SOUND_PAS=m -CONFIG_SOUND_PSS=m -CONFIG_PSS_MIXER=y -# CONFIG_PSS_HAVE_BOOT is not set -CONFIG_SOUND_SB=m -# CONFIG_SOUND_AWE32_SYNTH is not set -CONFIG_SOUND_WAVEFRONT=m -CONFIG_SOUND_MAUI=m -CONFIG_SOUND_YM3812=m -CONFIG_SOUND_OPL3SA1=m -CONFIG_SOUND_OPL3SA2=m -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_AEDSP16=m -CONFIG_SC6600=y -CONFIG_SC6600_JOY=y -CONFIG_SC6600_CDROM=4 -CONFIG_SC6600_CDROMBASE=0x0 -# CONFIG_AEDSP16_MSS is not set -# CONFIG_AEDSP16_SBPRO is not set -CONFIG_AEDSP16_MPU401=y -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_KAHLUA=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -CONFIG_USB_AUDIO=m - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_TIGL=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_SPEEDTOUCH=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_UDAPL_HELPER=m -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_DMAPI=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_OCFS2_FS=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -# CONFIG_QNX4FS_RW is not set -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_CRASH_DUMP=m -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -CONFIG_EARLY_PRINTK=y -# CONFIG_KPROBES is not set -# CONFIG_DEBUGREG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_KDB is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y -# CONFIG_HOOK is not set - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -# CONFIG_SECURITY_SELINUX_MLS is not set -CONFIG_SECURITY_SUBDOMAIN=m - -# -# IBM Crypto Hardware support -# -CONFIG_IBM_CRYPTO=m -CONFIG_ICA_LEEDSLITE=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="bigsmp" -CONFIG_RELEASE="7.191" -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_PC=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686.config deleted file mode 100644 index 0f2ef09904..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686.config +++ /dev/null @@ -1,2963 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -# CONFIG_STANDALONE is not set -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_RES_BLKIO=y -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_IOSCHED_PS=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -CONFIG_MPENTIUMII=y -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -# CONFIG_SMP is not set -# CONFIG_PREEMPT is not set -# CONFIG_X86_UP_APIC is not set -CONFIG_X86_TSC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -# CONFIG_HIGHMEM4G is not set -CONFIG_HIGHMEM64G=y -CONFIG_HIGHMEM=y -CONFIG_X86_PAE=y -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_EFI=y -CONFIG_BOOT_IOREMAP=y -CONFIG_REGPARM=y - -# -# Special options -# -CONFIG_PROC_MM=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -# CONFIG_SOFTWARE_SUSPEND is not set -# CONFIG_PM_DISK is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -# CONFIG_ACPI_ASUS is not set -CONFIG_ACPI_TOSHIBA=m -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_INITRD=y - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -CONFIG_APM_DO_ENABLE=y -# CONFIG_APM_CPU_IDLE is not set -CONFIG_APM_DISPLAY_BLANK=y -# CONFIG_APM_RTC_IS_GMT is not set -CONFIG_APM_ALLOW_INTS=y -# CONFIG_APM_REAL_MODE_POWER_OFF is not set -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_PROC_INTF=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_POWERNOW_K6=m -CONFIG_X86_POWERNOW_K7=m -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_GX_SUSPMOD=m -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_SPEEDSTEP_ICH=m -CONFIG_X86_SPEEDSTEP_SMI=m -CONFIG_X86_P4_CLOCKMOD=m -CONFIG_X86_SPEEDSTEP_LIB=m -CONFIG_X86_LONGRUN=m -CONFIG_X86_LONGHAUL=m - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -CONFIG_SCx200=m - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_I82365=m -CONFIG_TCIC=m -CONFIG_PCMCIA_PROBE=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_COMPAQ=m -CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y -CONFIG_HOTPLUG_PCI_AMD=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=m -CONFIG_MTD_CONCAT=m -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_CMDLINE_PARTS=m - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -CONFIG_MTD_OBSOLETE_CHIPS=y -CONFIG_MTD_AMDSTD=m -CONFIG_MTD_SHARP=m -CONFIG_MTD_JEDEC=m - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BUSWIDTH=2 -CONFIG_MTD_PNC2000=m -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_SBC_GXX=m -CONFIG_MTD_ELAN_104NC=m -CONFIG_MTD_OCTAGON=m -CONFIG_MTD_VMAX=m -CONFIG_MTD_SCx200_DOCFLASH=m -CONFIG_MTD_AMD76XROM=m -CONFIG_MTD_ICH2ROM=m -CONFIG_MTD_SCB2_FLASH=m -CONFIG_MTD_NETtel=m -CONFIG_MTD_DILNETPC=m -CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000 -CONFIG_MTD_L440GX=m -CONFIG_MTD_PCI=m - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_ISAPNP=y -CONFIG_PNPBIOS=y -CONFIG_PNPBIOS_PROC_FS=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -CONFIG_BLK_DEV_XD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_BPCK6=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_CARMEL=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=64000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_IDEDISK_STROKE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_BLK_DEV_OPTI621=y -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -CONFIG_IDEDMA_ONLYDISK=y -CONFIG_BLK_DEV_ADMA=y -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=y -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_SC1200=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_NS87415=y -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -CONFIG_BLK_DEV_TRM290=y -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_IDE_CHIPSETS=y - -# -# Note: most of these also require special kernel boot parameters -# -CONFIG_BLK_DEV_4DRIVES=y -CONFIG_BLK_DEV_ALI14XX=y -CONFIG_BLK_DEV_DTC2278=y -CONFIG_BLK_DEV_HT6560B=y -# CONFIG_BLK_DEV_PDC4030 is not set -CONFIG_BLK_DEV_QD65XX=y -CONFIG_BLK_DEV_UMC8672=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_7000FASST=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AHA152X=m -CONFIG_SCSI_AHA1542=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_DPT_I2O=m -CONFIG_SCSI_ADVANSYS=m -CONFIG_SCSI_IN2000=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_CPQFCTS is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_DTC3280=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_EATA_PIO=m -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_GENERIC_NCR5380=m -CONFIG_SCSI_GENERIC_NCR5380_MMIO=m -CONFIG_SCSI_GENERIC_NCR53C400=y -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_NCR53C406A=m -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -CONFIG_SCSI_PAS16=m -CONFIG_SCSI_PSI240I=m -CONFIG_SCSI_QLOGIC_FAS=m -CONFIG_SCSI_QLOGIC_ISP=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -CONFIG_SCSI_SYM53C416=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_T128=m -CONFIG_SCSI_U14_34F=m -CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y -CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y -CONFIG_SCSI_U14_34F_MAX_TAGS=8 -CONFIG_SCSI_ULTRASTOR=m -CONFIG_SCSI_NSP32=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -CONFIG_PCMCIA_AHA152X=m -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_NINJA_SCSI=m -CONFIG_PCMCIA_QLOGIC=m -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -# CONFIG_SATA_INIC162X is not set -CONFIG_PATA_ALI=m -CONFIG_PATA_AMD=m -# CONFIG_PATA_ARTOP is not set -CONFIG_PATA_ATIIXP=m -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CS5535 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -CONFIG_PATA_HPT3X2N=m -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_ISAPNP is not set -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -# CONFIG_PATA_LEGACY is not set -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_QDI is not set -CONFIG_PATA_RADISYS=m -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -CONFIG_PATA_SERVERWORKS=m -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -CONFIG_PATA_VIA=m -CONFIG_PATA_WINBOND=m -# CONFIG_PATA_WINBOND_VLB is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -CONFIG_CD_NO_IDESCSI=y -CONFIG_AZTCD=m -CONFIG_GSCD=m -CONFIG_MCD=m -CONFIG_MCD_IRQ=11 -CONFIG_MCD_BASE=0x300 -CONFIG_OPTCD=m -# CONFIG_CM206 is not set -CONFIG_SJCD=m -CONFIG_ISP16_CDI=m -# CONFIG_CDU31A is not set -CONFIG_CDU535=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -CONFIG_DECNET=m -CONFIG_DECNET_SIOCGIFCONF=y -# CONFIG_DECNET_ROUTER is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -# CONFIG_IP_NF_NAT_LOCAL is not set -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# DECnet: Netfilter Configuration -# -CONFIG_DECNET_NF_GRABULATOR=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=y -CONFIG_ATM_CLIP=y -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_LTPC=m -CONFIG_COPS=m -CONFIG_COPS_DAYNA=y -CONFIG_COPS_TANGENT=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_ATM=y -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -CONFIG_ARCNET_COM20020=m -CONFIG_ARCNET_COM20020_ISA=m -CONFIG_ARCNET_COM20020_PCI=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_ETHERTAP=m -CONFIG_NET_SB1000=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_EL1=m -CONFIG_EL2=m -CONFIG_ELPLUS=m -CONFIG_EL16=m -CONFIG_EL3=m -CONFIG_3C515=m -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -CONFIG_LANCE=m -CONFIG_NET_VENDOR_SMC=y -CONFIG_WD80x3=m -CONFIG_ULTRA=m -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -# CONFIG_NI5010 is not set -CONFIG_NI52=m -CONFIG_NI65=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -CONFIG_AT1700=m -CONFIG_DEPCA=m -CONFIG_HP100=m -CONFIG_NET_ISA=y -CONFIG_E2100=m -CONFIG_EWRK3=m -CONFIG_EEXPRESS=m -CONFIG_EEXPRESS_PRO=m -CONFIG_HPLAN_PLUS=m -CONFIG_HPLAN=m -CONFIG_LP486E=m -CONFIG_ETH16I=m -CONFIG_NE2000=m -CONFIG_ZNET=m -CONFIG_SEEQ8005=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_AC3200=m -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_CS89x0=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_8139_RXBUF_IDX=2 -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set -CONFIG_NET_POCKET=y -CONFIG_ATP=m -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_IGB=m -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_SIS190=m -CONFIG_SK98LIN=m -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BCM44=m -CONFIG_BNX2=m -# CONFIG_2BUFF_MODE is not set - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_QLA3XXX=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -# CONFIG_ARLAN is not set -CONFIG_WAVELAN=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMTR=m -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_SKISA=m -CONFIG_PROTEON=m -CONFIG_ABYSS=m -CONFIG_SMCTR=m -CONFIG_NET_FC=y -CONFIG_RCPCI=m -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -CONFIG_WAN=y -CONFIG_HOSTESS_SV11=m -# CONFIG_COSA is not set -CONFIG_DSCC4=m -CONFIG_DSCC4_PCISYNC=y -CONFIG_DSCC4_PCI_RST=y -CONFIG_LANMEDIA=m -CONFIG_SEALEVEL_4021=m -CONFIG_SYNCLINK_SYNCPPP=m -CONFIG_HDLC=m -CONFIG_HDLC_RAW=y -CONFIG_HDLC_RAW_ETH=y -CONFIG_HDLC_CISCO=y -CONFIG_HDLC_FR=y -CONFIG_HDLC_PPP=y -CONFIG_HDLC_X25=y -CONFIG_PCI200SYN=m -CONFIG_WANXL=m -# CONFIG_WANXL_BUILD_FIRMWARE is not set -CONFIG_PC300=m -CONFIG_PC300_MLPPP=y -CONFIG_N2=m -CONFIG_C101=m -CONFIG_FARSYNC=m -CONFIG_DLCI=m -CONFIG_DLCI_COUNT=24 -CONFIG_DLCI_MAX=8 -CONFIG_SDLA=m -# CONFIG_WAN_ROUTER_DRIVERS is not set -CONFIG_LAPBETHER=m -CONFIG_X25_ASY=m -# CONFIG_SBNI is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_ARCNET_COM20020_CS=m -CONFIG_PCMCIA_IBMTR=m - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -CONFIG_ATM_ZATM=m -# CONFIG_ATM_ZATM_DEBUG is not set -CONFIG_ATM_NICSTAR=m -CONFIG_ATM_NICSTAR_USE_SUNI=y -CONFIG_ATM_NICSTAR_USE_IDT77105=y -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -CONFIG_ATM_IDT77252_RCV_ALL=y -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_IA=m -# CONFIG_ATM_IA_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -CONFIG_ATM_FORE200E_PCA=y -CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y -CONFIG_ATM_FORE200E_TX_RETRY=16 -CONFIG_ATM_FORE200E_DEBUG=0 -CONFIG_ATM_FORE200E=m -CONFIG_ATM_HE=m -CONFIG_ATM_HE_USE_SUNI=y - -# -# Amateur Radio support -# -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -# CONFIG_MKISS is not set -# CONFIG_6PACK is not set -CONFIG_BPQETHER=m -# CONFIG_DMASCC is not set -CONFIG_SCC=m -CONFIG_SCC_DELAY=y -CONFIG_SCC_TRXECHO=y -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_BAYCOM_EPP=m -CONFIG_YAM=m - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# -# CONFIG_IRPORT_SIR is not set - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_TOSHIBA_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m - -# -# Bluetooth support -# -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_0=y -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_AVM_A1=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_IX1MICROR2=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_ASUSCOM=y -CONFIG_HISAX_TELEINT=y -CONFIG_HISAX_HFCS=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_SPORTSTER=y -CONFIG_HISAX_MIC=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_ISURF=y -CONFIG_HISAX_HSTSAPHIR=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_ICN=m -CONFIG_ISDN_DRV_PCBIT=m -CONFIG_ISDN_DRV_SC=m -CONFIG_ISDN_DRV_ACT2000=m -CONFIG_ISDN_DRV_TPAM=m -# CONFIG_HYSDN is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_T1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -CONFIG_GAMEPORT=m -CONFIG_SOUND_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_VORTEX=m -CONFIG_GAMEPORT_FM801=m -CONFIG_GAMEPORT_CS461x=m -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_INPORT=m -CONFIG_MOUSE_ATIXL=y -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDDLER=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -# CONFIG_INPUT_JOYDUMP is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_ECC=m -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_DIGI is not set -# CONFIG_ESPSERIAL is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -CONFIG_STALDRV=y -# CONFIG_STALLION is not set -# CONFIG_ISTALLION is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_ICOM is not set -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m -CONFIG_QIC02_TAPE=m -CONFIG_QIC02_DYNCONF=y - -# -# Setting runtime QIC-02 configuration is done with qic02conf -# - -# -# from the tpqic02-support package. It is available at -# - -# -# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/ -# - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -CONFIG_IPMI_PANIC_STRING=y -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_AMD7XX_TCO=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_SCx200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -CONFIG_MIXCOMWD=m -CONFIG_WDT=m -CONFIG_WDT_501=y - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=m -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_AGP=m -CONFIG_AGP_ALI=m -CONFIG_AGP_ATI=m -CONFIG_AGP_AMD=m -CONFIG_AGP_AMD64=m -CONFIG_AGP_INTEL=m -CONFIG_AGP_INTEL_MCH=m -CONFIG_AGP_NVIDIA=m -CONFIG_AGP_SIS=m -CONFIG_AGP_SWORKS=m -CONFIG_AGP_VIA=m -CONFIG_AGP_EFFICEON=m -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -# CONFIG_MWAVE is not set -CONFIG_SCx200_GPIO=m -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HANGCHECK_TIMER=m -CONFIG_VTUNE=m - -# -# Linux InfraRed Controller -# -CONFIG_LIRC_SUPPORT=m -CONFIG_LIRC_MAX_DEV=2 -CONFIG_LIRC_BT829=m -CONFIG_LIRC_IT87=m -CONFIG_LIRC_ATIUSB=m -# CONFIG_LIRC_PARALLEL is not set -CONFIG_LIRC_SERIAL=m -# CONFIG_LIRC_HOMEBREW is not set -CONFIG_LIRC_PORT_SERIAL=0x3f8 -CONFIG_LIRC_IRQ_SERIAL=4 -CONFIG_LIRC_SIR=m -CONFIG_LIRC_PORT_SIR=0x3f8 -CONFIG_LIRC_IRQ_SIR=4 - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_ELEKTOR is not set -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PIIX4=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_I2C=m -CONFIG_SCx200_I2C_SCL=12 -CONFIG_SCx200_I2C_SDA=13 -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_VIA686A=m -# CONFIG_SENSORS_VT1211 is not set -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_PCF8574=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_PMS=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m - -# -# Radio Adapters -# -CONFIG_RADIO_CADET=m -CONFIG_RADIO_RTRACK=m -CONFIG_RADIO_RTRACK2=m -CONFIG_RADIO_AZTECH=m -CONFIG_RADIO_GEMTEK=m -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_RADIO_MIROPCM20=m -# CONFIG_RADIO_MIROPCM20_RDS is not set -CONFIG_RADIO_SF16FMI=m -CONFIG_RADIO_SF16FMR2=m -CONFIG_RADIO_TERRATEC=m -CONFIG_RADIO_TRUST=m -CONFIG_RADIO_TYPHOON=m -CONFIG_RADIO_TYPHOON_PROC_FS=y -CONFIG_RADIO_ZOLTRIX=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported Frontend Modules -# -CONFIG_DVB_TWINHAN_DST=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc" -CONFIG_DVB_ALPS_TDLB7=m -CONFIG_DVB_ALPS_TDMB7=m -CONFIG_DVB_ATMEL_AT76C651=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_GRUNDIG_29504_491=m -CONFIG_DVB_GRUNDIG_29504_401=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1820=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin" -CONFIG_DVB_NXT6000=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_SKYSTAR=m - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_PM2=m -CONFIG_FB_PM2_FIFO_DISCONNECT=y -CONFIG_FB_CYBER2000=m -CONFIG_FB_IMSTT=y -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_RIVA=m -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_XL_INIT=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_MEMORY=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_OPL4_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# ISA devices -# -CONFIG_SND_AD1816A=m -CONFIG_SND_AD1848=m -CONFIG_SND_CS4231=m -CONFIG_SND_CS4232=m -CONFIG_SND_CS4236=m -CONFIG_SND_ES968=m -CONFIG_SND_ES1688=m -CONFIG_SND_ES18XX=m -CONFIG_SND_GUSCLASSIC=m -CONFIG_SND_GUSEXTREME=m -CONFIG_SND_GUSMAX=m -CONFIG_SND_INTERWAVE=m -CONFIG_SND_INTERWAVE_STB=m -CONFIG_SND_OPTI92X_AD1848=m -CONFIG_SND_OPTI92X_CS4231=m -CONFIG_SND_OPTI93X=m -CONFIG_SND_SB8=m -CONFIG_SND_SB16=m -CONFIG_SND_SBAWE=m -CONFIG_SND_SB16_CSP=y -CONFIG_SND_WAVEFRONT=m -CONFIG_SND_ALS100=m -CONFIG_SND_AZT2320=m -CONFIG_SND_CMI8330=m -CONFIG_SND_DT019X=m -CONFIG_SND_OPL3SA2=m -CONFIG_SND_SGALAXY=m -CONFIG_SND_SSCAPE=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m -CONFIG_SND_HDA_INTEL=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_VXP440 is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_FMIO=0x388 -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_MPUIO=0x330 -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_CMPCI_CM8738=y -# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set -CONFIG_SOUND_CMPCI_SPDIFLOOP=y -CONFIG_SOUND_CMPCI_SPEAKERS=2 -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -# CONFIG_SOUND_AD1816 is not set -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_SGALAXY=m -CONFIG_SOUND_ADLIB=m -CONFIG_SOUND_ACI_MIXER=m -CONFIG_SOUND_CS4232=m -CONFIG_SOUND_SSCAPE=m -CONFIG_SOUND_GUS=m -# CONFIG_SOUND_GUS16 is not set -CONFIG_SOUND_GUSMAX=y -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_TRIX=m -CONFIG_SOUND_MSS=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -CONFIG_SOUND_MAD16=m -CONFIG_MAD16_OLDCARD=y -CONFIG_SOUND_PAS=m -CONFIG_SOUND_PSS=m -CONFIG_PSS_MIXER=y -# CONFIG_PSS_HAVE_BOOT is not set -CONFIG_SOUND_SB=m -# CONFIG_SOUND_AWE32_SYNTH is not set -CONFIG_SOUND_WAVEFRONT=m -CONFIG_SOUND_MAUI=m -CONFIG_SOUND_YM3812=m -CONFIG_SOUND_OPL3SA1=m -CONFIG_SOUND_OPL3SA2=m -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_AEDSP16=m -CONFIG_SC6600=y -CONFIG_SC6600_JOY=y -CONFIG_SC6600_CDROM=4 -CONFIG_SC6600_CDROMBASE=0x0 -# CONFIG_AEDSP16_MSS is not set -# CONFIG_AEDSP16_SBPRO is not set -CONFIG_AEDSP16_MPU401=y -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_KAHLUA=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -CONFIG_USB_AUDIO=m - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -# CONFIG_USB_SERIAL_WHITEHEAT is not set -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_TIGL=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_SPEEDTOUCH=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_UDAPL_HELPER=m -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_DMAPI=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_OCFS2_FS=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -# CONFIG_QNX4FS_RW is not set -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_CRASH_DUMP=m -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -CONFIG_EARLY_PRINTK=y -# CONFIG_KPROBES is not set -# CONFIG_DEBUGREG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_KDB is not set -# CONFIG_HOOK is not set - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -# CONFIG_SECURITY_SELINUX_MLS is not set -CONFIG_SECURITY_SUBDOMAIN=m - -# -# IBM Crypto Hardware support -# -CONFIG_IBM_CRYPTO=m -CONFIG_ICA_LEEDSLITE=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="bigsmp" -CONFIG_RELEASE="7.308" -CONFIG_X86_BIOS_REBOOT=y -CONFIG_PC=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64-smp.config deleted file mode 100644 index c205dc48e0..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64-smp.config +++ /dev/null @@ -1,2411 +0,0 @@ -# -# Automatically generated make config: don't edit -# - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_PAGG=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_RES_BLKIO=y -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CPUSETS=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_IOSCHED_PS=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_EFI=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_IA64_L1_CACHE_SHIFT=7 -# CONFIG_MCKINLEY_ASTEP_SPECIFIC is not set -CONFIG_NUMA=y -CONFIG_VIRTUAL_MEM_MAP=y -CONFIG_DISCONTIGMEM=y -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_IA64_SGI_SN_XPC=m -CONFIG_FORCE_MAX_ZONEORDER=18 -CONFIG_SMP=y -CONFIG_NR_CPUS=128 -CONFIG_SCHED_SMT=y -# CONFIG_PREEMPT is not set -CONFIG_HAVE_DEC_LOCK=y -CONFIG_IA32_SUPPORT=y -CONFIG_COMPAT=y -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y -CONFIG_EFI_VARS=y -CONFIG_IOPROC=y -CONFIG_PTRACK=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_ACPI=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_NUMA=y -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_INITRD=y - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_TCIC=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set -CONFIG_MTD_CONCAT=m - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -CONFIG_MTD_OBSOLETE_CHIPS=y -CONFIG_MTD_AMDSTD=m -CONFIG_MTD_SHARP=m -CONFIG_MTD_JEDEC=m - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BUSWIDTH=2 -CONFIG_MTD_PCI=m - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_CARMEL is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=128000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_IDEDISK_STROKE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -CONFIG_IDEDMA_ONLYDISK=y -CONFIG_BLK_DEV_ADMA=y -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=y -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_SC1200=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_NS87415=y -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=m -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_ADVANSYS=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=y -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PATA_PDC2027X=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -CONFIG_SCSI_DMX3191D=m -# CONFIG_SCSI_EATA is not set -CONFIG_SCSI_EATA_PIO=m -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_ISP=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -CONFIG_DECNET=m -CONFIG_DECNET_SIOCGIFCONF=y -# CONFIG_DECNET_ROUTER is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -# CONFIG_IP_NF_NAT_LOCAL is not set -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# DECnet: Netfilter Configuration -# -CONFIG_DECNET_NF_GRABULATOR=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=y -CONFIG_ATM_CLIP=y -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_ATM=y -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -# CONFIG_ARCNET_COM90xx is not set -CONFIG_ARCNET_COM90xxIO=m -# CONFIG_ARCNET_RIM_I is not set -# CONFIG_ARCNET_COM20020 is not set -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -# CONFIG_E100_NAPI is not set -# CONFIG_FEALNX is not set -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_8139_RXBUF_IDX=2 -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -# CONFIG_SIS190 is not set -CONFIG_SK98LIN=m -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BCM44=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -# CONFIG_2BUFF_MODE is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -# CONFIG_PRISM54 is not set -CONFIG_NET_WIRELESS=y - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Quadrics QsNet -# -CONFIG_QSNET=m -CONFIG_ELAN3=m -CONFIG_ELAN4=m -CONFIG_EP=m -CONFIG_EIP=m -CONFIG_RMS=m -CONFIG_JTAG=m -CONFIG_NET_FC=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -CONFIG_WAN=y -# CONFIG_DSCC4 is not set -CONFIG_LANMEDIA=m -CONFIG_SYNCLINK_SYNCPPP=m -CONFIG_HDLC=m -CONFIG_HDLC_RAW=y -CONFIG_HDLC_RAW_ETH=y -CONFIG_HDLC_CISCO=y -CONFIG_HDLC_FR=y -CONFIG_HDLC_PPP=y -CONFIG_HDLC_X25=y -CONFIG_PCI200SYN=m -CONFIG_WANXL=m -# CONFIG_WANXL_BUILD_FIRMWARE is not set -# CONFIG_PC300 is not set -CONFIG_FARSYNC=m -CONFIG_DLCI=m -CONFIG_DLCI_COUNT=24 -CONFIG_DLCI_MAX=8 -# CONFIG_WAN_ROUTER_DRIVERS is not set -CONFIG_LAPBETHER=m -CONFIG_X25_ASY=m - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -CONFIG_ATM_ZATM=m -# CONFIG_ATM_ZATM_DEBUG is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -CONFIG_ATM_IDT77252_RCV_ALL=y -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -CONFIG_ATM_FORE200E_PCA=y -CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y -CONFIG_ATM_FORE200E_TX_RETRY=16 -CONFIG_ATM_FORE200E_DEBUG=0 -CONFIG_ATM_FORE200E=m -CONFIG_ATM_HE=m -CONFIG_ATM_HE_USE_SUNI=y -CONFIG_XPNET=m - -# -# Amateur Radio support -# -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_BPQETHER=m -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_YAM=m - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -# CONFIG_VLSI_FIR is not set - -# -# Bluetooth support -# -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m - -# -# Bluetooth device drivers -# -# CONFIG_BT_HCIUSB is not set -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -# CONFIG_ISDN_DIVAS_MAINT is not set - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -CONFIG_GAMEPORT=m -CONFIG_SOUND_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -# CONFIG_GAMEPORT_EMU10K1 is not set -CONFIG_GAMEPORT_VORTEX=m -CONFIG_GAMEPORT_FM801=m -CONFIG_GAMEPORT_CS461x=m -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDDLER=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -# CONFIG_INPUT_JOYDUMP is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_ECC=m -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_ROCKETPORT=m -# CONFIG_SYNCLINK is not set -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -CONFIG_STALDRV=y -CONFIG_SGI_L1_SERIAL=y -CONFIG_SGI_L1_SERIAL_CONSOLE=y -CONFIG_FETCHOP=m -CONFIG_SGI_SNSC=y -CONFIG_SGI_TIOCX=y -CONFIG_SGI_MBCS=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_HCDP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_ACPI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_ICOM is not set -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m -# CONFIG_QIC02_TAPE is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -CONFIG_IPMI_PANIC_STRING=y -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_GEN_RTC is not set -CONFIG_EFI_RTC=y -# CONFIG_DTLK is not set -CONFIG_R3964=m -CONFIG_APPLICOM=m - -# -# Ftape, the floppy tape device driver -# - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_AGP=m -CONFIG_AGP_I460=m -CONFIG_AGP_HP_ZX1=m -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=m -CONFIG_VTUNE=m - -# -# Linux InfraRed Controller -# -CONFIG_LIRC_SUPPORT=m -CONFIG_LIRC_MAX_DEV=2 -CONFIG_LIRC_BT829=m -CONFIG_LIRC_IT87=m -CONFIG_LIRC_ATIUSB=m -CONFIG_LIRC_SERIAL=m -# CONFIG_LIRC_HOMEBREW is not set -CONFIG_LIRC_PORT_SERIAL=0x3f8 -CONFIG_LIRC_IRQ_SERIAL=4 -CONFIG_LIRC_SIR=m -CONFIG_LIRC_PORT_SIR=0x3f8 -CONFIG_LIRC_IRQ_SIR=4 - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -# CONFIG_SENSORS_ASB100 is not set -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -# CONFIG_SENSORS_LM90 is not set -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT1211=m -CONFIG_SENSORS_W83781D=m -# CONFIG_SENSORS_W83L785TS is not set -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_PCF8574=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported Frontend Modules -# -CONFIG_DVB_TWINHAN_DST=m -CONFIG_DVB_STV0299=m -# CONFIG_DVB_SP887X is not set -# CONFIG_DVB_ALPS_TDLB7 is not set -CONFIG_DVB_ALPS_TDMB7=m -CONFIG_DVB_ATMEL_AT76C651=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_GRUNDIG_29504_491=m -CONFIG_DVB_GRUNDIG_29504_401=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1820=m -CONFIG_DVB_VES1X93=m -# CONFIG_DVB_TDA1004X is not set -CONFIG_DVB_NXT6000=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_SKYSTAR=m - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_PM2=m -CONFIG_FB_PM2_FIFO_DISCONNECT=y -CONFIG_FB_CYBER2000=m -CONFIG_FB_IMSTT=y -CONFIG_FB_RIVA=m -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_XL_INIT=y -# CONFIG_FB_SIS is not set -CONFIG_FB_NEOMAGIC=m -# CONFIG_FB_KYRO is not set -CONFIG_FB_3DFX=m -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_MEMORY=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m -CONFIG_SND_HDA_INTEL=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_FMIO=0x388 -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_MPUIO=0x330 -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_CMPCI_CM8738=y -# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set -CONFIG_SOUND_CMPCI_SPDIFLOOP=y -CONFIG_SOUND_CMPCI_SPEAKERS=2 -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -# CONFIG_SOUND_OSS is not set -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -CONFIG_USB_AUDIO=m - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -CONFIG_USB_EMI26=m -CONFIG_USB_TIGL=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -# CONFIG_USB_LED is not set -CONFIG_USB_CYTHERM=m -CONFIG_USB_SPEEDTOUCH=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_UDAPL_HELPER=m -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_OCFS2_FS=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -# CONFIG_QNX4FS_RW is not set -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -CONFIG_CRASH_DUMP=m -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -# CONFIG_KDB is not set -# CONFIG_KPROBES is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_SYSVIPC_COMPAT=y - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -# CONFIG_SECURITY_SELINUX_MLS is not set -CONFIG_SECURITY_SUBDOMAIN=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="default" -CONFIG_RELEASE="0" diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64.config deleted file mode 100644 index c205dc48e0..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64.config +++ /dev/null @@ -1,2411 +0,0 @@ -# -# Automatically generated make config: don't edit -# - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_PAGG=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_RES_BLKIO=y -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CPUSETS=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_IOSCHED_PS=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_EFI=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_IA64_L1_CACHE_SHIFT=7 -# CONFIG_MCKINLEY_ASTEP_SPECIFIC is not set -CONFIG_NUMA=y -CONFIG_VIRTUAL_MEM_MAP=y -CONFIG_DISCONTIGMEM=y -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_IA64_SGI_SN_XPC=m -CONFIG_FORCE_MAX_ZONEORDER=18 -CONFIG_SMP=y -CONFIG_NR_CPUS=128 -CONFIG_SCHED_SMT=y -# CONFIG_PREEMPT is not set -CONFIG_HAVE_DEC_LOCK=y -CONFIG_IA32_SUPPORT=y -CONFIG_COMPAT=y -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y -CONFIG_EFI_VARS=y -CONFIG_IOPROC=y -CONFIG_PTRACK=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_ACPI=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_NUMA=y -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_INITRD=y - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_TCIC=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set -CONFIG_MTD_CONCAT=m - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -CONFIG_MTD_OBSOLETE_CHIPS=y -CONFIG_MTD_AMDSTD=m -CONFIG_MTD_SHARP=m -CONFIG_MTD_JEDEC=m - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BUSWIDTH=2 -CONFIG_MTD_PCI=m - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_CARMEL is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=128000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_IDEDISK_STROKE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -CONFIG_IDEDMA_ONLYDISK=y -CONFIG_BLK_DEV_ADMA=y -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=y -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_SC1200=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_NS87415=y -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=m -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_ADVANSYS=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=y -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PATA_PDC2027X=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -CONFIG_SCSI_DMX3191D=m -# CONFIG_SCSI_EATA is not set -CONFIG_SCSI_EATA_PIO=m -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_ISP=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -CONFIG_DECNET=m -CONFIG_DECNET_SIOCGIFCONF=y -# CONFIG_DECNET_ROUTER is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -# CONFIG_IP_NF_NAT_LOCAL is not set -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# DECnet: Netfilter Configuration -# -CONFIG_DECNET_NF_GRABULATOR=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=y -CONFIG_ATM_CLIP=y -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_ATM=y -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -# CONFIG_ARCNET_COM90xx is not set -CONFIG_ARCNET_COM90xxIO=m -# CONFIG_ARCNET_RIM_I is not set -# CONFIG_ARCNET_COM20020 is not set -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -# CONFIG_E100_NAPI is not set -# CONFIG_FEALNX is not set -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_8139_RXBUF_IDX=2 -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -# CONFIG_SIS190 is not set -CONFIG_SK98LIN=m -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BCM44=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -# CONFIG_2BUFF_MODE is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -# CONFIG_PRISM54 is not set -CONFIG_NET_WIRELESS=y - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Quadrics QsNet -# -CONFIG_QSNET=m -CONFIG_ELAN3=m -CONFIG_ELAN4=m -CONFIG_EP=m -CONFIG_EIP=m -CONFIG_RMS=m -CONFIG_JTAG=m -CONFIG_NET_FC=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -CONFIG_WAN=y -# CONFIG_DSCC4 is not set -CONFIG_LANMEDIA=m -CONFIG_SYNCLINK_SYNCPPP=m -CONFIG_HDLC=m -CONFIG_HDLC_RAW=y -CONFIG_HDLC_RAW_ETH=y -CONFIG_HDLC_CISCO=y -CONFIG_HDLC_FR=y -CONFIG_HDLC_PPP=y -CONFIG_HDLC_X25=y -CONFIG_PCI200SYN=m -CONFIG_WANXL=m -# CONFIG_WANXL_BUILD_FIRMWARE is not set -# CONFIG_PC300 is not set -CONFIG_FARSYNC=m -CONFIG_DLCI=m -CONFIG_DLCI_COUNT=24 -CONFIG_DLCI_MAX=8 -# CONFIG_WAN_ROUTER_DRIVERS is not set -CONFIG_LAPBETHER=m -CONFIG_X25_ASY=m - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -CONFIG_ATM_ZATM=m -# CONFIG_ATM_ZATM_DEBUG is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -CONFIG_ATM_IDT77252_RCV_ALL=y -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -CONFIG_ATM_FORE200E_PCA=y -CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y -CONFIG_ATM_FORE200E_TX_RETRY=16 -CONFIG_ATM_FORE200E_DEBUG=0 -CONFIG_ATM_FORE200E=m -CONFIG_ATM_HE=m -CONFIG_ATM_HE_USE_SUNI=y -CONFIG_XPNET=m - -# -# Amateur Radio support -# -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_BPQETHER=m -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_YAM=m - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -# CONFIG_VLSI_FIR is not set - -# -# Bluetooth support -# -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m - -# -# Bluetooth device drivers -# -# CONFIG_BT_HCIUSB is not set -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -# CONFIG_ISDN_DIVAS_MAINT is not set - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -CONFIG_GAMEPORT=m -CONFIG_SOUND_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -# CONFIG_GAMEPORT_EMU10K1 is not set -CONFIG_GAMEPORT_VORTEX=m -CONFIG_GAMEPORT_FM801=m -CONFIG_GAMEPORT_CS461x=m -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDDLER=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -# CONFIG_INPUT_JOYDUMP is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_ECC=m -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_ROCKETPORT=m -# CONFIG_SYNCLINK is not set -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -CONFIG_STALDRV=y -CONFIG_SGI_L1_SERIAL=y -CONFIG_SGI_L1_SERIAL_CONSOLE=y -CONFIG_FETCHOP=m -CONFIG_SGI_SNSC=y -CONFIG_SGI_TIOCX=y -CONFIG_SGI_MBCS=m - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_HCDP=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_ACPI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_ICOM is not set -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m -# CONFIG_QIC02_TAPE is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -CONFIG_IPMI_PANIC_STRING=y -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -# CONFIG_GEN_RTC is not set -CONFIG_EFI_RTC=y -# CONFIG_DTLK is not set -CONFIG_R3964=m -CONFIG_APPLICOM=m - -# -# Ftape, the floppy tape device driver -# - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_AGP=m -CONFIG_AGP_I460=m -CONFIG_AGP_HP_ZX1=m -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=m -CONFIG_VTUNE=m - -# -# Linux InfraRed Controller -# -CONFIG_LIRC_SUPPORT=m -CONFIG_LIRC_MAX_DEV=2 -CONFIG_LIRC_BT829=m -CONFIG_LIRC_IT87=m -CONFIG_LIRC_ATIUSB=m -CONFIG_LIRC_SERIAL=m -# CONFIG_LIRC_HOMEBREW is not set -CONFIG_LIRC_PORT_SERIAL=0x3f8 -CONFIG_LIRC_IRQ_SERIAL=4 -CONFIG_LIRC_SIR=m -CONFIG_LIRC_PORT_SIR=0x3f8 -CONFIG_LIRC_IRQ_SIR=4 - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -# CONFIG_SENSORS_ASB100 is not set -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -# CONFIG_SENSORS_LM90 is not set -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT1211=m -CONFIG_SENSORS_W83781D=m -# CONFIG_SENSORS_W83L785TS is not set -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_PCF8574=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -# CONFIG_VIDEO_CPIA is not set -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported Frontend Modules -# -CONFIG_DVB_TWINHAN_DST=m -CONFIG_DVB_STV0299=m -# CONFIG_DVB_SP887X is not set -# CONFIG_DVB_ALPS_TDLB7 is not set -CONFIG_DVB_ALPS_TDMB7=m -CONFIG_DVB_ATMEL_AT76C651=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_GRUNDIG_29504_491=m -CONFIG_DVB_GRUNDIG_29504_401=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1820=m -CONFIG_DVB_VES1X93=m -# CONFIG_DVB_TDA1004X is not set -CONFIG_DVB_NXT6000=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_SKYSTAR=m - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_PM2=m -CONFIG_FB_PM2_FIFO_DISCONNECT=y -CONFIG_FB_CYBER2000=m -CONFIG_FB_IMSTT=y -CONFIG_FB_RIVA=m -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_XL_INIT=y -# CONFIG_FB_SIS is not set -CONFIG_FB_NEOMAGIC=m -# CONFIG_FB_KYRO is not set -CONFIG_FB_3DFX=m -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_MEMORY=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m -CONFIG_SND_HDA_INTEL=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_FMIO=0x388 -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_MPUIO=0x330 -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_CMPCI_CM8738=y -# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set -CONFIG_SOUND_CMPCI_SPDIFLOOP=y -CONFIG_SOUND_CMPCI_SPEAKERS=2 -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -# CONFIG_SOUND_OSS is not set -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -CONFIG_USB_AUDIO=m - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -CONFIG_USB_EMI26=m -CONFIG_USB_TIGL=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -# CONFIG_USB_LED is not set -CONFIG_USB_CYTHERM=m -CONFIG_USB_SPEEDTOUCH=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_UDAPL_HELPER=m -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_OCFS2_FS=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -# CONFIG_QNX4FS_RW is not set -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -CONFIG_CRASH_DUMP=m -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -# CONFIG_KDB is not set -# CONFIG_KPROBES is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_SYSVIPC_COMPAT=y - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -# CONFIG_SECURITY_SELINUX_MLS is not set -CONFIG_SECURITY_SUBDOMAIN=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="default" -CONFIG_RELEASE="0" diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc-pseries64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc-pseries64.config deleted file mode 100644 index 76b4290fae..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc-pseries64.config +++ /dev/null @@ -1,1454 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_HAVE_DEC_LOCK=y -CONFIG_EARLY_PRINTK=y -CONFIG_COMPAT=y -CONFIG_FRAME_POINTER=y -CONFIG_FORCE_MAX_ZONEORDER=13 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=19 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Platform support -# -# CONFIG_PPC_ISERIES is not set -CONFIG_PPC_PSERIES=y -CONFIG_PPC=y -CONFIG_PPC64=y -CONFIG_PPC_OF=y -CONFIG_ALTIVEC=y -# CONFIG_PPC_PMAC is not set -CONFIG_PPC_SPLPAR=y -# CONFIG_BOOTX_TEXT is not set -# CONFIG_POWER4_ONLY is not set -# CONFIG_IOMMU_VMERGE is not set -CONFIG_SMP=y -CONFIG_IRQ_ALL_CPUS=y -CONFIG_NR_CPUS=128 -# CONFIG_HMT is not set -CONFIG_DISCONTIGMEM=y -CONFIG_NUMA=y -CONFIG_SCHED_SMT=y -CONFIG_PPC_RTAS=y -CONFIG_RTAS_FLASH=m -CONFIG_SCANLOG=m -CONFIG_LPARCFG=y -CONFIG_PPC_VPURR=y - -# -# General setup -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set -CONFIG_HOTPLUG_CPU=y - -# -# PCMCIA/CardBus support -# -# CONFIG_PCMCIA is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_PCIE is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set -CONFIG_HOTPLUG_PCI_RPA=y -CONFIG_HOTPLUG_PCI_RPA_DLPAR=y -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Bluesmoke - error detection and reporting (RAS) -# -# CONFIG_BLUESMOKE is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_CARMEL is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=123456 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -CONFIG_IDE_TASK_IOCTL=y -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_SL82C105=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -CONFIG_BLK_DEV_IDEDMA_FORCED=y -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_BLK_DEV_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -# CONFIG_BLK_DEV_CMD64X is not set -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -# CONFIG_BLK_DEV_HPT34X is not set -# CONFIG_BLK_DEV_HPT366 is not set -# CONFIG_BLK_DEV_SC1200 is not set -# CONFIG_BLK_DEV_PIIX is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -# CONFIG_PDC202XX_FORCE is not set -# CONFIG_BLK_DEV_SVWKS is not set -CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_AIC79XX_NEW is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -CONFIG_SCSI_IBMVSCSI=m -CONFIG_SCSI_IBMVSCSIS=m -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_PPA is not set -# CONFIG_SCSI_IMM is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=m -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -CONFIG_SCSI_QLA2300=m -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -CONFIG_SCSI_DEBUG=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# - -# -# Texas Instruments PCILynx requires I2C -# -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_FWMARK is not set -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -# CONFIG_IP_ROUTE_VERBOSE is not set -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -# CONFIG_DECNET is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -# CONFIG_BRIDGE_EBT_SNAT is not set -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -CONFIG_SCTP_HMAC_NONE=y -# CONFIG_SCTP_HMAC_SHA1 is not set -# CONFIG_SCTP_HMAC_MD5 is not set -# CONFIG_ATM is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -CONFIG_IPX_INTERN=y -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -# CONFIG_ETHERTAP is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_OAKNET is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -CONFIG_ACENIC_OMIT_TIGON_I=y -# CONFIG_DL2K is not set -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_E1000_NEW=m -CONFIG_E1000_NEW_NAPI=y -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SK98LIN is not set -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BROADCOM_NEW=m -# CONFIG_NET_BCM44 is not set -CONFIG_TIGON3_NEW=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_IBMVETH=m -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -# CONFIG_IBMLS is not set -# CONFIG_3C359 is not set -# CONFIG_TMS380TR is not set -CONFIG_NET_FC=y -CONFIG_NET_LPFC=m -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_ECC=m -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_PMACZILOG is not set -CONFIG_SERIAL_ICOM=m -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_PRINTER is not set -# CONFIG_PPDEV is not set -# CONFIG_TIPAR is not set -CONFIG_HVC_CONSOLE=y -CONFIG_HVCS=m -# CONFIG_QIC02_TAPE is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_AGP is not set -# CONFIG_DRM is not set -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 - -# -# Linux InfraRed Controller -# -# CONFIG_LIRC_SUPPORT is not set -# CONFIG_LIRC_HOMEBREW is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -CONFIG_FB_OF=y -# CONFIG_FB_CT65550 is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_S3TRIO is not set -# CONFIG_FB_VGA16 is not set -# CONFIG_FB_RIVA is not set -CONFIG_FB_MATROX=y -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_UHCI_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_BLUETOOTH_TTY is not set -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_HID_FF is not set -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -# CONFIG_USB_TIGL is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -CONFIG_USB_LEGOTOWER=m -# CONFIG_USB_LCD is not set -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -# CONFIG_INFINIBAND_SRP is not set -# CONFIG_INFINIBAND_UDAPL_HELPER is not set -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=y -# CONFIG_REISERFS_CHECK is not set -CONFIG_REISERFS_PROC_INFO=y -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_DMAPI=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_MINIX_FS=m -# CONFIG_ROMFS_FS is not set -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=y -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=y -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=y - -# -# Kernel hacking -# -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP=m -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -# CONFIG_CRASH_DUMP_SOFTBOOT is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUGGER=y -CONFIG_XMON=y -# CONFIG_XMON_DEFAULT is not set -CONFIG_KDB=y -CONFIG_KDB_MODULES=y -CONFIG_KDB_OFF=y -# CONFIG_PPCDBG is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_IRQSTACKS=y - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_MLS=y - -# -# IBM Crypto Hardware support -# -CONFIG_IBM_CRYPTO=m -CONFIG_ICA_LEEDSLITE=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="pseries64" -CONFIG_RELEASE="7.141" -CONFIG_IEEE1394=m -CONFIG_IEEE1394_PCILYNX=m diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc.config deleted file mode 100644 index b5e692be4e..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc.config +++ /dev/null @@ -1,1453 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_HAVE_DEC_LOCK=y -CONFIG_EARLY_PRINTK=y -CONFIG_COMPAT=y -CONFIG_FRAME_POINTER=y -CONFIG_FORCE_MAX_ZONEORDER=13 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=19 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Platform support -# -# CONFIG_PPC_ISERIES is not set -CONFIG_PPC_PSERIES=y -CONFIG_PPC=y -CONFIG_PPC64=y -CONFIG_PPC_OF=y -CONFIG_ALTIVEC=y -# CONFIG_PPC_PMAC is not set -CONFIG_PPC_SPLPAR=y -# CONFIG_BOOTX_TEXT is not set -# CONFIG_POWER4_ONLY is not set -# CONFIG_IOMMU_VMERGE is not set -CONFIG_SMP=y -CONFIG_IRQ_ALL_CPUS=y -CONFIG_NR_CPUS=128 -# CONFIG_HMT is not set -CONFIG_DISCONTIGMEM=y -CONFIG_NUMA=y -CONFIG_SCHED_SMT=y -CONFIG_PPC_RTAS=y -CONFIG_RTAS_FLASH=m -CONFIG_SCANLOG=m -CONFIG_LPARCFG=y -CONFIG_PPC_VPURR=y - -# -# General setup -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set -CONFIG_HOTPLUG_CPU=y - -# -# PCMCIA/CardBus support -# -# CONFIG_PCMCIA is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_PCIE is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set -CONFIG_HOTPLUG_PCI_RPA=y -CONFIG_HOTPLUG_PCI_RPA_DLPAR=y -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Bluesmoke - error detection and reporting (RAS) -# -# CONFIG_BLUESMOKE is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_CARMEL is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=123456 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -CONFIG_IDE_TASK_IOCTL=y -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_SL82C105=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -CONFIG_BLK_DEV_IDEDMA_FORCED=y -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_BLK_DEV_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -# CONFIG_BLK_DEV_CMD64X is not set -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -# CONFIG_BLK_DEV_HPT34X is not set -# CONFIG_BLK_DEV_HPT366 is not set -# CONFIG_BLK_DEV_SC1200 is not set -# CONFIG_BLK_DEV_PIIX is not set -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -# CONFIG_PDC202XX_FORCE is not set -# CONFIG_BLK_DEV_SVWKS is not set -CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_AIC79XX_NEW is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -CONFIG_SCSI_IBMVSCSI=m -CONFIG_SCSI_IBMVSCSIS=m -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_PPA is not set -# CONFIG_SCSI_IMM is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=m -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -CONFIG_SCSI_QLA2300=m -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -CONFIG_SCSI_DEBUG=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# - -# -# Texas Instruments PCILynx requires I2C -# -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_FWMARK is not set -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -# CONFIG_IP_ROUTE_VERBOSE is not set -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -# CONFIG_DECNET is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -# CONFIG_BRIDGE_EBT_SNAT is not set -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -CONFIG_SCTP_HMAC_NONE=y -# CONFIG_SCTP_HMAC_SHA1 is not set -# CONFIG_SCTP_HMAC_MD5 is not set -# CONFIG_ATM is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -CONFIG_IPX_INTERN=y -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -# CONFIG_ETHERTAP is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_OAKNET is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -CONFIG_ACENIC_OMIT_TIGON_I=y -# CONFIG_DL2K is not set -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_E1000_NEW=m -CONFIG_E1000_NEW_NAPI=y -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SK98LIN is not set -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BROADCOM_NEW=m -# CONFIG_NET_BCM44 is not set -CONFIG_TIGON3_NEW=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_IBMVETH=m -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -# CONFIG_IBMLS is not set -# CONFIG_3C359 is not set -# CONFIG_TMS380TR is not set -CONFIG_NET_FC=y -CONFIG_NET_LPFC=m -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_ECC=m -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_PMACZILOG is not set -CONFIG_SERIAL_ICOM=m -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_PRINTER is not set -# CONFIG_PPDEV is not set -# CONFIG_TIPAR is not set -CONFIG_HVC_CONSOLE=y -CONFIG_HVCS=m -# CONFIG_QIC02_TAPE is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_AGP is not set -# CONFIG_DRM is not set -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 - -# -# Linux InfraRed Controller -# -# CONFIG_LIRC_SUPPORT is not set -# CONFIG_LIRC_HOMEBREW is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -CONFIG_FB_OF=y -# CONFIG_FB_CT65550 is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_S3TRIO is not set -# CONFIG_FB_VGA16 is not set -# CONFIG_FB_RIVA is not set -CONFIG_FB_MATROX=y -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_UHCI_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_BLUETOOTH_TTY is not set -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_HID_FF is not set -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -# CONFIG_USB_TIGL is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -CONFIG_USB_LEGOTOWER=m -# CONFIG_USB_LCD is not set -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -# CONFIG_INFINIBAND_SRP is not set -# CONFIG_INFINIBAND_UDAPL_HELPER is not set -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=y -# CONFIG_REISERFS_CHECK is not set -CONFIG_REISERFS_PROC_INFO=y -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_DMAPI=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_MINIX_FS=m -# CONFIG_ROMFS_FS is not set -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=y -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=y -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=y - -# -# Kernel hacking -# -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP=m -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -# CONFIG_CRASH_DUMP_SOFTBOOT is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUGGER=y -CONFIG_XMON=y -# CONFIG_XMON_DEFAULT is not set -CONFIG_KDB=y -CONFIG_KDB_MODULES=y -CONFIG_KDB_OFF=y -# CONFIG_PPCDBG is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_IRQSTACKS=y - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_MLS=y - -# -# IBM Crypto Hardware support -# -CONFIG_IBM_CRYPTO=m -CONFIG_ICA_LEEDSLITE=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="pseries64" -CONFIG_RELEASE="SLES9_SP1_BRANCH_91" -CONFIG_IEEE1394=m -CONFIG_IEEE1394_PCILYNX=m diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64-smp.config deleted file mode 100644 index fed9063d5e..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64-smp.config +++ /dev/null @@ -1,2551 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_HPET_TIMER=y -CONFIG_X86_PM_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -# CONFIG_STANDALONE is not set - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_RES_BLKIO=y -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_IOSCHED_PS=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -CONFIG_X86_HT=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -# CONFIG_PREEMPT is not set -CONFIG_SCHED_SMT=y -CONFIG_K8_NUMA=y -CONFIG_DISCONTIGMEM=y -CONFIG_NUMA=y -CONFIG_HAVE_DEC_LOCK=y -CONFIG_NR_CPUS=128 -CONFIG_GART_IOMMU=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y - -# -# Power management options -# -CONFIG_PM=y -# CONFIG_SOFTWARE_SUSPEND is not set -# CONFIG_PM_DISK is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -# CONFIG_ACPI_ASUS is not set -# CONFIG_ACPI_TOSHIBA is not set -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_INITRD=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_PROC_INTF=m -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_TCIC=m - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_AMD=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m -CONFIG_IA32_EMULATION=y -CONFIG_IA32_AOUT=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y -CONFIG_UID16=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=m -CONFIG_MTD_CONCAT=m -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_CMDLINE_PARTS=m - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -CONFIG_MTD_OBSOLETE_CHIPS=y -CONFIG_MTD_AMDSTD=m -CONFIG_MTD_SHARP=m -CONFIG_MTD_JEDEC=m - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BUSWIDTH=2 -# CONFIG_MTD_PNC2000 is not set -# CONFIG_MTD_SC520CDP is not set -# CONFIG_MTD_NETSC520 is not set -# CONFIG_MTD_SBC_GXX is not set -# CONFIG_MTD_ELAN_104NC is not set -# CONFIG_MTD_OCTAGON is not set -# CONFIG_MTD_VMAX is not set -CONFIG_MTD_SCx200_DOCFLASH=m -CONFIG_MTD_AMD76XROM=m -# CONFIG_MTD_ICH2ROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -CONFIG_MTD_PCI=m - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_CARMEL=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=128000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_IDEDISK_STROKE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -CONFIG_IDEDMA_ONLYDISK=y -CONFIG_BLK_DEV_ADMA=y -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=y -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_SC1200=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_NS87415=y -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_ADVANSYS=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_CPQFCTS is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_EATA_PIO=m -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_ISP=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_QLOGIC=m -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -# CONFIG_SATA_INIC162X is not set -CONFIG_PATA_ALI=m -CONFIG_PATA_AMD=m -# CONFIG_PATA_ARTOP is not set -CONFIG_PATA_ATIIXP=m -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -CONFIG_PATA_HPT3X2N=m -# CONFIG_PATA_HPT3X3 is not set -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -CONFIG_PATA_RADISYS=m -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -CONFIG_PATA_SERVERWORKS=m -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -CONFIG_PATA_VIA=m -CONFIG_PATA_WINBOND=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -CONFIG_DECNET=m -CONFIG_DECNET_SIOCGIFCONF=y -# CONFIG_DECNET_ROUTER is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -# CONFIG_IP_NF_NAT_LOCAL is not set -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# DECnet: Netfilter Configuration -# -# CONFIG_DECNET_NF_GRABULATOR is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -# CONFIG_ATM is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -CONFIG_IPX_INTERN=y -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -# CONFIG_ARCNET_COM20020 is not set -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_8139_RXBUF_IDX=2 -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_IGB=m -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_SIS190=m -CONFIG_SK98LIN=m -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BCM44=m -CONFIG_BNX2=m -# CONFIG_2BUFF_MODE is not set - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_QLA3XXX=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -# CONFIG_IBMLS is not set -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_ABYSS=m -CONFIG_NET_FC=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Amateur Radio support -# -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -CONFIG_BPQETHER=m -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_YAM=m - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_VLSI_FIR=m - -# -# Bluetooth support -# -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -CONFIG_GAMEPORT=m -CONFIG_SOUND_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_VORTEX=m -CONFIG_GAMEPORT_FM801=m -CONFIG_GAMEPORT_CS461x=m -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDDLER=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -# CONFIG_INPUT_JOYDUMP is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_ECC is not set -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_ROCKETPORT=m -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_ICOM is not set -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m -CONFIG_QIC02_TAPE=m -CONFIG_QIC02_DYNCONF=y - -# -# Setting runtime QIC-02 configuration is done with qic02conf -# - -# -# from the tpqic02-support package. It is available at -# - -# -# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/ -# - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -# CONFIG_IPMI_PANIC_STRING is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_AMD7XX_TCO=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_SCx200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m - -# -# Ftape, the floppy tape device driver -# - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=m -CONFIG_AGP_INTEL_MCH=m -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -# CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HANGCHECK_TIMER=m -# CONFIG_VTUNE is not set - -# -# Linux InfraRed Controller -# -CONFIG_LIRC_SUPPORT=m -CONFIG_LIRC_MAX_DEV=2 -CONFIG_LIRC_BT829=m -CONFIG_LIRC_IT87=m -CONFIG_LIRC_ATIUSB=m -CONFIG_LIRC_SERIAL=m -# CONFIG_LIRC_HOMEBREW is not set -CONFIG_LIRC_PORT_SERIAL=0x3f8 -CONFIG_LIRC_IRQ_SERIAL=4 -CONFIG_LIRC_SIR=m -CONFIG_LIRC_PORT_SIR=0x3f8 -CONFIG_LIRC_IRQ_SIR=4 - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_VIA686A=m -# CONFIG_SENSORS_VT1211 is not set -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_PCF8574=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported Frontend Modules -# -CONFIG_DVB_TWINHAN_DST=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc" -CONFIG_DVB_ALPS_TDLB7=m -CONFIG_DVB_ALPS_TDMB7=m -CONFIG_DVB_ATMEL_AT76C651=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_GRUNDIG_29504_491=m -CONFIG_DVB_GRUNDIG_29504_401=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1820=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin" -CONFIG_DVB_NXT6000=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -# CONFIG_DVB_AV7110_OSD is not set -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_SKYSTAR=m - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_PM2 is not set -CONFIG_FB_CYBER2000=m -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_RIVA=m -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_XL_INIT=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_VIRTUAL=m - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_BIT32_EMUL=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_MEMORY=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m -CONFIG_SND_HDA_INTEL=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_FMIO=0x388 -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_MPUIO=0x330 -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_CMPCI_CM8738=y -# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set -CONFIG_SOUND_CMPCI_SPDIFLOOP=y -CONFIG_SOUND_CMPCI_SPEAKERS=2 -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -CONFIG_SOUND_AD1816=m -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_SGALAXY=m -CONFIG_SOUND_ADLIB=m -CONFIG_SOUND_ACI_MIXER=m -CONFIG_SOUND_CS4232=m -CONFIG_SOUND_SSCAPE=m -CONFIG_SOUND_GUS=m -# CONFIG_SOUND_GUS16 is not set -CONFIG_SOUND_GUSMAX=y -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_TRIX=m -CONFIG_SOUND_MSS=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -CONFIG_SOUND_MAD16=m -CONFIG_MAD16_OLDCARD=y -CONFIG_SOUND_PAS=m -CONFIG_SOUND_PSS=m -CONFIG_PSS_MIXER=y -# CONFIG_PSS_HAVE_BOOT is not set -CONFIG_SOUND_SB=m -CONFIG_SOUND_AWE32_SYNTH=m -CONFIG_SOUND_WAVEFRONT=m -CONFIG_SOUND_MAUI=m -CONFIG_SOUND_YM3812=m -CONFIG_SOUND_OPL3SA1=m -CONFIG_SOUND_OPL3SA2=m -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_AEDSP16=m -CONFIG_SC6600=y -CONFIG_SC6600_JOY=y -CONFIG_SC6600_CDROM=4 -CONFIG_SC6600_CDROMBASE=0x0 -# CONFIG_AEDSP16_MSS is not set -# CONFIG_AEDSP16_SBPRO is not set -CONFIG_AEDSP16_MPU401=y -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_KAHLUA=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -CONFIG_USB_AUDIO=m - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_TIGL=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_UDAPL_HELPER=m -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_DMAPI=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_OCFS2_FS=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -# CONFIG_QNX4FS_RW is not set -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_CRASH_DUMP=m -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -CONFIG_INIT_DEBUG=y -CONFIG_DEBUG_INFO=y -# CONFIG_FRAME_POINTER is not set -CONFIG_KDB=m -CONFIG_KDB_MODULES=m -# CONFIG_KDB_OFF is not set -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_IOMMU_DEBUG is not set - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -# CONFIG_SECURITY_SELINUX_MLS is not set -CONFIG_SECURITY_SUBDOMAIN=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="smp" -CONFIG_RELEASE="7.308" diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64.config deleted file mode 100644 index fb92fe63b6..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64.config +++ /dev/null @@ -1,2566 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -# CONFIG_STANDALONE is not set -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_HOTPLUG=y -CONFIG_EVLOG=y -# CONFIG_EVLOG_FWPRINTK is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set - -# -# Class Based Kernel Resource Management -# -CONFIG_CKRM=y -CONFIG_RCFS_FS=m -CONFIG_CKRM_TYPE_TASKCLASS=y -CONFIG_CKRM_RES_NUMTASKS=m -CONFIG_CKRM_CPU_SCHEDULE=y -# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set -CONFIG_CKRM_RES_BLKIO=y -CONFIG_CKRM_TYPE_SOCKETCLASS=y -CONFIG_CKRM_RBCE=m -CONFIG_CKRM_CRBCE=m -CONFIG_DELAY_ACCT=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_IOSCHED_PS=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y - -# -# Processor type and features -# -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -# CONFIG_SMP is not set -# CONFIG_PREEMPT is not set -CONFIG_GART_IOMMU=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y - -# -# Power management options -# -CONFIG_PM=y -# CONFIG_SOFTWARE_SUSPEND is not set -# CONFIG_PM_DISK is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -# CONFIG_ACPI_ASUS is not set -# CONFIG_ACPI_TOSHIBA is not set -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_INITRD=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_PROC_INTF=m -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=m -CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_TCIC=m - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_AMD=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m -CONFIG_IA32_EMULATION=y -CONFIG_IA32_AOUT=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y -CONFIG_UID16=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=m -CONFIG_MTD_CONCAT=m -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_CMDLINE_PARTS=m - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -CONFIG_MTD_ABSENT=m -CONFIG_MTD_OBSOLETE_CHIPS=y -CONFIG_MTD_AMDSTD=m -CONFIG_MTD_SHARP=m -CONFIG_MTD_JEDEC=m - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_PHYSMAP_START=0x8000000 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BUSWIDTH=2 -# CONFIG_MTD_PNC2000 is not set -# CONFIG_MTD_SC520CDP is not set -# CONFIG_MTD_NETSC520 is not set -# CONFIG_MTD_SBC_GXX is not set -# CONFIG_MTD_ELAN_104NC is not set -# CONFIG_MTD_OCTAGON is not set -# CONFIG_MTD_VMAX is not set -CONFIG_MTD_SCx200_DOCFLASH=m -CONFIG_MTD_AMD76XROM=m -# CONFIG_MTD_ICH2ROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -CONFIG_MTD_PCI=m - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -CONFIG_MTD_PMC551_BUGFIX=y -# CONFIG_MTD_PMC551_DEBUG is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLKMTD=m - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_DOCPROBE_55AA=y - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_CARMEL=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=128000 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CIPHER_TWOFISH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_IDEDISK_STROKE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -CONFIG_BLK_DEV_CMD640_ENHANCED=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -CONFIG_IDEDMA_ONLYDISK=y -CONFIG_BLK_DEV_ADMA=y -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=m -CONFIG_BLK_DEV_CS5530=m -CONFIG_BLK_DEV_HPT34X=y -CONFIG_HPT34X_AUTODMA=y -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_SC1200=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_NS87415=y -CONFIG_BLK_DEV_PDC202XX_OLD=y -CONFIG_PDC202XX_BURST=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 -CONFIG_AIC7XXX_RESET_DELAY_MS=5000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y -CONFIG_SCSI_ADVANSYS=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_CPQFCTS is not set -CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_EATA=m -CONFIG_SCSI_EATA_TAGGED_QUEUE=y -CONFIG_SCSI_EATA_LINKED_COMMANDS=y -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_EATA_PIO=m -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_LPFC=m -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_ISP=m -CONFIG_SCSI_QLOGIC_FC=m -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA2XXX_FAILOVER=y -CONFIG_SCSI_QLA4XXX=m -CONFIG_SCSI_QLA4XXX_FAILOVER=y -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -CONFIG_SCSI_DEBUG=m - -# -# PCMCIA SCSI adapter support -# -CONFIG_PCMCIA_FDOMAIN=m -CONFIG_PCMCIA_QLOGIC=m -CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_ACPI=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -# CONFIG_SATA_INIC162X is not set -CONFIG_PATA_ALI=m -CONFIG_PATA_AMD=m -# CONFIG_PATA_ARTOP is not set -CONFIG_PATA_ATIIXP=m -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CS5520 is not set -# CONFIG_PATA_CS5530 is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -CONFIG_PATA_HPT3X2N=m -# CONFIG_PATA_HPT3X3 is not set -CONFIG_PATA_IT821X=m -CONFIG_PATA_IT8213=m -CONFIG_PATA_JMICRON=m -# CONFIG_PATA_TRIFLEX is not set -CONFIG_PATA_MARVELL=m -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PCMCIA is not set -# CONFIG_PATA_PDC_OLD is not set -CONFIG_PATA_RADISYS=m -# CONFIG_PATA_RZ1000 is not set -# CONFIG_PATA_SC1200 is not set -CONFIG_PATA_SERVERWORKS=m -CONFIG_PATA_PDC2027X=m -# CONFIG_PATA_SIL680 is not set -CONFIG_PATA_SIS=m -CONFIG_PATA_VIA=m -CONFIG_PATA_WINBOND=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -CONFIG_DM_FLAKEY=m -CONFIG_BLK_DEV_DM_BBR=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=128 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_ACCEPT_QUEUES is not set - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_NDISC_NEW=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m - -# -# MOBILE IPv6 (EXPERIMENTAL) -# -CONFIG_IPV6_MOBILITY=m -CONFIG_IPV6_MOBILITY_MN=m -CONFIG_IPV6_MOBILITY_HA=m -# CONFIG_IPV6_MOBILITY_DEBUG is not set -CONFIG_DECNET=m -CONFIG_DECNET_SIOCGIFCONF=y -# CONFIG_DECNET_ROUTER is not set -CONFIG_BRIDGE=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -# CONFIG_IP_NF_NAT_LOCAL is not set -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_TARGET_CONNMARK=m -CONFIG_IP_NF_MATCH_CONNMARK=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_FTP=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_CONNTRACK=m -CONFIG_IP6_NF_MATCH_STATE=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m - -# -# DECnet: Netfilter Configuration -# -# CONFIG_DECNET_NF_GRABULATOR is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -# CONFIG_ATM is not set -CONFIG_VLAN_8021Q=m -CONFIG_LLC=y -CONFIG_LLC2=m -CONFIG_IPX=m -CONFIG_IPX_INTERN=y -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set -CONFIG_WAN_ROUTER=m -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_DELAY=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -CONFIG_ARCNET=m -CONFIG_ARCNET_1201=m -CONFIG_ARCNET_1051=m -CONFIG_ARCNET_RAW=m -CONFIG_ARCNET_COM90xx=m -CONFIG_ARCNET_COM90xxIO=m -CONFIG_ARCNET_RIM_I=m -# CONFIG_ARCNET_COM20020 is not set -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -CONFIG_TULIP_NAPI=y -CONFIG_TULIP_NAPI_HW_MITIGATION=y -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -CONFIG_DGRS=m -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_8139_RXBUF_IDX=2 -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_IGB=m -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_SIS190=m -CONFIG_SK98LIN=m -CONFIG_TIGON3=m -CONFIG_NET_BROADCOM=m -CONFIG_NET_BCM44=m -CONFIG_BNX2=m -# CONFIG_2BUFF_MODE is not set - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_QLA3XXX=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m -CONFIG_NETXEN_NIC=m -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -CONFIG_HIPPI=y -CONFIG_ROADRUNNER=m -CONFIG_ROADRUNNER_LARGE_RINGS=y -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -CONFIG_PCMCIA_RAYCS=m - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -# CONFIG_IBMLS is not set -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_ABYSS=m -CONFIG_NET_FC=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Amateur Radio support -# -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -CONFIG_AX25_DAMA_SLAVE=y -CONFIG_NETROM=m -CONFIG_ROSE=m - -# -# AX.25 network device drivers -# -# CONFIG_MKISS is not set -# CONFIG_6PACK is not set -CONFIG_BPQETHER=m -CONFIG_BAYCOM_SER_FDX=m -CONFIG_BAYCOM_SER_HDX=m -CONFIG_BAYCOM_PAR=m -CONFIG_YAM=m - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# -# CONFIG_IRPORT_SIR is not set - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_VLSI_FIR=m - -# -# Bluetooth support -# -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -CONFIG_ISDN_PPP_BSDCOMP=m -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y -CONFIG_ISDN_X25=y - -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -# CONFIG_HISAX_NO_SENDCOMPLETE is not set -# CONFIG_HISAX_NO_LLC is not set -# CONFIG_HISAX_NO_KEYPAD is not set -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -CONFIG_HISAX_DEBUG=y - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_TPAM=m -# CONFIG_HYSDN is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -CONFIG_PHONE=m -CONFIG_PHONE_IXJ=m -CONFIG_PHONE_IXJ_PCMCIA=m - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -CONFIG_GAMEPORT=m -CONFIG_SOUND_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_VORTEX=m -CONFIG_GAMEPORT_FM801=m -CONFIG_GAMEPORT_CS461x=m -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m -CONFIG_SERIO_PARKBD=m -CONFIG_SERIO_PCIPS2=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -# CONFIG_KEYBOARD_POSFILTER is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -# CONFIG_MOUSE_VSXXXAA is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDDLER=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -# CONFIG_INPUT_JOYDUMP is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_ECC is not set -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -CONFIG_ROCKETPORT=m -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_DIGI is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -CONFIG_STALDRV=y -# CONFIG_STALLION is not set -# CONFIG_ISTALLION is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_ICOM is not set -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -CONFIG_PPDEV=m -CONFIG_TIPAR=m -CONFIG_QIC02_TAPE=m -CONFIG_QIC02_DYNCONF=y - -# -# Setting runtime QIC-02 configuration is done with qic02conf -# - -# -# from the tpqic02-support package. It is available at -# - -# -# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/ -# - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -# CONFIG_IPMI_PANIC_STRING is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_AMD7XX_TCO=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -CONFIG_SCx200_WDT=m -CONFIG_60XX_WDT=m -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -CONFIG_APPLICOM=m - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=m -CONFIG_AGP_INTEL_MCH=m -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -# CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=4096 -CONFIG_HANGCHECK_TIMER=m -# CONFIG_VTUNE is not set - -# -# Linux InfraRed Controller -# -CONFIG_LIRC_SUPPORT=m -CONFIG_LIRC_MAX_DEV=2 -CONFIG_LIRC_BT829=m -CONFIG_LIRC_IT87=m -CONFIG_LIRC_ATIUSB=m -# CONFIG_LIRC_PARALLEL is not set -CONFIG_LIRC_SERIAL=m -# CONFIG_LIRC_HOMEBREW is not set -CONFIG_LIRC_PORT_SERIAL=0x3f8 -CONFIG_LIRC_IRQ_SERIAL=4 -CONFIG_LIRC_SIR=m -CONFIG_LIRC_PORT_SIR=0x3f8 -CONFIG_LIRC_IRQ_SIR=4 - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -CONFIG_SCx200_ACB=m -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_VIA686A=m -# CONFIG_SENSORS_VT1211 is not set -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_PCF8574=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88=m - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported Frontend Modules -# -CONFIG_DVB_TWINHAN_DST=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc" -CONFIG_DVB_ALPS_TDLB7=m -CONFIG_DVB_ALPS_TDMB7=m -CONFIG_DVB_ATMEL_AT76C651=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_GRUNDIG_29504_491=m -CONFIG_DVB_GRUNDIG_29504_401=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1820=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin" -CONFIG_DVB_NXT6000=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -# CONFIG_DVB_AV7110_FIRMWARE is not set -# CONFIG_DVB_AV7110_OSD is not set -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_SKYSTAR=m - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_PM2 is not set -CONFIG_FB_CYBER2000=m -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -CONFIG_FB_HGA=m -CONFIG_FB_RIVA=m -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_XL_INIT=y -CONFIG_FB_SIS=m -CONFIG_FB_SIS_300=y -CONFIG_FB_SIS_315=y -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_VIRTUAL=m - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Bootsplash configuration -# -CONFIG_BOOTSPLASH=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_BIT32_EMUL=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_MEMORY=y -# CONFIG_SND_DEBUG_DETECT is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m -CONFIG_SND_HDA_INTEL=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_BT878=m -CONFIG_SOUND_CMPCI=m -CONFIG_SOUND_CMPCI_FM=y -CONFIG_SOUND_CMPCI_FMIO=0x388 -CONFIG_SOUND_CMPCI_MIDI=y -CONFIG_SOUND_CMPCI_MPUIO=0x330 -CONFIG_SOUND_CMPCI_JOYSTICK=y -CONFIG_SOUND_CMPCI_CM8738=y -# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set -CONFIG_SOUND_CMPCI_SPDIFLOOP=y -CONFIG_SOUND_CMPCI_SPEAKERS=2 -CONFIG_SOUND_EMU10K1=m -CONFIG_MIDI_EMU10K1=y -# CONFIG_SOUND_FUSION is not set -CONFIG_SOUND_CS4281=m -CONFIG_SOUND_ES1370=m -CONFIG_SOUND_ES1371=m -CONFIG_SOUND_ESSSOLO1=m -CONFIG_SOUND_MAESTRO=m -CONFIG_SOUND_MAESTRO3=m -CONFIG_SOUND_ICH=m -CONFIG_SOUND_SONICVIBES=m -CONFIG_SOUND_TRIDENT=m -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_VIA82CXXX=m -CONFIG_MIDI_VIA82CXXX=y -CONFIG_SOUND_OSS=m -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -CONFIG_SOUND_AD1816=m -CONFIG_SOUND_AD1889=m -CONFIG_SOUND_SGALAXY=m -CONFIG_SOUND_ADLIB=m -CONFIG_SOUND_ACI_MIXER=m -CONFIG_SOUND_CS4232=m -CONFIG_SOUND_SSCAPE=m -CONFIG_SOUND_GUS=m -# CONFIG_SOUND_GUS16 is not set -CONFIG_SOUND_GUSMAX=y -CONFIG_SOUND_VMIDI=m -CONFIG_SOUND_TRIX=m -CONFIG_SOUND_MSS=m -CONFIG_SOUND_MPU401=m -CONFIG_SOUND_NM256=m -CONFIG_SOUND_MAD16=m -CONFIG_MAD16_OLDCARD=y -CONFIG_SOUND_PAS=m -CONFIG_SOUND_PSS=m -CONFIG_PSS_MIXER=y -# CONFIG_PSS_HAVE_BOOT is not set -CONFIG_SOUND_SB=m -CONFIG_SOUND_AWE32_SYNTH=m -CONFIG_SOUND_WAVEFRONT=m -CONFIG_SOUND_MAUI=m -CONFIG_SOUND_YM3812=m -CONFIG_SOUND_OPL3SA1=m -CONFIG_SOUND_OPL3SA2=m -CONFIG_SOUND_YMFPCI=m -CONFIG_SOUND_YMFPCI_LEGACY=y -CONFIG_SOUND_UART6850=m -CONFIG_SOUND_AEDSP16=m -CONFIG_SC6600=y -CONFIG_SC6600_JOY=y -CONFIG_SC6600_CDROM=4 -CONFIG_SC6600_CDROMBASE=0x0 -# CONFIG_AEDSP16_MSS is not set -# CONFIG_AEDSP16_SBPRO is not set -CONFIG_AEDSP16_MPU401=y -CONFIG_SOUND_TVMIXER=m -CONFIG_SOUND_KAHLUA=m -CONFIG_SOUND_ALI5455=m -CONFIG_SOUND_FORTE=m -CONFIG_SOUND_RME96XX=m -CONFIG_SOUND_AD1980=m - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -CONFIG_USB_AUDIO=m - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -# CONFIG_USB_SERIAL_WHITEHEAT is not set -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_TIGL=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_IPOIB=m -# CONFIG_INFINIBAND_SDP is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_UDAPL_HELPER=m -CONFIG_INFINIBAND_MELLANOX_HCA=m -CONFIG_AUDIT=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -CONFIG_JBD_DEBUG=y -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_DMAPI=y -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -CONFIG_XFS_RT=y -CONFIG_XFS_QUOTA=m -CONFIG_XFS_DMAPI=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_OCFS2_FS=m -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=m -CONFIG_DMAPI=m -# CONFIG_DMAPI_DEBUG is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_RELAYFS_FS=m -# CONFIG_KLOG_CHANNEL is not set - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -# CONFIG_QNX4FS_RW is not set -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_ACL=y -CONFIG_NFS_ACL_SUPPORT=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_STATD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp850" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_MINIX_SUBPARTITION is not set -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_NEC98_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_FSHOOKS=y - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_CRASH_DUMP=m -CONFIG_KERNTYPES=y -CONFIG_CRASH_DUMP_BLOCKDEV=m -CONFIG_CRASH_DUMP_NETDEV=m -# CONFIG_CRASH_DUMP_MEMDEV is not set -CONFIG_CRASH_DUMP_COMPRESS_RLE=m -CONFIG_CRASH_DUMP_COMPRESS_GZIP=m -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_CHECKING is not set -CONFIG_INIT_DEBUG=y -CONFIG_DEBUG_INFO=y -# CONFIG_FRAME_POINTER is not set -CONFIG_KDB=m -CONFIG_KDB_MODULES=m -# CONFIG_KDB_OFF is not set -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_IOMMU_DEBUG is not set - -# -# Security options -# -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -# CONFIG_SECURITY_SELINUX_MLS is not set -CONFIG_SECURITY_SUBDOMAIN=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_QSORT=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y - -# -# Build options -# -CONFIG_SUSE_KERNEL=y -CONFIG_CFGNAME="smp" -CONFIG_RELEASE="7.308" diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686-smp.config deleted file mode 100644 index 3607fa2e12..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686-smp.config +++ /dev/null @@ -1,2487 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet -# Sat Nov 24 21:29:36 2007 -# -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_AUDITFILESYSTEM is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -CONFIG_MEM_MIRROR=y -# CONFIG_X86_PC is not set -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -CONFIG_X86_GENERICARCH=y -# CONFIG_X86_ES7000 is not set -CONFIG_X86_CYCLONE_TIMER=y -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -# CONFIG_X86_4G is not set -# CONFIG_X86_SWITCH_PAGETABLES is not set -# CONFIG_X86_4G_VM_LAYOUT is not set -# CONFIG_X86_UACCESS_INDIRECT is not set -# CONFIG_X86_HIGH_ENTRY is not set -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_SMP=y -CONFIG_NR_CPUS=32 -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_TSC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_X86_MCE_P4THERMAL=y -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -# CONFIG_HIGHMEM4G is not set -CONFIG_HIGHMEM64G=y -CONFIG_HIGHMEM=y -CONFIG_X86_PAE=y -# CONFIG_NUMA is not set -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -# CONFIG_IRQBALANCE is not set -CONFIG_HAVE_DEC_LOCK=y -CONFIG_REGPARM=y -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -# CONFIG_SOFTWARE_SUSPEND is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=2001 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -# CONFIG_APM_DO_ENABLE is not set -CONFIG_APM_CPU_IDLE=y -# CONFIG_APM_DISPLAY_BLANK is not set -CONFIG_APM_RTC_IS_GMT=y -# CONFIG_APM_ALLOW_INTS is not set -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -# CONFIG_CPU_FREQ_PROC_INTF is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=y - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=y -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_POWERNOW_K6=m -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_GX_SUSPMOD is not set -# CONFIG_X86_SPEEDSTEP_CENTRINO is not set -CONFIG_X86_SPEEDSTEP_ICH=y -CONFIG_X86_SPEEDSTEP_SMI=m -CONFIG_X86_P4_CLOCKMOD=m -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set -CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCI_MSI=y -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_NAMES is not set -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set -# CONFIG_HOTPLUG_CPU is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_I82365=m -CONFIG_TCIC=m -CONFIG_PCMCIA_PROBE=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -CONFIG_HOTPLUG_PCI_COMPAQ=m -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set -CONFIG_HOTPLUG_PCI_IBM=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CONCAT=m -CONFIG_MTD_REDBOOT_PARTS=m -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_AMDSTD_RETRY=3 -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_SCx200_DOCFLASH=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_SCB2_FLASH is not set -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -# CONFIG_MTD_BLKMTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -# CONFIG_MTD_NAND_DISKONCHIP is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_OTHER is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CCISS_DUMP=y -CONFIG_CCISS_DUMP_GLUE=m -CONFIG_DISKDUMP=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEDUMP=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8212=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -# CONFIG_SCSI_7000FASST is not set -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AHA152X=m -# CONFIG_SCSI_AHA1542 is not set -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -# CONFIG_SCSI_DPT_I2O is not set -CONFIG_SCSI_ARCMSR=m -# CONFIG_SCSI_IN2000 is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_SAS=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_ISCSI_SFNET=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -# CONFIG_SCSI_NCR53C406A is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PAS16 is not set -CONFIG_SCSI_PROMISE_STEX=m -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_QLA_IOCTLMOD=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA4XXX=m -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_JMICRON=m - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FUSION_OLD_MODULE_COMPAT=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_PHYSDEV=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=y - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -CONFIG_NET_DIVERT=y -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_NET_CLS_IND=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -CONFIG_ETHERTAP=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -# CONFIG_EL1 is not set -# CONFIG_EL2 is not set -# CONFIG_ELPLUS is not set -# CONFIG_EL16 is not set -# CONFIG_EL3 is not set -# CONFIG_3C515 is not set -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -# CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -# CONFIG_WD80x3 is not set -# CONFIG_ULTRA is not set -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -# CONFIG_NI52 is not set -# CONFIG_NI65 is not set - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -CONFIG_HP100=m -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -# CONFIG_AC3200 is not set -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_CHELSIO_T3=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMTR=m -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_SKISA=m -CONFIG_PROTEON=m -CONFIG_ABYSS=m -CONFIG_SMCTR=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -# CONFIG_ARLAN is not set -CONFIG_WAVELAN=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -# CONFIG_IPW_QOS is not set -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_PCMCIA_IBMTR=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETDUMP=m - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_0=y -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_AVM_A1=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_IX1MICROR2=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_ASUSCOM=y -CONFIG_HISAX_TELEINT=y -CONFIG_HISAX_HFCS=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_SPORTSTER=y -CONFIG_HISAX_MIC=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_ISURF=y -CONFIG_HISAX_HSTSAPHIR=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_ICN=m -CONFIG_ISDN_DRV_PCBIT=m -CONFIG_ISDN_DRV_SC=m -CONFIG_ISDN_DRV_ACT2000=m -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_T1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -# CONFIG_SERIO_RAW is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_INPORT=m -CONFIG_MOUSE_ATIXL=y -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_TWIDDLER is not set -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_ROCKETPORT is not set -# CONFIG_CYCLADES is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=64 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_SCx200_WDT is not set -# CONFIG_60XX_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -# CONFIG_MIXCOMWD is not set -CONFIG_WDT=m -# CONFIG_WDT_501 is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=m -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_INTEL_MCH=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -# CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=y -# CONFIG_HPET is not set -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HANGCHECK_TIMER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PIIX4=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_SMSC47B397=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_OVCAMCHIP=m - -# -# Radio Adapters -# -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# ISA devices -# -# CONFIG_SND_AD1848 is not set -# CONFIG_SND_CS4231 is not set -# CONFIG_SND_CS4232 is not set -# CONFIG_SND_CS4236 is not set -# CONFIG_SND_ES1688 is not set -# CONFIG_SND_ES18XX is not set -# CONFIG_SND_GUSCLASSIC is not set -# CONFIG_SND_GUSEXTREME is not set -# CONFIG_SND_GUSMAX is not set -# CONFIG_SND_INTERWAVE is not set -# CONFIG_SND_INTERWAVE_STB is not set -# CONFIG_SND_OPTI92X_AD1848 is not set -# CONFIG_SND_OPTI92X_CS4231 is not set -# CONFIG_SND_OPTI93X is not set -# CONFIG_SND_SB8 is not set -# CONFIG_SND_SB16 is not set -# CONFIG_SND_SBAWE is not set -# CONFIG_SND_WAVEFRONT is not set -# CONFIG_SND_CMI8330 is not set -# CONFIG_SND_OPL3SA2 is not set -# CONFIG_SND_SGALAXY is not set -# CONFIG_SND_SSCAPE is not set - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_AZX=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_VXP440 is not set -CONFIG_SND_PDAUDIOCF=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -CONFIG_USB_SUSPEND=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_RW_DETECT=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_TEST=m - -# -# USB ATM/DSL drivers -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_CM=y -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) -# -CONFIG_EDAC=m - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_XATTR=y -CONFIG_TMPFS_SECURITY=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_NAND=y -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -# CONFIG_NFSD_V2_ACL is not set -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -CONFIG_DEBUG_HIGHMEM=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_FRAME_POINTER is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_KPROBES=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_4KSTACKS is not set -# CONFIG_SCHEDSTATS is not set -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -# CONFIG_SECURITY_SELINUX_MLS is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y -CONFIG_X86_SYSENTER=y -CONFIG_PC=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686.config deleted file mode 100644 index e0f96004e1..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686.config +++ /dev/null @@ -1,2490 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet -# Sat Nov 24 21:30:07 2007 -# -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_AUDITFILESYSTEM is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_XEN is not set -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -CONFIG_M686=y -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -# CONFIG_X86_4G is not set -# CONFIG_X86_SWITCH_PAGETABLES is not set -# CONFIG_X86_4G_VM_LAYOUT is not set -# CONFIG_X86_UACCESS_INDIRECT is not set -# CONFIG_X86_HIGH_ENTRY is not set -CONFIG_HPET_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -# CONFIG_SMP is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_X86_UP_APIC is not set -CONFIG_X86_TSC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_TOSHIBA=m -CONFIG_I8K=m -CONFIG_MICROCODE=m -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y -# CONFIG_HIGHMEM64G is not set -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -# CONFIG_EFI is not set -CONFIG_REGPARM=y -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# Power management options (ACPI, APM) -# -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -# CONFIG_SOFTWARE_SUSPEND is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=2001 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y -CONFIG_X86_PM_TIMER=y - -# -# APM (Advanced Power Management) BIOS Support -# -CONFIG_APM=y -# CONFIG_APM_IGNORE_USER_SUSPEND is not set -# CONFIG_APM_DO_ENABLE is not set -CONFIG_APM_CPU_IDLE=y -# CONFIG_APM_DISPLAY_BLANK is not set -CONFIG_APM_RTC_IS_GMT=y -# CONFIG_APM_ALLOW_INTS is not set -# CONFIG_APM_REAL_MODE_POWER_OFF is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -# CONFIG_CPU_FREQ_PROC_INTF is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=y - -# -# CPUFreq processor drivers -# -CONFIG_X86_ACPI_CPUFREQ=y -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -CONFIG_X86_POWERNOW_K6=m -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y -CONFIG_X86_POWERNOW_K8=m -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_GX_SUSPMOD is not set -# CONFIG_X86_SPEEDSTEP_CENTRINO is not set -CONFIG_X86_SPEEDSTEP_ICH=y -CONFIG_X86_SPEEDSTEP_SMI=m -CONFIG_X86_P4_CLOCKMOD=m -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set -CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_NAMES is not set -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_I82365=m -CONFIG_TCIC=m -CONFIG_PCMCIA_PROBE=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -CONFIG_HOTPLUG_PCI_COMPAQ=m -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CONCAT=m -CONFIG_MTD_REDBOOT_PARTS=m -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_AMDSTD_RETRY=3 -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_SCx200_DOCFLASH=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_SCB2_FLASH is not set -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -# CONFIG_MTD_BLKMTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -# CONFIG_MTD_NAND_DISKONCHIP is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_OTHER is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CCISS_DUMP=y -CONFIG_CCISS_DUMP_GLUE=m -CONFIG_DISKDUMP=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEDUMP=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8212=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -# CONFIG_SCSI_7000FASST is not set -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AHA152X=m -# CONFIG_SCSI_AHA1542 is not set -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -# CONFIG_SCSI_DPT_I2O is not set -CONFIG_SCSI_ARCMSR=m -# CONFIG_SCSI_IN2000 is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_SAS=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_FUTURE_DOMAIN=m -CONFIG_SCSI_GDTH=m -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_ISCSI_SFNET=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -# CONFIG_SCSI_NCR53C406A is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PAS16 is not set -CONFIG_SCSI_PROMISE_STEX=m -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_QLA_IOCTLMOD=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA4XXX=m -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -CONFIG_PCMCIA_FDOMAIN=m -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_JMICRON=m - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FUSION_OLD_MODULE_COMPAT=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_PHYSDEV=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=y - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -CONFIG_NET_DIVERT=y -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_NET_CLS_IND=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -CONFIG_ETHERTAP=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -# CONFIG_EL1 is not set -# CONFIG_EL2 is not set -# CONFIG_ELPLUS is not set -# CONFIG_EL16 is not set -# CONFIG_EL3 is not set -# CONFIG_3C515 is not set -CONFIG_VORTEX=m -CONFIG_TYPHOON=m -# CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -# CONFIG_WD80x3 is not set -# CONFIG_ULTRA is not set -CONFIG_SMC9194=m -CONFIG_NET_VENDOR_RACAL=y -# CONFIG_NI5010 is not set -# CONFIG_NI52 is not set -# CONFIG_NI65 is not set - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_PCMCIA_XIRTULIP is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -CONFIG_HP100=m -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -# CONFIG_AC3200 is not set -CONFIG_APRICOT=m -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_TLAN=m -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_NET_POCKET=y -# CONFIG_ATP is not set -# CONFIG_DE600 is not set -# CONFIG_DE620 is not set - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_CHELSIO_T3=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMTR=m -CONFIG_IBMOL=m -CONFIG_IBMLS=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_SKISA=m -CONFIG_PROTEON=m -CONFIG_ABYSS=m -CONFIG_SMCTR=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -# CONFIG_ARLAN is not set -CONFIG_WAVELAN=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -# CONFIG_IPW_QOS is not set -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -CONFIG_PCMCIA_IBMTR=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETDUMP=m - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DRV_LOOP=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_0=y -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_AVM_A1=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_IX1MICROR2=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_ASUSCOM=y -CONFIG_HISAX_TELEINT=y -CONFIG_HISAX_HFCS=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_SPORTSTER=y -CONFIG_HISAX_MIC=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_ISURF=y -CONFIG_HISAX_HSTSAPHIR=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_ICN=m -CONFIG_ISDN_DRV_PCBIT=m -CONFIG_ISDN_DRV_SC=m -CONFIG_ISDN_DRV_ACT2000=m -CONFIG_ISDN_DRV_TPAM=m -CONFIG_HYSDN=m -CONFIG_HYSDN_CAPI=y - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_T1ISA=m -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -# CONFIG_SERIO_RAW is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_INPORT=m -CONFIG_MOUSE_ATIXL=y -CONFIG_MOUSE_LOGIBM=m -CONFIG_MOUSE_PC110PAD=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_TWIDDLER is not set -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -# CONFIG_CYCLADES is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_DIGI is not set -# CONFIG_ESPSERIAL is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_N_HDLC=m -# CONFIG_RISCOM8 is not set -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -CONFIG_STALDRV=y -# CONFIG_STALLION is not set -# CONFIG_ISTALLION is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=64 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_SCx200_WDT is not set -# CONFIG_60XX_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# ISA-based Watchdog Cards -# -CONFIG_PCWATCHDOG=m -# CONFIG_MIXCOMWD is not set -CONFIG_WDT=m -# CONFIG_WDT_501 is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -CONFIG_NVRAM=m -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -CONFIG_SONYPI=m - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -CONFIG_AGP_ALI=y -CONFIG_AGP_ATI=y -CONFIG_AGP_AMD=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_INTEL_MCH=y -CONFIG_AGP_NVIDIA=y -CONFIG_AGP_SIS=y -CONFIG_AGP_SWORKS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_EFFICEON=y -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set - -# -# PCMCIA character devices -# -CONFIG_SYNCLINK_CS=m -# CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=y -# CONFIG_HPET is not set -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HANGCHECK_TIMER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -# CONFIG_I2C_ELEKTOR is not set -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PIIX4=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_SMSC47B397=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# -CONFIG_IBM_ASM=m - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_MEYE is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_OVCAMCHIP=m - -# -# Radio Adapters -# -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_I810=m -CONFIG_FB_I810_GTF=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_MDA_CONSOLE=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# ISA devices -# -# CONFIG_SND_AD1848 is not set -# CONFIG_SND_CS4231 is not set -# CONFIG_SND_CS4232 is not set -# CONFIG_SND_CS4236 is not set -# CONFIG_SND_ES1688 is not set -# CONFIG_SND_ES18XX is not set -# CONFIG_SND_GUSCLASSIC is not set -# CONFIG_SND_GUSEXTREME is not set -# CONFIG_SND_GUSMAX is not set -# CONFIG_SND_INTERWAVE is not set -# CONFIG_SND_INTERWAVE_STB is not set -# CONFIG_SND_OPTI92X_AD1848 is not set -# CONFIG_SND_OPTI92X_CS4231 is not set -# CONFIG_SND_OPTI93X is not set -# CONFIG_SND_SB8 is not set -# CONFIG_SND_SB16 is not set -# CONFIG_SND_SBAWE is not set -# CONFIG_SND_WAVEFRONT is not set -# CONFIG_SND_CMI8330 is not set -# CONFIG_SND_OPL3SA2 is not set -# CONFIG_SND_SGALAXY is not set -# CONFIG_SND_SSCAPE is not set - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_AZX=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_VXP440 is not set -CONFIG_SND_PDAUDIOCF=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -CONFIG_USB_SUSPEND=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_RW_DETECT=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_TEST=m - -# -# USB ATM/DSL drivers -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_CM=y -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) -# -CONFIG_EDAC=m - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_XATTR=y -CONFIG_TMPFS_SECURITY=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_NAND=y -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -# CONFIG_NFSD_V2_ACL is not set -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -CONFIG_DEBUG_HIGHMEM=y -CONFIG_DEBUG_INFO=y -# CONFIG_FRAME_POINTER is not set -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_KPROBES=y -CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_4KSTACKS is not set -# CONFIG_SCHEDSTATS is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -# CONFIG_SECURITY_SELINUX_MLS is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_SYSENTER=y -CONFIG_PC=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64-smp.config deleted file mode 100644 index 157dcc2572..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64-smp.config +++ /dev/null @@ -1,2045 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet -# Sat Nov 24 21:28:15 2007 -# - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_AUDITFILESYSTEM is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SHMEM=y -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_EFI=y -CONFIG_GENERIC_IOMAP=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_IA64_L1_CACHE_SHIFT=7 -CONFIG_NUMA=y -CONFIG_VIRTUAL_MEM_MAP=y -CONFIG_DISCONTIGMEM=y -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_IA64_LOCAL_APIC_INFO_MOD=m -CONFIG_FORCE_MAX_ZONEORDER=18 -CONFIG_SMP=y -CONFIG_NR_CPUS=64 -# CONFIG_HOTPLUG_CPU is not set -CONFIG_SCHED_SMT=y -# CONFIG_PREEMPT is not set -CONFIG_HAVE_DEC_LOCK=y -# CONFIG_IA32_SUPPORT is not set -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# Firmware Drivers -# -CONFIG_EFI_VARS=y -CONFIG_EFI_PCDP=y -CONFIG_DELL_RBU=m -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_ACPI=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_BLACKLIST_YEAR=2001 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_MSI=y -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_NAMES is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_TCIC=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_OTHER is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_PARIDE is not set -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CCISS_DUMP=y -CONFIG_CCISS_DUMP_GLUE=m -CONFIG_DISKDUMP=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEDUMP=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8212=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=m -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_SAS=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -CONFIG_SCSI_LPFC=m -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_ISCSI_SFNET=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_PROMISE_STEX=m -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_QLA_IOCTLMOD=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA4XXX=m -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_JMICRON=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FUSION_OLD_MODULE_COMPAT=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_PHYSDEV=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=y - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -CONFIG_NET_DIVERT=y -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_NET_CLS_IND=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_CHELSIO_T3=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_ABYSS=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IEEE80211 is not set -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETDUMP=m - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -# CONFIG_SERIO_RAW is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_TWIDDLER is not set -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_ROCKETPORT is not set -# CONFIG_CYCLADES is not set -# CONFIG_SYNCLINK is not set -# CONFIG_SYNCLINKMP is not set -CONFIG_N_HDLC=m -CONFIG_STALDRV=y -CONFIG_SGI_SNSC=y -CONFIG_SGI_TIOCX=y -# CONFIG_SGI_MBCS is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_ACPI=y -CONFIG_SERIAL_8250_NR_UARTS=64 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_SGI_L1_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -CONFIG_EFI_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_I460=y -CONFIG_AGP_HP_ZX1=y -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_RAW_DRIVER=y -# CONFIG_HPET is not set -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_SMSC47B397=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_OVCAMCHIP=m - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_AZX=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -CONFIG_USB_SUSPEND=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_RW_DETECT=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_TEST=m - -# -# USB ATM/DSL drivers -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_CM=y -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) -# -# CONFIG_EDAC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_XATTR=y -CONFIG_TMPFS_SECURITY=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -# CONFIG_NFSD_V2_ACL is not set -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_INFO is not set -CONFIG_KPROBES=y -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -# CONFIG_SECURITY_SELINUX_MLS is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64.config deleted file mode 100644 index 2eb9678183..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64.config +++ /dev/null @@ -1,2045 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet -# Sat Nov 24 21:28:54 2007 -# - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_AUDITFILESYSTEM is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SHMEM=y -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_EFI=y -CONFIG_GENERIC_IOMAP=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_IA64_L1_CACHE_SHIFT=7 -CONFIG_NUMA=y -CONFIG_VIRTUAL_MEM_MAP=y -CONFIG_DISCONTIGMEM=y -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_IA64_LOCAL_APIC_INFO_MOD=m -CONFIG_FORCE_MAX_ZONEORDER=18 -CONFIG_SMP=y -CONFIG_NR_CPUS=64 -# CONFIG_HOTPLUG_CPU is not set -CONFIG_SCHED_SMT=y -# CONFIG_PREEMPT is not set -CONFIG_HAVE_DEC_LOCK=y -# CONFIG_IA32_SUPPORT is not set -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# Firmware Drivers -# -CONFIG_EFI_VARS=y -CONFIG_EFI_PCDP=y -CONFIG_DELL_RBU=m -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_ACPI=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_BLACKLIST_YEAR=2001 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_MSI=y -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_NAMES is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_TCIC=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_OTHER is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_PARIDE is not set -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CCISS_DUMP=y -CONFIG_CCISS_DUMP_GLUE=m -CONFIG_DISKDUMP=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEDUMP=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8212=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=m -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_SAS=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -CONFIG_SCSI_LPFC=m -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_ISCSI_SFNET=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_PROMISE_STEX=m -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_QLA_IOCTLMOD=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA4XXX=m -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_JMICRON=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FUSION_OLD_MODULE_COMPAT=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_PHYSDEV=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=y - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -CONFIG_NET_DIVERT=y -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_NET_CLS_IND=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_CHELSIO_T3=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_ABYSS=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IEEE80211 is not set -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETDUMP=m - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -# CONFIG_SERIO_RAW is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_TWIDDLER is not set -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_ROCKETPORT is not set -# CONFIG_CYCLADES is not set -# CONFIG_SYNCLINK is not set -# CONFIG_SYNCLINKMP is not set -CONFIG_N_HDLC=m -CONFIG_STALDRV=y -CONFIG_SGI_SNSC=y -CONFIG_SGI_TIOCX=y -# CONFIG_SGI_MBCS is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_ACPI=y -CONFIG_SERIAL_8250_NR_UARTS=64 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_SGI_L1_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -CONFIG_EFI_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_I460=y -CONFIG_AGP_HP_ZX1=y -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_RAW_DRIVER=y -# CONFIG_HPET is not set -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_SMSC47B397=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_OVCAMCHIP=m - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_AZX=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -CONFIG_USB_SUSPEND=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_RW_DETECT=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_TEST=m - -# -# USB ATM/DSL drivers -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_CM=y -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) -# -# CONFIG_EDAC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_XATTR=y -CONFIG_TMPFS_SECURITY=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -# CONFIG_NFSD_V2_ACL is not set -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_INFO is not set -CONFIG_KPROBES=y -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -# CONFIG_SECURITY_SELINUX_MLS is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64-smp.config deleted file mode 100644 index dc48f8650c..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64-smp.config +++ /dev/null @@ -1,2235 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet -# Sat Nov 24 21:26:14 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_HPET_TIMER=y -CONFIG_X86_PM_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_AUDITFILESYSTEM is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -# CONFIG_MEM_MIRROR is not set -# CONFIG_X86_64_XEN is not set -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_HT=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -# CONFIG_PREEMPT is not set -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_K8_NUMA=y -CONFIG_DISCONTIGMEM=y -CONFIG_NUMA=y -CONFIG_HAVE_DEC_LOCK=y -CONFIG_NR_CPUS=32 -CONFIG_GART_IOMMU=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_AMD=y -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# Power management options -# -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -# CONFIG_SOFTWARE_SUSPEND is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=2001 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -# CONFIG_CPU_FREQ_PROC_INTF is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=y - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_SPEEDSTEP_CENTRINO is not set -CONFIG_X86_ACPI_CPUFREQ=y -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_UNORDERED_IO is not set -# CONFIG_HOTPLUG_CPU is not set -CONFIG_PCI_MSI=y -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_NAMES is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_TCIC=m - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y -CONFIG_UID16=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CONCAT=m -CONFIG_MTD_REDBOOT_PARTS=m -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_AMDSTD_RETRY=3 -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_SCx200_DOCFLASH=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_SCB2_FLASH is not set -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -# CONFIG_MTD_BLKMTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -# CONFIG_MTD_NAND_DISKONCHIP is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_OTHER is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -# CONFIG_PARIDE is not set -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CCISS_DUMP=y -CONFIG_CCISS_DUMP_GLUE=m -CONFIG_DISKDUMP=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEDUMP=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8212=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_SAS=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -CONFIG_SCSI_LPFC=m -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_ISCSI_SFNET=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_PROMISE_STEX=m -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_QLA_IOCTLMOD=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA4XXX=m -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_JMICRON=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FUSION_OLD_MODULE_COMPAT=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_PHYSDEV=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=y - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -CONFIG_NET_DIVERT=y -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_NET_CLS_IND=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_CHELSIO_T3=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_ABYSS=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -# CONFIG_IPW_QOS is not set -# CONFIG_IPW2200_DEBUG is not set -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETDUMP=m - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -# CONFIG_SERIO_RAW is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_TWIDDLER is not set -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_ROCKETPORT is not set -# CONFIG_CYCLADES is not set -# CONFIG_SYNCLINK is not set -# CONFIG_SYNCLINKMP is not set -CONFIG_N_HDLC=m -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=64 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_SCx200_WDT is not set -# CONFIG_60XX_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -# CONFIG_NVRAM is not set -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_INTEL_MCH=y -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=y -# CONFIG_HPET is not set -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HANGCHECK_TIMER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_SMSC47B397=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_OVCAMCHIP=m - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_BIT32_EMUL=m -CONFIG_SND_RTCTIMER=m -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_AZX=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -CONFIG_USB_SUSPEND=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_RW_DETECT=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_TEST=m - -# -# USB ATM/DSL drivers -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_CM=y -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) -# -CONFIG_EDAC=m - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_XATTR=y -CONFIG_TMPFS_SECURITY=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_NAND=y -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -# CONFIG_NFSD_V2_ACL is not set -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_INFO is not set -CONFIG_INIT_DEBUG=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_IOMMU_DEBUG is not set -CONFIG_KPROBES=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -# CONFIG_SECURITY_SELINUX_MLS is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64.config deleted file mode 100644 index 51d30e0845..0000000000 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64.config +++ /dev/null @@ -1,2235 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet -# Sat Nov 24 21:27:28 2007 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_HPET_TIMER=y -CONFIG_X86_PM_TIMER=y -CONFIG_HPET_EMULATE_RTC=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_AUDITFILESYSTEM is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -# CONFIG_MEM_MIRROR is not set -# CONFIG_X86_64_XEN is not set -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_TSC=y -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=m -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_HT=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -# CONFIG_PREEMPT is not set -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_K8_NUMA=y -CONFIG_DISCONTIGMEM=y -CONFIG_NUMA=y -CONFIG_HAVE_DEC_LOCK=y -CONFIG_NR_CPUS=32 -CONFIG_GART_IOMMU=y -CONFIG_SWIOTLB=y -CONFIG_X86_MCE=y -CONFIG_X86_MCE_AMD=y -CONFIG_IOPROC=y -CONFIG_PTRACK=y - -# -# Power management options -# -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -# CONFIG_SOFTWARE_SUSPEND is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_SLEEP=y -CONFIG_ACPI_SLEEP_PROC_FS=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=2001 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -# CONFIG_CPU_FREQ_PROC_INTF is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -# CONFIG_CPU_FREQ_24_API is not set -CONFIG_CPU_FREQ_TABLE=y - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -# CONFIG_X86_SPEEDSTEP_CENTRINO is not set -CONFIG_X86_ACPI_CPUFREQ=y -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -CONFIG_PCI_MMCONFIG=y -# CONFIG_UNORDERED_IO is not set -# CONFIG_HOTPLUG_CPU is not set -CONFIG_PCI_MSI=y -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_NAMES is not set - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m -CONFIG_CARDBUS=y -CONFIG_PD6729=m -# CONFIG_I82092 is not set -CONFIG_TCIC=m - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y -CONFIG_UID16=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CONCAT=m -CONFIG_MTD_REDBOOT_PARTS=m -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_AMDSTD_RETRY=3 -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_SCx200_DOCFLASH=m -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_SCB2_FLASH is not set -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -# CONFIG_MTD_BLKMTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -# CONFIG_MTD_NAND_DISKONCHIP is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_PC_CML1=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_OTHER is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -# CONFIG_PARIDE is not set -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y -CONFIG_CCISS_DUMP=y -CONFIG_CCISS_DUMP_GLUE=m -CONFIG_DISKDUMP=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_DELKIN=m -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_BLK_DEV_IDEDUMP=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_RZ1000=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -CONFIG_BLK_DEV_CY82C693=y -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT8212=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_PDC202XX_FORCE=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -CONFIG_BLK_DEV_SLC90E66=y -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_DUMP=m -CONFIG_SD_IOSTATS=y -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ADP94XX=m -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_ARCMSR=m -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_SAS=m -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -CONFIG_SCSI_LPFC=m -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_ISCSI_SFNET=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_PROMISE_STEX=m -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA2XXX=m -CONFIG_QLA_IOCTLMOD=m -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA24XX=m -CONFIG_SCSI_QLA4XXX=m -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -CONFIG_ATA=m -CONFIG_SATA_AHCI=m -CONFIG_SATA_SVW=m -CONFIG_ATA_PIIX=m -CONFIG_SATA_MV=m -CONFIG_SATA_NV=m -CONFIG_PDC_ADMA=m -CONFIG_SATA_QSTOR=m -CONFIG_SATA_PROMISE=m -CONFIG_SATA_SX4=m -CONFIG_SATA_SIL=m -CONFIG_SATA_SIL24=m -CONFIG_SATA_SIS=m -CONFIG_SATA_ULI=m -CONFIG_SATA_VIA=m -CONFIG_SATA_VITESSE=m -CONFIG_SATA_INTEL_COMBINED=y -CONFIG_PATA_PDC2027X=m -CONFIG_PATA_JMICRON=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m -CONFIG_FUSION_OLD_MODULE_COMPAT=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -# CONFIG_IEEE1394_OUI_DB is not set -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_SBP2_PHYS_DMA=y -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m -CONFIG_IEEE1394_CMP=m -CONFIG_IEEE1394_AMDTP=m - -# -# I2O device support -# -CONFIG_I2O=m -CONFIG_I2O_CONFIG=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_PHYSDEV=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=y - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -CONFIG_NET_DIVERT=y -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_NET_CLS_IND=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -# CONFIG_TUX_EXTENDED_LOG is not set -# CONFIG_TUX_DEBUG is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -CONFIG_E1000E=m -CONFIG_IGB=m -CONFIG_NS83820=m -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_SKGE=m -CONFIG_SKY2=m -CONFIG_SK98LIN=m -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_QLA3XXX=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_CHELSIO_T3=m -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_NETXEN_NIC=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -CONFIG_TMS380TR=m -CONFIG_TMSPCI=m -CONFIG_ABYSS=m - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -# CONFIG_IPW_QOS is not set -# CONFIG_IPW2200_DEBUG is not set -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -# CONFIG_SKFP is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -# CONFIG_SLIP is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETDUMP=m - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -CONFIG_HISAX_HFCUSB=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# -CONFIG_ISDN_DRV_TPAM=m - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -# CONFIG_SERIO_RAW is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_TWIDDLER is not set -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_ROCKETPORT is not set -# CONFIG_CYCLADES is not set -# CONFIG_SYNCLINK is not set -# CONFIG_SYNCLINKMP is not set -CONFIG_N_HDLC=m -CONFIG_STALDRV=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -# CONFIG_SERIAL_8250_ACPI is not set -CONFIG_SERIAL_8250_NR_UARTS=64 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_MULTIPORT=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -# CONFIG_TIPAR is not set - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_ACQUIRE_WDT=m -CONFIG_ADVANTECH_WDT=m -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -CONFIG_SC520_WDT=m -CONFIG_EUROTECH_WDT=m -CONFIG_IB700_WDT=m -CONFIG_WAFER_WDT=m -CONFIG_I8XX_TCO=m -CONFIG_SC1200_WDT=m -# CONFIG_SCx200_WDT is not set -# CONFIG_60XX_WDT is not set -CONFIG_CPU5_WDT=m -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_MACHZ_WDT=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=m -# CONFIG_NVRAM is not set -CONFIG_RTC=y -CONFIG_DTLK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_INTEL_MCH=y -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -# CONFIG_DRM_SIS is not set - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=y -# CONFIG_HPET is not set -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_HANGCHECK_TIMER=m - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_ALI1535=m -CONFIG_I2C_ALI1563=m -CONFIG_I2C_ALI15X3=m -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -CONFIG_I2C_I810=m -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_SIS5595=m -CONFIG_I2C_SIS630=m -CONFIG_I2C_SIS96X=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -CONFIG_I2C_SENSOR=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m - -# -# Other I2C Chip support -# -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_RTC8564=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_SMSC47B397=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -CONFIG_VIDEO_BT848=m -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -CONFIG_VIDEO_OVCAMCHIP=m - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_BIT32_EMUL=m -CONFIG_SND_RTCTIMER=m -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_AZX=m -CONFIG_SND_BT87X=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_HDSP=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_YMFPCI=m -CONFIG_SND_ALS4000=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VX222=m - -# -# ALSA USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -CONFIG_USB_SUSPEND=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -CONFIG_USB_MIDI=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_RW_DETECT=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_MTOUCH=m -CONFIG_USB_EGALAX=m -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m - -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_W9968CF=m -CONFIG_USB_PWC=m - -# -# USB Network adaptors -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_ZAURUS=y -CONFIG_USB_CDCETHER=y - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_TEST=m - -# -# USB ATM/DSL drivers -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPATH=m -CONFIG_INFINIBAND_AMSO1100=m -# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set -CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_CM=y -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_SDP=m -# CONFIG_INFINIBAND_SDP_DEBUG is not set -CONFIG_INFINIBAND_VNIC=m -# CONFIG_INFINIBAND_VNIC_DEBUG is not set -CONFIG_INFINIBAND_VNIC_STATS=y -CONFIG_INFINIBAND_MADEYE=m - -# -# EDAC - error detection and reporting (RAS) -# -CONFIG_EDAC=m - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD76X=m -CONFIG_EDAC_E7XXX=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_I82875P=m -CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_R82600=m -CONFIG_EDAC_POLL=y - -# -# Firmware Drivers -# -CONFIG_EDD=m -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_XATTR=y -CONFIG_TMPFS_SECURITY=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_NAND=y -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -# CONFIG_NFSD_V2_ACL is not set -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_INFO is not set -CONFIG_INIT_DEBUG=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_IOMMU_DEBUG is not set -CONFIG_KPROBES=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -# CONFIG_SECURITY_SELINUX_MLS is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_HAS_IOMEM=y diff --git a/lustre/kernel_patches/kernel_configs/kgdb_2.6.0_test1_vmware.config b/lustre/kernel_patches/kernel_configs/kgdb_2.6.0_test1_vmware.config deleted file mode 100644 index 000cdc2c9e..0000000000 --- a/lustre/kernel_patches/kernel_configs/kgdb_2.6.0_test1_vmware.config +++ /dev/null @@ -1,914 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_GENERIC_ISA_DMA=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=15 -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -# CONFIG_M486 is not set -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -# CONFIG_MPENTIUMII is not set -CONFIG_MPENTIUMIII=y -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MELAN is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -# CONFIG_X86_GENERIC is not set -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=5 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_GOOD_APIC=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_X86_USE_PPRO_CHECKSUM=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_SMP=y -CONFIG_NR_CPUS=16 -# CONFIG_PREEMPT is not set -CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_TSC=y -CONFIG_X86_MCE=y -# CONFIG_X86_MCE_NONFATAL is not set -CONFIG_X86_MCE_P4THERMAL=y -# CONFIG_TOSHIBA is not set -# CONFIG_I8K is not set -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set -CONFIG_EDD=y -CONFIG_NOHIGHMEM=y -# CONFIG_HIGHMEM4G is not set -# CONFIG_HIGHMEM64G is not set -# CONFIG_MATH_EMULATION is not set -CONFIG_MTRR=y -CONFIG_HAVE_DEC_LOCK=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# -# ACPI Support -# -# CONFIG_ACPI is not set - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SCx200 is not set -CONFIG_HOTPLUG=y - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=y -# CONFIG_YENTA is not set -# CONFIG_I82092 is not set -# CONFIG_I82365 is not set -# CONFIG_TCIC is not set -CONFIG_PCMCIA_PROBE=y - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_MISC=y - -# -# Generic Driver Options -# -# CONFIG_FW_LOADER is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -CONFIG_PNP=y -CONFIG_PNP_NAMES=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_LBD=y - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -# CONFIG_IDEDISK_STROKE is not set -# CONFIG_BLK_DEV_IDECS is not set -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_IDE_TASK_IOCTL is not set -CONFIG_IDE_TASKFILE_IO=y - -# -# IDE chipset support/bugfixes -# -CONFIG_BLK_DEV_CMD640=y -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_IDEPNP is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDE_TCQ is not set -# CONFIG_BLK_DEV_OFFBOARD is not set -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_PCI_WIP is not set -CONFIG_BLK_DEV_ADMA=y -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_BLK_DEV_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set -# CONFIG_BLK_DEV_CMD64X is not set -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_HPT34X is not set -# CONFIG_BLK_DEV_HPT366 is not set -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_PDC202XX_OLD is not set -# CONFIG_BLK_DEV_PDC202XX_NEW is not set -CONFIG_BLK_DEV_RZ1000=y -# CONFIG_BLK_DEV_SVWKS is not set -# CONFIG_BLK_DEV_SIIMAGE is not set -# CONFIG_BLK_DEV_SIS5513 is not set -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_BLK_DEV_IDE_MODES=y - -# -# SCSI device support -# -CONFIG_SCSI=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=y -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_REPORT_LUNS=y -CONFIG_SCSI_CONSTANTS=y -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_SCSI_AM53C974 is not set -# CONFIG_SCSI_MEGARAID is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA2XXX is not set -# CONFIG_SCSI_SEAGATE is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_FERAL_ISP is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -# CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_IPV6 is not set -# CONFIG_XFRM_USER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IPV6_SCTP__=y -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -CONFIG_DUMMY=m -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set -# CONFIG_NET_SB1000 is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -# CONFIG_MII is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_LANCE is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=y -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_AC3200 is not set -# CONFIG_APRICOT is not set -# CONFIG_B44 is not set -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -CONFIG_EEPRO100=y -# CONFIG_EEPRO100_PIO is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices (depends on LLC=y) -# -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -# CONFIG_PCMCIA_3C589 is not set -# CONFIG_PCMCIA_3C574 is not set -# CONFIG_PCMCIA_FMVJ18X is not set -CONFIG_PCMCIA_PCNET=y -# CONFIG_PCMCIA_NMCLAN is not set -# CONFIG_PCMCIA_SMC91C92 is not set -# CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_PCMCIA_AXNET is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN_BOOL is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_INPORT is not set -# CONFIG_MOUSE_LOGIBM is not set -# CONFIG_MOUSE_PC110PAD is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_SONYPI is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -CONFIG_AGP=y -# CONFIG_AGP_ALI is not set -# CONFIG_AGP_AMD is not set -# CONFIG_AGP_AMD_8151 is not set -# CONFIG_AGP_INTEL is not set -# CONFIG_AGP_NVIDIA is not set -# CONFIG_AGP_SIS is not set -# CONFIG_AGP_SWORKS is not set -# CONFIG_AGP_VIA is not set -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_MWAVE is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -# CONFIG_ZISOFS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set -# CONFIG_NFS_V4 is not set -CONFIG_NFS_DIRECTIO=y -# CONFIG_NFSD is not set -CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set -CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -CONFIG_LUSTRE_FS=y -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_NLS=y - -# -# Native Language Support -# -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Graphics support -# -# CONFIG_FB is not set -CONFIG_VIDEO_SELECT=y - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=y - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_STACKOVERFLOW is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_IOVIRT is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_SPINLINE is not set -# CONFIG_LOCKMETER is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -CONFIG_KGDB=y -# CONFIG_KGDB_9600BAUD is not set -# CONFIG_KGDB_19200BAUD is not set -# CONFIG_KGDB_38400BAUD is not set -# CONFIG_KGDB_57600BAUD is not set -CONFIG_KGDB_115200BAUD=y -CONFIG_KGDB_PORT=0x3f8 -CONFIG_KGDB_IRQ=4 -CONFIG_DEBUG_INFO=y -# CONFIG_KGDB_MORE is not set -CONFIG_NO_KGDB_CPUS=16 -# CONFIG_KGDB_TS is not set -# CONFIG_STACK_OVERFLOW_TEST is not set -CONFIG_KGDB_CONSOLE=y -CONFIG_KGDB_SYSRQ=y -CONFIG_FRAME_POINTER=y -CONFIG_X86_EXTRA_IRQS=y -CONFIG_X86_FIND_SMP_CONFIG=y -CONFIG_X86_MPPARSE=y - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -# CONFIG_CRC32 is not set -CONFIG_X86_SMP=y -CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_X86_TRAMPOLINE=y diff --git a/lustre/kernel_patches/kernel_configs/uml-2.6.10-fc3.config b/lustre/kernel_patches/kernel_configs/uml-2.6.10-fc3.config deleted file mode 100644 index 0ec6b4a9d2..0000000000 --- a/lustre/kernel_patches/kernel_configs/uml-2.6.10-fc3.config +++ /dev/null @@ -1,662 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-ac12 -# Tue Jun 14 08:15:05 2005 -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_USERMODE=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# UML-specific options -# -CONFIG_MODE_TT=y -CONFIG_MODE_SKAS=y -CONFIG_NET=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_HOSTFS=y -CONFIG_MCONSOLE=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_HOST_2G_2G is not set -# CONFIG_SMP is not set -CONFIG_NEST_LEVEL=0 -CONFIG_KERNEL_HALF_GIGS=1 -CONFIG_KERNEL_STACK_ORDER=4 -CONFIG_UML_REAL_TIME_CLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_HOTPLUG is not set -CONFIG_KOBJECT_UEVENT=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -CONFIG_KMOD=y - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Character Devices -# -CONFIG_STDIO_CONSOLE=y -CONFIG_SSL=y -CONFIG_FD_CHAN=y -CONFIG_NULL_CHAN=y -CONFIG_PORT_CHAN=y -CONFIG_PTY_CHAN=y -CONFIG_TTY_CHAN=y -CONFIG_XTERM_CHAN=y -# CONFIG_NOCONFIG_CHAN is not set -CONFIG_CON_ZERO_CHAN="fd:0,fd:1" -CONFIG_CON_CHAN="xterm" -CONFIG_SSL_CHAN="pty" -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -CONFIG_SOFT_WATCHDOG=m -# CONFIG_UML_WATCHDOG is not set -# CONFIG_UML_SOUND is not set -# CONFIG_SOUND is not set -# CONFIG_HOSTAUDIO is not set - -# -# Block Devices -# -CONFIG_BLK_DEV_UBD=y -# CONFIG_BLK_DEV_UBD_SYNC is not set -CONFIG_BLK_DEV_COW_COMMON=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_NETDEVICES=y - -# -# UML Network Devices -# -CONFIG_UML_NET=y -CONFIG_UML_NET_ETHERTAP=y -CONFIG_UML_NET_TUNTAP=y -# CONFIG_UML_NET_SLIP is not set -# CONFIG_UML_NET_DAEMON is not set -# CONFIG_UML_NET_MCAST is not set -# CONFIG_UML_NET_SLIRP is not set - -# -# Networking support -# - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 is not set - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -# CONFIG_IP_NF_CONNTRACK_MARK is not set -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_PHYSDEV=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_LOCAL=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_PHYSDEV=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=y - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=m -# CONFIG_LLC2 is not set -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=y -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -CONFIG_NET_DIVERT=y -# CONFIG_ECONET is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_NET_CLS_IND=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_TUX is not set -CONFIG_DUMMY=m -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -CONFIG_ETHERTAP=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_TCP is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_RPCSEC_GSS_SPKM3=y -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -# CONFIG_CRYPTO_AES is not set -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -# CONFIG_CRYPTO_SIGNATURE is not set -# CONFIG_CRYPTO_MPILIB is not set - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=m -CONFIG_ZLIB_DEFLATE=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -# CONFIG_MD_FAULTY is not set -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -# CONFIG_INPUT is not set - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_FRAME_POINTER=y -CONFIG_PT_PROXY=y -# CONFIG_GPROF is not set -# CONFIG_GCOV is not set diff --git a/lustre/kernel_patches/kernel_configs/uml-vanilla-2.6.6.config b/lustre/kernel_patches/kernel_configs/uml-vanilla-2.6.6.config deleted file mode 100644 index 01a8b4dbcf..0000000000 --- a/lustre/kernel_patches/kernel_configs/uml-vanilla-2.6.6.config +++ /dev/null @@ -1,491 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_USERMODE=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# UML-specific options -# -CONFIG_MODE_TT=y -# CONFIG_MODE_SKAS is not set -CONFIG_NET=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_HOSTFS=y -# CONFIG_HPPFS is not set -CONFIG_MCONSOLE=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_HOST_2G_2G is not set -# CONFIG_UML_SMP is not set -# CONFIG_SMP is not set -CONFIG_NEST_LEVEL=0 -CONFIG_KERNEL_HALF_GIGS=1 -# CONFIG_HIGHMEM is not set -CONFIG_PROC_MM=y -CONFIG_KERNEL_STACK_ORDER=3 -# CONFIG_UML_REAL_TIME_CLOCK is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -# CONFIG_STANDALONE is not set -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_HOTPLUG is not set -# CONFIG_IKCONFIG is not set -CONFIG_EMBEDDED=y -# CONFIG_KALLSYMS is not set -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y - -# -# Generic Driver Options -# - -# -# Character Devices -# -CONFIG_STDIO_CONSOLE=y -CONFIG_SSL=y -CONFIG_FD_CHAN=y -CONFIG_NULL_CHAN=y -CONFIG_PORT_CHAN=y -CONFIG_PTY_CHAN=y -CONFIG_TTY_CHAN=y -CONFIG_XTERM_CHAN=y -CONFIG_CON_ZERO_CHAN="fd:0,fd:1" -CONFIG_CON_CHAN="xterm" -CONFIG_SSL_CHAN="pty" -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 -# CONFIG_WATCHDOG is not set -# CONFIG_UML_SOUND is not set -# CONFIG_SOUND is not set -# CONFIG_HOSTAUDIO is not set - -# -# Block Devices -# -CONFIG_BLK_DEV_UBD=y -CONFIG_BLK_DEV_UBD_SYNC=y -CONFIG_BLK_DEV_COW_COMMON=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_MMAPPER is not set -CONFIG_NETDEVICES=y - -# -# UML Network Devices -# -CONFIG_UML_NET=y -CONFIG_UML_NET_ETHERTAP=y -CONFIG_UML_NET_TUNTAP=y -CONFIG_UML_NET_SLIP=y -CONFIG_UML_NET_DAEMON=y -CONFIG_UML_NET_MCAST=y -CONFIG_UML_NET_PCAP=y -CONFIG_UML_NET_SLIRP=y - -# -# Networking support -# - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_FWMARK is not set -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# IP: Netfilter Configuration -# -# CONFIG_IP_NF_CONNTRACK is not set -# CONFIG_IP_NF_QUEUE is not set -# CONFIG_IP_NF_IPTABLES is not set -# CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# Bridge: Netfilter Configuration -# -# CONFIG_BRIDGE_NF_EBTABLES is not set -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=m -CONFIG_LLC2=m -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -# CONFIG_NET_SCH_HFSC is not set -CONFIG_NET_SCH_CSZ=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_DELAY is not set -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_DUMMY=y -CONFIG_BONDING=y -CONFIG_EQUALIZER=y -CONFIG_TUN=y -CONFIG_ETHERTAP=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -CONFIG_REISERFS_PROC_INFO=y -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=y -CONFIG_QUOTA=y -CONFIG_QFMT_V1=y -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -# CONFIG_ROOT_NFS is not set -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf-8" -# CONFIG_NLS_CODEPAGE_437 is not set -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_ARC4 is not set -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Library routines -# -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y - -# -# SCSI support -# -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Kernel hacking -# -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_SPINLOCK is not set -CONFIG_DEBUG_INFO=y -CONFIG_FRAME_POINTER=y -CONFIG_PT_PROXY=y -# CONFIG_GPROF is not set -# CONFIG_GCOV is not set diff --git a/lustre/kernel_patches/kernel_configs/uml_2.6.0_test3.config b/lustre/kernel_patches/kernel_configs/uml_2.6.0_test3.config deleted file mode 100644 index f6c97b8d28..0000000000 --- a/lustre/kernel_patches/kernel_configs/uml_2.6.0_test3.config +++ /dev/null @@ -1,325 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_USERMODE=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# UML-specific options -# -CONFIG_MODE_TT=y -# CONFIG_MODE_SKAS is not set -CONFIG_NET=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_HOSTFS=y -# CONFIG_HPPFS is not set -CONFIG_MCONSOLE=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_HOST_2G_2G is not set -# CONFIG_UML_SMP is not set -# CONFIG_SMP is not set -CONFIG_NEST_LEVEL=0 -CONFIG_KERNEL_HALF_GIGS=1 -# CONFIG_HIGHMEM is not set -# CONFIG_PROC_MM is not set -CONFIG_KERNEL_STACK_ORDER=3 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# Generic Driver Options -# -# CONFIG_FW_LOADER is not set - -# -# Character Devices -# -CONFIG_STDIO_CONSOLE=y -CONFIG_SSL=y -CONFIG_FD_CHAN=y -# CONFIG_NULL_CHAN is not set -CONFIG_PORT_CHAN=y -CONFIG_PTY_CHAN=y -CONFIG_TTY_CHAN=y -CONFIG_XTERM_CHAN=y -CONFIG_CON_ZERO_CHAN="fd:0,fd:1" -CONFIG_CON_CHAN="xterm" -CONFIG_SSL_CHAN="pty" -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 -# CONFIG_WATCHDOG is not set -# CONFIG_UML_SOUND is not set -# CONFIG_SOUND is not set -# CONFIG_HOSTAUDIO is not set - -# -# Block Devices -# -CONFIG_BLK_DEV_UBD=y -# CONFIG_BLK_DEV_UBD_SYNC is not set -CONFIG_BLK_DEV_COW_COMMON=y -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_MMAPPER is not set -CONFIG_NETDEVICES=y - -# -# UML Network Devices -# -CONFIG_UML_NET=y -CONFIG_UML_NET_ETHERTAP=y -CONFIG_UML_NET_TUNTAP=y -CONFIG_UML_NET_SLIP=y -CONFIG_UML_NET_DAEMON=y -CONFIG_UML_NET_MCAST=y -# CONFIG_UML_NET_PCAP is not set -# CONFIG_UML_NET_SLIRP is not set - -# -# Networking support -# - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -# CONFIG_NETLINK_DEV is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_NETFILTER is not set -# CONFIG_XFRM_USER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IPV6_SCTP__=y -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_DUMMY=y -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=y -# CONFIG_ETHERTAP is not set - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# -CONFIG_PPP=y -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -# CONFIG_PPP_ASYNC is not set -# CONFIG_PPP_SYNC_TTY is not set -# CONFIG_PPP_DEFLATE is not set -# CONFIG_PPP_BSDCOMP is not set -# CONFIG_PPPOE is not set -CONFIG_SLIP=y -# CONFIG_SLIP_COMPRESSED is not set -# CONFIG_SLIP_SMART is not set -# CONFIG_SLIP_MODE_SLIP6 is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices (depends on LLC=y) -# -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_FAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_EXPORTFS is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -# CONFIG_CRC32 is not set - -# -# SCSI support -# -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Kernel hacking -# -CONFIG_DEBUG_SLAB=y -# CONFIG_DEBUG_SPINLOCK is not set -CONFIG_DEBUG_INFO=y -CONFIG_FRAME_POINTER=y -CONFIG_PT_PROXY=y -# CONFIG_GPROF is not set -# CONFIG_GCOV is not set diff --git a/lustre/kernel_patches/patches/2.6.5-quotafix.patch b/lustre/kernel_patches/patches/2.6.5-quotafix.patch deleted file mode 100644 index 46369fe5c7..0000000000 --- a/lustre/kernel_patches/patches/2.6.5-quotafix.patch +++ /dev/null @@ -1,2151 +0,0 @@ -Index: linux-2.6.5-7.283/include/linux/ext3_jbd.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/ext3_jbd.h -+++ linux-2.6.5-7.283/include/linux/ext3_jbd.h -@@ -72,6 +72,19 @@ extern int ext3_writepage_trans_blocks(s - - #define EXT3_INDEX_EXTRA_TRANS_BLOCKS 8 - -+#ifdef CONFIG_QUOTA -+/* Amount of blocks needed for quota update - we know that the structure was -+ * allocated so we need to update only inode+data */ -+#define EXT3_QUOTA_TRANS_BLOCKS 2 -+/* Amount of blocks needed for quota insert/delete - we do some block writes -+ * but inode, sb and group updates are done only once */ -+#define EXT3_QUOTA_INIT_BLOCKS (DQUOT_MAX_WRITES*\ -+ (EXT3_SINGLEDATA_TRANS_BLOCKS-3)+3) -+#else -+#define EXT3_QUOTA_TRANS_BLOCKS 0 -+#define EXT3_QUOTA_INIT_BLOCKS 0 -+#endif -+ - int - ext3_mark_iloc_dirty(handle_t *handle, - struct inode *inode, -@@ -97,6 +110,8 @@ int ext3_mark_inode_dirty(handle_t *hand - void ext3_journal_abort_handle(const char *caller, const char *err_fn, - struct buffer_head *bh, handle_t *handle, int err); - -+int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh); -+ - static inline int - __ext3_journal_get_undo_access(const char *where, handle_t *handle, - struct buffer_head *bh, int *credits) -Index: linux-2.6.5-7.283/include/linux/fs.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/fs.h -+++ linux-2.6.5-7.283/include/linux/fs.h -@@ -967,6 +967,9 @@ struct super_operations { - void (*umount_begin) (struct super_block *); - - int (*show_options)(struct seq_file *, struct vfsmount *); -+ -+ ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); -+ ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); - }; - - /* Inode state bits. Protected by inode_lock. */ -Index: linux-2.6.5-7.283/include/linux/quota.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/quota.h -+++ linux-2.6.5-7.283/include/linux/quota.h -@@ -138,6 +138,10 @@ struct if_dqinfo { - #include <linux/dqblk_v1.h> - #include <linux/dqblk_v2.h> - -+/* Maximal numbers of writes for quota operation (insert/delete/update) -+ * (over all formats) - info block, 4 pointer blocks, data block */ -+#define DQUOT_MAX_WRITES 6 -+ - /* - * Data for one user/group kept in memory - */ -@@ -168,22 +172,21 @@ struct mem_dqinfo { - } u; - }; - -+struct super_block; -+ - #define DQF_MASK 0xffff /* Mask for format specific flags */ - #define DQF_INFO_DIRTY_B 16 - #define DQF_ANY_DQUOT_DIRTY_B 17 - #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ - #define DQF_ANY_DQUOT_DIRTY (1 << DQF_ANY_DQUOT_DIRTY_B) /* Is any dquot dirty? */ - --extern inline void mark_info_dirty(struct mem_dqinfo *info) --{ -- set_bit(DQF_INFO_DIRTY_B, &info->dqi_flags); --} -- -+extern void mark_info_dirty(struct super_block *sb, int type); - #define info_dirty(info) test_bit(DQF_INFO_DIRTY_B, &(info)->dqi_flags) - #define info_any_dquot_dirty(info) test_bit(DQF_ANY_DQUOT_DIRTY_B, &(info)->dqi_flags) - #define info_any_dirty(info) (info_dirty(info) || info_any_dquot_dirty(info)) - - #define sb_dqopt(sb) (&(sb)->s_dquot) -+#define sb_dqinfo(sb, type) (sb_dqopt(sb)->info+(type)) - - struct dqstats { - int lookups; -@@ -204,6 +207,9 @@ extern struct dqstats dqstats; - #define DQ_BLKS_B 1 - #define DQ_INODES_B 2 - #define DQ_FAKE_B 3 -+#define DQ_READ_B 4 /* dquot was read into memory */ -+#define DQ_ACTIVE_B 5 /* dquot is active (dquot_release not called) */ -+#define DQ_WAITFREE_B 6 /* dquot being waited (by invalidate_dquots) */ - - #define DQ_MOD (1 << DQ_MOD_B) /* dquot modified since read */ - #define DQ_BLKS (1 << DQ_BLKS_B) /* uid/gid has been warned about blk limit */ -@@ -239,18 +245,22 @@ struct quota_format_ops { - int (*free_file_info)(struct super_block *sb, int type); /* Called on quotaoff() */ - int (*read_dqblk)(struct dquot *dquot); /* Read structure for one user */ - int (*commit_dqblk)(struct dquot *dquot); /* Write (or delete) structure for one user */ -+ int (*release_dqblk)(struct dquot *dquot); /* Called when last reference to dquot is being dropped */ - }; - - /* Operations working with dquots */ - struct dquot_operations { -- void (*initialize) (struct inode *, int); -- void (*drop) (struct inode *); -+ int (*initialize) (struct inode *, int); -+ int (*drop) (struct inode *); - int (*alloc_space) (struct inode *, qsize_t, int); - int (*alloc_inode) (const struct inode *, unsigned long); -- void (*free_space) (struct inode *, qsize_t); -- void (*free_inode) (const struct inode *, unsigned long); -+ int (*free_space) (struct inode *, qsize_t); -+ int (*free_inode) (const struct inode *, unsigned long); - int (*transfer) (struct inode *, struct iattr *); - int (*write_dquot) (struct dquot *); -+ int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */ -+ int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ -+ int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ - }; - - /* Operations handling requests from userspace */ -@@ -283,7 +293,8 @@ struct quota_info { - struct semaphore dqio_sem; /* lock device while I/O in progress */ - struct semaphore dqonoff_sem; /* Serialize quotaon & quotaoff */ - struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ -- struct file *files[MAXQUOTAS]; /* fp's to quotafiles */ -+ struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ -+ struct vfsmount *mnt[MAXQUOTAS]; /* mountpoint entries of filesystems with quota files */ - struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ - struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ - }; -Index: linux-2.6.5-7.283/include/linux/quotaops.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/quotaops.h -+++ linux-2.6.5-7.283/include/linux/quotaops.h -@@ -22,17 +22,22 @@ - */ - extern void sync_dquots(struct super_block *sb, int type); - --extern void dquot_initialize(struct inode *inode, int type); --extern void dquot_drop(struct inode *inode); -+extern int dquot_initialize(struct inode *inode, int type); -+extern int dquot_drop(struct inode *inode); - - extern int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); - extern int dquot_alloc_inode(const struct inode *inode, unsigned long number); - --extern void dquot_free_space(struct inode *inode, qsize_t number); --extern void dquot_free_inode(const struct inode *inode, unsigned long number); -+extern int dquot_free_space(struct inode *inode, qsize_t number); -+extern int dquot_free_inode(const struct inode *inode, unsigned long number); - - extern int dquot_transfer(struct inode *inode, struct iattr *iattr); - -+extern int dquot_commit(struct dquot *dquot); -+extern int dquot_commit_info(struct super_block *sb, int type); -+extern int dquot_acquire(struct dquot *dquot); -+extern int dquot_release(struct dquot *dquot); -+ - /* - * Operations supported for diskquotas. - */ -@@ -143,7 +148,7 @@ static __inline__ int DQUOT_OFF(struct s - { - int ret = -ENOSYS; - -- if (sb->s_qcop && sb->s_qcop->quota_off) -+ if (sb_any_quota_enabled(sb) && sb->s_qcop && sb->s_qcop->quota_off) - ret = sb->s_qcop->quota_off(sb, -1); - return ret; - } -Index: linux-2.6.5-7.283/include/linux/security.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/linux/security.h -+++ linux-2.6.5-7.283/include/linux/security.h -@@ -1020,7 +1020,7 @@ struct security_operations { - int (*sysctl) (ctl_table * table, int op); - int (*capable) (struct task_struct * tsk, int cap); - int (*quotactl) (int cmds, int type, int id, struct super_block * sb); -- int (*quota_on) (struct file * f); -+ int (*quota_on) (struct dentry * dentry); - int (*syslog) (int type); - int (*vm_enough_memory) (long pages); - -@@ -1292,9 +1292,9 @@ static inline int security_quotactl (int - 0); - } - --static inline int security_quota_on (struct file * file) -+static inline int security_quota_on (struct dentry * dentry) - { -- return COND_SECURITY(quota_on (file), -+ return COND_SECURITY(quota_on (dentry), - 0); - } - -Index: linux-2.6.5-7.283/security/dummy.c -=================================================================== ---- linux-2.6.5-7.283.orig/security/dummy.c -+++ linux-2.6.5-7.283/security/dummy.c -@@ -90,7 +90,7 @@ static int dummy_quotactl (int cmds, int - return 0; - } - --static int dummy_quota_on (struct file *f) -+static int dummy_quota_on (struct dentry *dentry) - { - return 0; - } -Index: linux-2.6.5-7.283/security/selinux/hooks.c -=================================================================== ---- linux-2.6.5-7.283.orig/security/selinux/hooks.c -+++ linux-2.6.5-7.283/security/selinux/hooks.c -@@ -1454,9 +1454,9 @@ static int selinux_quotactl(int cmds, in - return rc; - } - --static int selinux_quota_on(struct file *f) -+static int selinux_quota_on(struct dentry *dentry) - { -- return file_has_perm(current, f, FILE__QUOTAON); -+ return dentry_has_perm(current, NULL, dentry, FILE__QUOTAON); - } - - static int selinux_syslog(int type) -Index: linux-2.6.5-7.283/fs/dquot.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/dquot.c -+++ linux-2.6.5-7.283/fs/dquot.c -@@ -52,6 +52,9 @@ - * New SMP locking. - * Jan Kara, <jack@suse.cz>, 10/2002 - * -+ * Fix lock inversion problems -+ * Jan Kara, <jack@suse.cz>, 2003,2004 -+ * - * (C) Copyright 1994 - 1997 Marco van Wieringen - */ - -@@ -75,7 +78,8 @@ - #include <linux/proc_fs.h> - #include <linux/security.h> - #include <linux/kmod.h> --#include <linux/pagemap.h> -+#include <linux/namei.h> -+#include <linux/buffer_head.h> - - #include <asm/uaccess.h> - -@@ -109,7 +113,7 @@ - * dqget(). Write operations on dquots don't hold dq_lock as they copy data - * under dq_data_lock spinlock to internal buffers before writing. - * -- * Lock ordering (including journal_lock) is following: -+ * Lock ordering (including journal_lock) is the following: - * dqonoff_sem > journal_lock > dqptr_sem > dquot->dq_lock > dqio_sem - */ - spinlock_t dq_list_lock = SPIN_LOCK_UNLOCKED; -@@ -175,8 +179,7 @@ static void put_quota_format(struct quot - * on all three lists, depending on its current state. - * - * All dquots are placed to the end of inuse_list when first created, and this -- * list is used for the sync and invalidate operations, which must look -- * at every dquot. -+ * list is used for invalidate operation, which must look at every dquot. - * - * Unused dquots (dq_count == 0) are added to the free_dquots list when freed, - * and this list is searched whenever we need an available dquot. Dquots are -@@ -264,30 +267,105 @@ static void wait_on_dquot(struct dquot * - up(&dquot->dq_lock); - } - --static int read_dqblk(struct dquot *dquot) -+void mark_info_dirty(struct super_block *sb, int type) - { -- int ret; -+ set_bit(DQF_INFO_DIRTY_B, &sb_dqopt(sb)->info[type].dqi_flags); -+} -+EXPORT_SYMBOL(mark_info_dirty); -+ -+/* -+ * Read dquot from disk and alloc space for it -+ */ -+ -+int dquot_acquire(struct dquot *dquot) -+{ -+ int ret = 0, ret2 = 0; - struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); - - down(&dquot->dq_lock); - down(&dqopt->dqio_sem); -- ret = dqopt->ops[dquot->dq_type]->read_dqblk(dquot); -+ if (!test_bit(DQ_READ_B, &dquot->dq_flags)) -+ ret = dqopt->ops[dquot->dq_type]->read_dqblk(dquot); -+ if (ret < 0) -+ goto out_iolock; -+ set_bit(DQ_READ_B, &dquot->dq_flags); -+ /* Instantiate dquot if needed */ -+ if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && !dquot->dq_off) { -+ ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot); -+ /* Write the info if needed */ -+ if (info_dirty(&dqopt->info[dquot->dq_type])) -+ ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type); -+ if (ret < 0) -+ goto out_iolock; -+ if (ret2 < 0) { -+ ret = ret2; -+ goto out_iolock; -+ } -+ } -+ set_bit(DQ_ACTIVE_B, &dquot->dq_flags); -+out_iolock: - up(&dqopt->dqio_sem); - up(&dquot->dq_lock); - return ret; - } - --static int commit_dqblk(struct dquot *dquot) -+/* -+ * Write dquot to disk -+ */ -+int dquot_commit(struct dquot *dquot) - { -- int ret; -+ int ret = 0, ret2 = 0; - struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); - - down(&dqopt->dqio_sem); -- ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot); -+ spin_lock(&dq_list_lock); -+ if (!test_and_clear_bit(DQ_MOD_B, &dquot->dq_flags)) { -+ spin_unlock(&dq_list_lock); -+ goto out_sem; -+ } -+ spin_unlock(&dq_list_lock); -+ /* Inactive dquot can be only if there was error during read/init -+ * => we have better not writing it */ -+ if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) { -+ ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot); -+ if (info_dirty(&dqopt->info[dquot->dq_type])) -+ ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type); -+ if (ret >= 0) -+ ret = ret2; -+ } -+out_sem: - up(&dqopt->dqio_sem); - return ret; - } - -+/* -+ * Release dquot -+ */ -+int dquot_release(struct dquot *dquot) -+{ -+ int ret = 0, ret2 = 0; -+ struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); -+ -+ down(&dquot->dq_lock); -+ /* Check whether we are not racing with some other dqget() */ -+ if (atomic_read(&dquot->dq_count) > 1) -+ goto out_dqlock; -+ down(&dqopt->dqio_sem); -+ if (dqopt->ops[dquot->dq_type]->release_dqblk) { -+ ret = dqopt->ops[dquot->dq_type]->release_dqblk(dquot); -+ /* Write the info */ -+ if (info_dirty(&dqopt->info[dquot->dq_type])) -+ ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type); -+ if (ret >= 0) -+ ret = ret2; -+ } -+ clear_bit(DQ_ACTIVE_B, &dquot->dq_flags); -+ up(&dqopt->dqio_sem); -+out_dqlock: -+ up(&dquot->dq_lock); -+ return ret; -+} -+ - /* Invalidate all dquots on the list. Note that this function is called after - * quota is disabled so no new quota might be created. Because we hold - * dqonoff_sem and pointers were already removed from inodes we actually know -@@ -343,6 +421,11 @@ restart: - continue; - if (!dquot_dirty(dquot)) - continue; -+ /* Dirty and inactive can be only bad dquot... */ -+ if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) { -+ test_and_clear_bit(DQ_MOD_B, &dquot->dq_flags); -+ continue; -+ } - atomic_inc(&dquot->dq_count); - dqstats.lookups++; - spin_unlock(&dq_list_lock); -@@ -353,11 +436,9 @@ restart: - spin_unlock(&dq_list_lock); - - for (cnt = 0; cnt < MAXQUOTAS; cnt++) -- if ((cnt == type || type == -1) && sb_has_quota_enabled(sb, cnt) && info_dirty(&dqopt->info[cnt])) { -- down(&dqopt->dqio_sem); -- dqopt->ops[cnt]->write_file_info(sb, cnt); -- up(&dqopt->dqio_sem); -- } -+ if ((cnt == type || type == -1) && sb_has_quota_enabled(sb, cnt) -+ && info_dirty(&dqopt->info[cnt])) -+ sb->dq_op->write_info(sb, cnt); - spin_lock(&dq_list_lock); - dqstats.syncs++; - spin_unlock(&dq_list_lock); -@@ -432,11 +513,19 @@ we_slept: - spin_unlock(&dq_list_lock); - return; - } -- if (dquot_dirty(dquot)) { -+ if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && dquot_dirty(dquot)) { - spin_unlock(&dq_list_lock); - dquot->dq_sb->dq_op->write_dquot(dquot); - goto we_slept; - } -+ /* Clear flag in case dquot was inactive (something bad happened) */ -+ test_and_clear_bit(DQ_MOD_B, &dquot->dq_flags); -+ if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) { -+ spin_unlock(&dq_list_lock); -+ dquot->dq_sb->dq_op->release_dquot(dquot); -+ goto we_slept; -+ } -+ - atomic_dec(&dquot->dq_count); - #ifdef __DQUOT_PARANOIA - /* sanity check */ -@@ -495,7 +584,6 @@ we_slept: - insert_dquot_hash(dquot); - dqstats.lookups++; - spin_unlock(&dq_list_lock); -- read_dqblk(dquot); - } else { - if (!atomic_read(&dquot->dq_count)) - remove_free_dquot(dquot); -@@ -503,10 +591,15 @@ we_slept: - dqstats.cache_hits++; - dqstats.lookups++; - spin_unlock(&dq_list_lock); -- wait_on_dquot(dquot); - if (empty) - kmem_cache_free(dquot_cachep, empty); - } -+ wait_on_dquot(dquot); -+ /* Read the dquot and instantiate it (everything done only if needed) */ -+ if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && sb->dq_op->acquire_dquot(dquot) < 0) { -+ dqput(dquot); -+ return NODQUOT; -+ } - - #ifdef __DQUOT_PARANOIA - if (!dquot->dq_sb) /* Has somebody invalidated entry under us? */ -@@ -819,19 +912,19 @@ static int check_bdq(struct dquot *dquot - * - * Note: this is a blocking operation. - */ --void dquot_initialize(struct inode *inode, int type) -+int dquot_initialize(struct inode *inode, int type) - { - unsigned int id = 0; - int cnt; - - /* Solve deadlock when we recurse when holding dqptr_sem... */ - if (IS_NOQUOTA(inode)) -- return; -+ return 0; - down_write(&sb_dqopt(inode->i_sb)->dqptr_sem); - /* Having dqptr_sem we know NOQUOTA flags can't be altered... */ - if (IS_NOQUOTA(inode)) { - up_write(&sb_dqopt(inode->i_sb)->dqptr_sem); -- return; -+ return 0; - } - /* Build list of quotas to initialize... */ - for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -@@ -852,13 +945,14 @@ void dquot_initialize(struct inode *inod - } - } - up_write(&sb_dqopt(inode->i_sb)->dqptr_sem); -+ return 0; - } - - /* - * Release all quotas referenced by inode - * Needs dqonoff_sem to guard dqput() - */ --void dquot_drop(struct inode *inode) -+int dquot_drop(struct inode *inode) - { - int cnt; - -@@ -871,6 +965,7 @@ void dquot_drop(struct inode *inode) - } - } - up_write(&sb_dqopt(inode->i_sb)->dqptr_sem); -+ return 0; - } - - /* -@@ -958,14 +1053,14 @@ warn_put_all: - /* - * This is a non-blocking operation. - */ --void dquot_free_space(struct inode *inode, qsize_t number) -+int dquot_free_space(struct inode *inode, qsize_t number) - { - unsigned int cnt; - - /* Solve deadlock when we recurse when holding dqptr_sem... */ - if (IS_NOQUOTA(inode)) { - inode_add_bytes(inode, number); -- return; -+ return QUOTA_OK; - } - down_read(&sb_dqopt(inode->i_sb)->dqptr_sem); - spin_lock(&dq_data_lock); -@@ -981,23 +1076,24 @@ sub_bytes: - inode_sub_bytes(inode, number); - spin_unlock(&dq_data_lock); - up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); -+ return QUOTA_OK; - } - - /* - * This is a non-blocking operation. - */ --void dquot_free_inode(const struct inode *inode, unsigned long number) -+int dquot_free_inode(const struct inode *inode, unsigned long number) - { - unsigned int cnt; - - /* Solve deadlock when we recurse when holding dqptr_sem... */ - if (IS_NOQUOTA(inode)) -- return; -+ return QUOTA_OK; - down_read(&sb_dqopt(inode->i_sb)->dqptr_sem); - /* Now recheck reliably when holding dqptr_sem */ - if (IS_NOQUOTA(inode)) { - up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); -- return; -+ return QUOTA_OK; - } - spin_lock(&dq_data_lock); - for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -@@ -1007,6 +1103,7 @@ void dquot_free_inode(const struct inode - } - spin_unlock(&dq_data_lock); - up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); -+ return QUOTA_OK; - } - - /* -@@ -1104,6 +1201,20 @@ warn_put_all: - } - - /* -+ * Write info of quota file to disk -+ */ -+int dquot_commit_info(struct super_block *sb, int type) -+{ -+ int ret; -+ struct quota_info *dqopt = sb_dqopt(sb); -+ -+ down(&dqopt->dqio_sem); -+ ret = dqopt->ops[type]->write_file_info(sb, type); -+ up(&dqopt->dqio_sem); -+ return ret; -+} -+ -+/* - * Definitions of diskquota operations. - */ - struct dquot_operations dquot_operations = { -@@ -1114,7 +1225,10 @@ struct dquot_operations dquot_operations - .free_space = dquot_free_space, - .free_inode = dquot_free_inode, - .transfer = dquot_transfer, -- .write_dquot = commit_dqblk -+ .write_dquot = dquot_commit, -+ .acquire_dquot = dquot_acquire, -+ .release_dquot = dquot_release, -+ .write_info = dquot_commit_info - }; - - /* Function used by filesystems for initializing the dquot_operations structure */ -@@ -1154,13 +1268,14 @@ int vfs_quota_off(struct super_block *sb - { - int cnt; - struct quota_info *dqopt = sb_dqopt(sb); -- -- if (!sb) -- goto out; -+ struct inode *toputinode[MAXQUOTAS]; -+ struct vfsmount *toputmnt[MAXQUOTAS]; - - /* We need to serialize quota_off() for device */ - down(&dqopt->dqonoff_sem); - for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -+ toputinode[cnt] = NULL; -+ toputmnt[cnt] = NULL; - if (type != -1 && cnt != type) - continue; - if (!sb_has_quota_enabled(sb, cnt)) -@@ -1172,94 +1287,115 @@ int vfs_quota_off(struct super_block *sb - invalidate_dquots(sb, cnt); - /* - * Now all dquots should be invalidated, all writes done so we should be only -- * users of the info. No locks needed. -+ * users of the info. - */ -- if (info_dirty(&dqopt->info[cnt])) { -- down(&dqopt->dqio_sem); -- dqopt->ops[cnt]->write_file_info(sb, cnt); -- up(&dqopt->dqio_sem); -- } -+ if (info_dirty(&dqopt->info[cnt])) -+ sb->dq_op->write_info(sb, cnt); - if (dqopt->ops[cnt]->free_file_info) - dqopt->ops[cnt]->free_file_info(sb, cnt); - put_quota_format(dqopt->info[cnt].dqi_format); - -- fput(dqopt->files[cnt]); -- dqopt->files[cnt] = (struct file *)NULL; -+ toputinode[cnt] = dqopt->files[cnt]; -+ toputmnt[cnt] = dqopt->mnt[cnt]; -+ dqopt->files[cnt] = NULL; -+ dqopt->mnt[cnt] = NULL; - dqopt->info[cnt].dqi_flags = 0; - dqopt->info[cnt].dqi_igrace = 0; - dqopt->info[cnt].dqi_bgrace = 0; - dqopt->ops[cnt] = NULL; - } - up(&dqopt->dqonoff_sem); --out: -+ /* Sync the superblock so that buffers with quota data are written to -+ * disk (and so userspace sees correct data afterwards). -+ * The reference to vfsmnt we are still holding protects us from -+ * umount (we don't have it only when quotas are turned on/off for -+ * journal replay but in that case we are guarded by the fs anyway). */ -+ if (sb->s_op->sync_fs) -+ sb->s_op->sync_fs(sb, 1); -+ sync_blockdev(sb->s_bdev); -+ /* Now the quota files are just ordinary files and we can set the -+ * inode flags back. Moreover we discard the pagecache so that -+ * userspace sees the writes we did bypassing the pagecache. We -+ * must also discard the blockdev buffers so that we see the -+ * changes done by userspace on the next quotaon() */ -+ for (cnt = 0; cnt < MAXQUOTAS; cnt++) -+ if (toputinode[cnt]) { -+ down(&dqopt->dqonoff_sem); -+ /* If quota was reenabled in the meantime, we have -+ * nothing to do */ -+ if (!sb_has_quota_enabled(sb, cnt)) { -+ down(&toputinode[cnt]->i_sem); -+ toputinode[cnt]->i_flags &= ~(S_IMMUTABLE | -+ S_NOATIME | S_NOQUOTA); -+ truncate_inode_pages(&toputinode[cnt]->i_data, 0); -+ up(&toputinode[cnt]->i_sem); -+ mark_inode_dirty(toputinode[cnt]); -+ iput(toputinode[cnt]); -+ } -+ up(&dqopt->dqonoff_sem); -+ /* We don't hold the reference when we turned on quotas -+ * just for the journal replay... */ -+ if (toputmnt[cnt]) -+ mntput(toputmnt[cnt]); -+ } -+ invalidate_bdev(sb->s_bdev, 0); - return 0; - } - --int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path) -+/* -+ * Turn quotas on on a device -+ */ -+ -+/* Helper function when we already have the inode */ -+static int vfs_quota_on_inode(struct inode *inode, int type, int format_id) - { -- struct file *f; -- struct inode *inode; -- struct quota_info *dqopt = sb_dqopt(sb); - struct quota_format_type *fmt = find_quota_format(format_id); -- int error, cnt; -- struct dquot *to_drop[MAXQUOTAS]; -- unsigned int oldflags; -+ struct super_block *sb = inode->i_sb; -+ struct quota_info *dqopt = sb_dqopt(sb); -+ int error; -+ int oldflags = -1; - - if (!fmt) - return -ESRCH; -- f = filp_open(path, O_RDWR, 0600); -- if (IS_ERR(f)) { -- error = PTR_ERR(f); -+ if (!S_ISREG(inode->i_mode)) { -+ error = -EACCES; -+ goto out_fmt; -+ } -+ if (IS_RDONLY(inode)) { -+ error = -EROFS; -+ goto out_fmt; -+ } -+ if (!sb->s_op->quota_write || !sb->s_op->quota_read) { -+ error = -EINVAL; - goto out_fmt; - } -- error = -EIO; -- if (!f->f_op || !f->f_op->read || !f->f_op->write) -- goto out_f; -- error = security_quota_on(f); -- if (error) -- goto out_f; -- inode = f->f_dentry->d_inode; -- error = -EACCES; -- if (!S_ISREG(inode->i_mode)) -- goto out_f; - -+ /* As we bypass the pagecache we must now flush the inode so that -+ * we see all the changes from userspace... */ -+ write_inode_now(inode, 1); -+ /* And now flush the block cache so that kernel sees the changes */ -+ invalidate_bdev(sb->s_bdev, 0); -+ down(&inode->i_sem); - down(&dqopt->dqonoff_sem); - if (sb_has_quota_enabled(sb, type)) { - error = -EBUSY; - goto out_lock; - } -- oldflags = inode->i_flags; -- dqopt->files[type] = f; -- error = -EINVAL; -- if (!fmt->qf_ops->check_quota_file(sb, type)) -- goto out_file_init; - /* We don't want quota and atime on quota files (deadlocks possible) -- * We also need to set GFP mask differently because we cannot recurse -- * into filesystem when allocating page for quota inode */ -+ * Also nobody should write to the file - we use special IO operations -+ * which ignore the immutable bit. */ - down_write(&dqopt->dqptr_sem); -- inode->i_flags |= S_NOQUOTA | S_NOATIME; -- -- /* -- * We write to quota files deep within filesystem code. We don't want -- * the VFS to reenter filesystem code when it tries to allocate a -- * pagecache page for the quota file write. So clear __GFP_FS in -- * the quota file's allocation flags. -- */ -- mapping_set_gfp_mask(inode->i_mapping, -- mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS); -- -- for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -- to_drop[cnt] = inode->i_dquot[cnt]; -- inode->i_dquot[cnt] = NODQUOT; -- } -- inode->i_flags &= ~S_QUOTA; -+ oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | S_NOQUOTA); -+ inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE; - up_write(&dqopt->dqptr_sem); -- /* We must put dquots outside of dqptr_sem because we may need to -- * start transaction for write */ -- for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -- if (to_drop[cnt]) -- dqput(to_drop[cnt]); -- } -+ -+ error = -EIO; -+ dqopt->files[type] = igrab(inode); -+ if (!dqopt->files[type]) -+ goto out_lock; -+ error = -EINVAL; -+ if (!fmt->qf_ops->check_quota_file(sb, type)) -+ goto out_file_init; - - dqopt->ops[type] = fmt->qf_ops; - dqopt->info[type].dqi_format = fmt; -@@ -1269,6 +1405,7 @@ int vfs_quota_on(struct super_block *sb, - goto out_file_init; - } - up(&dqopt->dqio_sem); -+ up(&inode->i_sem); - set_enable_flags(dqopt, type); - - add_dquot_ref(sb, type); -@@ -1277,18 +1414,51 @@ int vfs_quota_on(struct super_block *sb, - return 0; - - out_file_init: -- inode->i_flags = oldflags; - dqopt->files[type] = NULL; -+ iput(inode); - out_lock: - up(&dqopt->dqonoff_sem); --out_f: -- filp_close(f, NULL); -+ if (oldflags != -1) { -+ down_write(&dqopt->dqptr_sem); -+ /* Set the flags back (in the case of accidental quotaon() -+ * on a wrong file we don't want to mess up the flags) */ -+ inode->i_flags &= ~(S_NOATIME | S_NOQUOTA | S_IMMUTABLE); -+ inode->i_flags |= oldflags; -+ up_write(&dqopt->dqptr_sem); -+ } -+ up(&inode->i_sem); - out_fmt: - put_quota_format(fmt); - - return error; - } - -+/* Actual function called from quotactl() */ -+int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path) -+{ -+ struct nameidata nd; -+ int error; -+ -+ error = path_lookup(path, LOOKUP_FOLLOW, &nd); -+ if (error < 0) -+ return error; -+ error = security_quota_on(nd.dentry); -+ if (error) -+ goto out_path; -+ /* Quota file not on the same filesystem? */ -+ if (nd.mnt->mnt_sb != sb) -+ error = -EXDEV; -+ else { -+ error = vfs_quota_on_inode(nd.dentry->d_inode, type, format_id); -+ if (!error) -+ sb_dqopt(sb)->mnt[type] = mntget(nd.mnt); -+ } -+ -+out_path: -+ path_release(&nd); -+ return error; -+} -+ - /* Generic routine for getting common part of quota structure */ - static void do_get_dqblk(struct dquot *dquot, struct if_dqblk *di) - { -@@ -1430,8 +1600,10 @@ int vfs_set_dqinfo(struct super_block *s - mi->dqi_igrace = ii->dqi_igrace; - if (ii->dqi_valid & IIF_FLAGS) - mi->dqi_flags = (mi->dqi_flags & ~DQF_MASK) | (ii->dqi_flags & DQF_MASK); -- mark_info_dirty(mi); - spin_unlock(&dq_data_lock); -+ mark_info_dirty(sb, type); -+ /* Force write to disk */ -+ sb->dq_op->write_info(sb, type); - up(&sb_dqopt(sb)->dqonoff_sem); - return 0; - } -@@ -1564,3 +1736,15 @@ EXPORT_SYMBOL(dqstats); - EXPORT_SYMBOL(dq_list_lock); - EXPORT_SYMBOL(dq_data_lock); - EXPORT_SYMBOL(init_dquot_operations); -+EXPORT_SYMBOL(dquot_commit); -+EXPORT_SYMBOL(dquot_commit_info); -+EXPORT_SYMBOL(dquot_acquire); -+EXPORT_SYMBOL(dquot_release); -+EXPORT_SYMBOL(dquot_initialize); -+EXPORT_SYMBOL(dquot_drop); -+EXPORT_SYMBOL(dquot_alloc_space); -+EXPORT_SYMBOL(dquot_alloc_inode); -+EXPORT_SYMBOL(dquot_free_space); -+EXPORT_SYMBOL(dquot_free_inode); -+EXPORT_SYMBOL(dquot_transfer); -+ -Index: linux-2.6.5-7.283/fs/quota_v2.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/quota_v2.c -+++ linux-2.6.5-7.283/fs/quota_v2.c -@@ -13,7 +13,6 @@ - #include <linux/slab.h> - - #include <asm/byteorder.h> --#include <asm/uaccess.h> - - MODULE_AUTHOR("Jan Kara"); - MODULE_DESCRIPTION("Quota format v2 support"); -@@ -30,19 +29,15 @@ typedef char *dqbuf_t; - static int v2_check_quota_file(struct super_block *sb, int type) - { - struct v2_disk_dqheader dqhead; -- struct file *f = sb_dqopt(sb)->files[type]; -- mm_segment_t fs; - ssize_t size; -- loff_t offset = 0; - static const uint quota_magics[] = V2_INITQMAGICS; - static const uint quota_versions[] = V2_INITQVERSIONS; - -- fs = get_fs(); -- set_fs(KERNEL_DS); -- size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset); -- set_fs(fs); -- if (size != sizeof(struct v2_disk_dqheader)) -+ size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0); -+ if (size != sizeof(struct v2_disk_dqheader)) { -+ printk("failed read\n"); - return 0; -+ } - if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || - le32_to_cpu(dqhead.dqh_version) != quota_versions[type]) - return 0; -@@ -52,20 +47,15 @@ static int v2_check_quota_file(struct su - /* Read information header from quota file */ - static int v2_read_file_info(struct super_block *sb, int type) - { -- mm_segment_t fs; - struct v2_disk_dqinfo dinfo; - struct mem_dqinfo *info = sb_dqopt(sb)->info+type; -- struct file *f = sb_dqopt(sb)->files[type]; - ssize_t size; -- loff_t offset = V2_DQINFOOFF; - -- fs = get_fs(); -- set_fs(KERNEL_DS); -- size = f->f_op->read(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset); -- set_fs(fs); -+ size = sb->s_op->quota_read(sb, type, (char *)&dinfo, -+ sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF); - if (size != sizeof(struct v2_disk_dqinfo)) { - printk(KERN_WARNING "Can't read info structure on device %s.\n", -- f->f_vfsmnt->mnt_sb->s_id); -+ sb->s_id); - return -1; - } - info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace); -@@ -80,12 +70,9 @@ static int v2_read_file_info(struct supe - /* Write information header to quota file */ - static int v2_write_file_info(struct super_block *sb, int type) - { -- mm_segment_t fs; - struct v2_disk_dqinfo dinfo; - struct mem_dqinfo *info = sb_dqopt(sb)->info+type; -- struct file *f = sb_dqopt(sb)->files[type]; - ssize_t size; -- loff_t offset = V2_DQINFOOFF; - - info->dqi_flags &= ~DQF_INFO_DIRTY; - dinfo.dqi_bgrace = cpu_to_le32(info->dqi_bgrace); -@@ -94,13 +81,13 @@ static int v2_write_file_info(struct sup - dinfo.dqi_blocks = cpu_to_le32(info->u.v2_i.dqi_blocks); - dinfo.dqi_free_blk = cpu_to_le32(info->u.v2_i.dqi_free_blk); - dinfo.dqi_free_entry = cpu_to_le32(info->u.v2_i.dqi_free_entry); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- size = f->f_op->write(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset); -- set_fs(fs); -+ -+ size = sb->s_op->quota_write(sb, type, (char *)&dinfo, -+ sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF); -+ - if (size != sizeof(struct v2_disk_dqinfo)) { - printk(KERN_WARNING "Can't write info structure on device %s.\n", -- f->f_vfsmnt->mnt_sb->s_id); -+ sb->s_id); - return -1; - } - return 0; -@@ -144,38 +131,24 @@ static inline void freedqbuf(dqbuf_t buf - kfree(buf); - } - --static ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf) -+static inline ssize_t read_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf) - { -- mm_segment_t fs; -- ssize_t ret; -- loff_t offset = blk<<V2_DQBLKSIZE_BITS; -- - memset(buf, 0, V2_DQBLKSIZE); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- ret = filp->f_op->read(filp, (char *)buf, V2_DQBLKSIZE, &offset); -- set_fs(fs); -- return ret; -+ return sb->s_op->quota_read(sb, type, (char *)buf, -+ V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS); - } - --static ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf) -+static inline ssize_t write_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf) - { -- mm_segment_t fs; -- ssize_t ret; -- loff_t offset = blk<<V2_DQBLKSIZE_BITS; -- -- fs = get_fs(); -- set_fs(KERNEL_DS); -- ret = filp->f_op->write(filp, (char *)buf, V2_DQBLKSIZE, &offset); -- set_fs(fs); -- return ret; -- -+ return sb->s_op->quota_write(sb, type, (char *)buf, -+ V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS); - } - - /* Remove empty block from list and return it */ --static int get_free_dqblk(struct file *filp, struct mem_dqinfo *info) -+static int get_free_dqblk(struct super_block *sb, int type) - { - dqbuf_t buf = getdqbuf(); -+ struct mem_dqinfo *info = sb_dqinfo(sb, type); - struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf; - int ret, blk; - -@@ -183,17 +156,18 @@ static int get_free_dqblk(struct file *f - return -ENOMEM; - if (info->u.v2_i.dqi_free_blk) { - blk = info->u.v2_i.dqi_free_blk; -- if ((ret = read_blk(filp, blk, buf)) < 0) -+ if ((ret = read_blk(sb, type, blk, buf)) < 0) - goto out_buf; - info->u.v2_i.dqi_free_blk = le32_to_cpu(dh->dqdh_next_free); - } - else { - memset(buf, 0, V2_DQBLKSIZE); -- if ((ret = write_blk(filp, info->u.v2_i.dqi_blocks, buf)) < 0) /* Assure block allocation... */ -+ /* Assure block allocation... */ -+ if ((ret = write_blk(sb, type, info->u.v2_i.dqi_blocks, buf)) < 0) - goto out_buf; - blk = info->u.v2_i.dqi_blocks++; - } -- mark_info_dirty(info); -+ mark_info_dirty(sb, type); - ret = blk; - out_buf: - freedqbuf(buf); -@@ -201,8 +175,9 @@ out_buf: - } - - /* Insert empty block to the list */ --static int put_free_dqblk(struct file *filp, struct mem_dqinfo *info, dqbuf_t buf, uint blk) -+static int put_free_dqblk(struct super_block *sb, int type, dqbuf_t buf, uint blk) - { -+ struct mem_dqinfo *info = sb_dqinfo(sb, type); - struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf; - int err; - -@@ -210,16 +185,18 @@ static int put_free_dqblk(struct file *f - dh->dqdh_prev_free = cpu_to_le32(0); - dh->dqdh_entries = cpu_to_le16(0); - info->u.v2_i.dqi_free_blk = blk; -- mark_info_dirty(info); -- if ((err = write_blk(filp, blk, buf)) < 0) /* Some strange block. We had better leave it... */ -+ mark_info_dirty(sb, type); -+ /* Some strange block. We had better leave it... */ -+ if ((err = write_blk(sb, type, blk, buf)) < 0) - return err; - return 0; - } - - /* Remove given block from the list of blocks with free entries */ --static int remove_free_dqentry(struct file *filp, struct mem_dqinfo *info, dqbuf_t buf, uint blk) -+static int remove_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk) - { - dqbuf_t tmpbuf = getdqbuf(); -+ struct mem_dqinfo *info = sb_dqinfo(sb, type); - struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf; - uint nextblk = le32_to_cpu(dh->dqdh_next_free), prevblk = le32_to_cpu(dh->dqdh_prev_free); - int err; -@@ -227,26 +204,27 @@ static int remove_free_dqentry(struct fi - if (!tmpbuf) - return -ENOMEM; - if (nextblk) { -- if ((err = read_blk(filp, nextblk, tmpbuf)) < 0) -+ if ((err = read_blk(sb, type, nextblk, tmpbuf)) < 0) - goto out_buf; - ((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = dh->dqdh_prev_free; -- if ((err = write_blk(filp, nextblk, tmpbuf)) < 0) -+ if ((err = write_blk(sb, type, nextblk, tmpbuf)) < 0) - goto out_buf; - } - if (prevblk) { -- if ((err = read_blk(filp, prevblk, tmpbuf)) < 0) -+ if ((err = read_blk(sb, type, prevblk, tmpbuf)) < 0) - goto out_buf; - ((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_next_free = dh->dqdh_next_free; -- if ((err = write_blk(filp, prevblk, tmpbuf)) < 0) -+ if ((err = write_blk(sb, type, prevblk, tmpbuf)) < 0) - goto out_buf; - } - else { - info->u.v2_i.dqi_free_entry = nextblk; -- mark_info_dirty(info); -+ mark_info_dirty(sb, type); - } - freedqbuf(tmpbuf); - dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0); -- if (write_blk(filp, blk, buf) < 0) /* No matter whether write succeeds block is out of list */ -+ /* No matter whether write succeeds block is out of list */ -+ if (write_blk(sb, type, blk, buf) < 0) - printk(KERN_ERR "VFS: Can't write block (%u) with free entries.\n", blk); - return 0; - out_buf: -@@ -255,9 +233,10 @@ out_buf: - } - - /* Insert given block to the beginning of list with free entries */ --static int insert_free_dqentry(struct file *filp, struct mem_dqinfo *info, dqbuf_t buf, uint blk) -+static int insert_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk) - { - dqbuf_t tmpbuf = getdqbuf(); -+ struct mem_dqinfo *info = sb_dqinfo(sb, type); - struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf; - int err; - -@@ -265,18 +244,18 @@ static int insert_free_dqentry(struct fi - return -ENOMEM; - dh->dqdh_next_free = cpu_to_le32(info->u.v2_i.dqi_free_entry); - dh->dqdh_prev_free = cpu_to_le32(0); -- if ((err = write_blk(filp, blk, buf)) < 0) -+ if ((err = write_blk(sb, type, blk, buf)) < 0) - goto out_buf; - if (info->u.v2_i.dqi_free_entry) { -- if ((err = read_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0) -+ if ((err = read_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0) - goto out_buf; - ((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = cpu_to_le32(blk); -- if ((err = write_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0) -+ if ((err = write_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0) - goto out_buf; - } - freedqbuf(tmpbuf); - info->u.v2_i.dqi_free_entry = blk; -- mark_info_dirty(info); -+ mark_info_dirty(sb, type); - return 0; - out_buf: - freedqbuf(tmpbuf); -@@ -286,8 +265,8 @@ out_buf: - /* Find space for dquot */ - static uint find_free_dqentry(struct dquot *dquot, int *err) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -- struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info+dquot->dq_type; -+ struct super_block *sb = dquot->dq_sb; -+ struct mem_dqinfo *info = sb_dqopt(sb)->info+dquot->dq_type; - uint blk, i; - struct v2_disk_dqdbheader *dh; - struct v2_disk_dqblk *ddquot; -@@ -303,22 +282,23 @@ static uint find_free_dqentry(struct dqu - ddquot = GETENTRIES(buf); - if (info->u.v2_i.dqi_free_entry) { - blk = info->u.v2_i.dqi_free_entry; -- if ((*err = read_blk(filp, blk, buf)) < 0) -+ if ((*err = read_blk(sb, dquot->dq_type, blk, buf)) < 0) - goto out_buf; - } - else { -- blk = get_free_dqblk(filp, info); -+ blk = get_free_dqblk(sb, dquot->dq_type); - if ((int)blk < 0) { - *err = blk; - freedqbuf(buf); - return 0; - } - memset(buf, 0, V2_DQBLKSIZE); -- info->u.v2_i.dqi_free_entry = blk; /* This is enough as block is already zeroed and entry list is empty... */ -- mark_info_dirty(info); -+ /* This is enough as block is already zeroed and entry list is empty... */ -+ info->u.v2_i.dqi_free_entry = blk; -+ mark_info_dirty(sb, dquot->dq_type); - } - if (le16_to_cpu(dh->dqdh_entries)+1 >= V2_DQSTRINBLK) /* Block will be full? */ -- if ((*err = remove_free_dqentry(filp, info, buf, blk)) < 0) { -+ if ((*err = remove_free_dqentry(sb, dquot->dq_type, buf, blk)) < 0) { - printk(KERN_ERR "VFS: find_free_dqentry(): Can't remove block (%u) from entry free list.\n", blk); - goto out_buf; - } -@@ -333,7 +313,7 @@ static uint find_free_dqentry(struct dqu - goto out_buf; - } - #endif -- if ((*err = write_blk(filp, blk, buf)) < 0) { -+ if ((*err = write_blk(sb, dquot->dq_type, blk, buf)) < 0) { - printk(KERN_ERR "VFS: find_free_dqentry(): Can't write quota data block %u.\n", blk); - goto out_buf; - } -@@ -348,8 +328,7 @@ out_buf: - /* Insert reference to structure into the trie */ - static int do_insert_tree(struct dquot *dquot, uint *treeblk, int depth) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -- struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info + dquot->dq_type; -+ struct super_block *sb = dquot->dq_sb; - dqbuf_t buf; - int ret = 0, newson = 0, newact = 0; - u32 *ref; -@@ -358,7 +337,7 @@ static int do_insert_tree(struct dquot * - if (!(buf = getdqbuf())) - return -ENOMEM; - if (!*treeblk) { -- ret = get_free_dqblk(filp, info); -+ ret = get_free_dqblk(sb, dquot->dq_type); - if (ret < 0) - goto out_buf; - *treeblk = ret; -@@ -366,7 +345,7 @@ static int do_insert_tree(struct dquot * - newact = 1; - } - else { -- if ((ret = read_blk(filp, *treeblk, buf)) < 0) { -+ if ((ret = read_blk(sb, dquot->dq_type, *treeblk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read tree quota block %u.\n", *treeblk); - goto out_buf; - } -@@ -389,10 +368,10 @@ static int do_insert_tree(struct dquot * - ret = do_insert_tree(dquot, &newblk, depth+1); - if (newson && ret >= 0) { - ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(newblk); -- ret = write_blk(filp, *treeblk, buf); -+ ret = write_blk(sb, dquot->dq_type, *treeblk, buf); - } - else if (newact && ret < 0) -- put_free_dqblk(filp, info, buf, *treeblk); -+ put_free_dqblk(sb, dquot->dq_type, buf, *treeblk); - out_buf: - freedqbuf(buf); - return ret; -@@ -411,19 +390,14 @@ static inline int dq_insert_tree(struct - static int v2_write_dquot(struct dquot *dquot) - { - int type = dquot->dq_type; -- struct file *filp; -- mm_segment_t fs; -- loff_t offset; - ssize_t ret; - struct v2_disk_dqblk ddquot, empty; - - if (!dquot->dq_off) - if ((ret = dq_insert_tree(dquot)) < 0) { -- printk(KERN_ERR "VFS: Error %Zd occurred while creating quota.\n", ret); -+ printk(KERN_ERR "VFS: Error %d occurred while creating quota.\n", ret); - return ret; - } -- filp = sb_dqopt(dquot->dq_sb)->files[type]; -- offset = dquot->dq_off; - mem2diskdqb(&ddquot, &dquot->dq_dqb, dquot->dq_id); - /* Argh... We may need to write structure full of zeroes but that would be - * treated as an empty place by the rest of the code. Format change would -@@ -431,10 +405,10 @@ static int v2_write_dquot(struct dquot * - memset(&empty, 0, sizeof(struct v2_disk_dqblk)); - if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk))) - ddquot.dqb_itime = cpu_to_le64(1); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- ret = filp->f_op->write(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset); -- set_fs(fs); -+ -+ ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type, -+ (char *)&ddquot, sizeof(struct v2_disk_dqblk), dquot->dq_off); -+ - if (ret != sizeof(struct v2_disk_dqblk)) { - printk(KERN_WARNING "VFS: dquota write failed on dev %s\n", dquot->dq_sb->s_id); - if (ret >= 0) -@@ -450,8 +424,8 @@ static int v2_write_dquot(struct dquot * - /* Free dquot entry in data block */ - static int free_dqentry(struct dquot *dquot, uint blk) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -- struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info + dquot->dq_type; -+ struct super_block *sb = dquot->dq_sb; -+ int type = dquot->dq_type; - struct v2_disk_dqdbheader *dh; - dqbuf_t buf = getdqbuf(); - int ret = 0; -@@ -459,34 +433,39 @@ static int free_dqentry(struct dquot *dq - if (!buf) - return -ENOMEM; - if (dquot->dq_off >> V2_DQBLKSIZE_BITS != blk) { -- printk(KERN_ERR "VFS: Quota structure has offset to other block (%u) than it should (%u).\n", blk, (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS)); -+ printk(KERN_ERR "VFS: Quota structure has offset to other " -+ "block (%u) than it should (%u).\n", blk, -+ (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS)); - goto out_buf; - } -- if ((ret = read_blk(filp, blk, buf)) < 0) { -+ if ((ret = read_blk(sb, type, blk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read quota data block %u\n", blk); - goto out_buf; - } - dh = (struct v2_disk_dqdbheader *)buf; - dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries)-1); - if (!le16_to_cpu(dh->dqdh_entries)) { /* Block got free? */ -- if ((ret = remove_free_dqentry(filp, info, buf, blk)) < 0 || -- (ret = put_free_dqblk(filp, info, buf, blk)) < 0) { -- printk(KERN_ERR "VFS: Can't move quota data block (%u) to free list.\n", blk); -+ if ((ret = remove_free_dqentry(sb, type, buf, blk)) < 0 || -+ (ret = put_free_dqblk(sb, type, buf, blk)) < 0) { -+ printk(KERN_ERR "VFS: Can't move quota data block (%u) " -+ "to free list.\n", blk); - goto out_buf; - } - } - else { -- memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0, sizeof(struct v2_disk_dqblk)); -+ memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0, -+ sizeof(struct v2_disk_dqblk)); - if (le16_to_cpu(dh->dqdh_entries) == V2_DQSTRINBLK-1) { - /* Insert will write block itself */ -- if ((ret = insert_free_dqentry(filp, info, buf, blk)) < 0) { -+ if ((ret = insert_free_dqentry(sb, type, buf, blk)) < 0) { - printk(KERN_ERR "VFS: Can't insert quota data block (%u) to free entry list.\n", blk); - goto out_buf; - } - } - else -- if ((ret = write_blk(filp, blk, buf)) < 0) { -- printk(KERN_ERR "VFS: Can't write quota data block %u\n", blk); -+ if ((ret = write_blk(sb, type, blk, buf)) < 0) { -+ printk(KERN_ERR "VFS: Can't write quota data " -+ "block %u\n", blk); - goto out_buf; - } - } -@@ -499,8 +478,8 @@ out_buf: - /* Remove reference to dquot from tree */ - static int remove_tree(struct dquot *dquot, uint *blk, int depth) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -- struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info + dquot->dq_type; -+ struct super_block *sb = dquot->dq_sb; -+ int type = dquot->dq_type; - dqbuf_t buf = getdqbuf(); - int ret = 0; - uint newblk; -@@ -508,7 +487,7 @@ static int remove_tree(struct dquot *dqu - - if (!buf) - return -ENOMEM; -- if ((ret = read_blk(filp, *blk, buf)) < 0) { -+ if ((ret = read_blk(sb, type, *blk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read quota data block %u\n", *blk); - goto out_buf; - } -@@ -524,12 +503,13 @@ static int remove_tree(struct dquot *dqu - ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(0); - for (i = 0; i < V2_DQBLKSIZE && !buf[i]; i++); /* Block got empty? */ - if (i == V2_DQBLKSIZE) { -- put_free_dqblk(filp, info, buf, *blk); -+ put_free_dqblk(sb, type, buf, *blk); - *blk = 0; - } - else -- if ((ret = write_blk(filp, *blk, buf)) < 0) -- printk(KERN_ERR "VFS: Can't write quota tree block %u.\n", *blk); -+ if ((ret = write_blk(sb, type, *blk, buf)) < 0) -+ printk(KERN_ERR "VFS: Can't write quota tree " -+ "block %u.\n", *blk); - } - out_buf: - freedqbuf(buf); -@@ -549,7 +529,6 @@ static int v2_delete_dquot(struct dquot - /* Find entry in block */ - static loff_t find_block_dqentry(struct dquot *dquot, uint blk) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; - dqbuf_t buf = getdqbuf(); - loff_t ret = 0; - int i; -@@ -557,27 +536,31 @@ static loff_t find_block_dqentry(struct - - if (!buf) - return -ENOMEM; -- if ((ret = read_blk(filp, blk, buf)) < 0) { -+ if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk); - goto out_buf; - } - if (dquot->dq_id) -- for (i = 0; i < V2_DQSTRINBLK && le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++); -+ for (i = 0; i < V2_DQSTRINBLK && -+ le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++); - else { /* ID 0 as a bit more complicated searching... */ - struct v2_disk_dqblk fakedquot; - - memset(&fakedquot, 0, sizeof(struct v2_disk_dqblk)); - for (i = 0; i < V2_DQSTRINBLK; i++) -- if (!le32_to_cpu(ddquot[i].dqb_id) && memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk))) -+ if (!le32_to_cpu(ddquot[i].dqb_id) && -+ memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk))) - break; - } - if (i == V2_DQSTRINBLK) { -- printk(KERN_ERR "VFS: Quota for id %u referenced but not present.\n", dquot->dq_id); -+ printk(KERN_ERR "VFS: Quota for id %u referenced " -+ "but not present.\n", dquot->dq_id); - ret = -EIO; - goto out_buf; - } - else -- ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk); -+ ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct -+ v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk); - out_buf: - freedqbuf(buf); - return ret; -@@ -586,14 +569,13 @@ out_buf: - /* Find entry for given id in the tree */ - static loff_t find_tree_dqentry(struct dquot *dquot, uint blk, int depth) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; - dqbuf_t buf = getdqbuf(); - loff_t ret = 0; - u32 *ref = (u32 *)buf; - - if (!buf) - return -ENOMEM; -- if ((ret = read_blk(filp, blk, buf)) < 0) { -+ if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk); - goto out_buf; - } -@@ -619,16 +601,13 @@ static inline loff_t find_dqentry(struct - static int v2_read_dquot(struct dquot *dquot) - { - int type = dquot->dq_type; -- struct file *filp; -- mm_segment_t fs; - loff_t offset; - struct v2_disk_dqblk ddquot, empty; - int ret = 0; - -- filp = sb_dqopt(dquot->dq_sb)->files[type]; -- - #ifdef __QUOTA_V2_PARANOIA -- if (!filp || !dquot->dq_sb) { /* Invalidated quota? */ -+ /* Invalidated quota? */ -+ if (!dquot->dq_sb || !dquot->dq_sb->s_op->quota_read) { - printk(KERN_ERR "VFS: Quota invalidated while reading!\n"); - return -EIO; - } -@@ -636,7 +615,8 @@ static int v2_read_dquot(struct dquot *d - offset = find_dqentry(dquot); - if (offset <= 0) { /* Entry not present? */ - if (offset < 0) -- printk(KERN_ERR "VFS: Can't read quota structure for id %u.\n", dquot->dq_id); -+ printk(KERN_ERR "VFS: Can't read quota " -+ "structure for id %u.\n", dquot->dq_id); - dquot->dq_off = 0; - dquot->dq_flags |= DQ_FAKE; - memset(&dquot->dq_dqb, 0, sizeof(struct mem_dqblk)); -@@ -644,12 +624,13 @@ static int v2_read_dquot(struct dquot *d - } - else { - dquot->dq_off = offset; -- fs = get_fs(); -- set_fs(KERNEL_DS); -- if ((ret = filp->f_op->read(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset)) != sizeof(struct v2_disk_dqblk)) { -+ if ((ret = dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, -+ (char *)&ddquot, sizeof(struct v2_disk_dqblk), offset)) -+ != sizeof(struct v2_disk_dqblk)) { - if (ret >= 0) - ret = -EIO; -- printk(KERN_ERR "VFS: Error while reading quota structure for id %u.\n", dquot->dq_id); -+ printk(KERN_ERR "VFS: Error while reading quota " -+ "structure for id %u.\n", dquot->dq_id); - memset(&ddquot, 0, sizeof(struct v2_disk_dqblk)); - } - else { -@@ -660,7 +641,6 @@ static int v2_read_dquot(struct dquot *d - if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk))) - ddquot.dqb_itime = 0; - } -- set_fs(fs); - disk2memdqb(&dquot->dq_dqb, &ddquot); - } - dqstats.reads++; -@@ -668,15 +648,13 @@ static int v2_read_dquot(struct dquot *d - return ret; - } - --/* Commit changes of dquot to disk - it might also mean deleting it when quota became fake one and user has no blocks... */ --static int v2_commit_dquot(struct dquot *dquot) -+/* Check whether dquot should not be deleted. We know we are -+ * * the only one operating on dquot (thanks to dq_lock) */ -+static int v2_release_dquot(struct dquot *dquot) - { -- /* We clear the flag everytime so we don't loop when there was an IO error... */ -- dquot->dq_flags &= ~DQ_MOD; -- if (dquot->dq_flags & DQ_FAKE && !(dquot->dq_dqb.dqb_curinodes | dquot->dq_dqb.dqb_curspace)) -+ if (test_bit(DQ_FAKE_B, &dquot->dq_flags) && !(dquot->dq_dqb.dqb_curinodes | dquot->dq_dqb.dqb_curspace)) - return v2_delete_dquot(dquot); -- else -- return v2_write_dquot(dquot); -+ return 0; - } - - static struct quota_format_ops v2_format_ops = { -@@ -685,7 +663,8 @@ static struct quota_format_ops v2_format - .write_file_info = v2_write_file_info, - .free_file_info = NULL, - .read_dqblk = v2_read_dquot, -- .commit_dqblk = v2_commit_dquot, -+ .commit_dqblk = v2_write_dquot, -+ .release_dqblk = v2_release_dquot, - }; - - static struct quota_format_type v2_quota_format = { -Index: linux-2.6.5-7.283/fs/quota.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/quota.c -+++ linux-2.6.5-7.283/fs/quota.c -@@ -14,6 +14,9 @@ - #include <linux/smp_lock.h> - #include <linux/security.h> - #include <linux/audit.h> -+#include <linux/syscalls.h> -+#include <linux/buffer_head.h> -+ - - /* Check validity of quotactl */ - static int check_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t id) -@@ -134,16 +137,54 @@ restart: - return NULL; - } - -+void quota_sync_sb(struct super_block *sb, int type) -+{ -+ int cnt; -+ struct inode *discard[MAXQUOTAS]; -+ -+ sb->s_qcop->quota_sync(sb, type); -+ /* This is not very clever (and fast) but currently I don't know about -+ * any other simple way of getting quota data to disk and we must get -+ * them there for userspace to be visible... */ -+ if (sb->s_op->sync_fs) -+ sb->s_op->sync_fs(sb, 1); -+ sync_blockdev(sb->s_bdev); -+ -+ /* Now when everything is written we can discard the pagecache so -+ * that userspace sees the changes. We need i_sem and so we could -+ * not do it inside dqonoff_sem. Moreover we need to be carefull -+ * about races with quotaoff() (that is the reason why we have own -+ * reference to inode). */ -+ down(&sb_dqopt(sb)->dqonoff_sem); -+ for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -+ discard[cnt] = NULL; -+ if (type != -1 && cnt != type) -+ continue; -+ if (!sb_has_quota_enabled(sb, cnt)) -+ continue; -+ discard[cnt] = igrab(sb_dqopt(sb)->files[cnt]); -+ } -+ up(&sb_dqopt(sb)->dqonoff_sem); -+ for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -+ if (discard[cnt]) { -+ down(&discard[cnt]->i_sem); -+ truncate_inode_pages(&discard[cnt]->i_data, 0); -+ up(&discard[cnt]->i_sem); -+ iput(discard[cnt]); -+ } -+ } -+} -+ - void sync_dquots(struct super_block *sb, int type) - { - if (sb) { - if (sb->s_qcop->quota_sync) -- sb->s_qcop->quota_sync(sb, type); -+ quota_sync_sb(sb, type); - } - else { -- while ((sb = get_super_to_sync(type))) { -+ while ((sb = get_super_to_sync(type)) != NULL) { - if (sb->s_qcop->quota_sync) -- sb->s_qcop->quota_sync(sb, type); -+ quota_sync_sb(sb, type); - drop_super(sb); - } - } -Index: linux-2.6.5-7.283/fs/ext3/inode.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/ext3/inode.c -+++ linux-2.6.5-7.283/fs/ext3/inode.c -@@ -1015,7 +1015,7 @@ out: - return ret; - } - --static int -+int - ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh) - { - int err = journal_dirty_data(handle, bh); -Index: linux-2.6.5-7.283/fs/ext3/super.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/ext3/super.c -+++ linux-2.6.5-7.283/fs/ext3/super.c -@@ -33,6 +33,7 @@ - #include <linux/vfs.h> - #include <linux/random.h> - #include <asm/uaccess.h> -+#include <linux/quotaops.h> - #include "xattr.h" - #include "acl.h" - -@@ -505,7 +506,33 @@ static void ext3_clear_inode(struct inod - ext3_discard_reservation(inode); - } - --static struct dquot_operations ext3_qops; -+#ifdef CONFIG_QUOTA -+ -+static int ext3_dquot_initialize(struct inode *inode, int type); -+static int ext3_dquot_drop(struct inode *inode); -+static int ext3_write_dquot(struct dquot *dquot); -+static int ext3_acquire_dquot(struct dquot *dquot); -+static int ext3_release_dquot(struct dquot *dquot); -+static int ext3_write_info(struct super_block *sb, int type); -+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data, -+ size_t len, loff_t off); -+static ssize_t ext3_quota_write(struct super_block *sb, int type, -+ const char *data, size_t len, loff_t off); -+ -+static struct dquot_operations ext3_quota_operations = { -+ .initialize = ext3_dquot_initialize, -+ .drop = ext3_dquot_drop, -+ .alloc_space = dquot_alloc_space, -+ .alloc_inode = dquot_alloc_inode, -+ .free_space = dquot_free_space, -+ .free_inode = dquot_free_inode, -+ .transfer = dquot_transfer, -+ .write_dquot = ext3_write_dquot, -+ .acquire_dquot = ext3_acquire_dquot, -+ .release_dquot = ext3_release_dquot, -+ .write_info = ext3_write_info -+}; -+#endif - - static struct super_operations ext3_sops = { - .alloc_inode = ext3_alloc_inode, -@@ -522,6 +549,10 @@ static struct super_operations ext3_sops - .statfs = ext3_statfs, - .remount_fs = ext3_remount, - .clear_inode = ext3_clear_inode, -+#ifdef CONFIG_QUOTA -+ .quota_read = ext3_quota_read, -+ .quota_write = ext3_quota_write, -+#endif - }; - - static struct dentry *ext3_get_dentry(struct super_block *sb, void *vobjp) -@@ -1377,7 +1408,9 @@ static int ext3_fill_super (struct super - */ - sb->s_op = &ext3_sops; - sb->s_export_op = &ext3_export_ops; -- sb->dq_op = &ext3_qops; -+#ifdef CONFIG_QUOTA -+ sb->dq_op = &ext3_quota_operations; -+#endif - INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */ - - sb->s_root = 0; -@@ -2040,70 +2073,200 @@ int ext3_statfs (struct super_block * sb - - #ifdef CONFIG_QUOTA - --/* Blocks: (2 data blocks) * (3 indirect + 1 descriptor + 1 bitmap) + superblock */ --#define EXT3_OLD_QFMT_BLOCKS 11 --/* Blocks: quota info + (4 pointer blocks + 1 entry block) * (3 indirect + 1 descriptor + 1 bitmap) + superblock */ --#define EXT3_V0_QFMT_BLOCKS 27 -- --static int (*old_write_dquot)(struct dquot *dquot); --static void (*old_drop_dquot)(struct inode *inode); -- --static int fmt_to_blocks(int fmt) --{ -- switch (fmt) { -- case QFMT_VFS_OLD: -- return EXT3_OLD_QFMT_BLOCKS; -- case QFMT_VFS_V0: -- return EXT3_V0_QFMT_BLOCKS; -- } -- return EXT3_MAX_TRANS_DATA; -+static inline struct inode *dquot_to_inode(struct dquot *dquot) -+{ -+ return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -+} -+ -+static int ext3_dquot_initialize(struct inode *inode, int type) -+{ -+ handle_t *handle; -+ int ret, err; -+ -+ /* We may create quota structure so we need to reserve enough blocks */ -+ handle = ext3_journal_start(inode, 2*EXT3_QUOTA_INIT_BLOCKS); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ ret = dquot_initialize(inode, type); -+ err = ext3_journal_stop(handle); -+ if (!ret) -+ ret = err; -+ return ret; -+} -+ -+static int ext3_dquot_drop(struct inode *inode) -+{ -+ handle_t *handle; -+ int ret, err; -+ -+ /* We may delete quota structure so we need to reserve enough blocks */ -+ handle = ext3_journal_start(inode, 2*EXT3_QUOTA_INIT_BLOCKS); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ ret = dquot_drop(inode); -+ err = ext3_journal_stop(handle); -+ if (!ret) -+ ret = err; -+ return ret; - } - - static int ext3_write_dquot(struct dquot *dquot) - { -- int nblocks; -- int ret; -- int err; -+ int ret, err; - handle_t *handle; -- struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); -- struct inode *qinode; -+ struct inode *inode; - -- nblocks = fmt_to_blocks(dqopt->info[dquot->dq_type].dqi_format->qf_fmt_id); -- qinode = dqopt->files[dquot->dq_type]->f_dentry->d_inode; -- handle = ext3_journal_start(qinode, nblocks); -- if (IS_ERR(handle)) { -- ret = PTR_ERR(handle); -- goto out; -- } -- ret = old_write_dquot(dquot); -+ inode = dquot_to_inode(dquot); -+ handle = ext3_journal_start(inode, -+ EXT3_QUOTA_TRANS_BLOCKS); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ ret = dquot_commit(dquot); - err = ext3_journal_stop(handle); -- if (ret == 0) -+ if (!ret) - ret = err; --out: - return ret; - } - --static void ext3_drop_dquot(struct inode *inode) -+static int ext3_acquire_dquot(struct dquot *dquot) - { -- int nblocks, type; -- struct quota_info *dqopt = sb_dqopt(inode->i_sb); -+ int ret, err; - handle_t *handle; - -- for (type = 0; type < MAXQUOTAS; type++) { -- if (sb_has_quota_enabled(inode->i_sb, type)) -- break; -- } -- if (type < MAXQUOTAS) -- nblocks = fmt_to_blocks(dqopt->info[type].dqi_format->qf_fmt_id); -- else -- nblocks = 0; /* No quota => no drop */ -- handle = ext3_journal_start(inode, 2*nblocks); -+ handle = ext3_journal_start(dquot_to_inode(dquot), -+ EXT3_QUOTA_INIT_BLOCKS); - if (IS_ERR(handle)) -- return; -- old_drop_dquot(inode); -- ext3_journal_stop(handle); -- return; -+ return PTR_ERR(handle); -+ ret = dquot_acquire(dquot); -+ err = ext3_journal_stop(handle); -+ if (!ret) -+ ret = err; -+ return ret; - } -+ -+static int ext3_release_dquot(struct dquot *dquot) -+{ -+ int ret, err; -+ handle_t *handle; -+ -+ handle = ext3_journal_start(dquot_to_inode(dquot), -+ EXT3_QUOTA_INIT_BLOCKS); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ ret = dquot_release(dquot); -+ err = ext3_journal_stop(handle); -+ if (!ret) -+ ret = err; -+ return ret; -+} -+ -+static int ext3_write_info(struct super_block *sb, int type) -+{ -+ int ret, err; -+ handle_t *handle; -+ -+ /* Data block + inode block */ -+ handle = ext3_journal_start(sb->s_root->d_inode, 2); -+ if (IS_ERR(handle)) -+ return PTR_ERR(handle); -+ ret = dquot_commit_info(sb, type); -+ err = ext3_journal_stop(handle); -+ if (!ret) -+ ret = err; -+ return ret; -+} -+ -+/* Read data from quotafile - avoid pagecache and such because we cannot afford -+ * acquiring the locks... As quota files are never truncated and quota code -+ * itself serializes the operations (and noone else should touch the files) -+ * we don't have to be afraid of races */ -+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data, -+ size_t len, loff_t off) -+{ -+ struct inode *inode = sb_dqopt(sb)->files[type]; -+ sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb); -+ int err = 0; -+ int offset = off & (sb->s_blocksize - 1); -+ int tocopy; -+ size_t toread; -+ struct buffer_head *bh; -+ loff_t i_size = i_size_read(inode); -+ -+ if (off > i_size) -+ return 0; -+ if (off+len > i_size) -+ len = i_size-off; -+ toread = len; -+ while (toread > 0) { -+ tocopy = sb->s_blocksize - offset < toread ? -+ sb->s_blocksize - offset : toread; -+ bh = ext3_bread(NULL, inode, blk, 0, &err); -+ if (err) -+ return err; -+ if (!bh) /* A hole? */ -+ memset(data, 0, tocopy); -+ else -+ memcpy(data, bh->b_data+offset, tocopy); -+ brelse(bh); -+ offset = 0; -+ toread -= tocopy; -+ data += tocopy; -+ blk++; -+ } -+ return len; -+} -+ -+/* Write to quotafile (we know the transaction is already started and has -+ * enough credits) */ -+static ssize_t ext3_quota_write(struct super_block *sb, int type, -+ const char *data, size_t len, loff_t off) -+{ -+ struct inode *inode = sb_dqopt(sb)->files[type]; -+ sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb); -+ int err = 0; -+ int offset = off & (sb->s_blocksize - 1); -+ int tocopy; -+ size_t towrite = len; -+ struct buffer_head *bh; -+ handle_t *handle = journal_current_handle(); -+ -+ down(&inode->i_sem); -+ while (towrite > 0) { -+ tocopy = sb->s_blocksize - offset < towrite ? -+ sb->s_blocksize - offset : towrite; -+ bh = ext3_bread(handle, inode, blk, 1, &err); -+ if (!bh) -+ goto out; -+ -+ lock_buffer(bh); -+ memcpy(bh->b_data+offset, data, tocopy); -+ flush_dcache_page(bh->b_page); -+ unlock_buffer(bh); -+ /* Always do at least ordered writes for quotas */ -+ err = ext3_journal_dirty_data(handle, bh); -+ mark_buffer_dirty(bh); -+ brelse(bh); -+ if (err) -+ goto out; -+ offset = 0; -+ towrite -= tocopy; -+ data += tocopy; -+ blk++; -+ } -+out: -+ if (len == towrite) -+ return err; -+ if (inode->i_size < off+len-towrite) { -+ i_size_write(inode, off+len-towrite); -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ } -+ inode->i_version++; -+ inode->i_mtime = inode->i_ctime = CURRENT_TIME; -+ ext3_mark_inode_dirty(handle, inode); -+ up(&inode->i_sem); -+ return len - towrite; -+} -+ - #endif - - static struct super_block *ext3_get_sb(struct file_system_type *fs_type, -@@ -2128,13 +2291,7 @@ static int __init init_ext3_fs(void) - err = init_inodecache(); - if (err) - goto out1; --#ifdef CONFIG_QUOTA -- init_dquot_operations(&ext3_qops); -- old_write_dquot = ext3_qops.write_dquot; -- old_drop_dquot = ext3_qops.drop; -- ext3_qops.write_dquot = ext3_write_dquot; -- ext3_qops.drop = ext3_drop_dquot; --#endif -+ - err = register_filesystem_lifo(&ext3_fs_type); - if (err) - goto out; -Index: linux-2.6.5-7.283/fs/quota_v1.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/quota_v1.c -+++ linux-2.6.5-7.283/fs/quota_v1.c -@@ -7,7 +7,6 @@ - #include <linux/init.h> - #include <linux/module.h> - --#include <asm/uaccess.h> - #include <asm/byteorder.h> - - MODULE_AUTHOR("Jan Kara"); -@@ -41,23 +40,14 @@ static void v1_mem2disk_dqblk(struct v1_ - static int v1_read_dqblk(struct dquot *dquot) - { - int type = dquot->dq_type; -- struct file *filp; -- mm_segment_t fs; -- loff_t offset; - struct v1_disk_dqblk dqblk; - -- filp = sb_dqopt(dquot->dq_sb)->files[type]; -- if (filp == (struct file *)NULL) -+ if (!sb_dqopt(dquot->dq_sb)->files[type]) - return -EINVAL; - -- /* Now we are sure filp is valid */ -- offset = v1_dqoff(dquot->dq_id); - /* Set structure to 0s in case read fails/is after end of file */ - memset(&dqblk, 0, sizeof(struct v1_disk_dqblk)); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset); -- set_fs(fs); -+ dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id)); - - v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk); - if (dquot->dq_dqb.dqb_bhardlimit == 0 && dquot->dq_dqb.dqb_bsoftlimit == 0 && -@@ -71,17 +61,9 @@ static int v1_read_dqblk(struct dquot *d - static int v1_commit_dqblk(struct dquot *dquot) - { - short type = dquot->dq_type; -- struct file *filp; -- mm_segment_t fs; -- loff_t offset; - ssize_t ret; - struct v1_disk_dqblk dqblk; - -- filp = sb_dqopt(dquot->dq_sb)->files[type]; -- offset = v1_dqoff(dquot->dq_id); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- - /* - * Note: clear the DQ_MOD flag unconditionally, - * so we don't loop forever on failure. -@@ -93,9 +75,10 @@ static int v1_commit_dqblk(struct dquot - dqblk.dqb_itime = sb_dqopt(dquot->dq_sb)->info[type].dqi_igrace; - } - ret = 0; -- if (filp) -- ret = filp->f_op->write(filp, (char *)&dqblk, -- sizeof(struct v1_disk_dqblk), &offset); -+ if (sb_dqopt(dquot->dq_sb)->files[type]) -+ ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type, (char *)&dqblk, -+ sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id)); -+ - if (ret != sizeof(struct v1_disk_dqblk)) { - printk(KERN_WARNING "VFS: dquota write failed on dev %s\n", - dquot->dq_sb->s_id); -@@ -106,7 +89,6 @@ static int v1_commit_dqblk(struct dquot - ret = 0; - - out: -- set_fs(fs); - dqstats.writes++; - - return ret; -@@ -126,14 +108,11 @@ struct v2_disk_dqheader { - - static int v1_check_quota_file(struct super_block *sb, int type) - { -- struct file *f = sb_dqopt(sb)->files[type]; -- struct inode *inode = f->f_dentry->d_inode; -+ struct inode *inode = sb_dqopt(sb)->files[type]; - ulong blocks; - size_t off; - struct v2_disk_dqheader dqhead; -- mm_segment_t fs; - ssize_t size; -- loff_t offset = 0; - loff_t isize; - static const uint quota_magics[] = V2_INITQMAGICS; - -@@ -145,10 +124,7 @@ static int v1_check_quota_file(struct su - if ((blocks % sizeof(struct v1_disk_dqblk) * BLOCK_SIZE + off) % sizeof(struct v1_disk_dqblk)) - return 0; - /* Doublecheck whether we didn't get file with new format - with old quotactl() this could happen */ -- fs = get_fs(); -- set_fs(KERNEL_DS); -- size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset); -- set_fs(fs); -+ size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0); - if (size != sizeof(struct v2_disk_dqheader)) - return 1; /* Probably not new format */ - if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type]) -@@ -160,16 +136,10 @@ static int v1_check_quota_file(struct su - static int v1_read_file_info(struct super_block *sb, int type) - { - struct quota_info *dqopt = sb_dqopt(sb); -- mm_segment_t fs; -- loff_t offset; -- struct file *filp = dqopt->files[type]; - struct v1_disk_dqblk dqblk; - int ret; - -- offset = v1_dqoff(0); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) { -+ if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) { - if (ret >= 0) - ret = -EIO; - goto out; -@@ -178,38 +148,31 @@ static int v1_read_file_info(struct supe - dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME; - dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME; - out: -- set_fs(fs); - return ret; - } - - static int v1_write_file_info(struct super_block *sb, int type) - { - struct quota_info *dqopt = sb_dqopt(sb); -- mm_segment_t fs; -- struct file *filp = dqopt->files[type]; - struct v1_disk_dqblk dqblk; -- loff_t offset; - int ret; - - dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY; -- offset = v1_dqoff(0); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) { -+ if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk, -+ sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) { - if (ret >= 0) - ret = -EIO; - goto out; - } - dqblk.dqb_itime = dqopt->info[type].dqi_igrace; - dqblk.dqb_btime = dqopt->info[type].dqi_bgrace; -- offset = v1_dqoff(0); -- ret = filp->f_op->write(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset); -+ ret = sb->s_op->quota_write(sb, type, (char *)&dqblk, -+ sizeof(struct v1_disk_dqblk), v1_dqoff(0)); - if (ret == sizeof(struct v1_disk_dqblk)) - ret = 0; - else if (ret > 0) - ret = -EIO; - out: -- set_fs(fs); - return ret; - } - -Index: linux-2.6.5-7.283/fs/reiserfs/super.c -=================================================================== ---- linux-2.6.5-7.283.orig/fs/reiserfs/super.c -+++ linux-2.6.5-7.283/fs/reiserfs/super.c -@@ -1677,7 +1677,7 @@ inversion between quota and journal lock - #define REISERFS_V0_QFMT_BLOCKS (4*(JOURNAL_PER_BALANCE_CNT+2)+2+1) - - static int (*old_write_dquot)(struct dquot *dquot); --static void (*old_drop_dquot)(struct inode *inode); -+static int (*old_drop_dquot)(struct inode *inode); - - static int fmt_to_blocks(int fmt) - { -@@ -1697,10 +1697,8 @@ static int reiserfs_write_dquot(struct d - int err; - struct reiserfs_transaction_handle handle; - struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); -- struct inode *qinode; - - nblocks = fmt_to_blocks(dqopt->info[dquot->dq_type].dqi_format->qf_fmt_id); -- qinode = dqopt->files[dquot->dq_type]->f_dentry->d_inode; - reiserfs_write_lock(dquot->dq_sb); - ret = journal_begin(&handle, dquot->dq_sb, nblocks); - if (ret) -@@ -1713,11 +1711,12 @@ static int reiserfs_write_dquot(struct d - return ret; - } - --static void reiserfs_drop_dquot(struct inode *inode) -+static int reiserfs_drop_dquot(struct inode *inode) - { - int nblocks, type; - struct quota_info *dqopt = sb_dqopt(inode->i_sb); - struct reiserfs_transaction_handle handle; -+ int err, ret; - - for (type = 0; type < MAXQUOTAS; type++) { - if (sb_has_quota_enabled(inode->i_sb, type)) -@@ -1728,12 +1727,15 @@ static void reiserfs_drop_dquot(struct i - else - nblocks = 0; /* No quota => no drop */ - reiserfs_write_lock(inode->i_sb); -- if (journal_begin(&handle, inode->i_sb, 2*nblocks)) -- return; -- old_drop_dquot(inode); -- journal_end(&handle, inode->i_sb, 2*nblocks); -+ err = journal_begin(&handle, inode->i_sb, 2*nblocks); -+ if (err); -+ return err; -+ ret = old_drop_dquot(inode); -+ err = journal_end(&handle, inode->i_sb, 2*nblocks); -+ if (!ret) -+ ret = err; - reiserfs_write_unlock(inode->i_sb); -- return; -+ return ret; - } - #endif - diff --git a/lustre/kernel_patches/patches/8kstack-2.6.12.patch b/lustre/kernel_patches/patches/8kstack-2.6.12.patch deleted file mode 100644 index f3a216040e..0000000000 --- a/lustre/kernel_patches/patches/8kstack-2.6.12.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: linux-2.6.9-5.0.3.EL/include/asm-i386/thread_info.h -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/include/asm-i386/thread_info.h 2005-02-25 10:25:33.000000000 +0200 -+++ linux-2.6.9-5.0.3.EL/include/asm-i386/thread_info.h 2005-02-25 20:19:11.676139032 +0200 -@@ -54,7 +54,7 @@ - - #define PREEMPT_ACTIVE 0x10000000 - #ifdef CONFIG_4KSTACKS --#define THREAD_SIZE (4096) -+#define THREAD_SIZE (8192) - #else - #define THREAD_SIZE (8192) - #endif diff --git a/lustre/kernel_patches/patches/atomic_add_return-sles9.patch b/lustre/kernel_patches/patches/atomic_add_return-sles9.patch deleted file mode 100644 index 3c2555bcec..0000000000 --- a/lustre/kernel_patches/patches/atomic_add_return-sles9.patch +++ /dev/null @@ -1,104 +0,0 @@ -Index: linux-2.6.5-7.283/include/asm-i386/atomic.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/asm-i386/atomic.h -+++ linux-2.6.5-7.283/include/asm-i386/atomic.h -@@ -2,6 +2,7 @@ - #define __ARCH_I386_ATOMIC__ - - #include <linux/config.h> -+#include <linux/bitops.h> - - /* - * Atomic operations that C can't guarantee us. Useful for -@@ -176,6 +177,47 @@ static __inline__ int atomic_add_negativ - return c; - } - -+/** -+ * atomic_add_return - add and return -+ * @v: pointer of type atomic_t -+ * @i: integer value to add -+ * -+ * Atomically adds @i to @v and returns @i + @v -+ */ -+static __inline__ int atomic_add_return(int i, atomic_t *v) -+{ -+ int __i; -+#ifdef CONFIG_M386 -+ unsigned long flags; -+ if(unlikely(boot_cpu_data.x86==3)) -+ goto no_xadd; -+#endif -+ /* Modern 486+ processor */ -+ __i = i; -+ __asm__ __volatile__( -+ LOCK_PREFIX "xaddl %0, %1" -+ :"+r" (i), "+m" (v->counter) -+ : : "memory"); -+ return i + __i; -+ -+#ifdef CONFIG_M386 -+no_xadd: /* Legacy 386 processor */ -+ local_irq_save(flags); -+ __i = atomic_read(v); -+ atomic_set(v, i + __i); -+ local_irq_restore(flags); -+ return i + __i; -+#endif -+} -+ -+static __inline__ int atomic_sub_return(int i, atomic_t *v) -+{ -+ return atomic_add_return(-i,v); -+} -+ -+#define atomic_inc_return(v) (atomic_add_return(1,v)) -+#define atomic_dec_return(v) (atomic_sub_return(1,v)) -+ - /* These are x86-specific, used by some header files */ - #define atomic_clear_mask(mask, addr) \ - __asm__ __volatile__(LOCK "andl %0,%1" \ -Index: linux-2.6.5-7.283/include/asm-x86_64/atomic.h -=================================================================== ---- linux-2.6.5-7.283.orig/include/asm-x86_64/atomic.h -+++ linux-2.6.5-7.283/include/asm-x86_64/atomic.h -@@ -2,6 +2,7 @@ - #define __ARCH_X86_64_ATOMIC__ - - #include <linux/config.h> -+#include <linux/bitops.h> - - /* atomic_t should be 32 bit signed type */ - -@@ -178,6 +179,31 @@ static __inline__ int atomic_add_negativ - return c; - } - -+/** -+ * atomic_add_return - add and return -+ * @i: integer value to add -+ * @v: pointer of type atomic_t -+ * -+ * Atomically adds @i to @v and returns @i + @v -+ */ -+static __inline__ int atomic_add_return(int i, atomic_t *v) -+{ -+ int __i = i; -+ __asm__ __volatile__( -+ LOCK_PREFIX "xaddl %0, %1" -+ :"+r" (i), "+m" (v->counter) -+ : : "memory"); -+ return i + __i; -+} -+ -+static __inline__ int atomic_sub_return(int i, atomic_t *v) -+{ -+ return atomic_add_return(-i,v); -+} -+ -+#define atomic_inc_return(v) (atomic_add_return(1,v)) -+#define atomic_dec_return(v) (atomic_sub_return(1,v)) -+ - /* These are x86-specific, used by some header files */ - #define atomic_clear_mask(mask, addr) \ - __asm__ __volatile__(LOCK "andl %0,%1" \ diff --git a/lustre/kernel_patches/patches/bitops_ext2_find_next_le_bit-2.6.patch b/lustre/kernel_patches/patches/bitops_ext2_find_next_le_bit-2.6.patch deleted file mode 100644 index e54959769f..0000000000 --- a/lustre/kernel_patches/patches/bitops_ext2_find_next_le_bit-2.6.patch +++ /dev/null @@ -1,153 +0,0 @@ -Index: linux-2.6.9/include/asm-i386/bitops.h -=================================================================== ---- linux-2.6.9.orig/include/asm-i386/bitops.h 2004-10-19 05:54:37.000000000 +0800 -+++ linux-2.6.9/include/asm-i386/bitops.h 2006-09-01 14:04:19.000000000 +0800 -@@ -448,6 +448,8 @@ - find_first_zero_bit((unsigned long*)addr, size) - #define ext2_find_next_zero_bit(addr, size, off) \ - find_next_zero_bit((unsigned long*)addr, size, off) -+#define ext2_find_next_le_bit(addr, size, off) \ -+ find_next_bit((unsigned long*)(addr), (size), (off)) - - /* Bitmap functions for the minix filesystem. */ - #define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,(void*)addr) -Index: linux-2.6.9/include/asm-x86_64/bitops.h -=================================================================== ---- linux-2.6.9.orig/include/asm-x86_64/bitops.h 2004-10-19 05:53:51.000000000 +0800 -+++ linux-2.6.9/include/asm-x86_64/bitops.h 2006-09-01 14:04:19.000000000 +0800 -@@ -399,6 +399,8 @@ - find_first_zero_bit((unsigned long*)addr, size) - #define ext2_find_next_zero_bit(addr, size, off) \ - find_next_zero_bit((unsigned long*)addr, size, off) -+#define ext2_find_next_le_bit(addr, size, off) \ -+ find_next_bit((unsigned long*)(addr), (size), (off)) - - /* Bitmap functions for the minix filesystem. */ - #define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,(void*)addr) -Index: linux-2.6.9/include/asm-ia64/bitops.h -=================================================================== ---- linux-2.6.9.orig/include/asm-ia64/bitops.h 2004-10-19 05:55:07.000000000 +0800 -+++ linux-2.6.9/include/asm-ia64/bitops.h 2006-09-01 14:04:19.000000000 +0800 -@@ -387,6 +387,8 @@ - #define ext2_test_bit test_bit - #define ext2_find_first_zero_bit find_first_zero_bit - #define ext2_find_next_zero_bit find_next_zero_bit -+#define ext2_find_next_le_bit(addr, size, off) \ -+ __find_next_bit((addr), (size), (off)) - - /* Bitmap functions for the minix filesystem. */ - #define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) -Index: linux-2.6.9/include/asm-ppc/bitops.h -=================================================================== ---- linux-2.6.9.orig/include/asm-ppc/bitops.h 2004-10-19 05:54:08.000000000 +0800 -+++ linux-2.6.9/include/asm-ppc/bitops.h 2006-09-01 14:04:35.000000000 +0800 -@@ -449,6 +449,47 @@ - return result + ffz(tmp); - } - -+#define ext2_find_next_le_bit(addr, size, off) \ -+ generic_find_next_le_bit((addr), (size), (off)) -+ -+static __inline__ unsigned long generic_find_next_le_bit(const void *addr, -+ unsigned long size, unsigned long offset) -+{ -+ unsigned int *p = ((unsigned int*) addr) + (offset >> 5); -+ unsigned int result = offset & ~31UL; -+ unsigned int tmp; -+ -+ if (offset >= size) -+ return size; -+ size -= result; -+ offset &= 31UL; -+ if (offset) { -+ tmp = cpu_to_le32p(p++); -+ tmp &= ~0UL << offset; -+ if (size < 32) -+ goto found_first; -+ if (tmp) -+ goto found_middle; -+ size -= 32; -+ result += 32; -+ } -+ while (size >= 32) { -+ if ((tmp = cpu_to_le32p(p++))) -+ goto found_middle; -+ result += 32; -+ size -= 32; -+ } -+ if (!size) -+ return result; -+ tmp = cpu_to_le32p(p); -+found_first: -+ tmp &= ~0U >> (32 - size); -+ if (tmp == 0UL) /* Are any bits set? */ -+ return result + size; /* Nope. */ -+found_middle: -+ return result + __ffs(tmp); -+} -+ - /* Bitmap functions for the minix filesystem. */ - #define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr) - #define minix_set_bit(nr,addr) ((void)ext2_set_bit(nr,addr)) -Index: linux-2.6.9/include/asm-ppc64/bitops.h -=================================================================== ---- linux-2.6.9.orig/include/asm-ppc64/bitops.h 2004-10-19 05:55:43.000000000 +0800 -+++ linux-2.6.9/include/asm-ppc64/bitops.h 2006-09-01 14:05:00.000000000 +0800 -@@ -349,6 +349,9 @@ - find_first_zero_le_bit((unsigned long*)addr, size) - #define ext2_find_next_zero_bit(addr, size, off) \ - find_next_zero_le_bit((unsigned long*)addr, size, off) -+#define ext2_find_next_le_bit(addr, size, off) \ -+ generic_find_next_le_bit((unsigned long*)(addr), (size), (off)) -+extern unsigned long generic_find_next_le_bit(const unsigned long *addr, unsigned long size, unsigned long offset); - - #define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) - #define minix_set_bit(nr,addr) set_bit(nr,addr) -Index: linux-2.6.9/arch/ppc64/kernel/bitops.c -=================================================================== ---- linux-2.6.9.orig/arch/ppc64/kernel/bitops.c 2004-10-19 05:54:37.000000000 +0800 -+++ linux-2.6.9/arch/ppc64/kernel/bitops.c 2006-09-01 14:05:25.000000000 +0800 -@@ -145,3 +145,43 @@ - } - - EXPORT_SYMBOL(find_next_zero_le_bit); -+ -+unsigned long generic_find_next_le_bit(const unsigned long *addr, unsigned long size, -+ unsigned long offset) -+{ -+ const unsigned long *p = addr + offset / BITS_PER_LONG; -+ unsigned long result = offset & ~(BITS_PER_LONG - 1); -+ unsigned long tmp; -+ -+ if (offset >= size) -+ return size; -+ size -= result; -+ offset %= BITS_PER_LONG; -+ if (offset) { -+ tmp = __swab64p(p++); -+ tmp &= (~0UL << offset); -+ if (size < BITS_PER_LONG) -+ goto found_first; -+ if (tmp) -+ goto found_middle; -+ size -= BITS_PER_LONG; -+ result += BITS_PER_LONG; -+ } -+ while (size & ~(BITS_PER_LONG - 1)) { -+ if ((tmp = __swab64p(p++))) -+ goto found_middle; -+ result += BITS_PER_LONG; -+ size -= BITS_PER_LONG; -+ } -+ if (!size) -+ return result; -+ tmp = __swab64p(p); -+found_first: -+ tmp &= ~0UL >> (BITS_PER_LONG - size); -+ if (tmp == 0UL) -+ return result + size; -+found_middle: -+ return result + __ffs(tmp); -+} -+ -+EXPORT_SYMBOL(generic_find_next_le_bit); diff --git a/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch b/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch deleted file mode 100644 index a2d7da22a7..0000000000 --- a/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: linux-2616-46014/include/scsi/scsi_host.h -=================================================================== ---- linux-2616-46014.orig/include/scsi/scsi_host.h -+++ linux-2616-46014/include/scsi/scsi_host.h -@@ -28,7 +28,7 @@ struct scsi_transport_template; - * used in one scatter-gather request. - */ - #define SG_NONE 0 --#define SG_ALL 0xff -+#define SG_ALL 256 - - - #define DISABLE_CLUSTERING 0 diff --git a/lustre/kernel_patches/patches/blkdev_tunables-2.6-suse.patch b/lustre/kernel_patches/patches/blkdev_tunables-2.6-suse.patch deleted file mode 100644 index f6fa12bf88..0000000000 --- a/lustre/kernel_patches/patches/blkdev_tunables-2.6-suse.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik/include/scsi/scsi_host.h -=================================================================== ---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik.orig/include/scsi/scsi_host.h 2005-01-07 04:23:12.344880136 -0800 -+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik/include/scsi/scsi_host.h 2005-01-07 04:23:33.338688592 -0800 -@@ -24,7 +24,7 @@ - * used in one scatter-gather request. - */ - #define SG_NONE 0 --#define SG_ALL 0xff -+#define SG_ALL 256 - - - #define DISABLE_CLUSTERING 0 -Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik/include/linux/blkdev.h -=================================================================== ---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik.orig/include/linux/blkdev.h 2004-11-11 07:28:28.000000000 -0800 -+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik/include/linux/blkdev.h 2005-01-07 04:24:33.819494112 -0800 -@@ -647,8 +647,8 @@ - extern void blk_rq_prep_restart(struct request *); - extern int blkdev_issue_flush(struct block_device *, sector_t *); - --#define MAX_PHYS_SEGMENTS 128 --#define MAX_HW_SEGMENTS 128 -+#define MAX_PHYS_SEGMENTS 256 -+#define MAX_HW_SEGMENTS 256 - #define MAX_SECTORS 255 - - #define MAX_SEGMENT_SIZE 65536 diff --git a/lustre/kernel_patches/patches/dcache-qstr-api-fix-2.6-suse.patch b/lustre/kernel_patches/patches/dcache-qstr-api-fix-2.6-suse.patch deleted file mode 100644 index 84b88fddc4..0000000000 --- a/lustre/kernel_patches/patches/dcache-qstr-api-fix-2.6-suse.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: linux-2.6.5-7.276/include/linux/dcache.h -=================================================================== ---- linux-2.6.5-7.276.orig/include/linux/dcache.h -+++ linux-2.6.5-7.276/include/linux/dcache.h -@@ -38,7 +38,6 @@ struct qstr { - const unsigned char * name; - unsigned int len; - unsigned int hash; -- char name_str[0]; - }; - - #include <linux/namei.h> -@@ -104,7 +103,6 @@ struct dentry { - struct rcu_head d_rcu; - struct dcookie_struct * d_cookie; /* cookie, if any */ - unsigned long d_move_count; /* to indicated moved dentry while lockless lookup */ -- struct qstr * d_qstr; /* quick str ptr used in lockless lookup and concurrent d_move */ - struct dentry * d_parent; /* parent directory */ - struct qstr d_name; - struct hlist_node d_hash; /* lookup hash list */ -Index: linux-2.6.5-7.276/fs/dcache.c -=================================================================== ---- linux-2.6.5-7.276.orig/fs/dcache.c -+++ linux-2.6.5-7.276/fs/dcache.c -@@ -775,7 +775,6 @@ struct dentry * d_alloc(struct dentry * - dentry->d_parent = NULL; - dentry->d_move_count = 0; - dentry->d_sb = NULL; -- dentry->d_qstr = &dentry->d_name; - dentry->d_name.name = str; - dentry->d_name.len = name->len; - dentry->d_name.hash = name->hash; diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6-fc5.patch b/lustre/kernel_patches/patches/dev_read_only-2.6-fc5.patch deleted file mode 100644 index 5cab63eff3..0000000000 --- a/lustre/kernel_patches/patches/dev_read_only-2.6-fc5.patch +++ /dev/null @@ -1,142 +0,0 @@ -diff -rup linux-2.6.16.i686.orig/block/ll_rw_blk.c linux-2.6.16.i686/block/ll_rw_blk.c ---- linux-2.6.16.i686.orig/block/ll_rw_blk.c 2007-05-29 15:24:36.000000000 +0300 -+++ linux-2.6.16.i686/block/ll_rw_blk.c 2007-05-29 15:33:50.000000000 +0300 -@@ -2940,6 +2940,8 @@ static void handle_bad_sector(struct bio - set_bit(BIO_EOF, &bio->bi_flags); - } - -+int dev_check_rdonly(struct block_device *bdev); -+ - /** - * generic_make_request: hand a buffer to its device driver for I/O - * @bio: The bio describing the location in memory and on the device. -@@ -3020,6 +3022,12 @@ end_io: - - if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) - goto end_io; -+ /* this is cfs's dev_rdonly check */ -+ if (bio->bi_rw == WRITE && -+ dev_check_rdonly(bio->bi_bdev)) { -+ bio_endio(bio, bio->bi_size, 0); -+ break; -+ } - - /* - * If this device has partitions, remap block n -@@ -3593,6 +3601,91 @@ void swap_io_context(struct io_context * - *ioc2 = temp; - } - EXPORT_SYMBOL(swap_io_context); -+ /* -+ * Debug code for turning block devices "read-only" (will discard writes -+ * silently). This is for filesystem crash/recovery testing. -+ */ -+struct deventry { -+ dev_t dev; -+ struct deventry *next; -+}; -+ -+static struct deventry *devlist = NULL; -+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; -+ -+int dev_check_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur; -+ if (!bdev) return 0; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ return 1; -+ } -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+ return 0; -+} -+ -+void dev_set_rdonly(struct block_device *bdev) -+{ -+ struct deventry *newdev, *cur; -+ -+ if (!bdev) -+ return; -+ newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL); -+ if (!newdev) -+ return; -+ -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ kfree(newdev); -+ return; -+ } -+ cur = cur->next; -+ } -+ newdev->dev = bdev->bd_dev; -+ newdev->next = devlist; -+ devlist = newdev; -+ spin_unlock(&devlock); -+ printk(KERN_WARNING "Turning device %s (%#x) read-only\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev); -+} -+ -+void dev_clear_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur, *last = NULL; -+ if (!bdev) return; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ if (last) -+ last->next = cur->next; -+ else -+ devlist = cur->next; -+ spin_unlock(&devlock); -+ kfree(cur); -+ printk(KERN_WARNING "Removing read-only on %s (%#x)\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : -+ "unknown block", bdev->bd_dev); -+ return; -+ } -+ last = cur; -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+} -+ -+EXPORT_SYMBOL(dev_set_rdonly); -+EXPORT_SYMBOL(dev_clear_rdonly); -+EXPORT_SYMBOL(dev_check_rdonly); - - /* - * sysfs parts below -diff -rup linux-2.6.16.i686.orig/fs/block_dev.c linux-2.6.16.i686/fs/block_dev.c ---- linux-2.6.16.i686.orig/fs/block_dev.c 2006-03-20 07:53:29.000000000 +0200 -+++ linux-2.6.16.i686/fs/block_dev.c 2007-05-29 15:35:00.000000000 +0300 -@@ -60,6 +60,7 @@ static void kill_bdev(struct block_devic - { - invalidate_bdev(bdev, 1); - truncate_inode_pages(bdev->bd_inode->i_mapping, 0); -+ dev_clear_rdonly(bdev); - } - - int set_blocksize(struct block_device *bdev, int size) -diff -rup linux-2.6.16.i686.orig/include/linux/fs.h linux-2.6.16.i686/include/linux/fs.h ---- linux-2.6.16.i686.orig/include/linux/fs.h 2007-05-29 15:24:38.000000000 +0300 -+++ linux-2.6.16.i686/include/linux/fs.h 2007-05-29 15:33:50.000000000 +0300 -@@ -1541,6 +1541,10 @@ extern void file_kill(struct file *f); - struct bio; - extern void submit_bio(int, struct bio *); - extern int bdev_read_only(struct block_device *); -+#define HAVE_CLEAR_RDONLY_ON_PUT -+void dev_set_rdonly(struct block_device *bdev); -+int dev_check_rdonly(struct block_device *bdev); -+void dev_clear_rdonly(struct block_device *bdev); - extern int set_blocksize(struct block_device *, int); - extern int sb_set_blocksize(struct super_block *, int); - extern int sb_min_blocksize(struct super_block *, int); diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6-lnxi.patch b/lustre/kernel_patches/patches/dev_read_only-2.6-lnxi.patch deleted file mode 100644 index c6b38aba38..0000000000 --- a/lustre/kernel_patches/patches/dev_read_only-2.6-lnxi.patch +++ /dev/null @@ -1,167 +0,0 @@ -diff -ur linux-2.6.5-lnxi.orig/drivers/block/ll_rw_blk.c linux-2.6.5-lnxi/drivers/block/ll_rw_blk.c ---- linux-2.6.5-lnxi.orig/drivers/block/ll_rw_blk.c 2004-11-11 07:28:51.000000000 -0800 -+++ linux-2.6.5-lnxi/drivers/block/ll_rw_blk.c 2005-04-11 09:42:22.750936924 -0700 -@@ -2458,7 +2458,7 @@ static inline void blk_partition_remap(s - } - } - --int dev_check_rdonly(dev_t dev); -+int dev_check_rdonly(struct block_device *bdev); - - /** - * generic_make_request: hand a buffer to its device driver for I/O -@@ -2550,7 +2550,7 @@ end_io: - - /* this is cfs's dev_rdonly check */ - if (bio->bi_rw == WRITE && -- dev_check_rdonly(bio->bi_bdev->bd_dev)) { -+ dev_check_rdonly(bio->bi_bdev)) { - bio_endio(bio, bio->bi_size, 0); - break; - } -@@ -3086,53 +3086,86 @@ void swap_io_context(struct io_context * - *ioc2 = temp; - } - --#define MAX_RDONLY_DEVS 16 -- --static dev_t rdonly_devs[MAX_RDONLY_DEVS] = {0, }; -- - /* - * Debug code for turning block devices "read-only" (will discard writes - * silently). This is for filesystem crash/recovery testing. - */ --void dev_set_rdonly(struct block_device *bdev, int no_write) -+struct deventry { -+ dev_t dev; -+ struct deventry *next; -+}; -+ -+static struct deventry *devlist = NULL; -+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; -+ -+int dev_check_rdonly(struct block_device *bdev) - { -- if (no_write >= MAX_RDONLY_DEVS) { -- printk(KERN_ALERT "%s:%d illegal arg %d (max %d)\n", -- __FILE__, __LINE__, no_write, MAX_RDONLY_DEVS); -- return; -+ struct deventry *cur; -+ if (!bdev) return 0; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ return 1; - } -- -- if (bdev) { -- printk(KERN_WARNING "Turning device %s read-only at %d\n", -- bdev->bd_disk ? bdev->bd_disk->disk_name : "?", -- no_write); -- rdonly_devs[no_write] = bdev->bd_dev; -+ cur = cur->next; - } -+ spin_unlock(&devlock); -+ return 0; - } - --void dev_clear_rdonly(int no_write) -+void dev_set_rdonly(struct block_device *bdev) - { -- if (no_write >= MAX_RDONLY_DEVS) { -- printk(KERN_ALERT "%s:%d illegal arg %d (max %d)\n", -- __FILE__, __LINE__, no_write, MAX_RDONLY_DEVS); -- return; -- } -+ struct deventry *newdev, *cur; - -- if (rdonly_devs[no_write] == 0) -+ if (!bdev) -+ return; -+ newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL); -+ if (!newdev) - return; - -- printk(KERN_WARNING "Clearing read-only at %d\n", no_write); -- rdonly_devs[no_write] = 0; --} -- --int dev_check_rdonly(dev_t dev) --{ -- int i; -- -- for (i = 0; i < MAX_RDONLY_DEVS; i++) -- if (rdonly_devs[i] == dev) -- return 1; -- return 0; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ kfree(newdev); -+ return; -+ } -+ cur = cur->next; -+ } -+ newdev->dev = bdev->bd_dev; -+ newdev->next = devlist; -+ devlist = newdev; -+ spin_unlock(&devlock); -+ printk(KERN_WARNING "Turning device %s (%#x) read-only\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev); -+} -+ -+void dev_clear_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur, *last = NULL; -+ if (!bdev) return; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ if (last) -+ last->next = cur->next; -+ else -+ devlist = cur->next; -+ spin_unlock(&devlock); -+ kfree(cur); -+ printk(KERN_WARNING "Removing read-only on %s (%#x)\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : -+ "unknown block", bdev->bd_dev); -+ return; -+ } -+ last = cur; -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); - } - - EXPORT_SYMBOL(dev_set_rdonly); -diff -ur linux-2.6.5-lnxi.orig/fs/block_dev.c linux-2.6.5-lnxi/fs/block_dev.c ---- linux-2.6.5-lnxi.orig/fs/block_dev.c 2004-11-11 07:28:30.000000000 -0800 -+++ linux-2.6.5-lnxi/fs/block_dev.c 2005-04-11 09:49:01.891407856 -0700 -@@ -739,6 +739,7 @@ int blkdev_put(struct block_device *bdev - } - unlock_kernel(); - up(&bdev->bd_sem); -+ dev_clear_rdonly(bdev); - bdput(bdev); - return ret; - } -diff -ur linux-2.6.5-lnxi.orig/include/linux/fs.h linux-2.6.5-lnxi/include/linux/fs.h ---- linux-2.6.5-lnxi.orig/include/linux/fs.h 2004-11-11 07:28:45.000000000 -0800 -+++ linux-2.6.5-lnxi/include/linux/fs.h 2005-04-11 09:43:27.423116140 -0700 -@@ -1385,6 +1385,10 @@ extern void file_kill(struct file *f); - struct bio; - extern int submit_bio(int, struct bio *); - extern int bdev_read_only(struct block_device *); -+#define HAVE_CLEAR_RDONLY_ON_PUT -+void dev_set_rdonly(struct block_device *bdev); -+int dev_check_rdonly(struct block_device *bdev); -+void dev_clear_rdonly(struct block_device *bdev); - extern int set_blocksize(struct block_device *, int); - extern int sb_set_blocksize(struct super_block *, int); - extern int sb_min_blocksize(struct super_block *, int); diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch b/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch deleted file mode 100644 index e486944af2..0000000000 --- a/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch +++ /dev/null @@ -1,147 +0,0 @@ -Index: linux-2.6.9/drivers/block/ll_rw_blk.c -=================================================================== ---- linux-2.6.9.orig/drivers/block/ll_rw_blk.c -+++ linux-2.6.9/drivers/block/ll_rw_blk.c -@@ -2326,6 +2326,8 @@ static inline int attempt_front_merge(re - return 0; - } - -+int dev_check_rdonly(struct block_device *bdev); -+ - /** - * blk_attempt_remerge - attempt to remerge active head with next request - * @q: The &request_queue_t belonging to the device -@@ -2631,6 +2633,13 @@ end_io: - if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)) - goto end_io; - -+ /* this is cfs's dev_rdonly check */ -+ if (bio->bi_rw == WRITE && -+ dev_check_rdonly(bio->bi_bdev)) { -+ bio_endio(bio, bio->bi_size, 0); -+ break; -+ } -+ - /* - * If this device has partitions, remap block n - * of partition p to block n+start(p) of the disk. -@@ -3180,6 +3189,92 @@ void swap_io_context(struct io_context * - - - /* -+ * Debug code for turning block devices "read-only" (will discard writes -+ * silently). This is for filesystem crash/recovery testing. -+ */ -+struct deventry { -+ dev_t dev; -+ struct deventry *next; -+}; -+ -+static struct deventry *devlist = NULL; -+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; -+ -+int dev_check_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur; -+ if (!bdev) return 0; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ return 1; -+ } -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+ return 0; -+} -+ -+void dev_set_rdonly(struct block_device *bdev) -+{ -+ struct deventry *newdev, *cur; -+ -+ if (!bdev) -+ return; -+ newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL); -+ if (!newdev) -+ return; -+ -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ kfree(newdev); -+ return; -+ } -+ cur = cur->next; -+ } -+ newdev->dev = bdev->bd_dev; -+ newdev->next = devlist; -+ devlist = newdev; -+ spin_unlock(&devlock); -+ printk(KERN_WARNING "Turning device %s (%#x) read-only\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev); -+} -+ -+void dev_clear_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur, *last = NULL; -+ if (!bdev) return; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ if (last) -+ last->next = cur->next; -+ else -+ devlist = cur->next; -+ spin_unlock(&devlock); -+ kfree(cur); -+ printk(KERN_WARNING "Removing read-only on %s (%#x)\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : -+ "unknown block", bdev->bd_dev); -+ return; -+ } -+ last = cur; -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+} -+ -+EXPORT_SYMBOL(dev_set_rdonly); -+EXPORT_SYMBOL(dev_clear_rdonly); -+EXPORT_SYMBOL(dev_check_rdonly); -+ -+/* - * sysfs parts below - */ - struct queue_sysfs_entry { -Index: linux-2.6.9/fs/block_dev.c -=================================================================== ---- linux-2.6.9.orig/fs/block_dev.c -+++ linux-2.6.9/fs/block_dev.c -@@ -60,6 +60,7 @@ static void kill_bdev(struct block_devic - { - invalidate_bdev(bdev, 1); - truncate_inode_pages(bdev->bd_inode->i_mapping, 0); -+ dev_clear_rdonly(bdev); - } - - int set_blocksize(struct block_device *bdev, int size) -Index: linux-2.6.9/include/linux/fs.h -=================================================================== ---- linux-2.6.9.orig/include/linux/fs.h -+++ linux-2.6.9/include/linux/fs.h -@@ -1492,6 +1492,10 @@ extern void file_kill(struct file *f); - struct bio; - extern void submit_bio(int, struct bio *); - extern int bdev_read_only(struct block_device *); -+#define HAVE_CLEAR_RDONLY_ON_PUT -+void dev_set_rdonly(struct block_device *bdev); -+int dev_check_rdonly(struct block_device *bdev); -+void dev_clear_rdonly(struct block_device *bdev); - extern int set_blocksize(struct block_device *, int); - extern int sb_set_blocksize(struct super_block *, int); - extern int sb_min_blocksize(struct super_block *, int); diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/dev_read_only-2.6.18-vanilla.patch deleted file mode 100644 index ff6cf917b7..0000000000 --- a/lustre/kernel_patches/patches/dev_read_only-2.6.18-vanilla.patch +++ /dev/null @@ -1,142 +0,0 @@ -diff -urp linux-2.6.18.1.orig/block/ll_rw_blk.c linux-2.6.18.1/block/ll_rw_blk.c ---- linux-2.6.18.1.orig/block/ll_rw_blk.c 2006-10-14 06:34:03.000000000 +0300 -+++ linux-2.6.18.1/block/ll_rw_blk.c 2007-05-29 14:50:46.000000000 +0300 -@@ -2993,6 +2993,8 @@ static void handle_bad_sector(struct bio - set_bit(BIO_EOF, &bio->bi_flags); - } - -+int dev_check_rdonly(struct block_device *bdev); -+ - /** - * generic_make_request: hand a buffer to its device driver for I/O - * @bio: The bio describing the location in memory and on the device. -@@ -3076,6 +3078,12 @@ end_io: - - if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) - goto end_io; -+ /* this is cfs's dev_rdonly check */ -+ if (bio->bi_rw == WRITE && -+ dev_check_rdonly(bio->bi_bdev)) { -+ bio_endio(bio, bio->bi_size, 0); -+ break; -+ } - - /* - * If this device has partitions, remap block n -@@ -3675,6 +3683,91 @@ void swap_io_context(struct io_context * - *ioc2 = temp; - } - EXPORT_SYMBOL(swap_io_context); -+ /* -+ * Debug code for turning block devices "read-only" (will discard writes -+ * silently). This is for filesystem crash/recovery testing. -+ */ -+struct deventry { -+ dev_t dev; -+ struct deventry *next; -+}; -+ -+static struct deventry *devlist = NULL; -+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; -+ -+int dev_check_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur; -+ if (!bdev) return 0; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ return 1; -+ } -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+ return 0; -+} -+ -+void dev_set_rdonly(struct block_device *bdev) -+{ -+ struct deventry *newdev, *cur; -+ -+ if (!bdev) -+ return; -+ newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL); -+ if (!newdev) -+ return; -+ -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ kfree(newdev); -+ return; -+ } -+ cur = cur->next; -+ } -+ newdev->dev = bdev->bd_dev; -+ newdev->next = devlist; -+ devlist = newdev; -+ spin_unlock(&devlock); -+ printk(KERN_WARNING "Turning device %s (%#x) read-only\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev); -+} -+ -+void dev_clear_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur, *last = NULL; -+ if (!bdev) return; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ if (last) -+ last->next = cur->next; -+ else -+ devlist = cur->next; -+ spin_unlock(&devlock); -+ kfree(cur); -+ printk(KERN_WARNING "Removing read-only on %s (%#x)\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : -+ "unknown block", bdev->bd_dev); -+ return; -+ } -+ last = cur; -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+} -+ -+EXPORT_SYMBOL(dev_set_rdonly); -+EXPORT_SYMBOL(dev_clear_rdonly); -+EXPORT_SYMBOL(dev_check_rdonly); - - /* - * sysfs parts below -diff -urp linux-2.6.18.1.orig/fs/block_dev.c linux-2.6.18.1/fs/block_dev.c ---- linux-2.6.18.1.orig/fs/block_dev.c 2006-10-14 06:34:03.000000000 +0300 -+++ linux-2.6.18.1/fs/block_dev.c 2007-05-29 14:53:38.000000000 +0300 -@@ -58,6 +58,7 @@ static void kill_bdev(struct block_devic - { - invalidate_bdev(bdev, 1); - truncate_inode_pages(bdev->bd_inode->i_mapping, 0); -+ dev_clear_rdonly(bdev); - } - - int set_blocksize(struct block_device *bdev, int size) -diff -urp linux-2.6.18.1.orig/include/linux/fs.h linux-2.6.18.1/include/linux/fs.h ---- linux-2.6.18.1.orig/include/linux/fs.h 2006-10-14 06:34:03.000000000 +0300 -+++ linux-2.6.18.1/include/linux/fs.h 2007-05-29 14:50:46.000000000 +0300 -@@ -1632,6 +1632,10 @@ extern void file_kill(struct file *f); - struct bio; - extern void submit_bio(int, struct bio *); - extern int bdev_read_only(struct block_device *); -+#define HAVE_CLEAR_RDONLY_ON_PUT -+void dev_set_rdonly(struct block_device *bdev); -+int dev_check_rdonly(struct block_device *bdev); -+void dev_clear_rdonly(struct block_device *bdev); - extern int set_blocksize(struct block_device *, int); - extern int sb_set_blocksize(struct super_block *, int); - extern int sb_min_blocksize(struct super_block *, int); diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/dev_read_only-2.6.22-vanilla.patch deleted file mode 100644 index 8d144d63ae..0000000000 --- a/lustre/kernel_patches/patches/dev_read_only-2.6.22-vanilla.patch +++ /dev/null @@ -1,145 +0,0 @@ -Index: linux-2.6.22.5/block/ll_rw_blk.c -=================================================================== ---- linux-2.6.22.5.orig/block/ll_rw_blk.c 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/block/ll_rw_blk.c 2008-02-21 01:07:16.000000000 -0700 -@@ -3101,6 +3101,8 @@ - - #endif /* CONFIG_FAIL_MAKE_REQUEST */ - -+int dev_check_rdonly(struct block_device *bdev); -+ - /** - * generic_make_request: hand a buffer to its device driver for I/O - * @bio: The bio describing the location in memory and on the device. -@@ -3185,6 +3187,12 @@ - - if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) - goto end_io; -+ /* this is cfs's dev_rdonly check */ -+ if (bio->bi_rw == WRITE && -+ dev_check_rdonly(bio->bi_bdev)) { -+ bio_endio(bio, bio->bi_size, 0); -+ break; -+ } - - if (should_fail_request(bio)) - goto end_io; -@@ -3850,6 +3858,91 @@ - *ioc2 = temp; - } - EXPORT_SYMBOL(swap_io_context); -+ /* -+ * Debug code for turning block devices "read-only" (will discard writes -+ * silently). This is for filesystem crash/recovery testing. -+ */ -+struct deventry { -+ dev_t dev; -+ struct deventry *next; -+}; -+ -+static struct deventry *devlist = NULL; -+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; -+ -+int dev_check_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur; -+ if (!bdev) return 0; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ return 1; -+ } -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+ return 0; -+} -+ -+void dev_set_rdonly(struct block_device *bdev) -+{ -+ struct deventry *newdev, *cur; -+ -+ if (!bdev) -+ return; -+ newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL); -+ if (!newdev) -+ return; -+ -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ kfree(newdev); -+ return; -+ } -+ cur = cur->next; -+ } -+ newdev->dev = bdev->bd_dev; -+ newdev->next = devlist; -+ devlist = newdev; -+ spin_unlock(&devlock); -+ printk(KERN_WARNING "Turning device %s (%#x) read-only\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev); -+} -+ -+void dev_clear_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur, *last = NULL; -+ if (!bdev) return; -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ if (last) -+ last->next = cur->next; -+ else -+ devlist = cur->next; -+ spin_unlock(&devlock); -+ kfree(cur); -+ printk(KERN_WARNING "Removing read-only on %s (%#x)\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : -+ "unknown block", bdev->bd_dev); -+ return; -+ } -+ last = cur; -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+} -+ -+EXPORT_SYMBOL(dev_set_rdonly); -+EXPORT_SYMBOL(dev_clear_rdonly); -+EXPORT_SYMBOL(dev_check_rdonly); - - /* - * sysfs parts below -Index: linux-2.6.22.5/fs/block_dev.c -=================================================================== ---- linux-2.6.22.5.orig/fs/block_dev.c 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/fs/block_dev.c 2008-02-21 01:07:16.000000000 -0700 -@@ -63,6 +63,7 @@ - return; - invalidate_bh_lrus(); - truncate_inode_pages(bdev->bd_inode->i_mapping, 0); -+ dev_clear_rdonly(bdev); - } - - int set_blocksize(struct block_device *bdev, int size) -Index: linux-2.6.22.5/include/linux/fs.h -=================================================================== ---- linux-2.6.22.5.orig/include/linux/fs.h 2008-02-21 00:58:18.000000000 -0700 -+++ linux-2.6.22.5/include/linux/fs.h 2008-02-21 01:07:16.000000000 -0700 -@@ -1744,6 +1744,10 @@ - extern void submit_bio(int, struct bio *); - extern int bdev_read_only(struct block_device *); - #endif -+#define HAVE_CLEAR_RDONLY_ON_PUT -+extern void dev_set_rdonly(struct block_device *bdev); -+extern int dev_check_rdonly(struct block_device *bdev); -+extern void dev_clear_rdonly(struct block_device *bdev); - extern int set_blocksize(struct block_device *, int); - extern int sb_set_blocksize(struct super_block *, int); - extern int sb_min_blocksize(struct super_block *, int); diff --git a/lustre/kernel_patches/patches/export-2.6-fc5.patch b/lustre/kernel_patches/patches/export-2.6-fc5.patch deleted file mode 100644 index fdfb2f79c1..0000000000 --- a/lustre/kernel_patches/patches/export-2.6-fc5.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: linux-2.6.16.i686/fs/jbd/journal.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/jbd/journal.c 2006-05-30 22:10:16.000000000 +0800 -+++ linux-2.6.16.i686/fs/jbd/journal.c 2006-05-30 22:17:26.000000000 +0800 -@@ -71,6 +71,7 @@ - EXPORT_SYMBOL(journal_errno); - EXPORT_SYMBOL(journal_ack_err); - EXPORT_SYMBOL(journal_clear_err); -+EXPORT_SYMBOL(log_start_commit); - EXPORT_SYMBOL(log_wait_commit); - EXPORT_SYMBOL(journal_start_commit); - EXPORT_SYMBOL(journal_force_commit_nested); diff --git a/lustre/kernel_patches/patches/export-2.6-suse.patch b/lustre/kernel_patches/patches/export-2.6-suse.patch deleted file mode 100644 index 3ab174054b..0000000000 --- a/lustre/kernel_patches/patches/export-2.6-suse.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: linux-2.6.3/fs/open.c -=================================================================== ---- linux-2.6.3.orig/fs/open.c 2004-02-23 14:36:25.000000000 -0800 -+++ linux-2.6.3/fs/open.c 2004-02-23 20:09:34.000000000 -0800 -@@ -881,6 +881,7 @@ - return ERR_PTR(error); - } - -+EXPORT_SYMBOL(filp_open); - - struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags) - { -Index: linux-2.6.3/fs/jbd/journal.c -=================================================================== ---- linux-2.6.3.orig/fs/jbd/journal.c 2004-01-08 22:59:10.000000000 -0800 -+++ linux-2.6.3/fs/jbd/journal.c 2004-02-23 20:09:34.000000000 -0800 -@@ -71,6 +71,7 @@ - EXPORT_SYMBOL(journal_errno); - EXPORT_SYMBOL(journal_ack_err); - EXPORT_SYMBOL(journal_clear_err); -+EXPORT_SYMBOL(log_start_commit); - EXPORT_SYMBOL(log_wait_commit); - EXPORT_SYMBOL(journal_start_commit); - EXPORT_SYMBOL(journal_wipe); diff --git a/lustre/kernel_patches/patches/export-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export-2.6.18-vanilla.patch deleted file mode 100644 index a6813e621d..0000000000 --- a/lustre/kernel_patches/patches/export-2.6.18-vanilla.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: linux-2.6/fs/open.c -=================================================================== ---- linux-2.6.orig/fs/open.c 2006-07-15 16:10:37.000000000 +0800 -+++ linux-2.6/fs/open.c 2006-07-15 16:22:04.000000000 +0800 -@@ -808,7 +808,6 @@ asmlinkage long sys_lchown(const char __ - return error; - } - -- - asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group) - { - struct file * file; -Index: linux-2.6/fs/jbd/journal.c -=================================================================== ---- linux-2.6.orig/fs/jbd/journal.c 2006-07-15 16:13:50.000000000 +0800 -+++ linux-2.6/fs/jbd/journal.c 2006-07-15 16:22:04.000000000 +0800 -@@ -74,6 +74,7 @@ EXPORT_SYMBOL(journal_abort); - EXPORT_SYMBOL(journal_errno); - EXPORT_SYMBOL(journal_ack_err); - EXPORT_SYMBOL(journal_clear_err); -+EXPORT_SYMBOL(log_start_commit); - EXPORT_SYMBOL(log_wait_commit); - EXPORT_SYMBOL(journal_start_commit); - EXPORT_SYMBOL(journal_force_commit_nested); diff --git a/lustre/kernel_patches/patches/export-do_kern_mount.patch b/lustre/kernel_patches/patches/export-do_kern_mount.patch deleted file mode 100644 index 4abb3861af..0000000000 --- a/lustre/kernel_patches/patches/export-do_kern_mount.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: linux-2.6/fs/super.c -=================================================================== ---- linux-2.6.orig/fs/super.c 2006-07-20 10:51:39.000000000 +0800 -+++ linux-2.6/fs/super.c 2006-07-20 10:51:59.000000000 +0800 -@@ -877,6 +877,8 @@ do_kern_mount(const char *fstype, int fl - return mnt; - } - -+EXPORT_SYMBOL_GPL(do_kern_mount); -+ - struct vfsmount *kern_mount(struct file_system_type *type) - { - return vfs_kern_mount(type, 0, type->name, NULL); diff --git a/lustre/kernel_patches/patches/export-log-2.6-rhel4.patch b/lustre/kernel_patches/patches/export-log-2.6-rhel4.patch deleted file mode 100644 index 5bfc1544c3..0000000000 --- a/lustre/kernel_patches/patches/export-log-2.6-rhel4.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: linux-2.6.3/fs/jbd/journal.c -=================================================================== ---- linux-2.6.3.orig/fs/jbd/journal.c 2004-01-08 22:59:10.000000000 -0800 -+++ linux-2.6.3/fs/jbd/journal.c 2004-02-23 20:09:34.000000000 -0800 -@@ -71,6 +71,7 @@ - EXPORT_SYMBOL(journal_errno); - EXPORT_SYMBOL(journal_ack_err); - EXPORT_SYMBOL(journal_clear_err); -+EXPORT_SYMBOL(log_start_commit); - EXPORT_SYMBOL(log_wait_commit); - EXPORT_SYMBOL(journal_start_commit); - EXPORT_SYMBOL(journal_wipe); diff --git a/lustre/kernel_patches/patches/export-show_task-2.6-fc5.patch b/lustre/kernel_patches/patches/export-show_task-2.6-fc5.patch deleted file mode 100644 index 855c359fef..0000000000 --- a/lustre/kernel_patches/patches/export-show_task-2.6-fc5.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: linux-2.6.16.i686/kernel/sched.c -=================================================================== ---- linux-2.6.16.i686.orig/kernel/sched.c 2006-05-30 15:47:15.000000000 +0800 -+++ linux-2.6.16.i686/kernel/sched.c 2006-05-30 21:21:07.000000000 +0800 -@@ -4240,7 +4240,7 @@ - return list_entry(p->sibling.next,struct task_struct,sibling); - } - --static void show_task(task_t *p) -+void show_task(task_t *p) - { - task_t *relative; - unsigned state; -@@ -4290,9 +4290,10 @@ - else - printk(" (NOTLB)\n"); - -- if (state != TASK_RUNNING) -+ if (state != TASK_RUNNING || p == current) - show_stack(p, NULL); - } -+EXPORT_SYMBOL(show_task); - - void show_state(void) - { diff --git a/lustre/kernel_patches/patches/export-show_task-2.6-vanilla.patch b/lustre/kernel_patches/patches/export-show_task-2.6-vanilla.patch deleted file mode 100644 index 828d3ab16d..0000000000 --- a/lustre/kernel_patches/patches/export-show_task-2.6-vanilla.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: linux-2.6.5-SLES9_SP1_BRANCH_2004102113353091/kernel/sched.c -=================================================================== ---- linux-2.6.5-SLES9_SP1_BRANCH_2004102113353091.orig/kernel/sched.c 2004-10-22 15:25:05.000000000 -0400 -+++ linux-2.6.5-SLES9_SP1_BRANCH_2004102113353091/kernel/sched.c 2004-10-22 15:39:18.000000000 -0400 -@@ -3147,7 +3147,7 @@ - return list_entry(p->sibling.next,struct task_struct,sibling); - } - --static void show_task(task_t * p) -+void show_task(task_t * p) - { - task_t *relative; - unsigned state; -@@ -3200,9 +3200,10 @@ - else - printk(" (NOTLB)\n"); - -- if (state != TASK_RUNNING) -+ if (state != TASK_RUNNING || p == current) - show_stack(p, NULL); - } -+EXPORT_SYMBOL(show_task); - - void show_state(void) - { diff --git a/lustre/kernel_patches/patches/export-show_task-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export-show_task-2.6.18-vanilla.patch deleted file mode 100644 index 834c886c30..0000000000 --- a/lustre/kernel_patches/patches/export-show_task-2.6.18-vanilla.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: linux-2.6/kernel/sched.c -=================================================================== ---- linux-2.6.orig/kernel/sched.c 2006-07-15 11:51:46.000000000 +0800 -+++ linux-2.6/kernel/sched.c 2006-07-15 16:24:35.000000000 +0800 -@@ -4652,7 +4652,7 @@ static inline struct task_struct *younge - - static const char stat_nam[] = "RSDTtZX"; - --static void show_task(struct task_struct *p) -+void show_task(struct task_struct *p) - { - struct task_struct *relative; - unsigned long free = 0; -@@ -4698,9 +4698,10 @@ static void show_task(struct task_struct - else - printk(" (NOTLB)\n"); - -- if (state != TASK_RUNNING) -+ if (state != TASK_RUNNING || p == current) - show_stack(p, NULL); - } -+EXPORT_SYMBOL(show_task); - - void show_state(void) - { diff --git a/lustre/kernel_patches/patches/export-truncate-2.6-suse.patch b/lustre/kernel_patches/patches/export-truncate-2.6-suse.patch deleted file mode 100644 index 3063be429b..0000000000 --- a/lustre/kernel_patches/patches/export-truncate-2.6-suse.patch +++ /dev/null @@ -1,37 +0,0 @@ - include/linux/mm.h | 2 ++ - mm/truncate.c | 4 ++-- - 2 files changed, 4 insertions(+), 2 deletions(-) - ---- linux-2.5.63/include/linux/mm.h~export-truncate-2.5.63 Mon May 5 18:08:15 2003 -+++ linux-2.5.63-root/include/linux/mm.h Mon May 5 18:08:58 2003 -@@ -540,6 +540,8 @@ can_vma_merge(struct vm_area_struct *vma - else - return 0; - } -+/* truncate.c */ -+extern void truncate_complete_page(struct address_space *mapping,struct page *); - - /* filemap.c */ - extern unsigned long page_unuse(struct page *); ---- linux-2.5.63/mm/truncate.c~export-truncate-2.5.63 Mon May 5 18:09:50 2003 -+++ linux-2.5.63-root/mm/truncate.c Mon May 5 18:11:29 2003 -@@ -41,7 +41,7 @@ static inline void truncate_partial_page - * its lock, b) when a concurrent invalidate_inode_pages got there first and - * c) when tmpfs swizzles a page between a tmpfs inode and swapper_space. - */ --static void -+void - truncate_complete_page(struct address_space *mapping, struct page *page) - { - if (page->mapping != mapping) -@@ -56,7 +56,7 @@ truncate_complete_page(struct address_sp - remove_from_page_cache(page); - page_cache_release(page); /* pagecache ref */ - } -- -+EXPORT_SYMBOL_GPL(truncate_complete_page); - /* - * This is for invalidate_inode_pages(). That function can be called at - * any time, and is not supposed to throw away dirty pages. But pages can - -_ diff --git a/lustre/kernel_patches/patches/export-truncate-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export-truncate-2.6.18-vanilla.patch deleted file mode 100644 index f956ef4681..0000000000 --- a/lustre/kernel_patches/patches/export-truncate-2.6.18-vanilla.patch +++ /dev/null @@ -1,39 +0,0 @@ - include/linux/mm.h | 2 ++ - mm/truncate.c | 4 ++-- - 2 files changed, 4 insertions(+), 2 deletions(-) - -Index: linux-2.6/include/linux/mm.h -=================================================================== ---- linux-2.6.orig/include/linux/mm.h 2006-07-06 23:41:48.000000000 +0800 -+++ linux-2.6/include/linux/mm.h 2006-07-15 12:55:07.000000000 +0800 -@@ -529,6 +529,8 @@ static __always_inline void *lowmem_page - { - return __va(page_to_pfn(page) << PAGE_SHIFT); - } -+/* truncate.c */ -+extern void truncate_complete_page(struct address_space *mapping,struct page *); - - #if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL) - #define HASHED_PAGE_VIRTUAL -Index: linux-2.6/mm/truncate.c -=================================================================== ---- linux-2.6.orig/mm/truncate.c 2006-06-24 14:22:39.000000000 +0800 -+++ linux-2.6/mm/truncate.c 2006-07-15 12:55:07.000000000 +0800 -@@ -33,7 +33,7 @@ static inline void truncate_partial_page - * its lock, b) when a concurrent invalidate_inode_pages got there first and - * c) when tmpfs swizzles a page between a tmpfs inode and swapper_space. - */ --static void -+void - truncate_complete_page(struct address_space *mapping, struct page *page) - { - if (page->mapping != mapping) -@@ -48,7 +48,7 @@ truncate_complete_page(struct address_sp - remove_from_page_cache(page); - page_cache_release(page); /* pagecache ref */ - } -- -+EXPORT_SYMBOL_GPL(truncate_complete_page); - /* - * This is for invalidate_inode_pages(). That function can be called at - * any time, and is not supposed to throw away dirty pages. But pages can diff --git a/lustre/kernel_patches/patches/export_symbol_numa-2.6-fc5.patch b/lustre/kernel_patches/patches/export_symbol_numa-2.6-fc5.patch deleted file mode 100644 index 095c1def40..0000000000 --- a/lustre/kernel_patches/patches/export_symbol_numa-2.6-fc5.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: linux-2.6.16.i686/arch/i386/kernel/smpboot.c -=================================================================== ---- linux-2.6.16.i686.orig/arch/i386/kernel/smpboot.c 2006-05-30 15:47:03.000000000 +0800 -+++ linux-2.6.16.i686/arch/i386/kernel/smpboot.c 2006-05-30 21:22:02.000000000 +0800 -@@ -579,6 +579,7 @@ - /* which logical CPUs are on which nodes */ - cpumask_t node_2_cpu_mask[MAX_NUMNODES] __read_mostly = - { [0 ... MAX_NUMNODES-1] = CPU_MASK_NONE }; -+EXPORT_SYMBOL(node_2_cpu_mask); - /* which node each logical CPU is on */ - int cpu_2_node[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = 0 }; - EXPORT_SYMBOL(cpu_2_node); diff --git a/lustre/kernel_patches/patches/export_symbol_numa-2.6.18.patch b/lustre/kernel_patches/patches/export_symbol_numa-2.6.18.patch deleted file mode 100644 index a15b2872aa..0000000000 --- a/lustre/kernel_patches/patches/export_symbol_numa-2.6.18.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: linux-2.6.18.8/arch/i386/kernel/smpboot.c -=================================================================== ---- linux-2.6.18.8.orig/arch/i386/kernel/smpboot.c 2007-06-05 13:20:25.000000000 +0200 -+++ linux-2.6.18.8/arch/i386/kernel/smpboot.c 2007-06-05 13:20:33.000000000 +0200 -@@ -607,6 +607,7 @@ extern struct { - /* which logical CPUs are on which nodes */ - cpumask_t node_2_cpu_mask[MAX_NUMNODES] __read_mostly = - { [0 ... MAX_NUMNODES-1] = CPU_MASK_NONE }; -+EXPORT_SYMBOL(node_2_cpu_mask); - /* which node each logical CPU is on */ - int cpu_2_node[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = 0 }; - EXPORT_SYMBOL(cpu_2_node); -Index: linux-2.6.18.8/arch/ia64/kernel/numa.c -=================================================================== ---- linux-2.6.18.8.orig/arch/ia64/kernel/numa.c 2007-06-05 13:21:04.000000000 +0200 -+++ linux-2.6.18.8/arch/ia64/kernel/numa.c 2007-06-05 13:21:28.000000000 +0200 -@@ -28,6 +28,7 @@ u16 cpu_to_node_map[NR_CPUS] __cacheline - EXPORT_SYMBOL(cpu_to_node_map); - - cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; -+EXPORT_SYMBOL(node_to_cpu_mask); - - void __cpuinit map_cpu_to_node(int cpu, int nid) - { diff --git a/lustre/kernel_patches/patches/export_symbol_numa.patch b/lustre/kernel_patches/patches/export_symbol_numa.patch deleted file mode 100644 index 17ab1e24e3..0000000000 --- a/lustre/kernel_patches/patches/export_symbol_numa.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: linux-2.6.9-5.0.3.EL/arch/ia64/kernel/smpboot.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/arch/ia64/kernel/smpboot.c 2004-10-18 15:53:43.000000000 -0600 -+++ linux-2.6.9-5.0.3.EL/arch/ia64/kernel/smpboot.c 2005-09-28 16:02:16.000000000 -0600 -@@ -485,6 +485,7 @@ - EXPORT_SYMBOL(cpu_to_node_map); - /* which logical CPUs are on which nodes */ - cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; -+EXPORT_SYMBOL(node_to_cpu_mask); - - /* - * Build cpu to node mapping and initialize the per node cpu masks. -Index: linux-2.6.9-5.0.3.EL/arch/i386/kernel/smpboot.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/arch/i386/kernel/smpboot.c 2004-10-18 15:54:08.000000000 -0600 -+++ linux-2.6.9-5.0.3.EL/arch/i386/kernel/smpboot.c 2005-09-28 16:28:12.000000000 -0600 -@@ -474,6 +474,7 @@ - /* which logical CPUs are on which nodes */ - cpumask_t node_2_cpu_mask[MAX_NUMNODES] = - { [0 ... MAX_NUMNODES-1] = CPU_MASK_NONE }; -+EXPORT_SYMBOL(node_2_cpu_mask); - /* which node each logical CPU is on */ - int cpu_2_node[NR_CPUS] = { [0 ... NR_CPUS-1] = 0 }; - EXPORT_SYMBOL(cpu_2_node); diff --git a/lustre/kernel_patches/patches/export_symbols-2.6-rhel4.patch b/lustre/kernel_patches/patches/export_symbols-2.6-rhel4.patch deleted file mode 100644 index 0561e65db4..0000000000 --- a/lustre/kernel_patches/patches/export_symbols-2.6-rhel4.patch +++ /dev/null @@ -1,81 +0,0 @@ -Index: linux-2.6.9-5.0.3.EL/fs/filesystems.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/fs/filesystems.c 2005-02-26 13:24:35.467813664 +0200 -+++ linux-2.6.9-5.0.3.EL/fs/filesystems.c 2005-02-26 13:53:13.794588288 +0200 -@@ -27,7 +27,9 @@ - */ - - static struct file_system_type *file_systems; --static rwlock_t file_systems_lock = RW_LOCK_UNLOCKED; -+rwlock_t file_systems_lock = RW_LOCK_UNLOCKED; -+ -+EXPORT_SYMBOL(file_systems_lock); - - /* WARNING: This can be used only if we _already_ own a reference */ - void get_filesystem(struct file_system_type *fs) -Index: linux-2.6.9-5.0.3.EL/include/linux/fs.h -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/include/linux/fs.h 2005-02-26 13:47:37.330738568 +0200 -+++ linux-2.6.9-5.0.3.EL/include/linux/fs.h 2005-02-26 13:53:13.796587984 +0200 -@@ -1529,6 +1529,7 @@ - - extern struct file_operations generic_ro_fops; - -+extern rwlock_t file_systems_lock; - #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) - - extern int vfs_readlink(struct dentry *, char __user *, int, const char *); -Index: linux-2.6.9-5.0.3.EL/include/linux/ext2_fs_sb.h -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/include/linux/ext2_fs_sb.h 2005-02-26 13:24:35.470813208 +0200 -+++ linux-2.6.9-5.0.3.EL/include/linux/ext2_fs_sb.h 2005-02-26 13:53:13.797587832 +0200 -@@ -16,9 +16,11 @@ - #ifndef _LINUX_EXT2_FS_SB - #define _LINUX_EXT2_FS_SB - -+#ifndef EXT_INCLUDE -+#define EXT_INCLUDE - #include <linux/blockgroup_lock.h> - #include <linux/percpu_counter.h> -- -+#endif - /* - * second extended-fs super-block data in memory - */ -Index: linux-2.6.9-5.0.3.EL/fs/namespace.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/fs/namespace.c 2005-02-26 13:47:31.282658016 +0200 -+++ linux-2.6.9-5.0.3.EL/fs/namespace.c 2005-02-26 13:53:13.803586920 +0200 -@@ -1241,6 +1241,7 @@ - mntput(old_pwdmnt); - } - } -+EXPORT_SYMBOL(set_fs_pwd); - - static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd) - { -Index: linux-2.6.9-5.0.3.EL/kernel/exit.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/kernel/exit.c 2005-02-26 13:47:31.300655280 +0200 -+++ linux-2.6.9-5.0.3.EL/kernel/exit.c 2005-02-26 13:53:13.805586616 +0200 -@@ -244,6 +244,8 @@ - write_unlock_irq(&tasklist_lock); - } - -+EXPORT_SYMBOL(reparent_to_init); -+ - void __set_special_pids(pid_t session, pid_t pgrp) - { - struct task_struct *curr = current; -Index: linux-2.6.9-5.0.3.EL/fs/dcache.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/fs/dcache.c 2005-02-26 13:49:04.365507272 +0200 -+++ linux-2.6.9-5.0.3.EL/fs/dcache.c 2005-02-26 13:53:13.807586312 +0200 -@@ -1526,6 +1526,7 @@ - - return result; - } -+EXPORT_SYMBOL(is_subdir); - - void d_genocide(struct dentry *root) - { diff --git a/lustre/kernel_patches/patches/export_symbols-2.6-suse.patch b/lustre/kernel_patches/patches/export_symbols-2.6-suse.patch deleted file mode 100644 index 8360ce4394..0000000000 --- a/lustre/kernel_patches/patches/export_symbols-2.6-suse.patch +++ /dev/null @@ -1,57 +0,0 @@ -Index: linux-2.6.4-51.0/fs/filesystems.c -=================================================================== ---- linux-2.6.4-51.0.orig/fs/filesystems.c 2004-04-05 12:41:59.000000000 -0400 -+++ linux-2.6.4-51.0/fs/filesystems.c 2004-04-15 14:59:56.000000000 -0400 -@@ -27,7 +27,9 @@ - */ - - static struct file_system_type *file_systems; --static rwlock_t file_systems_lock = RW_LOCK_UNLOCKED; -+rwlock_t file_systems_lock = RW_LOCK_UNLOCKED; -+ -+EXPORT_SYMBOL(file_systems_lock); - - /* WARNING: This can be used only if we _already_ own a reference */ - void get_filesystem(struct file_system_type *fs) -Index: linux-2.6.4-51.0/include/linux/fs.h -=================================================================== ---- linux-2.6.4-51.0.orig/include/linux/fs.h 2004-04-15 14:59:50.000000000 -0400 -+++ linux-2.6.4-51.0/include/linux/fs.h 2004-04-15 14:59:56.000000000 -0400 -@@ -1432,6 +1432,7 @@ - - extern struct file_operations generic_ro_fops; - -+extern rwlock_t file_systems_lock; - #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) - - extern int vfs_readlink(struct dentry *, char __user *, int, const char *); -Index: linux-2.6.4-51.0/include/linux/ext2_fs_sb.h -=================================================================== ---- linux-2.6.4-51.0.orig/include/linux/ext2_fs_sb.h 2004-04-05 12:42:07.000000000 -0400 -+++ linux-2.6.4-51.0/include/linux/ext2_fs_sb.h 2004-04-15 14:59:56.000000000 -0400 -@@ -16,9 +16,11 @@ - #ifndef _LINUX_EXT2_FS_SB - #define _LINUX_EXT2_FS_SB - -+#ifndef EXT_INCLUDE -+#define EXT_INCLUDE - #include <linux/blockgroup_lock.h> - #include <linux/percpu_counter.h> -- -+#endif - /* - * second extended-fs super-block data in memory - */ -Index: linux-2.6.5-12.1/kernel/exit.c -=================================================================== ---- linux-2.6.5-12.1.orig/kernel/exit.c 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/kernel/exit.c 2004-06-03 18:31:28.000000000 -0400 -@@ -260,6 +260,8 @@ - write_unlock_irq(&tasklist_lock); - } - -+EXPORT_SYMBOL(reparent_to_init); -+ - void __set_special_pids(pid_t session, pid_t pgrp) - { - struct task_struct *curr = current; diff --git a/lustre/kernel_patches/patches/export_symbols-2.6.12.patch b/lustre/kernel_patches/patches/export_symbols-2.6.12.patch deleted file mode 100644 index e21fcf42c5..0000000000 --- a/lustre/kernel_patches/patches/export_symbols-2.6.12.patch +++ /dev/null @@ -1,64 +0,0 @@ -Index: linux-2.6.12-rc6/fs/filesystems.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/filesystems.c 2005-06-06 17:22:29.000000000 +0200 -+++ linux-2.6.12-rc6/fs/filesystems.c 2005-06-14 15:53:58.298522852 +0200 -@@ -28,7 +28,9 @@ - */ - - static struct file_system_type *file_systems; --static DEFINE_RWLOCK(file_systems_lock); -+DEFINE_RWLOCK(file_systems_lock); -+ -+EXPORT_SYMBOL(file_systems_lock); - - /* WARNING: This can be used only if we _already_ own a reference */ - void get_filesystem(struct file_system_type *fs) -Index: linux-2.6.12-rc6/include/linux/fs.h -=================================================================== ---- linux-2.6.12-rc6.orig/include/linux/fs.h 2005-06-14 15:53:18.356140529 +0200 -+++ linux-2.6.12-rc6/include/linux/fs.h 2005-06-14 15:53:58.309265039 +0200 -@@ -1563,6 +1563,7 @@ - - extern struct file_operations generic_ro_fops; - -+extern rwlock_t file_systems_lock; - #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) - - extern int vfs_readlink(struct dentry *, char __user *, int, const char *); -Index: linux-2.6.12-rc6/fs/namespace.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/namespace.c 2005-06-14 15:53:17.868835847 +0200 -+++ linux-2.6.12-rc6/fs/namespace.c 2005-06-14 15:53:58.361022851 +0200 -@@ -1240,6 +1240,7 @@ - mntput(old_pwdmnt); - } - } -+EXPORT_SYMBOL(set_fs_pwd); - - static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd) - { -Index: linux-2.6.12.5/kernel/exit.c -=================================================================== ---- linux-2.6.12.5.orig/kernel/exit.c 2005-08-17 17:51:28.000000000 +0200 -+++ linux-2.6.12.5/kernel/exit.c 2005-08-17 17:51:44.000000000 +0200 -@@ -250,6 +250,8 @@ - switch_uid(INIT_USER); - } - -+EXPORT_SYMBOL(reparent_to_init); -+ - void __set_special_pids(pid_t session, pid_t pgrp) - { - struct task_struct *curr = current; -Index: linux-2.6.12-rc6/fs/dcache.c -=================================================================== ---- linux-2.6.12-rc6.orig/fs/dcache.c 2005-06-14 15:53:19.812195198 +0200 -+++ linux-2.6.12-rc6/fs/dcache.c 2005-06-14 15:53:58.385436913 +0200 -@@ -1581,6 +1581,7 @@ - - return result; - } -+EXPORT_SYMBOL(is_subdir); - - void d_genocide(struct dentry *root) - { diff --git a/lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch deleted file mode 100644 index 18a9815bb1..0000000000 --- a/lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch +++ /dev/null @@ -1,64 +0,0 @@ -Index: linux-2.6/fs/filesystems.c -=================================================================== ---- linux-2.6.orig/fs/filesystems.c 2006-07-15 16:08:35.000000000 +0800 -+++ linux-2.6/fs/filesystems.c 2006-07-15 16:14:19.000000000 +0800 -@@ -29,7 +29,9 @@ - */ - - static struct file_system_type *file_systems; --static DEFINE_RWLOCK(file_systems_lock); -+DEFINE_RWLOCK(file_systems_lock); -+ -+EXPORT_SYMBOL(file_systems_lock); - - /* WARNING: This can be used only if we _already_ own a reference */ - void get_filesystem(struct file_system_type *fs) -Index: linux-2.6/include/linux/fs.h -=================================================================== ---- linux-2.6.orig/include/linux/fs.h 2006-07-15 16:10:37.000000000 +0800 -+++ linux-2.6/include/linux/fs.h 2006-07-15 16:14:19.000000000 +0800 -@@ -1768,6 +1768,7 @@ static inline ssize_t blockdev_direct_IO - - extern const struct file_operations generic_ro_fops; - -+extern rwlock_t file_systems_lock; - #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) - - extern int vfs_readlink(struct dentry *, char __user *, int, const char *); -Index: linux-2.6/fs/namespace.c -=================================================================== ---- linux-2.6.orig/fs/namespace.c 2006-07-15 16:10:33.000000000 +0800 -+++ linux-2.6/fs/namespace.c 2006-07-15 16:14:19.000000000 +0800 -@@ -1641,6 +1641,7 @@ void set_fs_pwd(struct fs_struct *fs, st - mntput(old_pwdmnt); - } - } -+EXPORT_SYMBOL(set_fs_pwd); - - static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd) - { -Index: linux-2.6/kernel/exit.c -=================================================================== ---- linux-2.6.orig/kernel/exit.c 2006-07-15 16:08:34.000000000 +0800 -+++ linux-2.6/kernel/exit.c 2006-07-15 16:14:19.000000000 +0800 -@@ -305,6 +305,8 @@ static void reparent_to_init(void) - switch_uid(INIT_USER); - } - -+EXPORT_SYMBOL(reparent_to_init); -+ - void __set_special_pids(pid_t session, pid_t pgrp) - { - struct task_struct *curr = current->group_leader; -Index: linux-2.6/fs/dcache.c -=================================================================== ---- linux-2.6.orig/fs/dcache.c 2006-07-15 16:14:00.000000000 +0800 -+++ linux-2.6/fs/dcache.c 2006-07-15 16:14:19.000000000 +0800 -@@ -1628,6 +1628,7 @@ int is_subdir(struct dentry * new_dentry - - return result; - } -+EXPORT_SYMBOL(is_subdir); - - void d_genocide(struct dentry *root) - { diff --git a/lustre/kernel_patches/patches/export_symbols-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/export_symbols-2.6.22-vanilla.patch deleted file mode 100644 index 9dbf6c517a..0000000000 --- a/lustre/kernel_patches/patches/export_symbols-2.6.22-vanilla.patch +++ /dev/null @@ -1,51 +0,0 @@ -Index: linux-2.6.22.5/fs/filesystems.c -=================================================================== ---- linux-2.6.22.5.orig/fs/filesystems.c 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/fs/filesystems.c 2008-02-21 00:58:18.000000000 -0700 -@@ -28,7 +28,9 @@ - */ - - static struct file_system_type *file_systems; --static DEFINE_RWLOCK(file_systems_lock); -+DEFINE_RWLOCK(file_systems_lock); -+ -+EXPORT_SYMBOL(file_systems_lock); - - /* WARNING: This can be used only if we _already_ own a reference */ - void get_filesystem(struct file_system_type *fs) -Index: linux-2.6.22.5/fs/namespace.c -=================================================================== ---- linux-2.6.22.5.orig/fs/namespace.c 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/fs/namespace.c 2008-02-21 00:58:18.000000000 -0700 -@@ -1617,6 +1617,7 @@ - mntput(old_pwdmnt); - } - } -+EXPORT_SYMBOL(set_fs_pwd); - - static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd) - { -Index: linux-2.6.22.5/fs/dcache.c -=================================================================== ---- linux-2.6.22.5.orig/fs/dcache.c 2008-02-21 00:57:02.000000000 -0700 -+++ linux-2.6.22.5/fs/dcache.c 2008-02-21 00:58:18.000000000 -0700 -@@ -2027,6 +2027,7 @@ - - return result; - } -+EXPORT_SYMBOL(is_subdir); - - void d_genocide(struct dentry *root) - { -Index: linux-2.6.22.5/include/linux/fs.h -=================================================================== ---- linux-2.6.22.5.orig/include/linux/fs.h 2008-02-21 00:56:39.000000000 -0700 -+++ linux-2.6.22.5/include/linux/fs.h 2008-02-21 00:58:18.000000000 -0700 -@@ -1861,6 +1861,7 @@ - - extern const struct file_operations generic_ro_fops; - -+extern rwlock_t file_systems_lock; - #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) - - extern int vfs_readlink(struct dentry *, char __user *, int, const char *); diff --git a/lustre/kernel_patches/patches/ext3-patch-fuzz-fixup-fc3.patch b/lustre/kernel_patches/patches/ext3-patch-fuzz-fixup-fc3.patch deleted file mode 100644 index b9abca9dc1..0000000000 --- a/lustre/kernel_patches/patches/ext3-patch-fuzz-fixup-fc3.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: uml/include/linux/ext3_fs.h -=================================================================== ---- uml.orig/include/linux/ext3_fs.h 2004-12-24 16:34:58.000000000 -0500 -+++ uml/include/linux/ext3_fs.h 2005-04-15 00:10:56.220649968 -0400 -@@ -353,8 +353,8 @@ - #define EXT3_MOUNT_NO_UID32 0x02000 /* Disable 32-bit UIDs */ - #define EXT3_MOUNT_XATTR_USER 0x04000 /* Extended user attributes */ - #define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ --#define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */ --#define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ -+#define EXT3_MOUNT_BARRIER 0x10000 /* Use block barriers */ -+#define EXT3_MOUNT_RESERVATION 0x20000 /* Preallocation */ - - /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ - #ifndef _LINUX_EXT2_FS_H diff --git a/lustre/kernel_patches/patches/ext3-super-ntohl.patch b/lustre/kernel_patches/patches/ext3-super-ntohl.patch deleted file mode 100644 index 3214908080..0000000000 --- a/lustre/kernel_patches/patches/ext3-super-ntohl.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -rupN linux-2.6.6.old/fs/ext3/super.c linux-2.6.6.new/fs/ext3/super.c ---- linux-2.6.6.old/fs/ext3/super.c Mon May 10 05:33:19 2004 -+++ linux-2.6.6.new/fs/ext3/super.c Thu Jun 24 12:28:24 2004 -@@ -1719,10 +1719,10 @@ static journal_t *ext3_get_dev_journal(s - printk(KERN_ERR "EXT3-fs: I/O error on journal device\n"); - goto out_journal; - } -- if (ntohl(journal->j_superblock->s_nr_users) != 1) { -+ if (be32_to_cpu(journal->j_superblock->s_nr_users) != 1) { - printk(KERN_ERR "EXT3-fs: External journal has more than one " - "user (unsupported) - %d\n", -- ntohl(journal->j_superblock->s_nr_users)); -+ be32_to_cpu(journal->j_superblock->s_nr_users)); - goto out_journal; - } - EXT3_SB(sb)->journal_bdev = bdev; diff --git a/lustre/kernel_patches/patches/fc3_to_rhel4_updates.patch b/lustre/kernel_patches/patches/fc3_to_rhel4_updates.patch deleted file mode 100644 index 228670705a..0000000000 --- a/lustre/kernel_patches/patches/fc3_to_rhel4_updates.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: linux-2.6.10/include/linux/namei.h -=================================================================== ---- linux-2.6.10.orig/include/linux/namei.h 2005-04-06 09:38:35.000000000 -0600 -+++ linux-2.6.10/include/linux/namei.h 2006-01-03 15:32:11.000000000 -0700 -@@ -46,6 +46,7 @@ - #define LOOKUP_PARENT 16 - #define LOOKUP_NOALT 32 - #define LOOKUP_ATOMIC 64 -+#define LOOKUP_REVAL 128 - - /* - * Intent data diff --git a/lustre/kernel_patches/patches/fmode-exec-2.6-sles10.patch b/lustre/kernel_patches/patches/fmode-exec-2.6-sles10.patch deleted file mode 100644 index 8ba560c940..0000000000 --- a/lustre/kernel_patches/patches/fmode-exec-2.6-sles10.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: LINUX-SRC-TREE/include/linux/fs.h -=================================================================== ---- LINUX-SRC-TREE.orig/include/linux/fs.h -+++ LINUX-SRC-TREE/include/linux/fs.h -@@ -61,6 +61,7 @@ extern int dir_notify_enable; - - #define FMODE_READ 1 - #define FMODE_WRITE 2 -+#define FMODE_EXEC 16 - - /* Internal kernel extensions */ - #define FMODE_LSEEK 4 -Index: LINUX-SRC-TREE/fs/exec.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/exec.c -+++ LINUX-SRC-TREE/fs/exec.c -@@ -129,7 +129,8 @@ asmlinkage long sys_uselib(const char __ - struct nameidata nd; - int error; - -- error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ); -+ error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, -+ FMODE_READ | FMODE_EXEC); - if (error) - goto out; - -@@ -481,7 +483,8 @@ struct file *open_exec(const char *name) - int err; - struct file *file; - -- err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ); -+ err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, -+ FMODE_READ | FMODE_EXEC); - file = ERR_PTR(err); - - if (!err) { diff --git a/lustre/kernel_patches/patches/fsprivate-2.6.patch b/lustre/kernel_patches/patches/fsprivate-2.6.patch deleted file mode 100644 index a5c3d48702..0000000000 --- a/lustre/kernel_patches/patches/fsprivate-2.6.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- linux-2.6.5-7.141/include/linux/fs.h.orig 2005-02-01 23:56:07.000000000 +0200 -+++ linux-2.6.5-7.141/include/linux/fs.h 2005-05-18 23:23:15.486142728 +0300 -@@ -574,6 +574,7 @@ - #endif /* #ifdef CONFIG_EPOLL */ - struct address_space *f_mapping; - struct lookup_intent *f_it; -+ void *fs_private; - }; - extern spinlock_t files_lock; - #define file_list_lock() spin_lock(&files_lock); diff --git a/lustre/kernel_patches/patches/header-guards-2.6-suse.patch b/lustre/kernel_patches/patches/header-guards-2.6-suse.patch deleted file mode 100644 index c0940cdaa9..0000000000 --- a/lustre/kernel_patches/patches/header-guards-2.6-suse.patch +++ /dev/null @@ -1,38 +0,0 @@ -Index: linux-2.6.4-30.1/include/linux/percpu_counter.h -=================================================================== ---- linux-2.6.4-30.1.orig/include/linux/percpu_counter.h 2004-03-26 03:33:43.000000000 -0500 -+++ linux-2.6.4-30.1/include/linux/percpu_counter.h 2004-04-02 02:09:30.000000000 -0500 -@@ -3,6 +3,8 @@ - * - * WARNING: these things are HUGE. 4 kbytes per counter on 32-way P4. - */ -+#ifndef _LINUX_PERCPU_COUNTER_H -+#define _LINUX_PERCPU_COUNTER_H - - #include <linux/config.h> - #include <linux/spinlock.h> -@@ -101,3 +103,5 @@ - { - percpu_counter_mod(fbc, -1); - } -+ -+#endif /* _LINUX_PERCPU_COUNTER_H */ -Index: linux-2.6.4-30.1/include/linux/blockgroup_lock.h -=================================================================== ---- linux-2.6.4-30.1.orig/include/linux/blockgroup_lock.h 2004-03-26 03:33:43.000000000 -0500 -+++ linux-2.6.4-30.1/include/linux/blockgroup_lock.h 2004-04-02 02:14:20.000000000 -0500 -@@ -3,6 +3,8 @@ - * - * Simple hashed spinlocking. - */ -+#ifndef _LINUX_BLOCKGROUP_LOCK_H -+#define _LINUX_BLOCKGROUP_LOCK_H - - #include <linux/config.h> - #include <linux/spinlock.h> -@@ -55,4 +57,4 @@ - #define sb_bgl_lock(sb, block_group) \ - (&(sb)->s_blockgroup_lock.locks[(block_group) & (NR_BG_LOCKS-1)].lock) - -- -+#endif diff --git a/lustre/kernel_patches/patches/hostfs_readdir_large.patch b/lustre/kernel_patches/patches/hostfs_readdir_large.patch deleted file mode 100644 index 6ca6afdd5d..0000000000 --- a/lustre/kernel_patches/patches/hostfs_readdir_large.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: linux-2.6.10/fs/hostfs/hostfs_user.c -=================================================================== ---- linux-2.6.10.orig/fs/hostfs/hostfs_user.c 2004-12-25 05:35:15.000000000 +0800 -+++ linux-2.6.10/fs/hostfs/hostfs_user.c 2005-03-31 19:26:03.810175656 +0800 -@@ -121,13 +121,26 @@ - { - DIR *dir = stream; - struct dirent *ent; -+ off_t off = 0; -+ off_t after_seek = 0; -+ off_t after_readdir = 0; -+ off_t after_readdir2 = 0; - - seekdir(dir, *pos); -+ after_seek = telldir(dir); - ent = readdir(dir); -+ after_readdir = telldir(dir); -+ if ( after_seek != after_readdir ) { -+ off = after_readdir; -+ } else { -+ readdir(dir); -+ after_readdir2 = telldir(dir); -+ off = after_readdir2; -+ } - if(ent == NULL) return(NULL); - *len_out = strlen(ent->d_name); - *ino_out = ent->d_ino; -- *pos = telldir(dir); -+ *pos = off; - return(ent->d_name); - } - diff --git a/lustre/kernel_patches/patches/i_filter_data.patch b/lustre/kernel_patches/patches/i_filter_data.patch deleted file mode 100644 index 8a21a9e6c5..0000000000 --- a/lustre/kernel_patches/patches/i_filter_data.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: linux-2.6.18.8/include/linux/fs.h -=================================================================== ---- linux-2.6.18.8.orig/include/linux/fs.h 2007-06-05 12:55:19.000000000 +0200 -+++ linux-2.6.18.8/include/linux/fs.h 2007-06-05 12:55:44.000000000 +0200 -@@ -533,6 +533,7 @@ struct inode { - struct block_device *i_bdev; - struct cdev *i_cdev; - int i_cindex; -+ void *i_filterdata; - - __u32 i_generation; - diff --git a/lustre/kernel_patches/patches/iallocsem_consistency.patch b/lustre/kernel_patches/patches/iallocsem_consistency.patch deleted file mode 100644 index 916ba88f45..0000000000 --- a/lustre/kernel_patches/patches/iallocsem_consistency.patch +++ /dev/null @@ -1,48 +0,0 @@ -Index: linux-2.6.9/fs/attr.c -=================================================================== ---- linux-2.6.9/fs.orig/attr.c 2006-03-10 17:20:39.000000000 +0200 -+++ linux-2.6.9/fs/attr.c 2006-04-09 01:21:44.000000000 +0300 -@@ -177,6 +177,9 @@ - if (!attr->ia_valid) - return 0; - -+ if (ia_valid & ATTR_SIZE) -+ down_write(&dentry->d_inode->i_alloc_sem); -+ - if (inode->i_op && inode->i_op->setattr) { - audit_notify_watch(inode, MAY_WRITE); - error = security_inode_setattr(dentry, attr); -@@ -194,6 +197,10 @@ - error = inode_setattr(inode, attr); - } - } -+ -+ if (ia_valid & ATTR_SIZE) -+ up_write(&dentry->d_inode->i_alloc_sem); -+ - if (!error) { - unsigned long dn_mask = setattr_mask(ia_valid); - if (dn_mask) -Index: linux-2.6.9/fs/open.c -=================================================================== ---- linux-2.6.9/fs.orig/open.c 2006-04-09 01:18:08.000000000 +0300 -+++ linux-2.6.9/fs/open.c 2006-04-09 01:22:29.000000000 +0300 -@@ -205,16 +205,16 @@ - newattrs.ia_size = length; - newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME; - down(&dentry->d_inode->i_sem); -- down_write(&dentry->d_inode->i_alloc_sem); - if (called_from_open) - newattrs.ia_valid |= ATTR_FROM_OPEN; - if (op->setattr_raw) { - newattrs.ia_valid |= ATTR_RAW; - newattrs.ia_ctime = CURRENT_TIME; -+ down_write(&dentry->d_inode->i_alloc_sem); - err = op->setattr_raw(dentry->d_inode, &newattrs); -+ up_write(&dentry->d_inode->i_alloc_sem); - } else - err = notify_change(dentry, &newattrs); -- up_write(&dentry->d_inode->i_alloc_sem); - up(&dentry->d_inode->i_sem); - return err; - } diff --git a/lustre/kernel_patches/patches/inode-nr_unused-2.6.9-rhel4.patch b/lustre/kernel_patches/patches/inode-nr_unused-2.6.9-rhel4.patch deleted file mode 100644 index 250822123e..0000000000 --- a/lustre/kernel_patches/patches/inode-nr_unused-2.6.9-rhel4.patch +++ /dev/null @@ -1,47 +0,0 @@ -Index: RH_2_6_9_55/fs/fs-writeback.c -=================================================================== ---- RH_2_6_9_55.orig/fs/fs-writeback.c -+++ RH_2_6_9_55/fs/fs-writeback.c -@@ -230,7 +230,6 @@ - * The inode is clean, unused - */ - list_move(&inode->i_list, &inode_unused); -- inodes_stat.nr_unused++; - } - } - wake_up_inode(inode); -@@ -244,6 +243,11 @@ - __writeback_single_inode(struct inode *inode, - struct writeback_control *wbc) - { -+ if (!atomic_read(&inode->i_count)) -+ WARN_ON(!(inode->i_state & I_WILL_FREE)); -+ else -+ WARN_ON(inode->i_state & I_WILL_FREE); -+ - if ((wbc->sync_mode != WB_SYNC_ALL) && (inode->i_state & I_LOCK)) { - list_move(&inode->i_list, &inode->i_sb->s_dirty); - return 0; -@@ -253,10 +257,8 @@ - * It's a data-integrity sync. We must wait. - */ - while (inode->i_state & I_LOCK) { -- __iget(inode); - spin_unlock(&inode_lock); - __wait_on_inode(inode); -- iput(inode); - spin_lock(&inode_lock); - } - return __sync_single_inode(inode, wbc); -Index: RH_2_6_9_55/fs/inode.c -=================================================================== ---- RH_2_6_9_55.orig/fs/inode.c -+++ RH_2_6_9_55/fs/inode.c -@@ -1056,6 +1056,7 @@ - if (inode->i_data.nrpages) - truncate_inode_pages(&inode->i_data, 0); - clear_inode(inode); -+ wake_up_inode(inode); - destroy_inode(inode); - } - diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6-fc3.patch b/lustre/kernel_patches/patches/iopen-misc-2.6-fc3.patch deleted file mode 100644 index 5fc42b58ca..0000000000 --- a/lustre/kernel_patches/patches/iopen-misc-2.6-fc3.patch +++ /dev/null @@ -1,82 +0,0 @@ -Index: linux-2.6.11/Documentation/filesystems/ext2.txt -=================================================================== ---- linux-2.6.11.orig/Documentation/filesystems/ext2.txt 2005-03-02 02:37:50.000000000 -0500 -+++ linux-2.6.11/Documentation/filesystems/ext2.txt 2005-04-13 22:49:42.116372414 -0400 -@@ -58,6 +58,22 @@ - - nobh Do not attach buffer_heads to file pagecache. - -+iopen Makes an invisible pseudo-directory called -+ __iopen__ available in the root directory -+ of the filesystem. Allows open-by-inode- -+ number. i.e., inode 3145 can be accessed -+ via /mntpt/__iopen__/3145 -+ -+iopen_nopriv This option makes the iopen directory be -+ world-readable. This may be safer since it -+ allows daemons to run as an unprivileged user, -+ however it significantly changes the security -+ model of a Unix filesystem, since previously -+ all files under a mode 700 directory were not -+ generally avilable even if the -+ permissions on the file itself is -+ world-readable. -+ - grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2. - - -Index: linux-2.6.11/fs/dcache.c -=================================================================== ---- linux-2.6.11.orig/fs/dcache.c 2005-04-13 22:44:50.482498026 -0400 -+++ linux-2.6.11/fs/dcache.c 2005-04-13 22:50:43.846174872 -0400 -@@ -1289,14 +1289,13 @@ - * dcache entries should not be moved in this way. - */ - --void d_move(struct dentry * dentry, struct dentry * target) -+void d_move_locked(struct dentry * dentry, struct dentry * target) - { - struct hlist_head *list; - - if (!dentry->d_inode) - printk(KERN_WARNING "VFS: moving negative dcache entry\n"); - -- spin_lock(&dcache_lock); - write_seqlock(&rename_lock); - /* - * XXXX: do we really need to take target->d_lock? -@@ -1356,6 +1355,14 @@ - spin_unlock(&target->d_lock); - spin_unlock(&dentry->d_lock); - write_sequnlock(&rename_lock); -+} -+ -+EXPORT_SYMBOL(d_move_locked); -+ -+void d_move(struct dentry *dentry, struct dentry *target) -+{ -+ spin_lock(&dcache_lock); -+ d_move_locked(dentry, target); - spin_unlock(&dcache_lock); - } - -Index: linux-2.6.11/include/linux/dcache.h -=================================================================== ---- linux-2.6.11.orig/include/linux/dcache.h 2005-04-13 22:44:53.777168980 -0400 -+++ linux-2.6.11/include/linux/dcache.h 2005-04-13 22:49:42.119372070 -0400 -@@ -239,6 +239,7 @@ - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues -@@ -274,6 +275,7 @@ - - /* used for rename() and baskets */ - extern void d_move(struct dentry *, struct dentry *); -+extern void d_move_locked(struct dentry *, struct dentry *); - - /* appendix may either be NULL or be used for transname suffixes */ - extern struct dentry * d_lookup(struct dentry *, struct qstr *); diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch b/lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch deleted file mode 100644 index d9ef03b2e0..0000000000 --- a/lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch +++ /dev/null @@ -1,69 +0,0 @@ -Index: linux-2.6.4-51.0/Documentation/filesystems/ext2.txt -=================================================================== ---- linux-2.6.4-51.0.orig/Documentation/filesystems/ext2.txt 2004-05-06 22:21:26.000000000 -0400 -+++ linux-2.6.4-51.0/Documentation/filesystems/ext2.txt 2004-05-06 22:24:42.000000000 -0400 -@@ -35,6 +35,22 @@ - - sb=n Use alternate superblock at this location. - -+iopen Makes an invisible pseudo-directory called -+ __iopen__ available in the root directory -+ of the filesystem. Allows open-by-inode- -+ number. i.e., inode 3145 can be accessed -+ via /mntpt/__iopen__/3145 -+ -+iopen_nopriv This option makes the iopen directory be -+ world-readable. This may be safer since it -+ allows daemons to run as an unprivileged user, -+ however it significantly changes the security -+ model of a Unix filesystem, since previously -+ all files under a mode 700 directory were not -+ generally avilable even if the -+ permissions on the file itself is -+ world-readable. -+ - grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2. - - -Index: linux-2.6.4-51.0/fs/dcache.c -=================================================================== ---- linux-2.6.4-51.0.orig/fs/dcache.c 2004-05-06 22:24:42.000000000 -0400 -+++ linux-2.6.4-51.0/fs/dcache.c 2004-05-06 22:58:37.000000000 -0400 -@@ -1195,7 +1195,7 @@ - * dcache entries should not be moved in this way. - */ - --static void d_move_locked(struct dentry * dentry, struct dentry * target) -+void d_move_locked(struct dentry * dentry, struct dentry * target) - { - struct hlist_head *list; - -@@ -1253,6 +1252,8 @@ - write_sequnlock(&rename_lock); - } - -+EXPORT_SYMBOL(d_move_locked); -+ - /** - * d_move - move a dentry - * @dentry: entry to move -Index: linux-2.6.4-51.0/include/linux/dcache.h -=================================================================== ---- linux-2.6.4-51.0.orig/include/linux/dcache.h 2004-05-06 22:24:42.000000000 -0400 -+++ linux-2.6.4-51.0/include/linux/dcache.h 2004-05-06 23:03:43.000000000 -0400 -@@ -234,6 +234,7 @@ - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues -@@ -252,6 +253,7 @@ - - /* used for rename() and baskets */ - extern void d_move(struct dentry *, struct dentry *); -+extern void d_move_locked(struct dentry *, struct dentry *); - - /* appendix may either be NULL or be used for transname suffixes */ - extern struct dentry * d_lookup(struct dentry *, struct qstr *); diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6.12.patch b/lustre/kernel_patches/patches/iopen-misc-2.6.12.patch deleted file mode 100644 index 4819ed58b1..0000000000 --- a/lustre/kernel_patches/patches/iopen-misc-2.6.12.patch +++ /dev/null @@ -1,112 +0,0 @@ -Index: linux-2.6.16.46-0.14/Documentation/filesystems/ext2.txt -=================================================================== ---- linux-2.6.16.46-0.14.orig/Documentation/filesystems/ext2.txt -+++ linux-2.6.16.46-0.14/Documentation/filesystems/ext2.txt -@@ -58,6 +58,22 @@ nobh Do not attach buffer_heads to fi - - xip Use execute in place (no caching) if possible - -+iopen Makes an invisible pseudo-directory called -+ __iopen__ available in the root directory -+ of the filesystem. Allows open-by-inode- -+ number. i.e., inode 3145 can be accessed -+ via /mntpt/__iopen__/3145 -+ -+iopen_nopriv This option makes the iopen directory be -+ world-readable. This may be safer since it -+ allows daemons to run as an unprivileged user, -+ however it significantly changes the security -+ model of a Unix filesystem, since previously -+ all files under a mode 700 directory were not -+ generally avilable even if the -+ permissions on the file itself is -+ world-readable. -+ - grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2. - - -Index: linux-2.6.16.46-0.14/fs/dcache.c -=================================================================== ---- linux-2.6.16.46-0.14.orig/fs/dcache.c -+++ linux-2.6.16.46-0.14/fs/dcache.c -@@ -1309,17 +1309,26 @@ static void __d_rehash(struct dentry * e - * Adds a dentry to the hash according to its name. - */ - --void d_rehash(struct dentry * entry) -+void d_rehash_cond(struct dentry * entry, int lock) - { - struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash); - -- spin_lock(&dcache_lock); -+ if (lock) -+ spin_lock(&dcache_lock); - spin_lock(&entry->d_lock); - __d_rehash(entry, list); - spin_unlock(&entry->d_lock); -- spin_unlock(&dcache_lock); -+ if (lock) -+ spin_unlock(&dcache_lock); - } - -+EXPORT_SYMBOL(d_rehash_cond); -+ -+void d_rehash(struct dentry * entry) -+{ -+ d_rehash_cond(entry, 1); -+ } -+ - #define do_switch(x,y) do { \ - __typeof__ (x) __tmp = x; \ - x = y; y = __tmp; } while (0) -@@ -1392,14 +1401,13 @@ static void switch_names(struct dentry * - * dcache entries should not be moved in this way. - */ - --void d_move(struct dentry * dentry, struct dentry * target) -+void d_move_locked(struct dentry * dentry, struct dentry * target) - { - struct hlist_head *list; - - if (!dentry->d_inode) - printk(KERN_WARNING "VFS: moving negative dcache entry\n"); - -- spin_lock(&dcache_lock); - write_seqlock(&rename_lock); - /* - * XXXX: do we really need to take target->d_lock? -@@ -1450,6 +1458,14 @@ already_unhashed: - fsnotify_d_move(dentry); - spin_unlock(&dentry->d_lock); - write_sequnlock(&rename_lock); -+} -+ -+EXPORT_SYMBOL(d_move_locked); -+ -+void d_move(struct dentry *dentry, struct dentry *target) -+{ -+ spin_lock(&dcache_lock); -+ d_move_locked(dentry, target); - spin_unlock(&dcache_lock); - } - -Index: linux-2.6.16.46-0.14/include/linux/dcache.h -=================================================================== ---- linux-2.6.16.46-0.14.orig/include/linux/dcache.h -+++ linux-2.6.16.46-0.14/include/linux/dcache.h -@@ -236,6 +236,7 @@ extern int have_submounts(struct dentry - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues -@@ -271,6 +272,7 @@ static inline struct dentry *d_add_uniqu - - /* used for rename() and baskets */ - extern void d_move(struct dentry *, struct dentry *); -+extern void d_move_locked(struct dentry *, struct dentry *); - - /* appendix may either be NULL or be used for transname suffixes */ - extern struct dentry * d_lookup(struct dentry *, struct qstr *); diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/iopen-misc-2.6.18-vanilla.patch deleted file mode 100644 index e614f492f3..0000000000 --- a/lustre/kernel_patches/patches/iopen-misc-2.6.18-vanilla.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: linux-2.6/Documentation/filesystems/ext2.txt -=================================================================== ---- linux-2.6.orig/Documentation/filesystems/ext2.txt 2006-04-03 22:46:38.000000000 +0800 -+++ linux-2.6/Documentation/filesystems/ext2.txt 2006-07-15 12:54:06.000000000 +0800 -@@ -58,6 +58,22 @@ nobh Do not attach buffer_heads to fi - - xip Use execute in place (no caching) if possible - -+iopen Makes an invisible pseudo-directory called -+ __iopen__ available in the root directory -+ of the filesystem. Allows open-by-inode- -+ number. i.e., inode 3145 can be accessed -+ via /mntpt/__iopen__/3145 -+ -+iopen_nopriv This option makes the iopen directory be -+ world-readable. This may be safer since it -+ allows daemons to run as an unprivileged user, -+ however it significantly changes the security -+ model of a Unix filesystem, since previously -+ all files under a mode 700 directory were not -+ generally avilable even if the -+ permissions on the file itself is -+ world-readable. -+ - grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2. - - -Index: linux-2.6/fs/dcache.c -=================================================================== ---- linux-2.6.orig/fs/dcache.c 2006-07-15 12:48:18.000000000 +0800 -+++ linux-2.6/fs/dcache.c 2006-07-15 12:54:06.000000000 +0800 -@@ -1341,14 +1341,13 @@ static void switch_names(struct dentry * - * dcache entries should not be moved in this way. - */ - --void d_move(struct dentry * dentry, struct dentry * target) -+void d_move_locked(struct dentry * dentry, struct dentry * target) - { - struct hlist_head *list; - - if (!dentry->d_inode) - printk(KERN_WARNING "VFS: moving negative dcache entry\n"); - -- spin_lock(&dcache_lock); - write_seqlock(&rename_lock); - /* - * XXXX: do we really need to take target->d_lock? -@@ -1399,6 +1398,14 @@ already_unhashed: - fsnotify_d_move(dentry); - spin_unlock(&dentry->d_lock); - write_sequnlock(&rename_lock); -+} -+ -+EXPORT_SYMBOL(d_move_locked); -+ -+void d_move(struct dentry *dentry, struct dentry *target) -+{ -+ spin_lock(&dcache_lock); -+ d_move_locked(dentry, target); - spin_unlock(&dcache_lock); - } - -Index: linux-2.6/include/linux/dcache.h -=================================================================== ---- linux-2.6.orig/include/linux/dcache.h 2006-07-15 12:48:41.000000000 +0800 -+++ linux-2.6/include/linux/dcache.h 2006-07-15 12:54:06.000000000 +0800 -@@ -292,6 +293,7 @@ static inline struct dentry *d_add_uniqu - - /* used for rename() and baskets */ - extern void d_move(struct dentry *, struct dentry *); -+extern void d_move_locked(struct dentry *, struct dentry *); - - /* appendix may either be NULL or be used for transname suffixes */ - extern struct dentry * d_lookup(struct dentry *, struct qstr *); diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/iopen-misc-2.6.22-vanilla.patch deleted file mode 100644 index aaf177b120..0000000000 --- a/lustre/kernel_patches/patches/iopen-misc-2.6.22-vanilla.patch +++ /dev/null @@ -1,68 +0,0 @@ -Index: linux-2.6.22.5/Documentation/filesystems/ext2.txt -=================================================================== ---- linux-2.6.22.5.orig/Documentation/filesystems/ext2.txt 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/Documentation/filesystems/ext2.txt 2008-02-21 00:57:02.000000000 -0700 -@@ -58,6 +58,22 @@ - - xip Use execute in place (no caching) if possible - -+iopen Makes an invisible pseudo-directory called -+ __iopen__ available in the root directory -+ of the filesystem. Allows open-by-inode- -+ number. i.e., inode 3145 can be accessed -+ via /mntpt/__iopen__/3145 -+ -+iopen_nopriv This option makes the iopen directory be -+ world-readable. This may be safer since it -+ allows daemons to run as an unprivileged user, -+ however it significantly changes the security -+ model of a Unix filesystem, since previously -+ all files under a mode 700 directory were not -+ generally avilable even if the -+ permissions on the file itself is -+ world-readable. -+ - grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2. - - -Index: linux-2.6.22.5/fs/dcache.c -=================================================================== ---- linux-2.6.22.5.orig/fs/dcache.c 2008-02-21 00:56:29.000000000 -0700 -+++ linux-2.6.22.5/fs/dcache.c 2008-02-21 00:57:02.000000000 -0700 -@@ -1537,7 +1537,7 @@ - * Update the dcache to reflect the move of a file name. Negative - * dcache entries should not be moved in this way. - */ --static void d_move_locked(struct dentry * dentry, struct dentry * target) -+void d_move_locked(struct dentry * dentry, struct dentry * target) - { - struct hlist_head *list; - -@@ -1595,6 +1595,7 @@ - spin_unlock(&dentry->d_lock); - write_sequnlock(&rename_lock); - } -+EXPORT_SYMBOL(d_move_locked); - - /** - * d_move - move a dentry -Index: linux-2.6.22.5/include/linux/dcache.h -=================================================================== ---- linux-2.6.22.5.orig/include/linux/dcache.h 2008-02-21 00:56:29.000000000 -0700 -+++ linux-2.6.22.5/include/linux/dcache.h 2008-02-21 00:57:02.000000000 -0700 -@@ -251,6 +251,7 @@ - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues -@@ -286,6 +287,7 @@ - - /* used for rename() and baskets */ - extern void d_move(struct dentry *, struct dentry *); -+extern void d_move_locked(struct dentry *, struct dentry *); - - /* appendix may either be NULL or be used for transname suffixes */ - extern struct dentry * d_lookup(struct dentry *, struct qstr *); diff --git a/lustre/kernel_patches/patches/jbd-16tb-overflow-fixes.patch b/lustre/kernel_patches/patches/jbd-16tb-overflow-fixes.patch deleted file mode 100644 index beab322556..0000000000 --- a/lustre/kernel_patches/patches/jbd-16tb-overflow-fixes.patch +++ /dev/null @@ -1,43 +0,0 @@ -Date: Tue, 26 Sep 2006 11:00:28 -0500 -From: Eric Sandeen <esandeen@redhat.com> -Subject: Re: [PATCH RHEL5] 16T overflows in jbd code - -Signed-off-by: Eric Sandeen <esandeen@redhat.com> -Signed-off-by: Andrew Morton <akpm@osdl.org> - -Index: linux-2.6.17-1.2654.el5/fs/jbd/journal.c -=================================================================== ---- linux-2.6.17-1.2654.el5.orig/fs/jbd/journal.c -+++ linux-2.6.17-1.2654.el5/fs/jbd/journal.c -@@ -271,7 +271,7 @@ static void journal_kill_thread(journal_ - int journal_write_metadata_buffer(transaction_t *transaction, - struct journal_head *jh_in, - struct journal_head **jh_out, -- int blocknr) -+ unsigned long blocknr) - { - int need_copy_out = 0; - int done_copy_out = 0; -@@ -696,7 +696,7 @@ fail: - * @bdev: Block device on which to create the journal - * @fs_dev: Device which hold journalled filesystem for this journal. - * @start: Block nr Start of journal. -- * @len: Lenght of the journal in blocks. -+ * @len: Length of the journal in blocks. - * @blocksize: blocksize of journalling device - * @returns: a newly created journal_t * - * -Index: linux-2.6.17-1.2654.el5/include/linux/jbd.h -=================================================================== ---- linux-2.6.17-1.2654.el5.orig/include/linux/jbd.h -+++ linux-2.6.17-1.2654.el5/include/linux/jbd.h -@@ -866,7 +866,7 @@ extern int - journal_write_metadata_buffer(transaction_t *transaction, - struct journal_head *jh_in, - struct journal_head **jh_out, -- int blocknr); -+ unsigned long blocknr); - - /* Transaction locking */ - extern void __wait_on_journal (journal_t *); - diff --git a/lustre/kernel_patches/patches/jbd-2.6.10-jcberr.patch b/lustre/kernel_patches/patches/jbd-2.6.10-jcberr.patch deleted file mode 100644 index 64085b9d85..0000000000 --- a/lustre/kernel_patches/patches/jbd-2.6.10-jcberr.patch +++ /dev/null @@ -1,222 +0,0 @@ ---- 1.46/include/linux/jbd.h 2004-10-19 03:40:17 -06:00 -+++ 1.47/include/linux/jbd.h 2004-11-07 19:13:24 -07:00 -@@ -352,6 +352,27 @@ - bit_spin_unlock(BH_JournalHead, &bh->b_state); - } - -+#define HAVE_JOURNAL_CALLBACK_STATUS -+/** -+ * struct journal_callback - Base structure for callback information. -+ * @jcb_list: list information for other callbacks attached to the same handle. -+ * @jcb_func: Function to call with this callback structure. -+ * -+ * This struct is a 'seed' structure for a using with your own callback -+ * structs. If you are using callbacks you must allocate one of these -+ * or another struct of your own definition which has this struct -+ * as it's first element and pass it to journal_callback_set(). -+ * -+ * This is used internally by jbd to maintain callback information. -+ * -+ * See journal_callback_set for more information. -+ **/ -+struct journal_callback { -+ struct list_head jcb_list; /* t_jcb_lock */ -+ void (*jcb_func)(struct journal_callback *jcb, int error); -+ /* user data goes here */ -+}; -+ - struct jbd_revoke_table_s; - - /** -@@ -360,6 +381,7 @@ - * @h_transaction: Which compound transaction is this update a part of? - * @h_buffer_credits: Number of remaining buffers we are allowed to dirty. - * @h_ref: Reference count on this handle -+ * @h_jcb: List of application registered callbacks for this handle. - * @h_err: Field for caller's use to track errors through large fs operations - * @h_sync: flag for sync-on-close - * @h_jdata: flag to force data journaling -@@ -385,6 +407,13 @@ - /* operations */ - int h_err; - -+ /* -+ * List of application registered callbacks for this handle. The -+ * function(s) will be called after the transaction that this handle is -+ * part of has been committed to disk. [t_jcb_lock] -+ */ -+ struct list_head h_jcb; -+ - /* Flags [no locking] */ - unsigned int h_sync: 1; /* sync-on-close */ - unsigned int h_jdata: 1; /* force data journaling */ -@@ -426,6 +455,8 @@ - * j_state_lock - * ->j_list_lock (journal_unmap_buffer) - * -+ * t_handle_lock -+ * ->t_jcb_lock - */ - - struct transaction_s -@@ -549,6 +580,15 @@ - */ - int t_handle_count; - -+ /* -+ * Protects the callback list -+ */ -+ spinlock_t t_jcb_lock; -+ /* -+ * List of registered callback functions for this transaction. -+ * Called when the transaction is committed. [t_jcb_lock] -+ */ -+ struct list_head t_jcb; - }; - - /** -@@ -881,6 +921,10 @@ - extern int journal_try_to_free_buffers(journal_t *, struct page *, int); - extern int journal_stop(handle_t *); - extern int journal_flush (journal_t *); -+extern void journal_callback_set(handle_t *handle, -+ void (*fn)(struct journal_callback *,int), -+ struct journal_callback *jcb); -+ - extern void journal_lock_updates (journal_t *); - extern void journal_unlock_updates (journal_t *); - ---- 1.23/fs/jbd/checkpoint.c 2003-07-10 23:23:54 -06:00 -+++ 1.24/fs/jbd/checkpoint.c 2004-11-07 19:13:24 -07:00 -@@ -616,6 +616,7 @@ - J_ASSERT(transaction->t_log_list == NULL); - J_ASSERT(transaction->t_checkpoint_list == NULL); - J_ASSERT(transaction->t_updates == 0); -+ J_ASSERT(list_empty(&transaction->t_jcb)); - J_ASSERT(journal->j_committing_transaction != transaction); - J_ASSERT(journal->j_running_transaction != transaction); - - ---- 1.53/fs/jbd/commit.c 2004-10-19 03:40:17 -06:00 -+++ 1.54/fs/jbd/commit.c 2004-11-07 19:13:24 -07:00 -@@ -686,6 +686,30 @@ - if (err) - __journal_abort_hard(journal); - -+ /* -+ * Call any callbacks that had been registered for handles in this -+ * transaction. It is up to the callback to free any allocated -+ * memory. -+ * -+ * The spinlocking (t_jcb_lock) here is surely unnecessary... -+ */ -+ spin_lock(&commit_transaction->t_jcb_lock); -+ if (!list_empty(&commit_transaction->t_jcb)) { -+ struct list_head *p, *n; -+ int error = is_journal_aborted(journal); -+ -+ list_for_each_safe(p, n, &commit_transaction->t_jcb) { -+ struct journal_callback *jcb; -+ -+ jcb = list_entry(p, struct journal_callback, jcb_list); -+ list_del(p); -+ spin_unlock(&commit_transaction->t_jcb_lock); -+ jcb->jcb_func(jcb, error); -+ spin_lock(&commit_transaction->t_jcb_lock); -+ } -+ } -+ spin_unlock(&commit_transaction->t_jcb_lock); -+ - jbd_debug(3, "JBD: commit phase 7\n"); - - J_ASSERT(commit_transaction->t_sync_datalist == NULL); - ---- 1.77/fs/jbd/journal.c 2004-09-21 20:58:08 -06:00 -+++ 1.78/fs/jbd/journal.c 2004-11-07 19:13:24 -07:00 -@@ -55,6 +55,7 @@ - #endif - EXPORT_SYMBOL(journal_flush); - EXPORT_SYMBOL(journal_revoke); -+EXPORT_SYMBOL(journal_callback_set); - - EXPORT_SYMBOL(journal_init_dev); - EXPORT_SYMBOL(journal_init_inode); -@@ -78,6 +79,7 @@ - EXPORT_SYMBOL(journal_blocks_per_page); - EXPORT_SYMBOL(journal_invalidatepage); - EXPORT_SYMBOL(journal_try_to_free_buffers); -+EXPORT_SYMBOL(journal_bmap); - EXPORT_SYMBOL(journal_force_commit); - - static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *); - ---- 1.89/fs/jbd/transaction.c 2004-10-19 03:40:17 -06:00 -+++ 1.90/fs/jbd/transaction.c 2004-11-07 19:13:24 -07:00 -@@ -50,7 +50,9 @@ - transaction->t_state = T_RUNNING; - transaction->t_tid = journal->j_transaction_sequence++; - transaction->t_expires = jiffies + journal->j_commit_interval; -+ INIT_LIST_HEAD(&transaction->t_jcb); - spin_lock_init(&transaction->t_handle_lock); -+ spin_lock_init(&transaction->t_jcb_lock); - - /* Set up the commit timer for the new transaction. */ - journal->j_commit_timer->expires = transaction->t_expires; -@@ -241,6 +243,7 @@ - memset(handle, 0, sizeof(*handle)); - handle->h_buffer_credits = nblocks; - handle->h_ref = 1; -+ INIT_LIST_HEAD(&handle->h_jcb); - - return handle; - } -@@ -1274,6 +1277,36 @@ - } - - /** -+ * void journal_callback_set() - Register a callback function for this handle. -+ * @handle: handle to attach the callback to. -+ * @func: function to callback. -+ * @jcb: structure with additional information required by func() , and -+ * some space for jbd internal information. -+ * -+ * The function will be -+ * called when the transaction that this handle is part of has been -+ * committed to disk with the original callback data struct and the -+ * error status of the journal as parameters. There is no guarantee of -+ * ordering between handles within a single transaction, nor between -+ * callbacks registered on the same handle. -+ * -+ * The caller is responsible for allocating the journal_callback struct. -+ * This is to allow the caller to add as much extra data to the callback -+ * as needed, but reduce the overhead of multiple allocations. The caller -+ * allocated struct must start with a struct journal_callback at offset 0, -+ * and has the caller-specific data afterwards. -+ */ -+void journal_callback_set(handle_t *handle, -+ void (*func)(struct journal_callback *jcb, int error), -+ struct journal_callback *jcb) -+{ -+ spin_lock(&handle->h_transaction->t_jcb_lock); -+ list_add_tail(&jcb->jcb_list, &handle->h_jcb); -+ spin_unlock(&handle->h_transaction->t_jcb_lock); -+ jcb->jcb_func = func; -+} -+ -+/** - * int journal_stop() - complete a transaction - * @handle: tranaction to complete. - * -@@ -1338,6 +1371,11 @@ - if (journal->j_barrier_count) - wake_up(&journal->j_wait_transaction_locked); - } -+ -+ /* Move callbacks from the handle to the transaction. */ -+ spin_lock(&transaction->t_jcb_lock); -+ list_splice(&handle->h_jcb, &transaction->t_jcb); -+ spin_unlock(&transaction->t_jcb_lock); - - /* - * If the handle is marked SYNC, we need to set another commit - diff --git a/lustre/kernel_patches/patches/jbd-check-for-unmapped-buffer.patch b/lustre/kernel_patches/patches/jbd-check-for-unmapped-buffer.patch deleted file mode 100644 index 0127ef0001..0000000000 --- a/lustre/kernel_patches/patches/jbd-check-for-unmapped-buffer.patch +++ /dev/null @@ -1,91 +0,0 @@ -Date: Mon, 23 Oct 2006 15:40:48 -0500 -From: Eric Sandeen <sandeen@redhat.com> -Subject: [PATCH RHEL5] handle races w/ truncate in journal_dirty_data() - -This is for BZ 209647 <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=209647>: ext3/jbd panic - -This patch is now in -mm. - -When running several fsx's and other filesystem stress tests, we found -cases where an unmapped buffer was still being sent to submit_bh by the -ext3 dirty data journaling code. - -I saw this happen in two ways, both related to another thread doing a -truncate which would unmap the buffer in question. - -Either we would get into journal_dirty_data with a bh which was already -unmapped (although journal_dirty_data_fn had checked for this earlier, the -state was not locked at that point), or it would get unmapped in the middle -of journal_dirty_data when we dropped locks to call sync_dirty_buffer. - -By re-checking for mapped state after we've acquired the bh state lock, we -should avoid these races. If we find a buffer which is no longer mapped, -we essentially ignore it, because journal_unmap_buffer has already decided -that this buffer can go away. - -I've also added tracepoints in these two cases, and made a couple other -tracepoint changes that I found useful in debugging this. - -Signed-off-by: Eric Sandeen <esandeen@redhat.com> -Cc: <linux-ext4@vger.kernel.org> -Signed-off-by: Andrew Morton <akpm@osdl.org> ---- - - fs/jbd/transaction.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -Index: linux-2.6.18-1.2732.el5/fs/jbd/transaction.c -=================================================================== ---- linux-2.6.18-1.2732.el5.orig/fs/jbd/transaction.c -+++ linux-2.6.18-1.2732.el5/fs/jbd/transaction.c -@@ -967,6 +967,13 @@ int journal_dirty_data(handle_t *handle, - */ - jbd_lock_bh_state(bh); - spin_lock(&journal->j_list_lock); -+ -+ /* Now that we have bh_state locked, are we really still mapped? */ -+ if (!buffer_mapped(bh)) { -+ JBUFFER_TRACE(jh, "unmapped buffer, bailing out"); -+ goto no_journal; -+ } -+ - if (jh->b_transaction) { - JBUFFER_TRACE(jh, "has transaction"); - if (jh->b_transaction != handle->h_transaction) { -@@ -1028,6 +1035,11 @@ int journal_dirty_data(handle_t *handle, - sync_dirty_buffer(bh); - jbd_lock_bh_state(bh); - spin_lock(&journal->j_list_lock); -+ /* Since we dropped the lock... */ -+ if (!buffer_mapped(bh)) { -+ JBUFFER_TRACE(jh, "buffer got unmapped"); -+ goto no_journal; -+ } - /* The buffer may become locked again at any - time if it is redirtied */ - } -@@ -1823,6 +1835,7 @@ static int journal_unmap_buffer(journal_ - } - } - } else if (transaction == journal->j_committing_transaction) { -+ JBUFFER_TRACE(jh, "on committing transaction"); - if (jh->b_jlist == BJ_Locked) { - /* - * The buffer is on the committing transaction's locked -@@ -1837,7 +1850,6 @@ static int journal_unmap_buffer(journal_ - * can remove it's next_transaction pointer from the - * running transaction if that is set, but nothing - * else. */ -- JBUFFER_TRACE(jh, "on committing transaction"); - set_buffer_freed(bh); - if (jh->b_next_transaction) { - J_ASSERT(jh->b_next_transaction == -@@ -1857,6 +1869,7 @@ static int journal_unmap_buffer(journal_ - * i_size already for this truncate so recovery will not - * expose the disk blocks we are discarding here.) */ - J_ASSERT_JH(jh, transaction == journal->j_running_transaction); -+ JBUFFER_TRACE(jh, "on running transaction"); - may_free = __dispose_buffer(jh, transaction); - } - - diff --git a/lustre/kernel_patches/patches/jbd-jcberr-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/jbd-jcberr-2.6.18-vanilla.patch deleted file mode 100644 index 867d41c194..0000000000 --- a/lustre/kernel_patches/patches/jbd-jcberr-2.6.18-vanilla.patch +++ /dev/null @@ -1,228 +0,0 @@ -Index: linux-2.6/include/linux/jbd.h -=================================================================== ---- linux-2.6.orig/include/linux/jbd.h 2006-07-15 16:08:35.000000000 +0800 -+++ linux-2.6/include/linux/jbd.h 2006-07-15 16:13:01.000000000 +0800 -@@ -356,6 +356,27 @@ static inline void jbd_unlock_bh_journal - bit_spin_unlock(BH_JournalHead, &bh->b_state); - } - -+#define HAVE_JOURNAL_CALLBACK_STATUS -+/** -+ * struct journal_callback - Base structure for callback information. -+ * @jcb_list: list information for other callbacks attached to the same handle. -+ * @jcb_func: Function to call with this callback structure. -+ * -+ * This struct is a 'seed' structure for a using with your own callback -+ * structs. If you are using callbacks you must allocate one of these -+ * or another struct of your own definition which has this struct -+ * as it's first element and pass it to journal_callback_set(). -+ * -+ * This is used internally by jbd to maintain callback information. -+ * -+ * See journal_callback_set for more information. -+ **/ -+struct journal_callback { -+ struct list_head jcb_list; /* t_jcb_lock */ -+ void (*jcb_func)(struct journal_callback *jcb, int error); -+ /* user data goes here */ -+}; -+ - struct jbd_revoke_table_s; - - /** -@@ -364,6 +385,7 @@ struct jbd_revoke_table_s; - * @h_transaction: Which compound transaction is this update a part of? - * @h_buffer_credits: Number of remaining buffers we are allowed to dirty. - * @h_ref: Reference count on this handle -+ * @h_jcb: List of application registered callbacks for this handle. - * @h_err: Field for caller's use to track errors through large fs operations - * @h_sync: flag for sync-on-close - * @h_jdata: flag to force data journaling -@@ -389,6 +411,13 @@ struct handle_s - /* operations */ - int h_err; - -+ /* -+ * List of application registered callbacks for this handle. The -+ * function(s) will be called after the transaction that this handle is -+ * part of has been committed to disk. [t_jcb_lock] -+ */ -+ struct list_head h_jcb; -+ - /* Flags [no locking] */ - unsigned int h_sync: 1; /* sync-on-close */ - unsigned int h_jdata: 1; /* force data journaling */ -@@ -430,6 +459,8 @@ struct handle_s - * j_state_lock - * ->j_list_lock (journal_unmap_buffer) - * -+ * t_handle_lock -+ * ->t_jcb_lock - */ - - struct transaction_s -@@ -559,6 +590,15 @@ struct transaction_s - */ - int t_handle_count; - -+ /* -+ * Protects the callback list -+ */ -+ spinlock_t t_jcb_lock; -+ /* -+ * List of registered callback functions for this transaction. -+ * Called when the transaction is committed. [t_jcb_lock] -+ */ -+ struct list_head t_jcb; - }; - - /** -@@ -906,6 +946,10 @@ extern void journal_invalidatepage(jour - extern int journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); - extern int journal_stop(handle_t *); - extern int journal_flush (journal_t *); -+extern void journal_callback_set(handle_t *handle, -+ void (*fn)(struct journal_callback *,int), -+ struct journal_callback *jcb); -+ - extern void journal_lock_updates (journal_t *); - extern void journal_unlock_updates (journal_t *); - -Index: linux-2.6/fs/jbd/checkpoint.c -=================================================================== ---- linux-2.6.orig/fs/jbd/checkpoint.c 2006-07-15 16:08:36.000000000 +0800 -+++ linux-2.6/fs/jbd/checkpoint.c 2006-07-15 16:13:01.000000000 +0800 -@@ -688,6 +688,7 @@ void __journal_drop_transaction(journal_ - J_ASSERT(transaction->t_checkpoint_list == NULL); - J_ASSERT(transaction->t_checkpoint_io_list == NULL); - J_ASSERT(transaction->t_updates == 0); -+ J_ASSERT(list_empty(&transaction->t_jcb)); - J_ASSERT(journal->j_committing_transaction != transaction); - J_ASSERT(journal->j_running_transaction != transaction); - -Index: linux-2.6/fs/jbd/commit.c -=================================================================== ---- linux-2.6.orig/fs/jbd/commit.c 2006-07-15 16:08:36.000000000 +0800 -+++ linux-2.6/fs/jbd/commit.c 2006-07-15 16:13:01.000000000 +0800 -@@ -708,6 +708,30 @@ wait_for_iobuf: - transaction can be removed from any checkpoint list it was on - before. */ - -+ /* -+ * Call any callbacks that had been registered for handles in this -+ * transaction. It is up to the callback to free any allocated -+ * memory. -+ * -+ * The spinlocking (t_jcb_lock) here is surely unnecessary... -+ */ -+ spin_lock(&commit_transaction->t_jcb_lock); -+ if (!list_empty(&commit_transaction->t_jcb)) { -+ struct list_head *p, *n; -+ int error = is_journal_aborted(journal); -+ -+ list_for_each_safe(p, n, &commit_transaction->t_jcb) { -+ struct journal_callback *jcb; -+ -+ jcb = list_entry(p, struct journal_callback, jcb_list); -+ list_del(p); -+ spin_unlock(&commit_transaction->t_jcb_lock); -+ jcb->jcb_func(jcb, error); -+ spin_lock(&commit_transaction->t_jcb_lock); -+ } -+ } -+ spin_unlock(&commit_transaction->t_jcb_lock); -+ - jbd_debug(3, "JBD: commit phase 7\n"); - - J_ASSERT(commit_transaction->t_sync_datalist == NULL); -Index: linux-2.6/fs/jbd/journal.c -=================================================================== ---- linux-2.6.orig/fs/jbd/journal.c 2006-07-15 16:08:36.000000000 +0800 -+++ linux-2.6/fs/jbd/journal.c 2006-07-15 16:13:01.000000000 +0800 -@@ -58,6 +58,7 @@ EXPORT_SYMBOL(journal_sync_buffer); - #endif - EXPORT_SYMBOL(journal_flush); - EXPORT_SYMBOL(journal_revoke); -+EXPORT_SYMBOL(journal_callback_set); - - EXPORT_SYMBOL(journal_init_dev); - EXPORT_SYMBOL(journal_init_inode); -@@ -80,6 +81,7 @@ EXPORT_SYMBOL(journal_wipe); - EXPORT_SYMBOL(journal_blocks_per_page); - EXPORT_SYMBOL(journal_invalidatepage); - EXPORT_SYMBOL(journal_try_to_free_buffers); -+EXPORT_SYMBOL(journal_bmap); - EXPORT_SYMBOL(journal_force_commit); - - static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *); -Index: linux-2.6/fs/jbd/transaction.c -=================================================================== ---- linux-2.6.orig/fs/jbd/transaction.c 2006-07-15 16:08:35.000000000 +0800 -+++ linux-2.6/fs/jbd/transaction.c 2006-07-15 16:13:01.000000000 +0800 -@@ -50,7 +50,9 @@ get_transaction(journal_t *journal, tran - transaction->t_state = T_RUNNING; - transaction->t_tid = journal->j_transaction_sequence++; - transaction->t_expires = jiffies + journal->j_commit_interval; -+ INIT_LIST_HEAD(&transaction->t_jcb); - spin_lock_init(&transaction->t_handle_lock); -+ spin_lock_init(&transaction->t_jcb_lock); - - /* Set up the commit timer for the new transaction. */ - journal->j_commit_timer.expires = transaction->t_expires; -@@ -241,6 +243,7 @@ static handle_t *new_handle(int nblocks) - memset(handle, 0, sizeof(*handle)); - handle->h_buffer_credits = nblocks; - handle->h_ref = 1; -+ INIT_LIST_HEAD(&handle->h_jcb); - - return handle; - } -@@ -1291,6 +1294,36 @@ drop: - } - - /** -+ * void journal_callback_set() - Register a callback function for this handle. -+ * @handle: handle to attach the callback to. -+ * @func: function to callback. -+ * @jcb: structure with additional information required by func() , and -+ * some space for jbd internal information. -+ * -+ * The function will be -+ * called when the transaction that this handle is part of has been -+ * committed to disk with the original callback data struct and the -+ * error status of the journal as parameters. There is no guarantee of -+ * ordering between handles within a single transaction, nor between -+ * callbacks registered on the same handle. -+ * -+ * The caller is responsible for allocating the journal_callback struct. -+ * This is to allow the caller to add as much extra data to the callback -+ * as needed, but reduce the overhead of multiple allocations. The caller -+ * allocated struct must start with a struct journal_callback at offset 0, -+ * and has the caller-specific data afterwards. -+ */ -+void journal_callback_set(handle_t *handle, -+ void (*func)(struct journal_callback *jcb, int error), -+ struct journal_callback *jcb) -+{ -+ spin_lock(&handle->h_transaction->t_jcb_lock); -+ list_add_tail(&jcb->jcb_list, &handle->h_jcb); -+ spin_unlock(&handle->h_transaction->t_jcb_lock); -+ jcb->jcb_func = func; -+} -+ -+/** - * int journal_stop() - complete a transaction - * @handle: tranaction to complete. - * -@@ -1363,6 +1396,11 @@ int journal_stop(handle_t *handle) - wake_up(&journal->j_wait_transaction_locked); - } - -+ /* Move callbacks from the handle to the transaction. */ -+ spin_lock(&transaction->t_jcb_lock); -+ list_splice(&handle->h_jcb, &transaction->t_jcb); -+ spin_unlock(&transaction->t_jcb_lock); -+ - /* - * If the handle is marked SYNC, we need to set another commit - * going! We also want to force a commit if the current diff --git a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch deleted file mode 100644 index 4f4f0693bc..0000000000 --- a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch +++ /dev/null @@ -1,628 +0,0 @@ -Index: linux-2.6.16.53-0.16/fs/jbd/commit.c -=================================================================== ---- linux-2.6.16.53-0.16.orig/fs/jbd/commit.c -+++ linux-2.6.16.53-0.16/fs/jbd/commit.c -@@ -22,6 +22,7 @@ - #include <linux/pagemap.h> - #include <linux/smp_lock.h> - #include <linux/jiffies.h> -+#include <linux/crc32.h> - - /* - * Default IO end handler for temporary BJ_IO buffer_heads. -@@ -94,19 +95,23 @@ static int inverted_lock(journal_t *jour - return 1; - } - --/* Done it all: now write the commit record. We should have -+/* -+ * Done it all: now submit the commit record. We should have - * cleaned up our previous buffers by now, so if we are in abort - * mode we can now just skip the rest of the journal write - * entirely. - * - * Returns 1 if the journal needs to be aborted or 0 on success - */ --static int journal_write_commit_record(journal_t *journal, -- transaction_t *commit_transaction) -+static int journal_submit_commit_record(journal_t *journal, -+ transaction_t *commit_transaction, -+ struct buffer_head **cbh, -+ __u32 crc32_sum) - { - struct journal_head *descriptor; -+ struct commit_header *tmp; - struct buffer_head *bh; -- int i, ret; -+ int ret; - int barrier_done = 0; - - if (is_journal_aborted(journal)) -@@ -118,21 +123,35 @@ static int journal_write_commit_record(j - - bh = jh2bh(descriptor); - -- /* AKPM: buglet - add `i' to tmp! */ -- for (i = 0; i < bh->b_size; i += 512) { -- journal_header_t *tmp = (journal_header_t*)bh->b_data; -- tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER); -- tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK); -- tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid); -+ tmp = (struct commit_header *)bh->b_data; -+ tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER); -+ tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK); -+ tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid); -+ -+ if (JFS_HAS_COMPAT_FEATURE(journal, -+ JFS_FEATURE_COMPAT_CHECKSUM)) { -+ tmp->h_chksum_type = JFS_CRC32_CHKSUM; -+ tmp->h_chksum_size = JFS_CRC32_CHKSUM_SIZE; -+ tmp->h_chksum[0] = cpu_to_be32(crc32_sum); - } - -- JBUFFER_TRACE(descriptor, "write commit block"); -+ JBUFFER_TRACE(descriptor, "submit commit block"); -+ lock_buffer(bh); -+ get_bh(bh); -+ - set_buffer_dirty(bh); -- if (journal->j_flags & JFS_BARRIER) { -+ set_buffer_uptodate(bh); -+ bh->b_end_io = journal_end_buffer_io_sync; -+ -+ if (journal->j_flags & JFS_BARRIER && -+ !JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) { -+ - set_buffer_ordered(bh); - barrier_done = 1; - } -- ret = sync_dirty_buffer(bh); -+ ret = submit_bh(WRITE, bh); -+ - /* is it possible for another commit to fail at roughly - * the same time as this one? If so, we don't want to - * trust the barrier flag in the super, but instead want -@@ -153,12 +172,84 @@ static int journal_write_commit_record(j - clear_buffer_ordered(bh); - set_buffer_uptodate(bh); - set_buffer_dirty(bh); -- ret = sync_dirty_buffer(bh); -+ ret = submit_bh(WRITE, bh); - } -- put_bh(bh); /* One for getblk() */ -- journal_put_journal_head(descriptor); -+ *cbh = bh; -+ return ret; -+} - -- return (ret == -EIO); -+/* -+ * This function along with journal_submit_commit_record -+ * allows to write the commit record asynchronously. -+ */ -+static int journal_wait_on_commit_record(struct buffer_head *bh) -+{ -+ int ret = 0; -+ -+ clear_buffer_dirty(bh); -+ wait_on_buffer(bh); -+ -+ if (unlikely(!buffer_uptodate(bh))) -+ ret = -EIO; -+ put_bh(bh); /* One for getblk() */ -+ journal_put_journal_head(bh2jh(bh)); -+ -+ return ret; -+} -+ -+/* -+ * Wait for all submitted IO to complete. -+ */ -+static int journal_wait_on_locked_list(journal_t *journal, -+ transaction_t *commit_transaction) -+{ -+ int ret = 0; -+ struct journal_head *jh; -+ -+ while (commit_transaction->t_locked_list) { -+ struct buffer_head *bh; -+ -+ jh = commit_transaction->t_locked_list->b_tprev; -+ bh = jh2bh(jh); -+ get_bh(bh); -+ if (buffer_locked(bh)) { -+ spin_unlock(&journal->j_list_lock); -+ wait_on_buffer(bh); -+ if (unlikely(!buffer_uptodate(bh))) -+ ret = -EIO; -+ spin_lock(&journal->j_list_lock); -+ } -+ if (!inverted_lock(journal, bh)) { -+ put_bh(bh); -+ spin_lock(&journal->j_list_lock); -+ continue; -+ } -+ if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) { -+ __journal_unfile_buffer(jh); -+ jbd_unlock_bh_state(bh); -+ journal_remove_journal_head(bh); -+ put_bh(bh); -+ } else { -+ jbd_unlock_bh_state(bh); -+ } -+ put_bh(bh); -+ cond_resched_lock(&journal->j_list_lock); -+ } -+ return ret; -+} -+ -+static inline __u32 jbd_checksum_data(__u32 crc32_sum, struct buffer_head *bh) -+{ -+ struct page *page = bh->b_page; -+ char *addr; -+ __u32 checksum; -+ -+ addr = kmap_atomic(page, KM_USER0); -+ checksum = crc32_be(crc32_sum, -+ (void *)(addr + offset_in_page(bh->b_data)), -+ bh->b_size); -+ kunmap_atomic(addr, KM_USER0); -+ return checksum; - } - - /* -@@ -184,6 +275,8 @@ void journal_commit_transaction(journal_ - int first_tag = 0; - int tag_flag; - int i; -+ struct buffer_head *cbh = NULL; /* For transactional checksums */ -+ __u32 crc32_sum = ~0; - - /* - * First job: lock down the current transaction and wait for -@@ -395,37 +488,14 @@ write_out_data: - } - - /* -- * Wait for all previously submitted IO to complete. -+ * Wait for all previously submitted IO to complete if commit -+ * record is to be written synchronously. - */ -- while (commit_transaction->t_locked_list) { -- struct buffer_head *bh; -+ if (!JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) -+ err = journal_wait_on_locked_list(journal, -+ commit_transaction); - -- jh = commit_transaction->t_locked_list->b_tprev; -- bh = jh2bh(jh); -- get_bh(bh); -- if (buffer_locked(bh)) { -- spin_unlock(&journal->j_list_lock); -- wait_on_buffer(bh); -- if (unlikely(!buffer_uptodate(bh))) -- err = -EIO; -- spin_lock(&journal->j_list_lock); -- } -- if (!inverted_lock(journal, bh)) { -- put_bh(bh); -- spin_lock(&journal->j_list_lock); -- continue; -- } -- if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) { -- __journal_unfile_buffer(jh); -- jbd_unlock_bh_state(bh); -- journal_remove_journal_head(bh); -- put_bh(bh); -- } else { -- jbd_unlock_bh_state(bh); -- } -- put_bh(bh); -- cond_resched_lock(&journal->j_list_lock); -- } - spin_unlock(&journal->j_list_lock); - - if (err) -@@ -598,6 +668,16 @@ write_out_data: - start_journal_io: - for (i = 0; i < bufs; i++) { - struct buffer_head *bh = wbuf[i]; -+ /* -+ * Compute checksum. -+ */ -+ if (JFS_HAS_COMPAT_FEATURE(journal, -+ JFS_FEATURE_COMPAT_CHECKSUM)) { -+ crc32_sum = -+ jbd_checksum_data(crc32_sum, -+ bh); -+ } -+ - lock_buffer(bh); - clear_buffer_dirty(bh); - set_buffer_uptodate(bh); -@@ -614,6 +694,23 @@ start_journal_io: - } - } - -+ /* Done it all: now write the commit record asynchronously. */ -+ -+ if (JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) { -+ err = journal_submit_commit_record(journal, commit_transaction, -+ &cbh, crc32_sum); -+ if (err) -+ __journal_abort_hard(journal); -+ -+ spin_lock(&journal->j_list_lock); -+ err = journal_wait_on_locked_list(journal, -+ commit_transaction); -+ spin_unlock(&journal->j_list_lock); -+ if (err) -+ __journal_abort_hard(journal); -+ } -+ - /* Lo and behold: we have just managed to send a transaction to - the log. Before we can commit it, wait for the IO so far to - complete. Control buffers being written are on the -@@ -712,9 +809,15 @@ wait_for_iobuf: - } - - jbd_debug(3, "JBD: commit phase 6\n"); -- -- if (journal_write_commit_record(journal, commit_transaction)) -- err = -EIO; -+ -+ if (!JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) { -+ err = journal_submit_commit_record(journal, commit_transaction, -+ &cbh, crc32_sum); -+ if (err) -+ __journal_abort_hard(journal); -+ } -+ err = journal_wait_on_commit_record(cbh); - - if (err) - __journal_abort_hard(journal); -Index: linux-2.6.16.53-0.16/include/linux/jbd.h -=================================================================== ---- linux-2.6.16.53-0.16.orig/include/linux/jbd.h -+++ linux-2.6.16.53-0.16/include/linux/jbd.h -@@ -142,6 +142,29 @@ typedef struct journal_header_s - __be32 h_sequence; - } journal_header_t; - -+/* -+ * Checksum types. -+ */ -+#define JFS_CRC32_CHKSUM 1 -+#define JFS_MD5_CHKSUM 2 -+#define JFS_SHA1_CHKSUM 3 -+ -+#define JFS_CRC32_CHKSUM_SIZE 4 -+ -+#define JFS_CHECKSUM_BYTES (32 / sizeof(u32)) -+/* -+ * Commit block header for storing transactional checksums: -+ */ -+struct commit_header -+{ -+ __be32 h_magic; -+ __be32 h_blocktype; -+ __be32 h_sequence; -+ unsigned char h_chksum_type; -+ unsigned char h_chksum_size; -+ unsigned char h_padding[2]; -+ __be32 h_chksum[JFS_CHECKSUM_BYTES]; -+}; - - /* - * The block tag: used to describe a single buffer in the journal -@@ -228,12 +251,16 @@ typedef struct journal_superblock_s - ((j)->j_format_version >= 2 && \ - ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask)))) - --#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001 -+#define JFS_FEATURE_COMPAT_CHECKSUM 0x00000001 -+ -+#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001 -+#define JFS_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004 - - /* Features known to this kernel version: */ --#define JFS_KNOWN_COMPAT_FEATURES 0 -+#define JFS_KNOWN_COMPAT_FEATURES JFS_FEATURE_COMPAT_CHECKSUM - #define JFS_KNOWN_ROCOMPAT_FEATURES 0 --#define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE -+#define JFS_KNOWN_INCOMPAT_FEATURES (JFS_FEATURE_INCOMPAT_REVOKE | \ -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT) - - #ifdef __KERNEL__ - -@@ -1041,6 +1068,8 @@ extern int journal_check_available_fe - (journal_t *, unsigned long, unsigned long, unsigned long); - extern int journal_set_features - (journal_t *, unsigned long, unsigned long, unsigned long); -+extern int journal_clear_features -+ (journal_t *, unsigned long, unsigned long, unsigned long); - extern int journal_create (journal_t *); - extern int journal_load (journal_t *journal); - extern void journal_destroy (journal_t *); -Index: linux-2.6.16.53-0.16/fs/jbd/recovery.c -=================================================================== ---- linux-2.6.16.53-0.16.orig/fs/jbd/recovery.c -+++ linux-2.6.16.53-0.16/fs/jbd/recovery.c -@@ -21,6 +21,7 @@ - #include <linux/jbd.h> - #include <linux/errno.h> - #include <linux/slab.h> -+#include <linux/crc32.h> - #endif - - /* -@@ -307,6 +308,37 @@ int journal_skip_recovery(journal_t *jou - return err; - } - -+/* -+ * calc_chksums calculates the checksums for the blocks described in the -+ * descriptor block. -+ */ -+static int calc_chksums(journal_t *journal, struct buffer_head *bh, -+ unsigned long *next_log_block, __u32 *crc32_sum) -+{ -+ int i, num_blks, err; -+ unsigned long io_block; -+ struct buffer_head *obh; -+ -+ num_blks = count_tags(bh, journal->j_blocksize); -+ /* Calculate checksum of the descriptor block. */ -+ *crc32_sum = crc32_be(*crc32_sum, (void *)bh->b_data, bh->b_size); -+ -+ for (i = 0; i < num_blks; i++) { -+ io_block = (*next_log_block)++; -+ wrap(journal, *next_log_block); -+ err = jread(&obh, journal, io_block); -+ if (err) { -+ printk(KERN_ERR "JBD: IO error %d recovering block " -+ "%lu in log\n", err, io_block); -+ return 1; -+ } else { -+ *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data, -+ obh->b_size); -+ } -+ } -+ return 0; -+} -+ - static int do_one_pass(journal_t *journal, - struct recovery_info *info, enum passtype pass) - { -@@ -318,6 +350,7 @@ static int do_one_pass(journal_t *journa - struct buffer_head * bh; - unsigned int sequence; - int blocktype; -+ __u32 crc32_sum = ~0; /* Transactional Checksums */ - - /* Precompute the maximum metadata descriptors in a descriptor block */ - int MAX_BLOCKS_PER_DESC; -@@ -409,9 +442,24 @@ static int do_one_pass(journal_t *journa - switch(blocktype) { - case JFS_DESCRIPTOR_BLOCK: - /* If it is a valid descriptor block, replay it -- * in pass REPLAY; otherwise, just skip over the -- * blocks it describes. */ -+ * in pass REPLAY; if journal_checksums enabled, then -+ * calculate checksums in PASS_SCAN, otherwise, -+ * just skip over the blocks it describes. */ - if (pass != PASS_REPLAY) { -+ if (pass == PASS_SCAN && -+ JFS_HAS_COMPAT_FEATURE(journal, -+ JFS_FEATURE_COMPAT_CHECKSUM) && -+ !info->end_transaction) { -+ if (calc_chksums(journal, bh, -+ &next_log_block, -+ &crc32_sum)) { -+ put_bh(bh); -+ break; -+ } -+ put_bh(bh); -+ continue; -+ } -+ - next_log_block += - count_tags(bh, journal->j_blocksize); - wrap(journal, next_log_block); -@@ -506,9 +554,97 @@ static int do_one_pass(journal_t *journa - continue; - - case JFS_COMMIT_BLOCK: -- /* Found an expected commit block: not much to -- * do other than move on to the next sequence -+ /* How to differentiate between interrupted commit -+ * and journal corruption ? -+ * -+ * {nth transaction} -+ * Checksum Verification Failed -+ * | -+ * ____________________ -+ * | | -+ * async_commit sync_commit -+ * | | -+ * | GO TO NEXT "Journal Corruption" -+ * | TRANSACTION -+ * | -+ * {(n+1)th transanction} -+ * | -+ * _______|______________ -+ * | | -+ * Commit block found Commit block not found -+ * | | -+ * "Journal Corruption" | -+ * _____________|__________ -+ * | | -+ * nth trans corrupt OR nth trans -+ * and (n+1)th interrupted interrupted -+ * before commit block -+ * could reach the disk. -+ * (Cannot find the difference in above -+ * mentioned conditions. Hence assume -+ * "Interrupted Commit".) -+ */ -+ -+ /* Found an expected commit block: if checksums -+ * are present verify them in PASS_SCAN; else not -+ * much to do other than move on to the next sequence - * number. */ -+ if (pass == PASS_SCAN && -+ JFS_HAS_COMPAT_FEATURE(journal, -+ JFS_FEATURE_COMPAT_CHECKSUM)) { -+ int chksum_err, chksum_seen; -+ struct commit_header *cbh = -+ (struct commit_header *)bh->b_data; -+ unsigned found_chksum = -+ be32_to_cpu(cbh->h_chksum[0]); -+ -+ chksum_err = chksum_seen = 0; -+ -+ if (info->end_transaction) { -+ printk(KERN_ERR "JBD: Transaction %u " -+ "found to be corrupt.\n", -+ next_commit_ID - 1); -+ brelse(bh); -+ break; -+ } -+ -+ if (crc32_sum == found_chksum && -+ cbh->h_chksum_type == JFS_CRC32_CHKSUM && -+ cbh->h_chksum_size == -+ JFS_CRC32_CHKSUM_SIZE) { -+ chksum_seen = 1; -+ } else if (!(cbh->h_chksum_type == 0 && -+ cbh->h_chksum_size == 0 && -+ found_chksum == 0 && -+ !chksum_seen)) { -+ /* -+ * If fs is mounted using an old kernel and then -+ * kernel with journal_chksum is used then we -+ * get a situation where the journal flag has -+ * checksum flag set but checksums are not -+ * present i.e chksum = 0, in the individual -+ * commit blocks. -+ * Hence to avoid checksum failures, in this -+ * situation, this extra check is added. -+ */ -+ chksum_err = 1; -+ } -+ -+ if (chksum_err) { -+ info->end_transaction = next_commit_ID; -+ -+ if (!JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)){ -+ printk(KERN_ERR -+ "JBD: Transaction %u " -+ "found to be corrupt.\n", -+ next_commit_ID); -+ brelse(bh); -+ break; -+ } -+ } -+ crc32_sum = ~0; -+ } - brelse(bh); - next_commit_ID++; - continue; -@@ -543,9 +679,10 @@ static int do_one_pass(journal_t *journa - * transaction marks the end of the valid log. - */ - -- if (pass == PASS_SCAN) -- info->end_transaction = next_commit_ID; -- else { -+ if (pass == PASS_SCAN) { -+ if (!info->end_transaction) -+ info->end_transaction = next_commit_ID; -+ } else { - /* It's really bad news if different passes end up at - * different places (but possible due to IO errors). */ - if (info->end_transaction != next_commit_ID) { -Index: linux-2.6.16.53-0.16/fs/jbd/journal.c -=================================================================== ---- linux-2.6.16.53-0.16.orig/fs/jbd/journal.c -+++ linux-2.6.16.53-0.16/fs/jbd/journal.c -@@ -64,6 +64,7 @@ EXPORT_SYMBOL(journal_update_format); - EXPORT_SYMBOL(journal_check_used_features); - EXPORT_SYMBOL(journal_check_available_features); - EXPORT_SYMBOL(journal_set_features); -+EXPORT_SYMBOL(journal_clear_features); - EXPORT_SYMBOL(journal_create); - EXPORT_SYMBOL(journal_load); - EXPORT_SYMBOL(journal_destroy); -@@ -1565,6 +1566,33 @@ int journal_set_features (journal_t *jou - return 1; - } - -+/** -+ * int journal_clear_features () - Clear a given journal feature in the superblock -+ * @journal: Journal to act on. -+ * @compat: bitmask of compatible features -+ * @ro: bitmask of features that force read-only mount -+ * @incompat: bitmask of incompatible features -+ * -+ * Clear a given journal feature as present on the -+ * superblock. Returns true if the requested features could be reset. -+ * -+ */ -+int journal_clear_features (journal_t *journal, unsigned long compat, -+ unsigned long ro, unsigned long incompat) -+{ -+ journal_superblock_t *sb; -+ -+ jbd_debug(1, "Clear features 0x%lx/0x%lx/0x%lx\n", -+ compat, ro, incompat); -+ -+ sb = journal->j_superblock; -+ -+ sb->s_feature_compat &= ~cpu_to_be32(compat); -+ sb->s_feature_ro_compat &= ~cpu_to_be32(ro); -+ sb->s_feature_incompat &= ~cpu_to_be32(incompat); -+ -+ return 1; -+} - - /** - * int journal_update_format () - Update on-disk journal structure. -Index: linux-2.6.16.53-0.16/fs/Kconfig -=================================================================== ---- linux-2.6.16.53-0.16.orig/fs/Kconfig -+++ linux-2.6.16.53-0.16/fs/Kconfig -@@ -140,6 +140,7 @@ config EXT3_FS_SECURITY - - config JBD - tristate -+ select CRC32 - help - This is a generic journaling layer for block devices. It is - currently used by the ext3 and OCFS2 file systems, but it could -Index: linux-2.6.16.53-0.16/Documentation/filesystems/ext3.txt -=================================================================== ---- linux-2.6.16.53-0.16.orig/Documentation/filesystems/ext3.txt -+++ linux-2.6.16.53-0.16/Documentation/filesystems/ext3.txt -@@ -14,6 +14,16 @@ Options - When mounting an ext3 filesystem, the following option are accepted: - (*) == default - -+journal_checksum Enable checksumming of the journal transactions. -+ This will allow the recovery code in e2fsck and the -+ kernel to detect corruption in the kernel. It is a -+ compatible change and will be ignored by older kernels. -+ -+journal_async_commit Commit block can be written to disk without waiting -+ for descriptor blocks. If enabled older kernels cannot -+ mount the device. This will enable 'journal_checksum' -+ internally. -+ - journal=update Update the ext3 file system's journal to the current - format. - diff --git a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch deleted file mode 100644 index 90ede90000..0000000000 --- a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch +++ /dev/null @@ -1,636 +0,0 @@ -Index: linux-2.6.18.8/fs/jbd/commit.c -=================================================================== ---- linux-2.6.18.8.orig/fs/jbd/commit.c -+++ linux-2.6.18.8/fs/jbd/commit.c -@@ -22,6 +22,7 @@ - #include <linux/mm.h> - #include <linux/pagemap.h> - #include <linux/smp_lock.h> -+#include <linux/crc32.h> - - - /* -@@ -95,19 +96,23 @@ static int inverted_lock(journal_t *jour - return 1; - } - --/* Done it all: now write the commit record. We should have -+/* -+ * Done it all: now submit the commit record. We should have - * cleaned up our previous buffers by now, so if we are in abort - * mode we can now just skip the rest of the journal write - * entirely. - * - * Returns 1 if the journal needs to be aborted or 0 on success - */ --static int journal_write_commit_record(journal_t *journal, -- transaction_t *commit_transaction) -+static int journal_submit_commit_record(journal_t *journal, -+ transaction_t *commit_transaction, -+ struct buffer_head **cbh, -+ __u32 crc32_sum) - { - struct journal_head *descriptor; -+ struct commit_header *tmp; - struct buffer_head *bh; -- int i, ret; -+ int ret; - int barrier_done = 0; - - if (is_journal_aborted(journal)) -@@ -119,21 +124,35 @@ static int journal_write_commit_record(j - - bh = jh2bh(descriptor); - -- /* AKPM: buglet - add `i' to tmp! */ -- for (i = 0; i < bh->b_size; i += 512) { -- journal_header_t *tmp = (journal_header_t*)bh->b_data; -- tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER); -- tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK); -- tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid); -+ tmp = (struct commit_header *)bh->b_data; -+ tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER); -+ tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK); -+ tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid); -+ -+ if (JFS_HAS_COMPAT_FEATURE(journal, -+ JFS_FEATURE_COMPAT_CHECKSUM)) { -+ tmp->h_chksum_type = JFS_CRC32_CHKSUM; -+ tmp->h_chksum_size = JFS_CRC32_CHKSUM_SIZE; -+ tmp->h_chksum[0] = cpu_to_be32(crc32_sum); - } - -- JBUFFER_TRACE(descriptor, "write commit block"); -+ JBUFFER_TRACE(descriptor, "submit commit block"); -+ lock_buffer(bh); -+ get_bh(bh); -+ - set_buffer_dirty(bh); -- if (journal->j_flags & JFS_BARRIER) { -+ set_buffer_uptodate(bh); -+ bh->b_end_io = journal_end_buffer_io_sync; -+ -+ if (journal->j_flags & JFS_BARRIER && -+ !JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) { -+ - set_buffer_ordered(bh); - barrier_done = 1; - } -- ret = sync_dirty_buffer(bh); -+ ret = submit_bh(WRITE, bh); -+ - /* is it possible for another commit to fail at roughly - * the same time as this one? If so, we don't want to - * trust the barrier flag in the super, but instead want -@@ -154,12 +173,70 @@ static int journal_write_commit_record(j - clear_buffer_ordered(bh); - set_buffer_uptodate(bh); - set_buffer_dirty(bh); -- ret = sync_dirty_buffer(bh); -+ ret = submit_bh(WRITE, bh); - } -- put_bh(bh); /* One for getblk() */ -- journal_put_journal_head(descriptor); -+ *cbh = bh; -+ return ret; -+} -+ -+/* -+ * This function along with journal_submit_commit_record -+ * allows to write the commit record asynchronously. -+ */ -+static int journal_wait_on_commit_record(struct buffer_head *bh) -+{ -+ int ret = 0; -+ -+ clear_buffer_dirty(bh); -+ wait_on_buffer(bh); -+ -+ if (unlikely(!buffer_uptodate(bh))) -+ ret = -EIO; -+ put_bh(bh); /* One for getblk() */ -+ journal_put_journal_head(bh2jh(bh)); -+ -+ return ret; -+} -+ -+/* -+ * Wait for all submitted IO to complete. -+ */ -+static int journal_wait_on_locked_list(journal_t *journal, -+ transaction_t *commit_transaction) -+{ -+ int ret = 0; -+ struct journal_head *jh; - -- return (ret == -EIO); -+ while (commit_transaction->t_locked_list) { -+ struct buffer_head *bh; -+ -+ jh = commit_transaction->t_locked_list->b_tprev; -+ bh = jh2bh(jh); -+ get_bh(bh); -+ if (buffer_locked(bh)) { -+ spin_unlock(&journal->j_list_lock); -+ wait_on_buffer(bh); -+ if (unlikely(!buffer_uptodate(bh))) -+ ret = -EIO; -+ spin_lock(&journal->j_list_lock); -+ } -+ if (!inverted_lock(journal, bh)) { -+ put_bh(bh); -+ spin_lock(&journal->j_list_lock); -+ continue; -+ } -+ if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) { -+ __journal_unfile_buffer(jh); -+ jbd_unlock_bh_state(bh); -+ journal_remove_journal_head(bh); -+ put_bh(bh); -+ } else { -+ jbd_unlock_bh_state(bh); -+ } -+ put_bh(bh); -+ cond_resched_lock(&journal->j_list_lock); -+ } -+ return ret; - } - - void journal_do_submit_data(struct buffer_head **wbuf, int bufs) -@@ -273,6 +350,20 @@ write_out_data: - journal_do_submit_data(wbuf, bufs); - } - -+static inline __u32 jbd_checksum_data(__u32 crc32_sum, struct buffer_head *bh) -+{ -+ struct page *page = bh->b_page; -+ char *addr; -+ __u32 checksum; -+ -+ addr = kmap_atomic(page, KM_USER0); -+ checksum = crc32_be(crc32_sum, -+ (void *)(addr + offset_in_page(bh->b_data)), -+ bh->b_size); -+ kunmap_atomic(addr, KM_USER0); -+ return checksum; -+} -+ - /* - * journal_commit_transaction - * -@@ -296,6 +387,8 @@ void journal_commit_transaction(journal_ - int first_tag = 0; - int tag_flag; - int i; -+ struct buffer_head *cbh = NULL; /* For transactional checksums */ -+ __u32 crc32_sum = ~0; - - /* - * First job: lock down the current transaction and wait for -@@ -439,38 +532,14 @@ void journal_commit_transaction(journal_ - journal_submit_data_buffers(journal, commit_transaction); - - /* -- * Wait for all previously submitted IO to complete. -+ * Wait for all previously submitted IO to complete if commit -+ * record is to be written synchronously. - */ - spin_lock(&journal->j_list_lock); -- while (commit_transaction->t_locked_list) { -- struct buffer_head *bh; -- -- jh = commit_transaction->t_locked_list->b_tprev; -- bh = jh2bh(jh); -- get_bh(bh); -- if (buffer_locked(bh)) { -- spin_unlock(&journal->j_list_lock); -- wait_on_buffer(bh); -- if (unlikely(!buffer_uptodate(bh))) -- err = -EIO; -- spin_lock(&journal->j_list_lock); -- } -- if (!inverted_lock(journal, bh)) { -- put_bh(bh); -- spin_lock(&journal->j_list_lock); -- continue; -- } -- if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) { -- __journal_unfile_buffer(jh); -- jbd_unlock_bh_state(bh); -- journal_remove_journal_head(bh); -- put_bh(bh); -- } else { -- jbd_unlock_bh_state(bh); -- } -- put_bh(bh); -- cond_resched_lock(&journal->j_list_lock); -- } -+ if (!JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) -+ err = journal_wait_on_locked_list(journal, -+ commit_transaction); - spin_unlock(&journal->j_list_lock); - - if (err) -@@ -643,6 +712,16 @@ void journal_commit_transaction(journal_ - start_journal_io: - for (i = 0; i < bufs; i++) { - struct buffer_head *bh = wbuf[i]; -+ /* -+ * Compute checksum. -+ */ -+ if (JFS_HAS_COMPAT_FEATURE(journal, -+ JFS_FEATURE_COMPAT_CHECKSUM)) { -+ crc32_sum = -+ jbd_checksum_data(crc32_sum, -+ bh); -+ } -+ - lock_buffer(bh); - clear_buffer_dirty(bh); - set_buffer_uptodate(bh); -@@ -659,6 +738,23 @@ start_journal_io: - } - } - -+ /* Done it all: now write the commit record asynchronously. */ -+ -+ if (JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) { -+ err = journal_submit_commit_record(journal, commit_transaction, -+ &cbh, crc32_sum); -+ if (err) -+ __journal_abort_hard(journal); -+ -+ spin_lock(&journal->j_list_lock); -+ err = journal_wait_on_locked_list(journal, -+ commit_transaction); -+ spin_unlock(&journal->j_list_lock); -+ if (err) -+ __journal_abort_hard(journal); -+ } -+ - /* Lo and behold: we have just managed to send a transaction to - the log. Before we can commit it, wait for the IO so far to - complete. Control buffers being written are on the -@@ -757,9 +853,15 @@ wait_for_iobuf: - } - - jbd_debug(3, "JBD: commit phase 6\n"); -- -- if (journal_write_commit_record(journal, commit_transaction)) -- err = -EIO; -+ -+ if (!JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) { -+ err = journal_submit_commit_record(journal, commit_transaction, -+ &cbh, crc32_sum); -+ if (err) -+ __journal_abort_hard(journal); -+ } -+ err = journal_wait_on_commit_record(cbh); - - if (err) - __journal_abort_hard(journal); -Index: linux-2.6.18.8/include/linux/jbd.h -=================================================================== ---- linux-2.6.18.8.orig/include/linux/jbd.h -+++ linux-2.6.18.8/include/linux/jbd.h -@@ -148,6 +148,29 @@ typedef struct journal_header_s - __be32 h_sequence; - } journal_header_t; - -+/* -+ * Checksum types. -+ */ -+#define JFS_CRC32_CHKSUM 1 -+#define JFS_MD5_CHKSUM 2 -+#define JFS_SHA1_CHKSUM 3 -+ -+#define JFS_CRC32_CHKSUM_SIZE 4 -+ -+#define JFS_CHECKSUM_BYTES (32 / sizeof(u32)) -+/* -+ * Commit block header for storing transactional checksums: -+ */ -+struct commit_header -+{ -+ __be32 h_magic; -+ __be32 h_blocktype; -+ __be32 h_sequence; -+ unsigned char h_chksum_type; -+ unsigned char h_chksum_size; -+ unsigned char h_padding[2]; -+ __be32 h_chksum[JFS_CHECKSUM_BYTES]; -+}; - - /* - * The block tag: used to describe a single buffer in the journal -@@ -234,12 +257,16 @@ typedef struct journal_superblock_s - ((j)->j_format_version >= 2 && \ - ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask)))) - --#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001 -+#define JFS_FEATURE_COMPAT_CHECKSUM 0x00000001 -+ -+#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001 -+#define JFS_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004 - - /* Features known to this kernel version: */ --#define JFS_KNOWN_COMPAT_FEATURES 0 -+#define JFS_KNOWN_COMPAT_FEATURES JFS_FEATURE_COMPAT_CHECKSUM - #define JFS_KNOWN_ROCOMPAT_FEATURES 0 --#define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE -+#define JFS_KNOWN_INCOMPAT_FEATURES (JFS_FEATURE_INCOMPAT_REVOKE | \ -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT) - - #ifdef __KERNEL__ - -@@ -1053,6 +1080,8 @@ extern int journal_check_available_fe - (journal_t *, unsigned long, unsigned long, unsigned long); - extern int journal_set_features - (journal_t *, unsigned long, unsigned long, unsigned long); -+extern int journal_clear_features -+ (journal_t *, unsigned long, unsigned long, unsigned long); - extern int journal_create (journal_t *); - extern int journal_load (journal_t *journal); - extern void journal_destroy (journal_t *); -Index: linux-2.6.18.8/fs/jbd/recovery.c -=================================================================== ---- linux-2.6.18.8.orig/fs/jbd/recovery.c -+++ linux-2.6.18.8/fs/jbd/recovery.c -@@ -21,6 +21,7 @@ - #include <linux/jbd.h> - #include <linux/errno.h> - #include <linux/slab.h> -+#include <linux/crc32.h> - #endif - - /* -@@ -307,6 +308,37 @@ int journal_skip_recovery(journal_t *jou - return err; - } - -+/* -+ * calc_chksums calculates the checksums for the blocks described in the -+ * descriptor block. -+ */ -+static int calc_chksums(journal_t *journal, struct buffer_head *bh, -+ unsigned long *next_log_block, __u32 *crc32_sum) -+{ -+ int i, num_blks, err; -+ unsigned long io_block; -+ struct buffer_head *obh; -+ -+ num_blks = count_tags(bh, journal->j_blocksize); -+ /* Calculate checksum of the descriptor block. */ -+ *crc32_sum = crc32_be(*crc32_sum, (void *)bh->b_data, bh->b_size); -+ -+ for (i = 0; i < num_blks; i++) { -+ io_block = (*next_log_block)++; -+ wrap(journal, *next_log_block); -+ err = jread(&obh, journal, io_block); -+ if (err) { -+ printk(KERN_ERR "JBD: IO error %d recovering block " -+ "%lu in log\n", err, io_block); -+ return 1; -+ } else { -+ *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data, -+ obh->b_size); -+ } -+ } -+ return 0; -+} -+ - static int do_one_pass(journal_t *journal, - struct recovery_info *info, enum passtype pass) - { -@@ -318,6 +350,7 @@ static int do_one_pass(journal_t *journa - struct buffer_head * bh; - unsigned int sequence; - int blocktype; -+ __u32 crc32_sum = ~0; /* Transactional Checksums */ - - /* Precompute the maximum metadata descriptors in a descriptor block */ - int MAX_BLOCKS_PER_DESC; -@@ -409,9 +442,24 @@ static int do_one_pass(journal_t *journa - switch(blocktype) { - case JFS_DESCRIPTOR_BLOCK: - /* If it is a valid descriptor block, replay it -- * in pass REPLAY; otherwise, just skip over the -- * blocks it describes. */ -+ * in pass REPLAY; if journal_checksums enabled, then -+ * calculate checksums in PASS_SCAN, otherwise, -+ * just skip over the blocks it describes. */ - if (pass != PASS_REPLAY) { -+ if (pass == PASS_SCAN && -+ JFS_HAS_COMPAT_FEATURE(journal, -+ JFS_FEATURE_COMPAT_CHECKSUM) && -+ !info->end_transaction) { -+ if (calc_chksums(journal, bh, -+ &next_log_block, -+ &crc32_sum)) { -+ put_bh(bh); -+ break; -+ } -+ put_bh(bh); -+ continue; -+ } -+ - next_log_block += - count_tags(bh, journal->j_blocksize); - wrap(journal, next_log_block); -@@ -506,9 +554,97 @@ static int do_one_pass(journal_t *journa - continue; - - case JFS_COMMIT_BLOCK: -- /* Found an expected commit block: not much to -- * do other than move on to the next sequence -+ /* How to differentiate between interrupted commit -+ * and journal corruption ? -+ * -+ * {nth transaction} -+ * Checksum Verification Failed -+ * | -+ * ____________________ -+ * | | -+ * async_commit sync_commit -+ * | | -+ * | GO TO NEXT "Journal Corruption" -+ * | TRANSACTION -+ * | -+ * {(n+1)th transanction} -+ * | -+ * _______|______________ -+ * | | -+ * Commit block found Commit block not found -+ * | | -+ * "Journal Corruption" | -+ * _____________|__________ -+ * | | -+ * nth trans corrupt OR nth trans -+ * and (n+1)th interrupted interrupted -+ * before commit block -+ * could reach the disk. -+ * (Cannot find the difference in above -+ * mentioned conditions. Hence assume -+ * "Interrupted Commit".) -+ */ -+ -+ /* Found an expected commit block: if checksums -+ * are present verify them in PASS_SCAN; else not -+ * much to do other than move on to the next sequence - * number. */ -+ if (pass == PASS_SCAN && -+ JFS_HAS_COMPAT_FEATURE(journal, -+ JFS_FEATURE_COMPAT_CHECKSUM)) { -+ int chksum_err, chksum_seen; -+ struct commit_header *cbh = -+ (struct commit_header *)bh->b_data; -+ unsigned found_chksum = -+ be32_to_cpu(cbh->h_chksum[0]); -+ -+ chksum_err = chksum_seen = 0; -+ -+ if (info->end_transaction) { -+ printk(KERN_ERR "JBD: Transaction %u " -+ "found to be corrupt.\n", -+ next_commit_ID - 1); -+ brelse(bh); -+ break; -+ } -+ -+ if (crc32_sum == found_chksum && -+ cbh->h_chksum_type == JFS_CRC32_CHKSUM && -+ cbh->h_chksum_size == -+ JFS_CRC32_CHKSUM_SIZE) { -+ chksum_seen = 1; -+ } else if (!(cbh->h_chksum_type == 0 && -+ cbh->h_chksum_size == 0 && -+ found_chksum == 0 && -+ !chksum_seen)) { -+ /* -+ * If fs is mounted using an old kernel and then -+ * kernel with journal_chksum is used then we -+ * get a situation where the journal flag has -+ * checksum flag set but checksums are not -+ * present i.e chksum = 0, in the individual -+ * commit blocks. -+ * Hence to avoid checksum failures, in this -+ * situation, this extra check is added. -+ */ -+ chksum_err = 1; -+ } -+ -+ if (chksum_err) { -+ info->end_transaction = next_commit_ID; -+ -+ if (!JFS_HAS_INCOMPAT_FEATURE(journal, -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)){ -+ printk(KERN_ERR -+ "JBD: Transaction %u " -+ "found to be corrupt.\n", -+ next_commit_ID); -+ brelse(bh); -+ break; -+ } -+ } -+ crc32_sum = ~0; -+ } - brelse(bh); - next_commit_ID++; - continue; -@@ -544,9 +680,10 @@ static int do_one_pass(journal_t *journa - * transaction marks the end of the valid log. - */ - -- if (pass == PASS_SCAN) -- info->end_transaction = next_commit_ID; -- else { -+ if (pass == PASS_SCAN) { -+ if (!info->end_transaction) -+ info->end_transaction = next_commit_ID; -+ } else { - /* It's really bad news if different passes end up at - * different places (but possible due to IO errors). */ - if (info->end_transaction != next_commit_ID) { -Index: linux-2.6.18.8/fs/jbd/journal.c -=================================================================== ---- linux-2.6.18.8.orig/fs/jbd/journal.c -+++ linux-2.6.18.8/fs/jbd/journal.c -@@ -67,6 +67,7 @@ EXPORT_SYMBOL(journal_update_format); - EXPORT_SYMBOL(journal_check_used_features); - EXPORT_SYMBOL(journal_check_available_features); - EXPORT_SYMBOL(journal_set_features); -+EXPORT_SYMBOL(journal_clear_features); - EXPORT_SYMBOL(journal_create); - EXPORT_SYMBOL(journal_load); - EXPORT_SYMBOL(journal_destroy); -@@ -1573,6 +1574,33 @@ int journal_set_features (journal_t *jou - return 1; - } - -+/** -+ * int journal_clear_features () - Clear a given journal feature in the superblock -+ * @journal: Journal to act on. -+ * @compat: bitmask of compatible features -+ * @ro: bitmask of features that force read-only mount -+ * @incompat: bitmask of incompatible features -+ * -+ * Clear a given journal feature as present on the -+ * superblock. Returns true if the requested features could be reset. -+ * -+ */ -+int journal_clear_features (journal_t *journal, unsigned long compat, -+ unsigned long ro, unsigned long incompat) -+{ -+ journal_superblock_t *sb; -+ -+ jbd_debug(1, "Clear features 0x%lx/0x%lx/0x%lx\n", -+ compat, ro, incompat); -+ -+ sb = journal->j_superblock; -+ -+ sb->s_feature_compat &= ~cpu_to_be32(compat); -+ sb->s_feature_ro_compat &= ~cpu_to_be32(ro); -+ sb->s_feature_incompat &= ~cpu_to_be32(incompat); -+ -+ return 1; -+} - - /** - * int journal_update_format () - Update on-disk journal structure. -Index: linux-2.6.18.8/fs/Kconfig -=================================================================== ---- linux-2.6.18.8.orig/fs/Kconfig -+++ linux-2.6.18.8/fs/Kconfig -@@ -140,6 +140,7 @@ config EXT3_FS_SECURITY - - config JBD - tristate -+ select CRC32 - help - This is a generic journaling layer for block devices. It is - currently used by the ext3 and OCFS2 file systems, but it could -Index: linux-2.6.18.8/Documentation/filesystems/ext3.txt -=================================================================== ---- linux-2.6.18.8.orig/Documentation/filesystems/ext3.txt -+++ linux-2.6.18.8/Documentation/filesystems/ext3.txt -@@ -14,6 +14,16 @@ Options - When mounting an ext3 filesystem, the following option are accepted: - (*) == default - -+journal_checksum Enable checksumming of the journal transactions. -+ This will allow the recovery code in e2fsck and the -+ kernel to detect corruption in the kernel. It is a -+ compatible change and will be ignored by older kernels. -+ -+journal_async_commit Commit block can be written to disk without waiting -+ for descriptor blocks. If enabled older kernels cannot -+ mount the device. This will enable 'journal_checksum' -+ internally. -+ - journal=update Update the ext3 file system's journal to the current - format. - diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch b/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch deleted file mode 100644 index e7c178dae8..0000000000 --- a/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch +++ /dev/null @@ -1,744 +0,0 @@ -Index: linux-2.6.18-8.1.8/include/linux/jbd.h -=================================================================== ---- linux-2.6.18-8.1.8.orig/include/linux/jbd.h 2007-08-28 22:22:10.000000000 +0200 -+++ linux-2.6.18-8.1.8/include/linux/jbd.h 2007-08-28 22:22:29.000000000 +0200 -@@ -455,6 +455,16 @@ struct handle_s - }; - - -+/* -+ * Some stats for checkpoint phase -+ */ -+struct transaction_chp_stats_s { -+ unsigned long cs_chp_time; -+ unsigned long cs_forced_to_close; -+ unsigned long cs_written; -+ unsigned long cs_dropped; -+}; -+ - /* The transaction_t type is the guts of the journaling mechanism. It - * tracks a compound transaction through its various states: - * -@@ -592,6 +602,21 @@ struct transaction_s - spinlock_t t_handle_lock; - - /* -+ * Longest time some handle had to wait for running transaction -+ */ -+ unsigned long t_max_wait; -+ -+ /* -+ * When transaction started -+ */ -+ unsigned long t_start; -+ -+ /* -+ * Checkpointing stats [j_checkpoint_sem] -+ */ -+ struct transaction_chp_stats_s t_chp_stats; -+ -+ /* - * Number of outstanding updates running on this transaction - * [t_handle_lock] - */ -@@ -631,6 +656,57 @@ struct transaction_s - struct list_head t_jcb; - }; - -+struct transaction_run_stats_s { -+ unsigned long rs_wait; -+ unsigned long rs_running; -+ unsigned long rs_locked; -+ unsigned long rs_flushing; -+ unsigned long rs_logging; -+ -+ unsigned long rs_handle_count; -+ unsigned long rs_blocks; -+ unsigned long rs_blocks_logged; -+}; -+ -+struct transaction_stats_s -+{ -+ int ts_type; -+ unsigned long ts_tid; -+ union { -+ struct transaction_run_stats_s run; -+ struct transaction_chp_stats_s chp; -+ } u; -+}; -+ -+#define JBD_STATS_RUN 1 -+#define JBD_STATS_CHECKPOINT 2 -+ -+#define ts_wait u.run.rs_wait -+#define ts_running u.run.rs_running -+#define ts_locked u.run.rs_locked -+#define ts_flushing u.run.rs_flushing -+#define ts_logging u.run.rs_logging -+#define ts_handle_count u.run.rs_handle_count -+#define ts_blocks u.run.rs_blocks -+#define ts_blocks_logged u.run.rs_blocks_logged -+ -+#define ts_chp_time u.chp.cs_chp_time -+#define ts_forced_to_close u.chp.cs_forced_to_close -+#define ts_written u.chp.cs_written -+#define ts_dropped u.chp.cs_dropped -+ -+#define CURRENT_MSECS (jiffies_to_msecs(jiffies)) -+ -+static inline unsigned int -+jbd_time_diff(unsigned int start, unsigned int end) -+{ -+ if (unlikely(start > end)) -+ end = end + (~0UL - start); -+ else -+ end -= start; -+ return end; -+} -+ - /** - * struct journal_s - The journal_s type is the concrete type associated with - * journal_t. -@@ -884,6 +960,16 @@ struct journal_s - pid_t j_last_sync_writer; - - /* -+ * -+ */ -+ struct transaction_stats_s *j_history; -+ int j_history_max; -+ int j_history_cur; -+ spinlock_t j_history_lock; -+ struct proc_dir_entry *j_proc_entry; -+ struct transaction_stats_s j_stats; -+ -+ /* - * An opaque pointer to fs-private information. ext3 puts its - * superblock pointer here - */ -Index: linux-2.6.18-8.1.8/fs/jbd/transaction.c -=================================================================== ---- linux-2.6.18-8.1.8.orig/fs/jbd/transaction.c 2007-08-28 22:22:10.000000000 +0200 -+++ linux-2.6.18-8.1.8/fs/jbd/transaction.c 2007-08-28 22:22:29.000000000 +0200 -@@ -60,6 +60,8 @@ get_transaction(journal_t *journal, tran - - J_ASSERT(journal->j_running_transaction == NULL); - journal->j_running_transaction = transaction; -+ transaction->t_max_wait = 0; -+ transaction->t_start = CURRENT_MSECS; - - return transaction; - } -@@ -86,6 +88,7 @@ static int start_this_handle(journal_t * - int nblocks = handle->h_buffer_credits; - transaction_t *new_transaction = NULL; - int ret = 0; -+ unsigned long ts = CURRENT_MSECS; - - if (nblocks > journal->j_max_transaction_buffers) { - printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n", -@@ -219,6 +222,12 @@ repeat_locked: - /* OK, account for the buffers that this operation expects to - * use and add the handle to the running transaction. */ - -+ if (time_after(transaction->t_start, ts)) { -+ ts = jbd_time_diff(ts, transaction->t_start); -+ if (ts > transaction->t_max_wait) -+ transaction->t_max_wait= ts; -+ } -+ - handle->h_transaction = transaction; - transaction->t_outstanding_credits += nblocks; - transaction->t_updates++; -Index: linux-2.6.18-8.1.8/fs/jbd/journal.c -=================================================================== ---- linux-2.6.18-8.1.8.orig/fs/jbd/journal.c 2007-08-28 22:22:10.000000000 +0200 -+++ linux-2.6.18-8.1.8/fs/jbd/journal.c 2007-08-28 22:22:29.000000000 +0200 -@@ -36,6 +36,7 @@ - #include <linux/kthread.h> - #include <linux/poison.h> - #include <linux/proc_fs.h> -+#include <linux/seq_file.h> - - #include <asm/uaccess.h> - #include <asm/page.h> -@@ -639,6 +640,300 @@ struct journal_head *journal_get_descrip - return journal_add_journal_head(bh); - } - -+struct jbd_stats_proc_session { -+ journal_t *journal; -+ struct transaction_stats_s *stats; -+ int start; -+ int max; -+}; -+ -+static void *jbd_history_skip_empty(struct jbd_stats_proc_session *s, -+ struct transaction_stats_s *ts, -+ int first) -+{ -+ if (ts == s->stats + s->max) -+ ts = s->stats; -+ if (!first && ts == s->stats + s->start) -+ return NULL; -+ while (ts->ts_type == 0) { -+ ts++; -+ if (ts == s->stats + s->max) -+ ts = s->stats; -+ if (ts == s->stats + s->start) -+ return NULL; -+ } -+ return ts; -+ -+} -+ -+static void *jbd_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ struct transaction_stats_s *ts; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ ts = jbd_history_skip_empty(s, s->stats + s->start, 1); -+ if (!ts) -+ return NULL; -+ while (--l && (ts = jbd_history_skip_empty(s, ++ts, 0)) != NULL); -+ return ts; -+} -+ -+static void *jbd_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ struct transaction_stats_s *ts = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return jbd_history_skip_empty(s, s->stats + s->start, 1); -+ else -+ return jbd_history_skip_empty(s, ++ts, 0); -+} -+ -+static int jbd_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct transaction_stats_s *ts = v; -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-4s %-5s %-5s %-5s %-5s %-5s %-5s %-6s %-5s " -+ "%-5s %-5s %-5s %-5s %-5s\n", "R/C", "tid", -+ "wait", "run", "lock", "flush", "log", "hndls", -+ "block", "inlog", "ctime", "write", "drop", -+ "close"); -+ return 0; -+ } -+ if (ts->ts_type == JBD_STATS_RUN) -+ seq_printf(seq, "%-4s %-5lu %-5lu %-5lu %-5lu %-5lu %-5lu " -+ "%-6lu %-5lu %-5lu\n", "R", ts->ts_tid, -+ ts->ts_wait, ts->ts_running, ts->ts_locked, -+ ts->ts_flushing, ts->ts_logging, -+ ts->ts_handle_count, ts->ts_blocks, -+ ts->ts_blocks_logged); -+ else if (ts->ts_type == JBD_STATS_CHECKPOINT) -+ seq_printf(seq, "%-4s %-5lu %48s %-5lu %-5lu %-5lu %-5lu\n", -+ "C", ts->ts_tid, " ", ts->ts_chp_time, -+ ts->ts_written, ts->ts_dropped, -+ ts->ts_forced_to_close); -+ else -+ J_ASSERT(0); -+ return 0; -+} -+ -+static void jbd_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations jbd_seq_history_ops = { -+ .start = jbd_seq_history_start, -+ .next = jbd_seq_history_next, -+ .stop = jbd_seq_history_stop, -+ .show = jbd_seq_history_show, -+}; -+ -+static int jbd_seq_history_open(struct inode *inode, struct file *file) -+{ -+ journal_t *journal = PDE(inode)->data; -+ struct jbd_stats_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ s->stats = kmalloc(size, GFP_KERNEL); -+ if (s->stats == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ spin_lock(&journal->j_history_lock); -+ memcpy(s->stats, journal->j_history, size); -+ s->max = journal->j_history_max; -+ s->start = journal->j_history_cur % s->max; -+ spin_unlock(&journal->j_history_lock); -+ -+ rc = seq_open(file, &jbd_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->stats); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int jbd_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct jbd_stats_proc_session *s = seq->private; -+ kfree(s->stats); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations jbd_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = jbd_seq_history_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = jbd_seq_history_release, -+}; -+ -+static void *jbd_seq_info_start(struct seq_file *seq, loff_t *pos) -+{ -+ return *pos ? NULL : SEQ_START_TOKEN; -+} -+ -+static void *jbd_seq_info_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ return NULL; -+} -+ -+static int jbd_seq_info_show(struct seq_file *seq, void *v) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ if (v != SEQ_START_TOKEN) -+ return 0; -+ seq_printf(seq, "%lu transaction, each upto %u blocks\n", -+ s->stats->ts_tid, -+ s->journal->j_max_transaction_buffers); -+ if (s->stats->ts_tid == 0) -+ return 0; -+ seq_printf(seq, "average: \n %lums waiting for transaction\n", -+ s->stats->ts_wait / s->stats->ts_tid); -+ seq_printf(seq, " %lums running transaction\n", -+ s->stats->ts_running / s->stats->ts_tid); -+ seq_printf(seq, " %lums transaction was being locked\n", -+ s->stats->ts_locked / s->stats->ts_tid); -+ seq_printf(seq, " %lums flushing data (in ordered mode)\n", -+ s->stats->ts_flushing / s->stats->ts_tid); -+ seq_printf(seq, " %lums logging transaction\n", -+ s->stats->ts_logging / s->stats->ts_tid); -+ seq_printf(seq, " %lu handles per transaction\n", -+ s->stats->ts_handle_count / s->stats->ts_tid); -+ seq_printf(seq, " %lu blocks per transaction\n", -+ s->stats->ts_blocks / s->stats->ts_tid); -+ seq_printf(seq, " %lu logged blocks per transaction\n", -+ s->stats->ts_blocks_logged / s->stats->ts_tid); -+ return 0; -+} -+ -+static void jbd_seq_info_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations jbd_seq_info_ops = { -+ .start = jbd_seq_info_start, -+ .next = jbd_seq_info_next, -+ .stop = jbd_seq_info_stop, -+ .show = jbd_seq_info_show, -+}; -+ -+static int jbd_seq_info_open(struct inode *inode, struct file *file) -+{ -+ journal_t *journal = PDE(inode)->data; -+ struct jbd_stats_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct transaction_stats_s); -+ s->stats = kmalloc(size, GFP_KERNEL); -+ if (s->stats == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ spin_lock(&journal->j_history_lock); -+ memcpy(s->stats, &journal->j_stats, size); -+ s->journal = journal; -+ spin_unlock(&journal->j_history_lock); -+ -+ rc = seq_open(file, &jbd_seq_info_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->stats); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int jbd_seq_info_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct jbd_stats_proc_session *s = seq->private; -+ kfree(s->stats); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations jbd_seq_info_fops = { -+ .owner = THIS_MODULE, -+ .open = jbd_seq_info_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = jbd_seq_info_release, -+}; -+ -+static struct proc_dir_entry *proc_jbd_stats = NULL; -+ -+static void jbd_stats_proc_init(journal_t *journal) -+{ -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name)); -+ journal->j_proc_entry = proc_mkdir(name, proc_jbd_stats); -+ if (journal->j_proc_entry) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("history", S_IRUGO, -+ journal->j_proc_entry); -+ if (p) { -+ p->proc_fops = &jbd_seq_history_fops; -+ p->data = journal; -+ p = create_proc_entry("info", S_IRUGO, -+ journal->j_proc_entry); -+ if (p) { -+ p->proc_fops = &jbd_seq_info_fops; -+ p->data = journal; -+ } -+ } -+ } -+} -+ -+static void jbd_stats_proc_exit(journal_t *journal) -+{ -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name)); -+ remove_proc_entry("info", journal->j_proc_entry); -+ remove_proc_entry("history", journal->j_proc_entry); -+ remove_proc_entry(name, proc_jbd_stats); -+} -+ -+static void journal_init_stats(journal_t *journal) -+{ -+ int size; -+ -+ if (proc_jbd_stats == NULL) -+ return; -+ -+ journal->j_history_max = 100; -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ journal->j_history = kmalloc(size, GFP_KERNEL); -+ if (journal->j_history == NULL) { -+ journal->j_history_max = 0; -+ return; -+ } -+ memset(journal->j_history, 0, size); -+ spin_lock_init(&journal->j_history_lock); -+} -+ - /* - * Management for journal control blocks: functions to create and - * destroy journal_t structures, and to initialise and read existing -@@ -681,6 +976,9 @@ static journal_t * journal_init_common ( - kfree(journal); - goto fail; - } -+ -+ journal_init_stats(journal); -+ - return journal; - fail: - return NULL; -@@ -724,6 +1022,7 @@ journal_t * journal_init_dev(struct bloc - journal->j_blk_offset = start; - journal->j_maxlen = len; - journal->j_blocksize = blocksize; -+ jbd_stats_proc_init(journal); - - bh = __getblk(journal->j_dev, start, journal->j_blocksize); - J_ASSERT(bh != NULL); -@@ -773,6 +1072,7 @@ journal_t * journal_init_inode (struct i - - journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits; - journal->j_blocksize = inode->i_sb->s_blocksize; -+ jbd_stats_proc_init(journal); - - /* journal descriptor can store up to n blocks -bzzz */ - n = journal->j_blocksize / sizeof(journal_block_tag_t); -@@ -1161,6 +1461,8 @@ void journal_destroy(journal_t *journal) - brelse(journal->j_sb_buffer); - } - -+ if (journal->j_proc_entry) -+ jbd_stats_proc_exit(journal); - if (journal->j_inode) - iput(journal->j_inode); - if (journal->j_revoke) -@@ -2027,6 +2329,28 @@ static void __exit remove_jbd_proc_entry - - #endif - -+#if defined(CONFIG_PROC_FS) -+ -+#define JBD_STATS_PROC_NAME "fs/jbd" -+ -+static void __init create_jbd_stats_proc_entry(void) -+{ -+ proc_jbd_stats = proc_mkdir(JBD_STATS_PROC_NAME, NULL); -+} -+ -+static void __exit remove_jbd_stats_proc_entry(void) -+{ -+ if (proc_jbd_stats) -+ remove_proc_entry(JBD_STATS_PROC_NAME, NULL); -+} -+ -+#else -+ -+#define create_jbd_stats_proc_entry() do {} while (0) -+#define remove_jbd_stats_proc_entry() do {} while (0) -+ -+#endif -+ - kmem_cache_t *jbd_handle_cache; - - static int __init journal_init_handle_cache(void) -@@ -2090,6 +2414,7 @@ static int __init journal_init(void) - if (ret != 0) - journal_destroy_caches(); - create_jbd_proc_entry(); -+ create_jbd_stats_proc_entry(); - return ret; - } - -@@ -2101,6 +2426,7 @@ static void __exit journal_exit(void) - printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n); - #endif - remove_jbd_proc_entry(); -+ remove_jbd_stats_proc_entry(); - journal_destroy_caches(); - } - -Index: linux-2.6.18-8.1.8/fs/jbd/checkpoint.c -=================================================================== ---- linux-2.6.18-8.1.8.orig/fs/jbd/checkpoint.c 2007-08-28 22:22:10.000000000 +0200 -+++ linux-2.6.18-8.1.8/fs/jbd/checkpoint.c 2007-08-28 22:23:23.000000000 +0200 -@@ -231,7 +231,7 @@ __flush_batch(journal_t *journal, struct - * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it - */ - static int __process_buffer(journal_t *journal, struct journal_head *jh, -- struct buffer_head **bhs, int *batch_count) -+ struct buffer_head **bhs, int *batch_count, transaction_t *transaction) - { - struct buffer_head *bh = jh2bh(jh); - int ret = 0; -@@ -249,6 +249,7 @@ static int __process_buffer(journal_t *j - transaction_t *t = jh->b_transaction; - tid_t tid = t->t_tid; - -+ transaction->t_chp_stats.cs_forced_to_close++; - spin_unlock(&journal->j_list_lock); - jbd_unlock_bh_state(bh); - log_start_commit(journal, tid); -@@ -278,6 +279,7 @@ static int __process_buffer(journal_t *j - bhs[*batch_count] = bh; - __buffer_relink_io(jh); - jbd_unlock_bh_state(bh); -+ transaction->t_chp_stats.cs_written++; - (*batch_count)++; - if (*batch_count == NR_BATCH) { - spin_unlock(&journal->j_list_lock); -@@ -321,6 +323,8 @@ int log_do_checkpoint(journal_t *journal - if (!journal->j_checkpoint_transactions) - goto out; - transaction = journal->j_checkpoint_transactions; -+ if (transaction->t_chp_stats.cs_chp_time == 0) -+ transaction->t_chp_stats.cs_chp_time = CURRENT_MSECS; - this_tid = transaction->t_tid; - restart: - /* -@@ -345,7 +349,8 @@ restart: - retry = 1; - break; - } -- retry = __process_buffer(journal, jh, bhs,&batch_count); -+ retry = __process_buffer(journal, jh, bhs,&batch_count, -+ transaction); - if (!retry && lock_need_resched(&journal->j_list_lock)){ - spin_unlock(&journal->j_list_lock); - retry = 1; -@@ -667,6 +672,8 @@ void __journal_insert_checkpoint(struct - - void __journal_drop_transaction(journal_t *journal, transaction_t *transaction) - { -+ struct transaction_stats_s stats; -+ - assert_spin_locked(&journal->j_list_lock); - if (transaction->t_cpnext) { - transaction->t_cpnext->t_cpprev = transaction->t_cpprev; -@@ -693,5 +700,25 @@ void __journal_drop_transaction(journal_ - J_ASSERT(journal->j_running_transaction != transaction); - - jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid); -+ -+ /* -+ * File the transaction for history -+ */ -+ if (transaction->t_chp_stats.cs_written != 0 || -+ transaction->t_chp_stats.cs_chp_time != 0) { -+ stats.ts_type = JBD_STATS_CHECKPOINT; -+ stats.ts_tid = transaction->t_tid; -+ stats.u.chp = transaction->t_chp_stats; -+ if (stats.ts_chp_time) -+ stats.ts_chp_time = -+ jbd_time_diff(stats.ts_chp_time, CURRENT_MSECS); -+ spin_lock(&journal->j_history_lock); -+ memcpy(journal->j_history + journal->j_history_cur, &stats, -+ sizeof(stats)); -+ if (++journal->j_history_cur == journal->j_history_max) -+ journal->j_history_cur = 0; -+ spin_unlock(&journal->j_history_lock); -+ } -+ - kfree(transaction); - } -Index: linux-2.6.18-8.1.8/fs/jbd/commit.c -=================================================================== ---- linux-2.6.18-8.1.8.orig/fs/jbd/commit.c 2007-08-28 22:22:10.000000000 +0200 -+++ linux-2.6.18-8.1.8/fs/jbd/commit.c 2007-08-28 22:22:29.000000000 +0200 -@@ -13,6 +13,7 @@ - * part of the ext2fs journaling system. - */ - -+#include <linux/jiffies.h> - #include <linux/time.h> - #include <linux/fs.h> - #include <linux/jbd.h> -@@ -23,6 +24,7 @@ - #include <linux/smp_lock.h> - #include <linux/crc32.h> - -+ - /* - * Default IO end handler for temporary BJ_IO buffer_heads. - */ -@@ -355,6 +357,7 @@ write_out_data: - */ - void journal_commit_transaction(journal_t *journal) - { -+ struct transaction_stats_s stats; - transaction_t *commit_transaction; - struct journal_head *jh, *new_jh, *descriptor; - struct buffer_head **wbuf = journal->j_wbuf; -@@ -403,6 +406,11 @@ void journal_commit_transaction(journal_ - spin_lock(&journal->j_state_lock); - commit_transaction->t_state = T_LOCKED; - -+ stats.ts_wait = commit_transaction->t_max_wait; -+ stats.ts_locked = CURRENT_MSECS; -+ stats.ts_running = jbd_time_diff(commit_transaction->t_start, -+ stats.ts_locked); -+ - spin_lock(&commit_transaction->t_handle_lock); - while (commit_transaction->t_updates) { - DEFINE_WAIT(wait); -@@ -473,6 +481,9 @@ void journal_commit_transaction(journal_ - */ - journal_switch_revoke_table(journal); - -+ stats.ts_flushing = CURRENT_MSECS; -+ stats.ts_locked = jbd_time_diff(stats.ts_locked, stats.ts_flushing); -+ - commit_transaction->t_state = T_FLUSH; - journal->j_committing_transaction = commit_transaction; - journal->j_running_transaction = NULL; -@@ -540,6 +551,11 @@ void journal_commit_transaction(journal_ - */ - commit_transaction->t_state = T_COMMIT; - -+ stats.ts_logging = CURRENT_MSECS; -+ stats.ts_flushing = jbd_time_diff(stats.ts_flushing, stats.ts_logging); -+ stats.ts_blocks = commit_transaction->t_outstanding_credits; -+ stats.ts_blocks_logged = 0; -+ - descriptor = NULL; - bufs = 0; - while (commit_transaction->t_buffers) { -@@ -698,6 +714,7 @@ start_journal_io: - submit_bh(WRITE, bh); - } - cond_resched(); -+ stats.ts_blocks_logged += bufs; - - /* Force a new descriptor to be generated next - time round the loop. */ -@@ -915,6 +932,7 @@ restart_loop: - cp_transaction = jh->b_cp_transaction; - if (cp_transaction) { - JBUFFER_TRACE(jh, "remove from old cp transaction"); -+ cp_transaction->t_chp_stats.cs_dropped++; - __journal_remove_checkpoint(jh); - } - -@@ -989,6 +1007,36 @@ restart_loop: - - J_ASSERT(commit_transaction->t_state == T_COMMIT); - -+ commit_transaction->t_start = CURRENT_MSECS; -+ stats.ts_logging = jbd_time_diff(stats.ts_logging, -+ commit_transaction->t_start); -+ -+ /* -+ * File the transaction for history -+ */ -+ stats.ts_type = JBD_STATS_RUN; -+ stats.ts_tid = commit_transaction->t_tid; -+ stats.ts_handle_count = commit_transaction->t_handle_count; -+ spin_lock(&journal->j_history_lock); -+ memcpy(journal->j_history + journal->j_history_cur, &stats, -+ sizeof(stats)); -+ if (++journal->j_history_cur == journal->j_history_max) -+ journal->j_history_cur = 0; -+ -+ /* -+ * Calculate overall stats -+ */ -+ journal->j_stats.ts_tid++; -+ journal->j_stats.ts_wait += stats.ts_wait; -+ journal->j_stats.ts_running += stats.ts_running; -+ journal->j_stats.ts_locked += stats.ts_locked; -+ journal->j_stats.ts_flushing += stats.ts_flushing; -+ journal->j_stats.ts_logging += stats.ts_logging; -+ journal->j_stats.ts_handle_count += stats.ts_handle_count; -+ journal->j_stats.ts_blocks += stats.ts_blocks; -+ journal->j_stats.ts_blocks_logged += stats.ts_blocks_logged; -+ spin_unlock(&journal->j_history_lock); -+ - commit_transaction->t_state = T_FINISHED; - J_ASSERT(commit_transaction == journal->j_committing_transaction); - journal->j_commit_sequence = commit_transaction->t_tid; - diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch b/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch deleted file mode 100644 index acd81f8c28..0000000000 --- a/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch +++ /dev/null @@ -1,735 +0,0 @@ -Index: linux-2.6.16.46-0.14/include/linux/jbd.h -=================================================================== ---- linux-2.6.16.46-0.14.orig/include/linux/jbd.h -+++ linux-2.6.16.46-0.14/include/linux/jbd.h -@@ -422,6 +422,16 @@ struct handle_s - }; - - -+/* -+ * Some stats for checkpoint phase -+ */ -+struct transaction_chp_stats_s { -+ unsigned long cs_chp_time; -+ unsigned long cs_forced_to_close; -+ unsigned long cs_written; -+ unsigned long cs_dropped; -+}; -+ - /* The transaction_t type is the guts of the journaling mechanism. It - * tracks a compound transaction through its various states: - * -@@ -553,6 +563,21 @@ struct transaction_s - spinlock_t t_handle_lock; - - /* -+ * Longest time some handle had to wait for running transaction -+ */ -+ unsigned long t_max_wait; -+ -+ /* -+ * When transaction started -+ */ -+ unsigned long t_start; -+ -+ /* -+ * Checkpointing stats [j_checkpoint_sem] -+ */ -+ struct transaction_chp_stats_s t_chp_stats; -+ -+ /* - * Number of outstanding updates running on this transaction - * [t_handle_lock] - */ -@@ -592,6 +617,57 @@ struct transaction_s - struct list_head t_jcb; - }; - -+struct transaction_run_stats_s { -+ unsigned long rs_wait; -+ unsigned long rs_running; -+ unsigned long rs_locked; -+ unsigned long rs_flushing; -+ unsigned long rs_logging; -+ -+ unsigned long rs_handle_count; -+ unsigned long rs_blocks; -+ unsigned long rs_blocks_logged; -+}; -+ -+struct transaction_stats_s -+{ -+ int ts_type; -+ unsigned long ts_tid; -+ union { -+ struct transaction_run_stats_s run; -+ struct transaction_chp_stats_s chp; -+ } u; -+}; -+ -+#define JBD_STATS_RUN 1 -+#define JBD_STATS_CHECKPOINT 2 -+ -+#define ts_wait u.run.rs_wait -+#define ts_running u.run.rs_running -+#define ts_locked u.run.rs_locked -+#define ts_flushing u.run.rs_flushing -+#define ts_logging u.run.rs_logging -+#define ts_handle_count u.run.rs_handle_count -+#define ts_blocks u.run.rs_blocks -+#define ts_blocks_logged u.run.rs_blocks_logged -+ -+#define ts_chp_time u.chp.cs_chp_time -+#define ts_forced_to_close u.chp.cs_forced_to_close -+#define ts_written u.chp.cs_written -+#define ts_dropped u.chp.cs_dropped -+ -+#define CURRENT_MSECS (jiffies_to_msecs(jiffies)) -+ -+static inline unsigned int -+jbd_time_diff(unsigned int start, unsigned int end) -+{ -+ if (unlikely(start > end)) -+ end = end + (~0UL - start); -+ else -+ end -= start; -+ return end; -+} -+ - /** - * struct journal_s - The journal_s type is the concrete type associated with - * journal_t. -@@ -845,6 +921,16 @@ struct journal_s - pid_t j_last_sync_writer; - - /* -+ * -+ */ -+ struct transaction_stats_s *j_history; -+ int j_history_max; -+ int j_history_cur; -+ spinlock_t j_history_lock; -+ struct proc_dir_entry *j_proc_entry; -+ struct transaction_stats_s j_stats; -+ -+ /* - * An opaque pointer to fs-private information. ext3 puts its - * superblock pointer here - */ -Index: linux-2.6.16.46-0.14/fs/jbd/transaction.c -=================================================================== ---- linux-2.6.16.46-0.14.orig/fs/jbd/transaction.c -+++ linux-2.6.16.46-0.14/fs/jbd/transaction.c -@@ -60,6 +60,8 @@ get_transaction(journal_t *journal, tran - - J_ASSERT(journal->j_running_transaction == NULL); - journal->j_running_transaction = transaction; -+ transaction->t_max_wait = 0; -+ transaction->t_start = CURRENT_MSECS; - - return transaction; - } -@@ -86,6 +88,7 @@ static int start_this_handle(journal_t * - int nblocks = handle->h_buffer_credits; - transaction_t *new_transaction = NULL; - int ret = 0; -+ unsigned long ts = CURRENT_MSECS; - - if (nblocks > journal->j_max_transaction_buffers) { - printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n", -@@ -219,6 +222,12 @@ repeat_locked: - /* OK, account for the buffers that this operation expects to - * use and add the handle to the running transaction. */ - -+ if (time_after(transaction->t_start, ts)) { -+ ts = jbd_time_diff(ts, transaction->t_start); -+ if (ts > transaction->t_max_wait) -+ transaction->t_max_wait= ts; -+ } -+ - handle->h_transaction = transaction; - transaction->t_outstanding_credits += nblocks; - transaction->t_updates++; -Index: linux-2.6.16.46-0.14/fs/jbd/journal.c -=================================================================== ---- linux-2.6.16.46-0.14.orig/fs/jbd/journal.c -+++ linux-2.6.16.46-0.14/fs/jbd/journal.c -@@ -36,6 +36,7 @@ - #include <asm/uaccess.h> - #include <asm/page.h> - #include <linux/proc_fs.h> -+#include <linux/seq_file.h> - - EXPORT_SYMBOL(journal_start); - EXPORT_SYMBOL(journal_restart); -@@ -637,6 +638,300 @@ struct journal_head *journal_get_descrip - return journal_add_journal_head(bh); - } - -+struct jbd_stats_proc_session { -+ journal_t *journal; -+ struct transaction_stats_s *stats; -+ int start; -+ int max; -+}; -+ -+static void *jbd_history_skip_empty(struct jbd_stats_proc_session *s, -+ struct transaction_stats_s *ts, -+ int first) -+{ -+ if (ts == s->stats + s->max) -+ ts = s->stats; -+ if (!first && ts == s->stats + s->start) -+ return NULL; -+ while (ts->ts_type == 0) { -+ ts++; -+ if (ts == s->stats + s->max) -+ ts = s->stats; -+ if (ts == s->stats + s->start) -+ return NULL; -+ } -+ return ts; -+ -+} -+ -+static void *jbd_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ struct transaction_stats_s *ts; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ ts = jbd_history_skip_empty(s, s->stats + s->start, 1); -+ if (!ts) -+ return NULL; -+ while (--l && (ts = jbd_history_skip_empty(s, ++ts, 0)) != NULL); -+ return ts; -+} -+ -+static void *jbd_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ struct transaction_stats_s *ts = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return jbd_history_skip_empty(s, s->stats + s->start, 1); -+ else -+ return jbd_history_skip_empty(s, ++ts, 0); -+} -+ -+static int jbd_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct transaction_stats_s *ts = v; -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-4s %-5s %-5s %-5s %-5s %-5s %-5s %-6s %-5s " -+ "%-5s %-5s %-5s %-5s %-5s\n", "R/C", "tid", -+ "wait", "run", "lock", "flush", "log", "hndls", -+ "block", "inlog", "ctime", "write", "drop", -+ "close"); -+ return 0; -+ } -+ if (ts->ts_type == JBD_STATS_RUN) -+ seq_printf(seq, "%-4s %-5lu %-5lu %-5lu %-5lu %-5lu %-5lu " -+ "%-6lu %-5lu %-5lu\n", "R", ts->ts_tid, -+ ts->ts_wait, ts->ts_running, ts->ts_locked, -+ ts->ts_flushing, ts->ts_logging, -+ ts->ts_handle_count, ts->ts_blocks, -+ ts->ts_blocks_logged); -+ else if (ts->ts_type == JBD_STATS_CHECKPOINT) -+ seq_printf(seq, "%-4s %-5lu %48s %-5lu %-5lu %-5lu %-5lu\n", -+ "C", ts->ts_tid, " ", ts->ts_chp_time, -+ ts->ts_written, ts->ts_dropped, -+ ts->ts_forced_to_close); -+ else -+ J_ASSERT(0); -+ return 0; -+} -+ -+static void jbd_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations jbd_seq_history_ops = { -+ .start = jbd_seq_history_start, -+ .next = jbd_seq_history_next, -+ .stop = jbd_seq_history_stop, -+ .show = jbd_seq_history_show, -+}; -+ -+static int jbd_seq_history_open(struct inode *inode, struct file *file) -+{ -+ journal_t *journal = PDE(inode)->data; -+ struct jbd_stats_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ s->stats = kmalloc(size, GFP_KERNEL); -+ if (s->stats == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ spin_lock(&journal->j_history_lock); -+ memcpy(s->stats, journal->j_history, size); -+ s->max = journal->j_history_max; -+ s->start = journal->j_history_cur % s->max; -+ spin_unlock(&journal->j_history_lock); -+ -+ rc = seq_open(file, &jbd_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->stats); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int jbd_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct jbd_stats_proc_session *s = seq->private; -+ kfree(s->stats); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations jbd_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = jbd_seq_history_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = jbd_seq_history_release, -+}; -+ -+static void *jbd_seq_info_start(struct seq_file *seq, loff_t *pos) -+{ -+ return *pos ? NULL : SEQ_START_TOKEN; -+} -+ -+static void *jbd_seq_info_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ return NULL; -+} -+ -+static int jbd_seq_info_show(struct seq_file *seq, void *v) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ if (v != SEQ_START_TOKEN) -+ return 0; -+ seq_printf(seq, "%lu transaction, each upto %u blocks\n", -+ s->stats->ts_tid, -+ s->journal->j_max_transaction_buffers); -+ if (s->stats->ts_tid == 0) -+ return 0; -+ seq_printf(seq, "average: \n %lums waiting for transaction\n", -+ s->stats->ts_wait / s->stats->ts_tid); -+ seq_printf(seq, " %lums running transaction\n", -+ s->stats->ts_running / s->stats->ts_tid); -+ seq_printf(seq, " %lums transaction was being locked\n", -+ s->stats->ts_locked / s->stats->ts_tid); -+ seq_printf(seq, " %lums flushing data (in ordered mode)\n", -+ s->stats->ts_flushing / s->stats->ts_tid); -+ seq_printf(seq, " %lums logging transaction\n", -+ s->stats->ts_logging / s->stats->ts_tid); -+ seq_printf(seq, " %lu handles per transaction\n", -+ s->stats->ts_handle_count / s->stats->ts_tid); -+ seq_printf(seq, " %lu blocks per transaction\n", -+ s->stats->ts_blocks / s->stats->ts_tid); -+ seq_printf(seq, " %lu logged blocks per transaction\n", -+ s->stats->ts_blocks_logged / s->stats->ts_tid); -+ return 0; -+} -+ -+static void jbd_seq_info_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations jbd_seq_info_ops = { -+ .start = jbd_seq_info_start, -+ .next = jbd_seq_info_next, -+ .stop = jbd_seq_info_stop, -+ .show = jbd_seq_info_show, -+}; -+ -+static int jbd_seq_info_open(struct inode *inode, struct file *file) -+{ -+ journal_t *journal = PDE(inode)->data; -+ struct jbd_stats_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct transaction_stats_s); -+ s->stats = kmalloc(size, GFP_KERNEL); -+ if (s->stats == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ spin_lock(&journal->j_history_lock); -+ memcpy(s->stats, &journal->j_stats, size); -+ s->journal = journal; -+ spin_unlock(&journal->j_history_lock); -+ -+ rc = seq_open(file, &jbd_seq_info_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->stats); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int jbd_seq_info_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct jbd_stats_proc_session *s = seq->private; -+ kfree(s->stats); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations jbd_seq_info_fops = { -+ .owner = THIS_MODULE, -+ .open = jbd_seq_info_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = jbd_seq_info_release, -+}; -+ -+static struct proc_dir_entry *proc_jbd_stats = NULL; -+ -+static void jbd_stats_proc_init(journal_t *journal) -+{ -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name)); -+ journal->j_proc_entry = proc_mkdir(name, proc_jbd_stats); -+ if (journal->j_proc_entry) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("history", S_IRUGO, -+ journal->j_proc_entry); -+ if (p) { -+ p->proc_fops = &jbd_seq_history_fops; -+ p->data = journal; -+ p = create_proc_entry("info", S_IRUGO, -+ journal->j_proc_entry); -+ if (p) { -+ p->proc_fops = &jbd_seq_info_fops; -+ p->data = journal; -+ } -+ } -+ } -+} -+ -+static void jbd_stats_proc_exit(journal_t *journal) -+{ -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name)); -+ remove_proc_entry("info", journal->j_proc_entry); -+ remove_proc_entry("history", journal->j_proc_entry); -+ remove_proc_entry(name, proc_jbd_stats); -+} -+ -+static void journal_init_stats(journal_t *journal) -+{ -+ int size; -+ -+ if (proc_jbd_stats == NULL) -+ return; -+ -+ journal->j_history_max = 100; -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ journal->j_history = kmalloc(size, GFP_KERNEL); -+ if (journal->j_history == NULL) { -+ journal->j_history_max = 0; -+ return; -+ } -+ memset(journal->j_history, 0, size); -+ spin_lock_init(&journal->j_history_lock); -+} -+ - /* - * Management for journal control blocks: functions to create and - * destroy journal_t structures, and to initialise and read existing -@@ -679,6 +974,9 @@ static journal_t * journal_init_common ( - kfree(journal); - goto fail; - } -+ -+ journal_init_stats(journal); -+ - return journal; - fail: - return NULL; -@@ -722,6 +1020,7 @@ journal_t * journal_init_dev(struct bloc - journal->j_blk_offset = start; - journal->j_maxlen = len; - journal->j_blocksize = blocksize; -+ jbd_stats_proc_init(journal); - - bh = __getblk(journal->j_dev, start, journal->j_blocksize); - J_ASSERT(bh != NULL); -@@ -771,6 +1070,7 @@ journal_t * journal_init_inode (struct i - - journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits; - journal->j_blocksize = inode->i_sb->s_blocksize; -+ jbd_stats_proc_init(journal); - - /* journal descriptor can store up to n blocks -bzzz */ - n = journal->j_blocksize / sizeof(journal_block_tag_t); -@@ -1152,6 +1452,8 @@ void journal_destroy(journal_t *journal) - brelse(journal->j_sb_buffer); - } - -+ if (journal->j_proc_entry) -+ jbd_stats_proc_exit(journal); - if (journal->j_inode) - iput(journal->j_inode); - if (journal->j_revoke) -@@ -1920,6 +2222,28 @@ static void __exit remove_jbd_proc_entry - - #endif - -+#if defined(CONFIG_PROC_FS) -+ -+#define JBD_STATS_PROC_NAME "fs/jbd" -+ -+static void __init create_jbd_stats_proc_entry(void) -+{ -+ proc_jbd_stats = proc_mkdir(JBD_STATS_PROC_NAME, NULL); -+} -+ -+static void __exit remove_jbd_stats_proc_entry(void) -+{ -+ if (proc_jbd_stats) -+ remove_proc_entry(JBD_STATS_PROC_NAME, NULL); -+} -+ -+#else -+ -+#define create_jbd_stats_proc_entry() do {} while (0) -+#define remove_jbd_stats_proc_entry() do {} while (0) -+ -+#endif -+ - kmem_cache_t *jbd_handle_cache; - - static int __init journal_init_handle_cache(void) -@@ -1982,6 +2306,7 @@ static int __init journal_init(void) - if (ret != 0) - journal_destroy_caches(); - create_jbd_proc_entry(); -+ create_jbd_stats_proc_entry(); - return ret; - } - -@@ -1993,6 +2318,7 @@ static void __exit journal_exit(void) - printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n); - #endif - remove_jbd_proc_entry(); -+ remove_jbd_stats_proc_entry(); - journal_destroy_caches(); - } - -Index: linux-2.6.16.46-0.14/fs/jbd/checkpoint.c -=================================================================== ---- linux-2.6.16.46-0.14.orig/fs/jbd/checkpoint.c -+++ linux-2.6.16.46-0.14/fs/jbd/checkpoint.c -@@ -166,6 +166,7 @@ static int __cleanup_transaction(journal - transaction_t *t = jh->b_transaction; - tid_t tid = t->t_tid; - -+ transaction->t_chp_stats.cs_forced_to_close++; - spin_unlock(&journal->j_list_lock); - jbd_unlock_bh_state(bh); - log_start_commit(journal, tid); -@@ -226,7 +227,7 @@ __flush_batch(journal_t *journal, struct - */ - static int __flush_buffer(journal_t *journal, struct journal_head *jh, - struct buffer_head **bhs, int *batch_count, -- int *drop_count) -+ int *drop_count, transaction_t *transaction) - { - struct buffer_head *bh = jh2bh(jh); - int ret = 0; -@@ -247,6 +248,7 @@ static int __flush_buffer(journal_t *jou - set_buffer_jwrite(bh); - bhs[*batch_count] = bh; - jbd_unlock_bh_state(bh); -+ transaction->t_chp_stats.cs_written++; - (*batch_count)++; - if (*batch_count == NR_BATCH) { - __flush_batch(journal, bhs, batch_count); -@@ -315,6 +317,8 @@ int log_do_checkpoint(journal_t *journal - tid_t this_tid; - - transaction = journal->j_checkpoint_transactions; -+ if (transaction->t_chp_stats.cs_chp_time == 0) -+ transaction->t_chp_stats.cs_chp_time = CURRENT_MSECS; - this_tid = transaction->t_tid; - jh = transaction->t_checkpoint_list; - last_jh = jh->b_cpprev; -@@ -331,7 +335,8 @@ int log_do_checkpoint(journal_t *journal - retry = 1; - break; - } -- retry = __flush_buffer(journal, jh, bhs, &batch_count, &drop_count); -+ retry = __flush_buffer(journal, jh, bhs, &batch_count, -+ &drop_count, transaction); - if (cond_resched_lock(&journal->j_list_lock)) { - retry = 1; - break; -@@ -609,6 +614,8 @@ void __journal_insert_checkpoint(struct - - void __journal_drop_transaction(journal_t *journal, transaction_t *transaction) - { -+ struct transaction_stats_s stats; -+ - assert_spin_locked(&journal->j_list_lock); - if (transaction->t_cpnext) { - transaction->t_cpnext->t_cpprev = transaction->t_cpprev; -@@ -634,5 +641,25 @@ void __journal_drop_transaction(journal_ - J_ASSERT(journal->j_running_transaction != transaction); - - jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid); -+ -+ /* -+ * File the transaction for history -+ */ -+ if (transaction->t_chp_stats.cs_written != 0 || -+ transaction->t_chp_stats.cs_chp_time != 0) { -+ stats.ts_type = JBD_STATS_CHECKPOINT; -+ stats.ts_tid = transaction->t_tid; -+ stats.u.chp = transaction->t_chp_stats; -+ if (stats.ts_chp_time) -+ stats.ts_chp_time = -+ jbd_time_diff(stats.ts_chp_time, CURRENT_MSECS); -+ spin_lock(&journal->j_history_lock); -+ memcpy(journal->j_history + journal->j_history_cur, &stats, -+ sizeof(stats)); -+ if (++journal->j_history_cur == journal->j_history_max) -+ journal->j_history_cur = 0; -+ spin_unlock(&journal->j_history_lock); -+ } -+ - kfree(transaction); - } -Index: linux-2.6.16.46-0.14/fs/jbd/commit.c -=================================================================== ---- linux-2.6.16.46-0.14.orig/fs/jbd/commit.c -+++ linux-2.6.16.46-0.14/fs/jbd/commit.c -@@ -21,6 +21,7 @@ - #include <linux/mm.h> - #include <linux/pagemap.h> - #include <linux/smp_lock.h> -+#include <linux/jiffies.h> - - /* - * Default IO end handler for temporary BJ_IO buffer_heads. -@@ -168,6 +169,7 @@ static int journal_write_commit_record(j - */ - void journal_commit_transaction(journal_t *journal) - { -+ struct transaction_stats_s stats; - transaction_t *commit_transaction; - struct journal_head *jh, *new_jh, *descriptor; - struct buffer_head **wbuf = journal->j_wbuf; -@@ -214,6 +216,11 @@ void journal_commit_transaction(journal_ - spin_lock(&journal->j_state_lock); - commit_transaction->t_state = T_LOCKED; - -+ stats.ts_wait = commit_transaction->t_max_wait; -+ stats.ts_locked = CURRENT_MSECS; -+ stats.ts_running = jbd_time_diff(commit_transaction->t_start, -+ stats.ts_locked); -+ - spin_lock(&commit_transaction->t_handle_lock); - while (commit_transaction->t_updates) { - DEFINE_WAIT(wait); -@@ -284,6 +291,9 @@ void journal_commit_transaction(journal_ - */ - journal_switch_revoke_table(journal); - -+ stats.ts_flushing = CURRENT_MSECS; -+ stats.ts_locked = jbd_time_diff(stats.ts_locked, stats.ts_flushing); -+ - commit_transaction->t_state = T_FLUSH; - journal->j_committing_transaction = commit_transaction; - journal->j_running_transaction = NULL; -@@ -442,6 +452,11 @@ write_out_data: - */ - commit_transaction->t_state = T_COMMIT; - -+ stats.ts_logging = CURRENT_MSECS; -+ stats.ts_flushing = jbd_time_diff(stats.ts_flushing, stats.ts_logging); -+ stats.ts_blocks = commit_transaction->t_outstanding_credits; -+ stats.ts_blocks_logged = 0; -+ - descriptor = NULL; - bufs = 0; - while (commit_transaction->t_buffers) { -@@ -590,6 +605,7 @@ start_journal_io: - submit_bh(WRITE, bh); - } - cond_resched(); -+ stats.ts_blocks_logged += bufs; - - /* Force a new descriptor to be generated next - time round the loop. */ -@@ -784,6 +800,7 @@ restart_loop: - cp_transaction = jh->b_cp_transaction; - if (cp_transaction) { - JBUFFER_TRACE(jh, "remove from old cp transaction"); -+ cp_transaction->t_chp_stats.cs_dropped++; - __journal_remove_checkpoint(jh); - } - -@@ -858,6 +875,36 @@ restart_loop: - - J_ASSERT(commit_transaction->t_state == T_COMMIT); - -+ commit_transaction->t_start = CURRENT_MSECS; -+ stats.ts_logging = jbd_time_diff(stats.ts_logging, -+ commit_transaction->t_start); -+ -+ /* -+ * File the transaction for history -+ */ -+ stats.ts_type = JBD_STATS_RUN; -+ stats.ts_tid = commit_transaction->t_tid; -+ stats.ts_handle_count = commit_transaction->t_handle_count; -+ spin_lock(&journal->j_history_lock); -+ memcpy(journal->j_history + journal->j_history_cur, &stats, -+ sizeof(stats)); -+ if (++journal->j_history_cur == journal->j_history_max) -+ journal->j_history_cur = 0; -+ -+ /* -+ * Calculate overall stats -+ */ -+ journal->j_stats.ts_tid++; -+ journal->j_stats.ts_wait += stats.ts_wait; -+ journal->j_stats.ts_running += stats.ts_running; -+ journal->j_stats.ts_locked += stats.ts_locked; -+ journal->j_stats.ts_flushing += stats.ts_flushing; -+ journal->j_stats.ts_logging += stats.ts_logging; -+ journal->j_stats.ts_handle_count += stats.ts_handle_count; -+ journal->j_stats.ts_blocks += stats.ts_blocks; -+ journal->j_stats.ts_blocks_logged += stats.ts_blocks_logged; -+ spin_unlock(&journal->j_history_lock); -+ - commit_transaction->t_state = T_FINISHED; - J_ASSERT(commit_transaction == journal->j_committing_transaction); - journal->j_commit_sequence = commit_transaction->t_tid; diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch deleted file mode 100644 index 4873794e12..0000000000 --- a/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch +++ /dev/null @@ -1,772 +0,0 @@ -Index: linux-2.6.5-7.201/include/linux/jbd.h -=================================================================== ---- linux-2.6.5-7.201.orig/include/linux/jbd.h 2005-10-11 00:12:48.000000000 +0400 -+++ linux-2.6.5-7.201/include/linux/jbd.h 2006-07-28 02:40:14.000000000 +0400 -@@ -411,6 +411,16 @@ struct handle_s - }; - - -+/* -+ * Some stats for checkpoint phase -+ */ -+struct transaction_chp_stats_s { -+ unsigned long cs_chp_time; -+ unsigned long cs_forced_to_close; -+ unsigned long cs_written; -+ unsigned long cs_dropped; -+}; -+ - /* The transaction_t type is the guts of the journaling mechanism. It - * tracks a compound transaction through its various states: - * -@@ -542,6 +552,21 @@ struct transaction_s - spinlock_t t_handle_lock; - - /* -+ * Longest time some handle had to wait for running transaction -+ */ -+ unsigned long t_max_wait; -+ -+ /* -+ * When transaction started -+ */ -+ unsigned long t_start; -+ -+ /* -+ * Checkpointing stats [j_checkpoint_sem] -+ */ -+ struct transaction_chp_stats_s t_chp_stats; -+ -+ /* - * Number of outstanding updates running on this transaction - * [t_handle_lock] - */ -@@ -581,6 +606,57 @@ struct transaction_s - struct list_head t_jcb; - }; - -+struct transaction_run_stats_s { -+ unsigned long rs_wait; -+ unsigned long rs_running; -+ unsigned long rs_locked; -+ unsigned long rs_flushing; -+ unsigned long rs_logging; -+ -+ unsigned long rs_handle_count; -+ unsigned long rs_blocks; -+ unsigned long rs_blocks_logged; -+}; -+ -+struct transaction_stats_s -+{ -+ int ts_type; -+ unsigned long ts_tid; -+ union { -+ struct transaction_run_stats_s run; -+ struct transaction_chp_stats_s chp; -+ } u; -+}; -+ -+#define JBD_STATS_RUN 1 -+#define JBD_STATS_CHECKPOINT 2 -+ -+#define ts_wait u.run.rs_wait -+#define ts_running u.run.rs_running -+#define ts_locked u.run.rs_locked -+#define ts_flushing u.run.rs_flushing -+#define ts_logging u.run.rs_logging -+#define ts_handle_count u.run.rs_handle_count -+#define ts_blocks u.run.rs_blocks -+#define ts_blocks_logged u.run.rs_blocks_logged -+ -+#define ts_chp_time u.chp.cs_chp_time -+#define ts_forced_to_close u.chp.cs_forced_to_close -+#define ts_written u.chp.cs_written -+#define ts_dropped u.chp.cs_dropped -+ -+#define CURRENT_MSECS (jiffies_to_msecs(jiffies)) -+ -+static inline unsigned int -+jbd_time_diff(unsigned int start, unsigned int end) -+{ -+ if (unlikely(start > end)) -+ end = end + (~0UL - start); -+ else -+ end -= start; -+ return end; -+} -+ - /** - * struct journal_s - The journal_s type is the concrete type associated with - * journal_t. -@@ -817,6 +893,16 @@ struct journal_s - struct jbd_revoke_table_s *j_revoke_table[2]; - - /* -+ * -+ */ -+ struct transaction_stats_s *j_history; -+ int j_history_max; -+ int j_history_cur; -+ spinlock_t j_history_lock; -+ struct proc_dir_entry *j_proc_entry; -+ struct transaction_stats_s j_stats; -+ -+ /* - * An opaque pointer to fs-private information. ext3 puts its - * superblock pointer here - */ -Index: linux-2.6.5-7.201/fs/jbd/commit.c -=================================================================== ---- linux-2.6.5-7.201.orig/fs/jbd/commit.c 2005-10-11 00:12:45.000000000 +0400 -+++ linux-2.6.5-7.201/fs/jbd/commit.c 2006-07-28 02:40:14.000000000 +0400 -@@ -21,6 +21,7 @@ - #include <linux/mm.h> - #include <linux/pagemap.h> - #include <linux/smp_lock.h> -+#include <linux/jiffies.h> - - /* - * Default IO end handler for temporary BJ_IO buffer_heads. -@@ -101,6 +102,7 @@ static int inverted_lock(journal_t *jour - */ - void journal_commit_transaction(journal_t *journal) - { -+ struct transaction_stats_s stats; - transaction_t *commit_transaction; - struct journal_head *jh, *new_jh, *descriptor; - struct buffer_head *wbuf[64]; -@@ -147,6 +149,11 @@ void journal_commit_transaction(journal_ - spin_lock(&journal->j_state_lock); - commit_transaction->t_state = T_LOCKED; - -+ stats.ts_wait = commit_transaction->t_max_wait; -+ stats.ts_locked = CURRENT_MSECS; -+ stats.ts_running = jbd_time_diff(commit_transaction->t_start, -+ stats.ts_locked); -+ - spin_lock(&commit_transaction->t_handle_lock); - while (commit_transaction->t_updates) { - DEFINE_WAIT(wait); -@@ -219,6 +226,9 @@ void journal_commit_transaction(journal_ - */ - journal_switch_revoke_table(journal); - -+ stats.ts_flushing = CURRENT_MSECS; -+ stats.ts_locked = jbd_time_diff(stats.ts_locked, stats.ts_flushing); -+ - commit_transaction->t_state = T_FLUSH; - journal->j_committing_transaction = commit_transaction; - journal->j_running_transaction = NULL; -@@ -366,6 +376,11 @@ write_out_data: - */ - commit_transaction->t_state = T_COMMIT; - -+ stats.ts_logging = CURRENT_MSECS; -+ stats.ts_flushing = jbd_time_diff(stats.ts_flushing, stats.ts_logging); -+ stats.ts_blocks = commit_transaction->t_outstanding_credits; -+ stats.ts_blocks_logged = 0; -+ - descriptor = 0; - bufs = 0; - while (commit_transaction->t_buffers) { -@@ -514,6 +529,7 @@ start_journal_io: - submit_bh(WRITE, bh); - } - cond_resched(); -+ stats.ts_blocks_logged += bufs; - - /* Force a new descriptor to be generated next - time round the loop. */ -@@ -759,6 +775,7 @@ skip_commit: /* The journal should be un - cp_transaction = jh->b_cp_transaction; - if (cp_transaction) { - JBUFFER_TRACE(jh, "remove from old cp transaction"); -+ cp_transaction->t_chp_stats.cs_dropped++; - __journal_remove_checkpoint(jh); - } - -@@ -805,6 +822,36 @@ skip_commit: /* The journal should be un - - J_ASSERT(commit_transaction->t_state == T_COMMIT); - -+ commit_transaction->t_start = CURRENT_MSECS; -+ stats.ts_logging = jbd_time_diff(stats.ts_logging, -+ commit_transaction->t_start); -+ -+ /* -+ * File the transaction for history -+ */ -+ stats.ts_type = JBD_STATS_RUN; -+ stats.ts_tid = commit_transaction->t_tid; -+ stats.ts_handle_count = commit_transaction->t_handle_count; -+ spin_lock(&journal->j_history_lock); -+ memcpy(journal->j_history + journal->j_history_cur, &stats, -+ sizeof(stats)); -+ if (++journal->j_history_cur == journal->j_history_max) -+ journal->j_history_cur = 0; -+ -+ /* -+ * Calculate overall stats -+ */ -+ journal->j_stats.ts_tid++; -+ journal->j_stats.ts_wait += stats.ts_wait; -+ journal->j_stats.ts_running += stats.ts_running; -+ journal->j_stats.ts_locked += stats.ts_locked; -+ journal->j_stats.ts_flushing += stats.ts_flushing; -+ journal->j_stats.ts_logging += stats.ts_logging; -+ journal->j_stats.ts_handle_count += stats.ts_handle_count; -+ journal->j_stats.ts_blocks += stats.ts_blocks; -+ journal->j_stats.ts_blocks_logged += stats.ts_blocks_logged; -+ spin_unlock(&journal->j_history_lock); -+ - /* - * This is a bit sleazy. We borrow j_list_lock to protect - * journal->j_committing_transaction in __journal_remove_checkpoint. -Index: linux-2.6.5-7.201/fs/jbd/checkpoint.c -=================================================================== ---- linux-2.6.5-7.201.orig/fs/jbd/checkpoint.c 2005-10-11 00:12:45.000000000 +0400 -+++ linux-2.6.5-7.201/fs/jbd/checkpoint.c 2006-07-28 02:40:14.000000000 +0400 -@@ -166,6 +166,7 @@ static int __cleanup_transaction(journal - transaction_t *t = jh->b_transaction; - tid_t tid = t->t_tid; - -+ transaction->t_chp_stats.cs_forced_to_close++; - spin_unlock(&journal->j_list_lock); - jbd_unlock_bh_state(bh); - log_start_commit(journal, tid); -@@ -227,7 +228,7 @@ __flush_batch(journal_t *journal, struct - */ - static int __flush_buffer(journal_t *journal, struct journal_head *jh, - struct buffer_head **bhs, int *batch_count, -- int *drop_count) -+ int *drop_count, transaction_t *transaction) - { - struct buffer_head *bh = jh2bh(jh); - int ret = 0; -@@ -248,6 +249,7 @@ static int __flush_buffer(journal_t *jou - set_buffer_jwrite(bh); - bhs[*batch_count] = bh; - jbd_unlock_bh_state(bh); -+ transaction->t_chp_stats.cs_written++; - (*batch_count)++; - if (*batch_count == NR_BATCH) { - __flush_batch(journal, bhs, batch_count); -@@ -316,6 +318,8 @@ int log_do_checkpoint(journal_t *journal - tid_t this_tid; - - transaction = journal->j_checkpoint_transactions; -+ if (transaction->t_chp_stats.cs_chp_time == 0) -+ transaction->t_chp_stats.cs_chp_time = CURRENT_MSECS; - this_tid = transaction->t_tid; - jh = transaction->t_checkpoint_list; - last_jh = jh->b_cpprev; -@@ -332,7 +336,8 @@ int log_do_checkpoint(journal_t *journal - retry = 1; - break; - } -- retry = __flush_buffer(journal, jh, bhs, &batch_count, &drop_count); -+ retry = __flush_buffer(journal, jh, bhs, &batch_count, -+ &drop_count, transaction); - } while (jh != last_jh && !retry); - - if (batch_count) { -@@ -598,6 +603,8 @@ void __journal_insert_checkpoint(struct - - void __journal_drop_transaction(journal_t *journal, transaction_t *transaction) - { -+ struct transaction_stats_s stats; -+ - assert_spin_locked(&journal->j_list_lock); - if (transaction->t_cpnext) { - transaction->t_cpnext->t_cpprev = transaction->t_cpprev; -@@ -623,5 +630,25 @@ void __journal_drop_transaction(journal_ - J_ASSERT(journal->j_running_transaction != transaction); - - jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid); -+ -+ /* -+ * File the transaction for history -+ */ -+ if (transaction->t_chp_stats.cs_written != 0 || -+ transaction->t_chp_stats.cs_chp_time != 0) { -+ stats.ts_type = JBD_STATS_CHECKPOINT; -+ stats.ts_tid = transaction->t_tid; -+ stats.u.chp = transaction->t_chp_stats; -+ if (stats.ts_chp_time) -+ stats.ts_chp_time = -+ jbd_time_diff(stats.ts_chp_time, CURRENT_MSECS); -+ spin_lock(&journal->j_history_lock); -+ memcpy(journal->j_history + journal->j_history_cur, &stats, -+ sizeof(stats)); -+ if (++journal->j_history_cur == journal->j_history_max) -+ journal->j_history_cur = 0; -+ spin_unlock(&journal->j_history_lock); -+ } -+ - kfree(transaction); - } -Index: linux-2.6.5-7.201/fs/jbd/transaction.c -=================================================================== ---- linux-2.6.5-7.201.orig/fs/jbd/transaction.c 2005-10-11 00:12:45.000000000 +0400 -+++ linux-2.6.5-7.201/fs/jbd/transaction.c 2006-07-28 02:40:14.000000000 +0400 -@@ -60,6 +60,8 @@ get_transaction(journal_t *journal, tran - - J_ASSERT(journal->j_running_transaction == NULL); - journal->j_running_transaction = transaction; -+ transaction->t_max_wait = 0; -+ transaction->t_start = CURRENT_MSECS; - - return transaction; - } -@@ -86,6 +88,7 @@ static int start_this_handle(journal_t * - int nblocks = handle->h_buffer_credits; - transaction_t *new_transaction = NULL; - int ret = 0; -+ unsigned long ts = CURRENT_MSECS; - - if (nblocks > journal->j_max_transaction_buffers) { - printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n", -@@ -219,6 +222,12 @@ repeat_locked: - /* OK, account for the buffers that this operation expects to - * use and add the handle to the running transaction. */ - -+ if (time_after(transaction->t_start, ts)) { -+ ts = jbd_time_diff(ts, transaction->t_start); -+ if (ts > transaction->t_max_wait) -+ transaction->t_max_wait= ts; -+ } -+ - handle->h_transaction = transaction; - transaction->t_outstanding_credits += nblocks; - transaction->t_updates++; -Index: linux-2.6.5-7.201/fs/jbd/journal.c -=================================================================== ---- linux-2.6.5-7.201.orig/fs/jbd/journal.c 2005-10-11 00:12:45.000000000 +0400 -+++ linux-2.6.5-7.201/fs/jbd/journal.c 2006-08-02 01:20:09.000000000 +0400 -@@ -35,6 +35,7 @@ - #include <linux/pagemap.h> - #include <asm/uaccess.h> - #include <linux/proc_fs.h> -+#include <linux/seq_file.h> - - EXPORT_SYMBOL(journal_start); - EXPORT_SYMBOL(journal_restart); -@@ -615,6 +616,337 @@ struct journal_head *journal_get_descrip - return journal_add_journal_head(bh); - } - -+struct jbd_stats_proc_session { -+ journal_t *journal; -+ struct transaction_stats_s *stats; -+ int start; -+ int max; -+}; -+ -+static void *jbd_history_skip_empty(struct jbd_stats_proc_session *s, -+ struct transaction_stats_s *ts, -+ int first) -+{ -+ if (ts == s->stats + s->max) -+ ts = s->stats; -+ if (!first && ts == s->stats + s->start) -+ return NULL; -+ while (ts->ts_type == 0) { -+ ts++; -+ if (ts == s->stats + s->max) -+ ts = s->stats; -+ if (ts == s->stats + s->start) -+ return NULL; -+ } -+ return ts; -+ -+} -+ -+static void *jbd_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ struct transaction_stats_s *ts; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ ts = jbd_history_skip_empty(s, s->stats + s->start, 1); -+ if (!ts) -+ return NULL; -+ while (--l && (ts = jbd_history_skip_empty(s, ++ts, 0)) != NULL); -+ return ts; -+} -+ -+static void *jbd_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ struct transaction_stats_s *ts = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return jbd_history_skip_empty(s, s->stats + s->start, 1); -+ else -+ return jbd_history_skip_empty(s, ++ts, 0); -+} -+ -+static int jbd_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct transaction_stats_s *ts = v; -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-4s %-5s %-5s %-5s %-5s %-5s %-5s %-6s %-5s " -+ "%-5s %-5s %-5s %-5s %-5s\n", "R/C", "tid", -+ "wait", "run", "lock", "flush", "log", "hndls", -+ "block", "inlog", "ctime", "write", "drop", -+ "close"); -+ return 0; -+ } -+ if (ts->ts_type == JBD_STATS_RUN) -+ seq_printf(seq, "%-4s %-5lu %-5lu %-5lu %-5lu %-5lu %-5lu " -+ "%-6lu %-5lu %-5lu\n", "R", ts->ts_tid, -+ ts->ts_wait, ts->ts_running, ts->ts_locked, -+ ts->ts_flushing, ts->ts_logging, -+ ts->ts_handle_count, ts->ts_blocks, -+ ts->ts_blocks_logged); -+ else if (ts->ts_type == JBD_STATS_CHECKPOINT) -+ seq_printf(seq, "%-4s %-5lu %48s %-5lu %-5lu %-5lu %-5lu\n", -+ "C", ts->ts_tid, " ", ts->ts_chp_time, -+ ts->ts_written, ts->ts_dropped, -+ ts->ts_forced_to_close); -+ else -+ J_ASSERT(0); -+ return 0; -+} -+ -+static void jbd_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations jbd_seq_history_ops = { -+ .start = jbd_seq_history_start, -+ .next = jbd_seq_history_next, -+ .stop = jbd_seq_history_stop, -+ .show = jbd_seq_history_show, -+}; -+ -+static int jbd_seq_history_open(struct inode *inode, struct file *file) -+{ -+ journal_t *journal = PDE(inode)->data; -+ struct jbd_stats_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ s->stats = kmalloc(size, GFP_KERNEL); -+ if (s->stats == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ spin_lock(&journal->j_history_lock); -+ memcpy(s->stats, journal->j_history, size); -+ s->max = journal->j_history_max; -+ s->start = journal->j_history_cur % s->max; -+ spin_unlock(&journal->j_history_lock); -+ -+ rc = seq_open(file, &jbd_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->stats); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static ssize_t jbd_seq_history_write(struct file *file, const char __user *buf, -+ size_t len, loff_t * ppos) -+{ -+ journal_t *journal = PDE(file->f_dentry->d_inode)->data; -+ int size; -+ -+ if (!capable(CAP_SYS_ADMIN)) -+ return -EPERM; -+ -+ spin_lock(&journal->j_history_lock); -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ journal->j_history_cur = 0; -+ memset(journal->j_history, 0, size); -+ spin_unlock(&journal->j_history_lock); -+ -+ return len; -+} -+ -+static int jbd_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct jbd_stats_proc_session *s = seq->private; -+ kfree(s->stats); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations jbd_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = jbd_seq_history_open, -+ .read = seq_read, -+ .write = jbd_seq_history_write, -+ .llseek = seq_lseek, -+ .release = jbd_seq_history_release, -+}; -+ -+static void *jbd_seq_info_start(struct seq_file *seq, loff_t *pos) -+{ -+ return *pos ? NULL : SEQ_START_TOKEN; -+} -+ -+static void *jbd_seq_info_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ return NULL; -+} -+ -+static int jbd_seq_info_show(struct seq_file *seq, void *v) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ if (v != SEQ_START_TOKEN) -+ return 0; -+ seq_printf(seq, "%lu transaction, each upto %u blocks\n", -+ s->stats->ts_tid, -+ s->journal->j_max_transaction_buffers); -+ if (s->stats->ts_tid == 0) -+ return 0; -+ seq_printf(seq, "average: \n %lums waiting for transaction\n", -+ s->stats->ts_wait / s->stats->ts_tid); -+ seq_printf(seq, " %lums running transaction\n", -+ s->stats->ts_running / s->stats->ts_tid); -+ seq_printf(seq, " %lums transaction was being locked\n", -+ s->stats->ts_locked / s->stats->ts_tid); -+ seq_printf(seq, " %lums flushing data (in ordered mode)\n", -+ s->stats->ts_flushing / s->stats->ts_tid); -+ seq_printf(seq, " %lums logging transaction\n", -+ s->stats->ts_logging / s->stats->ts_tid); -+ seq_printf(seq, " %lu handles per transaction\n", -+ s->stats->ts_handle_count / s->stats->ts_tid); -+ seq_printf(seq, " %lu blocks per transaction\n", -+ s->stats->ts_blocks / s->stats->ts_tid); -+ seq_printf(seq, " %lu logged blocks per transaction\n", -+ s->stats->ts_blocks_logged / s->stats->ts_tid); -+ return 0; -+} -+ -+static void jbd_seq_info_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations jbd_seq_info_ops = { -+ .start = jbd_seq_info_start, -+ .next = jbd_seq_info_next, -+ .stop = jbd_seq_info_stop, -+ .show = jbd_seq_info_show, -+}; -+ -+static int jbd_seq_info_open(struct inode *inode, struct file *file) -+{ -+ journal_t *journal = PDE(inode)->data; -+ struct jbd_stats_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct transaction_stats_s); -+ s->stats = kmalloc(size, GFP_KERNEL); -+ if (s->stats == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ spin_lock(&journal->j_history_lock); -+ memcpy(s->stats, &journal->j_stats, size); -+ s->journal = journal; -+ spin_unlock(&journal->j_history_lock); -+ -+ rc = seq_open(file, &jbd_seq_info_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->stats); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static ssize_t jbd_seq_info_write(struct file *file, const char __user *buf, -+ size_t len, loff_t * ppos) -+{ -+ journal_t *journal = PDE(file->f_dentry->d_inode)->data; -+ int size; -+ -+ if (!capable(CAP_SYS_ADMIN)) -+ return -EPERM; -+ -+ size = sizeof(struct transaction_stats_s); -+ spin_lock(&journal->j_history_lock); -+ memset(&journal->j_stats, 0, size); -+ spin_unlock(&journal->j_history_lock); -+ -+ return len; -+} -+ -+static int jbd_seq_info_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct jbd_stats_proc_session *s = seq->private; -+ kfree(s->stats); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations jbd_seq_info_fops = { -+ .owner = THIS_MODULE, -+ .open = jbd_seq_info_open, -+ .read = seq_read, -+ .write = jbd_seq_info_write, -+ .llseek = seq_lseek, -+ .release = jbd_seq_info_release, -+}; -+ -+static struct proc_dir_entry *proc_jbd_stats = NULL; -+ -+static void jbd_stats_proc_init(journal_t *journal) -+{ -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name)); -+ journal->j_proc_entry = proc_mkdir(name, proc_jbd_stats); -+ if (journal->j_proc_entry) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("history", S_IRUGO, -+ journal->j_proc_entry); -+ if (p) { -+ p->proc_fops = &jbd_seq_history_fops; -+ p->data = journal; -+ p = create_proc_entry("info", S_IRUGO, -+ journal->j_proc_entry); -+ if (p) { -+ p->proc_fops = &jbd_seq_info_fops; -+ p->data = journal; -+ } -+ } -+ } -+} -+ -+static void jbd_stats_proc_exit(journal_t *journal) -+{ -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name)); -+ remove_proc_entry("info", journal->j_proc_entry); -+ remove_proc_entry("history", journal->j_proc_entry); -+ remove_proc_entry(name, proc_jbd_stats); -+} -+ -+static void journal_init_stats(journal_t *journal) -+{ -+ int size; -+ -+ if (proc_jbd_stats == NULL) -+ return; -+ -+ journal->j_history_max = 1500; -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ journal->j_history = kmalloc(size, GFP_KERNEL); -+ if (journal->j_history == NULL) { -+ journal->j_history_max = 0; -+ return; -+ } -+ memset(journal->j_history, 0, size); -+ spin_lock_init(&journal->j_history_lock); -+} -+ - /* - * Management for journal control blocks: functions to create and - * destroy journal_t structures, and to initialise and read existing -@@ -657,6 +989,9 @@ static journal_t * journal_init_common ( - kfree(journal); - goto fail; - } -+ -+ journal_init_stats(journal); -+ - return journal; - fail: - return NULL; -@@ -699,6 +1034,7 @@ journal_t * journal_init_dev(struct bloc - journal->j_blk_offset = start; - journal->j_maxlen = len; - journal->j_blocksize = blocksize; -+ jbd_stats_proc_init(journal); - - bh = __getblk(journal->j_dev, start, journal->j_blocksize); - J_ASSERT(bh != NULL); -@@ -736,6 +1072,7 @@ journal_t * journal_init_inode (struct i - - journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits; - journal->j_blocksize = inode->i_sb->s_blocksize; -+ jbd_stats_proc_init(journal); - - err = journal_bmap(journal, 0, &blocknr); - /* If that failed, give up */ -@@ -1106,6 +1443,8 @@ void journal_destroy(journal_t *journal) - brelse(journal->j_sb_buffer); - } - -+ if (journal->j_proc_entry) -+ jbd_stats_proc_exit(journal); - if (journal->j_inode) - iput(journal->j_inode); - if (journal->j_revoke) -@@ -1861,6 +2200,28 @@ static void __exit remove_jbd_proc_entry - - #endif - -+#if defined(CONFIG_PROC_FS) -+ -+#define JBD_STATS_PROC_NAME "fs/jbd" -+ -+static void __init create_jbd_stats_proc_entry(void) -+{ -+ proc_jbd_stats = proc_mkdir(JBD_STATS_PROC_NAME, NULL); -+} -+ -+static void __exit remove_jbd_stats_proc_entry(void) -+{ -+ if (proc_jbd_stats) -+ remove_proc_entry(JBD_STATS_PROC_NAME, NULL); -+} -+ -+#else -+ -+#define create_jbd_stats_proc_entry() do {} while (0) -+#define remove_jbd_stats_proc_entry() do {} while (0) -+ -+#endif -+ - kmem_cache_t *jbd_handle_cache; - - static int __init journal_init_handle_cache(void) -@@ -1915,6 +2276,7 @@ static int __init journal_init(void) - if (ret != 0) - journal_destroy_caches(); - create_jbd_proc_entry(); -+ create_jbd_stats_proc_entry(); - return ret; - } - -@@ -1926,6 +2288,7 @@ static void __exit journal_exit(void) - printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n); - #endif - remove_jbd_proc_entry(); -+ remove_jbd_stats_proc_entry(); - journal_destroy_caches(); - } - diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch deleted file mode 100644 index 3e38108366..0000000000 --- a/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch +++ /dev/null @@ -1,737 +0,0 @@ -Index: linux-2.6.9/include/linux/jbd.h -=================================================================== ---- linux-2.6.9.orig/include/linux/jbd.h -+++ linux-2.6.9/include/linux/jbd.h -@@ -422,6 +422,16 @@ struct handle_s - }; - - -+/* -+ * Some stats for checkpoint phase -+ */ -+struct transaction_chp_stats_s { -+ unsigned long cs_chp_time; -+ unsigned long cs_forced_to_close; -+ unsigned long cs_written; -+ unsigned long cs_dropped; -+}; -+ - /* The transaction_t type is the guts of the journaling mechanism. It - * tracks a compound transaction through its various states: - * -@@ -553,6 +563,21 @@ struct transaction_s - spinlock_t t_handle_lock; - - /* -+ * Longest time some handle had to wait for running transaction -+ */ -+ unsigned long t_max_wait; -+ -+ /* -+ * When transaction started -+ */ -+ unsigned long t_start; -+ -+ /* -+ * Checkpointing stats [j_checkpoint_sem] -+ */ -+ struct transaction_chp_stats_s t_chp_stats; -+ -+ /* - * Number of outstanding updates running on this transaction - * [t_handle_lock] - */ -@@ -592,6 +617,57 @@ struct transaction_s - #endif - }; - -+struct transaction_run_stats_s { -+ unsigned long rs_wait; -+ unsigned long rs_running; -+ unsigned long rs_locked; -+ unsigned long rs_flushing; -+ unsigned long rs_logging; -+ -+ unsigned long rs_handle_count; -+ unsigned long rs_blocks; -+ unsigned long rs_blocks_logged; -+}; -+ -+struct transaction_stats_s -+{ -+ int ts_type; -+ unsigned long ts_tid; -+ union { -+ struct transaction_run_stats_s run; -+ struct transaction_chp_stats_s chp; -+ } u; -+}; -+ -+#define JBD_STATS_RUN 1 -+#define JBD_STATS_CHECKPOINT 2 -+ -+#define ts_wait u.run.rs_wait -+#define ts_running u.run.rs_running -+#define ts_locked u.run.rs_locked -+#define ts_flushing u.run.rs_flushing -+#define ts_logging u.run.rs_logging -+#define ts_handle_count u.run.rs_handle_count -+#define ts_blocks u.run.rs_blocks -+#define ts_blocks_logged u.run.rs_blocks_logged -+ -+#define ts_chp_time u.chp.cs_chp_time -+#define ts_forced_to_close u.chp.cs_forced_to_close -+#define ts_written u.chp.cs_written -+#define ts_dropped u.chp.cs_dropped -+ -+#define CURRENT_MSECS (jiffies_to_msecs(jiffies)) -+ -+static inline unsigned int -+jbd_time_diff(unsigned int start, unsigned int end) -+{ -+ if (unlikely(start > end)) -+ end = end + (~0UL - start); -+ else -+ end -= start; -+ return end; -+} -+ - /** - * struct journal_s - The journal_s type is the concrete type associated with - * journal_t. -@@ -828,6 +904,16 @@ struct journal_s - struct jbd_revoke_table_s *j_revoke_table[2]; - - /* -+ * -+ */ -+ struct transaction_stats_s *j_history; -+ int j_history_max; -+ int j_history_cur; -+ spinlock_t j_history_lock; -+ struct proc_dir_entry *j_proc_entry; -+ struct transaction_stats_s j_stats; -+ -+ /* - * An opaque pointer to fs-private information. ext3 puts its - * superblock pointer here - */ -Index: linux-2.6.9/fs/jbd/commit.c -=================================================================== ---- linux-2.6.9.orig/fs/jbd/commit.c -+++ linux-2.6.9/fs/jbd/commit.c -@@ -21,6 +21,7 @@ - #include <linux/mm.h> - #include <linux/pagemap.h> - #include <linux/smp_lock.h> -+#include <linux/jiffies.h> - - /* - * Default IO end handler for temporary BJ_IO buffer_heads. -@@ -101,6 +102,7 @@ static int inverted_lock(journal_t *jour - */ - void journal_commit_transaction(journal_t *journal) - { -+ struct transaction_stats_s stats; - transaction_t *commit_transaction; - struct journal_head *jh, *new_jh, *descriptor; - struct buffer_head *wbuf[64]; -@@ -147,6 +149,11 @@ void journal_commit_transaction(journal_ - spin_lock(&journal->j_state_lock); - commit_transaction->t_state = T_LOCKED; - -+ stats.ts_wait = commit_transaction->t_max_wait; -+ stats.ts_locked = CURRENT_MSECS; -+ stats.ts_running = jbd_time_diff(commit_transaction->t_start, -+ stats.ts_locked); -+ - spin_lock(&commit_transaction->t_handle_lock); - while (commit_transaction->t_updates) { - DEFINE_WAIT(wait); -@@ -219,6 +226,9 @@ void journal_commit_transaction(journal_ - */ - journal_switch_revoke_table(journal); - -+ stats.ts_flushing = CURRENT_MSECS; -+ stats.ts_locked = jbd_time_diff(stats.ts_locked, stats.ts_flushing); -+ - commit_transaction->t_state = T_FLUSH; - journal->j_committing_transaction = commit_transaction; - journal->j_running_transaction = NULL; -@@ -365,6 +375,11 @@ write_out_data: - */ - commit_transaction->t_state = T_COMMIT; - -+ stats.ts_logging = CURRENT_MSECS; -+ stats.ts_flushing = jbd_time_diff(stats.ts_flushing, stats.ts_logging); -+ stats.ts_blocks = commit_transaction->t_outstanding_credits; -+ stats.ts_blocks_logged = 0; -+ - descriptor = NULL; - bufs = 0; - while (commit_transaction->t_buffers) { -@@ -513,6 +528,7 @@ start_journal_io: - submit_bh(WRITE, bh); - } - cond_resched(); -+ stats.ts_blocks_logged += bufs; - - /* Force a new descriptor to be generated next - time round the loop. */ -@@ -767,6 +783,7 @@ restart_loop: - cp_transaction = jh->b_cp_transaction; - if (cp_transaction) { - JBUFFER_TRACE(jh, "remove from old cp transaction"); -+ cp_transaction->t_chp_stats.cs_dropped++; - __journal_remove_checkpoint(jh); - } - -@@ -816,6 +833,37 @@ restart_loop: - } - cond_resched_lock(&journal->j_list_lock); - } -+ -+ commit_transaction->t_start = CURRENT_MSECS; -+ stats.ts_logging = jbd_time_diff(stats.ts_logging, -+ commit_transaction->t_start); -+ -+ /* -+ * File the transaction for history -+ */ -+ stats.ts_type = JBD_STATS_RUN; -+ stats.ts_tid = commit_transaction->t_tid; -+ stats.ts_handle_count = commit_transaction->t_handle_count; -+ spin_lock(&journal->j_history_lock); -+ memcpy(journal->j_history + journal->j_history_cur, &stats, -+ sizeof(stats)); -+ if (++journal->j_history_cur == journal->j_history_max) -+ journal->j_history_cur = 0; -+ -+ /* -+ * Calculate overall stats -+ */ -+ journal->j_stats.ts_tid++; -+ journal->j_stats.ts_wait += stats.ts_wait; -+ journal->j_stats.ts_running += stats.ts_running; -+ journal->j_stats.ts_locked += stats.ts_locked; -+ journal->j_stats.ts_flushing += stats.ts_flushing; -+ journal->j_stats.ts_logging += stats.ts_logging; -+ journal->j_stats.ts_handle_count += stats.ts_handle_count; -+ journal->j_stats.ts_blocks += stats.ts_blocks; -+ journal->j_stats.ts_blocks_logged += stats.ts_blocks_logged; -+ spin_unlock(&journal->j_history_lock); -+ - spin_unlock(&journal->j_list_lock); - /* - * This is a bit sleazy. We borrow j_list_lock to protect -Index: linux-2.6.9/fs/jbd/checkpoint.c -=================================================================== ---- linux-2.6.9.orig/fs/jbd/checkpoint.c -+++ linux-2.6.9/fs/jbd/checkpoint.c -@@ -126,7 +127,8 @@ - * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it - */ - static int __process_buffer(journal_t *journal, struct journal_head *jh, -- struct buffer_head **bhs, int *batch_count) -+ struct buffer_head **bhs, int *batch_count, -+ transaction_t *transaction) - { - struct buffer_head *bh = jh2bh(jh); - int ret = 0; -@@ -166,6 +166,7 @@ - transaction_t *t = jh->b_transaction; - tid_t tid = t->t_tid; - -+ transaction->t_chp_stats.cs_forced_to_close++; - spin_unlock(&journal->j_list_lock); - jbd_unlock_bh_state(bh); - log_start_commit(journal, tid); -@@ -247,6 +248,7 @@ - bhs[*batch_count] = bh; - __buffer_relink_io(jh); - jbd_unlock_bh_state(bh); -+ transaction->t_chp_stats.cs_written++; - (*batch_count)++; - if (*batch_count == NR_BATCH) { - spin_unlock(&journal->j_list_lock); -@@ -315,6 +317,8 @@ int log_do_checkpoint(journal_t *journal - if (!journal->j_checkpoint_transactions) - goto out; - transaction = journal->j_checkpoint_transactions; -+ if (transaction->t_chp_stats.cs_chp_time == 0) -+ transaction->t_chp_stats.cs_chp_time = CURRENT_MSECS; - this_tid = transaction->t_tid; - restart: - /* -@@ -331,7 +335,8 @@ int log_do_checkpoint(journal_t *journal - retry = 1; - break; - } -- retry = __process_buffer(journal, jh, bhs,&batch_count); -+ retry = __process_buffer(journal, jh, bhs,&batch_count, -+ transaction); - } - - if (batch_count) { -@@ -597,6 +602,8 @@ void __journal_insert_checkpoint(struct - - void __journal_drop_transaction(journal_t *journal, transaction_t *transaction) - { -+ struct transaction_stats_s stats; -+ - assert_spin_locked(&journal->j_list_lock); - if (transaction->t_cpnext) { - transaction->t_cpnext->t_cpprev = transaction->t_cpprev; -@@ -622,5 +629,25 @@ void __journal_drop_transaction(journal_ - J_ASSERT(journal->j_running_transaction != transaction); - - jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid); -+ -+ /* -+ * File the transaction for history -+ */ -+ if (transaction->t_chp_stats.cs_written != 0 || -+ transaction->t_chp_stats.cs_chp_time != 0) { -+ stats.ts_type = JBD_STATS_CHECKPOINT; -+ stats.ts_tid = transaction->t_tid; -+ stats.u.chp = transaction->t_chp_stats; -+ if (stats.ts_chp_time) -+ stats.ts_chp_time = -+ jbd_time_diff(stats.ts_chp_time, CURRENT_MSECS); -+ spin_lock(&journal->j_history_lock); -+ memcpy(journal->j_history + journal->j_history_cur, &stats, -+ sizeof(stats)); -+ if (++journal->j_history_cur == journal->j_history_max) -+ journal->j_history_cur = 0; -+ spin_unlock(&journal->j_history_lock); -+ } -+ - kfree(transaction); - } -Index: linux-2.6.9/fs/jbd/transaction.c -=================================================================== ---- linux-2.6.9.orig/fs/jbd/transaction.c -+++ linux-2.6.9/fs/jbd/transaction.c -@@ -60,6 +60,8 @@ get_transaction(journal_t *journal, tran - - J_ASSERT(journal->j_running_transaction == NULL); - journal->j_running_transaction = transaction; -+ transaction->t_max_wait = 0; -+ transaction->t_start = CURRENT_MSECS; - - return transaction; - } -@@ -86,6 +88,7 @@ static int start_this_handle(journal_t * - int nblocks = handle->h_buffer_credits; - transaction_t *new_transaction = NULL; - int ret = 0; -+ unsigned long ts = CURRENT_MSECS; - - if (nblocks > journal->j_max_transaction_buffers) { - printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n", -@@ -219,6 +222,12 @@ repeat_locked: - /* OK, account for the buffers that this operation expects to - * use and add the handle to the running transaction. */ - -+ if (time_after(transaction->t_start, ts)) { -+ ts = jbd_time_diff(ts, transaction->t_start); -+ if (ts > transaction->t_max_wait) -+ transaction->t_max_wait= ts; -+ } -+ - handle->h_transaction = transaction; - transaction->t_outstanding_credits += nblocks; - transaction->t_updates++; -Index: linux-2.6.9/fs/jbd/journal.c -=================================================================== ---- linux-2.6.9.orig/fs/jbd/journal.c -+++ linux-2.6.9/fs/jbd/journal.c -@@ -36,6 +36,7 @@ - #include <asm/uaccess.h> - #include <asm/page.h> - #include <linux/proc_fs.h> -+#include <linux/seq_file.h> - - EXPORT_SYMBOL(journal_start); - EXPORT_SYMBOL(journal_restart); -@@ -649,6 +650,300 @@ struct journal_head *journal_get_descrip - return journal_add_journal_head(bh); - } - -+struct jbd_stats_proc_session { -+ journal_t *journal; -+ struct transaction_stats_s *stats; -+ int start; -+ int max; -+}; -+ -+static void *jbd_history_skip_empty(struct jbd_stats_proc_session *s, -+ struct transaction_stats_s *ts, -+ int first) -+{ -+ if (ts == s->stats + s->max) -+ ts = s->stats; -+ if (!first && ts == s->stats + s->start) -+ return NULL; -+ while (ts->ts_type == 0) { -+ ts++; -+ if (ts == s->stats + s->max) -+ ts = s->stats; -+ if (ts == s->stats + s->start) -+ return NULL; -+ } -+ return ts; -+ -+} -+ -+static void *jbd_seq_history_start(struct seq_file *seq, loff_t *pos) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ struct transaction_stats_s *ts; -+ int l = *pos; -+ -+ if (l == 0) -+ return SEQ_START_TOKEN; -+ ts = jbd_history_skip_empty(s, s->stats + s->start, 1); -+ if (!ts) -+ return NULL; -+ while (--l && (ts = jbd_history_skip_empty(s, ++ts, 0)) != NULL); -+ return ts; -+} -+ -+static void *jbd_seq_history_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ struct transaction_stats_s *ts = v; -+ -+ ++*pos; -+ if (v == SEQ_START_TOKEN) -+ return jbd_history_skip_empty(s, s->stats + s->start, 1); -+ else -+ return jbd_history_skip_empty(s, ++ts, 0); -+} -+ -+static int jbd_seq_history_show(struct seq_file *seq, void *v) -+{ -+ struct transaction_stats_s *ts = v; -+ if (v == SEQ_START_TOKEN) { -+ seq_printf(seq, "%-4s %-5s %-5s %-5s %-5s %-5s %-5s %-6s %-5s " -+ "%-5s %-5s %-5s %-5s %-5s\n", "R/C", "tid", -+ "wait", "run", "lock", "flush", "log", "hndls", -+ "block", "inlog", "ctime", "write", "drop", -+ "close"); -+ return 0; -+ } -+ if (ts->ts_type == JBD_STATS_RUN) -+ seq_printf(seq, "%-4s %-5lu %-5lu %-5lu %-5lu %-5lu %-5lu " -+ "%-6lu %-5lu %-5lu\n", "R", ts->ts_tid, -+ ts->ts_wait, ts->ts_running, ts->ts_locked, -+ ts->ts_flushing, ts->ts_logging, -+ ts->ts_handle_count, ts->ts_blocks, -+ ts->ts_blocks_logged); -+ else if (ts->ts_type == JBD_STATS_CHECKPOINT) -+ seq_printf(seq, "%-4s %-5lu %48s %-5lu %-5lu %-5lu %-5lu\n", -+ "C", ts->ts_tid, " ", ts->ts_chp_time, -+ ts->ts_written, ts->ts_dropped, -+ ts->ts_forced_to_close); -+ else -+ J_ASSERT(0); -+ return 0; -+} -+ -+static void jbd_seq_history_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations jbd_seq_history_ops = { -+ .start = jbd_seq_history_start, -+ .next = jbd_seq_history_next, -+ .stop = jbd_seq_history_stop, -+ .show = jbd_seq_history_show, -+}; -+ -+static int jbd_seq_history_open(struct inode *inode, struct file *file) -+{ -+ journal_t *journal = PDE(inode)->data; -+ struct jbd_stats_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ s->stats = kmalloc(size, GFP_KERNEL); -+ if (s->stats == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ spin_lock(&journal->j_history_lock); -+ memcpy(s->stats, journal->j_history, size); -+ s->max = journal->j_history_max; -+ s->start = journal->j_history_cur % s->max; -+ spin_unlock(&journal->j_history_lock); -+ -+ rc = seq_open(file, &jbd_seq_history_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->stats); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int jbd_seq_history_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct jbd_stats_proc_session *s = seq->private; -+ kfree(s->stats); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations jbd_seq_history_fops = { -+ .owner = THIS_MODULE, -+ .open = jbd_seq_history_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = jbd_seq_history_release, -+}; -+ -+static void *jbd_seq_info_start(struct seq_file *seq, loff_t *pos) -+{ -+ return *pos ? NULL : SEQ_START_TOKEN; -+} -+ -+static void *jbd_seq_info_next(struct seq_file *seq, void *v, loff_t *pos) -+{ -+ return NULL; -+} -+ -+static int jbd_seq_info_show(struct seq_file *seq, void *v) -+{ -+ struct jbd_stats_proc_session *s = seq->private; -+ if (v != SEQ_START_TOKEN) -+ return 0; -+ seq_printf(seq, "%lu transaction, each upto %u blocks\n", -+ s->stats->ts_tid, -+ s->journal->j_max_transaction_buffers); -+ if (s->stats->ts_tid == 0) -+ return 0; -+ seq_printf(seq, "average: \n %lums waiting for transaction\n", -+ s->stats->ts_wait / s->stats->ts_tid); -+ seq_printf(seq, " %lums running transaction\n", -+ s->stats->ts_running / s->stats->ts_tid); -+ seq_printf(seq, " %lums transaction was being locked\n", -+ s->stats->ts_locked / s->stats->ts_tid); -+ seq_printf(seq, " %lums flushing data (in ordered mode)\n", -+ s->stats->ts_flushing / s->stats->ts_tid); -+ seq_printf(seq, " %lums logging transaction\n", -+ s->stats->ts_logging / s->stats->ts_tid); -+ seq_printf(seq, " %lu handles per transaction\n", -+ s->stats->ts_handle_count / s->stats->ts_tid); -+ seq_printf(seq, " %lu blocks per transaction\n", -+ s->stats->ts_blocks / s->stats->ts_tid); -+ seq_printf(seq, " %lu logged blocks per transaction\n", -+ s->stats->ts_blocks_logged / s->stats->ts_tid); -+ return 0; -+} -+ -+static void jbd_seq_info_stop(struct seq_file *seq, void *v) -+{ -+} -+ -+static struct seq_operations jbd_seq_info_ops = { -+ .start = jbd_seq_info_start, -+ .next = jbd_seq_info_next, -+ .stop = jbd_seq_info_stop, -+ .show = jbd_seq_info_show, -+}; -+ -+static int jbd_seq_info_open(struct inode *inode, struct file *file) -+{ -+ journal_t *journal = PDE(inode)->data; -+ struct jbd_stats_proc_session *s; -+ int rc, size; -+ -+ s = kmalloc(sizeof(*s), GFP_KERNEL); -+ if (s == NULL) -+ return -EIO; -+ size = sizeof(struct transaction_stats_s); -+ s->stats = kmalloc(size, GFP_KERNEL); -+ if (s->stats == NULL) { -+ kfree(s); -+ return -EIO; -+ } -+ spin_lock(&journal->j_history_lock); -+ memcpy(s->stats, &journal->j_stats, size); -+ s->journal = journal; -+ spin_unlock(&journal->j_history_lock); -+ -+ rc = seq_open(file, &jbd_seq_info_ops); -+ if (rc == 0) { -+ struct seq_file *m = (struct seq_file *)file->private_data; -+ m->private = s; -+ } else { -+ kfree(s->stats); -+ kfree(s); -+ } -+ return rc; -+ -+} -+ -+static int jbd_seq_info_release(struct inode *inode, struct file *file) -+{ -+ struct seq_file *seq = (struct seq_file *)file->private_data; -+ struct jbd_stats_proc_session *s = seq->private; -+ kfree(s->stats); -+ kfree(s); -+ return seq_release(inode, file); -+} -+ -+static struct file_operations jbd_seq_info_fops = { -+ .owner = THIS_MODULE, -+ .open = jbd_seq_info_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = jbd_seq_info_release, -+}; -+ -+static struct proc_dir_entry *proc_jbd_stats = NULL; -+ -+static void jbd_stats_proc_init(journal_t *journal) -+{ -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name)); -+ journal->j_proc_entry = proc_mkdir(name, proc_jbd_stats); -+ if (journal->j_proc_entry) { -+ struct proc_dir_entry *p; -+ p = create_proc_entry("history", S_IRUGO, -+ journal->j_proc_entry); -+ if (p) { -+ p->proc_fops = &jbd_seq_history_fops; -+ p->data = journal; -+ p = create_proc_entry("info", S_IRUGO, -+ journal->j_proc_entry); -+ if (p) { -+ p->proc_fops = &jbd_seq_info_fops; -+ p->data = journal; -+ } -+ } -+ } -+} -+ -+static void jbd_stats_proc_exit(journal_t *journal) -+{ -+ char name[64]; -+ -+ snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name)); -+ remove_proc_entry("info", journal->j_proc_entry); -+ remove_proc_entry("history", journal->j_proc_entry); -+ remove_proc_entry(name, proc_jbd_stats); -+} -+ -+static void journal_init_stats(journal_t *journal) -+{ -+ int size; -+ -+ if (proc_jbd_stats == NULL) -+ return; -+ -+ journal->j_history_max = 100; -+ size = sizeof(struct transaction_stats_s) * journal->j_history_max; -+ journal->j_history = kmalloc(size, GFP_KERNEL); -+ if (journal->j_history == NULL) { -+ journal->j_history_max = 0; -+ return; -+ } -+ memset(journal->j_history, 0, size); -+ spin_lock_init(&journal->j_history_lock); -+} -+ - /* - * Management for journal control blocks: functions to create and - * destroy journal_t structures, and to initialise and read existing -@@ -691,6 +986,9 @@ static journal_t * journal_init_common ( - kfree(journal); - goto fail; - } -+ -+ journal_init_stats(journal); -+ - return journal; - fail: - return NULL; -@@ -733,6 +1031,7 @@ journal_t * journal_init_dev(struct bloc - journal->j_blk_offset = start; - journal->j_maxlen = len; - journal->j_blocksize = blocksize; -+ jbd_stats_proc_init(journal); - - bh = __getblk(journal->j_dev, start, journal->j_blocksize); - J_ASSERT(bh != NULL); -@@ -770,6 +1069,7 @@ journal_t * journal_init_inode (struct i - - journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits; - journal->j_blocksize = inode->i_sb->s_blocksize; -+ jbd_stats_proc_init(journal); - - err = journal_bmap(journal, 0, &blocknr); - /* If that failed, give up */ -@@ -1140,6 +1440,8 @@ void journal_destroy(journal_t *journal) - brelse(journal->j_sb_buffer); - } - -+ if (journal->j_proc_entry) -+ jbd_stats_proc_exit(journal); - if (journal->j_inode) - iput(journal->j_inode); - if (journal->j_revoke) -@@ -1896,6 +2198,28 @@ static void __exit remove_jbd_proc_entry - - #endif - -+#if defined(CONFIG_PROC_FS) -+ -+#define JBD_STATS_PROC_NAME "fs/jbd" -+ -+static void __init create_jbd_stats_proc_entry(void) -+{ -+ proc_jbd_stats = proc_mkdir(JBD_STATS_PROC_NAME, NULL); -+} -+ -+static void __exit remove_jbd_stats_proc_entry(void) -+{ -+ if (proc_jbd_stats) -+ remove_proc_entry(JBD_STATS_PROC_NAME, NULL); -+} -+ -+#else -+ -+#define create_jbd_stats_proc_entry() do {} while (0) -+#define remove_jbd_stats_proc_entry() do {} while (0) -+ -+#endif -+ - kmem_cache_t *jbd_handle_cache; - - static int __init journal_init_handle_cache(void) -@@ -1950,6 +2274,7 @@ static int __init journal_init(void) - if (ret != 0) - journal_destroy_caches(); - create_jbd_proc_entry(); -+ create_jbd_stats_proc_entry(); - return ret; - } - -@@ -1961,6 +2286,7 @@ static void __exit journal_exit(void) - printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n); - #endif - remove_jbd_proc_entry(); -+ remove_jbd_stats_proc_entry(); - journal_destroy_caches(); - } - diff --git a/lustre/kernel_patches/patches/link_notlast-susefix.patch b/lustre/kernel_patches/patches/link_notlast-susefix.patch deleted file mode 100644 index e3efbb465b..0000000000 --- a/lustre/kernel_patches/patches/link_notlast-susefix.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- linux-2.6.5-7.141/fs/namei.c.orig 2005-04-01 18:03:37.788262784 +0300 -+++ linux-2.6.5-7.141/fs/namei.c 2005-04-01 18:05:43.058218856 +0300 -@@ -719,10 +719,12 @@ - goto out_dput; - - if (inode->i_op->follow_link) { -+ int save_flags = nd->flags; - mntget(next.mnt); - nd->flags |= LOOKUP_LINK_NOTLAST; - err = do_follow_link(next.dentry, nd); -- nd->flags &= ~LOOKUP_LINK_NOTLAST; -+ if (!(save_flags & LOOKUP_LINK_NOTLAST)) -+ nd->flags &= ~LOOKUP_LINK_NOTLAST; - dput(next.dentry); - mntput(next.mnt); - if (err) diff --git a/lustre/kernel_patches/patches/linux-2.6-binutils-2.16.patch b/lustre/kernel_patches/patches/linux-2.6-binutils-2.16.patch deleted file mode 100644 index 5c2e7dc822..0000000000 --- a/lustre/kernel_patches/patches/linux-2.6-binutils-2.16.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- linux/arch/i386/kernel/process.c.seg 2005-03-27 13:07:14.000000000 -0800 -+++ linux/arch/i386/kernel/process.c 2005-03-28 10:28:47.000000000 -0800 -@@ -597,8 +597,8 @@ struct task_struct fastcall * __switch_t - * Save away %fs and %gs. No need to save %es and %ds, as - * those are always kernel segments while inside the kernel. - */ -- asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs)); -- asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs)); -+ asm volatile("mov %%fs,%0":"=m" (prev->fs)); -+ asm volatile("mov %%gs,%0":"=m" (prev->gs)); - - /* - * Restore %fs and %gs if needed. ---- linux/arch/i386/kernel/vm86.c.seg 2005-03-27 13:07:14.000000000 -0800 -+++ linux/arch/i386/kernel/vm86.c 2005-03-28 10:28:47.000000000 -0800 -@@ -294,8 +294,8 @@ static void do_sys_vm86(struct kernel_vm - */ - info->regs32->eax = 0; - tsk->thread.saved_esp0 = tsk->thread.esp0; -- asm volatile("movl %%fs,%0":"=m" (tsk->thread.saved_fs)); -- asm volatile("movl %%gs,%0":"=m" (tsk->thread.saved_gs)); -+ asm volatile("mov %%fs,%0":"=m" (tsk->thread.saved_fs)); -+ asm volatile("mov %%gs,%0":"=m" (tsk->thread.saved_gs)); - - tss = &per_cpu(init_tss, get_cpu()); - tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0; ---- linux/arch/x86_64/kernel/process.c.seg 2005-03-27 13:07:49.000000000 -0800 -+++ linux/arch/x86_64/kernel/process.c 2005-03-28 11:11:04.206766410 -0800 -@@ -391,10 +391,10 @@ int copy_thread(int nr, unsigned long cl - p->thread.fs = me->thread.fs; - p->thread.gs = me->thread.gs; - -- asm("movl %%gs,%0" : "=m" (p->thread.gsindex)); -- asm("movl %%fs,%0" : "=m" (p->thread.fsindex)); -- asm("movl %%es,%0" : "=m" (p->thread.es)); -- asm("movl %%ds,%0" : "=m" (p->thread.ds)); -+ asm("mov %%gs,%0" : "=m" (p->thread.gsindex)); -+ asm("mov %%fs,%0" : "=m" (p->thread.fsindex)); -+ asm("mov %%es,%0" : "=m" (p->thread.es)); -+ asm("mov %%ds,%0" : "=m" (p->thread.ds)); - - if (unlikely(me->thread.io_bitmap_ptr != NULL)) { - p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); -@@ -457,11 +457,11 @@ struct task_struct *__switch_to(struct t - * Switch DS and ES. - * This won't pick up thread selector changes, but I guess that is ok. - */ -- asm volatile("movl %%es,%0" : "=m" (prev->es)); -+ asm volatile("mov %%es,%0" : "=m" (prev->es)); - if (unlikely(next->es | prev->es)) - loadsegment(es, next->es); - -- asm volatile ("movl %%ds,%0" : "=m" (prev->ds)); -+ asm volatile ("mov %%ds,%0" : "=m" (prev->ds)); - if (unlikely(next->ds | prev->ds)) - loadsegment(ds, next->ds); - -@@ -472,7 +472,7 @@ struct task_struct *__switch_to(struct t - */ - { - unsigned fsindex; -- asm volatile("movl %%fs,%0" : "=g" (fsindex)); -+ asm volatile("movl %%fs,%0" : "=r" (fsindex)); - /* segment register != 0 always requires a reload. - also reload when it has changed. - when prev process used 64bit base always reload -@@ -493,7 +493,7 @@ struct task_struct *__switch_to(struct t - } - { - unsigned gsindex; -- asm volatile("movl %%gs,%0" : "=g" (gsindex)); -+ asm volatile("movl %%gs,%0" : "=r" (gsindex)); - if (unlikely(gsindex | next->gsindex | prev->gs)) { - load_gs_index(next->gsindex); - if (gsindex) ---- linux/include/asm-i386/system.h.seg 2005-03-27 13:09:12.000000000 -0800 -+++ linux/include/asm-i386/system.h 2005-03-28 10:28:47.000000000 -0800 -@@ -81,7 +81,7 @@ static inline unsigned long _get_base(ch - #define loadsegment(seg,value) \ - asm volatile("\n" \ - "1:\t" \ -- "movl %0,%%" #seg "\n" \ -+ "mov %0,%%" #seg "\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3:\t" \ -@@ -93,13 +93,13 @@ static inline unsigned long _get_base(ch - ".align 4\n\t" \ - ".long 1b,3b\n" \ - ".previous" \ -- : :"m" (*(unsigned int *)&(value))) -+ : :"m" (value)) - - /* - * Save a segment register away - */ - #define savesegment(seg, value) \ -- asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value))) -+ asm volatile("mov %%" #seg ",%0":"=m" (value)) - - /* - * Clear and set 'TS' bit respectively diff --git a/lustre/kernel_patches/patches/linux-2.6.9-ext3-sub-second-timestamp.patch b/lustre/kernel_patches/patches/linux-2.6.9-ext3-sub-second-timestamp.patch deleted file mode 100644 index 3b467956e9..0000000000 --- a/lustre/kernel_patches/patches/linux-2.6.9-ext3-sub-second-timestamp.patch +++ /dev/null @@ -1,631 +0,0 @@ -Index: linux-2.6.10/drivers/char/qtronix.c -=================================================================== ---- linux-2.6.10.orig/drivers/char/qtronix.c 2004-12-24 14:35:50.000000000 -0700 -+++ linux-2.6.10/drivers/char/qtronix.c 2006-01-03 16:16:52.000000000 -0700 -@@ -537,7 +537,7 @@ - i--; - } - if (count-i) { -- file->f_dentry->d_inode->i_atime = CURRENT_TIME; -+ file->f_dentry->d_inode->i_atime = current_fs_time(inode->i_sb); - return count-i; - } - if (signal_pending(current)) -Index: linux-2.6.10/drivers/char/random.c -=================================================================== ---- linux-2.6.10.orig/drivers/char/random.c 2005-04-06 09:38:33.000000000 -0600 -+++ linux-2.6.10/drivers/char/random.c 2006-01-03 16:16:52.000000000 -0700 -@@ -1743,8 +1743,9 @@ - if (p == buffer) { - return (ssize_t)ret; - } else { -- file->f_dentry->d_inode->i_mtime = CURRENT_TIME; -- mark_inode_dirty(file->f_dentry->d_inode); -+ struct inode *inode = file->f_dentry->d_inode; -+ inode->i_mtime = current_fs_time(inode->i_sb); -+ mark_inode_dirty(inode); - return (ssize_t)(p - buffer); - } - } -Index: linux-2.6.10/drivers/char/sonypi.c -=================================================================== ---- linux-2.6.10.orig/drivers/char/sonypi.c 2004-12-24 14:35:23.000000000 -0700 -+++ linux-2.6.10/drivers/char/sonypi.c 2006-01-03 16:18:31.000000000 -0700 -@@ -537,7 +537,8 @@ - } - - if (ret > 0) -- file->f_dentry->d_inode->i_atime = CURRENT_TIME; -+ struct inode *inode = file->f_dentry->d_inode; -+ inode->i_atime = current_fs_time(inode->i_sb); - - return ret; - } -Index: linux-2.6.10/drivers/char/tty_io.c -=================================================================== ---- linux-2.6.10.orig/drivers/char/tty_io.c 2005-04-06 09:38:33.000000000 -0600 -+++ linux-2.6.10/drivers/char/tty_io.c 2006-01-03 16:16:52.000000000 -0700 -@@ -1018,7 +1018,7 @@ - tty_ldisc_deref(ld); - unlock_kernel(); - if (i > 0) -- inode->i_atime = CURRENT_TIME; -+ inode->i_atime = current_fs_time(inode->i_sb); - return i; - } - -@@ -1095,7 +1095,8 @@ - cond_resched(); - } - if (written) { -- file->f_dentry->d_inode->i_mtime = CURRENT_TIME; -+ struct inode *inode = file->f_dentry->d_inode; -+ inode->i_mtime = current_fs_time(inode->i_sb); - ret = written; - } - up(&tty->atomic_write); -Index: linux-2.6.10/fs/attr.c -=================================================================== ---- linux-2.6.10.orig/fs/attr.c 2004-12-24 14:34:00.000000000 -0700 -+++ linux-2.6.10/fs/attr.c 2006-01-03 16:16:52.000000000 -0700 -@@ -14,6 +14,7 @@ - #include <linux/fcntl.h> - #include <linux/quotaops.h> - #include <linux/security.h> -+#include <linux/time.h> - - /* Taken over from the old code... */ - -@@ -87,11 +88,14 @@ - if (ia_valid & ATTR_GID) - inode->i_gid = attr->ia_gid; - if (ia_valid & ATTR_ATIME) -- inode->i_atime = attr->ia_atime; -+ inode->i_atime = timespec_trunc(attr->ia_atime, -+ get_sb_time_gran(inode->i_sb)); - if (ia_valid & ATTR_MTIME) -- inode->i_mtime = attr->ia_mtime; -+ inode->i_mtime = timespec_trunc(attr->ia_mtime, -+ get_sb_time_gran(inode->i_sb)); - if (ia_valid & ATTR_CTIME) -- inode->i_ctime = attr->ia_ctime; -+ inode->i_ctime = timespec_trunc(attr->ia_ctime, -+ get_sb_time_gran(inode->i_sb)); - if (ia_valid & ATTR_MODE) { - umode_t mode = attr->ia_mode; - -@@ -131,14 +135,17 @@ - int notify_change(struct dentry * dentry, struct iattr * attr) - { - struct inode *inode = dentry->d_inode; -- mode_t mode = inode->i_mode; -+ mode_t mode; - int error; -- struct timespec now = CURRENT_TIME; -+ struct timespec now; - unsigned int ia_valid = attr->ia_valid; - - if (!inode) - BUG(); - -+ mode = inode->i_mode; -+ now = current_fs_time(inode->i_sb); -+ - attr->ia_ctime = now; - if (!(ia_valid & ATTR_ATIME_SET)) - attr->ia_atime = now; -Index: linux-2.6.10/fs/bad_inode.c -=================================================================== ---- linux-2.6.10.orig/fs/bad_inode.c 2004-12-24 14:35:50.000000000 -0700 -+++ linux-2.6.10/fs/bad_inode.c 2006-01-03 16:16:52.000000000 -0700 -@@ -105,7 +105,8 @@ - remove_inode_hash(inode); - - inode->i_mode = S_IFREG; -- inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; -+ inode->i_atime = inode->i_mtime = inode->i_ctime = -+ current_fs_time(inode->i_sb); - inode->i_op = &bad_inode_ops; - inode->i_fop = &bad_file_ops; - } -Index: linux-2.6.10/fs/binfmt_misc.c -=================================================================== ---- linux-2.6.10.orig/fs/binfmt_misc.c 2004-12-24 14:34:31.000000000 -0700 -+++ linux-2.6.10/fs/binfmt_misc.c 2006-01-03 16:16:52.000000000 -0700 -@@ -509,7 +509,8 @@ - inode->i_gid = 0; - inode->i_blksize = PAGE_CACHE_SIZE; - inode->i_blocks = 0; -- inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; -+ inode->i_atime = inode->i_mtime = inode->i_ctime = -+ current_fs_time(inode->i_sb); - } - return inode; - } -Index: linux-2.6.10/fs/ext2/dir.c -=================================================================== ---- linux-2.6.10.orig/fs/ext2/dir.c 2004-12-24 14:34:58.000000000 -0700 -+++ linux-2.6.10/fs/ext2/dir.c 2006-01-03 16:16:52.000000000 -0700 -@@ -426,7 +426,7 @@ - ext2_set_de_type (de, inode); - err = ext2_commit_chunk(page, from, to); - ext2_put_page(page); -- dir->i_mtime = dir->i_ctime = CURRENT_TIME; -+ dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; - EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL; - mark_inode_dirty(dir); - } -@@ -516,7 +516,7 @@ - de->inode = cpu_to_le32(inode->i_ino); - ext2_set_de_type (de, inode); - err = ext2_commit_chunk(page, from, to); -- dir->i_mtime = dir->i_ctime = CURRENT_TIME; -+ dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; - EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL; - mark_inode_dirty(dir); - /* OFFSET_CACHE */ -@@ -564,7 +564,7 @@ - pde->rec_len = cpu_to_le16(to-from); - dir->inode = 0; - err = ext2_commit_chunk(page, from, to); -- inode->i_ctime = inode->i_mtime = CURRENT_TIME; -+ inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; - EXT2_I(inode)->i_flags &= ~EXT2_BTREE_FL; - mark_inode_dirty(inode); - out: -Index: linux-2.6.10/fs/ext2/ialloc.c -=================================================================== ---- linux-2.6.10.orig/fs/ext2/ialloc.c 2004-12-24 14:34:47.000000000 -0700 -+++ linux-2.6.10/fs/ext2/ialloc.c 2006-01-03 16:16:52.000000000 -0700 -@@ -577,7 +577,7 @@ - inode->i_ino = ino; - inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size (for stat), not the fs block size */ - inode->i_blocks = 0; -- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; - memset(ei->i_data, 0, sizeof(ei->i_data)); - ei->i_flags = EXT2_I(dir)->i_flags & ~EXT2_BTREE_FL; - if (S_ISLNK(mode)) -Index: linux-2.6.10/fs/ext2/inode.c -=================================================================== ---- linux-2.6.10.orig/fs/ext2/inode.c 2004-12-24 14:33:51.000000000 -0700 -+++ linux-2.6.10/fs/ext2/inode.c 2006-01-03 16:16:52.000000000 -0700 -@@ -493,7 +493,7 @@ - - /* We are done with atomic stuff, now do the rest of housekeeping */ - -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - - /* had we spliced it onto indirect block? */ - if (where->bh) -@@ -953,7 +953,7 @@ - case EXT2_TIND_BLOCK: - ; - } -- inode->i_mtime = inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; - if (inode_needs_sync(inode)) { - sync_mapping_buffers(inode->i_mapping); - ext2_sync_inode (inode); -Index: linux-2.6.10/fs/ext2/ioctl.c -=================================================================== ---- linux-2.6.10.orig/fs/ext2/ioctl.c 2004-12-24 14:35:49.000000000 -0700 -+++ linux-2.6.10/fs/ext2/ioctl.c 2006-01-03 16:16:52.000000000 -0700 -@@ -59,7 +59,7 @@ - ei->i_flags = flags; - - ext2_set_inode_flags(inode); -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - mark_inode_dirty(inode); - return 0; - } -@@ -72,7 +72,7 @@ - return -EROFS; - if (get_user(inode->i_generation, (int __user *) arg)) - return -EFAULT; -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - mark_inode_dirty(inode); - return 0; - default: -Index: linux-2.6.10/fs/ext2/namei.c -=================================================================== ---- linux-2.6.10.orig/fs/ext2/namei.c 2004-12-24 14:35:25.000000000 -0700 -+++ linux-2.6.10/fs/ext2/namei.c 2006-01-03 16:16:52.000000000 -0700 -@@ -211,7 +211,7 @@ - if (inode->i_nlink >= EXT2_LINK_MAX) - return -EMLINK; - -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - ext2_inc_count(inode); - atomic_inc(&inode->i_count); - -@@ -337,7 +337,7 @@ - goto out_dir; - ext2_inc_count(old_inode); - ext2_set_link(new_dir, new_de, new_page, old_inode); -- new_inode->i_ctime = CURRENT_TIME; -+ new_inode->i_ctime = CURRENT_TIME_SEC; - if (dir_de) - new_inode->i_nlink--; - ext2_dec_count(new_inode); -@@ -362,7 +362,7 @@ - * rename. - * ext2_dec_count() will mark the inode dirty. - */ -- old_inode->i_ctime = CURRENT_TIME; -+ old_inode->i_ctime = CURRENT_TIME_SEC; - - ext2_delete_entry (old_de, old_page); - ext2_dec_count(old_inode); -Index: linux-2.6.10/fs/ext2/super.c -=================================================================== ---- linux-2.6.10.orig/fs/ext2/super.c 2004-12-24 14:35:01.000000000 -0700 -+++ linux-2.6.10/fs/ext2/super.c 2006-01-03 16:19:06.000000000 -0700 -@@ -595,7 +595,7 @@ - es = (struct ext2_super_block *) (((char *)bh->b_data) + offset); - sbi->s_es = es; - sb->s_magic = le16_to_cpu(es->s_magic); -- sb->s_flags |= MS_ONE_SECOND; -+ set_sb_time_gran(sb, 1000000000U); - - if (sb->s_magic != EXT2_SUPER_MAGIC) - goto cantfind_ext2; -Index: linux-2.6.10/fs/ext2/xattr.c -=================================================================== ---- linux-2.6.10.orig/fs/ext2/xattr.c 2005-04-06 09:38:35.000000000 -0600 -+++ linux-2.6.10/fs/ext2/xattr.c 2006-01-03 16:16:52.000000000 -0700 -@@ -702,7 +702,7 @@ - - /* Update the inode. */ - EXT2_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0; -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - if (IS_SYNC(inode)) { - error = ext2_sync_inode (inode); - if (error) -Index: linux-2.6.10/fs/ext3/ialloc.c -=================================================================== ---- linux-2.6.10.orig/fs/ext3/ialloc.c 2004-12-24 14:34:45.000000000 -0700 -+++ linux-2.6.10/fs/ext3/ialloc.c 2006-01-03 16:16:52.000000000 -0700 -@@ -558,7 +558,7 @@ - /* This is the optimal IO size (for stat), not the fs block size */ - inode->i_blksize = PAGE_SIZE; - inode->i_blocks = 0; -- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; - - memset(ei->i_data, 0, sizeof(ei->i_data)); - ei->i_next_alloc_block = 0; -Index: linux-2.6.10/fs/ext3/inode.c -=================================================================== ---- linux-2.6.10.orig/fs/ext3/inode.c 2005-04-06 09:38:35.000000000 -0600 -+++ linux-2.6.10/fs/ext3/inode.c 2006-01-03 16:16:52.000000000 -0700 -@@ -626,7 +626,7 @@ - - /* We are done with atomic stuff, now do the rest of housekeeping */ - -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - ext3_mark_inode_dirty(handle, inode); - - /* had we spliced it onto indirect block? */ -@@ -2199,7 +2199,7 @@ - ; - } - up(&ei->truncate_sem); -- inode->i_mtime = inode->i_ctime = CURRENT_TIME; -+ inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; - ext3_mark_inode_dirty(handle, inode); - - /* In a multi-transaction truncate, we only make the final -Index: linux-2.6.10/fs/ext3/ioctl.c -=================================================================== ---- linux-2.6.10.orig/fs/ext3/ioctl.c 2004-12-24 14:34:31.000000000 -0700 -+++ linux-2.6.10/fs/ext3/ioctl.c 2006-01-03 16:16:52.000000000 -0700 -@@ -87,7 +87,7 @@ - ei->i_flags = flags; - - ext3_set_inode_flags(inode); -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - - err = ext3_mark_iloc_dirty(handle, inode, &iloc); - flags_err: -@@ -121,7 +121,7 @@ - return PTR_ERR(handle); - err = ext3_reserve_inode_write(handle, inode, &iloc); - if (err == 0) { -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - inode->i_generation = generation; - err = ext3_mark_iloc_dirty(handle, inode, &iloc); - } -Index: linux-2.6.10/fs/ext3/namei.c -=================================================================== ---- linux-2.6.10.orig/fs/ext3/namei.c 2004-12-24 14:34:58.000000000 -0700 -+++ linux-2.6.10/fs/ext3/namei.c 2006-01-03 16:16:52.000000000 -0700 -@@ -1251,7 +1251,7 @@ - * happen is that the times are slightly out of date - * and/or different from the directory change time. - */ -- dir->i_mtime = dir->i_ctime = CURRENT_TIME; -+ dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; - ext3_update_dx_flag(dir); - dir->i_version++; - ext3_mark_inode_dirty(handle, dir); -@@ -2029,7 +2029,7 @@ - * recovery. */ - inode->i_size = 0; - ext3_orphan_add(handle, inode); -- inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; -+ inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; - ext3_mark_inode_dirty(handle, inode); - dir->i_nlink--; - ext3_update_dx_flag(dir); -@@ -2079,7 +2079,7 @@ - retval = ext3_delete_entry(handle, dir, de, bh); - if (retval) - goto end_unlink; -- dir->i_ctime = dir->i_mtime = CURRENT_TIME; -+ dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; - ext3_update_dx_flag(dir); - ext3_mark_inode_dirty(handle, dir); - inode->i_nlink--; -@@ -2169,7 +2169,7 @@ - if (IS_DIRSYNC(dir)) - handle->h_sync = 1; - -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - ext3_inc_count(handle, inode); - atomic_inc(&inode->i_count); - -@@ -2270,7 +2270,7 @@ - * Like most other Unix systems, set the ctime for inodes on a - * rename. - */ -- old_inode->i_ctime = CURRENT_TIME; -+ old_inode->i_ctime = CURRENT_TIME_SEC; - ext3_mark_inode_dirty(handle, old_inode); - - /* -@@ -2303,9 +2303,9 @@ - - if (new_inode) { - new_inode->i_nlink--; -- new_inode->i_ctime = CURRENT_TIME; -+ new_inode->i_ctime = CURRENT_TIME_SEC; - } -- old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; -+ old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; - ext3_update_dx_flag(old_dir); - if (dir_bh) { - BUFFER_TRACE(dir_bh, "get_write_access"); -Index: linux-2.6.10/fs/ext3/super.c -=================================================================== ---- linux-2.6.10.orig/fs/ext3/super.c 2005-04-06 09:38:35.000000000 -0600 -+++ linux-2.6.10/fs/ext3/super.c 2006-01-03 16:16:52.000000000 -0700 -@@ -1318,7 +1318,7 @@ - if (!parse_options ((char *) data, sb, &journal_inum, NULL, 0)) - goto failed_mount; - -- sb->s_flags |= MS_ONE_SECOND; -+ set_sb_time_gran(sb, 1000000000U); - sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | - ((sbi->s_mount_opt & EXT3_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); - -Index: linux-2.6.10/fs/ext3/xattr.c -=================================================================== ---- linux-2.6.10.orig/fs/ext3/xattr.c 2005-04-06 09:38:35.000000000 -0600 -+++ linux-2.6.10/fs/ext3/xattr.c 2006-01-03 16:16:52.000000000 -0700 -@@ -723,7 +723,7 @@ - - /* Update the inode. */ - EXT3_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0; -- inode->i_ctime = CURRENT_TIME; -+ inode->i_ctime = CURRENT_TIME_SEC; - ext3_mark_inode_dirty(handle, inode); - if (IS_SYNC(inode)) - handle->h_sync = 1; -Index: linux-2.6.10/fs/inode.c -=================================================================== ---- linux-2.6.10.orig/fs/inode.c 2006-01-03 15:33:21.000000000 -0700 -+++ linux-2.6.10/fs/inode.c 2006-01-03 16:16:52.000000000 -0700 -@@ -1131,19 +1131,6 @@ - - EXPORT_SYMBOL(bmap); - --/* -- * Return true if the filesystem which backs this inode considers the two -- * passed timespecs to be sufficiently different to warrant flushing the -- * altered time out to disk. -- */ --static int inode_times_differ(struct inode *inode, -- struct timespec *old, struct timespec *new) --{ -- if (IS_ONE_SECOND(inode)) -- return old->tv_sec != new->tv_sec; -- return !timespec_equal(old, new); --} -- - /** - * update_atime - update the access time - * @inode: inode accessed -@@ -1163,8 +1150,8 @@ - if (IS_RDONLY(inode)) - return; - -- now = current_kernel_time(); -- if (inode_times_differ(inode, &inode->i_atime, &now)) { -+ now = current_fs_time(inode->i_sb); -+ if (!timespec_equal(&inode->i_atime, &now)) { - inode->i_atime = now; - mark_inode_dirty_sync(inode); - } else { -@@ -1194,14 +1181,13 @@ - if (IS_RDONLY(inode)) - return; - -- now = current_kernel_time(); -- -- if (inode_times_differ(inode, &inode->i_mtime, &now)) -+ now = current_fs_time(inode->i_sb); -+ if (!timespec_equal(&inode->i_mtime, &now)) - sync_it = 1; - inode->i_mtime = now; - - if (ctime_too) { -- if (inode_times_differ(inode, &inode->i_ctime, &now)) -+ if (!timespec_equal(&inode->i_ctime, &now)) - sync_it = 1; - inode->i_ctime = now; - } -Index: linux-2.6.10/fs/locks.c -=================================================================== ---- linux-2.6.10.orig/fs/locks.c 2004-12-24 14:35:28.000000000 -0700 -+++ linux-2.6.10/fs/locks.c 2006-01-03 16:16:52.000000000 -0700 -@@ -1228,7 +1228,7 @@ - { - struct file_lock *flock = inode->i_flock; - if (flock && IS_LEASE(flock) && (flock->fl_type & F_WRLCK)) -- *time = CURRENT_TIME; -+ *time = current_fs_time(inode->i_sb); - else - *time = inode->i_mtime; - } -Index: linux-2.6.10/include/linux/fs.h -=================================================================== ---- linux-2.6.10.orig/include/linux/fs.h 2006-01-03 16:04:26.000000000 -0700 -+++ linux-2.6.10/include/linux/fs.h 2006-01-03 16:16:52.000000000 -0700 -@@ -124,7 +124,8 @@ - #define MS_REC 16384 - #define MS_VERBOSE 32768 - #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ --#define MS_ONE_SECOND (1<<17) /* fs has 1 sec a/m/ctime resolution */ -+#define MS_ONE_SECOND (1<<17) /* fs has 1 sec time resolution (obsolete) */ -+#define MS_TIME_GRAN (1<<18) /* fs has s_time_gran field */ - #define MS_ACTIVE (1<<30) - #define MS_NOUSER (1<<31) - -@@ -803,8 +804,33 @@ - * even looking at it. You had been warned. - */ - struct semaphore s_vfs_rename_sem; /* Kludge */ -+ -+ /* Granuality of c/m/atime in ns. -+ Cannot be worse than a second */ -+#ifndef __GENKSYMS__ -+ u32 s_time_gran; -+#endif - }; - -+extern struct timespec current_fs_time(struct super_block *sb); -+ -+static inline u32 get_sb_time_gran(struct super_block *sb) -+{ -+ if (sb->s_flags & MS_TIME_GRAN) -+ return sb->s_time_gran; -+ if (sb->s_flags & MS_ONE_SECOND) -+ return 1000000000U; -+ return 1; -+} -+ -+static inline void set_sb_time_gran(struct super_block *sb, u32 time_gran) -+{ -+ sb->s_time_gran = time_gran; -+ sb->s_flags |= MS_TIME_GRAN; -+ if (time_gran == 1000000000U) -+ sb->s_flags |= MS_ONE_SECOND; -+} -+ - /* - * Snapshotting support. - */ -Index: linux-2.6.10/include/linux/time.h -=================================================================== ---- linux-2.6.10.orig/include/linux/time.h 2004-12-24 14:35:00.000000000 -0700 -+++ linux-2.6.10/include/linux/time.h 2006-01-03 16:16:52.000000000 -0700 -@@ -90,6 +90,7 @@ - struct timespec current_kernel_time(void); - - #define CURRENT_TIME (current_kernel_time()) -+#define CURRENT_TIME_SEC ((struct timespec) { xtime.tv_sec, 0 }) - - extern void do_gettimeofday(struct timeval *tv); - extern int do_settimeofday(struct timespec *tv); -@@ -103,6 +104,8 @@ - extern int do_getitimer(int which, struct itimerval *value); - extern void getnstimeofday (struct timespec *tv); - -+extern struct timespec timespec_trunc(struct timespec t, unsigned gran); -+ - static inline void - set_normalized_timespec (struct timespec *ts, time_t sec, long nsec) - { -Index: linux-2.6.10/kernel/time.c -=================================================================== ---- linux-2.6.10.orig/kernel/time.c 2004-12-24 14:34:26.000000000 -0700 -+++ linux-2.6.10/kernel/time.c 2006-01-03 16:16:52.000000000 -0700 -@@ -36,6 +36,7 @@ - - #include <asm/uaccess.h> - #include <asm/unistd.h> -+#include <linux/fs.h> - - /* - * The timezone where the local system is located. Used as a default by some -@@ -433,6 +434,50 @@ - - EXPORT_SYMBOL(current_kernel_time); - -+/** -+ * current_fs_time - Return FS time -+ * @sb: Superblock. -+ * -+ * Return the current time truncated to the time granuality supported by -+ * the fs. -+ */ -+struct timespec current_fs_time(struct super_block *sb) -+{ -+ struct timespec now = current_kernel_time(); -+ return timespec_trunc(now, get_sb_time_gran(sb)); -+} -+EXPORT_SYMBOL(current_fs_time); -+ -+/** -+ * timespec_trunc - Truncate timespec to a granuality -+ * @t: Timespec -+ * @gran: Granuality in ns. -+ * -+ * Truncate a timespec to a granuality. gran must be smaller than a second. -+ * Always rounds down. -+ * -+ * This function should be only used for timestamps returned by -+ * current_kernel_time() or CURRENT_TIME, not with do_gettimeofday() because -+ * it doesn't handle the better resolution of the later. -+ */ -+struct timespec timespec_trunc(struct timespec t, unsigned gran) -+{ -+ /* -+ * Division is pretty slow so avoid it for common cases. -+ * Currently current_kernel_time() never returns better than -+ * jiffies resolution. Exploit that. -+ */ -+ if (gran <= jiffies_to_usecs(1) * 1000) { -+ /* nothing */ -+ } else if (gran == 1000000000) { -+ t.tv_nsec = 0; -+ } else { -+ t.tv_nsec -= t.tv_nsec % gran; -+ } -+ return t; -+} -+EXPORT_SYMBOL(timespec_trunc); -+ - #ifdef CONFIG_TIME_INTERPOLATION - void getnstimeofday (struct timespec *tv) - { diff --git a/lustre/kernel_patches/patches/lookup_bdev_init_intent-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/lookup_bdev_init_intent-2.6.18-vanilla.patch deleted file mode 100644 index 287ed90514..0000000000 --- a/lustre/kernel_patches/patches/lookup_bdev_init_intent-2.6.18-vanilla.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: linux-2.6.7/fs/block_dev.c -=================================================================== ---- linux-2.6.7.orig/fs/block_dev.c 2004-06-16 13:20:26.000000000 +0800 -+++ linux-2.6.7/fs/block_dev.c 2004-08-30 17:36:57.000000000 +0800 -@@ -832,6 +832,7 @@ - if (!path || !*path) - return ERR_PTR(-EINVAL); - -+ intent_init(&nd.intent.open, IT_LOOKUP); - error = path_lookup(path, LOOKUP_FOLLOW, &nd); - if (error) - return ERR_PTR(error); diff --git a/lustre/kernel_patches/patches/lookup_bdev_init_intent.patch b/lustre/kernel_patches/patches/lookup_bdev_init_intent.patch deleted file mode 100644 index 5555427f91..0000000000 --- a/lustre/kernel_patches/patches/lookup_bdev_init_intent.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: linux-2.6.7/fs/block_dev.c -=================================================================== ---- linux-2.6.7.orig/fs/block_dev.c 2004-06-16 13:20:26.000000000 +0800 -+++ linux-2.6.7/fs/block_dev.c 2004-08-30 17:36:57.000000000 +0800 -@@ -832,6 +832,7 @@ - if (!path || !*path) - return ERR_PTR(-EINVAL); - -+ intent_init(&nd.intent, IT_LOOKUP); - error = path_lookup(path, LOOKUP_FOLLOW, &nd); - if (error) - return ERR_PTR(error); diff --git a/lustre/kernel_patches/patches/lustre-version-revert_suse.patch b/lustre/kernel_patches/patches/lustre-version-revert_suse.patch deleted file mode 100644 index 7925a8bcbf..0000000000 --- a/lustre/kernel_patches/patches/lustre-version-revert_suse.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- linux/include/linux/lustre_version.h 2005-06-28 12:24:04.000000000 -0400 -+++ /dev/null 2004-06-24 13:56:02.000000000 -0400 -@@ -1 +0,0 @@ --#define LUSTRE_KERNEL_VERSION 39 diff --git a/lustre/kernel_patches/patches/lustre_version.patch b/lustre/kernel_patches/patches/lustre_version.patch deleted file mode 100644 index d01f9721ac..0000000000 --- a/lustre/kernel_patches/patches/lustre_version.patch +++ /dev/null @@ -1,26 +0,0 @@ -Version 47: allow the ext3_map_inode_page() created param to be NULL -Version 46: Separate ->fs_private in struct file -Version 45: more robust and general dev_read_only for failover (b=4834) -Version 44: fix link_path_walk_it() oops creating .foo in deleted "." (b=5548) -Version 43: fix remove_suid to not crash 2.6, and do anything on 2.4 (b=5695) -Version 42: export show_task() -Version 41: revalidate should check working dir is a directory (b=4134) -Version 40: >32000 subdirectories support for ext3 (b=3244) -Version 39: add EXPORT_SYMBOL(smp_num_siblings) to vanilla-2.4.24 (b=3966) - eebperf (unfragmented 1MB write/read support) - 48-bit physical block support for extents -Version 38: drop dentry ref in ext3_add_link from open_connect_dentry (b=3266) -Version 37: fix htree rename-within-same-dir (b=3417), endianness (b=2447) -Version 36: don't dput dentry after error (b=2350), zero page->private (3119) -Version 35: pass intent to real_lookup after revalidate failure (b=3285) -Version 34: ext3 iopen assertion (b=2517), operations on deleted "." (b=2399) - - include/linux/lustre_version.h | 1 + - 1 files changed, 1 insertion(+) - ---- /dev/null Fri Aug 30 17:31:37 2002 -+++ linux-2.4.18-18.8.0-l12-braam/include/linux/lustre_version.h Thu Feb 13 07:58:33 2003 -@@ -0,0 +1 @@ -+#define LUSTRE_KERNEL_VERSION 47 - -_ diff --git a/lustre/kernel_patches/patches/md-rebuild-policy.patch b/lustre/kernel_patches/patches/md-rebuild-policy.patch deleted file mode 100644 index e6c9f9cdb9..0000000000 --- a/lustre/kernel_patches/patches/md-rebuild-policy.patch +++ /dev/null @@ -1,137 +0,0 @@ -diff -pur linux-2.6.18-53.orig/drivers/md/md.c linux-2.6.18-53/drivers/md/md.c ---- linux-2.6.18-53.orig/drivers/md/md.c 2008-02-13 17:34:25.000000000 +0800 -+++ linux-2.6.18-53/drivers/md/md.c 2008-02-13 17:39:28.000000000 +0800 -@@ -90,6 +90,8 @@ static void md_print_devices(void); - - static int sysctl_speed_limit_min = 1000; - static int sysctl_speed_limit_max = 200000; -+static int sysctl_rebuild_window_size = 256; -+static int sysctl_disk_idle_size = 4096; - static inline int speed_min(mddev_t *mddev) - { - return mddev->sync_speed_min ? -@@ -121,6 +123,22 @@ static ctl_table raid_table[] = { - .mode = S_IRUGO|S_IWUSR, - .proc_handler = &proc_dointvec, - }, -+ { -+ .ctl_name = DEV_RAID_REBUILD_WINDOW, -+ .procname = "rebuild_window_size", -+ .data = &sysctl_rebuild_window_size, -+ .maxlen = sizeof(int), -+ .mode = S_IRUGO|S_IWUSR, -+ .proc_handler = &proc_dointvec, -+ }, -+ { -+ .ctl_name = DEV_RAID_DISK_IDLE_SIZE, -+ .procname = "disk_idle_size", -+ .data = &sysctl_disk_idle_size, -+ .maxlen = sizeof(int), -+ .mode = S_IRUGO|S_IWUSR, -+ .proc_handler = &proc_dointvec, -+ }, - { .ctl_name = 0 } - }; - -@@ -4980,14 +4998,15 @@ static int is_mddev_idle(mddev_t *mddev) - mdk_rdev_t * rdev; - struct list_head *tmp; - int idle; -- unsigned long curr_events; -+ unsigned long rw, sync; - - idle = 1; - ITERATE_RDEV(mddev,rdev,tmp) { - struct gendisk *disk = rdev->bdev->bd_contains->bd_disk; -- curr_events = disk_stat_read(disk, sectors[0]) + -- disk_stat_read(disk, sectors[1]) - -- atomic_read(&disk->sync_io); -+ -+ rw = disk_stat_read(disk, sectors[READ])+disk_stat_read(disk, sectors[WRITE]); -+ sync = atomic_read(&disk->sync_io); -+ - /* The difference between curr_events and last_events - * will be affected by any new non-sync IO (making - * curr_events bigger) and any difference in the amount of -@@ -5001,9 +5020,9 @@ static int is_mddev_idle(mddev_t *mddev) - * - * Note: the following is an unsigned comparison. - */ -- if ((curr_events - rdev->last_events + 4096) > 8192) { -- rdev->last_events = curr_events; -+ if (rw - rdev->last_events > sync + sysctl_disk_idle_size) { - idle = 0; -+ rdev->last_events = rw - sync; - } - } - return idle; -@@ -5069,8 +5088,7 @@ static DECLARE_WAIT_QUEUE_HEAD(resync_wa - void md_do_sync(mddev_t *mddev) - { - mddev_t *mddev2; -- unsigned int currspeed = 0, -- window; -+ unsigned int currspeed = 0; - sector_t max_sectors,j, io_sectors; - unsigned long mark[SYNC_MARKS]; - sector_t mark_cnt[SYNC_MARKS]; -@@ -5190,9 +5208,8 @@ void md_do_sync(mddev_t *mddev) - /* - * Tune reconstruction: - */ -- window = 32*(PAGE_SIZE/512); - printk(KERN_INFO "md: using %dk window, over a total of %llu blocks.\n", -- window/2,(unsigned long long) max_sectors/2); -+ sysctl_rebuild_window_size/2,(unsigned long long) max_sectors/2); - - atomic_set(&mddev->recovery_active, 0); - init_waitqueue_head(&mddev->recovery_wait); -@@ -5230,7 +5247,7 @@ void md_do_sync(mddev_t *mddev) - */ - md_new_event(mddev); - -- if (last_check + window > io_sectors || j == max_sectors) -+ if (last_check + sysctl_rebuild_window_size > io_sectors || j == max_sectors) - continue; - - last_check = io_sectors; -@@ -5251,7 +5268,6 @@ void md_do_sync(mddev_t *mddev) - last_mark = next; - } - -- - if (kthread_should_stop()) { - /* - * got a signal, exit. -@@ -5275,10 +5291,16 @@ void md_do_sync(mddev_t *mddev) - - currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2 - /((jiffies-mddev->resync_mark)/HZ +1) +1; -- - if (currspeed > speed_min(mddev)) { - if ((currspeed > speed_max(mddev)) || - !is_mddev_idle(mddev)) { -+ static unsigned long next_report; -+ if (time_after(jiffies, next_report)) { -+ printk(KERN_INFO "md: rebuild %s throttled due to IO\n", -+ mdname(mddev)); -+ /* once per 10 minutes */ -+ next_report = jiffies + 600 * HZ; -+ } - msleep(500); - goto repeat; - } -diff -pur linux-2.6.18-53.orig/include/linux/sysctl.h linux-2.6.18-53/include/linux/sysctl.h ---- linux-2.6.18-53.orig/include/linux/sysctl.h 2008-02-13 17:35:25.000000000 +0800 -+++ linux-2.6.18-53/include/linux/sysctl.h 2008-02-13 17:36:22.000000000 +0800 -@@ -903,7 +903,9 @@ enum { - /* /proc/sys/dev/raid */ - enum { - DEV_RAID_SPEED_LIMIT_MIN=1, -- DEV_RAID_SPEED_LIMIT_MAX=2 -+ DEV_RAID_SPEED_LIMIT_MAX=2, -+ DEV_RAID_REBUILD_WINDOW=3, -+ DEV_RAID_DISK_IDLE_SIZE=4 - }; - - /* /proc/sys/dev/parport/default */ diff --git a/lustre/kernel_patches/patches/md_path_lookup-2.6-suse b/lustre/kernel_patches/patches/md_path_lookup-2.6-suse deleted file mode 100644 index 4e2b66d872..0000000000 --- a/lustre/kernel_patches/patches/md_path_lookup-2.6-suse +++ /dev/null @@ -1,25 +0,0 @@ -Index: linux-2.6.4-51.0/drivers/md/dm-path-selector.c -=================================================================== ---- linux-2.6.4-51.0.orig/drivers/md/dm-path-selector.c 2004-04-18 20:10:21.000000000 -0400 -+++ linux-2.6.4-51.0/drivers/md/dm-path-selector.c 2004-04-18 20:10:59.000000000 -0400 -@@ -129,7 +129,7 @@ - struct path *path; - }; - --static struct path_info *path_lookup(struct list_head *head, struct path *p) -+static struct path_info *md_path_lookup(struct list_head *head, struct path *p) - { - struct path_info *pi; - -@@ -235,9 +235,9 @@ - * mind the expense of these searches. - */ - spin_lock_irqsave(&s->lock, flags); -- pi = path_lookup(&s->valid_paths, p); -+ pi = md_path_lookup(&s->valid_paths, p); - if (!pi) -- pi = path_lookup(&s->invalid_paths, p); -+ pi = md_path_lookup(&s->invalid_paths, p); - - if (!pi) - DMWARN("asked to change the state of an unknown path"); diff --git a/lustre/kernel_patches/patches/md_path_lookup-2.6-suse.patch b/lustre/kernel_patches/patches/md_path_lookup-2.6-suse.patch deleted file mode 100644 index 4e2b66d872..0000000000 --- a/lustre/kernel_patches/patches/md_path_lookup-2.6-suse.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: linux-2.6.4-51.0/drivers/md/dm-path-selector.c -=================================================================== ---- linux-2.6.4-51.0.orig/drivers/md/dm-path-selector.c 2004-04-18 20:10:21.000000000 -0400 -+++ linux-2.6.4-51.0/drivers/md/dm-path-selector.c 2004-04-18 20:10:59.000000000 -0400 -@@ -129,7 +129,7 @@ - struct path *path; - }; - --static struct path_info *path_lookup(struct list_head *head, struct path *p) -+static struct path_info *md_path_lookup(struct list_head *head, struct path *p) - { - struct path_info *pi; - -@@ -235,9 +235,9 @@ - * mind the expense of these searches. - */ - spin_lock_irqsave(&s->lock, flags); -- pi = path_lookup(&s->valid_paths, p); -+ pi = md_path_lookup(&s->valid_paths, p); - if (!pi) -- pi = path_lookup(&s->invalid_paths, p); -+ pi = md_path_lookup(&s->invalid_paths, p); - - if (!pi) - DMWARN("asked to change the state of an unknown path"); diff --git a/lustre/kernel_patches/patches/modpost_external_module_updates_rhel4.patch b/lustre/kernel_patches/patches/modpost_external_module_updates_rhel4.patch deleted file mode 100644 index 35bf139dea..0000000000 --- a/lustre/kernel_patches/patches/modpost_external_module_updates_rhel4.patch +++ /dev/null @@ -1,351 +0,0 @@ -This patch updates the RHEL 4 module build system to properly support -dependencies between external modules, similarly to the way they are -supported in newer kernels. - -Index: linux-2.6.9-55.EL/scripts/Makefile.modpost -=================================================================== ---- linux-2.6.9-55.EL.orig/scripts/Makefile.modpost -+++ linux-2.6.9-55.EL/scripts/Makefile.modpost -@@ -38,7 +38,8 @@ _modpost: __modpost - include .config - include scripts/Makefile.lib - --symverfile := $(objtree)/Module.symvers -+kernelsymfile := $(objtree)/Module.symvers -+modulesymfile := $(KBUILD_EXTMOD)/Module.symvers - - # Step 1), find all modules listed in $(MODVERDIR)/ - __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) -@@ -52,7 +53,9 @@ _modpost: $(modules) - quiet_cmd_modpost = MODPOST - cmd_modpost = scripts/mod/modpost \ - $(if $(CONFIG_MODVERSIONS),-m) \ -- $(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \ -+ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ -+ $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ -+ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ - $(filter-out FORCE,$^) - - .PHONY: __modpost -Index: linux-2.6.9-55.EL/scripts/mod/modpost.c -=================================================================== ---- linux-2.6.9-55.EL.orig/scripts/mod/modpost.c -+++ linux-2.6.9-55.EL/scripts/mod/modpost.c -@@ -1,7 +1,8 @@ - /* Postprocess module symbol versions - * - * Copyright 2003 Kai Germaschewski -- * 2002-2003 Rusty Russell, IBM Corporation -+ * 2002-2004 Rusty Russell, IBM Corporation -+ * Copyright 2006 Sam Ravnborg - * - * Based in part on module-init-tools/depmod.c,file2alias - * -@@ -18,6 +19,8 @@ - int modversions = 0; - /* Warn about undefined symbols? (do so if we have vmlinux) */ - int have_vmlinux = 0; -+/* If we are modposting external module set to 1 */ -+static int external_module = 0; - - void - fatal(const char *fmt, ...) -@@ -45,6 +48,19 @@ warn(const char *fmt, ...) - va_end(arglist); - } - -+int -+is_vmlinux(const char *modname) -+{ -+ const char *myname; -+ -+ if ((myname = strrchr(modname, '/'))) -+ myname++; -+ else -+ myname = modname; -+ -+ return strcmp(myname, "vmlinux") == 0; -+} -+ - void *do_nofail(void *ptr, const char *file, int line, const char *expr) - { - if (!ptr) { -@@ -102,6 +118,10 @@ struct symbol { - struct module *module; - unsigned int crc; - int crc_valid; -+ unsigned int vmlinux:1; /* 1 if symbol is defined in vmlinux */ -+ unsigned int kernel:1; /* 1 if symbol is from kernel -+ * (only for external modules) **/ -+ unsigned int preloaded:1; /* 1 if symbol from Module.symvers */ - char name[0]; - }; - -@@ -136,8 +156,8 @@ alloc_symbol(const char *name, struct sy - - /* For the hash of exported symbols */ - --void --new_symbol(const char *name, struct module *module, unsigned int *crc) -+static struct symbol * -+new_symbol(const char *name, struct module *module) - { - unsigned int hash; - struct symbol *new; -@@ -145,10 +165,7 @@ new_symbol(const char *name, struct modu - hash = tdb_hash(name) % SYMBOL_HASH_SIZE; - new = symbolhash[hash] = alloc_symbol(name, symbolhash[hash]); - new->module = module; -- if (crc) { -- new->crc = *crc; -- new->crc_valid = 1; -- } -+ return new; - } - - struct symbol * -@@ -169,19 +186,29 @@ find_symbol(const char *name) - - /* Add an exported symbol - it may have already been added without a - * CRC, in this case just update the CRC */ --void --add_exported_symbol(const char *name, struct module *module, unsigned int *crc) -+static struct symbol * -+sym_add_exported(const char *name, struct module *mod) - { - struct symbol *s = find_symbol(name); - - if (!s) { -- new_symbol(name, module, crc); -- return; -- } -- if (crc) { -- s->crc = *crc; -- s->crc_valid = 1; -+ s = new_symbol(name, mod); - } -+ s->preloaded = 0; -+ s->vmlinux = is_vmlinux(mod->name); -+ s->kernel = 0; -+ return s; -+} -+ -+static void -+sym_update_crc(const char *name, struct module *mod, unsigned int crc) -+{ -+ struct symbol *s = find_symbol(name); -+ -+ if (!s) -+ s = new_symbol(name, mod); -+ s->crc = crc; -+ s->crc_valid = 1; - } - - void * -@@ -341,13 +368,13 @@ handle_modversions(struct module *mod, s - /* CRC'd symbol */ - if (memcmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { - crc = (unsigned int) sym->st_value; -- add_exported_symbol(symname + strlen(CRC_PFX), -- mod, &crc); -+ sym_update_crc(symname + strlen(CRC_PFX), mod, crc); - } - break; - case SHN_UNDEF: - /* undefined symbol */ -- if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL) -+ if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL && -+ ELF_ST_BIND(sym->st_info) != STB_WEAK) - break; - /* ignore global offset table */ - if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0) -@@ -373,8 +400,7 @@ handle_modversions(struct module *mod, s - default: - /* All exported symbols */ - if (memcmp(symname, KSYMTAB_PFX, strlen(KSYMTAB_PFX)) == 0) { -- add_exported_symbol(symname + strlen(KSYMTAB_PFX), -- mod, NULL); -+ sym_add_exported(symname + strlen(KSYMTAB_PFX), mod); - } - if (strcmp(symname, MODULE_SYMBOL_PREFIX "init_module") == 0) - mod->has_init = 1; -@@ -384,19 +410,6 @@ handle_modversions(struct module *mod, s - } - } - --int --is_vmlinux(const char *modname) --{ -- const char *myname; -- -- if ((myname = strrchr(modname, '/'))) -- myname++; -- else -- myname = modname; -- -- return strcmp(myname, "vmlinux") == 0; --} -- - void - read_symbols(char *modname) - { -@@ -412,9 +425,7 @@ read_symbols(char *modname) - /* When there's no vmlinux, don't print warnings about - * unresolved symbols (since there'll be too many ;) */ - if (is_vmlinux(modname)) { -- unsigned int fake_crc = 0; - have_vmlinux = 1; -- add_exported_symbol("struct_module", mod, &fake_crc); - mod->skip = 1; - } - -@@ -426,6 +437,7 @@ read_symbols(char *modname) - } - maybe_frob_version(modname, info.modinfo, info.modinfo_len, - (void *)info.modinfo - (void *)info.hdr); -+ - parse_elf_finish(&info); - - /* Our trick to get versioning for struct_module - it's -@@ -451,12 +463,7 @@ buf_printf(struct buffer *buf, const cha - - va_start(ap, fmt); - len = vsnprintf(tmp, SZ, fmt, ap); -- if (buf->size - buf->pos < len + 1) { -- buf->size += 128; -- buf->p = realloc(buf->p, buf->size); -- } -- strncpy(buf->p + buf->pos, tmp, len + 1); -- buf->pos += len; -+ buf_write(buf, tmp, len); - va_end(ap); - } - -@@ -464,7 +471,7 @@ void - buf_write(struct buffer *buf, const char *s, int len) - { - if (buf->size - buf->pos < len) { -- buf->size += len; -+ buf->size += len + SZ; - buf->p = realloc(buf->p, buf->size); - } - strncpy(buf->p + buf->pos, s, len); -@@ -506,8 +513,8 @@ add_versions(struct buffer *b, struct mo - exp = find_symbol(s->name); - if (!exp || exp->module == mod) { - if (have_vmlinux) -- fprintf(stderr, "*** Warning: \"%s\" [%s.ko] " -- "undefined!\n", s->name, mod->name); -+ warn("\"%s\" [%s.ko] undefined!\n", -+ s->name, mod->name); - continue; - } - s->module = exp->module; -@@ -615,8 +622,11 @@ write_if_changed(struct buffer *b, const - fclose(file); - } - -+/* parse Module.symvers file. line format: -+ * 0x12345678<tab>symbol<tab>module[[<tab>export]<tab>something] -+ **/ - void --read_dump(const char *fname) -+read_dump(const char *fname, unsigned int kernel) - { - unsigned long size, pos = 0; - void *file = grab_file(fname, &size); -@@ -630,6 +640,7 @@ read_dump(const char *fname) - char *symname, *modname, *d; - unsigned int crc; - struct module *mod; -+ struct symbol *s; - - if (!(symname = strchr(line, '\t'))) - goto fail; -@@ -650,13 +661,30 @@ read_dump(const char *fname) - mod = new_module(NOFAIL(strdup(modname))); - mod->skip = 1; - } -- add_exported_symbol(symname, mod, &crc); -+ s = sym_add_exported(symname, mod); -+ s->kernel = kernel; -+ s->preloaded = 1; -+ sym_update_crc(symname, mod, crc); - } - return; - fail: - fatal("parse error in symbol dump file\n"); - } - -+/* For normal builds always dump all symbols. -+ * For external modules only dump symbols -+ * that are not read from kernel Module.symvers. -+ **/ -+static int -+dump_sym(struct symbol *sym) -+{ -+ if (!external_module) -+ return 1; -+ if (sym->vmlinux || sym->kernel) -+ return 0; -+ return 1; -+} -+ - void - write_dump(const char *fname) - { -@@ -667,15 +695,10 @@ write_dump(const char *fname) - for (n = 0; n < SYMBOL_HASH_SIZE ; n++) { - symbol = symbolhash[n]; - while (symbol) { -- symbol = symbol->next; -- } -- } -- -- for (n = 0; n < SYMBOL_HASH_SIZE ; n++) { -- symbol = symbolhash[n]; -- while (symbol) { -- buf_printf(&buf, "0x%08x\t%s\t%s\n", symbol->crc, -- symbol->name, symbol->module->name); -+ if (dump_sym(symbol)) -+ buf_printf(&buf, "0x%08x\t%s\t%s\n", -+ symbol->crc, symbol->name, -+ symbol->module->name); - symbol = symbol->next; - } - } -@@ -688,13 +711,18 @@ main(int argc, char **argv) - struct module *mod; - struct buffer buf = { }; - char fname[SZ]; -- char *dump_read = NULL, *dump_write = NULL; -+ char *kernel_read = NULL, *module_read = NULL; -+ char *dump_write = NULL; - int opt; - -- while ((opt = getopt(argc, argv, "i:mo:")) != -1) { -+ while ((opt = getopt(argc, argv, "i:I:mo:")) != -1) { - switch(opt) { - case 'i': -- dump_read = optarg; -+ kernel_read = optarg; -+ break; -+ case 'I': -+ module_read = optarg; -+ external_module = 1; - break; - case 'm': - modversions = 1; -@@ -707,8 +735,10 @@ main(int argc, char **argv) - } - } - -- if (dump_read) -- read_dump(dump_read); -+ if (kernel_read) -+ read_dump(kernel_read, 1); -+ if (module_read) -+ read_dump(module_read, 0); - - while (optind < argc) { - read_symbols(argv[optind++]); diff --git a/lustre/kernel_patches/patches/modpost_external_module_updates_sles9.patch b/lustre/kernel_patches/patches/modpost_external_module_updates_sles9.patch deleted file mode 100644 index 39b85d47dd..0000000000 --- a/lustre/kernel_patches/patches/modpost_external_module_updates_sles9.patch +++ /dev/null @@ -1,342 +0,0 @@ -This patch updates the SLES 9 module build system to properly support -dependencies between external modules, similarly to the way they are -supported in newer kernels. - -Index: linux-2.6.5-7.286/scripts/Makefile.modpost -=================================================================== ---- linux-2.6.5-7.286.orig/scripts/Makefile.modpost -+++ linux-2.6.5-7.286/scripts/Makefile.modpost -@@ -38,7 +38,8 @@ _modpost: __modpost - include .config - include scripts/Makefile.lib - --symverfile := $(objtree)/Module.symvers -+kernelsymfile := $(objtree)/Module.symvers -+modulesymfile := $(KBUILD_EXTMOD)/Module.symvers - - # Step 1), find all modules listed in $(MODVERDIR)/ - __modules := $(shell head -q -n1 /dev/null $(wildcard $(MODVERDIR)/*.mod)) -@@ -51,7 +52,9 @@ _modpost: $(modules) - # Includes step 3,4 - quiet_cmd_modpost = MODPOST - cmd_modpost = scripts/modpost \ -- $(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \ -+ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ -+ $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ -+ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ - -s $(firstword $(wildcard $(dir $(MODVERDIR))/Module.supported \ - $(objtree)/Module.supported /dev/null)) \ - $(filter-out FORCE,$^) -Index: linux-2.6.5-7.286/scripts/modpost.c -=================================================================== ---- linux-2.6.5-7.286.orig/scripts/modpost.c -+++ linux-2.6.5-7.286/scripts/modpost.c -@@ -1,7 +1,8 @@ - /* Postprocess module symbol versions - * - * Copyright 2003 Kai Germaschewski -- * 2002-2003 Rusty Russell, IBM Corporation -+ * 2002-2004 Rusty Russell, IBM Corporation -+ * Copyright 2006 Sam Ravnborg - * - * Based in part on module-init-tools/depmod.c,file2alias - * -@@ -18,6 +19,8 @@ - int modversions = 0; - /* Warn about undefined symbols? (do so if we have vmlinux) */ - int have_vmlinux = 0; -+/* If we are modposting external module set to 1 */ -+static int external_module = 0; - - void - fatal(const char *fmt, ...) -@@ -45,6 +48,19 @@ warn(const char *fmt, ...) - va_end(arglist); - } - -+int -+is_vmlinux(const char *modname) -+{ -+ const char *myname; -+ -+ if ((myname = strrchr(modname, '/'))) -+ myname++; -+ else -+ myname = modname; -+ -+ return strcmp(myname, "vmlinux") == 0; -+} -+ - void *do_nofail(void *ptr, const char *expr) - { - if (!ptr) { -@@ -101,6 +117,9 @@ struct symbol { - struct module *module; - unsigned int crc; - int crc_valid; -+ unsigned int vmlinux:1; /* 1 if symbol is defined in vmlinux */ -+ unsigned int kernel:1; /* 1 if symbol is from kernel -+ * (only for external modules) **/ - char name[0]; - }; - -@@ -135,8 +154,8 @@ alloc_symbol(const char *name, struct sy - - /* For the hash of exported symbols */ - --void --new_symbol(const char *name, struct module *module, unsigned int *crc) -+static struct symbol * -+new_symbol(const char *name, struct module *module) - { - unsigned int hash; - struct symbol *new; -@@ -144,10 +163,7 @@ new_symbol(const char *name, struct modu - hash = tdb_hash(name) % SYMBOL_HASH_SIZE; - new = symbolhash[hash] = alloc_symbol(name, symbolhash[hash]); - new->module = module; -- if (crc) { -- new->crc = *crc; -- new->crc_valid = 1; -- } -+ return new; - } - - struct symbol * -@@ -168,19 +184,28 @@ find_symbol(const char *name) - - /* Add an exported symbol - it may have already been added without a - * CRC, in this case just update the CRC */ --void --add_exported_symbol(const char *name, struct module *module, unsigned int *crc) -+static struct symbol * -+sym_add_exported(const char *name, struct module *mod) - { - struct symbol *s = find_symbol(name); - - if (!s) { -- new_symbol(name, module, crc); -- return; -- } -- if (crc) { -- s->crc = *crc; -- s->crc_valid = 1; -+ s = new_symbol(name, mod); - } -+ s->vmlinux = is_vmlinux(mod->name); -+ s->kernel = 0; -+ return s; -+} -+ -+static void -+sym_update_crc(const char *name, struct module *mod, unsigned int crc) -+{ -+ struct symbol *s = find_symbol(name); -+ -+ if (!s) -+ s = new_symbol(name, mod); -+ s->crc = crc; -+ s->crc_valid = 1; - } - - void * -@@ -339,8 +364,7 @@ handle_modversions(struct module *mod, s - /* CRC'd symbol */ - if (memcmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { - crc = (unsigned int) sym->st_value; -- add_exported_symbol(symname + strlen(CRC_PFX), -- mod, &crc); -+ sym_update_crc(symname + strlen(CRC_PFX), mod, crc); - modversions = 1; - } - break; -@@ -372,26 +396,12 @@ handle_modversions(struct module *mod, s - default: - /* All exported symbols */ - if (memcmp(symname, KSYMTAB_PFX, strlen(KSYMTAB_PFX)) == 0) { -- add_exported_symbol(symname + strlen(KSYMTAB_PFX), -- mod, NULL); -+ sym_add_exported(symname + strlen(KSYMTAB_PFX), mod); - } - break; - } - } - --int --is_vmlinux(const char *modname) --{ -- const char *myname; -- -- if ((myname = strrchr(modname, '/'))) -- myname++; -- else -- myname = modname; -- -- return strcmp(myname, "vmlinux") == 0; --} -- - static struct { - void *file; - unsigned long size; -@@ -451,12 +461,7 @@ read_symbols(char *modname) - /* When there's no vmlinux, don't print warnings about - * unresolved symbols (since there'll be too many ;) */ - if (is_vmlinux(modname)) { -- unsigned int fake_crc = 0; - have_vmlinux = 1; -- /* May not have this if !CONFIG_MODULE_UNLOAD: fake it. -- If it appears, we'll get the real CRC. */ -- add_exported_symbol("cleanup_module", mod, &fake_crc); -- add_exported_symbol("struct_module", mod, &fake_crc); - mod->skip = 1; - } - -@@ -499,12 +504,7 @@ buf_printf(struct buffer *buf, const cha - - va_start(ap, fmt); - len = vsnprintf(tmp, SZ, fmt, ap); -- if (buf->size - buf->pos < len + 1) { -- buf->size += 128; -- buf->p = realloc(buf->p, buf->size); -- } -- strncpy(buf->p + buf->pos, tmp, len + 1); -- buf->pos += len; -+ buf_write(buf, tmp, len); - va_end(ap); - } - -@@ -512,7 +512,7 @@ void - buf_write(struct buffer *buf, const char *s, int len) - { - if (buf->size - buf->pos < len) { -- buf->size += len; -+ buf->size += len + SZ; - buf->p = realloc(buf->p, buf->size); - } - strncpy(buf->p + buf->pos, s, len); -@@ -522,7 +522,7 @@ buf_write(struct buffer *buf, const char - /* Header for the generated file */ - - void --add_header(struct buffer *b) -+add_header(struct buffer *b, struct module *mod) - { - buf_printf(b, "#include <linux/module.h>\n"); - buf_printf(b, "#include <linux/vermagic.h>\n"); -@@ -676,8 +676,11 @@ read_supported(const char *fname) - ; /* ignore error */ - } - -+/* parse Module.symvers file. line format: -+ * 0x12345678<tab>symbol<tab>module[<tab>something] -+ **/ - void --read_dump(const char *fname) -+read_dump(const char *fname, unsigned int kernel) - { - unsigned long size, pos = 0; - void *file = grab_file(fname, &size); -@@ -691,6 +694,7 @@ read_dump(const char *fname) - char *symname, *modname, *d; - unsigned int crc; - struct module *mod; -+ struct symbol *s; - - if (!(symname = strchr(line, '\t'))) - goto fail; -@@ -712,13 +716,29 @@ read_dump(const char *fname) - mod = new_module(NOFAIL(strdup(modname))); - mod->skip = 1; - } -- add_exported_symbol(symname, mod, &crc); -+ s = sym_add_exported(symname, mod); -+ s->kernel = kernel; -+ sym_update_crc(symname, mod, crc); - } - return; - fail: - fatal("parse error in symbol dump file\n"); - } - -+/* For normal builds always dump all symbols. -+ * For external modules only dump symbols -+ * that are not read from kernel Module.symvers. -+ **/ -+static int -+dump_sym(struct symbol *sym) -+{ -+ if (!external_module) -+ return 1; -+ if (sym->vmlinux || sym->kernel) -+ return 0; -+ return 1; -+} -+ - void - write_dump(const char *fname) - { -@@ -729,15 +749,10 @@ write_dump(const char *fname) - for (n = 0; n < SYMBOL_HASH_SIZE ; n++) { - symbol = symbolhash[n]; - while (symbol) { -- symbol = symbol->next; -- } -- } -- -- for (n = 0; n < SYMBOL_HASH_SIZE ; n++) { -- symbol = symbolhash[n]; -- while (symbol) { -- buf_printf(&buf, "0x%08x\t%s\t%s\n", symbol->crc, -- symbol->name, symbol->module->name); -+ if (dump_sym(symbol)) -+ buf_printf(&buf, "0x%08x\t%s\t%s\n", -+ symbol->crc, symbol->name, -+ symbol->module->name); - symbol = symbol->next; - } - } -@@ -750,14 +765,19 @@ main(int argc, char **argv) - struct module *mod; - struct buffer buf = { }; - char fname[SZ]; -- char *dump_read = NULL, *dump_write = NULL; -+ char *kernel_read = NULL, *module_read = NULL; -+ char *dump_write = NULL; - char *supp = NULL; - int opt; - -- while ((opt = getopt(argc, argv, "i:o:s:")) != -1) { -+ while ((opt = getopt(argc, argv, "i:I:o:s:")) != -1) { - switch(opt) { - case 'i': -- dump_read = optarg; -+ kernel_read = optarg; -+ break; -+ case 'I': -+ module_read = optarg; -+ external_module = 1; - break; - case 'o': - dump_write = optarg; -@@ -773,8 +793,10 @@ main(int argc, char **argv) - if (supp) - read_supported(supp); - -- if (dump_read) -- read_dump(dump_read); -+ if (kernel_read) -+ read_dump(kernel_read, 1); -+ if (module_read) -+ read_dump(module_read, 0); - - while (optind < argc) { - read_symbols(argv[optind++]); -@@ -786,7 +808,7 @@ main(int argc, char **argv) - - buf.pos = 0; - -- add_header(&buf); -+ add_header(&buf, mod); - add_supported_flag(&buf, mod); - add_versions(&buf, mod); - add_depends(&buf, mod, modules); diff --git a/lustre/kernel_patches/patches/mpt-fusion-downgrade-to-3_02_73-rhel4.patch b/lustre/kernel_patches/patches/mpt-fusion-downgrade-to-3_02_73-rhel4.patch deleted file mode 100644 index 7bb3440921..0000000000 --- a/lustre/kernel_patches/patches/mpt-fusion-downgrade-to-3_02_73-rhel4.patch +++ /dev/null @@ -1,27949 +0,0 @@ -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/csmi/csmisas.c linux-2.6.9-55.0.12/drivers/message/fusion/csmi/csmisas.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/csmi/csmisas.c 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/csmi/csmisas.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,5894 +0,0 @@ --#define MPT_CSMI_DESCRIPTION "LSI Logic Corporation: Fusion MPT Driver "MPT_LINUX_VERSION_COMMON --#define csmisas_is_this_sas_cntr(ioc) (ioc->bus_type == SAS) ? 1 : 0 -- --static int csmisas_do_raid(MPT_ADAPTER *ioc, u8 action, u8 PhysDiskNum, u8 VolumeBus, -- u8 VolumeId, pMpiRaidActionReply_t reply); --static u8 map_sas_status_to_csmi(u8 mpi_sas_status); -- --/** -- * reverse_byte_order64 -- * -- * @data64 -- * -- **/ --static u64 --reverse_byte_order64(u64 data64) --{ -- int i; -- u64 rc; -- u8 *inWord = (u8*)&data64, *outWord = (u8*)&rc; -- -- for (i = 0 ; i < 8 ; i++) -- outWord[i] = inWord[7-i]; -- -- return rc; --} -- --/** -- * csmisas_is_sata -- * -- * @phys_disk -- * -- **/ --static int --csmisas_is_sata(RaidPhysDiskPage0_t *phys_disk) --{ -- if ((phys_disk->ExtDiskIdentifier[0] == 'A') && -- (phys_disk->ExtDiskIdentifier[1] == 'T') && -- (phys_disk->ExtDiskIdentifier[2] == 'A')) -- return 1; -- else -- return 0; --} -- --/** -- * csmisas_is_end_device -- * -- * @attached -- * -- **/ --static inline int --csmisas_is_end_device(struct mptsas_devinfo * attached) --{ -- if ((attached->sas_address) && -- (attached->device_info & -- MPI_SAS_DEVICE_INFO_END_DEVICE) && -- ((attached->device_info & -- MPI_SAS_DEVICE_INFO_SSP_TARGET) | -- (attached->device_info & -- MPI_SAS_DEVICE_INFO_STP_TARGET) | -- (attached->device_info & -- MPI_SAS_DEVICE_INFO_SATA_DEVICE))) -- return 1; -- else -- return 0; --} -- --/** -- * csmisas_is_phys_disk -- * -- * returns (1) success (0) fail - not a phys disk -- **/ --int --csmisas_is_phys_disk(MPT_ADAPTER *ioc, int channel, int id) --{ -- struct inactive_raid_component_info *component_info; -- int i; -- int rc = 0; -- -- if (!ioc->raid_data.pIocPg3) -- goto out; -- for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { -- if ((id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) && -- (channel == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskBus)) { -- rc = 1; -- goto out; -- } -- } -- -- /* -- * Check inactive list for matching phys disks -- */ -- if (list_empty(&ioc->raid_data.inactive_list)) -- goto out; -- -- down(&ioc->raid_data.inactive_list_mutex); -- list_for_each_entry(component_info, &ioc->raid_data.inactive_list, -- list) { -- if ((component_info->d.PhysDiskID == id) && -- (component_info->d.PhysDiskBus == channel)) -- rc = 1; -- } -- up(&ioc->raid_data.inactive_list_mutex); -- -- out: -- return rc; --} -- --/** -- * csmisas_raid_id_to_num -- * -- * Obtains the phys disk num for given H:C:T nexus -- * -- * input (channel/id) -- * output (phys disk number - used by SCSI_IO_PASSTHRU to access hidden component) -- * -- * returns - signed return means failure -- **/ --s8 --csmisas_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- struct inactive_raid_component_info *component_info; -- int i; -- s8 rc = -ENXIO; -- -- if (!ioc->raid_data.pIocPg3) -- goto out; -- for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { -- if ((id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) && -- (channel == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskBus)) { -- rc = ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum; -- goto out; -- } -- } -- -- /* -- * Check inactive list for matching phys disks -- */ -- if (list_empty(&ioc->raid_data.inactive_list)) -- goto out; -- -- down(&ioc->raid_data.inactive_list_mutex); -- list_for_each_entry(component_info, &ioc->raid_data.inactive_list, -- list) { -- if ((component_info->d.PhysDiskID == id) && -- (component_info->d.PhysDiskBus == channel)) -- rc = component_info->d.PhysDiskNum; -- } -- up(&ioc->raid_data.inactive_list_mutex); -- -- out: -- return rc; --} -- --/** -- * csmisas_get_device_component_by_os -- * -- * Obtain device component object by operating system mapping -- * -- * @ioc -- * @channel -- * @id -- * -- **/ --static struct sas_device_info * --csmisas_get_device_component_by_os(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- struct sas_device_info *sas_info, *p; -- -- sas_info = NULL; -- -- down(&ioc->sas_device_info_mutex); -- list_for_each_entry(p, &ioc->sas_device_info_list, list) { -- if (p->os.channel == channel && p->os.id == id) { -- sas_info = p; -- goto out; -- } -- } -- -- out: -- up(&ioc->sas_device_info_mutex); -- return sas_info; --} -- --/** -- * csmisas_get_device_component -- * -- * Obtain device component object by firmware system mapping -- * -- * @ioc -- * @channel -- * @id -- * -- **/ --static struct sas_device_info * --csmisas_get_device_component_by_fw(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- struct sas_device_info *sas_info, *p; -- -- sas_info = NULL; -- -- down(&ioc->sas_device_info_mutex); -- list_for_each_entry(p, &ioc->sas_device_info_list, list) { -- if (p->fw.channel == channel && p->fw.id == id) { -- sas_info = p; -- goto out; -- } -- } -- -- out: -- up(&ioc->sas_device_info_mutex); -- return sas_info; --} -- -- --/** -- * csmisas_get_device_component_by_sas_addr -- * -- * Obtain device component object by sas address -- * -- * @ioc -- * @channel -- * @id -- * -- **/ --static struct sas_device_info * --csmisas_get_device_component_by_sas_addr(MPT_ADAPTER *ioc, u64 sas_address) --{ -- struct sas_device_info *sas_info, *p; -- -- sas_info = NULL; -- -- down(&ioc->sas_device_info_mutex); -- list_for_each_entry(p, &ioc->sas_device_info_list, list) { -- dcsmisasprintk((KERN_ERR -- ":%s()" -- " looking for SASAddress=%llX entry SASAddress=%llX\n", -- __FUNCTION__, sas_address, p->sas_address)); -- if (p->sas_address == sas_address) { -- sas_info = p; -- dcsmisasprintk((KERN_ERR -- ":%s()" -- " found SASAddress=%llX\n", -- __FUNCTION__, sas_address)); -- goto out; -- } -- } -- -- out: -- up(&ioc->sas_device_info_mutex); -- return sas_info; --} -- --/** -- * csmisas_send_command_wait -- * -- * Send mf to firmware -- * -- * @ioc -- * @mf -- * @timeout - timeout -- * -- * Return: 0 for success -- * non-zero, failure -- **/ --static int --csmisas_send_command_wait(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, int timeout) --{ -- int rc; -- int mf_timeout; -- -- mf_timeout = max_t(int, MPT_IOCTL_DEFAULT_TIMEOUT, timeout); -- INITIALIZE_IOCTL_STATUS(ioc->ioctl->status) -- ioc->ioctl->wait_done = 0; -- rc = 0; -- --#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) -- ioc->ioctl->timer.expires = jiffies + (MPT_JIFFY * mf_timeout); -- ioc->ioctl->status |= MPT_IOCTL_STATUS_TIMER_ACTIVE; -- ADD_TIMER(&ioc->ioctl->timer); --#endif -- -- mpt_put_msg_frame(mptctl_id, ioc, mf); -- --#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) -- WAIT_EVENT(mptctl_wait, ioc->ioctl->wait_done); --#else -- if ((wait_event_timeout(mptctl_wait, -- ioc->ioctl->wait_done == 1, HZ * mf_timeout) <=0) && -- ioc->ioctl->wait_done != 1 ) { -- mpt_free_msg_frame(ioc, mf); -- mptctl_timeout_expired(ioc->ioctl); -- rc = -1; -- } --#endif -- -- if (rc != 0) -- dfailprintk((KERN_ERR "%s@%d::%s() - " -- "%s IOCTL timeout (%d)\n", -- __FILE__, __LINE__, __FUNCTION__, -- ioc->name, mf_timeout)); -- -- return rc; --} -- --/** -- * csmisas_send_handshake_wait -- * -- * Handshake a mf to firmware -- * -- * @ioc -- * @mf -- * @mf_size -- * @timeout - timeout -- * -- * Return: 0 for success -- * non-zero, failure -- **/ --static int --csmisas_send_handshake_wait(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, int timeout) --{ -- int rc; -- int mf_timeout; -- -- mf_timeout = max_t(int, MPT_IOCTL_DEFAULT_TIMEOUT, timeout); -- INITIALIZE_IOCTL_STATUS(ioc->ioctl->status) -- ioc->ioctl->wait_done = 0; -- rc = 0; -- --#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) -- ioc->ioctl->timer.expires = jiffies + (MPT_JIFFY * mf_timeout); -- ioc->ioctl->status |= MPT_IOCTL_STATUS_TIMER_ACTIVE; -- ADD_TIMER(&ioc->ioctl->timer); --#endif -- -- rc = mpt_send_handshake_request(mptctl_id, ioc, -- sizeof(SCSITaskMgmt_t), (u32*)mf,timeout, CAN_SLEEP); -- if (rc != 0) -- return rc; -- --#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) -- WAIT_EVENT(mptctl_wait, ioc->ioctl->wait_done); --#else -- if ((wait_event_timeout(mptctl_wait, -- ioc->ioctl->wait_done == 1, HZ * mf_timeout) <=0) && -- ioc->ioctl->wait_done != 1 ) { -- mpt_free_msg_frame(ioc, mf); -- mptctl_timeout_expired(ioc->ioctl); -- rc = -1; -- } --#endif -- -- if (rc != 0) -- dfailprintk((KERN_ERR "%s@%d::%s() - " -- "%s IOCTL timeout (%d)\n", __FILE__, __LINE__, -- __FUNCTION__, ioc->name, mf_timeout)); -- -- return rc; --} -- --/** -- * csmisas_get_manufacture_pg0 - Manufacturing Page 0. -- * @ioc: Pointer to MPT_ADAPTER structure -- * @mfgPage0: read only info set at manufacturing time -- * -- * Return: 0 for success -- * -ENOMEM if no memory available -- * -EPERM if not allowed due to ISR context -- * -EAGAIN if no msg frames currently available -- * -EFAULT for non-successful reply or no reply (timeout) -- **/ --static int --csmisas_get_manufacture_pg0(MPT_ADAPTER *ioc, ManufacturingPage0_t *mfgPage0) --{ -- -- ConfigPageHeader_t hdr; -- CONFIGPARMS cfg; -- ManufacturingPage0_t *buffer = NULL; -- dma_addr_t dma_handle; -- int data_sz; -- int rc; -- -- /* -- * Get Manufacturing Page 0 header -- */ -- data_sz = 0; -- hdr.PageVersion = MPI_MANUFACTURING0_PAGEVERSION; -- hdr.PageLength = 0; -- hdr.PageNumber = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_MANUFACTURING; -- cfg.cfghdr.hdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; -- cfg.pageAddr = 0; -- cfg.timeout = 0; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto get_manufacture_pg0_out; -- -- if (hdr.PageLength == 0) { -- rc = -EFAULT; -- goto get_manufacture_pg0_out; -- } -- -- data_sz = hdr.PageLength * 4; -- buffer = (ManufacturingPage0_t *) pci_alloc_consistent(ioc->pcidev, -- data_sz, &dma_handle); -- if (!buffer) { -- rc = -ENOMEM; -- goto get_manufacture_pg0_out; -- } -- -- memset((u8 *)buffer, 0, data_sz); -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto get_manufacture_pg0_out; -- -- strncpy(mfgPage0->ChipName, buffer->ChipName, 16); -- strncpy(mfgPage0->ChipRevision, buffer->ChipRevision, 8); -- strncpy(mfgPage0->BoardName, buffer->BoardName, 16); -- strncpy(mfgPage0->BoardAssembly, buffer->BoardAssembly, 16); -- strncpy(mfgPage0->BoardTracerNumber, buffer->BoardTracerNumber, 16); -- -- dcsmisasprintk(("ChipName=%s\n",buffer->ChipName)); -- dcsmisasprintk(("ChipRevision=%s\n",buffer->ChipRevision)); -- dcsmisasprintk(("BoardName=%s\n",buffer->BoardName)); -- dcsmisasprintk(("BoardAssembly=%s\n",buffer->BoardAssembly)); -- dcsmisasprintk(("BoardTracerNumber=%s\n",buffer->BoardTracerNumber)); -- -- get_manufacture_pg0_out: -- -- if (buffer) -- pci_free_consistent(ioc->pcidev, data_sz, -- (u8 *) buffer, dma_handle); -- -- -- return rc; --} -- --/** -- * csmisas_get_number_hotspares - returns num hot spares in this ioc -- * @ioc: Pointer to MPT_ADAPTER structure -- * -- * Return: number of hotspares -- * -- **/ --static int --csmisas_get_number_hotspares(MPT_ADAPTER *ioc) --{ -- ConfigPageHeader_t hdr; -- CONFIGPARMS cfg; -- IOCPage5_t *buffer = NULL; -- dma_addr_t dma_handle; -- int data_sz; -- int rc; -- -- memset(&hdr, 0, sizeof(ConfigPageHeader_t)); -- memset(&cfg, 0, sizeof(CONFIGPARMS)); -- -- rc = 0; -- data_sz = 0; -- hdr.PageNumber = 5; -- hdr.PageType = MPI_CONFIG_PAGETYPE_IOC; -- cfg.cfghdr.hdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if (mpt_config(ioc, &cfg) != 0) -- goto get_ioc_pg5; -- -- if (hdr.PageLength == 0) -- goto get_ioc_pg5; -- -- data_sz = hdr.PageLength * 4; -- buffer = (IOCPage5_t *) pci_alloc_consistent(ioc->pcidev, -- data_sz, &dma_handle); -- if (!buffer) -- goto get_ioc_pg5; -- -- memset((u8 *)buffer, 0, data_sz); -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if (mpt_config(ioc, &cfg) != 0) -- goto get_ioc_pg5; -- -- rc = buffer->NumHotSpares; -- -- get_ioc_pg5: -- -- if (buffer) -- pci_free_consistent(ioc->pcidev, data_sz, -- (u8 *) buffer, dma_handle); -- -- return rc; --} -- -- --/** -- * csmisas_get_ioc_pg5 - ioc Page 5 hot spares -- * @ioc: Pointer to MPT_ADAPTER structure -- * @pIocPage5: ioc page 5 -- * @data_size: expected data size(units=bytes) -- * -- * Return: 0 for success -- * -ENOMEM if no memory available -- * -EPERM if not allowed due to ISR context -- * -EAGAIN if no msg frames currently available -- * -EFAULT for non-successful reply or no reply (timeout) -- **/ --static int --csmisas_get_ioc_pg5(MPT_ADAPTER *ioc, IOCPage5_t *iocPage5, int data_size) --{ -- ConfigPageHeader_t hdr; -- CONFIGPARMS cfg; -- IOCPage5_t *buffer = NULL; -- dma_addr_t dma_handle; -- int data_sz; -- int rc; -- -- memset(&hdr, 0, sizeof(ConfigPageHeader_t)); -- memset(&cfg, 0, sizeof(CONFIGPARMS)); -- -- rc = 0; -- data_sz = 0; -- hdr.PageNumber = 5; -- hdr.PageType = MPI_CONFIG_PAGETYPE_IOC; -- cfg.cfghdr.hdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto get_ioc_pg5; -- -- if (hdr.PageLength == 0) { -- rc = -EFAULT; -- goto get_ioc_pg5; -- } -- -- data_sz = hdr.PageLength * 4; -- buffer = (IOCPage5_t *) pci_alloc_consistent(ioc->pcidev, -- data_sz, &dma_handle); -- if (!buffer) { -- rc = -ENOMEM; -- goto get_ioc_pg5; -- } -- -- memset((u8 *)buffer, 0, data_sz); -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto get_ioc_pg5; -- -- memcpy(iocPage5, buffer, data_size); -- -- get_ioc_pg5: -- -- if (buffer) -- pci_free_consistent(ioc->pcidev, data_sz, -- (u8 *) buffer, dma_handle); -- -- return rc; --} -- --/** -- * csmisas_sas_device_pg0 - sas device page 0 -- * @ioc: Pointer to MPT_ADAPTER structure -- * @mptsas_devinfo: structure found in mptsas.h -- * @form, @form_specific - defines the Page Address field in the config page -- * (pls refer to chapter 5.1 in the mpi spec) -- * -- * Return: 0 for success -- * -ENOMEM if no memory available -- * -EPERM if not allowed due to ISR context -- * -EAGAIN if no msg frames currently available -- * -EFAULT for non-successful reply or no reply (timeout) -- **/ --static int --csmisas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info, -- u32 form, u32 form_specific) --{ -- ConfigExtendedPageHeader_t hdr; -- CONFIGPARMS cfg; -- SasDevicePage0_t *buffer; -- dma_addr_t dma_handle; -- u64 sas_address; -- int rc; -- -- rc = 0; -- hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.pageAddr = form + form_specific; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = 10; -- -- memset(device_info, 0, sizeof(struct mptsas_devinfo)); -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto out; -- -- if (!hdr.ExtPageLength) { -- rc = -ENXIO; -- goto out; -- } -- -- buffer = pci_alloc_consistent(ioc->pcidev, -- hdr.ExtPageLength * 4, &dma_handle); -- if (!buffer) { -- rc = -ENOMEM; -- goto out; -- } -- -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto out_free_consistent; -- -- device_info->handle = le16_to_cpu(buffer->DevHandle); -- device_info->handle_parent = le16_to_cpu(buffer->ParentDevHandle); -- device_info->handle_enclosure = -- le16_to_cpu(buffer->EnclosureHandle); -- device_info->slot = le16_to_cpu(buffer->Slot); -- device_info->phy_id = buffer->PhyNum; -- device_info->port_id = buffer->PhysicalPort; -- device_info->id = buffer->TargetID; -- device_info->channel = buffer->Bus; -- memcpy(&sas_address, &buffer->SASAddress, sizeof(u64)); -- device_info->sas_address = le64_to_cpu(sas_address); -- device_info->device_info = -- le32_to_cpu(buffer->DeviceInfo); -- -- out_free_consistent: -- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, -- buffer, dma_handle); -- out: -- return rc; --} -- --/** -- * Routine for the CSMI Sas Get Driver Info command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_driver_info(unsigned long arg) --{ -- -- CSMI_SAS_DRIVER_INFO_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_DRIVER_INFO_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to read in csmi_sas_get_driver_info_buffer struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- /* Fill in the data and return the structure to the calling -- * program -- */ -- memcpy( karg.Information.szName, MPT_MISCDEV_BASENAME, -- sizeof(MPT_MISCDEV_BASENAME)); -- memcpy( karg.Information.szDescription, MPT_CSMI_DESCRIPTION, -- sizeof(MPT_CSMI_DESCRIPTION)); -- -- karg.Information.usMajorRevision = MPT_LINUX_MAJOR_VERSION; -- karg.Information.usMinorRevision = MPT_LINUX_MINOR_VERSION; -- karg.Information.usBuildRevision = MPT_LINUX_BUILD_VERSION; -- karg.Information.usReleaseRevision = MPT_LINUX_RELEASE_VERSION; -- -- karg.Information.usCSMIMajorRevision = CSMI_MAJOR_REVISION; -- karg.Information.usCSMIMinorRevision = CSMI_MINOR_REVISION; -- -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to write out csmi_sas_get_driver_info_buffer @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI_SAS_GET_CNTLR_CONFIG command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_cntlr_config(unsigned long arg) --{ -- -- CSMI_SAS_CNTLR_CONFIG_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_CNTLR_CONFIG_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- int ii,msize,psize; -- unsigned int reg; -- u32 l; -- ManufacturingPage0_t mfgPage0; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CNTLR_CONFIG_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to read in csmi_sas_get_cntlr_config_buffer struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- /* Clear the struct before filling in data. */ -- memset( &karg.Configuration, 0, sizeof(CSMI_SAS_CNTLR_CONFIG)); -- -- /* Fill in the data and return the structure to the calling -- * program -- */ -- -- /* Get Base IO and Mem Mapped Addresses. */ --msize = psize = 0; --for(ii=0; ii < DEVICE_COUNT_RESOURCE; ii++) { -- reg = PCI_BASE_ADDRESS_0 + (ii << 2); -- pci_read_config_dword(ioc->pcidev, reg, &l); -- -- if ((l & PCI_BASE_ADDRESS_SPACE) == -- PCI_BASE_ADDRESS_SPACE_MEMORY) { -- if(msize) -- continue; -- msize=1; -- karg.Configuration.BaseMemoryAddress.uLowPart = -- l & PCI_BASE_ADDRESS_MEM_MASK; -- -- if ((l & (PCI_BASE_ADDRESS_SPACE | -- PCI_BASE_ADDRESS_MEM_TYPE_MASK)) -- == (PCI_BASE_ADDRESS_SPACE_MEMORY | -- PCI_BASE_ADDRESS_MEM_TYPE_64)) { -- pci_read_config_dword(ioc->pcidev, reg+4, &l); -- karg.Configuration.BaseMemoryAddress.uHighPart = l; -- } -- } -- -- -- else { -- if(psize) -- continue; -- psize=1; -- karg.Configuration.uBaseIoAddress = -- l & PCI_BASE_ADDRESS_IO_MASK; -- } -- -- } -- -- karg.Configuration.uBoardID = (ioc->pcidev->subsystem_device << 16) | -- (ioc->pcidev->subsystem_vendor); -- -- karg.Configuration.usSlotNumber = -- (ioc->pci_slot_number = 0xff) ? -- SLOT_NUMBER_UNKNOWN : ioc->pci_slot_number; -- karg.Configuration.bControllerClass = CSMI_SAS_CNTLR_CLASS_HBA; -- karg.Configuration.bIoBusType = CSMI_SAS_BUS_TYPE_PCI; -- karg.Configuration.BusAddress.PciAddress.bBusNumber = -- ioc->pcidev->bus->number; -- karg.Configuration.BusAddress.PciAddress.bDeviceNumber = -- PCI_SLOT(ioc->pcidev->devfn); -- karg.Configuration.BusAddress.PciAddress.bFunctionNumber = -- PCI_FUNC(ioc->pcidev->devfn); -- karg.Configuration.BusAddress.PciAddress.bReserved = 0; -- if (!csmisas_get_manufacture_pg0(ioc, &mfgPage0)) -- memcpy( &karg.Configuration.szSerialNumber, -- mfgPage0.BoardTracerNumber, 16 ); -- karg.Configuration.usMajorRevision = ioc->facts.FWVersion.Struct.Major; -- karg.Configuration.usMinorRevision = ioc->facts.FWVersion.Struct.Minor; -- karg.Configuration.usBuildRevision = ioc->facts.FWVersion.Struct.Unit; -- karg.Configuration.usReleaseRevision = ioc->facts.FWVersion.Struct.Dev; -- karg.Configuration.usBIOSMajorRevision = -- (ioc->biosVersion & 0xFF000000) >> 24; -- karg.Configuration.usBIOSMinorRevision = -- (ioc->biosVersion & 0x00FF0000) >> 16; -- karg.Configuration.usBIOSBuildRevision = -- (ioc->biosVersion & 0x0000FF00) >> 8; -- karg.Configuration.usBIOSReleaseRevision = -- (ioc->biosVersion & 0x000000FF); -- karg.Configuration.uControllerFlags = CSMI_SAS_CNTLR_SAS_HBA | -- CSMI_SAS_CNTLR_FWD_SUPPORT | CSMI_SAS_CNTLR_FWD_ONLINE | -- CSMI_SAS_CNTLR_FWD_SRESET ; -- -- /* -- * Enabling CSMI_SAS_CNTLR_SAS_RAID bit when IR fw detected -- */ -- if (ioc->ir_firmware) -- karg.Configuration.uControllerFlags |= CSMI_SAS_CNTLR_SAS_RAID; -- -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* All Rrom entries will be zero. Skip them. */ -- /* bReserved will also be zeros. */ -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to write out csmi_sas_get_driver_info_buffer @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI Sas Get Controller Status command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_cntlr_status(unsigned long arg) --{ -- -- CSMI_SAS_CNTLR_STATUS_BUFFER __user *uarg = (void __user *) arg; -- MPT_ADAPTER *ioc = NULL; -- CSMI_SAS_CNTLR_STATUS_BUFFER karg; -- int iocnum; -- int rc; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CNTLR_STATUS_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to read in csmi_sas_get_cntlr_status_buffer struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- /* Fill in the data and return the structure to the calling -- * program -- */ -- -- rc = mpt_GetIocState(ioc, 1); -- switch (rc) { -- case MPI_IOC_STATE_OPERATIONAL: -- karg.Status.uStatus = CSMI_SAS_CNTLR_STATUS_GOOD; -- karg.Status.uOfflineReason = 0; -- break; -- -- case MPI_IOC_STATE_FAULT: -- karg.Status.uStatus = CSMI_SAS_CNTLR_STATUS_FAILED; -- karg.Status.uOfflineReason = 0; -- break; -- -- case MPI_IOC_STATE_RESET: -- case MPI_IOC_STATE_READY: -- default: -- karg.Status.uStatus = CSMI_SAS_CNTLR_STATUS_OFFLINE; -- karg.Status.uOfflineReason = -- CSMI_SAS_OFFLINE_REASON_INITIALIZING; -- break; -- } -- -- memset(&karg.Status.bReserved, 0, 28); -- -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_CNTLR_STATUS_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to write out csmi_sas_get_cntlr_status @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI Sas Get Phy Info command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_phy_info(unsigned long arg) --{ -- CSMI_SAS_PHY_INFO_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_PHY_INFO_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- ConfigExtendedPageHeader_t hdr; -- CONFIGPARMS cfg; -- SasIOUnitPage0_t *sasIoUnitPg0; -- dma_addr_t sasIoUnitPg0_dma; -- int sasIoUnitPg0_data_sz; -- SasPhyPage0_t *sasPhyPg0; -- dma_addr_t sasPhyPg0_dma; -- int sasPhyPg0_data_sz; -- u16 protocol; -- int iocnum; -- int rc; -- int ii; -- u64 sas_address; -- struct mptsas_devinfo device_info; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- sasIoUnitPg0=NULL; -- sasPhyPg0=NULL; -- sasIoUnitPg0_data_sz=0; -- sasPhyPg0_data_sz=0; -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_PHY_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to read in csmisas_get_phy_info_buffer struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- /* Fill in the data and return the structure to the calling -- * program -- */ -- memset(&karg.Information, 0, sizeof(CSMI_SAS_PHY_INFO)); -- -- /* Issue a config request to get the number of phys -- */ -- hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.pageAddr = 0; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk(( -- ": FAILED: MPI_SASIOUNITPAGE0_PAGEVERSION: HEADER\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto sas_get_phy_info_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk((": hdr.ExtPageLength == 0\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto sas_get_phy_info_exit; -- } -- -- sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4; -- rc = -ENOMEM; -- -- sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev, -- sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma); -- -- if (!sasIoUnitPg0) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto sas_get_phy_info_exit; -- } -- -- memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz); -- cfg.physAddr = sasIoUnitPg0_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk(( -- ": FAILED: MPI_SASIOUNITPAGE0_PAGEVERSION: PAGE\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto sas_get_phy_info_exit; -- } -- -- /* Number of Phys. */ -- karg.Information.bNumberOfPhys = sasIoUnitPg0->NumPhys; -- -- /* Fill in information for each phy. */ -- for (ii = 0; ii < karg.Information.bNumberOfPhys; ii++) { -- --/* EDM : dump IO Unit Page 0 data*/ -- dcsmisasprintk(("---- IO UNIT PAGE 0 ------------\n")); -- dcsmisasprintk(("Handle=0x%X\n", -- le16_to_cpu(sasIoUnitPg0->PhyData[ii].AttachedDeviceHandle))); -- dcsmisasprintk(("Controller Handle=0x%X\n", -- le16_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerDevHandle))); -- dcsmisasprintk(("Port=0x%X\n", -- sasIoUnitPg0->PhyData[ii].Port)); -- dcsmisasprintk(("Port Flags=0x%X\n", -- sasIoUnitPg0->PhyData[ii].PortFlags)); -- dcsmisasprintk(("PHY Flags=0x%X\n", -- sasIoUnitPg0->PhyData[ii].PhyFlags)); -- dcsmisasprintk(("Negotiated Link Rate=0x%X\n", -- sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate)); -- dcsmisasprintk(("Controller PHY Device Info=0x%X\n", -- le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo))); -- dcsmisasprintk(("DiscoveryStatus=0x%X\n", -- le32_to_cpu(sasIoUnitPg0->PhyData[ii].DiscoveryStatus))); -- dcsmisasprintk(("\n")); --/* EDM : debug data */ -- -- /* PHY stuff. */ -- karg.Information.Phy[ii].bPortIdentifier = -- sasIoUnitPg0->PhyData[ii].Port; -- -- /* Get the negotiated link rate for the phy. */ -- switch (sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate) { -- -- case MPI_SAS_IOUNIT0_RATE_PHY_DISABLED: -- karg.Information.Phy[ii].bNegotiatedLinkRate = -- CSMI_SAS_PHY_DISABLED; -- break; -- -- case MPI_SAS_IOUNIT0_RATE_FAILED_SPEED_NEGOTIATION: -- karg.Information.Phy[ii].bNegotiatedLinkRate = -- CSMI_SAS_LINK_RATE_FAILED; -- break; -- -- case MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE: -- break; -- -- case MPI_SAS_IOUNIT0_RATE_1_5: -- karg.Information.Phy[ii].bNegotiatedLinkRate = -- CSMI_SAS_LINK_RATE_1_5_GBPS; -- break; -- -- case MPI_SAS_IOUNIT0_RATE_3_0: -- karg.Information.Phy[ii].bNegotiatedLinkRate = -- CSMI_SAS_LINK_RATE_3_0_GBPS; -- break; -- -- case MPI_SAS_IOUNIT0_RATE_UNKNOWN: -- default: -- karg.Information.Phy[ii].bNegotiatedLinkRate = -- CSMI_SAS_LINK_RATE_UNKNOWN; -- break; -- } -- -- if (sasIoUnitPg0->PhyData[ii].PortFlags & -- MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS) { -- karg.Information.Phy[ii].bAutoDiscover = -- CSMI_SAS_DISCOVER_IN_PROGRESS; -- } else { -- karg.Information.Phy[ii].bAutoDiscover = -- CSMI_SAS_DISCOVER_COMPLETE; -- } -- -- /* Issue a config request to get -- * phy information. -- */ -- hdr.PageVersion = MPI_SASPHY0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.pageAddr = ii; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- dcsmisasprintk(( -- ": FAILED: MPI_SASPHY0_PAGEVERSION: HEADER\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto sas_get_phy_info_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto sas_get_phy_info_exit; -- } -- -- sasPhyPg0_data_sz = hdr.ExtPageLength * 4; -- rc = -ENOMEM; -- -- sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent( -- ioc->pcidev, sasPhyPg0_data_sz, &sasPhyPg0_dma); -- -- if (! sasPhyPg0) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto sas_get_phy_info_exit; -- } -- -- memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz); -- cfg.physAddr = sasPhyPg0_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- dcsmisasprintk(( -- ": FAILED: MPI_SASPHY0_PAGEVERSION: PAGE\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz, -- (u8 *) sasPhyPg0, sasPhyPg0_dma); -- goto sas_get_phy_info_exit; -- } -- --/* EDM : dump PHY Page 0 data*/ -- memcpy(&sas_address, &sasPhyPg0->SASAddress, sizeof(u64)); -- dcsmisasprintk(("---- SAS PHY PAGE 0 ------------\n")); -- dcsmisasprintk(("Handle=0x%X\n", -- le16_to_cpu(sasPhyPg0->AttachedDevHandle))); -- dcsmisasprintk(("SAS Address=0x%llX\n", -- (unsigned long long)sas_address)); -- dcsmisasprintk(("Attached PHY Identifier=0x%X\n", -- sasPhyPg0->AttachedPhyIdentifier)); -- dcsmisasprintk(("Attached Device Info=0x%X\n", -- le32_to_cpu(sasPhyPg0->AttachedDeviceInfo))); -- dcsmisasprintk(("Programmed Link Rate=0x%X\n", -- sasPhyPg0->ProgrammedLinkRate)); -- dcsmisasprintk(("Hardware Link Rate=0x%X\n", -- sasPhyPg0->HwLinkRate)); -- dcsmisasprintk(("Change Count=0x%X\n", -- sasPhyPg0->ChangeCount)); -- dcsmisasprintk(("PHY Info=0x%X\n", -- le32_to_cpu(sasPhyPg0->PhyInfo))); -- dcsmisasprintk(("\n")); --/* EDM : debug data */ -- -- /* save the data */ -- -- /* Set Max hardware link rate. -- * This value is hard coded -- * because the HW link rate -- * is currently being -- * overwritten in FW. -- */ -- -- /* Set Max hardware link rate. */ -- switch (sasPhyPg0->HwLinkRate & -- MPI_SAS_PHY0_PRATE_MAX_RATE_MASK) { -- -- case MPI_SAS_PHY0_HWRATE_MAX_RATE_1_5: -- karg.Information.Phy[ii].bMaximumLinkRate = -- CSMI_SAS_LINK_RATE_1_5_GBPS; -- break; -- -- case MPI_SAS_PHY0_PRATE_MAX_RATE_3_0: -- karg.Information.Phy[ii].bMaximumLinkRate = -- CSMI_SAS_LINK_RATE_3_0_GBPS; -- break; -- default: -- break; -- } -- -- /* Set Max programmed link rate. */ -- switch (sasPhyPg0->ProgrammedLinkRate & -- MPI_SAS_PHY0_PRATE_MAX_RATE_MASK) { -- -- case MPI_SAS_PHY0_PRATE_MAX_RATE_1_5: -- karg.Information.Phy[ii].bMaximumLinkRate |= -- (CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS << 4); -- break; -- -- case MPI_SAS_PHY0_PRATE_MAX_RATE_3_0: -- karg.Information.Phy[ii].bMaximumLinkRate |= -- (CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS << 4); -- break; -- default: -- break; -- } -- -- /* Set Min hardware link rate. */ -- switch (sasPhyPg0->HwLinkRate & -- MPI_SAS_PHY0_HWRATE_MIN_RATE_MASK) { -- -- case MPI_SAS_PHY0_HWRATE_MIN_RATE_1_5: -- karg.Information.Phy[ii].bMinimumLinkRate = -- CSMI_SAS_LINK_RATE_1_5_GBPS; -- break; -- -- case MPI_SAS_PHY0_PRATE_MIN_RATE_3_0: -- karg.Information.Phy[ii].bMinimumLinkRate = -- CSMI_SAS_LINK_RATE_3_0_GBPS; -- break; -- default: -- break; -- } -- -- /* Set Min programmed link rate. */ -- switch (sasPhyPg0->ProgrammedLinkRate & -- MPI_SAS_PHY0_PRATE_MIN_RATE_MASK) { -- -- case MPI_SAS_PHY0_PRATE_MIN_RATE_1_5: -- karg.Information.Phy[ii].bMinimumLinkRate |= -- (CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS << 4); -- break; -- -- case MPI_SAS_PHY0_PRATE_MIN_RATE_3_0: -- karg.Information.Phy[ii].bMinimumLinkRate |= -- (CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS << 4); -- break; -- default: -- break; -- } -- -- karg.Information.Phy[ii].bPhyChangeCount = sasPhyPg0->ChangeCount; -- if( sasPhyPg0->PhyInfo & MPI_SAS_PHY0_PHYINFO_VIRTUAL_PHY ) -- karg.Information.Phy[ii].bPhyFeatures = CSMI_SAS_PHY_VIRTUAL_SMP; -- -- /* Fill in Attached Device -- * Initiator Port Protocol. -- * Bits 6:3 -- * More than one bit can be set. -- */ -- protocol = le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & 0x78; -- karg.Information.Phy[ii].Attached.bInitiatorPortProtocol = 0; -- if (protocol & MPI_SAS_DEVICE_INFO_SSP_INITIATOR) -- karg.Information.Phy[ii].Attached.bInitiatorPortProtocol = -- CSMI_SAS_PROTOCOL_SSP; -- if (protocol & MPI_SAS_DEVICE_INFO_STP_INITIATOR) -- karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |= -- CSMI_SAS_PROTOCOL_STP; -- if (protocol & MPI_SAS_DEVICE_INFO_SMP_INITIATOR) -- karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |= -- CSMI_SAS_PROTOCOL_SMP; -- if (protocol & MPI_SAS_DEVICE_INFO_SATA_HOST) -- karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |= -- CSMI_SAS_PROTOCOL_SATA; -- -- /* Fill in Phy Target Port -- * Protocol. Bits 10:7 -- * More than one bit can be set. -- */ -- protocol = le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & 0x780; -- karg.Information.Phy[ii].Attached.bTargetPortProtocol = 0; -- if (protocol & MPI_SAS_DEVICE_INFO_SSP_TARGET) -- karg.Information.Phy[ii].Attached.bTargetPortProtocol |= -- CSMI_SAS_PROTOCOL_SSP; -- if (protocol & MPI_SAS_DEVICE_INFO_STP_TARGET) -- karg.Information.Phy[ii].Attached.bTargetPortProtocol |= -- CSMI_SAS_PROTOCOL_STP; -- if (protocol & MPI_SAS_DEVICE_INFO_SMP_TARGET) -- karg.Information.Phy[ii].Attached.bTargetPortProtocol |= -- CSMI_SAS_PROTOCOL_SMP; -- if (protocol & MPI_SAS_DEVICE_INFO_SATA_DEVICE) -- karg.Information.Phy[ii].Attached.bTargetPortProtocol |= -- CSMI_SAS_PROTOCOL_SATA; -- -- -- /* Fill in Attached device type */ -- switch (le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & -- MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) { -- -- case MPI_SAS_DEVICE_INFO_NO_DEVICE: -- karg.Information.Phy[ii].Attached.bDeviceType = -- CSMI_SAS_NO_DEVICE_ATTACHED; -- break; -- -- case MPI_SAS_DEVICE_INFO_END_DEVICE: -- karg.Information.Phy[ii].Attached.bDeviceType = -- CSMI_SAS_END_DEVICE; -- break; -- -- case MPI_SAS_DEVICE_INFO_EDGE_EXPANDER: -- karg.Information.Phy[ii].Attached.bDeviceType = -- CSMI_SAS_EDGE_EXPANDER_DEVICE; -- break; -- -- case MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER: -- karg.Information.Phy[ii].Attached.bDeviceType = -- CSMI_SAS_FANOUT_EXPANDER_DEVICE; -- break; -- } -- -- /* Identify Info. */ -- switch (le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) & -- MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) { -- -- case MPI_SAS_DEVICE_INFO_NO_DEVICE: -- karg.Information.Phy[ii].Identify.bDeviceType = -- CSMI_SAS_NO_DEVICE_ATTACHED; -- break; -- -- case MPI_SAS_DEVICE_INFO_END_DEVICE: -- karg.Information.Phy[ii].Identify.bDeviceType = -- CSMI_SAS_END_DEVICE; -- break; -- -- case MPI_SAS_DEVICE_INFO_EDGE_EXPANDER: -- karg.Information.Phy[ii].Identify.bDeviceType = -- CSMI_SAS_EDGE_EXPANDER_DEVICE; -- break; -- -- case MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER: -- karg.Information.Phy[ii].Identify.bDeviceType = -- CSMI_SAS_FANOUT_EXPANDER_DEVICE; -- break; -- } -- -- /* Fill in Phy Initiator Port Protocol. Bits 6:3 -- * More than one bit can be set, fall through cases. -- */ -- protocol = le32_to_cpu( -- sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) & 0x78; -- karg.Information.Phy[ii].Identify.bInitiatorPortProtocol = 0; -- if( protocol & MPI_SAS_DEVICE_INFO_SSP_INITIATOR ) -- karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |= -- CSMI_SAS_PROTOCOL_SSP; -- if( protocol & MPI_SAS_DEVICE_INFO_STP_INITIATOR ) -- karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |= -- CSMI_SAS_PROTOCOL_STP; -- if( protocol & MPI_SAS_DEVICE_INFO_SMP_INITIATOR ) -- karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |= -- CSMI_SAS_PROTOCOL_SMP; -- if( protocol & MPI_SAS_DEVICE_INFO_SATA_HOST ) -- karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |= -- CSMI_SAS_PROTOCOL_SATA; -- -- /* Fill in Phy Target Port Protocol. Bits 10:7 -- * More than one bit can be set, fall through cases. -- */ -- protocol = le32_to_cpu( -- sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) & 0x780; -- karg.Information.Phy[ii].Identify.bTargetPortProtocol = 0; -- if( protocol & MPI_SAS_DEVICE_INFO_SSP_TARGET ) -- karg.Information.Phy[ii].Identify.bTargetPortProtocol |= -- CSMI_SAS_PROTOCOL_SSP; -- if( protocol & MPI_SAS_DEVICE_INFO_STP_TARGET ) -- karg.Information.Phy[ii].Identify.bTargetPortProtocol |= -- CSMI_SAS_PROTOCOL_STP; -- if( protocol & MPI_SAS_DEVICE_INFO_SMP_TARGET ) -- karg.Information.Phy[ii].Identify.bTargetPortProtocol |= -- CSMI_SAS_PROTOCOL_SMP; -- if( protocol & MPI_SAS_DEVICE_INFO_SATA_DEVICE ) -- karg.Information.Phy[ii].Identify.bTargetPortProtocol |= -- CSMI_SAS_PROTOCOL_SATA; -- -- /* Setup SAS Address for the attached device */ -- if (sasPhyPg0->AttachedDevHandle) { -- sas_address = reverse_byte_order64(sas_address); -- memcpy(karg.Information.Phy[ii].Attached.bSASAddress, -- &sas_address, sizeof(u64)); -- karg.Information.Phy[ii].Attached.bPhyIdentifier = -- sasPhyPg0->AttachedPhyIdentifier; -- } -- -- /* Setup SAS Address for the parent device */ -- csmisas_sas_device_pg0(ioc, &device_info, -- (MPI_SAS_DEVICE_PGAD_FORM_HANDLE << -- MPI_SAS_DEVICE_PGAD_FORM_SHIFT), -- sasIoUnitPg0->PhyData[ii].ControllerDevHandle); -- sas_address = reverse_byte_order64(device_info.sas_address); -- memcpy(karg.Information.Phy[ii].Identify.bSASAddress, -- &sas_address, sizeof(u64)); -- karg.Information.Phy[ii].Identify.bPhyIdentifier = ii; -- -- pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz, -- (u8 *) sasPhyPg0, sasPhyPg0_dma); -- } -- --sas_get_phy_info_exit: -- -- if (sasIoUnitPg0) -- pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz, -- (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma); -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_PHY_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to write out csmisas_get_phy_info_buffer @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI SAS Set PHY Info command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_set_phy_info(unsigned long arg) --{ -- CSMI_SAS_SET_PHY_INFO_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_SET_PHY_INFO_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SET_PHY_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_set_phy_info struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- --/* TODO - implement IOCTL here */ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_BAD_CNTL_CODE; -- dcsmisasprintk((": not implemented\n")); -- --// cim_set_phy_info_exit: -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_SET_PHY_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_set_phy_info @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; -- --} -- --/** -- * Prototype Routine for the CSMI Sas Get SCSI Address command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_scsi_address(unsigned long arg) --{ -- CSMI_SAS_GET_SCSI_ADDRESS_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_GET_SCSI_ADDRESS_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- u64 sas_address; -- struct sas_device_info *sas_info; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, -- sizeof(CSMI_SAS_GET_SCSI_ADDRESS_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_get_scsi_address struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- /* reverse byte order the sas address */ -- memcpy(&sas_address, karg.bSASAddress, sizeof(u64)); -- sas_address = reverse_byte_order64(sas_address); -- -- /* Search the list for the matching SAS address. */ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_SCSI_ADDRESS; -- karg.bPathId = 0; -- karg.bTargetId = 0; -- karg.bLun = 0; -- -- sas_info = csmisas_get_device_component_by_sas_addr(ioc, sas_address); -- if (!sas_info || sas_info->is_cached || sas_info->is_logical_volume) -- goto csmisas_get_scsi_address_exit; -- -- karg.bPathId = sas_info->os.channel; -- karg.bTargetId = sas_info->os.id; -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- csmisas_get_scsi_address_exit: -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_GET_SCSI_ADDRESS_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_get_scsi_address @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI Sas Get SCSI Address command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_sata_signature(unsigned long arg) --{ -- CSMI_SAS_SATA_SIGNATURE_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_SATA_SIGNATURE_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- int rc, jj; -- ConfigExtendedPageHeader_t hdr; -- CONFIGPARMS cfg; -- SasPhyPage0_t *sasPhyPg0; -- dma_addr_t sasPhyPg0_dma; -- int sasPhyPg0_data_sz; -- SasDevicePage1_t *sasDevicePg1; -- dma_addr_t sasDevicePg1_dma; -- int sasDevicePg1_data_sz; -- u8 phyId; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- sasPhyPg0=NULL; -- sasPhyPg0_data_sz=0; -- sasDevicePg1=NULL; -- sasDevicePg1_data_sz=0; -- -- if (copy_from_user(&karg, uarg, -- sizeof(CSMI_SAS_SATA_SIGNATURE_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_sata_signature struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- phyId = karg.Signature.bPhyIdentifier; -- if (phyId >= ioc->num_ports) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_PHY_DOES_NOT_EXIST; -- dcsmisasprintk((": phyId >= ioc->num_ports\n")); -- goto cim_sata_signature_exit; -- } -- -- /* Default to success.*/ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* Issue a config request to get the devHandle of the attached device -- */ -- -- /* Issue a config request to get phy information. */ -- hdr.PageVersion = MPI_SASPHY0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.pageAddr = phyId; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk((": FAILED: MPI_SASPHY0_PAGEVERSION: HEADER\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sata_signature_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk((": hdr.ExtPageLength == 0\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sata_signature_exit; -- } -- -- -- sasPhyPg0_data_sz = hdr.ExtPageLength * 4; -- rc = -ENOMEM; -- -- sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent(ioc->pcidev, -- sasPhyPg0_data_sz, &sasPhyPg0_dma); -- -- if (! sasPhyPg0) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sata_signature_exit; -- } -- -- memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz); -- cfg.physAddr = sasPhyPg0_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk((": FAILED: MPI_SASPHY0_PAGEVERSION: PAGE\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sata_signature_exit; -- } -- -- /* Make sure a SATA device is attached. */ -- if ((le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & -- MPI_SAS_DEVICE_INFO_SATA_DEVICE) == 0) { -- dcsmisasprintk((": NOT A SATA DEVICE\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_SATA_DEVICE; -- goto cim_sata_signature_exit; -- } -- -- /* Get device page 1 for FIS signature. */ -- hdr.PageVersion = MPI_SASDEVICE1_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 1 /* page number 1 */; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- -- cfg.pageAddr = ((MPI_SAS_DEVICE_PGAD_FORM_HANDLE << -- MPI_SAS_DEVICE_PGAD_FORM_SHIFT) | -- le16_to_cpu(sasPhyPg0->AttachedDevHandle)); -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- dcsmisasprintk((": FAILED: MPI_SASDEVICE1_PAGEVERSION: HEADER\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sata_signature_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- dcsmisasprintk((": hdr.ExtPageLength == 0\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sata_signature_exit; -- } -- -- sasDevicePg1_data_sz = hdr.ExtPageLength * 4; -- rc = -ENOMEM; -- -- sasDevicePg1 = (SasDevicePage1_t *) pci_alloc_consistent -- (ioc->pcidev, sasDevicePg1_data_sz, &sasDevicePg1_dma); -- -- if (! sasDevicePg1) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sata_signature_exit; -- } -- -- memset((u8 *)sasDevicePg1, 0, sasDevicePg1_data_sz); -- cfg.physAddr = sasDevicePg1_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- dcsmisasprintk((": FAILED: MPI_SASDEVICE1_PAGEVERSION: PAGE\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sata_signature_exit; -- } -- --/* EDM : dump Device Page 1 data*/ -- dcsmisasprintk(("---- SAS DEVICE PAGE 1 ---------\n")); -- dcsmisasprintk(("Handle=0x%x\n",sasDevicePg1->DevHandle)); -- dcsmisasprintk(("SAS Address=")); -- for(jj=0;jj<8;jj++) -- dcsmisasprintk(("%02x ", -- ((u8 *)&sasDevicePg1->SASAddress)[jj])); -- dcsmisasprintk(("\n")); -- dcsmisasprintk(("Target ID=0x%x\n",sasDevicePg1->TargetID)); -- dcsmisasprintk(("Bus=0x%x\n",sasDevicePg1->Bus)); -- dcsmisasprintk(("Initial Reg Device FIS=")); -- for(jj=0;jj<20;jj++) -- dcsmisasprintk(("%02x ", -- ((u8 *)&sasDevicePg1->InitialRegDeviceFIS)[jj])); -- dcsmisasprintk(("\n\n")); --/* EDM : debug data */ -- -- memcpy(karg.Signature.bSignatureFIS, -- sasDevicePg1->InitialRegDeviceFIS,20); -- -- cim_sata_signature_exit: -- -- if (sasPhyPg0) -- pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz, -- (u8 *) sasPhyPg0, sasPhyPg0_dma); -- -- if (sasDevicePg1) -- pci_free_consistent(ioc->pcidev, sasDevicePg1_data_sz, -- (u8 *) sasDevicePg1, sasDevicePg1_dma); -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_SATA_SIGNATURE_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_sata_signature @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI Sas Get SCSI Address command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_device_address(unsigned long arg) --{ -- CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- struct sas_device_info *sas_info; -- u64 sas_address; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, -- sizeof(CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_get_device_address_buffer struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_DEVICE_ADDRESS; -- memset(karg.bSASAddress, 0, sizeof(u64)); -- memset(karg.bSASLun, 0, sizeof(karg.bSASLun)); -- -- /* Search the list for the matching SAS address. */ -- sas_info = csmisas_get_device_component_by_os(ioc, karg.bPathId, -- karg.bTargetId); -- if (!sas_info || sas_info->is_cached || sas_info->is_logical_volume) -- goto csmisas_get_device_address_exit; -- -- sas_address = reverse_byte_order64(sas_info->sas_address); -- memcpy(karg.bSASAddress, &sas_address, sizeof(u64)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- csmisas_get_device_address_exit: -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_get_device_address_buffer @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI Sas Get Link Errors command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_link_errors(unsigned long arg) --{ -- CSMI_SAS_LINK_ERRORS_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_LINK_ERRORS_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- MPT_FRAME_HDR *mf = NULL; -- MPIHeader_t *mpi_hdr; -- int iocnum; -- int rc; -- ConfigExtendedPageHeader_t hdr; -- CONFIGPARMS cfg; -- SasPhyPage1_t *sasPhyPage1; -- dma_addr_t sasPhyPage1_dma; -- int sasPhyPage1_data_sz; -- SasIoUnitControlRequest_t *sasIoUnitCntrReq; -- SasIoUnitControlReply_t *sasIoUnitCntrReply; -- u8 phyId; -- u16 ioc_status; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- sasPhyPage1=NULL; -- sasPhyPage1_data_sz=0; -- -- if (copy_from_user(&karg, uarg, -- sizeof(CSMI_SAS_LINK_ERRORS_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmisas_get_link_errors struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- phyId = karg.Information.bPhyIdentifier; -- if (phyId >= ioc->num_ports) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_PHY_DOES_NOT_EXIST; -- dcsmisasprintk((": phyId >= ioc->num_ports\n")); -- goto cim_get_link_errors_exit; -- } -- -- /* Default to success.*/ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* Issue a config request to get the devHandle of the attached device -- */ -- -- /* Issue a config request to get phy information. */ -- hdr.PageVersion = MPI_SASPHY1_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 1 /* page number 1*/; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.pageAddr = phyId; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk((": FAILED: MPI_SASPHY1_PAGEVERSION: HEADER\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_link_errors_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk((": hdr.ExtPageLength == 0\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_link_errors_exit; -- } -- -- -- sasPhyPage1_data_sz = hdr.ExtPageLength * 4; -- rc = -ENOMEM; -- -- sasPhyPage1 = (SasPhyPage1_t *) pci_alloc_consistent(ioc->pcidev, -- sasPhyPage1_data_sz, &sasPhyPage1_dma); -- -- if (! sasPhyPage1) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_link_errors_exit; -- } -- -- memset((u8 *)sasPhyPage1, 0, sasPhyPage1_data_sz); -- cfg.physAddr = sasPhyPage1_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- /* Don't check if this failed. Already in a -- * failure case. -- */ -- dcsmisasprintk((": FAILED: MPI_SASPHY1_PAGEVERSION: PAGE\n")); -- dcsmisasprintk((": rc=%x\n",rc)); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_link_errors_exit; -- } -- --/* EDM : dump PHY Page 1 data*/ -- dcsmisasprintk(("---- SAS PHY PAGE 1 ------------\n")); -- dcsmisasprintk(("Invalid Dword Count=0x%x\n", -- sasPhyPage1->InvalidDwordCount)); -- dcsmisasprintk(("Running Disparity Error Count=0x%x\n", -- sasPhyPage1->RunningDisparityErrorCount)); -- dcsmisasprintk(("Loss Dword Synch Count=0x%x\n", -- sasPhyPage1->LossDwordSynchCount)); -- dcsmisasprintk(("PHY Reset Problem Count=0x%x\n", -- sasPhyPage1->PhyResetProblemCount)); -- dcsmisasprintk(("\n\n")); --/* EDM : debug data */ -- -- karg.Information.uInvalidDwordCount = -- le32_to_cpu(sasPhyPage1->InvalidDwordCount); -- karg.Information.uRunningDisparityErrorCount = -- le32_to_cpu(sasPhyPage1->RunningDisparityErrorCount); -- karg.Information.uLossOfDwordSyncCount = -- le32_to_cpu(sasPhyPage1->LossDwordSynchCount); -- karg.Information.uPhyResetProblemCount = -- le32_to_cpu(sasPhyPage1->PhyResetProblemCount); -- -- if (karg.Information.bResetCounts == -- CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS ) { -- goto cim_get_link_errors_exit; -- } -- -- /* Clear Error log -- * -- * Issue IOUNIT Control Reqeust Message -- */ -- -- /* Get a MF for this command. -- */ -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dcsmisasprintk((": no msg frames!\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_link_errors_exit; -- } -- -- mpi_hdr = (MPIHeader_t *) mf; -- sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf; -- memset(sasIoUnitCntrReq,0,sizeof(SasIoUnitControlRequest_t)); -- sasIoUnitCntrReq->Function = MPI_FUNCTION_SAS_IO_UNIT_CONTROL; -- sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext; -- sasIoUnitCntrReq->PhyNum = phyId; -- sasIoUnitCntrReq->Operation = MPI_SAS_OP_PHY_CLEAR_ERROR_LOG; -- -- if (csmisas_send_command_wait(ioc, mf, karg.IoctlHeader.Timeout) != 0) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_link_errors_exit; -- } -- -- /* process the completed Reply Message Frame */ -- if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) { -- -- sasIoUnitCntrReply = -- (SasIoUnitControlReply_t *)ioc->ioctl->ReplyFrame; -- ioc_status = le16_to_cpu(sasIoUnitCntrReply->IOCStatus) -- & MPI_IOCSTATUS_MASK; -- -- if (ioc_status != MPI_IOCSTATUS_SUCCESS) { -- dcsmisasprintk((": SAS IO Unit Control: ")); -- dcsmisasprintk(("IOCStatus=0x%X IOCLogInfo=0x%X\n", -- sasIoUnitCntrReply->IOCStatus, -- sasIoUnitCntrReply->IOCLogInfo)); -- } -- } -- -- cim_get_link_errors_exit: -- -- if (sasPhyPage1) -- pci_free_consistent(ioc->pcidev, sasPhyPage1_data_sz, -- (u8 *) sasPhyPage1, sasPhyPage1_dma); -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_LINK_ERRORS_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmisas_get_link_errors @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; -- --} -- --/** -- * Prototype Routine for the CSMI SAS SMP Passthru command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_smp_passthru(unsigned long arg) --{ -- CSMI_SAS_SMP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg; -- MPT_ADAPTER *ioc; -- CSMI_SAS_SMP_PASSTHRU_BUFFER karg; -- pSmpPassthroughRequest_t smpReq; -- pSmpPassthroughReply_t smpReply; -- MPT_FRAME_HDR *mf = NULL; -- MPIHeader_t *mpi_hdr; -- char *psge; -- int iocnum, flagsLength; -- void * request_data; -- dma_addr_t request_data_dma; -- u32 request_data_sz; -- void * response_data; -- dma_addr_t response_data_dma; -- u32 response_data_sz; -- u16 ioc_status; -- u64 sas_address; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SMP_PASSTHRU_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_smp_passthru struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- request_data = NULL; -- response_data = NULL; -- response_data_sz = sizeof(CSMI_SAS_SMP_RESPONSE); -- request_data_sz = karg.Parameters.uRequestLength; -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- /* Make sure the adapter is not being reset. */ -- if (!ioc->ioctl) { -- printk(KERN_ERR "%s@%d::%s - " -- "No memory available during driver init.\n", -- __FILE__, __LINE__,__FUNCTION__); -- return -ENOMEM; -- } else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) { -- printk(KERN_ERR "%s@%d::%s - " -- "Busy with IOC Reset \n", -- __FILE__, __LINE__,__FUNCTION__); -- return -EBUSY; -- } -- -- /* Default to success.*/ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* Do some error checking on the request. */ -- if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT; -- goto cim_smp_passthru_exit; -- } -- -- if ((request_data_sz > 0xFFFF) || (!request_data_sz)) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_smp_passthru_exit; -- } -- -- /* Get a free request frame and save the message context. -- */ -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dcsmisasprintk((": no msg frames!\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_smp_passthru_exit; -- } -- -- mpi_hdr = (MPIHeader_t *) mf; -- smpReq = (pSmpPassthroughRequest_t ) mf; -- -- memset(smpReq,0,ioc->req_sz); -- -- memcpy(&sas_address, karg.Parameters.bDestinationSASAddress, -- sizeof(u64)); -- sas_address = cpu_to_le64(reverse_byte_order64(sas_address)); -- memcpy(&smpReq->SASAddress, &sas_address, sizeof(u64)); -- -- /* Fill in smp request. */ -- smpReq->PhysicalPort = karg.Parameters.bPortIdentifier; -- smpReq->Function = MPI_FUNCTION_SMP_PASSTHROUGH; -- smpReq->RequestDataLength = cpu_to_le16(request_data_sz); -- smpReq->ConnectionRate = karg.Parameters.bConnectionRate; -- smpReq->MsgContext = mpi_hdr->MsgContext; -- smpReq->Reserved2 = 0; -- smpReq->Reserved3 = 0; -- -- /* -- * Prepare the necessary pointers to run -- * through the SGL generation -- */ -- -- psge = (char *)&smpReq->SGL; -- -- /* setup the *Request* payload SGE */ -- flagsLength = MPI_SGE_FLAGS_SIMPLE_ELEMENT | -- MPI_SGE_FLAGS_SYSTEM_ADDRESS | -- MPI_SGE_FLAGS_32_BIT_ADDRESSING | -- MPI_SGE_FLAGS_HOST_TO_IOC | -- MPI_SGE_FLAGS_END_OF_BUFFER; -- -- if (sizeof(dma_addr_t) == sizeof(u64)) { -- flagsLength |= MPI_SGE_FLAGS_64_BIT_ADDRESSING; -- } -- flagsLength = flagsLength << MPI_SGE_FLAGS_SHIFT; -- flagsLength |= request_data_sz; -- -- request_data = pci_alloc_consistent( -- ioc->pcidev, request_data_sz, &request_data_dma); -- -- if (!request_data) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- mpt_free_msg_frame(ioc, mf); -- goto cim_smp_passthru_exit; -- } -- -- mpt_add_sge(psge, flagsLength, request_data_dma); -- psge += (sizeof(u32) + sizeof(dma_addr_t)); -- -- memcpy(request_data,&karg.Parameters.Request,request_data_sz); -- -- /* setup the *Response* payload SGE */ -- response_data = pci_alloc_consistent( -- ioc->pcidev, response_data_sz, &response_data_dma); -- -- if (!response_data) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- mpt_free_msg_frame(ioc, mf); -- goto cim_smp_passthru_exit; -- } -- -- flagsLength = MPI_SGE_FLAGS_SIMPLE_ELEMENT | -- MPI_SGE_FLAGS_SYSTEM_ADDRESS | -- MPI_SGE_FLAGS_32_BIT_ADDRESSING | -- MPI_SGE_FLAGS_IOC_TO_HOST | -- MPI_SGE_FLAGS_END_OF_BUFFER; -- -- if (sizeof(dma_addr_t) == sizeof(u64)) { -- flagsLength |= MPI_SGE_FLAGS_64_BIT_ADDRESSING; -- } -- -- flagsLength = flagsLength << MPI_SGE_FLAGS_SHIFT; -- flagsLength |= response_data_sz; -- -- mpt_add_sge(psge, flagsLength, response_data_dma); -- -- if (csmisas_send_command_wait(ioc, mf, karg.IoctlHeader.Timeout) != 0) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_smp_passthru_exit; -- } -- -- if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) { -- dcsmisasprintk((": SMP Passthru: oh no, there is no reply!!")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_smp_passthru_exit; -- } -- -- /* process the completed Reply Message Frame */ -- smpReply = (pSmpPassthroughReply_t )ioc->ioctl->ReplyFrame; -- ioc_status = le16_to_cpu(smpReply->IOCStatus) & MPI_IOCSTATUS_MASK; -- -- if ((ioc_status != MPI_IOCSTATUS_SUCCESS) && -- (ioc_status != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- dcsmisasprintk((": SMP Passthru: ")); -- dcsmisasprintk(("IOCStatus=0x%X IOCLogInfo=0x%X SASStatus=0x%X\n", -- le16_to_cpu(smpReply->IOCStatus), -- le32_to_cpu(smpReply->IOCLogInfo), -- smpReply->SASStatus)); -- goto cim_smp_passthru_exit; -- } -- -- karg.Parameters.bConnectionStatus = -- map_sas_status_to_csmi(smpReply->SASStatus); -- -- -- if (le16_to_cpu(smpReply->ResponseDataLength)) { -- karg.Parameters.uResponseBytes = le16_to_cpu(smpReply->ResponseDataLength); -- memcpy(&karg.Parameters.Response, -- response_data, le16_to_cpu(smpReply->ResponseDataLength)); -- } -- -- cim_smp_passthru_exit: -- -- if (request_data) -- pci_free_consistent(ioc->pcidev, request_data_sz, -- (u8 *)request_data, request_data_dma); -- -- if (response_data) -- pci_free_consistent(ioc->pcidev, response_data_sz, -- (u8 *)response_data, response_data_dma); -- -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_SMP_PASSTHRU_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_smp_passthru @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk((": %s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI SAS SSP Passthru command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int csmisas_ssp_passthru(unsigned long arg) --{ -- CSMI_SAS_SSP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_SSP_PASSTHRU_BUFFER karg_hdr, * karg; -- MPT_ADAPTER *ioc = NULL; -- pSCSIIORequest_t pScsiRequest; -- pSCSIIOReply_t pScsiReply; -- MPT_FRAME_HDR *mf = NULL; -- MPIHeader_t *mpi_hdr; -- int iocnum,ii; -- u64 sas_address; -- u16 req_idx; -- char *psge; -- int flagsLength; -- void * request_data; -- dma_addr_t request_data_dma; -- u32 request_data_sz; -- int malloc_data_sz; -- int memory_pages; -- u16 ioc_status; -- u8 volume_id; -- u8 volume_bus; -- u8 is_hidden_raid_component; -- u8 channel; -- u8 id; -- struct sas_device_info *sas_info; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg_hdr, uarg, sizeof(CSMI_SAS_SSP_PASSTHRU_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_ssp_passthru struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- request_data = NULL; -- request_data_sz = karg_hdr.Parameters.uDataLength; -- channel = 0; -- id = 0; -- volume_id = 0; -- volume_bus = 0; -- is_hidden_raid_component = 0; -- -- malloc_data_sz = (request_data_sz + -- offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER,bDataBuffer)); -- memory_pages = get_order(malloc_data_sz); -- karg = (CSMI_SAS_SSP_PASSTHRU_BUFFER *)__get_free_pages( -- GFP_KERNEL, memory_pages); -- if (!karg){ -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to malloc SAS_SSP_PASSTHRU_BUFFER " -- "malloc_data_sz=%d memory_pages=%d\n", -- __FILE__, __LINE__, __FUNCTION__, -- malloc_data_sz, memory_pages); -- return -ENOMEM; -- } -- -- dcsmisasprintk((KERN_ERR "%s@%d::%s() - " -- "malloc'ed SAS_SSP_PASSTHRU_BUFFER " -- "malloc_data_sz=%d memory_pages=%d\n", -- __FILE__, __LINE__, __FUNCTION__, -- malloc_data_sz, memory_pages)); -- -- memset(karg, 0, sizeof(*karg)); -- -- if (copy_from_user(karg, uarg, request_data_sz + -- offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER,bDataBuffer))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_ssp_passthru struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)karg, memory_pages); -- return -EFAULT; -- } -- -- /* -- * some checks of the incoming frame -- */ -- if ( offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER,bDataBuffer) + -- request_data_sz - sizeof(IOCTL_HEADER) > -- karg->IoctlHeader.Length ) { -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -- dcsmisasprintk((KERN_ERR -- "%s::%s()" -- " @%d - expected datalen incorrect!\n", -- __FILE__, __FUNCTION__, __LINE__)); -- goto cim_ssp_passthru_exit; -- } -- -- if (((iocnum = mpt_verify_adapter(karg->IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- goto cim_ssp_passthru_exit; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -- dcsmisasprintk((KERN_ERR -- "%s::%s()" -- " @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- goto cim_ssp_passthru_exit; -- } -- -- /* Default to success. -- */ -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* Neither a phy nor a port has been selected. -- */ -- if ((karg->Parameters.bPhyIdentifier == CSMI_SAS_USE_PORT_IDENTIFIER) && -- (karg->Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT)) { -- karg->IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT; -- dcsmisasprintk((KERN_ERR -- "%s::%s()" -- " @%d - incorrect bPhyIdentifier and bPortIdentifier!\n", -- __FILE__, __FUNCTION__, __LINE__)); -- goto cim_ssp_passthru_exit; -- } -- -- /* A phy has been selected. Verify that it's valid. -- */ -- if (karg->Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) { -- -- /* Is the phy in range? */ -- if (karg->Parameters.bPhyIdentifier >= ioc->num_ports) { -- dcsmisasprintk((": phyId >= ioc->num_ports (%d %d)\n", -- karg->Parameters.bPhyIdentifier, -- ioc->num_ports)); -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_PHY_DOES_NOT_EXIST; -- goto cim_ssp_passthru_exit; -- } -- } -- -- if(karg->Parameters.bAdditionalCDBLength) { -- /* TODO - SCSI IO (32) Request Message support -- */ -- dcsmisasprintk((": greater than 16-byte cdb is not supported!\n")); -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- goto cim_ssp_passthru_exit; -- } -- -- /* we will use SAS address to resolve the scsi adddressing -- */ -- memcpy(&sas_address, karg->Parameters.bDestinationSASAddress, -- sizeof(u64)); -- sas_address = reverse_byte_order64(sas_address); -- -- /* Search the list for the matching SAS address. -- */ -- sas_info = csmisas_get_device_component_by_sas_addr(ioc, sas_address); -- if (!sas_info || sas_info->is_cached) { -- /* -- *Invalid SAS address -- */ -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- dcsmisasprintk((KERN_ERR -- "%s::%s()" -- " @%d - couldn't find associated SASAddress=%llX!\n", -- __FILE__, __FUNCTION__, __LINE__, sas_address)); -- goto cim_ssp_passthru_exit; -- } -- -- id = sas_info->fw.id; -- channel = sas_info->fw.channel; -- -- if (csmisas_is_phys_disk(ioc, channel, id)) { -- id = csmisas_raid_id_to_num(ioc, channel, id); -- channel = 0; -- is_hidden_raid_component = 1; -- } -- -- /* Get a free request frame and save the message context. -- */ -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dcsmisasprintk((": no msg frames!\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_ssp_passthru_exit; -- } -- -- mpi_hdr = (MPIHeader_t *) mf; -- pScsiRequest = (pSCSIIORequest_t) mf; -- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -- -- memset(pScsiRequest,0,sizeof(SCSIIORequest_t)); -- -- /* Fill in SCSI IO (16) request. -- */ -- -- pScsiRequest->Function = (is_hidden_raid_component == 1) ? -- MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH : MPI_FUNCTION_SCSI_IO_REQUEST; -- pScsiRequest->TargetID = id; -- pScsiRequest->Bus = channel; -- memcpy(pScsiRequest->LUN, &karg->Parameters.bLun, 8); -- pScsiRequest->CDBLength = karg->Parameters.bCDBLength; -- pScsiRequest->DataLength = cpu_to_le32(request_data_sz); -- pScsiRequest->MsgContext = mpi_hdr->MsgContext; -- memcpy(pScsiRequest->CDB, karg->Parameters.bCDB, -- pScsiRequest->CDBLength); -- -- #if defined(MPT_DEBUG_CSMISAS) -- { -- int k; -- printk("\tchannel=%d id=%d ", sas_info->fw.channel, -- sas_info->fw.id); -- if (is_hidden_raid_component) -- printk("num_id=%d ", id); -- printk("\n"); -- printk("\tcdb_len = %d data_len=%d\n", -- pScsiRequest->CDBLength, request_data_sz); -- printk("\t"); -- for (k = 0; k < pScsiRequest->CDBLength; ++k) -- printk(" %02x", pScsiRequest->CDB[k]); -- printk("\n"); -- } -- #endif -- -- /* direction -- */ -- if (karg->Parameters.uFlags & CSMI_SAS_SSP_READ) { -- pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ); -- } else if (karg->Parameters.uFlags & CSMI_SAS_SSP_WRITE) { -- pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_WRITE); -- } else if ((karg->Parameters.uFlags & CSMI_SAS_SSP_UNSPECIFIED) && -- (!karg->Parameters.uDataLength)) { -- /* no data transfer -- */ -- pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_NODATATRANSFER); -- } else { -- /* no direction specified -- */ -- pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ); -- pScsiRequest->MsgFlags = -- MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR; -- } -- -- pScsiRequest->MsgFlags |= mpt_msg_flags(); -- /* task attributes -- */ -- if((karg->Parameters.uFlags && 0xFF) == 0) { -- pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_SIMPLEQ); -- } else if (karg->Parameters.uFlags & -- CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE) { -- pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_HEADOFQ); -- } else if (karg->Parameters.uFlags & -- CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED) { -- pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_ORDEREDQ); -- } else if (karg->Parameters.uFlags & -- CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA) { -- pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_ACAQ); -- } else { -- pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_UNTAGGED); -- } -- -- /* setup sense -- */ -- pScsiRequest->SenseBufferLength = MPT_SENSE_BUFFER_SIZE; -- pScsiRequest->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma + -- (req_idx * MPT_SENSE_BUFFER_ALLOC)); -- -- /* setup databuffer sg, assuming we fit everything one contiguous buffer -- */ -- psge = (char *)&pScsiRequest->SGL; -- -- if (karg->Parameters.uFlags & CSMI_SAS_SSP_WRITE) { -- flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE; -- } else if (karg->Parameters.uFlags & CSMI_SAS_SSP_READ) { -- flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; -- }else { -- flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT | -- MPI_SGE_FLAGS_DIRECTION | -- mpt_addr_size() ) -- << MPI_SGE_FLAGS_SHIFT; -- } -- flagsLength |= request_data_sz; -- -- if ( request_data_sz > 0) { -- request_data = pci_alloc_consistent( -- ioc->pcidev, request_data_sz, &request_data_dma); -- -- if (request_data == NULL) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED " -- "request_data_sz=%d\n", request_data_sz)); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- mpt_free_msg_frame(ioc, mf); -- goto cim_ssp_passthru_exit; -- } -- -- mpt_add_sge(psge, flagsLength, request_data_dma); -- if (karg->Parameters.uFlags & CSMI_SAS_SSP_WRITE) -- memcpy(request_data, karg->bDataBuffer, request_data_sz); -- } else { -- mpt_add_sge(psge, flagsLength, (dma_addr_t) -1); -- } -- -- if (csmisas_send_command_wait(ioc, mf, karg->IoctlHeader.Timeout) != 0) { -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_ssp_passthru_exit; -- } -- -- memset(&karg->Status,0,sizeof(CSMI_SAS_SSP_PASSTHRU_STATUS)); -- karg->Status.bConnectionStatus = CSMI_SAS_OPEN_ACCEPT; -- karg->Status.bDataPresent = CSMI_SAS_SSP_NO_DATA_PRESENT; -- karg->Status.bStatus = GOOD; -- karg->Status.bResponseLength[0] = 0; -- karg->Status.bResponseLength[1] = 0; -- karg->Status.uDataBytes = request_data_sz; -- -- /* process the completed Reply Message Frame */ -- if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) { -- -- pScsiReply = (pSCSIIOReply_t ) ioc->ioctl->ReplyFrame; -- karg->Status.bStatus = pScsiReply->SCSIStatus; -- karg->Status.uDataBytes = min(le32_to_cpu(pScsiReply->TransferCount), -- request_data_sz); -- ioc_status = le16_to_cpu(pScsiReply->IOCStatus) & MPI_IOCSTATUS_MASK; -- -- if (pScsiReply->SCSIState == -- MPI_SCSI_STATE_AUTOSENSE_VALID) { -- karg->Status.bConnectionStatus = -- CSMI_SAS_SSP_SENSE_DATA_PRESENT; -- karg->Status.bResponseLength[0] = -- (u8)le32_to_cpu(pScsiReply->SenseCount) & 0xFF; -- memcpy(karg->Status.bResponse, -- ioc->ioctl->sense, le32_to_cpu(pScsiReply->SenseCount)); -- } else if(pScsiReply->SCSIState == -- MPI_SCSI_STATE_RESPONSE_INFO_VALID) { -- karg->Status.bDataPresent = -- CSMI_SAS_SSP_RESPONSE_DATA_PRESENT; -- karg->Status.bResponseLength[0] = -- sizeof(pScsiReply->ResponseInfo); -- for (ii=0;ii<sizeof(pScsiReply->ResponseInfo);ii++) { -- karg->Status.bResponse[ii] = -- ((u8*)&pScsiReply->ResponseInfo)[ -- (sizeof(pScsiReply->ResponseInfo)-1)-ii]; -- } -- } else if ((ioc_status != MPI_IOCSTATUS_SUCCESS) && -- (ioc_status != MPI_IOCSTATUS_SCSI_RECOVERED_ERROR) && -- (ioc_status != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) { -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- dcsmisasprintk((": SCSI IO : ")); -- dcsmisasprintk(("IOCStatus=0x%X IOCLogInfo=0x%X\n", -- pScsiReply->IOCStatus, -- pScsiReply->IOCLogInfo)); -- } -- } -- -- if ((karg->Status.uDataBytes) && (request_data) && -- (karg->Parameters.uFlags & CSMI_SAS_SSP_READ)) { -- if (copy_to_user((char *)uarg->bDataBuffer, -- request_data, karg->Status.uDataBytes)) { -- printk(KERN_ERR "%s@%d::%s - " -- "Unable to write data to user %p\n", -- __FILE__, __LINE__,__FUNCTION__, -- (void*)karg->bDataBuffer); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- } -- } -- -- cim_ssp_passthru_exit: -- -- -- if (request_data) -- pci_free_consistent(ioc->pcidev, request_data_sz, -- (u8 *)request_data, request_data_dma); -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, karg, -- offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER, bDataBuffer))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_ssp_passthru @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)karg, memory_pages); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- free_pages((unsigned long)karg, memory_pages); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI SAS STP Passthru command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_stp_passthru(unsigned long arg) --{ -- CSMI_SAS_STP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_STP_PASSTHRU_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- pSataPassthroughRequest_t pSataRequest; -- pSataPassthroughReply_t pSataReply; -- MPT_FRAME_HDR *mf = NULL; -- MPIHeader_t *mpi_hdr; -- int iocnum; -- u32 data_sz; -- u64 sas_address; -- u16 req_idx; -- char *psge; -- int flagsLength; -- void * request_data; -- dma_addr_t request_data_dma; -- u32 request_data_sz; -- u8 channel; -- u8 id; -- u8 volume_id; -- u8 volume_bus; -- struct sas_device_info *sas_info; -- u16 ioc_status; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- request_data=NULL; -- request_data_sz = karg.Parameters.uDataLength; -- volume_id = 0; -- volume_bus = 0; -- channel = 0; -- id = 0; -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- /* Default to success. -- */ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* Neither a phy nor a port has been selected. -- */ -- if ((karg.Parameters.bPhyIdentifier == CSMI_SAS_USE_PORT_IDENTIFIER) && -- (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT)) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT; -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - incorrect bPhyIdentifier and bPortIdentifier!\n", -- __FILE__,__FUNCTION__, __LINE__)); -- goto cim_stp_passthru_exit; -- } -- -- /* A phy has been selected. Verify that it's valid. -- */ -- if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) { -- -- /* Is the phy in range? */ -- if (karg.Parameters.bPhyIdentifier >= ioc->num_ports) { -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_PHY_DOES_NOT_EXIST; -- goto cim_stp_passthru_exit; -- } -- } -- -- /* some checks of the incoming frame -- */ -- if (request_data_sz > 0xFFFF) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - uDataLength > 0xFFFF!\n", -- __FILE__, __FUNCTION__, __LINE__)); -- goto cim_stp_passthru_exit; -- } -- -- data_sz = sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER) - -- sizeof(IOCTL_HEADER) - sizeof(u8*) + -- request_data_sz; -- -- if ( data_sz > karg.IoctlHeader.Length ) { -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - expected datalen incorrect!\n", -- __FILE__, __FUNCTION__,__LINE__)); -- goto cim_stp_passthru_exit; -- } -- -- -- /* we will use SAS address to resolve the scsi adddressing -- */ -- memcpy(&sas_address, karg.Parameters.bDestinationSASAddress, -- sizeof(u64)); -- sas_address = reverse_byte_order64(sas_address); -- -- /* Search the list for the matching SAS address. -- */ -- sas_info = csmisas_get_device_component_by_sas_addr(ioc, sas_address); -- if (!sas_info || sas_info->is_cached || sas_info->is_logical_volume) { -- /* -- *Invalid SAS address -- */ -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- dcsmisasprintk((KERN_ERR -- "%s::%s()" -- " @%d - couldn't find associated SASAddress=%llX!\n", -- __FILE__, __FUNCTION__, __LINE__, sas_address)); -- goto cim_stp_passthru_exit; -- } -- -- id = sas_info->fw.id; -- channel = sas_info->fw.channel; -- -- /* check that this is an STP or SATA target device -- */ -- if ( !(sas_info->device_info & MPI_SAS_DEVICE_INFO_STP_TARGET ) && -- !(sas_info->device_info & MPI_SAS_DEVICE_INFO_SATA_DEVICE )) { -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- goto cim_stp_passthru_exit; -- } -- -- /* Get a free request frame and save the message context. -- */ -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dcsmisasprintk((": no msg frames!\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_stp_passthru_exit; -- } -- -- mpi_hdr = (MPIHeader_t *) mf; -- pSataRequest = (pSataPassthroughRequest_t) mf; -- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -- -- memset(pSataRequest,0,sizeof(pSataPassthroughRequest_t)); -- -- pSataRequest->TargetID = id; -- pSataRequest->Bus = channel; -- pSataRequest->Function = MPI_FUNCTION_SATA_PASSTHROUGH; -- pSataRequest->PassthroughFlags = cpu_to_le16(karg.Parameters.uFlags); -- pSataRequest->ConnectionRate = karg.Parameters.bConnectionRate; -- pSataRequest->MsgContext = mpi_hdr->MsgContext; -- pSataRequest->DataLength = cpu_to_le32(request_data_sz); -- pSataRequest->MsgFlags = 0; -- memcpy( pSataRequest->CommandFIS,karg.Parameters.bCommandFIS, 20); -- -- psge = (char *)&pSataRequest->SGL; -- if (karg.Parameters.uFlags & CSMI_SAS_STP_WRITE) { -- flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE; -- } else if (karg.Parameters.uFlags & CSMI_SAS_STP_READ) { -- flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; -- }else { -- flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT | -- MPI_SGE_FLAGS_DIRECTION | -- mpt_addr_size() ) -- << MPI_SGE_FLAGS_SHIFT; -- } -- -- flagsLength |= request_data_sz; -- if (request_data_sz > 0) { -- request_data = pci_alloc_consistent( -- ioc->pcidev, request_data_sz, &request_data_dma); -- -- if (request_data == NULL) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- mpt_free_msg_frame(ioc, mf); -- goto cim_stp_passthru_exit; -- } -- -- mpt_add_sge(psge, flagsLength, request_data_dma); -- if (karg.Parameters.uFlags & CSMI_SAS_STP_WRITE) { -- if (copy_from_user(request_data, -- karg.bDataBuffer, -- request_data_sz)) { -- printk(KERN_ERR -- "%s::%s() @%d - Unable to read user data " -- "struct @ %p\n", -- __FILE__, __FUNCTION__, __LINE__, -- (void*)karg.bDataBuffer); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- mpt_free_msg_frame(ioc, mf); -- goto cim_stp_passthru_exit; -- } -- } -- } else { -- mpt_add_sge(psge, flagsLength, (dma_addr_t) -1); -- } -- -- if (csmisas_send_command_wait(ioc, mf, karg.IoctlHeader.Timeout) != 0) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_stp_passthru_exit; -- } -- -- memset(&karg.Status,0,sizeof(CSMI_SAS_STP_PASSTHRU_STATUS)); -- -- if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) { -- dcsmisasprintk((": STP Passthru: oh no, there is no reply!!")); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_stp_passthru_exit; -- } -- -- /* process the completed Reply Message Frame */ -- pSataReply = (pSataPassthroughReply_t ) ioc->ioctl->ReplyFrame; -- ioc_status = le16_to_cpu(pSataReply->IOCStatus) & MPI_IOCSTATUS_MASK; -- -- if (ioc_status != MPI_IOCSTATUS_SUCCESS && -- ioc_status != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- dcsmisasprintk((": STP Passthru: ")); -- dcsmisasprintk(("IOCStatus=0x%X IOCLogInfo=0x%X SASStatus=0x%X\n", -- le16_to_cpu(pSataReply->IOCStatus), -- le32_to_cpu(pSataReply->IOCLogInfo), -- pSataReply->SASStatus)); -- } -- -- karg.Status.bConnectionStatus = -- map_sas_status_to_csmi(pSataReply->SASStatus); -- -- memcpy(karg.Status.bStatusFIS,pSataReply->StatusFIS, 20); -- -- /* -- * for now, just zero out uSCR array, -- * then copy the one dword returned -- * in the reply frame into uSCR[0] -- */ -- memset( karg.Status.uSCR, 0, 64); -- karg.Status.uSCR[0] = le32_to_cpu(pSataReply->StatusControlRegisters); -- -- if((le32_to_cpu(pSataReply->TransferCount)) && (request_data) && -- (karg.Parameters.uFlags & CSMI_SAS_STP_READ)) { -- karg.Status.uDataBytes = -- min(le32_to_cpu(pSataReply->TransferCount),request_data_sz); -- if (copy_to_user((char *)uarg->bDataBuffer, -- request_data, karg.Status.uDataBytes)) { -- printk(KERN_ERR "%s::%s() @%d - " -- "Unable to write data to user %p\n", -- __FILE__, __FUNCTION__, __LINE__, -- (void*)karg.bDataBuffer); -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- } -- } -- -- cim_stp_passthru_exit: -- -- if (request_data) -- pci_free_consistent(ioc->pcidev, request_data_sz, -- (u8 *)request_data, request_data_dma); -- -- /* Copy th data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- offsetof(CSMI_SAS_STP_PASSTHRU_BUFFER,bDataBuffer))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_ssp_passthru @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk((": %s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI SAS Firmware Download command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_firmware_download(unsigned long arg) --{ -- CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- pMpiFwHeader_t pFwHeader=NULL; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, -- sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_firmware_download struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- /* Default to success.*/ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- karg.Information.usStatus = CSMI_SAS_FWD_SUCCESS; -- karg.Information.usSeverity = CSMI_SAS_FWD_INFORMATION; -- -- /* some checks of the incoming frame */ -- if ((karg.Information.uBufferLength + -- sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD)) > -- karg.IoctlHeader.Length) { -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- karg.Information.usStatus = CSMI_SAS_FWD_FAILED; -- goto cim_firmware_download_exit; -- } -- -- if ( karg.Information.uDownloadFlags & -- (CSMI_SAS_FWD_SOFT_RESET | CSMI_SAS_FWD_VALIDATE)) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- karg.Information.usStatus = CSMI_SAS_FWD_REJECT; -- karg.Information.usSeverity = CSMI_SAS_FWD_ERROR; -- goto cim_firmware_download_exit; -- } -- -- /* now we need to alloc memory so we can pull in the -- * fw image attached to end of incoming packet. -- */ -- pFwHeader = kmalloc(karg.Information.uBufferLength, GFP_KERNEL); -- if (!pFwHeader){ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- karg.Information.usStatus = CSMI_SAS_FWD_REJECT; -- karg.Information.usSeverity = CSMI_SAS_FWD_ERROR; -- goto cim_firmware_download_exit; -- } -- memset(pFwHeader, 0, sizeof(*pFwHeader)); -- -- if (copy_from_user(pFwHeader, uarg->bDataBuffer, -- karg.Information.uBufferLength)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in pFwHeader @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if ( !((pFwHeader->Signature0 == MPI_FW_HEADER_SIGNATURE_0) && -- (pFwHeader->Signature1 == MPI_FW_HEADER_SIGNATURE_1) && -- (pFwHeader->Signature2 == MPI_FW_HEADER_SIGNATURE_2))) { -- // the signature check failed -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- karg.Information.usStatus = CSMI_SAS_FWD_REJECT; -- karg.Information.usSeverity = CSMI_SAS_FWD_ERROR; -- goto cim_firmware_download_exit; -- } -- -- if ( mptctl_do_fw_download(karg.IoctlHeader.IOControllerNumber, -- uarg->bDataBuffer, karg.Information.uBufferLength) -- != 0) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- karg.Information.usStatus = CSMI_SAS_FWD_FAILED; -- karg.Information.usSeverity = CSMI_SAS_FWD_FATAL; -- goto cim_firmware_download_exit; -- } -- -- if((karg.Information.uDownloadFlags & CSMI_SAS_FWD_SOFT_RESET) || -- (karg.Information.uDownloadFlags & CSMI_SAS_FWD_HARD_RESET)) { -- if (mpt_HardResetHandler(ioc, CAN_SLEEP) != 0) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- karg.Information.usStatus = CSMI_SAS_FWD_FAILED; -- karg.Information.usSeverity = CSMI_SAS_FWD_FATAL; -- } -- } -- -- cim_firmware_download_exit: -- -- if(pFwHeader) -- kfree(pFwHeader); -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_firmware_download @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI SAS Get RAID Info command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_raid_info(unsigned long arg) --{ -- CSMI_SAS_RAID_INFO_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_RAID_INFO_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- u32 raidFlags; -- u8 maxRaidTypes; -- u8 maxDrivesPerSet; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_RAID_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_get_raid_info struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- if (!ioc->raid_data.pIocPg2) -- goto csmisas_get_raid_info_out; -- karg.Information.uNumRaidSets = -- ioc->raid_data.pIocPg2->NumActiveVolumes; -- karg.Information.uMaxRaidSets = ioc->raid_data.pIocPg2->MaxVolumes; -- if( ioc->raid_data.pIocPg6 ) { -- // get absolute maximum for all RAID sets -- maxDrivesPerSet = ioc->raid_data.pIocPg6->MaxDrivesIS; -- maxDrivesPerSet = max(ioc->raid_data.pIocPg6->MaxDrivesIM, -- maxDrivesPerSet); -- maxDrivesPerSet = max(ioc->raid_data.pIocPg6->MaxDrivesIME, -- maxDrivesPerSet); -- karg.Information.uMaxDrivesPerSet = maxDrivesPerSet; -- } -- else -- karg.Information.uMaxDrivesPerSet = 8; -- // For bMaxRaidSets, count bits set in bits 0-6 of CapabilitiesFlags -- raidFlags = ioc->raid_data.pIocPg2->CapabilitiesFlags & 0x0000007F; -- for( maxRaidTypes=0; raidFlags; maxRaidTypes++ ) -- raidFlags &= raidFlags - 1; -- karg.Information.bMaxRaidTypes = maxRaidTypes; -- // ulMinRaidSetBlocks hard coded to 1MB until available from config page -- karg.Information.ulMinRaidSetBlocks.uLowPart = 2048; -- karg.Information.ulMinRaidSetBlocks.uHighPart = 0; -- karg.Information.ulMaxRaidSetBlocks.uLowPart = 0xffffffff; -- if( ioc->raid_data.pIocPg2->CapabilitiesFlags & -- MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING ) -- karg.Information.ulMaxRaidSetBlocks.uHighPart = 0xffffffff; -- else -- karg.Information.ulMaxRaidSetBlocks.uHighPart = 0; -- karg.Information.uMaxPhysicalDrives = -- ioc->raid_data.pIocPg2->MaxPhysDisks; -- karg.Information.uMaxExtents = 1; -- karg.Information.uMaxModules = 0; -- karg.Information.uMaxTransformationMemory = 0; -- karg.Information.uChangeCount = ioc->csmi_change_count; -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- --csmisas_get_raid_info_out: -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_RAID_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_get_raid_info @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * csmisas_do_raid - Format and Issue a RAID volume request message. -- * @ioc: Pointer to MPT_ADAPTER structure -- * @action: What do be done. -- * @PhysDiskNum: Logical target id. -- * @VolumeBus: Target locations bus. -- * @VolumeId: Volume id -- * -- * Returns: < 0 on a fatal error -- * 0 on success -- * -- * Remark: Wait to return until reply processed by the ISR. -- **/ --static int --csmisas_do_raid(MPT_ADAPTER *ioc, u8 action, u8 PhysDiskNum, u8 VolumeBus, u8 VolumeId, pMpiRaidActionReply_t reply) --{ -- MpiRaidActionRequest_t *pReq; -- MpiRaidActionReply_t *pReply; -- MPT_FRAME_HDR *mf; -- -- /* Get and Populate a free Frame -- */ -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dcsmisasprintk((": no msg frames!\n")); -- return -EAGAIN; -- } -- pReq = (MpiRaidActionRequest_t *)mf; -- pReq->Action = action; -- pReq->Reserved1 = 0; -- pReq->ChainOffset = 0; -- pReq->Function = MPI_FUNCTION_RAID_ACTION; -- pReq->VolumeID = VolumeId; -- pReq->VolumeBus = VolumeBus; -- pReq->PhysDiskNum = PhysDiskNum; -- pReq->MsgFlags = 0; -- pReq->Reserved2 = 0; -- pReq->ActionDataWord = 0; /* Reserved for this action */ -- //pReq->ActionDataSGE = 0; -- -- mpt_add_sge((char *)&pReq->ActionDataSGE, -- MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1); -- -- if (csmisas_send_command_wait(ioc, mf, MPT_IOCTL_DEFAULT_TIMEOUT) != 0) -- return -ENODATA; -- -- if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) && -- (reply != NULL)){ -- pReply = (MpiRaidActionReply_t *)&(ioc->ioctl->ReplyFrame); -- memcpy(reply, pReply, -- min(ioc->reply_sz, -- 4*pReply->MsgLength)); -- } -- -- return 0; --} -- --/** -- * csmisas_raid_inq -- * @ioc = per host instance -- * @opcode = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH or -- * MPI_FUNCTION_SCSI_IO_REQUEST -- * @id = target id -- * @bus = target bus -- * @inq_vpd = inquiry data, returned -- * @inq_vpd_sz = maximum size of inquiry data -- * -- * Return = 0(sucess), non-zero(failure) -- **/ --static int --csmisas_raid_inq(MPT_ADAPTER *ioc, u8 opcode, u8 bus, u8 id, u8 inq_vpd_page, -- u8 * inq_vpd, u32 inq_vpd_sz) --{ -- MPT_FRAME_HDR *mf = NULL; -- MPIHeader_t *mpi_hdr; -- pSCSIIORequest_t pScsiRequest; -- u16 req_idx; -- char *psge; -- u8 inq_vpd_cdb[6]; -- u8 *request_data=NULL; -- dma_addr_t request_data_dma; -- u32 request_data_sz; -- int rc = 0; -- -- request_data_sz = inq_vpd_sz; -- -- /* fill-in cdb */ -- memset(inq_vpd_cdb, 0, sizeof(inq_vpd_cdb)); -- inq_vpd_cdb[0] = 0x12; -- if (inq_vpd_page) { -- inq_vpd_cdb[1] = 0x01; /* evpd bit */ -- inq_vpd_cdb[2] = inq_vpd_page; -- } -- inq_vpd_cdb[3] = (u8)(request_data_sz >> 8); -- inq_vpd_cdb[4] = (u8)request_data_sz; -- -- /* Get a free request frame and save the message context. -- */ -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dcsmisasprintk((": no msg frames!\n")); -- goto csmisas_raid_inq_exit; -- } -- -- mpi_hdr = (MPIHeader_t *) mf; -- pScsiRequest = (pSCSIIORequest_t) mf; -- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -- -- memset(pScsiRequest,0,sizeof(SCSIIORequest_t)); -- pScsiRequest->Function = opcode; -- pScsiRequest->TargetID = id; -- pScsiRequest->Bus = bus; -- pScsiRequest->CDBLength = 6; -- pScsiRequest->DataLength = cpu_to_le32(request_data_sz); -- pScsiRequest->MsgContext = mpi_hdr->MsgContext; -- memcpy(pScsiRequest->CDB,inq_vpd_cdb,pScsiRequest->CDBLength); -- pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ); -- pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_SIMPLEQ); -- pScsiRequest->MsgFlags = mpt_msg_flags(); -- -- /* setup sense -- */ -- pScsiRequest->SenseBufferLength = MPT_SENSE_BUFFER_SIZE; -- pScsiRequest->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma + -- (req_idx * MPT_SENSE_BUFFER_ALLOC)); -- -- request_data = pci_alloc_consistent( -- ioc->pcidev, request_data_sz, &request_data_dma); -- -- if (request_data == NULL) { -- mpt_free_msg_frame(ioc, mf); -- rc=-1; -- goto csmisas_raid_inq_exit; -- } -- -- memset(request_data,0,request_data_sz); -- psge = (char *)&pScsiRequest->SGL; -- mpt_add_sge(psge, (MPT_SGE_FLAGS_SSIMPLE_READ | 0xFC) , -- request_data_dma); -- -- if (csmisas_send_command_wait(ioc, mf, MPT_IOCTL_DEFAULT_TIMEOUT) != 0) { -- rc=-1; -- goto csmisas_raid_inq_exit; -- } -- -- /* copy the request_data */ -- memcpy(inq_vpd, request_data, request_data_sz); -- -- csmisas_raid_inq_exit: -- -- if (request_data) -- pci_free_consistent(ioc->pcidev, request_data_sz, -- request_data, request_data_dma); -- -- return rc; --} -- --/** -- * Prototype Routine for the CSMI SAS Get RAID Config command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_raid_config(unsigned long arg) --{ -- CSMI_SAS_RAID_CONFIG_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_RAID_CONFIG_BUFFER karg,*pKarg=NULL; -- CONFIGPARMS cfg; -- ConfigPageHeader_t header; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- u8 volumeID, VolumeBus; -- u8 physDiskNum, physDiskNumMax; -- int volumepage0sz = 0; -- int physdiskpage0sz = 0, ioc_page5_sz = 0; -- dma_addr_t volume0_dma, physdisk0_dma; -- dma_addr_t ioc_page5_dma = 0; -- pRaidVolumePage0_t pVolume0 = NULL; -- pRaidPhysDiskPage0_t pPhysDisk0 = NULL; -- pMpiRaidActionReply_t pRaidActionReply = NULL; -- u32 device_info = 0; -- pIOCPage5_t pIocPage5 = NULL; -- int i, idx, csmi_sas_raid_config_buffer_sz; -- int memory_pages; -- int copy_buffer_sz = 0; -- u64 totalMaxLBA, tmpTotalMaxLBA; -- u64 sas_address; -- struct sas_device_info *sas_info; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmisas_get_raid_config struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- csmi_sas_raid_config_buffer_sz = karg.IoctlHeader.Length; -- memory_pages = get_order(csmi_sas_raid_config_buffer_sz); -- pKarg = (CSMI_SAS_RAID_CONFIG_BUFFER *)__get_free_pages( -- GFP_KERNEL, memory_pages); -- if (!pKarg){ -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to malloc RAID_CONFIG_BUFFER " -- "csmi_sas_raid_config_buffer_sz=%d memory_pages=%d\n", -- __FILE__, __LINE__, __FUNCTION__, -- csmi_sas_raid_config_buffer_sz, memory_pages); -- return -ENOMEM; -- } -- memset(pKarg, 0, sizeof(*pKarg)); -- -- if (copy_from_user(pKarg, uarg, csmi_sas_raid_config_buffer_sz)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmisas_get_raid_config struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)pKarg, memory_pages); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)pKarg, memory_pages); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)pKarg, memory_pages); -- return -ENODEV; -- } -- -- if (pKarg->Configuration.uChangeCount != 0 && -- pKarg->Configuration.uChangeCount != ioc->csmi_change_count ) { -- pKarg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- pKarg->Configuration.uFailureCode = -- CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID; -- goto cim_get_raid_config_exit; -- } -- -- if (!ioc->raid_data.pIocPg2) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- -- /* -- * Check to see if the input uRaidSetIndex is -- * greater than the number of RAID sets -- */ -- if (pKarg->Configuration.uRaidSetIndex >= -- ioc->raid_data.pIocPg2->NumActiveVolumes) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_RAID_SET_OUT_OF_RANGE; -- goto cim_get_raid_config_exit; -- } -- -- /* -- * get RAID Volume Page 0 -- */ -- volumeID = ioc->raid_data.pIocPg2->RaidVolume[pKarg->Configuration.uRaidSetIndex].VolumeID; -- VolumeBus = ioc->raid_data.pIocPg2->RaidVolume[pKarg->Configuration.uRaidSetIndex].VolumeBus; -- -- header.PageVersion = 0; -- header.PageLength = 0; -- header.PageNumber = 0; -- header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; -- cfg.cfghdr.hdr = &header; -- cfg.physAddr = -1; -- cfg.pageAddr = (VolumeBus << 8) + volumeID; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- if (mpt_config(ioc, &cfg) != 0) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- -- if (header.PageLength == 0) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- -- volumepage0sz = header.PageLength * 4; -- pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz, -- &volume0_dma); -- if (!pVolume0) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.physAddr = volume0_dma; -- if (mpt_config(ioc, &cfg) != 0) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- -- totalMaxLBA = (u64)le32_to_cpu(pVolume0->MaxLBA) | -- ((u64)le32_to_cpu(pVolume0->MaxLBAHigh)) << 32; -- tmpTotalMaxLBA = totalMaxLBA + 1; -- do_div(tmpTotalMaxLBA, 2048); -- pKarg->Configuration.uCapacity = tmpTotalMaxLBA; -- pKarg->Configuration.uStripeSize = -- le32_to_cpu(pVolume0->StripeSize)/2; -- -- switch(pVolume0->VolumeType) { -- case MPI_RAID_VOL_TYPE_IS: -- pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_0; -- break; -- case MPI_RAID_VOL_TYPE_IME: -- pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_10; -- break; -- case MPI_RAID_VOL_TYPE_IM: -- pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_1; -- break; -- default: -- pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_OTHER; -- break; -- } -- -- switch (pVolume0->VolumeStatus.State) { -- case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL: -- pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_OK; -- break; -- case MPI_RAIDVOL0_STATUS_STATE_DEGRADED: -- /* Volume is degraded, check if Resyncing or Inactive */ -- pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_DEGRADED; -- break; -- case MPI_RAIDVOL0_STATUS_STATE_FAILED: -- pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_FAILED; -- break; -- } -- -- /* check flags */ -- if (pVolume0->VolumeStatus.Flags & -- MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE) -- pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_OFFLINE; -- else if (pVolume0->VolumeStatus.Flags & -- MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS) -- pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_REBUILDING; -- -- pKarg->Configuration.bInformation = 0; /* default */ -- if(pVolume0->VolumeStatus.Flags & -- MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS ) { -- -- uint64_t * ptrUint64; -- uint64_t totalBlocks64, blocksRemaining64; -- uint32_t totalBlocks32, blocksRemaining32; -- -- /* get percentage complete */ -- pRaidActionReply = kmalloc( sizeof(MPI_RAID_VOL_INDICATOR) + -- offsetof(MSG_RAID_ACTION_REPLY,ActionData), -- GFP_KERNEL); -- -- if (!pRaidActionReply){ -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to malloc @ %p\n", -- __FILE__, __LINE__, __FUNCTION__,pKarg); -- goto cim_get_raid_config_exit; -- } -- memset(pRaidActionReply, 0, sizeof(*pRaidActionReply)); -- -- csmisas_do_raid(ioc, -- MPI_RAID_ACTION_INDICATOR_STRUCT, -- 0, VolumeBus, volumeID, pRaidActionReply); -- -- ptrUint64 = (uint64_t *)&pRaidActionReply->ActionData; -- totalBlocks64 = *ptrUint64; -- ptrUint64++; -- blocksRemaining64 = *ptrUint64; -- while(totalBlocks64 > 0xFFFFFFFFUL){ -- totalBlocks64 = totalBlocks64 >> 1; -- blocksRemaining64 = blocksRemaining64 >> 1; -- } -- totalBlocks32 = (uint32_t)totalBlocks64; -- blocksRemaining32 = (uint32_t)blocksRemaining64; -- -- if(totalBlocks32) -- pKarg->Configuration.bInformation = -- (totalBlocks32 - blocksRemaining32) / -- (totalBlocks32 / 100); -- -- kfree(pRaidActionReply); -- } -- -- /* fill-in more information depending on data type */ -- if (pKarg->Configuration.bDataType == -- CSMI_SAS_RAID_DATA_ADDITIONAL_DATA) { -- pKarg->Configuration.Data->bLabel[0] = '\0'; -- pKarg->Configuration.Data->bRaidSetLun[1] = 0; -- pKarg->Configuration.Data->bWriteProtection = -- CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN; -- pKarg->Configuration.Data->bCacheSetting = -- CSMI_SAS_RAID_SET_CACHE_UNKNOWN; -- pKarg->Configuration.Data->bCacheRatio = 0; -- pKarg->Configuration.Data->usBlockSize = 512; -- pKarg->Configuration.Data->ulRaidSetExtentOffset.uLowPart = 0; -- pKarg->Configuration.Data->ulRaidSetExtentOffset.uHighPart = 0; -- pKarg->Configuration.Data->ulRaidSetBlocks.uLowPart = -- le32_to_cpu(pVolume0->MaxLBA); -- pKarg->Configuration.Data->ulRaidSetBlocks.uHighPart = -- le32_to_cpu(pVolume0->MaxLBAHigh); -- if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS || -- pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IME ) { -- pKarg->Configuration.Data->uStripeSizeInBlocks = -- le32_to_cpu(pVolume0->StripeSize); -- } else { -- pKarg->Configuration.Data->uStripeSizeInBlocks = 0; -- } -- pKarg->Configuration.Data->uSectorsPerTrack = 128; -- for (i=0; i<16; i++) { -- // unsupported -- pKarg->Configuration.Data->bApplicationScratchPad[i] = -- 0xFF; -- } -- pKarg->Configuration.Data->uNumberOfHeads = 16; -- -- tmpTotalMaxLBA = totalMaxLBA; -- do_div(tmpTotalMaxLBA, -- (pKarg->Configuration.Data->uNumberOfHeads * -- pKarg->Configuration.Data->uSectorsPerTrack)); -- pKarg->Configuration.Data->uNumberOfTracks = tmpTotalMaxLBA; -- pKarg->Configuration.bDriveCount = 1; -- } else if ( pKarg->Configuration.bDataType == -- CSMI_SAS_RAID_DATA_DEVICE_ID ) { -- /* Send inquiry to get VPD Page 0x83 */ -- u32 vpd_page_sz; -- vpd_page_sz = csmi_sas_raid_config_buffer_sz - -- offsetof(CSMI_SAS_RAID_CONFIG,DeviceId); -- if (csmisas_raid_inq(ioc, MPI_FUNCTION_SCSI_IO_REQUEST, -- VolumeBus, volumeID, 0x83, -- (u8*)&pKarg->Configuration.DeviceId->bDeviceIdentificationVPDPage, -- vpd_page_sz) != 0) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- pKarg->Configuration.bDriveCount = 1; -- } -- -- if (pKarg->Configuration.bDataType != CSMI_SAS_RAID_DATA_DRIVES) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- goto cim_get_raid_config_exit; -- } -- -- /* suppress drive information */ -- if (pKarg->Configuration.bDriveCount == -- CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- goto cim_get_raid_config_exit; -- } -- -- /* get hotspare info, used later in this function */ -- if (pVolume0->VolumeSettings.HotSparePool) { -- /* Read and save IOC Page 5 -- */ -- header.PageVersion = 0; -- header.PageLength = 0; -- header.PageNumber = 5; -- header.PageType = MPI_CONFIG_PAGETYPE_IOC; -- cfg.cfghdr.hdr = &header; -- cfg.physAddr = -1; -- cfg.pageAddr = 0; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- if ((mpt_config(ioc, &cfg) == 0) && (header.PageLength)) { -- ioc_page5_sz = header.PageLength * 4; -- pIocPage5 = pci_alloc_consistent(ioc->pcidev, -- ioc_page5_sz, -- &ioc_page5_dma); -- memset(pIocPage5,0,ioc_page5_sz); -- if (ioc_page5_dma) { -- cfg.physAddr = ioc_page5_dma; -- cfg.action = -- MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- mpt_config(ioc, &cfg); -- } -- } -- } -- -- /* -- * get RAID Physical Disk Page 0 -- */ -- header.PageVersion = 0; -- header.PageLength = 0; -- header.PageNumber = 0; -- header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK; -- cfg.cfghdr.hdr = &header; -- cfg.physAddr = -1; -- cfg.pageAddr = 0; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- if (mpt_config(ioc, &cfg) != 0) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- -- if (header.PageLength == 0) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- -- physdiskpage0sz = header.PageLength * 4; -- pPhysDisk0 = pci_alloc_consistent(ioc->pcidev, physdiskpage0sz, -- &physdisk0_dma); -- if (!pPhysDisk0) { -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- cfg.physAddr = physdisk0_dma; -- -- physDiskNumMax = (csmi_sas_raid_config_buffer_sz - -- offsetof(CSMI_SAS_RAID_CONFIG,Drives)) -- / sizeof(CSMI_SAS_RAID_DRIVES); -- -- pKarg->Configuration.bDriveCount=0; -- -- tmpTotalMaxLBA = totalMaxLBA; -- if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS) { -- do_div(tmpTotalMaxLBA, pVolume0->NumPhysDisks); -- dcsmisasprintk(("IS Volume tmpTotalMaxLBA=%llX\n", -- (unsigned long long)tmpTotalMaxLBA)); -- } -- else if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IME) { -- do_div(tmpTotalMaxLBA, pVolume0->NumPhysDisks * 2); -- dcsmisasprintk(("IME Volume tmpTotalMaxLBA=%llX\n", -- (unsigned long long)tmpTotalMaxLBA)); -- } else { -- dcsmisasprintk(("IM Volume tmpTotalMaxLBA=%llX\n", -- (unsigned long long)tmpTotalMaxLBA)); -- } -- -- for (i=0; i< min(pVolume0->NumPhysDisks, physDiskNumMax); i++) { -- -- physDiskNum = pVolume0->PhysDisk[i].PhysDiskNum; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.pageAddr = physDiskNum; -- if (mpt_config(ioc, &cfg) != 0){ -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_raid_config_exit; -- } -- -- /* Search the list for the matching SAS address. */ -- sas_info = csmisas_get_device_component_by_fw(ioc, pPhysDisk0->PhysDiskBus, -- pPhysDisk0->PhysDiskID); -- -- if (!sas_info) -- continue; -- -- sas_address = reverse_byte_order64(sas_info->sas_address); -- memcpy(pKarg->Configuration.Drives[i].bSASAddress, -- &sas_address,sizeof(u64)); -- if (!device_info) -- device_info = sas_info->device_info; -- -- memcpy(pKarg->Configuration.Drives[i].bModel, -- pPhysDisk0->InquiryData.VendorID, -- offsetof(RAID_PHYS_DISK0_INQUIRY_DATA,ProductRevLevel)); -- memcpy(pKarg->Configuration.Drives[i].bFirmware, -- pPhysDisk0->InquiryData.ProductRevLevel, -- sizeof(pPhysDisk0->InquiryData.ProductRevLevel)); -- if (csmisas_is_sata(pPhysDisk0)) { -- memcpy(&pKarg->Configuration.Drives[i].bSerialNumber, -- &pPhysDisk0->ExtDiskIdentifier[4], -- 4); -- memcpy(&pKarg->Configuration.Drives[i].bSerialNumber[4], -- &pPhysDisk0->DiskIdentifier, -- sizeof(pPhysDisk0->DiskIdentifier)); -- } else { -- memcpy(pKarg->Configuration.Drives[i].bSerialNumber, -- pPhysDisk0->DiskIdentifier, -- sizeof(pPhysDisk0->DiskIdentifier)); -- } -- -- pKarg->Configuration.Drives[i].bDriveUsage = -- (pPhysDisk0->PhysDiskStatus.Flags & -- MPI_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME) ? -- CSMI_SAS_DRIVE_CONFIG_NOT_USED : -- CSMI_SAS_DRIVE_CONFIG_MEMBER; -- -- pKarg->Configuration.Drives[i].bDriveStatus = -- CSMI_SAS_DRIVE_STATUS_OK; -- if (pPhysDisk0->PhysDiskStatus.State == -- MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED) { -- pKarg->Configuration.Drives[i].bDriveStatus = -- CSMI_SAS_DRIVE_STATUS_OFFLINE; -- } else if(pPhysDisk0->PhysDiskStatus.State) { -- pKarg->Configuration.Drives[i].bDriveStatus = -- CSMI_SAS_DRIVE_STATUS_FAILED; -- if(pKarg->Configuration.bStatus == -- CSMI_SAS_RAID_SET_STATUS_DEGRADED) -- pKarg->Configuration.bInformation = i; -- } else if((pVolume0->VolumeStatus.Flags & -- MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS) && -- (pPhysDisk0->PhysDiskStatus.Flags & -- MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC)) -- pKarg->Configuration.Drives[i].bDriveStatus = -- CSMI_SAS_DRIVE_STATUS_REBUILDING; -- else if(pPhysDisk0->ErrorData.SmartCount || -- (pPhysDisk0->PhysDiskStatus.Flags & -- MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC)) -- pKarg->Configuration.Drives[i].bDriveStatus = -- CSMI_SAS_DRIVE_STATUS_DEGRADED; -- -- memset(pKarg->Configuration.Drives[i].bSASLun, -- 0, sizeof(pKarg->Configuration.Drives[i].bSASLun)); -- if (csmisas_is_sata(pPhysDisk0)) { -- pKarg->Configuration.Drives[i].bDriveType = -- CSMI_SAS_DRIVE_TYPE_SATA; -- } else { /* drive in a volume can only be SAS/SATA */ -- pKarg->Configuration.Drives[i].bDriveType = -- CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS; -- } -- -- pKarg->Configuration.Drives[i].usBlockSize = 512; -- pKarg->Configuration.Drives[i].uDriveIndex = -- pPhysDisk0->PhysDiskNum; -- pKarg->Configuration.Drives[i].ulTotalUserBlocks.uLowPart = -- (u32)tmpTotalMaxLBA; -- pKarg->Configuration.Drives[i].ulTotalUserBlocks.uHighPart = -- (u32)(tmpTotalMaxLBA >> 32); -- pKarg->Configuration.bDriveCount++; -- } -- -- /* adding hot spare info at the end */ -- if ((pVolume0->VolumeSettings.HotSparePool) && (pIocPage5) && -- (pVolume0->VolumeType != MPI_RAID_VOL_TYPE_IS)) { -- for (idx = 0, i = pVolume0->NumPhysDisks ; -- idx < pIocPage5->NumHotSpares ; idx++) { -- if (i >= physDiskNumMax) -- break; -- if ((pVolume0->VolumeSettings.HotSparePool & -- pIocPage5->HotSpare[idx].HotSparePool) == 0) -- continue; -- if(pIocPage5->HotSpare[idx].Flags != -- MPI_IOC_PAGE_5_HOT_SPARE_ACTIVE) -- continue; -- physDiskNum = pIocPage5->HotSpare[idx].PhysDiskNum; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.pageAddr = physDiskNum; -- if (mpt_config(ioc, &cfg) != 0) -- continue; -- -- /* Search the list for the matching SAS address. */ -- sas_info = csmisas_get_device_component_by_fw(ioc, -- pPhysDisk0->PhysDiskBus, pPhysDisk0->PhysDiskID); -- -- if (!sas_info) -- continue; -- -- sas_address = reverse_byte_order64(sas_info->sas_address); -- memcpy(pKarg->Configuration.Drives[i].bSASAddress, -- &sas_address,sizeof(u64)); -- -- /* don't mix SSP hot spare -- * in SATA volume -- */ -- if (!csmisas_is_sata(pPhysDisk0) && -- (device_info & -- MPI_SAS_DEVICE_INFO_SATA_DEVICE)) -- continue; -- -- /* don't mix SATA hot spare -- * in SSP volume -- */ -- if (csmisas_is_sata(pPhysDisk0) && -- (device_info & -- MPI_SAS_DEVICE_INFO_SSP_TARGET)) -- continue; -- -- /* capacity check for IM volumes*/ -- if ((pVolume0->VolumeType == -- MPI_RAID_VOL_TYPE_IM) && -- (totalMaxLBA + -- (64*2*1024) /* metadata = 64MB*/ > -- le32_to_cpu(pPhysDisk0->MaxLBA))) -- continue; -- -- tmpTotalMaxLBA = totalMaxLBA; -- do_div(tmpTotalMaxLBA, pVolume0->NumPhysDisks); -- /* capacity check for IME volumes*/ -- if ((pVolume0->VolumeType == -- MPI_RAID_VOL_TYPE_IME) && -- ((tmpTotalMaxLBA * 2) + -- (64*2*1024 ) /*metadata = 64MB*/ > -- le32_to_cpu(pPhysDisk0->MaxLBA))) -- break; -- -- /* capacity check for IME volumes*/ -- if ((pVolume0->VolumeType == -- MPI_RAID_VOL_TYPE_IME) && -- (((totalMaxLBA + -- pVolume0->NumPhysDisks) * 2) + -- (64*2*1024 ) /*metadata = 64MB*/ > -- le32_to_cpu(pPhysDisk0->MaxLBA))) -- continue; -- -- memcpy(pKarg->Configuration.Drives[i].bModel, -- pPhysDisk0->InquiryData.VendorID, -- offsetof(RAID_PHYS_DISK0_INQUIRY_DATA,ProductRevLevel)); -- memcpy(pKarg->Configuration.Drives[i].bFirmware, -- pPhysDisk0->InquiryData.ProductRevLevel, -- sizeof(pPhysDisk0->InquiryData.ProductRevLevel)); -- if (csmisas_is_sata(pPhysDisk0)) { -- memcpy(&pKarg->Configuration.Drives[i].bSerialNumber, -- &pPhysDisk0->ExtDiskIdentifier[4], -- 4); -- memcpy(&pKarg->Configuration.Drives[i].bSerialNumber[4], -- &pPhysDisk0->DiskIdentifier, -- sizeof(pPhysDisk0->DiskIdentifier)); -- } else { -- memcpy(pKarg->Configuration.Drives[i].bSerialNumber, -- pPhysDisk0->DiskIdentifier, -- sizeof(pPhysDisk0->DiskIdentifier)); -- } -- pKarg->Configuration.Drives[i].bDriveStatus = -- CSMI_SAS_DRIVE_STATUS_OK; -- if(pPhysDisk0->PhysDiskStatus.State) -- pKarg->Configuration.Drives[i].bDriveStatus = -- CSMI_SAS_DRIVE_STATUS_FAILED; -- else if(pPhysDisk0->ErrorData.SmartCount) -- pKarg->Configuration.Drives[i].bDriveStatus = -- CSMI_SAS_DRIVE_STATUS_DEGRADED; -- pKarg->Configuration.Drives[i].bDriveUsage = -- CSMI_SAS_DRIVE_CONFIG_SPARE; -- pKarg->Configuration.Drives[i].usBlockSize = 512; -- pKarg->Configuration.Drives[i].uDriveIndex = -- pPhysDisk0->PhysDiskNum; -- if (csmisas_is_sata(pPhysDisk0)) { -- pKarg->Configuration.Drives[i].bDriveType = -- CSMI_SAS_DRIVE_TYPE_SATA; -- } else { /* drive in a volume can only be SAS/SATA */ -- pKarg->Configuration.Drives[i].bDriveType = -- CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS; -- } -- -- i++; -- pKarg->Configuration.bDriveCount++; -- } -- } -- -- // Only return data on the first 240 drives -- if( pKarg->Configuration.bDriveCount > 0xF0 ) -- pKarg->Configuration.bDriveCount = -- CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG; -- -- pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- cim_get_raid_config_exit: -- -- if (pVolume0 != NULL) -- pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0, -- volume0_dma); -- -- if(pPhysDisk0 != NULL) -- pci_free_consistent(ioc->pcidev, physdiskpage0sz, pPhysDisk0, -- physdisk0_dma); -- -- if(pIocPage5 != NULL) -- pci_free_consistent(ioc->pcidev, ioc_page5_sz, pIocPage5, -- ioc_page5_dma); -- -- /* Copy the data from kernel memory to user memory -- */ -- -- /* find the buffer size to copy depending on how much is filled-in */ -- switch (pKarg->Configuration.bDataType) { -- case CSMI_SAS_RAID_DATA_ADDITIONAL_DATA: -- copy_buffer_sz = sizeof(IOCTL_HEADER) + -- offsetof(CSMI_SAS_RAID_CONFIG,Data) + -- sizeof(CSMI_SAS_RAID_SET_ADDITIONAL_DATA); -- break; -- case CSMI_SAS_RAID_DATA_DRIVES: -- if (pKarg->Configuration.bDriveCount == -- CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED) -- copy_buffer_sz = sizeof(IOCTL_HEADER) + -- offsetof(CSMI_SAS_RAID_CONFIG,Drives); -- else -- copy_buffer_sz = sizeof(IOCTL_HEADER) + -- offsetof(CSMI_SAS_RAID_CONFIG,Drives) + -- (pKarg->Configuration.bDriveCount * -- sizeof(CSMI_SAS_RAID_DRIVES)); -- break; -- case CSMI_SAS_RAID_DATA_DEVICE_ID: -- copy_buffer_sz = csmi_sas_raid_config_buffer_sz; -- break; -- } -- -- if (copy_to_user((char *)arg, pKarg, copy_buffer_sz)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_get_raid_config @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)pKarg, memory_pages); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- free_pages((unsigned long)pKarg, memory_pages); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI SAS Get RAID Features command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_raid_features(unsigned long arg) --{ -- CSMI_SAS_RAID_FEATURES_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_RAID_FEATURES_BUFFER karg, *pKarg=NULL; -- int csmi_sas_raid_features_buffer_sz, iocnum; -- int memory_pages; -- MPT_ADAPTER *ioc = NULL; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_get_raid_features struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- csmi_sas_raid_features_buffer_sz = karg.IoctlHeader.Length; -- memory_pages = get_order(csmi_sas_raid_features_buffer_sz); -- pKarg = (CSMI_SAS_RAID_FEATURES_BUFFER *)__get_free_pages( -- GFP_KERNEL, memory_pages); -- if (!pKarg){ -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to malloc RAID_FEATURES_BUFFER " -- "csmi_sas_raid_features_buffer_sz=%d memory_pages=%d\n", -- __FILE__, __LINE__, __FUNCTION__, -- csmi_sas_raid_features_buffer_sz, memory_pages); -- return -ENOMEM; -- } -- memset(pKarg, 0, sizeof(*pKarg)); -- -- if (copy_from_user(pKarg, uarg, csmi_sas_raid_features_buffer_sz)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_get_raid_features struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)pKarg, memory_pages); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)pKarg, memory_pages); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)pKarg, memory_pages); -- return -ENODEV; -- } -- -- if (pKarg->Information.uChangeCount != 0 && -- pKarg->Information.uChangeCount != ioc->csmi_change_count ) { -- pKarg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- pKarg->Information.uFailureCode = -- CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID; -- goto cim_get_raid_features_exit; -- } -- -- pKarg->Information.uFeatures = CSMI_SAS_RAID_FEATURE_REBUILD | -- CSMI_SAS_RAID_FEATURE_SURFACE_SCAN | -- CSMI_SAS_RAID_FEATURE_SPARES_SHARED; -- pKarg->Information.bDefaultTransformPriority = -- CSMI_SAS_PRIORITY_UNKNOWN; -- pKarg->Information.bTransformPriority = CSMI_SAS_PRIORITY_UNKNOWN; -- pKarg->Information.bDefaultRebuildPriority = CSMI_SAS_PRIORITY_UNKNOWN; -- pKarg->Information.bRebuildPriority = -- pKarg->Information.bDefaultRebuildPriority; -- pKarg->Information.bDefaultSurfaceScanPriority = -- CSMI_SAS_PRIORITY_UNKNOWN; -- pKarg->Information.bSurfaceScanPriority = CSMI_SAS_PRIORITY_UNKNOWN; -- pKarg->Information.uRaidSetTransformationRules = 0; -- -- /* IS */ -- pKarg->Information.RaidType[0].bRaidType = CSMI_SAS_RAID_TYPE_0; -- pKarg->Information.RaidType[0].uSupportedStripeSizeMap = 0x80; -- -- /* IM */ -- pKarg->Information.RaidType[1].bRaidType = CSMI_SAS_RAID_TYPE_1; -- pKarg->Information.RaidType[1].uSupportedStripeSizeMap = 0; -- -- /* IME */ -- pKarg->Information.RaidType[2].bRaidType = CSMI_SAS_RAID_TYPE_1E; -- pKarg->Information.RaidType[2].uSupportedStripeSizeMap = 0x80; -- -- pKarg->Information.RaidType[3].bRaidType = CSMI_SAS_RAID_TYPE_END; -- pKarg->Information.bCacheRatiosSupported[0] = -- CSMI_SAS_RAID_CACHE_RATIO_END; -- -- cim_get_raid_features_exit: -- -- /* -- * Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, pKarg, -- sizeof(CSMI_SAS_RAID_FEATURES_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_get_raid_features @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)pKarg, memory_pages); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- free_pages((unsigned long)pKarg, memory_pages); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI SAS Set RAID Control command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_set_raid_control(unsigned long arg) --{ -- CSMI_SAS_RAID_CONTROL_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_RAID_CONTROL_BUFFER karg, *pKarg=NULL; -- int csmi_sas_raid_control_buffer_sz, iocnum; -- int memory_pages; -- MPT_ADAPTER *ioc = NULL; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_set_raid_control struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- csmi_sas_raid_control_buffer_sz = karg.IoctlHeader.Length; -- memory_pages = get_order(csmi_sas_raid_control_buffer_sz); -- pKarg = (CSMI_SAS_RAID_CONTROL_BUFFER *)__get_free_pages( -- GFP_KERNEL, memory_pages); -- if (!pKarg){ -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to malloc RAID_CONTROL_BUFFER " -- "csmi_sas_raid_control_buffer_sz=%d memory_pages=%d\n", -- __FILE__, __LINE__, __FUNCTION__, -- csmi_sas_raid_control_buffer_sz, memory_pages); -- return -ENOMEM; -- } -- memset(pKarg, 0, sizeof(*pKarg)); -- -- if (copy_from_user(pKarg, uarg, csmi_sas_raid_control_buffer_sz)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_set_raid_control struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)pKarg, memory_pages); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)pKarg, memory_pages); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)pKarg, memory_pages); -- return -ENODEV; -- } -- -- if (pKarg->Information.uChangeCount != 0 && -- pKarg->Information.uChangeCount != ioc->csmi_change_count ) { -- pKarg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- pKarg->Information.uFailureCode = -- CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID; -- goto cim_set_raid_control_exit; -- } -- -- if (pKarg->Information.bTransformPriority != -- CSMI_SAS_PRIORITY_UNCHANGED) { -- pKarg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- pKarg->Information.uFailureCode = -- CSMI_SAS_FAIL_CODE_TRANSFORM_PRIORITY_INVALID; -- goto cim_set_raid_control_exit; -- } -- -- if (pKarg->Information.bRebuildPriority != -- CSMI_SAS_PRIORITY_AUTO && -- pKarg->Information.bRebuildPriority != -- CSMI_SAS_PRIORITY_UNCHANGED) { -- pKarg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- pKarg->Information.uFailureCode = -- CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID; -- goto cim_set_raid_control_exit; -- } -- -- if (pKarg->Information.bCacheRatioFlag == -- CSMI_SAS_RAID_CACHE_RATIO_DISABLE) { -- pKarg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- pKarg->Information.uFailureCode = -- CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID; -- goto cim_set_raid_control_exit; -- } -- -- if( !strcmp(pKarg->Information.bClearConfiguration, -- CSMI_SAS_RAID_CLEAR_CONFIGURATION_SIGNATURE) ) { -- pKarg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- pKarg->Information.uFailureCode = -- CSMI_SAS_FAIL_CODE_CLEAR_CONFIGURATION_INVALID; -- goto cim_set_raid_control_exit; -- } -- -- pKarg->Information.bFailureDescription[0] = '\0'; -- -- cim_set_raid_control_exit: -- -- /* -- * Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, pKarg, -- sizeof(CSMI_SAS_RAID_CONTROL_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_set_raid_control @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)pKarg, memory_pages); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- free_pages((unsigned long)pKarg, memory_pages); -- return 0; --} -- --/** -- * Prototype Routine for the CSMI SAS Get Raid Element. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_raid_element(unsigned long arg) --{ -- CSMI_SAS_RAID_ELEMENT_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_RAID_ELEMENT_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_RAID_ELEMENT_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmisas_get_raid_element struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- --/* TODO - implement IOCTL here */ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_BAD_CNTL_CODE; -- dcsmisasprintk((": not implemented\n")); -- --// csmisas_get_raid_element_exit: -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_RAID_ELEMENT_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmisas_get_raid_element @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; -- --} -- --/** -- * Prototype Routine for the CSMI SAS Set Raid Operation -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_set_raid_operation(unsigned long arg) --{ -- CSMI_SAS_RAID_SET_OPERATION_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_RAID_SET_OPERATION_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_RAID_SET_OPERATION_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_set_raid_operation struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- --/* TODO - implement IOCTL here */ -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_BAD_CNTL_CODE; -- dcsmisasprintk((": not implemented\n")); -- --// cim_set_raid_operation: -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_RAID_SET_OPERATION_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_set_raid_operation @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; -- --} -- -- --/** -- * Prototype Routine for the CSMI SAS Task Managment Config command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_task_managment(unsigned long arg) --{ -- CSMI_SAS_SSP_TASK_IU_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_SSP_TASK_IU_BUFFER karg; -- pSCSITaskMgmt_t pScsiTm; -- pSCSITaskMgmtReply_t pScsiTmReply; -- MPT_ADAPTER *ioc = NULL; -- MPT_SCSI_HOST *hd; -- MPT_FRAME_HDR *mf = NULL; -- MPIHeader_t *mpi_hdr; -- int iocnum; -- u8 taskType; -- u8 channel; -- u8 id; -- u8 queueTag; -- u32 msgContext = 0; -- int i; -- u8 found_qtag; -- struct sas_device_info *sas_info; -- u16 ioc_status; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SSP_TASK_IU_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_task_managment struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -- -- sas_info = csmisas_get_device_component_by_os(ioc, -- karg.Parameters.bPathId, karg.Parameters.bTargetId); -- if (!sas_info || sas_info->is_cached || sas_info->is_logical_volume) -- goto cim_get_task_managment_exit; -- -- channel = sas_info->fw.channel; -- id = sas_info->fw.id; -- queueTag = (u8)karg.Parameters.uQueueTag & 0xFF; -- hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; -- -- /* try to catch an error -- */ -- if ((karg.Parameters.uFlags & CSMI_SAS_TASK_IU) && -- (karg.Parameters.uFlags & CSMI_SAS_HARD_RESET_SEQUENCE)) -- goto cim_get_task_managment_exit; -- -- if (karg.Parameters.uFlags & CSMI_SAS_TASK_IU) { -- switch (karg.Parameters.bTaskManagementFunction) { -- -- case CSMI_SAS_SSP_ABORT_TASK: -- taskType = MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK; -- break; -- case CSMI_SAS_SSP_ABORT_TASK_SET: -- taskType = MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET; -- break; -- case CSMI_SAS_SSP_CLEAR_TASK_SET: -- taskType = MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET; -- break; -- case CSMI_SAS_SSP_LOGICAL_UNIT_RESET: -- taskType = MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET; -- break; -- case CSMI_SAS_SSP_CLEAR_ACA: -- case CSMI_SAS_SSP_QUERY_TASK: -- default: -- goto cim_get_task_managment_exit; -- } -- } else if (karg.Parameters.uFlags & CSMI_SAS_HARD_RESET_SEQUENCE) -- taskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET; -- else -- goto cim_get_task_managment_exit; -- -- switch (karg.Parameters.uInformation) { -- case CSMI_SAS_SSP_TEST: -- dcsmisasprintk(("TM request for test purposes\n")); -- break; -- case CSMI_SAS_SSP_EXCEEDED: -- dcsmisasprintk(("TM request due to timeout\n")); -- break; -- case CSMI_SAS_SSP_DEMAND: -- dcsmisasprintk(("TM request demanded by app\n")); -- break; -- case CSMI_SAS_SSP_TRIGGER: -- dcsmisasprintk(("TM request sent to trigger event\n")); -- break; -- } -- -- switch (taskType) { -- -- case MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK: -- /* -- * look up qtag in the ScsiLookup[] table -- */ -- for (i = 0, found_qtag = 0; i < hd->ioc->req_depth; i++) { --#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)) -- if ((hd->ScsiLookup[i]) && -- (hd->ScsiLookup[i]->tag == queueTag)) { --#else -- if ((ioc->ScsiLookup[i]) && -- (ioc->ScsiLookup[i]->tag == queueTag)) { --#endif -- mf = MPT_INDEX_2_MFPTR(hd->ioc, i); -- msgContext = -- mf->u.frame.hwhdr.msgctxu.MsgContext; -- found_qtag=1; -- break; -- } -- } -- -- if(!found_qtag) -- goto cim_get_task_managment_exit; -- -- case MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET: -- case MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET: -- case MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET: -- /* for now, this should work -- */ -- case MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET: -- -- /* Single threading .... -- */ --#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)) -- if (mptctl_set_tm_flags(hd) != 0) { -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_FAILED; -- goto cim_get_task_managment_exit; -- } --#endif -- -- /* Send request -- */ -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dcsmisasprintk((": no msg frames!\n")); --#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)) -- mptctl_free_tm_flags(ioc); --#endif -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_task_managment_exit; -- } -- -- mpi_hdr = (MPIHeader_t *) mf; -- pScsiTm = (pSCSITaskMgmt_t ) mf; -- -- memset(pScsiTm,0,sizeof(SCSITaskMgmt_t)); -- pScsiTm->TaskType = taskType; -- pScsiTm->Bus = channel; -- pScsiTm->TargetID = id; --#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)) -- int_to_scsilun(karg.Parameters.bLun, -- (struct scsi_lun *)pScsiTm->LUN); --#else -- pScsiTm->LUN[1] = karg.Parameters.bLun; --#endif -- pScsiTm->MsgContext = mpi_hdr->MsgContext; -- pScsiTm->TaskMsgContext = msgContext; -- pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT; -- -- if (csmisas_send_handshake_wait(ioc, mf, -- karg.IoctlHeader.Timeout) != 0) { -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_get_task_managment_exit; -- } -- -- if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) { -- -- pScsiTmReply = -- (pSCSITaskMgmtReply_t ) ioc->ioctl->ReplyFrame; -- -- ioc_status = le16_to_cpu(pScsiTmReply->IOCStatus) -- & MPI_IOCSTATUS_MASK; -- -- memset(&karg.Status,0, -- sizeof(CSMI_SAS_SSP_PASSTHRU_STATUS)); -- -- if(ioc_status == MPI_IOCSTATUS_SUCCESS) { -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_SUCCESS; -- karg.Status.bSSPStatus = -- CSMI_SAS_SSP_STATUS_COMPLETED; -- }else if(ioc_status == MPI_IOCSTATUS_INSUFFICIENT_RESOURCES) { -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_SUCCESS; -- karg.Status.bSSPStatus = -- CSMI_SAS_SSP_STATUS_RETRY; -- }else { -- karg.IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_FAILED; -- karg.Status.bSSPStatus = -- CSMI_SAS_SSP_STATUS_FATAL_ERROR; -- } -- } else -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- -- break; -- -- default: -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -- break; -- } -- -- -- cim_get_task_managment_exit: -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_SSP_TASK_IU_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_task_managment @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * map_sas_status_to_csmi - Conversion for Connection Status -- * @mpi_sas_status: Sas status returned by the firmware -- * -- * Returns converted connection status -- * -- **/ --static u8 --map_sas_status_to_csmi(u8 mpi_sas_status) --{ -- u8 csmi_connect_status; -- -- switch (mpi_sas_status) { -- -- case MPI_SASSTATUS_SUCCESS: -- csmi_connect_status = CSMI_SAS_OPEN_ACCEPT; -- break; -- -- case MPI_SASSTATUS_UTC_BAD_DEST: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_BAD_DESTINATION; -- break; -- -- case MPI_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED; -- break; -- -- case MPI_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED: -- csmi_connect_status = -- CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED; -- break; -- -- case MPI_SASSTATUS_UTC_STP_RESOURCES_BUSY: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY; -- break; -- -- case MPI_SASSTATUS_UTC_WRONG_DESTINATION: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION; -- break; -- -- case MPI_SASSTATUS_SDSF_NAK_RECEIVED: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_RETRY; -- break; -- -- case MPI_SASSTATUS_SDSF_CONNECTION_FAILED: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED; -- break; -- -- case MPI_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_NO_DESTINATION; -- break; -- -- case MPI_SASSTATUS_UNKNOWN_ERROR: -- case MPI_SASSTATUS_INVALID_FRAME: -- case MPI_SASSTATUS_UTC_BREAK_RECEIVED: -- case MPI_SASSTATUS_UTC_PORT_LAYER_REQUEST: -- case MPI_SASSTATUS_SHORT_INFORMATION_UNIT: -- case MPI_SASSTATUS_LONG_INFORMATION_UNIT: -- case MPI_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA: -- case MPI_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR: -- case MPI_SASSTATUS_XFER_RDY_NOT_EXPECTED: -- case MPI_SASSTATUS_DATA_INCORRECT_DATA_LENGTH: -- case MPI_SASSTATUS_DATA_TOO_MUCH_READ_DATA: -- case MPI_SASSTATUS_DATA_OFFSET_ERROR: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_RESERVE_STOP; -- break; -- -- default: -- csmi_connect_status = CSMI_SAS_OPEN_REJECT_RESERVE_STOP; -- break; -- } -- -- return csmi_connect_status; --} -- --/** -- * csmisas_phy_reset -- * Issues a phy link reset or phy hard reset -- * -- * @ioc - Pointer to MPT_ADAPTER structure -- * @PhyNum - phy number -- * @opcode - {MPI_SAS_OP_PHY_LINK_RESET,MPI_SAS_OP_PHY_HARD_RESET} -- * -- * Returns: 0 for success, non-zero error -- **/ --static int --csmisas_phy_reset(MPT_ADAPTER *ioc, u8 PhyNum, u8 opcode) --{ -- SasIoUnitControlRequest_t *sasIoUnitCntrReq; -- SasIoUnitControlReply_t *sasIoUnitCntrReply; -- MPT_FRAME_HDR *mf = NULL; -- MPIHeader_t *mpi_hdr; -- u16 ioc_status; -- -- if ((opcode != MPI_SAS_OP_PHY_LINK_RESET) && -- (opcode != MPI_SAS_OP_PHY_HARD_RESET)) -- return -1; -- -- /* Get a MF for this command. -- */ -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dcsmisasprintk((": no msg frames!\n")); -- return -1; -- } -- -- mpi_hdr = (MPIHeader_t *) mf; -- sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf; -- memset(sasIoUnitCntrReq,0,sizeof(SasIoUnitControlRequest_t)); -- sasIoUnitCntrReq->Function = MPI_FUNCTION_SAS_IO_UNIT_CONTROL; -- sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext; -- sasIoUnitCntrReq->Operation = opcode; -- sasIoUnitCntrReq->PhyNum = PhyNum; -- -- if (csmisas_send_command_wait(ioc, mf, MPT_IOCTL_DEFAULT_TIMEOUT) != 0) -- return -1; -- -- if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) -- return -1; -- -- /* process the completed Reply Message Frame */ -- sasIoUnitCntrReply = (SasIoUnitControlReply_t *)ioc->ioctl->ReplyFrame; -- ioc_status = le16_to_cpu(sasIoUnitCntrReply->IOCStatus) -- & MPI_IOCSTATUS_MASK; -- if (ioc_status != MPI_IOCSTATUS_SUCCESS) { -- printk("%s: IOCStatus=0x%X IOCLogInfo=0x%X\n", -- __FUNCTION__, -- sasIoUnitCntrReply->IOCStatus, -- sasIoUnitCntrReply->IOCLogInfo); -- return -1; -- } -- return 0; --} -- --/** Prototype Routine for the CSMI SAS Phy Control command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_phy_control(unsigned long arg) --{ -- CSMI_SAS_PHY_CONTROL_BUFFER __user *uarg = (void __user *) arg; -- IOCTL_HEADER ioctl_header; -- PCSMI_SAS_PHY_CONTROL_BUFFER karg; -- SasIOUnitPage0_t *sasIoUnitPg0=NULL; -- dma_addr_t sasIoUnitPg0_dma; -- int sasIoUnitPg0_data_sz=0; -- SasIOUnitPage1_t *sasIoUnitPg1=NULL; -- dma_addr_t sasIoUnitPg1_dma; -- int sasIoUnitPg1_data_sz=0; -- ConfigExtendedPageHeader_t hdr; -- CONFIGPARMS cfg; -- MPT_ADAPTER *ioc = NULL; -- int iocnum; -- int csmi_sas_phy_control_buffer_sz; -- int memory_pages; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&ioctl_header, uarg, sizeof(IOCTL_HEADER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in IOCTL_HEADER" -- "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- csmi_sas_phy_control_buffer_sz = ioctl_header.Length; -- memory_pages = get_order(csmi_sas_phy_control_buffer_sz); -- karg = (PCSMI_SAS_PHY_CONTROL_BUFFER)__get_free_pages( -- GFP_KERNEL, memory_pages); -- if (!karg){ -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to malloc SAS_PHY_CONTROL_BUFFER " -- "csmi_sas_phy_control_buffer_sz=%d memory_pages=%d\n", -- __FILE__, __LINE__, __FUNCTION__, -- csmi_sas_phy_control_buffer_sz, memory_pages); -- return -ENOMEM; -- } -- memset(karg, 0, sizeof(*karg)); -- -- if (copy_from_user(karg, uarg, csmi_sas_phy_control_buffer_sz)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_phy_control_buffer " -- "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)karg, memory_pages); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(ioctl_header.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)karg, memory_pages); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)karg, memory_pages); -- return -ENODEV; -- } -- -- if (karg->bPhyIdentifier >= ioc->num_ports) { -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- goto cim_sas_phy_control_exit; -- } -- -- /* -- * Retreive SAS IOUNIT PAGE 0 -- */ -- -- hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.pageAddr = 0; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if (mpt_config(ioc, &cfg) != 0) { -- dcsmisasprintk(( -- ": FAILED: READ MPI_SASIOUNITPAGE0: HEADER\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- dcsmisasprintk((": hdr.ExtPageLength == 0\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- -- sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4; -- sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev, -- sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma); -- -- if (!sasIoUnitPg0) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- -- memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz); -- cfg.physAddr = sasIoUnitPg0_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if (mpt_config(ioc, &cfg) != 0) { -- dcsmisasprintk(( -- ": FAILED: READ MPI_SASIOUNITPAGE0: CURRENT\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- -- /* -- * Retreive SAS IOUNIT PAGE 1 -- */ -- -- hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 1; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.pageAddr = 0; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if (mpt_config(ioc, &cfg) != 0) { -- dcsmisasprintk(( -- ": FAILED: READ MPI_SASIOUNITPAGE1: HEADER\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- dcsmisasprintk((": hdr.ExtPageLength == 0\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- -- sasIoUnitPg1_data_sz = hdr.ExtPageLength * 4; -- sasIoUnitPg1 = (SasIOUnitPage1_t *) pci_alloc_consistent(ioc->pcidev, -- sasIoUnitPg1_data_sz, &sasIoUnitPg1_dma); -- -- if (!sasIoUnitPg1) { -- dcsmisasprintk((": pci_alloc_consistent: FAILED\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- -- memset((u8 *)sasIoUnitPg1, 0, sasIoUnitPg1_data_sz); -- cfg.physAddr = sasIoUnitPg1_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if (mpt_config(ioc, &cfg) != 0) { -- dcsmisasprintk(( -- ": FAILED: READ MPI_SASIOUNITPAGE1: CURRENT\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- -- switch (karg->uFunction) { -- -- case CSMI_SAS_PC_LINK_RESET: -- case CSMI_SAS_PC_HARD_RESET: -- { -- u8 opcode = (karg->uFunction==CSMI_SAS_PC_LINK_RESET) ? -- MPI_SAS_OP_PHY_LINK_RESET : MPI_SAS_OP_PHY_HARD_RESET; -- -- if((karg->uLinkFlags & CSMI_SAS_PHY_ACTIVATE_CONTROL) && -- (karg->usLengthOfControl >= sizeof(CSMI_SAS_PHY_CONTROL)) && -- (karg->bNumberOfControls > 0)){ -- if(karg->Control[0].bRate == -- CSMI_SAS_LINK_RATE_1_5_GBPS) { -- sasIoUnitPg1->PhyData[karg->bPhyIdentifier].MaxMinLinkRate = -- MPI_SAS_IOUNIT1_MAX_RATE_1_5 | -- MPI_SAS_IOUNIT1_MIN_RATE_1_5; -- } -- else if(karg->Control[0].bRate == -- CSMI_SAS_LINK_RATE_3_0_GBPS) { -- sasIoUnitPg1->PhyData[karg->bPhyIdentifier].MaxMinLinkRate = -- MPI_SAS_IOUNIT1_MAX_RATE_3_0 | -- MPI_SAS_IOUNIT1_MIN_RATE_3_0; -- } -- sasIoUnitPg1->PhyData[karg->bPhyIdentifier].PhyFlags &= -- ~MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE; -- cfg.dir = 1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM; -- if (mpt_config(ioc, &cfg) != 0) { -- dcsmisasprintk(( -- ": FAILED: WRITE MPI_SASIOUNITPAGE1 NVRAM\n")); -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; -- if (mpt_config(ioc, &cfg) != 0) { -- dcsmisasprintk(( -- ": FAILED: WRITE MPI_SASIOUNITPAGE1 CURRENT\n")); -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- } -- if (csmisas_phy_reset(ioc, -- karg->bPhyIdentifier, opcode) != 0) { -- dcsmisasprintk(( -- ": FAILED: csmisas_phy_reset\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- break; -- -- } -- case CSMI_SAS_PC_PHY_DISABLE: -- if(karg->usLengthOfControl || karg->bNumberOfControls) { -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- break; -- } -- sasIoUnitPg1->PhyData[karg->bPhyIdentifier].PhyFlags |= -- MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE; -- cfg.dir = 1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM; -- if (mpt_config(ioc, &cfg) != 0) { -- dcsmisasprintk(( -- ": FAILED: WRITE MPI_SASIOUNITPAGE1 NVRAM\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; -- if (mpt_config(ioc, &cfg) != 0) { -- dcsmisasprintk(( -- ": FAILED: WRITE MPI_SASIOUNITPAGE1 CURRENT\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- if (csmisas_phy_reset(ioc, -- karg->bPhyIdentifier, MPI_SAS_OP_PHY_HARD_RESET) != 0) { -- dcsmisasprintk(( -- ": FAILED: csmisas_phy_reset\n")); -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- goto cim_sas_phy_control_exit; -- } -- break; -- -- case CSMI_SAS_PC_GET_PHY_SETTINGS: -- if(karg->usLengthOfControl || karg->bNumberOfControls) { -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- break; -- } -- if(csmi_sas_phy_control_buffer_sz < -- offsetof(CSMI_SAS_PHY_CONTROL_BUFFER,Control) + -- (4* sizeof(CSMI_SAS_PHY_CONTROL))) { -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_INVALID_PARAMETER; -- break; -- } -- karg->usLengthOfControl = sizeof(CSMI_SAS_PHY_CONTROL); -- karg->bNumberOfControls = 4; -- karg->Control[0].bType = CSMI_SAS_SAS; -- karg->Control[0].bRate = CSMI_SAS_LINK_RATE_1_5_GBPS; -- karg->Control[1].bType = CSMI_SAS_SAS; -- karg->Control[1].bRate = CSMI_SAS_LINK_RATE_3_0_GBPS; -- karg->Control[2].bType = CSMI_SAS_SATA; -- karg->Control[2].bRate = CSMI_SAS_LINK_RATE_1_5_GBPS; -- karg->Control[3].bType = CSMI_SAS_SATA; -- karg->Control[3].bRate = CSMI_SAS_LINK_RATE_3_0_GBPS; -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- break; -- default: -- break; -- } -- -- cim_sas_phy_control_exit: -- -- if (sasIoUnitPg0) -- pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz, -- (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma); -- -- if (sasIoUnitPg1) -- pci_free_consistent(ioc->pcidev, sasIoUnitPg1_data_sz, -- (u8 *) sasIoUnitPg1, sasIoUnitPg1_dma); -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg,karg,csmi_sas_phy_control_buffer_sz)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_phy_control_buffer @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)karg, memory_pages); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- free_pages((unsigned long)karg, memory_pages); -- return 0; --} -- --/** -- * csmisas_get_manuf_pg_7 - Fetch Manufacturing config Page7. -- * @ioc: Pointer to MPT_ADAPTER structure -- * @mfgpage7_buffer: pointer to ManufacturingPage7_t that returns config -- * page data -- * @mfg_size - max size of buffer -- * -- * Return: 0 for success -- * -ENOMEM if no memory available -- * -EPERM if not allowed due to ISR context -- * -EAGAIN if no msg frames currently available -- * -EFAULT for non-successful reply or no reply (timeout) -- **/ --static int --csmisas_get_manuf_pg_7(MPT_ADAPTER *ioc, ManufacturingPage7_t *mfgpage7_buffer, int mfg_size) --{ -- ConfigPageHeader_t hdr; -- CONFIGPARMS cfg; -- ManufacturingPage7_t *mfgPage7 = NULL; -- dma_addr_t mfgPage7_dma; -- int data_sz = 0; -- int rc; -- -- /* Get Manufacturing Page 7 header */ -- hdr.PageVersion = MPI_MANUFACTURING0_PAGEVERSION; -- hdr.PageLength = 0; -- hdr.PageNumber = 7; -- hdr.PageType = MPI_CONFIG_PAGETYPE_MANUFACTURING; -- cfg.cfghdr.hdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; -- cfg.pageAddr = 0; -- cfg.timeout = 0; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto csmisas_get_manuf_pg_7_exit; -- -- if (hdr.PageLength == 0) { -- rc = -EFAULT; -- goto csmisas_get_manuf_pg_7_exit; -- } -- -- data_sz = hdr.PageLength * 4; -- mfgPage7 = pci_alloc_consistent(ioc->pcidev, data_sz, &mfgPage7_dma); -- if (!mfgPage7) { -- rc = -ENOMEM; -- goto csmisas_get_manuf_pg_7_exit; -- } -- -- memset((u8 *)mfgPage7, 0, data_sz); -- cfg.physAddr = mfgPage7_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto csmisas_get_manuf_pg_7_exit; -- -- /* copy buffer back to user */ -- memcpy(mfgpage7_buffer, mfgPage7, min(data_sz, mfg_size)); -- -- csmisas_get_manuf_pg_7_exit: -- -- if (mfgPage7) -- pci_free_consistent(ioc->pcidev, data_sz, (u8 *)mfgPage7, -- mfgPage7_dma); -- -- return rc; --} -- --/** -- * Prototype Routine for the CSMI SAS Get Connector info command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- **/ --static int --csmisas_get_connector_info(unsigned long arg) --{ -- CSMI_SAS_CONNECTOR_INFO_BUFFER __user *uarg = (void __user *) arg; -- CSMI_SAS_CONNECTOR_INFO_BUFFER karg; -- MPT_ADAPTER *ioc = NULL; -- ManufacturingPage7_t *mfgPg7 = NULL; -- int mfgPg7_sz; -- int iocnum; -- int i; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&karg, uarg, -- sizeof(CSMI_SAS_CONNECTOR_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_connector_info_buffer" -- " struct @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- return -ENODEV; -- } -- -- karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- -- /* `32` is the sizeof MPI_MANPAGE7_CONNECTOR_INFO */ -- for (i = 0; i < 32; i++) { -- karg.Reference[i].uPinout = CSMI_SAS_CON_UNKNOWN; -- strcpy(karg.Reference[i].bConnector,""); -- karg.Reference[i].bLocation = CSMI_SAS_CON_UNKNOWN; -- } -- -- mfgPg7_sz = offsetof(CONFIG_PAGE_MANUFACTURING_7,ConnectorInfo) + -- (ioc->num_ports * sizeof(MPI_MANPAGE7_CONNECTOR_INFO)); -- mfgPg7 = kmalloc(mfgPg7_sz, GFP_KERNEL); -- if (!mfgPg7){ -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to malloc @ %p\n", -- __FILE__, __LINE__, __FUNCTION__, mfgPg7); -- return -EFAULT; -- } -- memset(mfgPg7, 0, mfgPg7_sz); -- -- if (!csmisas_get_manuf_pg_7(ioc, mfgPg7, mfgPg7_sz)) { -- for (i = 0; i < ioc->num_ports; i++) { -- karg.Reference[i].uPinout = -- le32_to_cpu(mfgPg7->ConnectorInfo[i].Pinout); -- /*endian conversion , this is u8 * 16 ?? */ -- strncpy(karg.Reference[i].bConnector, -- mfgPg7->ConnectorInfo[i].Connector, 16); -- karg.Reference[i].bLocation = -- mfgPg7->ConnectorInfo[i].Location; -- } -- } -- -- kfree(mfgPg7); -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, -- sizeof(CSMI_SAS_CONNECTOR_INFO_BUFFER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_connector_info_buffer @" -- "%p\n", -- __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return 0; --} -- --/** -- * csmisas_fill_location_data -- * -- * Outputs: None. -- * Return: 0 if successful -- **/ --static int --csmisas_fill_location_data(MPT_ADAPTER *ioc, u8 bus, u8 id, u8 opcode, -- CSMI_SAS_LOCATION_IDENTIFIER * location_ident) --{ -- -- ConfigExtendedPageHeader_t hdr; -- CONFIGPARMS cfg; -- int rc; -- SasDevicePage0_t *sasDevicePg0=NULL; -- SasEnclosurePage0_t *sasEnclosurePg0=NULL; -- dma_addr_t sasDevicePg0_dma,sasEnclosurePg0_dma; -- int sasDevicePg0_data_sz=0; -- int sasEnclosurePg0_data_sz=0; -- u64 sas_address; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- memset (location_ident, 0, sizeof(*location_ident)); -- -- /* SAS Device Page 0 */ -- hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- rc=-1; -- goto fill_location_data_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- rc=-1; -- goto fill_location_data_exit; -- } -- -- sasDevicePg0_data_sz = hdr.ExtPageLength * 4; -- sasDevicePg0 = (SasDevicePage0_t *) pci_alloc_consistent( -- ioc->pcidev, sasDevicePg0_data_sz, &sasDevicePg0_dma); -- if (!sasDevicePg0) { -- rc=-1; -- goto fill_location_data_exit; -- } -- -- memset((u8 *)sasDevicePg0, 0, sasDevicePg0_data_sz); -- cfg.physAddr = sasDevicePg0_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.pageAddr = (bus << 8) + id -- + (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID << -- MPI_SAS_DEVICE_PGAD_FORM_SHIFT); -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- rc=-1; -- goto fill_location_data_exit; -- } -- -- location_ident->bLocationFlags |= CSMI_SAS_LOCATE_SAS_ADDRESS_VALID; -- memcpy(&sas_address, &sasDevicePg0->SASAddress, sizeof(u64)); -- sas_address = reverse_byte_order64(sas_address); -- memcpy(location_ident->bSASAddress, &sas_address, sizeof(u64)); -- -- location_ident->bLocationFlags |= CSMI_SAS_LOCATE_SAS_LUN_VALID; -- memset(location_ident->bSASLun, 0, sizeof(location_ident->bSASLun)); -- -- /* SAS Enclosure Page 0 */ -- hdr.PageVersion = MPI_SASENCLOSURE0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_ENCLOSURE; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- rc=0; -- goto fill_location_data_exit; -- } -- -- if (hdr.ExtPageLength == 0) { -- rc=0; -- goto fill_location_data_exit; -- } -- -- sasEnclosurePg0_data_sz = hdr.ExtPageLength * 4; -- sasEnclosurePg0 = (SasEnclosurePage0_t *) pci_alloc_consistent( -- ioc->pcidev, sasEnclosurePg0_data_sz, &sasEnclosurePg0_dma); -- if (!sasEnclosurePg0) { -- rc=0; -- goto fill_location_data_exit; -- } -- cfg.physAddr = sasEnclosurePg0_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.pageAddr = sasDevicePg0->EnclosureHandle -- + (MPI_SAS_ENCLOS_PGAD_FORM_HANDLE << MPI_SAS_ENCLOS_PGAD_FORM_SHIFT); -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) { -- rc=0; -- goto fill_location_data_exit; -- } -- -- location_ident->bLocationFlags |= CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID; -- memcpy(&sas_address, &sasEnclosurePg0->EnclosureLogicalID, sizeof(u64)); -- sas_address = reverse_byte_order64(sas_address); -- if (sas_address) -- memcpy(location_ident->bEnclosureIdentifier, &sas_address, sizeof(u64)); -- else -- strcpy(location_ident->bEnclosureIdentifier,"Internal"); -- --// bBayPrefix - not supported -- --// TODO - We need to look at sasEnclosurePg0-.Flags , to determine --// whether SEP BUS/TargetID is valid. Ifs its a SES device, then --// issue internal inquiry to (bus/id) to gather the Enclosure name. --// If the device is SMP, then issue SMP_MANUFACTURING to get enclosure name --// If its direct attached, there is no enclosure name -- location_ident->bLocationFlags |= CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID; -- strcpy(location_ident->bEnclosureName,"Not Supported"); -- -- location_ident->bLocationFlags |= CSMI_SAS_LOCATE_LOCATION_STATE_VALID; -- location_ident->bLocationState = CSMI_SAS_LOCATE_UNKNOWN; -- -- location_ident->bLocationFlags |= CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID; -- location_ident->bBayIdentifier = le16_to_cpu(sasDevicePg0->Slot); -- -- --// TODO - illuminating LEDs, --// karg->bIdentify = CSMI_SAS_LOCATE_FORCE_OFF, CSMI_SAS_LOCATE_FORCE_ON --// We can enable/disable LEDs by SCSI Enclosure Processor MPI request message --// printk("Flags=0x%x\n",sasEnclosurePg0->Flags); -- --/* check sasEnclosurePg0->Flags - -- * to validate whether we need to send the SEPRequest -- * bit:5 should be set -- * bit:3-0 any bit should be set. If zero, then SEPRequest will fail --*/ -- --/* MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR -- * Look in mpi_init.h -- * SEPRequest_t = structure -- * -- * SEPRequest_t->Action should be set to MPI_SEP_REQ_ACTION_WRITE_STATUS -- * -- * SEPRequest_t->Flags should be set to -- * MPI_SEP_REQ_FLAGS_ENCLOSURE_SLOT_ADDRESS, to pass along enclosure/slot ids -- * -- * SEPRequest_t->SlotStatus |= MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST - this -- * will illuminate the LEDs -- */ -- --fill_location_data_exit: -- -- if (sasDevicePg0 != NULL) -- pci_free_consistent(ioc->pcidev, sasDevicePg0_data_sz, -- sasDevicePg0, sasDevicePg0_dma); -- -- if (sasEnclosurePg0 != NULL) -- pci_free_consistent(ioc->pcidev, sasEnclosurePg0_data_sz, -- sasEnclosurePg0, sasEnclosurePg0_dma); -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- return rc; --} -- --static int --csmisas_fill_location_data_raid(MPT_ADAPTER *ioc, PCSMI_SAS_GET_LOCATION_BUFFER karg, u8 VolumeBus, -- u8 volumeID) --{ -- pRaidVolumePage0_t pVolume0 = NULL; -- pRaidPhysDiskPage0_t pPhysDisk0 = NULL; -- CONFIGPARMS cfg; -- ConfigPageHeader_t header; -- u8 physDiskNumMax; -- int volumepage0sz = 0, physdiskpage0sz = 0; -- dma_addr_t volume0_dma, physdisk0_dma; -- int csmi_sas_get_location_sz; -- int rc = 0, i, idx; -- int num_hotpares; -- u64 totalMaxLBA, tmpTotalMaxLBA; -- IOCPage5_t *iocPage5 = NULL; -- u32 device_info = 0; -- struct sas_device_info *sas_info; -- -- int sz; -- -- csmi_sas_get_location_sz = karg->IoctlHeader.Length; -- physDiskNumMax = (csmi_sas_get_location_sz - -- offsetof(CSMI_SAS_GET_LOCATION_BUFFER,Location)) -- / sizeof(CSMI_SAS_LOCATION_IDENTIFIER); -- karg->bNumberOfLocationIdentifiers=0; -- -- /* -- * get RAID Volume Page 0 -- */ -- -- header.PageVersion = 0; -- header.PageLength = 0; -- header.PageNumber = 0; -- header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; -- cfg.cfghdr.hdr = &header; -- cfg.physAddr = -1; -- cfg.pageAddr = (VolumeBus << 8) + volumeID; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- if (mpt_config(ioc, &cfg) != 0) { -- rc = -1; -- goto sas_fill_location_data_raid_exit; -- } -- -- if (header.PageLength == 0) { -- rc = -1; -- goto sas_fill_location_data_raid_exit; -- } -- -- volumepage0sz = header.PageLength * 4; -- pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz, -- &volume0_dma); -- if (!pVolume0) { -- rc = -1; -- goto sas_fill_location_data_raid_exit; -- } -- -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.physAddr = volume0_dma; -- if (mpt_config(ioc, &cfg) != 0){ -- rc = -1; -- goto sas_fill_location_data_raid_exit; -- } -- -- totalMaxLBA = (u64)le32_to_cpu(pVolume0->MaxLBA) | -- ((u64)le32_to_cpu(pVolume0->MaxLBAHigh)) << 32; -- -- /* -- * get RAID Physical Disk Page 0 -- */ -- header.PageVersion = 0; -- header.PageLength = 0; -- header.PageNumber = 0; -- header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK; -- cfg.cfghdr.hdr = &header; -- cfg.physAddr = -1; -- cfg.pageAddr = 0; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; -- cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -- if (mpt_config(ioc, &cfg) != 0) { -- rc = -1; -- goto sas_fill_location_data_raid_exit; -- } -- -- if (header.PageLength == 0) { -- rc = -1; -- goto sas_fill_location_data_raid_exit; -- } -- -- physdiskpage0sz = header.PageLength * 4; -- pPhysDisk0 = pci_alloc_consistent(ioc->pcidev, physdiskpage0sz, -- &physdisk0_dma); -- if (!pPhysDisk0) { -- rc = -1; -- goto sas_fill_location_data_raid_exit; -- } -- cfg.physAddr = physdisk0_dma; -- -- for (i=0; i < min(pVolume0->NumPhysDisks, physDiskNumMax); i++) { -- -- /* obtain a refresh of pPhysDisk0 */ -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.pageAddr = pVolume0->PhysDisk[i].PhysDiskNum; -- if (mpt_config(ioc, &cfg) != 0){ -- rc = -1; -- goto sas_fill_location_data_raid_exit; -- } -- -- if((csmisas_fill_location_data(ioc, pPhysDisk0->PhysDiskBus, -- pPhysDisk0->PhysDiskID, karg->bIdentify, -- &karg->Location[karg->bNumberOfLocationIdentifiers])) == 0) -- karg->bNumberOfLocationIdentifiers++; -- -- if (device_info) -- continue; -- sas_info = csmisas_get_device_component_by_fw(ioc, -- pPhysDisk0->PhysDiskBus, pPhysDisk0->PhysDiskID); -- if (!sas_info || sas_info->is_cached) -- continue; -- device_info = sas_info->device_info; -- } -- -- if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS) -- goto sas_fill_location_data_raid_exit; -- -- /* -- * hot spare support -- * -- */ -- -- num_hotpares = csmisas_get_number_hotspares(ioc); -- -- if (num_hotpares) { -- -- sz = offsetof(IOCPage5_t, HotSpare) + -- num_hotpares * sizeof(IOC_5_HOT_SPARE); -- iocPage5 = kmalloc(sz, GFP_KERNEL); -- -- if (!iocPage5) -- goto sas_fill_location_data_raid_exit; -- memset(iocPage5, 0, sizeof(*iocPage5)); -- -- if (csmisas_get_ioc_pg5(ioc, iocPage5, sz) != 0) -- goto sas_fill_location_data_raid_exit; -- -- for(i = 0, idx = pVolume0->NumPhysDisks ; i < num_hotpares; -- i++, idx++) { -- -- if (idx >= physDiskNumMax) -- break; -- -- /* obtain a refresh of pPhysDisk0 */ -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.pageAddr = iocPage5->HotSpare[i].PhysDiskNum; -- if (mpt_config(ioc, &cfg) != 0) -- goto sas_fill_location_data_raid_exit; -- -- /* Search the list for the matching SAS address. */ -- sas_info = csmisas_get_device_component_by_fw(ioc, -- pPhysDisk0->PhysDiskBus, pPhysDisk0->PhysDiskID); -- -- if (!sas_info || sas_info->is_cached) -- continue; -- -- /* don't mix SSP hot spare -- * in SATA volume -- */ -- if (!csmisas_is_sata(pPhysDisk0) && -- (device_info & -- MPI_SAS_DEVICE_INFO_SATA_DEVICE)) -- continue; -- -- /* don't mix SATA hot spare -- * in SSP volume -- */ -- if (csmisas_is_sata(pPhysDisk0) && -- (device_info & -- MPI_SAS_DEVICE_INFO_SSP_TARGET)) -- continue; -- -- /* capacity check for IM volumes*/ -- if ((pVolume0->VolumeType == -- MPI_RAID_VOL_TYPE_IM) && -- (totalMaxLBA + -- (64*2*1024) /* metadata = 64MB*/ > -- le32_to_cpu(pPhysDisk0->MaxLBA))) -- continue; -- -- tmpTotalMaxLBA = totalMaxLBA; -- do_div(tmpTotalMaxLBA, pVolume0->NumPhysDisks); -- /* capacity check for IME volumes*/ -- if ((pVolume0->VolumeType == -- MPI_RAID_VOL_TYPE_IME) && -- ((tmpTotalMaxLBA * 2) + -- (64*2*1024 ) /*metadata = 64MB*/ > -- le32_to_cpu(pPhysDisk0->MaxLBA))) -- continue; -- -- if((csmisas_fill_location_data(ioc, -- pPhysDisk0->PhysDiskBus, pPhysDisk0->PhysDiskID, -- karg->bIdentify, -- &karg->Location[karg->bNumberOfLocationIdentifiers])) == 0) -- karg->bNumberOfLocationIdentifiers++; -- } -- } -- -- -- sas_fill_location_data_raid_exit: -- -- kfree(iocPage5); -- -- if (pVolume0) -- pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0, -- volume0_dma); -- -- if(pPhysDisk0) -- pci_free_consistent(ioc->pcidev, physdiskpage0sz, pPhysDisk0, -- physdisk0_dma); -- -- return rc; --} -- --/** -- * Prototype Routine for the CSMI SAS Get location command. -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- * -ENODEV if no such device/adapter -- */ --static int --csmisas_get_location(unsigned long arg) --{ -- CSMI_SAS_GET_LOCATION_BUFFER __user *uarg = (void __user *) arg; -- PCSMI_SAS_GET_LOCATION_BUFFER karg; -- IOCTL_HEADER ioctl_header; -- MPT_ADAPTER *ioc = NULL; -- int iocnum,i; -- int csmi_sas_get_location_sz; -- int memory_pages; -- struct sas_device_info *sas_info; -- -- dcsmisasprintk(("%s enter.\n",__FUNCTION__)); -- -- if (copy_from_user(&ioctl_header, uarg, sizeof(IOCTL_HEADER))) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in IOCTL_HEADER" -- "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg); -- return -EFAULT; -- } -- -- csmi_sas_get_location_sz = ioctl_header.Length; -- memory_pages = get_order(csmi_sas_get_location_sz); -- karg = (PCSMI_SAS_GET_LOCATION_BUFFER)__get_free_pages( -- GFP_KERNEL, memory_pages); -- if (!karg){ -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to malloc GET_LOCATION_BUFFER " -- "csmi_sas_get_location_sz=%d memory_pages=%d\n", -- __FILE__, __LINE__, __FUNCTION__, -- csmi_sas_get_location_sz, memory_pages); -- return -ENOMEM; -- } -- memset(karg, 0, sizeof(*karg)); -- -- if (copy_from_user(karg, uarg, csmi_sas_get_location_sz)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to read in csmi_sas_phy_control_buffer " -- "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)karg, memory_pages); -- return -EFAULT; -- } -- -- if (((iocnum = mpt_verify_adapter(karg->IoctlHeader.IOControllerNumber, -- &ioc)) < 0) || (ioc == NULL)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not found!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)karg, memory_pages); -- return -ENODEV; -- } -- -- if (!csmisas_is_this_sas_cntr(ioc)) { -- dcsmisasprintk((KERN_ERR -- "%s::%s() @%d - ioc%d not SAS controller!\n", -- __FILE__, __FUNCTION__, __LINE__, iocnum)); -- free_pages((unsigned long)karg, memory_pages); -- return -ENODEV; -- } -- -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -- if(karg->bLengthOfLocationIdentifier != -- sizeof(CSMI_SAS_LOCATION_IDENTIFIER)) -- goto cim_sas_get_location_exit; -- -- sas_info = csmisas_get_device_component_by_os(ioc, karg->bPathId, -- karg->bTargetId); -- if (!sas_info) -- goto cim_sas_get_location_exit; -- -- /* RAID SUPPORT */ -- if (ioc->raid_data.pIocPg2 && sas_info->is_logical_volume) { -- for (i=0; i<ioc->raid_data.pIocPg2->NumActiveVolumes; i++){ -- if (sas_info->fw.id == -- ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID && -- sas_info->fw.channel == -- ioc->raid_data.pIocPg2->RaidVolume[i].VolumeBus) { -- if(csmisas_fill_location_data_raid(ioc, karg, -- ioc->raid_data.pIocPg2->RaidVolume[i].VolumeBus, -- ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID) == 0) -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_SUCCESS; -- else -- karg->IoctlHeader.ReturnCode = -- CSMI_SAS_STATUS_FAILED; -- goto cim_sas_get_location_exit; -- } -- } -- } -- -- /* NON-RAID SUPPORT */ -- if (sas_info->is_cached || sas_info->is_logical_volume) -- goto cim_sas_get_location_exit; -- -- /* make sure there's enough room to populate the Location[] struct */ -- if ((csmi_sas_get_location_sz - -- offsetof(CSMI_SAS_GET_LOCATION_BUFFER,Location)) < -- sizeof(CSMI_SAS_LOCATION_IDENTIFIER)) -- goto cim_sas_get_location_exit; -- -- karg->bNumberOfLocationIdentifiers=1; -- karg->Location[0].bLocationFlags=0; -- if((csmisas_fill_location_data(ioc, sas_info->fw.channel, -- sas_info->fw.id, karg->bIdentify, &karg->Location[0])) == 0) -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -- else -- karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -- -- cim_sas_get_location_exit: -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, karg, csmi_sas_get_location_sz)) { -- printk(KERN_ERR "%s@%d::%s() - " -- "Unable to write out csmi_sas_get_location_buffer " -- "@ %p\n",__FILE__, __LINE__, __FUNCTION__, uarg); -- free_pages((unsigned long)karg, memory_pages); -- return -EFAULT; -- } -- -- dcsmisasprintk(("%s exit.\n",__FUNCTION__)); -- free_pages((unsigned long)karg, memory_pages); -- return 0; --} -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/csmi/csmisas.h linux-2.6.9-55.0.12/drivers/message/fusion/csmi/csmisas.h ---- linux-2.6.9-67.0.1/drivers/message/fusion/csmi/csmisas.h 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/csmi/csmisas.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,1854 +0,0 @@ --/************************************************************************** -- --Module Name: -- -- CSMISAS.H -- -- --Abstract: -- -- This file contains constants and data structure definitions used by drivers -- that support the Common Storage Management Interface specification for -- SAS or SATA in either the Windows or Linux. -- -- This should be considered as a reference implementation only. Changes may -- be necessary to accommodate a specific build environment or target OS. -- --Revision History: -- -- 001 SEF 8/12/03 Initial release. -- 002 SEF 8/20/03 Cleanup to match documentation. -- 003 SEF 9/12/03 Additional cleanup, created combined header -- 004 SEF 9/23/03 Changed base types to match linux defaults -- Added RAID signature -- Added bControllerFlags to CSMI_SAS_CNTLR_CONFIG -- Changed CSMI_SAS_BEGIN_PACK to 8 for common structures -- Fixed other typos identified in first compilation test -- 005 SEF 10/03/03 Additions to match first version of CSMI document -- 006 SEF 10/14/03 Fixed typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER -- Added defines for bConnectionRate -- 007 SEF 10/15/03 Added Firmware Download Control Code and support -- Added CSMI revision support -- 008 SEF 10/30/03 No functional change, just updated version to track -- spec changes -- 009 SEF 12/09/03 No functional change, just updated version to track -- spec changes -- 010 SEF 3/11/04 Fixed typedef struct CSMI_SAS_RAID_DRIVES to include the -- bFirmware member that is defined in the spec, but -- was missing in this file, -- added CC_CSMI_SAS_TASK_MANAGEMENT -- 011 SEF 4/02/04 No functional change, added comment line before -- CC_CSMI_SAS_TASK_MANAGEMENT -- 012 SEF 4/16/04 Added IOControllerNumber to linux header, -- Modified linux control codes to have upper word of -- 0xCC77.... to indicate CSMI version 77 -- Added bSignalClass to CC_CSMI_SET_PHY_INFO -- Added CC_CSMI_SAS_PHY_CONTROL support -- 013 SEF 5/14/04 Added CC_CSMI_SAS_GET_CONNECTOR_INFO support -- 014 SEF 5/24/04 No functional change, just updated version to track spec -- changes -- 015 SEF 6/16/04 changed bPinout to uPinout to reflect proper size, -- changed width of bLocation defines to reflect size -- 016 SEF 6/17/04 changed bLengthOfControls in CSMI_SAS_PHY_CONTROL -- to be proper size -- 017 SEF 9/17/04 added CSMI_SAS_SATA_PORT_SELECTOR, -- CSMI_SAS_LINK_VIRTUAL, CSMI_SAS_CON_NOT_PRESENT, and -- CSMI_SAS_CON_NOT_CONNECTED -- 018 SEF 9/20/04 added CSMI_SAS_PHY_USER_PATTERN, -- changed definition of CSMI_SAS_PHY_FIXED_PATTERN to not -- conflict with activate definition -- 019 SEF 12/06/04 added CSMI_SAS_GET_LOCATION -- added bSSPStatus to CSMI_SAS_SSP_PASSTHRU_STATUS -- structure -- 020 SEF 5/25/05 added CSMI_SAS_PHY_VIRTUAL_SMP, and changes to -- CSMI_SAS_GET_LOCATION -- 021 SEF 11/03/05 added new RAID creation functionality -- 022 SEF 2/01/06 corrected typo bNegotitiatedLInkRate -- Added two more RAID_TYPES, 7 and 8 -- 023 SEF 4/04/06 added CSMI_RAID_TYPE_1E -- changed structures that contained surface scan -- to priority approach rather than time, causes -- 0.89 to incompatible with 0.87, so a version -- check is necessary when interpreting the -- raid structures -- Added netware section -- 024 DRG 5/22/06 Added uFailureCode to CSMI_SAS_RAID_CONFIG and -- CSMI_SAS_RAID_FEATURES -- Changed __u64 fields to high and low __u32 fields in -- order to avoid backward compatibility issues with -- packing and alignment. -- Fixed alignment problem in CSMI_SAS_RAID_DRIVES. -- Added CSMI_SAS_CNTLR_SMART_ARRAY to uControllerFlags -- Reassigned the value of CSMI_SAS_CNTLR_RAID_CFG_SUPPORT -- to avoid a conflict. -- --**************************************************************************/ -- --#ifndef _CSMI_SAS_H_ --#define _CSMI_SAS_H_ -- --// CSMI Specification Revision, the intent is that all versions of the --// specification will be backward compatible after the 1.00 release. --// Major revision number, corresponds to xxxx. of CSMI specification --// Minor revision number, corresponds to .xxxx of CSMI specification --#define CSMI_MAJOR_REVISION 0 --#define CSMI_MINOR_REVISION 90 -- --/*************************************************************************/ --/* PATCHES FOR TYPOS */ --/*************************************************************************/ -- --#define bNegotitiatedLInkRate bNegotiatedLinkRate -- --/*************************************************************************/ --/* TARGET OS LINUX SPECIFIC CODE */ --/*************************************************************************/ -- --// EDM #ifdef _linux --#ifdef __KERNEL__ -- --// Linux base types -- --#include <linux/types.h> -- --#define __i8 char -- --// pack definition -- --// EDM #define CSMI_SAS_BEGIN_PACK(x) pack(x) --// EDM #define CSMI_SAS_END_PACK pack() -- --// IOCTL Control Codes --// (IoctlHeader.ControlCode) -- --// Control Codes prior to 0.77 -- --// Control Codes requiring CSMI_ALL_SIGNATURE -- --// #define CC_CSMI_SAS_GET_DRIVER_INFO 0x12345678 --// #define CC_CSMI_SAS_GET_CNTLR_CONFIG 0x23456781 --// #define CC_CSMI_SAS_GET_CNTLR_STATUS 0x34567812 --// #define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0x92345678 -- --// Control Codes requiring CSMI_RAID_SIGNATURE -- --// #define CC_CSMI_SAS_GET_RAID_INFO 0x45678123 --// #define CC_CSMI_SAS_GET_RAID_CONFIG 0x56781234 -- --// Control Codes requiring CSMI_SAS_SIGNATURE -- --// #define CC_CSMI_SAS_GET_PHY_INFO 0x67812345 --// #define CC_CSMI_SAS_SET_PHY_INFO 0x78123456 --// #define CC_CSMI_SAS_GET_LINK_ERRORS 0x81234567 --// #define CC_CSMI_SAS_SMP_PASSTHRU 0xA1234567 --// #define CC_CSMI_SAS_SSP_PASSTHRU 0xB1234567 --// #define CC_CSMI_SAS_STP_PASSTHRU 0xC1234567 --// #define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xD1234567 --// #define CC_CSMI_SAS_GET_SCSI_ADDRESS 0xE1234567 --// #define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xF1234567 --// #define CC_CSMI_SAS_TASK_MANAGEMENT 0xA2345678 -- --// Control Codes for 0.77 and later -- --// Control Codes requiring CSMI_ALL_SIGNATURE -- --#define CC_CSMI_SAS_GET_DRIVER_INFO 0xCC770001 --#define CC_CSMI_SAS_GET_CNTLR_CONFIG 0xCC770002 --#define CC_CSMI_SAS_GET_CNTLR_STATUS 0xCC770003 --#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0xCC770004 -- --// Control Codes requiring CSMI_RAID_SIGNATURE -- --#define CC_CSMI_SAS_GET_RAID_INFO 0xCC77000A --#define CC_CSMI_SAS_GET_RAID_CONFIG 0xCC77000B --#define CC_CSMI_SAS_GET_RAID_FEATURES 0xCC77000C --#define CC_CSMI_SAS_SET_RAID_CONTROL 0xCC77000D --#define CC_CSMI_SAS_GET_RAID_ELEMENT 0xCC77000E --#define CC_CSMI_SAS_SET_RAID_OPERATION 0xCC77000F -- --// Control Codes requiring CSMI_SAS_SIGNATURE -- --#define CC_CSMI_SAS_GET_PHY_INFO 0xCC770014 --#define CC_CSMI_SAS_SET_PHY_INFO 0xCC770015 --#define CC_CSMI_SAS_GET_LINK_ERRORS 0xCC770016 --#define CC_CSMI_SAS_SMP_PASSTHRU 0xCC770017 --#define CC_CSMI_SAS_SSP_PASSTHRU 0xCC770018 --#define CC_CSMI_SAS_STP_PASSTHRU 0xCC770019 --#define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xCC770020 --#define CC_CSMI_SAS_GET_SCSI_ADDRESS 0xCC770021 --#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xCC770022 --#define CC_CSMI_SAS_TASK_MANAGEMENT 0xCC770023 --#define CC_CSMI_SAS_GET_CONNECTOR_INFO 0xCC770024 --#define CC_CSMI_SAS_GET_LOCATION 0xCC770025 -- -- --// Control Codes requiring CSMI_PHY_SIGNATURE -- --#define CC_CSMI_SAS_PHY_CONTROL 0xCC77003C -- --// EDM #pragma CSMI_SAS_BEGIN_PACK(8) --#pragma pack(8) -- --// IOCTL_HEADER --typedef struct _IOCTL_HEADER { -- __u32 IOControllerNumber; -- __u32 Length; -- __u32 ReturnCode; -- __u32 Timeout; -- __u16 Direction; --} IOCTL_HEADER, -- *PIOCTL_HEADER; -- --// EDM #pragma CSMI_SAS_END_PACK --#pragma pack() -- --#endif -- --/*************************************************************************/ --/* TARGET OS WINDOWS SPECIFIC CODE */ --/*************************************************************************/ -- --#ifdef _WIN32 -- --// windows IOCTL definitions -- --#ifndef _NTDDSCSIH_ --#include <ntddscsi.h> --#endif -- --// pack definition -- --#if defined _MSC_VER -- #define CSMI_SAS_BEGIN_PACK(x) pack(push,x) -- #define CSMI_SAS_END_PACK pack(pop) --#elif defined __BORLANDC__ -- #define CSMI_SAS_BEGIN_PACK(x) option -a##x -- #define CSMI_SAS_END_PACK option -a. --#else -- #error "CSMISAS.H - Must externally define a pack compiler designator." --#endif -- --// base types -- --#define __u8 unsigned char --#define __u16 unsigned short --#define __u32 unsigned long --#define __u64 unsigned __int64 -- --#define __i8 char -- --// IOCTL Control Codes --// (IoctlHeader.ControlCode) -- --// Control Codes requiring CSMI_ALL_SIGNATURE -- --#define CC_CSMI_SAS_GET_DRIVER_INFO 1 --#define CC_CSMI_SAS_GET_CNTLR_CONFIG 2 --#define CC_CSMI_SAS_GET_CNTLR_STATUS 3 --#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 4 -- --// Control Codes requiring CSMI_RAID_SIGNATURE -- --#define CC_CSMI_SAS_GET_RAID_INFO 10 --#define CC_CSMI_SAS_GET_RAID_CONFIG 11 --#define CC_CSMI_SAS_GET_RAID_FEATURES 12 --#define CC_CSMI_SAS_SET_RAID_CONTROL 13 --#define CC_CSMI_SAS_GET_RAID_ELEMENT 14 --#define CC_CSMI_SAS_SET_RAID_OPERATION 15 -- --// Control Codes requiring CSMI_SAS_SIGNATURE -- --#define CC_CSMI_SAS_GET_PHY_INFO 20 --#define CC_CSMI_SAS_SET_PHY_INFO 21 --#define CC_CSMI_SAS_GET_LINK_ERRORS 22 --#define CC_CSMI_SAS_SMP_PASSTHRU 23 --#define CC_CSMI_SAS_SSP_PASSTHRU 24 --#define CC_CSMI_SAS_STP_PASSTHRU 25 --#define CC_CSMI_SAS_GET_SATA_SIGNATURE 26 --#define CC_CSMI_SAS_GET_SCSI_ADDRESS 27 --#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 28 --#define CC_CSMI_SAS_TASK_MANAGEMENT 29 --#define CC_CSMI_SAS_GET_CONNECTOR_INFO 30 --#define CC_CSMI_SAS_GET_LOCATION 31 -- --// Control Codes requiring CSMI_PHY_SIGNATURE -- --#define CC_CSMI_SAS_PHY_CONTROL 60 -- --#define IOCTL_HEADER SRB_IO_CONTROL --#define PIOCTL_HEADER PSRB_IO_CONTROL -- --#endif -- --/*************************************************************************/ --/* TARGET OS NETWARE SPECIFIC CODE */ --/*************************************************************************/ -- --#ifdef _NETWARE -- --// NetWare IOCTL definitions -- --#define CSMI_SAS_BEGIN_PACK(x) pack(x) --#define CSMI_SAS_END_PACK pack() -- --#ifndef LONG --typedef unsigned long LONG; --#endif -- --#ifndef WORD --typedef unsigned short WORD; --#endif -- --#ifndef BYTE --typedef unsigned char BYTE; --#endif -- --/* Need to have these definitions for Netware */ --#define __u8 unsigned char --#define __u16 unsigned short --#define __u32 unsigned long --#define __u64 unsigned __int64 -- --#define __i8 char -- -- --// EDM #pragma CSMI_SAS_BEGIN_PACK(8) --#pragma pack(8) -- --// IOCTL_HEADER --typedef struct _IOCTL_HEADER { -- __u32 Length; -- __u32 ReturnCode; --} IOCTL_HEADER, -- *PIOCTL_HEADER; -- --// EDM #pragma CSMI_SAS_END_PACK --#pragma pack() -- --// IOCTL Control Codes --// (IoctlHeader.ControlCode) -- --// Control Codes requiring CSMI_ALL_SIGNATURE -- --#define CC_CSMI_SAS_GET_DRIVER_INFO 0x01FF0001 --#define CC_CSMI_SAS_GET_CNTLR_CONFIG 0x01FF0002 --#define CC_CSMI_SAS_GET_CNTLR_STATUS 0x01FF0003 --#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0x01FF0004 -- --// Control Codes requiring CSMI_RAID_SIGNATURE -- --#define CC_CSMI_SAS_GET_RAID_INFO 0x01FF000A --#define CC_CSMI_SAS_GET_RAID_CONFIG 0x01FF000B --#define CC_CSMI_SAS_GET_RAID_FEATURES 0x01FF000C --#define CC_CSMI_SAS_SET_RAID_CONTROL 0x01FF000D --#define CC_CSMI_SAS_GET_RAID_ELEMENT 0x01FF000E --#define CC_CSMI_SAS_SET_RAID_OPERATION 0x01FF000F -- --// Control Codes requiring CSMI_SAS_SIGNATURE -- --#define CC_CSMI_SAS_GET_PHY_INFO 0x01FF0014 --#define CC_CSMI_SAS_SET_PHY_INFO 0x01FF0015 --#define CC_CSMI_SAS_GET_LINK_ERRORS 0x01FF0016 --#define CC_CSMI_SAS_SMP_PASSTHRU 0x01FF0017 --#define CC_CSMI_SAS_SSP_PASSTHRU 0x01FF0018 --#define CC_CSMI_SAS_STP_PASSTHRU 0x01FF0019 --#define CC_CSMI_SAS_GET_SATA_SIGNATURE 0x01FF001A --#define CC_CSMI_SAS_GET_SCSI_ADDRESS 0x01FF001B --#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0x01FF001C --#define CC_CSMI_SAS_TASK_MANAGEMENT 0x01FF001D --#define CC_CSMI_SAS_GET_CONNECTOR_INFO 0x01FF001E --#define CC_CSMI_SAS_GET_LOCATION 0x01FF001F -- --// Control Codes requiring CSMI_PHY_SIGNATURE -- --#define CC_CSMI_SAS_PHY_CONTROL 60 -- --#endif -- --/*************************************************************************/ --/* TARGET OS NOT DEFINED ERROR */ --/*************************************************************************/ -- --// EDM --//#if (!_WIN32 && !_linux && !_NETWARE) --// #error "Unknown target OS." --//#endif -- --/*************************************************************************/ --/* OS INDEPENDENT CODE */ --/*************************************************************************/ -- --/* * * * * * * * * * Class Independent IOCTL Constants * * * * * * * * * */ -- --// Return codes for all IOCTL's regardless of class --// (IoctlHeader.ReturnCode) -- --#define CSMI_SAS_STATUS_SUCCESS 0 --#define CSMI_SAS_STATUS_FAILED 1 --#define CSMI_SAS_STATUS_BAD_CNTL_CODE 2 --#define CSMI_SAS_STATUS_INVALID_PARAMETER 3 --#define CSMI_SAS_STATUS_WRITE_ATTEMPTED 4 -- --// Signature value --// (IoctlHeader.Signature) -- --#define CSMI_ALL_SIGNATURE "CSMIALL" -- --// Timeout value default of 60 seconds --// (IoctlHeader.Timeout) -- --#define CSMI_ALL_TIMEOUT 60 -- --// Direction values for data flow on this IOCTL --// (IoctlHeader.Direction, Linux only) --#define CSMI_SAS_DATA_READ 0 --#define CSMI_SAS_DATA_WRITE 1 -- --// I/O Bus Types --// ISA and EISA bus types are not supported --// (bIoBusType) -- --#define CSMI_SAS_BUS_TYPE_PCI 3 --#define CSMI_SAS_BUS_TYPE_PCMCIA 4 -- --// Controller Status --// (uStatus) -- --#define CSMI_SAS_CNTLR_STATUS_GOOD 1 --#define CSMI_SAS_CNTLR_STATUS_FAILED 2 --#define CSMI_SAS_CNTLR_STATUS_OFFLINE 3 --#define CSMI_SAS_CNTLR_STATUS_POWEROFF 4 -- --// Offline Status Reason --// (uOfflineReason) -- --#define CSMI_SAS_OFFLINE_REASON_NO_REASON 0 --#define CSMI_SAS_OFFLINE_REASON_INITIALIZING 1 --#define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_DEGRADED 2 --#define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_FAILURE 3 -- --// Controller Class --// (bControllerClass) -- --#define CSMI_SAS_CNTLR_CLASS_HBA 5 -- --// Controller Flag bits --// (uControllerFlags) -- --#define CSMI_SAS_CNTLR_SAS_HBA 0x00000001 --#define CSMI_SAS_CNTLR_SAS_RAID 0x00000002 --#define CSMI_SAS_CNTLR_SATA_HBA 0x00000004 --#define CSMI_SAS_CNTLR_SATA_RAID 0x00000008 --#define CSMI_SAS_CNTLR_SMART_ARRAY 0x00000010 -- --// for firmware download --#define CSMI_SAS_CNTLR_FWD_SUPPORT 0x00010000 --#define CSMI_SAS_CNTLR_FWD_ONLINE 0x00020000 --#define CSMI_SAS_CNTLR_FWD_SRESET 0x00040000 --#define CSMI_SAS_CNTLR_FWD_HRESET 0x00080000 --#define CSMI_SAS_CNTLR_FWD_RROM 0x00100000 -- --// for RAID configuration supported --#define CSMI_SAS_CNTLR_RAID_CFG_SUPPORT 0x01000000 -- --// Download Flag bits --// (uDownloadFlags) --#define CSMI_SAS_FWD_VALIDATE 0x00000001 --#define CSMI_SAS_FWD_SOFT_RESET 0x00000002 --#define CSMI_SAS_FWD_HARD_RESET 0x00000004 -- --// Firmware Download Status --// (usStatus) --#define CSMI_SAS_FWD_SUCCESS 0 --#define CSMI_SAS_FWD_FAILED 1 --#define CSMI_SAS_FWD_USING_RROM 2 --#define CSMI_SAS_FWD_REJECT 3 --#define CSMI_SAS_FWD_DOWNREV 4 -- --// Firmware Download Severity --// (usSeverity> --#define CSMI_SAS_FWD_INFORMATION 0 --#define CSMI_SAS_FWD_WARNING 1 --#define CSMI_SAS_FWD_ERROR 2 --#define CSMI_SAS_FWD_FATAL 3 -- --/* * * * * * * * * * SAS RAID Class IOCTL Constants * * * * * * * * */ -- --// Return codes for the RAID IOCTL's regardless of class --// (IoctlHeader.ReturnCode) -- --#define CSMI_SAS_RAID_SET_OUT_OF_RANGE 1000 --#define CSMI_SAS_RAID_SET_BUFFER_TOO_SMALL 1001 --#define CSMI_SAS_RAID_SET_DATA_CHANGED 1002 -- --// Signature value --// (IoctlHeader.Signature) -- --#define CSMI_RAID_SIGNATURE "CSMIARY" -- --// Timeout value default of 60 seconds --// (IoctlHeader.Timeout) -- --#define CSMI_RAID_TIMEOUT 60 -- --// RAID Types --// (bRaidType) --#define CSMI_SAS_RAID_TYPE_NONE 0 --#define CSMI_SAS_RAID_TYPE_0 1 --#define CSMI_SAS_RAID_TYPE_1 2 --#define CSMI_SAS_RAID_TYPE_10 3 --#define CSMI_SAS_RAID_TYPE_5 4 --#define CSMI_SAS_RAID_TYPE_15 5 --#define CSMI_SAS_RAID_TYPE_6 6 --#define CSMI_SAS_RAID_TYPE_50 7 --#define CSMI_SAS_RAID_TYPE_VOLUME 8 --#define CSMI_SAS_RAID_TYPE_1E 9 --#define CSMI_SAS_RAID_TYPE_OTHER 255 --// the last value 255 was already defined for other --// so end is defined as 254 --#define CSMI_SAS_RAID_TYPE_END 254 -- --// RAID Status --// (bStatus) --#define CSMI_SAS_RAID_SET_STATUS_OK 0 --#define CSMI_SAS_RAID_SET_STATUS_DEGRADED 1 --#define CSMI_SAS_RAID_SET_STATUS_REBUILDING 2 --#define CSMI_SAS_RAID_SET_STATUS_FAILED 3 --#define CSMI_SAS_RAID_SET_STATUS_OFFLINE 4 --#define CSMI_SAS_RAID_SET_STATUS_TRANSFORMING 5 --#define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_REBUILD 6 --#define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_TRANSFORMATION 7 -- --// RAID Drive Count --// (bDriveCount, 0xF1 to 0xFF are reserved) --#define CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG 0xF1 --#define CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED 0xF2 -- --// RAID Data Type --// (bDataType) --#define CSMI_SAS_RAID_DATA_DRIVES 0 --#define CSMI_SAS_RAID_DATA_DEVICE_ID 1 --#define CSMI_SAS_RAID_DATA_ADDITIONAL_DATA 2 -- --// RAID Drive Status --// (bDriveStatus) --#define CSMI_SAS_DRIVE_STATUS_OK 0 --#define CSMI_SAS_DRIVE_STATUS_REBUILDING 1 --#define CSMI_SAS_DRIVE_STATUS_FAILED 2 --#define CSMI_SAS_DRIVE_STATUS_DEGRADED 3 --#define CSMI_SAS_DRIVE_STATUS_OFFLINE 4 --#define CSMI_SAS_DRIVE_STATUS_QUEUED_FOR_REBUILD 5 -- --// RAID Drive Usage --// (bDriveUsage) --#define CSMI_SAS_DRIVE_CONFIG_NOT_USED 0 --#define CSMI_SAS_DRIVE_CONFIG_MEMBER 1 --#define CSMI_SAS_DRIVE_CONFIG_SPARE 2 --#define CSMI_SAS_DRIVE_CONFIG_SPARE_ACTIVE 3 -- --// RAID Drive Type --// (bDriveType) --#define CSMI_SAS_DRIVE_TYPE_UNKNOWN 0 --#define CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS 1 --#define CSMI_SAS_DRIVE_TYPE_DUAL_PORT_SAS 2 --#define CSMI_SAS_DRIVE_TYPE_SATA 3 --#define CSMI_SAS_DRIVE_TYPE_SATA_PS 4 --#define CSMI_SAS_DRIVE_TYPE_OTHER 255 -- --// RAID Write Protect --// (bWriteProtect) --#define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN 0 --#define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNCHANGED 0 --#define CSMI_SAS_RAID_SET_WRITE_PROTECT_ENABLED 1 --#define CSMI_SAS_RAID_SET_WRITE_PROTECT_DISABLED 2 -- --// RAID Cache Setting --// (bCacheSetting) --#define CSMI_SAS_RAID_SET_CACHE_UNKNOWN 0 --#define CSMI_SAS_RAID_SET_CACHE_UNCHANGED 0 --#define CSMI_SAS_RAID_SET_CACHE_ENABLED 1 --#define CSMI_SAS_RAID_SET_CACHE_DISABLED 2 --#define CSMI_SAS_RAID_SET_CACHE_CORRUPT 3 -- --// RAID Features --// (uFeatures) --#define CSMI_SAS_RAID_FEATURE_TRANSFORMATION 0x00000001 --#define CSMI_SAS_RAID_FEATURE_REBUILD 0x00000002 --#define CSMI_SAS_RAID_FEATURE_SPLIT_MIRROR 0x00000004 --#define CSMI_SAS_RAID_FEATURE_MERGE_MIRROR 0x00000008 --#define CSMI_SAS_RAID_FEATURE_LUN_RENUMBER 0x00000010 --#define CSMI_SAS_RAID_FEATURE_SURFACE_SCAN 0x00000020 --#define CSMI_SAS_RAID_FEATURE_SPARES_SHARED 0x00000040 -- --// RAID Priority --// (bDefaultTransformPriority, etc.) --#define CSMI_SAS_PRIORITY_UNKNOWN 0 --#define CSMI_SAS_PRIORITY_UNCHANGED 0 --#define CSMI_SAS_PRIORITY_AUTO 1 --#define CSMI_SAS_PRIORITY_OFF 2 --#define CSMI_SAS_PRIORITY_LOW 3 --#define CSMI_SAS_PRIORITY_MEDIUM 4 --#define CSMI_SAS_PRIORITY_HIGH 5 -- --// RAID Transformation Rules --// (uRaidSetTransformationRules) --#define CSMI_SAS_RAID_RULE_AVAILABLE_MEMORY 0x00000001 --#define CSMI_SAS_RAID_RULE_OVERLAPPED_EXTENTS 0x00000002 -- --// RAID Cache Ratios Supported --// (bCacheRatiosSupported) --// from 0 to 100 defines the write to read ratio, 0 is 100% write --#define CSMI_SAS_RAID_CACHE_RATIO_RANGE 101 --#define CSMI_SAS_RAID_CACHE_RATIO_FIXED 102 --#define CSMI_SAS_RAID_CACHE_RATIO_AUTO 103 --#define CSMI_SAS_RAID_CACHE_RATIO_END 255 -- --// RAID Cache Ratio Flag --// (bCacheRatioFlag) --#define CSMI_SAS_RAID_CACHE_RATIO_DISABLE 0 --#define CSMI_SAS_RAID_CACHE_RATIO_ENABLE 1 -- --// RAID Clear Configuration Signature --// (bClearConfiguration) --#define CSMI_SAS_RAID_CLEAR_CONFIGURATION_SIGNATURE "RAIDCLR" -- --// RAID Failure Codes --// (uFailureCode) --#define CSMI_SAS_FAIL_CODE_OK 0 --#define CSMI_SAS_FAIL_CODE_PARAMETER_INVALID 1000 --#define CSMI_SAS_FAIL_CODE_TRANSFORM_PRIORITY_INVALID 1001 --#define CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID 1002 --#define CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID 1003 --#define CSMI_SAS_FAIL_CODE_SURFACE_SCAN_INVALID 1004 --#define CSMI_SAS_FAIL_CODE_CLEAR_CONFIGURATION_INVALID 1005 --#define CSMI_SAS_FAIL_CODE_ELEMENT_INDEX_INVALID 1006 --#define CSMI_SAS_FAIL_CODE_SUBELEMENT_INDEX_INVALID 1007 --#define CSMI_SAS_FAIL_CODE_EXTENT_INVALID 1008 --#define CSMI_SAS_FAIL_CODE_BLOCK_COUNT_INVALID 1009 --#define CSMI_SAS_FAIL_CODE_DRIVE_INDEX_INVALID 1010 --#define CSMI_SAS_FAIL_CODE_EXISTING_LUN_INVALID 1011 --#define CSMI_SAS_FAIL_CODE_RAID_TYPE_INVALID 1012 --#define CSMI_SAS_FAIL_CODE_STRIPE_SIZE_INVALID 1013 --#define CSMI_SAS_FAIL_CODE_TRANSFORMATION_INVALID 1014 --#define CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID 1015 --#define CSMI_SAS_FAIL_CODE_ENUMERATION_TYPE_INVALID 1016 -- --#define CSMI_SAS_FAIL_CODE_EXCEEDED_RAID_SET_COUNT 2000 --#define CSMI_SAS_FAIL_CODE_DUPLICATE_LUN 2001 -- --#define CSMI_SAS_FAIL_CODE_WAIT_FOR_OPERATION 3000 -- --// RAID Enumeration Types --// (uEnumerationType) --#define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE 0 --#define CSMI_SAS_RAID_ELEMENT_TYPE_MODULE 1 --#define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE_RAID_SET 2 --#define CSMI_SAS_RAID_ELEMENT_TYPE_EXTENT_DRIVE 3 -- --// RAID Extent Types --// (bExtentType) --#define CSMI_SAS_RAID_EXTENT_RESERVED 0 --#define CSMI_SAS_RAID_EXTENT_METADATA 1 --#define CSMI_SAS_RAID_EXTENT_ALLOCATED 2 --#define CSMI_SAS_RAID_EXTENT_UNALLOCATED 3 -- --// RAID Operation Types --// (uOperationType) --#define CSMI_SAS_RAID_SET_CREATE 0 --#define CSMI_SAS_RAID_SET_LABEL 1 --#define CSMI_SAS_RAID_SET_TRANSFORM 2 --#define CSMI_SAS_RAID_SET_DELETE 3 --#define CSMI_SAS_RAID_SET_WRITE_PROTECT 4 --#define CSMI_SAS_RAID_SET_CACHE 5 --#define CSMI_SAS_RAID_SET_ONLINE_STATE 6 --#define CSMI_SAS_RAID_SET_SPARE 7 -- --// RAID Transform Types --// (bTransformType) --#define CSMI_SAS_RAID_SET_TRANSFORM_SPLIT_MIRROR 0 --#define CSMI_SAS_RAID_SET_TRANSFORM_MERGE_RAID_0 1 --#define CSMI_SAS_RAID_SET_TRANSFORM_LUN_RENUMBER 2 --#define CSMI_SAS_RAID_SET_TRANSFORM_RAID_SET 3 -- --// RAID Online State --// (bOnlineState) --#define CSMI_SAS_RAID_SET_STATE_UNKNOWN 0 --#define CSMI_SAS_RAID_SET_STATE_ONLINE 1 --#define CSMI_SAS_RAID_SET_STATE_OFFLINE 2 -- --/* * * * * * * * * * SAS HBA Class IOCTL Constants * * * * * * * * * */ -- --// Return codes for SAS IOCTL's --// (IoctlHeader.ReturnCode) -- --#define CSMI_SAS_PHY_INFO_CHANGED CSMI_SAS_STATUS_SUCCESS --#define CSMI_SAS_PHY_INFO_NOT_CHANGEABLE 2000 --#define CSMI_SAS_LINK_RATE_OUT_OF_RANGE 2001 -- --#define CSMI_SAS_PHY_DOES_NOT_EXIST 2002 --#define CSMI_SAS_PHY_DOES_NOT_MATCH_PORT 2003 --#define CSMI_SAS_PHY_CANNOT_BE_SELECTED 2004 --#define CSMI_SAS_SELECT_PHY_OR_PORT 2005 --#define CSMI_SAS_PORT_DOES_NOT_EXIST 2006 --#define CSMI_SAS_PORT_CANNOT_BE_SELECTED 2007 --#define CSMI_SAS_CONNECTION_FAILED 2008 -- --#define CSMI_SAS_NO_SATA_DEVICE 2009 --#define CSMI_SAS_NO_SATA_SIGNATURE 2010 --#define CSMI_SAS_SCSI_EMULATION 2011 --#define CSMI_SAS_NOT_AN_END_DEVICE 2012 --#define CSMI_SAS_NO_SCSI_ADDRESS 2013 --#define CSMI_SAS_NO_DEVICE_ADDRESS 2014 -- --// Signature value --// (IoctlHeader.Signature) -- --#define CSMI_SAS_SIGNATURE "CSMISAS" -- --// Timeout value default of 60 seconds --// (IoctlHeader.Timeout) -- --#define CSMI_SAS_TIMEOUT 60 -- --// Device types --// (bDeviceType) -- --#define CSMI_SAS_PHY_UNUSED 0x00 --#define CSMI_SAS_NO_DEVICE_ATTACHED 0x00 --#define CSMI_SAS_END_DEVICE 0x10 --#define CSMI_SAS_EDGE_EXPANDER_DEVICE 0x20 --#define CSMI_SAS_FANOUT_EXPANDER_DEVICE 0x30 -- --// Protocol options --// (bInitiatorPortProtocol, bTargetPortProtocol) -- --#define CSMI_SAS_PROTOCOL_SATA 0x01 --#define CSMI_SAS_PROTOCOL_SMP 0x02 --#define CSMI_SAS_PROTOCOL_STP 0x04 --#define CSMI_SAS_PROTOCOL_SSP 0x08 -- --// Negotiated and hardware link rates --// (bNegotiatedLinkRate, bMinimumLinkRate, bMaximumLinkRate) -- --#define CSMI_SAS_LINK_RATE_UNKNOWN 0x00 --#define CSMI_SAS_PHY_DISABLED 0x01 --#define CSMI_SAS_LINK_RATE_FAILED 0x02 --#define CSMI_SAS_SATA_SPINUP_HOLD 0x03 --#define CSMI_SAS_SATA_PORT_SELECTOR 0x04 --#define CSMI_SAS_LINK_RATE_1_5_GBPS 0x08 --#define CSMI_SAS_LINK_RATE_3_0_GBPS 0x09 --#define CSMI_SAS_LINK_VIRTUAL 0x10 -- --// Discover state --// (bAutoDiscover) -- --#define CSMI_SAS_DISCOVER_NOT_SUPPORTED 0x00 --#define CSMI_SAS_DISCOVER_NOT_STARTED 0x01 --#define CSMI_SAS_DISCOVER_IN_PROGRESS 0x02 --#define CSMI_SAS_DISCOVER_COMPLETE 0x03 --#define CSMI_SAS_DISCOVER_ERROR 0x04 -- --// Phy features -- --#define CSMI_SAS_PHY_VIRTUAL_SMP 0x01 -- --// Programmed link rates --// (bMinimumLinkRate, bMaximumLinkRate) --// (bProgrammedMinimumLinkRate, bProgrammedMaximumLinkRate) -- --#define CSMI_SAS_PROGRAMMED_LINK_RATE_UNCHANGED 0x00 --#define CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS 0x08 --#define CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS 0x09 -- --// Link rate --// (bNegotiatedLinkRate in CSMI_SAS_SET_PHY_INFO) -- --#define CSMI_SAS_LINK_RATE_NEGOTIATE 0x00 --#define CSMI_SAS_LINK_RATE_PHY_DISABLED 0x01 -- --// Signal class --// (bSignalClass in CSMI_SAS_SET_PHY_INFO) -- --#define CSMI_SAS_SIGNAL_CLASS_UNKNOWN 0x00 --#define CSMI_SAS_SIGNAL_CLASS_DIRECT 0x01 --#define CSMI_SAS_SIGNAL_CLASS_SERVER 0x02 --#define CSMI_SAS_SIGNAL_CLASS_ENCLOSURE 0x03 -- --// Link error reset --// (bResetCounts) -- --#define CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS 0x00 --#define CSMI_SAS_LINK_ERROR_RESET_COUNTS 0x01 -- --// Phy identifier --// (bPhyIdentifier) -- --#define CSMI_SAS_USE_PORT_IDENTIFIER 0xFF -- --// Port identifier --// (bPortIdentifier) -- --#define CSMI_SAS_IGNORE_PORT 0xFF -- --// Programmed link rates --// (bConnectionRate) -- --#define CSMI_SAS_LINK_RATE_NEGOTIATED 0x00 --#define CSMI_SAS_LINK_RATE_1_5_GBPS 0x08 --#define CSMI_SAS_LINK_RATE_3_0_GBPS 0x09 -- --// Connection status --// (bConnectionStatus) -- --#define CSMI_SAS_OPEN_ACCEPT 0 --#define CSMI_SAS_OPEN_REJECT_BAD_DESTINATION 1 --#define CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED 2 --#define CSMI_SAS_OPEN_REJECT_NO_DESTINATION 3 --#define CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED 4 --#define CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED 5 --#define CSMI_SAS_OPEN_REJECT_RESERVE_ABANDON 6 --#define CSMI_SAS_OPEN_REJECT_RESERVE_CONTINUE 7 --#define CSMI_SAS_OPEN_REJECT_RESERVE_INITIALIZE 8 --#define CSMI_SAS_OPEN_REJECT_RESERVE_STOP 9 --#define CSMI_SAS_OPEN_REJECT_RETRY 10 --#define CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY 11 --#define CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION 12 -- --// SSP Status --// (bSSPStatus) -- --#define CSMI_SAS_SSP_STATUS_UNKNOWN 0x00 --#define CSMI_SAS_SSP_STATUS_WAITING 0x01 --#define CSMI_SAS_SSP_STATUS_COMPLETED 0x02 --#define CSMI_SAS_SSP_STATUS_FATAL_ERROR 0x03 --#define CSMI_SAS_SSP_STATUS_RETRY 0x04 --#define CSMI_SAS_SSP_STATUS_NO_TAG 0x05 -- --// SSP Flags --// (uFlags) -- --#define CSMI_SAS_SSP_READ 0x00000001 --#define CSMI_SAS_SSP_WRITE 0x00000002 --#define CSMI_SAS_SSP_UNSPECIFIED 0x00000004 -- --#define CSMI_SAS_SSP_TASK_ATTRIBUTE_SIMPLE 0x00000000 --#define CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE 0x00000010 --#define CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED 0x00000020 --#define CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA 0x00000040 -- --// SSP Data present --// (bDataPresent) -- --#define CSMI_SAS_SSP_NO_DATA_PRESENT 0x00 --#define CSMI_SAS_SSP_RESPONSE_DATA_PRESENT 0x01 --#define CSMI_SAS_SSP_SENSE_DATA_PRESENT 0x02 -- --// STP Flags --// (uFlags) -- --#define CSMI_SAS_STP_READ 0x00000001 --#define CSMI_SAS_STP_WRITE 0x00000002 --#define CSMI_SAS_STP_UNSPECIFIED 0x00000004 --#define CSMI_SAS_STP_PIO 0x00000010 --#define CSMI_SAS_STP_DMA 0x00000020 --#define CSMI_SAS_STP_PACKET 0x00000040 --#define CSMI_SAS_STP_DMA_QUEUED 0x00000080 --#define CSMI_SAS_STP_EXECUTE_DIAG 0x00000100 --#define CSMI_SAS_STP_RESET_DEVICE 0x00000200 -- --// Task Management Flags --// (uFlags) -- --#define CSMI_SAS_TASK_IU 0x00000001 --#define CSMI_SAS_HARD_RESET_SEQUENCE 0x00000002 --#define CSMI_SAS_SUPPRESS_RESULT 0x00000004 -- --// Task Management Functions --// (bTaskManagement) -- --#define CSMI_SAS_SSP_ABORT_TASK 0x01 --#define CSMI_SAS_SSP_ABORT_TASK_SET 0x02 --#define CSMI_SAS_SSP_CLEAR_TASK_SET 0x04 --#define CSMI_SAS_SSP_LOGICAL_UNIT_RESET 0x08 --#define CSMI_SAS_SSP_CLEAR_ACA 0x40 --#define CSMI_SAS_SSP_QUERY_TASK 0x80 -- --// Task Management Information --// (uInformation) -- --#define CSMI_SAS_SSP_TEST 1 --#define CSMI_SAS_SSP_EXCEEDED 2 --#define CSMI_SAS_SSP_DEMAND 3 --#define CSMI_SAS_SSP_TRIGGER 4 -- --// Connector Pinout Information --// (uPinout) -- --#define CSMI_SAS_CON_UNKNOWN 0x00000001 --#define CSMI_SAS_CON_SFF_8482 0x00000002 --#define CSMI_SAS_CON_SFF_8470_LANE_1 0x00000100 --#define CSMI_SAS_CON_SFF_8470_LANE_2 0x00000200 --#define CSMI_SAS_CON_SFF_8470_LANE_3 0x00000400 --#define CSMI_SAS_CON_SFF_8470_LANE_4 0x00000800 --#define CSMI_SAS_CON_SFF_8484_LANE_1 0x00010000 --#define CSMI_SAS_CON_SFF_8484_LANE_2 0x00020000 --#define CSMI_SAS_CON_SFF_8484_LANE_3 0x00040000 --#define CSMI_SAS_CON_SFF_8484_LANE_4 0x00080000 -- --// Connector Location Information --// (bLocation) -- --// same as uPinout above... --// #define CSMI_SAS_CON_UNKNOWN 0x01 --#define CSMI_SAS_CON_INTERNAL 0x02 --#define CSMI_SAS_CON_EXTERNAL 0x04 --#define CSMI_SAS_CON_SWITCHABLE 0x08 --#define CSMI_SAS_CON_AUTO 0x10 --#define CSMI_SAS_CON_NOT_PRESENT 0x20 --#define CSMI_SAS_CON_NOT_CONNECTED 0x80 -- --// Device location identification --// (bIdentify) -- --#define CSMI_SAS_LOCATE_UNKNOWN 0x00 --#define CSMI_SAS_LOCATE_FORCE_OFF 0x01 --#define CSMI_SAS_LOCATE_FORCE_ON 0x02 -- --// Location Valid flags --// (uLocationFlags) -- --#define CSMI_SAS_LOCATE_SAS_ADDRESS_VALID 0x00000001 --#define CSMI_SAS_LOCATE_SAS_LUN_VALID 0x00000002 --#define CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID 0x00000004 --#define CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID 0x00000008 --#define CSMI_SAS_LOCATE_BAY_PREFIX_VALID 0x00000010 --#define CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID 0x00000020 --#define CSMI_SAS_LOCATE_LOCATION_STATE_VALID 0x00000040 -- --/* * * * * * * * SAS Phy Control Class IOCTL Constants * * * * * * * * */ -- --// Return codes for SAS Phy Control IOCTL's --// (IoctlHeader.ReturnCode) -- --// Signature value --// (IoctlHeader.Signature) -- --#define CSMI_PHY_SIGNATURE "CSMIPHY" -- --// Phy Control Functions --// (bFunction) -- --// values 0x00 to 0xFF are consistent in definition with the SMP PHY CONTROL --// function defined in the SAS spec --#define CSMI_SAS_PC_NOP 0x00000000 --#define CSMI_SAS_PC_LINK_RESET 0x00000001 --#define CSMI_SAS_PC_HARD_RESET 0x00000002 --#define CSMI_SAS_PC_PHY_DISABLE 0x00000003 --// 0x04 to 0xFF reserved... --#define CSMI_SAS_PC_GET_PHY_SETTINGS 0x00000100 -- --// Link Flags --#define CSMI_SAS_PHY_ACTIVATE_CONTROL 0x00000001 --#define CSMI_SAS_PHY_UPDATE_SPINUP_RATE 0x00000002 --#define CSMI_SAS_PHY_AUTO_COMWAKE 0x00000004 -- --// Device Types for Phy Settings --// (bType) --#define CSMI_SAS_UNDEFINED 0x00 --#define CSMI_SAS_SATA 0x01 --#define CSMI_SAS_SAS 0x02 -- --// Transmitter Flags --// (uTransmitterFlags) --#define CSMI_SAS_PHY_PREEMPHASIS_DISABLED 0x00000001 -- --// Receiver Flags --// (uReceiverFlags) --#define CSMI_SAS_PHY_EQUALIZATION_DISABLED 0x00000001 -- --// Pattern Flags --// (uPatternFlags) --// #define CSMI_SAS_PHY_ACTIVATE_CONTROL 0x00000001 --#define CSMI_SAS_PHY_DISABLE_SCRAMBLING 0x00000002 --#define CSMI_SAS_PHY_DISABLE_ALIGN 0x00000004 --#define CSMI_SAS_PHY_DISABLE_SSC 0x00000008 -- --#define CSMI_SAS_PHY_FIXED_PATTERN 0x00000010 --#define CSMI_SAS_PHY_USER_PATTERN 0x00000020 -- --// Fixed Patterns --// (bFixedPattern) --#define CSMI_SAS_PHY_CJPAT 0x00000001 --#define CSMI_SAS_PHY_ALIGN 0x00000002 -- --// Type Flags --// (bTypeFlags) --#define CSMI_SAS_PHY_POSITIVE_DISPARITY 0x01 --#define CSMI_SAS_PHY_NEGATIVE_DISPARITY 0x02 --#define CSMI_SAS_PHY_CONTROL_CHARACTER 0x04 -- --// Miscellaneous --#define SLOT_NUMBER_UNKNOWN 0xFFFF -- --/*************************************************************************/ --/* DATA STRUCTURES */ --/*************************************************************************/ -- --/* * * * * * * * * * Class Independent Structures * * * * * * * * * */ -- --// EDM #pragma CSMI_SAS_BEGIN_PACK(8) --#pragma pack(8) -- --// CC_CSMI_SAS_DRIVER_INFO -- --typedef struct _CSMI_SAS_DRIVER_INFO { -- __u8 szName[81]; -- __u8 szDescription[81]; -- __u16 usMajorRevision; -- __u16 usMinorRevision; -- __u16 usBuildRevision; -- __u16 usReleaseRevision; -- __u16 usCSMIMajorRevision; -- __u16 usCSMIMinorRevision; --} CSMI_SAS_DRIVER_INFO, -- *PCSMI_SAS_DRIVER_INFO; -- --typedef struct _CSMI_SAS_DRIVER_INFO_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_DRIVER_INFO Information; --} CSMI_SAS_DRIVER_INFO_BUFFER, -- *PCSMI_SAS_DRIVER_INFO_BUFFER; -- --// CC_CSMI_SAS_CNTLR_CONFIGURATION -- --typedef struct _CSMI_SAS_PCI_BUS_ADDRESS { -- __u8 bBusNumber; -- __u8 bDeviceNumber; -- __u8 bFunctionNumber; -- __u8 bReserved; --} CSMI_SAS_PCI_BUS_ADDRESS, -- *PCSMI_SAS_PCI_BUS_ADDRESS; -- --typedef union _CSMI_SAS_IO_BUS_ADDRESS { -- CSMI_SAS_PCI_BUS_ADDRESS PciAddress; -- __u8 bReserved[32]; --} CSMI_SAS_IO_BUS_ADDRESS, -- *PCSMI_SAS_IO_BUS_ADDRESS; -- --typedef struct _CSMI_SAS_CNTLR_CONFIG { -- __u32 uBaseIoAddress; -- struct { -- __u32 uLowPart; -- __u32 uHighPart; -- } BaseMemoryAddress; -- __u32 uBoardID; -- __u16 usSlotNumber; -- __u8 bControllerClass; -- __u8 bIoBusType; -- CSMI_SAS_IO_BUS_ADDRESS BusAddress; -- __u8 szSerialNumber[81]; -- __u16 usMajorRevision; -- __u16 usMinorRevision; -- __u16 usBuildRevision; -- __u16 usReleaseRevision; -- __u16 usBIOSMajorRevision; -- __u16 usBIOSMinorRevision; -- __u16 usBIOSBuildRevision; -- __u16 usBIOSReleaseRevision; -- __u32 uControllerFlags; -- __u16 usRromMajorRevision; -- __u16 usRromMinorRevision; -- __u16 usRromBuildRevision; -- __u16 usRromReleaseRevision; -- __u16 usRromBIOSMajorRevision; -- __u16 usRromBIOSMinorRevision; -- __u16 usRromBIOSBuildRevision; -- __u16 usRromBIOSReleaseRevision; -- __u8 bReserved[7]; --} CSMI_SAS_CNTLR_CONFIG, -- *PCSMI_SAS_CNTLR_CONFIG; -- --typedef struct _CSMI_SAS_CNTLR_CONFIG_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_CNTLR_CONFIG Configuration; --} CSMI_SAS_CNTLR_CONFIG_BUFFER, -- *PCSMI_SAS_CNTLR_CONFIG_BUFFER; -- --// CC_CSMI_SAS_CNTLR_STATUS -- --typedef struct _CSMI_SAS_CNTLR_STATUS { -- __u32 uStatus; -- __u32 uOfflineReason; -- __u8 bReserved[28]; --} CSMI_SAS_CNTLR_STATUS, -- *PCSMI_SAS_CNTLR_STATUS; -- --typedef struct _CSMI_SAS_CNTLR_STATUS_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_CNTLR_STATUS Status; --} CSMI_SAS_CNTLR_STATUS_BUFFER, -- *PCSMI_SAS_CNTLR_STATUS_BUFFER; -- --// CC_CSMI_SAS_FIRMWARE_DOWNLOAD -- --typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD { -- __u32 uBufferLength; -- __u32 uDownloadFlags; -- __u8 bReserved[32]; -- __u16 usStatus; -- __u16 usSeverity; --} CSMI_SAS_FIRMWARE_DOWNLOAD, -- *PCSMI_SAS_FIRMWARE_DOWNLOAD; -- --typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_FIRMWARE_DOWNLOAD Information; -- __u8 bDataBuffer[1]; --} CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER, -- *PCSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER; -- --// CC_CSMI_SAS_RAID_INFO -- --typedef struct _CSMI_SAS_RAID_INFO { -- __u32 uNumRaidSets; -- __u32 uMaxDrivesPerSet; -- __u32 uMaxRaidSets; -- __u8 bMaxRaidTypes; -- __u8 bReservedByteFields[7]; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulMinRaidSetBlocks; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulMaxRaidSetBlocks; -- __u32 uMaxPhysicalDrives; -- __u32 uMaxExtents; -- __u32 uMaxModules; -- __u32 uMaxTransformationMemory; -- __u32 uChangeCount; -- __u8 bReserved[44]; --} CSMI_SAS_RAID_INFO, -- *PCSMI_SAS_RAID_INFO; -- --typedef struct _CSMI_SAS_RAID_INFO_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_RAID_INFO Information; --} CSMI_SAS_RAID_INFO_BUFFER, -- *PCSMI_SAS_RAID_INFO_BUFFER; -- --// CC_CSMI_SAS_GET_RAID_CONFIG -- --typedef struct _CSMI_SAS_RAID_DRIVES { -- __u8 bModel[40]; -- __u8 bFirmware[8]; -- __u8 bSerialNumber[40]; -- __u8 bSASAddress[8]; -- __u8 bSASLun[8]; -- __u8 bDriveStatus; -- __u8 bDriveUsage; -- __u16 usBlockSize; -- __u8 bDriveType; -- __u8 bReserved[15]; -- __u32 uDriveIndex; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulTotalUserBlocks; --} CSMI_SAS_RAID_DRIVES, -- *PCSMI_SAS_RAID_DRIVES; -- --typedef struct _CSMI_SAS_RAID_DEVICE_ID { -- __u8 bDeviceIdentificationVPDPage[1]; --} CSMI_SAS_RAID_DEVICE_ID, -- *PCSMI_SAS_RAID_DEVICE_ID; -- --typedef struct _CSMI_SAS_RAID_SET_ADDITIONAL_DATA { -- __u8 bLabel[16]; -- __u8 bRaidSetLun[8]; -- __u8 bWriteProtection; -- __u8 bCacheSetting; -- __u8 bCacheRatio; -- __u16 usBlockSize; -- __u8 bReservedBytes[11]; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulRaidSetExtentOffset; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulRaidSetBlocks; -- __u32 uStripeSizeInBlocks; -- __u32 uSectorsPerTrack; -- __u8 bApplicationScratchPad[16]; -- __u32 uNumberOfHeads; -- __u32 uNumberOfTracks; -- __u8 bReserved[24]; --} CSMI_SAS_RAID_SET_ADDITIONAL_DATA, -- *PCSMI_SAS_RAID_SET_ADDITIONAL_DATA; -- --typedef struct _CSMI_SAS_RAID_CONFIG { -- __u32 uRaidSetIndex; -- __u32 uCapacity; -- __u32 uStripeSize; -- __u8 bRaidType; -- __u8 bStatus; -- __u8 bInformation; -- __u8 bDriveCount; -- __u8 bDataType; -- __u8 bReserved[11]; -- __u32 uFailureCode; -- __u32 uChangeCount; -- union { -- CSMI_SAS_RAID_DRIVES Drives[1]; -- CSMI_SAS_RAID_DEVICE_ID DeviceId[1]; -- CSMI_SAS_RAID_SET_ADDITIONAL_DATA Data[1]; -- }; --} CSMI_SAS_RAID_CONFIG, -- *PCSMI_SAS_RAID_CONFIG; -- --typedef struct _CSMI_SAS_RAID_CONFIG_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_RAID_CONFIG Configuration; --} CSMI_SAS_RAID_CONFIG_BUFFER, -- *PCSMI_SAS_RAID_CONFIG_BUFFER; -- --// CC_CSMI_SAS_GET_RAID_FEATURES -- --typedef struct _CSMI_SAS_RAID_TYPE_DESCRIPTION { -- __u8 bRaidType; -- __u8 bReservedBytes[7]; -- __u32 uSupportedStripeSizeMap; -- __u8 bReserved[24]; --} CSMI_SAS_RAID_TYPE_DESCRIPTION, -- *PCSMI_SAS_RAID_TYPE_DESCRIPTION; -- --typedef struct _CSMI_SAS_RAID_FEATURES { -- __u32 uFeatures; -- __u8 bReservedFeatures[32]; -- __u8 bDefaultTransformPriority; -- __u8 bTransformPriority; -- __u8 bDefaultRebuildPriority; -- __u8 bRebuildPriority; -- __u8 bDefaultSurfaceScanPriority; -- __u8 bSurfaceScanPriority; -- __u16 usReserved; -- __u32 uRaidSetTransformationRules; -- __u32 uReserved[11]; -- CSMI_SAS_RAID_TYPE_DESCRIPTION RaidType[24]; -- __u8 bCacheRatiosSupported[104]; -- __u32 uChangeCount; -- __u32 uFailureCode; -- __u8 bReserved[120]; --} CSMI_SAS_RAID_FEATURES, -- *PCSMI_SAS_RAID_FEATURES; -- --typedef struct _CSMI_SAS_RAID_FEATURES_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_RAID_FEATURES Information; --} CSMI_SAS_RAID_FEATURES_BUFFER, -- *PCSMI_SAS_RAID_FEATURES_BUFFER; -- --// CC_CSMI_SAS_SET_RAID_CONTROL -- --typedef struct _CSMI_SAS_RAID_CONTROL { -- __u8 bTransformPriority; -- __u8 bRebuildPriority; -- __u8 bCacheRatioFlag; -- __u8 bCacheRatio; -- __u8 bSurfaceScanPriority; -- __u8 bReservedBytes[15]; -- __u8 bClearConfiguration[8]; -- __u32 uChangeCount; -- __u8 bReserved[88]; -- __u32 uFailureCode; -- __u8 bFailureDescription[80]; --} CSMI_SAS_RAID_CONTROL, -- *PCSMI_SAS_RAID_CONTROL; -- --typedef struct _CSMI_SAS_RAID_CONTROL_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_RAID_CONTROL Information; --} CSMI_SAS_RAID_CONTROL_BUFFER, -- *PCSMI_SAS_RAID_CONTROL_BUFFER; -- --// CC_CSMI_SAS_GET_RAID_ELEMENT -- --typedef struct _CSMI_SAS_DRIVE_EXTENT_INFO { -- __u32 uDriveIndex; -- __u8 bExtentType; -- __u8 bReservedBytes[7]; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulExtentOffset; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulExtentBlocks; -- __u32 uRaidSetIndex; -- __u8 bReserved[96]; --} CSMI_SAS_DRIVE_EXTENT_INFO, -- *PCSMI_SAS_DRIVE_EXTENT_INFO; -- --typedef struct _CSMI_SAS_RAID_MODULE_INFO { -- __u8 bReserved[128]; --} CSMI_SAS_RAID_MODULE_INFO, -- *PCSMI_SAS_RAID_MODULE_INFO; -- --typedef struct _CSMI_SAS_DRIVE_LOCATION { -- __u8 bConnector[16]; -- __u8 bBoxName[16]; -- __u32 uBay; -- __u8 bReservedBytes[4]; -- __u8 bAttachedSASAddress[8]; -- __u8 bAttachedPhyIdentifier; -- __u8 bReserved[79]; --} CSMI_SAS_DRIVE_LOCATION, -- *PCSMI_SAS_DRIVE_LOCATION; -- --typedef struct _CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA { -- __u8 bNegotiatedLinkRate[2]; -- __u8 bReserved[126]; --} CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA, -- *PCSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA; -- --typedef struct _CSMI_SAS_DRIVE_INFO { -- CSMI_SAS_RAID_DRIVES Device; -- CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA Data; -- CSMI_SAS_DRIVE_LOCATION Location; -- __u8 bReserved[16]; --} CSMI_SAS_DRIVE_INFO, -- *PCSMI_SAS_DRIVE_INFO; -- --typedef struct _CSMI_SAS_RAID_ELEMENT { -- __u32 uEnumerationType; -- __u32 uElementIndex; -- __u32 uNumElements; -- __u32 uChangeCount; -- __u32 uSubElementIndex; -- __u8 bReserved[32]; -- __u32 uFailureCode; -- __u8 bFailureDescription[80]; -- union { -- CSMI_SAS_DRIVE_INFO Drive; -- CSMI_SAS_RAID_MODULE_INFO Module; -- CSMI_SAS_DRIVE_EXTENT_INFO Extent; -- } Element; --} CSMI_SAS_RAID_ELEMENT, -- *PCSMI_SAS_RAID_ELEMENT; -- --typedef struct _CSMI_SAS_RAID_ELEMENT_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_RAID_ELEMENT Information; --} CSMI_SAS_RAID_ELEMENT_BUFFER, -- *PCSMI_SAS_RAID_ELEMENT_BUFFER; -- --// CC_CSMI_SAS_SET_RAID_OPERATION -- --typedef struct _CSMI_SAS_RAID_SET_LIST { -- __u32 uRaidSetIndex; -- __u8 bExistingLun[8]; -- __u8 bNewLun[8]; -- __u8 bReserved[12]; --} CSMI_SAS_RAID_SET_LIST, -- *PCSMI_SAS_RAID_SET_LIST; -- --typedef struct _CSMI_SAS_RAID_SET_DRIVE_LIST { -- __u32 uDriveIndex; -- __u8 bDriveUsage; -- __u8 bReserved[27]; --} CSMI_SAS_RAID_SET_DRIVE_LIST, -- *PCSMI_SAS_RAID_SET_DRIVE_LIST; -- --typedef struct _CSMI_SAS_RAID_SET_SPARE_INFO { -- __u32 uRaidSetIndex; -- __u32 uDriveCount; -- __u8 bApplicationScratchPad[16]; -- __u8 bReserved[104]; --} CSMI_SAS_RAID_SET_SPARE_INFO, -- *PCSMI_SAS_RAID_SET_SPARE_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_ONLINE_STATE_INFO { -- __u32 uRaidSetIndex; -- __u8 bOnlineState; -- __u8 bReserved[123]; --} CSMI_SAS_RAID_SET_ONLINE_STATE_INFO, -- *PCSMI_SAS_RAID_SET_ONLINE_STATE_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_CACHE_INFO { -- __u32 uRaidSetIndex; -- __u8 bCacheSetting; -- __u8 bCacheRatioFlag; -- __u8 bCacheRatio; -- __u8 bReserved[121]; --} CSMI_SAS_RAID_SET_CACHE_INFO, -- *PCSMI_SAS_RAID_SET_CACHE_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO { -- __u32 uRaidSetIndex; -- __u8 bWriteProtectSetting; -- __u8 bReserved[123]; --} CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO, -- *PCSMI_SAS_RAID_SET_WRITE_PROTECT_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_DELETE_INFO { -- __u32 uRaidSetIndex; -- __u8 bReserved[124]; --} CSMI_SAS_RAID_SET_DELETE_INFO, -- *PCSMI_SAS_RAID_SET_DELETE_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_MODIFY_INFO { -- __u8 bRaidType; -- __u8 bReservedBytes[7]; -- __u32 uStripeSize; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulRaidSetBlocks; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulRaidSetExtentOffset; -- __u32 uDriveCount; -- __u8 bReserved[96]; --} CSMI_SAS_RAID_SET_MODIFY_INFO, -- *PCSMI_SAS_RAID_SET_MODIFY_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_TRANSFORM_INFO { -- __u8 bTransformType; -- __u8 bReservedBytes[3]; -- __u32 uRaidSetIndex; -- __u8 bRaidType; -- __u8 bReservedBytes2[11]; -- __u32 uAdditionalRaidSetIndex; -- __u32 uRaidSetCount; -- __u8 bApplicationScratchPad[16]; -- CSMI_SAS_RAID_SET_MODIFY_INFO Modify; -- __u8 bReserved[80]; --} CSMI_SAS_RAID_SET_TRANSFORM_INFO, -- *PCSMI_SAS_RAID_SET_TRANSFORM_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_LABEL_INFO { -- __u32 uRaidSetIndex; -- __u8 bLabel[16]; -- __u8 bReserved[108]; --} CSMI_SAS_RAID_SET_LABEL_INFO, -- *PCSMI_SAS_RAID_SET_LABEL_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_CREATE_INFO { -- __u8 bRaidType; -- __u8 bReservedBytes[7]; -- __u32 uStripeSize; -- __u32 uTrackSectorCount; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulRaidSetBlocks; -- struct -- { -- __u32 uLowPart; -- __u32 uHighPart; -- } ulRaidSetExtentOffset; -- __u32 uDriveCount; -- __u8 bLabel[16]; -- __u32 uRaidSetIndex; -- __u8 bApplicationScratchPad[16]; -- __u32 uNumberOfHeads; -- __u32 uNumberOfTracks; -- __u8 bReserved[48]; --} CSMI_SAS_RAID_SET_CREATE_INFO, -- *PCSMI_SAS_RAID_SET_CREATE_INFO; -- --typedef struct _CSMI_SAS_RAID_SET_OPERATION { -- __u32 uOperationType; -- __u32 uChangeCount; -- __u32 uFailureCode; -- __u8 bFailureDescription[80]; -- __u8 bReserved[28]; -- union { -- CSMI_SAS_RAID_SET_CREATE_INFO Create; -- CSMI_SAS_RAID_SET_LABEL_INFO Label; -- CSMI_SAS_RAID_SET_TRANSFORM_INFO Transform; -- CSMI_SAS_RAID_SET_DELETE_INFO Delete; -- CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO Protect; -- CSMI_SAS_RAID_SET_CACHE_INFO Cache; -- CSMI_SAS_RAID_SET_ONLINE_STATE_INFO State; -- CSMI_SAS_RAID_SET_SPARE_INFO Spare; -- } Operation; -- union { -- CSMI_SAS_RAID_SET_DRIVE_LIST DriveList[1]; -- CSMI_SAS_RAID_SET_LIST RaidSetList[1]; -- } Parameters; --} CSMI_SAS_RAID_SET_OPERATION, -- *PCSMI_SAS_RAID_SET_OPERATION; -- --typedef struct _CSMI_SAS_RAID_SET_OPERATION_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_RAID_SET_OPERATION Information; --} CSMI_SAS_RAID_SET_OPERATION_BUFFER, -- *PCSMI_SAS_RAID_SET_OPERATION_BUFFER; -- --/* * * * * * * * * * SAS HBA Class Structures * * * * * * * * * */ -- --// CC_CSMI_SAS_GET_PHY_INFO -- --typedef struct _CSMI_SAS_IDENTIFY { -- __u8 bDeviceType; -- __u8 bRestricted; -- __u8 bInitiatorPortProtocol; -- __u8 bTargetPortProtocol; -- __u8 bRestricted2[8]; -- __u8 bSASAddress[8]; -- __u8 bPhyIdentifier; -- __u8 bSignalClass; -- __u8 bReserved[6]; --} CSMI_SAS_IDENTIFY, -- *PCSMI_SAS_IDENTIFY; -- --typedef struct _CSMI_SAS_PHY_ENTITY { -- CSMI_SAS_IDENTIFY Identify; -- __u8 bPortIdentifier; -- __u8 bNegotiatedLinkRate; -- __u8 bMinimumLinkRate; -- __u8 bMaximumLinkRate; -- __u8 bPhyChangeCount; -- __u8 bAutoDiscover; -- __u8 bPhyFeatures; -- __u8 bReserved; -- CSMI_SAS_IDENTIFY Attached; --} CSMI_SAS_PHY_ENTITY, -- *PCSMI_SAS_PHY_ENTITY; -- --typedef struct _CSMI_SAS_PHY_INFO { -- __u8 bNumberOfPhys; -- __u8 bReserved[3]; -- CSMI_SAS_PHY_ENTITY Phy[32]; --} CSMI_SAS_PHY_INFO, -- *PCSMI_SAS_PHY_INFO; -- --typedef struct _CSMI_SAS_PHY_INFO_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_PHY_INFO Information; --} CSMI_SAS_PHY_INFO_BUFFER, -- *PCSMI_SAS_PHY_INFO_BUFFER; -- --// CC_CSMI_SAS_SET_PHY_INFO -- --typedef struct _CSMI_SAS_SET_PHY_INFO { -- __u8 bPhyIdentifier; -- __u8 bNegotiatedLinkRate; -- __u8 bProgrammedMinimumLinkRate; -- __u8 bProgrammedMaximumLinkRate; -- __u8 bSignalClass; -- __u8 bReserved[3]; --} CSMI_SAS_SET_PHY_INFO, -- *PCSMI_SAS_SET_PHY_INFO; -- --typedef struct _CSMI_SAS_SET_PHY_INFO_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_SET_PHY_INFO Information; --} CSMI_SAS_SET_PHY_INFO_BUFFER, -- *PCSMI_SAS_SET_PHY_INFO_BUFFER; -- --// CC_CSMI_SAS_GET_LINK_ERRORS -- --typedef struct _CSMI_SAS_LINK_ERRORS { -- __u8 bPhyIdentifier; -- __u8 bResetCounts; -- __u8 bReserved[2]; -- __u32 uInvalidDwordCount; -- __u32 uRunningDisparityErrorCount; -- __u32 uLossOfDwordSyncCount; -- __u32 uPhyResetProblemCount; --} CSMI_SAS_LINK_ERRORS, -- *PCSMI_SAS_LINK_ERRORS; -- --typedef struct _CSMI_SAS_LINK_ERRORS_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_LINK_ERRORS Information; --} CSMI_SAS_LINK_ERRORS_BUFFER, -- *PCSMI_SAS_LINK_ERRORS_BUFFER; -- --// CC_CSMI_SAS_SMP_PASSTHRU -- --typedef struct _CSMI_SAS_SMP_REQUEST { -- __u8 bFrameType; -- __u8 bFunction; -- __u8 bReserved[2]; -- __u8 bAdditionalRequestBytes[1016]; --} CSMI_SAS_SMP_REQUEST, -- *PCSMI_SAS_SMP_REQUEST; -- --typedef struct _CSMI_SAS_SMP_RESPONSE { -- __u8 bFrameType; -- __u8 bFunction; -- __u8 bFunctionResult; -- __u8 bReserved; -- __u8 bAdditionalResponseBytes[1016]; --} CSMI_SAS_SMP_RESPONSE, -- *PCSMI_SAS_SMP_RESPONSE; -- --typedef struct _CSMI_SAS_SMP_PASSTHRU { -- __u8 bPhyIdentifier; -- __u8 bPortIdentifier; -- __u8 bConnectionRate; -- __u8 bReserved; -- __u8 bDestinationSASAddress[8]; -- __u32 uRequestLength; -- CSMI_SAS_SMP_REQUEST Request; -- __u8 bConnectionStatus; -- __u8 bReserved2[3]; -- __u32 uResponseBytes; -- CSMI_SAS_SMP_RESPONSE Response; --} CSMI_SAS_SMP_PASSTHRU, -- *PCSMI_SAS_SMP_PASSTHRU; -- --typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_SMP_PASSTHRU Parameters; --} CSMI_SAS_SMP_PASSTHRU_BUFFER, -- *PCSMI_SAS_SMP_PASSTHRU_BUFFER; -- --// CC_CSMI_SAS_SSP_PASSTHRU -- --typedef struct _CSMI_SAS_SSP_PASSTHRU { -- __u8 bPhyIdentifier; -- __u8 bPortIdentifier; -- __u8 bConnectionRate; -- __u8 bReserved; -- __u8 bDestinationSASAddress[8]; -- __u8 bLun[8]; -- __u8 bCDBLength; -- __u8 bAdditionalCDBLength; -- __u8 bReserved2[2]; -- __u8 bCDB[16]; -- __u32 uFlags; -- __u8 bAdditionalCDB[24]; -- __u32 uDataLength; --} CSMI_SAS_SSP_PASSTHRU, -- *PCSMI_SAS_SSP_PASSTHRU; -- --typedef struct _CSMI_SAS_SSP_PASSTHRU_STATUS { -- __u8 bConnectionStatus; -- __u8 bSSPStatus; -- __u8 bReserved[2]; -- __u8 bDataPresent; -- __u8 bStatus; -- __u8 bResponseLength[2]; -- __u8 bResponse[256]; -- __u32 uDataBytes; --} CSMI_SAS_SSP_PASSTHRU_STATUS, -- *PCSMI_SAS_SSP_PASSTHRU_STATUS; -- --typedef struct _CSMI_SAS_SSP_PASSTHRU_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_SSP_PASSTHRU Parameters; -- CSMI_SAS_SSP_PASSTHRU_STATUS Status; -- __u8 bDataBuffer[1]; --} CSMI_SAS_SSP_PASSTHRU_BUFFER, -- *PCSMI_SAS_SSP_PASSTHRU_BUFFER; -- --// CC_CSMI_SAS_STP_PASSTHRU -- --typedef struct _CSMI_SAS_STP_PASSTHRU { -- __u8 bPhyIdentifier; -- __u8 bPortIdentifier; -- __u8 bConnectionRate; -- __u8 bReserved; -- __u8 bDestinationSASAddress[8]; -- __u8 bReserved2[4]; -- __u8 bCommandFIS[20]; -- __u32 uFlags; -- __u32 uDataLength; --} CSMI_SAS_STP_PASSTHRU, -- *PCSMI_SAS_STP_PASSTHRU; -- --typedef struct _CSMI_SAS_STP_PASSTHRU_STATUS { -- __u8 bConnectionStatus; -- __u8 bReserved[3]; -- __u8 bStatusFIS[20]; -- __u32 uSCR[16]; -- __u32 uDataBytes; --} CSMI_SAS_STP_PASSTHRU_STATUS, -- *PCSMI_SAS_STP_PASSTHRU_STATUS; -- --typedef struct _CSMI_SAS_STP_PASSTHRU_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_STP_PASSTHRU Parameters; -- CSMI_SAS_STP_PASSTHRU_STATUS Status; -- __u8 bDataBuffer[1]; --} CSMI_SAS_STP_PASSTHRU_BUFFER, -- *PCSMI_SAS_STP_PASSTHRU_BUFFER; -- --// CC_CSMI_SAS_GET_SATA_SIGNATURE -- --typedef struct _CSMI_SAS_SATA_SIGNATURE { -- __u8 bPhyIdentifier; -- __u8 bReserved[3]; -- __u8 bSignatureFIS[20]; --} CSMI_SAS_SATA_SIGNATURE, -- *PCSMI_SAS_SATA_SIGNATURE; -- --typedef struct _CSMI_SAS_SATA_SIGNATURE_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_SATA_SIGNATURE Signature; --} CSMI_SAS_SATA_SIGNATURE_BUFFER, -- *PCSMI_SAS_SATA_SIGNATURE_BUFFER; -- --// CC_CSMI_SAS_GET_SCSI_ADDRESS -- --typedef struct _CSMI_SAS_GET_SCSI_ADDRESS_BUFFER { -- IOCTL_HEADER IoctlHeader; -- __u8 bSASAddress[8]; -- __u8 bSASLun[8]; -- __u8 bHostIndex; -- __u8 bPathId; -- __u8 bTargetId; -- __u8 bLun; --} CSMI_SAS_GET_SCSI_ADDRESS_BUFFER, -- *PCSMI_SAS_GET_SCSI_ADDRESS_BUFFER; -- --// CC_CSMI_SAS_GET_DEVICE_ADDRESS -- --typedef struct _CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER { -- IOCTL_HEADER IoctlHeader; -- __u8 bHostIndex; -- __u8 bPathId; -- __u8 bTargetId; -- __u8 bLun; -- __u8 bSASAddress[8]; -- __u8 bSASLun[8]; --} CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER, -- *PCSMI_SAS_GET_DEVICE_ADDRESS_BUFFER; -- --// CC_CSMI_SAS_TASK_MANAGEMENT -- --typedef struct _CSMI_SAS_SSP_TASK_IU { -- __u8 bHostIndex; -- __u8 bPathId; -- __u8 bTargetId; -- __u8 bLun; -- __u32 uFlags; -- __u32 uQueueTag; -- __u32 uReserved; -- __u8 bTaskManagementFunction; -- __u8 bReserved[7]; -- __u32 uInformation; --} CSMI_SAS_SSP_TASK_IU, -- *PCSMI_SAS_SSP_TASK_IU; -- --typedef struct _CSMI_SAS_SSP_TASK_IU_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_SSP_TASK_IU Parameters; -- CSMI_SAS_SSP_PASSTHRU_STATUS Status; --} CSMI_SAS_SSP_TASK_IU_BUFFER, -- *PCSMI_SAS_SSP_TASK_IU_BUFFER; -- --// CC_CSMI_SAS_GET_CONNECTOR_INFO -- --typedef struct _CSMI_SAS_GET_CONNECTOR_INFO { -- __u32 uPinout; -- __u8 bConnector[16]; -- __u8 bLocation; -- __u8 bReserved[15]; --} CSMI_SAS_CONNECTOR_INFO, -- *PCSMI_SAS_CONNECTOR_INFO; -- --typedef struct _CSMI_SAS_CONNECTOR_INFO_BUFFER { -- IOCTL_HEADER IoctlHeader; -- CSMI_SAS_CONNECTOR_INFO Reference[32]; --} CSMI_SAS_CONNECTOR_INFO_BUFFER, -- *PCSMI_SAS_CONNECTOR_INFO_BUFFER; -- --// CC_CSMI_SAS_GET_LOCATION -- --typedef struct _CSMI_SAS_LOCATION_IDENTIFIER { -- __u32 bLocationFlags; -- __u8 bSASAddress[8]; -- __u8 bSASLun[8]; -- __u8 bEnclosureIdentifier[8]; -- __u8 bEnclosureName[32]; -- __u8 bBayPrefix[32]; -- __u8 bBayIdentifier; -- __u8 bLocationState; -- __u8 bReserved[2]; --} CSMI_SAS_LOCATION_IDENTIFIER, -- *PCSMI_SAS_LOCATION_IDENTIFIER; -- --typedef struct _CSMI_SAS_GET_LOCATION_BUFFER { -- IOCTL_HEADER IoctlHeader; -- __u8 bHostIndex; -- __u8 bPathId; -- __u8 bTargetId; -- __u8 bLun; -- __u8 bIdentify; -- __u8 bNumberOfLocationIdentifiers; -- __u8 bLengthOfLocationIdentifier; -- CSMI_SAS_LOCATION_IDENTIFIER Location[1]; --} CSMI_SAS_GET_LOCATION_BUFFER, -- *PCSMI_SAS_GET_LOCATION_BUFFER; -- --// CC_CSMI_SAS_PHY_CONTROL -- --typedef struct _CSMI_SAS_CHARACTER { -- __u8 bTypeFlags; -- __u8 bValue; --} CSMI_SAS_CHARACTER, -- *PCSMI_SAS_CHARACTER; -- --typedef struct _CSMI_SAS_PHY_CONTROL { -- __u8 bType; -- __u8 bRate; -- __u8 bReserved[6]; -- __u32 uVendorUnique[8]; -- __u32 uTransmitterFlags; -- __i8 bTransmitAmplitude; -- __i8 bTransmitterPreemphasis; -- __i8 bTransmitterSlewRate; -- __i8 bTransmitterReserved[13]; -- __u8 bTransmitterVendorUnique[64]; -- __u32 uReceiverFlags; -- __i8 bReceiverThreshold; -- __i8 bReceiverEqualizationGain; -- __i8 bReceiverReserved[14]; -- __u8 bReceiverVendorUnique[64]; -- __u32 uPatternFlags; -- __u8 bFixedPattern; -- __u8 bUserPatternLength; -- __u8 bPatternReserved[6]; -- CSMI_SAS_CHARACTER UserPatternBuffer[16]; --} CSMI_SAS_PHY_CONTROL, -- *PCSMI_SAS_PHY_CONTROL; -- --typedef struct _CSMI_SAS_PHY_CONTROL_BUFFER { -- IOCTL_HEADER IoctlHeader; -- __u32 uFunction; -- __u8 bPhyIdentifier; -- __u16 usLengthOfControl; -- __u8 bNumberOfControls; -- __u8 bReserved[4]; -- __u32 uLinkFlags; -- __u8 bSpinupRate; -- __u8 bLinkReserved[7]; -- __u32 uVendorUnique[8]; -- CSMI_SAS_PHY_CONTROL Control[1]; --} CSMI_SAS_PHY_CONTROL_BUFFER, -- *PCSMI_SAS_PHY_CONTROL_BUFFER; -- --//EDM #pragma CSMI_SAS_END_PACK --#pragma pack() -- --#endif // _CSMI_SAS_H_ -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/csmisas.c linux-2.6.9-55.0.12/drivers/message/fusion/csmisas.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/csmisas.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/csmisas.c 2007-11-02 09:10:23.000000000 +0100 -@@ -0,0 +1,5095 @@ -+#define mptctl_is_this_sas_cntr(ioc) (ioc->bus_type == SAS) ? 1 : 0 -+ -+#ifndef TRUE -+#define TRUE (1) -+#endif -+#ifndef FALSE -+#define FALSE (0) -+#endif -+ -+#ifdef QUIESE_IO -+static int mptctl_raid_get_volume_id(MPT_ADAPTER *ioc, u8 PhysDiskNum, u8 *VolumeID, -+ u8 *VolumeBus); -+#endif -+static int mptctl_do_raid(MPT_ADAPTER *ioc, u8 action, u8 PhysDiskNum, u8 VolumeBus, -+ u8 VolumeId, pMpiRaidActionReply_t reply); -+static u8 map_sas_status_to_csmi(u8 mpi_sas_status); -+ -+static u64 reverse_byte_order64(u64 * data64) -+{ -+ int i; -+ u64 rc; -+ u8 * inWord = (u8 *)data64, * outWord = (u8 *)&rc; -+ -+ for (i=0;i<8;i++) outWord[i] = inWord[7-i]; -+ -+ return rc; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Routine for the CSMI Sas Get Driver Info command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_driver_info(unsigned long arg) -+{ -+ -+ CSMI_SAS_DRIVER_INFO_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_DRIVER_INFO_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to read in csmi_sas_get_driver_info_buffer struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Fill in the data and return the structure to the calling -+ * program -+ */ -+ memcpy( karg.Information.szName, MPT_MISCDEV_BASENAME, -+ sizeof(MPT_MISCDEV_BASENAME)); -+ memcpy( karg.Information.szDescription, MPT_CSMI_DESCRIPTION, -+ sizeof(MPT_CSMI_DESCRIPTION)); -+ -+ karg.Information.usMajorRevision = MPT_LINUX_MAJOR_VERSION; -+ karg.Information.usMinorRevision = MPT_LINUX_MINOR_VERSION; -+ karg.Information.usBuildRevision = MPT_LINUX_BUILD_VERSION; -+ karg.Information.usReleaseRevision = MPT_LINUX_RELEASE_VERSION; -+ -+ karg.Information.usCSMIMajorRevision = CSMI_MAJOR_REVISION; -+ karg.Information.usCSMIMinorRevision = CSMI_MINOR_REVISION; -+ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to write out csmi_sas_get_driver_info_buffer @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+} -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI_SAS_GET_CNTLR_CONFIG command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_cntlr_config(unsigned long arg) -+{ -+ -+ CSMI_SAS_CNTLR_CONFIG_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_CNTLR_CONFIG_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ int ii; -+ unsigned int reg; -+ u32 l; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CNTLR_CONFIG_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to read in csmi_sas_get_cntlr_config_buffer struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Clear the struct before filling in data. */ -+ memset( &karg.Configuration, 0, sizeof(CSMI_SAS_CNTLR_CONFIG)); -+ -+ /* Fill in the data and return the structure to the calling -+ * program -+ */ -+ -+ /* Get Base IO and Mem Mapped Addresses. */ -+ for(ii=0; ii < DEVICE_COUNT_RESOURCE; ii++) { -+ reg = PCI_BASE_ADDRESS_0 + (ii << 2); -+ pci_read_config_dword(ioc->pcidev, reg, &l); -+ -+ if ((l & PCI_BASE_ADDRESS_SPACE) == -+ PCI_BASE_ADDRESS_SPACE_MEMORY) { -+ karg.Configuration.BaseMemoryAddress.uLowPart = -+ l & PCI_BASE_ADDRESS_MEM_MASK; -+ } -+ else { -+ karg.Configuration.uBaseIoAddress = -+ l & PCI_BASE_ADDRESS_IO_MASK; -+ } -+ -+ if ((l & (PCI_BASE_ADDRESS_SPACE | -+ PCI_BASE_ADDRESS_MEM_TYPE_MASK)) -+ == (PCI_BASE_ADDRESS_SPACE_MEMORY | -+ PCI_BASE_ADDRESS_MEM_TYPE_64)) { -+ pci_read_config_dword(ioc->pcidev, reg+4, &l); -+ karg.Configuration.BaseMemoryAddress.uHighPart = l; -+ } -+ if ((l & PCI_BASE_ADDRESS_SPACE) == -+ PCI_BASE_ADDRESS_SPACE_MEMORY) { -+ break; -+ } -+ } -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) -+ karg.Configuration.uBoardID = (ioc->pcidev->subsystem_device << 16) | -+ (ioc->pcidev->subsystem_vendor); -+#endif -+ -+ karg.Configuration.usSlotNumber = -+ (ioc->pci_slot_number = 0xff) ? -+ SLOT_NUMBER_UNKNOWN : ioc->pci_slot_number; -+ karg.Configuration.bControllerClass = CSMI_SAS_CNTLR_CLASS_HBA; -+ karg.Configuration.bIoBusType = CSMI_SAS_BUS_TYPE_PCI; -+ karg.Configuration.BusAddress.PciAddress.bBusNumber = -+ ioc->pcidev->bus->number; -+ karg.Configuration.BusAddress.PciAddress.bDeviceNumber = -+ PCI_SLOT(ioc->pcidev->devfn); -+ karg.Configuration.BusAddress.PciAddress.bFunctionNumber = -+ PCI_FUNC(ioc->pcidev->devfn); -+ karg.Configuration.BusAddress.PciAddress.bReserved = 0; -+ memcpy( &karg.Configuration.szSerialNumber,ioc->BoardTracerNumber, 16 ); -+ karg.Configuration.usMajorRevision = ioc->facts.FWVersion.Struct.Major; -+ karg.Configuration.usMinorRevision = ioc->facts.FWVersion.Struct.Minor; -+ karg.Configuration.usBuildRevision = ioc->facts.FWVersion.Struct.Unit; -+ karg.Configuration.usReleaseRevision = ioc->facts.FWVersion.Struct.Dev; -+ karg.Configuration.usBIOSMajorRevision = -+ (ioc->biosVersion & 0xFF000000) >> 24; -+ karg.Configuration.usBIOSMinorRevision = -+ (ioc->biosVersion & 0x00FF0000) >> 16; -+ karg.Configuration.usBIOSBuildRevision = -+ (ioc->biosVersion & 0x0000FF00) >> 8; -+ karg.Configuration.usBIOSReleaseRevision = -+ (ioc->biosVersion & 0x000000FF); -+ karg.Configuration.uControllerFlags = -+ CSMI_SAS_CNTLR_SAS_HBA | CSMI_SAS_CNTLR_SAS_RAID | -+ CSMI_SAS_CNTLR_FWD_SUPPORT | CSMI_SAS_CNTLR_FWD_ONLINE | -+ CSMI_SAS_CNTLR_FWD_SRESET ; -+ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ /* All Rrom entries will be zero. Skip them. */ -+ /* bReserved will also be zeros. */ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to write out csmi_sas_get_driver_info_buffer @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI Sas Get Controller Status command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_cntlr_status(unsigned long arg) -+{ -+ -+ CSMI_SAS_CNTLR_STATUS_BUFFER __user *uarg = (void __user *) arg; -+ MPT_ADAPTER *ioc = NULL; -+ CSMI_SAS_CNTLR_STATUS_BUFFER karg; -+ int iocnum; -+ int rc; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CNTLR_STATUS_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to read in csmi_sas_get_cntlr_status_buffer struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Fill in the data and return the structure to the calling -+ * program -+ */ -+ -+ rc = mpt_GetIocState(ioc, 1); -+ switch (rc) { -+ case MPI_IOC_STATE_OPERATIONAL: -+ karg.Status.uStatus = CSMI_SAS_CNTLR_STATUS_GOOD; -+ karg.Status.uOfflineReason = 0; -+ break; -+ -+ case MPI_IOC_STATE_FAULT: -+ karg.Status.uStatus = CSMI_SAS_CNTLR_STATUS_FAILED; -+ karg.Status.uOfflineReason = 0; -+ break; -+ -+ case MPI_IOC_STATE_RESET: -+ case MPI_IOC_STATE_READY: -+ default: -+ karg.Status.uStatus = CSMI_SAS_CNTLR_STATUS_OFFLINE; -+ karg.Status.uOfflineReason = -+ CSMI_SAS_OFFLINE_REASON_INITIALIZING; -+ break; -+ } -+ -+ memset(&karg.Status.bReserved, 0, 28); -+ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_CNTLR_STATUS_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to write out csmi_sas_get_cntlr_status @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI Sas Get Phy Info command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_phy_info(unsigned long arg) -+{ -+ CSMI_SAS_PHY_INFO_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_PHY_INFO_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ ConfigExtendedPageHeader_t hdr; -+ CONFIGPARMS cfg; -+ SasIOUnitPage0_t *sasIoUnitPg0; -+ dma_addr_t sasIoUnitPg0_dma; -+ int sasIoUnitPg0_data_sz; -+ SasPhyPage0_t *sasPhyPg0; -+ dma_addr_t sasPhyPg0_dma; -+ int sasPhyPg0_data_sz; -+ u16 protocol; -+ int iocnum; -+ int rc; -+ int ii; -+ u64 SASAddress64; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ sasIoUnitPg0=NULL; -+ sasPhyPg0=NULL; -+ sasIoUnitPg0_data_sz=0; -+ sasPhyPg0_data_sz=0; -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_PHY_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to read in csmi_sas_get_phy_info_buffer struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Fill in the data and return the structure to the calling -+ * program -+ */ -+ memset( &karg.Information, 0, sizeof(CSMI_SAS_PHY_INFO)); -+ -+ /* Issue a config request to get the number of phys -+ */ -+ hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.pageAddr = 0; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk(( -+ ": FAILED: MPI_SASIOUNITPAGE0_PAGEVERSION: HEADER\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto sas_get_phy_info_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk((": hdr.ExtPageLength == 0\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto sas_get_phy_info_exit; -+ } -+ -+ sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4; -+ rc = -ENOMEM; -+ -+ sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev, -+ sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma); -+ -+ if (!sasIoUnitPg0) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto sas_get_phy_info_exit; -+ } -+ -+ memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz); -+ cfg.physAddr = sasIoUnitPg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk(( -+ ": FAILED: MPI_SASIOUNITPAGE0_PAGEVERSION: PAGE\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto sas_get_phy_info_exit; -+ } -+ -+ -+ /* Number of Phys. */ -+ karg.Information.bNumberOfPhys = sasIoUnitPg0->NumPhys; -+ -+ /* Fill in information for each phy. */ -+ for (ii = 0; ii < karg.Information.bNumberOfPhys; ii++) { -+ -+/* EDM : dump IO Unit Page 0 data*/ -+ dsasprintk(("---- IO UNIT PAGE 0 ------------\n")); -+ dsasprintk(("Handle=0x%X\n", -+ le16_to_cpu(sasIoUnitPg0->PhyData[ii].AttachedDeviceHandle))); -+ dsasprintk(("Controller Handle=0x%X\n", -+ le16_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerDevHandle))); -+ dsasprintk(("Port=0x%X\n", -+ sasIoUnitPg0->PhyData[ii].Port)); -+ dsasprintk(("Port Flags=0x%X\n", -+ sasIoUnitPg0->PhyData[ii].PortFlags)); -+ dsasprintk(("PHY Flags=0x%X\n", -+ sasIoUnitPg0->PhyData[ii].PhyFlags)); -+ dsasprintk(("Negotiated Link Rate=0x%X\n", -+ sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate)); -+ dsasprintk(("Controller PHY Device Info=0x%X\n", -+ le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo))); -+ dsasprintk(("DiscoveryStatus=0x%X\n", -+ le32_to_cpu(sasIoUnitPg0->PhyData[ii].DiscoveryStatus))); -+ dsasprintk(("\n")); -+/* EDM : debug data */ -+ -+ /* PHY stuff. */ -+ karg.Information.Phy[ii].bPortIdentifier = -+ sasIoUnitPg0->PhyData[ii].Port; -+ -+ /* Get the negotiated link rate for the phy. */ -+ switch (sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate) { -+ -+ case MPI_SAS_IOUNIT0_RATE_PHY_DISABLED: -+ karg.Information.Phy[ii].bNegotiatedLinkRate = -+ CSMI_SAS_PHY_DISABLED; -+ break; -+ -+ case MPI_SAS_IOUNIT0_RATE_FAILED_SPEED_NEGOTIATION: -+ karg.Information.Phy[ii].bNegotiatedLinkRate = -+ CSMI_SAS_LINK_RATE_FAILED; -+ break; -+ -+ case MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE: -+ break; -+ -+ case MPI_SAS_IOUNIT0_RATE_1_5: -+ karg.Information.Phy[ii].bNegotiatedLinkRate = -+ CSMI_SAS_LINK_RATE_1_5_GBPS; -+ break; -+ -+ case MPI_SAS_IOUNIT0_RATE_3_0: -+ karg.Information.Phy[ii].bNegotiatedLinkRate = -+ CSMI_SAS_LINK_RATE_3_0_GBPS; -+ break; -+ -+ case MPI_SAS_IOUNIT0_RATE_UNKNOWN: -+ default: -+ karg.Information.Phy[ii].bNegotiatedLinkRate = -+ CSMI_SAS_LINK_RATE_UNKNOWN; -+ break; -+ } -+ -+ if (sasIoUnitPg0->PhyData[ii].PortFlags & -+ MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS) { -+ karg.Information.Phy[ii].bAutoDiscover = -+ CSMI_SAS_DISCOVER_IN_PROGRESS; -+ } else { -+ karg.Information.Phy[ii].bAutoDiscover = -+ CSMI_SAS_DISCOVER_COMPLETE; -+ } -+ -+ /* Issue a config request to get -+ * phy information. -+ */ -+ hdr.PageVersion = MPI_SASPHY0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.pageAddr = ii; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ dctlprintk(( -+ ": FAILED: MPI_SASPHY0_PAGEVERSION: HEADER\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto sas_get_phy_info_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto sas_get_phy_info_exit; -+ } -+ -+ sasPhyPg0_data_sz = hdr.ExtPageLength * 4; -+ rc = -ENOMEM; -+ -+ sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent( -+ ioc->pcidev, sasPhyPg0_data_sz, &sasPhyPg0_dma); -+ -+ if (! sasPhyPg0) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto sas_get_phy_info_exit; -+ } -+ -+ memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz); -+ cfg.physAddr = sasPhyPg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ dctlprintk(( -+ ": FAILED: MPI_SASPHY0_PAGEVERSION: PAGE\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz, -+ (u8 *) sasPhyPg0, sasPhyPg0_dma); -+ goto sas_get_phy_info_exit; -+ } -+ -+ le64_to_cpus((u64 *)&sasPhyPg0->SASAddress); -+ memcpy(&SASAddress64, &sasPhyPg0->SASAddress, sizeof(u64)); -+ -+/* EDM : dump PHY Page 0 data*/ -+ dsasprintk(("---- SAS PHY PAGE 0 ------------\n")); -+ dsasprintk(("Handle=0x%X\n", -+ le16_to_cpu(sasPhyPg0->AttachedDevHandle))); -+ dsasprintk(("SAS Address=0x%llX\n",SASAddress64)); -+ dsasprintk(("Attached PHY Identifier=0x%X\n", -+ sasPhyPg0->AttachedPhyIdentifier)); -+ dsasprintk(("Attached Device Info=0x%X\n", -+ le32_to_cpu(sasPhyPg0->AttachedDeviceInfo))); -+ dsasprintk(("Programmed Link Rate=0x%X\n", -+ sasPhyPg0->ProgrammedLinkRate)); -+ dsasprintk(("Hardware Link Rate=0x%X\n", -+ ioc->sasPhyInfo[ii].hwLinkRate)); -+ dsasprintk(("Change Count=0x%X\n", -+ sasPhyPg0->ChangeCount)); -+ dsasprintk(("PHY Info=0x%X\n", -+ le32_to_cpu(sasPhyPg0->PhyInfo))); -+ dsasprintk(("\n")); -+/* EDM : debug data */ -+ -+ /* save the data */ -+ -+ /* Set Max hardware link rate. -+ * This value is hard coded -+ * because the HW link rate -+ * is currently being -+ * overwritten in FW. -+ */ -+ -+ /* Set Max hardware link rate. */ -+ switch (sasPhyPg0->HwLinkRate & -+ MPI_SAS_PHY0_PRATE_MAX_RATE_MASK) { -+ -+ case MPI_SAS_PHY0_HWRATE_MAX_RATE_1_5: -+ karg.Information.Phy[ii].bMaximumLinkRate = -+ CSMI_SAS_LINK_RATE_1_5_GBPS; -+ break; -+ -+ case MPI_SAS_PHY0_PRATE_MAX_RATE_3_0: -+ karg.Information.Phy[ii].bMaximumLinkRate = -+ CSMI_SAS_LINK_RATE_3_0_GBPS; -+ break; -+ default: -+ break; -+ } -+ -+ /* Set Max programmed link rate. */ -+ switch (sasPhyPg0->ProgrammedLinkRate & -+ MPI_SAS_PHY0_PRATE_MAX_RATE_MASK) { -+ -+ case MPI_SAS_PHY0_PRATE_MAX_RATE_1_5: -+ karg.Information.Phy[ii].bMaximumLinkRate |= -+ (CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS << 4); -+ break; -+ -+ case MPI_SAS_PHY0_PRATE_MAX_RATE_3_0: -+ karg.Information.Phy[ii].bMaximumLinkRate |= -+ (CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS << 4); -+ break; -+ default: -+ break; -+ } -+ -+ /* Set Min hardware link rate. */ -+ switch (sasPhyPg0->HwLinkRate & -+ MPI_SAS_PHY0_HWRATE_MIN_RATE_MASK) { -+ -+ case MPI_SAS_PHY0_HWRATE_MIN_RATE_1_5: -+ karg.Information.Phy[ii].bMinimumLinkRate = -+ CSMI_SAS_LINK_RATE_1_5_GBPS; -+ break; -+ -+ case MPI_SAS_PHY0_PRATE_MIN_RATE_3_0: -+ karg.Information.Phy[ii].bMinimumLinkRate = -+ CSMI_SAS_LINK_RATE_3_0_GBPS; -+ break; -+ default: -+ break; -+ } -+ -+ /* Set Min programmed link rate. */ -+ switch (sasPhyPg0->ProgrammedLinkRate & -+ MPI_SAS_PHY0_PRATE_MIN_RATE_MASK) { -+ -+ case MPI_SAS_PHY0_PRATE_MIN_RATE_1_5: -+ karg.Information.Phy[ii].bMinimumLinkRate |= -+ (CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS << 4); -+ break; -+ -+ case MPI_SAS_PHY0_PRATE_MIN_RATE_3_0: -+ karg.Information.Phy[ii].bMinimumLinkRate |= -+ (CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS << 4); -+ break; -+ default: -+ break; -+ } -+ -+ /* Fill in Attached Device -+ * Initiator Port Protocol. -+ * Bits 6:3 -+ * More than one bit can be set. -+ */ -+ protocol = le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & 0x78; -+ karg.Information.Phy[ii].Attached.bInitiatorPortProtocol = 0; -+ if (protocol & MPI_SAS_DEVICE_INFO_SSP_INITIATOR) -+ karg.Information.Phy[ii].Attached.bInitiatorPortProtocol = -+ CSMI_SAS_PROTOCOL_SSP; -+ if (protocol & MPI_SAS_DEVICE_INFO_STP_INITIATOR) -+ karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |= -+ CSMI_SAS_PROTOCOL_STP; -+ if (protocol & MPI_SAS_DEVICE_INFO_SMP_INITIATOR) -+ karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |= -+ CSMI_SAS_PROTOCOL_SMP; -+ if (protocol & MPI_SAS_DEVICE_INFO_SATA_HOST) -+ karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |= -+ CSMI_SAS_PROTOCOL_SATA; -+ -+ -+ /* Fill in Phy Target Port -+ * Protocol. Bits 10:7 -+ * More than one bit can be set. -+ */ -+ protocol = le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & 0x780; -+ karg.Information.Phy[ii].Attached.bTargetPortProtocol = 0; -+ if (protocol & MPI_SAS_DEVICE_INFO_SSP_TARGET) -+ karg.Information.Phy[ii].Attached.bTargetPortProtocol |= -+ CSMI_SAS_PROTOCOL_SSP; -+ if (protocol & MPI_SAS_DEVICE_INFO_STP_TARGET) -+ karg.Information.Phy[ii].Attached.bTargetPortProtocol |= -+ CSMI_SAS_PROTOCOL_STP; -+ if (protocol & MPI_SAS_DEVICE_INFO_SMP_TARGET) -+ karg.Information.Phy[ii].Attached.bTargetPortProtocol |= -+ CSMI_SAS_PROTOCOL_SMP; -+ if (protocol & MPI_SAS_DEVICE_INFO_SATA_DEVICE) -+ karg.Information.Phy[ii].Attached.bTargetPortProtocol |= -+ CSMI_SAS_PROTOCOL_SATA; -+ -+ -+ /* Fill in Attached device type */ -+ switch (le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & -+ MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) { -+ -+ case MPI_SAS_DEVICE_INFO_NO_DEVICE: -+ karg.Information.Phy[ii].Attached.bDeviceType = -+ CSMI_SAS_NO_DEVICE_ATTACHED; -+ break; -+ -+ case MPI_SAS_DEVICE_INFO_END_DEVICE: -+ karg.Information.Phy[ii].Attached.bDeviceType = -+ CSMI_SAS_END_DEVICE; -+ break; -+ -+ case MPI_SAS_DEVICE_INFO_EDGE_EXPANDER: -+ karg.Information.Phy[ii].Attached.bDeviceType = -+ CSMI_SAS_EDGE_EXPANDER_DEVICE; -+ break; -+ -+ case MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER: -+ karg.Information.Phy[ii].Attached.bDeviceType = -+ CSMI_SAS_FANOUT_EXPANDER_DEVICE; -+ break; -+ } -+ -+ /* Identify Info. */ -+ switch (le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) & -+ MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) { -+ -+ case MPI_SAS_DEVICE_INFO_NO_DEVICE: -+ karg.Information.Phy[ii].Identify.bDeviceType = -+ CSMI_SAS_NO_DEVICE_ATTACHED; -+ break; -+ -+ case MPI_SAS_DEVICE_INFO_END_DEVICE: -+ karg.Information.Phy[ii].Identify.bDeviceType = -+ CSMI_SAS_END_DEVICE; -+ break; -+ -+ case MPI_SAS_DEVICE_INFO_EDGE_EXPANDER: -+ karg.Information.Phy[ii].Identify.bDeviceType = -+ CSMI_SAS_EDGE_EXPANDER_DEVICE; -+ break; -+ -+ case MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER: -+ karg.Information.Phy[ii].Identify.bDeviceType = -+ CSMI_SAS_FANOUT_EXPANDER_DEVICE; -+ break; -+ } -+ -+ /* Fill in Phy Initiator Port Protocol. Bits 6:3 -+ * More than one bit can be set, fall through cases. -+ */ -+ protocol = le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) -+ & 0x78; -+ karg.Information.Phy[ii].Identify.bInitiatorPortProtocol = 0; -+ if( protocol & MPI_SAS_DEVICE_INFO_SSP_INITIATOR ) -+ karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |= -+ CSMI_SAS_PROTOCOL_SSP; -+ if( protocol & MPI_SAS_DEVICE_INFO_STP_INITIATOR ) -+ karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |= -+ CSMI_SAS_PROTOCOL_STP; -+ if( protocol & MPI_SAS_DEVICE_INFO_SMP_INITIATOR ) -+ karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |= -+ CSMI_SAS_PROTOCOL_SMP; -+ if( protocol & MPI_SAS_DEVICE_INFO_SATA_HOST ) -+ karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |= -+ CSMI_SAS_PROTOCOL_SATA; -+ -+ /* Fill in Phy Target Port Protocol. Bits 10:7 -+ * More than one bit can be set, fall through cases. -+ */ -+ protocol = le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) -+ & 0x780; -+ karg.Information.Phy[ii].Identify.bTargetPortProtocol = 0; -+ if( protocol & MPI_SAS_DEVICE_INFO_SSP_TARGET ) -+ karg.Information.Phy[ii].Identify.bTargetPortProtocol |= -+ CSMI_SAS_PROTOCOL_SSP; -+ if( protocol & MPI_SAS_DEVICE_INFO_STP_TARGET ) -+ karg.Information.Phy[ii].Identify.bTargetPortProtocol |= -+ CSMI_SAS_PROTOCOL_STP; -+ if( protocol & MPI_SAS_DEVICE_INFO_SMP_TARGET ) -+ karg.Information.Phy[ii].Identify.bTargetPortProtocol |= -+ CSMI_SAS_PROTOCOL_SMP; -+ if( protocol & MPI_SAS_DEVICE_INFO_SATA_DEVICE ) -+ karg.Information.Phy[ii].Identify.bTargetPortProtocol |= -+ CSMI_SAS_PROTOCOL_SATA; -+ -+ -+ /* Setup Identify SAS Address and Phy Identifier -+ * -+ * Get phy Sas address from device list. -+ * Search the list for the matching -+ * devHandle. -+ */ -+ -+ /* Setup SAS Address for the Phy */ -+ SASAddress64 = reverse_byte_order64((u64 *)&ioc->sasPhyInfo[ii].SASAddress); -+ memcpy(karg.Information.Phy[ii].Identify.bSASAddress,&SASAddress64, -+ sizeof(u64)); -+ -+ karg.Information.Phy[ii].Identify.bPhyIdentifier = ii; -+ -+ /* Setup SAS Address for the attached device */ -+ SASAddress64 = reverse_byte_order64((u64 *)&sasPhyPg0->SASAddress); -+ memcpy(karg.Information.Phy[ii].Attached.bSASAddress,&SASAddress64, -+ sizeof(u64)); -+ -+ karg.Information.Phy[ii].Attached.bPhyIdentifier = -+ sasPhyPg0->AttachedPhyIdentifier; -+ -+ pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz, -+ (u8 *) sasPhyPg0, sasPhyPg0_dma); -+ } -+ -+sas_get_phy_info_exit: -+ -+ if (sasIoUnitPg0) -+ pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz, -+ (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma); -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_PHY_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to write out csmi_sas_get_phy_info_buffer @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+} -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Set PHY Info command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_set_phy_info(unsigned long arg) -+{ -+ CSMI_SAS_SET_PHY_INFO_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_SET_PHY_INFO_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SET_PHY_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_set_phy_info struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+/* TODO - implement IOCTL here */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ dctlprintk((": not implemented\n")); -+ -+// cim_set_phy_info_exit: -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_SET_PHY_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_set_phy_info @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+ -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI Sas Get SCSI Address command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_scsi_address(unsigned long arg) -+{ -+ CSMI_SAS_GET_SCSI_ADDRESS_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_GET_SCSI_ADDRESS_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ sas_device_info_t *sasDevice; -+ u64 SASAddress64; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, -+ sizeof(CSMI_SAS_GET_SCSI_ADDRESS_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_scsi_address struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Fill in the data and return the structure to the calling -+ * program -+ */ -+ -+ /* Copy the SAS address in reverse byte order. */ -+ SASAddress64 = reverse_byte_order64((u64 *)&karg.bSASAddress); -+ -+ /* Search the list for the matching SAS address. */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_SCSI_ADDRESS; -+ list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) { -+ -+ /* Found the matching device. */ -+ if ((memcmp(&sasDevice->SASAddress, -+ &SASAddress64, sizeof(u64)) != 0)) -+ continue; -+ -+ karg.bPathId = sasDevice->Bus; -+ karg.bTargetId = sasDevice->TargetId; -+ karg.bLun = karg.bSASLun[0]; -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ if (((sasDevice->DeviceInfo & 0x00000003) == -+ MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER) || -+ ((sasDevice->DeviceInfo & 0x00000003) == -+ MPI_SAS_DEVICE_INFO_EDGE_EXPANDER)) -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_NOT_AN_END_DEVICE; -+ break; -+ } -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_GET_SCSI_ADDRESS_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_get_scsi_address @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+ -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI Sas Get SCSI Address command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_sata_signature(unsigned long arg) -+{ -+ CSMI_SAS_SATA_SIGNATURE_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_SATA_SIGNATURE_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ int rc, jj; -+ ConfigExtendedPageHeader_t hdr; -+ CONFIGPARMS cfg; -+ SasPhyPage0_t *sasPhyPg0; -+ dma_addr_t sasPhyPg0_dma; -+ int sasPhyPg0_data_sz; -+ SasDevicePage1_t *sasDevicePg1; -+ dma_addr_t sasDevicePg1_dma; -+ int sasDevicePg1_data_sz; -+ u8 phyId; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ sasPhyPg0=NULL; -+ sasPhyPg0_data_sz=0; -+ sasDevicePg1=NULL; -+ sasDevicePg1_data_sz=0; -+ -+ if (copy_from_user(&karg, uarg, -+ sizeof(CSMI_SAS_SATA_SIGNATURE_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_sata_signature struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ phyId = karg.Signature.bPhyIdentifier; -+ if (phyId >= ioc->numPhys) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_PHY_DOES_NOT_EXIST; -+ dctlprintk((": phyId >= ioc->numPhys\n")); -+ goto cim_sata_signature_exit; -+ } -+ -+ /* Default to success.*/ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ /* Issue a config request to get the devHandle of the attached device -+ */ -+ -+ /* Issue a config request to get phy information. */ -+ hdr.PageVersion = MPI_SASPHY0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.pageAddr = phyId; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk((": FAILED: MPI_SASPHY0_PAGEVERSION: HEADER\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sata_signature_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk((": hdr.ExtPageLength == 0\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sata_signature_exit; -+ } -+ -+ -+ sasPhyPg0_data_sz = hdr.ExtPageLength * 4; -+ rc = -ENOMEM; -+ -+ sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent(ioc->pcidev, -+ sasPhyPg0_data_sz, &sasPhyPg0_dma); -+ -+ if (! sasPhyPg0) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sata_signature_exit; -+ } -+ -+ memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz); -+ cfg.physAddr = sasPhyPg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk((": FAILED: MPI_SASPHY0_PAGEVERSION: PAGE\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sata_signature_exit; -+ } -+ -+ /* Make sure a SATA device is attached. */ -+ if ((le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & -+ MPI_SAS_DEVICE_INFO_SATA_DEVICE) == 0) { -+ dctlprintk((": NOT A SATA DEVICE\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_SATA_DEVICE; -+ goto cim_sata_signature_exit; -+ } -+ -+ /* Get device page 1 for FIS signature. */ -+ hdr.PageVersion = MPI_SASDEVICE1_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 1 /* page number 1 */; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ -+ cfg.pageAddr = ((MPI_SAS_DEVICE_PGAD_FORM_HANDLE << -+ MPI_SAS_DEVICE_PGAD_FORM_SHIFT) | -+ le16_to_cpu(sasPhyPg0->AttachedDevHandle)); -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ dctlprintk((": FAILED: MPI_SASDEVICE1_PAGEVERSION: HEADER\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sata_signature_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ dctlprintk((": hdr.ExtPageLength == 0\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sata_signature_exit; -+ } -+ -+ sasDevicePg1_data_sz = hdr.ExtPageLength * 4; -+ rc = -ENOMEM; -+ -+ sasDevicePg1 = (SasDevicePage1_t *) pci_alloc_consistent -+ (ioc->pcidev, sasDevicePg1_data_sz, &sasDevicePg1_dma); -+ -+ if (! sasDevicePg1) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sata_signature_exit; -+ } -+ -+ memset((u8 *)sasDevicePg1, 0, sasDevicePg1_data_sz); -+ cfg.physAddr = sasDevicePg1_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ dctlprintk((": FAILED: MPI_SASDEVICE1_PAGEVERSION: PAGE\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sata_signature_exit; -+ } -+ -+/* EDM : dump Device Page 1 data*/ -+ dsasprintk(("---- SAS DEVICE PAGE 1 ---------\n")); -+ dsasprintk(("Handle=0x%x\n",sasDevicePg1->DevHandle)); -+ dsasprintk(("SAS Address=")); -+ for(jj=0;jj<8;jj++) -+ dsasprintk(("%02x ", -+ ((u8 *)&sasDevicePg1->SASAddress)[jj])); -+ dsasprintk(("\n")); -+ dsasprintk(("Target ID=0x%x\n",sasDevicePg1->TargetID)); -+ dsasprintk(("Bus=0x%x\n",sasDevicePg1->Bus)); -+ dsasprintk(("Initial Reg Device FIS=")); -+ for(jj=0;jj<20;jj++) -+ dsasprintk(("%02x ", -+ ((u8 *)&sasDevicePg1->InitialRegDeviceFIS)[jj])); -+ dsasprintk(("\n\n")); -+/* EDM : debug data */ -+ -+ memcpy(karg.Signature.bSignatureFIS, -+ sasDevicePg1->InitialRegDeviceFIS,20); -+ -+cim_sata_signature_exit: -+ -+ if (sasPhyPg0) -+ pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz, -+ (u8 *) sasPhyPg0, sasPhyPg0_dma); -+ -+ if (sasDevicePg1) -+ pci_free_consistent(ioc->pcidev, sasDevicePg1_data_sz, -+ (u8 *) sasDevicePg1, sasDevicePg1_dma); -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_SATA_SIGNATURE_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_sata_signature @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+} -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI Sas Get SCSI Address command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_device_address(unsigned long arg) -+{ -+ CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ sas_device_info_t *sasDevice; -+ u64 SASAddress64; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, -+ sizeof(CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_device_address_buffer struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Fill in the data and return the structure to the calling -+ * program -+ */ -+ -+ /* Search the list for the matching SAS address. */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_DEVICE_ADDRESS; -+ list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) { -+ -+ /* Find the matching device. */ -+ if ((karg.bPathId == sasDevice->Bus) && -+ (karg.bTargetId == sasDevice->TargetId)) { -+ -+ SASAddress64 = reverse_byte_order64(&sasDevice->SASAddress); -+ memcpy(&karg.bSASAddress,&SASAddress64,sizeof(u64)); -+ karg.bSASLun[0] = karg.bLun; -+ memset(karg.bSASLun, 0, sizeof(karg.bSASLun)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ break; -+ } else -+ /* Keep looking. */ -+ continue; -+ } -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_get_device_address_buffer @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+ -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI Sas Get Link Errors command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_link_errors(unsigned long arg) -+{ -+ CSMI_SAS_LINK_ERRORS_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_LINK_ERRORS_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ MPT_FRAME_HDR *mf = NULL; -+ MPIHeader_t *mpi_hdr; -+ int iocnum; -+ int rc,ii; -+ ConfigExtendedPageHeader_t hdr; -+ CONFIGPARMS cfg; -+ SasPhyPage1_t *sasPhyPage1; -+ dma_addr_t sasPhyPage1_dma; -+ int sasPhyPage1_data_sz; -+ SasIoUnitControlRequest_t *sasIoUnitCntrReq; -+ SasIoUnitControlReply_t *sasIoUnitCntrReply; -+ u8 phyId; -+ int wait_timeout; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ sasPhyPage1=NULL; -+ sasPhyPage1_data_sz=0; -+ -+ if (copy_from_user(&karg, uarg, -+ sizeof(CSMI_SAS_LINK_ERRORS_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in mptctl_csmi_sas_get_link_errors struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ phyId = karg.Information.bPhyIdentifier; -+ if (phyId >= ioc->numPhys) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_PHY_DOES_NOT_EXIST; -+ dctlprintk((": phyId >= ioc->numPhys\n")); -+ goto cim_get_link_errors_exit; -+ } -+ -+ /* Default to success.*/ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ /* Issue a config request to get the devHandle of the attached device -+ */ -+ -+ /* Issue a config request to get phy information. */ -+ hdr.PageVersion = MPI_SASPHY1_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 1 /* page number 1*/; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.pageAddr = phyId; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk((": FAILED: MPI_SASPHY1_PAGEVERSION: HEADER\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_link_errors_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk((": hdr.ExtPageLength == 0\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_link_errors_exit; -+ } -+ -+ -+ sasPhyPage1_data_sz = hdr.ExtPageLength * 4; -+ rc = -ENOMEM; -+ -+ sasPhyPage1 = (SasPhyPage1_t *) pci_alloc_consistent(ioc->pcidev, -+ sasPhyPage1_data_sz, &sasPhyPage1_dma); -+ -+ if (! sasPhyPage1) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_link_errors_exit; -+ } -+ -+ memset((u8 *)sasPhyPage1, 0, sasPhyPage1_data_sz); -+ cfg.physAddr = sasPhyPage1_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ /* Don't check if this failed. Already in a -+ * failure case. -+ */ -+ dctlprintk((": FAILED: MPI_SASPHY1_PAGEVERSION: PAGE\n")); -+ dctlprintk((": rc=%x\n",rc)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_link_errors_exit; -+ } -+ -+/* EDM : dump PHY Page 1 data*/ -+ dsasprintk(("---- SAS PHY PAGE 1 ------------\n")); -+ dsasprintk(("Invalid Dword Count=0x%x\n", -+ sasPhyPage1->InvalidDwordCount)); -+ dsasprintk(("Running Disparity Error Count=0x%x\n", -+ sasPhyPage1->RunningDisparityErrorCount)); -+ dsasprintk(("Loss Dword Synch Count=0x%x\n", -+ sasPhyPage1->LossDwordSynchCount)); -+ dsasprintk(("PHY Reset Problem Count=0x%x\n", -+ sasPhyPage1->PhyResetProblemCount)); -+ dsasprintk(("\n\n")); -+/* EDM : debug data */ -+ -+ karg.Information.uInvalidDwordCount = -+ le32_to_cpu(sasPhyPage1->InvalidDwordCount); -+ karg.Information.uRunningDisparityErrorCount = -+ le32_to_cpu(sasPhyPage1->RunningDisparityErrorCount); -+ karg.Information.uLossOfDwordSyncCount = -+ le32_to_cpu(sasPhyPage1->LossDwordSynchCount); -+ karg.Information.uPhyResetProblemCount = -+ le32_to_cpu(sasPhyPage1->PhyResetProblemCount); -+ -+ if (karg.Information.bResetCounts == -+ CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS ) { -+ goto cim_get_link_errors_exit; -+ } -+ -+ /* Clear Error log -+ * -+ * Issue IOUNIT Control Reqeust Message -+ */ -+ -+ /* Get a MF for this command. -+ */ -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -+ dctlprintk((": no msg frames!\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_link_errors_exit; -+ } -+ -+ mpi_hdr = (MPIHeader_t *) mf; -+ sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf; -+ memset(sasIoUnitCntrReq,0,sizeof(SasIoUnitControlRequest_t)); -+ sasIoUnitCntrReq->Function = MPI_FUNCTION_SAS_IO_UNIT_CONTROL; -+ sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext; -+ sasIoUnitCntrReq->PhyNum = phyId; -+ sasIoUnitCntrReq->Operation = MPI_SAS_OP_PHY_CLEAR_ERROR_LOG; -+ -+ ioc->ioctl->wait_done = 0; -+ mpt_put_msg_frame(mptctl_id, ioc, mf); -+ -+ /* Now wait for the command to complete */ -+ wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout); -+ ii = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*wait_timeout); -+ -+ if(ii <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now we need to reset the board */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ mptctl_timeout_expired(ioc->ioctl); -+ goto cim_get_link_errors_exit; -+ } -+ -+ /* process the completed Reply Message Frame */ -+ if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) { -+ -+ sasIoUnitCntrReply = -+ (SasIoUnitControlReply_t *)ioc->ioctl->ReplyFrame; -+ -+ if ( le16_to_cpu(sasIoUnitCntrReply->IOCStatus) != MPI_IOCSTATUS_SUCCESS) { -+ dctlprintk((": SAS IO Unit Control: ")); -+ dctlprintk(("IOCStatus=0x%X IOCLogInfo=0x%X\n", -+ sasIoUnitCntrReply->IOCStatus, -+ sasIoUnitCntrReply->IOCLogInfo)); -+ } -+ } -+ -+cim_get_link_errors_exit: -+ -+ ioc->ioctl->status &= ~(MPT_IOCTL_STATUS_TM_FAILED | -+ MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID | -+ MPT_IOCTL_STATUS_RF_VALID); -+ -+ if (sasPhyPage1) -+ pci_free_consistent(ioc->pcidev, sasPhyPage1_data_sz, -+ (u8 *) sasPhyPage1, sasPhyPage1_dma); -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_LINK_ERRORS_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out mptctl_csmi_sas_get_link_errors @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+ -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS SMP Passthru command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_smp_passthru(unsigned long arg) -+{ -+ CSMI_SAS_SMP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg; -+ MPT_ADAPTER *ioc; -+ CSMI_SAS_SMP_PASSTHRU_BUFFER karg; -+ pSmpPassthroughRequest_t smpReq; -+ pSmpPassthroughReply_t smpReply; -+ MPT_FRAME_HDR *mf = NULL; -+ MPIHeader_t *mpi_hdr; -+ char *psge; -+ int iocnum, flagsLength,ii; -+ u8 index; -+ void * request_data; -+ dma_addr_t request_data_dma; -+ u32 request_data_sz; -+ void * response_data; -+ dma_addr_t response_data_dma; -+ u32 response_data_sz; -+ u16 ioc_stat; -+ int wait_timeout; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SMP_PASSTHRU_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_smp_passthru struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ request_data = NULL; -+ response_data = NULL; -+ response_data_sz = sizeof(CSMI_SAS_SMP_RESPONSE); -+ request_data_sz = karg.Parameters.uRequestLength; -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Make sure the adapter is not being reset. */ -+ if (!ioc->ioctl) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "No memory available during driver init.\n", -+ __FILE__, __LINE__,__FUNCTION__); -+ return -ENOMEM; -+ } else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Busy with IOC Reset \n", -+ __FILE__, __LINE__,__FUNCTION__); -+ return -EBUSY; -+ } -+ -+ /* Default to success.*/ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ /* Do some error checking on the request. */ -+ if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT; -+ goto cim_smp_passthru_exit; -+ } -+ -+ if ((request_data_sz > 0xFFFF) || (!request_data_sz)) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_smp_passthru_exit; -+ } -+ -+ /* Get a free request frame and save the message context. -+ */ -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -+ dctlprintk((": no msg frames!\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_smp_passthru_exit; -+ } -+ -+ mpi_hdr = (MPIHeader_t *) mf; -+ smpReq = (pSmpPassthroughRequest_t ) mf; -+ -+ memset(smpReq,0,ioc->req_sz); -+ -+ /* Fill in smp request. */ -+ smpReq->PhysicalPort = karg.Parameters.bPortIdentifier; -+ smpReq->Function = MPI_FUNCTION_SMP_PASSTHROUGH; -+ smpReq->RequestDataLength = cpu_to_le16(request_data_sz); -+ smpReq->ConnectionRate = karg.Parameters.bConnectionRate; -+ smpReq->MsgContext = mpi_hdr->MsgContext; -+ for ( index = 0; index < 8; index++ ) { -+ ((u8*)&smpReq->SASAddress)[7 - index] = -+ karg.Parameters.bDestinationSASAddress[index]; -+ } -+ smpReq->Reserved2 = 0; -+ smpReq->Reserved3 = 0; -+ -+ /* -+ * Prepare the necessary pointers to run -+ * through the SGL generation -+ */ -+ -+ psge = (char *)&smpReq->SGL; -+ -+ /* setup the *Request* payload SGE */ -+ flagsLength = MPI_SGE_FLAGS_SIMPLE_ELEMENT | -+ MPI_SGE_FLAGS_SYSTEM_ADDRESS | -+ MPI_SGE_FLAGS_32_BIT_ADDRESSING | -+ MPI_SGE_FLAGS_HOST_TO_IOC | -+ MPI_SGE_FLAGS_END_OF_BUFFER; -+ -+ if (sizeof(dma_addr_t) == sizeof(u64)) { -+ flagsLength |= MPI_SGE_FLAGS_64_BIT_ADDRESSING; -+ } -+ flagsLength = flagsLength << MPI_SGE_FLAGS_SHIFT; -+ flagsLength |= request_data_sz; -+ -+ request_data = pci_alloc_consistent( -+ ioc->pcidev, request_data_sz, &request_data_dma); -+ -+ if (!request_data) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ goto cim_smp_passthru_exit; -+ } -+ -+ mpt_add_sge(psge, flagsLength, request_data_dma); -+ psge += (sizeof(u32) + sizeof(dma_addr_t)); -+ -+ memcpy(request_data,&karg.Parameters.Request,request_data_sz); -+ -+ /* setup the *Response* payload SGE */ -+ response_data = pci_alloc_consistent( -+ ioc->pcidev, response_data_sz, &response_data_dma); -+ -+ if (!response_data) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ goto cim_smp_passthru_exit; -+ } -+ -+ flagsLength = MPI_SGE_FLAGS_SIMPLE_ELEMENT | -+ MPI_SGE_FLAGS_SYSTEM_ADDRESS | -+ MPI_SGE_FLAGS_32_BIT_ADDRESSING | -+ MPI_SGE_FLAGS_IOC_TO_HOST | -+ MPI_SGE_FLAGS_END_OF_BUFFER; -+ -+ if (sizeof(dma_addr_t) == sizeof(u64)) { -+ flagsLength |= MPI_SGE_FLAGS_64_BIT_ADDRESSING; -+ } -+ -+ flagsLength = flagsLength << MPI_SGE_FLAGS_SHIFT; -+ flagsLength |= response_data_sz; -+ -+ mpt_add_sge(psge, flagsLength, response_data_dma); -+ -+ /* The request is complete. Set the timer parameters -+ * and issue the request. -+ */ -+ ioc->ioctl->wait_done = 0; -+ mpt_put_msg_frame(mptctl_id, ioc, mf); -+ -+ /* Now wait for the command to complete */ -+ wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout); -+ ii = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*wait_timeout); -+ -+ if(ii <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now we need to reset the board */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ mptctl_timeout_expired(ioc->ioctl); -+ goto cim_smp_passthru_exit; -+ } -+ -+ if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) { -+ dctlprintk((": SMP Passthru: oh no, there is no reply!!")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_smp_passthru_exit; -+ } -+ -+ /* process the completed Reply Message Frame */ -+ smpReply = (pSmpPassthroughReply_t )ioc->ioctl->ReplyFrame; -+ ioc_stat = le16_to_cpu(smpReply->IOCStatus) & MPI_IOCSTATUS_MASK; -+ -+ if ((ioc_stat != MPI_IOCSTATUS_SUCCESS) && -+ (ioc_stat != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ dctlprintk((": SMP Passthru: ")); -+ dctlprintk(("IOCStatus=0x%X IOCLogInfo=0x%X SASStatus=0x%X\n", -+ smpReply->IOCStatus, -+ smpReply->IOCLogInfo, -+ smpReply->SASStatus)); -+ goto cim_smp_passthru_exit; -+ } -+ -+ karg.Parameters.bConnectionStatus = -+ map_sas_status_to_csmi(smpReply->SASStatus); -+ -+ -+ if (le16_to_cpu(smpReply->ResponseDataLength)) { -+ karg.Parameters.uResponseBytes = le16_to_cpu(smpReply->ResponseDataLength); -+ memcpy(&karg.Parameters.Response, -+ response_data, le16_to_cpu(smpReply->ResponseDataLength)); -+ } -+ -+cim_smp_passthru_exit: -+ -+ ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED | -+ MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID | -+ MPT_IOCTL_STATUS_RF_VALID); -+ -+ if (request_data) -+ pci_free_consistent(ioc->pcidev, request_data_sz, -+ (u8 *)request_data, request_data_dma); -+ -+ if (response_data) -+ pci_free_consistent(ioc->pcidev, response_data_sz, -+ (u8 *)response_data, response_data_dma); -+ -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_SMP_PASSTHRU_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_smp_passthru @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+ -+} -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS SSP Passthru command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int mptctl_csmi_sas_ssp_passthru(unsigned long arg) -+{ -+ CSMI_SAS_SSP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_SSP_PASSTHRU_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ pSCSIIORequest_t pScsiRequest; -+ pSCSIIOReply_t pScsiReply; -+ MPT_FRAME_HDR *mf = NULL; -+ MPIHeader_t *mpi_hdr; -+ int iocnum,ii; -+ u32 data_sz; -+ u64 SASAddress64; -+ sas_device_info_t *sasDevice; -+ u16 req_idx; -+ char *psge; -+ int flagsLength; -+ void * request_data; -+ dma_addr_t request_data_dma; -+ u32 request_data_sz; -+ u8 found; -+ u16 ioc_stat; -+ u8 volume_id; -+ u8 volume_bus; -+ u8 quiese_io_flag=0; -+ u8 bus; -+ u8 target; -+ int wait_timeout; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SSP_PASSTHRU_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_ssp_passthru struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ request_data=NULL; -+ request_data_sz = karg.Parameters.uDataLength; -+ bus=0; -+ target=0; -+ volume_id=0; -+ volume_bus=0; -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s()" -+ " @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Default to success. -+ */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ /* Neither a phy nor a port has been selected. -+ */ -+ if ((karg.Parameters.bPhyIdentifier == CSMI_SAS_USE_PORT_IDENTIFIER) && -+ (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT)) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT; -+ dctlprintk((KERN_ERR -+ "%s::%s()" -+ " @%d - incorrect bPhyIdentifier and bPortIdentifier!\n", -+ __FILE__, __FUNCTION__, __LINE__)); -+ goto cim_ssp_passthru_exit; -+ } -+ -+ /* A phy has been selected. Verify that it's valid. -+ */ -+ if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) { -+ -+ /* Is the phy in range? */ -+ if (karg.Parameters.bPhyIdentifier >= ioc->numPhys) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_PHY_DOES_NOT_EXIST; -+ goto cim_ssp_passthru_exit; -+ } -+ } -+ -+ /* some checks of the incoming frame -+ */ -+ if (request_data_sz > 0xFFFF) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ dctlprintk((KERN_ERR -+ "%s::%s()" -+ " @%d - uDataLength > 0xFFFF!\n", -+ __FILE__, __FUNCTION__, __LINE__)); -+ goto cim_ssp_passthru_exit; -+ } -+ -+ data_sz = sizeof(CSMI_SAS_SSP_PASSTHRU_BUFFER) - -+ sizeof(IOCTL_HEADER) - sizeof(u8*) + -+ request_data_sz; -+ -+ if ( data_sz > karg.IoctlHeader.Length ) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ dctlprintk((KERN_ERR -+ "%s::%s()" -+ " @%d - expected datalen incorrect!\n", -+ __FILE__, __FUNCTION__, __LINE__)); -+ goto cim_ssp_passthru_exit; -+ } -+ -+ /* we will use SAS address to resolve the scsi adddressing -+ */ -+ memcpy(&SASAddress64,karg.Parameters.bDestinationSASAddress, -+ sizeof(u64)); -+ SASAddress64 = reverse_byte_order64(&SASAddress64); -+ -+ /* Search the list for the matching SAS address. -+ */ -+ found = FALSE; -+ list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) { -+ -+ /* Find the matching device. -+ */ -+ if (sasDevice->SASAddress != SASAddress64) -+ continue; -+ -+ found = TRUE; -+ bus = sasDevice->Bus; -+ target = sasDevice->TargetId; -+ break; -+ } -+ -+ /* Invalid SAS address -+ */ -+ if (found == FALSE) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ dctlprintk((KERN_ERR -+ "%s::%s()" -+ " @%d - couldn't find associated SASAddress!\n", -+ __FILE__, __FUNCTION__, __LINE__)); -+ goto cim_ssp_passthru_exit; -+ } -+ -+ if(karg.Parameters.bAdditionalCDBLength) { -+ /* TODO - SCSI IO (32) Request Message support -+ */ -+ dctlprintk((": greater than 16-byte cdb is not supported!\n")); -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ goto cim_ssp_passthru_exit; -+ } -+ -+ /* see if this is for raid phy disk */ -+ if (ioc->raid_data.isRaid && ioc->raid_data.pIocPg3) { -+ for (ii = 0; (ii<ioc->raid_data.pIocPg3->NumPhysDisks && -+ quiese_io_flag==0); ii++) { -+ if (target == ioc->raid_data.pIocPg3->PhysDisk[ii].PhysDiskID) { -+ target = ioc->raid_data.pIocPg3->PhysDisk[ii].PhysDiskNum; -+ quiese_io_flag=1; -+ } -+ } -+ } -+#ifdef QUIESE_IO -+ /* if RAID Volume, then quiesce io to phys disk*/ -+ if (quiese_io_flag==1) { -+ if (mptctl_raid_get_volume_id(ioc, target, -+ &volume_id, &volume_bus) != 0) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_ssp_passthru_exit; -+ } -+ mptctl_do_raid(ioc, -+ MPI_RAID_ACTION_QUIESCE_PHYS_IO, -+ target, volume_bus, volume_id, NULL); -+ } -+#endif -+ /* Get a free request frame and save the message context. -+ */ -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -+ dctlprintk((": no msg frames!\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_ssp_passthru_exit; -+ } -+ -+ mpi_hdr = (MPIHeader_t *) mf; -+ pScsiRequest = (pSCSIIORequest_t) mf; -+ req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -+ -+ memset(pScsiRequest,0,sizeof(SCSIIORequest_t)); -+ -+ /* Fill in SCSI IO (16) request. -+ */ -+ -+ pScsiRequest->Function = (quiese_io_flag==1) ? -+ MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH : MPI_FUNCTION_SCSI_IO_REQUEST; -+ pScsiRequest->TargetID = target; -+ pScsiRequest->Bus = bus; -+ memcpy(pScsiRequest->LUN,karg.Parameters.bLun,8); -+ pScsiRequest->CDBLength = karg.Parameters.bCDBLength; -+ pScsiRequest->DataLength = cpu_to_le16(request_data_sz); -+ pScsiRequest->MsgContext = mpi_hdr->MsgContext; -+ memcpy(pScsiRequest->CDB,karg.Parameters.bCDB, -+ pScsiRequest->CDBLength); -+ -+ /* direction -+ */ -+ if (karg.Parameters.uFlags & CSMI_SAS_SSP_READ) { -+ pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ); -+ } else if (karg.Parameters.uFlags & CSMI_SAS_SSP_WRITE) { -+ pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_WRITE); -+ } else if ((karg.Parameters.uFlags & CSMI_SAS_SSP_UNSPECIFIED) && -+ (!karg.Parameters.uDataLength)) { -+ /* no data transfer -+ */ -+ pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_NODATATRANSFER); -+ } else { -+ /* no direction specified -+ */ -+ pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ); -+ pScsiRequest->MsgFlags = -+ MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR; -+ } -+ -+ /* task attributes -+ */ -+ if((karg.Parameters.uFlags && 0xFF) == 0) { -+ pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_SIMPLEQ); -+ } else if (karg.Parameters.uFlags & -+ CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE) { -+ pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_HEADOFQ); -+ } else if (karg.Parameters.uFlags & -+ CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED) { -+ pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_ORDEREDQ); -+ } else if (karg.Parameters.uFlags & -+ CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA) { -+ pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_ACAQ); -+ } else { -+ pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_UNTAGGED); -+ } -+ -+ /* setup sense -+ */ -+ pScsiRequest->SenseBufferLength = MPT_SENSE_BUFFER_SIZE; -+ pScsiRequest->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma + -+ (req_idx * MPT_SENSE_BUFFER_ALLOC)); -+ -+ /* setup databuffer sg, assuming we fit everything one contiguous buffer -+ */ -+ psge = (char *)&pScsiRequest->SGL; -+ -+ if (karg.Parameters.uFlags & CSMI_SAS_SSP_WRITE) { -+ flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE; -+ } else if (karg.Parameters.uFlags & CSMI_SAS_SSP_READ) { -+ flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; -+ }else { -+ flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT | -+ MPI_SGE_FLAGS_DIRECTION | -+ mpt_addr_size() ) -+ << MPI_SGE_FLAGS_SHIFT; -+ } -+ flagsLength |= request_data_sz; -+ -+ if ( request_data_sz > 0) { -+ request_data = pci_alloc_consistent( -+ ioc->pcidev, request_data_sz, &request_data_dma); -+ -+ if (request_data == NULL) { -+ dctlprintk((": pci_alloc_consistent: FAILED request_data_sz=%d\n", request_data_sz)); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ goto cim_ssp_passthru_exit; -+ } -+ -+ mpt_add_sge(psge, flagsLength, request_data_dma); -+ -+ if (karg.Parameters.uFlags & CSMI_SAS_SSP_WRITE) { -+ -+ if (copy_from_user(request_data, -+ karg.bDataBuffer, -+ request_data_sz)) { -+ printk(KERN_ERR -+ "%s@%d::%s - Unable " -+ "to read user data " -+ "struct @ %p\n", -+ __FILE__, __LINE__,__FUNCTION__, -+ (void*)karg.bDataBuffer); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ goto cim_ssp_passthru_exit; -+ } -+ } -+ } else { -+ mpt_add_sge(psge, flagsLength, (dma_addr_t) -1); -+ } -+ -+ /* The request is complete. Set the timer parameters -+ * and issue the request. -+ */ -+ ioc->ioctl->wait_done = 0; -+ mpt_put_msg_frame(mptctl_id, ioc, mf); -+ -+ /* Now wait for the command to complete */ -+ wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout); -+ ii = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*wait_timeout); -+ -+ if(ii <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now we need to reset the board */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ mptctl_timeout_expired(ioc->ioctl); -+ goto cim_ssp_passthru_exit; -+ } -+ -+ memset(&karg.Status,0,sizeof(CSMI_SAS_SSP_PASSTHRU_STATUS)); -+ karg.Status.bConnectionStatus = CSMI_SAS_OPEN_ACCEPT; -+ karg.Status.bDataPresent = CSMI_SAS_SSP_NO_DATA_PRESENT; -+ karg.Status.bStatus = GOOD; -+ karg.Status.bResponseLength[0] = 0; -+ karg.Status.bResponseLength[1] = 0; -+ karg.Status.uDataBytes = request_data_sz; -+ -+ /* process the completed Reply Message Frame */ -+ if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) { -+ -+ pScsiReply = (pSCSIIOReply_t ) ioc->ioctl->ReplyFrame; -+ karg.Status.bStatus = pScsiReply->SCSIStatus; -+ karg.Status.uDataBytes = min(le32_to_cpu(pScsiReply->TransferCount), -+ request_data_sz); -+ ioc_stat = le16_to_cpu(pScsiReply->IOCStatus) & MPI_IOCSTATUS_MASK; -+ -+ if (pScsiReply->SCSIState == -+ MPI_SCSI_STATE_AUTOSENSE_VALID) { -+ karg.Status.bConnectionStatus = -+ CSMI_SAS_SSP_SENSE_DATA_PRESENT; -+ karg.Status.bResponseLength[0] = -+ (u8)le32_to_cpu(pScsiReply->SenseCount) & 0xFF; -+ memcpy(karg.Status.bResponse, -+ ioc->ioctl->sense, le32_to_cpu(pScsiReply->SenseCount)); -+ } else if(pScsiReply->SCSIState == -+ MPI_SCSI_STATE_RESPONSE_INFO_VALID) { -+ karg.Status.bDataPresent = -+ CSMI_SAS_SSP_RESPONSE_DATA_PRESENT; -+ karg.Status.bResponseLength[0] = -+ sizeof(pScsiReply->ResponseInfo); -+ for (ii=0;ii<sizeof(pScsiReply->ResponseInfo);ii++) { -+ karg.Status.bResponse[ii] = -+ ((u8*)&pScsiReply->ResponseInfo)[ -+ (sizeof(pScsiReply->ResponseInfo)-1)-ii]; -+ } -+ } else if ((ioc_stat != MPI_IOCSTATUS_SUCCESS) && -+ (ioc_stat != MPI_IOCSTATUS_SCSI_RECOVERED_ERROR) && -+ (ioc_stat != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ dctlprintk((": SCSI IO : ")); -+ dctlprintk(("IOCStatus=0x%X IOCLogInfo=0x%X\n", -+ pScsiReply->IOCStatus, -+ pScsiReply->IOCLogInfo)); -+ } -+ } -+ -+ if ((karg.Status.uDataBytes) && (request_data) && -+ (karg.Parameters.uFlags & CSMI_SAS_SSP_READ)) { -+ if (copy_to_user((char *)uarg->bDataBuffer, -+ request_data, karg.Status.uDataBytes)) { -+ printk(KERN_ERR "%s@%d::%s - " -+ "Unable to write data to user %p\n", -+ __FILE__, __LINE__,__FUNCTION__, -+ (void*)karg.bDataBuffer); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ } -+ } -+ -+cim_ssp_passthru_exit: -+ -+ ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED | -+ MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID | -+ MPT_IOCTL_STATUS_RF_VALID); -+ -+ if (request_data) -+ pci_free_consistent(ioc->pcidev, request_data_sz, -+ (u8 *)request_data, request_data_dma); -+ -+#ifdef QUIESE_IO -+ if (quiese_io_flag) { -+ mptctl_do_raid(ioc, -+ MPI_RAID_ACTION_ENABLE_PHYS_IO, -+ target, volume_bus, volume_id, NULL); -+ } -+#endif -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER,bDataBuffer))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_ssp_passthru @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS STP Passthru command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_stp_passthru(unsigned long arg) -+{ -+ CSMI_SAS_STP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_STP_PASSTHRU_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ pSataPassthroughRequest_t pSataRequest; -+ pSataPassthroughReply_t pSataReply; -+ MPT_FRAME_HDR *mf = NULL; -+ MPIHeader_t *mpi_hdr; -+ int iocnum,ii; -+ u32 data_sz; -+ u64 SASAddress64; -+ sas_device_info_t *sasDevice=NULL; -+ u16 req_idx; -+ char *psge; -+ int flagsLength; -+ void * request_data; -+ dma_addr_t request_data_dma; -+ u32 request_data_sz; -+ u8 found; -+ u8 bus; -+ u8 target; -+ u8 volume_id; -+ u8 volume_bus; -+#ifdef QUIESE_IO -+ u8 quiese_io_flag=0; -+ u8 phys_disk_num=0; -+#endif -+ int wait_timeout; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ request_data=NULL; -+ request_data_sz = karg.Parameters.uDataLength; -+ volume_id=0; -+ volume_bus=0; -+ bus=0; -+ target=0; -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Default to success. -+ */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ /* Neither a phy nor a port has been selected. -+ */ -+ if ((karg.Parameters.bPhyIdentifier == CSMI_SAS_USE_PORT_IDENTIFIER) && -+ (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT)) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT; -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - incorrect bPhyIdentifier and bPortIdentifier!\n", -+ __FILE__,__FUNCTION__, __LINE__)); -+ goto cim_stp_passthru_exit; -+ } -+ -+ /* A phy has been selected. Verify that it's valid. -+ */ -+ if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) { -+ -+ /* Is the phy in range? */ -+ if (karg.Parameters.bPhyIdentifier >= ioc->numPhys) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_PHY_DOES_NOT_EXIST; -+ goto cim_stp_passthru_exit; -+ } -+ } -+ -+ /* some checks of the incoming frame -+ */ -+ if (request_data_sz > 0xFFFF) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - uDataLength > 0xFFFF!\n", -+ __FILE__, __FUNCTION__, __LINE__)); -+ goto cim_stp_passthru_exit; -+ } -+ -+ data_sz = sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER) - -+ sizeof(IOCTL_HEADER) - sizeof(u8*) + -+ request_data_sz; -+ -+ if ( data_sz > karg.IoctlHeader.Length ) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - expected datalen incorrect!\n", -+ __FILE__, __FUNCTION__,__LINE__)); -+ goto cim_stp_passthru_exit; -+ } -+ -+ /* we will use SAS address to resolve the scsi adddressing -+ */ -+ memcpy(&SASAddress64,karg.Parameters.bDestinationSASAddress, -+ sizeof(u64)); -+ SASAddress64 = reverse_byte_order64(&SASAddress64); -+ -+ /* Search the list for the matching SAS address. -+ */ -+ found = FALSE; -+ list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) { -+ -+ /* Find the matching device. -+ */ -+ if (sasDevice->SASAddress != SASAddress64) -+ continue; -+ -+ found = TRUE; -+ bus = sasDevice->Bus; -+ target = sasDevice->TargetId;; -+ break; -+ } -+ -+ /* Invalid SAS address -+ */ -+ if (found == FALSE) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - couldn't find associated SASAddress!\n", -+ __FILE__, __FUNCTION__, __LINE__)); -+ goto cim_stp_passthru_exit; -+ } -+ -+ /* check that this is an STP or SATA target device -+ */ -+ if ( !(sasDevice->DeviceInfo & MPI_SAS_DEVICE_INFO_STP_TARGET ) && -+ !(sasDevice->DeviceInfo & MPI_SAS_DEVICE_INFO_SATA_DEVICE )) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ goto cim_stp_passthru_exit; -+ } -+ -+#ifdef QUIESE_IO -+ /* see if this is for raid phy disk */ -+ if (ioc->raid_data.isRaid && ioc->raid_data.pIocPg3) { -+ for (ii = 0; (ii<ioc->raid_data.pIocPg3->NumPhysDisks && -+ quiese_io_flag==0); ii++) -+ if (target == ioc->raid_data.pIocPg3->PhysDisk[ii].PhysDiskID) { -+ phys_disk_num = ioc->raid_data.pIocPg3->PhysDisk[ii].PhysDiskNum; -+ quiese_io_flag=1; -+ } -+ } -+ /* if RAID Volume, then quiesce io to phys disk*/ -+ if (quiese_io_flag==1) { -+ if (mptctl_raid_get_volume_id(ioc, phys_disk_num, -+ &volume_id, &volume_bus) != 0) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_stp_passthru_exit; -+ } -+ mptctl_do_raid(ioc, -+ MPI_RAID_ACTION_QUIESCE_PHYS_IO, -+ phys_disk_num, volume_bus, volume_id, NULL); -+ } -+#endif -+ /* Get a free request frame and save the message context. -+ */ -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -+ dctlprintk((": no msg frames!\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_stp_passthru_exit; -+ } -+ -+ mpi_hdr = (MPIHeader_t *) mf; -+ pSataRequest = (pSataPassthroughRequest_t) mf; -+ req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -+ -+ memset(pSataRequest,0,sizeof(pSataPassthroughRequest_t)); -+ -+ pSataRequest->TargetID = target; -+ pSataRequest->Bus = bus; -+ pSataRequest->Function = MPI_FUNCTION_SATA_PASSTHROUGH; -+ pSataRequest->PassthroughFlags = cpu_to_le16(karg.Parameters.uFlags); -+ pSataRequest->ConnectionRate = karg.Parameters.bConnectionRate; -+ pSataRequest->MsgContext = mpi_hdr->MsgContext; -+ pSataRequest->DataLength = cpu_to_le32(request_data_sz); -+ pSataRequest->MsgFlags = 0; -+ memcpy( pSataRequest->CommandFIS,karg.Parameters.bCommandFIS, 20); -+ -+ psge = (char *)&pSataRequest->SGL; -+ if (karg.Parameters.uFlags & CSMI_SAS_STP_WRITE) { -+ flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE; -+ } else if (karg.Parameters.uFlags & CSMI_SAS_STP_READ) { -+ flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; -+ }else { -+ flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT | -+ MPI_SGE_FLAGS_DIRECTION | -+ mpt_addr_size() ) -+ << MPI_SGE_FLAGS_SHIFT; -+ } -+ -+ flagsLength |= request_data_sz; -+ if (request_data_sz > 0) { -+ request_data = pci_alloc_consistent( -+ ioc->pcidev, request_data_sz, &request_data_dma); -+ -+ if (request_data == NULL) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ goto cim_stp_passthru_exit; -+ } -+ -+ mpt_add_sge(psge, flagsLength, request_data_dma); -+ if (karg.Parameters.uFlags & CSMI_SAS_STP_WRITE) { -+ if (copy_from_user(request_data, -+ karg.bDataBuffer, -+ request_data_sz)) { -+ printk(KERN_ERR -+ "%s::%s() @%d - Unable to read user data " -+ "struct @ %p\n", -+ __FILE__, __FUNCTION__, __LINE__, -+ (void*)karg.bDataBuffer); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ goto cim_stp_passthru_exit; -+ } -+ } -+ } else { -+ mpt_add_sge(psge, flagsLength, (dma_addr_t) -1); -+ } -+ -+ /* The request is complete. Set the timer parameters -+ * and issue the request. -+ */ -+ ioc->ioctl->wait_done = 0; -+ mpt_put_msg_frame(mptctl_id, ioc, mf); -+ -+ /* Now wait for the command to complete */ -+ wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout); -+ ii = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*wait_timeout); -+ -+ if(ii <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now we need to reset the board */ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ mpt_free_msg_frame(ioc, mf); -+ mptctl_timeout_expired(ioc->ioctl); -+ goto cim_stp_passthru_exit; -+ } -+ -+ memset(&karg.Status,0,sizeof(CSMI_SAS_STP_PASSTHRU_STATUS)); -+ -+ if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) { -+ dctlprintk((": STP Passthru: oh no, there is no reply!!")); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_stp_passthru_exit; -+ } -+ -+ /* process the completed Reply Message Frame */ -+ pSataReply = (pSataPassthroughReply_t ) ioc->ioctl->ReplyFrame; -+ -+ if ((le16_to_cpu(pSataReply->IOCStatus) != MPI_IOCSTATUS_SUCCESS) && -+ (le16_to_cpu(pSataReply->IOCStatus) != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN )) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ dctlprintk((": STP Passthru: ")); -+ dctlprintk(("IOCStatus=0x%X IOCLogInfo=0x%X SASStatus=0x%X\n", -+ le16_to_cpu(pSataReply->IOCStatus), -+ le32_to_cpu(pSataReply->IOCLogInfo), -+ pSataReply->SASStatus)); -+ } -+ -+ karg.Status.bConnectionStatus = -+ map_sas_status_to_csmi(pSataReply->SASStatus); -+ -+ memcpy(karg.Status.bStatusFIS,pSataReply->StatusFIS, 20); -+ -+ /* -+ * for now, just zero out uSCR array, -+ * then copy the one dword returned -+ * in the reply frame into uSCR[0] -+ */ -+ memset( karg.Status.uSCR, 0, 64); -+ karg.Status.uSCR[0] = le32_to_cpu(pSataReply->StatusControlRegisters); -+ -+ if((le32_to_cpu(pSataReply->TransferCount)) && (request_data) && -+ (karg.Parameters.uFlags & CSMI_SAS_STP_READ)) { -+ karg.Status.uDataBytes = -+ min(le32_to_cpu(pSataReply->TransferCount),request_data_sz); -+ if (copy_to_user((char *)uarg->bDataBuffer, -+ request_data, karg.Status.uDataBytes)) { -+ printk(KERN_ERR "%s::%s() @%d - " -+ "Unable to write data to user %p\n", -+ __FILE__, __FUNCTION__, __LINE__, -+ (void*)karg.bDataBuffer); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ } -+ } -+ -+cim_stp_passthru_exit: -+ -+ ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED | -+ MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID | -+ MPT_IOCTL_STATUS_RF_VALID ); -+ -+ if (request_data) -+ pci_free_consistent(ioc->pcidev, request_data_sz, -+ (u8 *)request_data, request_data_dma); -+ -+#ifdef QUIESE_IO -+ if (quiese_io_flag) -+ mptctl_do_raid(ioc, -+ MPI_RAID_ACTION_ENABLE_PHYS_IO, -+ phys_disk_num, volume_bus, volume_id, NULL); -+#endif -+ -+ /* Copy th data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ offsetof(CSMI_SAS_STP_PASSTHRU_BUFFER,bDataBuffer))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_ssp_passthru @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+ -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Firmware Download command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_firmware_download(unsigned long arg) -+{ -+ CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ pMpiFwHeader_t pFwHeader=NULL; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, -+ sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_firmware_download struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* Default to success.*/ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ karg.Information.usStatus = CSMI_SAS_FWD_SUCCESS; -+ karg.Information.usSeverity = CSMI_SAS_FWD_INFORMATION; -+ -+ /* some checks of the incoming frame */ -+ if ((karg.Information.uBufferLength + -+ sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD)) > -+ karg.IoctlHeader.Length) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ karg.Information.usStatus = CSMI_SAS_FWD_FAILED; -+ goto cim_firmware_download_exit; -+ } -+ -+ if ( karg.Information.uDownloadFlags & -+ (CSMI_SAS_FWD_SOFT_RESET | CSMI_SAS_FWD_VALIDATE)) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ karg.Information.usStatus = CSMI_SAS_FWD_REJECT; -+ karg.Information.usSeverity = CSMI_SAS_FWD_ERROR; -+ goto cim_firmware_download_exit; -+ } -+ -+ /* now we need to alloc memory so we can pull in the -+ * fw image attached to end of incomming packet. -+ */ -+ pFwHeader = kmalloc(karg.Information.uBufferLength, GFP_KERNEL); -+ if(pFwHeader==NULL){ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ karg.Information.usStatus = CSMI_SAS_FWD_REJECT; -+ karg.Information.usSeverity = CSMI_SAS_FWD_ERROR; -+ goto cim_firmware_download_exit; -+ } -+ -+ if (copy_from_user(pFwHeader, uarg->bDataBuffer, -+ karg.Information.uBufferLength)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in pFwHeader @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if ( !((pFwHeader->Signature0 == MPI_FW_HEADER_SIGNATURE_0) && -+ (pFwHeader->Signature1 == MPI_FW_HEADER_SIGNATURE_1) && -+ (pFwHeader->Signature2 == MPI_FW_HEADER_SIGNATURE_2))) { -+ // the signature check failed -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ karg.Information.usStatus = CSMI_SAS_FWD_REJECT; -+ karg.Information.usSeverity = CSMI_SAS_FWD_ERROR; -+ goto cim_firmware_download_exit; -+ } -+ -+ if ( mptctl_do_fw_download(karg.IoctlHeader.IOControllerNumber, -+ uarg->bDataBuffer, karg.Information.uBufferLength) -+ != 0) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ karg.Information.usStatus = CSMI_SAS_FWD_FAILED; -+ karg.Information.usSeverity = CSMI_SAS_FWD_FATAL; -+ goto cim_firmware_download_exit; -+ } -+ -+ if((karg.Information.uDownloadFlags & CSMI_SAS_FWD_SOFT_RESET) || -+ (karg.Information.uDownloadFlags & CSMI_SAS_FWD_HARD_RESET)) { -+ if (mpt_HardResetHandler(ioc, CAN_SLEEP) != 0) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ karg.Information.usStatus = CSMI_SAS_FWD_FAILED; -+ karg.Information.usSeverity = CSMI_SAS_FWD_FATAL; -+ } -+ } -+ -+cim_firmware_download_exit: -+ -+ if(pFwHeader) -+ kfree(pFwHeader); -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_firmware_download @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+} -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Get RAID Info command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_raid_info(unsigned long arg) -+{ -+ CSMI_SAS_RAID_INFO_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_RAID_INFO_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ u32 raidFlags; -+ u8 maxRaidTypes; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_RAID_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_raid_info struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ if( !mpt_findImVolumes(ioc)) { -+ if ( ioc->raid_data.pIocPg2 ) { -+ karg.Information.uNumRaidSets = ioc->raid_data.pIocPg2->NumActiveVolumes; -+ // uMaxDrivesPerSet hard coded until value is available through RAID config page -+ karg.Information.uMaxDrivesPerSet = 8; -+ karg.Information.uMaxRaidSets = ioc->raid_data.pIocPg2->MaxVolumes; -+ // For bMaxRaidSets, count bits set in bits 0-6 of CapabilitiesFlags -+ raidFlags = ioc->raid_data.pIocPg2->CapabilitiesFlags & 0x0000007F; -+ for( maxRaidTypes=0; raidFlags; maxRaidTypes++ ) -+ { -+ raidFlags &= raidFlags - 1; -+ } -+ karg.Information.bMaxRaidTypes = maxRaidTypes; -+ // ulMinRaidSetBlocks hard coded to 1MB until available from config page -+ karg.Information.ulMinRaidSetBlocks = 2048; -+ karg.Information.ulMaxRaidSetBlocks = -+ (ioc->raid_data.pIocPg2->CapabilitiesFlags & -+ MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING) -+ ? 0xffffffffffffffffULL : 0x00000000ffffffffULL; -+ karg.Information.uMaxPhysicalDrives = ioc->raid_data.pIocPg2->MaxPhysDisks; -+ karg.Information.uMaxExtents = 1; -+ karg.Information.uMaxModules = 0; -+ karg.Information.uMaxTransformationMemory = 0; -+ karg.Information.uChangeCount = ioc->csmi_change_count; -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ } -+ } -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_RAID_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_get_raid_info @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+ -+} -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* mptscsih_do_raid - Format and Issue a RAID volume request message. -+ * @ioc: Pointer to MPT_ADAPTER structure -+ * @action: What do be done. -+ * @PhysDiskNum: Logical target id. -+ * @VolumeBus: Target locations bus. -+ * @VolumeId: Volume id -+ * -+ * Returns: < 0 on a fatal error -+ * 0 on success -+ * -+ * Remark: Wait to return until reply processed by the ISR. -+ */ -+static int -+mptctl_do_raid(MPT_ADAPTER *ioc, u8 action, u8 PhysDiskNum, u8 VolumeBus, u8 VolumeId, pMpiRaidActionReply_t reply) -+{ -+ MpiRaidActionRequest_t *pReq; -+ MpiRaidActionReply_t *pReply; -+ MPT_FRAME_HDR *mf; -+ int ii; -+ -+ /* Get and Populate a free Frame -+ */ -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -+ dctlprintk((": no msg frames!\n")); -+ return -EAGAIN; -+ } -+ pReq = (MpiRaidActionRequest_t *)mf; -+ pReq->Action = action; -+ pReq->Reserved1 = 0; -+ pReq->ChainOffset = 0; -+ pReq->Function = MPI_FUNCTION_RAID_ACTION; -+ pReq->VolumeID = VolumeId; -+ pReq->VolumeBus = VolumeBus; -+ pReq->PhysDiskNum = PhysDiskNum; -+ pReq->MsgFlags = 0; -+ pReq->Reserved2 = 0; -+ pReq->ActionDataWord = 0; /* Reserved for this action */ -+ //pReq->ActionDataSGE = 0; -+ -+ mpt_add_sge((char *)&pReq->ActionDataSGE, -+ MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1); -+ -+ ioc->ioctl->wait_done = 0; -+ mpt_put_msg_frame(mptctl_id, ioc, mf); -+ -+ /* Now wait for the command to complete */ -+ ii = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*MPT_IOCTL_DEFAULT_TIMEOUT /* 10 sec */); -+ -+ if(ii <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now we need to reset the board */ -+ mpt_free_msg_frame(ioc, mf); -+ mptctl_timeout_expired(ioc->ioctl); -+ return -ENODATA; -+ } -+ -+ if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) && -+ (reply != NULL)){ -+ pReply = (MpiRaidActionReply_t *)&(ioc->ioctl->ReplyFrame); -+ memcpy(reply, pReply, -+ min(ioc->reply_sz, -+ 4*pReply->MsgLength)); -+ } -+ -+ return 0; -+} -+ -+#ifdef QUIESE_IO -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* mptctl_raid_get_volume_id - figures out which Volume a PhysDisk belongs to. -+ * @ioc: Pointer to MPT_ADAPTER structure -+ * @PhysDiskNum: an unique number assigned by IOC to identify a specific IR phy disk -+ * -+ * Returns: < 0 on a fatal error -+ * 0 on success -+ * -+ * Following parameters are valid when successful return -+ * @VolumeID - target device identification number of the volume -+ * @VolumeBus - the SCSI bus number of the volume -+ * -+ */ -+static int -+mptctl_raid_get_volume_id(MPT_ADAPTER *ioc, u8 PhysDiskNum, u8 *VolumeID, u8 *VolumeBus) -+{ -+ CONFIGPARMS cfg; -+ ConfigPageHeader_t header; -+ dma_addr_t volume0_dma; -+ int i,j; -+ int rc=0; -+ int volumepage0sz = 0; -+ pRaidVolumePage0_t pVolume0 = NULL; -+ -+ /* -+ * get RAID Volume Page 0 -+ */ -+ header.PageVersion = 0; -+ header.PageLength = 0; -+ header.PageNumber = 0; -+ header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; -+ cfg.cfghdr.hdr = &header; -+ cfg.physAddr = -1; -+ cfg.pageAddr = 0; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ if (mpt_config(ioc, &cfg) != 0) { -+ rc = -1; -+ goto mptctl_raid_get_volume_id_exit; -+ } -+ -+ if (header.PageLength == 0) { -+ rc = -1; -+ goto mptctl_raid_get_volume_id_exit; -+ } -+ -+ volumepage0sz = header.PageLength * 4; -+ pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz, -+ &volume0_dma); -+ if (!pVolume0) { -+ rc = -1; -+ goto mptctl_raid_get_volume_id_exit; -+ } -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.physAddr = volume0_dma; -+ -+ for (i=0; i<ioc->raid_data.pIocPg2->NumActiveVolumes; i++){ -+ *VolumeID = ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID; -+ *VolumeBus = ioc->raid_data.pIocPg2->RaidVolume[i].VolumeBus; -+ cfg.pageAddr = (*VolumeBus << 8) + *VolumeID; -+ if (mpt_config(ioc, &cfg) != 0){ -+ rc = -1; -+ goto mptctl_raid_get_volume_id_exit; -+ } -+ for (j=0; j<pVolume0->NumPhysDisks; j++){ -+ if (PhysDiskNum == pVolume0->PhysDisk[i].PhysDiskNum) -+ goto mptctl_raid_get_volume_id_exit; -+ } -+ } -+ -+mptctl_raid_get_volume_id_exit: -+ -+ if (pVolume0 != NULL) -+ pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0, -+ volume0_dma); -+ -+ return rc; -+} -+#endif -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* mptctl_raid_inq -+ * @ioc = per host instance -+ * @opcode = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH or MPI_FUNCTION_SCSI_IO_REQUEST -+ * @target = target id -+ * @inq_vpd = inquiry data, returned -+ * @inq_vpd_sz = maximum size of inquiry data -+ * -+ * Return = 0(sucess), non-zero(failure) -+ */ -+static int -+mptctl_raid_inq(MPT_ADAPTER *ioc, u8 opcode, u8 target, u8 inq_vpd_page, u8 * inq_vpd, u32 inq_vpd_sz) -+{ -+ MPT_FRAME_HDR *mf = NULL; -+ MPIHeader_t *mpi_hdr; -+ pSCSIIORequest_t pScsiRequest; -+ u16 req_idx; -+ char *psge; -+ u8 inq_vpd_cdb[6]; -+ u8 *request_data=NULL; -+ dma_addr_t request_data_dma; -+ u32 request_data_sz; -+ int rc=0,ii; -+ -+ request_data_sz = 0xFFFF; /* max data size */ -+ -+ /* fill-in cdb */ -+ inq_vpd_cdb[0] = 0x12; -+ if (inq_vpd_page) { -+ inq_vpd_cdb[1] = 0x01; /* evpd bit */ -+ inq_vpd_cdb[2] = inq_vpd_page; -+ } -+ inq_vpd_cdb[3] = (u8)(request_data_sz >> 8); -+ inq_vpd_cdb[4] = (u8)request_data_sz; -+ -+ /* Get a free request frame and save the message context. -+ */ -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -+ dctlprintk((": no msg frames!\n")); -+ goto mptctl_raid_inq_exit; -+ } -+ -+ mpi_hdr = (MPIHeader_t *) mf; -+ pScsiRequest = (pSCSIIORequest_t) mf; -+ req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -+ -+ memset(pScsiRequest,0,sizeof(SCSIIORequest_t)); -+ pScsiRequest->Function = opcode; -+ pScsiRequest->TargetID = target; -+ pScsiRequest->Bus = 0; -+ pScsiRequest->CDBLength = 6; -+ pScsiRequest->DataLength = cpu_to_le16(request_data_sz); -+ pScsiRequest->MsgContext = mpi_hdr->MsgContext; -+ memcpy(pScsiRequest->CDB,inq_vpd_cdb,pScsiRequest->CDBLength); -+ pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ); -+ pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_SIMPLEQ); -+ -+ /* setup sense -+ */ -+ pScsiRequest->SenseBufferLength = MPT_SENSE_BUFFER_SIZE; -+ pScsiRequest->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma + -+ (req_idx * MPT_SENSE_BUFFER_ALLOC)); -+ -+ request_data = pci_alloc_consistent( -+ ioc->pcidev, request_data_sz, &request_data_dma); -+ -+ if (request_data == NULL) { -+ mpt_free_msg_frame(ioc, mf); -+ rc=-1; -+ goto mptctl_raid_inq_exit; -+ } -+ -+ memset(request_data,0,request_data_sz); -+ psge = (char *)&pScsiRequest->SGL; -+ mpt_add_sge(psge, (MPT_SGE_FLAGS_SSIMPLE_READ | 0xFC) , request_data_dma); -+ -+ /* The request is complete. Set the timer parameters -+ * and issue the request. -+ */ -+ ioc->ioctl->wait_done = 0; -+ mpt_put_msg_frame(mptctl_id, ioc, mf); -+ -+ /* Now wait for the command to complete */ -+ ii = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*MPT_IOCTL_DEFAULT_TIMEOUT /* 10 sec */); -+ -+ if(ii <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now we need to reset the board */ -+ rc=-1; -+ mpt_free_msg_frame(ioc, mf); -+ mptctl_timeout_expired(ioc->ioctl); -+ goto mptctl_raid_inq_exit; -+ } -+ -+ /* copy the request_data */ -+ memcpy(inq_vpd,request_data,min(request_data_sz,inq_vpd_sz)); -+ -+mptctl_raid_inq_exit: -+ -+ if (request_data) -+ pci_free_consistent(ioc->pcidev, request_data_sz, -+ request_data, request_data_dma); -+ -+ return rc; -+} -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Get RAID Config command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_raid_config(unsigned long arg) -+{ -+ CSMI_SAS_RAID_CONFIG_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_RAID_CONFIG_BUFFER karg,*pKarg=NULL; -+ CONFIGPARMS cfg; -+ ConfigPageHeader_t header; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ u8 volumeID, VolumeBus, physDiskNum, physDiskNumMax, found; -+ int volumepage0sz = 0, physdiskpage0sz = 0, ioc_page5_sz = 0; -+ dma_addr_t volume0_dma, physdisk0_dma, ioc_page5_dma; -+ pRaidVolumePage0_t pVolume0 = NULL; -+ pRaidPhysDiskPage0_t pPhysDisk0 = NULL; -+ pMpiRaidActionReply_t pRaidActionReply = NULL; -+ pIOCPage5_t pIocPage5 = NULL; -+ int i, idx, csmi_sas_raid_config_buffer_sz; -+ int copy_buffer_sz=0; -+ sas_device_info_t *sasDevice; -+ u32 device_info=0; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_raid_config struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ csmi_sas_raid_config_buffer_sz = karg.IoctlHeader.Length; -+ pKarg = kmalloc(csmi_sas_raid_config_buffer_sz, GFP_KERNEL); -+ if(!pKarg){ -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to malloc @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__,pKarg); -+ return -EFAULT; -+ } -+ -+ if (copy_from_user(pKarg, uarg, csmi_sas_raid_config_buffer_sz)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_raid_config struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(pKarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(pKarg); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(pKarg); -+ return -ENODEV; -+ } -+ -+ if (!ioc->raid_data.isRaid) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ -+ if (pKarg->Configuration.uChangeCount != 0 && -+ pKarg->Configuration.uChangeCount != ioc->csmi_change_count ) { -+ pKarg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ //pKarg->Configuration.uFailureCode = -+ // CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID; -+ goto cim_get_raid_config_exit; -+ } -+ -+ /* check to see if the input uRaidSetIndex is greater than the number of RAID sets */ -+ if(pKarg->Configuration.uRaidSetIndex >= -+ ioc->raid_data.pIocPg2->NumActiveVolumes) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_RAID_SET_OUT_OF_RANGE; -+ goto cim_get_raid_config_exit; -+ } -+ -+ /* -+ * get RAID Volume Page 0 -+ */ -+ volumeID = ioc->raid_data.pIocPg2->RaidVolume[pKarg->Configuration.uRaidSetIndex].VolumeID; -+ VolumeBus = ioc->raid_data.pIocPg2->RaidVolume[pKarg->Configuration.uRaidSetIndex].VolumeBus; -+ -+ header.PageVersion = 0; -+ header.PageLength = 0; -+ header.PageNumber = 0; -+ header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; -+ cfg.cfghdr.hdr = &header; -+ cfg.physAddr = -1; -+ cfg.pageAddr = (VolumeBus << 8) + volumeID; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ if (mpt_config(ioc, &cfg) != 0) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ -+ if (header.PageLength == 0) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ -+ volumepage0sz = header.PageLength * 4; -+ pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz, -+ &volume0_dma); -+ if (!pVolume0) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.physAddr = volume0_dma; -+ if (mpt_config(ioc, &cfg) != 0){ -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ -+ pKarg->Configuration.uCapacity = -+ (le32_to_cpu(pVolume0->MaxLBA)+1)/2048; -+ pKarg->Configuration.uStripeSize = -+ le32_to_cpu(pVolume0->StripeSize)/2; -+ -+ switch(pVolume0->VolumeType) { -+ case MPI_RAID_VOL_TYPE_IS: -+ pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_0; -+ break; -+ case MPI_RAID_VOL_TYPE_IME: -+ pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_10; -+ break; -+ case MPI_RAID_VOL_TYPE_IM: -+ pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_1; -+ break; -+ default: -+ pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_OTHER; -+ break; -+ } -+ -+ switch (pVolume0->VolumeStatus.State) { -+ case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL: -+ pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_OK; -+ break; -+ case MPI_RAIDVOL0_STATUS_STATE_DEGRADED: -+ /* Volume is degraded, check if Resyncing or Inactive */ -+ if (pVolume0->VolumeStatus.State & -+ MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS) { -+ pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_REBUILDING; -+ } -+ else if (pVolume0->VolumeStatus.State & -+ MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE) { -+ pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_OFFLINE; -+ } -+ else { -+ pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_DEGRADED; -+ } -+ break; -+ case MPI_RAIDVOL0_STATUS_STATE_FAILED: -+ pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_FAILED; -+ break; -+ } -+ -+ pKarg->Configuration.bInformation = 0; /* default */ -+ if(pVolume0->VolumeStatus.Flags & -+ MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS ) { -+ -+ uint64_t * ptrUint64; -+ uint64_t totalBlocks64, blocksRemaining64; -+ uint32_t totalBlocks32, blocksRemaining32; -+ -+ /* get percentage complete */ -+ pRaidActionReply = kmalloc( sizeof(MPI_RAID_VOL_INDICATOR) + -+ offsetof(MSG_RAID_ACTION_REPLY,ActionData), -+ GFP_KERNEL); -+ -+ if(pRaidActionReply == NULL){ -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to malloc @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__,pKarg); -+ goto cim_get_raid_config_exit; -+ } -+ -+ mptctl_do_raid(ioc, -+ MPI_RAID_ACTION_INDICATOR_STRUCT, -+ 0, VolumeBus, volumeID, pRaidActionReply); -+ -+ ptrUint64 = (uint64_t *)&pRaidActionReply->ActionData; -+ totalBlocks64 = *ptrUint64; -+ ptrUint64++; -+ blocksRemaining64 = *ptrUint64; -+ while(totalBlocks64 > 0xFFFFFFFFUL){ -+ totalBlocks64 = totalBlocks64 >> 1; -+ blocksRemaining64 = blocksRemaining64 >> 1; -+ } -+ totalBlocks32 = (uint32_t)totalBlocks64; -+ blocksRemaining32 = (uint32_t)blocksRemaining64; -+ -+ if(totalBlocks32) -+ pKarg->Configuration.bInformation = -+ (totalBlocks32 - blocksRemaining32) / -+ (totalBlocks32 / 100); -+ -+ kfree(pRaidActionReply); -+ } -+ -+ /* fill-in more information depending on data type */ -+ if (pKarg->Configuration.bDataType == CSMI_SAS_RAID_DATA_ADDITIONAL_DATA) { -+ pKarg->Configuration.Data->bLabel[0] = '\0'; -+ pKarg->Configuration.Data->bRaidSetLun[1] = 0; -+ pKarg->Configuration.Data->bWriteProtection = -+ CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN; -+ pKarg->Configuration.Data->bCacheSetting = -+ CSMI_SAS_RAID_SET_CACHE_UNKNOWN; -+ pKarg->Configuration.Data->bCacheRatio = 0; -+ pKarg->Configuration.Data->usBlockSize = 512; -+ pKarg->Configuration.Data->ulRaidSetExtentOffset = 0; -+ pKarg->Configuration.Data->ulRaidSetBlocks = le32_to_cpu(pVolume0->MaxLBA); -+ if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS || -+ pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IME ) { -+ pKarg->Configuration.Data->uStripeSizeInBlocks = -+ le32_to_cpu(pVolume0->StripeSize); -+ } -+ else { -+ pKarg->Configuration.Data->uStripeSizeInBlocks = 0; -+ } -+ pKarg->Configuration.Data->uSectorsPerTrack = 128; -+ for (i=0; i<16; i++) { -+ // unsupported -+ pKarg->Configuration.Data->bApplicationScratchPad[i] = 0xFF; -+ } -+ } -+ else if( pKarg->Configuration.bDataType == CSMI_SAS_RAID_DATA_DEVICE_ID ) { -+ /* Send inquiry to get VPD Page 0x83 */ -+ u8 * vpd_page=NULL; -+ u32 vpd_page_sz; -+ vpd_page_sz = pKarg->IoctlHeader.Length - sizeof(CSMI_SAS_RAID_CONFIG); -+ vpd_page = kmalloc(vpd_page_sz, GFP_KERNEL); -+ if (mptctl_raid_inq(ioc, MPI_FUNCTION_SCSI_IO_REQUEST, volumeID, 0x83, vpd_page, vpd_page_sz) != 0) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ kfree(vpd_page); -+ goto cim_get_raid_config_exit; -+ } -+ memset(&pKarg->Configuration.DeviceId->bDeviceIdentificationVPDPage, -+ 0,vpd_page_sz); -+ memcpy(&pKarg->Configuration.DeviceId->bDeviceIdentificationVPDPage, -+ vpd_page,vpd_page_sz); -+ kfree(vpd_page); -+ } -+ -+ if (pKarg->Configuration.bDataType != CSMI_SAS_RAID_DATA_DRIVES) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ goto cim_get_raid_config_exit; -+ } -+ -+ /* suppress drive information */ -+ if (pKarg->Configuration.bDriveCount == -+ CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ goto cim_get_raid_config_exit; -+ } -+ -+ /* get hotspare info, used later in this function */ -+ if (pVolume0->VolumeSettings.HotSparePool) { -+ /* Read and save IOC Page 5 -+ */ -+ header.PageVersion = 0; -+ header.PageLength = 0; -+ header.PageNumber = 5; -+ header.PageType = MPI_CONFIG_PAGETYPE_IOC; -+ cfg.cfghdr.hdr = &header; -+ cfg.physAddr = -1; -+ cfg.pageAddr = 0; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ if ((mpt_config(ioc, &cfg)==0) && (header.PageLength)) { -+ ioc_page5_sz = header.PageLength * 4; -+ pIocPage5 = pci_alloc_consistent(ioc->pcidev, -+ ioc_page5_sz, -+ &ioc_page5_dma); -+ memset(pIocPage5,0,ioc_page5_sz); -+ if (ioc_page5_dma) { -+ cfg.physAddr = ioc_page5_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ mpt_config(ioc, &cfg); -+ } -+ } -+ } -+ -+ /* -+ * get RAID Physical Disk Page 0 -+ */ -+ header.PageVersion = 0; -+ header.PageLength = 0; -+ header.PageNumber = 0; -+ header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK; -+ cfg.cfghdr.hdr = &header; -+ cfg.physAddr = -1; -+ cfg.pageAddr = 0; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ if (mpt_config(ioc, &cfg) != 0) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ -+ if (header.PageLength == 0) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ -+ physdiskpage0sz = header.PageLength * 4; -+ pPhysDisk0 = pci_alloc_consistent(ioc->pcidev, physdiskpage0sz, -+ &physdisk0_dma); -+ if (!pPhysDisk0) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ cfg.physAddr = physdisk0_dma; -+ -+ physDiskNumMax = (csmi_sas_raid_config_buffer_sz - -+ offsetof(CSMI_SAS_RAID_CONFIG,Drives)) -+ / sizeof(CSMI_SAS_RAID_DRIVES); -+ -+ pKarg->Configuration.bDriveCount=0; -+ -+ for (i=0; i< min(pVolume0->NumPhysDisks, physDiskNumMax); i++) { -+ -+ physDiskNum = pVolume0->PhysDisk[i].PhysDiskNum; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.pageAddr = physDiskNum; -+ if (mpt_config(ioc, &cfg) != 0){ -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_config_exit; -+ } -+ memset(&pKarg->Configuration.Drives[i],0, -+ sizeof(CSMI_SAS_RAID_DRIVES)); -+ memcpy(pKarg->Configuration.Drives[i].bModel, -+ pPhysDisk0->InquiryData.VendorID, -+ offsetof(RAID_PHYS_DISK0_INQUIRY_DATA,ProductRevLevel)); -+ memcpy(pKarg->Configuration.Drives[i].bFirmware, -+ pPhysDisk0->InquiryData.ProductRevLevel, -+ sizeof(pPhysDisk0->InquiryData.ProductRevLevel)); -+ if ((pPhysDisk0->ExtDiskIdentifier[0] == 'A') && -+ (pPhysDisk0->ExtDiskIdentifier[1] == 'T') && -+ (pPhysDisk0->ExtDiskIdentifier[2] == 'A')) { -+ memcpy(&pKarg->Configuration.Drives[i].bSerialNumber, -+ &pPhysDisk0->ExtDiskIdentifier[4], -+ 4); -+ memcpy(&pKarg->Configuration.Drives[i].bSerialNumber[4], -+ &pPhysDisk0->DiskIdentifier, -+ sizeof(pPhysDisk0->DiskIdentifier)); -+ } else { -+ memcpy(pKarg->Configuration.Drives[i].bSerialNumber, -+ pPhysDisk0->DiskIdentifier, -+ sizeof(pPhysDisk0->DiskIdentifier)); -+ } -+ -+ pKarg->Configuration.Drives[i].bDriveUsage = -+ (pPhysDisk0->PhysDiskStatus.Flags & -+ MPI_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME) ? -+ CSMI_SAS_DRIVE_CONFIG_NOT_USED : -+ CSMI_SAS_DRIVE_CONFIG_MEMBER; -+ -+ pKarg->Configuration.Drives[i].bDriveStatus = -+ CSMI_SAS_DRIVE_STATUS_OK; -+ if (pPhysDisk0->PhysDiskStatus.State == -+ MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED) { -+ pKarg->Configuration.Drives[i].bDriveStatus = -+ CSMI_SAS_DRIVE_STATUS_OFFLINE; -+ } -+ else if(pPhysDisk0->PhysDiskStatus.State) { -+ pKarg->Configuration.Drives[i].bDriveStatus = -+ CSMI_SAS_DRIVE_STATUS_FAILED; -+ if(pKarg->Configuration.bStatus == -+ CSMI_SAS_RAID_SET_STATUS_DEGRADED) -+ pKarg->Configuration.bInformation = i; -+ } -+ else if((pVolume0->VolumeStatus.Flags & -+ MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS) && -+ (pPhysDisk0->PhysDiskStatus.Flags & -+ MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC)) -+ pKarg->Configuration.Drives[i].bDriveStatus = -+ CSMI_SAS_DRIVE_STATUS_REBUILDING; -+ else if(pPhysDisk0->ErrorData.SmartCount) -+ pKarg->Configuration.Drives[i].bDriveStatus = -+ CSMI_SAS_DRIVE_STATUS_DEGRADED; -+ -+ /* Search the list for the matching SAS address. */ -+ found = FALSE; -+ list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) { -+ -+ /* Found the matching device. */ -+ if ((pPhysDisk0->PhysDiskIOC == sasDevice->Bus) && -+ (pPhysDisk0->PhysDiskID == -+ sasDevice->TargetId)) { -+ u64 SASAddress64; -+ found = TRUE; -+ -+ SASAddress64 = -+ reverse_byte_order64(&sasDevice->SASAddress); -+ memcpy(pKarg->Configuration.Drives[i].bSASAddress, -+ &SASAddress64,sizeof(u64)); -+ memset(pKarg->Configuration.Drives[i].bSASLun, -+ 0, sizeof(pKarg->Configuration.Drives[i].bSASLun)); -+ device_info = sasDevice->DeviceInfo; -+ if (device_info & MPI_SAS_DEVICE_INFO_SATA_DEVICE) { -+ pKarg->Configuration.Drives[i].bDriveType = -+ CSMI_SAS_DRIVE_TYPE_SATA; -+ } -+ else { /* drive in a volume can only be SAS/SATA */ -+ pKarg->Configuration.Drives[i].bDriveType = -+ CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS; -+ } -+ break; -+ } else -+ continue; /* Keep looking. */ -+ } -+ pKarg->Configuration.Drives[i].usBlockSize = 512; -+ pKarg->Configuration.Drives[i].uDriveIndex = pPhysDisk0->PhysDiskNum; -+ if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IM) { -+ pKarg->Configuration.Drives[i].ulTotalUserBlocks = -+ le32_to_cpu(pVolume0->MaxLBA) + 1; -+ } -+ else if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS) { -+ pKarg->Configuration.Drives[i].ulTotalUserBlocks = -+ (le32_to_cpu(pVolume0->MaxLBA) + 1) / (pVolume0->NumPhysDisks); -+ } -+ else if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IME) { -+ pKarg->Configuration.Drives[i].ulTotalUserBlocks = -+ ((le32_to_cpu(pVolume0->MaxLBA) + 1) / (pVolume0->NumPhysDisks)) * 2; -+ } -+ pKarg->Configuration.bDriveCount++; -+ } -+ -+ /* adding hot spare info at the end */ -+ if ((pVolume0->VolumeSettings.HotSparePool) && (pIocPage5 != NULL)) { -+ for (idx = 0, i = pVolume0->NumPhysDisks ; -+ idx < pIocPage5->NumHotSpares ; idx++) { -+ if (i >= physDiskNumMax) -+ break; -+ if ((pVolume0->VolumeSettings.HotSparePool & -+ pIocPage5->HotSpare[idx].HotSparePool) == 0) -+ continue; -+ if(pIocPage5->HotSpare[idx].Flags != -+ MPI_IOC_PAGE_5_HOT_SPARE_ACTIVE) -+ continue; -+ physDiskNum = pIocPage5->HotSpare[idx].PhysDiskNum; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.pageAddr = physDiskNum; -+ if (mpt_config(ioc, &cfg) != 0) -+ continue; -+ /* Search the list for the matching SAS address. */ -+ found = FALSE; -+ list_for_each_entry(sasDevice, &ioc->sasDeviceList, -+ list) { -+ /* Found the matching device. */ -+ if ((pPhysDisk0->PhysDiskIOC == -+ sasDevice->Bus) && -+ (pPhysDisk0->PhysDiskID == -+ sasDevice->TargetId)) { -+ u64 SASAddress64; -+ -+ /* sanity checks */ -+ -+ /* don't mix SSP hot spare -+ * in SATA volume -+ */ -+ if ((sasDevice->DeviceInfo & -+ MPI_SAS_DEVICE_INFO_SSP_TARGET) && -+ (device_info & -+ MPI_SAS_DEVICE_INFO_SATA_DEVICE)) -+ break; -+ -+ /* don't mix SATA hot spare -+ * in SSP volume -+ */ -+ if ((sasDevice->DeviceInfo & -+ MPI_SAS_DEVICE_INFO_SATA_DEVICE) && -+ (device_info & -+ MPI_SAS_DEVICE_INFO_SSP_TARGET)) -+ break; -+ -+ /* capacity check for IM volumes*/ -+ if ((pVolume0->VolumeType == -+ MPI_RAID_VOL_TYPE_IM) && -+ (le32_to_cpu(pVolume0->MaxLBA) + -+ (64*2*1024) /* metadata = 64MB*/ > -+ le32_to_cpu(pPhysDisk0->MaxLBA))) -+ break; -+ -+ /* capacity check for IME volumes*/ -+ if ((pVolume0->VolumeType == -+ MPI_RAID_VOL_TYPE_IME) && -+ (((le32_to_cpu(pVolume0->MaxLBA)/ -+ pVolume0->NumPhysDisks) * 2) + -+ (64*2*1024 ) /*metadata = 64MB*/ > -+ le32_to_cpu(pPhysDisk0->MaxLBA))) -+ break; -+ -+ found = TRUE; -+ -+ SASAddress64 = -+ reverse_byte_order64(&sasDevice->SASAddress); -+ memcpy(pKarg->Configuration.Drives[i].bSASAddress, -+ &SASAddress64,sizeof(u64)); -+ memset(pKarg->Configuration.Drives[i].bSASLun, 0, -+ sizeof(pKarg->Configuration.Drives[i].bSASLun)); -+ break; -+ } else -+ continue; /* Keep looking. */ -+ } -+ if (found==FALSE) -+ continue; -+ memset(&pKarg->Configuration.Drives[i],0, -+ sizeof(CSMI_SAS_RAID_DRIVES)); -+ memcpy(pKarg->Configuration.Drives[i].bModel, -+ pPhysDisk0->InquiryData.VendorID, -+ offsetof(RAID_PHYS_DISK0_INQUIRY_DATA,ProductRevLevel)); -+ memcpy(pKarg->Configuration.Drives[i].bFirmware, -+ pPhysDisk0->InquiryData.ProductRevLevel, -+ sizeof(pPhysDisk0->InquiryData.ProductRevLevel)); -+ if ((pPhysDisk0->ExtDiskIdentifier[0] == 'A') && -+ (pPhysDisk0->ExtDiskIdentifier[1] == 'T') && -+ (pPhysDisk0->ExtDiskIdentifier[2] == 'A')) { -+ memcpy(&pKarg->Configuration.Drives[i].bSerialNumber, -+ &pPhysDisk0->ExtDiskIdentifier[4], -+ 4); -+ memcpy(&pKarg->Configuration.Drives[i].bSerialNumber[4], -+ &pPhysDisk0->DiskIdentifier, -+ sizeof(pPhysDisk0->DiskIdentifier)); -+ } else { -+ memcpy(pKarg->Configuration.Drives[i].bSerialNumber, -+ pPhysDisk0->DiskIdentifier, -+ sizeof(pPhysDisk0->DiskIdentifier)); -+ } -+ pKarg->Configuration.Drives[i].bDriveStatus = -+ CSMI_SAS_DRIVE_STATUS_OK; -+ if(pPhysDisk0->PhysDiskStatus.State) -+ pKarg->Configuration.Drives[i].bDriveStatus = -+ CSMI_SAS_DRIVE_STATUS_FAILED; -+ else if(pPhysDisk0->ErrorData.SmartCount) -+ pKarg->Configuration.Drives[i].bDriveStatus = -+ CSMI_SAS_DRIVE_STATUS_DEGRADED; -+ pKarg->Configuration.Drives[i].bDriveUsage = -+ CSMI_SAS_DRIVE_CONFIG_SPARE; -+ i++; -+ pKarg->Configuration.bDriveCount++; -+ } -+ } -+ -+ // Only return data on the first 240 drives -+ if( pKarg->Configuration.bDriveCount > 0xF0 ) { -+ pKarg->Configuration.bDriveCount = -+ CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG; -+ } -+ -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+cim_get_raid_config_exit: -+ -+ if (pVolume0 != NULL) -+ pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0, -+ volume0_dma); -+ -+ if(pPhysDisk0 != NULL) -+ pci_free_consistent(ioc->pcidev, physdiskpage0sz, pPhysDisk0, -+ physdisk0_dma); -+ -+ if(pIocPage5 != NULL) -+ pci_free_consistent(ioc->pcidev, ioc_page5_sz, pIocPage5, -+ ioc_page5_dma); -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ -+ /* find the buffer size to copy depending on how much is filled-in */ -+ switch (pKarg->Configuration.bDataType) { -+ case CSMI_SAS_RAID_DATA_ADDITIONAL_DATA: -+ copy_buffer_sz = sizeof(IOCTL_HEADER) + -+ offsetof(CSMI_SAS_RAID_CONFIG,Data) + -+ sizeof(CSMI_SAS_RAID_SET_ADDITIONAL_DATA); -+ break; -+ case CSMI_SAS_RAID_DATA_DRIVES: -+ if (pKarg->Configuration.bDriveCount == -+ CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED) { -+ copy_buffer_sz = sizeof(IOCTL_HEADER) + -+ offsetof(CSMI_SAS_RAID_CONFIG,Drives); -+ } -+ else { -+ copy_buffer_sz = sizeof(IOCTL_HEADER) + -+ offsetof(CSMI_SAS_RAID_CONFIG,Drives) + -+ (pKarg->Configuration.bDriveCount * sizeof(CSMI_SAS_RAID_DRIVES)); -+ } -+ break; -+ case CSMI_SAS_RAID_DATA_DEVICE_ID: -+ copy_buffer_sz = sizeof(IOCTL_HEADER) + -+ offsetof(CSMI_SAS_RAID_CONFIG,DeviceId) + -+ sizeof(CSMI_SAS_RAID_DEVICE_ID); -+ break; -+ } -+ -+ if (copy_to_user((char *)arg, pKarg, copy_buffer_sz)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_get_raid_config @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(pKarg); -+ return -EFAULT; -+ } -+ -+ kfree(pKarg); -+ -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Get RAID Features command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_raid_features(unsigned long arg) -+{ -+ CSMI_SAS_RAID_FEATURES_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_RAID_FEATURES_BUFFER karg, *pKarg=NULL; -+ int i, csmi_sas_raid_features_buffer_sz, iocnum; -+ MPT_ADAPTER *ioc = NULL; -+ -+ u8 raidTypes[4] = { CSMI_SAS_RAID_TYPE_0, CSMI_SAS_RAID_TYPE_10, -+ CSMI_SAS_RAID_TYPE_1, CSMI_SAS_RAID_TYPE_1E }; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_raid_features struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ csmi_sas_raid_features_buffer_sz = karg.IoctlHeader.Length; -+ pKarg = kmalloc(csmi_sas_raid_features_buffer_sz, GFP_KERNEL); -+ if(!pKarg){ -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to malloc @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__,pKarg); -+ return -EFAULT; -+ } -+ -+ if (copy_from_user(pKarg, uarg, csmi_sas_raid_features_buffer_sz)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_raid_features struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(pKarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(pKarg); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(pKarg); -+ return -ENODEV; -+ } -+ -+ if (pKarg->Information.uChangeCount != 0 && -+ pKarg->Information.uChangeCount != ioc->csmi_change_count ) { -+ pKarg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ //pKarg->Information.uFailureCode = -+ // CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID; -+ goto cim_get_raid_features_exit; -+ } -+ -+ pKarg->Information.uFeatures = CSMI_SAS_RAID_FEATURE_REBUILD; -+ pKarg->Information.bDefaultTransformPriority = CSMI_SAS_PRIORITY_UNKNOWN; -+ pKarg->Information.bTransformPriority = CSMI_SAS_PRIORITY_UNKNOWN; -+ pKarg->Information.bDefaultRebuildPriority = CSMI_SAS_PRIORITY_UNKNOWN; -+ pKarg->Information.bRebuildPriority = pKarg->Information.bDefaultRebuildPriority; -+ pKarg->Information.bDefaultSurfaceScanPriority = CSMI_SAS_PRIORITY_UNKNOWN; -+ pKarg->Information.bSurfaceScanPriority = CSMI_SAS_PRIORITY_UNKNOWN; -+ pKarg->Information.uRaidSetTransformationRules = 0; -+ for (i=0; i<4; i++) { -+ pKarg->Information.RaidType[i].bRaidType = raidTypes[i]; -+ // Only support 64K stripe size -+ pKarg->Information.RaidType[i].uSupportedStripeSizeMap = 0x80; -+ } -+ pKarg->Information.RaidType[i].bRaidType = CSMI_SAS_RAID_TYPE_END; -+ pKarg->Information.bCacheRatiosSupported[0] = CSMI_SAS_RAID_CACHE_RATIO_END; -+ -+cim_get_raid_features_exit: -+ -+ /* -+ * Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, pKarg, -+ sizeof(CSMI_SAS_RAID_FEATURES_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_get_raid_features @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(pKarg); -+ return -EFAULT; -+ } -+ -+ kfree(pKarg); -+ -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Get RAID Control command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_raid_control(unsigned long arg) -+{ -+ CSMI_SAS_RAID_CONTROL_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_RAID_CONTROL_BUFFER karg, *pKarg=NULL; -+ int csmi_sas_raid_control_buffer_sz, iocnum; -+ MPT_ADAPTER *ioc = NULL; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_raid_control struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ csmi_sas_raid_control_buffer_sz = karg.IoctlHeader.Length; -+ pKarg = kmalloc(csmi_sas_raid_control_buffer_sz, GFP_KERNEL); -+ if(!pKarg){ -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to malloc @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__,pKarg); -+ return -EFAULT; -+ } -+ -+ if (copy_from_user(pKarg, uarg, csmi_sas_raid_control_buffer_sz)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_get_raid_features struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(pKarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(pKarg); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(pKarg); -+ return -ENODEV; -+ } -+ -+ if (!ioc->raid_data.isRaid) { -+ pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_raid_control_exit; -+ } -+ -+ if (pKarg->Information.uChangeCount != 0 && -+ pKarg->Information.uChangeCount != ioc->csmi_change_count ) { -+ pKarg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ pKarg->Information.uFailureCode = -+ CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID; -+ goto cim_get_raid_control_exit; -+ } -+ -+ if (pKarg->Information.bTransformPriority != CSMI_SAS_PRIORITY_UNCHANGED) { -+ pKarg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ //pKarg->Information.uFailureCode = -+ // CSMI_SAS_FAIL_CODE_EXPANSION_PRIORITY_INVALID; -+ } -+ if (pKarg->Information.bRebuildPriority != CSMI_SAS_PRIORITY_AUTO && -+ pKarg->Information.bRebuildPriority != CSMI_SAS_PRIORITY_UNCHANGED) { -+ pKarg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ pKarg->Information.uFailureCode = -+ CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID; -+ } -+ if (pKarg->Information.bCacheRatioFlag == CSMI_SAS_RAID_CACHE_RATIO_ENABLE) { -+ pKarg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ pKarg->Information.uFailureCode = -+ CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID; -+ } -+ pKarg->Information.bFailureDescription[0] = '\0'; -+ -+cim_get_raid_control_exit: -+ -+ /* -+ * Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, pKarg, -+ sizeof(CSMI_SAS_RAID_CONTROL_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_get_raid_control @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(pKarg); -+ return -EFAULT; -+ } -+ -+ kfree(pKarg); -+ -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Task Managment Config command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_task_managment(unsigned long arg) -+{ -+ CSMI_SAS_SSP_TASK_IU_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_SSP_TASK_IU_BUFFER karg; -+ pSCSITaskMgmt_t pScsiTm; -+ pSCSITaskMgmtReply_t pScsiTmReply; -+ MPT_ADAPTER *ioc = NULL; -+ MPT_SCSI_HOST *hd; -+ MPT_FRAME_HDR *mf = NULL; -+ MPIHeader_t *mpi_hdr; -+ int iocnum; -+ u8 taskType; -+ u8 path; -+ u8 target; -+ u8 lun; -+ u8 queueTag; -+ u32 msgContext = 0; -+ int retval; -+ int i, ii; -+ u8 found_qtag; -+ int wait_timeout; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SSP_TASK_IU_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_task_managment struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ /* try to catch an error -+ */ -+ if ((karg.Parameters.uFlags & CSMI_SAS_TASK_IU) && -+ (karg.Parameters.uFlags & CSMI_SAS_HARD_RESET_SEQUENCE)) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -+ goto cim_get_task_managment_exit; -+ } -+ -+ if (karg.Parameters.uFlags & CSMI_SAS_TASK_IU) { -+ switch (karg.Parameters.bTaskManagementFunction) { -+ -+ case CSMI_SAS_SSP_ABORT_TASK: -+ taskType = MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK; -+ break; -+ case CSMI_SAS_SSP_ABORT_TASK_SET: -+ taskType = MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET; -+ break; -+ case CSMI_SAS_SSP_CLEAR_TASK_SET: -+ taskType = MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET; -+ break; -+ case CSMI_SAS_SSP_LOGICAL_UNIT_RESET: -+ taskType = MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET; -+ break; -+ case CSMI_SAS_SSP_CLEAR_ACA: -+ case CSMI_SAS_SSP_QUERY_TASK: -+ default: -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ goto cim_get_task_managment_exit; -+ } -+ }else if (karg.Parameters.uFlags & CSMI_SAS_HARD_RESET_SEQUENCE) { -+ /* set the code up to do a hard reset -+ */ -+ taskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET; -+ }else { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -+ goto cim_get_task_managment_exit; -+ } -+ -+ path = karg.Parameters.bPathId; -+ target = karg.Parameters.bTargetId; -+ lun = karg.Parameters.bLun; -+ queueTag = (u8)karg.Parameters.uQueueTag & 0xFF; -+ -+ if ((ioc->sh == NULL) || (ioc->sh->hostdata == NULL)) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ goto cim_get_task_managment_exit; -+ } -+ else -+ hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; -+ -+ switch ( karg.Parameters.uInformation ) { -+ case CSMI_SAS_SSP_TEST: -+ dsasprintk(("TM request for test purposes\n")); -+ break; -+ case CSMI_SAS_SSP_EXCEEDED: -+ dsasprintk(("TM request due to timeout\n")); -+ break; -+ case CSMI_SAS_SSP_DEMAND: -+ dsasprintk(("TM request demanded by app\n")); -+ break; -+ case CSMI_SAS_SSP_TRIGGER: -+ dsasprintk(("TM request sent to trigger event\n")); -+ break; -+ } -+ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ -+ switch (taskType) { -+ -+ case MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK: -+ /* -+ * look up qtag in the ScsiLookup[] table -+ */ -+ for (i=0,found_qtag=0;i<hd->ioc->req_depth;i++) { -+ if ((hd->ScsiLookup[i]) && -+ (hd->ScsiLookup[i]->tag == queueTag)) { -+ mf = MPT_INDEX_2_MFPTR(hd->ioc, i); -+ msgContext = -+ mf->u.frame.hwhdr.msgctxu.MsgContext; -+ found_qtag=1; -+ break; -+ } -+ } -+ -+ if(!found_qtag) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ goto cim_get_task_managment_exit; -+ } -+ -+ case MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET: -+ case MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET: -+ case MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET: -+ /* for now, this should work -+ */ -+ case MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET: -+ -+ /* Single threading .... -+ */ -+ if (mptctl_set_tm_flags(hd) != 0) { -+ karg.IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_FAILED; -+ goto cim_get_task_managment_exit; -+ } -+ -+ /* Send request -+ */ -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -+ dctlprintk((": no msg frames!\n")); -+ mptctl_free_tm_flags(ioc); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_task_managment_exit; -+ } -+ -+ mpi_hdr = (MPIHeader_t *) mf; -+ pScsiTm = (pSCSITaskMgmt_t ) mf; -+ -+ memset(pScsiTm,0,sizeof(SCSITaskMgmt_t)); -+ pScsiTm->TaskType = taskType; -+ pScsiTm->Bus = path; -+ pScsiTm->TargetID = target; -+ pScsiTm->LUN[1] = lun; -+ pScsiTm->MsgContext = mpi_hdr->MsgContext; -+ pScsiTm->TaskMsgContext = msgContext; -+ pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT; -+ -+ ioc->ioctl->wait_done = 0; -+ -+ DBG_DUMP_TM_REQUEST_FRAME((u32 *)mf); -+ -+ if ((retval = mpt_send_handshake_request(mptctl_id, ioc->ioctl->ioc, -+ sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP)) != 0) { -+ dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!" -+ " (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd, -+ hd->ioc, mf)); -+ goto cim_get_task_managment_exit; -+ } -+ -+ /* Now wait for the command to complete */ -+ wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout); -+ ii = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*wait_timeout); -+ -+ if(ii <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now we need to reset the board */ -+ mptctl_free_tm_flags(ioc); -+ mpt_free_msg_frame(hd->ioc, mf); -+ mptctl_timeout_expired(ioc->ioctl); -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_get_task_managment_exit; -+ } -+ -+ if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) { -+ pScsiTmReply = -+ (pSCSITaskMgmtReply_t ) ioc->ioctl->ReplyFrame; -+ -+ memset(&karg.Status,0, -+ sizeof(CSMI_SAS_SSP_PASSTHRU_STATUS)); -+ -+ if(le16_to_cpu(pScsiTmReply->IOCStatus) == MPI_IOCSTATUS_SUCCESS) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ karg.Status.bSSPStatus = CSMI_SAS_SSP_STATUS_COMPLETED; -+ }else if(le16_to_cpu(pScsiTmReply->IOCStatus) == -+ MPI_IOCSTATUS_INSUFFICIENT_RESOURCES) { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ karg.Status.bSSPStatus = CSMI_SAS_SSP_STATUS_RETRY; -+ }else { -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ karg.Status.bSSPStatus = CSMI_SAS_SSP_STATUS_FATAL_ERROR; -+ } -+ }else{ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ } -+ -+ break; -+ -+ default: -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -+ break; -+ } -+ -+ -+cim_get_task_managment_exit: -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_SSP_TASK_IU_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_task_managment @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+} -+ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* -+ * map_sas_status_to_csmi - Conversion for Connection Status -+ * @mpi_sas_status: Sas status returned by the firmware -+ * -+ * Returns converted connection status -+ * -+ */ -+static u8 -+map_sas_status_to_csmi(u8 mpi_sas_status) -+{ -+ u8 csmi_connect_status; -+ -+ switch (mpi_sas_status) { -+ -+ case MPI_SASSTATUS_SUCCESS: -+ csmi_connect_status = CSMI_SAS_OPEN_ACCEPT; -+ break; -+ -+ case MPI_SASSTATUS_UTC_BAD_DEST: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_BAD_DESTINATION; -+ break; -+ -+ case MPI_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED; -+ break; -+ -+ case MPI_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED; -+ break; -+ -+ case MPI_SASSTATUS_UTC_STP_RESOURCES_BUSY: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY; -+ break; -+ -+ case MPI_SASSTATUS_UTC_WRONG_DESTINATION: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION; -+ break; -+ -+ case MPI_SASSTATUS_SDSF_NAK_RECEIVED: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_RETRY; -+ break; -+ -+ case MPI_SASSTATUS_SDSF_CONNECTION_FAILED: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED; -+ break; -+ -+ case MPI_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_NO_DESTINATION; -+ break; -+ -+ case MPI_SASSTATUS_UNKNOWN_ERROR: -+ case MPI_SASSTATUS_INVALID_FRAME: -+ case MPI_SASSTATUS_UTC_BREAK_RECEIVED: -+ case MPI_SASSTATUS_UTC_PORT_LAYER_REQUEST: -+ case MPI_SASSTATUS_SHORT_INFORMATION_UNIT: -+ case MPI_SASSTATUS_LONG_INFORMATION_UNIT: -+ case MPI_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA: -+ case MPI_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR: -+ case MPI_SASSTATUS_XFER_RDY_NOT_EXPECTED: -+ case MPI_SASSTATUS_DATA_INCORRECT_DATA_LENGTH: -+ case MPI_SASSTATUS_DATA_TOO_MUCH_READ_DATA: -+ case MPI_SASSTATUS_DATA_OFFSET_ERROR: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_RESERVE_STOP; -+ break; -+ -+ default: -+ csmi_connect_status = CSMI_SAS_OPEN_REJECT_RESERVE_STOP; -+ break; -+ } -+ -+ return csmi_connect_status; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* mptctl_csmi_sas_phy_reset -+ * Issues a phy link reset or phy hard reset -+ * -+ * @ioc - Pointer to MPT_ADAPTER structure -+ * @PhyNum - phy number -+ * @opcode - {MPI_SAS_OP_PHY_LINK_RESET,MPI_SAS_OP_PHY_HARD_RESET} -+ * -+ * Returns: 0 for success, non-zero error -+ */ -+static int -+mptctl_csmi_sas_phy_reset(MPT_ADAPTER *ioc, u8 PhyNum, u8 opcode) -+{ -+ SasIoUnitControlRequest_t *sasIoUnitCntrReq; -+ SasIoUnitControlReply_t *sasIoUnitCntrReply; -+ MPT_FRAME_HDR *mf = NULL; -+ MPIHeader_t *mpi_hdr; -+ int ii; -+ -+ if ((opcode != MPI_SAS_OP_PHY_LINK_RESET) && -+ (opcode != MPI_SAS_OP_PHY_HARD_RESET)) -+ return -1; -+ -+ /* Get a MF for this command. -+ */ -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -+ dctlprintk((": no msg frames!\n")); -+ return -1; -+ } -+ -+ mpi_hdr = (MPIHeader_t *) mf; -+ sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf; -+ memset(sasIoUnitCntrReq,0,sizeof(SasIoUnitControlRequest_t)); -+ sasIoUnitCntrReq->Function = MPI_FUNCTION_SAS_IO_UNIT_CONTROL; -+ sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext; -+ sasIoUnitCntrReq->Operation = opcode; -+ sasIoUnitCntrReq->PhyNum = PhyNum; -+ -+ ioc->ioctl->wait_done = 0; -+ mpt_put_msg_frame(mptctl_id, ioc, mf); -+ -+ /* Now wait for the command to complete */ -+ ii = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*MPT_IOCTL_DEFAULT_TIMEOUT /* 10 sec */); -+ -+ if(ii <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now we need to reset the board */ -+ mpt_free_msg_frame(ioc, mf); -+ mptctl_timeout_expired(ioc->ioctl); -+ return -1; -+ } -+ -+ if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) -+ return -1; -+ -+ /* process the completed Reply Message Frame */ -+ sasIoUnitCntrReply = (SasIoUnitControlReply_t *)ioc->ioctl->ReplyFrame; -+ if (sasIoUnitCntrReply->IOCStatus != MPI_IOCSTATUS_SUCCESS) { -+ printk("%s: IOCStatus=0x%X IOCLogInfo=0x%X\n", -+ __FUNCTION__, -+ sasIoUnitCntrReply->IOCStatus, -+ sasIoUnitCntrReply->IOCLogInfo); -+ return -1; -+ } -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Phy Control command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_phy_control(unsigned long arg) -+{ -+ CSMI_SAS_PHY_CONTROL_BUFFER __user *uarg = (void __user *) arg; -+ IOCTL_HEADER ioctl_header; -+ PCSMI_SAS_PHY_CONTROL_BUFFER karg; -+ SasIOUnitPage0_t *sasIoUnitPg0=NULL; -+ dma_addr_t sasIoUnitPg0_dma; -+ int sasIoUnitPg0_data_sz=0; -+ SasIOUnitPage1_t *sasIoUnitPg1=NULL; -+ dma_addr_t sasIoUnitPg1_dma; -+ int sasIoUnitPg1_data_sz=0; -+ ConfigExtendedPageHeader_t hdr; -+ CONFIGPARMS cfg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ int csmi_sas_phy_control_buffer_sz; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&ioctl_header, uarg, sizeof(IOCTL_HEADER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in IOCTL_HEADER" -+ "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ csmi_sas_phy_control_buffer_sz = ioctl_header.Length; -+ karg = kmalloc(csmi_sas_phy_control_buffer_sz,GFP_KERNEL); -+ if(karg==NULL){ -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to malloc @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__,karg); -+ return -EFAULT; -+ } -+ -+ if (copy_from_user(karg, uarg, csmi_sas_phy_control_buffer_sz)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_phy_control_buffer " -+ "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(karg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(ioctl_header.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(karg); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(karg); -+ return -ENODEV; -+ } -+ -+ if (karg->bPhyIdentifier >= ioc->numPhys) { -+ karg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ /* -+ * Retreive SAS IOUNIT PAGE 0 -+ */ -+ -+ hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.pageAddr = 0; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if (mpt_config(ioc, &cfg) != 0) { -+ dctlprintk(( -+ ": FAILED: READ MPI_SASIOUNITPAGE0: HEADER\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ dctlprintk((": hdr.ExtPageLength == 0\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4; -+ sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev, -+ sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma); -+ -+ if (!sasIoUnitPg0) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz); -+ cfg.physAddr = sasIoUnitPg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ if (mpt_config(ioc, &cfg) != 0) { -+ dctlprintk(( -+ ": FAILED: READ MPI_SASIOUNITPAGE0: CURRENT\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ /* -+ * Retreive SAS IOUNIT PAGE 1 -+ */ -+ -+ hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 1; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.pageAddr = 0; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if (mpt_config(ioc, &cfg) != 0) { -+ dctlprintk(( -+ ": FAILED: READ MPI_SASIOUNITPAGE1: HEADER\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ dctlprintk((": hdr.ExtPageLength == 0\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ sasIoUnitPg1_data_sz = hdr.ExtPageLength * 4; -+ sasIoUnitPg1 = (SasIOUnitPage1_t *) pci_alloc_consistent(ioc->pcidev, -+ sasIoUnitPg1_data_sz, &sasIoUnitPg1_dma); -+ -+ if (!sasIoUnitPg1) { -+ dctlprintk((": pci_alloc_consistent: FAILED\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ memset((u8 *)sasIoUnitPg1, 0, sasIoUnitPg1_data_sz); -+ cfg.physAddr = sasIoUnitPg1_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ if (mpt_config(ioc, &cfg) != 0) { -+ dctlprintk(( -+ ": FAILED: READ MPI_SASIOUNITPAGE1: CURRENT\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ -+ switch (karg->uFunction) { -+ -+ case CSMI_SAS_PC_LINK_RESET: -+ case CSMI_SAS_PC_HARD_RESET: -+ { -+ u8 opcode = (karg->uFunction==CSMI_SAS_PC_LINK_RESET) ? -+ MPI_SAS_OP_PHY_LINK_RESET : MPI_SAS_OP_PHY_HARD_RESET; -+ -+ if((karg->uLinkFlags & CSMI_SAS_PHY_ACTIVATE_CONTROL) && -+ (karg->usLengthOfControl >= sizeof(CSMI_SAS_PHY_CONTROL)) && -+ (karg->bNumberOfControls > 0)){ -+ if(karg->Control[0].bRate == -+ CSMI_SAS_LINK_RATE_1_5_GBPS) { -+ sasIoUnitPg1->PhyData[karg->bPhyIdentifier].MaxMinLinkRate = -+ MPI_SAS_IOUNIT1_MAX_RATE_1_5 | -+ MPI_SAS_IOUNIT1_MIN_RATE_1_5; -+ } -+ else if(karg->Control[0].bRate == -+ CSMI_SAS_LINK_RATE_3_0_GBPS) { -+ sasIoUnitPg1->PhyData[karg->bPhyIdentifier].MaxMinLinkRate = -+ MPI_SAS_IOUNIT1_MAX_RATE_3_0 | -+ MPI_SAS_IOUNIT1_MIN_RATE_3_0; -+ } -+ sasIoUnitPg1->PhyData[karg->bPhyIdentifier].PhyFlags &= -+ ~MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE; -+ cfg.dir = 1; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM; -+ if (mpt_config(ioc, &cfg) != 0) { -+ dctlprintk(( -+ ": FAILED: WRITE MPI_SASIOUNITPAGE1 NVRAM\n")); -+ karg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; -+ if (mpt_config(ioc, &cfg) != 0) { -+ dctlprintk(( -+ ": FAILED: WRITE MPI_SASIOUNITPAGE1 CURRENT\n")); -+ karg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ } -+ if (mptctl_csmi_sas_phy_reset(ioc, -+ karg->bPhyIdentifier, opcode) != 0) { -+ dctlprintk(( -+ ": FAILED: mptctl_csmi_sas_phy_reset\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ break; -+ -+ } -+ case CSMI_SAS_PC_PHY_DISABLE: -+ if(karg->usLengthOfControl || karg->bNumberOfControls) { -+ karg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ break; -+ } -+ sasIoUnitPg1->PhyData[karg->bPhyIdentifier].PhyFlags |= -+ MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE; -+ cfg.dir = 1; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM; -+ if (mpt_config(ioc, &cfg) != 0) { -+ dctlprintk(( -+ ": FAILED: WRITE MPI_SASIOUNITPAGE1 NVRAM\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; -+ if (mpt_config(ioc, &cfg) != 0) { -+ dctlprintk(( -+ ": FAILED: WRITE MPI_SASIOUNITPAGE1 CURRENT\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ if (mptctl_csmi_sas_phy_reset(ioc, -+ karg->bPhyIdentifier, MPI_SAS_OP_PHY_HARD_RESET) != 0) { -+ dctlprintk(( -+ ": FAILED: mptctl_csmi_sas_phy_reset\n")); -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_phy_control_exit; -+ } -+ break; -+ -+ case CSMI_SAS_PC_GET_PHY_SETTINGS: -+ if(karg->usLengthOfControl || karg->bNumberOfControls) { -+ karg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ break; -+ } -+ if(csmi_sas_phy_control_buffer_sz < -+ offsetof(CSMI_SAS_PHY_CONTROL_BUFFER,Control) + -+ (4* sizeof(CSMI_SAS_PHY_CONTROL))) { -+ karg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_INVALID_PARAMETER; -+ break; -+ } -+ karg->usLengthOfControl = sizeof(CSMI_SAS_PHY_CONTROL); -+ karg->bNumberOfControls = 4; -+ karg->Control[0].bType = CSMI_SAS_SAS; -+ karg->Control[0].bRate = CSMI_SAS_LINK_RATE_1_5_GBPS; -+ karg->Control[1].bType = CSMI_SAS_SAS; -+ karg->Control[1].bRate = CSMI_SAS_LINK_RATE_3_0_GBPS; -+ karg->Control[2].bType = CSMI_SAS_SATA; -+ karg->Control[2].bRate = CSMI_SAS_LINK_RATE_1_5_GBPS; -+ karg->Control[3].bType = CSMI_SAS_SATA; -+ karg->Control[3].bRate = CSMI_SAS_LINK_RATE_3_0_GBPS; -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ break; -+ default: -+ break; -+ } -+ -+cim_sas_phy_control_exit: -+ -+ if (sasIoUnitPg0) -+ pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz, -+ (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma); -+ -+ if (sasIoUnitPg1) -+ pci_free_consistent(ioc->pcidev, sasIoUnitPg1_data_sz, -+ (u8 *) sasIoUnitPg1, sasIoUnitPg1_dma); -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg,karg,csmi_sas_phy_control_buffer_sz)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_phy_control_buffer @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(karg); -+ return -EFAULT; -+ } -+ -+ kfree(karg); -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Get Connector info command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_connector_info(unsigned long arg) -+{ -+ CSMI_SAS_CONNECTOR_INFO_BUFFER __user *uarg = (void __user *) arg; -+ CSMI_SAS_CONNECTOR_INFO_BUFFER karg; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum; -+ int i; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CONNECTOR_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_connector_info_buffer" -+ " struct @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ return -ENODEV; -+ } -+ -+ karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+// TODO - to be implemented - This requires MPI changes to a Manufacturing page -+ for (i=0;i< ioc->numPhys;i++) { -+ karg.Reference[i].uPinout = CSMI_SAS_CON_UNKNOWN; -+ strcpy(karg.Reference[i].bConnector,""); -+ karg.Reference[i].bLocation = CSMI_SAS_CON_UNKNOWN; -+ } -+ -+// cim_sas_get_connector_info_exit: -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, &karg, -+ sizeof(CSMI_SAS_CONNECTOR_INFO_BUFFER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_connector_info_buffer @" -+ "%p\n", -+ __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ return 0; -+ -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* mptctl_csmi_sas_fill_location_data -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ */ -+static int -+mptctl_csmi_sas_fill_location_data(MPT_ADAPTER *ioc, u8 target, u8 bus, u8 opcode, CSMI_SAS_LOCATION_IDENTIFIER * location_ident) -+{ -+ -+ ConfigExtendedPageHeader_t hdr; -+ CONFIGPARMS cfg; -+ int rc; -+ SasDevicePage0_t *sasDevicePg0=NULL; -+ SasEnclosurePage0_t *sasEnclosurePg0=NULL; -+ dma_addr_t sasDevicePg0_dma,sasEnclosurePg0_dma; -+ int sasDevicePg0_data_sz=0; -+ int sasEnclosurePg0_data_sz=0; -+ u64 SASAddress64; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ /* SAS Device Page 0 */ -+ hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ rc=-1; -+ goto fill_location_data_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ rc=-1; -+ goto fill_location_data_exit; -+ } -+ -+ sasDevicePg0_data_sz = hdr.ExtPageLength * 4; -+ sasDevicePg0 = (SasDevicePage0_t *) pci_alloc_consistent( -+ ioc->pcidev, sasDevicePg0_data_sz, &sasDevicePg0_dma); -+ if (!sasDevicePg0) { -+ rc=-1; -+ goto fill_location_data_exit; -+ } -+ -+ memset((u8 *)sasDevicePg0, 0, sasDevicePg0_data_sz); -+ cfg.physAddr = sasDevicePg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.pageAddr = (bus << 8) + target -+ + (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID << -+ MPI_SAS_DEVICE_PGAD_FORM_SHIFT); -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ rc=-1; -+ goto fill_location_data_exit; -+ } -+ -+ location_ident->bLocationFlags |= CSMI_SAS_LOCATE_SAS_ADDRESS_VALID; -+ SASAddress64 = reverse_byte_order64((u64 *)&sasDevicePg0->SASAddress); -+ memcpy(&location_ident->bSASAddress,&SASAddress64,sizeof(u64)); -+ -+ location_ident->bLocationFlags |= CSMI_SAS_LOCATE_SAS_LUN_VALID; -+ memset(location_ident->bSASLun, 0, sizeof(location_ident->bSASLun)); -+ -+ /* SAS Enclosure Page 0 */ -+ hdr.PageVersion = MPI_SASENCLOSURE0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_ENCLOSURE; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ rc=0; -+ goto fill_location_data_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ rc=0; -+ goto fill_location_data_exit; -+ } -+ -+ sasEnclosurePg0_data_sz = hdr.ExtPageLength * 4; -+ sasEnclosurePg0 = (SasEnclosurePage0_t *) pci_alloc_consistent( -+ ioc->pcidev, sasEnclosurePg0_data_sz, &sasEnclosurePg0_dma); -+ if (!sasEnclosurePg0) { -+ rc=0; -+ goto fill_location_data_exit; -+ } -+ cfg.physAddr = sasEnclosurePg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.pageAddr = le16_to_cpu(sasDevicePg0->EnclosureHandle) -+ + (MPI_SAS_ENCLOS_PGAD_FORM_HANDLE << -+ MPI_SAS_ENCLOS_PGAD_FORM_SHIFT); -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ rc=0; -+ goto fill_location_data_exit; -+ } -+ -+ location_ident->bLocationFlags |= -+ CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID; -+ SASAddress64 = reverse_byte_order64( -+ (u64 *)&sasEnclosurePg0->EnclosureLogicalID); -+ if (SASAddress64) -+ memcpy(&location_ident->bEnclosureIdentifier, -+ &SASAddress64,sizeof(u64)); -+ else -+ strcpy(location_ident->bEnclosureIdentifier,"Internal"); -+ -+// bBayPrefix - not supported -+ -+// TODO - We need to look at sasEnclosurePg0-.Flags , to determine -+// whether SEP BUS/TargetID is valid. Ifs its a SES device, then -+// issue internal inquiry to (bus/target) to gather the Enclosure name. -+// If the device is SMP, then issue SMP_MANUFACTURING to get enclosure name -+// If its direct attached, there is no enclosure name -+ location_ident->bLocationFlags |= CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID; -+ strcpy(location_ident->bEnclosureName,"Not Supported"); -+ -+ location_ident->bLocationFlags |= CSMI_SAS_LOCATE_LOCATION_STATE_VALID; -+ location_ident->bLocationState = CSMI_SAS_LOCATE_UNKNOWN; -+ -+ location_ident->bLocationFlags |= CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID; -+ location_ident->bBayIdentifier = le16_to_cpu(sasDevicePg0->Slot); -+ -+ -+// TODO - illuminating LEDs, -+// karg->bIdentify = CSMI_SAS_LOCATE_FORCE_OFF, CSMI_SAS_LOCATE_FORCE_ON -+// We can enable/disable LEDs by SCSI Enclosure Processor MPI request message -+// printk("Flags=0x%x\n",sasEnclosurePg0->Flags); -+ -+/* check sasEnclosurePg0->Flags - -+ * to validate whether we need to send the SEPRequest -+ * bit:5 should be set -+ * bit:3-0 any bit should be set. If zero, then SEPRequest will fail -+*/ -+ -+/* MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR -+ * Look in mpi_init.h -+ * SEPRequest_t = structure -+ * -+ * SEPRequest_t->Action should be set to MPI_SEP_REQ_ACTION_WRITE_STATUS -+ * -+ * SEPRequest_t->Flags should be set to -+ * MPI_SEP_REQ_FLAGS_ENCLOSURE_SLOT_ADDRESS, to pass along enclosure/slot ids -+ * -+ * SEPRequest_t->SlotStatus |= MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST - this -+ * will illuminate the LEDs -+ */ -+ -+fill_location_data_exit: -+ -+ if (sasDevicePg0 != NULL) -+ pci_free_consistent(ioc->pcidev, sasDevicePg0_data_sz, -+ sasDevicePg0, sasDevicePg0_dma); -+ -+ if (sasEnclosurePg0 != NULL) -+ pci_free_consistent(ioc->pcidev, sasEnclosurePg0_data_sz, -+ sasEnclosurePg0, sasEnclosurePg0_dma); -+ return rc; -+} -+ -+ -+static int -+mptctl_csmi_sas_fill_location_data_raid(MPT_ADAPTER *ioc, PCSMI_SAS_GET_LOCATION_BUFFER karg, u8 volumeID, u8 VolumeBus) -+{ -+ pRaidVolumePage0_t pVolume0 = NULL; -+ pRaidPhysDiskPage0_t pPhysDisk0 = NULL; -+ CONFIGPARMS cfg; -+ ConfigPageHeader_t header; -+ u8 physDiskNumMax,physDiskNum; -+ int volumepage0sz = 0, physdiskpage0sz = 0; -+ dma_addr_t volume0_dma, physdisk0_dma; -+ int csmi_sas_get_location_sz; -+ int rc = 0,i; -+ -+ csmi_sas_get_location_sz = karg->IoctlHeader.Length; -+ physDiskNumMax = (csmi_sas_get_location_sz - -+ offsetof(CSMI_SAS_GET_LOCATION_BUFFER,Location)) -+ / sizeof(CSMI_SAS_LOCATION_IDENTIFIER); -+ karg->bNumberOfLocationIdentifiers=0; -+ -+ /* -+ * get RAID Volume Page 0 -+ */ -+ -+ header.PageVersion = 0; -+ header.PageLength = 0; -+ header.PageNumber = 0; -+ header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; -+ cfg.cfghdr.hdr = &header; -+ cfg.physAddr = -1; -+ cfg.pageAddr = (VolumeBus << 8) + volumeID; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ if (mpt_config(ioc, &cfg) != 0) { -+ rc = -1; -+ goto sas_fill_location_data_raid_exit; -+ } -+ -+ if (header.PageLength == 0) { -+ rc = -1; -+ goto sas_fill_location_data_raid_exit; -+ } -+ -+ volumepage0sz = header.PageLength * 4; -+ pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz, -+ &volume0_dma); -+ if (!pVolume0) { -+ rc = -1; -+ goto sas_fill_location_data_raid_exit; -+ } -+ -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.physAddr = volume0_dma; -+ if (mpt_config(ioc, &cfg) != 0){ -+ rc = -1; -+ goto sas_fill_location_data_raid_exit; -+ } -+ -+ -+ /* -+ * get RAID Physical Disk Page 0 -+ */ -+ header.PageVersion = 0; -+ header.PageLength = 0; -+ header.PageNumber = 0; -+ header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK; -+ cfg.cfghdr.hdr = &header; -+ cfg.physAddr = -1; -+ cfg.pageAddr = 0; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; -+ cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT; -+ if (mpt_config(ioc, &cfg) != 0) { -+ rc = -1; -+ goto sas_fill_location_data_raid_exit; -+ } -+ -+ if (header.PageLength == 0) { -+ rc = -1; -+ goto sas_fill_location_data_raid_exit; -+ } -+ -+ physdiskpage0sz = header.PageLength * 4; -+ pPhysDisk0 = pci_alloc_consistent(ioc->pcidev, physdiskpage0sz, -+ &physdisk0_dma); -+ if (!pPhysDisk0) { -+ rc = -1; -+ goto sas_fill_location_data_raid_exit; -+ } -+ cfg.physAddr = physdisk0_dma; -+ -+ for (i=0; i< min(pVolume0->NumPhysDisks, physDiskNumMax); i++) { -+ -+ physDiskNum = pVolume0->PhysDisk[i].PhysDiskNum; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.pageAddr = physDiskNum; -+ if (mpt_config(ioc, &cfg) != 0){ -+ rc = -1; -+ goto sas_fill_location_data_raid_exit; -+ } -+ -+ if((mptctl_csmi_sas_fill_location_data(ioc, -+ pPhysDisk0->PhysDiskID, -+ karg->bPathId, karg->bIdentify, -+ &karg->Location[karg->bNumberOfLocationIdentifiers])) == 0) -+ karg->bNumberOfLocationIdentifiers++; -+ } -+ -+ -+sas_fill_location_data_raid_exit: -+ -+ if (pVolume0 != NULL) -+ pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0, -+ volume0_dma); -+ -+ if(pPhysDisk0 != NULL) -+ pci_free_consistent(ioc->pcidev, physdiskpage0sz, pPhysDisk0, -+ physdisk0_dma); -+ -+ return rc; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* Prototype Routine for the CSMI SAS Get location command. -+ * -+ * Outputs: None. -+ * Return: 0 if successful -+ * -EFAULT if data unavailable -+ * -ENODEV if no such device/adapter -+ */ -+static int -+mptctl_csmi_sas_get_location(unsigned long arg) -+{ -+ CSMI_SAS_GET_LOCATION_BUFFER __user *uarg = (void __user *) arg; -+ PCSMI_SAS_GET_LOCATION_BUFFER karg; -+ IOCTL_HEADER ioctl_header; -+ MPT_ADAPTER *ioc = NULL; -+ int iocnum,i; -+ int csmi_sas_get_location_sz; -+ -+ dctlprintk((": %s called.\n",__FUNCTION__)); -+ -+ if (copy_from_user(&ioctl_header, uarg, sizeof(IOCTL_HEADER))) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in IOCTL_HEADER" -+ "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ csmi_sas_get_location_sz = ioctl_header.Length; -+ karg = kmalloc(csmi_sas_get_location_sz,GFP_KERNEL); -+ if(karg==NULL){ -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to malloc @ %p\n", -+ __FILE__, __LINE__, __FUNCTION__,karg); -+ return -EFAULT; -+ } -+ -+ if (copy_from_user(karg, uarg, csmi_sas_get_location_sz)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to read in csmi_sas_phy_control_buffer " -+ "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg); -+ kfree(karg); -+ return -EFAULT; -+ } -+ -+ if (((iocnum = mpt_verify_adapter(karg->IoctlHeader.IOControllerNumber, -+ &ioc)) < 0) || (ioc == NULL)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not found!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(karg); -+ return -ENODEV; -+ } -+ -+ if (!mptctl_is_this_sas_cntr(ioc)) { -+ dctlprintk((KERN_ERR -+ "%s::%s() @%d - ioc%d not SAS controller!\n", -+ __FILE__, __FUNCTION__, __LINE__, iocnum)); -+ kfree(karg); -+ return -ENODEV; -+ } -+ -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER; -+ if(karg->bLengthOfLocationIdentifier != sizeof(CSMI_SAS_LOCATION_IDENTIFIER)) -+ goto cim_sas_get_location_exit; -+ -+ -+ /* RAID SUPPORT */ -+ if (ioc->raid_data.isRaid && ioc->raid_data.pIocPg2) { -+ for (i=0; i<ioc->raid_data.pIocPg2->NumActiveVolumes; i++){ -+ if (karg->bTargetId == -+ ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID) { -+ if(mptctl_csmi_sas_fill_location_data_raid(ioc, karg, -+ ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, -+ ioc->raid_data.pIocPg2->RaidVolume[i].VolumeBus) == 0) -+ karg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_SUCCESS; -+ else -+ karg->IoctlHeader.ReturnCode = -+ CSMI_SAS_STATUS_FAILED; -+ goto cim_sas_get_location_exit; -+ } -+ } -+ } -+ -+ /* NON-RAID SUPPORT */ -+ -+ /* make sure there's enough room to populate the Location[] struct */ -+ if ((csmi_sas_get_location_sz - -+ offsetof(CSMI_SAS_GET_LOCATION_BUFFER,Location)) < -+ sizeof(CSMI_SAS_LOCATION_IDENTIFIER)) -+ goto cim_sas_get_location_exit; -+ -+ karg->bNumberOfLocationIdentifiers=1; -+ karg->Location[0].bLocationFlags=0; -+ if((mptctl_csmi_sas_fill_location_data(ioc, karg->bTargetId, -+ karg->bPathId, karg->bIdentify, &karg->Location[0])) == 0) -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS; -+ else -+ karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED; -+ -+cim_sas_get_location_exit: -+ -+ /* Copy the data from kernel memory to user memory -+ */ -+ if (copy_to_user((char *)arg, karg, csmi_sas_get_location_sz)) { -+ printk(KERN_ERR "%s@%d::%s() - " -+ "Unable to write out csmi_sas_get_location_buffer " -+ "@ %p\n",__FILE__, __LINE__, __FUNCTION__, uarg); -+ return -EFAULT; -+ } -+ -+ kfree(karg); -+ return 0; -+} -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/csmisas.h linux-2.6.9-55.0.12/drivers/message/fusion/csmisas.h ---- linux-2.6.9-67.0.1/drivers/message/fusion/csmisas.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/csmisas.h 2007-11-02 09:10:23.000000000 +0100 -@@ -0,0 +1,1796 @@ -+/************************************************************************** -+ -+Module Name: -+ -+ CSMISAS.H -+ -+ -+Abstract: -+ -+ This file contains constants and data structure definitions used by drivers -+ that support the Common Storage Management Interface specification for -+ SAS or SATA in either the Windows or Linux. -+ -+ This should be considered as a reference implementation only. Changes may -+ be necessary to accommodate a specific build environment or target OS. -+ -+Revision History: -+ -+ 001 SEF 8/12/03 Initial release. -+ 002 SEF 8/20/03 Cleanup to match documentation. -+ 003 SEF 9/12/03 Additional cleanup, created combined header -+ 004 SEF 9/23/03 Changed base types to match linux defaults -+ Added RAID signature -+ Added bControllerFlags to CSMI_SAS_CNTLR_CONFIG -+ Changed CSMI_SAS_BEGIN_PACK to 8 for common structures -+ Fixed other typos identified in first compilation test -+ 005 SEF 10/03/03 Additions to match first version of CSMI document -+ 006 SEF 10/14/03 Fixed typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER -+ Added defines for bConnectionRate -+ 007 SEF 10/15/03 Added Firmware Download Control Code and support -+ Added CSMI revision support -+ 008 SEF 10/30/03 No functional change, just updated version to track -+ spec changes -+ 009 SEF 12/09/03 No functional change, just updated version to track -+ spec changes -+ 010 SEF 3/11/04 Fixed typedef struct CSMI_SAS_RAID_DRIVES to include the -+ bFirmware member that is defined in the spec, but -+ was missing in this file, -+ added CC_CSMI_SAS_TASK_MANAGEMENT -+ 011 SEF 4/02/04 No functional change, added comment line before -+ CC_CSMI_SAS_TASK_MANAGEMENT -+ 012 SEF 4/16/04 Added IOControllerNumber to linux header, -+ Modified linux control codes to have upper word of -+ 0xCC77.... to indicate CSMI version 77 -+ Added bSignalClass to CC_CSMI_SET_PHY_INFO -+ Added CC_CSMI_SAS_PHY_CONTROL support -+ 013 SEF 5/14/04 Added CC_CSMI_SAS_GET_CONNECTOR_INFO support -+ 014 SEF 5/24/04 No functional change, just updated version to track spec -+ changes -+ 015 SEF 6/16/04 changed bPinout to uPinout to reflect proper size, -+ changed width of bLocation defines to reflect size -+ 016 SEF 6/17/04 changed bLengthOfControls in CSMI_SAS_PHY_CONTROL -+ to be proper size -+ 017 SEF 9/17/04 added CSMI_SAS_SATA_PORT_SELECTOR, -+ CSMI_SAS_LINK_VIRTUAL, CSMI_SAS_CON_NOT_PRESENT, and -+ CSMI_SAS_CON_NOT_CONNECTED -+ 018 SEF 9/20/04 added CSMI_SAS_PHY_USER_PATTERN, -+ changed definition of CSMI_SAS_PHY_FIXED_PATTERN to not -+ conflict with activate definition -+ 019 SEF 12/06/04 added CSMI_SAS_GET_LOCATION -+ added bSSPStatus to CSMI_SAS_SSP_PASSTHRU_STATUS -+ structure -+ 020 SEF 5/25/05 added CSMI_SAS_PHY_VIRTUAL_SMP, and changes to -+ CSMI_SAS_GET_LOCATION -+ 021 SEF 11/03/05 added new RAID creation functionality -+ 022 SEF 2/01/06 corrected typo bNegotitiatedLInkRate -+ Added two more RAID_TYPES, 7 and 8 -+ 023 SEF 4/04/06 added CSMI_RAID_TYPE_1E -+ changed structures that contained surface scan -+ to priority approach rather than time, causes -+ 0.89 to incompatible with 0.87, so a version -+ check is necessary when interpreting the -+ raid structures -+ Added netware section -+ -+**************************************************************************/ -+ -+#ifndef _CSMI_SAS_H_ -+#define _CSMI_SAS_H_ -+ -+// CSMI Specification Revision, the intent is that all versions of the -+// specification will be backward compatible after the 1.00 release. -+// Major revision number, corresponds to xxxx. of CSMI specification -+// Minor revision number, corresponds to .xxxx of CSMI specification -+#define CSMI_MAJOR_REVISION 0 -+#define CSMI_MINOR_REVISION 89 -+ -+/*************************************************************************/ -+/* PATCHES FOR TYPOS */ -+/*************************************************************************/ -+ -+#define bNegotitiatedLInkRate bNegotiatedLinkRate -+ -+/*************************************************************************/ -+/* TARGET OS LINUX SPECIFIC CODE */ -+/*************************************************************************/ -+ -+// EDM #ifdef _linux -+#ifdef __KERNEL__ -+ -+// Linux base types -+ -+#include <linux/types.h> -+ -+#define __i8 char -+ -+// pack definition -+ -+// EDM #define CSMI_SAS_BEGIN_PACK(x) pack(x) -+// EDM #define CSMI_SAS_END_PACK pack() -+ -+// IOCTL Control Codes -+// (IoctlHeader.ControlCode) -+ -+// Control Codes prior to 0.77 -+ -+// Control Codes requiring CSMI_ALL_SIGNATURE -+ -+// #define CC_CSMI_SAS_GET_DRIVER_INFO 0x12345678 -+// #define CC_CSMI_SAS_GET_CNTLR_CONFIG 0x23456781 -+// #define CC_CSMI_SAS_GET_CNTLR_STATUS 0x34567812 -+// #define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0x92345678 -+ -+// Control Codes requiring CSMI_RAID_SIGNATURE -+ -+// #define CC_CSMI_SAS_GET_RAID_INFO 0x45678123 -+// #define CC_CSMI_SAS_GET_RAID_CONFIG 0x56781234 -+ -+// Control Codes requiring CSMI_SAS_SIGNATURE -+ -+// #define CC_CSMI_SAS_GET_PHY_INFO 0x67812345 -+// #define CC_CSMI_SAS_SET_PHY_INFO 0x78123456 -+// #define CC_CSMI_SAS_GET_LINK_ERRORS 0x81234567 -+// #define CC_CSMI_SAS_SMP_PASSTHRU 0xA1234567 -+// #define CC_CSMI_SAS_SSP_PASSTHRU 0xB1234567 -+// #define CC_CSMI_SAS_STP_PASSTHRU 0xC1234567 -+// #define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xD1234567 -+// #define CC_CSMI_SAS_GET_SCSI_ADDRESS 0xE1234567 -+// #define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xF1234567 -+// #define CC_CSMI_SAS_TASK_MANAGEMENT 0xA2345678 -+ -+// Control Codes for 0.77 and later -+ -+// Control Codes requiring CSMI_ALL_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_DRIVER_INFO 0xCC770001 -+#define CC_CSMI_SAS_GET_CNTLR_CONFIG 0xCC770002 -+#define CC_CSMI_SAS_GET_CNTLR_STATUS 0xCC770003 -+#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0xCC770004 -+ -+// Control Codes requiring CSMI_RAID_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_RAID_INFO 0xCC77000A -+#define CC_CSMI_SAS_GET_RAID_CONFIG 0xCC77000B -+#define CC_CSMI_SAS_GET_RAID_FEATURES 0xCC77000C -+#define CC_CSMI_SAS_SET_RAID_CONTROL 0xCC77000D -+#define CC_CSMI_SAS_GET_RAID_ELEMENT 0xCC77000E -+#define CC_CSMI_SAS_SET_RAID_OPERATION 0xCC77000F -+ -+// Control Codes requiring CSMI_SAS_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_PHY_INFO 0xCC770014 -+#define CC_CSMI_SAS_SET_PHY_INFO 0xCC770015 -+#define CC_CSMI_SAS_GET_LINK_ERRORS 0xCC770016 -+#define CC_CSMI_SAS_SMP_PASSTHRU 0xCC770017 -+#define CC_CSMI_SAS_SSP_PASSTHRU 0xCC770018 -+#define CC_CSMI_SAS_STP_PASSTHRU 0xCC770019 -+#define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xCC770020 -+#define CC_CSMI_SAS_GET_SCSI_ADDRESS 0xCC770021 -+#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xCC770022 -+#define CC_CSMI_SAS_TASK_MANAGEMENT 0xCC770023 -+#define CC_CSMI_SAS_GET_CONNECTOR_INFO 0xCC770024 -+#define CC_CSMI_SAS_GET_LOCATION 0xCC770025 -+ -+ -+// Control Codes requiring CSMI_PHY_SIGNATURE -+ -+#define CC_CSMI_SAS_PHY_CONTROL 0xCC77003C -+ -+// EDM #pragma CSMI_SAS_BEGIN_PACK(8) -+#pragma pack(8) -+ -+// IOCTL_HEADER -+typedef struct _IOCTL_HEADER { -+ __u32 IOControllerNumber; -+ __u32 Length; -+ __u32 ReturnCode; -+ __u32 Timeout; -+ __u16 Direction; -+} IOCTL_HEADER, -+ *PIOCTL_HEADER; -+ -+// EDM #pragma CSMI_SAS_END_PACK -+#pragma pack() -+ -+#endif -+ -+/*************************************************************************/ -+/* TARGET OS WINDOWS SPECIFIC CODE */ -+/*************************************************************************/ -+ -+#ifdef _WIN32 -+ -+// windows IOCTL definitions -+ -+#ifndef _NTDDSCSIH_ -+#include <ntddscsi.h> -+#endif -+ -+// pack definition -+ -+#if defined _MSC_VER -+ #define CSMI_SAS_BEGIN_PACK(x) pack(push,x) -+ #define CSMI_SAS_END_PACK pack(pop) -+#elif defined __BORLANDC__ -+ #define CSMI_SAS_BEGIN_PACK(x) option -a##x -+ #define CSMI_SAS_END_PACK option -a. -+#else -+ #error "CSMISAS.H - Must externally define a pack compiler designator." -+#endif -+ -+// base types -+ -+#define __u8 unsigned char -+#define __u16 unsigned short -+#define __u32 unsigned long -+#define __u64 unsigned __int64 -+ -+#define __i8 char -+ -+// IOCTL Control Codes -+// (IoctlHeader.ControlCode) -+ -+// Control Codes requiring CSMI_ALL_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_DRIVER_INFO 1 -+#define CC_CSMI_SAS_GET_CNTLR_CONFIG 2 -+#define CC_CSMI_SAS_GET_CNTLR_STATUS 3 -+#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 4 -+ -+// Control Codes requiring CSMI_RAID_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_RAID_INFO 10 -+#define CC_CSMI_SAS_GET_RAID_CONFIG 11 -+#define CC_CSMI_SAS_GET_RAID_FEATURES 12 -+#define CC_CSMI_SAS_SET_RAID_CONTROL 13 -+#define CC_CSMI_SAS_GET_RAID_ELEMENT 14 -+#define CC_CSMI_SAS_SET_RAID_OPERATION 15 -+ -+// Control Codes requiring CSMI_SAS_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_PHY_INFO 20 -+#define CC_CSMI_SAS_SET_PHY_INFO 21 -+#define CC_CSMI_SAS_GET_LINK_ERRORS 22 -+#define CC_CSMI_SAS_SMP_PASSTHRU 23 -+#define CC_CSMI_SAS_SSP_PASSTHRU 24 -+#define CC_CSMI_SAS_STP_PASSTHRU 25 -+#define CC_CSMI_SAS_GET_SATA_SIGNATURE 26 -+#define CC_CSMI_SAS_GET_SCSI_ADDRESS 27 -+#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 28 -+#define CC_CSMI_SAS_TASK_MANAGEMENT 29 -+#define CC_CSMI_SAS_GET_CONNECTOR_INFO 30 -+#define CC_CSMI_SAS_GET_LOCATION 31 -+ -+// Control Codes requiring CSMI_PHY_SIGNATURE -+ -+#define CC_CSMI_SAS_PHY_CONTROL 60 -+ -+#define IOCTL_HEADER SRB_IO_CONTROL -+#define PIOCTL_HEADER PSRB_IO_CONTROL -+ -+#endif -+ -+/*************************************************************************/ -+/* TARGET OS NETWARE SPECIFIC CODE */ -+/*************************************************************************/ -+ -+#ifdef _NETWARE -+ -+// NetWare IOCTL definitions -+ -+#define CSMI_SAS_BEGIN_PACK(x) pack(x) -+#define CSMI_SAS_END_PACK pack() -+ -+#ifndef LONG -+typedef unsigned long LONG; -+#endif -+ -+#ifndef WORD -+typedef unsigned short WORD; -+#endif -+ -+#ifndef BYTE -+typedef unsigned char BYTE; -+#endif -+ -+/* Need to have these definitions for Netware */ -+#define __u8 unsigned char -+#define __u16 unsigned short -+#define __u32 unsigned long -+#define __u64 unsigned __int64 -+ -+#define __i8 char -+ -+ -+#pragma CSMI_SAS_BEGIN_PACK(8) -+ -+// IOCTL_HEADER -+typedef struct _IOCTL_HEADER { -+ __u32 Length; -+ __u32 ReturnCode; -+} IOCTL_HEADER, -+ *PIOCTL_HEADER; -+ -+#pragma CSMI_SAS_END_PACK -+ -+// IOCTL Control Codes -+// (IoctlHeader.ControlCode) -+ -+// Control Codes requiring CSMI_ALL_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_DRIVER_INFO 0x01FF0001 -+#define CC_CSMI_SAS_GET_CNTLR_CONFIG 0x01FF0002 -+#define CC_CSMI_SAS_GET_CNTLR_STATUS 0x01FF0003 -+#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0x01FF0004 -+ -+// Control Codes requiring CSMI_RAID_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_RAID_INFO 0x01FF000A -+#define CC_CSMI_SAS_GET_RAID_CONFIG 0x01FF000B -+#define CC_CSMI_SAS_GET_RAID_FEATURES 0x01FF000C -+#define CC_CSMI_SAS_SET_RAID_CONTROL 0x01FF000D -+#define CC_CSMI_SAS_GET_RAID_ELEMENT 0x01FF000E -+#define CC_CSMI_SAS_SET_RAID_OPERATION 0x01FF000F -+ -+// Control Codes requiring CSMI_SAS_SIGNATURE -+ -+#define CC_CSMI_SAS_GET_PHY_INFO 0x01FF0014 -+#define CC_CSMI_SAS_SET_PHY_INFO 0x01FF0015 -+#define CC_CSMI_SAS_GET_LINK_ERRORS 0x01FF0016 -+#define CC_CSMI_SAS_SMP_PASSTHRU 0x01FF0017 -+#define CC_CSMI_SAS_SSP_PASSTHRU 0x01FF0018 -+#define CC_CSMI_SAS_STP_PASSTHRU 0x01FF0019 -+#define CC_CSMI_SAS_GET_SATA_SIGNATURE 0x01FF001A -+#define CC_CSMI_SAS_GET_SCSI_ADDRESS 0x01FF001B -+#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0x01FF001C -+#define CC_CSMI_SAS_TASK_MANAGEMENT 0x01FF001D -+#define CC_CSMI_SAS_GET_CONNECTOR_INFO 0x01FF001E -+#define CC_CSMI_SAS_GET_LOCATION 0x01FF001F -+ -+// Control Codes requiring CSMI_PHY_SIGNATURE -+ -+#define CC_CSMI_SAS_PHY_CONTROL 60 -+ -+#endif -+ -+/*************************************************************************/ -+/* TARGET OS NOT DEFINED ERROR */ -+/*************************************************************************/ -+ -+// EDM #if (!_WIN32 && !_linux && !_NETWARE) -+//#if (!_WIN32 && !__KERNEL__ && !_NETWARE) -+// #error "Unknown target OS." -+//#endif -+ -+/*************************************************************************/ -+/* OS INDEPENDENT CODE */ -+/*************************************************************************/ -+ -+/* * * * * * * * * * Class Independent IOCTL Constants * * * * * * * * * */ -+ -+// Return codes for all IOCTL's regardless of class -+// (IoctlHeader.ReturnCode) -+ -+#define CSMI_SAS_STATUS_SUCCESS 0 -+#define CSMI_SAS_STATUS_FAILED 1 -+#define CSMI_SAS_STATUS_BAD_CNTL_CODE 2 -+#define CSMI_SAS_STATUS_INVALID_PARAMETER 3 -+#define CSMI_SAS_STATUS_WRITE_ATTEMPTED 4 -+ -+// Signature value -+// (IoctlHeader.Signature) -+ -+#define CSMI_ALL_SIGNATURE "CSMIALL" -+ -+// Timeout value default of 60 seconds -+// (IoctlHeader.Timeout) -+ -+#define CSMI_ALL_TIMEOUT 60 -+ -+// Direction values for data flow on this IOCTL -+// (IoctlHeader.Direction, Linux only) -+#define CSMI_SAS_DATA_READ 0 -+#define CSMI_SAS_DATA_WRITE 1 -+ -+// I/O Bus Types -+// ISA and EISA bus types are not supported -+// (bIoBusType) -+ -+#define CSMI_SAS_BUS_TYPE_PCI 3 -+#define CSMI_SAS_BUS_TYPE_PCMCIA 4 -+ -+// Controller Status -+// (uStatus) -+ -+#define CSMI_SAS_CNTLR_STATUS_GOOD 1 -+#define CSMI_SAS_CNTLR_STATUS_FAILED 2 -+#define CSMI_SAS_CNTLR_STATUS_OFFLINE 3 -+#define CSMI_SAS_CNTLR_STATUS_POWEROFF 4 -+ -+// Offline Status Reason -+// (uOfflineReason) -+ -+#define CSMI_SAS_OFFLINE_REASON_NO_REASON 0 -+#define CSMI_SAS_OFFLINE_REASON_INITIALIZING 1 -+#define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_DEGRADED 2 -+#define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_FAILURE 3 -+ -+// Controller Class -+// (bControllerClass) -+ -+#define CSMI_SAS_CNTLR_CLASS_HBA 5 -+ -+// Controller Flag bits -+// (uControllerFlags) -+ -+#define CSMI_SAS_CNTLR_SAS_HBA 0x00000001 -+#define CSMI_SAS_CNTLR_SAS_RAID 0x00000002 -+#define CSMI_SAS_CNTLR_SATA_HBA 0x00000004 -+#define CSMI_SAS_CNTLR_SATA_RAID 0x00000008 -+ -+// for firmware download -+#define CSMI_SAS_CNTLR_FWD_SUPPORT 0x00010000 -+#define CSMI_SAS_CNTLR_FWD_ONLINE 0x00020000 -+#define CSMI_SAS_CNTLR_FWD_SRESET 0x00040000 -+#define CSMI_SAS_CNTLR_FWD_HRESET 0x00080000 -+#define CSMI_SAS_CNTLR_FWD_RROM 0x00100000 -+ -+// for RAID configuration supported -+#define CSMI_SAS_CNTLR_RAID_CFG_SUPPORT 0x010000 -+ -+// Download Flag bits -+// (uDownloadFlags) -+#define CSMI_SAS_FWD_VALIDATE 0x00000001 -+#define CSMI_SAS_FWD_SOFT_RESET 0x00000002 -+#define CSMI_SAS_FWD_HARD_RESET 0x00000004 -+ -+// Firmware Download Status -+// (usStatus) -+#define CSMI_SAS_FWD_SUCCESS 0 -+#define CSMI_SAS_FWD_FAILED 1 -+#define CSMI_SAS_FWD_USING_RROM 2 -+#define CSMI_SAS_FWD_REJECT 3 -+#define CSMI_SAS_FWD_DOWNREV 4 -+ -+// Firmware Download Severity -+// (usSeverity> -+#define CSMI_SAS_FWD_INFORMATION 0 -+#define CSMI_SAS_FWD_WARNING 1 -+#define CSMI_SAS_FWD_ERROR 2 -+#define CSMI_SAS_FWD_FATAL 3 -+ -+/* * * * * * * * * * SAS RAID Class IOCTL Constants * * * * * * * * */ -+ -+// Return codes for the RAID IOCTL's regardless of class -+// (IoctlHeader.ReturnCode) -+ -+#define CSMI_SAS_RAID_SET_OUT_OF_RANGE 1000 -+#define CSMI_SAS_RAID_SET_BUFFER_TOO_SMALL 1001 -+#define CSMI_SAS_RAID_SET_DATA_CHANGED 1002 -+ -+// Signature value -+// (IoctlHeader.Signature) -+ -+#define CSMI_RAID_SIGNATURE "CSMIARY" -+ -+// Timeout value default of 60 seconds -+// (IoctlHeader.Timeout) -+ -+#define CSMI_RAID_TIMEOUT 60 -+ -+// RAID Types -+// (bRaidType) -+#define CSMI_SAS_RAID_TYPE_NONE 0 -+#define CSMI_SAS_RAID_TYPE_0 1 -+#define CSMI_SAS_RAID_TYPE_1 2 -+#define CSMI_SAS_RAID_TYPE_10 3 -+#define CSMI_SAS_RAID_TYPE_5 4 -+#define CSMI_SAS_RAID_TYPE_15 5 -+#define CSMI_SAS_RAID_TYPE_6 6 -+#define CSMI_SAS_RAID_TYPE_50 7 -+#define CSMI_SAS_RAID_TYPE_VOLUME 8 -+#define CSMI_SAS_RAID_TYPE_1E 9 -+#define CSMI_SAS_RAID_TYPE_OTHER 255 -+// the last value 255 was already defined for other -+// so end is defined as 254 -+#define CSMI_SAS_RAID_TYPE_END 254 -+ -+// RAID Status -+// (bStatus) -+#define CSMI_SAS_RAID_SET_STATUS_OK 0 -+#define CSMI_SAS_RAID_SET_STATUS_DEGRADED 1 -+#define CSMI_SAS_RAID_SET_STATUS_REBUILDING 2 -+#define CSMI_SAS_RAID_SET_STATUS_FAILED 3 -+#define CSMI_SAS_RAID_SET_STATUS_OFFLINE 4 -+#define CSMI_SAS_RAID_SET_STATUS_TRANSFORMING 5 -+#define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_REBUILD 6 -+#define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_TRANSFORMATION 7 -+ -+// RAID Drive Count -+// (bDriveCount, 0xF1 to 0xFF are reserved) -+#define CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG 0xF1 -+#define CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED 0xF2 -+ -+// RAID Data Type -+// (bDataType) -+#define CSMI_SAS_RAID_DATA_DRIVES 0 -+#define CSMI_SAS_RAID_DATA_DEVICE_ID 1 -+#define CSMI_SAS_RAID_DATA_ADDITIONAL_DATA 2 -+ -+// RAID Drive Status -+// (bDriveStatus) -+#define CSMI_SAS_DRIVE_STATUS_OK 0 -+#define CSMI_SAS_DRIVE_STATUS_REBUILDING 1 -+#define CSMI_SAS_DRIVE_STATUS_FAILED 2 -+#define CSMI_SAS_DRIVE_STATUS_DEGRADED 3 -+#define CSMI_SAS_DRIVE_STATUS_OFFLINE 4 -+#define CSMI_SAS_DRIVE_STATUS_QUEUED_FOR_REBUILD 5 -+ -+// RAID Drive Usage -+// (bDriveUsage) -+#define CSMI_SAS_DRIVE_CONFIG_NOT_USED 0 -+#define CSMI_SAS_DRIVE_CONFIG_MEMBER 1 -+#define CSMI_SAS_DRIVE_CONFIG_SPARE 2 -+#define CSMI_SAS_DRIVE_CONFIG_SPARE_ACTIVE 3 -+ -+// RAID Drive Type -+// (bDriveType) -+#define CSMI_SAS_DRIVE_TYPE_UNKNOWN 0 -+#define CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS 1 -+#define CSMI_SAS_DRIVE_TYPE_DUAL_PORT_SAS 2 -+#define CSMI_SAS_DRIVE_TYPE_SATA 3 -+#define CSMI_SAS_DRIVE_TYPE_SATA_PS 4 -+#define CSMI_SAS_DRIVE_TYPE_OTHER 255 -+ -+// RAID Write Protect -+// (bWriteProtect) -+#define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN 0 -+#define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNCHANGED 0 -+#define CSMI_SAS_RAID_SET_WRITE_PROTECT_ENABLED 1 -+#define CSMI_SAS_RAID_SET_WRITE_PROTECT_DISABLED 2 -+ -+// RAID Cache Setting -+// (bCacheSetting) -+#define CSMI_SAS_RAID_SET_CACHE_UNKNOWN 0 -+#define CSMI_SAS_RAID_SET_CACHE_UNCHANGED 0 -+#define CSMI_SAS_RAID_SET_CACHE_ENABLED 1 -+#define CSMI_SAS_RAID_SET_CACHE_DISABLED 2 -+#define CSMI_SAS_RAID_SET_CACHE_CORRUPT 3 -+ -+// RAID Features -+// (uFeatures) -+#define CSMI_SAS_RAID_FEATURE_TRANSFORMATION 0x00000001 -+#define CSMI_SAS_RAID_FEATURE_REBUILD 0x00000002 -+#define CSMI_SAS_RAID_FEATURE_SPLIT_MIRROR 0x00000004 -+#define CSMI_SAS_RAID_FEATURE_MERGE_MIRROR 0x00000008 -+#define CSMI_SAS_RAID_FEATURE_LUN_RENUMBER 0x00000010 -+#define CSMI_SAS_RAID_FEATURE_SURFACE_SCAN 0x00000020 -+#define CSMI_SAS_RAID_FEATURE_SPARES_SHARED 0x00000040 -+ -+// RAID Priority -+// (bDefaultTransformPriority, etc.) -+#define CSMI_SAS_PRIORITY_UNKNOWN 0 -+#define CSMI_SAS_PRIORITY_UNCHANGED 0 -+#define CSMI_SAS_PRIORITY_AUTO 1 -+#define CSMI_SAS_PRIORITY_OFF 2 -+#define CSMI_SAS_PRIORITY_LOW 3 -+#define CSMI_SAS_PRIORITY_MEDIUM 4 -+#define CSMI_SAS_PRIORITY_HIGH 5 -+ -+// RAID Transformation Rules -+// (uRaidSetTransformationRules) -+#define CSMI_SAS_RAID_RULE_AVAILABLE_MEMORY 0x00000001 -+#define CSMI_SAS_RAID_RULE_OVERLAPPED_EXTENTS 0x00000002 -+ -+// RAID Cache Ratios Supported -+// (bCacheRatiosSupported) -+// from 0 to 100 defines the write to read ratio, 0 is 100% write -+#define CSMI_SAS_RAID_CACHE_RATIO_RANGE 101 -+#define CSMI_SAS_RAID_CACHE_RATIO_FIXED 102 -+#define CSMI_SAS_RAID_CACHE_RATIO_AUTO 103 -+#define CSMI_SAS_RAID_CACHE_RATIO_END 255 -+ -+// RAID Cache Ratio Flag -+// (bCacheRatioFlag) -+#define CSMI_SAS_RAID_CACHE_RATIO_DISABLE 0 -+#define CSMI_SAS_RAID_CACHE_RATIO_ENABLE 1 -+ -+// RAID Clear Configuration Signature -+// (bClearConfiguration) -+#define CSMI_SAS_RAID_CLEAR_CONFIGURATION_SIGNATURE "RAIDCLR" -+ -+// RAID Failure Codes -+// (uFailCode) -+#define CSMI_SAS_FAIL_CODE_OK 0 -+#define CSMI_SAS_FAIL_CODE_PARAMETER_INVALID 1000 -+#define CSMI_SAS_FAIL_CODE_TRANSFORM_PRIORITY_INVALID 1001 -+#define CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID 1002 -+#define CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID 1003 -+#define CSMI_SAS_FAIL_CODE_SURFACE_SCAN_INVALID 1004 -+#define CSMI_SAS_FAIL_CODE_CLEAR_CONFIGURATION_INVALID 1005 -+#define CSMI_SAS_FAIL_CODE_ELEMENT_INDEX_INVALID 1006 -+#define CSMI_SAS_FAIL_CODE_SUBELEMENT_INDEX_INVALID 1007 -+#define CSMI_SAS_FAIL_CODE_EXTENT_INVALID 1008 -+#define CSMI_SAS_FAIL_CODE_BLOCK_COUNT_INVALID 1009 -+#define CSMI_SAS_FAIL_CODE_DRIVE_INDEX_INVALID 1010 -+#define CSMI_SAS_FAIL_CODE_EXISTING_LUN_INVALID 1011 -+#define CSMI_SAS_FAIL_CODE_RAID_TYPE_INVALID 1012 -+#define CSMI_SAS_FAIL_CODE_STRIPE_SIZE_INVALID 1013 -+#define CSMI_SAS_FAIL_CODE_TRANSFORMATION_INVALID 1014 -+#define CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID 1015 -+#define CSMI_SAS_FAIL_CODE_ENUMERATION_TYPE_INVALID 1016 -+ -+#define CSMI_SAS_FAIL_CODE_EXCEEDED_RAID_SET_COUNT 2000 -+#define CSMI_SAS_FAIL_CODE_DUPLICATE_LUN 2001 -+ -+#define CSMI_SAS_FAIL_CODE_WAIT_FOR_OPERATION 3000 -+ -+// RAID Enumeration Types -+// (uEnumerationType) -+#define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE 0 -+#define CSMI_SAS_RAID_ELEMENT_TYPE_MODULE 1 -+#define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE_RAID_SET 2 -+#define CSMI_SAS_RAID_ELEMENT_TYPE_EXTENT_DRIVE 3 -+ -+// RAID Extent Types -+// (bExtentType) -+#define CSMI_SAS_RAID_EXTENT_RESERVED 0 -+#define CSMI_SAS_RAID_EXTENT_METADATA 1 -+#define CSMI_SAS_RAID_EXTENT_ALLOCATED 2 -+#define CSMI_SAS_RAID_EXTENT_UNALLOCATED 3 -+ -+// RAID Operation Types -+// (uOperationType) -+#define CSMI_SAS_RAID_SET_CREATE 0 -+#define CSMI_SAS_RAID_SET_LABEL 1 -+#define CSMI_SAS_RAID_SET_TRANSFORM 2 -+#define CSMI_SAS_RAID_SET_DELETE 3 -+#define CSMI_SAS_RAID_SET_WRITE_PROTECT 4 -+#define CSMI_SAS_RAID_SET_CACHE 5 -+#define CSMI_SAS_RAID_SET_ONLINE_STATE 6 -+#define CSMI_SAS_RAID_SET_SPARE 7 -+ -+// RAID Transform Types -+// (bTransformType) -+#define CSMI_SAS_RAID_SET_TRANSFORM_SPLIT_MIRROR 0 -+#define CSMI_SAS_RAID_SET_TRANSFORM_MERGE_RAID_0 1 -+#define CSMI_SAS_RAID_SET_TRANSFORM_LUN_RENUMBER 2 -+#define CSMI_SAS_RAID_SET_TRANSFORM_RAID_SET 3 -+ -+// RAID Online State -+// (bOnlineState) -+#define CSMI_SAS_RAID_SET_STATE_UNKNOWN 0 -+#define CSMI_SAS_RAID_SET_STATE_ONLINE 1 -+#define CSMI_SAS_RAID_SET_STATE_OFFLINE 2 -+ -+/* * * * * * * * * * SAS HBA Class IOCTL Constants * * * * * * * * * */ -+ -+// Return codes for SAS IOCTL's -+// (IoctlHeader.ReturnCode) -+ -+#define CSMI_SAS_PHY_INFO_CHANGED CSMI_SAS_STATUS_SUCCESS -+#define CSMI_SAS_PHY_INFO_NOT_CHANGEABLE 2000 -+#define CSMI_SAS_LINK_RATE_OUT_OF_RANGE 2001 -+ -+#define CSMI_SAS_PHY_DOES_NOT_EXIST 2002 -+#define CSMI_SAS_PHY_DOES_NOT_MATCH_PORT 2003 -+#define CSMI_SAS_PHY_CANNOT_BE_SELECTED 2004 -+#define CSMI_SAS_SELECT_PHY_OR_PORT 2005 -+#define CSMI_SAS_PORT_DOES_NOT_EXIST 2006 -+#define CSMI_SAS_PORT_CANNOT_BE_SELECTED 2007 -+#define CSMI_SAS_CONNECTION_FAILED 2008 -+ -+#define CSMI_SAS_NO_SATA_DEVICE 2009 -+#define CSMI_SAS_NO_SATA_SIGNATURE 2010 -+#define CSMI_SAS_SCSI_EMULATION 2011 -+#define CSMI_SAS_NOT_AN_END_DEVICE 2012 -+#define CSMI_SAS_NO_SCSI_ADDRESS 2013 -+#define CSMI_SAS_NO_DEVICE_ADDRESS 2014 -+ -+// Signature value -+// (IoctlHeader.Signature) -+ -+#define CSMI_SAS_SIGNATURE "CSMISAS" -+ -+// Timeout value default of 60 seconds -+// (IoctlHeader.Timeout) -+ -+#define CSMI_SAS_TIMEOUT 60 -+ -+// Device types -+// (bDeviceType) -+ -+#define CSMI_SAS_PHY_UNUSED 0x00 -+#define CSMI_SAS_NO_DEVICE_ATTACHED 0x00 -+#define CSMI_SAS_END_DEVICE 0x10 -+#define CSMI_SAS_EDGE_EXPANDER_DEVICE 0x20 -+#define CSMI_SAS_FANOUT_EXPANDER_DEVICE 0x30 -+ -+// Protocol options -+// (bInitiatorPortProtocol, bTargetPortProtocol) -+ -+#define CSMI_SAS_PROTOCOL_SATA 0x01 -+#define CSMI_SAS_PROTOCOL_SMP 0x02 -+#define CSMI_SAS_PROTOCOL_STP 0x04 -+#define CSMI_SAS_PROTOCOL_SSP 0x08 -+ -+// Negotiated and hardware link rates -+// (bNegotiatedLinkRate, bMinimumLinkRate, bMaximumLinkRate) -+ -+#define CSMI_SAS_LINK_RATE_UNKNOWN 0x00 -+#define CSMI_SAS_PHY_DISABLED 0x01 -+#define CSMI_SAS_LINK_RATE_FAILED 0x02 -+#define CSMI_SAS_SATA_SPINUP_HOLD 0x03 -+#define CSMI_SAS_SATA_PORT_SELECTOR 0x04 -+#define CSMI_SAS_LINK_RATE_1_5_GBPS 0x08 -+#define CSMI_SAS_LINK_RATE_3_0_GBPS 0x09 -+#define CSMI_SAS_LINK_VIRTUAL 0x10 -+ -+// Discover state -+// (bAutoDiscover) -+ -+#define CSMI_SAS_DISCOVER_NOT_SUPPORTED 0x00 -+#define CSMI_SAS_DISCOVER_NOT_STARTED 0x01 -+#define CSMI_SAS_DISCOVER_IN_PROGRESS 0x02 -+#define CSMI_SAS_DISCOVER_COMPLETE 0x03 -+#define CSMI_SAS_DISCOVER_ERROR 0x04 -+ -+// Phy features -+ -+#define CSMI_SAS_PHY_VIRTUAL_SMP 0x01 -+ -+// Programmed link rates -+// (bMinimumLinkRate, bMaximumLinkRate) -+// (bProgrammedMinimumLinkRate, bProgrammedMaximumLinkRate) -+ -+#define CSMI_SAS_PROGRAMMED_LINK_RATE_UNCHANGED 0x00 -+#define CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS 0x08 -+#define CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS 0x09 -+ -+// Link rate -+// (bNegotiatedLinkRate in CSMI_SAS_SET_PHY_INFO) -+ -+#define CSMI_SAS_LINK_RATE_NEGOTIATE 0x00 -+#define CSMI_SAS_LINK_RATE_PHY_DISABLED 0x01 -+ -+// Signal class -+// (bSignalClass in CSMI_SAS_SET_PHY_INFO) -+ -+#define CSMI_SAS_SIGNAL_CLASS_UNKNOWN 0x00 -+#define CSMI_SAS_SIGNAL_CLASS_DIRECT 0x01 -+#define CSMI_SAS_SIGNAL_CLASS_SERVER 0x02 -+#define CSMI_SAS_SIGNAL_CLASS_ENCLOSURE 0x03 -+ -+// Link error reset -+// (bResetCounts) -+ -+#define CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS 0x00 -+#define CSMI_SAS_LINK_ERROR_RESET_COUNTS 0x01 -+ -+// Phy identifier -+// (bPhyIdentifier) -+ -+#define CSMI_SAS_USE_PORT_IDENTIFIER 0xFF -+ -+// Port identifier -+// (bPortIdentifier) -+ -+#define CSMI_SAS_IGNORE_PORT 0xFF -+ -+// Programmed link rates -+// (bConnectionRate) -+ -+#define CSMI_SAS_LINK_RATE_NEGOTIATED 0x00 -+#define CSMI_SAS_LINK_RATE_1_5_GBPS 0x08 -+#define CSMI_SAS_LINK_RATE_3_0_GBPS 0x09 -+ -+// Connection status -+// (bConnectionStatus) -+ -+#define CSMI_SAS_OPEN_ACCEPT 0 -+#define CSMI_SAS_OPEN_REJECT_BAD_DESTINATION 1 -+#define CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED 2 -+#define CSMI_SAS_OPEN_REJECT_NO_DESTINATION 3 -+#define CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED 4 -+#define CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED 5 -+#define CSMI_SAS_OPEN_REJECT_RESERVE_ABANDON 6 -+#define CSMI_SAS_OPEN_REJECT_RESERVE_CONTINUE 7 -+#define CSMI_SAS_OPEN_REJECT_RESERVE_INITIALIZE 8 -+#define CSMI_SAS_OPEN_REJECT_RESERVE_STOP 9 -+#define CSMI_SAS_OPEN_REJECT_RETRY 10 -+#define CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY 11 -+#define CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION 12 -+ -+// SSP Status -+// (bSSPStatus) -+ -+#define CSMI_SAS_SSP_STATUS_UNKNOWN 0x00 -+#define CSMI_SAS_SSP_STATUS_WAITING 0x01 -+#define CSMI_SAS_SSP_STATUS_COMPLETED 0x02 -+#define CSMI_SAS_SSP_STATUS_FATAL_ERROR 0x03 -+#define CSMI_SAS_SSP_STATUS_RETRY 0x04 -+#define CSMI_SAS_SSP_STATUS_NO_TAG 0x05 -+ -+// SSP Flags -+// (uFlags) -+ -+#define CSMI_SAS_SSP_READ 0x00000001 -+#define CSMI_SAS_SSP_WRITE 0x00000002 -+#define CSMI_SAS_SSP_UNSPECIFIED 0x00000004 -+ -+#define CSMI_SAS_SSP_TASK_ATTRIBUTE_SIMPLE 0x00000000 -+#define CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE 0x00000010 -+#define CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED 0x00000020 -+#define CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA 0x00000040 -+ -+// SSP Data present -+// (bDataPresent) -+ -+#define CSMI_SAS_SSP_NO_DATA_PRESENT 0x00 -+#define CSMI_SAS_SSP_RESPONSE_DATA_PRESENT 0x01 -+#define CSMI_SAS_SSP_SENSE_DATA_PRESENT 0x02 -+ -+// STP Flags -+// (uFlags) -+ -+#define CSMI_SAS_STP_READ 0x00000001 -+#define CSMI_SAS_STP_WRITE 0x00000002 -+#define CSMI_SAS_STP_UNSPECIFIED 0x00000004 -+#define CSMI_SAS_STP_PIO 0x00000010 -+#define CSMI_SAS_STP_DMA 0x00000020 -+#define CSMI_SAS_STP_PACKET 0x00000040 -+#define CSMI_SAS_STP_DMA_QUEUED 0x00000080 -+#define CSMI_SAS_STP_EXECUTE_DIAG 0x00000100 -+#define CSMI_SAS_STP_RESET_DEVICE 0x00000200 -+ -+// Task Management Flags -+// (uFlags) -+ -+#define CSMI_SAS_TASK_IU 0x00000001 -+#define CSMI_SAS_HARD_RESET_SEQUENCE 0x00000002 -+#define CSMI_SAS_SUPPRESS_RESULT 0x00000004 -+ -+// Task Management Functions -+// (bTaskManagement) -+ -+#define CSMI_SAS_SSP_ABORT_TASK 0x01 -+#define CSMI_SAS_SSP_ABORT_TASK_SET 0x02 -+#define CSMI_SAS_SSP_CLEAR_TASK_SET 0x04 -+#define CSMI_SAS_SSP_LOGICAL_UNIT_RESET 0x08 -+#define CSMI_SAS_SSP_CLEAR_ACA 0x40 -+#define CSMI_SAS_SSP_QUERY_TASK 0x80 -+ -+// Task Management Information -+// (uInformation) -+ -+#define CSMI_SAS_SSP_TEST 1 -+#define CSMI_SAS_SSP_EXCEEDED 2 -+#define CSMI_SAS_SSP_DEMAND 3 -+#define CSMI_SAS_SSP_TRIGGER 4 -+ -+// Connector Pinout Information -+// (uPinout) -+ -+#define CSMI_SAS_CON_UNKNOWN 0x00000001 -+#define CSMI_SAS_CON_SFF_8482 0x00000002 -+#define CSMI_SAS_CON_SFF_8470_LANE_1 0x00000100 -+#define CSMI_SAS_CON_SFF_8470_LANE_2 0x00000200 -+#define CSMI_SAS_CON_SFF_8470_LANE_3 0x00000400 -+#define CSMI_SAS_CON_SFF_8470_LANE_4 0x00000800 -+#define CSMI_SAS_CON_SFF_8484_LANE_1 0x00010000 -+#define CSMI_SAS_CON_SFF_8484_LANE_2 0x00020000 -+#define CSMI_SAS_CON_SFF_8484_LANE_3 0x00040000 -+#define CSMI_SAS_CON_SFF_8484_LANE_4 0x00080000 -+ -+// Connector Location Information -+// (bLocation) -+ -+// same as uPinout above... -+// #define CSMI_SAS_CON_UNKNOWN 0x01 -+#define CSMI_SAS_CON_INTERNAL 0x02 -+#define CSMI_SAS_CON_EXTERNAL 0x04 -+#define CSMI_SAS_CON_SWITCHABLE 0x08 -+#define CSMI_SAS_CON_AUTO 0x10 -+#define CSMI_SAS_CON_NOT_PRESENT 0x20 -+#define CSMI_SAS_CON_NOT_CONNECTED 0x80 -+ -+// Device location identification -+// (bIdentify) -+ -+#define CSMI_SAS_LOCATE_UNKNOWN 0x00 -+#define CSMI_SAS_LOCATE_FORCE_OFF 0x01 -+#define CSMI_SAS_LOCATE_FORCE_ON 0x02 -+ -+// Location Valid flags -+// (uLocationFlags) -+ -+#define CSMI_SAS_LOCATE_SAS_ADDRESS_VALID 0x00000001 -+#define CSMI_SAS_LOCATE_SAS_LUN_VALID 0x00000002 -+#define CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID 0x00000004 -+#define CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID 0x00000008 -+#define CSMI_SAS_LOCATE_BAY_PREFIX_VALID 0x00000010 -+#define CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID 0x00000020 -+#define CSMI_SAS_LOCATE_LOCATION_STATE_VALID 0x00000040 -+ -+/* * * * * * * * SAS Phy Control Class IOCTL Constants * * * * * * * * */ -+ -+// Return codes for SAS Phy Control IOCTL's -+// (IoctlHeader.ReturnCode) -+ -+// Signature value -+// (IoctlHeader.Signature) -+ -+#define CSMI_PHY_SIGNATURE "CSMIPHY" -+ -+// Phy Control Functions -+// (bFunction) -+ -+// values 0x00 to 0xFF are consistent in definition with the SMP PHY CONTROL -+// function defined in the SAS spec -+#define CSMI_SAS_PC_NOP 0x00000000 -+#define CSMI_SAS_PC_LINK_RESET 0x00000001 -+#define CSMI_SAS_PC_HARD_RESET 0x00000002 -+#define CSMI_SAS_PC_PHY_DISABLE 0x00000003 -+// 0x04 to 0xFF reserved... -+#define CSMI_SAS_PC_GET_PHY_SETTINGS 0x00000100 -+ -+// Link Flags -+#define CSMI_SAS_PHY_ACTIVATE_CONTROL 0x00000001 -+#define CSMI_SAS_PHY_UPDATE_SPINUP_RATE 0x00000002 -+#define CSMI_SAS_PHY_AUTO_COMWAKE 0x00000004 -+ -+// Device Types for Phy Settings -+// (bType) -+#define CSMI_SAS_UNDEFINED 0x00 -+#define CSMI_SAS_SATA 0x01 -+#define CSMI_SAS_SAS 0x02 -+ -+// Transmitter Flags -+// (uTransmitterFlags) -+#define CSMI_SAS_PHY_PREEMPHASIS_DISABLED 0x00000001 -+ -+// Receiver Flags -+// (uReceiverFlags) -+#define CSMI_SAS_PHY_EQUALIZATION_DISABLED 0x00000001 -+ -+// Pattern Flags -+// (uPatternFlags) -+// #define CSMI_SAS_PHY_ACTIVATE_CONTROL 0x00000001 -+#define CSMI_SAS_PHY_DISABLE_SCRAMBLING 0x00000002 -+#define CSMI_SAS_PHY_DISABLE_ALIGN 0x00000004 -+#define CSMI_SAS_PHY_DISABLE_SSC 0x00000008 -+ -+#define CSMI_SAS_PHY_FIXED_PATTERN 0x00000010 -+#define CSMI_SAS_PHY_USER_PATTERN 0x00000020 -+ -+// Fixed Patterns -+// (bFixedPattern) -+#define CSMI_SAS_PHY_CJPAT 0x00000001 -+#define CSMI_SAS_PHY_ALIGN 0x00000002 -+ -+// Type Flags -+// (bTypeFlags) -+#define CSMI_SAS_PHY_POSITIVE_DISPARITY 0x01 -+#define CSMI_SAS_PHY_NEGATIVE_DISPARITY 0x02 -+#define CSMI_SAS_PHY_CONTROL_CHARACTER 0x04 -+ -+// Miscellaneous -+#define SLOT_NUMBER_UNKNOWN 0xFFFF -+ -+/*************************************************************************/ -+/* DATA STRUCTURES */ -+/*************************************************************************/ -+ -+/* * * * * * * * * * Class Independent Structures * * * * * * * * * */ -+ -+// EDM #pragma CSMI_SAS_BEGIN_PACK(8) -+#pragma pack(8) -+ -+// CC_CSMI_SAS_DRIVER_INFO -+ -+typedef struct _CSMI_SAS_DRIVER_INFO { -+ __u8 szName[81]; -+ __u8 szDescription[81]; -+ __u16 usMajorRevision; -+ __u16 usMinorRevision; -+ __u16 usBuildRevision; -+ __u16 usReleaseRevision; -+ __u16 usCSMIMajorRevision; -+ __u16 usCSMIMinorRevision; -+} CSMI_SAS_DRIVER_INFO, -+ *PCSMI_SAS_DRIVER_INFO; -+ -+typedef struct _CSMI_SAS_DRIVER_INFO_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_DRIVER_INFO Information; -+} CSMI_SAS_DRIVER_INFO_BUFFER, -+ *PCSMI_SAS_DRIVER_INFO_BUFFER; -+ -+// CC_CSMI_SAS_CNTLR_CONFIGURATION -+ -+typedef struct _CSMI_SAS_PCI_BUS_ADDRESS { -+ __u8 bBusNumber; -+ __u8 bDeviceNumber; -+ __u8 bFunctionNumber; -+ __u8 bReserved; -+} CSMI_SAS_PCI_BUS_ADDRESS, -+ *PCSMI_SAS_PCI_BUS_ADDRESS; -+ -+typedef union _CSMI_SAS_IO_BUS_ADDRESS { -+ CSMI_SAS_PCI_BUS_ADDRESS PciAddress; -+ __u8 bReserved[32]; -+} CSMI_SAS_IO_BUS_ADDRESS, -+ *PCSMI_SAS_IO_BUS_ADDRESS; -+ -+typedef struct _CSMI_SAS_CNTLR_CONFIG { -+ __u32 uBaseIoAddress; -+ struct { -+ __u32 uLowPart; -+ __u32 uHighPart; -+ } BaseMemoryAddress; -+ __u32 uBoardID; -+ __u16 usSlotNumber; -+ __u8 bControllerClass; -+ __u8 bIoBusType; -+ CSMI_SAS_IO_BUS_ADDRESS BusAddress; -+ __u8 szSerialNumber[81]; -+ __u16 usMajorRevision; -+ __u16 usMinorRevision; -+ __u16 usBuildRevision; -+ __u16 usReleaseRevision; -+ __u16 usBIOSMajorRevision; -+ __u16 usBIOSMinorRevision; -+ __u16 usBIOSBuildRevision; -+ __u16 usBIOSReleaseRevision; -+ __u32 uControllerFlags; -+ __u16 usRromMajorRevision; -+ __u16 usRromMinorRevision; -+ __u16 usRromBuildRevision; -+ __u16 usRromReleaseRevision; -+ __u16 usRromBIOSMajorRevision; -+ __u16 usRromBIOSMinorRevision; -+ __u16 usRromBIOSBuildRevision; -+ __u16 usRromBIOSReleaseRevision; -+ __u8 bReserved[7]; -+} CSMI_SAS_CNTLR_CONFIG, -+ *PCSMI_SAS_CNTLR_CONFIG; -+ -+typedef struct _CSMI_SAS_CNTLR_CONFIG_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_CNTLR_CONFIG Configuration; -+} CSMI_SAS_CNTLR_CONFIG_BUFFER, -+ *PCSMI_SAS_CNTLR_CONFIG_BUFFER; -+ -+// CC_CSMI_SAS_CNTLR_STATUS -+ -+typedef struct _CSMI_SAS_CNTLR_STATUS { -+ __u32 uStatus; -+ __u32 uOfflineReason; -+ __u8 bReserved[28]; -+} CSMI_SAS_CNTLR_STATUS, -+ *PCSMI_SAS_CNTLR_STATUS; -+ -+typedef struct _CSMI_SAS_CNTLR_STATUS_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_CNTLR_STATUS Status; -+} CSMI_SAS_CNTLR_STATUS_BUFFER, -+ *PCSMI_SAS_CNTLR_STATUS_BUFFER; -+ -+// CC_CSMI_SAS_FIRMWARE_DOWNLOAD -+ -+typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD { -+ __u32 uBufferLength; -+ __u32 uDownloadFlags; -+ __u8 bReserved[32]; -+ __u16 usStatus; -+ __u16 usSeverity; -+} CSMI_SAS_FIRMWARE_DOWNLOAD, -+ *PCSMI_SAS_FIRMWARE_DOWNLOAD; -+ -+typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_FIRMWARE_DOWNLOAD Information; -+ __u8 bDataBuffer[1]; -+} CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER, -+ *PCSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER; -+ -+// CC_CSMI_SAS_RAID_INFO -+ -+typedef struct _CSMI_SAS_RAID_INFO { -+ __u32 uNumRaidSets; -+ __u32 uMaxDrivesPerSet; -+ __u32 uMaxRaidSets; -+ __u8 bMaxRaidTypes; -+ __u8 bReservedByteFields[7]; -+ __u64 ulMinRaidSetBlocks; -+ __u64 ulMaxRaidSetBlocks; -+ __u32 uMaxPhysicalDrives; -+ __u32 uMaxExtents; -+ __u32 uMaxModules; -+ __u32 uMaxTransformationMemory; -+ __u32 uChangeCount; -+ __u8 bReserved[44]; -+} CSMI_SAS_RAID_INFO, -+ *PCSMI_SAS_RAID_INFO; -+ -+typedef struct _CSMI_SAS_RAID_INFO_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_RAID_INFO Information; -+} CSMI_SAS_RAID_INFO_BUFFER, -+ *PCSMI_SAS_RAID_INFO_BUFFER; -+ -+// CC_CSMI_SAS_GET_RAID_CONFIG -+ -+typedef struct _CSMI_SAS_RAID_DRIVES { -+ __u8 bModel[40]; -+ __u8 bFirmware[8]; -+ __u8 bSerialNumber[40]; -+ __u8 bSASAddress[8]; -+ __u8 bSASLun[8]; -+ __u8 bDriveStatus; -+ __u8 bDriveUsage; -+ __u8 bDriveType; -+ __u16 usBlockSize; -+ __u8 bReserved[15]; -+ __u32 uDriveIndex; -+ __u64 ulTotalUserBlocks; -+} CSMI_SAS_RAID_DRIVES, -+ *PCSMI_SAS_RAID_DRIVES; -+ -+typedef struct _CSMI_SAS_RAID_DEVICE_ID { -+ __u8 bDeviceIdentificationVPDPage[1]; -+} CSMI_SAS_RAID_DEVICE_ID, -+ *PCSMI_SAS_RAID_DEVICE_ID; -+ -+typedef struct _CSMI_SAS_RAID_SET_ADDITIONAL_DATA { -+ __u8 bLabel[16]; -+ __u8 bRaidSetLun[8]; -+ __u8 bWriteProtection; -+ __u8 bCacheSetting; -+ __u8 bCacheRatio; -+ __u16 usBlockSize; -+ __u8 bReservedBytes[11]; -+ __u64 ulRaidSetExtentOffset; -+ __u64 ulRaidSetBlocks; -+ __u32 uStripeSizeInBlocks; -+ __u32 uSectorsPerTrack; -+ __u8 bApplicationScratchPad[16]; -+ __u32 uNumberOfHeads; -+ __u32 uNumberOfTracks; -+ __u8 bReserved[24]; -+} CSMI_SAS_RAID_SET_ADDITIONAL_DATA, -+ *PCSMI_SAS_RAID_SET_ADDITIONAL_DATA; -+ -+typedef struct _CSMI_SAS_RAID_CONFIG { -+ __u32 uRaidSetIndex; -+ __u32 uCapacity; -+ __u32 uStripeSize; -+ __u8 bRaidType; -+ __u8 bStatus; -+ __u8 bInformation; -+ __u8 bDriveCount; -+ __u8 bDataType; -+ __u8 bReserved[15]; -+ __u32 uChangeCount; -+ union { -+ CSMI_SAS_RAID_DRIVES Drives[1]; -+ CSMI_SAS_RAID_DEVICE_ID DeviceId[1]; -+ CSMI_SAS_RAID_SET_ADDITIONAL_DATA Data[1]; -+ }; -+} CSMI_SAS_RAID_CONFIG, -+ *PCSMI_SAS_RAID_CONFIG; -+ -+typedef struct _CSMI_SAS_RAID_CONFIG_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_RAID_CONFIG Configuration; -+} CSMI_SAS_RAID_CONFIG_BUFFER, -+ *PCSMI_SAS_RAID_CONFIG_BUFFER; -+ -+// CC_CSMI_SAS_GET_RAID_FEATURES -+ -+typedef struct _CSMI_SAS_RAID_TYPE_DESCRIPTION { -+ __u8 bRaidType; -+ __u8 bReservedBytes[7]; -+ __u32 uSupportedStripeSizeMap; -+ __u8 bReserved[24]; -+} CSMI_SAS_RAID_TYPE_DESCRIPTION, -+ *PCSMI_SAS_RAID_TYPE_DESCRIPTION; -+ -+typedef struct _CSMI_SAS_RAID_FEATURES { -+ __u32 uFeatures; -+ __u8 bReservedFeatures[32]; -+ __u8 bDefaultTransformPriority; -+ __u8 bTransformPriority; -+ __u8 bDefaultRebuildPriority; -+ __u8 bRebuildPriority; -+ __u8 bDefaultSurfaceScanPriority; -+ __u8 bSurfaceScanPriority; -+ __u16 usReserved; -+ __u32 uRaidSetTransformationRules; -+ __u32 uReserved[11]; -+ CSMI_SAS_RAID_TYPE_DESCRIPTION RaidType[24]; -+ __u8 bCacheRatiosSupported[104]; -+ __u32 uChangeCount; -+ __u8 bReserved[124]; -+} CSMI_SAS_RAID_FEATURES, -+ *PCSMI_SAS_RAID_FEATURES; -+ -+typedef struct _CSMI_SAS_RAID_FEATURES_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_RAID_FEATURES Information; -+} CSMI_SAS_RAID_FEATURES_BUFFER, -+ *PCSMI_SAS_RAID_FEATURES_BUFFER; -+ -+// CC_CSMI_SAS_SET_RAID_CONTROL -+ -+typedef struct _CSMI_SAS_RAID_CONTROL { -+ __u8 bTransformPriority; -+ __u8 bRebuildPriority; -+ __u8 bCacheRatioFlag; -+ __u8 bCacheRatio; -+ __u8 bSurfaceScanPriority; -+ __u8 bReservedBytes[15]; -+ __u8 bClearConfiguration[8]; -+ __u32 uChangeCount; -+ __u8 bReserved[88]; -+ __u32 uFailureCode; -+ __u8 bFailureDescription[80]; -+} CSMI_SAS_RAID_CONTROL, -+ *PCSMI_SAS_RAID_CONTROL; -+ -+typedef struct _CSMI_SAS_RAID_CONTROL_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_RAID_CONTROL Information; -+} CSMI_SAS_RAID_CONTROL_BUFFER, -+ *PCSMI_SAS_RAID_CONTROL_BUFFER; -+ -+// CC_CSMI_SAS_GET_RAID_ELEMENT -+ -+typedef struct _CSMI_SAS_DRIVE_EXTENT_INFO { -+ __u32 uDriveIndex; -+ __u8 bExtentType; -+ __u8 bReservedBytes[7]; -+ __u64 ulExtentOffset; -+ __u64 ulExtentBlocks; -+ __u32 uRaidSetIndex; -+ __u8 bReserved[96]; -+} CSMI_SAS_DRIVE_EXTENT_INFO, -+ *PCSMI_SAS_DRIVE_EXTENT_INFO; -+ -+typedef struct _CSMI_SAS_RAID_MODULE_INFO { -+ __u8 bReserved[128]; -+} CSMI_SAS_RAID_MODULE_INFO, -+ *PCSMI_SAS_RAID_MODULE_INFO; -+ -+typedef struct _CSMI_SAS_DRIVE_LOCATION { -+ __u8 bConnector[16]; -+ __u8 bBoxName[16]; -+ __u32 uBay; -+ __u8 bReservedBytes[4]; -+ __u8 bAttachedSASAddress[8]; -+ __u8 bAttachedPhyIdentifier; -+ __u8 bReserved[79]; -+} CSMI_SAS_DRIVE_LOCATION, -+ *PCSMI_SAS_DRIVE_LOCATION; -+ -+typedef struct _CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA { -+ __u8 bNegotiatedLinkRate[2]; -+ __u8 bReserved[126]; -+} CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA, -+ *PCSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA; -+ -+typedef struct _CSMI_SAS_DRIVE_INFO { -+ CSMI_SAS_RAID_DRIVES Device; -+ CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA Data; -+ CSMI_SAS_DRIVE_LOCATION Location; -+ __u8 bReserved[16]; -+} CSMI_SAS_DRIVE_INFO, -+ *PCSMI_SAS_DRIVE_INFO; -+ -+typedef struct _CSMI_SAS_RAID_ELEMENT { -+ __u32 uEnumerationType; -+ __u32 uElementIndex; -+ __u32 uNumElements; -+ __u32 uChangeCount; -+ __u32 uSubElementIndex; -+ __u8 bReserved[32]; -+ __u32 uFailureCode; -+ __u8 bFailureDescription[80]; -+ union { -+ CSMI_SAS_DRIVE_INFO Drive; -+ CSMI_SAS_RAID_MODULE_INFO Module; -+ CSMI_SAS_DRIVE_EXTENT_INFO Extent; -+ } Element; -+} CSMI_SAS_RAID_ELEMENT, -+ *PCSMI_SAS_RAID_ELEMENT; -+ -+typedef struct _CSMI_SAS_RAID_ELEMENT_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_RAID_ELEMENT Information; -+} CSMI_SAS_RAID_ELEMENT_BUFFER, -+ *PCSMI_SAS_RAID_ELEMENT_BUFFER; -+ -+// CC_CSMI_SAS_SET_RAID_OPERATION -+ -+typedef struct _CSMI_SAS_RAID_SET_LIST { -+ __u32 uRaidSetIndex; -+ __u8 bExistingLun[8]; -+ __u8 bNewLun[8]; -+ __u8 bReserved[12]; -+} CSMI_SAS_RAID_SET_LIST, -+ *PCSMI_SAS_RAID_SET_LIST; -+ -+typedef struct _CSMI_SAS_RAID_SET_DRIVE_LIST { -+ __u32 uDriveIndex; -+ __u8 bDriveUsage; -+ __u8 bReserved[27]; -+} CSMI_SAS_RAID_SET_DRIVE_LIST, -+ *PCSMI_SAS_RAID_SET_DRIVE_LIST; -+ -+typedef struct _CSMI_SAS_RAID_SET_SPARE_INFO { -+ __u32 uRaidSetIndex; -+ __u32 uDriveCount; -+ __u8 bApplicationScratchPad[16]; -+ __u8 bReserved[104]; -+} CSMI_SAS_RAID_SET_SPARE_INFO, -+ *PCSMI_SAS_RAID_SET_SPARE_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_ONLINE_STATE_INFO { -+ __u32 uRaidSetIndex; -+ __u8 bOnlineState; -+ __u8 bReserved[123]; -+} CSMI_SAS_RAID_SET_ONLINE_STATE_INFO, -+ *PCSMI_SAS_RAID_SET_ONLINE_STATE_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_CACHE_INFO { -+ __u32 uRaidSetIndex; -+ __u8 bCacheSetting; -+ __u8 bCacheRatioFlag; -+ __u8 bCacheRatio; -+ __u8 bReserved[121]; -+} CSMI_SAS_RAID_SET_CACHE_INFO, -+ *PCSMI_SAS_RAID_SET_CACHE_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO { -+ __u32 uRaidSetIndex; -+ __u8 bWriteProtectSetting; -+ __u8 bReserved[123]; -+} CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO, -+ *PCSMI_SAS_RAID_SET_WRITE_PROTECT_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_DELETE_INFO { -+ __u32 uRaidSetIndex; -+ __u8 bReserved[124]; -+} CSMI_SAS_RAID_SET_DELETE_INFO, -+ *PCSMI_SAS_RAID_SET_DELETE_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_MODIFY_INFO { -+ __u8 bRaidType; -+ __u8 bReservedBytes[7]; -+ __u32 uStripeSize; -+ __u64 ulRaidSetBlocks; -+ __u64 ulRaidSetExtentOffset; -+ __u32 uDriveCount; -+ __u8 bReserved[96]; -+} CSMI_SAS_RAID_SET_MODIFY_INFO, -+ *PCSMI_SAS_RAID_SET_MODIFY_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_TRANSFORM_INFO { -+ __u8 bTransformType; -+ __u8 bReservedBytes[3]; -+ __u32 uRaidSetIndex; -+ __u8 bRaidType; -+ __u8 bReservedBytes2[11]; -+ __u32 uAdditionalRaidSetIndex; -+ __u32 uRaidSetCount; -+ __u8 bApplicationScratchPad[16]; -+ CSMI_SAS_RAID_SET_MODIFY_INFO Modify; -+ __u8 bReserved[80]; -+} CSMI_SAS_RAID_SET_TRANSFORM_INFO, -+ *PCSMI_SAS_RAID_SET_TRANSFORM_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_LABEL_INFO { -+ __u32 uRaidSetIndex; -+ __u8 bLabel[16]; -+ __u8 bReserved[108]; -+} CSMI_SAS_RAID_SET_LABEL_INFO, -+ *PCSMI_SAS_RAID_SET_LABEL_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_CREATE_INFO { -+ __u8 bRaidType; -+ __u8 bReservedBytes[7]; -+ __u32 uStripeSize; -+ __u32 uTrackSectorCount; -+ __u64 ulRaidSetBlocks; -+ __u64 ulRaidSetExtentOffset; -+ __u32 uDriveCount; -+ __u8 bLabel[16]; -+ __u32 uRaidSetIndex; -+ __u8 bApplicationScratchPad[16]; -+ __u32 uNumberOfHeads; -+ __u32 uNumberOfTracks; -+ __u8 bReserved[48]; -+} CSMI_SAS_RAID_SET_CREATE_INFO, -+ *PCSMI_SAS_RAID_SET_CREATE_INFO; -+ -+typedef struct _CSMI_SAS_RAID_SET_OPERATION { -+ __u32 uOperationType; -+ __u32 uChangeCount; -+ __u32 uFailureCode; -+ __u8 bFailureDescription[80]; -+ __u8 bReserved[28]; -+ union { -+ CSMI_SAS_RAID_SET_CREATE_INFO Create; -+ CSMI_SAS_RAID_SET_LABEL_INFO Label; -+ CSMI_SAS_RAID_SET_TRANSFORM_INFO Transform; -+ CSMI_SAS_RAID_SET_DELETE_INFO Delete; -+ CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO Protect; -+ CSMI_SAS_RAID_SET_CACHE_INFO Cache; -+ CSMI_SAS_RAID_SET_ONLINE_STATE_INFO State; -+ CSMI_SAS_RAID_SET_SPARE_INFO Spare; -+ } Operation; -+ union { -+ CSMI_SAS_RAID_SET_DRIVE_LIST DriveList[1]; -+ CSMI_SAS_RAID_SET_LIST RaidSetList[1]; -+ } Parameters; -+} CSMI_SAS_RAID_SET_OPERATION, -+ *PCSMI_SAS_RAID_SET_OPERATION; -+ -+typedef struct _CSMI_SAS_RAID_SET_OPERATION_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_RAID_SET_OPERATION Information; -+} CSMI_SAS_RAID_SET_OPERATION_BUFFER, -+ *PCSMI_SAS_RAID_SET_OPERATION_BUFFER; -+ -+/* * * * * * * * * * SAS HBA Class Structures * * * * * * * * * */ -+ -+// CC_CSMI_SAS_GET_PHY_INFO -+ -+typedef struct _CSMI_SAS_IDENTIFY { -+ __u8 bDeviceType; -+ __u8 bRestricted; -+ __u8 bInitiatorPortProtocol; -+ __u8 bTargetPortProtocol; -+ __u8 bRestricted2[8]; -+ __u8 bSASAddress[8]; -+ __u8 bPhyIdentifier; -+ __u8 bSignalClass; -+ __u8 bReserved[6]; -+} CSMI_SAS_IDENTIFY, -+ *PCSMI_SAS_IDENTIFY; -+ -+typedef struct _CSMI_SAS_PHY_ENTITY { -+ CSMI_SAS_IDENTIFY Identify; -+ __u8 bPortIdentifier; -+ __u8 bNegotiatedLinkRate; -+ __u8 bMinimumLinkRate; -+ __u8 bMaximumLinkRate; -+ __u8 bPhyChangeCount; -+ __u8 bAutoDiscover; -+ __u8 bPhyFeatures; -+ __u8 bReserved; -+ CSMI_SAS_IDENTIFY Attached; -+} CSMI_SAS_PHY_ENTITY, -+ *PCSMI_SAS_PHY_ENTITY; -+ -+typedef struct _CSMI_SAS_PHY_INFO { -+ __u8 bNumberOfPhys; -+ __u8 bReserved[3]; -+ CSMI_SAS_PHY_ENTITY Phy[32]; -+} CSMI_SAS_PHY_INFO, -+ *PCSMI_SAS_PHY_INFO; -+ -+typedef struct _CSMI_SAS_PHY_INFO_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_PHY_INFO Information; -+} CSMI_SAS_PHY_INFO_BUFFER, -+ *PCSMI_SAS_PHY_INFO_BUFFER; -+ -+// CC_CSMI_SAS_SET_PHY_INFO -+ -+typedef struct _CSMI_SAS_SET_PHY_INFO { -+ __u8 bPhyIdentifier; -+ __u8 bNegotiatedLinkRate; -+ __u8 bProgrammedMinimumLinkRate; -+ __u8 bProgrammedMaximumLinkRate; -+ __u8 bSignalClass; -+ __u8 bReserved[3]; -+} CSMI_SAS_SET_PHY_INFO, -+ *PCSMI_SAS_SET_PHY_INFO; -+ -+typedef struct _CSMI_SAS_SET_PHY_INFO_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_SET_PHY_INFO Information; -+} CSMI_SAS_SET_PHY_INFO_BUFFER, -+ *PCSMI_SAS_SET_PHY_INFO_BUFFER; -+ -+// CC_CSMI_SAS_GET_LINK_ERRORS -+ -+typedef struct _CSMI_SAS_LINK_ERRORS { -+ __u8 bPhyIdentifier; -+ __u8 bResetCounts; -+ __u8 bReserved[2]; -+ __u32 uInvalidDwordCount; -+ __u32 uRunningDisparityErrorCount; -+ __u32 uLossOfDwordSyncCount; -+ __u32 uPhyResetProblemCount; -+} CSMI_SAS_LINK_ERRORS, -+ *PCSMI_SAS_LINK_ERRORS; -+ -+typedef struct _CSMI_SAS_LINK_ERRORS_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_LINK_ERRORS Information; -+} CSMI_SAS_LINK_ERRORS_BUFFER, -+ *PCSMI_SAS_LINK_ERRORS_BUFFER; -+ -+// CC_CSMI_SAS_SMP_PASSTHRU -+ -+typedef struct _CSMI_SAS_SMP_REQUEST { -+ __u8 bFrameType; -+ __u8 bFunction; -+ __u8 bReserved[2]; -+ __u8 bAdditionalRequestBytes[1016]; -+} CSMI_SAS_SMP_REQUEST, -+ *PCSMI_SAS_SMP_REQUEST; -+ -+typedef struct _CSMI_SAS_SMP_RESPONSE { -+ __u8 bFrameType; -+ __u8 bFunction; -+ __u8 bFunctionResult; -+ __u8 bReserved; -+ __u8 bAdditionalResponseBytes[1016]; -+} CSMI_SAS_SMP_RESPONSE, -+ *PCSMI_SAS_SMP_RESPONSE; -+ -+typedef struct _CSMI_SAS_SMP_PASSTHRU { -+ __u8 bPhyIdentifier; -+ __u8 bPortIdentifier; -+ __u8 bConnectionRate; -+ __u8 bReserved; -+ __u8 bDestinationSASAddress[8]; -+ __u32 uRequestLength; -+ CSMI_SAS_SMP_REQUEST Request; -+ __u8 bConnectionStatus; -+ __u8 bReserved2[3]; -+ __u32 uResponseBytes; -+ CSMI_SAS_SMP_RESPONSE Response; -+} CSMI_SAS_SMP_PASSTHRU, -+ *PCSMI_SAS_SMP_PASSTHRU; -+ -+typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_SMP_PASSTHRU Parameters; -+} CSMI_SAS_SMP_PASSTHRU_BUFFER, -+ *PCSMI_SAS_SMP_PASSTHRU_BUFFER; -+ -+// CC_CSMI_SAS_SSP_PASSTHRU -+ -+typedef struct _CSMI_SAS_SSP_PASSTHRU { -+ __u8 bPhyIdentifier; -+ __u8 bPortIdentifier; -+ __u8 bConnectionRate; -+ __u8 bReserved; -+ __u8 bDestinationSASAddress[8]; -+ __u8 bLun[8]; -+ __u8 bCDBLength; -+ __u8 bAdditionalCDBLength; -+ __u8 bReserved2[2]; -+ __u8 bCDB[16]; -+ __u32 uFlags; -+ __u8 bAdditionalCDB[24]; -+ __u32 uDataLength; -+} CSMI_SAS_SSP_PASSTHRU, -+ *PCSMI_SAS_SSP_PASSTHRU; -+ -+typedef struct _CSMI_SAS_SSP_PASSTHRU_STATUS { -+ __u8 bConnectionStatus; -+ __u8 bSSPStatus; -+ __u8 bReserved[2]; -+ __u8 bDataPresent; -+ __u8 bStatus; -+ __u8 bResponseLength[2]; -+ __u8 bResponse[256]; -+ __u32 uDataBytes; -+} CSMI_SAS_SSP_PASSTHRU_STATUS, -+ *PCSMI_SAS_SSP_PASSTHRU_STATUS; -+ -+typedef struct _CSMI_SAS_SSP_PASSTHRU_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_SSP_PASSTHRU Parameters; -+ CSMI_SAS_SSP_PASSTHRU_STATUS Status; -+ __u8 bDataBuffer[1]; -+} CSMI_SAS_SSP_PASSTHRU_BUFFER, -+ *PCSMI_SAS_SSP_PASSTHRU_BUFFER; -+ -+// CC_CSMI_SAS_STP_PASSTHRU -+ -+typedef struct _CSMI_SAS_STP_PASSTHRU { -+ __u8 bPhyIdentifier; -+ __u8 bPortIdentifier; -+ __u8 bConnectionRate; -+ __u8 bReserved; -+ __u8 bDestinationSASAddress[8]; -+ __u8 bReserved2[4]; -+ __u8 bCommandFIS[20]; -+ __u32 uFlags; -+ __u32 uDataLength; -+} CSMI_SAS_STP_PASSTHRU, -+ *PCSMI_SAS_STP_PASSTHRU; -+ -+typedef struct _CSMI_SAS_STP_PASSTHRU_STATUS { -+ __u8 bConnectionStatus; -+ __u8 bReserved[3]; -+ __u8 bStatusFIS[20]; -+ __u32 uSCR[16]; -+ __u32 uDataBytes; -+} CSMI_SAS_STP_PASSTHRU_STATUS, -+ *PCSMI_SAS_STP_PASSTHRU_STATUS; -+ -+typedef struct _CSMI_SAS_STP_PASSTHRU_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_STP_PASSTHRU Parameters; -+ CSMI_SAS_STP_PASSTHRU_STATUS Status; -+ __u8 bDataBuffer[1]; -+} CSMI_SAS_STP_PASSTHRU_BUFFER, -+ *PCSMI_SAS_STP_PASSTHRU_BUFFER; -+ -+// CC_CSMI_SAS_GET_SATA_SIGNATURE -+ -+typedef struct _CSMI_SAS_SATA_SIGNATURE { -+ __u8 bPhyIdentifier; -+ __u8 bReserved[3]; -+ __u8 bSignatureFIS[20]; -+} CSMI_SAS_SATA_SIGNATURE, -+ *PCSMI_SAS_SATA_SIGNATURE; -+ -+typedef struct _CSMI_SAS_SATA_SIGNATURE_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_SATA_SIGNATURE Signature; -+} CSMI_SAS_SATA_SIGNATURE_BUFFER, -+ *PCSMI_SAS_SATA_SIGNATURE_BUFFER; -+ -+// CC_CSMI_SAS_GET_SCSI_ADDRESS -+ -+typedef struct _CSMI_SAS_GET_SCSI_ADDRESS_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ __u8 bSASAddress[8]; -+ __u8 bSASLun[8]; -+ __u8 bHostIndex; -+ __u8 bPathId; -+ __u8 bTargetId; -+ __u8 bLun; -+} CSMI_SAS_GET_SCSI_ADDRESS_BUFFER, -+ *PCSMI_SAS_GET_SCSI_ADDRESS_BUFFER; -+ -+// CC_CSMI_SAS_GET_DEVICE_ADDRESS -+ -+typedef struct _CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ __u8 bHostIndex; -+ __u8 bPathId; -+ __u8 bTargetId; -+ __u8 bLun; -+ __u8 bSASAddress[8]; -+ __u8 bSASLun[8]; -+} CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER, -+ *PCSMI_SAS_GET_DEVICE_ADDRESS_BUFFER; -+ -+// CC_CSMI_SAS_TASK_MANAGEMENT -+ -+typedef struct _CSMI_SAS_SSP_TASK_IU { -+ __u8 bHostIndex; -+ __u8 bPathId; -+ __u8 bTargetId; -+ __u8 bLun; -+ __u32 uFlags; -+ __u32 uQueueTag; -+ __u32 uReserved; -+ __u8 bTaskManagementFunction; -+ __u8 bReserved[7]; -+ __u32 uInformation; -+} CSMI_SAS_SSP_TASK_IU, -+ *PCSMI_SAS_SSP_TASK_IU; -+ -+typedef struct _CSMI_SAS_SSP_TASK_IU_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_SSP_TASK_IU Parameters; -+ CSMI_SAS_SSP_PASSTHRU_STATUS Status; -+} CSMI_SAS_SSP_TASK_IU_BUFFER, -+ *PCSMI_SAS_SSP_TASK_IU_BUFFER; -+ -+// CC_CSMI_SAS_GET_CONNECTOR_INFO -+ -+typedef struct _CSMI_SAS_GET_CONNECTOR_INFO { -+ __u32 uPinout; -+ __u8 bConnector[16]; -+ __u8 bLocation; -+ __u8 bReserved[15]; -+} CSMI_SAS_CONNECTOR_INFO, -+ *PCSMI_SAS_CONNECTOR_INFO; -+ -+typedef struct _CSMI_SAS_CONNECTOR_INFO_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ CSMI_SAS_CONNECTOR_INFO Reference[32]; -+} CSMI_SAS_CONNECTOR_INFO_BUFFER, -+ *PCSMI_SAS_CONNECTOR_INFO_BUFFER; -+ -+// CC_CSMI_SAS_GET_LOCATION -+ -+typedef struct _CSMI_SAS_LOCATION_IDENTIFIER { -+ __u32 bLocationFlags; -+ __u8 bSASAddress[8]; -+ __u8 bSASLun[8]; -+ __u8 bEnclosureIdentifier[8]; -+ __u8 bEnclosureName[32]; -+ __u8 bBayPrefix[32]; -+ __u8 bBayIdentifier; -+ __u8 bLocationState; -+ __u8 bReserved[2]; -+} CSMI_SAS_LOCATION_IDENTIFIER, -+ *PCSMI_SAS_LOCATION_IDENTIFIER; -+ -+typedef struct _CSMI_SAS_GET_LOCATION_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ __u8 bHostIndex; -+ __u8 bPathId; -+ __u8 bTargetId; -+ __u8 bLun; -+ __u8 bIdentify; -+ __u8 bNumberOfLocationIdentifiers; -+ __u8 bLengthOfLocationIdentifier; -+ CSMI_SAS_LOCATION_IDENTIFIER Location[1]; -+} CSMI_SAS_GET_LOCATION_BUFFER, -+ *PCSMI_SAS_GET_LOCATION_BUFFER; -+ -+// CC_CSMI_SAS_PHY_CONTROL -+ -+typedef struct _CSMI_SAS_CHARACTER { -+ __u8 bTypeFlags; -+ __u8 bValue; -+} CSMI_SAS_CHARACTER, -+ *PCSMI_SAS_CHARACTER; -+ -+typedef struct _CSMI_SAS_PHY_CONTROL { -+ __u8 bType; -+ __u8 bRate; -+ __u8 bReserved[6]; -+ __u32 uVendorUnique[8]; -+ __u32 uTransmitterFlags; -+ __i8 bTransmitAmplitude; -+ __i8 bTransmitterPreemphasis; -+ __i8 bTransmitterSlewRate; -+ __i8 bTransmitterReserved[13]; -+ __u8 bTransmitterVendorUnique[64]; -+ __u32 uReceiverFlags; -+ __i8 bReceiverThreshold; -+ __i8 bReceiverEqualizationGain; -+ __i8 bReceiverReserved[14]; -+ __u8 bReceiverVendorUnique[64]; -+ __u32 uPatternFlags; -+ __u8 bFixedPattern; -+ __u8 bUserPatternLength; -+ __u8 bPatternReserved[6]; -+ CSMI_SAS_CHARACTER UserPatternBuffer[16]; -+} CSMI_SAS_PHY_CONTROL, -+ *PCSMI_SAS_PHY_CONTROL; -+ -+typedef struct _CSMI_SAS_PHY_CONTROL_BUFFER { -+ IOCTL_HEADER IoctlHeader; -+ __u32 uFunction; -+ __u8 bPhyIdentifier; -+ __u16 usLengthOfControl; -+ __u8 bNumberOfControls; -+ __u8 bReserved[4]; -+ __u32 uLinkFlags; -+ __u8 bSpinupRate; -+ __u8 bLinkReserved[7]; -+ __u32 uVendorUnique[8]; -+ CSMI_SAS_PHY_CONTROL Control[1]; -+} CSMI_SAS_PHY_CONTROL_BUFFER, -+ *PCSMI_SAS_PHY_CONTROL_BUFFER; -+ -+// EDN #pragma CSMI_SAS_END_PACK -+#pragma pack() -+ -+#endif // _CSMI_SAS_H_ -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/Makefile linux-2.6.9-55.0.12/drivers/message/fusion/Makefile ---- linux-2.6.9-67.0.1/drivers/message/fusion/Makefile 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/Makefile 2007-11-02 09:10:23.000000000 +0100 -@@ -8,8 +8,6 @@ - #EXTRA_CFLAGS += -DMPT_DEBUG_EXIT - #EXTRA_CFLAGS += -DMPT_DEBUG_FAIL - #EXTRA_CFLAGS += -DMPT_DEBUG_SAS --EXTRA_CFLAGS += -DCPQ_CIM --EXTRA_CFLAGS += -DMPT_SUPPORT_FWDLB_IOCTL - - # - # driver/module specifics... -@@ -31,6 +29,7 @@ EXTRA_CFLAGS += -DMPT_SUPPORT_FWDLB_IOCT - # - # For mptctl: - #CFLAGS_mptctl.o += -DMPT_DEBUG_IOCTL -+CFLAGS_mptctl.o += -DCPQ_CIM - # - # For mptsas: - #CFLAGS_mptsas.o += -DMPT_DEBUG_HOTPLUG -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptbase.c linux-2.6.9-55.0.12/drivers/message/fusion/mptbase.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptbase.c 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptbase.c 2007-11-02 09:10:23.000000000 +0100 -@@ -5,8 +5,8 @@ - * For use with LSI Logic PCI chip/adapter(s) - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - * $Id: mptbase.c,v 1.130 2003/05/07 14:08:30 Exp $ - */ -@@ -93,8 +93,6 @@ MODULE_VERSION(MPT_LINUX_VERSION_COMMON) - char *mptbase = NULL; - - /* Command line args */ -- -- - int mpt_can_queue = 128; - module_param(mpt_can_queue, int, 0); - MODULE_PARM_DESC(mpt_can_queue, " Max IO depth per controller (default=128)"); -@@ -115,11 +113,6 @@ static int mpt_msi_enable = 0; - module_param(mpt_msi_enable, int, 0); - MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)"); - --int mpt_enable_deadioc_detect = 0; --module_param(mpt_enable_deadioc_detect, int, 0); --MODULE_PARM_DESC(mpt_enable_deadioc_detect, "Detection of Dead IOC Enable (default=0)"); -- --//@@@@ - #ifdef MFCNT - static int mfcounter = 0; - #define PRINT_MF_COUNT 20000 -@@ -163,13 +156,10 @@ static DECLARE_WAIT_QUEUE_HEAD(mpt_waitq - */ - static irqreturn_t mpt_interrupt(int irq, void *bus_id, struct pt_regs *r); - static int mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply); --int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, -+static int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, - u32 *req, int replyBytes, u16 *u16reply, int maxwait, - int sleepFlag); --int mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag); --int mpt_writeSDP1(MPT_ADAPTER *hd, int portnum, int id, int flags); --void mpt_setSDP1parameters (u8 width, u8 factor, u8 offset, u8 flags, int *requestedPtr, int *configurationPtr); -- -+static int mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag); - static void mpt_detect_bound_ports(MPT_ADAPTER *ioc, struct pci_dev *pdev); - static void mpt_adapter_disable(MPT_ADAPTER *ioc); - static void mpt_adapter_dispose(MPT_ADAPTER *ioc); -@@ -187,7 +177,7 @@ static int mpt_do_upload(MPT_ADAPTER *io - int mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag); - static int mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag); - static int KickStart(MPT_ADAPTER *ioc, int ignore, int sleepFlag); --int mpt_SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag); -+static int SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag); - static int PrimeIocFifos(MPT_ADAPTER *ioc); - static int WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag); - static int WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag); -@@ -197,6 +187,9 @@ static int GetFcPortPage0(MPT_ADAPTER *i - static int GetIoUnitPage2(MPT_ADAPTER *ioc); - static int GetManufPage5(MPT_ADAPTER *ioc, int numPorts); - static int GetManufPage0(MPT_ADAPTER *ioc); -+int mpt_sas_get_info(MPT_ADAPTER *ioc); -+static void mptbase_sas_process_event_data(MPT_ADAPTER *ioc, -+ MpiEventDataSasDeviceStatusChange_t * pSasEventData); - int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); - static void mptbase_raid_process_event_data(MPT_ADAPTER *ioc, - MpiEventDataRaid_t * pRaidEventData); -@@ -204,7 +197,6 @@ static int mpt_GetScsiPortSettings(MPT_A - static int mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum); - static void mpt_read_ioc_pg_1(MPT_ADAPTER *ioc); - static void mpt_read_ioc_pg_4(MPT_ADAPTER *ioc); --static void mpt_read_ioc_pg_6(MPT_ADAPTER *ioc); - static void mpt_timer_expired(unsigned long data); - static int SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch); - static int SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp); -@@ -227,7 +219,6 @@ static void mpt_sp_ioc_info(MPT_ADAPTER - static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info); - static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info); - static void mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info); --static void mpt_inactive_raid_list_free(MPT_ADAPTER *ioc); - - /* module entry point */ - static int __init fusion_init (void); -@@ -273,10 +264,10 @@ mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa - { - MPT_FRAME_HDR *mf = NULL; - MPT_FRAME_HDR *mr = NULL; -- int req_idx; -+ int req_idx = 0; - int cb_idx; - -- dmfprintk((MYIOC_s_INFO_FMT "Got TURBO reply pa=%08x\n", -+ dmfprintk((MYIOC_s_INFO_FMT "Got TURBO reply req_idx=%08x\n", - ioc->name, pa)); - - switch (pa >> MPI_CONTEXT_REPLY_TYPE_SHIFT) { -@@ -312,9 +303,7 @@ mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa - break; - default: - cb_idx = 0; -- printk(MYIOC_s_WARN_FMT "%s: Invalid REPLY_TYPE in pa=%08x!\n", -- __FUNCTION__, ioc->name, pa); --// BUG(); -+ BUG(); - } - - /* Check for (valid) IO callback! */ -@@ -342,12 +331,6 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa) - - u32 reply_dma_low; - u16 ioc_stat; --#ifdef MPT_DEBUG_REPLY -- u8 function; -- MPT_FRAME_HDR *chain; -- int chain_idx, chain_number, next; --#endif -- - - /* non-TURBO reply! Hmmm, something may be up... - * Newest turbo reply mechanism; get address -@@ -367,44 +350,21 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa) - cb_idx = mr->u.frame.hwhdr.msgctxu.fld.cb_idx; - mf = MPT_INDEX_2_MFPTR(ioc, req_idx); - -- ioc_stat = le16_to_cpu(mr->u.reply.IOCStatus); --#ifdef MPT_DEBUG_REPLY -- if ((ioc_stat != MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE) && /* 0x0043 */ -- (ioc_stat != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) { /* 0x0045 */ -- function = mr->u.hdr.Function; -- dreplyprintk((MYIOC_s_WARN_FMT "non-TURBO reply context=%04x%04x Function=%x IOCStatus=%04x\n", -- ioc->name, cb_idx, req_idx, function, ioc_stat)); -- DBG_DUMP_REPLY_FRAME(mr) -- -- printk("Request:\n"); -- DBG_DUMP_REPLYS_REQUEST_FRAME(ioc, mf) -- chain_number = 1; -- chain_idx = ioc->ReqToChain[req_idx]; -- while (chain_idx != MPT_HOST_NO_CHAIN) { -- next = ioc->ChainToChain[chain_idx]; -- chain = (MPT_FRAME_HDR *) (ioc->ChainBuffer -- + (chain_idx * ioc->req_sz)); -- printk("Chain %d:\n", chain_number++); -- DBG_DUMP_REPLYS_REQUEST_FRAME(ioc, chain) -- chain_idx = next; -- } -- } --#endif -+ dmfprintk((MYIOC_s_INFO_FMT "Got non-TURBO reply=%p req_idx=%x cb_idx=%x Function=%x\n", -+ ioc->name, mr, req_idx, cb_idx, mr->u.hdr.Function)); -+ DBG_DUMP_REPLY_FRAME(mr) - - /* Check/log IOC log info - */ -+ ioc_stat = le16_to_cpu(mr->u.reply.IOCStatus); - if (ioc_stat & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) { - u32 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo); - if (ioc->bus_type == FC) - mpt_fc_log_info(ioc, log_info); - else if (ioc->bus_type == SPI) - mpt_spi_log_info(ioc, log_info); -- else if (ioc->bus_type == SAS) { -- printk(MYIOC_s_INFO_FMT -- "IOCStatus=%04x LogInfo=%08x ", -- ioc->name, ioc_stat, log_info); -+ else if (ioc->bus_type == SAS) - mpt_sas_log_info(ioc, log_info); -- } - } - if (ioc_stat & MPI_IOCSTATUS_MASK) { - if (ioc->bus_type == SPI && -@@ -432,31 +392,6 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa) - if (freeme) - mpt_free_msg_frame(ioc, mf); - mb(); --if (ioc->CheckFcLinkSpeed && -- ioc->FcLinkSpeedCheckNeeded && -- ioc->FcLinkSpeedReqActive == NULL && -- (mf = mpt_get_msg_frame(mpt_base_index, ioc))) { -- pConfig_t pConfigMsg; -- dma_addr_t physAddr; -- -- ioc->FcLinkSpeedCheckNeeded = 0; -- ioc->FcLinkSpeedReqActive = mf; -- pConfigMsg = (pConfig_t)mf; -- /* there's enough room, so FCPortPage0 will be put in the mf */ -- physAddr = ioc->req_frames_dma + sizeof(pConfig_t) + -- (u8 *)mf - (u8 *)ioc->req_frames; -- memset(pConfigMsg, 0, ioc->req_sz); -- pConfigMsg->Action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- pConfigMsg->Function = MPI_FUNCTION_CONFIG; -- pConfigMsg->Header.PageType = MPI_CONFIG_PAGETYPE_FC_PORT; -- pConfigMsg->Header.PageNumber = 0; -- pConfigMsg->Header.PageLength = sizeof(FCPortPage0_t) / 4; -- pConfigMsg->Header.PageVersion = MPI_FCPORTPAGE0_PAGEVERSION; -- mpt_add_sge((char *)&pConfigMsg->PageBufferSGE, -- MPT_SGE_FLAGS_SSIMPLE_READ + sizeof(FCPortPage0_t), -- physAddr); -- mpt_put_msg_frame(mpt_base_index, ioc, mf); -- } - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -543,17 +478,15 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRA - } - - /* -- * EventNotificationReply is an exception -+ * Hmmm... It seems that EventNotificationReply is an exception - * to the rule of one reply per request. - */ - if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) { - freereq = 0; - } else { -- devtprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns mf=%p evnp=%p\n", ioc->name, pEvReply, mf, ioc->evnp)); -- if ( (MPT_FRAME_HDR *)ioc->evnp == mf ) { -- ioc->evnp = NULL; -- } -- } -+ devtprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns Request frame\n", -+ ioc->name, pEvReply)); -+ } - - #ifdef CONFIG_PROC_FS - // LogEvent(ioc, pEvReply); -@@ -562,7 +495,7 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRA - } else if (func == MPI_FUNCTION_EVENT_ACK) { - dprintk((MYIOC_s_INFO_FMT "mpt_base_reply, EventAck reply received\n", - ioc->name)); -- } else if (func == MPI_FUNCTION_CONFIG ) { -+ } else if (func == MPI_FUNCTION_CONFIG) { - CONFIGPARMS *pCfg; - unsigned long flags; - -@@ -617,29 +550,7 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRA - */ - pCfg->wait_done = 1; - wake_up(&mpt_waitq); -- }else if (mf == ioc->FcLinkSpeedReqActive) { -- pFCPortPage0_t pFCPortPage0 = (pFCPortPage0_t)((u8 *)mf + sizeof(pConfig_t)); -- u8 OldSpeed = ioc->FcLinkSpeed; -- u8 NewSpeed = pFCPortPage0->CurrentSpeed; -- u8 State = pFCPortPage0->PortState; -- ioc->FcLinkSpeedReqActive = NULL; -- if (State != MPI_FCPORTPAGE0_PORTSTATE_OFFLINE && -- NewSpeed != MPI_FCPORTPAGE0_CURRENT_SPEED_UKNOWN) { -- char *old; -- char *new; -- old = OldSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_1GBIT ? "1 Gbps" :OldSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_2GBIT ? "2 Gbps" :OldSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_4GBIT ? "4 Gbps" : -- "Unknown"; --new = NewSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_1GBIT ? "1 Gbps" :NewSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_2GBIT ? "2 Gbps" : --NewSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_4GBIT ? "4 Gbps" : "Unknown"; -- --if (OldSpeed == 0) { printk(MYIOC_s_NOTE_FMT "FC Link Established, Speed = %s\n", ioc->name, new); -- } else if (OldSpeed != NewSpeed) --{ --printk(MYIOC_s_WARN_FMT "FC Link Speed Change, Old Speed = %s, New Speed = %s\n",ioc->name, old, new); --} --ioc->FcLinkSpeed = NewSpeed; --} --} -+ } - } else if (func == MPI_FUNCTION_SAS_IO_UNIT_CONTROL) { - /* we should be always getting a reply frame */ - memcpy(ioc->persist_reply_frame, reply, -@@ -868,10 +779,6 @@ MPT_FRAME_HDR* - mpt_get_msg_frame(int handle, MPT_ADAPTER *ioc) - { - MPT_FRAME_HDR *mf; -- #ifdef MPT_DEBUG_FAIL -- u8 *mem; -- #endif -- - unsigned long flags; - u16 req_idx; /* Request index */ - -@@ -884,10 +791,7 @@ mpt_get_msg_frame(int handle, MPT_ADAPTE - - /* If interrupts are not attached, do not return a request frame */ - if (!ioc->active) -- { -- printk(KERN_WARNING "IOC Not Active! mpt_get_msg_frame!!\n"); - return NULL; -- } - - spin_lock_irqsave(&ioc->FreeQlock, flags); - if (!list_empty(&ioc->FreeQ)) { -@@ -907,36 +811,10 @@ mpt_get_msg_frame(int handle, MPT_ADAPTE - #ifdef MFCNT - ioc->mfcnt++; - #endif -- } else { --#ifdef MPT_DEBUG_FAIL --dfailprintk((MYIOC_s_WARN_FMT "%s, No Free Message Frame!!\n", -- ioc->name,__FUNCTION__)); -- mem = (u8 *) ioc->req_frames; -- for (req_idx = 0; req_idx < 10; req_idx++) { -- { -- u32 *m = (u32 *)(mem); -- int ii, n; -- -- printk(KERN_WARNING MYNAM ": %s: msg frame %d @ %p:\n" KERN_INFO " ", -- ioc->name, req_idx, m); -- n = ioc->req_sz/4; -- for (ii=0; ii<n; ii++) { -- if (ii && ((ii%8)==0)) -- printk("\n"); -- printk("%08x ", le32_to_cpu(m[ii])); -- } -- printk("\n"); -- } -- mem += ioc->req_sz; -- } --#endif -- -- -- --mf = NULL; --} --spin_unlock_irqrestore(&ioc->FreeQlock, flags); -- -+ } -+ else -+ mf = NULL; -+ spin_unlock_irqrestore(&ioc->FreeQlock, flags); - - #ifdef MFCNT - if (mf == NULL) -@@ -984,13 +862,13 @@ mpt_put_msg_frame(int handle, MPT_ADAPTE - - printk(KERN_INFO MYNAM ": %s: About to Put msg frame @ %p:\n" KERN_INFO " ", - ioc->name, m); -- n = ioc->req_sz/4 ; -+ n = ioc->req_sz/4 - 1; - while (m[n] == 0) - n--; - for (ii=0; ii<=n; ii++) { - if (ii && ((ii%8)==0)) - printk("\n" KERN_INFO " "); -- printk("%08x ", le32_to_cpu(m[ii])); -+ printk(" %08x", le32_to_cpu(m[ii])); - } - printk("\n"); - } -@@ -1074,14 +952,16 @@ mpt_add_sge(char *pAddr, u32 flagslength - * Returns 0 for success, non-zero for failure. - */ - int --mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, ulong timeout, int sleepFlag) -+mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag) - { -- int r = 0; -+ int r = 0; - u8 *req_as_bytes; -- int ii; -+ int ii; - -- dtmprintk((KERN_WARNING MYNAM ": %s: mpt_send_handshake_request reqBytes=%d\n", -- ioc->name, reqBytes)); -+ /* State is known to be good upon entering -+ * this function so issue the bus reset -+ * request. -+ */ - - /* - * Emulate what mpt_put_msg_frame() does /wrt to sanity -@@ -1089,16 +969,12 @@ mpt_send_handshake_request(int handle, M - * is in proper (pre-alloc'd) request buffer range... - */ - ii = MFPTR_2_MPT_INDEX(ioc,(MPT_FRAME_HDR*)req); -- if (ii >= 0 && ii < ioc->req_depth) { -+ if (reqBytes >= 12 && ii >= 0 && ii < ioc->req_depth) { - MPT_FRAME_HDR *mf = (MPT_FRAME_HDR*)req; - mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(ii); - mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; - } - -- ioc->tmPtr = (MPT_FRAME_HDR *)req; -- ioc->TMtimer.expires = jiffies + HZ*timeout; /* seconds */ -- add_timer(&ioc->TMtimer); -- - /* Make sure there are no doorbells */ - CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); - -@@ -1108,25 +984,20 @@ mpt_send_handshake_request(int handle, M - - /* Wait for IOC doorbell int */ - if ((ii = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) { -- r= ii; -- goto mpt_send_handshake_failed; -+ return ii; - } - - /* Read doorbell and check for active bit */ -- if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE)){ -- r= -5; -- goto mpt_send_handshake_failed; -- } -- -+ if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE)) -+ return -5; - - dhsprintk((KERN_INFO MYNAM ": %s: mpt_send_handshake_request start, WaitCnt=%d\n", - ioc->name, ii)); - - CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); - -- if ((WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { -- r=-2; -- goto mpt_send_handshake_failed; -+ if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { -+ return -2; - } - - /* Send request via doorbell handshake */ -@@ -1138,33 +1009,21 @@ mpt_send_handshake_request(int handle, M - (req_as_bytes[(ii*4) + 1] << 8) | - (req_as_bytes[(ii*4) + 2] << 16) | - (req_as_bytes[(ii*4) + 3] << 24)); --dtmprintk((KERN_WARNING MYNAM ": %s: mpt_send_handshake_request word=%08x ii=%d\n",ioc->name, word, ii)); -- - CHIPREG_WRITE32(&ioc->chip->Doorbell, word); -- if ( WaitForDoorbellAck(ioc, 5, sleepFlag) < 0) { -+ if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { - r = -3; -- goto mpt_send_handshake_failed; -+ break; - } - } - -- dtmprintk((KERN_WARNING MYNAM ": %s: mpt_send_handshake_request reqBytes=%d sent, WaitForDoorbellInt\n", -- ioc->name, reqBytes)); -- -- if ( WaitForDoorbellInt(ioc, 10, sleepFlag)< 0) -+ if (r >= 0 && WaitForDoorbellInt(ioc, 10, sleepFlag) >= 0) -+ r = 0; -+ else - r = -4; - - /* Make sure there are no doorbells */ - CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); - --mpt_send_handshake_failed: -- if (r < 0) { -- del_timer(&ioc->TMtimer); -- ioc->tmPtr = NULL; -- } -- dtmprintk((KERN_WARNING MYNAM ": %s: mpt_send_handshake_request r=%d\n", -- ioc->name, r)); -- -- - return r; - } - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -1186,6 +1045,7 @@ mpt_send_handshake_failed: - static int - mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag) - { -+ int r = 0; - - /* return if in use */ - if (CHIPREG_READ32(&ioc->chip->Doorbell) -@@ -1200,7 +1060,7 @@ mpt_host_page_access_control(MPT_ADAPTER - (access_control_value<<12))); - - /* Wait for IOC to clear Doorbell Status bit */ -- if (( WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { -+ if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { - return -2; - }else - return 0; -@@ -1344,10 +1204,20 @@ mpt_bringup_adapter(MPT_ADAPTER *ioc, in - { - int r; - -+ if(ioc->alt_ioc) { -+ if((r=mpt_alt_ioc_wait(ioc->alt_ioc)!=0)) -+ return r; -+ } - - r = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_BRINGUP, - CAN_SLEEP); - -+ if(ioc->alt_ioc) { -+ spin_lock(&ioc->alt_ioc->initializing_hba_lock); -+ ioc->alt_ioc->initializing_hba_lock_flag=0; -+ spin_unlock(&ioc->alt_ioc->initializing_hba_lock); -+ } -+ - return r; - } - -@@ -1383,8 +1253,6 @@ mpt_attach(struct pci_dev *pdev, const s - u8 revision; - u8 pcixcmd; - static int mpt_ids = 0; -- unsigned long flags; -- - #ifdef CONFIG_PROC_FS - struct proc_dir_entry *dent, *ent; - #endif -@@ -1420,7 +1288,6 @@ mpt_attach(struct pci_dev *pdev, const s - ioc->reply_sz = MPT_REPLY_FRAME_SIZE; - - ioc->pcidev = pdev; -- ioc->IOCResetInProgress = 0; - ioc->diagPending = 0; - spin_lock_init(&ioc->diagLock); - spin_lock_init(&ioc->initializing_hba_lock); -@@ -1596,17 +1463,10 @@ mpt_attach(struct pci_dev *pdev, const s - if(ioc->errata_flag_1064) { - pci_disable_io_access(pdev); - } -- if(ioc->bus_type == FC) { -- ioc->CheckFcLinkSpeed = 1; -- ioc->FcLinkSpeed = 0; -- } -- - - sprintf(ioc->name, "ioc%d", ioc->id); - - spin_lock_init(&ioc->FreeQlock); -- spin_lock_init(&ioc->PendingMFlock); -- - - /* Disable all! */ - CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); -@@ -1659,43 +1519,22 @@ mpt_attach(struct pci_dev *pdev, const s - */ - mpt_detect_bound_ports(ioc, pdev); - --if(mpt_enable_deadioc_detect){ --/* The following list initializations is moved from PrimeIocFifos -- because the lists will not get initialize for non-operational -- IOCs and which cause a crash when the lists are accessed later -- */ --/* Initialize the free chain Q.*/ -- -- INIT_LIST_HEAD(&ioc->FreeChainQ); -- spin_lock_irqsave(&ioc->FreeQlock, flags); -- INIT_LIST_HEAD(&ioc->FreeQ); -- spin_unlock_irqrestore(&ioc->FreeQlock, flags); -- init_MUTEX(&ioc->raid_data.inactive_list_mutex); -- INIT_LIST_HEAD(&ioc->raid_data.inactive_list); -- -- /* Even If there is any error in IOC bringup, the IOC is allowed to -- be attached with MPT drivers, This change is done to support -- Firmware download boot functionality for FW dead IOC */ -- mpt_bringup_adapter(ioc, CAN_SLEEP); -- } -- --else { -- if ((r = mpt_bringup_adapter(ioc, CAN_SLEEP)) != 0){ -- printk(KERN_WARNING MYNAM -- ": WARNING - %s did not initialize properly! (%d)\n", -- ioc->name, r); -- list_del(&ioc->list); -- free_irq(ioc->pci_irq, ioc); -- if (mpt_msi_enable == 1) { -- pci_disable_msi(pdev); -- } -- iounmap(mem); -- kfree(ioc); -- pci_set_drvdata(pdev, NULL); -- return r; -+ if ((r = mpt_bringup_adapter(ioc, CAN_SLEEP)) != 0){ -+ printk(KERN_WARNING MYNAM -+ ": WARNING - %s did not initialize properly! (%d)\n", -+ ioc->name, r); -+ -+ list_del(&ioc->list); -+ free_irq(ioc->pci_irq, ioc); -+ if (mpt_msi_enable == 1) { -+ pci_disable_msi(pdev); -+ } -+ iounmap(mem); -+ kfree(ioc); -+ pci_set_drvdata(pdev, NULL); -+ return r; - } - --} - /* call per device driver probe entry point */ - for(ii=0; ii<MPT_MAX_PROTOCOL_DRIVERS; ii++) { - if(MptDeviceDriverHandlers[ii] && -@@ -1812,7 +1651,7 @@ mpt_suspend(struct pci_dev *pdev, pm_mes - #endif - - /* put ioc into READY_STATE */ -- if(mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, CAN_SLEEP)) { -+ if(SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, CAN_SLEEP)) { - printk(MYIOC_s_ERR_FMT - "pci-suspend: IOC msg unit reset failed!\n", ioc->name); - } -@@ -1864,8 +1703,7 @@ mpt_resume(struct pci_dev *pdev) - if(!CHIPREG_READ32(&ioc->chip->Doorbell)) { - /* enable domain validation flags */ - for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) { -- ioc->spi_data.dvStatus[ii] |= (MPT_SCSICFG_NEED_DV | -- MPT_SCSICFG_DV_NOT_DONE); -+ ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_NEED_DV; - } - } - -@@ -1905,19 +1743,23 @@ mpt_resume(struct pci_dev *pdev) - * - * Returns: - * 0 for success -- * -1 if failed to get board READY -+ * -1 if failed to get boardMODULE_VERSION(MPT_LINUX_VERSION_COMMON); -+ READY - * -2 if READY but IOCFacts Failed - * -3 if READY but PrimeIOCFifos Failed - * -4 if READY but IOCInit Failed - */ --int mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) --{ unsigned long flags; -+static int -+mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) -+{ - int hard_reset_done = 0; -+ int alt_ioc_ready = 0; - int hard; - int rc = 0; - int ii; -+ int handlers; - int ret = 0; -- -+ int reset_alt_ioc_active = 0; - - printk(KERN_INFO MYNAM ": Initiating %s %s\n", - ioc->name, reason==MPT_HOSTEVENT_IOC_BRINGUP ? "bringup" : "recovery"); -@@ -1926,15 +1768,13 @@ int mpt_do_ioc_recovery(MPT_ADAPTER *ioc - CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); - ioc->active = 0; - --/* If an event notification has not returned -- * its request frame, -- * free resources associated with this request. -- */ -- if (ioc->evnp) { -- drsprintk((MYIOC_s_WARN_FMT "do_ioc_recovery: freeing evnp=%p\n", -- ioc->name, ioc->evnp)); -- mpt_free_msg_frame(ioc, (MPT_FRAME_HDR *)ioc->evnp); -- ioc->evnp = NULL; -+ if (ioc->alt_ioc) { -+ if (ioc->alt_ioc->active) -+ reset_alt_ioc_active = 1; -+ -+ /* Disable alt-IOC's reply interrupts (and FreeQ) for a bit ... */ -+ CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, 0xFFFFFFFF); -+ ioc->alt_ioc->active = 0; - } - - hard = 1; -@@ -1945,39 +1785,68 @@ int mpt_do_ioc_recovery(MPT_ADAPTER *ioc - if (hard_reset_done == -4) { - printk(KERN_WARNING MYNAM ": %s Owned by PEER..skipping!\n", - ioc->name); -+ -+ if (reset_alt_ioc_active && ioc->alt_ioc) { -+ /* (re)Enable alt-IOC! (reply interrupt, FreeQ) */ -+ dprintk((KERN_INFO MYNAM ": alt-%s reply irq re-enabled\n", -+ ioc->alt_ioc->name)); -+ CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, MPI_HIM_DIM); -+ ioc->alt_ioc->active = 1; -+ } -+ - } else { - printk(KERN_WARNING MYNAM ": %s NOT READY WARNING!\n", - ioc->name); - } -- -- spin_lock_irqsave(&ioc->diagLock, flags); -- ioc->IOCResetInProgress = 0; -- spin_unlock_irqrestore(&ioc->diagLock, flags); - return -1; - } - -+ /* hard_reset_done = 0 if a soft reset was performed -+ * and 1 if a hard reset was performed. -+ */ -+ if (hard_reset_done && reset_alt_ioc_active && ioc->alt_ioc) { -+ if ((rc = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0) -+ alt_ioc_ready = 1; -+ else -+ printk(KERN_WARNING MYNAM -+ ": alt-%s: Not ready WARNING!\n", -+ ioc->alt_ioc->name); -+ } -+ -+ for (ii=0; ii<5; ii++) { -+ /* Get IOC facts! Allow 5 retries */ -+ if ((rc = GetIocFacts(ioc, sleepFlag, reason)) == 0) -+ break; -+ } - --if (reason == MPT_HOSTEVENT_IOC_BRINGUP || -- mpt_enable_deadioc_detect){ -- for (ii=0; ii<5; ii++) { -- /* Get IOC facts! Allow 5 retries */ -- if ((rc = GetIocFacts(ioc, sleepFlag, reason)) == 0) -- break; --} - -+ if (ii == 5) { -+ dinitprintk((MYIOC_s_INFO_FMT "Retry IocFacts failed rc=%x\n", ioc->name, rc)); -+ ret = -2; -+ } else if (reason == MPT_HOSTEVENT_IOC_BRINGUP) { -+ MptDisplayIocCapabilities(ioc); -+ } - --if(ii==5) { --dinitprintk((MYIOC_s_INFO_FMT "Retry IocFacts failed rc=%x\n", ioc->name , rc)); -- ret = -2; -- } else { -- if (reason == MPT_HOSTEVENT_IOC_BRINGUP) -- MptDisplayIocCapabilities(ioc); -+ if (alt_ioc_ready) { -+ if ((rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason)) != 0) { -+ dinitprintk((MYIOC_s_INFO_FMT "Initial Alt IocFacts failed rc=%x\n", ioc->name, rc)); -+ /* Retry - alt IOC was initialized once -+ */ -+ rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason); -+ } -+ if (rc) { -+ dinitprintk((MYIOC_s_INFO_FMT "Retry Alt IocFacts failed rc=%x\n", ioc->name, rc)); -+ alt_ioc_ready = 0; -+ reset_alt_ioc_active = 0; -+ } else if (reason == MPT_HOSTEVENT_IOC_BRINGUP) { -+ MptDisplayIocCapabilities(ioc->alt_ioc); - } - } - - /* Prime reply & request queues! - * (mucho alloc's) Must be done prior to - * init as upper addresses are needed for init. -+ * If fails, continue with alt-ioc processing - */ - if ((ret == 0) && ((rc = PrimeIocFifos(ioc)) != 0)) - ret = -3; -@@ -1987,6 +1856,23 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc - */ - if ((ret == 0) && ((rc = SendIocInit(ioc, sleepFlag)) != 0)) - ret = -4; -+// NEW! -+ if (alt_ioc_ready && ((rc = PrimeIocFifos(ioc->alt_ioc)) != 0)) { -+ printk(KERN_WARNING MYNAM ": alt-%s: (%d) FIFO mgmt alloc WARNING!\n", -+ ioc->alt_ioc->name, rc); -+ alt_ioc_ready = 0; -+ reset_alt_ioc_active = 0; -+ } -+ -+ if (alt_ioc_ready) { -+ if ((rc = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) { -+ alt_ioc_ready = 0; -+ reset_alt_ioc_active = 0; -+ printk(KERN_WARNING MYNAM -+ ": alt-%s: (%d) init failure WARNING!\n", -+ ioc->alt_ioc->name, rc); -+ } -+ } - - if (reason == MPT_HOSTEVENT_IOC_BRINGUP){ - if (ioc->upload_fw) { -@@ -2024,6 +1910,13 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc - ioc->active = 1; - } - -+ if (reset_alt_ioc_active && ioc->alt_ioc) { -+ /* (re)Enable alt-IOC! (reply interrupt) */ -+ dinitprintk((KERN_INFO MYNAM ": alt-%s reply irq re-enabled\n", -+ ioc->alt_ioc->name)); -+ CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, MPI_HIM_DIM); -+ ioc->alt_ioc->active = 1; -+ } - - /* Enable MPT base driver management of EventNotification - * and EventAck handling. -@@ -2031,6 +1924,9 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc - if ((ret == 0) && (!ioc->facts.EventState)) - (void) SendEventNotification(ioc, 1); /* 1=Enable EventNotification */ - -+ if (ioc->alt_ioc && alt_ioc_ready && !ioc->alt_ioc->facts.EventState) -+ (void) SendEventNotification(ioc->alt_ioc, 1); /* 1=Enable EventNotification */ -+ - /* Add additional "reason" check before call to GetLanConfigPages - * (combined with GetIoUnitPage2 call). This prevents a somewhat - * recursive scenario; GetLanConfigPages times out, timer expired -@@ -2038,30 +1934,32 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc - * and we try GetLanConfigPages again... - */ - if ((ret == 0) && (reason == MPT_HOSTEVENT_IOC_BRINGUP)) { -- -- /* -- * Initalize link list for inactive raid volumes. -- */ -- init_MUTEX(&ioc->raid_data.inactive_list_mutex); -- INIT_LIST_HEAD(&ioc->raid_data.inactive_list); -- - if (ioc->bus_type == SAS) { -+ - /* - * Pre-fetch SAS Address for each port - */ - GetManufPage5(ioc, ioc->facts.NumberOfPorts); - -+ /* -+ * Pre-fetch Serial number for the board. -+ */ -+ GetManufPage0(ioc); -+ -+ /* -+ * Pre-fetch Hw Link Rates. (These may get -+ * overwritten so need to save them.) -+ * Save other SAS data needed for Ioctls. -+ */ -+ mpt_sas_get_info(ioc); -+ - /* clear persistency table */ - if(ioc->facts.IOCExceptions & - MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL) { - ret = mptbase_sas_persist_operation(ioc, - MPI_SAS_OP_CLEAR_NOT_PRESENT); -- if(ret != 0){ -- spin_lock_irqsave(&ioc->diagLock, flags); -- ioc->IOCResetInProgress = 0; -- spin_unlock_irqrestore(&ioc->diagLock, flags); -+ if(ret != 0) - return -1; -- } - } - - /* Find IM volumes -@@ -2118,11 +2016,6 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc - } - - GetIoUnitPage2(ioc); -- -- /* -- * Pre-fetch Serial number for the board. -- */ -- GetManufPage0(ioc); - } - - /* -@@ -2131,35 +2024,26 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc - * NOTE: If we're doing _IOC_BRINGUP, there can be no - * MptResetHandlers[] registered yet. - */ -- if (ret == 0) { -- rc = 0; -- -- for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) { -- if (MptResetHandlers[ii]) { -- drsprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\ n",ioc->name, ii)); -- -+ if (hard_reset_done) { -+ rc = handlers = 0; -+ for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) { -+ if ((ret == 0) && MptResetHandlers[ii]) { -+ dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", -+ ioc->name, ii)); - rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); -+ handlers++; -+ } - -+ if (alt_ioc_ready && MptResetHandlers[ii]) { -+ drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", -+ ioc->name, ioc->alt_ioc->name, ii)); -+ rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); -+ handlers++; - } - } -+ /* FIXME? Examine results here? */ - } - --if (ioc->bus_type == FC) { -- ioc->FcLinkSpeedCheckNeeded = 1; -- } -- -- if (ioc->bus_type == SPI) { -- drsprintk((MYIOC_s_WARN_FMT "%s: calling writeSDP1: ALL_IDS USE_NVRAM\n", -- ioc->name, __FUNCTION__)); -- dnegoprintk((MYIOC_s_WARN_FMT "%s: calling writeSDP1: ALL_IDS USE_NVRAM\n", -- ioc->name, __FUNCTION__)); -- mpt_writeSDP1(ioc, 0, 0, (MPT_SCSICFG_ALL_IDS | MPT_SCSICFG_USE_NVRAM)); -- } -- -- spin_lock_irqsave(&ioc->diagLock, flags); -- ioc->IOCResetInProgress = 0; -- spin_unlock_irqrestore(&ioc->diagLock, flags); -- - return ret; - } - -@@ -2224,11 +2108,9 @@ mpt_detect_bound_ports(MPT_ADAPTER *ioc, - static void - mpt_adapter_disable(MPT_ADAPTER *ioc) - { -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *pTarget; -+ sas_device_info_t *sasDevice, * pNext; - int sz; - int ret, ii; -- int bus, id; - void * request_data; - dma_addr_t request_data_dma; - u32 request_data_sz; -@@ -2253,7 +2135,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) - if ( request_data ) { - request_data_sz = ioc->DiagBuffer_sz[ii]; - request_data_dma = ioc->DiagBuffer_dma[ii]; -- dexitprintk((KERN_INFO MYNAM ": %s: free DiagBuffer[%d] @ %p, sz=%d bytes\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free DiagBuffer[%d] @ %p, sz=%d bytes\n", - ioc->name, ii, request_data, request_data_sz)); - pci_free_consistent(ioc->pcidev, request_data_sz, - request_data, -@@ -2264,7 +2146,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) - } - if (ioc->alloc != NULL) { - sz = ioc->alloc_sz; -- dexitprintk((KERN_INFO MYNAM ": %s: free alloc @ %p, sz=%d bytes\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free alloc @ %p, sz=%d bytes\n", - ioc->name, ioc->alloc, ioc->alloc_sz)); - pci_free_consistent(ioc->pcidev, sz, - ioc->alloc, ioc->alloc_dma); -@@ -2276,7 +2158,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) - - if (ioc->sense_buf_pool != NULL) { - sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); -- dexitprintk((KERN_INFO MYNAM ": %s: free sense_buf_pool @ %p, sz=%d bytes\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free sense_buf_pool @ %p, sz=%d bytes\n", - ioc->name, ioc->sense_buf_pool, sz)); - pci_free_consistent(ioc->pcidev, sz, - ioc->sense_buf_pool, ioc->sense_buf_pool_dma); -@@ -2286,7 +2168,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) - - if (ioc->events != NULL){ - sz = MPTCTL_EVENT_LOG_SIZE * sizeof(MPT_IOCTL_EVENTS); -- dexitprintk((KERN_INFO MYNAM ": %s: free events @ %p, sz=%d bytes\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free events @ %p, sz=%d bytes\n", - ioc->name, ioc->events, sz)); - kfree(ioc->events); - ioc->events = NULL; -@@ -2295,7 +2177,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) - - if (ioc->cached_fw != NULL) { - sz = ioc->facts.FWImageSize; -- dexitprintk((KERN_INFO MYNAM ": %s: free cached_fw @ %p, sz=%d bytes\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free cached_fw @ %p, sz=%d bytes\n", - ioc->name, ioc->cached_fw, sz)); - pci_free_consistent(ioc->pcidev, sz, - ioc->cached_fw, ioc->cached_fw_dma); -@@ -2304,29 +2186,22 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) - } - - if (ioc->spi_data.nvram != NULL) { -- dexitprintk((KERN_INFO MYNAM ": %s: free spi_data.nvram @ %p\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free spi_data.nvram @ %p\n", - ioc->name, ioc->spi_data.nvram)); - kfree(ioc->spi_data.nvram); - ioc->spi_data.nvram = NULL; - } - - if (ioc->raid_data.pIocPg3 != NULL) { -- dexitprintk((KERN_INFO MYNAM ": %s: free spi_data.pIocPg3 @ %p\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free spi_data.pIocPg3 @ %p\n", - ioc->name, ioc->raid_data.pIocPg3)); - kfree(ioc->raid_data.pIocPg3); - ioc->raid_data.pIocPg3 = NULL; - } - -- if (ioc->raid_data.pIocPg6 != NULL) { -- dexitprintk((KERN_INFO MYNAM ": %s: free raid_data.pIocPg6 @ %p\n", -- ioc->name, ioc->raid_data.pIocPg6)); -- kfree(ioc->raid_data.pIocPg6); -- ioc->raid_data.pIocPg6 = NULL; -- } -- - if (ioc->spi_data.pIocPg4 != NULL) { - sz = ioc->spi_data.IocPg4Sz; -- dexitprintk((KERN_INFO MYNAM ": %s: free spi_data.pIocPg4 @ %p size=%d\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free spi_data.pIocPg4 @ %p size=%d\n", - ioc->name, ioc->spi_data.pIocPg4, sz)); - pci_free_consistent(ioc->pcidev, sz, - ioc->spi_data.pIocPg4, -@@ -2336,41 +2211,38 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) - } - - if (ioc->ReqToChain != NULL) { -- dexitprintk((KERN_INFO MYNAM ": %s: free ReqToChain @ %p\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free ReqToChain @ %p\n", - ioc->name, ioc->ReqToChain)); - kfree(ioc->ReqToChain); - ioc->ReqToChain = NULL; - } - - if (ioc->RequestNB != NULL) { -- dexitprintk((KERN_INFO MYNAM ": %s: free RequestNB @ %p\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free RequestNB @ %p\n", - ioc->name, ioc->RequestNB)); - kfree(ioc->RequestNB); - ioc->RequestNB = NULL; - } - - if (ioc->ChainToChain != NULL) { -- dexitprintk((KERN_INFO MYNAM ": %s: free ChainToChain @ %p\n", -+ dexitprintk((KERN_INFO MYNAM ": %s free ChainToChain @ %p\n", - ioc->name, ioc->ChainToChain)); - kfree(ioc->ChainToChain); - ioc->ChainToChain = NULL; - } - -- mpt_inactive_raid_list_free(ioc); -+ list_for_each_entry_safe(sasDevice, pNext, &ioc->sasDeviceList, list) { -+ list_del(&sasDevice->list); -+ dexitprintk((KERN_INFO MYNAM ": %s free sasDevice @ %p\n", -+ ioc->name, sasDevice)); -+ kfree(sasDevice); -+ } - -- for (bus = 0; bus < ioc->NumberOfBuses; bus++) { -- if ((pMptTarget = ioc->Target_List[bus])) { -- for (id = 0; id < ioc->DevicesPerBus; id++) { -- if ((pTarget = pMptTarget->Target[id])) { -- dexitprintk((KERN_INFO MYNAM ": %s: free bus=%d id=%d pTarget=%p\n", -- ioc->name, bus, id, pTarget)); -- kfree (pTarget); -- } -- } -- dexitprintk((KERN_INFO MYNAM ": %s: free bus=%d pMptTarget=%p\n", -- ioc->name, bus, pMptTarget)); -- kfree (pMptTarget); -- } -+ if (ioc->sasPhyInfo != NULL) { -+ dexitprintk((KERN_INFO MYNAM ": %s free sasPhyInfo @ %p\n", -+ ioc->name, ioc->sasPhyInfo)); -+ kfree(ioc->sasPhyInfo); -+ ioc->sasPhyInfo = NULL; - } - - /* emoore@lsil.com : Host Page Buffer Suport, start */ -@@ -2381,7 +2253,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) - ": %s: host page buffers free failed (%d)!\n", - __FUNCTION__, ret); - } -- dexitprintk((KERN_INFO MYNAM ": %s: HostPageBuffer free @ %p, sz=%d bytes\n", -+ dexitprintk((KERN_INFO MYNAM ": %s HostPageBuffer free @ %p, sz=%d bytes\n", - ioc->name, ioc->HostPageBuffer, ioc->HostPageBuffer_sz)); - pci_free_consistent(ioc->pcidev, ioc->HostPageBuffer_sz, - ioc->HostPageBuffer, -@@ -2441,7 +2313,7 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc) - dexitprintk((KERN_INFO MYNAM ": %s: free'd %d of %d bytes\n", - ioc->name, sz_first-sz_last+(int)sizeof(MPT_ADAPTER), sz_first)); - dexitprintk((KERN_INFO MYNAM ": %s: sz_first=%d sz_last=%d sizeof(MPT_ADAPTER)=%d\n", -- ioc->name, sz_first, sz_last, (int)sizeof(MPT_ADAPTER))); -+ ioc->name, sz_first, sz_last, sizeof(MPT_ADAPTER))); - - if (ioc->alt_ioc) - ioc->alt_ioc->alt_ioc = NULL; -@@ -2521,17 +2393,12 @@ MakeIocReady(MPT_ADAPTER *ioc, int force - - /* Get current [raw] IOC state */ - ioc_state = mpt_GetIocState(ioc, 0); -- drsprintk((KERN_INFO MYNAM ": %s : MakeIocReady [raw] state=%08x\n", ioc->name, ioc_state)); -+ dhsprintk((KERN_INFO MYNAM "::MakeIocReady, %s [raw] state=%08x\n", ioc->name, ioc_state)); - - for ( ii = 0; ii < MPI_DIAG_BUF_TYPE_COUNT; ii++) { - ioc->DiagBuffer[ii] = NULL; - ioc->DiagBuffer_Status[ii] = 0; - } --if (ioc->bus_type == FC) { -- ioc->FcLinkSpeedCheckNeeded = 0; -- ioc->FcLinkSpeedReqActive = NULL; --} -- - - /* - * Check to see if IOC got left/stuck in doorbell handshake -@@ -2544,12 +2411,9 @@ if (ioc->bus_type == FC) { - } - - /* Is it already READY? */ -- if (!statefault && (ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_READY) { --drsprintk((KERN_INFO MYNAM ": %s : MakeIocReady ioc_state=%08x = READY\n", ioc->name, ioc_state)); -- /* Dont return for SAS IOCs */ -- if (ioc->bus_type != SAS) -- return 0; -- } -+ if (!statefault && (ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_READY) -+ return 0; -+ - /* - * Check to see if IOC is in FAULT state. - */ -@@ -2581,7 +2445,7 @@ drsprintk((KERN_INFO MYNAM ": %s : MakeI - return -4; - else { - if ((statefault == 0 ) && (force == 0)) { --if ((r = mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0) -+ if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0) - return 0; - } - statefault = 3; -@@ -2604,7 +2468,7 @@ if ((r = mpt_SendIocReset(ioc, MPI_FUNCT - * BIOS or previous driver load left IOC in OP state. - * Reset messaging FIFOs. - */ --if ((r = mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) != 0) { -+ if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) != 0) { - printk(MYIOC_s_ERR_FMT "IOC msg unit reset failed!\n", ioc->name); - return -2; - } -@@ -2613,7 +2477,7 @@ if ((r = mpt_SendIocReset(ioc, MPI_FUNCT - * Something is wrong. Try to get IOC back - * to a known state. - */ --if ((r = mpt_SendIocReset(ioc, MPI_FUNCTION_IO_UNIT_RESET, sleepFlag)) != 0) { -+ if ((r = SendIocReset(ioc, MPI_FUNCTION_IO_UNIT_RESET, sleepFlag)) != 0) { - printk(MYIOC_s_ERR_FMT "IO unit reset failed!\n", ioc->name); - return -3; - } -@@ -2629,7 +2493,7 @@ if ((r = mpt_SendIocReset(ioc, MPI_FUNCT - if (sleepFlag == CAN_SLEEP) - msleep_interruptible(1); - else -- MPT_MDELAY(1); /* 1 msec delay */ -+ MPT_MDELAY(1); /* 1 msec delay */ - - } - -@@ -2766,9 +2630,6 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF - facts->FWVersion.Word = le32_to_cpu(facts->FWVersion.Word); - - facts->ProductID = le16_to_cpu(facts->ProductID); -- if ((ioc->facts.ProductID & MPI_FW_HEADER_PID_PROD_MASK) -- > MPI_FW_HEADER_PID_PROD_TARGET_SCSI) -- ioc->ir_firmware = 1; - facts->CurrentHostMfaHighAddr = - le32_to_cpu(facts->CurrentHostMfaHighAddr); - facts->GlobalCredits = le16_to_cpu(facts->GlobalCredits); -@@ -2814,9 +2675,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF - dinitprintk((MYIOC_s_INFO_FMT "NB_for_64_byte_frame=%x NBShiftFactor=%x BlockSize=%x\n", - ioc->name, vv, shiftFactor, r)); - --/* Allow dead IOCs to get detected after FWDLB*/ -- if (reason == MPT_HOSTEVENT_IOC_BRINGUP ||mpt_enable_deadioc_detect) { -- -+ if (reason == MPT_HOSTEVENT_IOC_BRINGUP) { - /* - * Set values for this IOC's request & reply frame sizes, - * and request & reply queue depths... -@@ -2870,7 +2729,6 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn - int ii; - int req_sz; - int reply_sz; -- int max_id; - - /* IOC *must* NOT be in RESET state! */ - if (ioc->last_state == MPI_IOC_STATE_RESET) { -@@ -2913,31 +2771,6 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn - pfacts->IOCLogInfo = le32_to_cpu(pfacts->IOCLogInfo); - pfacts->MaxDevices = le16_to_cpu(pfacts->MaxDevices); - pfacts->PortSCSIID = le16_to_cpu(pfacts->PortSCSIID); -- -- switch (ioc->bus_type) { -- case SAS: -- max_id = pfacts->PortSCSIID; -- break; -- case FC: -- max_id = pfacts->MaxDevices; -- break; -- case SPI: -- default: -- max_id = MPT_MAX_SCSI_DEVICES; -- break; -- } -- -- ioc->DevicesPerBus = (max_id > 255) ? 256 : max_id; -- ioc->NumberOfBuses = (ioc->DevicesPerBus < 256) ? 1 : max_id/256; -- if ( ioc->NumberOfBuses > MPT_MAX_BUSES ) { -- dinitprintk((MYIOC_s_WARN_FMT "NumberOfBuses=%d > MPT_MAX_BUSES=%d\n", -- ioc->name, ioc->NumberOfBuses, MPT_MAX_BUSES)); -- ioc->NumberOfBuses = MPT_MAX_BUSES; -- } -- -- dinitprintk((MYIOC_s_WARN_FMT "Buses=%d MaxDevices=%d DevicesPerBus=%d\n", -- ioc->name, ioc->NumberOfBuses, max_id, ioc->DevicesPerBus)); -- - pfacts->ProtocolFlags = le16_to_cpu(pfacts->ProtocolFlags); - pfacts->MaxPostedCmdBuffers = le16_to_cpu(pfacts->MaxPostedCmdBuffers); - pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs); -@@ -2983,11 +2816,15 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepF - dinitprintk((MYIOC_s_INFO_FMT "upload_fw %d facts.Flags=%x\n", - ioc->name, ioc->upload_fw, ioc->facts.Flags)); - -- ioc_init.MaxDevices = ioc->DevicesPerBus; -- ioc_init.MaxBuses = ioc->NumberOfBuses; -- -- dinitprintk((MYIOC_s_INFO_FMT "ioc_init.MaxDevices=%d MaxBuses=%d\n", -- ioc->name, ioc_init.MaxDevices, ioc_init.MaxBuses)); -+ if(ioc->bus_type == SAS) -+ ioc_init.MaxDevices = ioc->facts.MaxDevices; -+ else if(ioc->bus_type == FC) -+ ioc_init.MaxDevices = MPT_MAX_FC_DEVICES; -+ else -+ ioc_init.MaxDevices = MPT_MAX_SCSI_DEVICES; -+ ioc_init.MaxBuses = MPT_MAX_BUS; -+ dinitprintk((MYIOC_s_INFO_FMT "ioc_init.MaxDevice=%d\n", -+ ioc->name, ioc_init.MaxDevices)); - dinitprintk((MYIOC_s_INFO_FMT "facts.MsgVersion=%x\n", - ioc->name, ioc->facts.MsgVersion)); - /* emoore@lsil.com : Host Page Buffer Suport, start */ -@@ -3110,7 +2947,9 @@ SendPortEnable(MPT_ADAPTER *ioc, int por - - /* RAID FW may take a long time to enable - */ -- if (ioc->ir_firmware || ioc->bus_type == SAS) { -+ if (((ioc->facts.ProductID & MPI_FW_HEADER_PID_PROD_MASK) -+ > MPI_FW_HEADER_PID_PROD_TARGET_SCSI) || -+ (ioc->bus_type == SAS)) { - rc = mpt_handshake_req_reply_wait(ioc, req_sz, - (u32*)&port_enable, reply_sz, (u16*)&reply_buf, - 300 /*seconds*/, sleepFlag); -@@ -3151,7 +2990,7 @@ mpt_free_fw_memory(MPT_ADAPTER *ioc) - int sz; - - sz = ioc->facts.FWImageSize; -- dinitprintk((KERN_INFO MYNAM ": free_fw_memory: FW Image @ %p[%p], sz=%d[%x] bytes\n", -+ dinitprintk((KERN_INFO MYNAM "free_fw_memory: FW Image @ %p[%p], sz=%d[%x] bytes\n", - ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz)); - pci_free_consistent(ioc->pcidev, sz, - ioc->cached_fw, ioc->cached_fw_dma); -@@ -3285,43 +3124,14 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw - u32 diag0val; - int count; - u32 *ptrFw; -- u32 diagRwData,doorbell; -+ u32 diagRwData; - u32 nextImage; - u32 load_addr; -+ u32 ioc_state=0; - --ddlprintk((MYIOC_s_WARN_FMT "downloadboot: pFwHeader=%p\n",ioc->name, pFwHeader)); -- nextImage = pFwHeader->NextImageHeaderOffset; -- if (ioc->bus_type == SAS) { -- while (nextImage) { -- if ( (pExtImage = (MpiExtImageHeader_t *) ((char *)pFwHeader + nextImage)) ) { -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SAS nextImage=%x pExtImage=%p ImageType=%x\n", -- ioc->name, nextImage, pExtImage, -- pExtImage->ImageType)); -- } else { -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SAS nextImage=%x pExtImage=%p is NULL!\n", -- ioc->name, nextImage, pExtImage)); -- return -EFAULT; -- } -- -- if ( pExtImage->ImageType == MPI_EXT_IMAGE_TYPE_BOOTLOADER ) { -- fwSize = (pExtImage->ImageSize + 3)/4; -- ptrFw = (u32 *) pExtImage; -- load_addr = pExtImage->LoadStartAddress; -- goto imageFound; -- } -- nextImage = pExtImage->NextImageHeaderOffset; -- } -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SAS BOOTLOADER not found\n", -- ioc->name)); -- /* Allow this image to be downloaded */ -- } -- fwSize = (pFwHeader->ImageSize + 3)/4; -- ptrFw = (u32 *) pFwHeader; -- load_addr = pFwHeader->LoadStartAddress; -+ ddlprintk((MYIOC_s_INFO_FMT "downloadboot: fw size 0x%x (%d), FW Ptr %p\n", -+ ioc->name, pFwHeader->ImageSize, pFwHeader->ImageSize, pFwHeader)); - --imageFound: -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot: fw size 0x%x (%d), FW Ptr %p load_addr=%x\n", -- ioc->name, fwSize, fwSize, ptrFw, load_addr)); - - CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); - CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE); -@@ -3345,7 +3155,7 @@ imageFound: - for (count = 0; count < 30; count ++) { - diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); - if (!(diag0val & MPI_DIAG_RESET_ADAPTER)) { -- ddlprintk((MYIOC_s_WARN_FMT "RESET_ADAPTER cleared, count=%d\n", -+ ddlprintk((MYIOC_s_INFO_FMT "RESET_ADAPTER cleared, count=%d\n", - ioc->name, count)); - break; - } -@@ -3357,7 +3167,7 @@ imageFound: - } - - if ( count == 30 ) { -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot failed! Unable to get MPI_DIAG_DRWE mode, diag0val=%x\n", -+ ddlprintk((MYIOC_s_INFO_FMT "downloadboot failed! Unable to get MPI_DIAG_DRWE mode, diag0val=%x\n", - ioc->name, diag0val)); - return -3; - } -@@ -3370,9 +3180,10 @@ imageFound: - CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE); - - /* Set the DiagRwEn and Disable ARM bits */ -+ CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM)); - -- diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); --CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM)); -+ fwSize = (pFwHeader->ImageSize + 3)/4; -+ ptrFw = (u32 *) pFwHeader; - - /* Write the LoadStartAddress to the DiagRw Address Register - * using Programmed IO -@@ -3380,28 +3191,26 @@ CHIPREG_WRITE32(&ioc->chip->Diagnostic, - if(ioc->errata_flag_1064) { - pci_enable_io_access(ioc->pcidev); - } --CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, load_addr); -+ CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->LoadStartAddress); -+ ddlprintk((MYIOC_s_INFO_FMT "LoadStart addr written 0x%x \n", -+ ioc->name, pFwHeader->LoadStartAddress)); - --ddlprintk((MYIOC_s_WARN_FMT "LoadStart addr written 0x%x \n",ioc->name, load_addr)); --ddlprintk((MYIOC_s_WARN_FMT "Write FW Image: 0x%x (%d) bytes @ %p\n", -- ioc->name, fwSize*4, fwSize*4, ptrFw)); -+ ddlprintk((MYIOC_s_INFO_FMT "Write FW Image: 0x%x (%d) bytes @ %p\n", -+ ioc->name, fwSize*4, fwSize*4, ptrFw)); - while (fwSize--) { - CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, *ptrFw++); - } - -- if (ioc->bus_type == SAS) { -- pFwHeader->IopResetVectorValue = load_addr + 0x18; -- } else { -- -- while (nextImage) { -- pExtImage = (MpiExtImageHeader_t *) ((char *)pFwHeader + nextImage); -+ nextImage = pFwHeader->NextImageHeaderOffset; -+ while (nextImage) { -+ pExtImage = (MpiExtImageHeader_t *) ((char *)pFwHeader + nextImage); - - load_addr = pExtImage->LoadStartAddress; - - fwSize = (pExtImage->ImageSize + 3) >> 2; - ptrFw = (u32 *)pExtImage; - -- ddlprintk((MYIOC_s_WARN_FMT "Write Ext Image: 0x%x (%d) bytes @ %p load_addr=%x\n", -+ ddlprintk((MYIOC_s_INFO_FMT "Write Ext Image: 0x%x (%d) bytes @ %p load_addr=%x\n", - ioc->name, fwSize*4, fwSize*4, ptrFw, load_addr)); - CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, load_addr); - -@@ -3411,18 +3220,20 @@ ddlprintk((MYIOC_s_WARN_FMT "Write FW Im - nextImage = pExtImage->NextImageHeaderOffset; - } - -- } - /* Write the IopResetVectorRegAddr */ -- ddlprintk((MYIOC_s_WARN_FMT "Write IopResetVector Addr=%x! \n", ioc->name, pFwHeader->IopResetRegAddr)); -+ ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Addr=%x! \n", ioc->name, pFwHeader->IopResetRegAddr)); - CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->IopResetRegAddr); - - /* Write the IopResetVectorValue */ -- ddlprintk((MYIOC_s_WARN_FMT "Write IopResetVector Value=%x! \n", ioc->name, pFwHeader->IopResetVectorValue)); -+ ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Value=%x! \n", ioc->name, pFwHeader->IopResetVectorValue)); - CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, pFwHeader->IopResetVectorValue); - -+ /* Clear the internal flash bad bit - autoincrementing register, -+ * so must do two writes. -+ */ - if (ioc->bus_type == SPI) { - /* -- * 1030 H/W errata, workaround to access -+ * 1030 and 1035 H/W errata, workaround to access - * the ClearFlashBadSignatureBit - */ - CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000); -@@ -3431,6 +3242,16 @@ ddlprintk((MYIOC_s_WARN_FMT "Write FW Im - CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000); - CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, diagRwData); - -+ } else /* if((ioc->bus_type == SAS) || (ioc->bus_type == FC)) */ { -+ diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); -+ CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | -+ MPI_DIAG_CLEAR_FLASH_BAD_SIG); -+ -+ /* wait 1 msec */ -+ if (sleepFlag == CAN_SLEEP) -+ msleep_interruptible(1); -+ else -+ MPT_MDELAY(1); - } - - if(ioc->errata_flag_1064) { -@@ -3438,77 +3259,48 @@ ddlprintk((MYIOC_s_WARN_FMT "Write FW Im - } - - diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot diag0val=%x, turning off PREVENT_IOC_BOOT, DISABLE_ARM, RW_ENABLE\n", -+ ddlprintk((MYIOC_s_INFO_FMT "downloadboot diag0val=%x, turning off PREVENT_IOC_BOOT, DISABLE_ARM, RW_ENABLE\n", - ioc->name, diag0val)); -- --diag0val &= ~(MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM); --ddlprintk((MYIOC_s_WARN_FMT "downloadboot: now diag0val=%x\n", -+ diag0val &= ~(MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM | MPI_DIAG_RW_ENABLE); -+ ddlprintk((MYIOC_s_INFO_FMT "downloadboot now diag0val=%x\n", - ioc->name, diag0val)); - CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); - --if (ioc->bus_type == SAS ) { --/* wait 1 sec */ --if (sleepFlag == CAN_SLEEP) --{ --msleep_interruptible(1000); -- --} --else --MPT_MDELAY(1000); -- -- -- -+ /* Write 0xFF to reset the sequencer */ -+ CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); - --diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); --ddlprintk((MYIOC_s_WARN_FMT "downloadboot: diag0val=%x, turning off RW_ENABLE\n" -- ioc->name, diag0val)); --diag0val &= ~(MPI_DIAG_RW_ENABLE); --ddlprintk((MYIOC_s_WARN_FMT "downloadboot: now diag0val=%x\n", -- ioc->name, diag0val)); --CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); --diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); --if (diag0val & MPI_DIAG_FLASH_BAD_SIG) { --diag0val |= MPI_DIAG_CLEAR_FLASH_BAD_SIG; --CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); --diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); -+ if (ioc->bus_type == SAS) { -+ ioc_state = mpt_GetIocState(ioc, 0); -+ if ( (GetIocFacts(ioc, sleepFlag, -+ MPT_HOSTEVENT_IOC_BRINGUP)) != 0 ) { -+ ddlprintk((MYIOC_s_INFO_FMT "GetIocFacts failed: IocState=%x\n", -+ ioc->name, ioc_state)); -+ return -EFAULT; - } --diag0val &= ~(MPI_DIAG_DISABLE_ARM); --CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); --diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); --CHIPREG_WRITE32(&ioc->chip->DiagRwAddress, 0x3f000004); - } --/* Write 0xFF to reset the sequencer */ --CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); -- -- for (count = 0; count < 30; count ++) { -- doorbell = CHIPREG_READ32(&ioc->chip->Doorbell); -- doorbell &= MPI_IOC_STATE_MASK; -- -- if (doorbell == MPI_IOC_STATE_READY) { - -+ for (count=0; count<HZ*20; count++) { -+ if ((ioc_state = mpt_GetIocState(ioc, 0)) & MPI_IOC_STATE_READY) { -+ ddlprintk((MYIOC_s_INFO_FMT "downloadboot successful! (count=%d) IocState=%x\n", -+ ioc->name, count, ioc_state)); - if (ioc->bus_type == SAS) { - return 0; - } -- -- -- if ((SendIocInit(ioc, sleepFlag)) != 0) { -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SendIocInit failed\n", -+ if ((SendIocInit(ioc, sleepFlag)) != 0) { -+ ddlprintk((MYIOC_s_INFO_FMT "downloadboot: SendIocInit failed\n", - ioc->name)); - return -EFAULT; - } -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SendIocInit successful\n", -+ ddlprintk((MYIOC_s_INFO_FMT "downloadboot: SendIocInit successful\n", - ioc->name)); - return 0; - } -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot: looking for READY STATE:doorbell=%x count=%d\n",ioc->name, doorbell, count)); -- /* wait 1 sec */ -- - if (sleepFlag == CAN_SLEEP) -- msleep_interruptible(1000); -+ msleep_interruptible(10); - else -- MPT_MDELAY(1000); -+ MPT_MDELAY(10); - } -- ddlprintk((MYIOC_s_WARN_FMT "downloadboot failed! IocState=%x\n", -+ ddlprintk((MYIOC_s_INFO_FMT "downloadboot failed! IocState=%x\n", - ioc->name, ioc_state)); - return -EFAULT; - } -@@ -3552,7 +3344,8 @@ KickStart(MPT_ADAPTER *ioc, int force, i - /* Always issue a Msg Unit Reset first. This will clear some - * SCSI bus hang conditions. - */ -- mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag); -+ SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag); -+ - if (sleepFlag == CAN_SLEEP) - msleep_interruptible(1000); - else -@@ -3624,26 +3417,6 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign - msleep_interruptible(1); - else - MPT_MDELAY(1); --/* -- * Call each currently registered protocol IOC reset handler -- * with post-reset indication. -- * NOTE: If we're doing _IOC_BRINGUP, there can be no -- * MptResetHandlers[] registered yet. -- */ -- { -- int ii; -- int r=0; -- -- for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) { -- if (MptResetHandlers[ii]) { -- drsprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n",ioc->name, ii)); -- r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); -- -- } --} --/* FIXME? Examine results here? */ -- --} - - for (count = 0; count < 60; count ++) { - doorbell = CHIPREG_READ32(&ioc->chip->Doorbell); -@@ -3746,11 +3519,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign - - for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) { - if (MptResetHandlers[ii]) { -- drsprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", -+ dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", - ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET); - if (ioc->alt_ioc) { -- drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", -+ dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", - ioc->name, ioc->alt_ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET); - } -@@ -3901,31 +3674,18 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign - * - * Returns 0 for success, non-zero for failure. - */ --int --mpt_SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag) -+static int -+SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag) - { -- unsigned long flags; - int r; -- u32 state, Doorbell; -+ u32 state; - int cntdn, count; - --Doorbell = (reset_type<<MPI_DOORBELL_FUNCTION_SHIFT); -- --drsprintk((MYIOC_s_WARN_FMT ": %s: reset_type=%02x Doorbell=%08x!\n", --ioc->name, __FUNCTION__, reset_type, Doorbell)); --CHIPREG_WRITE32(&ioc->chip->Doorbell, Doorbell); -- --if ((r = WaitForDoorbellAck(ioc, 15, sleepFlag)) < 0){ -- drsprintk((MYIOC_s_WARN_FMT ": %s: WaitForDoorbellAck failed r=%d after IOC Rese --t type=%02x!\n", -- ioc->name, __FUNCTION__, r, reset_type)); -- return r; --} -- --spin_lock_irqsave(&ioc->diagLock, flags); --ioc->IOCResetInProgress = 1; --spin_unlock_irqrestore(&ioc->diagLock, flags); -- -+ drsprintk((KERN_INFO MYNAM ": %s: Sending IOC reset(0x%02x)!\n", -+ ioc->name, reset_type)); -+ CHIPREG_WRITE32(&ioc->chip->Doorbell, reset_type<<MPI_DOORBELL_FUNCTION_SHIFT); -+ if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) -+ return r; - - /* FW ACK'd request, wait for READY state - */ -@@ -3950,13 +3710,13 @@ spin_unlock_irqrestore(&ioc->diagLock, f - MPT_MDELAY(1); /* 1 msec delay */ - } - -+ /* TODO! -+ * Cleanup all event stuff for this IOC; re-issue EventNotification -+ * request if needed. -+ */ - if (ioc->facts.Function) - ioc->facts.EventState = 0; --spin_lock_irqsave(&ioc->diagLock, flags); --ioc->IOCResetInProgress = 0; --spin_unlock_irqrestore(&ioc->diagLock, flags); --drsprintk((MYIOC_s_WARN_FMT ": %s: IOC reset completed successfully state=%08x count=%d\ n", --ioc->name, __FUNCTION__, state, count)); -+ - return 0; - } - -@@ -4044,9 +3804,8 @@ PrimeIocFifos(MPT_ADAPTER *ioc) - unsigned long flags; - dma_addr_t alloc_dma; - u8 *mem; -- int i, reply_sz, req_sz, sz, total_size, num_chain, total_num_chain; -- int scale, scale1, num_sge, numSGE, maxSGEs, SGE_size; -- int max_sg_tablesize; -+ int i, reply_sz, sz, total_size, num_chain, total_num_chain; -+ int scale, scale1, num_sge, numSGE, maxSGEs, SGE_size; - - /* Prime reply FIFO... */ - -@@ -4073,13 +3832,12 @@ PrimeIocFifos(MPT_ADAPTER *ioc) - " numSGE=%d MaxChainDepth=%d maxSGEs=%d mpt_sg_tablesize=%d\n", - ioc->name, ioc->req_sz, SGE_size, scale, num_sge, numSGE, - ioc->facts.MaxChainDepth, maxSGEs, mpt_sg_tablesize)); -- max_sg_tablesize = mpt_sg_tablesize; -- if (max_sg_tablesize > maxSGEs) { -- max_sg_tablesize = maxSGEs; -- dinitprintk((KERN_INFO MYNAM ": %s max_sg_tablesize=%d now\n", -- ioc->name, max_sg_tablesize)); -- } else if (max_sg_tablesize < maxSGEs) { -- numSGE = max_sg_tablesize - num_sge; -+ if (mpt_sg_tablesize > maxSGEs) { -+ mpt_sg_tablesize = maxSGEs; -+ dinitprintk((KERN_INFO MYNAM ": %s mpt_sg_tablesize=%d now\n", -+ ioc->name, mpt_sg_tablesize)); -+ } else if (mpt_sg_tablesize < maxSGEs) { -+ numSGE = mpt_sg_tablesize - num_sge; - dinitprintk((KERN_INFO MYNAM ": %s numSGE=%d now\n", - ioc->name, numSGE)); - } -@@ -4099,12 +3857,11 @@ PrimeIocFifos(MPT_ADAPTER *ioc) - - numSGE = scale1 * (total_num_chain-1); - maxSGEs = num_sge + numSGE; -- if (max_sg_tablesize > maxSGEs) { -- max_sg_tablesize = maxSGEs; -- dinitprintk((KERN_INFO MYNAM ": %s max_sg_tablesize=%d now, maxSGEs=%d numSGE=%d\n", -- ioc->name, max_sg_tablesize, maxSGEs, numSGE)); -+ if (mpt_sg_tablesize > maxSGEs) { -+ mpt_sg_tablesize = maxSGEs; -+ dinitprintk((KERN_INFO MYNAM ": %s mpt_sg_tablesize=%d now, maxSGEs=%d numSGE=%d\n", -+ ioc->name, mpt_sg_tablesize, maxSGEs, numSGE)); - } -- ioc->sg_tablesize = max_sg_tablesize; - - dinitprintk((KERN_INFO MYNAM ": %s req_depth=%d max num_chain=%d mpt_chain_alloc_percent=%d total_num_chain=%d\n", - ioc->name, ioc->req_depth, num_chain, mpt_chain_alloc_percent, total_num_chain)); -@@ -4116,17 +3873,14 @@ PrimeIocFifos(MPT_ADAPTER *ioc) - dinitprintk((KERN_INFO MYNAM ": %s Total ReplyBuffer sz=%d[%x] bytes\n", - ioc->name, reply_sz, reply_sz)); - -- req_sz = ioc->req_sz; -- sz = (req_sz * ioc->req_depth); -- -- dinitprintk((KERN_INFO MYNAM ": %s RequestBuffer sz=%d bytes, RequestDepth=%d\n", -- ioc->name, req_sz, ioc->req_depth)); -- -+ sz = (ioc->req_sz * ioc->req_depth); -+ dinitprintk((KERN_INFO MYNAM ": %s RequestBuffer sz=%d bytes, RequestDepth=%d\n", -+ ioc->name, ioc->req_sz, ioc->req_depth)); - dinitprintk((KERN_INFO MYNAM ": %s Total RequestBuffer sz=%d[%x] bytes\n", - ioc->name, sz, sz)); - total_size += sz; - -- sz = total_num_chain *req_sz; /* chain buffer pool size */ -+ sz = total_num_chain * ioc->req_sz; /* chain buffer pool size */ - dinitprintk((KERN_INFO MYNAM ": %s Total ChainBuffer sz=%d[%x] bytes total_num_chain=%d\n", - ioc->name, sz, sz, total_num_chain)); - -@@ -4182,14 +3936,14 @@ PrimeIocFifos(MPT_ADAPTER *ioc) - #endif - - for (i = 0; i < ioc->req_depth; i++) { -- alloc_dma += req_sz; -- mem += req_sz; -+ alloc_dma += ioc->req_sz; -+ mem += ioc->req_sz; - } - - ioc->ChainBuffer = mem; - ioc->ChainBufferDMA = alloc_dma; - -- dinitprintk((KERN_INFO MYNAM ": %s ChainBuffers @ %p(%p)\n", -+ dinitprintk((KERN_INFO MYNAM " :%s ChainBuffers @ %p(%p)\n", - ioc->name, ioc->ChainBuffer, (void *)(ulong)ioc->ChainBufferDMA)); - - /* Initialize the free chain Q. -@@ -4197,6 +3951,10 @@ PrimeIocFifos(MPT_ADAPTER *ioc) - - INIT_LIST_HEAD(&ioc->FreeChainQ); - -+ /* initialize the SAS device list */ -+ -+ INIT_LIST_HEAD(&ioc->sasDeviceList); -+ - /* Post the chain buffers to the FreeChainQ. - */ - mem = (u8 *)ioc->ChainBuffer; -@@ -4205,7 +3963,7 @@ PrimeIocFifos(MPT_ADAPTER *ioc) - list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeChainQ); - // dinitprintk((MYIOC_s_INFO_FMT "Adding %p to FreeChainQ at %d\n", - // ioc->name, mf, i)); -- mem += req_sz; -+ mem += ioc->req_sz; - } - - /* Initialize Request frames linked list -@@ -4220,7 +3978,7 @@ PrimeIocFifos(MPT_ADAPTER *ioc) - - /* Queue REQUESTs *internally*! */ - list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeQ); -- mem += req_sz; -+ mem += ioc->req_sz; - } - spin_unlock_irqrestore(&ioc->FreeQlock, flags); - -@@ -4293,7 +4051,8 @@ out_fail: - * - * Returns 0 for success, non-zero for failure. - */ --int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, u32 *req, -+static int -+mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, u32 *req, - int replyBytes, u16 *u16reply, int maxwait, int sleepFlag) - { - MPIDefaultReply_t *mptReply; -@@ -4412,7 +4171,7 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int - intstat = CHIPREG_READ32(&ioc->chip->IntStatus); - if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) - break; -- msleep_interruptible(10); -+ msleep_interruptible(1); - count++; - } - } else { -@@ -4420,7 +4179,7 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int - intstat = CHIPREG_READ32(&ioc->chip->IntStatus); - if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) - break; -- udelay(1000); -+ MPT_MDELAY(1); - count++; - } - } -@@ -4461,7 +4220,7 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int - intstat = CHIPREG_READ32(&ioc->chip->IntStatus); - if (intstat & MPI_HIS_DOORBELL_INTERRUPT) - break; -- msleep_interruptible(10); -+ msleep_interruptible(1); - count++; - } - } else { -@@ -4469,7 +4228,7 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int - intstat = CHIPREG_READ32(&ioc->chip->IntStatus); - if (intstat & MPI_HIS_DOORBELL_INTERRUPT) - break; -- udelay(1000); -+ MPT_MDELAY(1); - count++; - } - } -@@ -4944,40 +4703,481 @@ GetManufPage0_exit: - return rc; - } - -+ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* -- * mptbase_sas_persist_operation - Perform operation on SAS Persitent Table -+ * mpt_sas_get_info - Fetch Hw Max and Min Link Rates. These values -+ * get overwritten, so must be saved at init time. - * @ioc: Pointer to MPT_ADAPTER structure -- * @sas_address: 64bit SAS Address for operation. -- * @target_id: specified target for operation -- * @bus: specified bus for operation -- * @persist_opcode: see below -- * -- * MPI_SAS_OP_CLEAR_NOT_PRESENT - Free all persist TargetID mappings for -- * devices not currently present. -- * MPI_SAS_OP_CLEAR_ALL_PERSISTENT - Clear al persist TargetID mappings -- * -- * NOTE: Don't use not this function during interrupt time. -+ * @numPorts: number of ports for this IOC - * -- * Returns: 0 for success, non-zero error -+ * Return: 0 for success -+ * -ENOMEM if no memory available -+ * -EPERM if not allowed due to ISR context -+ * -EAGAIN if no msg frames currently available -+ * -EFAULT for non-successful reply or no reply (timeout) - */ -- --/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - int --mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode) -+mpt_sas_get_info(MPT_ADAPTER *ioc) - { -- SasIoUnitControlRequest_t *sasIoUnitCntrReq; -- SasIoUnitControlReply_t *sasIoUnitCntrReply; -- MPT_FRAME_HDR *mf = NULL; -- MPIHeader_t *mpi_hdr; -+ ConfigExtendedPageHeader_t hdr; -+ CONFIGPARMS cfg; -+ SasIOUnitPage0_t *sasIoUnitPg0=NULL; -+ dma_addr_t sasIoUnitPg0_dma; -+ SasPhyPage0_t *sasPhyPg0=NULL; -+ dma_addr_t sasPhyPg0_dma; -+ SasDevicePage0_t *sasDevicePg0=NULL; -+ dma_addr_t sasDevicePg0_dma; -+ sas_device_info_t *sasDevice; -+ u32 devHandle; -+ int sasIoUnitPg0_data_sz=0; -+ int sasPhyPg0_data_sz=0; -+ int sasDevicePg0_data_sz=0; -+ int sz; -+ int rc; -+ int ii; -+ int phyCounter; -+ u8 *mem; -+ u64 SASAddress64; -+ char *ds = NULL; - -+ /* Issue a config request to get the number of phys -+ */ -+ ioc->sasPhyInfo=NULL; - -- /* insure garbage is not sent to fw */ -- switch(persist_opcode) { -+ hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; - -- case MPI_SAS_OP_CLEAR_NOT_PRESENT: -- case MPI_SAS_OP_CLEAR_ALL_PERSISTENT: -- break; -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.pageAddr = 0; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = 10; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ goto mpt_sas_get_info_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ rc = -EFAULT; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4; -+ sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev, -+ sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma); -+ if (!sasIoUnitPg0) { -+ rc = -ENOMEM; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz); -+ cfg.physAddr = sasIoUnitPg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ goto mpt_sas_get_info_exit; -+ } -+ -+ /* save the data */ -+ ioc->numPhys = sasIoUnitPg0->NumPhys; -+ -+ dsasprintk((MYIOC_s_INFO_FMT "Number of PHYS=%d\n", -+ ioc->name, sasIoUnitPg0->NumPhys)); -+ -+ sz = ioc->numPhys * sizeof (sas_phy_info_t); -+ -+ if ((mem = kmalloc(sz, GFP_ATOMIC)) == NULL) { -+ rc = -ENOMEM; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ memset(mem, 0, sz); -+ ioc->alloc_total += sz; -+ ioc->sasPhyInfo = (sas_phy_info_t *) mem; -+ -+ /* Issue a config request to get phy information. */ -+ hdr.PageVersion = MPI_SASPHY0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = 10; -+ -+ /* Fill in information for each phy. */ -+ for (ii = 0; ii < ioc->numPhys; ii++) { -+ -+ /* Get Phy Pg 0 for each Phy. */ -+ cfg.pageAddr = ii; -+ cfg.physAddr = -1; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ goto mpt_sas_get_info_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ rc = -EFAULT; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ sasPhyPg0_data_sz = hdr.ExtPageLength * 4; -+ sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent( -+ ioc->pcidev, sasPhyPg0_data_sz, &sasPhyPg0_dma); -+ if (!sasPhyPg0) { -+ rc = -ENOMEM; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz); -+ cfg.physAddr = sasPhyPg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ -+ /* Save HwLinkRate. -+ * It may be modified accidently via FW -+ */ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ goto mpt_sas_get_info_exit; -+ } -+ -+ ioc->sasPhyInfo[ii].hwLinkRate = sasPhyPg0->HwLinkRate; -+ ioc->sasPhyInfo[ii].phyId = ii; -+ ioc->sasPhyInfo[ii].port = sasIoUnitPg0->PhyData[ii].Port; -+ ioc->sasPhyInfo[ii].ControllerDevHandle = -+ le16_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerDevHandle); -+ ioc->sasPhyInfo[ii].PortFlags = -+ sasIoUnitPg0->PhyData[ii].PortFlags; -+ ioc->sasPhyInfo[ii].PhyFlags = -+ sasIoUnitPg0->PhyData[ii].PhyFlags; -+ ioc->sasPhyInfo[ii].NegotiatedLinkRate = -+ sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate; -+ ioc->sasPhyInfo[ii].ControllerPhyDeviceInfo = -+ le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo); -+ -+ memcpy(&SASAddress64,&sasPhyPg0->SASAddress,sizeof(sasPhyPg0->SASAddress)); -+ le64_to_cpus(&SASAddress64); -+ if (SASAddress64) { -+ dsasprintk(("---- SAS PHY PAGE 0 ------------\n")); -+ dsasprintk(("Handle=0x%X\n", -+ le16_to_cpu(sasPhyPg0->AttachedDevHandle))); -+ dsasprintk(("SAS Address=0x%llX\n",SASAddress64)); -+ dsasprintk(("Attached PHY Identifier=0x%X\n", -+ sasPhyPg0->AttachedPhyIdentifier)); -+ dsasprintk(("Attached Device Info=0x%X\n", -+ le32_to_cpu(sasPhyPg0->AttachedDeviceInfo))); -+ dsasprintk(("Programmed Link Rate=0x%X\n", -+ sasPhyPg0->ProgrammedLinkRate)); -+ dsasprintk(("Hardware Link Rate=0x%X\n", -+ ioc->sasPhyInfo[ii].hwLinkRate)); -+ dsasprintk(("Change Count=0x%X\n", -+ sasPhyPg0->ChangeCount)); -+ dsasprintk(("PHY Info=0x%X\n", -+ le32_to_cpu(sasPhyPg0->PhyInfo))); -+ dsasprintk(("\n")); -+ } -+ -+ pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz, -+ (u8 *) sasPhyPg0, sasPhyPg0_dma); -+ -+ sasPhyPg0=NULL; -+ } -+ -+ -+ /* Get all Device info and store in linked list. */ -+ devHandle = 0xFFFF; -+ phyCounter=0; -+ while(1) { -+ /* Get SAS device page 0 */ -+ -+ hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION; -+ hdr.ExtPageLength = 0; -+ hdr.PageNumber = 0; -+ hdr.Reserved1 = 0; -+ hdr.Reserved2 = 0; -+ hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -+ hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE; -+ -+ cfg.cfghdr.ehdr = &hdr; -+ cfg.physAddr = -1; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -+ cfg.dir = 0; /* read */ -+ cfg.timeout = 10; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ goto mpt_sas_get_info_exit; -+ } -+ -+ if (hdr.ExtPageLength == 0) { -+ rc = -EFAULT; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ sasDevicePg0_data_sz = hdr.ExtPageLength * 4; -+ sasDevicePg0 = (SasDevicePage0_t *) pci_alloc_consistent( -+ ioc->pcidev, sasDevicePg0_data_sz, &sasDevicePg0_dma); -+ if (!sasDevicePg0) { -+ rc = -ENOMEM; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ memset((u8 *)sasDevicePg0, 0, sasDevicePg0_data_sz); -+ cfg.physAddr = sasDevicePg0_dma; -+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -+ cfg.pageAddr = devHandle; -+ -+ if ((rc = mpt_config(ioc, &cfg)) != 0) { -+ -+ /* -+ * break from the while loop when this fails -+ * which means we have discovered all devices -+ */ -+ rc=0; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ dsasprintk(("---- SAS DEVICE PAGE 0 ---------\n")); -+ dsasprintk(("Handle=0x%X\n",le16_to_cpu(sasDevicePg0->DevHandle))); -+ dsasprintk(("Enclosure Handle=0x%X\n",le16_to_cpu(sasDevicePg0->EnclosureHandle))); -+ dsasprintk(("Slot=0x%X\n",le16_to_cpu(sasDevicePg0->Slot))); -+ memcpy(&SASAddress64,&sasDevicePg0->SASAddress,sizeof(sasDevicePg0->SASAddress)); -+ le64_to_cpus(&SASAddress64); -+ dsasprintk(("SAS Address=0x%llX\n",SASAddress64)); -+ dsasprintk(("Target ID=0x%X\n",sasDevicePg0->TargetID)); -+ dsasprintk(("Bus=0x%X\n",sasDevicePg0->Bus)); -+ dsasprintk(("PhyNum=0x%X\n",sasDevicePg0->PhyNum)); -+ dsasprintk(("AccessStatus=0x%X\n",le16_to_cpu(sasDevicePg0->AccessStatus))); -+ dsasprintk(("Device Info=0x%X\n",le32_to_cpu(sasDevicePg0->DeviceInfo))); -+ dsasprintk(("Flags=0x%X\n",le16_to_cpu(sasDevicePg0->Flags))); -+ dsasprintk(("Physical Port=0x%X\n",sasDevicePg0->PhysicalPort)); -+ dsasprintk(("\n")); -+ -+ if(phyCounter < ioc->numPhys) { -+ ioc->sasPhyInfo[phyCounter].SASAddress = SASAddress64; -+ ioc->sasPhyInfo[phyCounter].devHandle = -+ le16_to_cpu(sasDevicePg0->DevHandle); -+ phyCounter++; -+ }else { -+ if (le32_to_cpu(sasDevicePg0->DeviceInfo) & -+ (MPI_SAS_DEVICE_INFO_SSP_TARGET | -+ MPI_SAS_DEVICE_INFO_STP_TARGET | -+ MPI_SAS_DEVICE_INFO_SATA_DEVICE )) { -+ -+ if ((sasDevice = kmalloc(sizeof (sas_device_info_t), -+ GFP_ATOMIC)) == NULL) { -+ rc = -ENOMEM; -+ goto mpt_sas_get_info_exit; -+ } -+ -+ memset(sasDevice, 0, sizeof (sas_device_info_t)); -+ ioc->alloc_total += sizeof (sas_device_info_t); -+ list_add_tail(&sasDevice->list, &ioc->sasDeviceList); -+ sasDevice->SASAddress = SASAddress64; -+ sasDevice->TargetId = sasDevicePg0->TargetID; -+ sasDevice->Bus = sasDevicePg0->Bus; -+ sasDevice->DeviceInfo = -+ le32_to_cpu(sasDevicePg0->DeviceInfo); -+ sasDevice->DevHandle = -+ le16_to_cpu(sasDevicePg0->DevHandle); -+ sasDevice->Flags = -+ le16_to_cpu(sasDevicePg0->Flags); -+ sasDevice->PhyNum = sasDevicePg0->PhyNum; -+ sasDevice->PhysicalPort = -+ sasDevicePg0->PhysicalPort; -+ if(sasDevice->DeviceInfo & -+ MPI_SAS_DEVICE_INFO_SSP_TARGET) -+ ds = "sas"; -+ if(sasDevice->DeviceInfo & -+ MPI_SAS_DEVICE_INFO_STP_TARGET) -+ ds = "stp"; -+ if(sasDevice->DeviceInfo & -+ MPI_SAS_DEVICE_INFO_SATA_DEVICE) -+ ds = "sata"; -+ dsasprintk(( -+ "Inserting %s device, channel %d, id %d, phy %d\n\n", -+ ds,sasDevice->Bus, -+ sasDevice->TargetId, -+ sasDevicePg0->PhyNum)); -+ } -+ } -+ -+ devHandle = (MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE -+ << MPI_SAS_DEVICE_PGAD_FORM_SHIFT) | -+ le16_to_cpu(sasDevicePg0->DevHandle); -+ -+ pci_free_consistent(ioc->pcidev, sasDevicePg0_data_sz, -+ (u8 *) sasDevicePg0, sasDevicePg0_dma); -+ -+ sasDevicePg0=NULL; -+ -+ }; -+ -+mpt_sas_get_info_exit: -+ -+ -+ if (sasPhyPg0) -+ pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz, -+ (u8 *) sasPhyPg0, sasPhyPg0_dma); -+ -+ if (sasIoUnitPg0) -+ pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz, -+ (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma); -+ -+ if (sasDevicePg0) -+ pci_free_consistent(ioc->pcidev, sasDevicePg0_data_sz, -+ (u8 *) sasDevicePg0, sasDevicePg0_dma); -+ -+ return rc; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+ -+static void -+mptbase_sas_process_event_data(MPT_ADAPTER *ioc, -+ MpiEventDataSasDeviceStatusChange_t * pSasEventData) -+{ -+ sas_device_info_t *sasDevice; -+ int ii; -+ char *ds=NULL; -+ -+ switch(pSasEventData->ReasonCode) { -+ case MPI_EVENT_SAS_DEV_STAT_RC_ADDED: -+ -+ // sanity check so we are not adding a target that is already in the list. -+ list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) { -+ if (pSasEventData->TargetID == -+ sasDevice->TargetId) -+ return; -+ break; -+ } -+ -+ if ((le32_to_cpu(pSasEventData->DeviceInfo) & -+ (MPI_SAS_DEVICE_INFO_SSP_TARGET | -+ MPI_SAS_DEVICE_INFO_STP_TARGET | -+ MPI_SAS_DEVICE_INFO_SATA_DEVICE )) == 0) { -+ break; -+ } -+ -+ if ((sasDevice = kmalloc(sizeof (sas_device_info_t), -+ GFP_ATOMIC)) == NULL) { -+ break; -+ } -+ -+ memset(sasDevice, 0, sizeof (sas_device_info_t)); -+ list_add_tail(&sasDevice->list, &ioc->sasDeviceList); -+ ioc->alloc_total += sizeof (sas_device_info_t); -+ -+ memcpy(&sasDevice->SASAddress,&pSasEventData->SASAddress,sizeof(u64)); -+ le64_to_cpus(&sasDevice->SASAddress); -+ sasDevice->TargetId = pSasEventData->TargetID; -+ sasDevice->Bus = pSasEventData->Bus; -+ sasDevice->DeviceInfo = -+ le32_to_cpu(pSasEventData->DeviceInfo); -+ sasDevice->DevHandle = -+ le16_to_cpu(pSasEventData->DevHandle); -+ sasDevice->PhyNum = pSasEventData->PhyNum; -+ pSasEventData->ParentDevHandle = -+ le16_to_cpu(pSasEventData->ParentDevHandle); -+ -+ for(ii=0;ii<ioc->numPhys;ii++) { -+ if(pSasEventData->ParentDevHandle == -+ ioc->sasPhyInfo[ii].ControllerDevHandle) { -+ sasDevice->PhysicalPort = -+ ioc->sasPhyInfo[ii].port; -+ } -+ } -+ -+ if(sasDevice->DeviceInfo & -+ MPI_SAS_DEVICE_INFO_SSP_TARGET) -+ ds = "sas"; -+ if(sasDevice->DeviceInfo & -+ MPI_SAS_DEVICE_INFO_STP_TARGET) -+ ds = "stp"; -+ if(sasDevice->DeviceInfo & -+ MPI_SAS_DEVICE_INFO_SATA_DEVICE) -+ ds = "sata"; -+ dsasprintk(( -+ "Inserting %s device, channel %d, id %d, phy %d\n\n", -+ ds,sasDevice->Bus, -+ sasDevice->TargetId, -+ sasDevice->PhyNum)); -+ dsasprintk(("SAS Address=0x%llX\n",sasDevice->SASAddress)); -+ dsasprintk(("Device Info=0x%X\n",sasDevice->DeviceInfo)); -+ dsasprintk(("Physical Port=0x%X\n",sasDevice->PhysicalPort)); -+ dsasprintk(("\n")); -+ -+ break; -+ -+ case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING: -+ -+ list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) { -+ -+ if (le16_to_cpu(pSasEventData->DevHandle) == -+ sasDevice->DevHandle) { -+ -+ dsasprintk(("Removing device from link list!!!\n\n")); -+ list_del(&sasDevice->list); -+ kfree(sasDevice); -+ ioc->alloc_total -= sizeof (sas_device_info_t); -+ break; -+ } -+ } -+ break; -+ -+ case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA: -+ case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED: -+ case MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED: -+ default: -+ break; -+ } -+ -+ -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* -+ * mptbase_sas_persist_operation - Perform operation on SAS Persitent Table -+ * @ioc: Pointer to MPT_ADAPTER structure -+ * @sas_address: 64bit SAS Address for operation. -+ * @target_id: specified target for operation -+ * @bus: specified bus for operation -+ * @persist_opcode: see below -+ * -+ * MPI_SAS_OP_CLEAR_NOT_PRESENT - Free all persist TargetID mappings for -+ * devices not currently present. -+ * MPI_SAS_OP_CLEAR_ALL_PERSISTENT - Clear al persist TargetID mappings -+ * -+ * NOTE: Don't use not this function during interrupt time. -+ * -+ * Returns: 0 for success, non-zero error -+ */ -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+int -+mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode) -+{ -+ SasIoUnitControlRequest_t *sasIoUnitCntrReq; -+ SasIoUnitControlReply_t *sasIoUnitCntrReply; -+ MPT_FRAME_HDR *mf = NULL; -+ MPIHeader_t *mpi_hdr; -+ -+ -+ /* insure garbage is not sent to fw */ -+ switch(persist_opcode) { -+ -+ case MPI_SAS_OP_CLEAR_NOT_PRESENT: -+ case MPI_SAS_OP_CLEAR_ALL_PERSISTENT: -+ break; - - default: - return -1; -@@ -4992,7 +5192,7 @@ mptbase_sas_persist_operation(MPT_ADAPTE - dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n", - ioc->name,__FUNCTION__)); - return -1; -- } -+ } - - mpi_hdr = (MPIHeader_t *) mf; - sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf; -@@ -5303,7 +5503,7 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc - - if ( (pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_QAS) == 0 ) { - ioc->spi_data.noQas |= MPT_TARGET_NO_NEGO_QAS; -- ddvprintk((KERN_INFO MYNAM ": %s noQas due to Capabilities=%x\n", -+ ddvprintk((KERN_INFO MYNAM " :%s noQas due to Capabilities=%x\n", - ioc->name, pPP0->Capabilities)); - } - ioc->spi_data.maxBusWidth = pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_WIDE ? 1 : 0; -@@ -5452,188 +5652,6 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTE - return 0; - } - --/** -- * mpt_raid_phys_disk_pg0 - returns phys disk page zero -- * @ioc: Pointer to a Adapter Structure -- * @phys_disk_num: io unit unique phys disk num generated by the ioc -- * @phys_disk: requested payload data returned -- * -- * Return: -- * 0 on success -- * -EFAULT if read of config page header fails or data pointer not NULL -- * -ENOMEM if pci_alloc failed -- **/ --int --mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk) --{ -- CONFIGPARMS cfg; -- ConfigPageHeader_t hdr; -- dma_addr_t dma_handle; -- pRaidPhysDiskPage0_t buffer = NULL; -- int rc; -- -- memset(&cfg, 0 , sizeof(CONFIGPARMS)); -- memset(&hdr, 0 , sizeof(ConfigPageHeader_t)); -- -- hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK; -- cfg.cfghdr.hdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- -- if (mpt_config(ioc, &cfg) != 0) { -- rc = -EFAULT; -- goto out; -- } -- -- if (!hdr.PageLength) { -- rc = -EFAULT; -- goto out; -- } -- -- buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, -- &dma_handle); -- -- if (!buffer) { -- rc = -ENOMEM; -- goto out; -- } -- -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- cfg.pageAddr = phys_disk_num; -- -- if (mpt_config(ioc, &cfg) != 0) { -- rc = -EFAULT; -- goto out; -- } -- -- rc = 0; -- memcpy(phys_disk, buffer, sizeof(*buffer)); -- phys_disk->MaxLBA = le32_to_cpu(buffer->MaxLBA); -- -- out: -- -- if (buffer) -- pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, -- dma_handle); -- -- return rc; --} -- --/** -- * mpt_inactive_raid_list_free -- * -- * This clears this link list. -- * -- * @ioc - pointer to per adapter structure -- * -- **/ --static void --mpt_inactive_raid_list_free(MPT_ADAPTER *ioc) --{ -- struct inactive_raid_component_info *component_info, *pNext; -- -- if (list_empty(&ioc->raid_data.inactive_list)) -- return; -- -- down(&ioc->raid_data.inactive_list_mutex); -- list_for_each_entry_safe(component_info, pNext, -- &ioc->raid_data.inactive_list, list) { -- list_del(&component_info->list); -- kfree(component_info); -- } -- up(&ioc->raid_data.inactive_list_mutex); --} -- --/** -- * mpt_inactive_raid_volumes -- * -- * This sets up link list of phy_disk_nums for devices belonging in an inactive volume -- * -- * @ioc - pointer to per adapter structure -- * @channel - volume channel -- * @id - volume target id -- * -- * -- **/ --static void --mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- CONFIGPARMS cfg; -- ConfigPageHeader_t hdr; -- dma_addr_t dma_handle; -- pRaidVolumePage0_t buffer = NULL; -- int i; -- RaidPhysDiskPage0_t phys_disk; -- struct inactive_raid_component_info *component_info; -- int handle_inactive_volumes; -- -- memset(&cfg, 0 , sizeof(CONFIGPARMS)); -- memset(&hdr, 0 , sizeof(ConfigPageHeader_t)); -- hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; -- cfg.pageAddr = (channel << 8) + id; -- cfg.cfghdr.hdr = &hdr; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- -- if (mpt_config(ioc, &cfg) != 0) -- goto out; -- -- if (!hdr.PageLength) -- goto out; -- -- buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, -- &dma_handle); -- -- if (!buffer) -- goto out; -- -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if (mpt_config(ioc, &cfg) != 0) -- goto out; -- -- if (!buffer->NumPhysDisks) -- goto out; -- -- handle_inactive_volumes = -- (buffer->VolumeStatus.Flags & MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE || -- (buffer->VolumeStatus.Flags & MPI_RAIDVOL0_STATUS_FLAG_ENABLED) == 0 || -- buffer->VolumeStatus.State == MPI_RAIDVOL0_STATUS_STATE_FAILED || -- buffer->VolumeStatus.State == MPI_RAIDVOL0_STATUS_STATE_MISSING) ? 1 : 0; -- -- if (!handle_inactive_volumes) -- goto out; -- -- down(&ioc->raid_data.inactive_list_mutex); -- for (i = 0; i < buffer->NumPhysDisks; i++) { -- if(mpt_raid_phys_disk_pg0(ioc, -- buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0) -- continue; -- -- if ((component_info = kmalloc(sizeof (*component_info), -- GFP_KERNEL)) == NULL) -- continue; -- -- component_info->volumeID = id; -- component_info->volumeBus = channel; -- component_info->d.PhysDiskNum = phys_disk.PhysDiskNum; -- component_info->d.PhysDiskBus = phys_disk.PhysDiskBus; -- component_info->d.PhysDiskID = phys_disk.PhysDiskID; -- component_info->d.PhysDiskIOC = phys_disk.PhysDiskIOC; -- -- list_add_tail(&component_info->list, -- &ioc->raid_data.inactive_list); -- } -- up(&ioc->raid_data.inactive_list_mutex); -- -- out: -- if (buffer) -- pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, -- dma_handle); --} -- -- - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /** - * mpt_findImVolumes - Identify IDs of hidden disks and RAID Volumes -@@ -5657,16 +5675,8 @@ mpt_findImVolumes(MPT_ADAPTER *ioc) - int jj; - int rc = 0; - int iocpage2sz; -- -- if (!ioc->ir_firmware) -- return 0; -- -- /* Free the old page -- */ -- kfree(ioc->raid_data.pIocPg2); -- ioc->raid_data.pIocPg2 = NULL; -- mpt_inactive_raid_list_free(ioc); -- ioc->raid_data.isRaid = 0; -+ u8 nVols, nPhys; -+ u8 vid, vbus, vioc; - - /* Read IOCP2 header then the page. - */ -@@ -5696,35 +5706,53 @@ mpt_findImVolumes(MPT_ADAPTER *ioc) - if (mpt_config(ioc, &cfg) != 0) - goto done_and_free; - -- mem = kmalloc(iocpage2sz, GFP_ATOMIC); -- if (!mem) -- goto done_and_free; -- -+ if ( (mem = (u8 *)ioc->raid_data.pIocPg2) == NULL ) { -+ mem = kmalloc(iocpage2sz, GFP_ATOMIC); -+ if (mem) { -+ ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem; -+ } else { -+ goto done_and_free; -+ } -+ } - memcpy(mem, (u8 *)pIoc2, iocpage2sz); -- ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem; - - /* Identify RAID Volume Id's */ -- if (pIoc2->NumActiveVolumes) { -- -- pIocRv = pIoc2->RaidVolume; -- /* -- * WARNING - ioc->raid_data.isRaid -- * doesn't consider channels -+ nVols = pIoc2->NumActiveVolumes; -+ if ( nVols == 0) { -+ /* No RAID Volume. - */ -- for (jj = 0; jj < pIoc2->NumActiveVolumes; jj++, pIocRv++) { -- if (pIocRv->VolumeBus) -- continue; -- ioc->raid_data.isRaid |= (1 << pIocRv->VolumeID); -- mpt_inactive_raid_volumes(ioc, -- pIoc2->RaidVolume[jj].VolumeBus, -- pIoc2->RaidVolume[jj].VolumeID); -+ goto done_and_free; -+ } else { -+ /* At least 1 RAID Volume -+ */ -+ pIocRv = pIoc2->RaidVolume; -+ ioc->raid_data.isRaid = 0; -+ for (jj = 0; jj < nVols; jj++, pIocRv++) { -+ vid = pIocRv->VolumeID; -+ vbus = pIocRv->VolumeBus; -+ vioc = pIocRv->VolumeIOC; -+ -+ /* find the match -+ */ -+ if (vbus == 0) { -+ ioc->raid_data.isRaid |= (1 << vid); -+ } else { -+ /* Error! Always bus 0 -+ */ -+ } - } -- mpt_read_ioc_pg_3(ioc); -- mpt_read_ioc_pg_6(ioc); -- } -+ } - -+ /* Identify Hidden Physical Disk Id's */ -+ nPhys = pIoc2->NumActivePhysDisks; -+ if (nPhys == 0) { -+ /* No physical disks. -+ */ -+ } else { -+ mpt_read_ioc_pg_3(ioc); -+ } - -- done_and_free: -+done_and_free: - pci_free_consistent(ioc->pcidev, iocpage2sz, pIoc2, ioc2_dma); - - return rc; -@@ -5845,65 +5873,6 @@ mpt_read_ioc_pg_4(MPT_ADAPTER *ioc) - } - - static void --mpt_read_ioc_pg_6(MPT_ADAPTER *ioc) --{ -- IOCPage6_t *pIoc6; -- u8 *mem; -- CONFIGPARMS cfg; -- ConfigPageHeader_t header; -- dma_addr_t ioc6_dma; -- int iocpage6sz = 0; -- -- /* Free the old page -- */ -- if (ioc->raid_data.pIocPg6) { -- kfree(ioc->raid_data.pIocPg6); -- ioc->raid_data.pIocPg6 = NULL; -- } -- -- /* There is at least one physical disk. -- * Read and save IOC Page 3 -- */ -- header.PageVersion = 0; -- header.PageLength = 0; -- header.PageNumber = 6; -- header.PageType = MPI_CONFIG_PAGETYPE_IOC; -- cfg.cfghdr.hdr = &header; -- cfg.physAddr = -1; -- cfg.pageAddr = 0; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; -- cfg.timeout = 0; -- if (mpt_config(ioc, &cfg) != 0) -- return; -- -- if (header.PageLength == 0) -- return; -- -- /* Read Header good, alloc memory -- */ -- iocpage6sz = header.PageLength * 4; -- pIoc6 = pci_alloc_consistent(ioc->pcidev, iocpage6sz, &ioc6_dma); -- if (!pIoc6) -- return; -- -- /* Read the Page and save the data -- * into malloc'd memory. -- */ -- cfg.physAddr = ioc6_dma; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- if (mpt_config(ioc, &cfg) == 0) { -- mem = kmalloc(iocpage6sz, GFP_ATOMIC); -- if (mem) { -- memcpy(mem, (u8 *)pIoc6, iocpage6sz); -- ioc->raid_data.pIocPg6 = (IOCPage6_t *) mem; -- } -- } -- -- pci_free_consistent(ioc->pcidev, iocpage6sz, pIoc6, ioc6_dma); --} -- --static void - mpt_read_ioc_pg_1(MPT_ADAPTER *ioc) - { - IOCPage1_t *pIoc1; -@@ -6007,12 +5976,13 @@ SendEventNotification(MPT_ADAPTER *ioc, - ioc->name,__FUNCTION__)); - return 0; - } -- ioc->evnp = evnp; -- memset(evnp, 0, sizeof(*evnp)); -+ memset(evnp, 0, sizeof(*evnp)); - - devtprintk((MYIOC_s_INFO_FMT "Sending EventNotification (%d) request %p\n", ioc->name, EvSwitch, evnp)); - - evnp->Function = MPI_FUNCTION_EVENT_NOTIFICATION; -+ evnp->ChainOffset = 0; -+ evnp->MsgFlags = 0; - evnp->Switch = EvSwitch; - - mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)evnp); -@@ -6037,10 +6007,13 @@ SendEventAck(MPT_ADAPTER *ioc, EventNoti - return -1; - } - -- devtprintk((MYIOC_s_INFO__FMT "Sending EventAck\n", ioc->name)); -- memset(pAck, 0, sizeof(*pAck)); -+ devtprintk((MYIOC_s_WARN_FMT "Sending EventAck\n", ioc->name)); - - pAck->Function = MPI_FUNCTION_EVENT_ACK; -+ pAck->ChainOffset = 0; -+ pAck->Reserved[0] = pAck->Reserved[1] = 0; -+ pAck->MsgFlags = 0; -+ pAck->Reserved1[0] = pAck->Reserved1[1] = pAck->Reserved1[2] = 0; - pAck->Event = evnp->Event; - pAck->EventContext = evnp->EventContext; - DBG_DUMP_EVENT_REQUEST_FRAME(pAck); -@@ -6080,7 +6053,7 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS - */ - in_isr = in_interrupt(); - if (in_isr) { -- dfailprintk((MYIOC_s_WARN_FMT "Config request not allowed in ISR context!\n", -+ dcprintk((MYIOC_s_WARN_FMT "Config request not allowed in ISR context!\n", - ioc->name)); - return -EPERM; - } -@@ -6607,12 +6580,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i - * mpt_do_ioc_recovery at any instant in time. - */ - spin_lock_irqsave(&ioc->diagLock, flags); -- if (ioc->IOCResetInProgress){ -+ if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)){ - spin_unlock_irqrestore(&ioc->diagLock, flags); -- dtmprintk((MYIOC_s_INFO_FMT "HardResetHandler: IOCResetInProgress!\n", -- ioc->name)); -- -- return 0; -+ return 0; -+ } else { -+ ioc->diagPending = 1; - } - spin_unlock_irqrestore(&ioc->diagLock, flags); - -@@ -6633,6 +6605,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i - dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", - ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET); -+ if (ioc->alt_ioc) { -+ dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", -+ ioc->name, ioc->alt_ioc->name, ii)); -+ r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET); -+ } - } - } - } -@@ -6642,307 +6619,23 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i - rc, ioc->name); - } - ioc->reload_fw = 0; -+ if (ioc->alt_ioc) -+ ioc->alt_ioc->reload_fw = 0; - -- if (ioc->alt_ioc) { -- dtmprintk((MYIOC_s_INFO_FMT "HardResetHandler alt_ioc: checking IOCResetInProgress=%d\n", -- ioc->alt_ioc->name, ioc->alt_ioc->IOCResetInProgress)); -- spin_lock_irqsave(&ioc->alt_ioc->diagLock, flags); -- --if (ioc->alt_ioc->IOCResetInProgress) { -- dtmprintk((MYIOC_s_INFO_FMT "HardResetHandler: alt_ioc IOCResetInProgress!\n", ioc->alt_ioc->name)); -- --spin_unlock_irqrestore(&ioc->alt_ioc->diagLock, flags); --return 0; --} --spin_unlock_irqrestore(&ioc->alt_ioc->diagLock, flags); --if ((rc = mpt_do_ioc_recovery(ioc->alt_ioc, MPT_HOSTEVENT_IOC_RECOVER, --sleepFlag)) != 0) { --printk(KERN_WARNING MYNAM ": WARNING - alt_%s mpt_do_ioc_recovery failed rc=%x\n", ioc->name, rc ); -- } --ioc->alt_ioc->reload_fw = 0; --} -- -+ spin_lock_irqsave(&ioc->diagLock, flags); -+ ioc->diagPending = 0; -+ if (ioc->alt_ioc) -+ ioc->alt_ioc->diagPending = 0; -+ spin_unlock_irqrestore(&ioc->diagLock, flags); - - dtmprintk((MYIOC_s_INFO_FMT "HardResetHandler rc = %d!\n", ioc->name, rc)); - - return rc; - } - --/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --/* mpt_writeSDP1 - write SCSI Device Page 1 -- * @ioc: Pointer to a SCSI Host Adapter Structure -- * @portnum: IOC port number -- * @id: writeSDP1 for single ID -- * @flags: MPT_SCSICFG_ALL_IDS, MPT_SCSICFG_USE_NVRAM, MPT_SCSICFG_BLK_NEGO -- * -- * Return: -EFAULT if read of config page header fails -- * or 0 if success. -- * -- * Remark: If a target has been found, the settings from the -- * target structure are used, else the device is set -- * to async/narrow. -- * -- * Remark: Called during init and after a FW reload. -- * Remark: We do not wait for a return, write pages sequentially. -- */ --int --mpt_writeSDP1(MPT_ADAPTER *ioc, int portnum, int id, int flags) --{ -- Config_t *pReq; -- SCSIDevicePage1_t *pData; -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *pTarget; -- MPT_FRAME_HDR *mf; -- dma_addr_t dataDma; -- u16 req_idx; -- u32 frameOffset; -- u32 requested, configuration, flagsLength; -- int ii, nvram; -- int loop_id, loop_end; -- u8 width; -- u8 factor; -- u8 offset; -- u8 bus = 0; -- u8 negoFlags; -- u8 maxwidth, maxoffset, maxfactor; -- -- if ((pMptTarget = ioc->Target_List[0]) == NULL) -- return 0; -- -- if (ioc->spi_data.sdp1length == 0) -- return 0; -- -- if (flags & MPT_SCSICFG_ALL_IDS) { -- loop_id = 0; -- loop_end = ioc->DevicesPerBus; -- } else { -- loop_id = id; -- loop_end = id+1; -- } -- -- for (; loop_id < loop_end; loop_id++) { -- -- if (loop_id == ioc->pfacts[portnum].PortSCSIID) -- continue; -- -- -- pTarget = pMptTarget->Target[loop_id]; -- -- /* Use NVRAM to get adapter and target maximums -- * Data over-riden by target structure information, if present -- */ -- maxwidth = ioc->spi_data.maxBusWidth; -- maxoffset = ioc->spi_data.maxSyncOffset; -- maxfactor = ioc->spi_data.minSyncFactor; -- if (ioc->spi_data.nvram && (ioc->spi_data.nvram[loop_id] != MPT_HOST_NVRAM_INVALID)) { -- nvram = ioc->spi_data.nvram[loop_id]; -- -- if (maxwidth) -- maxwidth = nvram & MPT_NVRAM_WIDE_DISABLE ? 0 : 1; -- -- if (maxoffset > 0) { -- maxfactor = (nvram & MPT_NVRAM_SYNC_MASK) >> 8; -- if (maxfactor == 0) { -- /* Key for async */ -- maxfactor = MPT_ASYNC; -- maxoffset = 0; -- } else if (maxfactor < ioc->spi_data.minSyncFactor) { -- maxfactor = ioc->spi_data.minSyncFactor; -- } -- } else -- maxfactor = MPT_ASYNC; -- } -- -- /* Set the negotiation flags. -- */ -- negoFlags = ioc->spi_data.noQas; -- if (!maxwidth) -- negoFlags |= MPT_TARGET_NO_NEGO_WIDE; -- -- if (!maxoffset) -- negoFlags |= MPT_TARGET_NO_NEGO_SYNC; -- -- if (flags & MPT_SCSICFG_USE_NVRAM) { -- width = maxwidth; -- factor = maxfactor; -- offset = maxoffset; -- dnegoprintk(("%s: writeSDP1: USE_NVRAM id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -- ioc->name, loop_id, width, factor, offset, negoFlags)); -- } else { -- width = 0; -- factor = MPT_ASYNC; -- offset = 0; -- //negoFlags = 0; -- //negoFlags = MPT_TARGET_NO_NEGO_SYNC; -- dnegoprintk(("%s: writeSDP1: !USE_NVRAM: Going Async/Narrow id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -- ioc->name, loop_id, width, factor, offset, negoFlags)); -- } -- -- /* If id is not a raid volume, get the updated -- * transmission settings from the target structure. -- */ -- if ( pTarget && !pTarget->raidVolume) { -- width = pTarget->maxWidth; -- factor = pTarget->minSyncFactor; -- offset = pTarget->maxOffset; -- negoFlags |= pTarget->negoFlags; -- dnegoprintk(("%s: writeSDP1: NOT RAID id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -- ioc->name, loop_id, width, factor, offset, negoFlags)); -- } -- --#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION -- /* Force to async and narrow if DV has not been executed -- * for this ID -- */ -- if ((ioc->spi_data.dvStatus[loop_id] & MPT_SCSICFG_DV_NOT_DONE) != 0) { -- width = 0; -- factor = MPT_ASYNC; -- offset = 0; -- dnegoprintk(("%s: writeSDP1: DV_NOT_DONE: Going Async/Narrow id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -- ioc->name, loop_id, width, factor, offset, negoFlags)); -- } --#endif -- -- if (flags & MPT_SCSICFG_BLK_NEGO) { -- negoFlags |= MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC; -- dnegoprintk(("%s: writeSDP1: BLK_NEGO id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -- ioc->name, loop_id, width, factor, offset, negoFlags)); -- } -- -- mpt_setSDP1parameters(width, factor, offset, negoFlags, -- &requested, &configuration); -- -- /* Get a MF for this command. -- */ -- if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { -- dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n", -- ioc->name,__FUNCTION__)); -- return -EAGAIN; -- } -- -- /* Set the request and the data pointers. -- * Request takes: 36 bytes (32 bit SGE) -- * SCSI Device Page 1 requires 16 bytes -- * 40 + 16 <= size of SCSI IO Request = 56 bytes -- * and MF size >= 64 bytes. -- * Place data at end of MF. -- */ -- pReq = (Config_t *)mf; -- -- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -- frameOffset = ioc->req_sz - sizeof(SCSIDevicePage1_t); -- -- pData = (SCSIDevicePage1_t *)((u8 *) mf + frameOffset); -- dataDma = ioc->req_frames_dma + (req_idx * ioc->req_sz) + frameOffset; -- -- /* Complete the request frame (same for all requests). -- */ -- pReq->Action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; -- pReq->Reserved = 0; -- pReq->ChainOffset = 0; -- pReq->Function = MPI_FUNCTION_CONFIG; -- pReq->ExtPageLength = 0; -- pReq->ExtPageType = 0; -- pReq->MsgFlags = 0; -- for (ii=0; ii < 8; ii++) { -- pReq->Reserved2[ii] = 0; -- } -- pReq->Header.PageVersion = ioc->spi_data.sdp1version; -- pReq->Header.PageLength = ioc->spi_data.sdp1length; -- pReq->Header.PageNumber = 1; -- pReq->Header.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; -- pReq->PageAddress = cpu_to_le32(loop_id | (bus << 8 )); -- -- /* Add a SGE to the config request. -- */ -- flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE | ioc->spi_data.sdp1length * 4; -- -- mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); -- -- /* Set up the common data portion -- */ -- pData->Header.PageVersion = pReq->Header.PageVersion; -- pData->Header.PageLength = pReq->Header.PageLength; -- pData->Header.PageNumber = pReq->Header.PageNumber; -- pData->Header.PageType = pReq->Header.PageType; -- pData->RequestedParameters = cpu_to_le32(requested); -- pData->Reserved = 0; -- pData->Configuration = cpu_to_le32(configuration); -- -- if ( pTarget ) { -- if ( requested & MPI_SCSIDEVPAGE1_RP_IU ) { -- pTarget->last_lun = MPT_LAST_LUN; -- } else { -- pTarget->last_lun = MPT_NON_IU_LAST_LUN; -- } -- dsprintk((MYIOC_s_INFO_FMT -- "writeSDP1: last_lun=%d on id=%d\n", -- ioc->name, pTarget->last_lun, loop_id)); -- } -- -- dnegoprintk((MYIOC_s_INFO_FMT -- "write SDP1: id=%d pgaddr=0x%x requested=%08x configuration=%08x\n", -- ioc->name, loop_id, (loop_id | (bus<<8)), -- requested, configuration)); -- -- mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); -- } -- return 0; --} -- --/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --/* mpt_setSDP1parameters - set SDP1 Requested and Configuration -- * fields based on width, factor, offset and flags parameters. -- * @width: bus width -- * @factor: sync factor -- * @offset: sync offset -- * @flags: flags to block WDTR or SDTR negotiation -- * @requestedPtr: pointer to SDP1 Requested value (updated) -- * @configurationPtr: pointer to SDP1 Configuration value (updated) -- * -- * Return: None. -- * -- * Remark: Called by writeSDP1 and _dv_params -- */ --void --mpt_setSDP1parameters (u8 width, u8 factor, u8 offset, u8 flags, int *requestedPtr, int *configurationPtr) --{ -- u8 nowide = flags & MPT_TARGET_NO_NEGO_WIDE; -- u8 nosync = flags & MPT_TARGET_NO_NEGO_SYNC; -- -- *configurationPtr = 0; -- *requestedPtr = width ? MPI_SCSIDEVPAGE1_RP_WIDE : 0; -- *requestedPtr |= (offset << 16) | (factor << 8); -- -- if (width && offset && !nowide && !nosync) { -- if (factor < MPT_ULTRA160) { -- *requestedPtr |= (MPI_SCSIDEVPAGE1_RP_IU + MPI_SCSIDEVPAGE1_RP_DT); -- if ((flags & MPT_TARGET_NO_NEGO_QAS) == 0) -- *requestedPtr |= MPI_SCSIDEVPAGE1_RP_QAS; -- if (flags & MPT_TAPE_NEGO_IDP) -- *requestedPtr |= 0x08000000; -- } else if (factor < MPT_ULTRA2) { -- *requestedPtr |= MPI_SCSIDEVPAGE1_RP_DT; -- } -- } -- -- if (nowide) -- *configurationPtr |= MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED; -- -- if (nosync) -- *configurationPtr |= MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED; -- -- return; --} -- - # define EVENT_DESCR_STR_SZ 100 - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -- -- -- -- -- - static void - EventDescriptionStr(u8 event, u32 evData0, char *evStr) - { -@@ -6969,6 +6662,9 @@ EventDescriptionStr(u8 event, u32 evData - break; - case MPI_EVENT_RESCAN: - ds = "Bus Rescan Event"; -+ /* Ok, do we need to do anything here? As far as -+ I can tell, this is when a new device gets added -+ to the loop. */ - break; - case MPI_EVENT_LINK_STATUS_CHANGE: - if (evData0 == MPI_EVENT_LINK_STATUS_FAILURE) -@@ -6980,9 +6676,9 @@ EventDescriptionStr(u8 event, u32 evData - if (evData0 == MPI_EVENT_LOOP_STATE_CHANGE_LIP) - ds = "Loop State(LIP) Change"; - else if (evData0 == MPI_EVENT_LOOP_STATE_CHANGE_LPE) -- ds = "Loop State(LPE) Change"; /* ??? */ -+ ds = "Loop State(LPE) Change"; /* ??? */ - else -- ds = "Loop State(LPB) Change"; /* ??? */ -+ ds = "Loop State(LPB) Change"; /* ??? */ - break; - case MPI_EVENT_LOGOUT: - ds = "Logout"; -@@ -6995,6 +6691,9 @@ EventDescriptionStr(u8 event, u32 evData - break; - case MPI_EVENT_INTEGRATED_RAID: - { -+#if defined(CPQ_CIM) -+ ioc->csmi_change_count++; -+#endif - u8 ReasonCode = (u8)(evData0 >> 16); - switch (ReasonCode) { - case MPI_EVENT_RAID_RC_VOLUME_CREATED : -@@ -7044,65 +6743,36 @@ EventDescriptionStr(u8 event, u32 evData - break; - case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: - { -- u8 id = (u8)(evData0); -- u8 channel = (u8)(evData0 >> 8); -+ u8 id = (u8)(evData0); - u8 ReasonCode = (u8)(evData0 >> 16); - switch (ReasonCode) { - case MPI_EVENT_SAS_DEV_STAT_RC_ADDED: - snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Added: " -- "id=%d channel=%d", id, channel); -+ "SAS Device Status Change: Added: id=%d", id); - break; - case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING: - snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Deleted: " -- "id=%d channel=%d", id, channel); -+ "SAS Device Status Change: Deleted: id=%d", id); - break; - case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA: - snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: SMART Data: " -- "id=%d channel=%d", id, channel); -+ "SAS Device Status Change: SMART Data: id=%d", -+ id); - break; - case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED: - snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: No Persistancy: " -- "id=%d channel=%d", id, channel); -- break; -- case MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED: -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Unsupported Device " -- "Discovered : id=%d channel=%d", id, channel); -- break; -- case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET: -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Internal Device " -- "Reset : id=%d channel=%d", id, channel); -- break; -- case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL: -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Internal Task " -- "Abort : id=%d channel=%d", id, channel); -- break; -- case MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL: -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Internal Abort " -- "Task Set : id=%d channel=%d", id, channel); -- break; -- case MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL: -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Internal Clear " -- "Task Set : id=%d channel=%d", id, channel); -- break; -- case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL: -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Internal Query " -- "Task : id=%d channel=%d", id, channel); -+ "SAS Device Status Change: No Persistancy " -+ "Added: id=%d", id); - break; -+ case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET: -+ snprintf(evStr, EVENT_DESCR_STR_SZ, -+ "SAS Device Status Change: Internal Device Reset: " -+ "id=%d", id); -+ break; - default: - snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Device Status Change: Unknown: " -- "id=%d channel=%d", id, channel); -- break; -+ "SAS Device Status Change: Unknown: id=%d", id); -+ break; - } - break; - } -@@ -7205,86 +6875,15 @@ EventDescriptionStr(u8 event, u32 evData - } - case MPI_EVENT_SAS_DISCOVERY: - { -- if (evData0) -- ds = "SAS Discovery: Start"; -- else -- ds = "SAS Discovery: Stop"; -+ char buf[40]; -+ sprintf(buf,"SAS Discovery: Condition=0x%x:",evData0); -+ ds = buf; - break; - } - case MPI_EVENT_LOG_ENTRY_ADDED: - ds = "SAS Log Entry Added"; - break; - -- case MPI_EVENT_SAS_BROADCAST_PRIMITIVE: -- { -- u8 phy_num = (u8)(evData0); -- u8 port_num = (u8)(evData0 >> 8); -- u8 port_width = (u8)(evData0 >> 16); -- u8 primative = (u8)(evData0 >> 24); -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Broadcase Primative: phy=%d port=%d " -- "width=%d primative=0x%02x", -- phy_num, port_num, port_width, primative); -- break; -- } -- -- case MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE: -- { -- u8 reason = (u8)(evData0); -- u8 port_num = (u8)(evData0 >> 8); -- u16 handle = le16_to_cpu(evData0 >> 16); -- -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Initiator Device Status Change: reason=0x%02x " -- "port=%d handle=0x%04x", -- reason, port_num, handle); -- break; -- } -- -- case MPI_EVENT_SAS_INIT_TABLE_OVERFLOW: -- { -- u8 max_init = (u8)(evData0); -- u8 current_init = (u8)(evData0 >> 8); -- -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS Initiator Device Table Overflow: max initiators=%02d " -- "current initators=%02d", -- max_init, current_init); -- break; -- } -- case MPI_EVENT_SAS_SMP_ERROR: -- { -- u8 status = (u8)(evData0); -- u8 port_num = (u8)(evData0 >> 8); -- u8 result = (u8)(evData0 >> 16); -- -- if (status == MPI_EVENT_SAS_SMP_FUNCTION_RESULT_VALID) -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS SMP Error: port=%d result=0x%02x", -- port_num, result); -- else if (status == MPI_EVENT_SAS_SMP_CRC_ERROR) -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS SMP Error: port=%d : CRC Error", -- port_num); -- else if (status == MPI_EVENT_SAS_SMP_TIMEOUT) -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS SMP Error: port=%d : Timeout", -- port_num); -- else if (status == MPI_EVENT_SAS_SMP_NO_DESTINATION) -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS SMP Error: port=%d : No Destination", -- port_num); -- else if (status == MPI_EVENT_SAS_SMP_BAD_DESTINATION) -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS SMP Error: port=%d : Bad Destination", -- port_num); -- else -- snprintf(evStr, EVENT_DESCR_STR_SZ, -- "SAS SMP Error: port=%d : status=0x%02x", -- port_num, status); -- break; -- } -- - /* - * MPT base "custom" events may be added here... - */ -@@ -7329,20 +6928,24 @@ ProcessEventNotification(MPT_ADAPTER *io - } - - EventDescriptionStr(event, evData0, evStr); -- devtprintk((MYIOC_s_WARN_FMT "MPT event:(%02Xh) : %s\n", -- ioc->name, event, evStr)); -+ devtprintk((MYIOC_s_WARN_FMT "MPT Event=%02Xh (%s) detected!\n", -+ ioc->name, event, evStr)); -+ - #if defined(MPT_DEBUG) || defined(MPT_DEBUG_EVENTS) -- printk(KERN_WARN MYNAM ": Event data:\n" KERN_INFO); -- for (ii = 0; ii < evDataLen; ii++) -- printk(" %08x", le32_to_cpu(pEventReply->Data[ii])); -- printk("\n"); -+ printk(KERN_INFO MYNAM ": Event data:\n" KERN_INFO); -+ for (ii = 0; ii < evDataLen; ii++) -+ printk(" %08x", le32_to_cpu(pEventReply->Data[ii])); -+ printk("\n"); - #endif - -- -- /* -+ /* - * Do general / base driver event processing - */ - switch(event) { -+ case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: /* 0F */ -+ mptbase_sas_process_event_data(ioc, -+ (MpiEventDataSasDeviceStatusChange_t *)pEventReply->Data); -+ break; - case MPI_EVENT_EVENT_CHANGE: /* 0A */ - if (evDataLen) { - u8 evState = evData0 & 0xFF; -@@ -7359,11 +6962,6 @@ ProcessEventNotification(MPT_ADAPTER *io - mptbase_raid_process_event_data(ioc, - (MpiEventDataRaid_t *)pEventReply->Data); - break; --case MPI_EVENT_RESCAN: --case MPI_EVENT_LINK_STATUS_CHANGE: --ioc->FcLinkSpeedCheckNeeded = 1; --break; -- - default: - break; - } -@@ -7396,10 +6994,9 @@ break; - */ - for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) { - if (MptEvHandlers[ii]) { -- devtprintk((MYIOC_s_WARN_FMT "Routing Event to event handler #%d\n", -- ioc->name, ii)); -- -- r += (*(MptEvHandlers[ii]))(ioc, pEventReply); -+ devtprintk((MYIOC_s_INFO_FMT "Routing Event to event handler #%d\n", -+ ioc->name, ii)); -+ r += (*(MptEvHandlers[ii]))(ioc, pEventReply); - handlers++; - } - } -@@ -7412,7 +7009,7 @@ break; - devtprintk((MYIOC_s_WARN_FMT - "EventAck required\n",ioc->name)); - if ((ii = SendEventAck(ioc, pEventReply)) != 0) { -- devtprintk((MYIOC_s_INFO_FMT "SendEventAck returned %d\n", -+ devtprintk((MYIOC_s_WARN_FMT "SendEventAck returned %d\n", - ioc->name, ii)); - } - } -@@ -7599,14 +7196,20 @@ union loginfo_type { - } - - if (code_desc != NULL) -- printk("Originator={%s}, Code={%s}," -+ printk(MYIOC_s_INFO_FMT -+ "LogInfo(0x%08x): Originator={%s}, Code={%s}," - " SubCode(0x%04x)\n", -+ ioc->name, -+ log_info, - originator_str[sas_loginfo.dw.originator], - code_desc, - sas_loginfo.dw.subcode); - else -- printk("Originator={%s}, Code=(0x%02x)," -+ printk(MYIOC_s_INFO_FMT -+ "LogInfo(0x%08x): Originator={%s}, Code=(0x%02x)," - " SubCode(0x%04x)\n", -+ ioc->name, -+ log_info, - originator_str[sas_loginfo.dw.originator], - sas_loginfo.dw.code, - sas_loginfo.dw.subcode); -@@ -7625,12 +7228,7 @@ static void - mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf) - { - u32 status = ioc_status & MPI_IOCSTATUS_MASK; -- char *desc = NULL; -- -- SCSIIORequest_t *pScsiReq = (SCSIIORequest_t *) mf; -- U8 cdb = pScsiReq->CDB[0]; -- U8 id = pScsiReq->TargetID; -- U8 lun = pScsiReq->LUN[1]; -+ char *desc = ""; - - switch (status) { - case MPI_IOCSTATUS_INVALID_FUNCTION: /* 0x0001 */ -@@ -7639,8 +7237,6 @@ mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 io - - case MPI_IOCSTATUS_BUSY: /* 0x0002 */ - desc = "Busy"; -- ddvprintk (("%s IOCSTATUS_BUSY", ioc->name)); -- DBG_DUMP_RESET_REQUEST_FRAME(ioc, mf) - break; - - case MPI_IOCSTATUS_INVALID_SGL: /* 0x0003 */ -@@ -7692,11 +7288,11 @@ mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 io - - case MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE: /* 0x0043 */ - { --#ifdef MPT_DEBUG_REPLY -+ SCSIIORequest_t *pScsiReq = (SCSIIORequest_t *) mf; -+ U8 cdb = pScsiReq->CDB[0]; - if (cdb != 0x12) { /* Inquiry is issued for device scanning */ - desc = "SCSI Device Not There"; - } --#endif - break; - } - -@@ -7742,16 +7338,8 @@ mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 io - desc = "Others"; - break; - } -- if (desc != NULL) { -- U8 function = pScsiReq->Function; -- if (function == MPI_FUNCTION_SCSI_IO_REQUEST || -- function == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH) { -- printk(MYIOC_s_WARN_FMT "IOCStatus(0x%04x): %s on CDB=%x id=%d lun=%d\n", ioc->name, status, desc, cdb, id, lun); -- } else { -- printk(MYIOC_s_WARN_FMT "IOCStatus(0x%04x): %s on Function=%02x\n", ioc->name, status, desc, function); -- } -- DBG_DUMP_REPLYS_REQUEST_FRAME(ioc, mf) -- } -+ if (desc != "") -+ printk(MYIOC_s_INFO_FMT "IOCStatus(0x%04x): %s\n", ioc->name, status, desc); - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -7770,6 +7358,7 @@ mpt_poll_interrupt(MPT_ADAPTER *ioc) - if (intstat & MPI_HIS_REPLY_MESSAGE_INTERRUPT) - mpt_interrupt(0, ioc, NULL); - } -+ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - EXPORT_SYMBOL(mpt_attach); - EXPORT_SYMBOL(mpt_detach); -@@ -7779,6 +7368,7 @@ EXPORT_SYMBOL(mpt_suspend); - #endif - EXPORT_SYMBOL(ioc_list); - EXPORT_SYMBOL(mpt_can_queue); -+EXPORT_SYMBOL(mpt_sg_tablesize); - EXPORT_SYMBOL(mpt_proc_root_dir); - EXPORT_SYMBOL(mpt_register); - EXPORT_SYMBOL(mpt_deregister); -@@ -7800,21 +7390,16 @@ EXPORT_SYMBOL(mpt_print_ioc_summary); - EXPORT_SYMBOL(mpt_lan_index); - EXPORT_SYMBOL(mpt_stm_index); - EXPORT_SYMBOL(mpt_HardResetHandler); --EXPORT_SYMBOL(mpt_SendIocReset); --EXPORT_SYMBOL(mpt_do_ioc_recovery); --EXPORT_SYMBOL(mpt_writeSDP1); --EXPORT_SYMBOL(mpt_setSDP1parameters); - EXPORT_SYMBOL(mpt_config); - EXPORT_SYMBOL(mpt_findImVolumes); - EXPORT_SYMBOL(mpt_read_ioc_pg_3); - EXPORT_SYMBOL(mpt_alloc_fw_memory); - EXPORT_SYMBOL(mpt_free_fw_memory); - EXPORT_SYMBOL(mptbase_sas_persist_operation); -+EXPORT_SYMBOL(mpt_sas_get_info); - EXPORT_SYMBOL_GPL(mpt_poll_interrupt); - EXPORT_SYMBOL(mpt_alt_ioc_wait); --EXPORT_SYMBOL(mpt_raid_phys_disk_pg0); --EXPORT_SYMBOL(mpt_enable_deadioc_detect); --EXPORT_SYMBOL(mpt_handshake_req_reply_wait); -+ - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptbase.h linux-2.6.9-55.0.12/drivers/message/fusion/mptbase.h ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptbase.h 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptbase.h 2007-11-02 09:10:23.000000000 +0100 -@@ -5,8 +5,8 @@ - * LSIFC9xx/LSI409xx Fibre Channel - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * ( mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - * $Id: mptbase.h,v 1.149 2003/05/07 14:08:31 Exp $ - */ -@@ -78,14 +78,14 @@ - #endif - - #ifndef COPYRIGHT --#define COPYRIGHT "Copyright (c) 1999-2007 " MODULEAUTHOR -+#define COPYRIGHT "Copyright (c) 1999-2006 " MODULEAUTHOR - #endif - --#define MPT_LINUX_VERSION_COMMON "3.02.99.00rh" --#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.02.99.00rh" -+#define MPT_LINUX_VERSION_COMMON "3.02.73rh" -+#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.02.73rh" - #define MPT_LINUX_MAJOR_VERSION 3 - #define MPT_LINUX_MINOR_VERSION 02 --#define MPT_LINUX_BUILD_VERSION 99 -+#define MPT_LINUX_BUILD_VERSION 73 - #define MPT_LINUX_RELEASE_VERSION 00 - #define WHAT_MAGIC_STRING "@" "(" "#" ")" - -@@ -96,8 +96,10 @@ - /* - * Fusion MPT(linux) driver configurable stuff... - */ -+#define MPT_MAX_ADAPTERS 18 - #define MPT_MAX_PROTOCOL_DRIVERS 16 --#define MPT_MAX_BUSES 8 -+#define MPT_MAX_BUS 1 /* Do not change */ -+#define MPT_MAX_FC_DEVICES 255 - #define MPT_MAX_SCSI_DEVICES 16 - #define MPT_LAST_LUN 255 - #define MPT_NON_IU_LAST_LUN 63 -@@ -137,9 +139,6 @@ - #define CAN_SLEEP 1 - #define NO_SLEEP 0 - --#define MPT_HZ 1000 --#define MPT_JIFFY 100 -- - #define MPT_COALESCING_TIMEOUT 0x10 - - /* -@@ -170,9 +169,7 @@ - /* - * Default MAX_SGE value. Can be changed by using mptbase sg_count parameter. - */ --#ifndef CONFIG_FUSION_MAX_SGE --#define CONFIG_FUSION_MAX_SGE 128 --#endif -+#define MPT_SCSI_SG_DEPTH 128 - - #ifdef __KERNEL__ /* { */ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -218,6 +215,8 @@ typedef union _MPT_FRAME_TRACKER { - struct { - struct list_head list; - u32 arg1; -+ u32 pad; -+ void *argp1; - } linkage; - /* - * NOTE: When request frames are free, on the linkage structure -@@ -277,12 +276,6 @@ typedef struct _MPT_FRAME_HDR { - } u; - } MPT_FRAME_HDR; - --typedef struct _MPT_LINKAGE { -- struct list_head list; -- MPT_FRAME_HDR *mf; --} MPT_LINKAGE; -- -- - #define MPT_REQ_MSGFLAGS_DROPME 0x80 - - typedef struct _MPT_SGL_HDR { -@@ -336,31 +329,15 @@ typedef struct _SYSIF_REGS - #define MPT_TARGET_NO_NEGO_QAS 0x04 - #define MPT_TAPE_NEGO_IDP 0x08 - --#if defined(CPQ_CIM) --struct sas_mapping{ -- u8 id; -- u8 channel; --}; -- --struct sas_device_info { -- struct list_head list; -- struct sas_mapping os; /* operating system mapping*/ -- struct sas_mapping fw; /* firmware mapping */ -- u64 sas_address; -- u32 device_info; /* specific bits for devices */ -- u8 is_logical_volume; /* is this logical volume */ -- u8 is_cached; /* cached data for a removed device */ --}; --#endif -- - /* - * VirtDevice - FC LUN device or SCSI target device - */ - typedef struct _VirtDevice { -- struct _MPT_ADAPTER *ioc; -+ struct scsi_device *device; - u16 tflags; -- u8 id; -- u8 bus; -+ u8 ioc_id; -+ u8 target_id; -+ u8 bus_id; - u8 minSyncFactor; /* 0xFF is async */ - u8 maxOffset; /* 0 if async */ - u8 maxWidth; /* 0 if narrow, 1 if wide */ -@@ -385,13 +362,9 @@ typedef struct _VirtDevice { - u8 pad2[4]; - U64 WWPN; - U64 WWNN; -- struct work_struct dvTask; -- u8 configured_lun; -+ u8 configured_lun; - } VirtDevice; - --typedef struct _MPT_DEVICE { -- VirtDevice *Target[0]; --} MPT_DEVICE; - /* - * Fibre Channel (SCSI) target device and associated defines... - */ -@@ -440,6 +413,7 @@ do { \ - #define MPT_IOCTL_STATUS_SENSE_VALID 0x08 /* Sense data is valid */ - #define MPT_IOCTL_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */ - #define MPT_IOCTL_STATUS_TMTIMER_ACTIVE 0x20 /* The TM timer is running */ -+#define MPT_IOCTL_STATUS_TM_FAILED 0x40 /* User TM request failed */ - - #define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */ - -@@ -448,10 +422,10 @@ typedef struct _MPT_IOCTL { - u8 ReplyFrame[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */ - u8 sense[MPT_SENSE_BUFFER_ALLOC]; - int wait_done; /* wake-up value for this ioc */ -+ u8 rsvd; - u8 status; /* current command status */ - u8 reset; /* 1 if bus reset allowed */ -- u8 bus; /* bus */ -- u8 id; /* id for reset */ -+ u8 target; /* target for reset */ - struct semaphore sem_ioc; - } MPT_IOCTL; - -@@ -462,7 +436,7 @@ typedef struct _MPT_IOCTL { - typedef struct _mpt_ioctl_events { - u32 event; /* Specified by define above */ - u32 eventContext; /* Index or counter */ -- u32 data[2]; /* First 8 bytes of Event Data */ -+ int data[2]; /* First 8 bytes of Event Data */ - } MPT_IOCTL_EVENTS; - - /* -@@ -477,14 +451,14 @@ typedef struct _mpt_ioctl_events { - /* dvStatus defines: */ - #define MPT_SCSICFG_NEGOTIATE 0x01 /* Negotiate on next IO */ - #define MPT_SCSICFG_NEED_DV 0x02 /* Schedule DV */ --#define MPT_SCSICFG_DV_IN_PROGRESS 0x04 /* DV on this physical id*/ -+#define MPT_SCSICFG_DV_PENDING 0x04 /* DV on this physical id pending */ - #define MPT_SCSICFG_DV_NOT_DONE 0x08 /* DV has not been performed */ --#define MPT_SCSICFG_PHYSDISK_DV_ONLY 0x10 /* DV only on this PhysDisk*/ --#define MPT_SCSICFG_BLK_NEGO 0x20 /* WriteSDP1 with WDTR and SDTR disabled*/ --#define MPT_SCSICFG_RELOAD_IOC_PG3 0x40 /* IOC Pg 3 data is obsolete */ -+#define MPT_SCSICFG_BLK_NEGO 0x10 /* WriteSDP1 with WDTR and SDTR disabled */ -+#define MPT_SCSICFG_RELOAD_IOC_PG3 0x20 /* IOC Pg 3 data is obsolete */ - /* Args passed to writeSDP1: */ - #define MPT_SCSICFG_USE_NVRAM 0x01 /* WriteSDP1 using NVRAM */ - #define MPT_SCSICFG_ALL_IDS 0x02 /* WriteSDP1 to all IDS */ -+/* #define MPT_SCSICFG_BLK_NEGO 0x10 WriteSDP1 with WDTR and SDTR disabled */ - - typedef struct _SpiCfgData { - u32 PortFlags; -@@ -520,36 +494,48 @@ typedef struct _SasCfgData { - * automatic clearing. - */ - u8 mpt_sas_hot_plug_enable; /* disables hot swap device remove support */ -- ManufacturingPage7_t *pManufPg7; /* Connector Info on SAS controllers */ - }SasCfgData; - --/* -- * Inactive volume link list of raid component data -- * @inactive_list -- */ --struct inactive_raid_component_info { -- struct list_head list; -- u8 volumeID; /* volume target id */ -- u8 volumeBus; /* volume channel */ -- IOC_3_PHYS_DISK d; /* phys disk info */ --}; -- - typedef struct _RaidCfgData { - IOCPage2_t *pIocPg2; /* table of Raid Volumes */ - IOCPage3_t *pIocPg3; /* table of physical disks */ -- IOCPage6_t *pIocPg6; /* table of IR static data */ -- int isRaid; /* bit field, 1 if RAID */ -- struct semaphore inactive_list_mutex; -- struct list_head inactive_list; /* link list for physical -- disk that belong in -- inactive volumes */ -+ int isRaid; /* bit field, 1 if RAID */ - } RaidCfgData; - - /* -- * Adapter Structure - pci_dev specific. -+ * sas device info link list - */ -+typedef struct _sas_device_info { -+ struct list_head list; -+ u64 SASAddress; -+ u8 TargetId; -+ u8 Bus; -+ u8 PhysicalPort; -+ u8 PhyNum; -+ u32 DeviceInfo; -+ u16 DevHandle; -+ u16 Flags; -+} sas_device_info_t; -+ -+/* -+ * hba phy info array -+ */ -+typedef struct _sas_phy_info { -+ u64 SASAddress; -+ u8 port; -+ u8 PortFlags; -+ u8 PhyFlags; -+ u8 NegotiatedLinkRate; -+ u16 ControllerDevHandle; -+ u16 devHandle; -+ u32 ControllerPhyDeviceInfo; -+ u8 phyId; -+ u8 hwLinkRate; -+ u8 reserved; -+} sas_phy_info_t; -+ - /* -- * Adapter Structure - pci_dev specific. -+ * Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS - */ - typedef struct _MPT_ADAPTER - { -@@ -561,18 +547,13 @@ typedef struct _MPT_ADAPTER - SYSIF_REGS __iomem *pio_chip; /* Programmed IO (downloadboot) */ - u8 bus_type; /* Parallel SCSI i/f */ - u8 pci_slot_number; /* ioc page 1 - pci slot number */ -- u8 ir_firmware; /* =1 if IR firmware detected */ - u16 deviceID; - u32 mem_phys; /* == f4020000 (mmap) */ - u32 pio_mem_phys; /* Programmed IO (downloadboot) */ - int mem_size; /* mmap memory size */ -- int sg_tablesize; /* max SGE's per IO */ -- int NumberOfBuses; -- int DevicesPerBus; - int alloc_total; - u32 last_state; - int active; -- struct _MPT_DEVICE *Target_List[MPT_MAX_BUSES]; - u8 *alloc; /* frames alloc ptr */ - dma_addr_t alloc_dma; - u32 alloc_sz; -@@ -600,12 +581,7 @@ typedef struct _MPT_ADAPTER - int req_depth; /* Number of request frames */ - int req_sz; /* Request frame size (bytes) */ - spinlock_t FreeQlock; -- spinlock_t PendingMFlock; - struct list_head FreeQ; -- MPT_FRAME_HDR *PendingMF; -- struct scsi_cmnd *PendingSCpnt; -- struct timer_list TMtimer; /* Timer for TM commands ONLY */ -- MPT_FRAME_HDR *tmPtr; /* Ptr to TM request*/ - /* Pool of SCSI sense buffers for commands coming from - * the SCSI mid-layer. We have one 256 byte sense buffer - * for each REQ entry. -@@ -638,12 +614,10 @@ typedef struct _MPT_ADAPTER - struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ - spinlock_t diagLock; /* diagnostic reset lock */ - int diagPending; -- int IOCResetInProgress; - u32 biosVersion; /* BIOS version from IO Unit Page 2 */ - int eventTypes; /* Event logging parameters */ - int eventContext; /* Next event context */ - struct _mpt_ioctl_events *events; /* pointer to event log */ -- EventNotification_t *evnp; /* event message frame pointer */ - u8 *cached_fw; /* Pointer to FW */ - dma_addr_t cached_fw_dma; - struct list_head configQ; /* linked list of config. requests */ -@@ -662,12 +636,10 @@ typedef struct _MPT_ADAPTER - /* emoore@lsil.com - sas support - start */ - U64 sas_port_WWID[4]; - u8 BoardTracerNumber[16]; -+ u8 numPhys; - u16 vendorID; --#if defined(CPQ_CIM) -- struct list_head sas_device_info_list; -- struct semaphore sas_device_info_mutex; -- u32 num_ports; --#endif -+ sas_phy_info_t *sasPhyInfo; -+ struct list_head sasDeviceList; - struct semaphore hot_plug_semaphore; - struct work_struct mptscsih_persistTask; - struct timer_list persist_timer; /* persist table timer */ -@@ -680,7 +652,7 @@ typedef struct _MPT_ADAPTER - u32 PciState[64]; /* save PCI state to this area */ - #endif - #if defined(CPQ_CIM) -- u32 csmi_change_count; /* count to track all IR events for CSMI */ -+ u32 csmi_change_count; /* count to track all IR events for CSMI */ - #endif - /* - * Description: errata_flag_1064 -@@ -694,11 +666,7 @@ typedef struct _MPT_ADAPTER - u8 upload_fw; /* If set, do a fw upload */ - u8 reload_fw; /* Force a FW Reload on next reset */ - u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */ -- u8 pad1; -- u8 CheckFcLinkSpeed; -- u8 FcLinkSpeedCheckNeeded; -- u8 FcLinkSpeed; -- MPT_FRAME_HDR *FcLinkSpeedReqActive; -+ u8 pad1[4]; - int DoneCtx; - int TaskCtx; - int InternalCtx; -@@ -811,25 +779,6 @@ typedef struct _mpt_sge { - #define DBG_DUMP_EVENT_REQUEST_FRAME(mfp) - #endif - --#ifdef MPT_DEBUG_PEND --#define dpendprintk(x) printk x --#define DBG_DUMP_PENDING_REQUEST_FRAME(ioc, mfp) \ -- { int i, n = ioc->req_sz/4; \ -- u32 *m = (u32 *)(mfp); \ -- for (i=0; i<n; i++) { \ -- if (i && ((i%8)==0)) \ -- printk("\n"); \ -- printk("%08x ", le32_to_cpu(m[i])); \ -- } \ -- printk("\n"); \ -- } --#else --#define dpendprintk(x) --#define DBG_DUMP_PENDING_REQUEST_FRAME(ioc, mfp) --#endif -- -- -- - #ifdef MPT_DEBUG_HOTPLUG - #define dhotpprintk(x) printk x - #else -@@ -838,51 +787,16 @@ typedef struct _mpt_sge { - - #ifdef MPT_DEBUG_RESET - #define drsprintk(x) printk x --#define DBG_DUMP_RESET_REQUEST_FRAME(ioc, mfp) \ -- { int i, n = ioc->req_sz/4; \ -- u32 *m = (u32 *)(mfp); \ -- for (i=0; i<n; i++) { \ -- if (i && ((i%8)==0)) \ -- printk("\n"); \ -- printk("%08x ", le32_to_cpu(m[i])); \ -- } \ -- printk("\n"); \ -- } - #else - #define drsprintk(x) --#define DBG_DUMP_RESET_REQUEST_FRAME(ioc, mfp) - #endif - - //#if defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME) - #if defined(MPT_DEBUG_MSG_FRAME) - #define dmfprintk(x) printk x --#define DBG_DUMP_REQUEST_FRAME(ioc,mfp) \ -- { int i, n = ioc->req_sz/4; -- u32 *m = (u32 *)(mfp); \ -- for (i=0; i<n; i++) { \ -- if (i && ((i%8)==0)) \ -- printk("\n"); \ -- printk("%08x ", le32_to_cpu(m[i])); \ -- } \ -- printk("\n"); \ -- } --#else --#define dmfprintk(x) --#define DBG_DUMP_REQUEST_FRAME(ioc,mfp) --#endif -- --#if defined(MPT_DEBUG_IOS) --#define dioprintk(x) printk x --#else --#define dioprintk(x) --#endif -- -- --#if defined(MPT_DEBUG_CSMI) --#define DBG_DUMP_CSMI_FRAME(mfp) \ -+#define DBG_DUMP_REQUEST_FRAME(mfp) \ - { int i, n = 24; \ - u32 *m = (u32 *)(mfp); \ -- printk("CSMI MessageFrame:\n"); \ - for (i=0; i<n; i++) { \ - if (i && ((i%8)==0)) \ - printk("\n"); \ -@@ -891,7 +805,8 @@ typedef struct _mpt_sge { - printk("\n"); \ - } - #else --#define DBG_DUMP_CSMI_FRAME(mfp) -+#define dmfprintk(x) -+#define DBG_DUMP_REQUEST_FRAME(mfp) - #endif - - #ifdef MPT_DEBUG_SG -@@ -918,22 +833,28 @@ typedef struct _mpt_sge { - #define dnegoprintk(x) - #endif - -+#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY) -+#define ddvtprintk(x) printk x -+#else -+#define ddvtprintk(x) -+#endif -+ - #ifdef MPT_DEBUG_IOCTL - #define dctlprintk(x) printk x - #else - #define dctlprintk(x) - #endif - --#ifdef MPT_DEBUG_SAS --#define dsasprintk(x) printk x -+#ifdef MPT_DEBUG_REPLY -+#define dreplyprintk(x) printk x - #else --#define dsasprintk(x) -+#define dreplyprintk(x) - #endif - --#ifdef MPT_DEBUG_CSMISAS --#define dcsmisasprintk(x) printk x -+#ifdef MPT_DEBUG_SAS -+#define dsasprintk(x) printk x - #else --#define dcsmisasprintk(x) -+#define dsasprintk(x) - #endif - - #ifdef MPT_DEBUG_TM -@@ -988,8 +909,7 @@ typedef struct _mpt_sge { - #define MPT_INDEX_2_RFPTR(ioc,idx) \ - (MPT_FRAME_HDR*)( (u8*)(ioc)->reply_frames + (ioc)->req_sz * (idx) ) - --#if defined(MPT_DEBUG_REPLY) || defined(MPT_DEBUG_MSG_FRAME) || defined(MPT_DEBUG_HANDSHAKE) --#define dreplyprintk(x) printk x -+#if defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME) || defined(MPT_DEBUG_HANDSHAKE) - #define DBG_DUMP_REPLY_FRAME(mfp) \ - { u32 *m = (u32 *)(mfp); \ - int i, n = (le32_to_cpu(m[0]) & 0x00FF0000) >> 16; \ -@@ -1006,36 +926,9 @@ typedef struct _mpt_sge { - printk(" %08x", le32_to_cpu(m[i])); \ - printk("\n"); \ - } --#define DBG_DUMP_REPLYS_REQUEST_FRAME(ioc,mfp) \ -- { int i, n = ioc->req_sz/4;; \ -- u32 *m = (u32 *)(mfp); \ -- for (i=0; i<n; i++) { \ -- if (i && ((i%8)==0)) \ -- printk("\n"); \ -- printk("%08x ", le32_to_cpu(m[i])); \ -- } \ -- printk("\n"); \ -- } --#define DBG_DUMP_SENSE_DATA(mfp) \ -- { int i, n = 8; \ -- u32 *m = (u32 *)(mfp); \ -- printk(KERN_INFO "SENSE DATA: "); \ -- for (i=0; i<n; i++) \ -- printk(" %08x", le32_to_cpu(m[i])); \ -- printk("\n"); \ -- } - #else --#define dreplyprintk(x) - #define DBG_DUMP_REPLY_FRAME(mfp) - #define DBG_DUMP_REQUEST_FRAME_HDR(mfp) --#define DBG_DUMP_REPLYS_REQUEST_FRAME(ioc,mfp) --#define DBG_DUMP_SENSE_DATA(mfp) --#endif -- --#if defined (MPT_DEBUG_ERROR) || defined(MPT_DEBUG_REPLY) --#define derrprintk(x) printk x --#else --#define derrprintk(x) - #endif - - -@@ -1095,34 +988,32 @@ typedef struct _MPT_SCSI_HOST { - u32 pad0; - struct scsi_cmnd **ScsiLookup; - struct scsi_device *device; -+ VirtDevice **Targets; - MPT_LOCAL_REPLY *pLocal; /* used for internal commands */ -- struct timer_list InternalCmdTimer; -+ struct timer_list timer; - /* Pool of memory for holding SCpnts before doing - * OS callbacks. freeQ is the free pool. - */ - u8 tmPending; - u8 resetPending; -+ u8 negoNvram; /* DV disabled, nego NVRAM */ -+ u8 pad1; - u8 tmState; -- u8 rsvd[4]; -+ u8 rsvd[2]; - MPT_FRAME_HDR *cmdPtr; /* Ptr to nonOS request */ - struct scsi_cmnd *abortSCpnt; - MPT_LOCAL_REPLY localReply; /* internal cmd reply struct */ - unsigned long hard_resets; /* driver forced bus resets count */ - unsigned long soft_resets; /* fw/external bus resets count */ - unsigned long timeouts; /* cmd timeouts */ -- ushort sel_timeout[MPT_MAX_SCSI_DEVICES]; -+ ushort sel_timeout[MPT_MAX_FC_DEVICES]; - char *info_kbuf; - wait_queue_head_t scandv_waitq; - int scandv_wait_done; -- wait_queue_head_t TM_waitq; -- int TM_wait_done; - long last_queue_full; -- u8 mpt_pq_filter; -- u16 tm_iocstatus; -- struct list_head target_reset_list; -+ u8 mpt_pq_filter; - } MPT_SCSI_HOST; - -- - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* - * More Dynamic Multi-Pathing stuff... -@@ -1176,29 +1067,20 @@ extern void mpt_free_msg_frame(MPT_ADAP - extern void mpt_put_msg_frame(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); - extern void mpt_add_sge(char *pAddr, u32 flagslength, dma_addr_t dma_addr); - --extern int mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, --u32 *req, ulong timeout, int sleepFlag); -- -+extern int mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag); - extern int mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp); - extern u32 mpt_GetIocState(MPT_ADAPTER *ioc, int cooked); - extern void mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buf, int *size, int len, int showlan); - extern int mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag); -- --extern int mpt_SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag); --extern void mptscsih_TM_timeout(unsigned long data); -- - extern int mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *cfg); --extern int mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag); --extern int mpt_writeSDP1(MPT_ADAPTER *ioc, int portnum, int id, int flags); --extern void mpt_setSDP1parameters (u8 width, u8 factor, u8 offset, u8 flags, int *requestedPtr, int *configurationPtr); - extern void mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size); - extern void mpt_free_fw_memory(MPT_ADAPTER *ioc); - extern int mpt_findImVolumes(MPT_ADAPTER *ioc); - extern int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc); - extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); -+extern int mpt_sas_get_info(MPT_ADAPTER *ioc); -+extern void mpt_poll_interrupt(MPT_ADAPTER *ioc); - extern int mpt_alt_ioc_wait(MPT_ADAPTER *ioc); --extern void mpt_poll_interrupt(MPT_ADAPTER *ioc); --extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk); - - /* - * Public data decl's... -@@ -1237,7 +1119,7 @@ extern int mpt_sg_tablesize; - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - #endif /* } __KERNEL__ */ - --#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) || defined(__powerpc__) -+#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) - #define CAST_U32_TO_PTR(x) ((void *)(u64)x) - #define CAST_PTR_TO_U32(x) ((u32)(u64)x) - #else -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptctl.c linux-2.6.9-55.0.12/drivers/message/fusion/mptctl.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptctl.c 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptctl.c 2007-11-02 09:10:23.000000000 +0100 -@@ -4,8 +4,8 @@ - * For use with LSI Logic PCI chip/adapters - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - */ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -57,6 +57,9 @@ - #include <linux/miscdevice.h> - #include <linux/smp_lock.h> - #include <linux/compat.h> -+#if defined(CPQ_CIM) -+#include "csmisas.h" -+#endif // CPQ_CIM - - #include <asm/io.h> - #include <asm/uaccess.h> -@@ -67,16 +70,11 @@ - #include <scsi/scsi_host.h> - #include <scsi/scsi_tcq.h> - --#define COPYRIGHT "Copyright (c) 1999-2007 LSI Logic Corporation" -+#define COPYRIGHT "Copyright (c) 1999-2005 LSI Logic Corporation" - #define MODULEAUTHOR "LSI Logic Corporation" - #include "mptbase.h" - #include "mptctl.h" - --#if defined(CPQ_CIM) --#include "mptsas.h" --#include "csmi/csmisas.h" --#endif // CPQ_CIM -- - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - #define my_NAME "Fusion MPT misc device (ioctl) driver" - #define my_VERSION MPT_LINUX_VERSION_COMMON -@@ -85,12 +83,10 @@ - MODULE_AUTHOR(MODULEAUTHOR); - MODULE_DESCRIPTION(my_NAME); - MODULE_LICENSE("GPL"); --MODULE_VERSION(my_VERSION); - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - - extern int mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag); --extern int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, u32 *req, int replyBytes, u16 *u16reply, int maxwait, int sleepFlag); - - static int mptctl_id = -1; - -@@ -119,10 +115,6 @@ static int mptctl_eventenable(unsigned l - static int mptctl_eventreport(unsigned long arg); - static int mptctl_replace_fw(unsigned long arg); - --#ifdef MPT_SUPPORT_FWDLB_IOCTL --static int mptctl_hba_pciinfo(unsigned long arg); --#endif -- - static int mptctl_do_reset(unsigned long arg); - static int mptctl_hp_hostinfo(unsigned long arg, unsigned int cmd); - static int mptctl_hp_targetinfo(unsigned long arg); -@@ -133,29 +125,27 @@ static int mptctl_unregister_diag_buffer - static int mptctl_query_diag_buffer(unsigned long arg); - static int mptctl_read_diag_buffer(unsigned long arg); - #if defined(CPQ_CIM) --static int csmisas_get_driver_info(unsigned long arg); --static int csmisas_get_cntlr_status(unsigned long arg); --static int csmisas_get_cntlr_config(unsigned long arg); --static int csmisas_get_phy_info(unsigned long arg); --static int csmisas_get_scsi_address(unsigned long arg); --static int csmisas_get_link_errors(unsigned long arg); --static int csmisas_smp_passthru(unsigned long arg); --static int csmisas_firmware_download(unsigned long arg); --static int csmisas_get_raid_info(unsigned long arg); --static int csmisas_get_raid_config(unsigned long arg); --static int csmisas_get_raid_features(unsigned long arg); --static int csmisas_set_raid_control(unsigned long arg); --static int csmisas_get_raid_element(unsigned long arg); --static int csmisas_set_raid_operation(unsigned long arg); --static int csmisas_set_phy_info(unsigned long arg); --static int csmisas_ssp_passthru(unsigned long arg); --static int csmisas_stp_passthru(unsigned long arg); --static int csmisas_get_sata_signature(unsigned long arg); --static int csmisas_get_device_address(unsigned long arg); --static int csmisas_task_managment(unsigned long arg); --static int csmisas_phy_control(unsigned long arg); --static int csmisas_get_connector_info(unsigned long arg); --static int csmisas_get_location(unsigned long arg); -+static int mptctl_csmi_sas_get_driver_info(unsigned long arg); -+static int mptctl_csmi_sas_get_cntlr_status(unsigned long arg); -+static int mptctl_csmi_sas_get_cntlr_config(unsigned long arg); -+static int mptctl_csmi_sas_get_phy_info(unsigned long arg); -+static int mptctl_csmi_sas_get_scsi_address(unsigned long arg); -+static int mptctl_csmi_sas_get_link_errors(unsigned long arg); -+static int mptctl_csmi_sas_smp_passthru(unsigned long arg); -+static int mptctl_csmi_sas_firmware_download(unsigned long arg); -+static int mptctl_csmi_sas_get_raid_info(unsigned long arg); -+static int mptctl_csmi_sas_get_raid_config(unsigned long arg); -+static int mptctl_csmi_sas_get_raid_features(unsigned long arg); -+static int mptctl_csmi_sas_get_raid_control(unsigned long arg); -+static int mptctl_csmi_sas_set_phy_info(unsigned long arg); -+static int mptctl_csmi_sas_ssp_passthru(unsigned long arg); -+static int mptctl_csmi_sas_stp_passthru(unsigned long arg); -+static int mptctl_csmi_sas_get_sata_signature(unsigned long arg); -+static int mptctl_csmi_sas_get_device_address(unsigned long arg); -+static int mptctl_csmi_sas_task_managment(unsigned long arg); -+static int mptctl_csmi_sas_phy_control(unsigned long arg); -+static int mptctl_csmi_sas_get_connector_info(unsigned long arg); -+static int mptctl_csmi_sas_get_location(unsigned long arg); - #endif // CPQ_CIM - - static int mptctl_probe(struct pci_dev *, const struct pci_device_id *); -@@ -230,7 +220,7 @@ static inline int - mptctl_syscall_down(MPT_ADAPTER *ioc, int nonblock) - { - int rc = 0; -- dctlprintk((KERN_INFO MYNAM ": mptctl_syscall_down(%p,%d) called\n", ioc, nonblock)); -+ dctlprintk((KERN_INFO MYNAM "::mptctl_syscall_down(%p,%d) called\n", ioc, nonblock)); - - if (nonblock) { - if (down_trylock(&ioc->ioctl->sem_ioc)) -@@ -239,7 +229,7 @@ mptctl_syscall_down(MPT_ADAPTER *ioc, in - if (down_interruptible(&ioc->ioctl->sem_ioc)) - rc = -ERESTARTSYS; - } -- dctlprintk((KERN_INFO MYNAM ": mptctl_syscall_down return %d\n", rc)); -+ dctlprintk((KERN_INFO MYNAM "::mptctl_syscall_down return %d\n", rc)); - return rc; - } - -@@ -304,17 +294,9 @@ mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME - - if ((cmd == MPI_FUNCTION_SCSI_IO_REQUEST) || - (cmd == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { -- -- dcsmisasprintk(("\tiocstatus = 0x%x, " -- "scsi_status = 0x%x, scsi_state = 0x%x\n", -- reply->u.sreply.IOCStatus, -- reply->u.sreply.SCSIStatus, -- reply->u.sreply.SCSIState)); -- - ioc->ioctl->reset &= ~MPTCTL_RESET_OK; - - if ((iocStatus == MPI_IOCSTATUS_SCSI_DATA_UNDERRUN) || -- (iocStatus == MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH) || - (iocStatus == MPI_IOCSTATUS_SCSI_RECOVERED_ERROR)) { - ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD; - } -@@ -438,8 +420,8 @@ mptctl_bus_reset(MPT_IOCTL *ioctl) - ioctl->ioc->name, mf)); - - pScsiTm = (SCSITaskMgmt_t *) mf; -- pScsiTm->TargetID = ioctl->id; -- pScsiTm->Bus = ioctl->bus; -+ pScsiTm->TargetID = ioctl->target; -+ pScsiTm->Bus = hd->port; /* 0 */ - pScsiTm->ChainOffset = 0; - pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT; - pScsiTm->Reserved = 0; -@@ -460,7 +442,7 @@ mptctl_bus_reset(MPT_IOCTL *ioctl) - - ioctl->wait_done=0; - if ((retval = mpt_send_handshake_request(mptctl_id, ioctl->ioc, -- sizeof(SCSITaskMgmt_t), (u32*)pScsiTm,10, CAN_SLEEP)) != 0) { -+ sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP)) != 0) { - dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!" - " (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd, - hd->ioc, mf)); -@@ -652,7 +634,7 @@ __mptctl_ioctl(struct file *file, unsign - dctlprintk(("mptctl_ioctl() called with cmd=%x\n", cmd)); - - if (copy_from_user(&khdr, uhdr, sizeof(khdr))) { -- printk(KERN_ERR "%s: mptctl_ioctl() @%d - " -+ printk(KERN_ERR "%s::mptctl_ioctl() @%d - " - "Unable to copy mpt_ioctl_header data @ %p\n", - __FILE__, __LINE__, uhdr); - return -EFAULT; -@@ -693,38 +675,28 @@ __mptctl_ioctl(struct file *file, unsign - return mptctl_query_diag_buffer(arg); - } else if (cmd == MPTDIAGUNREGISTER) { - return mptctl_unregister_diag_buffer(arg); -- -- } --#ifdef MPT_SUPPORT_FWDLB_IOCTL -- else if (cmd == MPTHBAPCIINFO) { -- return mptctl_hba_pciinfo(arg); - } --#endif - - #if defined(CPQ_CIM) - else if (cmd == CC_CSMI_SAS_GET_DRIVER_INFO) { -- return csmisas_get_driver_info(arg); -+ return mptctl_csmi_sas_get_driver_info(arg); - } else if (cmd == CC_CSMI_SAS_GET_CNTLR_CONFIG) { -- return csmisas_get_cntlr_config(arg); -+ return mptctl_csmi_sas_get_cntlr_config(arg); - } else if (cmd == CC_CSMI_SAS_GET_CNTLR_STATUS) { -- return csmisas_get_cntlr_status(arg); -+ return mptctl_csmi_sas_get_cntlr_status(arg); - } else if (cmd == CC_CSMI_SAS_GET_SCSI_ADDRESS) { -- return csmisas_get_scsi_address(arg); -+ return mptctl_csmi_sas_get_scsi_address(arg); - } else if (cmd == CC_CSMI_SAS_GET_DEVICE_ADDRESS){ -- return csmisas_get_device_address(arg); -+ return mptctl_csmi_sas_get_device_address(arg); - } - #endif // CPQ_CIM - -- dctlprintk(("mptctl_ioctl() called with cmd=%x, interrupt required\n", cmd)); - /* All of these commands require an interrupt or - * are unknown/illegal. - */ -- if ((ret = mptctl_syscall_down(iocp, nonblock)) != 0) { -- dctlprintk(("mptctl_ioctl() called with cmd=%x ret=%d, syscall_down failed\n", cmd, ret)); -+ if ((ret = mptctl_syscall_down(iocp, nonblock)) != 0) - return ret; -- } - -- dctlprintk(("mptctl_ioctl() called with cmd=%x, syscall_down completed\n", cmd)); - if (cmd == MPTFWDOWNLOAD) - ret = mptctl_fw_download(arg); - else if (cmd == MPTFWDOWNLOADBOOT) -@@ -745,41 +717,37 @@ __mptctl_ioctl(struct file *file, unsign - ret = mptctl_read_diag_buffer(arg); - #if defined(CPQ_CIM) - else if (cmd == CC_CSMI_SAS_GET_PHY_INFO) -- ret = csmisas_get_phy_info(arg); -+ ret = mptctl_csmi_sas_get_phy_info(arg); - else if (cmd == CC_CSMI_SAS_GET_SATA_SIGNATURE) -- ret = csmisas_get_sata_signature(arg); -+ ret = mptctl_csmi_sas_get_sata_signature(arg); - else if (cmd == CC_CSMI_SAS_GET_LINK_ERRORS) -- ret = csmisas_get_link_errors(arg); -+ ret = mptctl_csmi_sas_get_link_errors(arg); - else if (cmd == CC_CSMI_SAS_SMP_PASSTHRU) -- ret = csmisas_smp_passthru(arg); -+ ret = mptctl_csmi_sas_smp_passthru(arg); - else if (cmd == CC_CSMI_SAS_SSP_PASSTHRU) -- ret = csmisas_ssp_passthru(arg); -+ ret = mptctl_csmi_sas_ssp_passthru(arg); - else if (cmd == CC_CSMI_SAS_FIRMWARE_DOWNLOAD) -- ret = csmisas_firmware_download(arg); -+ ret = mptctl_csmi_sas_firmware_download(arg); - else if (cmd == CC_CSMI_SAS_GET_RAID_INFO) -- ret = csmisas_get_raid_info(arg); -+ ret = mptctl_csmi_sas_get_raid_info(arg); - else if (cmd == CC_CSMI_SAS_GET_RAID_CONFIG) -- ret = csmisas_get_raid_config(arg); -- else if (cmd == CC_CSMI_SAS_GET_RAID_FEATURES) -- ret = csmisas_get_raid_features(arg); -- else if (cmd == CC_CSMI_SAS_SET_RAID_CONTROL) -- ret = csmisas_set_raid_control(arg); -- else if (cmd == CC_CSMI_SAS_GET_RAID_ELEMENT) -- ret = csmisas_get_raid_element(arg); -- else if (cmd == CC_CSMI_SAS_SET_RAID_OPERATION) -- ret = csmisas_set_raid_operation(arg); -+ ret = mptctl_csmi_sas_get_raid_config(arg); -+ else if (cmd == CC_CSMI_SAS_GET_RAID_FEATURES) -+ ret = mptctl_csmi_sas_get_raid_features(arg); -+ else if (cmd == CC_CSMI_SAS_SET_RAID_CONTROL) -+ ret = mptctl_csmi_sas_get_raid_control(arg); - else if (cmd == CC_CSMI_SAS_SET_PHY_INFO) -- ret = csmisas_set_phy_info(arg); -+ ret = mptctl_csmi_sas_set_phy_info(arg); - else if (cmd == CC_CSMI_SAS_STP_PASSTHRU) -- ret = csmisas_stp_passthru(arg); -+ ret = mptctl_csmi_sas_stp_passthru(arg); - else if (cmd == CC_CSMI_SAS_TASK_MANAGEMENT) -- ret = csmisas_task_managment(arg); -+ ret = mptctl_csmi_sas_task_managment(arg); - else if (cmd == CC_CSMI_SAS_PHY_CONTROL) -- ret = csmisas_phy_control(arg); -+ ret = mptctl_csmi_sas_phy_control(arg); - else if (cmd == CC_CSMI_SAS_GET_CONNECTOR_INFO) -- ret = csmisas_get_connector_info(arg); -+ ret = mptctl_csmi_sas_get_connector_info(arg); - else if (cmd == CC_CSMI_SAS_GET_LOCATION) -- ret = csmisas_get_location(arg); -+ ret = mptctl_csmi_sas_get_location(arg); - #endif // CPQ_CIM - else { - dctlprintk(("mptctl_ioctl() cmd=%x not found\n", cmd)); -@@ -788,7 +756,6 @@ __mptctl_ioctl(struct file *file, unsign - - up(&iocp->ioctl->sem_ioc); - -- dctlprintk(("mptctl_ioctl() called with cmd=%x ret=%d, up completed\n", cmd, ret)); - return ret; - } - -@@ -813,7 +780,7 @@ static int mptctl_do_reset(unsigned long - dctlprintk(("mptctl_do_reset called.\n")); - - if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) { -- printk(KERN_ERR "%s@%d: mptctl_do_reset - " -+ printk(KERN_ERR "%s@%d::mptctl_do_reset - " - "Unable to copy mpt_ioctl_diag_reset struct @ %p\n", - __FILE__, __LINE__, urinfo); - return -EFAULT; -@@ -858,7 +825,7 @@ mptctl_fw_download(unsigned long arg) - - dctlprintk(("mptctl_fwdl called. mptctl_id = %xh\n", mptctl_id)); //tc - if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) { -- printk(KERN_ERR "%s@%d: _ioctl_fwdl - " -+ printk(KERN_ERR "%s@%d::_ioctl_fwdl - " - "Unable to copy mpt_fw_xfer struct @ %p\n", - __FILE__, __LINE__, ufwdl); - return -EFAULT; -@@ -1014,7 +981,7 @@ mptctl_do_fw_download(int ioc, char __us - mpt_add_sge(sgOut, sgIn->FlagsLength, sgIn->Address); - n++; - if (copy_from_user(bl->kptr, ufwbuf+fw_bytes_copied, bl->len)) { -- printk(KERN_ERR "%s@%d: _ioctl_fwdl - " -+ printk(KERN_ERR "%s@%d::_ioctl_fwdl - " - "Unable to copy f/w buffer hunk#%d @ %p\n", - __FILE__, __LINE__, n, ufwbuf); - goto fwdl_out; -@@ -1040,9 +1007,6 @@ mptctl_do_fw_download(int ioc, char __us - * Finally, perform firmware download. - */ - ReplyMsg = NULL; -- iocp->ioctl->wait_done = 0; -- INITIALIZE_IOCTL_STATUS(iocp->ioctl->status) -- - mpt_put_msg_frame(mptctl_id, iocp, mf); - - /* Now wait for the command to complete */ -@@ -1075,7 +1039,7 @@ mptctl_do_fw_download(int ioc, char __us - printk(KERN_WARNING MYNAM ": (try again later?)\n"); - return -EBUSY; - } else { -- printk(KERN_WARNING MYNAM ": ioctl_fwdl() ERROR! %s returned [bad] status = %04xh\n", -+ printk(KERN_WARNING MYNAM "::ioctl_fwdl() ERROR! %s returned [bad] status = %04xh\n", - iocp->name, iocstat); - printk(KERN_WARNING MYNAM ": (bad VooDoo)\n"); - return -ENOMSG; -@@ -1111,7 +1075,7 @@ mptctl_fw_downloadboot(unsigned long arg - - dctlprintk(("mptctl_fwdlboot called. mptctl_id = %xh\n", mptctl_id)); //tc - if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) { -- printk(KERN_ERR "%s@%d: _ioctl_fwdl - " -+ printk(KERN_ERR "%s@%d::_ioctl_fwdl - " - "Unable to copy mpt_fw_xfer struct @ %p\n", - __FILE__, __LINE__, ufwdl); - return -EFAULT; -@@ -1149,20 +1113,11 @@ mptctl_do_fw_downloadboot(int ioc_num, c - return -ENODEV; /* (-6) No such device or address */ - } - -- pbuf = (char *)__get_free_pages(GFP_KERNEL, get_order(fwlen)); -- if (pbuf==NULL) { -- printk(KERN_ERR "%s@%d: _ioctl_fwdlboot - " -- "Unable to allocate memory\n", -- __FILE__, __LINE__); -- return -ENOMEM; -- } -- -- --if (copy_from_user(pbuf, ufwbuf, fwlen)) { -- printk(KERN_ERR "%s@%d: _ioctl_fwdlboot - " -+ pbuf = kmalloc(fwlen, GFP_KERNEL); -+ if (copy_from_user(pbuf, ufwbuf, fwlen)) { -+ printk(KERN_ERR "%s@%d::_ioctl_fwdlboot - " - "Unable to copy mpt_fw @ %p\n", - __FILE__, __LINE__, (void*)ufwbuf); --free_pages((unsigned long)pbuf, get_order(fwlen)); - return -EFAULT; - } - -@@ -1171,10 +1126,7 @@ free_pages((unsigned long)pbuf, get_orde - - rc = mpt_downloadboot(ioc, (MpiFwHeader_t *)pbuf, CAN_SLEEP); - ddlprintk((MYIOC_s_INFO_FMT "mptctl_do_fw_downloadboot rc=%x\n", -- - ioc->name, rc)); --#if 0 -- - if ( (rc == 0) && (ioc->bus_type == SAS) ) { - /* if ((rc = mptctl_syscall_down(ioc, nonblock)) != 0) - return rc; */ -@@ -1194,12 +1146,10 @@ free_pages((unsigned long)pbuf, get_orde - ioc->name)); - } */ - } --#endif --free_pages((unsigned long)pbuf, get_order(fwlen)); -+ kfree(pbuf); - return rc; - } - -- - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* - * SGE Allocation routine -@@ -1278,9 +1228,9 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i - if (buflist[buflist_ent].kptr == NULL) { - alloc_sz = alloc_sz / 2; - if (alloc_sz == 0) { -- printk(KERN_WARNING MYNAM ": -SG: No can do - " -+ printk(KERN_WARNING MYNAM "-SG: No can do - " - "not enough memory! :-(\n"); -- printk(KERN_WARNING MYNAM ": -SG: (freeing %d frags)\n", -+ printk(KERN_WARNING MYNAM "-SG: (freeing %d frags)\n", - numfrags); - goto free_and_fail; - } -@@ -1304,17 +1254,17 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i - - /* Need to chain? */ - if (fragcnt == sg_spill) { -- printk(KERN_WARNING MYNAM ": -SG: No can do - " "Chain required! :-(\n"); -- printk(KERN_WARNING MYNAM ": (freeing %d frags)\n", numfrags); -+ printk(KERN_WARNING MYNAM "-SG: No can do - " "Chain required! :-(\n"); -+ printk(KERN_WARNING MYNAM "(freeing %d frags)\n", numfrags); - goto free_and_fail; - } - - /* overflow check... */ - if (numfrags*8 > MAX_SGL_BYTES){ - /* GRRRRR... */ -- printk(KERN_WARNING MYNAM ": -SG: No can do - " -+ printk(KERN_WARNING MYNAM "-SG: No can do - " - "too many SG frags! :-(\n"); -- printk(KERN_WARNING MYNAM ": -SG: (freeing %d frags)\n", -+ printk(KERN_WARNING MYNAM "-SG: (freeing %d frags)\n", - numfrags); - goto free_and_fail; - } -@@ -1435,16 +1385,18 @@ mptctl_getiocinfo (unsigned long arg, un - struct mpt_ioctl_iocinfo __user *uarg = (void __user *) arg; - struct mpt_ioctl_iocinfo *karg; - MPT_ADAPTER *ioc; -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *pTarget; - struct pci_dev *pdev; -+ struct Scsi_Host *sh; -+ MPT_SCSI_HOST *hd; - int iocnum; - int numDevices = 0; -- int id, bus; -+ unsigned int max_id; -+ int ii; - unsigned int port; - int cim_rev; - u8 revision; - -+ dctlprintk(("mptctl_getiocinfo called.\n")); - /* Add of PCI INFO results in unaligned access for - * IA64 and Sparc. Reset long to int. Return no PCI - * data for obsolete format. -@@ -1457,20 +1409,18 @@ mptctl_getiocinfo (unsigned long arg, un - cim_rev = 2; - else if (data_size == (sizeof(struct mpt_ioctl_iocinfo_rev0)+12)) - cim_rev = 0; /* obsolete */ -- else { -- dctlprintk(("mptctl_getiocinfo called.i Invalid data_size=%d\n", data_size)); -+ else - return -EFAULT; -- } - - karg = kmalloc(data_size, GFP_KERNEL); - if (karg == NULL) { -- printk(KERN_ERR "%s: mpt_ioctl_iocinfo() @%d - no memory available!\n", -+ printk(KERN_ERR "%s::mpt_ioctl_iocinfo() @%d - no memory available!\n", - __FILE__, __LINE__); - return -ENOMEM; - } - - if (copy_from_user(karg, uarg, data_size)) { -- printk(KERN_ERR "%s@%d: mptctl_getiocinfo - " -+ printk(KERN_ERR "%s@%d::mptctl_getiocinfo - " - "Unable to read in mpt_ioctl_iocinfo struct @ %p\n", - __FILE__, __LINE__, (void*)uarg); - kfree(karg); -@@ -1484,11 +1434,10 @@ mptctl_getiocinfo (unsigned long arg, un - kfree(karg); - return -ENODEV; - } -- dctlprintk(("ioc%d: mptctl_getiocinfo called.\n", iocnum)); - - /* Verify the data transfer size is correct. */ - if (karg->hdr.maxDataSize != data_size) { -- printk(KERN_ERR "%s@%d: mptctl_getiocinfo - " -+ printk(KERN_ERR "%s@%d::mptctl_getiocinfo - " - "Structure size mismatch. Command not completed.\n", - __FILE__, __LINE__); - kfree(karg); -@@ -1535,11 +1484,18 @@ mptctl_getiocinfo (unsigned long arg, un - - /* Get number of devices - */ -- for (bus = 0; bus < ioc->NumberOfBuses; bus++) { -- if ((pMptTarget = ioc->Target_List[bus])) { -- for (id = 0; id < ioc->DevicesPerBus; id++) { -- pTarget = pMptTarget->Target[id]; -- if (pTarget) -+ if ((sh = ioc->sh) != NULL) { -+ /* sh->max_id = maximum target ID + 1 -+ */ -+ max_id = sh->max_id - 1; -+ hd = (MPT_SCSI_HOST *) sh->hostdata; -+ -+ /* Check all of the target structures and -+ * keep a counter. -+ */ -+ if (hd && hd->Targets) { -+ for (ii = 0; ii <= max_id; ii++) { -+ if (hd->Targets[ii]) - numDevices++; - } - } -@@ -1563,7 +1519,7 @@ mptctl_getiocinfo (unsigned long arg, un - /* Copy the data from kernel memory to user memory - */ - if (copy_to_user((char __user *)arg, karg, data_size)) { -- printk(KERN_ERR "%s@%d: mptctl_getiocinfo - " -+ printk(KERN_ERR "%s@%d::mptctl_getiocinfo - " - "Unable to write out mpt_ioctl_iocinfo struct @ %p\n", - __FILE__, __LINE__, uarg); - kfree(karg); -@@ -1590,22 +1546,25 @@ mptctl_gettargetinfo (unsigned long arg) - struct mpt_ioctl_targetinfo __user *uarg = (void __user *) arg; - struct mpt_ioctl_targetinfo karg; - MPT_ADAPTER *ioc; -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *pTarget; -+ struct Scsi_Host *sh; -+ MPT_SCSI_HOST *hd; -+ VirtDevice *vdev; - char *pmem; - int *pdata; - IOCPage2_t *pIoc2; - IOCPage3_t *pIoc3; - int iocnum; - int numDevices = 0; -+ unsigned int max_id; - int id, jj, indexed_lun, lun_index; - u32 lun; - int maxWordsLeft; - int numBytes; -- u8 port, devType, bus; -+ u8 port, devType, bus_id; - -+ dctlprintk(("mptctl_gettargetinfo called.\n")); - if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_targetinfo))) { -- printk(KERN_ERR "%s@%d: mptctl_gettargetinfo - " -+ printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - " - "Unable to read in mpt_ioctl_targetinfo struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -1618,7 +1577,6 @@ mptctl_gettargetinfo (unsigned long arg) - return -ENODEV; - } - -- dctlprintk(("ioc%ds: mptctl_gettargetinfo called.\n", iocnum)); - /* Get the port number and set the maximum number of bytes - * in the returned structure. - * Ignore the port setting. -@@ -1628,7 +1586,7 @@ mptctl_gettargetinfo (unsigned long arg) - port = karg.hdr.port; - - if (maxWordsLeft <= 0) { -- printk(KERN_ERR "%s: mptctl_gettargetinfo() @%d - no memory available!\n", -+ printk(KERN_ERR "%s::mptctl_gettargetinfo() @%d - no memory available!\n", - __FILE__, __LINE__); - return -ENOMEM; - } -@@ -1649,7 +1607,7 @@ mptctl_gettargetinfo (unsigned long arg) - */ - pmem = kmalloc(numBytes, GFP_KERNEL); - if (pmem == NULL) { -- printk(KERN_ERR "%s: mptctl_gettargetinfo() @%d - no memory available!\n", -+ printk(KERN_ERR "%s::mptctl_gettargetinfo() @%d - no memory available!\n", - __FILE__, __LINE__); - return -ENOMEM; - } -@@ -1658,68 +1616,71 @@ mptctl_gettargetinfo (unsigned long arg) - - /* Get number of devices - */ -- /* Check all of the target structures. -- * Save the Id and increment the counter, -- * if ptr non-null. -- */ -- mpt_findImVolumes(ioc); -- pIoc2 = ioc->raid_data.pIocPg2; -- for (bus = 0; bus < ioc->NumberOfBuses; bus++) { -- for ( id = 0; id < ioc->DevicesPerBus; ) { -- if ( pIoc2 && pIoc2->NumActiveVolumes ) { -- if ( id == pIoc2->RaidVolume[0].VolumeID ) { -- if (maxWordsLeft <= 0) { -- printk(KERN_ERR "mptctl_gettargetinfo - " -- "buffer is full but volume is available on ioc %d\n, numDevices=%d", iocnum, numDevices); -- goto data_space_full; -- } -- if ( ( pIoc2->RaidVolume[0].Flags & MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE ) == 0 ) -- devType = 0x80; -- else -- devType = 0xC0; -- if ( bus == pIoc2->RaidVolume[0].VolumeBus) { -- numDevices++; -- *pdata = ( (devType << 24) | (bus<< 8) | id ); -+ if ((sh = ioc->sh) != NULL) { -+ -+ max_id = sh->max_id - 1; -+ hd = (MPT_SCSI_HOST *) sh->hostdata; -+ -+ /* Check all of the target structures. -+ * Save the Id and increment the counter, -+ * if ptr non-null. -+ * sh->max_id = maximum target ID + 1 -+ */ -+ if (hd && hd->Targets) { -+ mpt_findImVolumes(ioc); -+ pIoc2 = ioc->raid_data.pIocPg2; -+ for ( id = 0; id <= max_id; ) { -+ if ( pIoc2 && pIoc2->NumActiveVolumes ) { -+ if ( id == pIoc2->RaidVolume[0].VolumeID ) { -+ if (maxWordsLeft <= 0) { -+ printk(KERN_ERR "mptctl_gettargetinfo - " -+ "buffer is full but volume is available on ioc %d\n, numDevices=%d", iocnum, numDevices); -+ goto data_space_full; -+ } -+ if ( ( pIoc2->RaidVolume[0].Flags & MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE ) == 0 ) -+ devType = 0x80; -+ else -+ devType = 0xC0; -+ bus_id = pIoc2->RaidVolume[0].VolumeBus; -+ numDevices++; -+ *pdata = ( (devType << 24) | (bus_id << 8) | id ); - dctlprintk((KERN_ERR "mptctl_gettargetinfo - " - "volume ioc=%d target=%x numDevices=%d pdata=%p\n", iocnum, *pdata, numDevices, pdata)); -- pdata++; -+ pdata++; - --maxWordsLeft; - goto next_id; -- } -- } else { -- pIoc3 = ioc->raid_data.pIocPg3; -- for ( jj = 0; jj < pIoc3->NumPhysDisks; jj++ ) { -- if ((pIoc3->PhysDisk[jj].PhysDiskID == id) && (pIoc3->PhysDisk[jj].PhysDiskBus == bus)) -- goto next_id; -+ } else { -+ pIoc3 = ioc->raid_data.pIocPg3; -+ for ( jj = 0; jj < pIoc3->NumPhysDisks; jj++ ) { -+ if ( pIoc3->PhysDisk[jj].PhysDiskID == id ) -+ goto next_id; -+ } - } - } -- } -- if ((pMptTarget = ioc->Target_List[bus])) { -- pTarget = pMptTarget->Target[id]; -- if (pTarget) { -+ if ( (vdev = hd->Targets[id]) ) { - for (jj = 0; jj <= MPT_LAST_LUN; jj++) { - lun_index = (jj >> 5); - indexed_lun = (jj % 32); - lun = (1 << indexed_lun); -- if (pTarget->luns[lun_index] & lun) { -+ if (vdev->luns[lun_index] & lun) { - if (maxWordsLeft <= 0) { - printk(KERN_ERR "mptctl_gettargetinfo - " -- "buffer is full but more targets are available on ioc %d numDevices=%d\n", iocnum, numDevices); -+ "buffer is full but more targets are available on ioc %d numDevices=%d\n", iocnum, numDevices); - goto data_space_full; - } -- bus = pTarget->bus; -+ bus_id = vdev->bus_id; - numDevices++; -- *pdata = ( (jj << 16) | (bus << 8) | id ); -+ *pdata = ( (jj << 16) | (bus_id << 8) | id ); - dctlprintk((KERN_ERR "mptctl_gettargetinfo - " -- "target ioc=%d target=%x numDevices=%d pdata=%p\n", iocnum, *pdata, numDevices, pdata)); -+ "target ioc=%d target=%x numDevices=%d pdata=%p\n", iocnum, *pdata, numDevices, pdata)); - pdata++; - --maxWordsLeft; - } - } - } -- } - next_id: -- id++; -+ id++; -+ } - } - } - data_space_full: -@@ -1729,7 +1690,7 @@ data_space_full: - */ - if (copy_to_user((char __user *)arg, &karg, - sizeof(struct mpt_ioctl_targetinfo))) { -- printk(KERN_ERR "%s@%d: mptctl_gettargetinfo - " -+ printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - " - "Unable to write out mpt_ioctl_targetinfo struct @ %p\n", - __FILE__, __LINE__, uarg); - kfree(pmem); -@@ -1739,7 +1700,7 @@ data_space_full: - /* Copy the remaining data from kernel memory to user memory - */ - if (copy_to_user(uarg->targetInfo, pmem, numBytes)) { -- printk(KERN_ERR "%s@%d: mptctl_gettargetinfo - " -+ printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - " - "Unable to write out mpt_ioctl_targetinfo struct @ %p\n", - __FILE__, __LINE__, pdata); - kfree(pmem); -@@ -1751,70 +1712,6 @@ data_space_full: - return 0; - } - --#ifdef MPT_SUPPORT_FWDLB_IOCTL --/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --/* -- * mptctl_hba_pciinfo - Obtain all mpt HBAs pci (Config Space) information. -- * @arg: User space argument -- * -- * Outputs: None. -- * Return: 0 if successful -- * -EFAULT if data unavailable -- */ --static int --mptctl_hba_pciinfo (unsigned long arg) --{ -- struct mpt_ioctl_hbapciinfo *uarg = (struct mpt_ioctl_hbapciinfo *) arg; -- struct mpt_ioctl_hbapciinfo karg; -- -- MPT_ADAPTER *ioc; -- int ioc_num=0, data_size; -- u8 revision; -- -- data_size = sizeof(mpt_ioctl_header)+4; -- /* Clear the struct before filling in data. */ -- memset( &karg, 0, (uarg->hdr.maxDataSize + data_size) ); -- -- dctlprintk((KERN_INFO MYNAM ": Checking for MPT adapters...maxDataSize=%d data_size=%d\n", uarg->hdr.maxDataSize, data_size)); -- -- list_for_each_entry(ioc,&ioc_list,list) { -- data_size += sizeof (struct mpt_ioctl_mptpciinfo); -- if ( data_size >= uarg->hdr.maxDataSize ) { -- dctlprintk((KERN_INFO MYNAM ": data_size=%d >= maxDataSize=%d\n", data_size, uarg->hdr.maxDataSize)); -- break; -- } -- karg.hbapciinfo[ioc_num].iocNumber = ioc_num; -- karg.hbapciinfo[ioc_num].deviceID = ioc->deviceID; -- karg.hbapciinfo[ioc_num].vendorID = ioc->vendorID; -- -- pci_read_config_byte(ioc->pcidev, PCI_CLASS_REVISION, &revision); -- -- karg.hbapciinfo[ioc_num].subSystemVendorID = ioc->pcidev->subsystem_vendor; -- karg.hbapciinfo[ioc_num].subSystemID = ioc->pcidev->subsystem_device; -- -- karg.hbapciinfo[ioc_num].revisionID = revision; -- mpt_GetIocState(ioc, 1); -- karg.hbapciinfo[ioc_num++].iocState = (ioc->last_state >> MPI_IOC_STATE_SHIFT); -- } -- -- karg.totalIOC = ioc_num; -- -- dctlprintk((KERN_INFO MYNAM ": %d MPT adapters found, arg=%p karg=%p size=%d\n", -- karg.totalIOC, (char *)arg, &karg, (int)sizeof(struct mpt_ioctl_hbapciinfo))); -- -- /* Copy the data from kernel memory to user memory -- */ -- if (copy_to_user((char *)arg, &karg, sizeof(struct mpt_ioctl_hbapciinfo))) { -- printk(KERN_ERR "%s@%d::mptctl_eventquery - " -- "Unable to write out mpt_ioctl_eventquery struct @ %p\n", -- __FILE__, __LINE__, (void*)uarg); -- return -EFAULT; -- } -- return 0; --} --#endif -- -- - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* MPT IOCTL Test function. - * -@@ -1833,7 +1730,7 @@ mptctl_readtest (unsigned long arg) - - dctlprintk(("mptctl_readtest called.\n")); - if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) { -- printk(KERN_ERR "%s@%d: mptctl_readtest - " -+ printk(KERN_ERR "%s@%d::mptctl_readtest - " - "Unable to read in mpt_ioctl_test struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -1863,7 +1760,7 @@ mptctl_readtest (unsigned long arg) - /* Copy the data from kernel memory to user memory - */ - if (copy_to_user((char __user *)arg, &karg, sizeof(struct mpt_ioctl_test))) { -- printk(KERN_ERR "%s@%d: mptctl_readtest - " -+ printk(KERN_ERR "%s@%d::mptctl_readtest - " - "Unable to write out mpt_ioctl_test struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -1893,7 +1790,7 @@ mptctl_eventquery (unsigned long arg) - - dctlprintk(("mptctl_eventquery called.\n")); - if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) { -- printk(KERN_ERR "%s@%d: mptctl_eventquery - " -+ printk(KERN_ERR "%s@%d::mptctl_eventquery - " - "Unable to read in mpt_ioctl_eventquery struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -1912,7 +1809,7 @@ mptctl_eventquery (unsigned long arg) - /* Copy the data from kernel memory to user memory - */ - if (copy_to_user((char __user *)arg, &karg, sizeof(struct mpt_ioctl_eventquery))) { -- printk(KERN_ERR "%s@%d: mptctl_eventquery - " -+ printk(KERN_ERR "%s@%d::mptctl_eventquery - " - "Unable to write out mpt_ioctl_eventquery struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -1931,7 +1828,7 @@ mptctl_eventenable (unsigned long arg) - - dctlprintk(("mptctl_eventenable called.\n")); - if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) { -- printk(KERN_ERR "%s@%d: mptctl_eventenable - " -+ printk(KERN_ERR "%s@%d::mptctl_eventenable - " - "Unable to read in mpt_ioctl_eventenable struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -1978,7 +1875,7 @@ mptctl_eventreport (unsigned long arg) - - dctlprintk(("mptctl_eventreport called.\n")); - if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) { -- printk(KERN_ERR "%s@%d: mptctl_eventreport - " -+ printk(KERN_ERR "%s@%d::mptctl_eventreport - " - "Unable to read in mpt_ioctl_eventreport struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -2010,7 +1907,7 @@ mptctl_eventreport (unsigned long arg) - */ - numBytes = max * sizeof(MPT_IOCTL_EVENTS); - if (copy_to_user(uarg->eventData, ioc->events, numBytes)) { -- printk(KERN_ERR "%s@%d: mptctl_eventreport - " -+ printk(KERN_ERR "%s@%d::mptctl_eventreport - " - "Unable to write out mpt_ioctl_eventreport struct @ %p\n", - __FILE__, __LINE__, ioc->events); - return -EFAULT; -@@ -2031,7 +1928,7 @@ mptctl_replace_fw (unsigned long arg) - - dctlprintk(("mptctl_replace_fw called.\n")); - if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) { -- printk(KERN_ERR "%s@%d: mptctl_replace_fw - " -+ printk(KERN_ERR "%s@%d::mptctl_replace_fw - " - "Unable to read in mpt_ioctl_replace_fw struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -2067,7 +1964,7 @@ mptctl_replace_fw (unsigned long arg) - /* Copy the data from user memory to kernel space - */ - if (copy_from_user(ioc->cached_fw, uarg->newImage, newFwSize)) { -- printk(KERN_ERR "%s@%d: mptctl_replace_fw - " -+ printk(KERN_ERR "%s@%d::mptctl_replace_fw - " - "Unable to read in mpt_ioctl_replace_fw image @ %p\n", - __FILE__, __LINE__, uarg); - mpt_free_fw_memory(ioc); -@@ -2104,7 +2001,7 @@ mptctl_mpt_command (unsigned long arg) - dctlprintk(("mptctl_command called.\n")); - - if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) { -- printk(KERN_ERR "%s@%d: mptctl_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_mpt_command - " - "Unable to read in mpt_ioctl_command struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -2149,11 +2046,10 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - int iocnum, flagsLength; - int sz, rc = 0; - int msgContext; -- u16 req_idx=0; -+ u16 req_idx; - ulong timeout; -- MPT_FRAME_HDR *SAS_handshake_mf=NULL; -- char *SAS_handshake_reply=NULL; -- u16 msgSize=0; -+ -+ dctlprintk(("mptctl_do_mpt_command called.\n")); - bufIn.kptr = bufOut.kptr = NULL; - - if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) || -@@ -2162,14 +2058,13 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - iocnum)); - return -ENODEV; - } -- dctlprintk(("ioc%d: mptctl_do_mpt_command called.\n", iocnum)); - if (!ioc->ioctl) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "No memory available during driver init.\n", - __FILE__, __LINE__); - return -ENOMEM; - } else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "Busy with IOC Reset \n", __FILE__, __LINE__); - return -EBUSY; - } -@@ -2183,7 +2078,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - sz += sizeof(dma_addr_t) + sizeof(u32); - - if (sz > ioc->req_sz) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "Request frame too large (%d) maximum (%d)\n", - __FILE__, __LINE__, sz, ioc->req_sz); - return -EFAULT; -@@ -2191,44 +2086,18 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - - /* Get a free request frame and save the message context. - */ -- if (((MPIHeader_t *)(mfPtr))->MsgContext == 0x02012020) { -- msgSize = karg.hdr.port >> 16; -- if ( (mf = (MPT_FRAME_HDR *)kmalloc(msgSize, GFP_KERNEL)) == NULL) { -- dfailprintk(("%s: mptctl_do_mpt_command, Unable to kmalloc msgSize=%d for SAS_handshake!!\n", -- ioc->name, msgSize)); -- return -ENOMEM; -- } -- SAS_handshake_mf = mf; -- if (karg.maxReplyBytes) { -- if ( (SAS_handshake_reply = (char *)kmalloc(karg.maxReplyBytes, GFP_KERNEL)) == NULL) { -- kfree(SAS_handshake_mf); -- dfailprintk(("%s: mptctl_do_mpt_command, Unable to kmalloc maxReplyBytes=%d for SAS_handshake!!\n", -- ioc->name, karg.maxReplyBytes)); -- return -ENOMEM; -- } -- } -- hdr = (MPIHeader_t *) mf; -- msgContext = le32_to_cpu(0x02012020); -- karg.hdr.port &= 0x0000ffff; -- } else { -- if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) { -- dfailprintk((MYIOC_s_WARN_FMT "%s: no msg frames!!\n", -- ioc->name,__FUNCTION__)); -- return -EAGAIN; -- } else { -- hdr = (MPIHeader_t *) mf; -- msgContext = le32_to_cpu(hdr->MsgContext); -- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -- } -- } -+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) -+ return -EAGAIN; - -+ hdr = (MPIHeader_t *) mf; -+ msgContext = le32_to_cpu(hdr->MsgContext); -+ req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); - --//@@@@@ - /* Copy the request frame - * Reset the saved message context. - */ - if (copy_from_user(mf, mfPtr, karg.dataSgeOffset * 4)) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "Unable to read MF from mpt_ioctl_command struct @ %p\n", - __FILE__, __LINE__, mfPtr); - rc = -EFAULT; -@@ -2259,34 +2128,17 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - case MPI_FUNCTION_SCSI_IO_REQUEST: - if (ioc->sh) { - SCSIIORequest_t *pScsiReq = (SCSIIORequest_t *) mf; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget = NULL; - MPT_SCSI_HOST *hd = NULL; - int qtag = MPI_SCSIIO_CONTROL_UNTAGGED; - int scsidir = 0; -- int id = (int) pScsiReq->TargetID; -- int bus = (int) pScsiReq->Bus; -+ int target = (int) pScsiReq->TargetID; - int dataSize; - -- if ((id < 0) || (id > ioc->DevicesPerBus)) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -- "Target ID=%d out of bounds. DevicesPerBus=%d\n", -- __FILE__, __LINE__, id, ioc->DevicesPerBus); -- rc = -ENODEV; -- goto done_free_mem; -- } -- -- if ((bus < 0) || (bus >= ioc->NumberOfBuses)) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -- "Target Bus=%d out of bounds. NumberOfBuses=%d\n", -- __FILE__, __LINE__, bus, ioc->NumberOfBuses); -- rc = -ENODEV; -- goto done_free_mem; -- } -- if ((pMptTarget = ioc->Target_List[bus]) == NULL) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -- "Target_List=NULL for %s bus=%d\n", -- __FILE__, __LINE__, ioc->name, bus); -+ if ((target < 0) || (target >= ioc->sh->max_id)) { -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " -+ "Target ID out of bounds. \n", -+ __FILE__, __LINE__); - rc = -ENODEV; - goto done_free_mem; - } -@@ -2310,7 +2162,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - + (req_idx * MPT_SENSE_BUFFER_ALLOC)); - - if ((hd = (MPT_SCSI_HOST *) ioc->sh->hostdata)) { -- pTarget = pMptTarget->Target[id]; -+ if (hd->Targets) -+ pTarget = hd->Targets[target]; - } - - if (pTarget &&(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) -@@ -2331,10 +2184,10 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - pScsiReq->DataLength = cpu_to_le32(dataSize); - - ioc->ioctl->reset = MPTCTL_RESET_OK; -- ioc->ioctl->id = id; -+ ioc->ioctl->target = target; - - } else { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "SCSI driver is not loaded. \n", - __FILE__, __LINE__); - rc = -EFAULT; -@@ -2353,7 +2206,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - - case MPI_FUNCTION_SATA_PASSTHROUGH: - if (!ioc->sh) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "SCSI driver is not loaded. \n", - __FILE__, __LINE__); - rc = -EFAULT; -@@ -2409,10 +2262,9 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - pScsiReq->DataLength = cpu_to_le32(dataSize); - - ioc->ioctl->reset = MPTCTL_RESET_OK; -- ioc->ioctl->id = pScsiReq->TargetID; -- ioc->ioctl->bus = pScsiReq->Bus; -+ ioc->ioctl->target = pScsiReq->TargetID; - } else { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "SCSI driver is not loaded. \n", - __FILE__, __LINE__); - rc = -EFAULT; -@@ -2424,7 +2276,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - { - MPT_SCSI_HOST *hd = NULL; - if ((ioc->sh == NULL) || ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL)) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "SCSI driver not loaded or SCSI host not found. \n", - __FILE__, __LINE__); - rc = -EFAULT; -@@ -2457,7 +2309,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - (pInit->ReplyFrameSize != cpu_to_le16(ioc->reply_sz)) || - (pInit->HostMfaHighAddr != high_addr) || - (pInit->SenseBufferHighAddr != sense_high)) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "IOC_INIT issued with 1 or more incorrect parameters. Rejected.\n", - __FILE__, __LINE__); - rc = -EFAULT; -@@ -2490,7 +2342,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - MPI_FUNCTION_LAN_RESET - */ - -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "Illegal request (function 0x%x) \n", - __FILE__, __LINE__, hdr->Function); - rc = -EFAULT; -@@ -2550,7 +2402,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - karg.dataOutBufPtr, - bufOut.len)) { - printk(KERN_ERR -- "%s@%d: mptctl_do_mpt_command - Unable " -+ "%s@%d::mptctl_do_mpt_command - Unable " - "to read user data " - "struct @ %p\n", - __FILE__, __LINE__,karg.dataOutBufPtr); -@@ -2561,7 +2413,16 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - } - - if (karg.dataInSize > 0) { -- flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; -+ if ((karg.dataOutSize > 0) && -+ (hdr->Function == MPI_FUNCTION_SMP_PASSTHROUGH)){ -+ flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT | -+ MPI_SGE_FLAGS_END_OF_BUFFER | -+ MPI_SGE_FLAGS_DIRECTION | -+ mpt_addr_size() ) -+ << MPI_SGE_FLAGS_SHIFT; -+ } else { -+ flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; -+ } - flagsLength |= karg.dataInSize; - - bufIn.len = karg.dataInSize; -@@ -2585,14 +2446,13 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - } - - ioc->ioctl->wait_done = 0; -- INITIALIZE_IOCTL_STATUS(ioc->ioctl->status) -- - if (hdr->Function == MPI_FUNCTION_SCSI_TASK_MGMT) { - - DBG_DUMP_TM_REQUEST_FRAME((u32 *)mf); - - if (mpt_send_handshake_request(mptctl_id, ioc, -- sizeof(SCSITaskMgmt_t), (u32*)mf,10, CAN_SLEEP) != 0) { -+ sizeof(SCSITaskMgmt_t), (u32*)mf, -+ CAN_SLEEP) != 0) { - dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!" - " (ioc %p, mf %p) \n", ioc->name, - ioc, mf)); -@@ -2600,73 +2460,27 @@ mptctl_do_mpt_command (struct mpt_ioctl_ - rc = -ENODATA; - goto done_free_mem; - } --timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT; --timeout = wait_event_timeout(mptctl_wait,ioc->ioctl->wait_done == 1,HZ*timeout); - -- if(timeout <=0 && (ioc->ioctl->wait_done != 1 )) { -- /* Now we need to reset the board */ -- mptctl_free_tm_flags(ioc); -- mptctl_timeout_expired(ioc->ioctl); -- rc = -ENODATA; -- goto done_free_mem; -- } --} else { -- if ( SAS_handshake_mf ) { -- dctlprintk(("SAS_handshake_message Function=%x\n", -- hdr->Function)); -- -- timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT; -- rc = mpt_handshake_req_reply_wait(ioc, -- msgSize, -- (u32*)SAS_handshake_mf, -- karg.maxReplyBytes, -- (u16*)SAS_handshake_reply, timeout /*seconds*/, -- CAN_SLEEP); -- kfree(SAS_handshake_mf); -- SAS_handshake_mf = NULL; -- if (rc == 0) { -- dctlprintk(("SAS_handshake_message Function=%x completed successfully\n", -- hdr->Function)); -- sz = karg.maxReplyBytes; -- if (sz > 0) { -- if (copy_to_user((char *)karg.replyFrameBufPtr,SAS_handshake_reply, sz)){ --printk(KERN_ERR "%s@%d::mptctl_do_mpt_command -" "Unable to write out reply frame %p\n",__FILE__, __LINE__, (void*)karg.replyFrameBufPtr); -- rc = -ENODATA; -- } -- }else { -- -- rc = -ENODATA; -- dctlprintk(("SAS_handshake_message failed sz=%d\n", sz)); -- } -- kfree(SAS_handshake_reply); -- SAS_handshake_reply = NULL; -- goto done_free_mem; -- } -- else -- { -- rc = -ENODATA; -- kfree(SAS_handshake_reply); -- SAS_handshake_reply = NULL; -- goto done_free_mem; -- } -- }else { -- mpt_put_msg_frame(mptctl_id, ioc, mf); -- /* Now wait for the command to complete */ -- timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT; -- timeout = wait_event_timeout(mptctl_wait, -- ioc->ioctl->wait_done == 1, -- HZ*timeout); -+ } else -+ mpt_put_msg_frame(mptctl_id, ioc, mf); - -- if(timeout <=0 && (ioc->ioctl->wait_done != 1 )) { -+ /* Now wait for the command to complete */ -+ timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT; -+ timeout = wait_event_timeout(mptctl_wait, -+ ioc->ioctl->wait_done == 1, -+ HZ*timeout); - -+ if(timeout <=0 && (ioc->ioctl->wait_done != 1 )) { - /* Now we need to reset the board */ - -+ if (hdr->Function == MPI_FUNCTION_SCSI_TASK_MGMT) -+ mptctl_free_tm_flags(ioc); -+ - mptctl_timeout_expired(ioc->ioctl); - rc = -ENODATA; - goto done_free_mem; -- } -- } --} -+ } -+ - - mf = NULL; - -@@ -2684,7 +2498,7 @@ printk(KERN_ERR "%s@%d::mptctl_do_mpt_co - if (copy_to_user(karg.replyFrameBufPtr, - &ioc->ioctl->ReplyFrame, sz)){ - -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "Unable to write out reply frame %p\n", - __FILE__, __LINE__, karg.replyFrameBufPtr); - rc = -ENODATA; -@@ -2699,7 +2513,7 @@ printk(KERN_ERR "%s@%d::mptctl_do_mpt_co - sz = min(karg.maxSenseBytes, MPT_SENSE_BUFFER_SIZE); - if (sz > 0) { - if (copy_to_user(karg.senseDataPtr, ioc->ioctl->sense, sz)) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "Unable to write sense data to user %p\n", - __FILE__, __LINE__, - karg.senseDataPtr); -@@ -2716,7 +2530,7 @@ printk(KERN_ERR "%s@%d::mptctl_do_mpt_co - (karg.dataInSize > 0) && (bufIn.kptr)) { - if (copy_to_user(karg.dataInBufPtr, - bufIn.kptr, karg.dataInSize)) { -- printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - " -+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - " - "Unable to write data to user %p\n", - __FILE__, __LINE__, - karg.dataInBufPtr); -@@ -2726,6 +2540,10 @@ printk(KERN_ERR "%s@%d::mptctl_do_mpt_co - - done_free_mem: - -+ ioc->ioctl->status &= ~(MPT_IOCTL_STATUS_COMMAND_GOOD | -+ MPT_IOCTL_STATUS_SENSE_VALID | -+ MPT_IOCTL_STATUS_RF_VALID ); -+ - /* Free the allocated memory. - */ - if (bufOut.kptr != NULL) { -@@ -2738,14 +2556,6 @@ done_free_mem: - bufIn.len, (void *) bufIn.kptr, dma_addr_in); - } - --if (SAS_handshake_mf) { -- kfree(SAS_handshake_mf); -- mf=NULL; -- } --if (SAS_handshake_reply) -- kfree(SAS_handshake_reply); -- -- - /* mf is null if command issued successfully - * otherwise, failure occured after mf acquired. - */ -@@ -2792,7 +2602,7 @@ mptctl_hp_hostinfo(unsigned long arg, un - return -EFAULT; - - if (copy_from_user(&karg, uarg, sizeof(hp_host_info_t))) { -- printk(KERN_ERR "%s@%d: mptctl_hp_host_info - " -+ printk(KERN_ERR "%s@%d::mptctl_hp_host_info - " - "Unable to read in hp_host_info struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -2914,8 +2724,6 @@ mptctl_hp_hostinfo(unsigned long arg, un - (MPT_SGE_FLAGS_SSIMPLE_READ|4), buf_dma); - - ioc->ioctl->wait_done = 0; -- INITIALIZE_IOCTL_STATUS(ioc->ioctl->status) -- - mpt_put_msg_frame(mptctl_id, ioc, mf); - - rc = wait_event_timeout(mptctl_wait, -@@ -2947,7 +2755,7 @@ mptctl_hp_hostinfo(unsigned long arg, un - /* Copy the data from kernel memory to user memory - */ - if (copy_to_user((char __user *)arg, &karg, sizeof(hp_host_info_t))) { -- printk(KERN_ERR "%s@%d: mptctl_hpgethostinfo - " -+ printk(KERN_ERR "%s@%d::mptctl_hpgethostinfo - " - "Unable to write out hp_host_info @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -2986,7 +2794,7 @@ mptctl_hp_targetinfo(unsigned long arg) - - dctlprintk(("mptctl_hp_targetinfo called.\n")); - if (copy_from_user(&karg, uarg, sizeof(hp_target_info_t))) { -- printk(KERN_ERR "%s@%d: mptctl_hp_targetinfo - " -+ printk(KERN_ERR "%s@%d::mptctl_hp_targetinfo - " - "Unable to read in hp_host_targetinfo struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -3097,7 +2905,7 @@ mptctl_hp_targetinfo(unsigned long arg) - /* Copy the data from kernel memory to user memory - */ - if (copy_to_user((char __user *)arg, &karg, sizeof(hp_target_info_t))) { -- printk(KERN_ERR "%s@%d: mptctl_hp_target_info - " -+ printk(KERN_ERR "%s@%d::mptctl_hp_target_info - " - "Unable to write out mpt_ioctl_targetinfo struct @ %p\n", - __FILE__, __LINE__, uarg); - return -EFAULT; -@@ -3231,8 +3039,6 @@ allocDiagBuffer: - DiagBufferPostRequest->BufferAddress.Low = cpu_to_le32(tmp); - - ioc->ioctl->wait_done = 0; -- INITIALIZE_IOCTL_STATUS(ioc->ioctl->status) -- - mpt_put_msg_frame(mptctl_id, ioc, mf); - - /* Now wait for the command to complete */ -@@ -3275,6 +3081,10 @@ allocDiagBuffer: - - mptctl_register_diag_buffer_out: - -+ ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED | -+ MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID | -+ MPT_IOCTL_STATUS_RF_VALID ); -+ - if ( rc ) { - pci_free_consistent(ioc->pcidev, request_data_sz, - request_data, -@@ -3371,8 +3181,6 @@ mptctl_release_diag_buffer (unsigned lon - DiagRelease->MsgFlags = 0; - - ioc->ioctl->wait_done = 0; -- INITIALIZE_IOCTL_STATUS(ioc->ioctl->status) -- - mpt_put_msg_frame(mptctl_id, ioc, mf); - - /* Now wait for the command to complete */ -@@ -3410,6 +3218,10 @@ mptctl_release_diag_buffer (unsigned lon - - mptctl_release_diag_buffer_out: - -+ ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED | -+ MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID | -+ MPT_IOCTL_STATUS_RF_VALID); -+ - return rc; - } - -@@ -3706,8 +3518,6 @@ mptctl_read_diag_buffer (unsigned long a - DiagBufferPostRequest->BufferAddress.Low = cpu_to_le32(tmp); - - ioc->ioctl->wait_done = 0; -- INITIALIZE_IOCTL_STATUS(ioc->ioctl->status) -- - mpt_put_msg_frame(mptctl_id, ioc, mf); - - /* Now wait for the command to complete */ -@@ -3746,8 +3556,14 @@ mptctl_read_diag_buffer (unsigned long a - ioc->ioctl->status)); - rc = -EFAULT; - } -- } -+ - mptctl_read_diag_buffer_out: -+ -+ ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED | -+ MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID | -+ MPT_IOCTL_STATUS_RF_VALID); -+ -+ } - return rc; - } - -@@ -3796,7 +3612,7 @@ compat_mptctl_ioctl(unsigned int fd, uns - int ret; - - lock_kernel(); -- dctlprintk((KERN_INFO MYNAM ": compat_mptctl_ioctl() called\n")); -+ dctlprintk((KERN_INFO MYNAM "::compat_mptctl_ioctl() called\n")); - ret = mptctl_ioctl(filp->f_dentry->d_inode, filp, cmd, arg); - unlock_kernel(); - return ret; -@@ -3820,7 +3636,7 @@ compat_mptfwxfer_ioctl(struct file *filp - int nonblock = (filp->f_flags & O_NONBLOCK); - int ret; - -- dctlprintk((KERN_INFO MYNAM ": compat_mptfwxfer_ioctl() called\n")); -+ dctlprintk((KERN_INFO MYNAM "::compat_mptfwxfer_ioctl() called\n")); - - if (copy_from_user(&kfw32, (char __user *)arg, sizeof(kfw32))) - return -EFAULT; -@@ -3829,7 +3645,7 @@ compat_mptfwxfer_ioctl(struct file *filp - iocnumX = kfw32.iocnum & 0xFF; - if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || - (iocp == NULL)) { -- dctlprintk((KERN_ERR MYNAM ": compat_mptfwxfer_ioctl @%d - ioc%d not found!\n", -+ dctlprintk((KERN_ERR MYNAM "::compat_mptfwxfer_ioctl @%d - ioc%d not found!\n", - __LINE__, iocnumX)); - return -ENODEV; - } -@@ -3866,7 +3682,7 @@ compat_mpt_command(struct file *filp, un - int nonblock = (filp->f_flags & O_NONBLOCK); - int ret; - -- dctlprintk((KERN_INFO MYNAM ": compat_mpt_command() called\n")); -+ dctlprintk((KERN_INFO MYNAM "::compat_mpt_command() called\n")); - - if (copy_from_user(&karg32, (char __user *)arg, sizeof(karg32))) - return -EFAULT; -@@ -3875,7 +3691,7 @@ compat_mpt_command(struct file *filp, un - iocnumX = karg32.hdr.iocnum & 0xFF; - if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || - (iocp == NULL)) { -- dctlprintk((KERN_ERR MYNAM ": compat_mpt_command @%d - ioc%d not found!\n", -+ dctlprintk((KERN_ERR MYNAM "::compat_mpt_command @%d - ioc%d not found!\n", - __LINE__, iocnumX)); - return -ENODEV; - } -@@ -4087,14 +3903,6 @@ static int __init mptctl_init(void) - if (++where && err) goto out_fail; - err = register_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_CONFIG, compat_mptctl_ioctl); - if (++where && err) goto out_fail; -- err = register_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_FEATURES, compat_mptctl_ioctl); -- if (++where && err) goto out_fail; -- err = register_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_CONTROL, compat_mptctl_ioctl); -- if (++where && err) goto out_fail; -- err = register_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_ELEMENT, compat_mptctl_ioctl); -- if (++where && err) goto out_fail; -- err = register_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_OPERATION, compat_mptctl_ioctl); -- if (++where && err) goto out_fail; - err = register_ioctl32_conversion(CC_CSMI_SAS_SET_PHY_INFO, compat_mptctl_ioctl); - if (++where && err) goto out_fail; - err = register_ioctl32_conversion(CC_CSMI_SAS_STP_PASSTHRU, compat_mptctl_ioctl); -@@ -4185,10 +3993,6 @@ out_fail: - unregister_ioctl32_conversion(CC_CSMI_SAS_FIRMWARE_DOWNLOAD); - unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_INFO); - unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_CONFIG); -- unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_FEATURES); -- unregister_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_CONTROL); -- unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_ELEMENT); -- unregister_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_OPERATION); - unregister_ioctl32_conversion(CC_CSMI_SAS_SET_PHY_INFO); - unregister_ioctl32_conversion(CC_CSMI_SAS_STP_PASSTHRU); - unregister_ioctl32_conversion(CC_CSMI_SAS_TASK_MANAGEMENT); -@@ -4260,10 +4064,6 @@ static void mptctl_exit(void) - unregister_ioctl32_conversion(CC_CSMI_SAS_FIRMWARE_DOWNLOAD); - unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_INFO); - unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_CONFIG); -- unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_FEATURES); -- unregister_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_CONTROL); -- unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_ELEMENT); -- unregister_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_OPERATION); - unregister_ioctl32_conversion(CC_CSMI_SAS_SET_PHY_INFO); - unregister_ioctl32_conversion(CC_CSMI_SAS_STP_PASSTHRU); - unregister_ioctl32_conversion(CC_CSMI_SAS_TASK_MANAGEMENT); -@@ -4277,7 +4077,7 @@ static void mptctl_exit(void) - } - - #if defined(CPQ_CIM) --#include "csmi/csmisas.c" -+#include "csmisas.c" - #endif // CPQ_CIM - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptctl.h linux-2.6.9-55.0.12/drivers/message/fusion/mptctl.h ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptctl.h 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptctl.h 2007-11-02 09:10:23.000000000 +0100 -@@ -5,8 +5,8 @@ - * LSIFC9xx/LSI409xx Fibre Channel - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - * $Id: mptctl.h,v 1.14 2003/03/18 22:49:51 Exp $ - */ -@@ -59,6 +59,7 @@ - */ - #define MPT_MISCDEV_BASENAME "mptctl" - #define MPT_MISCDEV_PATHNAME "/dev/" MPT_MISCDEV_BASENAME -+#define MPT_CSMI_DESCRIPTION "LSI Logic Corporation: Fusion MPT Driver "MPT_LINUX_VERSION_COMMON - - #define MPT_PRODUCT_LENGTH 12 - -@@ -94,16 +95,6 @@ - #define MPTDIAGQUERY _IOWR(MPT_MAGIC_NUMBER,29,mpt_diag_query_t) - #define MPTDIAGREADBUFFER _IOWR(MPT_MAGIC_NUMBER,30,mpt_diag_read_buffer_t) - --#ifdef MPT_SUPPORT_FWDLB_IOCTL --#define MPTHBAPCIINFO _IOWR(MPT_MAGIC_NUMBER,31,struct mpt_ioctl_hbapciinfo) --#endif -- -- --#define INITIALIZE_IOCTL_STATUS(status) \ -- status &= ~( MPT_IOCTL_STATUS_COMMAND_GOOD \ -- | MPT_IOCTL_STATUS_SENSE_VALID \ -- | MPT_IOCTL_STATUS_RF_VALID); -- - /* - * SPARC PLATFORM REMARKS: - * IOCTL data structures that contain pointers -@@ -314,28 +305,6 @@ typedef struct mpt_ioctl_replace_fw { - u8 newImage[1]; - } mpt_ioctl_replace_fw_t; - --#ifdef MPT_SUPPORT_FWDLB_IOCTL --struct mpt_ioctl_mptpciinfo { -- U8 iocNumber; -- U8 iocState; -- U8 revisionID; -- U8 reserved1; -- U16 vendorID; -- U16 deviceID; -- U16 subSystemVendorID; -- U16 subSystemID; --}; -- -- --struct mpt_ioctl_hbapciinfo { -- mpt_ioctl_header hdr; -- U8 totalIOC; -- U8 reserved[3]; -- struct mpt_ioctl_mptpciinfo hbapciinfo[18]; --}; --#endif -- -- - /* General MPT Pass through data strucutre - * - * iocnum -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptfc.c linux-2.6.9-55.0.12/drivers/message/fusion/mptfc.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptfc.c 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptfc.c 2007-11-02 09:10:23.000000000 +0100 -@@ -3,8 +3,8 @@ - * For use with LSI Logic PCI chip/adapter(s) - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - */ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -74,7 +74,6 @@ - MODULE_AUTHOR(MODULEAUTHOR); - MODULE_DESCRIPTION(my_NAME); - MODULE_LICENSE("GPL"); --MODULE_VERSION(my_VERSION); - - /* Command line args */ - static int mpt_pq_filter = 0; -@@ -131,7 +130,7 @@ static struct scsi_host_template mptfc_d - .bios_param = mptscsih_bios_param, - .can_queue = MPT_FC_CAN_QUEUE, - .this_id = -1, -- .sg_tablesize = CONFIG_FUSION_MAX_SGE, -+ .sg_tablesize = MPT_SCSI_SG_DEPTH, - .max_sectors = 8192, - .cmd_per_lun = 7, - .use_clustering = ENABLE_CLUSTERING, -@@ -161,8 +160,6 @@ static struct pci_device_id mptfc_pci_ta - PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC949E, - PCI_ANY_ID, PCI_ANY_ID }, -- { 0x1657, MPI_MANUFACTPAGE_DEVICEID_FC949E, -- PCI_ANY_ID, PCI_ANY_ID }, - {0} /* Terminating entry */ - }; - MODULE_DEVICE_TABLE(pci, mptfc_pci_table); -@@ -184,6 +181,8 @@ mptfc_probe(struct pci_dev *pdev, const - MPT_ADAPTER *ioc; - unsigned long flags; - int sz, ii; -+ int numSGE = 0; -+ int scale; - int ioc_cap; - u8 *mem; - int error=0; -@@ -262,16 +261,46 @@ mptfc_probe(struct pci_dev *pdev, const - ioc->name, mpt_can_queue, ioc->req_depth, - sh->can_queue)); - -- sh->max_id = ioc->DevicesPerBus; -+ sh->max_id = MPT_MAX_FC_DEVICES<256 ? MPT_MAX_FC_DEVICES : 255; - - sh->max_lun = MPT_LAST_LUN + 1; -- sh->max_channel = ioc->NumberOfBuses - 1; -+ sh->max_channel = 0; - sh->this_id = ioc->pfacts[0].PortSCSIID; - -+ - /* Required entry. - */ - sh->unique_id = ioc->id; -- sh->sg_tablesize = ioc->sg_tablesize; -+ -+ /* Verify that we won't exceed the maximum -+ * number of chain buffers -+ * We can optimize: ZZ = req_sz/sizeof(SGE) -+ * For 32bit SGE's: -+ * numSGE = 1 + (ZZ-1)*(maxChain -1) + ZZ -+ * + (req_sz - 64)/sizeof(SGE) -+ * A slightly different algorithm is required for -+ * 64bit SGEs. -+ */ -+ scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); -+ if (sizeof(dma_addr_t) == sizeof(u64)) { -+ numSGE = (scale - 1) * -+ (ioc->facts.MaxChainDepth-1) + scale + -+ (ioc->req_sz - 60) / (sizeof(dma_addr_t) + -+ sizeof(u32)); -+ } else { -+ numSGE = 1 + (scale - 1) * -+ (ioc->facts.MaxChainDepth-1) + scale + -+ (ioc->req_sz - 64) / (sizeof(dma_addr_t) + -+ sizeof(u32)); -+ } -+ -+ if (numSGE < sh->sg_tablesize) { -+ /* Reset this value */ -+ dprintk((MYIOC_s_INFO_FMT -+ "Resetting sg_tablesize to %d from %d\n", -+ ioc->name, numSGE, sh->sg_tablesize)); -+ sh->sg_tablesize = numSGE; -+ } - - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - /* Set the pci device pointer in Scsi_Host structure. -@@ -300,24 +329,23 @@ mptfc_probe(struct pci_dev *pdev, const - dprintk((MYIOC_s_INFO_FMT "ScsiLookup @ %p, sz=%d\n", - ioc->name, hd->ScsiLookup, sz)); - -- for (ii=0; ii < ioc->NumberOfBuses; ii++) { -- /* Allocate memory for the device structures. -- * A non-Null pointer at an offset -- * indicates a device exists. -- */ -- sz = ioc->DevicesPerBus * sizeof(void *); -- mem = kmalloc(sz, GFP_ATOMIC); -- if (mem == NULL) { -- error = -ENOMEM; -- goto out_mptfc_probe; -- } -+ /* Allocate memory for the device structures. -+ * A non-Null pointer at an offset -+ * indicates a device exists. -+ * max_id = 1 + maximum id (hosts.h) -+ */ -+ sz = sh->max_id * sizeof(void *); -+ mem = kmalloc(sz, GFP_ATOMIC); -+ if (mem == NULL) { -+ error = -ENOMEM; -+ goto out_mptfc_probe; -+ } - -- memset(mem, 0, sz); -- ioc->Target_List[ii] = (struct _MPT_DEVICE *) mem; -+ memset(mem, 0, sz); -+ hd->Targets = (VirtDevice **) mem; - -- dinitprintk((KERN_INFO -- " For Bus=%d, Target_List=%p sz=%d\n", ii, mem, sz)); -- } -+ dprintk((KERN_INFO -+ " Targets @ %p, sz=%d\n", hd->Targets, sz)); - - /* Clear the TM flags - */ -@@ -333,17 +361,13 @@ mptfc_probe(struct pci_dev *pdev, const - */ - hd->cmdPtr = NULL; - -- /* Initialize this IOC's timers -+ /* Initialize this SCSI Hosts' timers - * To use, set the timer expires field -- * and add_timer. Used for internally -- * generated commands. -+ * and add_timer - */ -- init_timer(&hd->InternalCmdTimer); -- hd->InternalCmdTimer.data = (unsigned long) hd; -- hd->InternalCmdTimer.function = mptscsih_InternalCmdTimer_expired; -- init_timer(&ioc->TMtimer); -- ioc->TMtimer.data = (unsigned long) ioc; -- ioc->TMtimer.function = mptscsih_TM_timeout; -+ init_timer(&hd->timer); -+ hd->timer.data = (unsigned long) hd; -+ hd->timer.function = mptscsih_timer_expired; - - hd->mpt_pq_filter = mpt_pq_filter; - -@@ -356,9 +380,6 @@ mptfc_probe(struct pci_dev *pdev, const - hd->scandv_wait_done = 0; - hd->last_queue_full = 0; - -- init_waitqueue_head(&hd->TM_waitq); -- hd->TM_wait_done = 0; -- - error = scsi_add_host (sh, &ioc->pcidev->dev); - if(error) { - dprintk((KERN_ERR MYNAM -@@ -394,60 +415,6 @@ static struct pci_driver mptfc_driver = - }; - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --int --mptfc_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) --{ -- MPT_SCSI_HOST *hd; -- u8 event = le32_to_cpu(pEvReply->Event) & 0xFF; -- -- devtprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to FC host driver!\n", -- ioc->name, event)); -- -- if (ioc->sh == NULL || -- ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL)) -- return 1; -- -- switch (event) { -- case MPI_EVENT_UNIT_ATTENTION: /* 03 */ -- /* FIXME! */ -- break; -- case MPI_EVENT_IOC_BUS_RESET: /* 04 */ -- case MPI_EVENT_EXT_BUS_RESET: /* 05 */ -- if (hd && (ioc->bus_type == SPI) && (hd->soft_resets < -1)) -- hd->soft_resets++; -- break; -- case MPI_EVENT_LOGOUT: /* 09 */ -- /* FIXME! */ -- break; -- -- /* -- * CHECKME! Don't think we need to do -- * anything for these, but... -- */ -- case MPI_EVENT_RESCAN: /* 06 */ -- case MPI_EVENT_LINK_STATUS_CHANGE: /* 07 */ -- case MPI_EVENT_LOOP_STATE_CHANGE: /* 08 */ -- /* -- * CHECKME! Falling thru... -- */ -- break; -- -- case MPI_EVENT_NONE: /* 00 */ -- case MPI_EVENT_LOG_DATA: /* 01 */ -- case MPI_EVENT_STATE_CHANGE: /* 02 */ -- case MPI_EVENT_EVENT_CHANGE: /* 0A */ -- case MPI_EVENT_INTEGRATED_RAID: /* 0B */ -- default: -- devtprintk((KERN_INFO "%s: Ignoring event (=%02Xh)\n", -- __FUNCTION__, event)); -- break; -- } -- -- return 1; /* currently means nothing really */ --} -- -- --/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /** - * mptfc_init - Register MPT adapter(s) as SCSI host(s) with - * linux scsi mid-layer. -@@ -464,9 +431,9 @@ mptfc_init(void) - mptfcTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTFC_DRIVER); - mptfcInternalCtx = mpt_register(mptscsih_scandv_complete, MPTFC_DRIVER); - -- if (mpt_event_register(mptfcDoneCtx, mptfc_event_process) == 0) { -+ if (mpt_event_register(mptfcDoneCtx, mptscsih_event_process) == 0) { - devtprintk((KERN_INFO MYNAM -- ": mptfc_event_process Registered for IOC event notifications\n")); -+ ": Registered for IOC event notifications\n")); - } - - if (mpt_reset_register(mptfcDoneCtx, mptscsih_ioc_reset) == 0) { -@@ -488,7 +455,6 @@ mptfc_exit(void) - { - pci_unregister_driver(&mptfc_driver); - -- - mpt_reset_deregister(mptfcDoneCtx); - dprintk((KERN_INFO MYNAM - ": Deregistered for IOC reset notifications\n")); -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptlan.c linux-2.6.9-55.0.12/drivers/message/fusion/mptlan.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptlan.c 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptlan.c 2007-11-02 09:10:23.000000000 +0100 -@@ -4,7 +4,7 @@ - * For use with LSI Logic Fibre Channel PCI chip/adapters - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 2000-2007 LSI Logic Corporation -+ * Copyright (c) 2000-2005 LSI Logic Corporation - * - * $Id: mptlan.c,v 1.55 2003/05/07 14:08:32 Exp $ - */ -@@ -57,11 +57,9 @@ - #include <linux/module.h> - #include <linux/fs.h> - --#define my_VERSION MPT_LINUX_VERSION_COMMON - #define MYNAM "mptlan" - - MODULE_LICENSE("GPL"); --MODULE_VERSION(my_VERSION); - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* -@@ -185,16 +183,16 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H - struct net_device *dev = ioc->netdev; - int FreeReqFrame = 0; - -- dlioprintk((KERN_INFO MYNAM ": %s/%s: Got reply.\n", -+ dioprintk((KERN_INFO MYNAM ": %s/%s: Got reply.\n", - IOC_AND_NETDEV_NAMES_s_s(dev))); - --// dlioprintk((KERN_INFO MYNAM "@lan_reply: mf = %p, reply = %p\n", -+// dioprintk((KERN_INFO MYNAM "@lan_reply: mf = %p, reply = %p\n", - // mf, reply)); - - if (mf == NULL) { - u32 tmsg = CAST_PTR_TO_U32(reply); - -- dlioprintk((KERN_INFO MYNAM ": %s/%s: @lan_reply, tmsg %08x\n", -+ dioprintk((KERN_INFO MYNAM ": %s/%s: @lan_reply, tmsg %08x\n", - IOC_AND_NETDEV_NAMES_s_s(dev), - tmsg)); - -@@ -204,14 +202,14 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H - // mptbase.c::mpt_interrupt() routine and callcack here - #if 0 - case LAN_REPLY_FORM_MESSAGE_CONTEXT: --// dlioprintk((KERN_INFO MYNAM "/lan_reply: " -+// dioprintk((KERN_INFO MYNAM "/lan_reply: " - // "MessageContext turbo reply received\n")); - FreeReqFrame = 1; - break; - #endif - - case LAN_REPLY_FORM_SEND_SINGLE: --// dlioprintk((MYNAM "/lan_reply: " -+// dioprintk((MYNAM "/lan_reply: " - // "calling mpt_lan_send_reply (turbo)\n")); - - // FreeReqFrame = mpt_lan_send_turbo(dev, tmsg); -@@ -230,7 +228,7 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H - break; - - case LAN_REPLY_FORM_RECEIVE_SINGLE: --// dlioprintk((KERN_INFO MYNAM "@lan_reply: " -+// dioprintk((KERN_INFO MYNAM "@lan_reply: " - // "rcv-Turbo = %08x\n", tmsg)); - mpt_lan_receive_post_turbo(dev, tmsg); - break; -@@ -248,10 +246,10 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H - } - - // msg = (u32 *) reply; --// dlioprintk((KERN_INFO MYNAM "@lan_reply: msg = %08x %08x %08x %08x\n", -+// dioprintk((KERN_INFO MYNAM "@lan_reply: msg = %08x %08x %08x %08x\n", - // le32_to_cpu(msg[0]), le32_to_cpu(msg[1]), - // le32_to_cpu(msg[2]), le32_to_cpu(msg[3]))); --// dlioprintk((KERN_INFO MYNAM "@lan_reply: Function = %02xh\n", -+// dioprintk((KERN_INFO MYNAM "@lan_reply: Function = %02xh\n", - // reply->u.hdr.Function)); - - switch (reply->u.hdr.Function) { -@@ -275,7 +273,7 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H - if (!(pRecvRep->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY)) - FreeReqFrame = 1; - } else -- dlioprintk((KERN_INFO MYNAM "@lan_reply: zero context " -+ dioprintk((KERN_INFO MYNAM "@lan_reply: zero context " - "ReceivePostReply received.\n")); - break; - } -@@ -617,7 +615,7 @@ mpt_lan_send_turbo(struct net_device *de - priv->stats.tx_packets++; - priv->stats.tx_bytes += sent->len; - -- dlioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n", -+ dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n", - IOC_AND_NETDEV_NAMES_s_s(dev), - __FUNCTION__, sent)); - -@@ -649,7 +647,7 @@ mpt_lan_send_reply(struct net_device *de - - count = pSendRep->NumberOfContexts; - -- dlioprintk((KERN_INFO MYNAM ": send_reply: IOCStatus: %04x\n", -+ dioprintk((KERN_INFO MYNAM ": send_reply: IOCStatus: %04x\n", - le16_to_cpu(pSendRep->IOCStatus))); - - /* Add check for Loginfo Flag in IOCStatus */ -@@ -683,7 +681,7 @@ mpt_lan_send_reply(struct net_device *de - sent = priv->SendCtl[ctx].skb; - priv->stats.tx_bytes += sent->len; - -- dlioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n", -+ dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n", - IOC_AND_NETDEV_NAMES_s_s(dev), - __FUNCTION__, sent)); - -@@ -722,7 +720,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s - int ctx; - u16 cur_naa = 0x1000; - -- dlioprintk((KERN_INFO MYNAM ": %s called, skb_addr = %p\n", -+ dioprintk((KERN_INFO MYNAM ": %s called, skb_addr = %p\n", - __FUNCTION__, skb)); - - spin_lock_irqsave(&priv->txfidx_lock, flags); -@@ -748,7 +746,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s - ctx = priv->mpt_txfidx[priv->mpt_txfidx_tail--]; - spin_unlock_irqrestore(&priv->txfidx_lock, flags); - --// dlioprintk((KERN_INFO MYNAM ": %s/%s: Creating new msg frame (send).\n", -+// dioprintk((KERN_INFO MYNAM ": %s/%s: Creating new msg frame (send).\n", - // IOC_AND_NETDEV_NAMES_s_s(dev))); - - pSendReq = (LANSendRequest_t *) mf; -@@ -783,7 +781,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s - pTrans->Flags = 0; - pTrans->TransactionContext[0] = cpu_to_le32(ctx); - --// dlioprintk((KERN_INFO MYNAM ": %s/%s: BC = %08x, skb = %p, buff = %p\n", -+// dioprintk((KERN_INFO MYNAM ": %s/%s: BC = %08x, skb = %p, buff = %p\n", - // IOC_AND_NETDEV_NAMES_s_s(dev), - // ctx, skb, skb->data)); - -@@ -843,7 +841,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s - mpt_put_msg_frame (LanCtx, mpt_dev, mf); - dev->trans_start = jiffies; - -- dlioprintk((KERN_INFO MYNAM ": %s/%s: Sending packet. FlagsLength = %08x.\n", -+ dioprintk((KERN_INFO MYNAM ": %s/%s: Sending packet. FlagsLength = %08x.\n", - IOC_AND_NETDEV_NAMES_s_s(dev), - le32_to_cpu(pSimple->FlagsLength))); - -@@ -864,10 +862,10 @@ mpt_lan_wake_post_buckets_task(struct ne - schedule_work(&priv->post_buckets_task); - } else { - schedule_delayed_work(&priv->post_buckets_task, 1); -- dlioprintk((KERN_INFO MYNAM ": post_buckets queued on " -+ dioprintk((KERN_INFO MYNAM ": post_buckets queued on " - "timer.\n")); - } -- dlioprintk((KERN_INFO MYNAM ": %s/%s: Queued post_buckets task.\n", -+ dioprintk((KERN_INFO MYNAM ": %s/%s: Queued post_buckets task.\n", - IOC_AND_NETDEV_NAMES_s_s(dev) )); - } - } -@@ -880,7 +878,7 @@ mpt_lan_receive_skb(struct net_device *d - - skb->protocol = mpt_lan_type_trans(skb, dev); - -- dlioprintk((KERN_INFO MYNAM ": %s/%s: Incoming packet (%d bytes) " -+ dioprintk((KERN_INFO MYNAM ": %s/%s: Incoming packet (%d bytes) " - "delivered to upper level.\n", - IOC_AND_NETDEV_NAMES_s_s(dev), skb->len)); - -@@ -890,13 +888,13 @@ mpt_lan_receive_skb(struct net_device *d - skb->dev = dev; - netif_rx(skb); - -- dlioprintk((MYNAM "/receive_skb: %d buckets remaining\n", -+ dioprintk((MYNAM "/receive_skb: %d buckets remaining\n", - atomic_read(&priv->buckets_out))); - - if (atomic_read(&priv->buckets_out) < priv->bucketthresh) - mpt_lan_wake_post_buckets_task(dev, 1); - -- dlioprintk((KERN_INFO MYNAM "/receive_post_reply: %d buckets " -+ dioprintk((KERN_INFO MYNAM "/receive_post_reply: %d buckets " - "remaining, %d received back since sod\n", - atomic_read(&priv->buckets_out), priv->total_received)); - -@@ -1027,8 +1025,8 @@ mpt_lan_receive_post_reply(struct net_de - int count; - int i, l; - -- dlioprintk((KERN_INFO MYNAM ": mpt_lan_receive_post_reply called\n")); -- dlioprintk((KERN_INFO MYNAM ": receive_post_reply: IOCStatus: %04x\n", -+ dioprintk((KERN_INFO MYNAM ": mpt_lan_receive_post_reply called\n")); -+ dioprintk((KERN_INFO MYNAM ": receive_post_reply: IOCStatus: %04x\n", - le16_to_cpu(pRecvRep->IOCStatus))); - - if ((le16_to_cpu(pRecvRep->IOCStatus) & MPI_IOCSTATUS_MASK) == -@@ -1057,14 +1055,14 @@ mpt_lan_receive_post_reply(struct net_de - // offset); - // } - -- dlioprintk((KERN_INFO MYNAM ": %s/%s: @rpr, offset = %d, len = %d\n", -+ dioprintk((KERN_INFO MYNAM ": %s/%s: @rpr, offset = %d, len = %d\n", - IOC_AND_NETDEV_NAMES_s_s(dev), - offset, len)); - - if (count > 1) { - int szrem = len; - --// dlioprintk((KERN_INFO MYNAM ": %s/%s: Multiple buckets returned " -+// dioprintk((KERN_INFO MYNAM ": %s/%s: Multiple buckets returned " - // "for single packet, concatenating...\n", - // IOC_AND_NETDEV_NAMES_s_s(dev))); - -@@ -1086,7 +1084,7 @@ mpt_lan_receive_post_reply(struct net_de - if (szrem < l) - l = szrem; - --// dlioprintk((KERN_INFO MYNAM ": %s/%s: Buckets = %d, len = %u\n", -+// dioprintk((KERN_INFO MYNAM ": %s/%s: Buckets = %d, len = %u\n", - // IOC_AND_NETDEV_NAMES_s_s(dev), - // i, l)); - -@@ -1214,7 +1212,7 @@ mpt_lan_post_receive_buckets(void *dev_i - curr = atomic_read(&priv->buckets_out); - buckets = (priv->max_buckets_out - curr); - -- dlioprintk((KERN_INFO MYNAM ": %s/%s: @%s, Start_buckets = %u, buckets_out = %u\n", -+ dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, Start_buckets = %u, buckets_out = %u\n", - IOC_AND_NETDEV_NAMES_s_s(dev), - __FUNCTION__, buckets, curr)); - -@@ -1226,7 +1224,7 @@ mpt_lan_post_receive_buckets(void *dev_i - if (mf == NULL) { - printk (KERN_ERR "%s: Unable to alloc request frame\n", - __FUNCTION__); -- dlioprintk((KERN_ERR "%s: %u buckets remaining\n", -+ dioprintk((KERN_ERR "%s: %u buckets remaining\n", - __FUNCTION__, buckets)); - goto out; - } -@@ -1337,9 +1335,9 @@ mpt_lan_post_receive_buckets(void *dev_i - } - - out: -- dlioprintk((KERN_INFO MYNAM "/%s: End_buckets = %u, priv->buckets_out = %u\n", -+ dioprintk((KERN_INFO MYNAM "/%s: End_buckets = %u, priv->buckets_out = %u\n", - __FUNCTION__, buckets, atomic_read(&priv->buckets_out))); -- dlioprintk((KERN_INFO MYNAM "/%s: Posted %u buckets and received %u back\n", -+ dioprintk((KERN_INFO MYNAM "/%s: Posted %u buckets and received %u back\n", - __FUNCTION__, priv->total_posted, priv->total_received)); - - clear_bit(0, &priv->post_buckets_active); -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptlan.h linux-2.6.9-55.0.12/drivers/message/fusion/mptlan.h ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptlan.h 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptlan.h 2007-11-02 09:10:23.000000000 +0100 -@@ -65,9 +65,9 @@ MODULE_DESCRIPTION(LANAME); - - /*****************************************************************************/ - #ifdef MPT_LAN_IO_DEBUG --#define dlioprintk(x) printk x -+#define dioprintk(x) printk x - #else --#define dlioprintk(x) -+#define dioprintk(x) - #endif - - #ifdef MPT_LAN_DEBUG -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptsas.c linux-2.6.9-55.0.12/drivers/message/fusion/mptsas.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptsas.c 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptsas.c 2007-11-02 09:10:23.000000000 +0100 -@@ -3,8 +3,8 @@ - * For use with LSI Logic PCI chip/adapter(s) - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - */ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -64,7 +64,6 @@ - - #include "mptbase.h" - #include "mptscsih.h" --#include "mptsas.h" - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - #define my_NAME "Fusion MPT SAS Host driver" -@@ -74,10 +73,8 @@ - MODULE_AUTHOR(MODULEAUTHOR); - MODULE_DESCRIPTION(my_NAME); - MODULE_LICENSE("GPL"); --MODULE_VERSION(my_VERSION); - - /* Command line args */ -- - static int mpt_pq_filter = 0; - module_param(mpt_pq_filter, int, 0); - MODULE_PARM_DESC(mpt_pq_filter, " Enable peripheral qualifier filter: enable=1 (default=0)"); -@@ -90,627 +87,40 @@ static int mpt_sas_hot_plug_enable = 1; - module_param(mpt_sas_hot_plug_enable, int, 0); - MODULE_PARM_DESC(mpt_sas_hot_plug_enable, " Enable SAS Hot Plug Support: enable=1 (default=1)"); - --static int mpt_cmd_retry_count = 144; --module_param(mpt_cmd_retry_count, int, 0); --MODULE_PARM_DESC(mpt_cmd_retry_count, " Device discovery TUR command retry count: default=144"); -- --extern int mpt_enable_deadioc_detect; -- --extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 bus, u8 id, u8 lun, int ctx2abort, ulong timeout); -+extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); - static int mptsasDoneCtx = -1; - static int mptsasTaskCtx = -1; - static int mptsasInternalCtx = -1; /* Used only for internal commands */ - --static void mptsas_hotplug_work(void *arg); -- --#if defined(CPQ_CIM) --/** -- * mptsas_sas_io_unit_pg0 -- * -- * obtaining SAS_IO_UNIT page 0 -- * -- * @ioc -- * @port_info -- * -- **/ --static int --mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) --{ -- ConfigExtendedPageHeader_t hdr; -- CONFIGPARMS cfg; -- SasIOUnitPage0_t *buffer; -- dma_addr_t dma_handle; -- int error, i; -- -- hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.physAddr = -1; -- cfg.pageAddr = 0; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = 10; -- -- error = mpt_config(ioc, &cfg); -- if (error) -- goto out; -- if (!hdr.ExtPageLength) { -- error = -ENXIO; -- goto out; -- } -- -- buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, -- &dma_handle); -- if (!buffer) { -- error = -ENOMEM; -- goto out; -- } -- -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- error = mpt_config(ioc, &cfg); -- if (error) -- goto out_free_consistent; -- -- port_info->num_phys = buffer->NumPhys; -- port_info->phy_info = kmalloc(port_info->num_phys * -- sizeof(*port_info->phy_info),GFP_KERNEL); -- if (!port_info->phy_info) { -- error = -ENOMEM; -- goto out_free_consistent; -- } -- -- if (port_info->num_phys) -- port_info->handle = -- le16_to_cpu(buffer->PhyData[0].ControllerDevHandle); -- for (i = 0; i < port_info->num_phys; i++) { -- port_info->phy_info[i].phy_id = i; -- port_info->phy_info[i].port_id = -- buffer->PhyData[i].Port; -- port_info->phy_info[i].negotiated_link_rate = -- buffer->PhyData[i].NegotiatedLinkRate; -- port_info->phy_info[i].portinfo = port_info; -- port_info->phy_info[i].port_flags = -- buffer->PhyData[i].PortFlags; -- } -- -- out_free_consistent: -- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, -- buffer, dma_handle); -- out: -- return error; --} -- --/** -- * mptsas_sas_device_pg0 -- * -- * obtaining SAS_DEVICE page 0 -- * -- * @ioc -- * device_info -- * -- **/ --static int --mptsas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info, -- u32 form, u32 form_specific) --{ -- ConfigExtendedPageHeader_t hdr; -- CONFIGPARMS cfg; -- SasDevicePage0_t *buffer; -- dma_addr_t dma_handle; -- u64 sas_address; -- int error=0; -- -- hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION; -- hdr.ExtPageLength = 0; -- hdr.PageNumber = 0; -- hdr.Reserved1 = 0; -- hdr.Reserved2 = 0; -- hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; -- hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE; -- -- cfg.cfghdr.ehdr = &hdr; -- cfg.pageAddr = form + form_specific; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.dir = 0; /* read */ -- cfg.timeout = 10; -- -- memset(device_info, 0, sizeof(struct mptsas_devinfo)); -- error = mpt_config(ioc, &cfg); -- if (error) -- goto out; -- if (!hdr.ExtPageLength) { -- error = -ENXIO; -- goto out; -- } -- -- buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, -- &dma_handle); -- if (!buffer) { -- error = -ENOMEM; -- goto out; -- } -- -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- error = mpt_config(ioc, &cfg); -- if (error) -- goto out_free_consistent; -- -- device_info->handle = le16_to_cpu(buffer->DevHandle); -- device_info->handle_parent = le16_to_cpu(buffer->ParentDevHandle); -- device_info->handle_enclosure = -- le16_to_cpu(buffer->EnclosureHandle); -- device_info->slot = le16_to_cpu(buffer->Slot); -- device_info->phy_id = buffer->PhyNum; -- device_info->port_id = buffer->PhysicalPort; -- device_info->id = buffer->TargetID; -- device_info->channel = buffer->Bus; -- memcpy(&sas_address, &buffer->SASAddress, sizeof(u64)); -- device_info->sas_address = le64_to_cpu(sas_address); -- device_info->device_info = -- le32_to_cpu(buffer->DeviceInfo); -- -- out_free_consistent: -- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, -- buffer, dma_handle); -- out: -- return error; --} -- --/** -- * mptsas_get_number_hotspares - returns num hot spares in this ioc -- * @ioc: Pointer to MPT_ADAPTER structure -- * -- * Return: number of hotspares -- * -- **/ --static int --mptsas_get_number_hotspares(MPT_ADAPTER *ioc) --{ -- ConfigPageHeader_t hdr; -- CONFIGPARMS cfg; -- IOCPage5_t *buffer = NULL; -- dma_addr_t dma_handle; -- int data_sz=0; -- int rc; -- -- memset(&hdr, 0, sizeof(ConfigPageHeader_t)); -- memset(&cfg, 0, sizeof(CONFIGPARMS)); -- -- rc = 0; -- hdr.PageNumber = 5; -- hdr.PageType = MPI_CONFIG_PAGETYPE_IOC; -- cfg.cfghdr.hdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.timeout = 10; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto get_ioc_pg5; -- -- if (hdr.PageLength == 0) -- goto get_ioc_pg5; -- -- data_sz = hdr.PageLength * 4; -- buffer = (IOCPage5_t *) pci_alloc_consistent(ioc->pcidev, -- data_sz, &dma_handle); -- if (!buffer) -- goto get_ioc_pg5; -- -- memset((u8 *)buffer, 0, data_sz); -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto get_ioc_pg5; -- -- rc = buffer->NumHotSpares; -- -- get_ioc_pg5: -- -- if (buffer) -- pci_free_consistent(ioc->pcidev, data_sz, -- (u8 *) buffer, dma_handle); -- -- return rc; --} -- --/** -- * mptsas_get_ioc_pg5 - ioc Page 5 hot spares -- * @ioc: Pointer to MPT_ADAPTER structure -- * @pIocPage5: ioc page 5 -- * -- * Return: 0 for success -- * -ENOMEM if no memory available -- * -EPERM if not allowed due to ISR context -- * -EAGAIN if no msg frames currently available -- * -EFAULT for non-successful reply or no reply (timeout) -- **/ --static int --mptsas_get_ioc_pg5(MPT_ADAPTER *ioc, IOCPage5_t *iocPage5) --{ -- ConfigPageHeader_t hdr; -- CONFIGPARMS cfg; -- IOCPage5_t *buffer = NULL; -- dma_addr_t dma_handle; -- int data_sz=0; -- int rc; -- -- memset(&hdr, 0, sizeof(ConfigPageHeader_t)); -- memset(&cfg, 0, sizeof(CONFIGPARMS)); -- -- rc = 0; -- hdr.PageNumber = 5; -- hdr.PageType = MPI_CONFIG_PAGETYPE_IOC; -- cfg.cfghdr.hdr = &hdr; -- cfg.physAddr = -1; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- cfg.timeout = 10; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto get_ioc_pg5; -- -- if (hdr.PageLength == 0) { -- rc = -EFAULT; -- goto get_ioc_pg5; -- } -- -- data_sz = hdr.PageLength * 4; -- buffer = (IOCPage5_t *) pci_alloc_consistent(ioc->pcidev, -- data_sz, &dma_handle); -- if (!buffer) { -- rc = -ENOMEM; -- goto get_ioc_pg5; -- } -- -- memset((u8 *)buffer, 0, data_sz); -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if ((rc = mpt_config(ioc, &cfg)) != 0) -- goto get_ioc_pg5; -- -- memcpy(iocPage5, buffer, sizeof(*iocPage5)); -- -- get_ioc_pg5: -- -- if (buffer) -- pci_free_consistent(ioc->pcidev, data_sz, -- (u8 *) buffer, dma_handle); -- -- return rc; --} -- --/** -- * mptsas_add_device_component -- * -- * @ioc -- * @channel - fw mapped id's -- * @id -- * @sas_address -- * @device_info -- * -- **/ --static void --mptsas_add_device_component(MPT_ADAPTER *ioc, u8 channel, u8 id, -- u64 sas_address, u32 device_info) --{ -- struct sas_device_info *sas_info, *next; -- -- down(&ioc->sas_device_info_mutex); -- -- /* -- * Delete all matching sas_address's out of tree -- */ -- list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, list) { -- if (sas_info->sas_address != sas_address) -- continue; -- list_del(&sas_info->list); -- kfree(sas_info); -- } -- -- /* -- * If there is a matching channel/id, then swap out with new target info -- */ -- list_for_each_entry(sas_info, &ioc->sas_device_info_list, list) { -- if (sas_info->fw.channel == channel && sas_info->fw.id == id) -- goto initialize_data; -- } -- -- if (!(sas_info = kmalloc(sizeof(*sas_info), GFP_KERNEL))) -- goto out; -- memset(sas_info, 0, sizeof(*sas_info)); -- -- /* -- * mapping - is for compatibility with drivers supporting sas transport layer -- */ -- sas_info->fw.id = id; -- sas_info->fw.channel = channel; -- sas_info->os.id = id; -- sas_info->os.channel = channel; -- list_add_tail(&sas_info->list, &ioc->sas_device_info_list); -- -- initialize_data: -- -- sas_info->sas_address = sas_address; -- sas_info->device_info = device_info; -- sas_info->is_cached = 0; -- sas_info->is_logical_volume = 0; -- devtprintk((KERN_INFO "%s: adding channel=%d id=%d " -- "sas_address=0x%llX\n", __FUNCTION__, channel, id, sas_address)); -- -- out: -- up(&ioc->sas_device_info_mutex); -- return; --} -- --/** -- * mptsas_add_device_component_single -- * -- * @ioc -- * @channel -- * @id -- * -- **/ --static void --mptsas_add_device_component_single(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- struct mptsas_devinfo sas_device; -- int rc; -- -- rc = mptsas_sas_device_pg0(ioc, &sas_device, -- (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID << -- MPI_SAS_DEVICE_PGAD_FORM_SHIFT), -- (channel << 8) + id); -- if (rc) -- return; -- -- mptsas_add_device_component(ioc, sas_device.channel, -- sas_device.id, sas_device.sas_address, sas_device.device_info); --} -- --/** -- * mptsas_add_device_component_hotspare -- * -- * Handle adding hotspares into the list -- * -- * @ioc -- * -- **/ --static void --mptsas_add_device_component_hotspare(MPT_ADAPTER *ioc) --{ -- int num_hotspares; -- IOCPage5_t *iocPage5; -- RaidPhysDiskPage0_t phys_disk; -- int i; -- -- iocPage5 = NULL; -- num_hotspares = mptsas_get_number_hotspares(ioc); -- if (!num_hotspares) -- goto out; -- -- iocPage5 = kmalloc(offsetof(IOCPage5_t,HotSpare) + -- num_hotspares * sizeof(IOC_5_HOT_SPARE), GFP_KERNEL); -- if (!iocPage5) -- goto out; -- memset(iocPage5, 0, sizeof(*iocPage5)); -- if (mptsas_get_ioc_pg5(ioc, iocPage5) != 0) -- goto out; -- for(i = 0; i < num_hotspares; i++) { -- mpt_raid_phys_disk_pg0(ioc, -- iocPage5->HotSpare[i].PhysDiskNum, &phys_disk ); -- mptsas_add_device_component_single(ioc, -- phys_disk.PhysDiskBus, phys_disk.PhysDiskID); -- } -- out: -- kfree(iocPage5); -- --} -- --/** -- * mptsas_add_device_component_ir -- * -- * Handle Integrated RAID, adding each individual device to list -- * -- * @ioc -- * @channel -- * @id -- * -- **/ --static void --mptsas_add_device_component_ir(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- CONFIGPARMS cfg; -- ConfigPageHeader_t hdr; -- dma_addr_t dma_handle; -- pRaidVolumePage0_t buffer = NULL; -- int i; -- RaidPhysDiskPage0_t phys_disk; -- struct sas_device_info *sas_info; -- -- memset(&cfg, 0 , sizeof(CONFIGPARMS)); -- memset(&hdr, 0 , sizeof(ConfigPageHeader_t)); -- hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; -- cfg.pageAddr = (channel << 8) + id; -- cfg.cfghdr.hdr = &hdr; -- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; -- -- if (mpt_config(ioc, &cfg) != 0) -- goto out; -- -- if (!hdr.PageLength) -- goto out; -- -- buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4, -- &dma_handle); -- -- if (!buffer) -- goto out; -- -- cfg.physAddr = dma_handle; -- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; -- -- if (mpt_config(ioc, &cfg) != 0) -- goto out; -- -- if (!buffer->NumPhysDisks) -- goto out; -- -- /* -- * Adding entry for hidden components -- */ -- for (i = 0; i < buffer->NumPhysDisks; i++) { -- -- if(mpt_raid_phys_disk_pg0(ioc, -- buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0) -- continue; - -- mptsas_add_device_component_single(ioc, phys_disk.PhysDiskBus, -- phys_disk.PhysDiskID); -- } -- -- /* -- * Adding entry for logical volume in list -- */ -- list_for_each_entry(sas_info, &ioc->sas_device_info_list, list) { -- if (sas_info->fw.channel == channel && sas_info->fw.id == id) -- goto initialize_data; -- } -- -- if (!(sas_info = kmalloc(sizeof(*sas_info), GFP_KERNEL))) -- goto out; -- memset(sas_info, 0, sizeof(*sas_info)); -- -- sas_info->fw.id = id; -- sas_info->fw.channel = channel; /* channel zero */ -- down(&ioc->sas_device_info_mutex); -- list_add_tail(&sas_info->list, &ioc->sas_device_info_list); -- up(&ioc->sas_device_info_mutex); -- -- initialize_data: -- -- sas_info->os.id = id; -- sas_info->os.channel = channel; -- sas_info->sas_address = 0; -- sas_info->device_info = 0; -- sas_info->is_logical_volume = 1; -- sas_info->is_cached = 0; -- -- devtprintk((KERN_INFO "%s: adding volume at channel=%d id=%d\n", -- __FUNCTION__, channel, id)); -- -- mptsas_add_device_component_hotspare(ioc); -- out: -- if (buffer) -- pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer, -- dma_handle); --} -- -- --/** -- * mptsas_del_device_component -- * -- * Once a device has been removed, we mark the -- * entry in the list as being cached -- * -- * @ioc -- * @channel - os mapped id's -- * @id -- * -- **/ --static void --mptsas_del_device_component(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- struct sas_device_info *sas_info, *next; -- -- /* -- * Set is_cached flag -- */ -- list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, list) { -- if (sas_info->os.channel == channel && sas_info->os.id == id) { -- sas_info->is_cached = 1; -- devtprintk((KERN_INFO -- "%s: deleting channel=%d id=%d " -- "sas_address=0x%llX\n", __FUNCTION__, channel, id, -- sas_info->sas_address)); -- } -- } --} -- --/** -- * mptsas_del_device_components -- * -- * Cleaning the list -- * -- * @ioc -- * -- **/ --static void --mptsas_del_device_components(MPT_ADAPTER *ioc) --{ -- struct sas_device_info *sas_info, *next; -- -- down(&ioc->sas_device_info_mutex); -- list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, list) { -- list_del(&sas_info->list); -- kfree(sas_info); -- } -- up(&ioc->sas_device_info_mutex); --} --#endif -- --/** -- * mptsas_find_vdevice -- * -- * @ioc -- * @channel -- * @id -- * -- **/ --static VirtDevice * --mptsas_find_vdevice(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- struct _MPT_DEVICE *pMptTarget; -- -- if (id >= ioc->DevicesPerBus || channel >= ioc->NumberOfBuses) -- return NULL; -+enum mptsas_hotplug_action { -+ MPTSAS_ADD_DEVICE, -+ MPTSAS_DEL_DEVICE, -+}; - -- pMptTarget = ioc->Target_List[channel]; -- return pMptTarget->Target[id]; --} -+struct mptsas_hotplug_event { -+ struct work_struct work; -+ MPT_ADAPTER *ioc; -+ enum mptsas_hotplug_action event_type; -+ u64 sas_address; -+ u32 channel; -+ u32 id; -+ u32 device_info; -+ u16 handle; -+ u16 parent_handle; -+ u8 phy_id; -+ u8 isRaid; -+}; - --/** -- * mptsas_qcmd -- * -- * receiving a scsi_cmnd from upper layers -- * -- * @SCpnt -- * @done -- * -- **/ - static int - mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) - { - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata; -- MPT_ADAPTER *ioc = hd->ioc; -- static VirtDevice *pTarget; -- int id = SCpnt->device->id; -- int channel = SCpnt->device->channel; -- -- /* If Device has been removed, inhibit any more IO */ -- pTarget = mptsas_find_vdevice(ioc, channel, id); -- if (pTarget && (pTarget->tflags & MPT_TARGET_FLAGS_DELETED)) { -+ int id = SCpnt->device->id; -+ -+ /* Device has been removed, so inhibit any more IO */ -+ if (hd->Targets[id] && -+ hd->Targets[id]->tflags & MPT_TARGET_FLAGS_DELETED) { - SCpnt->result = DID_NO_CONNECT << 16; - done(SCpnt); - return 0; -@@ -719,32 +129,6 @@ mptsas_qcmd(struct scsi_cmnd *SCpnt, voi - return mptscsih_qcmd(SCpnt,done); - } - --/** -- * mptsas_slave_configure -- * -- * -- * @sdev -- * -- **/ --static int --mptsas_slave_configure(struct scsi_device *sdev) --{ --#if defined(CPQ_CIM) -- MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)sdev->host->hostdata; -- MPT_ADAPTER *ioc = hd->ioc; -- int channel; -- int id; -- -- channel = sdev->channel; -- id = sdev->id; -- -- if ((ioc->raid_data.isRaid & (1 << id)) == 0) -- mptsas_add_device_component_single(ioc, channel, id); --#endif -- return mptscsih_slave_configure(sdev); --} -- -- - /* Show the ioc state for this card */ - static ssize_t - mptsas_show_iocstate(struct class_device *class_dev, char *buf) -@@ -778,300 +162,49 @@ static struct scsi_host_template mptsas_ - .info = mptscsih_info, - .queuecommand = mptsas_qcmd, - .slave_alloc = mptscsih_slave_alloc, -- .slave_configure = mptsas_slave_configure, -- .slave_destroy = mptscsih_slave_destroy, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)) -- .change_queue_depth = mptscsih_change_queue_depth, --#endif -- .eh_abort_handler = mptscsih_abort, -- .eh_device_reset_handler = mptscsih_dev_reset, -- .eh_bus_reset_handler = mptscsih_bus_reset, -- .eh_host_reset_handler = mptscsih_host_reset, -- .bios_param = mptscsih_bios_param, -- .can_queue = MPT_FC_CAN_QUEUE, -- .this_id = -1, -- .sg_tablesize = CONFIG_FUSION_MAX_SGE, -- .max_sectors = 8192, -- .cmd_per_lun = 7, -- .use_clustering = ENABLE_CLUSTERING, -- .shost_attrs = mptsas_host_attrs, -- .dump_sanity_check = mptscsih_sanity_check, -- .dump_poll = mptscsih_poll, --}; -- --/** -- * mptsas_remove -- * -- * -- * @pdev -- * -- **/ --static void __devexit mptsas_remove(struct pci_dev *pdev) --{ --#if defined(CPQ_CIM) -- MPT_ADAPTER *ioc = pci_get_drvdata(pdev); -- if(ioc->sh != NULL) -- mptsas_del_device_components(ioc); --#endif -- -- flush_scheduled_work(); -- mptscsih_remove(pdev); --} -- --/** -- * mptsas_target_reset -- * -- * Issues TARGET_RESET to end device using handshaking method -- * -- * @ioc -- * @channel -- * @id -- * -- * Returns (1) success -- * (0) failure -- * -- **/ --static int --mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id) --{ -- MPT_FRAME_HDR *mf; -- SCSITaskMgmt_t *pScsiTm; -- -- if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) { -- dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames @%d!!\n", -- ioc->name,__FUNCTION__, __LINE__)); -- return 0; -- } -- -- /* Format the Request -- */ -- pScsiTm = (SCSITaskMgmt_t *) mf; -- memset (pScsiTm, 0, sizeof(SCSITaskMgmt_t)); -- pScsiTm->TargetID = id; -- pScsiTm->Bus = channel; -- pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT; -- pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET; -- pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION; -- --// EDM printk("tm target reset : issue : channel=%d id=%d\n", channel, id); -- DBG_DUMP_TM_REQUEST_FRAME(mf); -- -- if (mpt_send_handshake_request(ioc->TaskCtx, ioc, -- sizeof(SCSITaskMgmt_t), (u32 *)mf, 10,NO_SLEEP)) { -- mpt_free_msg_frame(ioc, mf); -- dfailprintk((MYIOC_s_WARN_FMT "%s, tm handshake failed @%d!!\n", -- ioc->name,__FUNCTION__, __LINE__)); -- return 0; -- } -- -- return 1; --} -- --/** -- * mptsas_target_reset_queue -- * -- * Receive request for TARGET_RESET after recieving an firmware -- * event NOT_RESPONDING_EVENT, then put command in link list -- * and queue if task_queue already in use. -- * -- * @ioc -- * @sas_event_data -- * -- **/ --static void --mptsas_target_reset_queue(MPT_ADAPTER *ioc, -- EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data) --{ -- MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; -- VirtDevice *vdevice = NULL; -- struct mptscsih_target_reset *target_reset_list; -- u8 id, channel; -- -- id = sas_event_data->TargetID; -- channel = sas_event_data->Bus; -- -- if (!(vdevice = mptsas_find_vdevice(ioc, channel, id))) -- return; -- -- vdevice->tflags |= MPT_TARGET_FLAGS_DELETED; -- -- target_reset_list = kmalloc(sizeof(*target_reset_list), -- GFP_ATOMIC); -- if (!target_reset_list) { -- dfailprintk((MYIOC_s_WARN_FMT -- "%s, failed to allocate mem @%d..!!\n", -- ioc->name,__FUNCTION__, __LINE__)); -- return; -- } -- -- memset(target_reset_list, 0, sizeof(*target_reset_list)); --// EDM printk("tm target reset : queue : channel=%d id=%d\n", channel, id); -- -- memcpy(&target_reset_list->sas_event_data, sas_event_data, -- sizeof(*sas_event_data)); -- list_add_tail(&target_reset_list->list, &hd->target_reset_list); -- -- if (hd->resetPending) -- return; -- -- if (mptsas_target_reset(ioc, channel, id)) { -- target_reset_list->target_reset_issued = 1; -- hd->resetPending = 1; -- } --} -- --/** -- * mptsas_dev_reset_complete -- * -- * Completion for TARGET_RESET after NOT_RESPONDING_EVENT, -- * enable work queue to finish off removing device from upper layers. -- * then send next TARGET_RESET in the queue. -- * -- * @ioc -- * -- **/ --static void --mptsas_dev_reset_complete(MPT_ADAPTER *ioc) --{ -- MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; -- struct list_head *head = &hd->target_reset_list; -- struct mptscsih_target_reset *target_reset_list; -- struct mptsas_hotplug_event *ev; -- EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data; -- u8 id, channel; -- u64 sas_address; -- -- if (list_empty(head)) -- return; -- -- target_reset_list = list_entry(head->next, -- struct mptscsih_target_reset, list); -- -- sas_event_data = &target_reset_list->sas_event_data; -- id = sas_event_data->TargetID; -- channel = sas_event_data->Bus; -- hd->resetPending = 0; -- -- /* -- * retry target reset -- */ -- if (!target_reset_list->target_reset_issued) { -- if (mptsas_target_reset(ioc, channel, id)) { -- target_reset_list->target_reset_issued = 1; -- hd->resetPending = 1; -- } -- return; -- } -- --// EDM printk("tm target reset : complete : channel=%d id=%d\n", channel, id); -- -- /* -- * enable work queue to remove device from upper layers -- */ -- list_del(&target_reset_list->list); -- -- ev = kmalloc(sizeof(*ev), GFP_ATOMIC); -- if (!ev) { -- dfailprintk((MYIOC_s_WARN_FMT -- "%s, failed to allocate mem @%d..!!\n", -- ioc->name,__FUNCTION__, __LINE__)); -- return; -- } -- -- memset(ev, 0, sizeof(*ev)); -- INIT_WORK(&ev->work, mptsas_hotplug_work, ev); -- ev->ioc = ioc; -- ev->handle = le16_to_cpu(sas_event_data->DevHandle); -- ev->parent_handle = le16_to_cpu(sas_event_data->ParentDevHandle); -- ev->channel = channel; -- ev->id = id; -- ev->phy_id = sas_event_data->PhyNum; -- memcpy(&sas_address, &sas_event_data->SASAddress, sizeof(u64)); -- ev->sas_address = le64_to_cpu(sas_address); -- ev->device_info = le32_to_cpu(sas_event_data->DeviceInfo); -- ev->event_type = MPTSAS_DEL_DEVICE; -- schedule_work(&ev->work); -- kfree(target_reset_list); -- -- /* -- * issue target reset to next device in the queue -- */ -- -- head = &hd->target_reset_list; -- if (list_empty(head)) -- return; -- -- target_reset_list = list_entry(head->next, struct mptscsih_target_reset, -- list); -- -- sas_event_data = &target_reset_list->sas_event_data; -- id = sas_event_data->TargetID; -- channel = sas_event_data->Bus; -- -- if (mptsas_target_reset(ioc, channel, id)) { -- target_reset_list->target_reset_issued = 1; -- hd->resetPending = 1; -- } --} -+ .slave_configure = mptscsih_slave_configure, -+ .slave_destroy = mptscsih_slave_destroy, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)) -+ .change_queue_depth = mptscsih_change_queue_depth, -+#endif -+ .eh_abort_handler = mptscsih_abort, -+ .eh_device_reset_handler = mptscsih_dev_reset, -+ .eh_bus_reset_handler = mptscsih_bus_reset, -+ .eh_host_reset_handler = mptscsih_host_reset, -+ .bios_param = mptscsih_bios_param, -+ .can_queue = MPT_FC_CAN_QUEUE, -+ .this_id = -1, -+ .sg_tablesize = MPT_SCSI_SG_DEPTH, -+ .max_sectors = 8192, -+ .cmd_per_lun = 7, -+ .use_clustering = ENABLE_CLUSTERING, -+ .shost_attrs = mptsas_host_attrs, -+ .dump_sanity_check = mptscsih_sanity_check, -+ .dump_poll = mptscsih_poll, -+}; - --/** -- * mptsas_taskmgmt_complete -- * -- * @ioc -- * @mf -- * @mr -- * -- **/ --static int --mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) -+static void __devexit mptsas_remove(struct pci_dev *pdev) - { -- mptsas_dev_reset_complete(ioc); -- return mptscsih_taskmgmt_complete(ioc, mf, mr); -+ flush_scheduled_work(); -+ mptscsih_remove(pdev); - } - --/** -- * mptscsih_ioc_reset -- * -- * @ioc -- * @reset_phase -- * -- **/ --static int --mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) -+static void -+mptsas_target_reset(MPT_ADAPTER *ioc, VirtDevice * vdevice) - { -- MPT_SCSI_HOST *hd =NULL; -- struct mptscsih_target_reset *target_reset_list, *n; -- int rc; -- -- if ((ioc->sh != NULL) && (ioc->sh->hostdata != NULL)) -- hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; -- -- rc = mptscsih_ioc_reset(ioc, reset_phase); -+ MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; - -- if (reset_phase != MPT_IOC_POST_RESET) -- goto out; -- -- if (ioc->bus_type != SAS) -- goto out; -- if(hd == NULL) -- goto out; -- -- -- if (list_empty(&hd->target_reset_list)) -- goto out; -- -- /* flush the target_reset_list */ -- list_for_each_entry_safe(target_reset_list, n, -- &hd->target_reset_list, list) { -- list_del(&target_reset_list->list); -- kfree(target_reset_list); -+ if (mptscsih_TMHandler(hd, -+ MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, -+ vdevice->bus_id, vdevice->target_id, 0, 0, 5) < 0) { -+ hd->tmPending = 0; -+ hd->tmState = TM_STATE_NONE; -+ printk(MYIOC_s_WARN_FMT -+ "Error processing TaskMgmt id=%d TARGET_RESET\n", -+ ioc->name, vdevice->target_id); - } -- -- out: -- return rc; - } - -- - /**************************************************************************** - * Supported hardware - */ -@@ -1092,13 +225,6 @@ static struct pci_device_id mptsas_pci_t - MODULE_DEVICE_TABLE(pci, mptsas_pci_table); - - --/** -- * mptscsih_sas_persist_clear_table -- * -- * -- * @ioc -- * -- **/ - static void - mptscsih_sas_persist_clear_table(void * arg) - { -@@ -1107,52 +233,76 @@ mptscsih_sas_persist_clear_table(void * - mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT); - } - --/** -- * mptsas_hotplug_print -- * -- * -- * @ioc -- * @hot_plug_info -- * @msg_string -- * -- **/ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* mptbase_sas_update_device_list - -+ * This is called from the work queue. -+ * Purpose is to called when a logical volume has been created, deleted, -+ * or status change. -+ * Since in SAS the phydisk can be moved to different location, we will need -+ * to refresh the device list by recreating it. -+ */ -+static void -+mptscsih_sas_update_device_list(MPT_ADAPTER *ioc ) -+{ -+ sas_device_info_t *sasDevice, *pNext; -+ -+ /* -+ * Kill everything in the device list, then rediscover -+ */ -+ list_for_each_entry_safe(sasDevice, pNext, &ioc->sasDeviceList, list) { -+ list_del(&sasDevice->list); -+ kfree(sasDevice); -+ ioc->alloc_total -= sizeof (sas_device_info_t); -+ } -+ -+ if (ioc->sasPhyInfo != NULL) { -+ kfree(ioc->sasPhyInfo); -+ ioc->sasPhyInfo = NULL; -+ ioc->alloc_total -= -+ ioc->numPhys * sizeof (sas_phy_info_t); -+ } -+ ioc->numPhys = 0; -+ -+ /* -+ * Rescsan list -+ */ -+ mpt_sas_get_info(ioc); -+} -+ - static void - mptsas_hotplug_print(MPT_ADAPTER *ioc, struct mptsas_hotplug_event *hot_plug_info, u32 lun, u8 * msg_string) - { -- char *ds; -+ char *ds = NULL; - u32 id = hot_plug_info->id; -- u32 channel = hot_plug_info->channel; - -- if ( id >= ioc->DevicesPerBus ) { -- printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, DevicesPerBus=%d\n", -- ioc->name, __FUNCTION__, id, ioc->DevicesPerBus); -+ if ( id > ioc->pfacts->MaxDevices ) { -+ printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n", -+ ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices); - return; - } - -- if ( channel >= ioc->NumberOfBuses ) { -- printk(MYIOC_s_WARN_FMT -- "%s: Invalid channel=%d, NumberOfBuses=%d\n", -- ioc->name, __FUNCTION__, channel, ioc->NumberOfBuses); -- return; -+ if (hot_plug_info->isRaid) { -+ printk(MYIOC_s_INFO_FMT -+ "%s device, channel %d, id %d, lun %d\n", -+ ioc->name, msg_string, -+ hot_plug_info->channel, -+ id, lun); -+ } else { -+ if (hot_plug_info->device_info & -+ MPI_SAS_DEVICE_INFO_SSP_TARGET) -+ ds = "sas"; -+ if (hot_plug_info->device_info & -+ MPI_SAS_DEVICE_INFO_STP_TARGET) -+ ds = "stp"; -+ if (hot_plug_info->device_info & -+ MPI_SAS_DEVICE_INFO_SATA_DEVICE) -+ ds = "sata"; -+ printk(MYIOC_s_INFO_FMT -+ "%s %s device, channel %d, id %d, lun %d," -+ " phy %d\n", ioc->name, msg_string, ds, -+ hot_plug_info->channel, id, lun, -+ hot_plug_info->phy_id); - } -- -- if (hot_plug_info->device_info & -- MPI_SAS_DEVICE_INFO_SSP_TARGET) -- ds = "sas "; -- else if (hot_plug_info->device_info & -- MPI_SAS_DEVICE_INFO_STP_TARGET) -- ds = "stp "; -- else if (hot_plug_info->device_info & -- MPI_SAS_DEVICE_INFO_SATA_DEVICE) -- ds = "sata "; -- else -- ds = ""; -- -- printk(MYIOC_s_INFO_FMT -- "%s %sdevice, channel %d, id %d, lun %d," -- " phy %d\n", ioc->name, msg_string, ds, -- channel, id, lun, -- hot_plug_info->phy_id); - } - - /* -@@ -1167,32 +317,20 @@ mptsas_remove_target(MPT_ADAPTER *ioc, s - struct Scsi_Host *shost = ioc->sh; - unsigned long flags; - struct scsi_device *sdev; -- static VirtDevice *pTarget; - u32 channel, id; -+ MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; - - id = hot_plug_info->id; -- channel = hot_plug_info->channel; -- -- if ( id >= ioc->DevicesPerBus ) { -- printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, DevicesPerBus=%d\n", -- ioc->name, __FUNCTION__, id, ioc->DevicesPerBus); -- return; -- } - -- if ( channel >= ioc->NumberOfBuses ) { -- printk(MYIOC_s_WARN_FMT -- "%s: Invalid channel=%d, NumberOfBuses=%d\n", -- ioc->name, __FUNCTION__, channel, ioc->NumberOfBuses); -+ if ( id > ioc->pfacts->MaxDevices ) { -+ printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n", -+ ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices); - return; - } - -- pTarget = mptsas_find_vdevice(ioc, channel, id); -- if (!pTarget) -- return; -- -- pTarget->tflags &= ~MPT_TARGET_FLAGS_TLR_DONE; -- -+ mptsas_target_reset(ioc, hd->Targets[id]); - -+ channel = hot_plug_info->channel; - spin_lock_irqsave(shost->host_lock, flags); - restart: - list_for_each_entry(sdev, &shost->__devices, siblings) { -@@ -1208,46 +346,26 @@ mptsas_remove_target(MPT_ADAPTER *ioc, s - spin_unlock_irqrestore(shost->host_lock, flags); - } - --/** -- * mptsas_add_device -- * -- * -- * @ioc -- * @hot_plug_info -- * -- **/ - static void - mptsas_add_device(MPT_ADAPTER *ioc, struct mptsas_hotplug_event *hot_plug_info, - u32 lun) - { - u32 channel, id; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)) - struct scsi_device *sdev; -+#else -+ int error; -+#endif - - id = hot_plug_info->id; - -- if ( id >= ioc->DevicesPerBus ) { -- printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, DevicesPerBus=%d\n", -- ioc->name, __FUNCTION__, id, ioc->DevicesPerBus); -+ if ( id > ioc->pfacts->MaxDevices ) { -+ printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n", -+ ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices); - return; - } - - channel = hot_plug_info->channel; -- if ( channel >= ioc->NumberOfBuses ) { -- printk(MYIOC_s_WARN_FMT -- "%s: Invalid channel=%d, NumberOfBuses=%d\n", -- ioc->name, __FUNCTION__, channel, ioc->NumberOfBuses); -- return; -- } -- -- /* -- * avoid adding a device that is already present -- */ -- sdev = scsi_device_lookup(ioc->sh, channel, id, lun); -- if (sdev) { -- scsi_device_put(sdev); -- return; -- } -- - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)) - sdev = scsi_add_device(ioc->sh, channel, id, lun); - if (!IS_ERR(sdev)) -@@ -1261,13 +379,6 @@ mptsas_add_device(MPT_ADAPTER *ioc, stru - #endif - } - --/** -- * scsilun_to_int -- * -- * -- * @scsilun -- * -- **/ - static int scsilun_to_int(struct scsi_lun *scsilun) - { - int i; -@@ -1298,170 +409,56 @@ mptsas_scan_target(MPT_ADAPTER *ioc, str - u32 length, channel, id, lun, num_luns; - u8 *data; - u32 retries; -- int rc; -+ int completion_code; - - id = hot_plug_info->id; -- channel = hot_plug_info->channel; - -- if ( id > ioc->DevicesPerBus ) { -- printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, DevicesPerBus=%d\n", -- ioc->name, __FUNCTION__, id, ioc->DevicesPerBus); -- return; -- } -- -- if ( channel >= ioc->NumberOfBuses ) { -- printk(MYIOC_s_WARN_FMT -- "%s: Invalid channel=%d, NumberOfBuses=%d\n", -- ioc->name, __FUNCTION__, channel, ioc->NumberOfBuses); -- return; -- } -- -- /* -- * Integrated RAID doesn't support REPORT_LUNS, it will timeout -- */ -- if (ioc->raid_data.isRaid & (1 << id)) { -- mptsas_add_device(ioc, hot_plug_info, 0); -+ if ( id > ioc->pfacts->MaxDevices ) { -+ printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n", -+ ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices); - return; - } - -- /* initialize REPORT_LUN params */ -+ channel = hot_plug_info->channel; - lun = 0; -- lun_data_len = 0; -- lun_data = NULL; -- lunp = NULL; - - /* -- * Test Unit Ready -+ * Integrated RAID doesn't support luns greater than 0 - */ -- iocmd.cmd = TEST_UNIT_READY; -- iocmd.bus = channel; -- iocmd.id = id; -- iocmd.lun = lun; -- iocmd.flags = 0; -- iocmd.data_dma = -1; -- iocmd.data = NULL; -- iocmd.size = 0; -- dinitprintk((MYIOC_s_INFO_FMT "Sending TURs to channel=%d id=%d \n", -- ioc->name, channel, id)); -- for (retries = 0; retries < mpt_cmd_retry_count; retries++) { -- if (mptscsih_do_cmd(hd, &iocmd) < 0) { -- dinitprintk((MYIOC_s_INFO_FMT -- "TUR: mptscsih_do_cmd failed\n", -- ioc->name)); -- goto tur_done; -- } -- -- if (hd->pLocal == NULL) { -- dinitprintk((MYIOC_s_INFO_FMT "TUR: no pLocal\n", -- ioc->name)); -- goto tur_done; -- } -- -- rc = hd->pLocal->completion; -- if (rc == MPT_SCANDV_GOOD) { -- dinitprintk((MYIOC_s_INFO_FMT "TUR: succeeded\n", -- ioc->name)); -- goto tur_done; -- } else if (rc == MPT_SCANDV_BUSY) { -- dinitprintk((MYIOC_s_INFO_FMT "TUR: BUSY\n", -- ioc->name)); -- msleep(1000); /* sleep 1 second */ -- continue; -- } else if (rc == MPT_SCANDV_SENSE) { -- u8 skey = hd->pLocal->sense[2] & 0x0F; -- u8 asc = hd->pLocal->sense[12]; -- u8 ascq = hd->pLocal->sense[13]; -- dinitprintk((MYIOC_s_INFO_FMT -- "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", -- ioc->name, skey, asc, ascq)); -- -- if (skey == UNIT_ATTENTION) { -- dinitprintk((MYIOC_s_INFO_FMT -- "TUR: UNIT ATTENTION\n", -- ioc->name)); -- continue; -- } else if ((skey == NOT_READY) && -- (asc == 0x04)&&(ascq == 0x01)) { -- dinitprintk((MYIOC_s_INFO_FMT -- "TUR: Becoming Ready\n", -- ioc->name)); -- msleep(1000); /* sleep 1 second */ -- continue; -- } -- } -+ if (hot_plug_info->isRaid) { -+ mptsas_add_device(ioc, hot_plug_info, lun); -+ return; - } - -- tur_done: -- - lun_data_len = (MPT_LAST_LUN + 1) * sizeof(struct scsi_lun); - lun_data = pci_alloc_consistent(ioc->pcidev, lun_data_len, - &lun_data_dma); - if (!lun_data) -- goto report_luns_done; -+ goto out; - -- /* -- * Report Luns -- */ - iocmd.cmd = REPORT_LUNS; - iocmd.data_dma = lun_data_dma; - iocmd.data = (u8 *)lun_data; - iocmd.size = lun_data_len; -+ iocmd.bus = channel; -+ iocmd.id = id; -+ iocmd.lun = lun; - iocmd.flags = 0; - - /* -- * While loop for 10 sec retrying REPORT_LUNS, this is done -+ * While loop for 3 sec retrying REPORT_LUNS, this is done - * because some devices return MPI_SCSI_STATUS_BUSY for several - * seconds. - */ -- dinitprintk((MYIOC_s_INFO_FMT -- "Sending REPORT_LUNS to channel=%d id=%d \n", -- ioc->name, channel, id)); -+// for (retries = 0; retries < 3; retries++) { /* EDM - TRY 10 */ - for (retries = 0; retries < 10; retries++) { - memset(lun_data, 0, lun_data_len); -- if (mptscsih_do_cmd(hd, &iocmd) < 0) { -- dinitprintk((MYIOC_s_INFO_FMT -- "RL: mptscsih_do_cmd failed\n", ioc->name)); -- goto report_luns_done; -- } -- -- if (hd->pLocal == NULL) { -- dinitprintk((MYIOC_s_INFO_FMT "RL: no pLocal\n", -- ioc->name)); -- goto report_luns_done; -- } -- -- rc = hd->pLocal->completion; -- if (rc == MPT_SCANDV_GOOD) { -- dinitprintk((MYIOC_s_INFO_FMT "RL: succeeded\n", -- ioc->name)); -- goto report_luns_done; -- } else if (rc == MPT_SCANDV_BUSY) { -- dinitprintk((MYIOC_s_INFO_FMT "RL: BUSY\n", ioc->name)); -- msleep(1000); -- continue; -- } else if (rc == MPT_SCANDV_SENSE) { -- u8 skey = hd->pLocal->sense[2] & 0x0F; -- u8 asc = hd->pLocal->sense[12]; -- u8 ascq = hd->pLocal->sense[13]; -- dinitprintk((MYIOC_s_INFO_FMT -- "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, -- skey, asc, ascq)); -- -- if (skey == UNIT_ATTENTION) { -- dinitprintk((MYIOC_s_INFO_FMT -- "RL: UNIT ATTENTION\n", ioc->name)); -- continue; -- } else if ((skey == NOT_READY) && -- (asc == 0x04)&&(ascq == 0x01)) { -- dinitprintk((MYIOC_s_INFO_FMT -- "RL: Becoming Ready\n", ioc->name)); -- msleep(1000); -- continue; -- } -- } -+ completion_code = mptscsih_do_cmd(hd, &iocmd); -+ if (!completion_code) -+ break; -+ msleep(1000); - } - -- report_luns_done: - /* - * Attaching lun=0 - */ -@@ -1470,8 +467,6 @@ mptsas_scan_target(MPT_ADAPTER *ioc, str - /* - * Get the length from the first four bytes of lun_data. - */ -- if (!lun_data) -- goto out; - data = (u8 *)lun_data; - length = ((data[0] << 24) | (data[1] << 16) | - (data[2] << 8) | (data[3] << 0)); -@@ -1501,91 +496,93 @@ mptsas_scan_target(MPT_ADAPTER *ioc, str - lun_data_dma); - } - --/** -- * mptsas_hotplug_work -- * -- * -- * @hot_plug_info -- * -- **/ - static void - mptsas_hotplug_work(void *arg) - { - struct mptsas_hotplug_event *hot_plug_info = arg; - MPT_ADAPTER *ioc = hot_plug_info->ioc; -- u32 id, channel; -+ MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; -+ VirtDevice *pTarget; -+ u32 id = hot_plug_info->id; - -- id = hot_plug_info->id; -- channel = hot_plug_info->channel; - - dhotpprintk((MYIOC_s_WARN_FMT "Entering %s for channel=%d id=%d\n", -- ioc->name,__FUNCTION__, channel, id)); -+ ioc->name,__FUNCTION__, -+ hot_plug_info->channel, id)); -+ -+ -+ if ( id > ioc->pfacts->MaxDevices ) { -+ printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n", -+ ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices); -+ return; -+ } - - down(&ioc->hot_plug_semaphore); - -- /* If there has been a change to raid, then we need to -- * refresh the config raid data -- */ -- if (hot_plug_info->refresh_raid_config_pages) -- mpt_findImVolumes(ioc); -+ pTarget = hd->Targets[id]; -+ dhotpprintk((MYIOC_s_WARN_FMT "hot_plug_info=%p ioc=%p hd=%p pTarget=%p\n", -+ ioc->name, hot_plug_info, ioc, hd, pTarget)); - - switch (hot_plug_info->event_type) { - case MPTSAS_DEL_DEVICE: --#if defined(CPQ_CIM) -- mptsas_del_device_component(ioc, channel, id); -- if (hot_plug_info->refresh_raid_config_pages) -- mptsas_add_device_component_hotspare(ioc); --#endif - dhotpprintk((MYIOC_s_WARN_FMT - "MPTSAS_DEL_DEVICE: channel=%d id=%d\n", -- ioc->name, channel, id)); -+ ioc->name, -+ hot_plug_info->channel, -+ id)); -+ if (pTarget == NULL) { -+ dhotpprintk((MYIOC_s_WARN_FMT -+ "hot_plug id=%d not found in Targets array", -+ ioc->name, -+ id)); -+ goto out; -+ } -+ pTarget->tflags &= ~MPT_TARGET_FLAGS_TLR_DONE; -+ pTarget->tflags |= MPT_TARGET_FLAGS_DELETED; - mptsas_remove_target(ioc, hot_plug_info); - break; - - case MPTSAS_ADD_DEVICE: --#if defined(CPQ_CIM) -- if (ioc->raid_data.isRaid & (1 << id)) -- mptsas_add_device_component_ir(ioc, channel, id); --#endif - dhotpprintk((MYIOC_s_WARN_FMT - "MPTSAS_ADD_DEVICE: channel=%d id=%d\n", -- ioc->name, channel, id)); -+ ioc->name, -+ hot_plug_info->channel, -+ id)); -+ if (pTarget) { -+ dhotpprintk((MYIOC_s_WARN_FMT -+ "hot_plug id=%d already in Targets array", -+ ioc->name, -+ id)); -+ goto out; -+ } - mptsas_scan_target(ioc, hot_plug_info); - break; --#if defined(CPQ_CIM) -- case MPTSAS_ADD_INACTIVE_VOLUME: -- dhotpprintk((MYIOC_s_WARN_FMT -- "MPTSAS_ADD_INACTIVE_VOLUME: channel=%d id=%d\n", -- ioc->name, channel, id)); -- mptsas_add_device_component_ir(ioc, channel, id); -- break; -- case MPTSAS_PHYSDISK_ADD: -- mptsas_add_device_component_single(ioc, channel, id); -- break; --#endif - default: - dhotpprintk((MYIOC_s_WARN_FMT -- "Unknown hot_plug event_type=%x: channel=%d id=%d " -- " skipping\n", ioc->name, hot_plug_info->event_type, -- channel, id)); -- goto out; -+ "Unknown hot_plug event_type=%x: channel=%d id=%d\n", -+ ioc->name, -+ hot_plug_info->event_type, -+ hot_plug_info->channel, -+ id)); -+ break; -+ } -+ -+ /* If there has been a change to raid, then we need to -+ * refresh the config raid data, and sas device link list -+ */ -+ if (hot_plug_info->isRaid) { -+ mpt_findImVolumes(ioc); -+ mptscsih_sas_update_device_list(ioc); - } - - out: - dhotpprintk((MYIOC_s_WARN_FMT "%s: kfree hot_plug_info=%p\n", -- ioc->name,__FUNCTION__, hot_plug_info)); -+ ioc->name,__FUNCTION__, hot_plug_info)); - kfree(hot_plug_info); - up(&ioc->hot_plug_semaphore); - } - --/** -- * mptsas_send_sas_event -- * -- * -- * @ioc -- * @sas_event_data -- * -- **/ -+ - static void - mptsas_send_sas_event(MPT_ADAPTER *ioc, - EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data) -@@ -1610,11 +607,8 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc, - } - - switch (sas_event_data->ReasonCode) { -- case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING: -- mptsas_target_reset_queue(ioc, sas_event_data); -- break; -- - case MPI_EVENT_SAS_DEV_STAT_RC_ADDED: -+ case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING: - ev = kmalloc(sizeof(*ev), GFP_ATOMIC); - if (!ev) { - printk(KERN_WARNING "mptsas: lost hotplug event\n"); -@@ -1642,7 +636,6 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc, - ev->event_type = MPTSAS_DEL_DEVICE; - schedule_work(&ev->work); - break; -- - case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED: - /* - * Persistent table is full. -@@ -1652,7 +645,6 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc, - (void *)ioc); - schedule_work(&ioc->mptscsih_persistTask); - break; -- - case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA: - /* TODO */ - case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET: -@@ -1662,21 +654,12 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc, - } - } - --/** -- * mptsas_send_raid_event -- * -- * -- * @ioc -- * @raid_event_data -- * -- **/ - static void - mptsas_send_raid_event(MPT_ADAPTER *ioc, - EVENT_DATA_RAID *raid_event_data) - { - struct mptsas_hotplug_event *ev; -- int status = le32_to_cpu(raid_event_data->SettingsStatus); -- int state = (status >> 8) & 0xff; -+ RAID_VOL0_STATUS * volumeStatus; - - if (ioc->bus_type != SAS) - return; -@@ -1688,13 +671,11 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc, - } - - memset(ev,0,sizeof(struct mptsas_hotplug_event)); -+ INIT_WORK(&ev->work, mptsas_hotplug_work, ev); - ev->ioc = ioc; - ev->id = raid_event_data->VolumeID; -- ev->channel = raid_event_data->VolumeBus; -- ev->refresh_raid_config_pages = 1; -+ ev->isRaid=1; - -- devtprintk((KERN_INFO MYNAM ": VolumeID=%d Reason=%x received\n", -- ev->id, raid_event_data->ReasonCode)); - switch (raid_event_data->ReasonCode) { - case MPI_EVENT_RAID_RC_PHYSDISK_DELETED: - ev->event_type = MPTSAS_ADD_DEVICE; -@@ -1702,24 +683,6 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc, - case MPI_EVENT_RAID_RC_PHYSDISK_CREATED: - ev->event_type = MPTSAS_DEL_DEVICE; - break; -- case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED: -- switch (state) { -- case MPI_PD_STATE_ONLINE: -- case MPI_PD_STATE_NOT_COMPATIBLE: -- ev->event_type = MPTSAS_PHYSDISK_ADD; -- break; -- case MPI_PD_STATE_MISSING: -- case MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST: -- case MPI_PD_STATE_FAILED_AT_HOST_REQUEST: -- case MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON: -- ev->event_type = MPTSAS_DEL_DEVICE; -- break; -- default: -- devtprintk((KERN_INFO MYNAM -- ": ignoring this event! %d\n", __LINE__)); -- return; -- } -- break; - case MPI_EVENT_RAID_RC_VOLUME_DELETED: - ev->event_type = MPTSAS_DEL_DEVICE; - break; -@@ -1727,68 +690,18 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc, - ev->event_type = MPTSAS_ADD_DEVICE; - break; - case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED: -- switch (state) { -- case MPI_RAIDVOL0_STATUS_STATE_FAILED: -- case MPI_RAIDVOL0_STATUS_STATE_MISSING: -- ev->event_type = MPTSAS_DEL_DEVICE; -- break; -- case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL: -- case MPI_RAIDVOL0_STATUS_STATE_DEGRADED: -- ev->event_type = MPTSAS_ADD_DEVICE; -- break; -- default: -- devtprintk((KERN_INFO MYNAM -- ": ignoring this event! %d\n", __LINE__)); -- return; -- } -+ volumeStatus = (RAID_VOL0_STATUS *) & -+ raid_event_data->SettingsStatus; -+ ev->event_type = (volumeStatus->State == -+ MPI_RAIDVOL0_STATUS_STATE_FAILED) ? -+ MPTSAS_DEL_DEVICE : MPTSAS_ADD_DEVICE; - break; - default: -- devtprintk((KERN_INFO MYNAM -- ": ignoring this event! %d\n", __LINE__)); -- return; -+ break; - } -- INIT_WORK(&ev->work, mptsas_hotplug_work, ev); - schedule_work(&ev->work); - } - --#if defined(CPQ_CIM) --/* -- * mptsas_send_ir2_event -- * -- * This handle exposing hidden disk when an inactive raid volume is added -- */ --static void --mptsas_send_ir2_event(MPT_ADAPTER *ioc, PTR_MPI_EVENT_DATA_IR2 ir2_data) --{ -- struct mptsas_hotplug_event *ev; -- -- if (ir2_data->ReasonCode != -- MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED) -- return; -- -- ev = kmalloc(sizeof(*ev), GFP_ATOMIC); -- if (!ev) -- return; -- memset(ev, 0, sizeof(*ev)); -- ev->ioc = ioc; -- ev->id = ir2_data->TargetID; -- ev->channel = ir2_data->Bus; -- ev->refresh_raid_config_pages = 1; -- ev->event_type = MPTSAS_ADD_INACTIVE_VOLUME; -- -- INIT_WORK(&ev->work, mptsas_hotplug_work, ev); -- schedule_work(&ev->work); --}; --#endif -- --/** -- * mptsas_event_process -- * -- * -- * @ioc -- * @reply -- * -- **/ - static int - mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) - { -@@ -1803,16 +716,10 @@ mptsas_event_process(MPT_ADAPTER *ioc, E - - switch (event) { - case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: --#if defined(CPQ_CIM) -- ioc->csmi_change_count++; --#endif - mptsas_send_sas_event(ioc, - (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data); - break; - case MPI_EVENT_INTEGRATED_RAID: --#if defined(CPQ_CIM) -- ioc->csmi_change_count++; --#endif - mptsas_send_raid_event(ioc, - (EVENT_DATA_RAID *)reply->Data); - break; -@@ -1822,13 +729,6 @@ mptsas_event_process(MPT_ADAPTER *ioc, E - (void *)ioc); - schedule_work(&ioc->mptscsih_persistTask); - break; --#if defined(CPQ_CIM) -- case MPI_EVENT_IR2: -- ioc->csmi_change_count++; -- mptsas_send_ir2_event(ioc, -- (PTR_MPI_EVENT_DATA_IR2)reply->Data); -- break; --#endif - default: - rc = mptscsih_event_process(ioc, reply); - break; -@@ -1855,13 +755,12 @@ mptsas_probe(struct pci_dev *pdev, const - MPT_ADAPTER *ioc; - unsigned long flags; - int sz, ii; -+ int numSGE = 0; -+ int scale; - int ioc_cap; - u8 *mem; - int error=0; - int r; --#if defined(CPQ_CIM) -- struct mptsas_portinfo *port_info; --#endif - - if ((r = mpt_attach(pdev,id)) != 0) - return r; -@@ -1874,27 +773,19 @@ mptsas_probe(struct pci_dev *pdev, const - /* Added sanity check on readiness of the MPT adapter. - */ - if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) { -- if(mpt_enable_deadioc_detect) -- return 0; -- else { -- printk(MYIOC_s_WARN_FMT -- "Skipping because it's not operational!\n", ioc->name); -- error = -ENODEV; -- goto out_mptsas_probe; -- } -+ printk(MYIOC_s_WARN_FMT -+ "Skipping because it's not operational!\n", -+ ioc->name); -+ error = -ENODEV; -+ goto out_mptsas_probe; - } - - if (!ioc->active) { -- if(mpt_enable_deadioc_detect) -- return 0; -- else { -- -- printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", -+ printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", - ioc->name); - error = -ENODEV; - goto out_mptsas_probe; - } -- } - - /* Sanity check - ensure at least 1 port is INITIATOR capable - */ -@@ -1906,8 +797,9 @@ mptsas_probe(struct pci_dev *pdev, const - } - - if (!ioc_cap) { -- printk(MYIOC_s_WARN_FMT "Skipping ioc=%p because SCSI " -- "Initiator mode is NOT enabled!\n", ioc->name, ioc); -+ printk(MYIOC_s_WARN_FMT -+ "Skipping ioc=%p because SCSI Initiator mode is NOT enabled!\n", -+ ioc->name, ioc); - return 0; - } - -@@ -1915,8 +807,8 @@ mptsas_probe(struct pci_dev *pdev, const - - if (!sh) { - printk(MYIOC_s_WARN_FMT -- "Unable to register controller with SCSI subsystem\n", -- ioc->name); -+ "Unable to register controller with SCSI subsystem\n", -+ ioc->name); - error = -1; - goto out_mptsas_probe; - } -@@ -1939,19 +831,49 @@ mptsas_probe(struct pci_dev *pdev, const - else - sh->can_queue = ioc->req_depth; - dinitprintk((MYIOC_s_INFO_FMT -- "mpt_can_queue=%d req_depth=%d can_queue=%d\n", -- ioc->name, mpt_can_queue, ioc->req_depth, sh->can_queue)); -+ "mpt_can_queue=%d req_depth=%d can_queue=%d\n", -+ ioc->name, mpt_can_queue, ioc->req_depth, -+ sh->can_queue)); - -- sh->max_id = ioc->DevicesPerBus; -+ sh->max_id = ioc->pfacts->MaxDevices + 1; - - sh->max_lun = MPT_LAST_LUN + 1; -- sh->max_channel = ioc->NumberOfBuses - 1; -+ sh->max_channel = 0; - sh->this_id = ioc->pfacts[0].PortSCSIID; - - /* Required entry. - */ - sh->unique_id = ioc->id; -- sh->sg_tablesize = ioc->sg_tablesize; -+ -+ /* Verify that we won't exceed the maximum -+ * number of chain buffers -+ * We can optimize: ZZ = req_sz/sizeof(SGE) -+ * For 32bit SGE's: -+ * numSGE = 1 + (ZZ-1)*(maxChain -1) + ZZ -+ * + (req_sz - 64)/sizeof(SGE) -+ * A slightly different algorithm is required for -+ * 64bit SGEs. -+ */ -+ scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); -+ if (sizeof(dma_addr_t) == sizeof(u64)) { -+ numSGE = (scale - 1) * -+ (ioc->facts.MaxChainDepth-1) + scale + -+ (ioc->req_sz - 60) / (sizeof(dma_addr_t) + -+ sizeof(u32)); -+ } else { -+ numSGE = 1 + (scale - 1) * -+ (ioc->facts.MaxChainDepth-1) + scale + -+ (ioc->req_sz - 64) / (sizeof(dma_addr_t) + -+ sizeof(u32)); -+ } -+ -+ if (numSGE < sh->sg_tablesize) { -+ /* Reset this value */ -+ dprintk((MYIOC_s_INFO_FMT -+ "Resetting sg_tablesize to %d from %d\n", -+ ioc->name, numSGE, sh->sg_tablesize)); -+ sh->sg_tablesize = numSGE; -+ } - - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - /* Set the pci device pointer in Scsi_Host structure. -@@ -1968,7 +890,7 @@ mptsas_probe(struct pci_dev *pdev, const - * (with size equal to req_depth*PtrSz!) - */ - sz = ioc->req_depth * sizeof(void *); -- mem = kmalloc(sz, GFP_KERNEL); -+ mem = kmalloc(sz, GFP_ATOMIC); - if (mem == NULL) { - error = -ENOMEM; - goto out_mptsas_probe; -@@ -1978,26 +900,25 @@ mptsas_probe(struct pci_dev *pdev, const - hd->ScsiLookup = (struct scsi_cmnd **) mem; - - dprintk((MYIOC_s_INFO_FMT "ScsiLookup @ %p, sz=%d\n", -- ioc->name, hd->ScsiLookup, sz)); -+ ioc->name, hd->ScsiLookup, sz)); - -- for (ii=0; ii < ioc->NumberOfBuses; ii++) { -- /* Allocate memory for the device structures. -- * A non-Null pointer at an offset -- * indicates a device exists. -- */ -- sz = ioc->DevicesPerBus * sizeof(void *); -- mem = kmalloc(sz, GFP_KERNEL); -- if (mem == NULL) { -- error = -ENOMEM; -- goto out_mptsas_probe; -- } -+ /* Allocate memory for the device structures. -+ * A non-Null pointer at an offset -+ * indicates a device exists. -+ * max_id = 1 + maximum id (hosts.h) -+ */ -+ sz = sh->max_id * sizeof(void *); -+ mem = kmalloc(sz, GFP_ATOMIC); -+ if (mem == NULL) { -+ error = -ENOMEM; -+ goto out_mptsas_probe; -+ } - -- memset(mem, 0, sz); -- ioc->Target_List[ii] = (struct _MPT_DEVICE *) mem; -+ memset(mem, 0, sz); -+ hd->Targets = (VirtDevice **) mem; - -- dinitprintk((KERN_INFO " For Bus=%d, Target_List=%p sz=%d\n", -- ii, mem, sz)); -- } -+ dprintk((KERN_INFO -+ " Targets @ %p, sz=%d\n", hd->Targets, sz)); - - /* Clear the TM flags - */ -@@ -2013,18 +934,13 @@ mptsas_probe(struct pci_dev *pdev, const - */ - hd->cmdPtr = NULL; - -- /* Initialize this IOC's timers -+ /* Initialize this SCSI Hosts' timers - * To use, set the timer expires field -- * and add_timer. Used for internally -- * generated commands. -+ * and add_timer - */ -- init_timer(&hd->InternalCmdTimer); -- hd->InternalCmdTimer.data = (unsigned long) hd; -- hd->InternalCmdTimer.function = mptscsih_InternalCmdTimer_expired; -- -- init_timer(&ioc->TMtimer); -- ioc->TMtimer.data = (unsigned long) ioc; -- ioc->TMtimer.function = mptscsih_TM_timeout; -+ init_timer(&hd->timer); -+ hd->timer.data = (unsigned long) hd; -+ hd->timer.function = mptscsih_timer_expired; - - init_MUTEX(&ioc->hot_plug_semaphore); - -@@ -2038,50 +954,24 @@ mptsas_probe(struct pci_dev *pdev, const - ioc, MPI_SAS_OP_CLEAR_ALL_PERSISTENT); - } - -- ddvprintk((MYIOC_s_INFO_FMT "mpt_pq_filter %x mpt_pq_filter %x\n", -- ioc->name, mpt_pq_filter, mpt_pq_filter)); -+ ddvprintk((MYIOC_s_INFO_FMT -+ "mpt_pq_filter %x mpt_pq_filter %x\n", -+ ioc->name, -+ mpt_pq_filter, -+ mpt_pq_filter)); - - init_waitqueue_head(&hd->scandv_waitq); - hd->scandv_wait_done = 0; - hd->last_queue_full = 0; - -- init_waitqueue_head(&hd->TM_waitq); -- hd->TM_wait_done = 0; -- -- INIT_LIST_HEAD(&hd->target_reset_list); -- --#if defined(CPQ_CIM) -- INIT_LIST_HEAD(&ioc->sas_device_info_list); -- init_MUTEX(&ioc->sas_device_info_mutex); -- port_info = kmalloc(sizeof(*port_info), GFP_KERNEL); -- if (port_info && !mptsas_sas_io_unit_pg0(ioc, port_info)) -- ioc->num_ports = port_info->num_phys; -- kfree(port_info); --#endif -- - error = scsi_add_host (sh, &ioc->pcidev->dev); - if(error) { -- dprintk((KERN_ERR MYNAM "scsi_add_host failed\n")); -+ dprintk((KERN_ERR MYNAM -+ "scsi_add_host failed\n")); - goto out_mptsas_probe; - } - - scsi_scan_host(sh); -- --#if defined(CPQ_CIM) -- /* -- * Handling Inactive Volumes -- */ -- if (!ioc->ir_firmware || -- !ioc->raid_data.pIocPg2 || -- !ioc->raid_data.pIocPg2->NumActiveVolumes) -- return 0; -- -- for (ii = 0; ii < ioc->raid_data.pIocPg2->NumActiveVolumes; ii++) -- mptsas_add_device_component_ir(ioc, -- ioc->raid_data.pIocPg2->RaidVolume[ii].VolumeBus, -- ioc->raid_data.pIocPg2->RaidVolume[ii].VolumeID); --#endif -- - return 0; - - out_mptsas_probe: -@@ -2122,17 +1012,17 @@ mptsas_init(void) - show_mptmod_ver(my_NAME, my_VERSION); - - mptsasDoneCtx = mpt_register(mptscsih_io_done, MPTSAS_DRIVER); -- mptsasTaskCtx = mpt_register(mptsas_taskmgmt_complete, MPTSAS_DRIVER); -+ mptsasTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTSAS_DRIVER); - mptsasInternalCtx = mpt_register(mptscsih_scandv_complete, MPTSAS_DRIVER); - - if (mpt_event_register(mptsasDoneCtx, mptsas_event_process) == 0) { - devtprintk((KERN_INFO MYNAM -- ": Registered for sas IOC event notifications\n")); -+ ": Registered for sas IOC event notifications\n")); - } - -- if (mpt_reset_register(mptsasDoneCtx, mptsas_ioc_reset) == 0) { -+ if (mpt_reset_register(mptsasDoneCtx, mptscsih_ioc_reset) == 0) { - dprintk((KERN_INFO MYNAM -- ": Registered for IOC reset notifications\n")); -+ ": Registered for IOC reset notifications\n")); - } - - return pci_register_driver(&mptsas_driver); -@@ -2151,11 +1041,11 @@ mptsas_exit(void) - - mpt_reset_deregister(mptsasDoneCtx); - dprintk((KERN_INFO MYNAM -- ": Deregistered for IOC reset notifications\n")); -+ ": Deregistered for IOC reset notifications\n")); - - mpt_event_deregister(mptsasDoneCtx); - dprintk((KERN_INFO MYNAM -- ": Deregistered for IOC event notifications\n")); -+ ": Deregistered for IOC event notifications\n")); - - mpt_deregister(mptsasInternalCtx); - mpt_deregister(mptsasTaskCtx); -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptsas.h linux-2.6.9-55.0.12/drivers/message/fusion/mptsas.h ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptsas.h 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptsas.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,166 +0,0 @@ --/* -- * linux/drivers/message/fusion/mptsas.h -- * High performance SCSI + LAN / Fibre Channel device drivers. -- * For use with PCI chip/adapter(s): -- * LSIFC9xx/LSI409xx Fibre Channel -- * running LSI Logic Fusion MPT (Message Passing Technology) firmware. -- * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -- * -- */ --/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --/* -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 of the License. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- NO WARRANTY -- THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR -- CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT -- LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, -- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is -- solely responsible for determining the appropriateness of using and -- distributing the Program and assumes all risks associated with its -- exercise of rights under this Agreement, including but not limited to -- the risks and costs of program errors, damage to or loss of data, -- programs or equipment, and unavailability or interruption of operations. -- -- DISCLAIMER OF LIABILITY -- NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY -- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -- DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND -- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -- TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -- USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED -- HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --*/ -- --#ifndef MPTSAS_H_INCLUDED --#define MPTSAS_H_INCLUDED --/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -- --struct mptscsih_target_reset { -- struct list_head list; -- EVENT_DATA_SAS_DEVICE_STATUS_CHANGE sas_event_data; -- u8 target_reset_issued; --}; -- --enum mptsas_hotplug_action { -- MPTSAS_ADD_DEVICE, -- MPTSAS_DEL_DEVICE, -- MPTSAS_ADD_INACTIVE_VOLUME, -- MPTSAS_PHYSDISK_ADD, --}; -- --struct mptsas_hotplug_event { -- struct work_struct work; -- MPT_ADAPTER *ioc; -- enum mptsas_hotplug_action event_type; -- u64 sas_address; -- u32 channel; -- u32 id; -- u32 device_info; -- u16 handle; -- u16 parent_handle; -- u8 phy_id; -- u8 refresh_raid_config_pages; --}; -- --/* -- * SAS topology structures -- * -- * The MPT Fusion firmware interface spreads information about the -- * SAS topology over many manufacture pages, thus we need some data -- * structure to collect it and process it for the SAS transport class. -- */ -- --struct mptsas_devinfo { -- u16 handle; /* unique id to address this device */ -- u16 handle_parent; /* unique id to address parent device */ -- u16 handle_enclosure; /* enclosure identifier of the enclosure */ -- u16 slot; /* physical slot in enclosure */ -- u8 phy_id; /* phy number of parent device */ -- u8 port_id; /* sas physical port this device -- is assoc'd with */ -- u8 id; /* logical target id of this device */ -- u32 phys_disk_num; /* phys disk id, for csmi-ioctls */ -- u8 channel; /* logical bus number of this device */ -- u64 sas_address; /* WWN of this device, -- SATA is assigned by HBA,expander */ -- u32 device_info; /* bitfield detailed info about this device */ --#if !defined(MPT_WIDE_PORT_API) -- u8 wide_port_enable; /* when set, this is part of wide port*/ --#endif --}; -- --/* -- * Specific details on ports, wide/narrow -- */ --struct mptsas_portinfo_details{ --#if !defined(MPT_WIDE_PORT_API) -- u8 port_id; /* port number provided to transport */ -- u8 rphy_id; /* phy index used for reporting end device*/ -- u32 device_info; /* bitfield detailed info about this device */ --#endif -- u16 num_phys; /* number of phys beloing to this port */ -- u64 phy_bitmask; /* this needs extending to support 128 phys */ -- struct sas_rphy *rphy; /* rphy for end devices */ --#if defined(MPT_WIDE_PORT_API) -- struct sas_port *port; /* transport layer port object */ --#endif -- struct scsi_target *starget; -- struct mptsas_portinfo *port_info; --}; -- --struct mptsas_phyinfo { -- u8 phy_id; /* phy index */ -- u8 port_id; /* port number this phy is part of */ -- u8 negotiated_link_rate; /* nego'd link rate for this phy */ -- u8 hw_link_rate; /* hardware max/min phys link rate */ -- u8 programmed_link_rate; /* programmed max/min phy link rate */ --#if defined(MPT_WIDE_PORT_API) -- u8 sas_port_add_phy; /* flag to request sas_port_add_phy*/ --#endif --#if defined(CPQ_CIM) -- u8 change_count; /* change count of the phy */ -- u8 port_flags; /* info wrt host sas ports */ --#endif -- u32 phy_info; /* various info wrt the phy */ -- struct mptsas_devinfo identify; /* point to phy device info */ -- struct mptsas_devinfo attached; /* point to attached device info */ -- struct sas_phy *phy; -- struct mptsas_portinfo *portinfo; -- struct mptsas_portinfo_details * port_details; --}; -- --struct mptsas_portinfo { -- struct list_head list; -- u16 handle; /* unique id to address this */ -- u16 num_phys; /* number of phys */ -- struct mptsas_phyinfo *phy_info; --}; -- --struct mptsas_enclosure { -- u64 enclosure_logical_id; /* The WWN for the enclosure */ -- u16 enclosure_handle; /* unique id to address this */ -- u16 flags; /* details enclosure management */ -- u16 num_slot; /* num slots */ -- u16 start_slot; /* first slot */ -- u8 start_id; /* starting logical target id */ -- u8 start_channel; /* starting logical channel id */ -- u8 sep_id; /* SEP device logical target id */ -- u8 sep_channel; /* SEP channel logical channel id */ --}; -- --/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --#endif -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptscsi.c linux-2.6.9-55.0.12/drivers/message/fusion/mptscsi.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptscsi.c 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptscsi.c 2007-11-02 09:10:23.000000000 +0100 -@@ -3,8 +3,8 @@ - * For use with LSI Logic PCI chip/adapter(s) - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - * $Id: mptscsih.c,v 1.1.2.4 2003/05/07 14:08:34 Exp $ - */ -@@ -74,7 +74,6 @@ - MODULE_AUTHOR(MODULEAUTHOR); - MODULE_DESCRIPTION(my_NAME); - MODULE_LICENSE("GPL"); --MODULE_VERSION(my_VERSION); - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - -@@ -83,6 +82,13 @@ typedef struct _BIG_SENSE_BUF { - } BIG_SENSE_BUF; - - #define OEM_TLR_COMMAND 0xC2 -+#define MPT_SCANDV_GOOD (0x00000000) /* must be 0 */ -+#define MPT_SCANDV_DID_RESET (0x00000001) -+#define MPT_SCANDV_SENSE (0x00000002) -+#define MPT_SCANDV_SOME_ERROR (0x00000004) -+#define MPT_SCANDV_SELECTION_TIMEOUT (0x00000008) -+#define MPT_SCANDV_ISSUE_SENSE (0x00000010) -+#define MPT_SCANDV_FALLBACK (0x00000020) - - #define MPT_SCANDV_MAX_RETRIES (10) - -@@ -116,37 +122,44 @@ typedef struct _dv_parameters { - int mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); - static void mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIORequest_t *pScsiReq); - int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); -+ - static int mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt, - SCSIIORequest_t *pReq, int req_idx); - static void mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx); - static void mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply); - static int mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd); --static int SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc); --int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u8 lun, int ctx2abort, ulong timeout); --static int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u8 lun, int ctx2abort, ulong timeout); -+static int mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout ); -+static u32 SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc); -+ -+int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); -+static int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); - - int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); - int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); --static void mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus, int id, u8 lun, char *data, int dlen); --static void mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *pTarget, char byte56); --static void mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int id); --static int mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int id, int bus); -+ -+static void mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus_id, int target_id, u8 lun, char *data, int dlen); -+static void mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *target, char byte56); -+static void mptscsih_set_dvflags(MPT_SCSI_HOST *hd, SCSIIORequest_t *pReq); -+static void mptscsih_setDevicePage1Flags (u8 width, u8 factor, u8 offset, int *requestedPtr, int *configurationPtr, u8 flags); -+static void mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int target_id); -+static int mptscsih_writeSDP1(MPT_SCSI_HOST *hd, int portnum, int target, int flags); -+static int mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int target_id, int bus); - int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); --void mptscsih_InternalCmdTimer_expired(unsigned long data); -+void mptscsih_timer_expired(unsigned long data); - static int mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, int portnum); - - #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION - static int mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io); - static void mptscsih_domainValidation(void *hd); --static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int channel, int id); -+static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id); - static void mptscsih_qas_check(MPT_SCSI_HOST *hd, int id); --static int mptscsih_doDv(MPT_SCSI_HOST *hd, int channel, int id); --static void mptscsih_post_PendingMF_command(MPT_ADAPTER *ioc); -+static int mptscsih_doDv(MPT_SCSI_HOST *hd, int channel, int target); - static void mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage); --static MPT_FRAME_HDR * mptscsih_search_PendingMF(MPT_ADAPTER *ioc, struct scsi_cmnd * sc); - static void mptscsih_fillbuf(char *buffer, int size, int index, int width); -+static void mptscsih_set_dvflags_raid(MPT_SCSI_HOST *hd, int id); - #endif --static void mpt_IssueTLR(MPT_SCSI_HOST *hd, VirtDevice *pTarget); -+static void -+mpt_IssueTLR(MPT_SCSI_HOST *hd, VirtDevice *pTarget); - - void mptscsih_remove(struct pci_dev *); - // This was changed in the 2.6.13 kernel -@@ -169,6 +182,8 @@ int mptscsih_resume(struct pci_dev *pdev - */ - static spinlock_t dvtaskQ_lock = SPIN_LOCK_UNLOCKED; - static int dvtaskQ_active = 0; -+static int dvtaskQ_release = 0; -+static struct work_struct dvTaskQ_task; - #endif - - -@@ -560,7 +575,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - } - - sc = hd->ScsiLookup[req_idx]; -- hd->ScsiLookup[req_idx] = NULL; - if (sc == NULL) { - MPIHeader_t *hdr = (MPIHeader_t *)mf; - -@@ -575,10 +589,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - mptscsih_freeChainBuffers(ioc, req_idx); - return 1; - } -- if ((unsigned char *)mf != sc->host_scribble) { -- mptscsih_freeChainBuffers(ioc, req_idx); -- return 1; -- } - - sc->result = DID_OK << 16; /* Set default reply as OK */ - pScsiReq = (SCSIIORequest_t *) mf; -@@ -601,12 +611,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - u32 xfer_cnt; - u16 ioc_status; - u8 scsi_state, scsi_status; --#ifdef MPT_DEBUG_ERROR -- u8 ii, skey, asc, ascq; --#endif -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *pTarget; -- int bus, id; -+ VirtDevice *pTarget; -+ int target; - - ioc_status = le16_to_cpu(pScsiReply->IOCStatus) & MPI_IOCSTATUS_MASK; - scsi_state = pScsiReply->SCSIState; -@@ -627,35 +633,18 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - ioc_status = MPI_IOCSTATUS_SUCCESS; - } - --#ifdef MPT_DEBUG_ERR -- if (ioc_status != MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE) { /* 0x0043 */ -- derrprintk((KERN_NOTICE "Reply ha=%d id=%d lun=%d:\n" -- "IOCStatus=%04x SCSIState=%02x SCSIStatus=%02x\n" -- "resid=%d bufflen=%d xfer_cnt=%d\n", -- ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1], -- ioc_status, scsi_state, scsi_status, sc->resid, -- sc->request_bufflen, xfer_cnt)); -- } --#endif -+ dreplyprintk((KERN_NOTICE "Reply ha=%d id=%d lun=%d:\n" -+ "IOCStatus=%04xh SCSIState=%02xh SCSIStatus=%02xh\n" -+ "resid=%d bufflen=%d xfer_cnt=%d\n", -+ ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1], -+ ioc_status, scsi_state, scsi_status, sc->resid, -+ sc->request_bufflen, xfer_cnt)); - -- if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID){ -+ if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) - mptscsih_copy_sense_data(sc, hd, mf, pScsiReply); - --#ifdef MPT_DEBUG_ERROR -- skey = sc->sense_buffer[2]; -- asc = sc->sense_buffer[12]; -- ascq = sc->sense_buffer[13]; -- derrprintk((MYIOC_s_WARN_FMT -- "id=%d SenseKey:ASC:ASCQ = (%x:%02x:%02x) CDB:\n", -- ioc->name, pScsiReq->TargetID, -- skey, asc, ascq)); -- -- for (ii=0; ii<pScsiReq->CDBLength; ii++) { -- printk("%02x ", pScsiReq->CDB[ii]); -- } -- printk("\n"); --#endif -- } else if (scsi_state & MPI_SCSI_STATE_RESPONSE_INFO_VALID && pScsiReply->ResponseInfo) { -+ if (scsi_state & MPI_SCSI_STATE_RESPONSE_INFO_VALID && -+ pScsiReply->ResponseInfo) { - printk(KERN_NOTICE "ha=%d id=%d lun=%d: " - "FCP_ResponseInfo=%08xh\n", - ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1], -@@ -670,13 +659,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - * killing interrupt handler:-( - */ - sc->result = SAM_STAT_BUSY; --#ifdef MPT_DEBUG_FAIL -- derrprintk((MYIOC_s_ERR_FMT -- "id=%d MPI_IOCSTATUS_BUSY\n", -- ioc->name, pScsiReq->TargetID)); --// panic ("IOCSTATUS_BUSY!!!!!\n"); --#endif -- - break; - - case MPI_IOCSTATUS_SCSI_INVALID_BUS: /* 0x0041 */ -@@ -688,15 +670,11 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - /* Spoof to SCSI Selection Timeout! */ - sc->result = DID_NO_CONNECT << 16; - -- bus = pScsiReq->Bus; -- id = pScsiReq->TargetID; -- if ( ioc->bus_type == SPI ) { -- if (hd->sel_timeout[id] < 0xFFFF) -- hd->sel_timeout[pScsiReq->TargetID]++; -- } -+ target = pScsiReq->TargetID; -+ if (hd->sel_timeout[target] < 0xFFFF) -+ hd->sel_timeout[pScsiReq->TargetID]++; - -- pMptTarget = ioc->Target_List[bus]; -- pTarget = (VirtDevice *)pMptTarget->Target[id]; -+ pTarget = hd->Targets[target]; - - if ( pTarget ) { - if (pTarget->tflags & MPT_TARGET_FLAGS_LED_ON) { -@@ -710,8 +688,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - } else { - SEPMsg = (SEPRequest_t *)mf; - SEPMsg->Function = MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR; -- SEPMsg->Bus = pTarget->bus; -- SEPMsg->TargetID = pTarget->id; -+ SEPMsg->Bus = pTarget->bus_id; -+ SEPMsg->TargetID = pTarget->target_id; - SEPMsg->Action = MPI_SEP_REQ_ACTION_WRITE_STATUS; - SEPMsg->SlotStatus = MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED; - pTarget->tflags &= ~MPT_TARGET_FLAGS_LED_ON; -@@ -726,24 +704,24 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - case MPI_IOCSTATUS_SCSI_IOC_TERMINATED: /* 0x004B */ - if ( ioc->bus_type == SAS ) { - u16 status = le16_to_cpu(pScsiReply->IOCStatus); -- u32 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo); --// sc->result = DID_RESET << 16; -- sc->result = DID_SOFT_ERROR << 16; - if (status & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) { -- if ((log_info & 0xFFFF0000) == -- SAS_LOGINFO_NEXUS_LOSS) { -+ u32 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo); -+ log_info &= 0xFFFF0000; /* mask subcodes */ -+ dreplyprintk((KERN_NOTICE "IOC_TERMINATED: ha=%d id=%d lun=%d:\n" -+ "IOCStatus=%04xh SCSIState=%02xh SCSIStatus=%02xh " -+ "loginfo=%08x\n" -+ ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1], -+ status, scsi_state, scsi_status, log_info)); -+ if (log_info == SAS_LOGINFO_NEXUS_LOSS) { - sc->result = (DID_BUS_BUSY << 16); -+ break; - } -+ } else { -+ dreplyprintk((KERN_NOTICE "IOC_TERMINATED: ha=%d id=%d lun=%d:\n" -+ "IOCStatus=%04xh SCSIState=%02xh SCSIStatus=%02xh\n", -+ ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1], -+ status, scsi_state, scsi_status)); - } -- derrprintk((KERN_NOTICE "IOC_TERMINATED: " -- "ha=%d id=%d lun=%d " -- "IOCStatus=%04x SCSIState=%02x\n" -- "SCSIStatus=%02x LogInfo=%08x " -- "sc->result=%08x sc=%p\n", -- ioc->id, pScsiReq->TargetID, -- pScsiReq->LUN[1], status, scsi_state, -- scsi_status, log_info, sc->result, sc)); -- break; - } /* allow non-SAS & non-NEXUS_LOSS to drop into below code */ - - case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */ -@@ -775,7 +753,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - } else { - sc->result = DID_SOFT_ERROR << 16; - } --// derrprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->target)); -+// dreplyprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->target)); - printk("RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->device->id); - break; - #else -@@ -784,7 +762,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - sc->result=DID_SOFT_ERROR << 16; - else /* Sufficient data transfer occurred */ - sc->result = (DID_OK << 16) | scsi_status; -- derrprintk((KERN_NOTICE -+ dreplyprintk((KERN_NOTICE - "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->device->id)); - break; - #endif -@@ -804,9 +782,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - sc->result = SAM_STAT_BUSY; - else - sc->result = DID_SOFT_ERROR << 16; -- derrprintk((KERN_NOTICE " xfer_cnt=%d < sc->underflow=%d result=%08x\n",xfer_cnt, sc->underflow, sc->result)); -- -- } -+ } - if (scsi_state & (MPI_SCSI_STATE_AUTOSENSE_FAILED | MPI_SCSI_STATE_NO_SCSI_STATUS)) { - /* What to do? - */ -@@ -818,6 +794,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - } - } - -+ dreplyprintk((KERN_NOTICE " sc->underflow={report ERR if < %02xh bytes xfer'd}\n", -+ sc->underflow)); -+ dreplyprintk((KERN_NOTICE " ActBytesXferd=%02xh\n", xfer_cnt)); - /* Report Queue Full - */ - if (scsi_status == MPI_SCSI_STATUS_TASK_SET_FULL) -@@ -896,18 +875,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - break; - - } /* switch(ioc_status) */ -- if (ioc_status != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN) { -- derrprintk((KERN_NOTICE "ha=%d id=%d lun=%d " -- "IOCStatus=%04x SCSIState=%02x\n" -- "SCSIStatus=%02x " -- "sc->result=%08x sc=%p\n", -- ioc->id, pScsiReq->TargetID, -- pScsiReq->LUN[1], ioc_status, -- scsi_state, scsi_status, sc->result, -- sc)); -- } - -- } /* end of address reply case */ -+ dreplyprintk((KERN_NOTICE " sc->result is %08xh\n", sc->result)); -+ } /* end of address reply case */ - - /* Unmap the DMA buffers, if any. */ - if (sc->use_sg) { -@@ -918,7 +888,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F - sc->request_bufflen, sc->sc_data_direction); - } - -- sc->host_scribble = NULL; -+ hd->ScsiLookup[req_idx] = NULL; -+ - sc->scsi_done(sc); /* Issue the command callback */ - - /* Free Chain buffers */ -@@ -945,9 +916,7 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOS - int ii; - int max = ioc->req_depth; - -- --drsprintk((MYIOC_s_WARN_FMT ": %s entered\n",ioc->name, __FUNCTION__)); -- -+ dprintk((KERN_INFO MYNAM ": flush_ScsiLookup called\n")); - for (ii= 0; ii < max; ii++) { - if ((SCpnt = hd->ScsiLookup[ii]) != NULL) { - -@@ -959,24 +928,8 @@ drsprintk((MYIOC_s_WARN_FMT ": %s entere - hd->ScsiLookup[ii] = NULL; - - mf = MPT_INDEX_2_MFPTR(ioc, ii); -- --/* drsprintk((MYIOC_s_WARN_FMT "flush mf=%p sc=%p\n", -- ioc->name, mf, SCpnt)); -- DBG_DUMP_RESET_REQUEST_FRAME(ioc, mf) */ -- -- -- /* Free Chain buffers */ -- mptscsih_freeChainBuffers(ioc, ii); -- -- /* Free Message frames */ -- mpt_free_msg_frame(ioc, mf); -- -- if ((unsigned char *)mf != SCpnt->host_scribble) { -- drsprintk(( "%s Skipping scsi_done mf=%p host_scribble=%p\n", -- __FUNCTION__, mf, SCpnt->host_scribble)); -- -- continue; -- } -+ dmfprintk(( "flush: ScsiDone (mf=%p,sc=%p)\n", -+ mf, SCpnt)); - - /* Set status, free OS resources (SG DMA buffers) - * Do OS callback -@@ -993,14 +946,20 @@ drsprintk((MYIOC_s_WARN_FMT ": %s entere - SCpnt->request_bufflen, - SCpnt->sc_data_direction); - } -- SCpnt->result = (DID_BUS_BUSY << 16); -+ SCpnt->result = DID_RESET << 16; - SCpnt->host_scribble = NULL; -+ -+ /* Free Chain buffers */ -+ mptscsih_freeChainBuffers(ioc, ii); -+ -+ /* Free Message frames */ -+ mpt_free_msg_frame(ioc, mf); -+ - SCpnt->scsi_done(SCpnt); /* Issue the command callback */ - } - } - --drsprintk((MYIOC_s_WARN_FMT ": %s exiting\n", ioc->name, __FUNCTION__)); -- -+ return; - } - - /* -@@ -1010,7 +969,7 @@ drsprintk((MYIOC_s_WARN_FMT ": %s exitin - * Do NOT access the referenced scsi_cmnd structure or - * members. Will cause either a paging or NULL ptr error. - * @hd: Pointer to a SCSI HOST structure -- * @id: target id -+ * @target: target id - * @lun: lun - * - * Returns: None. -@@ -1018,47 +977,43 @@ drsprintk((MYIOC_s_WARN_FMT ": %s exitin - * Called from slave_destroy. - */ - static void --mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, uint id, uint lun) -+mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, uint target, uint lun) - { -- MPT_ADAPTER *ioc = hd->ioc; - SCSIIORequest_t *mf = NULL; - int ii; -- int max = ioc->req_depth; -+ int max = hd->ioc->req_depth; - struct scsi_cmnd *sc; - -- dsprintk((KERN_INFO MYNAM ": search_running id %d lun %d max %d\n", -- id, lun, max)); -+ dsprintk((KERN_INFO MYNAM ": search_running target %d lun %d max %d\n", -+ target, lun, max)); - - for (ii=0; ii < max; ii++) { - if ((sc = hd->ScsiLookup[ii]) != NULL) { - -- mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(ioc, ii); -+ mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(hd->ioc, ii); - - dsprintk(( "search_running: found (sc=%p, mf = %p)\n", - hd->ScsiLookup[ii], mf)); - if (mf == NULL) - continue; -- dsprintk(( "search_running: found (sc=%p, mf = %p) id %d, lun %d \n", -+ dsprintk(( "search_running: found (sc=%p, mf = %p) target %d, lun %d \n", - hd->ScsiLookup[ii], mf, mf->TargetID, mf->LUN[1])); - -- if ((mf->TargetID != ((u8)id)) || (mf->LUN[1] != ((u8) lun))) -+ if ((mf->TargetID != ((u8)target)) || (mf->LUN[1] != ((u8) lun))) - continue; - - /* Cleanup - */ - hd->ScsiLookup[ii] = NULL; -- mptscsih_freeChainBuffers(ioc, ii); -- mpt_free_msg_frame(ioc, (MPT_FRAME_HDR *)mf); -- if ((unsigned char *)mf != sc->host_scribble) { -- continue; -- } -+ mptscsih_freeChainBuffers(hd->ioc, ii); -+ mpt_free_msg_frame(hd->ioc, (MPT_FRAME_HDR *)mf); - if (sc->use_sg) { -- pci_unmap_sg(ioc->pcidev, -+ pci_unmap_sg(hd->ioc->pcidev, - (struct scatterlist *) sc->request_buffer, - sc->use_sg, - sc->sc_data_direction); - } else if (sc->request_bufflen) { -- pci_unmap_single(ioc->pcidev, -+ pci_unmap_single(hd->ioc->pcidev, - sc->SCp.dma_handle, - sc->request_bufflen, - sc->sc_data_direction); -@@ -1068,8 +1023,8 @@ mptscsih_search_running_cmds(MPT_SCSI_HO - sc->scsi_done(sc); - } - } -- dsprintk((KERN_INFO MYNAM ": search_running id %d lun %d completed\n", -- id, lun)); -+ dsprintk((KERN_INFO MYNAM ": search_running target %d lun %d completed\n", -+ target, lun)); - return; - } - -@@ -1169,66 +1124,9 @@ mptscsih_sendIOCInit(MPT_SCSI_HOST *hd) - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --/* mptscsih_TM_timeout - Call back for timeout on a -- * task management request. -- * @data: Pointer to MPT_ADAPTER recast as an unsigned long -- * -- */ --void mptscsih_TM_timeout(unsigned long data) --{ -- MPT_ADAPTER *ioc=(MPT_ADAPTER *)data; -- MPT_SCSI_HOST *hd =(MPT_SCSI_HOST *)ioc->sh->hostdata; -- int retval; -- u32 ioc_state; -- -- dtmprintk((KERN_INFO MYNAM ": %s: mptscsih_TM_timeout: " -- "TM request timed out!\n", ioc->name)); -- -- /* Delete the timer that triggered this callback. -- * Remark: DEL_TIMER checks to make sure timer is active -- * before deleting. -- */ -- del_timer(&ioc->TMtimer); -- -- mpt_free_msg_frame(ioc, ioc->tmPtr); -- -- ioc->tmPtr = NULL; -- -- dtmprintk((MYIOC_s_WARN_FMT "%s: Calling mpt_SendIocReset MUR!\n", -- ioc->name, __FUNCTION__)); -- if ((retval = mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, NO_SLEEP)) != 0) { -- ioc_state = mpt_GetIocState(ioc, 0); -- dfailprintk((MYIOC_s_WARN_FMT "%s: IOC MUR failed! ioc_state=%08x\n", -- ioc->name, __FUNCTION__, ioc_state)); --// panic ("IOC MUR Failed"); -- ioc->IOCResetInProgress = 0; -- -- if ((retval = mpt_HardResetHandler(ioc, NO_SLEEP)) < 0){ -- printk(KERN_WARNING "%s: %s: HardResetHandler FAILED!!\n", -- ioc->name, __FUNCTION__); -- } else { -- dtmprintk((MYIOC_s_WARN_FMT "%s: HardResetHandler succeeded!!\n", -- ioc->name, __FUNCTION__)); -- } -- } else { -- dtmprintk((MYIOC_s_WARN_FMT "IOC MUR succeeded\n", ioc->name)); -- mptscsih_flush_running_cmds(hd); -- dtmprintk((MYIOC_s_WARN_FMT "Calling do_ioc_recovery! \n", ioc->name)); -- if ((retval = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, NO_SLEEP)) != 0) { -- dfailprintk((MYIOC_s_ERR_FMT "%s: (%d) ioc_recovery failed\n", ioc->name, __FUNCTION__, retval)); -- } else { -- dtmprintk((MYIOC_s_WARN_FMT "%s:Successful do_ioc_recovery! \n", ioc->name, __FUNCTION__)); -- } -- } -- hd->TM_wait_done = 1; -- wake_up(&hd->TM_waitq); --} -- --/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* mptscsih_writeFCPortPage3 - write FC Port Page 3 - * @hd: Pointer to a SCSI Host Structure -- * @bus: write FC Port Page 3 for this bus -- * @id: write FC Port Page 3 for this target ID -+ * @target_id: write FC Port Page 3 for this target ID - * - * Return: -EAGAIN if unable to obtain a Message Frame - * or 0 if success. -@@ -1236,7 +1134,7 @@ void mptscsih_TM_timeout(unsigned long d - * Remark: We do not wait for a return, write pages sequentially. - */ - static int --mptscsih_writeFCPortPage3(MPT_SCSI_HOST *hd, int bus, int id) -+mptscsih_writeFCPortPage3(MPT_SCSI_HOST *hd, int target_id) - { - MPT_ADAPTER *ioc = hd->ioc; - Config_t *pReq; -@@ -1247,7 +1145,6 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST - u32 frameOffset; - u32 flagsLength; - int ii; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - - /* Get a MF for this command. -@@ -1287,10 +1184,9 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST - pReq->Header.PageType = MPI_CONFIG_PAGETYPE_FC_PORT | - MPI_CONFIG_PAGEATTR_PERSISTENT; - pReq->PageAddress = cpu_to_le32(MPI_FC_PORT_PGAD_FORM_INDEX | -- id); -+ target_id); - -- pMptTarget = ioc->Target_List[bus]; -- pTarget = pMptTarget->Target[id]; -+ pTarget = hd->Targets[target_id]; - - FCPort3->Header.PageVersion = MPI_FCPORTPAGE3_PAGEVERSION; - FCPort3->Header.PageLength = sizeof(FCPortPage3_t) / 4; -@@ -1299,8 +1195,8 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST - MPI_CONFIG_PAGEATTR_PERSISTENT; - FCPort3->Entry[0].PhysicalIdentifier.WWN.WWPN = pTarget->WWPN; - FCPort3->Entry[0].PhysicalIdentifier.WWN.WWNN = pTarget->WWNN; -- FCPort3->Entry[0].TargetID = id; -- FCPort3->Entry[0].Bus = bus; -+ FCPort3->Entry[0].TargetID = pTarget->target_id; -+ FCPort3->Entry[0].Bus = pTarget->bus_id; - FCPort3->Entry[0].Flags = cpu_to_le16(MPI_PERSISTENT_FLAGS_ENTRY_VALID); - - /* Add a SGE to the config request. -@@ -1308,7 +1204,7 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST - flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ | sizeof(FCPortPage3_t); - mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); - -- drsprintk((MYIOC_s_INFO_FMT "writeFCPortPage3: bus=%d id=%d\n", ioc->name, , bus, id)); -+ drsprintk((MYIOC_s_INFO_FMT "writeFCPortPage3: target=%d\n", ioc->name, target_id)); - - mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); - -@@ -1320,7 +1216,7 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST - * mptscsih_readFCDevicePage0 - returns FC Device Page 0 data - * @ioc: Pointer to MPT_ADAPTER structure - * @bus: bus id -- * @id: target id -+ * @targetId: target id - * @fcDevicePage: FC Device Page 0 data - * - * Returns count of number bytes copied into @fcDevicePage -@@ -1328,7 +1224,7 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST - */ - - int --mptscsih_readFCDevicePage0(MPT_ADAPTER *ioc, u8 bus, u8 id, pFCDevicePage0_t fcDevicePage) -+mptscsih_readFCDevicePage0(MPT_ADAPTER *ioc, u8 bus, u8 targetId, pFCDevicePage0_t fcDevicePage) - { - ConfigPageHeader_t hdr; - CONFIGPARMS cfg; -@@ -1348,7 +1244,7 @@ mptscsih_readFCDevicePage0(MPT_ADAPTER * - cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; - cfg.dir = 0; - -- cfg.pageAddr = (bus << 8) + id + MPI_FC_DEVICE_PGAD_FORM_BUS_TID; -+ cfg.pageAddr = (bus << 8) + targetId + MPI_FC_DEVICE_PGAD_FORM_BUS_TID; - cfg.timeout = 0; - - if ((rc = mpt_config(ioc, &cfg)) != 0) -@@ -1436,16 +1332,15 @@ mptscsih_remove(struct pci_dev *pdev) - spin_unlock_irqrestore(&dvtaskQ_lock, flags); - } - if (!count) -- printk(KERN_ERR MYNAM ": %s: ERROR - DV thread still active!\n", -- ioc->name); --#ifdef MPT_DEBUG_DV -+ printk(KERN_ERR MYNAM ": ERROR - DV thread still active!\n"); -+#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY) - else -- printk(KERN_ERR MYNAM ": DV thread orig %d, count %d\n", ioc->name,10 * HZ, count); -+ printk(KERN_ERR MYNAM ": DV thread orig %d, count %d\n", 10 * HZ, count); - #endif - #endif - -- dexitprintk((KERN_INFO MYNAM ": %s ioc=%p hd=%p MaxDevices=%d\n", -- ioc->name, ioc, hd, ioc->facts.MaxDevices)); -+ dexitprintk((KERN_INFO MYNAM ": %s ioc=%p hd=%p Targets=%p MaxDevices=%d\n", -+ ioc->name, ioc, hd, hd->Targets, ioc->facts.MaxDevices)); - // This was changed in the 2.6.13 kernel - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - mptscsih_shutdown(&pdev->dev); -@@ -1453,19 +1348,19 @@ mptscsih_remove(struct pci_dev *pdev) - mptscsih_shutdown(pdev); - #endif - -- dexitprintk((KERN_INFO MYNAM ": %s: calling scsi_remove_host ioc=%p host=%p\n", -+ dexitprintk((KERN_INFO MYNAM ": %s: calling scsi_remove_host ioc=%p host=%p\n", - ioc->name, ioc, host)); - - scsi_remove_host(host); - dexitprintk((KERN_INFO MYNAM ": %s: scsi_remove_host completed\n", ioc->name)); - - if (hd->ScsiLookup != NULL) { -- sz1 = ioc->req_depth * sizeof(void *); -+ sz1 = hd->ioc->req_depth * sizeof(void *); - kfree(hd->ScsiLookup); - hd->ScsiLookup = NULL; - dprintk((MYIOC_s_INFO_FMT - "Free'd ScsiLookup (%d) memory\n", -- ioc->name, sz1)); -+ hd->ioc->name, sz1)); - } - - if (hd->info_kbuf != NULL) -@@ -1473,7 +1368,7 @@ mptscsih_remove(struct pci_dev *pdev) - - /* NULL the Scsi_Host pointer - */ -- ioc->sh = NULL; -+ hd->ioc->sh = NULL; - - scsi_host_put(host); - -@@ -1498,36 +1393,25 @@ mptscsih_shutdown(struct pci_dev *pdev) - { - MPT_ADAPTER *ioc = pci_get_drvdata(pdev); - #endif -- struct Scsi_Host *host; -+ struct Scsi_Host *host = ioc->sh; - MPT_SCSI_HOST *hd; - -- host = ioc->sh; -- - if(!host) - return; - - hd = (MPT_SCSI_HOST *)host->hostdata; - -- dexitprintk((KERN_INFO MYNAM ": %s: ioc=%p hd=%p\n", -- __FUNCTION__, ioc, hd)); -- - /* Flush the cache of this adapter - */ -- if(hd != NULL) { -- dexitprintk((KERN_INFO MYNAM ": Calling mptscsih_synchronize_cache for %s\n", -- ioc->name)); -+ if(hd != NULL) - mptscsih_synchronize_cache(hd, 0); -- dexitprintk((KERN_INFO MYNAM ": mptscsih_synchronize_cache for %s completed\n", -- ioc->name)); -- } -- dexitprintk((KERN_INFO MYNAM ": %s done: ioc=%p hd=%p\n", -- __FUNCTION__, ioc, hd)); -+ - } - - #ifdef CONFIG_PM - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* -- * mptscsih_suspend - Fusion MPT scsi driver suspend routine. -+ * mptscsih_suspend - Fusion MPT scsie driver suspend routine. - * - * - */ -@@ -1566,7 +1450,7 @@ mptscsih_resume(struct pci_dev *pdev) - return 0; - - #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION --/* { -+ { - unsigned long lflags; - spin_lock_irqsave(&dvtaskQ_lock, lflags); - if (!dvtaskQ_active) { -@@ -1578,7 +1462,7 @@ mptscsih_resume(struct pci_dev *pdev) - } else { - spin_unlock_irqrestore(&dvtaskQ_lock, lflags); - } -- } */ -+ } - #endif - return 0; - } -@@ -1732,13 +1616,10 @@ int - mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) - { - MPT_SCSI_HOST *hd; -- MPT_ADAPTER *ioc; - MPT_FRAME_HDR *mf; - SCSIIORequest_t *pScsiReq; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; -- unsigned long flags; -- int bus, id; -+ int target; - int lun; - u32 datalen; - u32 scsictl; -@@ -1746,34 +1627,18 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v - int my_idx; - int ii; - -- /* EDM Debug */ --// mptscsih_scsi_print_command(SCpnt); -- - hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata; -- ioc = hd->ioc; -- bus = SCpnt->device->channel; -- id = SCpnt->device->id; -+ target = SCpnt->device->id; - lun = SCpnt->device->lun; - SCpnt->scsi_done = done; - -- spin_lock_irqsave(&ioc->diagLock, flags); -- if (ioc->IOCResetInProgress) { -- dfailprintk((MYIOC_s_WARN_FMT "qcmd, SCpnt=%p IOCResetInProgress!!\n", -- ioc->name, SCpnt)); -- spin_unlock_irqrestore(&ioc->diagLock, flags); -- goto fail; -- } -- spin_unlock_irqrestore(&ioc->diagLock, flags); -- -- -- pMptTarget = ioc->Target_List[bus]; -- pTarget = pMptTarget->Target[id]; -+ pTarget = hd->Targets[target]; - - if ( pTarget ) { - if ( lun > pTarget->last_lun ) { - dsprintk((MYIOC_s_INFO_FMT - "qcmd: lun=%d > last_lun=%d on id=%d\n", -- ioc->name, lun, pTarget->last_lun, id)); -+ hd->ioc->name, lun, pTarget->last_lun, target)); - SCpnt->result = DID_BAD_TARGET << 16; - SCpnt->scsi_done(SCpnt); - return 0; -@@ -1782,31 +1647,32 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v - * allocated, use the Inquiry data to determine if device - * supports tagged. - */ -- if ( pTarget->tflags & MPT_TARGET_FLAGS_Q_YES) -+ if ( (pTarget->tflags & MPT_TARGET_FLAGS_Q_YES) -+ && (SCpnt->device->tagged_supported)) { - scsictl = MPI_SCSIIO_CONTROL_SIMPLEQ; -- else -+ } else { - scsictl = MPI_SCSIIO_CONTROL_UNTAGGED; -+ } - -- } else { -+ } else - scsictl = MPI_SCSIIO_CONTROL_UNTAGGED; --dioprintk((MYIOC_s_WARN_FMT "qcmd: CDB=%02x id=%d lun=%d Null pTarget, sending Untagged\n", -- ioc->name, SCpnt->cmnd[0], id, lun)); -- if (ioc->bus_type == SPI) { -- dnegoprintk(("writeSDP1: id=%d Async/Narrow\n", -- id)); -- mpt_writeSDP1(ioc, 0, id, 0); -- } -+ dmfprintk((MYIOC_s_INFO_FMT "qcmd: SCpnt=%p, done()=%p\n", -+ (hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt, done)); - -- } -+ if (hd->resetPending) { -+ dfailprintk((MYIOC_s_INFO_FMT "QueueCmd, SCpnt=%p resetPending!!\n", -+ hd->ioc->name, SCpnt)); -+ return SCSI_MLQUEUE_HOST_BUSY; -+ } - - /* - * Put together a MPT SCSI request... - */ -- if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { -+ if ((mf = mpt_get_msg_frame(hd->ioc->DoneCtx, hd->ioc)) == NULL) { - dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n", -- ioc->name,__FUNCTION__)); -- goto fail; -- } -+ hd->ioc->name,__FUNCTION__)); -+ return SCSI_MLQUEUE_HOST_BUSY; -+ } - - pScsiReq = (SCSIIORequest_t *) mf; - -@@ -1831,8 +1697,8 @@ dioprintk((MYIOC_s_WARN_FMT "qcmd: CDB=% - - /* Use the above information to set up the message frame - */ -- pScsiReq->TargetID = (u8) id; -- pScsiReq->Bus = (u8) bus; -+ pScsiReq->TargetID = (u8) target; -+ pScsiReq->Bus = (u8) SCpnt->device->channel; - pScsiReq->ChainOffset = 0; - pScsiReq->Function = MPI_FUNCTION_SCSI_IO_REQUEST; - pScsiReq->CDBLength = SCpnt->cmd_len; -@@ -1863,7 +1729,7 @@ dioprintk((MYIOC_s_WARN_FMT "qcmd: CDB=% - pScsiReq->DataLength = cpu_to_le32(datalen); - - /* SenseBuffer low address */ -- pScsiReq->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma -+ pScsiReq->SenseBufferLowAddr = cpu_to_le32(hd->ioc->sense_buf_low_dma - + (my_idx * MPT_SENSE_BUFFER_ALLOC)); - - /* Now add the SG list -@@ -1875,39 +1741,67 @@ dioprintk((MYIOC_s_WARN_FMT "qcmd: CDB=% - (dma_addr_t) -1); - } else { - /* Add a 32 or 64 bit SGE */ -- if (mptscsih_AddSGE(ioc, SCpnt, pScsiReq, my_idx) != SUCCESS){ -- mptscsih_freeChainBuffers(ioc, my_idx); -- mpt_free_msg_frame(ioc, mf); -+ if (mptscsih_AddSGE(hd->ioc, SCpnt, pScsiReq, my_idx) != SUCCESS) - goto fail; -- } - } - -- SCpnt->host_scribble = (unsigned char *)mf; -- -- if (ioc->bus_type == SPI && -- ioc->spi_data.dvStatus[id] & MPT_SCSICFG_DV_IN_PROGRESS) { -- spin_lock_irqsave(&ioc->PendingMFlock, flags); -- ioc->PendingMF = mf; -- ioc->PendingSCpnt = SCpnt; -- spin_unlock_irqrestore(&ioc->PendingMFlock, flags); -- dpendprintk((KERN_INFO " qcmd: %s: DV In Progress id=%d mf=%p sc=%p into PendingMF\n", -- ioc->name, id, mf, SCpnt)); -- DBG_DUMP_REQUEST_FRAME(ioc, mf) --// mod_timer(&SCpnt->eh_timeout, jiffies + 40 * HZ); -- return 0; --} - hd->ScsiLookup[my_idx] = SCpnt; -+ SCpnt->host_scribble = NULL; - -- mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); -+#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION -+ if (hd->ioc->bus_type == SPI) { -+ int dvStatus = hd->ioc->spi_data.dvStatus[target]; -+ int issueCmd = 1; -+ -+ if (dvStatus || hd->ioc->spi_data.forceDv) { -+ -+ if ((dvStatus & MPT_SCSICFG_NEED_DV) || -+ (hd->ioc->spi_data.forceDv & MPT_SCSICFG_NEED_DV)) { -+ unsigned long lflags; -+ /* Schedule DV if necessary */ -+ spin_lock_irqsave(&dvtaskQ_lock, lflags); -+ if (!dvtaskQ_active) { -+ dvtaskQ_active = 1; -+ spin_unlock_irqrestore(&dvtaskQ_lock, lflags); -+ INIT_WORK(&dvTaskQ_task, mptscsih_domainValidation, (void *) hd); -+ -+ schedule_work(&dvTaskQ_task); -+ } else { -+ spin_unlock_irqrestore(&dvtaskQ_lock, lflags); -+ } -+ hd->ioc->spi_data.forceDv &= ~MPT_SCSICFG_NEED_DV; -+ } -+ -+ /* Trying to do DV to this target, extend timeout. -+ * Wait to issue until flag is clear -+ */ -+ if (dvStatus & MPT_SCSICFG_DV_PENDING) { -+ mod_timer(&SCpnt->eh_timeout, jiffies + 40 * HZ); -+ issueCmd = 0; -+ } -+ -+ /* Set the DV flags. -+ */ -+ if (dvStatus & MPT_SCSICFG_DV_NOT_DONE) -+ mptscsih_set_dvflags(hd, pScsiReq); -+ -+ if (!issueCmd) -+ goto fail; -+ } -+ } -+#endif -+ -+ mpt_put_msg_frame(hd->ioc->DoneCtx, hd->ioc, mf); - dmfprintk((MYIOC_s_INFO_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n", -- ioc->name, SCpnt, mf, my_idx)); -- DBG_DUMP_REQUEST_FRAME(ioc,mf) -+ hd->ioc->name, SCpnt, mf, my_idx)); -+ DBG_DUMP_REQUEST_FRAME(mf) - return 0; - - fail: -- SCpnt->result = DID_BUS_BUSY << 16; -- SCpnt->scsi_done(SCpnt); -- return 0; -+ hd->ScsiLookup[my_idx] = NULL; -+ mptscsih_freeChainBuffers(hd->ioc, my_idx); -+ mpt_free_msg_frame(hd->ioc, mf); -+ return SCSI_MLQUEUE_HOST_BUSY; - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -1972,8 +1866,7 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *i - * - * @ioc: Pointer to MPT_ADAPTER structure - * @type: Task Management type -- * @bus: Logical Bus for reset (if appropriate) -- * @id: Logical Target ID for reset (if appropriate) -+ * @target: Logical Target ID for reset (if appropriate) - * @lun: Logical Unit for reset (if appropriate) - * @ctx2abort: Context for the task to be aborted (if appropriate) - * -@@ -1982,10 +1875,10 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *i - * Remark: With old EH code, at most 1 SCSI TaskMgmt function per IOC - * will be active. - * -- * Returns 0 for SUCCESS. -+ * Returns 0 for SUCCESS or -1 if FAILED. - */ - int --mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 bus, u8 id, u8 lun, int ctx2abort, ulong timeout) -+mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout) - { - MPT_ADAPTER *ioc; - int rc = -1; -@@ -2000,15 +1893,16 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 - return 0; - - ioc = hd->ioc; -- -+ if (ioc == NULL) { -+ printk(KERN_ERR MYNAM " TMHandler" " NULL ioc!\n"); -+ return FAILED; -+ } - dtmprintk((MYIOC_s_INFO_FMT "TMHandler Entered!\n", ioc->name)); - - // SJR - CHECKME - Can we avoid this here? - // (mpt_HardResetHandler has this check...) - spin_lock_irqsave(&ioc->diagLock, flags); -- if (ioc->IOCResetInProgress) { -- dtmprintk((KERN_INFO MYNAM ": %s: TMHandler failing: " -- "IOCResetInProgress\n", ioc->name)); -+ if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)) { - spin_unlock_irqrestore(&ioc->diagLock, flags); - return FAILED; - } -@@ -2023,54 +1917,52 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 - if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) { - dtmprintk((KERN_INFO MYNAM ": %s: TMHandler abort: " - "Timed out waiting for last TM (%d) to complete! \n", -- ioc->name, hd->tmPending)); -+ hd->ioc->name, hd->tmPending)); - return FAILED; - } else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) { - dtmprintk((KERN_INFO MYNAM ": %s: TMHandler target reset: " - "Timed out waiting for last TM (%d) to complete! \n", -- ioc->name, hd->tmPending)); -+ hd->ioc->name, hd->tmPending)); - return FAILED; - } else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) { - dtmprintk((KERN_INFO MYNAM ": %s: TMHandler bus reset: " - "Timed out waiting for last TM (%d) to complete! \n", -- ioc->name, hd->tmPending)); -+ hd->ioc->name, hd->tmPending)); - if (hd->tmPending & (1 << MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS)) - return FAILED; - - doTask = 0; - } - } else { -- spin_lock_irqsave(&ioc->FreeQlock, flags); -+ spin_lock_irqsave(&hd->ioc->FreeQlock, flags); - hd->tmPending |= (1 << type); -- spin_unlock_irqrestore(&ioc->FreeQlock, flags); -+ spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); - } - - /* Is operational? - */ -- ioc_raw_state = mpt_GetIocState(ioc, 0); -+ ioc_raw_state = mpt_GetIocState(hd->ioc, 0); - - #ifdef MPT_DEBUG_RESET - if ((ioc_raw_state & MPI_IOC_STATE_MASK) != MPI_IOC_STATE_OPERATIONAL) { - printk(MYIOC_s_WARN_FMT - "TM Handler: IOC Not operational(0x%x)!\n", -- ioc->name, ioc_raw_state); -- return FAILED; --// panic ( "TMHandler: IOC Not operational!"); -+ hd->ioc->name, ioc_raw_state); - } - #endif - - if (doTask && ((ioc_raw_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_OPERATIONAL) - && !(ioc_raw_state & MPI_DOORBELL_ACTIVE)) { - -- /* Issue the Task Mgmt request. -+ /* Isse the Task Mgmt request. - */ - if (hd->hard_resets < -1) - hd->hard_resets++; -- rc = mptscsih_IssueTaskMgmt(hd, type, bus, id, lun, ctx2abort, timeout); -+ rc = mptscsih_IssueTaskMgmt(hd, type, channel, target, lun, ctx2abort, timeout); - if (rc) { -- printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n", ioc->name); -+ printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n", hd->ioc->name); - } else { -- dtmprintk((MYIOC_s_INFO_FMT "Issue of TaskMgmt Successful!\n", ioc->name)); -+ dtmprintk((MYIOC_s_INFO_FMT "Issue of TaskMgmt Successful!\n", hd->ioc->name)); - } - } - -@@ -2079,21 +1971,11 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 - if ((type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) && (rc || - ioc->reload_fw || (ioc->alt_ioc && ioc->alt_ioc->reload_fw))) { - dtmprintk((MYIOC_s_INFO_FMT "Calling HardReset! \n", -- ioc->name)); -- rc = mpt_HardResetHandler(ioc, CAN_SLEEP); -+ hd->ioc->name)); -+ rc = mpt_HardResetHandler(hd->ioc, CAN_SLEEP); - } - -- /* -- * Check IOCStatus from TM reply message -- */ -- if (hd->tm_iocstatus == MPI_IOCSTATUS_SUCCESS || -- hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_TASK_TERMINATED || -- hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_IOC_TERMINATED) -- rc = 0; -- else -- rc = FAILED; -- -- dtmprintk((MYIOC_s_INFO_FMT "TMHandler rc = %d!\n", ioc->name, rc)); -+ dtmprintk((MYIOC_s_INFO_FMT "TMHandler rc = %d!\n", hd->ioc->name, rc)); - - return rc; - } -@@ -2104,7 +1986,7 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 - * mptscsih_IssueTaskMgmt - Generic send Task Management function. - * @hd: Pointer to MPT_SCSI_HOST structure - * @type: Task Management type -- * @id: Logical Target ID for reset (if appropriate) -+ * @target: Logical Target ID for reset (if appropriate) - * @lun: Logical Unit for reset (if appropriate) - * @ctx2abort: Context for the task to be aborted (if appropriate) - * -@@ -2117,31 +1999,28 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 - * else other non-zero value returned. - */ - static int --mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 bus, u8 id, u8 lun, int ctx2abort, ulong timeout) -+mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout) - { -- MPT_ADAPTER *ioc = hd->ioc; - MPT_FRAME_HDR *mf; - SCSITaskMgmt_t *pScsiTm; - int ii; - int retval; -- u32 ioc_state; -- unsigned long flags; - - /* Return Fail to calling function if no message frames available. - */ -- if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) { -+ if ((mf = mpt_get_msg_frame(hd->ioc->TaskCtx, hd->ioc)) == NULL) { - dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n", -- ioc->name,__FUNCTION__)); -+ hd->ioc->name,__FUNCTION__)); - return FAILED; - } -- dtmprintk((MYIOC_s_WARN_FMT "IssueTaskMgmt request @ %p\n", -- ioc->name, mf)); -+ dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt request @ %p\n", -+ hd->ioc->name, mf)); - - /* Format the Request - */ - pScsiTm = (SCSITaskMgmt_t *) mf; -- pScsiTm->TargetID = id; -- pScsiTm->Bus = bus; -+ pScsiTm->TargetID = target; -+ pScsiTm->Bus = channel; - pScsiTm->ChainOffset = 0; - pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT; - -@@ -2161,52 +2040,31 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd - - pScsiTm->TaskMsgContext = ctx2abort; - -- dtmprintk((MYIOC_s_WARN_FMT "IssueTaskMgmt: ctx2abort (0x%08x) type=%d\n", -- ioc->name, ctx2abort, type)); -+ dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt: ctx2abort (0x%08x) type=%d\n", -+ hd->ioc->name, ctx2abort, type)); - - DBG_DUMP_TM_REQUEST_FRAME((u32 *)pScsiTm); - -- hd->TM_wait_done = 0; -- if ((retval = mpt_send_handshake_request(ioc->TaskCtx, ioc, -- sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, timeout, CAN_SLEEP)) != 0) { -- dfailprintk((MYIOC_s_WARN_FMT "%s: send_handshake FAILED!\n", -- ioc->name, __FUNCTION__)); -- mpt_free_msg_frame(ioc, mf); -- -- dtmprintk((MYIOC_s_WARN_FMT "Calling mpt_SendIocReset MUR!\n", -- ioc->name)); -- if ((retval = mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, CAN_SLEEP)) != 0) { -- ioc_state = mpt_GetIocState(ioc, 0); -- dfailprintk((MYIOC_s_WARN_FMT "IOC MUR failed! ioc_state=%08x\n", ioc->name, ioc_state)); --// panic ("IOC MUR Failed"); -- ioc->IOCResetInProgress = 0; -+ if ((retval = mpt_send_handshake_request(hd->ioc->TaskCtx, hd->ioc, -+ sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, -+ CAN_SLEEP)) != 0) { -+ dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!" -+ " (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd, -+ hd->ioc, mf)); -+ mpt_free_msg_frame(hd->ioc, mf); -+ return retval; -+ } - -- if ((retval = mpt_HardResetHandler(ioc, CAN_SLEEP)) < 0){ -- printk((KERN_WARNING " HardResetHandler FAILED!!\n")); } -- else { -- dtmprintk((MYIOC_s_WARN_FMT " HardResetHandler succeeded!!\n", ioc->name)); -- } -- } else { -- dtmprintk((MYIOC_s_WARN_FMT "IOC MUR succeeded\n", ioc->name)); -- mptscsih_flush_running_cmds(hd); -- dtmprintk((MYIOC_s_WARN_FMT "Calling do_ioc_recovery! \n", ioc->name)); -- if ((retval = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, CAN_SLEEP)) != 0) { -- dfailprintk((MYIOC_s_ERR_FMT "- (%d) ioc_recovery failed\n", ioc->name, retval)); -- } else { -- dtmprintk((MYIOC_s_WARN_FMT "Successful do_ioc_recovery! \n", ioc->name)); -- } -- } -- } else { -- dtmprintk((MYIOC_s_WARN_FMT "%s: send_handshake SUCCESS!\n", -- ioc->name, __FUNCTION__)); -- if (hd->TM_wait_done == 0) { -- wait_event(hd->TM_waitq, hd->TM_wait_done); -- } -+ if(mptscsih_tm_wait_for_completion(hd, timeout) == FAILED) { -+ dfailprintk((MYIOC_s_ERR_FMT "_wait_for_completion FAILED!" -+ " (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd, -+ hd->ioc, mf)); -+ mpt_free_msg_frame(hd->ioc, mf); -+ dtmprintk((MYIOC_s_INFO_FMT "Calling HardReset! \n", -+ hd->ioc->name)); -+ retval = mpt_HardResetHandler(hd->ioc, CAN_SLEEP); - } -- spin_lock_irqsave(&ioc->FreeQlock, flags); -- hd->tmPending = 0; -- hd->tmState = TM_STATE_NONE; -- spin_unlock_irqrestore(&ioc->FreeQlock, flags); -+ - return retval; - } - -@@ -2229,8 +2087,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) - int scpnt_idx; - int retval; - int tm_timeout; -- unsigned long flags; -- unsigned long sn = SCpnt->serial_number; - - /* From the 2.6.13 kernels, they have removed calling - * eh_threads with the host_lock in locked state -@@ -2251,57 +2107,30 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) - } - - ioc = hd->ioc; -- spin_lock_irqsave(&ioc->diagLock, flags); -- if (ioc->IOCResetInProgress) { -- dtmprintk((KERN_INFO ": %s: abort: " -- "IOCResetInProgress (sc=%p)\n", -- ioc->name, SCpnt)); -- spin_unlock_irqrestore(&ioc->diagLock, flags); -- -- -+ if (hd->resetPending) { - return FAILED; - } - --spin_unlock_irqrestore(&ioc->diagLock, flags); -- - if (hd->timeouts < -1) -- - hd->timeouts++; - -- printk(KERN_WARNING MYNAM ": %s: attempting task abort! (sc=%p)\n", -- ioc->name, SCpnt); -- scsi_print_command(SCpnt); -- --// printk(KERN_WARNING MYNAM ": %s: Delaying 30 seconds\n", ioc->name); --// mdelay (30000); -- /* If this command is pended, then timeout/hang occurred -- * during DV. Post command and flush pending Q -- * and then following up with the reset request. -- */ -- if ( (mf = mptscsih_search_PendingMF(ioc, SCpnt)) != NULL) { -- /* Cmd was in PendingMF. -- */ -- dpendprintk((KERN_INFO MYNAM ": %s: mptscsih_abort: " -- "Command was in PendingMF! (sc=%p)\n", -- ioc->name, SCpnt)); -- return SUCCESS; -- } -- -- -- - /* Find this command - */ - if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(SCpnt)) < 0) { - /* Cmd not found in ScsiLookup. - * Do OS callback. - */ --// SCpnt->result = DID_RESET << 16; -+ SCpnt->result = DID_RESET << 16; - dtmprintk((KERN_INFO MYNAM ": %s: mptscsih_abort: " - "Command not in the active list! (sc=%p)\n", -- ioc->name, SCpnt)); -+ hd->ioc->name, SCpnt)); - return SUCCESS; - } - -+ printk(KERN_WARNING MYNAM ": %s: attempting task abort! (sc=%p)\n", -+ hd->ioc->name, SCpnt); -+ scsi_print_command(SCpnt); -+ - /* Most important! Set TaskMsgContext to SCpnt's MsgContext! - * (the IO to be ABORT'd) - * -@@ -2309,7 +2138,7 @@ spin_unlock_irqrestore(&ioc->diagLock, f - * swap it here either. It is an opaque cookie to - * the controller, so it does not matter. -DaveM - */ -- mf = MPT_INDEX_2_MFPTR(ioc, scpnt_idx); -+ mf = MPT_INDEX_2_MFPTR(hd->ioc, scpnt_idx); - ctx2abort = mf->u.frame.hwhdr.msgctxu.MsgContext; - - hd->abortSCpnt = SCpnt; -@@ -2318,7 +2147,7 @@ spin_unlock_irqrestore(&ioc->diagLock, f - spin_unlock_irq(host_lock); - #endif - /* set timeout in seconds */ -- switch (ioc->bus_type) { -+ switch (hd->ioc->bus_type) { - case FC: - tm_timeout=40; - break; -@@ -2327,7 +2156,7 @@ spin_unlock_irqrestore(&ioc->diagLock, f - break; - case SPI: - default: -- tm_timeout=10; -+ tm_timeout=2; - break; - } - retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK, -@@ -2337,30 +2166,17 @@ spin_unlock_irqrestore(&ioc->diagLock, f - spin_lock_irq(host_lock); - #endif - --if (ioc->bus_type == FC) { -- if (SCPNT_TO_LOOKUP_IDX(SCpnt) == scpnt_idx && -- SCpnt->serial_number == sn) { -- dtmprintk((KERN_INFO MYNAM ": %s: mptscsih_abort: " -- "scpnt_idx=%08x sn=%lx (sc=%p)\n", -- ioc->name, scpnt_idx, sn, SCpnt)); -- retval = FAILED; -- } --} -- - printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n", -- ioc->name, -+ hd->ioc->name, - ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); -- hd->ScsiLookup[scpnt_idx] = NULL; --//panic ("Task Abort completed"); -- spin_lock_irqsave(&hd->ioc->FreeQlock, flags); -- hd->tmPending = 0; -- hd->tmState = TM_STATE_NONE; -- spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); -- - - if (retval == 0) - return SUCCESS; - -+ if(retval != FAILED ) { -+ hd->tmPending = 0; -+ hd->tmState = TM_STATE_NONE; -+ } - return FAILED; - } - -@@ -2377,10 +2193,8 @@ int - mptscsih_dev_reset(struct scsi_cmnd * SCpnt) - { - MPT_SCSI_HOST *hd; -- MPT_ADAPTER *ioc; -- int id,retval; -+ int retval; - int tm_timeout; -- unsigned long flags; - - /* From the 2.6.13 kernels, they have removed calling - * eh_threads with the host_lock in locked state -@@ -2398,27 +2212,17 @@ mptscsih_dev_reset(struct scsi_cmnd * SC - return FAILED; - } - -- ioc = hd->ioc; -- id = SCpnt->device->id; -- spin_lock_irqsave(&ioc->diagLock, flags); -- if (ioc->IOCResetInProgress) { -- dtmprintk((KERN_INFO ": %s: target reset: " -- "IOCResetInProgress (sc=%p)\n", -- ioc->name, SCpnt)); -- spin_unlock_irqrestore(&ioc->diagLock, flags); -- -- return FAILED; --} --spin_unlock_irqrestore(&ioc->diagLock, flags); -+ if (hd->resetPending) -+ return FAILED; - - printk(KERN_WARNING MYNAM ": %s: attempting target reset! (sc=%p)\n", -- ioc->name, SCpnt); -+ hd->ioc->name, SCpnt); - scsi_print_command(SCpnt); - - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - spin_unlock_irq(host_lock); - #endif -- switch (ioc->bus_type) { -+ switch (hd->ioc->bus_type) { - case FC: - tm_timeout=40; - break; -@@ -2427,29 +2231,25 @@ spin_unlock_irqrestore(&ioc->diagLock, f - break; - case SPI: - default: -- tm_timeout=10; -+ tm_timeout=5; - break; - } - retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, -- SCpnt->device->channel, id, 0, 0, tm_timeout); -+ SCpnt->device->channel, SCpnt->device->id, -+ 0, 0, tm_timeout); - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - spin_lock_irq(host_lock); - #endif - printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n", -- ioc->name, -+ hd->ioc->name, - ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); -- spin_lock_irqsave(&hd->ioc->FreeQlock, flags); -- hd->tmPending = 0; -- hd->tmState = TM_STATE_NONE; -- spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); -- -- if (retval == 0) { -- if (ioc->bus_type == SPI) { -- dnegoprintk(("writeSDP1: id=%d USE_NVRAM\n", -- id)); -- mpt_writeSDP1(ioc, 0, id, MPT_SCSICFG_USE_NVRAM); -- } -- return SUCCESS; -+ -+ if (retval == 0) -+ return SUCCESS; -+ -+ if(retval != FAILED ) { -+ hd->tmPending = 0; -+ hd->tmState = TM_STATE_NONE; - } - return FAILED; - } -@@ -2467,10 +2267,8 @@ int - mptscsih_bus_reset(struct scsi_cmnd * SCpnt) - { - MPT_SCSI_HOST *hd; -- MPT_ADAPTER *ioc; - int retval; - int tm_timeout; -- unsigned long flags; - - /* From the 2.6.13 kernels, they have removed calling - * eh_threads with the host_lock in locked state -@@ -2488,9 +2286,8 @@ mptscsih_bus_reset(struct scsi_cmnd * SC - return FAILED; - } - -- ioc = hd->ioc; - printk(KERN_WARNING MYNAM ": %s: attempting bus reset! (sc=%p)\n", -- ioc->name, SCpnt); -+ hd->ioc->name, SCpnt); - scsi_print_command(SCpnt); - - if (hd->timeouts < -1) -@@ -2500,7 +2297,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SC - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - spin_unlock_irq(host_lock); - #endif -- switch (ioc->bus_type) { -+ switch (hd->ioc->bus_type) { - case FC: - tm_timeout=40; - break; -@@ -2509,7 +2306,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SC - break; - case SPI: - default: -- tm_timeout=10; -+ tm_timeout=5; - break; - } - retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, -@@ -2519,20 +2316,17 @@ mptscsih_bus_reset(struct scsi_cmnd * SC - #endif - - printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n", -- ioc->name, -+ hd->ioc->name, - ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); - -- spin_lock_irqsave(&hd->ioc->FreeQlock, flags); -- hd->tmPending = 0; -- hd->tmState = TM_STATE_NONE; -- spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); -- -- -- - if (retval == 0) - return SUCCESS; - -- return FAILED; -+ if(retval != FAILED ) { -+ hd->tmPending = 0; -+ hd->tmState = TM_STATE_NONE; -+ } -+ return FAILED; - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -2549,10 +2343,8 @@ int - mptscsih_host_reset(struct scsi_cmnd *SCpnt) - { - MPT_SCSI_HOST * hd; -- MPT_ADAPTER *ioc; - int status = SUCCESS; -- unsigned long flags; -- -+ int can_sleep; - /* From the 2.6.13 kernels, they have removed calling - * eh_threads with the host_lock in locked state - */ -@@ -2560,6 +2352,8 @@ mptscsih_host_reset(struct scsi_cmnd *SC - spinlock_t *host_lock = SCpnt->device->host->host_lock; - #endif - -+ can_sleep = crashdump_mode() ? NO_SLEEP : CAN_SLEEP; -+ - /* If we can't locate the host to reset, then we failed. */ - if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ - dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: " -@@ -2568,9 +2362,8 @@ mptscsih_host_reset(struct scsi_cmnd *SC - return FAILED; - } - -- ioc = hd->ioc; - printk(KERN_WARNING MYNAM ": %s: Attempting host reset! (sc=%p)\n", -- ioc->name, SCpnt); -+ hd->ioc->name, SCpnt); - - /* If our attempts to reset the host failed, then return a failed - * status. The host will be taken off line by the SCSI mid-layer. -@@ -2578,78 +2371,26 @@ mptscsih_host_reset(struct scsi_cmnd *SC - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - MPT_HOST_UNLOCK(host_lock); - #endif -- if (mpt_HardResetHandler(ioc, -- crashdump_mode() ? NO_SLEEP : CAN_SLEEP) < 0) { --dfailprintk((MYIOC_s_ERR_FMT "host reset: HardResetHandler failed\n", ioc->name)); -- -+ if (mpt_HardResetHandler(hd->ioc, can_sleep) < 0){ - status = FAILED; - } else { -- --dtmprintk((MYIOC_s_ERR_FMT "host reset: HardResetHandler succeeded\n", ioc->name)); -- status = SUCCESS; -- -+ /* Make sure TM pending is cleared and TM state is set to -+ * NONE. -+ */ -+ hd->tmPending = 0; -+ hd->tmState = TM_STATE_NONE; - } -- - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - MPT_HOST_LOCK(host_lock); - #endif -- spin_lock_irqsave(&hd->ioc->FreeQlock, flags); -- hd->tmPending = 0; -- hd->tmState = TM_STATE_NONE; -- spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); -- -- return status; --} -- --/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --/* Search the pendingMF for a command with specific index. -- * If found, delete and return mf pointer -- * If not found, return NULL -- */ --static MPT_FRAME_HDR * --mptscsih_search_PendingMF(MPT_ADAPTER *ioc, struct scsi_cmnd * sc) --{ -- MPT_SCSI_HOST *hd=(MPT_SCSI_HOST *) ioc->sh->hostdata; -- MPT_FRAME_HDR *mf; -- unsigned long flags; -- u16 req_idx; - -- dpendprintk((MYIOC_s_WARN_FMT "%s entered\n", -- ioc->name, __FUNCTION__)); -- -- spin_lock_irqsave(&ioc->PendingMFlock, flags); -- if ((mf=ioc->PendingMF) == NULL) { -- spin_unlock_irqrestore(&ioc->PendingMFlock, flags); -- return NULL; -- } -+ dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: " -+ "Status = %s\n", -+ (status == SUCCESS) ? "SUCCESS" : "FAILED" ) ); - -- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -- if (sc == hd->ScsiLookup[req_idx]) { -- ioc->PendingMF = NULL; -- spin_unlock_irqrestore(&ioc->PendingMFlock, flags); -- -- dpendprintk((MYIOC_s_WARN_FMT "%s: found mf=%p\n", -- ioc->name, __FUNCTION__, mf)); -- DBG_DUMP_PENDING_REQUEST_FRAME(ioc, mf) -- /* Free Chain buffers */ -- mptscsih_freeChainBuffers(ioc, req_idx); -- /* Free Message frames */ -- mpt_free_msg_frame(ioc, mf); -- hd->ScsiLookup[req_idx] = NULL; -- sc->result = (DID_RESET << 16); -- sc->host_scribble = NULL; -- sc->scsi_done(sc); /* Issue the command callback */ -- dpendprintk(( "%s Executed scsi_done mf=%p sc=%p\n", -- __FUNCTION__, mf, sc)); -- return mf; -- } -- spin_unlock_irqrestore(&ioc->PendingMFlock, flags); -- dpendprintk((MYIOC_s_WARN_FMT "%s exiting mf=%p not in ScsiLookup\n", -- ioc->name, __FUNCTION__, mf)); -- return NULL; -+ return status; - } - -- - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /** - * mptscsih_tm_pending_wait - wait for pending task management request to -@@ -2661,21 +2402,20 @@ mptscsih_search_PendingMF(MPT_ADAPTER *i - static int - mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd) - { -- MPT_ADAPTER *ioc = hd->ioc; - unsigned long flags; - int loop_count = 4 * 10; /* Wait 10 seconds */ - int status = FAILED; - - do { -- spin_lock_irqsave(&ioc->FreeQlock, flags); -+ spin_lock_irqsave(&hd->ioc->FreeQlock, flags); - if (hd->tmState == TM_STATE_NONE) { - hd->tmState = TM_STATE_IN_PROGRESS; - hd->tmPending = 1; -- spin_unlock_irqrestore(&ioc->FreeQlock, flags); -+ spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); - status = SUCCESS; - break; - } -- spin_unlock_irqrestore(&ioc->FreeQlock, flags); -+ spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); - msleep(250); - } while (--loop_count); - -@@ -2683,6 +2423,34 @@ mptscsih_tm_pending_wait(MPT_SCSI_HOST * - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/** -+ * mptscsih_tm_wait_for_completion - wait for completion of TM task -+ * @hd: Pointer to MPT host structure. -+ * -+ * Returns {SUCCESS,FAILED}. -+ */ -+static int -+mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout ) -+{ -+ unsigned long flags; -+ int loop_count = 4 * timeout; -+ int status = FAILED; -+ -+ do { -+ spin_lock_irqsave(&hd->ioc->FreeQlock, flags); -+ if(hd->tmPending == 0) { -+ status = SUCCESS; -+ spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); -+ break; -+ } -+ spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); -+ msleep_interruptible(250); -+ } while (--loop_count); -+ -+ return status; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - static void - mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code) - { -@@ -2720,17 +2488,17 @@ mptscsih_taskmgmt_response_code(MPT_ADAP - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /** -- * mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver -- * @ioc: Pointer to MPT_ADAPTER structure -- * @mf: Pointer to SCSI task mgmt request frame -- * @mr: Pointer to SCSI task mgmt reply frame -- * -- * This routine is called from mptbase.c::mpt_interrupt() at the completion -- * of any SCSI task management request. -- * This routine is registered with the MPT (base) driver at driver -- * load/init time via the mpt_register() API call. -+ * mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver -+ * @ioc: Pointer to MPT_ADAPTER structure -+ * @mf: Pointer to SCSI task mgmt request frame -+ * @mr: Pointer to SCSI task mgmt reply frame - * -- * Returns 1 indicating alloc'd request frame ptr should be freed. -+ * This routine is called from mptbase.c::mpt_interrupt() at the completion -+ * of any SCSI task management request. -+ * This routine is registered with the MPT (base) driver at driver -+ * load/init time via the mpt_register() API call. -+ * -+ * Returns 1 indicating alloc'd request frame ptr should be freed. - */ - int - mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) -@@ -2739,26 +2507,27 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER * - SCSITaskMgmt_t *pScsiTmReq; - MPT_SCSI_HOST *hd; - unsigned long flags; -- u16 iocstatus = MPI_IOCSTATUS_SUCCESS; -+ u16 iocstatus; - u8 tmType; -- u32 termination_count; - - dtmprintk((MYIOC_s_WARN_FMT "TaskMgmt completed (mf=%p,mr=%p)\n", - ioc->name, mf, mr)); -+ if (ioc->sh) { - /* Depending on the thread, a timer is activated for - * the TM request. Delete this timer on completion of TM. - * Decrement count of outstanding TM requests. - */ -- hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; -- if (ioc->tmPtr) { -- del_timer(&ioc->TMtimer); -- mpt_free_msg_frame(ioc, ioc->tmPtr); -- ioc->tmPtr = NULL; -+ hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; -+ } else { -+ dtmprintk((MYIOC_s_WARN_FMT "TaskMgmt Complete: NULL Scsi Host Ptr\n", -+ ioc->name)); -+ return 1; - } - - if (mr == NULL) { -- dtmprintk((MYIOC_s_WARN_FMT "ERROR! TaskMgmt Turbo Reply: Request %p\n", -+ dtmprintk((MYIOC_s_WARN_FMT "ERROR! TaskMgmt Reply: NULL Request %p\n", - ioc->name, mf)); -+ return 1; - } else { - pScsiTmReply = (SCSITaskMgmtReply_t*)mr; - pScsiTmReq = (SCSITaskMgmt_t*)mf; -@@ -2771,40 +2540,31 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER * - mptscsih_taskmgmt_response_code(ioc, - pScsiTmReply->ResponseCode); - -- termination_count = le32_to_cpu(pScsiTmReply->TerminationCount); -- -- iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK; -- dtmprintk((MYIOC_s_WARN_FMT " SCSI TaskMgmt (%d) IOCStatus=%04x IOCLogInfo=%08x TerminationCount=%d\n", -- ioc->name, tmType, iocstatus, le32_to_cpu(pScsiTmReply->IOCLogInfo), termination_count)); -+ dtmprintk((MYIOC_s_WARN_FMT " TaskType = %d, TerminationCount=%d\n", -+ ioc->name, tmType, le32_to_cpu(pScsiTmReply->TerminationCount))); - DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply); - -+ iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK; -+ dtmprintk((MYIOC_s_WARN_FMT " SCSI TaskMgmt (%d) IOCStatus=%04x IOCLogInfo=%08x\n", -+ ioc->name, tmType, iocstatus, le32_to_cpu(pScsiTmReply->IOCLogInfo))); - /* Error? (anything non-zero?) */ - if (iocstatus) { - - /* clear flags and continue. - */ -- if (tmType == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) { -- if (termination_count == 1) { -- iocstatus = MPI_IOCSTATUS_SCSI_TASK_TERMINATED; -- dtmprintk((MYIOC_s_WARN_FMT " SCSI Abort Task IOCStatus is now %04x\n", -- ioc->name, iocstatus)); -- } -+ if (tmType == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) - hd->abortSCpnt = NULL; -- } - - /* If an internal command is present - * or the TM failed - reload the FW. - * FC FW may respond FAILED to an ABORT - */ -- else if (tmType == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) { -+ if (tmType == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) { - if ((hd->cmdPtr) || - (iocstatus == MPI_IOCSTATUS_SCSI_TASK_MGMT_FAILED)) { - if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0) { - printk((KERN_WARNING - " Firmware Reload FAILED!!\n")); -- dfailprintk((MYIOC_s_ERR_FMT "taskmgmt_complete: HardReset failed\n", ioc->name)); -- } else { -- dtmprintk((MYIOC_s_ERR_FMT "taskmgmt_complete: HardReset succeeded\n", ioc->name)); - } - } - } -@@ -2818,16 +2578,12 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER * - - spin_lock_irqsave(&ioc->FreeQlock, flags); - hd->tmPending = 0; -- hd->tm_iocstatus = iocstatus; -- hd->tmState = TM_STATE_NONE; - spin_unlock_irqrestore(&ioc->FreeQlock, flags); -+ hd->tmState = TM_STATE_NONE; - -- hd->TM_wait_done = 1; -- wake_up(&hd->TM_waitq); - return 1; - } - -- - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* - * This is anyones guess quite frankly. -@@ -2884,48 +2640,38 @@ mptscsih_slave_alloc(struct scsi_device - { - struct Scsi_Host *host = device->host; - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; -- MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; -- SpiCfgData *pSpi; -- uint bus=device->channel, id=device->id, lun=device->lun; -+ uint target = device->id, lun = device->lun; - int indexed_lun, lun_index; - -+ if (hd == NULL) -+ return -ENODEV; - -- pMptTarget = ioc->Target_List[bus]; -- pTarget = pMptTarget->Target[id]; -- dinitprintk((MYIOC_s_INFO_FMT "mptscsih_slave_alloc: bus=%d id=%d lun=%d hd=%p pMptTarget=%p pTarget=%p\n", -- ioc->name, bus, id, lun, hd, pMptTarget, pTarget)); -- -- if (pTarget) { -- dinitprintk((MYIOC_s_ERR_FMT "slave_alloc: pTarget=%p already allocated!\n", -- ioc->name, pTarget)); -+ if ((pTarget = hd->Targets[target])) - goto out; -- } - - pTarget = kmalloc(sizeof(VirtDevice), GFP_KERNEL); - if (!pTarget) { - printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", -- ioc->name, sizeof(VirtDevice)); -+ hd->ioc->name, sizeof(VirtDevice)); - return -ENOMEM; - } - -+ dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_alloc target=%d lun=%d pTarget=%p\n", -+ hd->ioc->name, target, lun, pTarget)); - memset(pTarget, 0, sizeof(VirtDevice)); --if (ioc->bus_type != SPI) -- pTarget->tflags = MPT_TARGET_FLAGS_Q_YES; -- pTarget->ioc = ioc; -- pTarget->id = id; -- pTarget->bus = bus; -+ pTarget->tflags = MPT_TARGET_FLAGS_Q_YES; -+ pTarget->ioc_id = hd->ioc->id; -+ pTarget->target_id = device->id; -+ pTarget->bus_id = device->channel; - pTarget->last_lun = MPT_LAST_LUN; -- pMptTarget->Target[id] = pTarget; -- if (ioc->bus_type == SPI) { -- pSpi = &ioc->spi_data; -- pSpi->dvStatus[id] |= (MPT_SCSICFG_NEED_DV | -- MPT_SCSICFG_DV_NOT_DONE); -- -- if (ioc->raid_data.isRaid & (1 << device->id)) { -+ pTarget->raidVolume = 0; -+ pTarget->device = device; -+ hd->Targets[target] = pTarget; -+ if (hd->ioc->bus_type == SPI) { -+ if (hd->ioc->raid_data.isRaid & (1 << device->id)) { - pTarget->raidVolume = 1; -- ddvprintk((KERN_INFO -+ ddvtprintk((KERN_INFO - "RAID Volume @ id %d\n", device->id)); - } - } -@@ -2937,8 +2683,8 @@ out: - indexed_lun = (lun % 32); - pTarget->luns[lun_index] |= (1 << indexed_lun); - -- dinitprintk((MYIOC_s_WARN_FMT "mptscsih_slave_alloc: bus=%d id=%d lun=%d pTarget=%p num_luns=%d\n", -- ioc->name, bus, id, lun, pTarget, pTarget->num_luns)); -+ dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_alloc target=%d lun=%d pTarget=%p num_luns=%d\n", -+ hd->ioc->name, target, lun, pTarget, pTarget->num_luns)); - return 0; - } - -@@ -2951,24 +2697,20 @@ mptscsih_slave_destroy(struct scsi_devic - { - struct Scsi_Host *host = device->host; - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; -- MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; -- uint bus=device->channel, id=device->id, lun=device->lun; -+ uint target = device->id, lun = device->lun; - int indexed_lun, lun_index; - -- pMptTarget = ioc->Target_List[bus]; -- pTarget = pMptTarget->Target[id]; -- if (pTarget == NULL) { -- printk(MYIOC_s_WARN_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d pTarget=%p is NULL\n", -- ioc->name, bus, id, lun, pTarget); -+ if ((pTarget = hd->Targets[target]) == NULL) { -+ printk(MYIOC_s_WARN_FMT " mptscsih_slave_destroy target=%d lun=%d pTarget=%p is NULL\n", -+ hd->ioc->name, target, lun, pTarget); - return; - } -- dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d type=%x pTarget=%p\n", -- ioc->name, bus, id, lun, pTarget->inq_data[0], pTarget)); -+ dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy target=%d lun=%d type=%x pTarget=%p\n", -+ hd->ioc->name, target, lun, pTarget->inq_data[0], pTarget)); - -- if((ioc->bus_type == SPI) && -- mptscsih_is_phys_disk(ioc, bus, id)) { -+ if((hd->ioc->bus_type == SPI) && -+ mptscsih_is_phys_disk(hd->ioc, target)) { - ; /* this target reset shouldn't be issued to hidden - * phys disk in a raid volume. The result would - * kill domain validation on that disk; e.g. disk -@@ -2984,41 +2726,38 @@ mptscsih_slave_destroy(struct scsi_devic - */ - } - -- mptscsih_search_running_cmds(hd, id, lun); -+ mptscsih_search_running_cmds(hd, target, lun); - - lun_index = (lun >> 5); /* 32 luns per lun_index */ - indexed_lun = (lun % 32); - pTarget->luns[lun_index] &= ~(1 << indexed_lun); - - if (--pTarget->num_luns) { -- dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d pTarget=%p num_luns=%d luns[0]=%x returning\n", -- ioc->name, bus, id, lun, pTarget, pTarget->num_luns, pTarget->luns[0])); -+ dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy target=%d lun=%d pTarget=%p num_luns=%d luns[0]=%x returning\n", -+ hd->ioc->name, target, lun, pTarget, pTarget->num_luns, pTarget->luns[0])); - return; - } - -- dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d freeing pTarget=%p\n", -- ioc->name, bus, id, lun, pTarget)); -- -- if (ioc->bus_type == SPI) { -- if (mptscsih_is_phys_disk(ioc, bus, id)) { -- ioc->spi_data.forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3; -- dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy PhysDisk bus=%d id=% d lun=%d pTarget=%p retained\n",ioc->name, bus, id, lun, pTarget)); -- -- -+ dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy target=%d lun=%d freeing pTarget=%p\n", -+ hd->ioc->name, target, lun, pTarget)); -+ kfree(pTarget); -+ hd->Targets[target] = NULL; -+ -+ if (hd->ioc->bus_type == SPI) { -+ if (mptscsih_is_phys_disk(hd->ioc, target)) { -+ hd->ioc->spi_data.forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3; - } else { -- ioc->spi_data.dvStatus[id] = -- (MPT_SCSICFG_NEGOTIATE | MPT_SCSICFG_DV_NOT_DONE); -- kfree(pTarget); -- pMptTarget->Target[id] = NULL; -- dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d pTarget=%p completed\n",ioc->name, bus, id, lun, pTarget)); -+ hd->ioc->spi_data.dvStatus[target] = -+ MPT_SCSICFG_NEGOTIATE; - -+ if (!hd->negoNvram) { -+ hd->ioc->spi_data.dvStatus[target] |= -+ MPT_SCSICFG_DV_NOT_DONE; -+ } - } --}else { --kfree(pTarget); --pMptTarget->Target[id] = NULL; --dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d pTarget=%p completed\n", --ioc->name, bus, id, lun, pTarget)); -- } -+ } -+ dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy target=%d lun=%d pTarget=%p completed\n", -+ hd->ioc->name, target, lun, pTarget)); - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -3033,34 +2772,29 @@ int - mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) - { - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)sdev->host->hostdata; -- MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - int max_depth; - int tagged; - -- pMptTarget = ioc->Target_List[sdev->channel]; -- pTarget = pMptTarget->Target[sdev->id]; -- if (pTarget == NULL) -+ if (!(pTarget = hd->Targets[sdev->id])) - return 0; - -- -- if (pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY) { -- if (!(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) -- max_depth = 1; -- else if (ioc->bus_type == SPI) { -- if (((pTarget->inq_data[0] & 0x1f) == 0x00) && -- (pTarget->minSyncFactor <= MPT_ULTRA160 )) -+ if (hd->ioc->bus_type == SPI) { -+ if (pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY) { -+ if (!(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) -+ max_depth = 1; -+ else if (((pTarget->inq_data[0] & 0x1f) == 0x00) && -+ (pTarget->minSyncFactor <= MPT_ULTRA160 )) - max_depth = MPT_SCSI_CMD_PER_DEV_HIGH; - else -- max_depth = MPT_SCSI_CMD_PER_DEV_LOW; -+ max_depth = MPT_SCSI_CMD_PER_DEV_LOW; -+ } else { -+ /* error case - No Inq. Data */ -+ max_depth = 1; -+ } -+ } else -+ max_depth = MPT_SCSI_CMD_PER_DEV_HIGH; - -- } else -- max_depth = MPT_SCSI_CMD_PER_DEV_HIGH; -- } else { -- /* error case - No Inq. Data */ -- max_depth = 1; -- } - if (qdepth > max_depth) - qdepth = max_depth; - if (qdepth == 1) -@@ -3082,29 +2816,25 @@ int - mptscsih_slave_configure(struct scsi_device *device) - { - struct Scsi_Host *sh = device->host; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)sh->hostdata; -- MPT_ADAPTER *ioc = hd->ioc; - int rc; - -- dinitprintk((MYIOC_s_INFO_FMT -- "%s: device @ %p, id=%d, LUN=%d, channel=%d\n", -- ioc->name, __FUNCTION__, device, device->id, device->lun, -- device->channel)); -- dinitprintk((MYIOC_s_INFO_FMT -- "sdtr %d wdtr %d ppr %d inq length=%d\n", -- ioc->name, device->sdtr, device->wdtr, -+ dsprintk((MYIOC_s_INFO_FMT -+ "device @ %p, id=%d, LUN=%d, channel=%d\n", -+ hd->ioc->name, device, device->id, device->lun, device->channel)); -+ dsprintk((MYIOC_s_INFO_FMT -+ "sdtr %d wdtr %d ppr %d inq length=%d\n", -+ hd->ioc->name, device->sdtr, device->wdtr, - device->ppr, device->inquiry_len)); - -- if (device->id >= ioc->DevicesPerBus) { -+ if (device->id > sh->max_id) { - /* error case, should never happen */ - scsi_adjust_queue_depth(device, 0, 1); - goto slave_configure_exit; - } - -- pMptTarget = ioc->Target_List[device->channel]; -- pTarget = pMptTarget->Target[device->id]; -+ pTarget = hd->Targets[device->id]; - - if (pTarget == NULL) { - /* Driver doesn't know about this device. -@@ -3122,19 +2852,19 @@ mptscsih_slave_configure(struct scsi_dev - pTarget->configured_lun=1; - - /* LUN persistancy support */ -- if (ioc->bus_type == FC) { -+ if (hd->ioc->bus_type == FC) { - FCDevicePage0_t fcDevicePage; - -- rc = mptscsih_readFCDevicePage0(ioc, -- pTarget->bus, pTarget->id, &fcDevicePage); -+ rc = mptscsih_readFCDevicePage0(hd->ioc, -+ pTarget->bus_id, pTarget->target_id, &fcDevicePage); - - if (rc > offsetof(FCDevicePage0_t,PortIdentifier)) { - pTarget->WWPN = fcDevicePage.WWPN; - pTarget->WWNN = fcDevicePage.WWNN; - - dsprintk((MYIOC_s_INFO_FMT -- " bus=%d id=%d is WWPN = %08x%08x, WWNN = %08x%08x\n", -- ioc->name, pTarget->bus, pTarget->id, -+ " target %d is WWPN = %08x%08x, WWNN = %08x%08x\n", -+ hd->ioc->name, pTarget->target_id, - le32_to_cpu(fcDevicePage.WWPN.High), - le32_to_cpu(fcDevicePage.WWPN.Low), - le32_to_cpu(fcDevicePage.WWNN.High), -@@ -3147,19 +2877,19 @@ mptscsih_slave_configure(struct scsi_dev - device->inquiry, device->inquiry_len ); - mptscsih_change_queue_depth(device, MPT_SCSI_CMD_PER_DEV_HIGH); - -- dinitprintk((MYIOC_s_INFO_FMT -+ dsprintk((MYIOC_s_INFO_FMT - "Queue depth=%d, tflags=%x\n", -- ioc->name, device->queue_depth, pTarget->tflags)); -+ hd->ioc->name, device->queue_depth, pTarget->tflags)); - -- dinitprintk((MYIOC_s_INFO_FMT -+ dsprintk((MYIOC_s_INFO_FMT - "negoFlags=%x, maxOffset=%x, SyncFactor=%x\n", -- ioc->name, pTarget->negoFlags, pTarget->maxOffset, pTarget->minSyncFactor)); -+ hd->ioc->name, pTarget->negoFlags, pTarget->maxOffset, pTarget->minSyncFactor)); - - slave_configure_exit: - -- dinitprintk((MYIOC_s_INFO_FMT -+ dsprintk((MYIOC_s_INFO_FMT - "tagged %d, simple %d, ordered %d\n", -- ioc->name,device->tagged_supported, device->simple_tags, -+ hd->ioc->name,device->tagged_supported, device->simple_tags, - device->ordered_tags)); - - return 0; -@@ -3220,20 +2950,16 @@ mptscsih_poll(struct scsi_device *sdev) - static void - mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply) - { -- MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - SCSIIORequest_t *pReq; - u32 sense_count = le32_to_cpu(pScsiReply->SenseCount); -- int bus, id; -+ int target; - - /* Get target structure - */ - pReq = (SCSIIORequest_t *) mf; -- bus = (int) pReq->Bus; -- id = (int) pReq->TargetID; -- pMptTarget = ioc->Target_List[bus]; -- pTarget = pMptTarget->Target[id]; -+ target = (int) pReq->TargetID; -+ pTarget = hd->Targets[target]; - - if (sense_count) { - u8 *sense_data; -@@ -3241,15 +2967,15 @@ mptscsih_copy_sense_data(struct scsi_cmn - - /* Copy the sense received into the scsi command block. */ - req_index = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -- sense_data = ((u8 *)ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC)); -+ sense_data = ((u8 *)hd->ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC)); - memcpy(sc->sense_buffer, sense_data, SNS_LEN(sc)); -- DBG_DUMP_SENSE_DATA(sense_data); - - /* Log SMART data (asc = 0x5D, non-IM case only) if required. - */ -- if ((ioc->events) && (ioc->eventTypes & (1 << MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE))) { -+ if ((hd->ioc->events) && (hd->ioc->eventTypes & (1 << MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE))) { - if ((sense_data[12] == 0x5D) && (pTarget->raidVolume == 0)) { - int idx; -+ MPT_ADAPTER *ioc = hd->ioc; - - idx = ioc->eventContext % MPTCTL_EVENT_LOG_SIZE; - ioc->events[idx].event = MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE; -@@ -3287,21 +3013,19 @@ mptscsih_copy_sense_data(struct scsi_cmn - } - } else { - dprintk((MYIOC_s_INFO_FMT "Hmmm... SenseData len=0! (?)\n", -- ioc->name)); -+ hd->ioc->name)); - } - } - --static int -+static u32 - SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc) - { - MPT_SCSI_HOST *hd; -- MPT_ADAPTER *ioc; - int i; - - hd = (MPT_SCSI_HOST *) sc->device->host->hostdata; - -- ioc = hd->ioc; -- for (i = 0; i < ioc->req_depth; i++) { -+ for (i = 0; i < hd->ioc->req_depth; i++) { - if (hd->ScsiLookup[i] == sc) { - return i; - } -@@ -3315,10 +3039,8 @@ int - mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) - { - MPT_SCSI_HOST *hd; -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *pTarget; - unsigned long flags; -- int bus, id, ii; -+ int ii; - int n; - - dtmprintk((KERN_INFO MYNAM -@@ -3338,8 +3060,11 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int - if (reset_phase == MPT_IOC_SETUP_RESET) { - dtmprintk((MYIOC_s_WARN_FMT "Setup-Diag Reset\n", ioc->name)); - -- mptscsih_flush_running_cmds(hd); -- dtmprintk((MYIOC_s_WARN_FMT "Setup-Diag Complete\n", ioc->name)); -+ /* Clean Up: -+ * 1. Set Hard Reset Pending Flag -+ * All new commands go to doneQ -+ */ -+ hd->resetPending = 1; - - } else if (reset_phase == MPT_IOC_PRE_RESET) { - dtmprintk((MYIOC_s_WARN_FMT "Pre-Diag Reset\n", ioc->name)); -@@ -3358,41 +3083,28 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int - * free these resources. - */ - if (hd->cmdPtr) { -- del_timer(&hd->InternalCmdTimer); -+ del_timer(&hd->timer); - mpt_free_msg_frame(ioc, hd->cmdPtr); -- hd->cmdPtr = NULL; - } -- /* 2d. If a task management has not completed, -- * free resources associated with this request. -- */ -- if (ioc->tmPtr) { -- del_timer(&ioc->TMtimer); -- mpt_free_msg_frame(ioc, ioc->tmPtr); -- ioc->tmPtr = NULL; -- } - -- dtmprintk((MYIOC_s_WARN_FMT "Pre-Reset complete.\n", ioc->name)); -+ dtmprintk((MYIOC_s_WARN_FMT "Pre-Reset complete.\n", ioc->name)); - - } else { - dtmprintk((MYIOC_s_WARN_FMT "Post-Diag Reset\n", ioc->name)); - - if (ioc->bus_type == FC) { - n = 0; -- for (bus = 0; bus < ioc->NumberOfBuses; bus++) { -- pMptTarget = ioc->Target_List[bus]; -- for (id=0; id < ioc->DevicesPerBus; id++) { -- pTarget = pMptTarget->Target[id]; -- if (pTarget) { -- dsprintk((MYIOC_s_INFO_FMT -- "bus=%d id=%d is known to be WWPN %08x%08x, WWNN %08x%08x\n", -- ioc->name, bus, id, -- le32_to_cpu(pTarget->WWPN.High), -- le32_to_cpu(pTarget->WWPN.Low), -- le32_to_cpu(pTarget->WWNN.High), -- le32_to_cpu(pTarget->WWNN.Low))); -- mptscsih_writeFCPortPage3(hd, bus, id); -- n++; -- } -+ for (ii=0; ii < ioc->sh->max_id; ii++) { -+ if (hd->Targets && hd->Targets[ii]) { -+ dsprintk((MYIOC_s_INFO_FMT -+ "target %d is known to be WWPN %08x%08x, WWNN %08x%08x\n", -+ ioc->name, ii, -+ le32_to_cpu(hd->Targets[ii]->WWPN.High), -+ le32_to_cpu(hd->Targets[ii]->WWPN.Low), -+ le32_to_cpu(hd->Targets[ii]->WWNN.High), -+ le32_to_cpu(hd->Targets[ii]->WWNN.Low))); -+ mptscsih_writeFCPortPage3(hd, ii); -+ n++; - } - } - -@@ -3408,7 +3120,7 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int - - /* ScsiLookup initialization - */ -- for (ii=0; ii < ioc->req_depth; ii++) -+ for (ii=0; ii < hd->ioc->req_depth; ii++) - hd->ScsiLookup[ii] = NULL; - - /* 2. Chain Buffer initialization -@@ -3417,19 +3129,17 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int - /* 4. Renegotiate to all devices, if SPI - */ - if (ioc->bus_type == SPI) { -- dnegoprintk((MYIOC_s_WARN_FMT "%s: writeSDP1: ALL_IDS USE_NVRAM\n", -- ioc->name, __FUNCTION__)); -- mpt_writeSDP1(ioc, 0, 0, (MPT_SCSICFG_ALL_IDS | MPT_SCSICFG_USE_NVRAM)); -- -+ dnegoprintk(("writeSDP1: ALL_IDS USE_NVRAM\n")); -+ mptscsih_writeSDP1(hd, 0, 0, MPT_SCSICFG_ALL_IDS | MPT_SCSICFG_USE_NVRAM); - } - - /* 5. Enable new commands to be posted - */ - spin_lock_irqsave(&ioc->FreeQlock, flags); - hd->tmPending = 0; -+ spin_unlock_irqrestore(&ioc->FreeQlock, flags); -+ hd->resetPending = 0; - hd->tmState = TM_STATE_NONE; -- spin_unlock_irqrestore(&ioc->FreeQlock, flags); -- - - /* 6. If there was an internal command, - * wake this process up. -@@ -3448,9 +3158,8 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int - /* 7. Set flag to force DV and re-read IOC Page 3 - */ - if (ioc->bus_type == SPI) { --ioc->spi_data.forceDv = MPT_SCSICFG_RELOAD_IOC_PG3; --ddvprintk(("Set reload IOC Pg3 Flag\n")); -- -+ ioc->spi_data.forceDv = MPT_SCSICFG_NEED_DV | MPT_SCSICFG_RELOAD_IOC_PG3; -+ ddvtprintk(("Set reload IOC Pg3 Flag\n")); - } - - dtmprintk((MYIOC_s_WARN_FMT "Post-Reset complete.\n", ioc->name)); -@@ -3468,13 +3177,9 @@ mptscsih_event_process(MPT_ADAPTER *ioc, - { - MPT_SCSI_HOST *hd; - u8 event = le32_to_cpu(pEvReply->Event) & 0xFF; -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *pTarget; -- int physDiskNum, bus, id; -- -- devtprintk((MYIOC_s_WARN_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", -- ioc->name, event)); - -+ devtprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", -+ ioc->name, event)); - - if (ioc->sh == NULL || - ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL)) -@@ -3508,53 +3213,16 @@ mptscsih_event_process(MPT_ADAPTER *ioc, - #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION - case MPI_EVENT_INTEGRATED_RAID: /* 0B */ - { -+ pMpiEventDataRaid_t pRaidEventData = -+ (pMpiEventDataRaid_t) pEvReply->Data; - --#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION -- pMpiEventDataRaid_t pRaidEventData = -- (pMpiEventDataRaid_t) &pEvReply->Data; -- --/* Domain Validation Needed */ -+ /* Domain Validation Needed */ - if (ioc->bus_type == SPI && - pRaidEventData->ReasonCode == - MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED) { -- SpiCfgData *pSpi; -- physDiskNum = pRaidEventData->PhysDiskNum; -- if (ioc->raid_data.pIocPg3) { -- id = ioc->raid_data.pIocPg3->PhysDisk[physDiskNum].PhysDiskID; -- bus = ioc->raid_data.pIocPg3->PhysDisk[physDiskNum].PhysDiskBus; -- pMptTarget = ioc->Target_List[bus]; -- pTarget = (VirtDevice *)pMptTarget->Target[id]; -- ddvprintk((KERN_WARNING "%s: Raid Event: DV Requested for PhysDiskNum=%d bus=%d id=%d pTarget=%p\n", -- ioc->name, physDiskNum, bus, id, pTarget)); -- } else { -- ddvprintk((KERN_WARNING "%s: Raid Event: DV Requested for PhysDiskNum=%d but raid_data.pIocPg3 is NULL\n", -- ioc->name, physDiskNum)); -- break; -- } -- pSpi = &ioc->spi_data; -- pSpi->dvStatus[id] |= (MPT_SCSICFG_PHYSDISK_DV_ONLY | -- MPT_SCSICFG_NEED_DV | -- MPT_SCSICFG_DV_NOT_DONE); -- -- if (pTarget == NULL) { -- ddvprintk((KERN_WARNING " Raid Event: DV Requested for PhysDiskNum=%d bus=%d id=%d but pTarget is NULL\n", -- physDiskNum, bus, id)); -- mptscsih_initTarget(hd, bus, id, 0, -- NULL, 0 ); -- pTarget = (VirtDevice *)pMptTarget->Target[id]; -- ddvprintk((KERN_WARNING "%s: Raid Event: DV Requested for PhysDiskNum=%d bus=%d id=%d pTarget%p now\n", -- ioc->name, physDiskNum, bus, id, pTarget)); -- } -- pSpi->forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3; -- ddvprintk((KERN_WARNING "%s: Raid Event: Scheduling DV for PhysDiskNum=%d bus=%d id=%d pTarget=%p\n", -- ioc->name, physDiskNum, bus, id, pTarget)); -- INIT_WORK(&pTarget->dvTask, mptscsih_domainValidation, (void *) pTarget); -- schedule_work(&pTarget->dvTask); -- ddvprintk((KERN_WARNING "%s: Raid Event: DV Scheduled for PhysDiskNum=%d bus=%d id=%d pTarget=%p\n", -- ioc->name, physDiskNum, bus, id, pTarget)); --#endif - -- } -+ mptscsih_set_dvflags_raid(hd, pRaidEventData->PhysDiskNum); -+ } - break; - } - #endif -@@ -3575,8 +3243,8 @@ mptscsih_event_process(MPT_ADAPTER *ioc, - /* - * mptscsih_initTarget - Target, LUN alloc/free functionality. - * @hd: Pointer to MPT_SCSI_HOST structure -- * @bus: Bus number (?) -- * @id: SCSI target id -+ * @bus_id: Bus number (?) -+ * @target_id: SCSI target id - * @lun: SCSI LUN id - * @data: Pointer to data - * @dlen: Number of INQUIRY bytes -@@ -3589,17 +3257,16 @@ mptscsih_event_process(MPT_ADAPTER *ioc, - * - */ - static void --mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus, int id, u8 lun, char *data, int dlen) -+mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus_id, int target_id, u8 lun, char *data, int dlen) - { - int indexed_lun, lun_index; - MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - SpiCfgData *pSpi; - char data_56; - -- dinitprintk((MYIOC_s_WARN_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", -- ioc->name, bus, id, lun, hd)); -+ dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", -+ ioc->name, bus_id, target_id, lun, hd)); - - /* - * If the peripheral qualifier filter is enabled then if the target reports a 0x1 -@@ -3610,71 +3277,29 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, i - * around a bug in th emid-layer in some distributions in which the mid-layer will - * continue to try to communicate to the LUN and evntually create a dummy LUN. - */ -- if (hd->mpt_pq_filter && dlen && (data[0] & 0x20)) -+ if (hd->mpt_pq_filter && dlen && (data[0] & 0xE0)) - data[0] |= 0x40; - - /* Is LUN supported? If so, upper 2 bits will be 0 - * in first byte of inquiry data. - */ -+ if (data[0] & 0xe0) -+ return; - -- if (dlen && (data[0] & 0xe0)) -- return; -- -- pMptTarget = ioc->Target_List[bus]; -- pTarget = pMptTarget->Target[id]; -- if (pTarget == NULL) { -- dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d pTarget is NULL\n" --, -- ioc->name, bus, id, lun)); -- pTarget = kmalloc(sizeof(VirtDevice), GFP_KERNEL); -- if (!pTarget) { -- printk(MYIOC_s_ERR_FMT "initTarget kmalloc(%zd) FAILED!\n", -- ioc->name, sizeof(VirtDevice)); -- return; -- } -- -- memset(pTarget, 0, sizeof(VirtDevice)); -- if (ioc->bus_type != SPI) -- pTarget->tflags = MPT_TARGET_FLAGS_Q_YES; -- pTarget->ioc = ioc; -- pTarget->id = id; -- pTarget->bus = bus; -- pTarget->last_lun = MPT_LAST_LUN; -- pTarget->raidVolume = 0; -- pMptTarget->Target[id] = pTarget; -- if (ioc->bus_type == SPI) { -- if (ioc->raid_data.isRaid & (1 << id)) { -- pTarget->raidVolume = 1; -- ddvprintk((KERN_INFO -- "RAID Volume @ id %d\n", id)); -- } -- } -- -+ if ((pTarget = hd->Targets[target_id]) == NULL) { - return; --} -- dinitprintk((MYIOC_s_WARN_FMT "initTarget bus=%d id=%d lun=%d pTarget=%p\n", -- ioc->name, bus, id, lun, pTarget)); -- pSpi = &ioc->spi_data; -- pTarget->ioc = ioc; -- pTarget->tflags &= ~MPT_TARGET_FLAGS_DELETED; -+ } - - lun_index = (lun >> 5); /* 32 luns per lun_index */ - indexed_lun = (lun % 32); - pTarget->luns[lun_index] |= (1 << indexed_lun); - -- if (!(pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY)) { -- if ( dlen > 8 ) { -- memcpy (pTarget->inq_data, data, 8); -- } else { -- memcpy (pTarget->inq_data, data, dlen); -- } -- } - if (ioc->bus_type == SPI) { - if ((data[0] == TYPE_PROCESSOR) && (ioc->spi_data.Saf_Te)) { - /* Treat all Processors as SAF-TE if - * command line option is set */ - pTarget->tflags |= MPT_TARGET_FLAGS_SAF_TE_ISSUED; -- mptscsih_writeIOCPage4(hd, id, bus); -+ mptscsih_writeIOCPage4(hd, target_id, bus_id); - }else if ((data[0] == TYPE_PROCESSOR) && - !(pTarget->tflags & MPT_TARGET_FLAGS_SAF_TE_ISSUED )) { - if ( dlen > 49 ) { -@@ -3686,17 +3311,29 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, i - data[48] == 'T' && - data[49] == 'E' ) { - pTarget->tflags |= MPT_TARGET_FLAGS_SAF_TE_ISSUED; -- mptscsih_writeIOCPage4(hd, id, bus); -+ mptscsih_writeIOCPage4(hd, target_id, bus_id); - } - } - } --data_56 = 0x00; /* Default to no Ultra 160 or 320 capabilities if Inq data length is < 57 */ -- -- - if (!(pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY)) { -+ if ( dlen > 8 ) { -+ memcpy (pTarget->inq_data, data, 8); -+ } else { -+ memcpy (pTarget->inq_data, data, dlen); -+ } -+ -+ /* If have not done DV, set the DV flag. -+ */ -+ pSpi = &ioc->spi_data; -+ if ((data[0] == TYPE_TAPE) || (data[0] == TYPE_PROCESSOR)) { -+ if (pSpi->dvStatus[target_id] & MPT_SCSICFG_DV_NOT_DONE) -+ pSpi->dvStatus[target_id] |= MPT_SCSICFG_NEED_DV; -+ } - - pTarget->tflags |= MPT_TARGET_FLAGS_VALID_INQUIRY; - -+ -+ data_56 = 0x00; /* Default to no Ultra 160 or 320 capabilities if Inq data length is < 57 */ - if (dlen > 56) { - if ( (!(pTarget->tflags & MPT_TARGET_FLAGS_VALID_56))) { - /* Update the target capabilities -@@ -3705,6 +3342,7 @@ data_56 = 0x00; /* Default to no Ultra - pTarget->tflags |= MPT_TARGET_FLAGS_VALID_56; - } - } -+ mptscsih_setTargetNegoParms(hd, pTarget, data_56); - } else { - /* Initial Inquiry may not request enough data bytes to - * obtain byte 57. DV will; if target doesn't return -@@ -3715,40 +3353,25 @@ data_56 = 0x00; /* Default to no Ultra - */ - data_56 = data[56]; - pTarget->tflags |= MPT_TARGET_FLAGS_VALID_56; -+ mptscsih_setTargetNegoParms(hd, pTarget, data_56); - } - } - } -- --mptscsih_setTargetNegoParms(hd, pTarget, data_56); --if (pSpi->dvStatus[id] & MPT_SCSICFG_NEED_DV) { -- ddvprintk((MYIOC_s_WARN_FMT "%s: DV Scheduled for non-PhysDisk id %d\n", -- ioc->name, __FUNCTION__, id)); --INIT_WORK(&pTarget->dvTask, mptscsih_domainValidation, (void *) pTarget); --schedule_work(&pTarget->dvTask); -- } -- } else { -- pTarget->tflags |= MPT_TARGET_FLAGS_VALID_INQUIRY; -- if (ioc->bus_type == SAS) { -- if ( (pTarget->inq_data[7] & 0x02) == 0) { -- pTarget->tflags &= ~MPT_TARGET_FLAGS_Q_YES; -- } -- if ((data[0] == TYPE_TAPE)) { -- if (ioc->facts.IOCCapabilities & -- MPI_IOCFACTS_CAPABILITY_TLR ) { -- if ((pTarget->tflags & MPT_TARGET_FLAGS_TLR_DONE) == 0){ -- if ( data[8] == 'H' && -- data[9] == 'P' && -- data[10] == ' ' && -- data[11] == ' ' && -- data[12] == ' ' && -- data[13] == ' ' && -- data[14] == ' ' && -- data[15] == ' ' ) { -- mpt_IssueTLR(hd, pTarget); -- pTarget->tflags |= MPT_TARGET_FLAGS_TLR_DONE; -- -- } -- -+ } else if (ioc->bus_type == SAS) { -+ if ((data[0] == TYPE_TAPE)) { -+ if (ioc->facts.IOCCapabilities & -+ MPI_IOCFACTS_CAPABILITY_TLR ) { -+ if ((pTarget->tflags & MPT_TARGET_FLAGS_TLR_DONE) == 0) { -+ if ( data[8] == 'H' && -+ data[9] == 'P' && -+ data[10] == ' ' && -+ data[11] == ' ' && -+ data[12] == ' ' && -+ data[13] == ' ' && -+ data[14] == ' ' && -+ data[15] == ' ' ) { -+ mpt_IssueTLR(hd, pTarget); -+ pTarget->tflags |= MPT_TARGET_FLAGS_TLR_DONE; - } - } - } -@@ -3760,12 +3383,11 @@ schedule_work(&pTarget->dvTask); - static void - mpt_IssueTLR(MPT_SCSI_HOST *hd, VirtDevice *pTarget) - { -- MPT_ADAPTER *ioc = hd->ioc; - INTERNAL_CMD iocmd; - int lun, indexed_lun, lun_index; - -- iocmd.id = pTarget->id; -- iocmd.bus = pTarget->bus; -+ iocmd.id = pTarget->target_id; -+ iocmd.bus = pTarget->bus_id; - for (lun=0; lun <= MPT_LAST_LUN; lun++) { - /* If LUN present, issue the command - */ -@@ -3777,7 +3399,7 @@ mpt_IssueTLR(MPT_SCSI_HOST *hd, VirtDevi - } - } - printk(MYIOC_s_INFO_FMT "mpt_IssueTLR: Unable find a lun on id=%d\n", -- ioc->name, iocmd.id); -+ hd->ioc->name, iocmd.id); - return; - issueTLR: - iocmd.flags = 0; -@@ -3790,7 +3412,7 @@ issueTLR: - if (mptscsih_do_cmd(hd, &iocmd) < 0) { - if (mptscsih_do_cmd(hd, &iocmd) < 0) { - printk(MYIOC_s_INFO_FMT "Unable to set TLR on id=%d\n", -- ioc->name, iocmd.id); -+ hd->ioc->name, iocmd.id); - } - } - } -@@ -3802,14 +3424,12 @@ issueTLR: - * - */ - static void --mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *pTarget, char byte56) -+mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *target, char byte56) - { -- MPT_ADAPTER *ioc = hd->ioc; -- SpiCfgData *pspi_data = &ioc->spi_data; -- int id = (int) pTarget->id; -+ SpiCfgData *pspi_data = &hd->ioc->spi_data; -+ int id = (int) target->target_id; - int nvram; -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *loop_pTarget; -+ VirtDevice *pTarget; - int ii; - u8 width = MPT_NARROW; - u8 factor = MPT_ASYNC; -@@ -3817,36 +3437,31 @@ mptscsih_setTargetNegoParms(MPT_SCSI_HOS - u8 version, nfactor; - u8 noQas = 1; - -- pTarget->negoFlags = pspi_data->noQas; --ddvprintk((KERN_INFO "Command-line QAS setting sets noQas=%02x on id=%d!\n", -- pspi_data->noQas, id)); -+ target->negoFlags = pspi_data->noQas; - --/* noQas == 0 => device supports QAS. Need byte 56 of Inq to determine -+ ddvtprintk((KERN_INFO "Command-line QAS setting sets noQas=%02x on id=%d!\n", -+ pspi_data->noQas, id)); -+ /* noQas == 0 => device supports QAS. Need byte 56 of Inq to determine - * support. If available, default QAS to off and allow enabling. - * If not available, default QAS to on, turn off for non-disks. - */ - - /* Set flags based on Inquiry data - */ -- version = pTarget->inq_data[2] & 0x07; -+ version = target->inq_data[2] & 0x07; - if (version < 2) { - width = 0; - factor = MPT_ULTRA2; - offset = pspi_data->maxSyncOffset; -- pTarget->tflags &= ~MPT_TARGET_FLAGS_Q_YES; -+ target->tflags &= ~MPT_TARGET_FLAGS_Q_YES; - } else { -- if (pTarget->inq_data[7] & 0x20) { -+ if (target->inq_data[7] & 0x20) { - width = 1; - } - -- if (pTarget->inq_data[7] & 0x02) -- pTarget->tflags |= MPT_TARGET_FLAGS_Q_YES; -- else -- pTarget->tflags &= ~MPT_TARGET_FLAGS_Q_YES; -- -- if (pTarget->inq_data[7] & 0x10) { -+ if (target->inq_data[7] & 0x10) { - factor = pspi_data->minSyncFactor; -- if (pTarget->tflags & MPT_TARGET_FLAGS_VALID_56) { -+ if (target->tflags & MPT_TARGET_FLAGS_VALID_56) { - /* bits 2 & 3 show Clocking support */ - if ((byte56 & 0x0C) == 0) - factor = MPT_ULTRA2; -@@ -3857,17 +3472,17 @@ ddvprintk((KERN_INFO "Command-line QAS s - factor = MPT_ULTRA320; - if (byte56 & 0x02) - { -- ddvprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id)); -+ ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id)); - noQas = 0; - } -- if (pTarget->inq_data[0] == TYPE_TAPE) { -+ if (target->inq_data[0] == TYPE_TAPE) { - if (byte56 & 0x01) -- pTarget->negoFlags |= MPT_TAPE_NEGO_IDP; -+ target->negoFlags |= MPT_TAPE_NEGO_IDP; - } - } - } - } else { -- ddvprintk((KERN_INFO "Ultra 80 on id=%d due to ~TARGET_FLAGS_VALID_56!\n", id)); -+ ddvtprintk((KERN_INFO "Ultra 80 on id=%d due to ~TARGET_FLAGS_VALID_56!\n", id)); - factor = MPT_ULTRA2; - } - -@@ -3879,7 +3494,7 @@ ddvprintk((KERN_INFO "Command-line QAS s - * bit 1 QAS support, non-raid only - * bit 0 IU support - */ -- if (pTarget->raidVolume == 1) { -+ if (target->raidVolume == 1) { - noQas = 0; - } - } else { -@@ -3888,6 +3503,9 @@ ddvprintk((KERN_INFO "Command-line QAS s - } - } - -+ if ( (target->inq_data[7] & 0x02) == 0) { -+ target->tflags &= ~MPT_TARGET_FLAGS_Q_YES; -+ } - - /* Update tflags based on NVRAM settings. (SCSI only) - */ -@@ -3926,43 +3544,41 @@ ddvprintk((KERN_INFO "Command-line QAS s - - /* Save the data to the target structure. - */ -- pTarget->minSyncFactor = factor; -- pTarget->maxOffset = offset; -- pTarget->maxWidth = width; -+ target->minSyncFactor = factor; -+ target->maxOffset = offset; -+ target->maxWidth = width; - -- pTarget->tflags |= MPT_TARGET_FLAGS_VALID_NEGO; -+ target->tflags |= MPT_TARGET_FLAGS_VALID_NEGO; - - /* Disable unused features. - */ - if (!width) -- pTarget->negoFlags |= MPT_TARGET_NO_NEGO_WIDE; -+ target->negoFlags |= MPT_TARGET_NO_NEGO_WIDE; - - if (!offset) -- pTarget->negoFlags |= MPT_TARGET_NO_NEGO_SYNC; -+ target->negoFlags |= MPT_TARGET_NO_NEGO_SYNC; - - if ( factor > MPT_ULTRA320 ) - noQas = 0; - - /* GEM, processor WORKAROUND - */ -- if ((pTarget->inq_data[0] == TYPE_PROCESSOR) || (pTarget->inq_data[0] > 0x08)) { -- pTarget->negoFlags |= (MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC); -+ if ((target->inq_data[0] == TYPE_PROCESSOR) || (target->inq_data[0] > 0x08)) { -+ target->negoFlags |= (MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC); - pspi_data->dvStatus[id] |= MPT_SCSICFG_BLK_NEGO; - } else { - if (noQas && (pspi_data->noQas == 0)) { - pspi_data->noQas |= MPT_TARGET_NO_NEGO_QAS; -- pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS; -+ target->negoFlags |= MPT_TARGET_NO_NEGO_QAS; - - /* Disable QAS in a mixed configuration case - */ --ddvprintk((KERN_INFO "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id)); - -- pMptTarget = ioc->Target_List[0]; -+ ddvtprintk((KERN_INFO "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id)); - for (ii = 0; ii < id; ii++) { -- loop_pTarget = pMptTarget->Target[id]; -- if ((loop_pTarget)) { -- loop_pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS; -- mpt_writeSDP1(ioc, 0, ii, loop_pTarget->negoFlags); -+ if ( (pTarget = hd->Targets[ii]) ) { -+ pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS; -+ mptscsih_writeSDP1(hd, 0, ii, pTarget->negoFlags); - } - } - } -@@ -3970,33 +3586,115 @@ ddvprintk((KERN_INFO "Disabling QAS due - - /* Write SDP1 on this I/O to this target */ - if (pspi_data->dvStatus[id] & MPT_SCSICFG_NEGOTIATE) { -- dnegoprintk((KERN_INFO "MPT_SCSICFG_NEGOTIATE on id=%d!\n", id)); -- /* First IO to this device; NEED_DV will cause async/narrow */ -- mpt_writeSDP1(ioc, 0, id, 0); -+ ddvtprintk((KERN_INFO "MPT_SCSICFG_NEGOTIATE on id=%d!\n", id)); -+ mptscsih_writeSDP1(hd, 0, id, hd->negoNvram); - pspi_data->dvStatus[id] &= ~MPT_SCSICFG_NEGOTIATE; - } else if (pspi_data->dvStatus[id] & MPT_SCSICFG_BLK_NEGO) { -- dnegoprintk((KERN_INFO "MPT_SCSICFG_BLK_NEGO on id=%d!\n", id)); -- mpt_writeSDP1(ioc, 0, id, MPT_SCSICFG_BLK_NEGO); -+ ddvtprintk((KERN_INFO "MPT_SCSICFG_BLK_NEGO on id=%d!\n", id)); -+ mptscsih_writeSDP1(hd, 0, id, MPT_SCSICFG_BLK_NEGO); - pspi_data->dvStatus[id] &= ~MPT_SCSICFG_BLK_NEGO; - } - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* If DV disabled (negoNvram set to USE_NVARM) or if not LUN 0, return. -+ * Else set the NEED_DV flag after Read Capacity Issued (disks) -+ * or Mode Sense (cdroms). -+ * -+ * Tapes, initTarget will set this flag on completion of Inquiry command. -+ * Called only if DV_NOT_DONE flag is set -+ */ -+static void -+mptscsih_set_dvflags(MPT_SCSI_HOST *hd, SCSIIORequest_t *pReq) -+{ -+ MPT_ADAPTER *ioc = hd->ioc; -+ u8 cmd; -+ SpiCfgData *pSpi; -+ -+ ddvtprintk((MYIOC_s_NOTE_FMT -+ " set_dvflags: id=%d lun=%d negoNvram=%x cmd=%x\n", -+ hd->ioc->name, pReq->TargetID, pReq->LUN[1], hd->negoNvram, pReq->CDB[0])); -+ -+ if ((pReq->LUN[1] != 0) || (hd->negoNvram != 0)) -+ return; -+ -+ cmd = pReq->CDB[0]; -+ -+ if ((cmd == READ_CAPACITY) || (cmd == MODE_SENSE)) { -+ pSpi = &ioc->spi_data; -+ if ((ioc->raid_data.isRaid & (1 << pReq->TargetID)) && ioc->raid_data.pIocPg3) { -+ /* Set NEED_DV for all hidden disks -+ */ -+ Ioc3PhysDisk_t *pPDisk = ioc->raid_data.pIocPg3->PhysDisk; -+ int numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks; -+ -+ while (numPDisk) { -+ pSpi->dvStatus[pPDisk->PhysDiskID] |= MPT_SCSICFG_NEED_DV; -+ ddvtprintk(("NEED_DV set for phys disk id %d\n", pPDisk->PhysDiskID)); -+ pPDisk++; -+ numPDisk--; -+ } -+ } -+ pSpi->dvStatus[pReq->TargetID] |= MPT_SCSICFG_NEED_DV; -+ ddvtprintk(("NEED_DV set for visible disk id %d\n", pReq->TargetID)); -+ } -+} -+ -+/* mptscsih_raid_set_dv_flags() -+ * -+ * New or replaced disk. Set DV flag and schedule DV. -+ */ -+static void -+mptscsih_set_dvflags_raid(MPT_SCSI_HOST *hd, int id) -+{ -+ MPT_ADAPTER *ioc = hd->ioc; -+ SpiCfgData *pSpi = &ioc->spi_data; -+ Ioc3PhysDisk_t *pPDisk; -+ int numPDisk; -+ -+ if (hd->negoNvram != 0) -+ return; -+ -+ ddvtprintk(("DV requested for phys disk id %d\n", id)); -+ if (ioc->raid_data.pIocPg3) { -+ pPDisk = ioc->raid_data.pIocPg3->PhysDisk; -+ numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks; -+ while (numPDisk) { -+ if (id == pPDisk->PhysDiskNum) { -+ pSpi->dvStatus[pPDisk->PhysDiskID] = -+ (MPT_SCSICFG_NEED_DV | MPT_SCSICFG_DV_NOT_DONE); -+ pSpi->forceDv = MPT_SCSICFG_NEED_DV; -+ ddvtprintk(("NEED_DV set for phys disk id %d\n", -+ pPDisk->PhysDiskID)); -+ break; -+ } -+ pPDisk++; -+ numPDisk--; -+ } -+ -+ if (numPDisk == 0) { -+ /* The physical disk that needs DV was not found -+ * in the stored IOC Page 3. The driver must reload -+ * this page. DV routine will set the NEED_DV flag for -+ * all phys disks that have DV_NOT_DONE set. -+ */ -+ pSpi->forceDv = MPT_SCSICFG_NEED_DV | MPT_SCSICFG_RELOAD_IOC_PG3; -+ ddvtprintk(("phys disk %d not found. Setting reload IOC Pg3 Flag\n",id)); -+ } -+ } -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* - * If no Target, bus reset on 1st I/O. Set the flag to - * prevent any future negotiations to this device. - */ - static void --mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int id) -+mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int target_id) - { -- MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; -- VirtDevice *pTarget; - -- pMptTarget = ioc->Target_List[0]; -- pTarget = pMptTarget->Target[id]; -- if (pTarget == NULL) -- ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_BLK_NEGO; -+ if (hd->Targets[target_id] == NULL) -+ hd->ioc->spi_data.dvStatus[target_id] |= MPT_SCSICFG_BLK_NEGO; - - return; - } -@@ -4006,9 +3704,266 @@ mptscsih_no_negotiate(MPT_SCSI_HOST *hd, - * SCSI Config Page functionality ... - */ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* mptscsih_setDevicePage1Flags - add Requested and Configuration fields flags -+ * based on width, factor and offset parameters. -+ * @width: bus width -+ * @factor: sync factor -+ * @offset: sync offset -+ * @requestedPtr: pointer to requested values (updated) -+ * @configurationPtr: pointer to configuration values (updated) -+ * @flags: flags to block WDTR or SDTR negotiation -+ * -+ * Return: None. -+ * -+ * Remark: Called by writeSDP1 and _dv_params -+ */ -+static void -+mptscsih_setDevicePage1Flags (u8 width, u8 factor, u8 offset, int *requestedPtr, int *configurationPtr, u8 flags) -+{ -+ u8 nowide = flags & MPT_TARGET_NO_NEGO_WIDE; -+ u8 nosync = flags & MPT_TARGET_NO_NEGO_SYNC; -+ -+ *configurationPtr = 0; -+ *requestedPtr = width ? MPI_SCSIDEVPAGE1_RP_WIDE : 0; -+ *requestedPtr |= (offset << 16) | (factor << 8); -+ -+ if (width && offset && !nowide && !nosync) { -+ if (factor < MPT_ULTRA160) { -+ *requestedPtr |= (MPI_SCSIDEVPAGE1_RP_IU + MPI_SCSIDEVPAGE1_RP_DT); -+ if ((flags & MPT_TARGET_NO_NEGO_QAS) == 0) -+ *requestedPtr |= MPI_SCSIDEVPAGE1_RP_QAS; -+ if (flags & MPT_TAPE_NEGO_IDP) -+ *requestedPtr |= 0x08000000; -+ } else if (factor < MPT_ULTRA2) { -+ *requestedPtr |= MPI_SCSIDEVPAGE1_RP_DT; -+ } -+ } -+ -+ if (nowide) -+ *configurationPtr |= MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED; -+ -+ if (nosync) -+ *configurationPtr |= MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED; -+ -+ return; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -+/* mptscsih_writeSDP1 - write SCSI Device Page 1 -+ * @hd: Pointer to a SCSI Host Strucutre -+ * @portnum: IOC port number -+ * @target_id: writeSDP1 for single ID -+ * @flags: MPT_SCSICFG_ALL_IDS, MPT_SCSICFG_USE_NVRAM, MPT_SCSICFG_BLK_NEGO -+ * -+ * Return: -EFAULT if read of config page header fails -+ * or 0 if success. -+ * -+ * Remark: If a target has been found, the settings from the -+ * target structure are used, else the device is set -+ * to async/narrow. -+ * -+ * Remark: Called during init and after a FW reload. -+ * Remark: We do not wait for a return, write pages sequentially. -+ */ -+static int -+mptscsih_writeSDP1(MPT_SCSI_HOST *hd, int portnum, int target_id, int flags) -+{ -+ MPT_ADAPTER *ioc = hd->ioc; -+ Config_t *pReq; -+ SCSIDevicePage1_t *pData; -+ VirtDevice *pTarget; -+ MPT_FRAME_HDR *mf; -+ dma_addr_t dataDma; -+ u16 req_idx; -+ u32 frameOffset; -+ u32 requested, configuration, flagsLength; -+ int ii, nvram; -+ int id = 0, maxid = 0; -+ u8 width; -+ u8 factor; -+ u8 offset; -+ u8 bus = 0; -+ u8 negoFlags; -+ u8 maxwidth, maxoffset, maxfactor; -+ -+ if (ioc->spi_data.sdp1length == 0) -+ return 0; -+ -+ if (flags & MPT_SCSICFG_ALL_IDS) { -+ id = 0; -+ maxid = ioc->sh->max_id - 1; -+ } else if (ioc->sh) { -+ id = target_id; -+ maxid = min_t(int, id, ioc->sh->max_id - 1); -+ } -+ -+ for (; id <= maxid; id++) { -+ -+ if (id == ioc->pfacts[portnum].PortSCSIID) -+ continue; -+ -+ /* Use NVRAM to get adapter and target maximums -+ * Data over-riden by target structure information, if present -+ */ -+ maxwidth = ioc->spi_data.maxBusWidth; -+ maxoffset = ioc->spi_data.maxSyncOffset; -+ maxfactor = ioc->spi_data.minSyncFactor; -+ if (ioc->spi_data.nvram && (ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { -+ nvram = ioc->spi_data.nvram[id]; -+ -+ if (maxwidth) -+ maxwidth = nvram & MPT_NVRAM_WIDE_DISABLE ? 0 : 1; -+ -+ if (maxoffset > 0) { -+ maxfactor = (nvram & MPT_NVRAM_SYNC_MASK) >> 8; -+ if (maxfactor == 0) { -+ /* Key for async */ -+ maxfactor = MPT_ASYNC; -+ maxoffset = 0; -+ } else if (maxfactor < ioc->spi_data.minSyncFactor) { -+ maxfactor = ioc->spi_data.minSyncFactor; -+ } -+ } else -+ maxfactor = MPT_ASYNC; -+ } -+ -+ /* Set the negotiation flags. -+ */ -+ negoFlags = ioc->spi_data.noQas; -+ if (!maxwidth) -+ negoFlags |= MPT_TARGET_NO_NEGO_WIDE; -+ -+ if (!maxoffset) -+ negoFlags |= MPT_TARGET_NO_NEGO_SYNC; -+ -+ if (flags & MPT_SCSICFG_USE_NVRAM) { -+ width = maxwidth; -+ factor = maxfactor; -+ offset = maxoffset; -+ } else { -+ width = 0; -+ factor = MPT_ASYNC; -+ offset = 0; -+ //negoFlags = 0; -+ //negoFlags = MPT_TARGET_NO_NEGO_SYNC; -+ } -+ -+ /* If id is not a raid volume, get the updated -+ * transmission settings from the target structure. -+ */ -+ if ( (pTarget = hd->Targets[id]) && !pTarget->raidVolume) { -+ width = pTarget->maxWidth; -+ factor = pTarget->minSyncFactor; -+ offset = pTarget->maxOffset; -+ negoFlags |= pTarget->negoFlags; -+ } -+ -+#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION -+ /* Force to async and narrow if DV has not been executed -+ * for this ID -+ */ -+ if ((hd->ioc->spi_data.dvStatus[id] & MPT_SCSICFG_DV_NOT_DONE) != 0) { -+ width = 0; -+ factor = MPT_ASYNC; -+ offset = 0; -+ } -+#endif -+ -+ if (flags & MPT_SCSICFG_BLK_NEGO) -+ negoFlags |= MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC; -+ -+ mptscsih_setDevicePage1Flags(width, factor, offset, -+ &requested, &configuration, negoFlags); -+ dnegoprintk(("writeSDP1: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", -+ target_id, width, factor, offset, negoFlags, requested, configuration)); -+ -+ /* Get a MF for this command. -+ */ -+ if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { -+ dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n", -+ ioc->name,__FUNCTION__)); -+ return -EAGAIN; -+ } -+ -+ ddvprintk((MYIOC_s_INFO_FMT "WriteSDP1 (mf=%p, id=%d, req=0x%x, cfg=0x%x)\n", -+ hd->ioc->name, mf, id, requested, configuration)); -+ -+ -+ /* Set the request and the data pointers. -+ * Request takes: 36 bytes (32 bit SGE) -+ * SCSI Device Page 1 requires 16 bytes -+ * 40 + 16 <= size of SCSI IO Request = 56 bytes -+ * and MF size >= 64 bytes. -+ * Place data at end of MF. -+ */ -+ pReq = (Config_t *)mf; -+ -+ req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -+ frameOffset = ioc->req_sz - sizeof(SCSIDevicePage1_t); -+ -+ pData = (SCSIDevicePage1_t *)((u8 *) mf + frameOffset); -+ dataDma = ioc->req_frames_dma + (req_idx * ioc->req_sz) + frameOffset; -+ -+ /* Complete the request frame (same for all requests). -+ */ -+ pReq->Action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; -+ pReq->Reserved = 0; -+ pReq->ChainOffset = 0; -+ pReq->Function = MPI_FUNCTION_CONFIG; -+ pReq->ExtPageLength = 0; -+ pReq->ExtPageType = 0; -+ pReq->MsgFlags = 0; -+ for (ii=0; ii < 8; ii++) { -+ pReq->Reserved2[ii] = 0; -+ } -+ pReq->Header.PageVersion = ioc->spi_data.sdp1version; -+ pReq->Header.PageLength = ioc->spi_data.sdp1length; -+ pReq->Header.PageNumber = 1; -+ pReq->Header.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; -+ pReq->PageAddress = cpu_to_le32(id | (bus << 8 )); -+ -+ /* Add a SGE to the config request. -+ */ -+ flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE | ioc->spi_data.sdp1length * 4; -+ -+ mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); -+ -+ /* Set up the common data portion -+ */ -+ pData->Header.PageVersion = pReq->Header.PageVersion; -+ pData->Header.PageLength = pReq->Header.PageLength; -+ pData->Header.PageNumber = pReq->Header.PageNumber; -+ pData->Header.PageType = pReq->Header.PageType; -+ pData->RequestedParameters = cpu_to_le32(requested); -+ pData->Reserved = 0; -+ pData->Configuration = cpu_to_le32(configuration); -+ -+ if ( pTarget ) { -+ if ( requested & MPI_SCSIDEVPAGE1_RP_IU ) { -+ pTarget->last_lun = MPT_LAST_LUN; -+ } else { -+ pTarget->last_lun = MPT_NON_IU_LAST_LUN; -+ } -+ dsprintk((MYIOC_s_INFO_FMT -+ "writeSDP1: last_lun=%d on id=%d\n", -+ ioc->name, pTarget->last_lun, id)); -+ } -+ -+ dprintk((MYIOC_s_INFO_FMT -+ "write SDP1: id %d pgaddr 0x%x req 0x%x config 0x%x\n", -+ ioc->name, id, (id | (bus<<8)), -+ requested, configuration)); -+ -+ mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); -+ } -+ -+ return 0; -+} -+ -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* mptscsih_writeIOCPage4 - write IOC Page 4 - * @hd: Pointer to a SCSI Host Structure -- * @id: write IOC Page4 for this ID & Bus -+ * @target_id: write IOC Page4 for this ID & Bus - * - * Return: -EAGAIN if unable to obtain a Message Frame - * or 0 if success. -@@ -4016,7 +3971,7 @@ mptscsih_no_negotiate(MPT_SCSI_HOST *hd, - * Remark: We do not wait for a return, write pages sequentially. - */ - static int --mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int id, int bus) -+mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int target_id, int bus) - { - MPT_ADAPTER *ioc = hd->ioc; - Config_t *pReq; -@@ -4060,10 +4015,10 @@ mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd - IOCPage4Ptr = ioc->spi_data.pIocPg4; - dataDma = ioc->spi_data.IocPg4_dma; - ii = IOCPage4Ptr->ActiveSEP++; -- IOCPage4Ptr->SEP[ii].SEPTargetID = id; -+ IOCPage4Ptr->SEP[ii].SEPTargetID = target_id; - IOCPage4Ptr->SEP[ii].SEPBus = bus; - pReq->Header = IOCPage4Ptr->Header; -- pReq->PageAddress = cpu_to_le32(id | (bus << 8 )); -+ pReq->PageAddress = cpu_to_le32(target_id | (bus << 8 )); - - /* Add a SGE to the config request. - */ -@@ -4074,7 +4029,7 @@ mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd - - dinitprintk((MYIOC_s_INFO_FMT - "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n", -- ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, bus)); -+ ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, target_id, bus)); - - mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); - -@@ -4116,9 +4071,6 @@ mptscsih_scandv_complete(MPT_ADAPTER *io - - hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; - -- del_timer(&hd->InternalCmdTimer); -- -- - if ((mf == NULL) || - (mf >= MPT_INDEX_2_MFPTR(ioc, ioc->req_depth))) { - printk(MYIOC_s_ERR_FMT -@@ -4127,18 +4079,19 @@ mptscsih_scandv_complete(MPT_ADAPTER *io - goto wakeup; - } - -+ del_timer(&hd->timer); - req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); - hd->ScsiLookup[req_idx] = NULL; - pReq = (SCSIIORequest_t *) mf; - - if (mf != hd->cmdPtr) { -- printk(MYIOC_s_WARN_FMT "ScanDvComplete (mf=%p,!= cmdPtr=%p, idx=%d)\n", -- ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx); -+ printk(MYIOC_s_WARN_FMT "ScanDvComplete (mf=%p, cmdPtr=%p, idx=%d)\n", -+ hd->ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx); - } - hd->cmdPtr = NULL; - -- ddvprintk((MYIOC_s_WARN_FMT "ScanDvComplete mf=%p,mr=%p,idx=%d\n", -- ioc->name, mf, mr, req_idx)); -+ ddvprintk((MYIOC_s_INFO_FMT "ScanDvComplete (mf=%p,mr=%p,idx=%d)\n", -+ hd->ioc->name, mf, mr, req_idx)); - - hd->pLocal = &hd->localReply; - hd->pLocal->scsiStatus = 0; -@@ -4156,9 +4109,10 @@ mptscsih_scandv_complete(MPT_ADAPTER *io - - status = le16_to_cpu(pReply->IOCStatus) & MPI_IOCSTATUS_MASK; - scsi_status = pReply->SCSIStatus; -- ddvprintk((MYIOC_s_WARN_FMT "%s: IOCStatus=%04xh SCSIState=%02xh SCSIStatus=%02xh IOCLogInfo=%08xh\n", -- ioc->name, __FUNCTION__, status, pReply->SCSIState, scsi_status, -- le32_to_cpu(pReply->IOCLogInfo))); -+ -+ ddvtprintk((KERN_NOTICE " IOCStatus=%04xh, SCSIState=%02xh, SCSIStatus=%02xh, IOCLogInfo=%08xh\n", -+ status, pReply->SCSIState, scsi_status, -+ le32_to_cpu(pReply->IOCLogInfo))); - - switch(status) { - -@@ -4203,14 +4157,13 @@ mptscsih_scandv_complete(MPT_ADAPTER *io - */ - completionCode = MPT_SCANDV_SENSE; - hd->pLocal->scsiStatus = scsi_status; -- sense_data = ((u8 *)ioc->sense_buf_pool + -+ sense_data = ((u8 *)hd->ioc->sense_buf_pool + - (req_idx * MPT_SENSE_BUFFER_ALLOC)); - - sz = min_t(int, pReq->SenseBufferLength, - SCSI_STD_SENSE_BYTES); - memcpy(hd->pLocal->sense, sense_data, sz); - -- DBG_DUMP_SENSE_DATA(sense_data); - ddvprintk((KERN_NOTICE " Check Condition, sense ptr %p\n", - sense_data)); - } else if (pReply->SCSIState & MPI_SCSI_STATE_AUTOSENSE_FAILED) { -@@ -4224,7 +4177,7 @@ mptscsih_scandv_complete(MPT_ADAPTER *io - else if (pReply->SCSIState & MPI_SCSI_STATE_TERMINATED) - completionCode = MPT_SCANDV_DID_RESET; - else if (scsi_status == MPI_SCSI_STATUS_BUSY) -- completionCode = MPT_SCANDV_BUSY; -+ completionCode = MPT_SCANDV_SOME_ERROR; - else { - completionCode = MPT_SCANDV_GOOD; - hd->pLocal->scsiStatus = scsi_status; -@@ -4243,9 +4196,9 @@ mptscsih_scandv_complete(MPT_ADAPTER *io - break; - - } /* switch(status) */ -- ddvprintk((MYIOC_s_WARN_FMT ": completionCode=%08xh\n", -- ioc->name, completionCode)); - -+ ddvtprintk((KERN_NOTICE " completionCode set to %08xh\n", -+ completionCode)); - } /* end of address reply case */ - - hd->pLocal->completion = completionCode; -@@ -4266,53 +4219,48 @@ wakeup: - } - - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ --/* mptscsih_InternalCmdTimer_expired - Call back for DV timer process. -+/* mptscsih_timer_expired - Call back for timer process. - * Used only for dv functionality. - * @data: Pointer to MPT_SCSI_HOST recast as an unsigned long - * - */ --void mptscsih_InternalCmdTimer_expired(unsigned long data) -+void -+mptscsih_timer_expired(unsigned long data) - { - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *) data; -- MPT_ADAPTER *ioc=hd->ioc; -- MPIHeader_t *cmd = (MPIHeader_t *)hd->cmdPtr; - -- ddvprintk((MYIOC_s_WARN_FMT "InternalCmdTimer_expired! cmdPtr=%p\n", -- ioc->name, cmd)); -+ ddvprintk((MYIOC_s_WARN_FMT "Timer Expired! Cmd %p\n", hd->ioc->name, hd->cmdPtr)); - -- hd->cmdPtr = NULL; -- if (cmd->Function == MPI_FUNCTION_SCSI_IO_REQUEST) { --#ifdef MPT_DEBUG_DV -- SCSIIORequest_t *pScsiReq = (SCSIIORequest_t *) cmd; -- int id = pScsiReq->TargetID; -- -- /* Desire to issue a task management request here. -- * TM requests MUST be single threaded. -- * If old eh code and no TM current, issue request. -- * If new eh code, do nothing. Wait for OS cmd timeout -- * for bus reset. -- */ -- ddvprintk((MYIOC_s_WARN_FMT "DV Cmd Timeout: id=%d CDB=%02x\n", -- ioc->name, id, pScsiReq->CDB[0])); --#endif -+ if (hd->cmdPtr) { -+ MPIHeader_t *cmd = (MPIHeader_t *)hd->cmdPtr; - -- /* -- * Wake up the original calling thread -- */ -- hd->pLocal = &hd->localReply; -- hd->pLocal->completion = MPT_SCANDV_FALLBACK; -- hd->scandv_wait_done = 1; -- wake_up(&hd->scandv_waitq); -- } else { -- /* Perform a FW reload */ -- if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0) { -- printk(MYIOC_s_WARN_FMT "InternalCmdTimer_expired: HardReset FAILED!\n", ioc->name); -- dfailprintk((MYIOC_s_ERR_FMT "InternalCmdTimer_expired: HardReset failed\n", ioc->name)); -+ if (cmd->Function == MPI_FUNCTION_SCSI_IO_REQUEST) { -+ /* Desire to issue a task management request here. -+ * TM requests MUST be single threaded. -+ * If old eh code and no TM current, issue request. -+ * If new eh code, do nothing. Wait for OS cmd timeout -+ * for bus reset. -+ */ -+ ddvtprintk((MYIOC_s_NOTE_FMT "DV Cmd Timeout: NoOp\n", hd->ioc->name)); - } else { -- ddvprintk((MYIOC_s_ERR_FMT "InternalCmdTimer_expired: HardReset succeeded\n", ioc->name)); -+ /* Perform a FW reload */ -+ if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0) { -+ printk(MYIOC_s_WARN_FMT "Firmware Reload FAILED!\n", hd->ioc->name); -+ } - } -+ } else { -+ /* This should NEVER happen */ -+ printk(MYIOC_s_WARN_FMT "Null cmdPtr!!!!\n", hd->ioc->name); - } -- ddvprintk((MYIOC_s_WARN_FMT "InternalCmdTimer_expired Complete!\n", ioc->name)); -+ -+ /* No more processing. -+ * TM call will generate an interrupt for SCSI TM Management. -+ * The FW will reply to all outstanding commands, callback will finish cleanup. -+ * Hard reset clean-up will free all resources. -+ */ -+ ddvprintk((MYIOC_s_WARN_FMT "Timer Expired Complete!\n", hd->ioc->name)); -+ -+ return; - } - - #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION -@@ -4331,23 +4279,22 @@ void mptscsih_InternalCmdTimer_expired(u - static int - mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io) - { -- MPT_ADAPTER *ioc = hd->ioc; - MpiRaidActionRequest_t *pReq; - MPT_FRAME_HDR *mf; - int in_isr; - - in_isr = in_interrupt(); - if (in_isr) { -- dfailprintk((MYIOC_s_WARN_FMT "Internal raid request not allowed in ISR context!\n", -- ioc->name)); -+ dprintk((MYIOC_s_WARN_FMT "Internal raid request not allowed in ISR context!\n", -+ hd->ioc->name)); - return -EPERM; - } - - /* Get and Populate a free Frame - */ -- if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { -+ if ((mf = mpt_get_msg_frame(hd->ioc->InternalCtx, hd->ioc)) == NULL) { - dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n", -- ioc->name,__FUNCTION__)); -+ hd->ioc->name,__FUNCTION__)); - return -EAGAIN; - } - pReq = (MpiRaidActionRequest_t *)mf; -@@ -4367,11 +4314,10 @@ mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 a - MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1); - - ddvprintk((MYIOC_s_INFO_FMT "RAID Volume action %x id %d\n", -- ioc->name, action, io->id)); -+ hd->ioc->name, action, io->id)); - - hd->pLocal = NULL; -- hd->InternalCmdTimer.data = (unsigned long) hd; -- hd->InternalCmdTimer.expires = jiffies + HZ*10; /* 10 second timeout */ -+ hd->timer.expires = jiffies + HZ*10; /* 10 second timeout */ - hd->scandv_wait_done = 0; - - /* Save cmd pointer, for resource free if timeout or -@@ -4379,8 +4325,8 @@ mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 a - */ - hd->cmdPtr = mf; - -- add_timer(&hd->InternalCmdTimer); -- mpt_put_msg_frame(ioc->InternalCtx, ioc, mf); -+ add_timer(&hd->timer); -+ mpt_put_msg_frame(hd->ioc->InternalCtx, hd->ioc, mf); - wait_event(hd->scandv_waitq, hd->scandv_wait_done); - - if ((hd->pLocal == NULL) || (hd->pLocal->completion != MPT_SCANDV_GOOD)) -@@ -4413,7 +4359,6 @@ mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 a - int - mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *io) - { -- MPT_ADAPTER *ioc = hd->ioc; - MPT_FRAME_HDR *mf; - SCSIIORequest_t *pScsiReq; - SCSIIORequest_t ReqCopy; -@@ -4426,8 +4371,8 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER - - in_isr = in_interrupt(); - if (in_isr) { -- dfailprintk((MYIOC_s_WARN_FMT "Internal SCSI IO request not allowed in ISR context!\n", -- ioc->name)); -+ dprintk((MYIOC_s_WARN_FMT "Internal SCSI IO request not allowed in ISR context!\n", -+ hd->ioc->name)); - return -EPERM; - } - -@@ -4542,16 +4487,14 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER - - default: - /* Error Case */ -- dfailprintk((MYIOC_s_WARN_FMT "%s,Unknown cmd=%02x!!\n", -- ioc->name,__FUNCTION__, cmd)); - return -EFAULT; - } - - /* Get and Populate a free Frame - */ -- if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { -+ if ((mf = mpt_get_msg_frame(hd->ioc->InternalCtx, hd->ioc)) == NULL) { - dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n", -- ioc->name,__FUNCTION__)); -+ hd->ioc->name,__FUNCTION__)); - return -EBUSY; - } - -@@ -4593,18 +4536,18 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER - if (cmd == REQUEST_SENSE) { - pScsiReq->Control = cpu_to_le32(dir | MPI_SCSIIO_CONTROL_UNTAGGED); - ddvprintk((MYIOC_s_INFO_FMT "Untagged! 0x%2x\n", -- ioc->name, cmd)); -+ hd->ioc->name, cmd)); - } - - for (ii=0; ii < 16; ii++) - pScsiReq->CDB[ii] = CDB[ii]; - - pScsiReq->DataLength = cpu_to_le32(io->size); -- pScsiReq->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma -+ pScsiReq->SenseBufferLowAddr = cpu_to_le32(hd->ioc->sense_buf_low_dma - + (my_idx * MPT_SENSE_BUFFER_ALLOC)); - -- ddvprintk((MYIOC_s_INFO_FMT "Sending Command 0x%x for (%d:%d:%d) mf=%p\n", -- ioc->name, cmd, io->bus, io->id, io->lun, pScsiReq)); -+ ddvprintk((MYIOC_s_INFO_FMT "Sending Command 0x%x for (%d:%d:%d)\n", -+ hd->ioc->name, cmd, io->bus, io->id, io->lun)); - - if (dir == MPI_SCSIIO_CONTROL_READ) { - mpt_add_sge((char *) &pScsiReq->SGL, -@@ -4630,8 +4573,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER - * set scandv_wait_done and call wake_up - */ - hd->pLocal = NULL; -- hd->InternalCmdTimer.data = (unsigned long) hd; -- hd->InternalCmdTimer.expires = jiffies + HZ*cmdTimeout; -+ hd->timer.expires = jiffies + HZ*cmdTimeout; - hd->scandv_wait_done = 0; - - /* Save cmd pointer, for resource free if timeout or -@@ -4639,8 +4581,8 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER - */ - hd->cmdPtr = mf; - -- add_timer(&hd->InternalCmdTimer); -- mpt_put_msg_frame(ioc->InternalCtx, ioc, mf); -+ add_timer(&hd->timer); -+ mpt_put_msg_frame(hd->ioc->InternalCtx, hd->ioc, mf); - wait_event(hd->scandv_waitq, hd->scandv_wait_done); - - if (hd->pLocal) { -@@ -4657,7 +4599,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER - rc = -EFAULT; - /* This should never happen. */ - ddvprintk((MYIOC_s_INFO_FMT "_do_cmd: Null pLocal!!!\n", -- ioc->name)); -+ hd->ioc->name)); - } - - return rc; -@@ -4678,7 +4620,6 @@ static int - mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, int portnum) - { - MPT_ADAPTER *ioc= hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - SCSIDevicePage1_t *pcfg1Data = NULL; - INTERNAL_CMD iocmd; -@@ -4690,6 +4631,7 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST - int lun; - int indexed_lun, lun_index; - int hostId = ioc->pfacts[portnum].PortSCSIID; -+ int max_id; - int requested, configuration, data; - int doConfig = 0; - u8 flags, factor; -@@ -4697,6 +4639,8 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST - dexitprintk((KERN_INFO MYNAM ": %s called\n", - __FUNCTION__)); - -+ max_id = ioc->sh->max_id - 1; -+ - /* Following parameters will not change - * in this routine. - */ -@@ -4733,11 +4677,10 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST - - /* loop through all devices on this port - */ -- while (bus < ioc->NumberOfBuses) { -+ while (bus < MPT_MAX_BUS) { - iocmd.bus = bus; - iocmd.id = id; -- pMptTarget = ioc->Target_List[bus]; -- pTarget = pMptTarget->Target[id]; -+ pTarget = hd->Targets[(int)id]; - - if (doConfig) { - -@@ -4745,9 +4688,9 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST - if (pTarget && !pTarget->raidVolume) { - flags = pTarget->negoFlags; - } else { -- flags = ioc->spi_data.noQas; -- if (ioc->spi_data.nvram && (ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { -- data = ioc->spi_data.nvram[id]; -+ flags = hd->ioc->spi_data.noQas; -+ if (hd->ioc->spi_data.nvram && (hd->ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { -+ data = hd->ioc->spi_data.nvram[id]; - - if (data & MPT_NVRAM_WIDE_DISABLE) - flags |= MPT_TARGET_NO_NEGO_WIDE; -@@ -4759,16 +4702,16 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST - } - - /* Force to async, narrow */ -- mpt_setSDP1parameters(0, MPT_ASYNC, 0, flags, -- &requested, &configuration); -- dnegoprintk(("%s: syncronize cache: id=%d width=0 factor=MPT_ASYNC " -- "offset=0 negoFlags=%x requested=%x configuration=%x\n", -- ioc->name, id, flags, requested, configuration)); -+ mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested, -+ &configuration, flags); -+ dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC " -+ "offset=0 negoFlags=%x request=%x config=%x\n", -+ id, flags, requested, configuration)); - pcfg1Data->RequestedParameters = cpu_to_le32(requested); - pcfg1Data->Reserved = 0; - pcfg1Data->Configuration = cpu_to_le32(configuration); - cfg.pageAddr = (bus<<8) | id; -- mpt_config(ioc, &cfg); -+ mpt_config(hd->ioc, &cfg); - } - - /* If target Ptr NULL or if this target is NOT a disk, skip. -@@ -4780,9 +4723,6 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST - lun_index = (lun >> 5); /* 32 luns per lun_index */ - indexed_lun = (lun % 32); - if (pTarget->luns[lun_index] & (1<<indexed_lun)) { -- dexitprintk((KERN_INFO MYNAM ": %s: synchronize_cache for bus=%d id=%d lun=%d\n", -- ioc->name, bus, id, lun)); -- - iocmd.lun = lun; - (void) mptscsih_do_cmd(hd, &iocmd); - } -@@ -4795,27 +4735,21 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST - if (id == hostId) - id++; - -- if (id >= ioc->DevicesPerBus) { -+ if (id > max_id) { - id = 0; - bus++; - } - } - -- dexitprintk((KERN_INFO MYNAM ": %s: synchronize_cache commands done\n", -- ioc->name)); -- - if (pcfg1Data) { -- dexitprintk((KERN_INFO MYNAM ": %s: free pcfg1Data=%p\n", -- ioc->name, pcfg1Data)); - pci_free_consistent(ioc->pcidev, header1.PageLength * 4, pcfg1Data, cfg1_dma_addr); - } - -- dexitprintk((KERN_INFO MYNAM ": %s: synchronize_cache done\n", -- ioc->name)); - return 0; - } - - #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION -+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /** - * mptscsih_domainValidation - Top level handler for domain validation. - * @hd: Pointer to MPT_SCSI_HOST structure. -@@ -4829,209 +4763,163 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST - static void - mptscsih_domainValidation(void *arg) - { -- VirtDevice *pTarget=(VirtDevice *)arg; -- MPT_SCSI_HOST *hd; -- MPT_ADAPTER *ioc; -- unsigned long flags; -- int id, dvStatus; -- int ii; -+ MPT_SCSI_HOST *hd; -+ MPT_ADAPTER *ioc; -+ unsigned long flags; -+ int id, maxid, dvStatus, did; -+ int ii, isPhysDisk; - - spin_lock_irqsave(&dvtaskQ_lock, flags); - dvtaskQ_active = 1; -+ if (dvtaskQ_release) { -+ dvtaskQ_active = 0; -+ spin_unlock_irqrestore(&dvtaskQ_lock, flags); -+ return; -+ } - spin_unlock_irqrestore(&dvtaskQ_lock, flags); - -- if (pTarget == NULL) { -- ddvprintk((KERN_WARNING "domainValidation called with NULL pTarget\n")); -- goto mptscsih_domainValidation_exit; -- } -- id = pTarget->id; -- ioc = pTarget->ioc; -- if (ioc == NULL) { -- ddvprintk((KERN_WARNING "domainValidation called with NULL pTarget->ioc id=%d\n", id)); -- goto mptscsih_domainValidation_exit; -- } --// set_current_state(TASK_INTERRUPTIBLE); --// schedule_timeout(MPT_HZ/4); -+ if (crashdump_mode()) -+ return; - -- hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; -+ /* For this ioc, loop through all devices and do dv to each device. -+ * When complete with this ioc, search through the ioc list, and -+ * for each scsi ioc found, do dv for all devices. Exit when no -+ * device needs dv. -+ */ -+ did = 1; -+ while (did) { -+ did = 0; -+ list_for_each_entry(ioc, &ioc_list, list) { -+ spin_lock_irqsave(&dvtaskQ_lock, flags); -+ if (dvtaskQ_release) { -+ dvtaskQ_active = 0; -+ spin_unlock_irqrestore(&dvtaskQ_lock, flags); -+ return; -+ } -+ spin_unlock_irqrestore(&dvtaskQ_lock, flags); - -- ddvprintk((KERN_WARNING "domainValidation pTarget=%p ioc=%p hd=%p id=%d\n", -- pTarget, ioc, hd, id)); -- if (hd == NULL) { -- ddvprintk((KERN_WARNING "domainValidation called with NULL hd id=%d\n", id)); -- goto mptscsih_domainValidation_exit; -- } -+ msleep(250); - -- if ((ioc->spi_data.forceDv & MPT_SCSICFG_RELOAD_IOC_PG3) != 0) { -- mpt_read_ioc_pg_3(ioc); -- if (ioc->spi_data.dvStatus[id] & MPT_SCSICFG_PHYSDISK_DV_ONLY) { -- ddvprintk((KERN_WARNING "PHYSDISK_DV_ONLY id=%d\n", id)); -- ioc->spi_data.dvStatus[id] &= -- ~MPT_SCSICFG_PHYSDISK_DV_ONLY; -- if (mptscsih_doDv(hd, 0, id) == 1) { -- /* Untagged device was busy, try again -- */ -- ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_NEED_DV; -- } else { -- /* DV is complete. Clear flags. -- */ -- ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_NOT_DONE; -- } -- goto mptscsih_domainValidation_exit; -- } -+ /* DV only to SPI adapters */ -+ if (ioc->bus_type != SPI) -+ continue; - -- if (ioc->raid_data.pIocPg3) { -- Ioc3PhysDisk_t *pPDisk = ioc->raid_data.pIocPg3->PhysDisk; -- int numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks; -+ /* Make sure everything looks ok */ -+ if (ioc->sh == NULL) -+ continue; - -- while (numPDisk) { -- if (ioc->spi_data.dvStatus[pPDisk->PhysDiskID] & MPT_SCSICFG_DV_NOT_DONE) -- ioc->spi_data.dvStatus[pPDisk->PhysDiskID] |= MPT_SCSICFG_NEED_DV; -+ hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; -+ if (hd == NULL) -+ continue; - -- pPDisk++; -- numPDisk--; -+ if ((ioc->spi_data.forceDv & MPT_SCSICFG_RELOAD_IOC_PG3) != 0) { -+ mpt_read_ioc_pg_3(ioc); -+ if (ioc->raid_data.pIocPg3) { -+ Ioc3PhysDisk_t *pPDisk = ioc->raid_data.pIocPg3->PhysDisk; -+ int numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks; -+ -+ while (numPDisk) { -+ if (ioc->spi_data.dvStatus[pPDisk->PhysDiskID] & MPT_SCSICFG_DV_NOT_DONE) -+ ioc->spi_data.dvStatus[pPDisk->PhysDiskID] |= MPT_SCSICFG_NEED_DV; -+ -+ pPDisk++; -+ numPDisk--; -+ } -+ } -+ ioc->spi_data.forceDv &= ~MPT_SCSICFG_RELOAD_IOC_PG3; - } -- } -- ioc->spi_data.forceDv &= ~MPT_SCSICFG_RELOAD_IOC_PG3; -- } - -- dvStatus = ioc->spi_data.dvStatus[id]; -+ maxid = min_t(int, ioc->sh->max_id, MPT_MAX_SCSI_DEVICES); - -- if (dvStatus & MPT_SCSICFG_NEED_DV) { -- ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_DV_IN_PROGRESS; -- ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_NEED_DV; -+ for (id = 0; id < maxid; id++) { -+ spin_lock_irqsave(&dvtaskQ_lock, flags); -+ if (dvtaskQ_release) { -+ dvtaskQ_active = 0; -+ spin_unlock_irqrestore(&dvtaskQ_lock, flags); -+ return; -+ } -+ spin_unlock_irqrestore(&dvtaskQ_lock, flags); -+ dvStatus = hd->ioc->spi_data.dvStatus[id]; - --// set_current_state(TASK_INTERRUPTIBLE); --// schedule_timeout(MPT_HZ/4); -+ if (dvStatus & MPT_SCSICFG_NEED_DV) { -+ did++; -+ hd->ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_DV_PENDING; -+ hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_NEED_DV; -+ -+ msleep(250); -+ -+ /* If hidden phys disk, block IO's to all -+ * raid volumes -+ * else, process normally -+ */ -+ isPhysDisk = mptscsih_is_phys_disk(hd->ioc, id); -+ if (isPhysDisk) { -+ for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) { -+ if (hd->ioc->raid_data.isRaid & (1 << ii)) { -+ hd->ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_DV_PENDING; -+ } -+ } -+ } - -- /* If hidden phys disk, block IO's to all -- * raid volumes -- * else, process normally -- */ -- if (ioc->raid_data.isRaid & (1 << id)) { -- Ioc3PhysDisk_t *pPDisk = ioc->raid_data.pIocPg3->PhysDisk; -- int numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks; -- while (numPDisk) { -- ii = pPDisk->PhysDiskID; -- if ( ioc->spi_data.dvStatus[ii] & MPT_SCSICFG_DV_NOT_DONE) { -- ddvprintk((KERN_WARNING "doDv for PhysDiskNum=%d PhysDiskID=%d numPDisk=%d\n", -- pPDisk->PhysDiskNum, ii, numPDisk)); -- if (mptscsih_doDv(hd, 0, ii) == 1) { -+ if(mpt_alt_ioc_wait(hd->ioc)!=0) { -+ ddvprintk((MYIOC_s_WARN_FMT "alt_ioc busy!\n", -+ hd->ioc->name)); -+ continue; -+ } -+ -+ if (mptscsih_doDv(hd, 0, id) == 1) { - /* Untagged device was busy, try again - */ -- ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_NEED_DV; -+ hd->ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_NEED_DV; -+ hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_PENDING; - } else { -- ddvprintk((KERN_WARNING "doDv successful for PhysDiskNum=%d PhysDiskID=%d\n", -- pPDisk->PhysDiskNum, ii)); - /* DV is complete. Clear flags. - */ -- ioc->spi_data.dvStatus[ii] &= ~MPT_SCSICFG_DV_NOT_DONE; -+ hd->ioc->spi_data.dvStatus[id] &= ~(MPT_SCSICFG_DV_NOT_DONE | MPT_SCSICFG_DV_PENDING); -+ } -+ -+ spin_lock(&hd->ioc->initializing_hba_lock); -+ hd->ioc->initializing_hba_lock_flag=0; -+ spin_unlock(&hd->ioc->initializing_hba_lock); -+ -+ if (isPhysDisk) { -+ for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) { -+ if (hd->ioc->raid_data.isRaid & (1 << ii)) { -+ hd->ioc->spi_data.dvStatus[ii] &= ~MPT_SCSICFG_DV_PENDING; -+ } -+ } - } -+ -+ if (hd->ioc->spi_data.noQas) -+ mptscsih_qas_check(hd, id); - } -- pPDisk++; -- numPDisk--; -- } -- } else { -- ddvprintk((KERN_WARNING "doDv for id=%d\n", -- id)); -- if (mptscsih_doDv(hd, 0, id) == 1) { -- /* Untagged device was busy, try again -- */ -- ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_NEED_DV; -- } else { -- ddvprintk((KERN_WARNING "doDv successful for id=%d\n", -- id)); -- /* DV is complete. Clear flags. -- */ -- ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_NOT_DONE; - } - } -- -- if (ioc->spi_data.noQas) -- mptscsih_qas_check(hd, id); -- } else { -- ddvprintk((KERN_INFO "~NEED_DV dvStatus=%x for id %d\n", -- dvStatus, id)); --// panic( "~NEED_DV"); - } --mptscsih_domainValidation_exit: -+ - spin_lock_irqsave(&dvtaskQ_lock, flags); - dvtaskQ_active = 0; - spin_unlock_irqrestore(&dvtaskQ_lock, flags); --} -- - --/* Post command on the PendingMF to the FW. -- */ --void --mptscsih_post_PendingMF_command(MPT_ADAPTER *ioc) --{ -- MPT_SCSI_HOST *hd; -- MPT_FRAME_HDR *mf; -- struct scsi_cmnd *SCpnt; -- unsigned long flags; -- u16 req_idx; -- -- spin_lock_irqsave(&ioc->PendingMFlock, flags); -- if ((mf=ioc->PendingMF) == NULL) { -- spin_unlock_irqrestore(&ioc->PendingMFlock, flags); -- dpendprintk((MYIOC_s_INFO_FMT "%s: PendingMF is empty\n", -- ioc->name, __FUNCTION__)); -- return; -- } -- -- mf = ioc->PendingMF; -- SCpnt = ioc->PendingSCpnt; -- ioc->PendingMF = NULL; -- spin_unlock_irqrestore(&ioc->PendingMFlock, flags); -- -- dpendprintk((MYIOC_s_INFO_FMT "mptscsih_post_PendingMF_command: mf=%p\n", -- ioc->name, mf)); -- DBG_DUMP_PENDING_REQUEST_FRAME(ioc, mf) -- -- hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; -- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); -- hd->ScsiLookup[req_idx] = SCpnt; -- mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); -+ return; - } - -- - /* Search IOC page 3 to determine if this is hidden physical disk - */ - static int --mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int channel, int id) -+mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id) - { -- struct inactive_raid_component_info *component_info; - int i; -- int rc = 0; -- -- if (!ioc->raid_data.pIocPg3) -- goto out; -- for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { -- if ((id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) && -- (channel == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskBus)) { -- rc = 1; -- goto out; -- } -- } - -- /* -- * Check inactive list for matching phys disks -- */ -- if (list_empty(&ioc->raid_data.inactive_list)) -- goto out; -+ if (!ioc->raid_data.isRaid || !ioc->raid_data.pIocPg3) -+ return 0; - -- down(&ioc->raid_data.inactive_list_mutex); -- list_for_each_entry(component_info, -- &ioc->raid_data.inactive_list, list) { -- if ((component_info->d.PhysDiskID == id) && -- (component_info->d.PhysDiskBus == channel)) -- rc = 1; -+ for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { -+ if (id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) -+ return 1; - } -- up(&ioc->raid_data.inactive_list_mutex); - -- out: -- return rc; -+ return 0; - } - - /* Write SDP1 if no QAS has been enabled -@@ -5039,37 +4927,32 @@ mptscsih_is_phys_disk(MPT_ADAPTER *ioc, - static void - mptscsih_qas_check(MPT_SCSI_HOST *hd, int id) - { -- MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - int ii; - -- pMptTarget = ioc->Target_List[0]; - for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) { - if (ii == id) - continue; - -- if ((ioc->spi_data.dvStatus[ii] & MPT_SCSICFG_DV_NOT_DONE) != 0) -+ if ((hd->ioc->spi_data.dvStatus[ii] & MPT_SCSICFG_DV_NOT_DONE) != 0) - continue; - -- pTarget = pMptTarget->Target[ii]; -- -- if (pTarget) { -- if (!pTarget->raidVolume) { -- if ((pTarget->negoFlags & ioc->spi_data.noQas) == 0) { -- pTarget->negoFlags |= ioc->spi_data.noQas; -- dnegoprintk(("mptscsih_qas_check: writeSDP1: id=%d negoFlags=%d\n", ii, pTarget->negoFlags)); -- mpt_writeSDP1(ioc, 0, ii, MPT_SCSICFG_USE_NVRAM); -- } -- } else { -- if (mptscsih_is_phys_disk(ioc, 0, ii) == 1) { -- dnegoprintk(("mptscsih_qas_check: is_phys_disk writeSDP1: id=%d SCSICFG_USE_NVRAM\n", ii)); -- mpt_writeSDP1(ioc, 0, ii, MPT_SCSICFG_USE_NVRAM); -+ pTarget = hd->Targets[ii]; - -- } -+ if (pTarget && (!pTarget->raidVolume)) { -+ if ((pTarget->negoFlags & hd->ioc->spi_data.noQas) == 0) { -+ pTarget->negoFlags |= hd->ioc->spi_data.noQas; -+ dnegoprintk(("writeSDP1: id=%d negoFlags=%d\n", id, pTarget->negoFlags)); -+ mptscsih_writeSDP1(hd, 0, ii, 0); -+ } -+ } else { -+ if (mptscsih_is_phys_disk(hd->ioc, ii) == 1) { -+ dnegoprintk(("writeSDP1: id=%d SCSICFG_USE_NVRAM\n", id)); -+ mptscsih_writeSDP1(hd, 0, ii, MPT_SCSICFG_USE_NVRAM); - } - } - } -+ return; - } - - -@@ -5094,16 +4977,15 @@ mptscsih_qas_check(MPT_SCSI_HOST *hd, in - * Return: None. - */ - static int --mptscsih_doDv(MPT_SCSI_HOST *hd, int bus, int id) -+mptscsih_doDv(MPT_SCSI_HOST *hd, int bus_number, int id) - { - MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - SCSIDevicePage1_t *pcfg1Data; - SCSIDevicePage0_t *pcfg0Data; - u8 *pbuf1; - u8 *pbuf2; -- u8 *pDvBuf=NULL; -+ u8 *pDvBuf; - dma_addr_t dvbuf_dma = -1; - dma_addr_t buf1_dma = -1; - dma_addr_t buf2_dma = -1; -@@ -5127,7 +5009,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus - char firstPass = 1; - char doFallback = 0; - char readPage0; -- char lun; -+ char bus, lun; - char inq0 = 0; - - if (ioc->spi_data.sdp1length == 0) -@@ -5141,10 +5023,12 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus - */ - if (id == ioc->pfacts[0].PortSCSIID) - return 0; --ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_DV_IN_PROGRESS; - - lun = 0; -- ddvprintk((MYIOC_s_INFO_FMT "DV Started: bus=%d id=%d dv @ %p\n",ioc->name, bus, id, &dv)); -+ bus = (u8) bus_number; -+ ddvtprintk((MYIOC_s_NOTE_FMT -+ "DV Started: bus=%d id=%d dv @ %p\n", -+ ioc->name, bus, id, &dv)); - - /* Prep DV structure - */ -@@ -5167,8 +5051,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF - iocmd.physDiskNum = -1; - iocmd.rsvd = iocmd.rsvd2 = 0; - -- pMptTarget = ioc->Target_List[bus]; -- pTarget = pMptTarget->Target[id]; -+ pTarget = hd->Targets[id]; - - /* Use tagged commands if possible. - */ -@@ -5176,12 +5059,12 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF - if (pTarget->tflags & MPT_TARGET_FLAGS_Q_YES) - iocmd.flags |= MPT_ICFLAG_TAGGED_CMD; - else { -- if (ioc->facts.FWVersion.Word < 0x01000600) -- goto doDv_done; -+ if (hd->ioc->facts.FWVersion.Word < 0x01000600) -+ return 0; - -- if ((ioc->facts.FWVersion.Word >= 0x01010000) && -- (ioc->facts.FWVersion.Word < 0x01010B00)) -- goto doDv_done; -+ if ((hd->ioc->facts.FWVersion.Word >= 0x01010000) && -+ (hd->ioc->facts.FWVersion.Word < 0x01010B00)) -+ return 0; - } - } - -@@ -5211,7 +5094,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF - - pDvBuf = pci_alloc_consistent(ioc->pcidev, dv_alloc, &dvbuf_dma); - if (pDvBuf == NULL) -- goto doDv_done; -+ return 0; - - sz = 0; - pbuf1 = (u8 *)pDvBuf; -@@ -5237,7 +5120,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF - /* Skip this ID? Set cfg.cfghdr.hdr to force config page write - */ - { -- SpiCfgData *pspi_data = &ioc->spi_data; -+ SpiCfgData *pspi_data = &hd->ioc->spi_data; - if (pspi_data->nvram && (pspi_data->nvram[id] != MPT_HOST_NVRAM_INVALID)) { - /* Set the factor from nvram */ - nfactor = (pspi_data->nvram[id] & MPT_NVRAM_SYNC_MASK) >> 8; -@@ -5247,7 +5130,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF - if (!(pspi_data->nvram[id] & MPT_NVRAM_ID_SCAN_ENABLE) || - (pspi_data->PortFlags == MPI_SCSIPORTPAGE2_PORT_FLAGS_OFF_DV) ) { - -- ddvprintk((MYIOC_s_INFO_FMT "DV Skipped: bus, id, lun (%d, %d, %d)\n", -+ ddvprintk((MYIOC_s_NOTE_FMT "DV Skipped: bus, id, lun (%d, %d, %d)\n", - ioc->name, bus, id, lun)); - - dv.cmd = MPT_SET_MAX; -@@ -5260,7 +5143,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF - cfg.physAddr = cfg1_dma_addr; - cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; - cfg.dir = 1; -- mpt_config(ioc, &cfg); -+ mpt_config(hd->ioc, &cfg); - goto target_done; - } - } -@@ -5295,7 +5178,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF - /* RAID Volume ID's may double for a physical device. If RAID but - * not a physical ID as well, skip DV. - */ -- if ((ioc->raid_data.isRaid & (1 << id)) && !(iocmd.flags & MPT_ICFLAG_PHYS_DISK)) -+ if ((hd->ioc->raid_data.isRaid & (1 << id)) && !(iocmd.flags & MPT_ICFLAG_PHYS_DISK)) - goto target_done; - - -@@ -5312,10 +5195,8 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF - readPage0 = 0; - sz = SCSI_MAX_INQUIRY_BYTES; - rc = MPT_SCANDV_GOOD; -- --start_DV: - while (1) { -- ddvprintk((MYIOC_s_INFO_FMT "DV: Start Basic test on id=%d\n", ioc->name, id)); -+ ddvprintk((MYIOC_s_NOTE_FMT "DV: Start Basic test on id=%d\n", ioc->name, id)); - retcode = 0; - dv.cmd = MPT_SET_MIN; - mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); -@@ -5324,7 +5205,7 @@ start_DV: - cfg.physAddr = cfg1_dma_addr; - cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; - cfg.dir = 1; -- if (mpt_config(ioc, &cfg) != 0) -+ if (mpt_config(hd->ioc, &cfg) != 0) - goto target_done; - - /* Wide - narrow - wide workaround case -@@ -5333,9 +5214,9 @@ start_DV: - /* Send an untagged command to reset disk Qs corrupted - * when a parity error occurs on a Request Sense. - */ -- if ((ioc->facts.FWVersion.Word >= 0x01000600) || -- ((ioc->facts.FWVersion.Word >= 0x01010000) && -- (ioc->facts.FWVersion.Word < 0x01010B00)) ) { -+ if ((hd->ioc->facts.FWVersion.Word >= 0x01000600) || -+ ((hd->ioc->facts.FWVersion.Word >= 0x01010000) && -+ (hd->ioc->facts.FWVersion.Word < 0x01010B00)) ) { - - iocmd.cmd = REQUEST_SENSE; - iocmd.data_dma = buf1_dma; -@@ -5400,6 +5281,12 @@ start_DV: - * if PROCESSOR, quit DV. - */ - if (inq0 == TYPE_PROCESSOR) { -+ mptscsih_initTarget(hd, -+ bus, -+ id, -+ lun, -+ pbuf1, -+ sz); - goto target_done; - } - -@@ -5426,8 +5313,8 @@ start_DV: - - if ((pbuf1[56] & 0x02) == 0) { - pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS; -- ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS; -- ddvprintk((MYIOC_s_INFO_FMT -+ hd->ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS; -+ ddvprintk((MYIOC_s_NOTE_FMT - "DV: Start Basic noQas on id=%d due to pbuf1[56]=%x\n", - ioc->name, id, pbuf1[56])); - } -@@ -5440,7 +5327,7 @@ start_DV: - dv.cmd = MPT_SET_MAX; - - mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); -- if (mpt_config(ioc, &cfg) != 0) -+ if (mpt_config(hd->ioc, &cfg) != 0) - goto target_done; - - if ((!dv.now.width) && (!dv.now.offset)) -@@ -5473,7 +5360,7 @@ start_DV: - cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; - cfg.dir = 0; - -- if (mpt_config(ioc, &cfg) != 0) -+ if (mpt_config(hd->ioc, &cfg) != 0) - goto target_done; - - sdp0_info = le32_to_cpu(pcfg0Data->Information) & 0x0E; -@@ -5504,7 +5391,15 @@ start_DV: - if (!firstPass) - doFallback = 1; - } else { -- -+ ddvprintk((MYIOC_s_NOTE_FMT -+ "DV:Inquiry compared id=%d, calling initTarget\n", ioc->name, id)); -+ hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_NOT_DONE; -+ mptscsih_initTarget(hd, -+ bus, -+ id, -+ lun, -+ pbuf1, -+ sz); - break; /* test complete */ - } - } -@@ -5522,7 +5417,7 @@ start_DV: - firstPass = 0; - } - } -- ddvprintk((MYIOC_s_INFO_FMT "DV: Basic test on id=%d completed OK.\n", ioc->name, id)); -+ ddvprintk((MYIOC_s_NOTE_FMT "DV: Basic test on id=%d completed OK.\n", ioc->name, id)); - - if (ioc->spi_data.mpt_dv == 0) - goto target_done; -@@ -5534,10 +5429,10 @@ start_DV: - if (inq0 != 0) - goto target_done; - -- ddvprintk((MYIOC_s_INFO_FMT "DV: bus, id, lun (%d, %d, %d) PortFlags=%x\n", -+ ddvprintk((MYIOC_s_NOTE_FMT "DV: bus, id, lun (%d, %d, %d) PortFlags=%x\n", - ioc->name, bus, id, lun, ioc->spi_data.PortFlags)); - if ( ioc->spi_data.PortFlags == MPI_SCSIPORTPAGE2_PORT_FLAGS_BASIC_DV_ONLY ) { -- ddvprintk((MYIOC_s_INFO_FMT "DV Basic Only: bus, id, lun (%d, %d, %d) PortFlags=%x\n", -+ ddvprintk((MYIOC_s_NOTE_FMT "DV Basic Only: bus, id, lun (%d, %d, %d) PortFlags=%x\n", - ioc->name, bus, id, lun, ioc->spi_data.PortFlags)); - goto target_done; - } -@@ -5574,7 +5469,7 @@ start_DV: - u8 skey = hd->pLocal->sense[2] & 0x0F; - u8 asc = hd->pLocal->sense[12]; - u8 ascq = hd->pLocal->sense[13]; -- ddvprintk((MYIOC_s_WARN_FMT -+ ddvprintk((MYIOC_s_INFO_FMT - "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", - ioc->name, skey, asc, ascq)); - -@@ -5646,7 +5541,7 @@ start_DV: - u8 skey = hd->pLocal->sense[2] & 0x0F; - u8 asc = hd->pLocal->sense[12]; - u8 ascq = hd->pLocal->sense[13]; -- ddvprintk((MYIOC_s_WARN_FMT -+ ddvprintk((MYIOC_s_INFO_FMT - "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", - ioc->name, skey, asc, ascq)); - if (skey == ILLEGAL_REQUEST) { -@@ -5665,11 +5560,6 @@ start_DV: - ioc->name)); - goto target_done; - } -- } else if (rc == MPT_SCANDV_FALLBACK) { -- doFallback = 1; /* set fallback flag */ -- notDone++; -- goto start_DV; -- - } else { - /* All other errors are fatal - */ -@@ -5812,7 +5702,7 @@ skip_Reserve: - dv.cmd = MPT_FALLBACK; - mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); - -- if (mpt_config(ioc, &cfg) != 0) -+ if (mpt_config(hd->ioc, &cfg) != 0) - goto target_done; - - if ((!dv.now.width) && (!dv.now.offset)) -@@ -5826,7 +5716,7 @@ skip_Reserve: - /* Restart data test if UA, else quit. - */ - u8 skey = hd->pLocal->sense[2] & 0x0F; -- ddvprintk((MYIOC_s_WARN_FMT -+ ddvprintk((MYIOC_s_INFO_FMT - "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey, - hd->pLocal->sense[12], hd->pLocal->sense[13])); - if (skey == UNIT_ATTENTION) { -@@ -5891,7 +5781,7 @@ skip_Reserve: - dv.cmd = MPT_FALLBACK; - mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); - -- if (mpt_config(ioc, &cfg) != 0) -+ if (mpt_config(hd->ioc, &cfg) != 0) - goto target_done; - - if ((!dv.now.width) && (!dv.now.offset)) -@@ -5909,7 +5799,7 @@ skip_Reserve: - dv.cmd = MPT_FALLBACK; - mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); - -- if (mpt_config(ioc, &cfg) != 0) -+ if (mpt_config(hd->ioc, &cfg) != 0) - goto target_done; - - if ((!dv.now.width) && (!dv.now.offset)) -@@ -5922,7 +5812,7 @@ skip_Reserve: - /* Restart data test if UA, else quit. - */ - u8 skey = hd->pLocal->sense[2] & 0x0F; -- ddvprintk((MYIOC_s_WARN_FMT -+ ddvprintk((MYIOC_s_INFO_FMT - "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey, - hd->pLocal->sense[12], hd->pLocal->sense[13])); - if (skey == UNIT_ATTENTION) { -@@ -5964,8 +5854,8 @@ target_done: - /* If disk, not U320, disable QAS - */ - if ((inq0 == 0) && (dv.now.factor > MPT_ULTRA320)) { -- ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS; -- ddvprintk((MYIOC_s_INFO_FMT -+ hd->ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS; -+ ddvprintk((MYIOC_s_NOTE_FMT - "noQas set due to id=%d has factor=%x\n", ioc->name, id, dv.now.factor)); - } - -@@ -5980,7 +5870,7 @@ target_done: - cfg.physAddr = cfg1_dma_addr; - cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; - cfg.dir = 1; -- mpt_config(ioc, &cfg); -+ mpt_config(hd->ioc, &cfg); - */ - } - -@@ -5991,18 +5881,13 @@ target_done: - ddvprintk((MYIOC_s_ERR_FMT "RAID Enable FAILED!\n", ioc->name)); - } - --doDv_done: - /* Done with the DV scan of the current target - */ - if (pDvBuf) - pci_free_consistent(ioc->pcidev, dv_alloc, pDvBuf, dvbuf_dma); - -- ddvprintk((MYIOC_s_WARN_FMT "DV Done id=%d\n",ioc->name, id)); -- ioc->spi_data.dvStatus[id] &= ~(MPT_SCSICFG_DV_NOT_DONE | MPT_SCSICFG_DV_IN_PROGRESS); -- /* Post an IO that was pended while -- * DV was running. -- */ -- mptscsih_post_PendingMF_command(ioc); -+ ddvtprintk((MYIOC_s_INFO_FMT "DV Done id=%d\n", -+ ioc->name, id)); - - return retcode; - } -@@ -6017,8 +5902,6 @@ doDv_done: - static void - mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage) - { -- MPT_ADAPTER *ioc = hd->ioc; -- struct _MPT_DEVICE *pMptTarget; - VirtDevice *pTarget; - SCSIDevicePage0_t *pPage0; - SCSIDevicePage1_t *pPage1; -@@ -6032,48 +5915,49 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP - - switch (cmd) { - case MPT_GET_NVRAM_VALS: -- ddvprintk((MYIOC_s_INFO_FMT "Getting NVRAM: ", -- ioc->name)); -+ ddvprintk((MYIOC_s_NOTE_FMT "Getting NVRAM: ", -+ hd->ioc->name)); - /* Get the NVRAM values and save in tmax - * If not an LVD bus, the adapter minSyncFactor has been - * already throttled back. - */ -- negoFlags = ioc->spi_data.noQas; -- pMptTarget = ioc->Target_List[0]; -- pTarget = pMptTarget->Target[id]; -- if (ioc->spi_data.nvram && (ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { -- data = ioc->spi_data.nvram[id]; -- width = data & MPT_NVRAM_WIDE_DISABLE ? 0 : 1; -- if ((offset = ioc->spi_data.maxSyncOffset) == 0) -- factor = MPT_ASYNC; -- else { -- factor = (data & MPT_NVRAM_SYNC_MASK) >> MPT_NVRAM_SYNC_SHIFT; -- if ((factor == 0) || (factor == MPT_ASYNC)){ -+ negoFlags = hd->ioc->spi_data.noQas; -+ if ((pTarget = hd->Targets[(int)id]) && !pTarget->raidVolume) { -+ width = pTarget->maxWidth; -+ offset = pTarget->maxOffset; -+ factor = pTarget->minSyncFactor; -+ negoFlags |= pTarget->negoFlags; -+ } else { -+ if (hd->ioc->spi_data.nvram && (hd->ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { -+ data = hd->ioc->spi_data.nvram[id]; -+ width = data & MPT_NVRAM_WIDE_DISABLE ? 0 : 1; -+ if ((offset = hd->ioc->spi_data.maxSyncOffset) == 0) - factor = MPT_ASYNC; -- offset = 0; -+ else { -+ factor = (data & MPT_NVRAM_SYNC_MASK) >> MPT_NVRAM_SYNC_SHIFT; -+ if ((factor == 0) || (factor == MPT_ASYNC)){ -+ factor = MPT_ASYNC; -+ offset = 0; -+ } - } -- ddvprintk(("NVRAM id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -- id, width, factor, offset, negoFlags)); -+ } else { -+ width = MPT_NARROW; -+ offset = 0; -+ factor = MPT_ASYNC; - } -- } else { -- width = MPT_NARROW; -- offset = 0; -- factor = MPT_ASYNC; -- ddvprintk(("NVRAM_INVALID id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -- id, width, factor, offset, negoFlags)); -- } - -- /* Set the negotiation flags */ -- if (!width) -- negoFlags |= MPT_TARGET_NO_NEGO_WIDE; -+ /* Set the negotiation flags */ -+ if (!width) -+ negoFlags |= MPT_TARGET_NO_NEGO_WIDE; - -- if (!offset) -- negoFlags |= MPT_TARGET_NO_NEGO_SYNC; -+ if (!offset) -+ negoFlags |= MPT_TARGET_NO_NEGO_SYNC; -+ } - - /* limit by adapter capabilities */ -- width = min(width, ioc->spi_data.maxBusWidth); -- offset = min(offset, ioc->spi_data.maxSyncOffset); -- factor = max(factor, ioc->spi_data.minSyncFactor); -+ width = min(width, hd->ioc->spi_data.maxBusWidth); -+ offset = min(offset, hd->ioc->spi_data.maxSyncOffset); -+ factor = max(factor, hd->ioc->spi_data.minSyncFactor); - - /* Check Consistency */ - if (offset && (factor < MPT_ULTRA2) && !width) -@@ -6083,13 +5967,13 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP - dv->max.offset = offset; - dv->max.factor = factor; - dv->max.flags = negoFlags; -- ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -+ ddvprintk((" id=%d width=%d factor=%x offset=%x negoFlags=%x\n", - id, width, factor, offset, negoFlags)); - break; - - case MPT_UPDATE_MAX: -- ddvprintk((MYIOC_s_INFO_FMT -- "Updating with SDP0 Data: ", ioc->name)); -+ ddvprintk((MYIOC_s_NOTE_FMT -+ "Updating with SDP0 Data: ", hd->ioc->name)); - /* Update tmax values with those from Device Page 0.*/ - pPage0 = (SCSIDevicePage0_t *) pPage; - if (pPage0) { -@@ -6103,10 +5987,12 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP - dv->now.offset = dv->max.offset; - dv->now.factor = dv->max.factor; - ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x\n", -- id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags)); -+ id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags)); - break; - - case MPT_SET_MAX: -+ ddvprintk((MYIOC_s_NOTE_FMT "Setting Max: ", -+ hd->ioc->name)); - /* Set current to the max values. Update the config page.*/ - dv->now.width = dv->max.width; - dv->now.offset = dv->max.offset; -@@ -6115,18 +6001,22 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP - - pPage1 = (SCSIDevicePage1_t *)pPage; - if (pPage1) { -- mpt_setSDP1parameters (dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, -- &val, &configuration); -+ mptscsih_setDevicePage1Flags (dv->now.width, dv->now.factor, -+ dv->now.offset, &val, &configuration, dv->now.flags); -+ dnegoprintk(("Setting Max: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", -+ id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); - pPage1->RequestedParameters = cpu_to_le32(val); - pPage1->Reserved = 0; - pPage1->Configuration = cpu_to_le32(configuration); - } - -- dnegoprintk(("%s: Setting Max: id=%d width=%d factor=%x offset=%x negoFlags=%x requested=%08x configuration=%08x\n", -- ioc->name, id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); -+ ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x configuration=%x\n", -+ id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); - break; - - case MPT_SET_MIN: -+ ddvprintk((MYIOC_s_NOTE_FMT "Setting Min: ", -+ hd->ioc->name)); - /* Set page to asynchronous and narrow - * Do not update now, breaks fallback routine. */ - width = MPT_NARROW; -@@ -6136,20 +6026,22 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP - - pPage1 = (SCSIDevicePage1_t *)pPage; - if (pPage1) { -- mpt_setSDP1parameters (width, factor, offset, negoFlags, -- &val, &configuration); -+ mptscsih_setDevicePage1Flags (width, factor, -+ offset, &val, &configuration, negoFlags); -+ dnegoprintk(("Setting Min: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", -+ id, width, factor, offset, negoFlags, val, configuration)); - pPage1->RequestedParameters = cpu_to_le32(val); - pPage1->Reserved = 0; - pPage1->Configuration = cpu_to_le32(configuration); - } -- dnegoprintk(("%s: Setting Min: id=%d width=%d factor=%x offset=%x negoFlags=%x requested=%08x configuration=%08x\n", -- ioc->name, id, width, factor, offset, negoFlags, val, configuration)); -+ ddvprintk(("id=%d width=%d factor=%x offset=%x request=%x config=%x negoFlags=%x\n", -+ id, width, factor, offset, val, configuration, negoFlags)); - break; - - case MPT_FALLBACK: -- ddvprintk((MYIOC_s_INFO_FMT -+ ddvprintk((MYIOC_s_NOTE_FMT - "Fallback: Start: offset %d, factor %x, width %d \n", -- ioc->name, dv->now.offset, -+ hd->ioc->name, dv->now.offset, - dv->now.factor, dv->now.width)); - width = dv->now.width; - offset = dv->now.offset; -@@ -6212,32 +6104,31 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP - - pPage1 = (SCSIDevicePage1_t *)pPage; - if (pPage1) { -- mpt_setSDP1parameters (width, factor, offset, dv->now.flags, -- &val, &configuration); -+ mptscsih_setDevicePage1Flags (width, factor, offset, &val, -+ &configuration, dv->now.flags); -+ dnegoprintk(("Finish: id=%d width=%d offset=%d factor=%x negoFlags=%x request=%x config=%x\n", -+ id, width, offset, factor, dv->now.flags, val, configuration)); - - pPage1->RequestedParameters = cpu_to_le32(val); - pPage1->Reserved = 0; - pPage1->Configuration = cpu_to_le32(configuration); - } - -- ddvprintk(("%s: Finish: id=%d width=%d offset=%d factor=%x negoFlags=%x requested=%08x configuration=%08x\n", -- ioc->name, id, width, offset, factor, dv->now.flags, val, configuration)); -+ ddvprintk(("Finish: id=%d offset=%d factor=%x width=%d request=%x config=%x\n", -+ id, dv->now.offset, dv->now.factor, dv->now.width, val, configuration)); - break; - - case MPT_SAVE: -- ddvprintk((MYIOC_s_INFO_FMT -- "Saving to pTarget: " -- "id=%d width=%x factor=%x offset=%d negoFlags=%x\n", -- ioc->name, id, dv->now.width, dv->now.factor, -- dv->now.offset, dv->now.flags)); -+ ddvprintk((MYIOC_s_NOTE_FMT -+ "Saving to Target structure: ", hd->ioc->name)); -+ ddvprintk(("id=%d width=%x factor=%x offset=%d negoFlags=%x\n", -+ id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags)); - - /* Save these values to target structures - * or overwrite nvram (phys disks only). - */ - -- pMptTarget = ioc->Target_List[0]; -- pTarget = pMptTarget->Target[id]; -- if (pTarget && !pTarget->raidVolume ) { -+ if ((pTarget = hd->Targets[(int)id]) && !pTarget->raidVolume ) { - pTarget->maxWidth = dv->now.width; - pTarget->maxOffset = dv->now.offset; - pTarget->minSyncFactor = dv->now.factor; -@@ -6246,8 +6137,8 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP - /* Preserv all flags, use - * read-modify-write algorithm - */ -- if (ioc->spi_data.nvram) { -- data = ioc->spi_data.nvram[id]; -+ if (hd->ioc->spi_data.nvram) { -+ data = hd->ioc->spi_data.nvram[id]; - - if (dv->now.width) - data &= ~MPT_NVRAM_WIDE_DISABLE; -@@ -6260,14 +6151,13 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP - data &= ~MPT_NVRAM_SYNC_MASK; - data |= (dv->now.factor << MPT_NVRAM_SYNC_SHIFT) & MPT_NVRAM_SYNC_MASK; - -- ioc->spi_data.nvram[id] = data; -+ hd->ioc->spi_data.nvram[id] = data; - } - } - break; - } - } - -- - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /* mptscsih_fillbuf - fill a buffer with a special data pattern - * cleanup. For bus scan only. -@@ -6422,11 +6312,10 @@ EXPORT_SYMBOL(mptscsih_taskmgmt_complete - EXPORT_SYMBOL(mptscsih_scandv_complete); - EXPORT_SYMBOL(mptscsih_event_process); - EXPORT_SYMBOL(mptscsih_ioc_reset); --EXPORT_SYMBOL(mptscsih_InternalCmdTimer_expired); -+EXPORT_SYMBOL(mptscsih_timer_expired); - EXPORT_SYMBOL(mptscsih_readFCDevicePage0); - EXPORT_SYMBOL(mptscsih_change_queue_depth); - EXPORT_SYMBOL(mptscsih_TMHandler); --EXPORT_SYMBOL(mptscsih_TM_timeout); - EXPORT_SYMBOL(mptscsih_sanity_check); - EXPORT_SYMBOL(mptscsih_poll); - EXPORT_SYMBOL(mptscsih_do_cmd); -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptscsih.h linux-2.6.9-55.0.12/drivers/message/fusion/mptscsih.h ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptscsih.h 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptscsih.h 2007-11-02 09:10:23.000000000 +0100 -@@ -5,8 +5,8 @@ - * LSIFC9xx/LSI409xx Fibre Channel - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - * $Id: mptscsih.h,v 1.1.2.2 2003/05/07 14:08:35 Exp $ - */ -@@ -54,17 +54,7 @@ - * SCSI Public stuff... - */ - --#define MPT_SCANDV_GOOD (0x00000000) /* must be 0 */ --#define MPT_SCANDV_DID_RESET (0x00000001) --#define MPT_SCANDV_SENSE (0x00000002) --#define MPT_SCANDV_SOME_ERROR (0x00000004) --#define MPT_SCANDV_SELECTION_TIMEOUT (0x00000008) --#define MPT_SCANDV_ISSUE_SENSE (0x00000010) --#define MPT_SCANDV_FALLBACK (0x00000020) --#define MPT_SCANDV_BUSY (0x00000040) -- --//#define MPT_SCSI_CMD_PER_DEV_HIGH 64 --#define MPT_SCSI_CMD_PER_DEV_HIGH 48 -+#define MPT_SCSI_CMD_PER_DEV_HIGH 64 - #define MPT_SCSI_CMD_PER_DEV_LOW 32 - - #define MPT_SCSI_CMD_PER_LUN 7 -@@ -133,7 +123,7 @@ extern int mptscsih_taskmgmt_complete(MP - extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); - extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); - extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); --extern void mptscsih_InternalCmdTimer_expired(unsigned long data); -+extern void mptscsih_timer_expired(unsigned long data); - extern int mptscsih_readFCDevicePage0(MPT_ADAPTER *ioc, u8 bus, u8 targetId, pFCDevicePage0_t fcDevicePage); - extern void mptscsih_hot_plug_worker_thread(void * arg); - extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); -@@ -141,4 +131,4 @@ extern int mptscsih_change_queue_depth(s - extern int mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *iocmd); - extern int mptscsih_sanity_check(struct scsi_device *sdev); - extern void mptscsih_poll(struct scsi_device *sdev); --extern void scsi_print_command(struct scsi_cmnd *cmd); -+extern void scsi_print_command(struct scsi_cmnd *cmd); -\ Pas de fin de ligne à la fin du fichier. -diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptspi.c linux-2.6.9-55.0.12/drivers/message/fusion/mptspi.c ---- linux-2.6.9-67.0.1/drivers/message/fusion/mptspi.c 2007-12-21 11:40:54.000000000 +0100 -+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptspi.c 2007-11-02 09:10:23.000000000 +0100 -@@ -3,8 +3,8 @@ - * For use with LSI Logic PCI chip/adapter(s) - * running LSI Logic Fusion MPT (Message Passing Technology) firmware. - * -- * Copyright (c) 1999-2007 LSI Logic Corporation -- * (mailto:mpt_linux_developer@lsi.com) -+ * Copyright (c) 1999-2005 LSI Logic Corporation -+ * (mailto:mpt_linux_developer@lsil.com) - * - */ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -@@ -73,7 +73,6 @@ - MODULE_AUTHOR(MODULEAUTHOR); - MODULE_DESCRIPTION(my_NAME); - MODULE_LICENSE("GPL"); --MODULE_VERSION(my_VERSION); - - /* Command line args */ - #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION -@@ -146,13 +145,12 @@ static struct scsi_host_template mptspi_ - .change_queue_depth = mptscsih_change_queue_depth, - #endif - .eh_abort_handler = mptscsih_abort, -- .eh_device_reset_handler = mptscsih_dev_reset, - .eh_bus_reset_handler = mptscsih_bus_reset, - .eh_host_reset_handler = mptscsih_host_reset, - .bios_param = mptscsih_bios_param, - .can_queue = MPT_SCSI_CAN_QUEUE, - .this_id = -1, -- .sg_tablesize = CONFIG_FUSION_MAX_SGE, -+ .sg_tablesize = MPT_SCSI_SG_DEPTH, - .max_sectors = 8192, - .cmd_per_lun = 7, - .use_clustering = ENABLE_CLUSTERING, -@@ -191,6 +189,8 @@ mptspi_probe(struct pci_dev *pdev, const - MPT_ADAPTER *ioc; - unsigned long flags; - int sz, ii; -+ int numSGE = 0; -+ int scale; - int ioc_cap; - u8 *mem; - int error=0; -@@ -269,7 +269,7 @@ mptspi_probe(struct pci_dev *pdev, const - ioc->name, mpt_can_queue, ioc->req_depth, - sh->can_queue)); - -- sh->max_id = ioc->DevicesPerBus; -+ sh->max_id = MPT_MAX_SCSI_DEVICES; - - sh->max_lun = MPT_LAST_LUN + 1; - sh->max_channel = 0; -@@ -278,7 +278,36 @@ mptspi_probe(struct pci_dev *pdev, const - /* Required entry. - */ - sh->unique_id = ioc->id; -- sh->sg_tablesize = ioc->sg_tablesize; -+ -+ /* Verify that we won't exceed the maximum -+ * number of chain buffers -+ * We can optimize: ZZ = req_sz/sizeof(SGE) -+ * For 32bit SGE's: -+ * numSGE = 1 + (ZZ-1)*(maxChain -1) + ZZ -+ * + (req_sz - 64)/sizeof(SGE) -+ * A slightly different algorithm is required for -+ * 64bit SGEs. -+ */ -+ scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); -+ if (sizeof(dma_addr_t) == sizeof(u64)) { -+ numSGE = (scale - 1) * -+ (ioc->facts.MaxChainDepth-1) + scale + -+ (ioc->req_sz - 60) / (sizeof(dma_addr_t) + -+ sizeof(u32)); -+ } else { -+ numSGE = 1 + (scale - 1) * -+ (ioc->facts.MaxChainDepth-1) + scale + -+ (ioc->req_sz - 64) / (sizeof(dma_addr_t) + -+ sizeof(u32)); -+ } -+ -+ if (numSGE < sh->sg_tablesize) { -+ /* Reset this value */ -+ dprintk((MYIOC_s_INFO_FMT -+ "Resetting sg_tablesize to %d from %d\n", -+ ioc->name, numSGE, sh->sg_tablesize)); -+ sh->sg_tablesize = numSGE; -+ } - - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) - /* Set the pci device pointer in Scsi_Host structure. -@@ -307,29 +336,29 @@ mptspi_probe(struct pci_dev *pdev, const - dprintk((MYIOC_s_INFO_FMT "ScsiLookup @ %p, sz=%d\n", - ioc->name, hd->ScsiLookup, sz)); - -- for (ii=0; ii < ioc->NumberOfBuses; ii++) { -- /* Allocate memory for the device structures. -- * A non-Null pointer at an offset -- * indicates a device exists. -- */ -- sz = ioc->DevicesPerBus * sizeof(void *); -- mem = kmalloc(sz, GFP_ATOMIC); -- if (mem == NULL) { -- error = -ENOMEM; -- goto out_mptspi_probe; -- } -+ /* Allocate memory for the device structures. -+ * A non-Null pointer at an offset -+ * indicates a device exists. -+ * max_id = 1 + maximum id (hosts.h) -+ */ -+ sz = sh->max_id * sizeof(void *); -+ mem = kmalloc(sz, GFP_ATOMIC); -+ if (mem == NULL) { -+ error = -ENOMEM; -+ goto out_mptspi_probe; -+ } - -- memset(mem, 0, sz); -- ioc->Target_List[ii] = (struct _MPT_DEVICE *) mem; -+ memset(mem, 0, sz); -+ hd->Targets = (VirtDevice **) mem; - -- dinitprintk((KERN_INFO -- " For Bus=%d, Target_List=%p sz=%d\n", ii, mem, sz)); -- } -+ dprintk((KERN_INFO -+ " Targets @ %p, sz=%d\n", hd->Targets, sz)); - - /* Clear the TM flags - */ - hd->tmPending = 0; - hd->tmState = TM_STATE_NONE; -+ hd->resetPending = 0; - hd->abortSCpnt = NULL; - - /* Clear the pointer used to store -@@ -339,21 +368,16 @@ mptspi_probe(struct pci_dev *pdev, const - */ - hd->cmdPtr = NULL; - -- /* Initialize this IOC's timers -+ /* Initialize this SCSI Hosts' timers - * To use, set the timer expires field -- * and add_timer.Used for internally -- * generated commands. -+ * and add_timer - */ -- init_timer(&hd->InternalCmdTimer); -- hd->InternalCmdTimer.data = (unsigned long) hd; -- hd->InternalCmdTimer.function = mptscsih_InternalCmdTimer_expired; -- -- init_timer(&ioc->TMtimer); -- ioc->TMtimer.data = (unsigned long) ioc; -- ioc->TMtimer.function = mptscsih_TM_timeout; -+ init_timer(&hd->timer); -+ hd->timer.data = (unsigned long) hd; -+ hd->timer.function = mptscsih_timer_expired; - -- ioc->spi_data.Saf_Te = mpt_saf_te; -- hd->mpt_pq_filter = mpt_pq_filter; -+ ioc->spi_data.Saf_Te = mpt_saf_te; -+ hd->mpt_pq_filter = mpt_pq_filter; - - #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION - if (ioc->spi_data.maxBusWidth > mpt_width) -@@ -364,6 +388,7 @@ mptspi_probe(struct pci_dev *pdev, const - ioc->spi_data.maxSyncOffset = 0; - } - ioc->spi_data.mpt_dv = mpt_dv; -+ hd->negoNvram = 0; - - ddvprintk((MYIOC_s_INFO_FMT - "dv %x width %x factor %x saf_te %x mpt_pq_filter %x\n", -@@ -374,7 +399,7 @@ mptspi_probe(struct pci_dev *pdev, const - mpt_saf_te, - mpt_pq_filter)); - #else -- -+ hd->negoNvram = MPT_SCSICFG_USE_NVRAM; - ddvprintk((MYIOC_s_INFO_FMT - "saf_te %x mpt_pq_filter %x\n", - ioc->name, -@@ -387,18 +412,18 @@ mptspi_probe(struct pci_dev *pdev, const - ioc->spi_data.noQas |= MPT_TARGET_NO_NEGO_QAS; - else - ioc->spi_data.noQas = 0; --/* enable domain validation flags */ - - for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) --ioc->spi_data.dvStatus[ii] = -+ ioc->spi_data.dvStatus[ii] = -+ MPT_SCSICFG_NEGOTIATE; - --(MPT_SCSICFG_NEGOTIATE | MPT_SCSICFG_DV_NOT_DONE); -+ for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) -+ ioc->spi_data.dvStatus[ii] |= -+ MPT_SCSICFG_DV_NOT_DONE; - - init_waitqueue_head(&hd->scandv_waitq); - hd->scandv_wait_done = 0; - hd->last_queue_full = 0; -- init_waitqueue_head(&hd->TM_waitq); -- hd->TM_wait_done = 0; - - error = scsi_add_host (sh, &ioc->pcidev->dev); - if(error) { -@@ -414,10 +439,6 @@ ioc->spi_data.dvStatus[ii] = - 0, 0, 0, 0, 5 /* 5 second timeout */); - } - -- dnegoprintk((MYIOC_s_WARN_FMT "%s: writeSDP1: ALL_IDS\n", -- ioc->name, __FUNCTION__)); -- mpt_writeSDP1(ioc, 0, 0, MPT_SCSICFG_ALL_IDS); -- - scsi_scan_host(sh); - return 0; - -@@ -464,7 +485,7 @@ mptspi_init(void) - - if (mpt_event_register(mptspiDoneCtx, mptscsih_event_process) == 0) { - devtprintk((KERN_INFO MYNAM -- ": Registered for IOC event notifications mptspiDoneCtx=%08x\n", mptspiDoneCtx)); -+ ": Registered for IOC event notifications\n")); - } - - if (mpt_reset_register(mptspiDoneCtx, mptscsih_ioc_reset) == 0) { diff --git a/lustre/kernel_patches/patches/netpoll_xmit_lock-2.6-suse.patch b/lustre/kernel_patches/patches/netpoll_xmit_lock-2.6-suse.patch deleted file mode 100644 index ec28f18dbe..0000000000 --- a/lustre/kernel_patches/patches/netpoll_xmit_lock-2.6-suse.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- linux-2.6.orig/net/core/netpoll.c 2007-12-18 21:58:41.000000000 +0800 -+++ linux-2.6/net/core/netpoll.c 2007-12-18 21:59:01.000000000 +0800 -@@ -160,6 +160,11 @@ repeat: - return; - } - -+ if(np->dev->xmit_lock_owner == smp_processor_id()) { -+ __kfree_skb(skb); -+ return; -+ } -+ - spin_lock(&np->dev->xmit_lock); - np->dev->xmit_lock_owner = smp_processor_id(); - diff --git a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc3.patch b/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc3.patch deleted file mode 100644 index c75d7e8d0f..0000000000 --- a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc3.patch +++ /dev/null @@ -1,127 +0,0 @@ -Index: linux-2.6.10/fs/cifs/dir.c -=================================================================== ---- linux-2.6.10.orig/fs/cifs/dir.c -+++ linux-2.6.10/fs/cifs/dir.c -@@ -199,23 +199,23 @@ cifs_create(struct inode *inode, struct - } - - if(nd) { -- if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY) -+ if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY) - desiredAccess = GENERIC_READ; -- else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) { -+ else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) { - desiredAccess = GENERIC_WRITE; - write_only = TRUE; -- } else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) { -+ } else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) { - /* GENERIC_ALL is too much permission to request */ - /* can cause unnecessary access denied on create */ - /* desiredAccess = GENERIC_ALL; */ - desiredAccess = GENERIC_READ | GENERIC_WRITE; - } - -- if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) -+ if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) - disposition = FILE_CREATE; -- else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC)) -+ else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC)) - disposition = FILE_OVERWRITE_IF; -- else if((nd->intent.open.flags & O_CREAT) == O_CREAT) -+ else if((nd->intent.it_flags & O_CREAT) == O_CREAT) - disposition = FILE_OPEN_IF; - else { - cFYI(1,("Create flag not set in create function")); -Index: linux-2.6.10/fs/nfs/nfs4proc.c -=================================================================== ---- linux-2.6.10.orig/fs/nfs/nfs4proc.c -+++ linux-2.6.10/fs/nfs/nfs4proc.c -@@ -775,17 +775,17 @@ nfs4_atomic_open(struct inode *dir, stru - struct nfs4_state *state; - - if (nd->flags & LOOKUP_CREATE) { -- attr.ia_mode = nd->intent.open.create_mode; -+ attr.ia_mode = nd->intent.it_create_mode; - attr.ia_valid = ATTR_MODE; - if (!IS_POSIXACL(dir)) - attr.ia_mode &= ~current->fs->umask; - } else { - attr.ia_valid = 0; -- BUG_ON(nd->intent.open.flags & O_CREAT); -+ BUG_ON(nd->intent.it_flags & O_CREAT); - } - - cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); -- state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred); -+ state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred); - put_rpccred(cred); - if (IS_ERR(state)) - return (struct inode *)state; -Index: linux-2.6.10/fs/nfs/dir.c -=================================================================== ---- linux-2.6.10.orig/fs/nfs/dir.c -+++ linux-2.6.10/fs/nfs/dir.c -@@ -718,7 +718,7 @@ int nfs_is_exclusive_create(struct inode - return 0; - if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE)) - return 0; -- return (nd->intent.open.flags & O_EXCL) != 0; -+ return (nd->intent.it_flags & O_EXCL) != 0; - } - - static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) -@@ -791,7 +791,7 @@ static int is_atomic_open(struct inode * - if (nd->flags & LOOKUP_DIRECTORY) - return 0; - /* Are we trying to write to a read only partition? */ -- if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) -+ if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) - return 0; - return 1; - } -@@ -812,7 +812,7 @@ static struct dentry *nfs_atomic_lookup( - dentry->d_op = NFS_PROTO(dir)->dentry_ops; - - /* Let vfs_create() deal with O_EXCL */ -- if (nd->intent.open.flags & O_EXCL) -+ if (nd->intent.it_flags & O_EXCL) - goto no_entry; - - /* Open the file on the server */ -@@ -820,7 +820,7 @@ static struct dentry *nfs_atomic_lookup( - /* Revalidate parent directory attribute cache */ - nfs_revalidate_inode(NFS_SERVER(dir), dir); - -- if (nd->intent.open.flags & O_CREAT) { -+ if (nd->intent.it_flags & O_CREAT) { - nfs_begin_data_update(dir); - inode = nfs4_atomic_open(dir, dentry, nd); - nfs_end_data_update(dir); -@@ -836,7 +836,7 @@ static struct dentry *nfs_atomic_lookup( - break; - /* This turned out not to be a regular file */ - case -ELOOP: -- if (!(nd->intent.open.flags & O_NOFOLLOW)) -+ if (!(nd->intent.it_flags & O_NOFOLLOW)) - goto no_open; - /* case -EISDIR: */ - /* case -EINVAL: */ -@@ -875,7 +875,7 @@ static int nfs_open_revalidate(struct de - /* NFS only supports OPEN on regular files */ - if (!S_ISREG(inode->i_mode)) - goto no_open; -- openflags = nd->intent.open.flags; -+ openflags = nd->intent.it_flags; - /* We cannot do exclusive creation on a positive dentry */ - if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) - goto no_open; -@@ -1043,7 +1043,8 @@ static int nfs_create(struct inode *dir, - attr.ia_valid = ATTR_MODE; - - if (nd && (nd->flags & LOOKUP_CREATE)) -- open_flags = nd->intent.open.flags; -+ open_flags = nd->intent.it_flags; -+ - - /* - * The 0 argument passed into the create function should one day diff --git a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc5.patch b/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc5.patch deleted file mode 100644 index f445efef07..0000000000 --- a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc5.patch +++ /dev/null @@ -1,116 +0,0 @@ -Index: linux-2.6.16.i686/fs/cifs/dir.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/cifs/dir.c 2006-05-30 15:47:03.000000000 +0800 -+++ linux-2.6.16.i686/fs/cifs/dir.c 2006-05-30 21:11:39.000000000 +0800 -@@ -147,7 +147,7 @@ - } - - if(nd && (nd->flags & LOOKUP_OPEN)) { -- int oflags = nd->intent.open.flags; -+ int oflags = nd->intent.flags; - - desiredAccess = 0; - if (oflags & FMODE_READ) -Index: linux-2.6.16.i686/fs/nfs/dir.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/nfs/dir.c 2006-03-20 13:53:29.000000000 +0800 -+++ linux-2.6.16.i686/fs/nfs/dir.c 2006-05-30 21:10:01.000000000 +0800 -@@ -831,7 +831,7 @@ - return 0; - if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0) - return 0; -- return (nd->intent.open.flags & O_EXCL) != 0; -+ return (nd->intent.it_flags & O_EXCL) != 0; - } - - static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) -@@ -902,7 +902,7 @@ - if (nd->flags & LOOKUP_DIRECTORY) - return 0; - /* Are we trying to write to a read only partition? */ -- if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) -+ if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) - return 0; - return 1; - } -@@ -923,7 +923,7 @@ - dentry->d_op = NFS_PROTO(dir)->dentry_ops; - - /* Let vfs_create() deal with O_EXCL */ -- if (nd->intent.open.flags & O_EXCL) { -+ if (nd->intent.it_flags & O_EXCL) { - d_add(dentry, NULL); - goto out; - } -@@ -938,7 +938,7 @@ - goto out; - } - -- if (nd->intent.open.flags & O_CREAT) { -+ if (nd->intent.it_flags & O_CREAT) { - nfs_begin_data_update(dir); - res = nfs4_atomic_open(dir, dentry, nd); - nfs_end_data_update(dir); -@@ -957,7 +957,7 @@ - case -ENOTDIR: - goto no_open; - case -ELOOP: -- if (!(nd->intent.open.flags & O_NOFOLLOW)) -+ if (!(nd->intent.it_flags & O_NOFOLLOW)) - goto no_open; - /* case -EINVAL: */ - default: -@@ -993,7 +993,7 @@ - /* NFS only supports OPEN on regular files */ - if (!S_ISREG(inode->i_mode)) - goto no_open; -- openflags = nd->intent.open.flags; -+ openflags = nd->intent.it_flags; - /* We cannot do exclusive creation on a positive dentry */ - if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) - goto no_open; -@@ -1126,7 +1126,7 @@ - attr.ia_valid = ATTR_MODE; - - if (nd && (nd->flags & LOOKUP_CREATE)) -- open_flags = nd->intent.open.flags; -+ open_flags = nd->intent.it_flags; - - lock_kernel(); - nfs_begin_data_update(dir); -Index: linux-2.6.16.i686/fs/nfs/nfs4proc.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/nfs/nfs4proc.c 2006-03-20 13:53:29.000000000 +0800 -+++ linux-2.6.16.i686/fs/nfs/nfs4proc.c 2006-05-30 21:11:00.000000000 +0800 -@@ -1220,7 +1220,7 @@ - ctx = (struct nfs_open_context *)filp->private_data; - ctx->state = state; - } else -- nfs4_close_state(state, nd->intent.open.flags); -+ nfs4_close_state(state, nd->intent.flags); - } - - struct dentry * -@@ -1232,19 +1232,19 @@ - struct dentry *res; - - if (nd->flags & LOOKUP_CREATE) { -- attr.ia_mode = nd->intent.open.create_mode; -+ attr.ia_mode = nd->intent.create_mode; - attr.ia_valid = ATTR_MODE; - if (!IS_POSIXACL(dir)) - attr.ia_mode &= ~current->fs->umask; - } else { - attr.ia_valid = 0; -- BUG_ON(nd->intent.open.flags & O_CREAT); -+ BUG_ON(nd->intent.flags & O_CREAT); - } - - cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); - if (IS_ERR(cred)) - return (struct dentry *)cred; -- state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred); -+ state = nfs4_do_open(dir, dentry, nd->intent.flags, &attr, cred); - put_rpccred(cred); - if (IS_ERR(state)) { - if (PTR_ERR(state) == -ENOENT) diff --git a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch b/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch deleted file mode 100644 index 0adb06c08a..0000000000 --- a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch +++ /dev/null @@ -1,135 +0,0 @@ -Index: linux-2.6.5-7.108/fs/nfs/dir.c -=================================================================== ---- linux-2.6.5-7.108.orig/fs/nfs/dir.c 2004-09-15 19:26:43.012732408 +0300 -+++ linux-2.6.5-7.108/fs/nfs/dir.c 2004-09-15 20:03:32.882781096 +0300 -@@ -709,7 +709,7 @@ - return 0; - if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE)) - return 0; -- return (nd->intent.open.flags & O_EXCL) != 0; -+ return (nd->intent.it_flags & O_EXCL) != 0; - } - - static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) -@@ -782,7 +782,7 @@ - if (nd->flags & LOOKUP_DIRECTORY) - return 0; - /* Are we trying to write to a read only partition? */ -- if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) -+ if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) - return 0; - return 1; - } -@@ -803,7 +803,7 @@ - dentry->d_op = NFS_PROTO(dir)->dentry_ops; - - /* Let vfs_create() deal with O_EXCL */ -- if (nd->intent.open.flags & O_EXCL) -+ if (nd->intent.it_flags & O_EXCL) - goto no_entry; - - /* Open the file on the server */ -@@ -811,7 +811,7 @@ - /* Revalidate parent directory attribute cache */ - nfs_revalidate_inode(NFS_SERVER(dir), dir); - -- if (nd->intent.open.flags & O_CREAT) { -+ if (nd->intent.it_flags & O_CREAT) { - nfs_begin_data_update(dir); - inode = nfs4_atomic_open(dir, dentry, nd); - nfs_end_data_update(dir); -@@ -827,7 +827,7 @@ - break; - /* This turned out not to be a regular file */ - case -ELOOP: -- if (!(nd->intent.open.flags & O_NOFOLLOW)) -+ if (!(nd->intent.it_flags & O_NOFOLLOW)) - goto no_open; - /* case -EISDIR: */ - /* case -EINVAL: */ -@@ -861,7 +861,7 @@ - dir = parent->d_inode; - if (!is_atomic_open(dir, nd)) - goto no_open; -- openflags = nd->intent.open.flags; -+ openflags = nd->intent.it_flags; - if (openflags & O_CREAT) { - /* If this is a negative dentry, just drop it */ - if (!inode) -@@ -1026,7 +1026,7 @@ - attr.ia_valid = ATTR_MODE; - - if (nd && (nd->flags & LOOKUP_CREATE)) -- open_flags = nd->intent.open.flags; -+ open_flags = nd->intent.it_flags; - - /* - * The 0 argument passed into the create function should one day -Index: linux-2.6.5-7.108/fs/nfs/nfs4proc.c -=================================================================== ---- linux-2.6.5-7.108.orig/fs/nfs/nfs4proc.c 2004-04-04 06:37:39.000000000 +0300 -+++ linux-2.6.5-7.108/fs/nfs/nfs4proc.c 2004-09-15 20:03:32.885780640 +0300 -@@ -792,17 +792,17 @@ - struct nfs4_state *state; - - if (nd->flags & LOOKUP_CREATE) { -- attr.ia_mode = nd->intent.open.create_mode; -+ attr.ia_mode = nd->intent.it_create_mode; - attr.ia_valid = ATTR_MODE; - if (!IS_POSIXACL(dir)) - attr.ia_mode &= ~current->fs->umask; - } else { - attr.ia_valid = 0; -- BUG_ON(nd->intent.open.flags & O_CREAT); -+ BUG_ON(nd->intent.it_flags & O_CREAT); - } - - cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); -- state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred); -+ state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred); - put_rpccred(cred); - if (IS_ERR(state)) - return (struct inode *)state; -Index: linux-2.6.5-7.108/fs/cifs/dir.c -=================================================================== ---- linux-2.6.5-7.108.orig/fs/cifs/dir.c 2004-09-04 13:28:22.000000000 +0300 -+++ linux-2.6.5-7.108/fs/cifs/dir.c 2004-09-15 20:03:40.065689128 +0300 -@@ -173,23 +173,23 @@ - } - - if(nd) { -- if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY) -+ if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY) - desiredAccess = GENERIC_READ; -- else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) { -+ else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) { - desiredAccess = GENERIC_WRITE; - write_only = TRUE; -- } else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) { -+ } else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) { - /* GENERIC_ALL is too much permission to request */ - /* can cause unnecessary access denied on create */ - /* desiredAccess = GENERIC_ALL; */ - desiredAccess = GENERIC_READ | GENERIC_WRITE; - } - -- if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) -+ if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) - disposition = FILE_CREATE; -- else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC)) -+ else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC)) - disposition = FILE_OVERWRITE_IF; -- else if((nd->intent.open.flags & O_CREAT) == O_CREAT) -+ else if((nd->intent.it_flags & O_CREAT) == O_CREAT) - disposition = FILE_OPEN_IF; - else { - cFYI(1,("Create flag not set in create function")); -@@ -359,7 +359,7 @@ - parent_dir_inode, direntry->d_name.name, direntry)); - - if(nd) { /* BB removeme */ -- cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.open.flags)); -+ cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.it_flags)); - } /* BB removeme BB */ - /* BB Add check of incoming data - e.g. frame not longer than maximum SMB - let server check the namelen BB */ - diff --git a/lustre/kernel_patches/patches/qsnet-rhel4-2.6.patch b/lustre/kernel_patches/patches/qsnet-rhel4-2.6.patch deleted file mode 100644 index 6d584b4b7a..0000000000 --- a/lustre/kernel_patches/patches/qsnet-rhel4-2.6.patch +++ /dev/null @@ -1,1741 +0,0 @@ -Index: linux-269-5502/fs/open.c -=================================================================== ---- linux-269-5502.orig/fs/open.c -+++ linux-269-5502/fs/open.c -@@ -1029,6 +1029,8 @@ out_error: - goto out; - } - -+EXPORT_SYMBOL(sys_open); -+ - #ifndef __alpha__ - - /* -Index: linux-269-5502/fs/read_write.c -=================================================================== ---- linux-269-5502.orig/fs/read_write.c -+++ linux-269-5502/fs/read_write.c -@@ -145,6 +145,7 @@ asmlinkage off_t sys_lseek(unsigned int - bad: - return retval; - } -+EXPORT_SYMBOL(sys_lseek); - - #ifdef __ARCH_WANT_SYS_LLSEEK - asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, -Index: linux-269-5502/fs/select.c -=================================================================== ---- linux-269-5502.orig/fs/select.c -+++ linux-269-5502/fs/select.c -@@ -539,3 +539,4 @@ out_fds: - poll_freewait(&table); - return err; - } -+EXPORT_SYMBOL_GPL(sys_poll); -Index: linux-269-5502/fs/exec.c -=================================================================== ---- linux-269-5502.orig/fs/exec.c -+++ linux-269-5502/fs/exec.c -@@ -56,6 +56,8 @@ - #include <linux/kmod.h> - #endif - -+#include <linux/ptrack.h> -+ - int core_uses_pid; - char core_pattern[65] = "core"; - int suid_dumpable = 0; -@@ -1214,6 +1216,9 @@ int do_execve(char * filename, - if (retval < 0) - goto out; - -+ /* notify any ptrack callbacks of the process exec */ -+ ptrack_call_callbacks(PTRACK_PHASE_EXEC, NULL); -+ - retval = search_binary_handler(bprm,regs); - if (retval >= 0) { - free_arg_pages(bprm); -Index: linux-269-5502/arch/i386/Kconfig -=================================================================== ---- linux-269-5502.orig/arch/i386/Kconfig -+++ linux-269-5502/arch/i386/Kconfig -@@ -960,6 +960,9 @@ config REGPARM - generate incorrect output with certain kernel constructs when - -mregparm=3 is used. - -+source "mm/Kconfig" -+source "kernel/Kconfig" -+ - endmenu - - -Index: linux-269-5502/arch/i386/defconfig -=================================================================== ---- linux-269-5502.orig/arch/i386/defconfig -+++ linux-269-5502/arch/i386/defconfig -@@ -119,6 +119,8 @@ CONFIG_MTRR=y - CONFIG_IRQBALANCE=y - CONFIG_HAVE_DEC_LOCK=y - # CONFIG_REGPARM is not set -+CONFIG_IOPROC=y -+CONFIG_PTRACK=y - - # - # Power management options (ACPI, APM) -Index: linux-269-5502/arch/ia64/Kconfig -=================================================================== ---- linux-269-5502.orig/arch/ia64/Kconfig -+++ linux-269-5502/arch/ia64/Kconfig -@@ -316,6 +316,9 @@ config IA64_PALINFO - To use this option, you have to ensure that the "/proc file system - support" (CONFIG_PROC_FS) is enabled, too. - -+source "mm/Kconfig" -+source "kernel/Kconfig" -+ - source "drivers/firmware/Kconfig" - - source "fs/Kconfig.binfmt" -Index: linux-269-5502/arch/ia64/defconfig -=================================================================== ---- linux-269-5502.orig/arch/ia64/defconfig -+++ linux-269-5502/arch/ia64/defconfig -@@ -83,6 +83,8 @@ CONFIG_IA32_SUPPORT=y - CONFIG_COMPAT=y - CONFIG_PERFMON=y - CONFIG_IA64_PALINFO=y -+CONFIG_IOPROC=y -+CONFIG_PTRACK=y - - # - # Firmware Drivers -Index: linux-269-5502/arch/x86_64/Kconfig -=================================================================== ---- linux-269-5502.orig/arch/x86_64/Kconfig -+++ linux-269-5502/arch/x86_64/Kconfig -@@ -401,6 +401,9 @@ config X86_MCE_AMD - Additional support for AMD specific MCE features such as - the DRAM Error Threshold. - -+source "mm/Kconfig" -+source "kernel/Kconfig" -+ - endmenu - - -Index: linux-269-5502/arch/x86_64/defconfig -=================================================================== ---- linux-269-5502.orig/arch/x86_64/defconfig -+++ linux-269-5502/arch/x86_64/defconfig -@@ -87,6 +87,8 @@ CONFIG_NR_CPUS=8 - CONFIG_GART_IOMMU=y - CONFIG_SWIOTLB=y - CONFIG_X86_MCE=y -+CONFIG_IOPROC=y -+CONFIG_PTRACK=y - - # - # Power management options -Index: linux-269-5502/kernel/ptrack.c -=================================================================== ---- /dev/null -+++ linux-269-5502/kernel/ptrack.c -@@ -0,0 +1,145 @@ -+/* -+ * Copyright (C) 2000 Regents of the University of California -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Derived from exit_actn.c by -+ * Copyright (C) 2003 Quadrics Ltd. -+ */ -+ -+ -+#include <linux/module.h> -+#include <linux/spinlock.h> -+#include <linux/sched.h> -+#include <linux/ptrack.h> -+#include <linux/slab.h> -+#include <linux/list.h> -+ -+#include <asm/errno.h> -+ -+int -+ptrack_register (ptrack_callback_t callback, void *arg) -+{ -+ struct ptrack_desc *desc = kmalloc (sizeof (struct ptrack_desc), GFP_KERNEL); -+ -+ if (desc == NULL) -+ return -ENOMEM; -+ -+ desc->callback = callback; -+ desc->arg = arg; -+ -+ list_add_tail (&desc->link, ¤t->ptrack_list); -+ -+ return 0; -+} -+ -+void -+ptrack_deregister (ptrack_callback_t callback, void *arg) -+{ -+ struct list_head *el, *nel; -+ -+ list_for_each_safe (el, nel, ¤t->ptrack_list) { -+ struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link); -+ -+ if (desc->callback == callback && desc->arg == arg) { -+ list_del (&desc->link); -+ kfree (desc); -+ } -+ } -+} -+ -+int -+ptrack_registered (ptrack_callback_t callback, void *arg) -+{ -+ struct list_head *el; -+ -+ list_for_each (el, ¤t->ptrack_list) { -+ struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link); -+ -+ if (desc->callback == callback && desc->arg == arg) -+ return 1; -+ } -+ return 0; -+} -+ -+int -+ptrack_call_callbacks (int phase, struct task_struct *child) -+{ -+ struct list_head *el, *nel; -+ struct ptrack_desc *new; -+ int res; -+ -+ if (phase == PTRACK_PHASE_CLONE) -+ INIT_LIST_HEAD (&child->ptrack_list); -+ -+ list_for_each_safe (el, nel, ¤t->ptrack_list) { -+ struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link); -+ -+ res = desc->callback (desc->arg, phase, child); -+ -+ switch (phase) -+ { -+ case PTRACK_PHASE_EXIT: -+ list_del (&desc->link); -+ kfree (desc); -+ break; -+ -+ case PTRACK_PHASE_CLONE: -+ switch (res) -+ { -+ case PTRACK_FINISHED: -+ break; -+ -+ case PTRACK_INNHERIT: -+ if ((new = kmalloc (sizeof (struct ptrack_desc), GFP_ATOMIC)) == NULL) -+ { -+ /* allocation failed - notify that this process is not going -+ * to be started by signalling clone failure. -+ */ -+ desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child); -+ -+ goto failed; -+ } -+ -+ new->callback = desc->callback; -+ new->arg = desc->arg; -+ -+ list_add_tail (&new->link, &child->ptrack_list); -+ break; -+ -+ case PTRACK_DENIED: -+ goto failed; -+ } -+ break; -+ } -+ } -+ -+ return 0; -+ -+ failed: -+ while (! list_empty (&child->ptrack_list)) -+ { -+ struct ptrack_desc *desc = list_entry (child->ptrack_list.next, struct ptrack_desc, link); -+ -+ desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child); -+ -+ list_del (&desc->link); -+ kfree (desc); -+ } -+ return 1; -+} -+EXPORT_SYMBOL(ptrack_register); -+EXPORT_SYMBOL(ptrack_deregister); -+EXPORT_SYMBOL(ptrack_registered); -Index: linux-269-5502/kernel/signal.c -=================================================================== ---- linux-269-5502.orig/kernel/signal.c -+++ linux-269-5502/kernel/signal.c -@@ -2329,6 +2329,7 @@ sys_kill(int pid, int sig) - - return kill_something_info(sig, &info, pid); - } -+EXPORT_SYMBOL_GPL(sys_kill); - - /** - * sys_tgkill - send signal to one specific thread -Index: linux-269-5502/kernel/Kconfig -=================================================================== ---- /dev/null -+++ linux-269-5502/kernel/Kconfig -@@ -0,0 +1,14 @@ -+# -+# Kernel subsystem specific config -+# -+ -+# Support for Process Tracking callbacks -+# -+config PTRACK -+ bool "Enable PTRACK process tracking hooks" -+ default y -+ help -+ This option enables hooks to be called when processes are -+ created and destoryed in order for a resource management -+ system to know which processes are a member of a "job" and -+ to be able to clean up when the job is terminated. -Index: linux-269-5502/kernel/Makefile -=================================================================== ---- linux-269-5502.orig/kernel/Makefile -+++ linux-269-5502/kernel/Makefile -@@ -26,6 +26,7 @@ obj-$(CONFIG_AUDIT) += audit.o - obj-$(CONFIG_AUDITSYSCALL) += auditsc.o - obj-$(CONFIG_AUDITFILESYSTEM) += auditfs.o - obj-$(CONFIG_KPROBES) += kprobes.o -+obj-$(CONFIG_PTRACK) += ptrack.o - - ifneq ($(CONFIG_IA64),y) - # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is -Index: linux-269-5502/kernel/exit.c -=================================================================== ---- linux-269-5502.orig/kernel/exit.c -+++ linux-269-5502/kernel/exit.c -@@ -32,6 +32,8 @@ - #include <asm/pgtable.h> - #include <asm/mmu_context.h> - -+#include <linux/ptrack.h> -+ - extern void sem_exit (void); - extern struct task_struct *child_reaper; - -@@ -825,6 +827,9 @@ asmlinkage NORET_TYPE void do_exit(long - current->tux_exit(); - } - -+ /* Notify any ptrack callbacks of the process exit */ -+ ptrack_call_callbacks(PTRACK_PHASE_EXIT, NULL); -+ - if (unlikely(tsk->audit_context)) - audit_free(tsk); - __exit_mm(tsk); -Index: linux-269-5502/kernel/fork.c -=================================================================== ---- linux-269-5502.orig/kernel/fork.c -+++ linux-269-5502/kernel/fork.c -@@ -14,6 +14,7 @@ - #include <linux/config.h> - #include <linux/slab.h> - #include <linux/init.h> -+#include <linux/ptrack.h> - #include <linux/unistd.h> - #include <linux/smp_lock.h> - #include <linux/module.h> -@@ -443,6 +444,9 @@ static struct mm_struct * mm_init(struct - mm->page_table_lock = SPIN_LOCK_UNLOCKED; - mm->ioctx_list_lock = RW_LOCK_UNLOCKED; - mm->ioctx_list = NULL; -+#ifdef CONFIG_IOPROC -+ mm->ioproc_ops = NULL; -+#endif - mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm); - mm->free_area_cache = TASK_UNMAPPED_BASE; - -@@ -1312,6 +1316,11 @@ long do_fork(unsigned long clone_flags, - set_tsk_thread_flag(p, TIF_SIGPENDING); - } - -+ if (ptrack_call_callbacks(PTRACK_PHASE_CLONE, p)) { -+ sigaddset(&p->pending.signal, SIGKILL); -+ set_tsk_thread_flag(p, TIF_SIGPENDING); -+ } -+ - if (!(clone_flags & CLONE_STOPPED)) - wake_up_new_task(p, clone_flags); - else -Index: linux-269-5502/Makefile -=================================================================== ---- linux-269-5502.orig/Makefile -+++ linux-269-5502/Makefile -@@ -1,7 +1,7 @@ - VERSION = 2 - PATCHLEVEL = 6 - SUBLEVEL = 9 --EXTRAVERSION = -prep -+EXTRAVERSION = -prep.qp3.5.34.4qsnet - RHEL_VERSION = 4 - RHEL_UPDATE = 5 - NAME=AC 1 -Index: linux-269-5502/Documentation/vm/ioproc.txt -=================================================================== ---- /dev/null -+++ linux-269-5502/Documentation/vm/ioproc.txt -@@ -0,0 +1,467 @@ -+Linux IOPROC patch overview -+=========================== -+ -+The network interface for an HPC network differs significantly from -+network interfaces for traditional IP networks. HPC networks tend to -+be used directly from user processes and perform large RDMA transfers -+between theses processes address space. They also have a requirement -+for low latency communication, and typically achieve this by OS bypass -+techniques. This then requires a different model to traditional -+interconnects, in that a process may need to expose a large amount of -+it's address space to the network RDMA. -+ -+Locking down of memory has been a common mechanism for performing -+this, together with a pin-down cache implemented in user -+libraries. The disadvantage of this method is that large portions of -+the physical memory can be locked down for a single process, even if -+it's working set changes over the different phases of it's -+execution. This leads to inefficient memory utilisation - akin to the -+disadvantage of swapping compared to paging. -+ -+This model also has problems where memory is being dynamically -+allocated and freed, since the pin down cache is unaware that memory -+may have been released by a call to munmap() and so it will still be -+locking down the now unused pages. -+ -+Some modern HPC network interfaces implement their own MMU and are -+able to handle a translation fault during a network access. The -+Quadrics (http://www.quadrics.com) devices (Elan3 and Elan4) have done -+this for some time and we expect others to follow the same route in -+the relatively near future. These NICs are able to operate in an -+environment where paging occurs and do not require memory to be locked -+down. The advantage of this is that the user process can expose large -+portions of it's address space without having to worry about physical -+memory constraints. -+ -+However should the operating system decide to swap a page to disk, -+then the NIC must be made aware that it should no longer read/write -+from this memory, but should generate a translation fault instead. -+ -+The ioproc patch has been developed to provide a mechanism whereby the -+device driver for a NIC can be aware of when a user process's address -+translations change, either by paging or by explicitly mapping or -+unmapping memory. -+ -+The patch involves inserting callbacks where translations are being -+invalidated to notify the NIC that the memory behind those -+translations is no longer visible to the application (and so should -+not be visible to the NIC). This callback is then responsible for -+ensuring that the NIC will not access the physical memory that was -+being mapped. -+ -+An ioproc invalidate callback in the kswapd code could be utilised to -+prevent memory from being paged out if the NIC is unable to support -+network page faulting. -+ -+For NICs which support network page faulting, there is no requirement -+for a user level pin down cache, since they are able to page-in their -+translations on the first communication using a buffer. However this -+is likely to be inefficient, resulting in slow first use of the -+buffer. If the communication buffers were continually allocated and -+freed using mmap based malloc() calls then this would lead to all -+communications being slower than desirable. -+ -+To optimise these warm-up cases the ioproc patch adds calls to -+ioproc_update wherever the kernel is creating translations for a user -+process. These then allows the device driver to preload translations -+so that they are already present for the first network communication -+from a buffer. -+ -+Linux 2.6 IOPROC implementation details -+======================================= -+ -+The Linux IOPROC patch adds hooks to the Linux VM code whenever page -+table entries are being created and/or invalidated. IOPROC device -+drivers can register their interest in being informed of such changes -+by registering an ioproc_ops structure which is defined as follows; -+ -+extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip); -+extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip); -+ -+typedef struct ioproc_ops { -+ struct ioproc_ops *next; -+ void *arg; -+ -+ void (*release)(void *arg, struct mm_struct *mm); -+ void (*sync_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ void (*invalidate_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ void (*update_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ -+ void (*change_protection)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot); -+ -+ void (*sync_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ void (*invalidate_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ void (*update_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ -+} ioproc_ops_t; -+ -+ioproc_register_ops -+=================== -+This function should be called by the IOPROC device driver to register -+it's interest in PTE changes for the process associated with the passed -+in mm_struct. -+ -+The ioproc registration is not inherited across fork() and should be -+called once for each process that IOPROC is interested in. -+ -+This function must be called whilst holding the mm->page_table_lock. -+ -+ioproc_unregister_ops -+===================== -+This function should be called by the IOPROC device driver when it no -+longer requires informing of PTE changes in the process associated -+with the supplied mm_struct. -+ -+This function is not normally needed to be called as the ioproc_ops -+struct is unlinked from the associated mm_struct during the -+ioproc_release() call. -+ -+This function must be called whilst holding the mm->page_table_lock. -+ -+ioproc_ops struct -+================= -+A linked list ioproc_ops structures is hung off the user process -+mm_struct (linux/sched.h). At each hook point in the patched kernel, -+the ioproc patch will call the associated ioproc_ops callback function -+pointer in turn for each registered structure. -+ -+The intention of the callbacks is to allow the IOPROC device driver to -+inspect the new or modified PTE entry via the Linux kernel -+(e.g. find_pte_map()). These callbacks should not modify the Linux -+kernel VM state or PTE entries. -+ -+The ioproc_ops callback function pointers are: -+ -+ioproc_release -+============== -+The release hook is called when a program exits and all it's vma areas -+are torn down and unmapped, i.e. during exit_mmap(). Before each -+release hook is called the ioproc_ops structure is unlinked from the -+mm_struct. -+ -+No locks are required as the process has the only reference to the mm -+at this point. -+ -+ioproc_sync_[range|page] -+======================== -+The sync hooks are called when a memory map is synchronised with its -+disk image i.e. when the msync() syscall is invoked. Any future read -+or write by the IOPROC device to the associated pages should cause the -+page to be marked as referenced or modified. -+ -+Called holding the mm->page_table_lock. -+ -+ioproc_invalidate_[range|page] -+============================== -+The invalidate hooks are called whenever a valid PTE is unloaded -+e.g. when a page is unmapped by the user or paged out by the -+kernel. After this call the IOPROC must not access the physical memory -+again unless a new translation is loaded. -+ -+Called holding the mm->page_table_lock. -+ -+ioproc_update_[range|page] -+========================== -+The update hooks are called whenever a valid PTE is loaded -+e.g. mmaping memory, moving the brk up, when breaking COW or faulting -+in an anonymous page of memory. These give the IOPROC device the -+opportunity to load translations speculatively, which can improve -+performance by avoiding device translation faults. -+ -+Called holding the mm->page_table_lock. -+ -+ioproc_change_protection -+======================== -+This hook is called when the protection on a region of memory is -+changed i.e. when the mprotect() syscall is invoked. -+ -+The IOPROC must not be able to write to a read-only page, so if the -+permissions are downgraded then it must honour them. If they are -+upgraded it can treat this in the same way as the -+ioproc_update_[range|page]() calls. -+ -+Called holding the mm->page_table_lock. -+ -+ -+Linux 2.6 IOPROC patch details -+============================== -+ -+Here are the specific details of each ioproc hook added to the Linux -+2.6 VM system and the reasons for doing so: -+ -+++++ FILE -+ mm/fremap.c -+ -+==== FUNCTION -+ zap_pte -+ -+CALLED FROM -+ install_page -+ install_file_pte -+ -+PTE MODIFICATION -+ ptep_clear_flush -+ -+ADDED HOOKS -+ ioproc_invalidate_page -+ -+==== FUNCTION -+ install_page -+ -+CALLED FROM -+ filemap_populate, shmem_populate -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+==== FUNCTION -+ install_file_pte -+ -+CALLED FROM -+ filemap_populate, shmem_populate -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+++++ FILE -+ mm/memory.c -+ -+==== FUNCTION -+ zap_page_range -+ -+CALLED FROM -+ read_zero_pagealigned, madvise_dontneed, unmap_mapping_range, -+ unmap_mapping_range_list, do_mmap_pgoff -+ -+PTE MODIFICATION -+ set_pte (unmap_vmas) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ -+ -+==== FUNCTION -+ zeromap_page_range -+ -+CALLED FROM -+ read_zero_pagealigned, mmap_zero -+ -+PTE MODIFICATION -+ set_pte (zeromap_pte_range) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ ioproc_update_range -+ -+ -+==== FUNCTION -+ remap_page_range -+ -+CALLED FROM -+ many device drivers -+ -+PTE MODIFICATION -+ set_pte (remap_pte_range) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ ioproc_update_range -+ -+ -+==== FUNCTION -+ break_cow -+ -+CALLED FROM -+ do_wp_page -+ -+PTE MODIFICATION -+ ptep_establish -+ -+ADDED HOOKS -+ ioproc_invalidate_page -+ ioproc_update_page -+ -+ -+==== FUNCTION -+ do_wp_page -+ -+CALLED FROM -+ do_swap_page, handle_pte_fault -+ -+PTE MODIFICATION -+ ptep_set_access_flags -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+==== FUNCTION -+ do_swap_page -+ -+CALLED FROM -+ handle_pte_fault -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+==== FUNCTION -+ do_anonymous_page -+ -+CALLED FROM -+ do_no_page -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+==== FUNCTION -+ do_no_page -+ -+CALLED FROM -+ do_file_page, handle_pte_fault -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+++++ FILE -+ mm/mmap.c -+ -+==== FUNCTION -+ unmap_region -+ -+CALLED FROM -+ do_munmap -+ -+PTE MODIFICATION -+ set_pte (unmap_vmas) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ -+ -+==== FUNCTION -+ exit_mmap -+ -+CALLED FROM -+ mmput -+ -+PTE MODIFICATION -+ set_pte (unmap_vmas) -+ -+ADDED HOOKS -+ ioproc_release -+ -+ -+++++ FILE -+ mm/mprotect.c -+ -+==== FUNCTION -+ change_protection -+ -+CALLED FROM -+ mprotect_fixup -+ -+PTE MODIFICATION -+ set_pte (change_pte_range) -+ -+ADDED HOOKS -+ ioproc_change_protection -+ -+ -+++++ FILE -+ mm/mremap.c -+ -+==== FUNCTION -+ move_page_tables -+ -+CALLED FROM -+ move_vma -+ -+PTE MODIFICATION -+ ptep_clear_flush (move_one_page) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ ioproc_invalidate_range -+ -+ -+++++ FILE -+ mm/rmap.c -+ -+==== FUNCTION -+ try_to_unmap_one -+ -+CALLED FROM -+ try_to_unmap_anon, try_to_unmap_file -+ -+PTE MODIFICATION -+ ptep_clear_flush -+ -+ADDED HOOKS -+ ioproc_invalidate_page -+ -+ -+==== FUNCTION -+ try_to_unmap_cluster -+ -+CALLED FROM -+ try_to_unmap_file -+ -+PTE MODIFICATION -+ ptep_clear_flush -+ -+ADDED HOOKS -+ ioproc_invalidate_page -+ -+ -+ -+++++ FILE -+ mm/msync.c -+ -+==== FUNCTION -+ filemap_sync -+ -+CALLED FROM -+ msync_interval -+ -+PTE MODIFICATION -+ ptep_clear_flush_dirty (filemap_sync_pte) -+ -+ADDED HOOKS -+ ioproc_sync_range -+ -+ -+++++ FILE -+ mm/hugetlb.c -+ -+==== FUNCTION -+ zap_hugepage_range -+ -+CALLED FROM -+ hugetlb_vmtruncate_list -+ -+PTE MODIFICATION -+ ptep_get_and_clear (unmap_hugepage_range) -+ -+ADDED HOOK -+ ioproc_invalidate_range -+ -+-- Last update Daniel J Blueman - 24 Mar 2006 -Index: linux-269-5502/mm/ioproc.c -=================================================================== ---- /dev/null -+++ linux-269-5502/mm/ioproc.c -@@ -0,0 +1,52 @@ -+/* -+ * Copyright (C) 2006 Quadrics Ltd -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+/* -+ * Registration for IO processor page table updates. -+ */ -+ -+#include <linux/kernel.h> -+#include <linux/module.h> -+ -+#include <linux/mm.h> -+#include <linux/ioproc.h> -+ -+int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip) -+{ -+ ip->next = mm->ioproc_ops; -+ mm->ioproc_ops = ip; -+ -+ return 0; -+} -+ -+EXPORT_SYMBOL_GPL(ioproc_register_ops); -+ -+int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip) -+{ -+ struct ioproc_ops **tmp; -+ -+ for (tmp = &mm->ioproc_ops; *tmp && *tmp != ip; tmp = &(*tmp)->next) ; -+ if (*tmp) { -+ *tmp = ip->next; -+ return 0; -+ } -+ -+ return -EINVAL; -+} -+ -+EXPORT_SYMBOL_GPL(ioproc_unregister_ops); -Index: linux-269-5502/mm/hugetlb.c -=================================================================== ---- linux-269-5502.orig/mm/hugetlb.c -+++ linux-269-5502/mm/hugetlb.c -@@ -10,6 +10,7 @@ - #include <linux/hugetlb.h> - #include <linux/sysctl.h> - #include <linux/highmem.h> -+#include <linux/ioproc.h> - - const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL; - static unsigned long nr_huge_pages, free_huge_pages; -@@ -260,6 +261,7 @@ void zap_hugepage_range(struct vm_area_s - struct mm_struct *mm = vma->vm_mm; - - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, start, start + length); - unmap_hugepage_range(vma, start, start + length); - spin_unlock(&mm->page_table_lock); - } -Index: linux-269-5502/mm/Kconfig -=================================================================== ---- /dev/null -+++ linux-269-5502/mm/Kconfig -@@ -0,0 +1,15 @@ -+# -+# VM subsystem specific config -+# -+ -+# Support for IO processors which have advanced RDMA capabilities -+# -+config IOPROC -+ bool "Enable IOPROC VM hooks" -+ depends on MMU -+ default y -+ help -+ This option enables hooks in the VM subsystem so that IO devices which -+ incorporate advanced RDMA capabilities can be kept in sync with CPU -+ page table changes. -+ See Documentation/vm/ioproc.txt for more details. -Index: linux-269-5502/mm/Makefile -=================================================================== ---- linux-269-5502.orig/mm/Makefile -+++ linux-269-5502/mm/Makefile -@@ -16,6 +16,7 @@ obj-$(CONFIG_SWAP) += page_io.o swap_sta - obj-$(CONFIG_X86_4G) += usercopy.o - obj-$(CONFIG_HUGETLBFS) += hugetlb.o - obj-$(CONFIG_NUMA) += mempolicy.o -+obj-$(CONFIG_IOPROC) += ioproc.o - obj-$(CONFIG_SHMEM) += shmem.o - obj-$(CONFIG_TINY_SHMEM) += tiny-shmem.o - -Index: linux-269-5502/mm/mprotect.c -=================================================================== ---- linux-269-5502.orig/mm/mprotect.c -+++ linux-269-5502/mm/mprotect.c -@@ -10,6 +10,7 @@ - - #include <linux/mm.h> - #include <linux/hugetlb.h> -+#include <linux/ioproc.h> - #include <linux/slab.h> - #include <linux/shm.h> - #include <linux/mman.h> -@@ -100,6 +101,7 @@ change_protection(struct vm_area_struct - if (start >= end) - BUG(); - spin_lock(¤t->mm->page_table_lock); -+ ioproc_change_protection(vma, start, end, newprot); - do { - change_pmd_range(dir, start, end - start, newprot); - start = (start + PGDIR_SIZE) & PGDIR_MASK; -Index: linux-269-5502/mm/msync.c -=================================================================== ---- linux-269-5502.orig/mm/msync.c -+++ linux-269-5502/mm/msync.c -@@ -12,6 +12,7 @@ - #include <linux/mm.h> - #include <linux/mman.h> - #include <linux/hugetlb.h> -+#include <linux/ioproc.h> - - #include <asm/pgtable.h> - #include <asm/tlbflush.h> -@@ -115,6 +116,7 @@ static int filemap_sync(struct vm_area_s - - if (address >= end) - BUG(); -+ ioproc_sync_range(vma, address, end); - do { - error |= filemap_sync_pmd_range(dir, address, end, vma, flags); - address = (address + PGDIR_SIZE) & PGDIR_MASK; -Index: linux-269-5502/mm/mremap.c -=================================================================== ---- linux-269-5502.orig/mm/mremap.c -+++ linux-269-5502/mm/mremap.c -@@ -9,6 +9,7 @@ - - #include <linux/mm.h> - #include <linux/hugetlb.h> -+#include <linux/ioproc.h> - #include <linux/slab.h> - #include <linux/shm.h> - #include <linux/mman.h> -@@ -148,6 +149,8 @@ static unsigned long move_page_tables(st - { - unsigned long offset; - -+ ioproc_invalidate_range(vma, old_addr, old_addr + len); -+ ioproc_invalidate_range(vma, new_addr, new_addr + len); - flush_cache_range(vma, old_addr, old_addr + len); - - /* -Index: linux-269-5502/mm/fremap.c -=================================================================== ---- linux-269-5502.orig/mm/fremap.c -+++ linux-269-5502/mm/fremap.c -@@ -12,6 +12,7 @@ - #include <linux/mman.h> - #include <linux/pagemap.h> - #include <linux/swapops.h> -+#include <linux/ioproc.h> - #include <linux/rmap.h> - #include <linux/module.h> - -@@ -29,6 +30,7 @@ static inline void zap_pte(struct mm_str - if (pte_present(pte)) { - unsigned long pfn = pte_pfn(pte); - -+ ioproc_invalidate_page(vma, addr); - flush_cache_page(vma, addr); - pte = ptep_clear_flush(vma, addr, ptep); - if (pfn_valid(pfn)) { -@@ -93,6 +95,7 @@ int install_page(struct mm_struct *mm, s - pte_val = *pte; - pte_unmap(pte); - update_mmu_cache(vma, addr, pte_val); -+ ioproc_update_page(vma, addr); - - err = 0; - err_unlock: -@@ -132,6 +135,7 @@ int install_file_pte(struct mm_struct *m - pte_val = *pte; - pte_unmap(pte); - update_mmu_cache(vma, addr, pte_val); -+ ioproc_update_page(vma, addr); - spin_unlock(&mm->page_table_lock); - return 0; - -Index: linux-269-5502/mm/rmap.c -=================================================================== ---- linux-269-5502.orig/mm/rmap.c -+++ linux-269-5502/mm/rmap.c -@@ -51,6 +51,7 @@ - #include <linux/slab.h> - #include <linux/init.h> - #include <linux/rmap.h> -+#include <linux/ioproc.h> - #include <linux/rcupdate.h> - - #include <asm/tlbflush.h> -@@ -566,6 +567,7 @@ static int try_to_unmap_one(struct page - } - - /* Nuke the page table entry. */ -+ ioproc_invalidate_page(vma, address); - flush_cache_page(vma, address); - pteval = ptep_clear_flush(vma, address, pte); - -@@ -673,6 +675,7 @@ static void try_to_unmap_cluster(unsigne - continue; - - /* Nuke the page table entry. */ -+ ioproc_invalidate_page(vma, address); - flush_cache_page(vma, address); - pteval = ptep_clear_flush(vma, address, pte); - -Index: linux-269-5502/mm/memory.c -=================================================================== ---- linux-269-5502.orig/mm/memory.c -+++ linux-269-5502/mm/memory.c -@@ -43,6 +43,7 @@ - #include <linux/swap.h> - #include <linux/highmem.h> - #include <linux/pagemap.h> -+#include <linux/ioproc.h> - #include <linux/rmap.h> - #include <linux/module.h> - #include <linux/init.h> -@@ -630,6 +631,7 @@ void zap_page_range(struct vm_area_struc - - lru_add_drain(); - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, address, end); - tlb = tlb_gather_mmu(mm, 0); - unmap_vmas(&tlb, mm, vma, address, end, &nr_accounted, details); - tlb_finish_mmu(tlb, address, end); -@@ -998,6 +1000,7 @@ int zeromap_page_range(struct vm_area_st - BUG(); - - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, beg, end); - do { - pmd_t *pmd = pmd_alloc(mm, dir, address); - error = -ENOMEM; -@@ -1012,6 +1015,7 @@ int zeromap_page_range(struct vm_area_st - /* - * Why flush? zeromap_pte_range has a BUG_ON for !pte_none() - */ -+ ioproc_update_range(vma, beg, end); - flush_tlb_range(vma, beg, end); - spin_unlock(&mm->page_table_lock); - return error; -@@ -1092,6 +1096,7 @@ int remap_page_range(struct vm_area_stru - vma->vm_flags |= VM_IO | VM_RESERVED; - - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, beg, end); - do { - pmd_t *pmd = pmd_alloc(mm, dir, from); - error = -ENOMEM; -@@ -1106,6 +1111,7 @@ int remap_page_range(struct vm_area_stru - /* - * Why flush? remap_pte_range has a BUG_ON for !pte_none() - */ -+ ioproc_update_range(vma, beg, end); - flush_tlb_range(vma, beg, end); - spin_unlock(&mm->page_table_lock); - return error; -@@ -1194,6 +1200,7 @@ static int do_wp_page(struct mm_struct * - update_mmu_cache(vma, address, entry); - lazy_mmu_prot_update(entry); - pte_unmap(page_table); -+ ioproc_update_page(vma, address); - spin_unlock(&mm->page_table_lock); - return VM_FAULT_MINOR; - } -@@ -1226,6 +1233,7 @@ static int do_wp_page(struct mm_struct * - ++mm->rss; - else - page_remove_rmap(old_page); -+ ioproc_invalidate_page(vma, address); - break_cow(vma, new_page, address, page_table); - lru_cache_add_active(new_page); - page_add_anon_rmap(new_page, vma, address); -@@ -1234,6 +1242,7 @@ static int do_wp_page(struct mm_struct * - new_page = old_page; - } - pte_unmap(page_table); -+ ioproc_update_page(vma, address); - page_cache_release(new_page); - page_cache_release(old_page); - spin_unlock(&mm->page_table_lock); -@@ -1630,6 +1639,7 @@ static int do_swap_page(struct mm_struct - update_mmu_cache(vma, address, pte); - lazy_mmu_prot_update(pte); - pte_unmap(page_table); -+ ioproc_update_page(vma, address); - spin_unlock(&mm->page_table_lock); - out: - return ret; -@@ -1695,6 +1705,7 @@ do_anonymous_page(struct mm_struct *mm, - /* No need to invalidate - it was non-present before */ - update_mmu_cache(vma, addr, entry); - lazy_mmu_prot_update(entry); -+ ioproc_update_page(vma, addr); - spin_unlock(&mm->page_table_lock); - out: - return VM_FAULT_MINOR; -@@ -1813,6 +1824,7 @@ retry: - - /* no need to invalidate: a not-present page shouldn't be cached */ - update_mmu_cache(vma, address, entry); -+ ioproc_update_page(vma, address); - spin_unlock(&mm->page_table_lock); - out: - return ret; -@@ -1998,6 +2010,7 @@ int make_pages_present(unsigned long add - return ret; - return ret == len ? 0 : -1; - } -+EXPORT_SYMBOL(make_pages_present); - - /* - * Map a vmalloc()-space virtual address to the physical page. -Index: linux-269-5502/mm/mmap.c -=================================================================== ---- linux-269-5502.orig/mm/mmap.c -+++ linux-269-5502/mm/mmap.c -@@ -15,6 +15,7 @@ - #include <linux/init.h> - #include <linux/file.h> - #include <linux/fs.h> -+#include <linux/ioproc.h> - #include <linux/personality.h> - #include <linux/security.h> - #include <linux/hugetlb.h> -@@ -1703,6 +1704,7 @@ static void unmap_region(struct mm_struc - unsigned long nr_accounted = 0; - - lru_add_drain(); -+ ioproc_invalidate_range(vma, start, end); - tlb = tlb_gather_mmu(mm, 0); - unmap_vmas(&tlb, mm, vma, start, end, &nr_accounted, NULL); - vm_unacct_memory(nr_accounted); -@@ -1995,6 +1997,7 @@ void exit_mmap(struct mm_struct *mm) - - spin_lock(&mm->page_table_lock); - -+ ioproc_release(mm); - tlb = tlb_gather_mmu(mm, 1); - flush_cache_mm(mm); - /* Use ~0UL here to ensure all VMAs in the mm are unmapped */ -Index: linux-269-5502/ipc/shm.c -=================================================================== ---- linux-269-5502.orig/ipc/shm.c -+++ linux-269-5502/ipc/shm.c -@@ -26,6 +26,7 @@ - #include <linux/proc_fs.h> - #include <linux/shmem_fs.h> - #include <linux/security.h> -+#include <linux/module.h> - #include <linux/audit.h> - #include <asm/uaccess.h> - -@@ -856,6 +857,44 @@ asmlinkage long sys_shmdt(char __user *s - return retval; - } - -+/* -+ * Mark all segments created by this process for destruction -+ */ -+int shm_cleanup (void) -+{ -+ int i; -+ -+ down(&shm_ids.sem); -+ -+ for (i = 0; i <= shm_ids.max_id; i++) { -+ struct shmid_kernel *shp; -+ -+ shp = shm_lock(i); -+ if (shp != NULL) { -+ /* mark this segment for destruction if we created it */ -+ if (current->pid == shp->shm_cprid) -+ { -+ /* copy of IPC_RMID code */ -+ if (shp->shm_nattch) { -+ shp->shm_flags |= SHM_DEST; -+ /* do not find it any more */ -+ shp->shm_perm.key = IPC_PRIVATE; -+ } else { -+ shm_destroy(shp); -+ continue; -+ } -+ } -+ -+ shm_unlock(shp); -+ } -+ } -+ -+ up(&shm_ids.sem); -+ -+ return 0; -+} -+EXPORT_SYMBOL_GPL(shm_cleanup); -+ - #ifdef CONFIG_PROC_FS - static int sysvipc_shm_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data) - { -Index: linux-269-5502/include/linux/init_task.h -=================================================================== ---- linux-269-5502.orig/include/linux/init_task.h -+++ linux-269-5502/include/linux/init_task.h -@@ -2,6 +2,7 @@ - #define _LINUX__INIT_TASK_H - - #include <linux/file.h> -+#include <linux/ptrack.h> - - #define INIT_FILES \ - { \ -@@ -112,6 +113,7 @@ extern struct group_info init_groups; - .proc_lock = SPIN_LOCK_UNLOCKED, \ - .switch_lock = SPIN_LOCK_UNLOCKED, \ - .journal_info = NULL, \ -+ INIT_TASK_PTRACK(tsk) \ - } - - -Index: linux-269-5502/include/linux/ioproc.h -=================================================================== ---- /dev/null -+++ linux-269-5502/include/linux/ioproc.h -@@ -0,0 +1,270 @@ -+/* -+ * Copyright (C) 2006 Quadrics Ltd -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+/* -+ * Callbacks for IO processor page table updates. -+ */ -+ -+#ifndef __LINUX_IOPROC_H__ -+#define __LINUX_IOPROC_H__ -+ -+#include <linux/sched.h> -+#include <linux/mm.h> -+ -+typedef struct ioproc_ops { -+ struct ioproc_ops *next; -+ void *arg; -+ -+ void (*release) (void *arg, struct mm_struct * mm); -+ void (*sync_range) (void *arg, struct vm_area_struct * vma, -+ unsigned long start, unsigned long end); -+ void (*invalidate_range) (void *arg, struct vm_area_struct * vma, -+ unsigned long start, unsigned long end); -+ void (*update_range) (void *arg, struct vm_area_struct * vma, -+ unsigned long start, unsigned long end); -+ -+ void (*change_protection) (void *arg, struct vm_area_struct * vma, -+ unsigned long start, unsigned long end, -+ pgprot_t newprot); -+ -+ void (*sync_page) (void *arg, struct vm_area_struct * vma, -+ unsigned long address); -+ void (*invalidate_page) (void *arg, struct vm_area_struct * vma, -+ unsigned long address); -+ void (*update_page) (void *arg, struct vm_area_struct * vma, -+ unsigned long address); -+ -+} ioproc_ops_t; -+ -+/* IOPROC Registration -+ * -+ * Called by the IOPROC device driver to register its interest in page table -+ * changes for the process associated with the supplied mm_struct -+ * -+ * The caller should first allocate and fill out an ioproc_ops structure with -+ * the function pointers initialised to the device driver specific code for -+ * each callback. If the device driver doesn't have code for a particular -+ * callback then it should set the function pointer to be NULL. -+ * The ioproc_ops arg parameter will be passed unchanged as the first argument -+ * to each callback function invocation. -+ * -+ * The ioproc registration is not inherited across fork() and should be called -+ * once for each process that the IOPROC device driver is interested in. -+ * -+ * Must be called holding the mm->page_table_lock -+ */ -+extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip); -+ -+/* IOPROC De-registration -+ * -+ * Called by the IOPROC device driver when it is no longer interested in page -+ * table changes for the process associated with the supplied mm_struct -+ * -+ * Normally this is not needed to be called as the ioproc_release() code will -+ * automatically unlink the ioproc_ops struct from the mm_struct as the -+ * process exits -+ * -+ * Must be called holding the mm->page_table_lock -+ */ -+extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip); -+ -+#ifdef CONFIG_IOPROC -+ -+/* IOPROC Release -+ * -+ * Called during exit_mmap() as all vmas are torn down and unmapped. -+ * -+ * Also unlinks the ioproc_ops structure from the mm list as it goes. -+ * -+ * No need for locks as the mm can no longer be accessed at this point -+ * -+ */ -+static inline void ioproc_release(struct mm_struct *mm) -+{ -+ struct ioproc_ops *cp; -+ -+ while ((cp = mm->ioproc_ops) != NULL) { -+ mm->ioproc_ops = cp->next; -+ -+ if (cp->release) -+ cp->release(cp->arg, mm); -+ } -+} -+ -+/* IOPROC SYNC RANGE -+ * -+ * Called when a memory map is synchronised with its disk image i.e. when the -+ * msync() syscall is invoked. Any future read or write to the associated -+ * pages by the IOPROC should cause the page to be marked as referenced or -+ * modified. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_sync_range(struct vm_area_struct *vma, unsigned long start, -+ unsigned long end) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->sync_range) -+ cp->sync_range(cp->arg, vma, start, end); -+} -+ -+/* IOPROC INVALIDATE RANGE -+ * -+ * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the -+ * user or paged out by the kernel. -+ * -+ * After this call the IOPROC must not access the physical memory again unless -+ * a new translation is loaded. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_invalidate_range(struct vm_area_struct *vma, unsigned long start, -+ unsigned long end) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->invalidate_range) -+ cp->invalidate_range(cp->arg, vma, start, end); -+} -+ -+/* IOPROC UPDATE RANGE -+ * -+ * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk -+ * up, when breaking COW or faulting in an anonymous page of memory. -+ * -+ * These give the IOPROC device driver the opportunity to load translations -+ * speculatively, which can improve performance by avoiding device translation -+ * faults. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_update_range(struct vm_area_struct *vma, unsigned long start, -+ unsigned long end) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->update_range) -+ cp->update_range(cp->arg, vma, start, end); -+} -+ -+/* IOPROC CHANGE PROTECTION -+ * -+ * Called when the protection on a region of memory is changed i.e. when the -+ * mprotect() syscall is invoked. -+ * -+ * The IOPROC must not be able to write to a read-only page, so if the -+ * permissions are downgraded then it must honour them. If they are upgraded -+ * it can treat this in the same way as the ioproc_update_[range|sync]() calls -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_change_protection(struct vm_area_struct *vma, unsigned long start, -+ unsigned long end, pgprot_t newprot) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->change_protection) -+ cp->change_protection(cp->arg, vma, start, end, -+ newprot); -+} -+ -+/* IOPROC SYNC PAGE -+ * -+ * Called when a memory map is synchronised with its disk image i.e. when the -+ * msync() syscall is invoked. Any future read or write to the associated page -+ * by the IOPROC should cause the page to be marked as referenced or modified. -+ * -+ * Not currently called as msync() calls ioproc_sync_range() instead -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_sync_page(struct vm_area_struct *vma, unsigned long addr) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->sync_page) -+ cp->sync_page(cp->arg, vma, addr); -+} -+ -+/* IOPROC INVALIDATE PAGE -+ * -+ * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the -+ * user or paged out by the kernel. -+ * -+ * After this call the IOPROC must not access the physical memory again unless -+ * a new translation is loaded. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_invalidate_page(struct vm_area_struct *vma, unsigned long addr) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->invalidate_page) -+ cp->invalidate_page(cp->arg, vma, addr); -+} -+ -+/* IOPROC UPDATE PAGE -+ * -+ * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk -+ * up, when breaking COW or faulting in an anoymous page of memory. -+ * -+ * These give the IOPROC device the opportunity to load translations -+ * speculatively, which can improve performance by avoiding device translation -+ * faults. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_update_page(struct vm_area_struct *vma, unsigned long addr) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->update_page) -+ cp->update_page(cp->arg, vma, addr); -+} -+ -+#else -+ -+/* ! CONFIG_IOPROC so make all hooks empty */ -+ -+#define ioproc_release(mm) do { } while (0) -+#define ioproc_sync_range(vma, start, end) do { } while (0) -+#define ioproc_invalidate_range(vma, start, end) do { } while (0) -+#define ioproc_update_range(vma, start, end) do { } while (0) -+#define ioproc_change_protection(vma, start, end, prot) do { } while (0) -+#define ioproc_sync_page(vma, addr) do { } while (0) -+#define ioproc_invalidate_page(vma, addr) do { } while (0) -+#define ioproc_update_page(vma, addr) do { } while (0) -+ -+#endif /* CONFIG_IOPROC */ -+#endif /* __LINUX_IOPROC_H__ */ -Index: linux-269-5502/include/linux/sched.h -=================================================================== ---- linux-269-5502.orig/include/linux/sched.h -+++ linux-269-5502/include/linux/sched.h -@@ -185,6 +185,9 @@ extern signed long schedule_timeout_unin - asmlinkage void schedule(void); - - struct namespace; -+#ifdef CONFIG_IOPROC -+struct ioproc_ops; -+#endif - - /* Maximum number of active map areas.. This is a random (large) number */ - #define DEFAULT_MAX_MAP_COUNT 65536 -@@ -260,6 +263,11 @@ struct mm_struct { - struct kioctx *ioctx_list; - - struct kioctx default_kioctx; -+ -+#ifdef CONFIG_IOPROC -+ /* hooks for io devices with advanced RDMA capabilities */ -+ struct ioproc_ops *ioproc_ops; -+#endif - }; - - extern int mmlist_nr; -@@ -635,6 +643,10 @@ struct task_struct { - struct mempolicy *mempolicy; - short il_next; /* could be shared with used_math */ - #endif -+#ifdef CONFIG_PTRACK -+/* process tracking callback */ -+ struct list_head ptrack_list; -+#endif - }; - - static inline pid_t process_group(struct task_struct *tsk) -Index: linux-269-5502/include/linux/ptrack.h -=================================================================== ---- /dev/null -+++ linux-269-5502/include/linux/ptrack.h -@@ -0,0 +1,65 @@ -+/* -+ * Copyright (C) 2000 Regents of the University of California -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Derived from exit_actn.c by -+ * Copyright (C) 2003 Quadrics Ltd. -+ * -+ */ -+#ifndef __LINUX_PTRACK_H -+#define __LINUX_PTRACK_H -+ -+/* -+ * Process tracking - this allows a module to keep track of processes -+ * in order that it can manage all tasks derived from a single process. -+ */ -+ -+#define PTRACK_PHASE_CLONE 1 -+#define PTRACK_PHASE_CLONE_FAIL 2 -+#define PTRACK_PHASE_EXEC 3 -+#define PTRACK_PHASE_EXIT 4 -+ -+#define PTRACK_FINISHED 0 -+#define PTRACK_INNHERIT 1 -+#define PTRACK_DENIED 2 -+ -+#ifdef CONFIG_PTRACK -+ -+typedef int (*ptrack_callback_t)(void *arg, int phase, struct task_struct *child); -+ -+struct ptrack_desc { -+ struct list_head link; -+ ptrack_callback_t callback; -+ void *arg; -+}; -+ -+extern int ptrack_register (ptrack_callback_t callback, void *arg); -+extern void ptrack_deregister (ptrack_callback_t callback, void *arg); -+extern int ptrack_registered (ptrack_callback_t callback, void *arg); -+ -+extern int ptrack_call_callbacks (int phase, struct task_struct *child); -+ -+#define INIT_TASK_PTRACK(tsk) \ -+ .ptrack_list = LIST_HEAD_INIT(tsk.ptrack_list) -+ -+#else -+#define ptrack_call_callbacks (phase, child) (0) -+ -+#define INIT_TASK_PTRACK(tsk) -+ -+#endif -+ -+#endif /* __LINUX_PTRACK_H */ -Index: linux-269-5502/include/asm-ia64/param.h -=================================================================== ---- linux-269-5502.orig/include/asm-ia64/param.h -+++ linux-269-5502/include/asm-ia64/param.h -@@ -27,7 +27,7 @@ - */ - # define HZ 32 - # else --# define HZ 1024 -+# define HZ 100 - # endif - # define USER_HZ HZ - # define CLOCKS_PER_SEC HZ /* frequency at which times() counts */ -Index: linux-269-5502/include/asm-i386/param.h -=================================================================== ---- linux-269-5502.orig/include/asm-i386/param.h -+++ linux-269-5502/include/asm-i386/param.h -@@ -2,7 +2,7 @@ - #define _ASMi386_PARAM_H - - #ifdef __KERNEL__ --# define HZ 1000 /* Internal kernel timer frequency */ -+# define HZ 100 /* Internal kernel timer frequency */ - # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ - # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ - #endif -Index: linux-269-5502/include/asm-x86_64/param.h -=================================================================== ---- linux-269-5502.orig/include/asm-x86_64/param.h -+++ linux-269-5502/include/asm-x86_64/param.h -@@ -2,7 +2,7 @@ - #define _ASMx86_64_PARAM_H - - #ifdef __KERNEL__ --# define HZ 1000 /* Internal kernel timer frequency */ -+# define HZ 100 /* Internal kernel timer frequency */ - # define USER_HZ 100 /* .. some user interfaces are in "ticks */ - #define CLOCKS_PER_SEC (USER_HZ) /* like times() */ - #endif diff --git a/lustre/kernel_patches/patches/qsnet-suse-2.6.patch b/lustre/kernel_patches/patches/qsnet-suse-2.6.patch deleted file mode 100644 index b312ab0332..0000000000 --- a/lustre/kernel_patches/patches/qsnet-suse-2.6.patch +++ /dev/null @@ -1,1690 +0,0 @@ -Index: LINUX-SRC-TREE/arch/i386/defconfig -=================================================================== ---- LINUX-SRC-TREE.orig/arch/i386/defconfig -+++ LINUX-SRC-TREE/arch/i386/defconfig -@@ -2932,3 +2932,5 @@ CONFIG_CFGNAME="default" - CONFIG_RELEASE="7.283" - CONFIG_X86_BIOS_REBOOT=y - CONFIG_PC=y -+CONFIG_IOPROC=y -+CONFIG_PTRACK=y -Index: LINUX-SRC-TREE/arch/i386/Kconfig -=================================================================== ---- LINUX-SRC-TREE.orig/arch/i386/Kconfig -+++ LINUX-SRC-TREE/arch/i386/Kconfig -@@ -1022,6 +1022,9 @@ config APM_REAL_MODE_POWER_OFF - a work-around for a number of buggy BIOSes. Switch this option on if - your computer crashes instead of powering off properly. - -+source "mm/Kconfig" -+source "kernel/Kconfig" -+ - endmenu - - source "arch/i386/kernel/cpu/cpufreq/Kconfig" -Index: LINUX-SRC-TREE/arch/i386/mm/hugetlbpage.c -=================================================================== ---- LINUX-SRC-TREE.orig/arch/i386/mm/hugetlbpage.c -+++ LINUX-SRC-TREE/arch/i386/mm/hugetlbpage.c -@@ -16,6 +16,7 @@ - #include <linux/err.h> - #include <linux/sysctl.h> - #include <linux/mempolicy.h> -+#include <linux/ioproc.h> - #include <asm/mman.h> - #include <asm/pgalloc.h> - #include <asm/tlb.h> -@@ -393,6 +394,7 @@ zap_hugepage_range(struct vm_area_struct - { - struct mm_struct *mm = vma->vm_mm; - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, start, start + length); - unmap_hugepage_range(vma, start, start + length); - spin_unlock(&mm->page_table_lock); - } -Index: LINUX-SRC-TREE/arch/ia64/defconfig -=================================================================== ---- LINUX-SRC-TREE.orig/arch/ia64/defconfig -+++ LINUX-SRC-TREE/arch/ia64/defconfig -@@ -104,6 +104,8 @@ CONFIG_IA64_PALINFO=y - CONFIG_EFI_VARS=y - CONFIG_BINFMT_ELF=y - CONFIG_BINFMT_MISC=m -+CONFIG_IOPROC=y -+CONFIG_PTRACK=y - - # - # Power management and ACPI -Index: LINUX-SRC-TREE/arch/ia64/Kconfig -=================================================================== ---- LINUX-SRC-TREE.orig/arch/ia64/Kconfig -+++ LINUX-SRC-TREE/arch/ia64/Kconfig -@@ -334,6 +334,8 @@ config EFI_VARS - To use this option, you have to check that the "/proc file system - support" (CONFIG_PROC_FS) is enabled, too. - -+source "mm/Kconfig" -+source "kernel/Kconfig" - source "fs/Kconfig.binfmt" - - endmenu -Index: LINUX-SRC-TREE/arch/ia64/mm/hugetlbpage.c -=================================================================== ---- LINUX-SRC-TREE.orig/arch/ia64/mm/hugetlbpage.c -+++ LINUX-SRC-TREE/arch/ia64/mm/hugetlbpage.c -@@ -19,6 +19,7 @@ - #include <linux/slab.h> - #include <linux/sysctl.h> - #include <linux/mempolicy.h> -+#include <linux/ioproc.h> - #include <asm/mman.h> - #include <asm/pgalloc.h> - #include <asm/tlb.h> -@@ -378,6 +379,7 @@ void zap_hugepage_range(struct vm_area_s - { - struct mm_struct *mm = vma->vm_mm; - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, start, start + length); - unmap_hugepage_range(vma, start, start + length); - spin_unlock(&mm->page_table_lock); - } -Index: LINUX-SRC-TREE/arch/x86_64/defconfig -=================================================================== ---- LINUX-SRC-TREE.orig/arch/x86_64/defconfig -+++ LINUX-SRC-TREE/arch/x86_64/defconfig -@@ -98,6 +98,8 @@ CONFIG_MTRR=y - CONFIG_GART_IOMMU=y - CONFIG_SWIOTLB=y - CONFIG_X86_MCE=y -+CONFIG_IOPROC=y -+CONFIG_PTRACK=y - - # - # Power management options -Index: LINUX-SRC-TREE/arch/x86_64/Kconfig -=================================================================== ---- LINUX-SRC-TREE.orig/arch/x86_64/Kconfig -+++ LINUX-SRC-TREE/arch/x86_64/Kconfig -@@ -343,6 +343,9 @@ source "drivers/acpi/Kconfig" - - source "arch/x86_64/kernel/cpufreq/Kconfig" - -+source "mm/Kconfig" -+source "kernel/Kconfig" -+ - endmenu - - menu "Bus options (PCI etc.)" -Index: LINUX-SRC-TREE/Documentation/vm/ioproc.txt -=================================================================== ---- /dev/null -+++ LINUX-SRC-TREE/Documentation/vm/ioproc.txt -@@ -0,0 +1,468 @@ -+Linux IOPROC patch overview -+=========================== -+ -+The network interface for an HPC network differs significantly from -+network interfaces for traditional IP networks. HPC networks tend to -+be used directly from user processes and perform large RDMA transfers -+between theses processes address space. They also have a requirement -+for low latency communication, and typically achieve this by OS bypass -+techniques. This then requires a different model to traditional -+interconnects, in that a process may need to expose a large amount of -+it's address space to the network RDMA. -+ -+Locking down of memory has been a common mechanism for performing -+this, together with a pin-down cache implemented in user -+libraries. The disadvantage of this method is that large portions of -+the physical memory can be locked down for a single process, even if -+it's working set changes over the different phases of it's -+execution. This leads to inefficient memory utilisation - akin to the -+disadvantage of swapping compared to paging. -+ -+This model also has problems where memory is being dynamically -+allocated and freed, since the pin down cache is unaware that memory -+may have been released by a call to munmap() and so it will still be -+locking down the now unused pages. -+ -+Some modern HPC network interfaces implement their own MMU and are -+able to handle a translation fault during a network access. The -+Quadrics (http://www.quadrics.com) devices (Elan3 and Elan4) have done -+this for some time and we expect others to follow the same route in -+the relatively near future. These NICs are able to operate in an -+environment where paging occurs and do not require memory to be locked -+down. The advantage of this is that the user process can expose large -+portions of it's address space without having to worry about physical -+memory constraints. -+ -+However should the operating system decide to swap a page to disk, -+then the NIC must be made aware that it should no longer read/write -+from this memory, but should generate a translation fault instead. -+ -+The ioproc patch has been developed to provide a mechanism whereby the -+device driver for a NIC can be aware of when a user process's address -+translations change, either by paging or by explicitly mapping or -+unmapping memory. -+ -+The patch involves inserting callbacks where translations are being -+invalidated to notify the NIC that the memory behind those -+translations is no longer visible to the application (and so should -+not be visible to the NIC). This callback is then responsible for -+ensuring that the NIC will not access the physical memory that was -+being mapped. -+ -+An ioproc invalidate callback in the kswapd code could be utilised to -+prevent memory from being paged out if the NIC is unable to support -+network page faulting. -+ -+For NICs which support network page faulting, there is no requirement -+for a user level pin down cache, since they are able to page-in their -+translations on the first communication using a buffer. However this -+is likely to be inefficient, resulting in slow first use of the -+buffer. If the communication buffers were continually allocated and -+freed using mmap based malloc() calls then this would lead to all -+communications being slower than desirable. -+ -+To optimise these warm-up cases the ioproc patch adds calls to -+ioproc_update wherever the kernel is creating translations for a user -+process. These then allows the device driver to preload translations -+so that they are already present for the first network communication -+from a buffer. -+ -+Linux 2.6 IOPROC implementation details -+======================================= -+ -+The Linux IOPROC patch adds hooks to the Linux VM code whenever page -+table entries are being created and/or invalidated. IOPROC device -+drivers can register their interest in being informed of such changes -+by registering an ioproc_ops structure which is defined as follows; -+ -+extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip); -+extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip); -+ -+typedef struct ioproc_ops { -+ struct ioproc_ops *next; -+ void *arg; -+ -+ void (*release)(void *arg, struct mm_struct *mm); -+ void (*sync_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ void (*invalidate_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ void (*update_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ -+ void (*change_protection)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot); -+ -+ void (*sync_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ void (*invalidate_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ void (*update_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ -+} ioproc_ops_t; -+ -+ioproc_register_ops -+=================== -+This function should be called by the IOPROC device driver to register -+its interest in PTE changes for the process associated with the passed -+in mm_struct. -+ -+The ioproc registration is not inherited across fork() and should be -+called once for each process that IOPROC is interested in. -+ -+This function must be called whilst holding the mm->page_table_lock. -+ -+ioproc_unregister_ops -+===================== -+This function should be called by the IOPROC device driver when it no -+longer requires informing of PTE changes in the process associated -+with the supplied mm_struct. -+ -+This function is not normally needed to be called as the ioproc_ops -+struct is unlinked from the associated mm_struct during the -+ioproc_release() call. -+ -+This function must be called whilst holding the mm->page_table_lock. -+ -+ioproc_ops struct -+================= -+A linked list ioproc_ops structures is hung off the user process -+mm_struct (linux/sched.h). At each hook point in the patched kernel -+the ioproc patch will call the associated ioproc_ops callback function -+pointer in turn for each registered structure. -+ -+The intention of the callbacks is to allow the IOPROC device driver to -+inspect the new or modified PTE entry via the Linux kernel -+(e.g. find_pte_map()). These callbacks should not modify the Linux -+kernel VM state or PTE entries. -+ -+The ioproc_ops callback function pointers are defined as follows; -+ -+ioproc_release -+============== -+The release hook is called when a program exits and all its vma areas -+are torn down and unmapped. i.e. during exit_mmap(). Before each -+release hook is called the ioproc_ops structure is unlinked from the -+mm_struct. -+ -+No locks are required as the process has the only reference to the mm -+at this point. -+ -+ioproc_sync_[range|page] -+======================== -+The sync hooks are called when a memory map is synchronised with its -+disk image i.e. when the msync() syscall is invoked. Any future read -+or write by the IOPROC device to the associated pages should cause the -+page to be marked as referenced or modified. -+ -+Called holding the mm->page_table_lock -+ -+ioproc_invalidate_[range|page] -+============================== -+The invalidate hooks are called whenever a valid PTE is unloaded -+e.g. when a page is unmapped by the user or paged out by the -+kernel. After this call the IOPROC must not access the physical memory -+again unless a new translation is loaded. -+ -+Called holding the mm->page_table_lock -+ -+ioproc_update_[range|page] -+========================== -+The update hooks are called whenever a valid PTE is loaded -+e.g. mmaping memory, moving the brk up, when breaking COW or faulting -+in an anonymous page of memory. These give the IOPROC device the -+opportunity to load translations speculatively, which can improve -+performance by avoiding device translation faults. -+ -+Called holding the mm->page_table_lock -+ -+ioproc_change_protection -+======================== -+This hook is called when the protection on a region of memory is -+changed i.e. when the mprotect() syscall is invoked. -+ -+The IOPROC must not be able to write to a read-only page, so if the -+permissions are downgraded then it must honour them. If they are -+upgraded it can treat this in the same way as the -+ioproc_update_[range|page]() calls -+ -+Called holding the mm->page_table_lock -+ -+ -+Linux 2.6 IOPROC patch details -+============================== -+ -+Here are the specific details of each ioproc hook added to the Linux -+2.6 VM system and the reasons for doing so; -+ -+++++ FILE -+ mm/fremap.c -+ -+==== FUNCTION -+ zap_pte -+ -+CALLED FROM -+ install_page -+ install_file_pte -+ -+PTE MODIFICATION -+ ptep_clear_flush -+ -+ADDED HOOKS -+ ioproc_invalidate_page -+ -+==== FUNCTION -+ install_page -+ -+CALLED FROM -+ filemap_populate, shmem_populate -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+==== FUNCTION -+ install_file_pte -+ -+CALLED FROM -+ filemap_populate, shmem_populate -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+++++ FILE -+ mm/memory.c -+ -+==== FUNCTION -+ zap_page_range -+ -+CALLED FROM -+ read_zero_pagealigned, madvise_dontneed, unmap_mapping_range, -+ unmap_mapping_range_list, do_mmap_pgoff -+ -+PTE MODIFICATION -+ set_pte (unmap_vmas) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ -+ -+==== FUNCTION -+ zeromap_page_range -+ -+CALLED FROM -+ read_zero_pagealigned, mmap_zero -+ -+PTE MODIFICATION -+ set_pte (zeromap_pte_range) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ ioproc_update_range -+ -+ -+==== FUNCTION -+ remap_page_range -+ -+CALLED FROM -+ many device drivers -+ -+PTE MODIFICATION -+ set_pte (remap_pte_range) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ ioproc_update_range -+ -+ -+==== FUNCTION -+ break_cow -+ -+CALLED FROM -+ do_wp_page -+ -+PTE MODIFICATION -+ ptep_establish -+ -+ADDED HOOKS -+ ioproc_invalidate_page -+ ioproc_update_page -+ -+ -+==== FUNCTION -+ do_wp_page -+ -+CALLED FROM -+ do_swap_page, handle_pte_fault -+ -+PTE MODIFICATION -+ ptep_set_access_flags -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+==== FUNCTION -+ do_swap_page -+ -+CALLED FROM -+ handle_pte_fault -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+==== FUNCTION -+ do_anonymous_page -+ -+CALLED FROM -+ do_no_page -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+==== FUNCTION -+ do_no_page -+ -+CALLED FROM -+ do_file_page, handle_pte_fault -+ -+PTE MODIFICATION -+ set_pte -+ -+ADDED HOOKS -+ ioproc_update_page -+ -+ -+++++ FILE -+ mm/mmap.c -+ -+==== FUNCTION -+ unmap_region -+ -+CALLED FROM -+ do_munmap -+ -+PTE MODIFICATION -+ set_pte (unmap_vmas) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ -+ -+==== FUNCTION -+ exit_mmap -+ -+CALLED FROM -+ mmput -+ -+PTE MODIFICATION -+ set_pte (unmap_vmas) -+ -+ADDED HOOKS -+ ioproc_release -+ -+ -+++++ FILE -+ mm/mprotect.c -+ -+==== FUNCTION -+ change_protection -+ -+CALLED FROM -+ mprotect_fixup -+ -+PTE MODIFICATION -+ set_pte (change_pte_range) -+ -+ADDED HOOKS -+ ioproc_change_protection -+ -+ -+++++ FILE -+ mm/mremap.c -+ -+==== FUNCTION -+ move_page_tables -+ -+CALLED FROM -+ move_vma -+ -+PTE MODIFICATION -+ ptep_clear_flush (move_one_page) -+ -+ADDED HOOKS -+ ioproc_invalidate_range -+ ioproc_invalidate_range -+ -+ -+++++ FILE -+ mm/rmap.c -+ -+==== FUNCTION -+ try_to_unmap_one -+ -+CALLED FROM -+ try_to_unmap_anon, try_to_unmap_file -+ -+PTE MODIFICATION -+ ptep_clear_flush -+ -+ADDED HOOKS -+ ioproc_invalidate_page -+ -+ -+==== FUNCTION -+ try_to_unmap_cluster -+ -+CALLED FROM -+ try_to_unmap_file -+ -+PTE MODIFICATION -+ ptep_clear_flush -+ -+ADDED HOOKS -+ ioproc_invalidate_page -+ -+ -+ -+++++ FILE -+ mm/msync.c -+ -+==== FUNCTION -+ filemap_sync -+ -+CALLED FROM -+ msync_interval -+ -+PTE MODIFICATION -+ ptep_clear_flush_dirty (filemap_sync_pte) -+ -+ADDED HOOKS -+ ioproc_sync_range -+ -+ -+++++ FILE -+ mm/hugetlb.c -+ -+==== FUNCTION -+ zap_hugepage_range -+ -+CALLED FROM -+ hugetlb_vmtruncate_list -+ -+PTE MODIFICATION -+ ptep_get_and_clear (unmap_hugepage_range) -+ -+ADDED HOOK -+ ioproc_invalidate_range -+ -+ -+-- Last update DavidAddison - 17 Aug 2004 -Index: LINUX-SRC-TREE/fs/exec.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/exec.c -+++ LINUX-SRC-TREE/fs/exec.c -@@ -65,6 +65,8 @@ EXPORT_SYMBOL(coredump_notifier_list); - #include <linux/kmod.h> - #endif - -+#include <linux/ptrack.h> -+ - int core_uses_pid; - char core_pattern[65] = "core"; - int suid_dumpable = 0; -@@ -1213,6 +1215,9 @@ int do_execve(char * filename, - if (retval < 0) - goto out; - -+ /* notify any ptrack callbacks of the process exec */ -+ ptrack_call_callbacks(PTRACK_PHASE_EXEC, NULL); -+ - retval = search_binary_handler(&bprm,regs); - if (retval >= 0) { - TRIG_EVENT(exec_hook, file->f_dentry->d_name.len, -Index: LINUX-SRC-TREE/fs/read_write.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/read_write.c -+++ LINUX-SRC-TREE/fs/read_write.c -@@ -339,6 +339,7 @@ asmlinkage ssize_t sys_write(unsigned in - - return ret; - } -+EXPORT_SYMBOL_GPL(sys_write); - - asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, - size_t count, loff_t pos) -Index: LINUX-SRC-TREE/fs/select.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/select.c -+++ LINUX-SRC-TREE/fs/select.c -@@ -649,3 +649,4 @@ ssize_t generic_aio_poll(struct kiocb *i - } - return -EIOCBRETRY; - } -+EXPORT_SYMBOL_GPL(sys_poll); -Index: LINUX-SRC-TREE/include/linux/init_task.h -=================================================================== ---- LINUX-SRC-TREE.orig/include/linux/init_task.h -+++ LINUX-SRC-TREE/include/linux/init_task.h -@@ -3,6 +3,7 @@ - - #include <linux/file.h> - #include <linux/pagg.h> -+#include <linux/ptrack.h> - - #define INIT_FILES \ - { \ -@@ -116,6 +117,7 @@ extern struct group_info init_groups; - .map_base = __TASK_UNMAPPED_BASE, \ - .io_wait = NULL, \ - INIT_TASK_PAGG(tsk) \ -+ INIT_TASK_PTRACK(tsk) \ - } - - -Index: LINUX-SRC-TREE/include/linux/ioproc.h -=================================================================== ---- /dev/null -+++ LINUX-SRC-TREE/include/linux/ioproc.h -@@ -0,0 +1,271 @@ -+/* -*- linux-c -*- -+ * -+ * Copyright (C) 2002-2004 Quadrics Ltd. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * -+ */ -+ -+/* -+ * Callbacks for IO processor page table updates. -+ */ -+ -+#ifndef __LINUX_IOPROC_H__ -+#define __LINUX_IOPROC_H__ -+ -+#include <linux/sched.h> -+#include <linux/mm.h> -+ -+typedef struct ioproc_ops { -+ struct ioproc_ops *next; -+ void *arg; -+ -+ void (*release)(void *arg, struct mm_struct *mm); -+ void (*sync_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ void (*invalidate_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ void (*update_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end); -+ -+ void (*change_protection)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot); -+ -+ void (*sync_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ void (*invalidate_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ void (*update_page)(void *arg, struct vm_area_struct *vma, unsigned long address); -+ -+} ioproc_ops_t; -+ -+/* IOPROC Registration -+ * -+ * Called by the IOPROC device driver to register its interest in page table -+ * changes for the process associated with the supplied mm_struct -+ * -+ * The caller should first allocate and fill out an ioproc_ops structure with -+ * the function pointers initialised to the device driver specific code for -+ * each callback. If the device driver doesn't have code for a particular -+ * callback then it should set the function pointer to be NULL. -+ * The ioproc_ops arg parameter will be passed unchanged as the first argument -+ * to each callback function invocation. -+ * -+ * The ioproc registration is not inherited across fork() and should be called -+ * once for each process that the IOPROC device driver is interested in. -+ * -+ * Must be called holding the mm->page_table_lock -+ */ -+extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip); -+ -+ -+/* IOPROC De-registration -+ * -+ * Called by the IOPROC device driver when it is no longer interested in page -+ * table changes for the process associated with the supplied mm_struct -+ * -+ * Normally this is not needed to be called as the ioproc_release() code will -+ * automatically unlink the ioproc_ops struct from the mm_struct as the -+ * process exits -+ * -+ * Must be called holding the mm->page_table_lock -+ */ -+extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip); -+ -+#ifdef CONFIG_IOPROC -+ -+/* IOPROC Release -+ * -+ * Called during exit_mmap() as all vmas are torn down and unmapped. -+ * -+ * Also unlinks the ioproc_ops structure from the mm list as it goes. -+ * -+ * No need for locks as the mm can no longer be accessed at this point -+ * -+ */ -+static inline void -+ioproc_release(struct mm_struct *mm) -+{ -+ struct ioproc_ops *cp; -+ -+ while ((cp = mm->ioproc_ops) != NULL) { -+ mm->ioproc_ops = cp->next; -+ -+ if (cp->release) -+ cp->release(cp->arg, mm); -+ } -+} -+ -+/* IOPROC SYNC RANGE -+ * -+ * Called when a memory map is synchronised with its disk image i.e. when the -+ * msync() syscall is invoked. Any future read or write to the associated -+ * pages by the IOPROC should cause the page to be marked as referenced or -+ * modified. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_sync_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->sync_range) -+ cp->sync_range(cp->arg, vma, start, end); -+} -+ -+/* IOPROC INVALIDATE RANGE -+ * -+ * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the -+ * user or paged out by the kernel. -+ * -+ * After this call the IOPROC must not access the physical memory again unless -+ * a new translation is loaded. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_invalidate_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->invalidate_range) -+ cp->invalidate_range(cp->arg, vma, start, end); -+} -+ -+/* IOPROC UPDATE RANGE -+ * -+ * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk -+ * up, when breaking COW or faulting in an anonymous page of memory. -+ * -+ * These give the IOPROC device driver the opportunity to load translations -+ * speculatively, which can improve performance by avoiding device translation -+ * faults. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_update_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->update_range) -+ cp->update_range(cp->arg, vma, start, end); -+} -+ -+ -+/* IOPROC CHANGE PROTECTION -+ * -+ * Called when the protection on a region of memory is changed i.e. when the -+ * mprotect() syscall is invoked. -+ * -+ * The IOPROC must not be able to write to a read-only page, so if the -+ * permissions are downgraded then it must honour them. If they are upgraded -+ * it can treat this in the same way as the ioproc_update_[range|sync]() calls -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_change_protection(struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->change_protection) -+ cp->change_protection(cp->arg, vma, start, end, newprot); -+} -+ -+/* IOPROC SYNC PAGE -+ * -+ * Called when a memory map is synchronised with its disk image i.e. when the -+ * msync() syscall is invoked. Any future read or write to the associated page -+ * by the IOPROC should cause the page to be marked as referenced or modified. -+ * -+ * Not currently called as msync() calls ioproc_sync_range() instead -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_sync_page(struct vm_area_struct *vma, unsigned long addr) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->sync_page) -+ cp->sync_page(cp->arg, vma, addr); -+} -+ -+/* IOPROC INVALIDATE PAGE -+ * -+ * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the -+ * user or paged out by the kernel. -+ * -+ * After this call the IOPROC must not access the physical memory again unless -+ * a new translation is loaded. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_invalidate_page(struct vm_area_struct *vma, unsigned long addr) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->invalidate_page) -+ cp->invalidate_page(cp->arg, vma, addr); -+} -+ -+/* IOPROC UPDATE PAGE -+ * -+ * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk -+ * up, when breaking COW or faulting in an anoymous page of memory. -+ * -+ * These give the IOPROC device the opportunity to load translations -+ * speculatively, which can improve performance by avoiding device translation -+ * faults. -+ * -+ * Called holding the mm->page_table_lock -+ */ -+static inline void -+ioproc_update_page(struct vm_area_struct *vma, unsigned long addr) -+{ -+ struct ioproc_ops *cp; -+ -+ for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next) -+ if (cp->update_page) -+ cp->update_page(cp->arg, vma, addr); -+} -+ -+#else -+ -+/* ! CONFIG_IOPROC so make all hooks empty */ -+ -+#define ioproc_release(mm) do { } while (0) -+ -+#define ioproc_sync_range(vma,start,end) do { } while (0) -+ -+#define ioproc_invalidate_range(vma, start,end) do { } while (0) -+ -+#define ioproc_update_range(vma, start, end) do { } while (0) -+ -+#define ioproc_change_protection(vma, start, end, prot) do { } while (0) -+ -+#define ioproc_sync_page(vma, addr) do { } while (0) -+ -+#define ioproc_invalidate_page(vma, addr) do { } while (0) -+ -+#define ioproc_update_page(vma, addr) do { } while (0) -+ -+#endif /* CONFIG_IOPROC */ -+ -+#endif /* __LINUX_IOPROC_H__ */ -Index: LINUX-SRC-TREE/include/linux/ptrack.h -=================================================================== ---- /dev/null -+++ LINUX-SRC-TREE/include/linux/ptrack.h -@@ -0,0 +1,65 @@ -+/* -+ * Copyright (C) 2000 Regents of the University of California -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Derived from exit_actn.c by -+ * Copyright (C) 2003 Quadrics Ltd. -+ * -+ */ -+#ifndef __LINUX_PTRACK_H -+#define __LINUX_PTRACK_H -+ -+/* -+ * Process tracking - this allows a module to keep track of processes -+ * in order that it can manage all tasks derived from a single process. -+ */ -+ -+#define PTRACK_PHASE_CLONE 1 -+#define PTRACK_PHASE_CLONE_FAIL 2 -+#define PTRACK_PHASE_EXEC 3 -+#define PTRACK_PHASE_EXIT 4 -+ -+#define PTRACK_FINISHED 0 -+#define PTRACK_INNHERIT 1 -+#define PTRACK_DENIED 2 -+ -+#ifdef CONFIG_PTRACK -+ -+typedef int (*ptrack_callback_t)(void *arg, int phase, struct task_struct *child); -+ -+struct ptrack_desc { -+ struct list_head link; -+ ptrack_callback_t callback; -+ void *arg; -+}; -+ -+extern int ptrack_register (ptrack_callback_t callback, void *arg); -+extern void ptrack_deregister (ptrack_callback_t callback, void *arg); -+extern int ptrack_registered (ptrack_callback_t callback, void *arg); -+ -+extern int ptrack_call_callbacks (int phase, struct task_struct *child); -+ -+#define INIT_TASK_PTRACK(tsk) \ -+ .ptrack_list = LIST_HEAD_INIT(tsk.ptrack_list) -+ -+#else -+#define ptrack_call_callbacks (phase, child) (0) -+ -+#define INIT_TASK_PTRACK(tsk) -+ -+#endif -+ -+#endif /* __LINUX_PTRACK_H */ -Index: LINUX-SRC-TREE/include/linux/sched.h -=================================================================== ---- LINUX-SRC-TREE.orig/include/linux/sched.h -+++ LINUX-SRC-TREE/include/linux/sched.h -@@ -188,6 +188,9 @@ asmlinkage void schedule(void); - extern int max_timeslice, min_timeslice; - - struct namespace; -+#ifdef CONFIG_IOPROC -+struct ioproc_ops; -+#endif - - /* Maximum number of active map areas.. This is a random (large) number */ - #define DEFAULT_MAX_MAP_COUNT 65536 -@@ -241,6 +244,11 @@ struct mm_struct { - struct kioctx default_kioctx; - - unsigned long hiwater_rss, hiwater_vm; -+ -+#ifdef CONFIG_IOPROC -+ /* hooks for io devices with advanced RDMA capabilities */ -+ struct ioproc_ops *ioproc_ops; -+#endif - }; - - extern int mmlist_nr; -@@ -603,6 +611,10 @@ struct task_struct { - struct rw_semaphore pagg_sem; - #endif - -+#ifdef CONFIG_PTRACK -+/* process tracking callback */ -+ struct list_head ptrack_list; -+#endif - }; - - static inline pid_t process_group(struct task_struct *tsk) -Index: LINUX-SRC-TREE/ipc/shm.c -=================================================================== ---- LINUX-SRC-TREE.orig/ipc/shm.c -+++ LINUX-SRC-TREE/ipc/shm.c -@@ -27,6 +27,7 @@ - #include <linux/shmem_fs.h> - #include <linux/security.h> - #include <linux/audit.h> -+#include <linux/module.h> - #include <linux/trigevent_hooks.h> - #include <asm/uaccess.h> - -@@ -879,6 +880,44 @@ asmlinkage long sys_shmdt(char __user *s - return audit_result(retval); - } - -+/* -+ * Mark all segments created by this process for destruction -+ */ -+int shm_cleanup (void) -+{ -+ int i; -+ -+ down(&shm_ids.sem); -+ -+ for (i = 0; i <= shm_ids.max_id; i++) { -+ struct shmid_kernel *shp; -+ -+ shp = shm_lock(i); -+ if (shp != NULL) { -+ /* mark this segment for destruction if we created it */ -+ if (current->pid == shp->shm_cprid) -+ { -+ /* copy of IPC_RMID code */ -+ if (shp->shm_nattch) { -+ shp->shm_flags |= SHM_DEST; -+ /* do not find it any more */ -+ shp->shm_perm.key = IPC_PRIVATE; -+ } else { -+ shm_destroy(shp); -+ continue; -+ } -+ } -+ -+ shm_unlock(shp); -+ } -+ } -+ -+ up(&shm_ids.sem); -+ -+ return 0; -+} -+EXPORT_SYMBOL_GPL(shm_cleanup); -+ - #ifdef CONFIG_PROC_FS - static int sysvipc_shm_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data) - { -Index: LINUX-SRC-TREE/kernel/exit.c -=================================================================== ---- LINUX-SRC-TREE.orig/kernel/exit.c -+++ LINUX-SRC-TREE/kernel/exit.c -@@ -40,6 +40,8 @@ - /* tng related changes */ - int (*tng_exitfunc)(int) = NULL; - -+#include <linux/ptrack.h> -+ - extern void sem_exit (void); - extern struct task_struct *child_reaper; - void (*do_eop_acct) (int, struct task_struct *); -@@ -848,6 +850,8 @@ asmlinkage NORET_TYPE void do_exit(long - audit_exit(tsk, code); - audit_free(tsk->audit); - #endif -+ /* Notify any ptrack callbacks of the process exit */ -+ ptrack_call_callbacks (PTRACK_PHASE_EXIT, NULL); - __exit_mm(tsk); - - if (unlikely(tng_exitfunc)) -Index: LINUX-SRC-TREE/kernel/fork.c -=================================================================== ---- LINUX-SRC-TREE.orig/kernel/fork.c -+++ LINUX-SRC-TREE/kernel/fork.c -@@ -14,6 +14,7 @@ - #include <linux/config.h> - #include <linux/slab.h> - #include <linux/init.h> -+#include <linux/ptrack.h> - #include <linux/unistd.h> - #include <linux/smp_lock.h> - #include <linux/module.h> -@@ -432,6 +433,9 @@ static struct mm_struct * mm_init(struct - mm->page_table_lock = SPIN_LOCK_UNLOCKED; - mm->ioctx_list_lock = RW_LOCK_UNLOCKED; - mm->ioctx_list = NULL; -+#ifdef CONFIG_IOPROC -+ mm->ioproc_ops = NULL; -+#endif - mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm); - mm->free_area_cache = TASK_UNMAPPED_BASE; - -@@ -1276,6 +1280,11 @@ long do_fork(unsigned long clone_flags, - audit_fork(current, p); - #endif - -+ if (ptrack_call_callbacks(PTRACK_PHASE_CLONE, p)) { -+ sigaddset(&p->pending.signal, SIGKILL); -+ set_tsk_thread_flag(p, TIF_SIGPENDING); -+ } -+ - /* Trace the event */ - TRIG_EVENT(fork_hook, clone_flags, p, pid); - if (!(clone_flags & CLONE_STOPPED)) { -Index: LINUX-SRC-TREE/kernel/Kconfig -=================================================================== ---- /dev/null -+++ LINUX-SRC-TREE/kernel/Kconfig -@@ -0,0 +1,14 @@ -+# -+# Kernel subsystem specific config -+# -+ -+# Support for Process Tracking callbacks -+# -+config PTRACK -+ bool "Enable PTRACK process tracking hooks" -+ default y -+ help -+ This option enables hooks to be called when processes are -+ created and destoryed in order for a resource management -+ system to know which processes are a member of a "job" and -+ to be able to clean up when the job is terminated. -Index: LINUX-SRC-TREE/kernel/Makefile -=================================================================== ---- LINUX-SRC-TREE.orig/kernel/Makefile -+++ LINUX-SRC-TREE/kernel/Makefile -@@ -29,6 +29,7 @@ obj-$(CONFIG_LTT) += ltt/ - obj-$(CONFIG_KPROBES) += kprobes.o - obj-$(CONFIG_CPUSETS) += cpuset.o - obj-$(CONFIG_CKRM_CPU_SCHEDULE) += ckrm_classqueue.o ckrm_sched.o -+obj-$(CONFIG_PTRACK) += ptrack.o - - ifneq ($(CONFIG_IA64),y) - # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is -Index: LINUX-SRC-TREE/kernel/ptrack.c -=================================================================== ---- /dev/null -+++ LINUX-SRC-TREE/kernel/ptrack.c -@@ -0,0 +1,145 @@ -+/* -+ * Copyright (C) 2000 Regents of the University of California -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Derived from exit_actn.c by -+ * Copyright (C) 2003 Quadrics Ltd. -+ */ -+ -+ -+#include <linux/module.h> -+#include <linux/spinlock.h> -+#include <linux/sched.h> -+#include <linux/ptrack.h> -+#include <linux/slab.h> -+#include <linux/list.h> -+ -+#include <asm/errno.h> -+ -+int -+ptrack_register (ptrack_callback_t callback, void *arg) -+{ -+ struct ptrack_desc *desc = kmalloc (sizeof (struct ptrack_desc), GFP_KERNEL); -+ -+ if (desc == NULL) -+ return -ENOMEM; -+ -+ desc->callback = callback; -+ desc->arg = arg; -+ -+ list_add_tail (&desc->link, ¤t->ptrack_list); -+ -+ return 0; -+} -+ -+void -+ptrack_deregister (ptrack_callback_t callback, void *arg) -+{ -+ struct list_head *el, *nel; -+ -+ list_for_each_safe (el, nel, ¤t->ptrack_list) { -+ struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link); -+ -+ if (desc->callback == callback && desc->arg == arg) { -+ list_del (&desc->link); -+ kfree (desc); -+ } -+ } -+} -+ -+int -+ptrack_registered (ptrack_callback_t callback, void *arg) -+{ -+ struct list_head *el; -+ -+ list_for_each (el, ¤t->ptrack_list) { -+ struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link); -+ -+ if (desc->callback == callback && desc->arg == arg) -+ return 1; -+ } -+ return 0; -+} -+ -+int -+ptrack_call_callbacks (int phase, struct task_struct *child) -+{ -+ struct list_head *el, *nel; -+ struct ptrack_desc *new; -+ int res; -+ -+ if (phase == PTRACK_PHASE_CLONE) -+ INIT_LIST_HEAD (&child->ptrack_list); -+ -+ list_for_each_safe (el, nel, ¤t->ptrack_list) { -+ struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link); -+ -+ res = desc->callback (desc->arg, phase, child); -+ -+ switch (phase) -+ { -+ case PTRACK_PHASE_EXIT: -+ list_del (&desc->link); -+ kfree (desc); -+ break; -+ -+ case PTRACK_PHASE_CLONE: -+ switch (res) -+ { -+ case PTRACK_FINISHED: -+ break; -+ -+ case PTRACK_INNHERIT: -+ if ((new = kmalloc (sizeof (struct ptrack_desc), GFP_ATOMIC)) == NULL) -+ { -+ /* allocation failed - notify that this process is not going -+ * to be started by signalling clone failure. -+ */ -+ desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child); -+ -+ goto failed; -+ } -+ -+ new->callback = desc->callback; -+ new->arg = desc->arg; -+ -+ list_add_tail (&new->link, &child->ptrack_list); -+ break; -+ -+ case PTRACK_DENIED: -+ goto failed; -+ } -+ break; -+ } -+ } -+ -+ return 0; -+ -+ failed: -+ while (! list_empty (&child->ptrack_list)) -+ { -+ struct ptrack_desc *desc = list_entry (child->ptrack_list.next, struct ptrack_desc, link); -+ -+ desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child); -+ -+ list_del (&desc->link); -+ kfree (desc); -+ } -+ return 1; -+} -+EXPORT_SYMBOL(ptrack_register); -+EXPORT_SYMBOL(ptrack_deregister); -+EXPORT_SYMBOL(ptrack_registered); -Index: LINUX-SRC-TREE/kernel/signal.c -=================================================================== ---- LINUX-SRC-TREE.orig/kernel/signal.c -+++ LINUX-SRC-TREE/kernel/signal.c -@@ -2315,6 +2315,7 @@ sys_tkill(int pid, int sig) - read_unlock(&tasklist_lock); - return audit_lresult(error); - } -+EXPORT_SYMBOL_GPL(sys_kill); - - asmlinkage long - sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo) -Index: LINUX-SRC-TREE/mm/fremap.c -=================================================================== ---- LINUX-SRC-TREE.orig/mm/fremap.c -+++ LINUX-SRC-TREE/mm/fremap.c -@@ -14,6 +14,7 @@ - #include <linux/swapops.h> - #include <linux/objrmap.h> - #include <linux/module.h> -+#include <linux/ioproc.h> - - #include <asm/mmu_context.h> - #include <asm/cacheflush.h> -@@ -29,6 +30,7 @@ static inline void zap_pte(struct mm_str - if (pte_present(pte)) { - unsigned long pfn = pte_pfn(pte); - -+ ioproc_invalidate_page(vma, addr); - flush_cache_page(vma, addr); - pte = ptep_clear_flush(vma, addr, ptep); - if (pfn_valid(pfn)) { -@@ -80,6 +82,7 @@ int install_page(struct mm_struct *mm, s - pte_val = *pte; - pte_unmap(pte); - update_mmu_cache(vma, addr, pte_val); -+ ioproc_update_page(vma, addr); - - err = 0; - err_unlock: -@@ -118,6 +121,7 @@ int install_file_pte(struct mm_struct *m - pte_val = *pte; - pte_unmap(pte); - update_mmu_cache(vma, addr, pte_val); -+ ioproc_update_page(vma, addr); - spin_unlock(&mm->page_table_lock); - return 0; - -Index: LINUX-SRC-TREE/mm/ioproc.c -=================================================================== ---- /dev/null -+++ LINUX-SRC-TREE/mm/ioproc.c -@@ -0,0 +1,58 @@ -+/* -*- linux-c -*- -+ * -+ * Copyright (C) 2002-2004 Quadrics Ltd. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * -+ */ -+ -+/* -+ * Registration for IO processor page table updates. -+ */ -+ -+#include <linux/kernel.h> -+#include <linux/module.h> -+ -+#include <linux/mm.h> -+#include <linux/ioproc.h> -+ -+int -+ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip) -+{ -+ ip->next = mm->ioproc_ops; -+ mm->ioproc_ops = ip; -+ -+ return 0; -+} -+ -+EXPORT_SYMBOL_GPL(ioproc_register_ops); -+ -+int -+ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip) -+{ -+ struct ioproc_ops **tmp; -+ -+ for (tmp = &mm->ioproc_ops; *tmp && *tmp != ip; tmp= &(*tmp)->next) -+ ; -+ if (*tmp) { -+ *tmp = ip->next; -+ return 0; -+ } -+ -+ return -EINVAL; -+} -+ -+EXPORT_SYMBOL_GPL(ioproc_unregister_ops); -Index: LINUX-SRC-TREE/mm/Kconfig -=================================================================== ---- /dev/null -+++ LINUX-SRC-TREE/mm/Kconfig -@@ -0,0 +1,15 @@ -+# -+# VM subsystem specific config -+# -+ -+# Support for IO processors which have advanced RDMA capabilities -+# -+config IOPROC -+ bool "Enable IOPROC VM hooks" -+ depends on MMU -+ default y -+ help -+ This option enables hooks in the VM subsystem so that IO devices which -+ incorporate advanced RDMA capabilities can be kept in sync with CPU -+ page table changes. -+ See Documentation/vm/ioproc.txt for more details. -Index: LINUX-SRC-TREE/mm/Makefile -=================================================================== ---- LINUX-SRC-TREE.orig/mm/Makefile -+++ LINUX-SRC-TREE/mm/Makefile -@@ -15,4 +15,5 @@ obj-y := bootmem.o filemap.o mempool.o - obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o - obj-$(CONFIG_PROC_MM) += proc_mm.o - obj-$(CONFIG_NUMA) += policy.o -+obj-$(CONFIG_IOPROC) += ioproc.o - -Index: LINUX-SRC-TREE/mm/memory.c -=================================================================== ---- LINUX-SRC-TREE.orig/mm/memory.c -+++ LINUX-SRC-TREE/mm/memory.c -@@ -43,6 +43,7 @@ - #include <linux/swap.h> - #include <linux/highmem.h> - #include <linux/pagemap.h> -+#include <linux/ioproc.h> - #include <linux/objrmap.h> - #include <linux/module.h> - #include <linux/acct.h> -@@ -627,6 +628,7 @@ void zap_page_range(struct vm_area_struc - - lru_add_drain(); - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, address, end); - tlb = tlb_gather_mmu(mm, 0); - unmap_vmas(&tlb, mm, vma, address, end, &nr_accounted, details); - tlb_finish_mmu(tlb, address, end); -@@ -927,6 +929,7 @@ int zeromap_page_range(struct vm_area_st - BUG(); - - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, beg, end); - do { - pmd_t *pmd = pmd_alloc(mm, dir, address); - error = -ENOMEM; -@@ -941,6 +944,7 @@ int zeromap_page_range(struct vm_area_st - /* - * Why flush? zeromap_pte_range has a BUG_ON for !pte_none() - */ -+ ioproc_update_range(vma, beg, end); - flush_tlb_range(vma, beg, end); - spin_unlock(&mm->page_table_lock); - return error; -@@ -1011,6 +1015,7 @@ int remap_page_range(struct vm_area_stru - BUG(); - - spin_lock(&mm->page_table_lock); -+ ioproc_invalidate_range(vma, beg, end); - do { - pmd_t *pmd = pmd_alloc(mm, dir, from); - error = -ENOMEM; -@@ -1025,6 +1030,7 @@ int remap_page_range(struct vm_area_stru - /* - * Why flush? remap_pte_range has a BUG_ON for !pte_none() - */ -+ ioproc_update_range(vma, beg, end); - flush_tlb_range(vma, beg, end); - spin_unlock(&mm->page_table_lock); - return error; -@@ -1098,6 +1104,7 @@ static int do_wp_page(struct mm_struct * - update_mmu_cache(vma, address, entry); - lazy_mmu_prot_update(entry); - pte_unmap(page_table); -+ ioproc_update_page(vma, address); - spin_unlock(&mm->page_table_lock); - return VM_FAULT_MINOR; - } -@@ -1133,6 +1140,7 @@ static int do_wp_page(struct mm_struct * - } - - page_remove_rmap(old_page); -+ ioproc_invalidate_page(vma, address); - break_cow(vma, new_page, address, page_table); - page_add_rmap(new_page, vma, address, 1); - lru_cache_add_active(new_page); -@@ -1141,6 +1149,7 @@ static int do_wp_page(struct mm_struct * - new_page = old_page; - } - pte_unmap(page_table); -+ ioproc_update_page(vma, address); - page_cache_release(new_page); - page_cache_release(old_page); - spin_unlock(&mm->page_table_lock); -@@ -1376,6 +1385,7 @@ static int do_swap_page(struct mm_struct - int ret; - - pte_unmap(page_table); -+ ioproc_update_page(vma, address); - spin_unlock(&mm->page_table_lock); - - BUG_ON(!vma->anon_vma); -@@ -1508,6 +1518,7 @@ do_anonymous_page(struct mm_struct *mm, - - /* No need to invalidate - it was non-present before */ - update_mmu_cache(vma, addr, entry); -+ ioproc_update_page(vma, addr); - spin_unlock(&mm->page_table_lock); - ret = VM_FAULT_MINOR; - -@@ -1658,6 +1669,7 @@ retry: - - /* no need to invalidate: a not-present page shouldn't be cached */ - update_mmu_cache(vma, address, entry); -+ ioproc_update_page(vma, address); - spin_unlock(&mm->page_table_lock); - out: - return ret; -@@ -1771,6 +1783,7 @@ static inline int handle_pte_fault(struc - spin_unlock(&mm->page_table_lock); - return VM_FAULT_MINOR; - } -+EXPORT_SYMBOL_GPL(make_pages_present); - - - /* Can be overwritten by the architecture */ -Index: LINUX-SRC-TREE/mm/mmap.c -=================================================================== ---- LINUX-SRC-TREE.orig/mm/mmap.c -+++ LINUX-SRC-TREE/mm/mmap.c -@@ -25,6 +25,7 @@ - #include <linux/init.h> - #include <linux/file.h> - #include <linux/fs.h> -+#include <linux/ioproc.h> - #include <linux/personality.h> - #include <linux/security.h> - #include <linux/hugetlb.h> -@@ -1389,6 +1390,7 @@ static void unmap_region(struct mm_struc - unsigned long nr_accounted = 0; - - lru_add_drain(); -+ ioproc_invalidate_range(vma, start, end); - tlb = tlb_gather_mmu(mm, 0); - unmap_vmas(&tlb, mm, vma, start, end, &nr_accounted, NULL); - vm_unacct_memory(nr_accounted); -@@ -1713,6 +1715,7 @@ void exit_mmap(struct mm_struct *mm) - - spin_lock(&mm->page_table_lock); - -+ ioproc_release(mm); - tlb = tlb_gather_mmu(mm, 1); - flush_cache_mm(mm); - /* Use ~0UL here to ensure all VMAs in the mm are unmapped */ -Index: LINUX-SRC-TREE/mm/mprotect.c -=================================================================== ---- LINUX-SRC-TREE.orig/mm/mprotect.c -+++ LINUX-SRC-TREE/mm/mprotect.c -@@ -10,6 +10,7 @@ - - #include <linux/mm.h> - #include <linux/hugetlb.h> -+#include <linux/ioproc.h> - #include <linux/slab.h> - #include <linux/shm.h> - #include <linux/mman.h> -@@ -101,6 +102,7 @@ change_protection(struct vm_area_struct - if (start >= end) - BUG(); - spin_lock(¤t->mm->page_table_lock); -+ ioproc_change_protection(vma, start, end, newprot); - do { - change_pmd_range(dir, start, end - start, newprot); - start = (start + PGDIR_SIZE) & PGDIR_MASK; -Index: LINUX-SRC-TREE/mm/mremap.c -=================================================================== ---- LINUX-SRC-TREE.orig/mm/mremap.c -+++ LINUX-SRC-TREE/mm/mremap.c -@@ -9,6 +9,7 @@ - - #include <linux/mm.h> - #include <linux/hugetlb.h> -+#include <linux/ioproc.h> - #include <linux/slab.h> - #include <linux/shm.h> - #include <linux/mman.h> -@@ -144,6 +145,8 @@ static int move_page_tables(struct vm_ar - { - unsigned long offset = len; - -+ ioproc_invalidate_range(vma, old_addr, old_addr + len); -+ ioproc_invalidate_range(vma, new_addr, new_addr + len); - flush_cache_range(vma, old_addr, old_addr + len); - - /* -Index: LINUX-SRC-TREE/mm/msync.c -=================================================================== ---- LINUX-SRC-TREE.orig/mm/msync.c -+++ LINUX-SRC-TREE/mm/msync.c -@@ -12,6 +12,7 @@ - #include <linux/mm.h> - #include <linux/mman.h> - #include <linux/hugetlb.h> -+#include <linux/ioproc.h> - - #include <asm/pgtable.h> - #include <asm/pgalloc.h> -@@ -116,6 +117,7 @@ static int filemap_sync(struct vm_area_s - - if (address >= end) - BUG(); -+ ioproc_sync_range(vma, address, end); - do { - error |= filemap_sync_pmd_range(dir, address, end, vma, flags); - address = (address + PGDIR_SIZE) & PGDIR_MASK; -Index: LINUX-SRC-TREE/mm/objrmap.c -=================================================================== ---- LINUX-SRC-TREE.orig/mm/objrmap.c -+++ LINUX-SRC-TREE/mm/objrmap.c -@@ -29,6 +29,7 @@ - #include <linux/swapops.h> - #include <linux/objrmap.h> - #include <linux/init.h> -+#include <linux/ioproc.h> - #include <asm/tlbflush.h> - - kmem_cache_t * anon_vma_cachep; -@@ -393,6 +394,8 @@ unmap_pte_page(struct page * page, struc - { - pte_t pteval; - -+ ioproc_invalidate_page(vma, address); -+ - flush_cache_page(vma, address); - pteval = ptep_clear_flush(vma, address, pte); - diff --git a/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-core.patch b/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-core.patch deleted file mode 100644 index 576765c68b..0000000000 --- a/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-core.patch +++ /dev/null @@ -1,1261 +0,0 @@ -From: Jan Kara <jack@suse.cz> - -The four patches in this series fix deadlocks with quotas of pagelock (the -problem was lock inversion on PageLock and transaction start - quota code -needed to first start a transaction and then write the data which subsequently -needed acquisition of PageLock while the standard ordering - PageLock first -and transaction start later - was used e.g. by pdflush). They implement a -new way of quota access to disk: Every filesystem that would like to implement -quotas now has to provide quota_read() and quota_write() functions. These -functions must obey quota lock ordering (in particular they should not take -PageLock inside a transaction). - -The first patch implements the changes in the quota core, the other three -patches implement needed functions in ext2, ext3 and reiserfs. The patch for -reiserfs also fixes several other lock inversion problems (similar as ext3 -had) and implements the journaled quota functionality (which comes almost for -free after the locking fixes...). - -The quota core patch makes quota support in other filesystems (except XFS -which implements everything on its own ;)) unfunctional (quotaon() will refuse -to turn on quotas on them). When the patches get reasonable wide testing and -it will seem that no major changes will be needed I can make fixes also for -the other filesystems (JFS, UDF, UFS). - -This patch: - -The patch implements the new way of quota io in the quota core. Every -filesystem wanting to support quotas has to provide functions quota_read() -and quota_write() obeying quota locking rules. As the writes and reads -bypass the pagecache there is some ugly stuff ensuring that userspace can -see all the data after quotaoff() (or Q_SYNC quotactl). In future I plan -to make quota files inaccessible from userspace (with the exception of -quotacheck(8) which will take care about the cache flushing and such stuff -itself) so that this synchronization stuff can be removed... - -The rewrite of the quota core. Quota uses the filesystem read() and write() -functions no more to avoid possible deadlocks on PageLock. From now on every -filesystem supporting quotas must provide functions quota_read() and -quota_write() which obey the quota locking rules (e.g. they cannot acquire the -PageLock). - -Signed-off-by: Jan Kara <jack@suse.cz> -Signed-off-by: Andrew Morton <akpm@osdl.org> ---- - - 25-akpm/fs/dquot.c | 162 +++++++++++++-------------- - 25-akpm/fs/quota.c | 45 +++++++ - 25-akpm/fs/quota_v1.c | 62 ++-------- - 25-akpm/fs/quota_v2.c | 227 +++++++++++++++++---------------------- - 25-akpm/include/linux/fs.h | 3 - 25-akpm/include/linux/quota.h | 2 - 25-akpm/include/linux/security.h | 8 - - 25-akpm/security/dummy.c | 2 - 25-akpm/security/selinux/hooks.c | 4 - 9 files changed, 247 insertions(+), 268 deletions(-) - -diff -rup RH_2_6_9_55.orig/fs/dquot.c RH_2_6_9_55/fs/dquot.c ---- RH_2_6_9_55.orig/fs/dquot.c -+++ RH_2_6_9_55/fs/dquot.c -@@ -49,7 +49,7 @@ - * New SMP locking. - * Jan Kara, <jack@suse.cz>, 10/2002 - * -- * Added journalled quota support -+ * Added journalled quota support, fix lock inversion problems - * Jan Kara, <jack@suse.cz>, 2003,2004 - * - * (C) Copyright 1994 - 1997 Marco van Wieringen -@@ -75,7 +75,8 @@ - #include <linux/proc_fs.h> - #include <linux/security.h> - #include <linux/kmod.h> --#include <linux/pagemap.h> -+#include <linux/namei.h> -+#include <linux/buffer_head.h> - - #include <asm/uaccess.h> - -@@ -114,7 +115,7 @@ - * operations on dquots don't hold dq_lock as they copy data under dq_data_lock - * spinlock to internal buffers before writing. - * -- * Lock ordering (including related VFS locks) is following: -+ * Lock ordering (including related VFS locks) is the following: - * i_sem > dqonoff_sem > journal_lock > dqptr_sem > dquot->dq_lock > - * dqio_sem - * i_sem on quota files is special (it's below dqio_sem) -@@ -183,8 +184,7 @@ static void put_quota_format(struct quot - * on all three lists, depending on its current state. - * - * All dquots are placed to the end of inuse_list when first created, and this -- * list is used for the sync and invalidate operations, which must look -- * at every dquot. -+ * list is used for invalidate operation, which must look at every dquot. - * - * Unused dquots (dq_count == 0) are added to the free_dquots list when freed, - * and this list is searched whenever we need an available dquot. Dquots are -@@ -1341,10 +1341,12 @@ int vfs_quota_off(struct super_block *sb - { - int cnt; - struct quota_info *dqopt = sb_dqopt(sb); -+ struct inode *toput[MAXQUOTAS]; - - /* We need to serialize quota_off() for device */ - down(&dqopt->dqonoff_sem); - for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -+ toput[cnt] = NULL; - if (type != -1 && cnt != type) - continue; - if (!sb_has_quota_enabled(sb, cnt)) -@@ -1364,7 +1366,7 @@ int vfs_quota_off(struct super_block *sb - dqopt->ops[cnt]->free_file_info(sb, cnt); - put_quota_format(dqopt->info[cnt].dqi_format); - -- fput(dqopt->files[cnt]); -+ toput[cnt] = dqopt->files[cnt]; - dqopt->files[cnt] = NULL; - dqopt->info[cnt].dqi_flags = 0; - dqopt->info[cnt].dqi_igrace = 0; -@@ -1372,6 +1374,26 @@ int vfs_quota_off(struct super_block *sb - dqopt->ops[cnt] = NULL; - } - up(&dqopt->dqonoff_sem); -+ /* Sync the superblock so that buffers with quota data are written to -+ * disk (and so userspace sees correct data afterwards) */ -+ if (sb->s_op->sync_fs) -+ sb->s_op->sync_fs(sb, 1); -+ sync_blockdev(sb->s_bdev); -+ /* Now the quota files are just ordinary files and we can set the -+ * inode flags back. Moreover we discard the pagecache so that -+ * userspace sees the writes we did bypassing the pagecache. We -+ * must also discard the blockdev buffers so that we see the -+ * changes done by userspace on the next quotaon() */ -+ for (cnt = 0; cnt < MAXQUOTAS; cnt++) -+ if (toput[cnt]) { -+ down(&toput[cnt]->i_sem); -+ toput[cnt]->i_flags &= ~(S_IMMUTABLE | S_NOATIME | S_NOQUOTA); -+ truncate_inode_pages(&toput[cnt]->i_data, 0); -+ up(&toput[cnt]->i_sem); -+ mark_inode_dirty(toput[cnt]); -+ iput(toput[cnt]); -+ } -+ invalidate_bdev(sb->s_bdev, 0); - return 0; - } - -@@ -1379,68 +1401,56 @@ int vfs_quota_off(struct super_block *sb - * Turn quotas on on a device - */ - --/* Helper function when we already have file open */ --static int vfs_quota_on_file(struct file *f, int type, int format_id) -+/* Helper function when we already have the inode */ -+static int vfs_quota_on_inode(struct inode *inode, int type, int format_id) - { - struct quota_format_type *fmt = find_quota_format(format_id); -- struct inode *inode; -- struct super_block *sb = f->f_dentry->d_sb; -+ struct super_block *sb = inode->i_sb; - struct quota_info *dqopt = sb_dqopt(sb); -- struct dquot *to_drop[MAXQUOTAS]; -- int error, cnt; -- unsigned int oldflags = -1; -+ int error; -+ int oldflags = -1; - - if (!fmt) - return -ESRCH; -- error = -EIO; -- if (!f->f_op || !f->f_op->read || !f->f_op->write) -+ if (!S_ISREG(inode->i_mode)) { -+ error = -EACCES; - goto out_fmt; -- inode = f->f_dentry->d_inode; -- error = -EACCES; -- if (!S_ISREG(inode->i_mode)) -+ } -+ if (IS_RDONLY(inode)) { -+ error = -EROFS; -+ goto out_fmt; -+ } -+ if (!sb->s_op->quota_write || !sb->s_op->quota_read) { -+ error = -EINVAL; - goto out_fmt; -+ } - -+ /* As we bypass the pagecache we must now flush the inode so that -+ * we see all the changes from userspace... */ -+ write_inode_now(inode, 1); -+ /* And now flush the block cache so that kernel sees the changes */ -+ invalidate_bdev(sb->s_bdev, 0); - down(&inode->i_sem); - down(&dqopt->dqonoff_sem); - if (sb_has_quota_enabled(sb, type)) { -- up(&inode->i_sem); - error = -EBUSY; - goto out_lock; - } - /* We don't want quota and atime on quota files (deadlocks possible) -- * We also need to set GFP mask differently because we cannot recurse -- * into filesystem when allocating page for quota inode */ -+ * Also nobody should write to the file - we use special IO operations -+ * which ignore the immutable bit. */ - down_write(&dqopt->dqptr_sem); -- oldflags = inode->i_flags & (S_NOATIME | S_NOQUOTA); -- inode->i_flags |= S_NOQUOTA | S_NOATIME; -+ oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | S_NOQUOTA); -+ inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE; - up_write(&dqopt->dqptr_sem); -- up(&inode->i_sem); - -- dqopt->files[type] = f; -+ error = -EIO; -+ dqopt->files[type] = igrab(inode); -+ if (!dqopt->files[type]) -+ goto out_lock; - error = -EINVAL; - if (!fmt->qf_ops->check_quota_file(sb, type)) - goto out_file_init; -- /* -- * We write to quota files deep within filesystem code. We don't want -- * the VFS to reenter filesystem code when it tries to allocate a -- * pagecache page for the quota file write. So clear __GFP_FS in -- * the quota file's allocation flags. -- */ -- mapping_set_gfp_mask(inode->i_mapping, -- mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS); -- -- down_write(&dqopt->dqptr_sem); -- for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -- to_drop[cnt] = inode->i_dquot[cnt]; -- inode->i_dquot[cnt] = NODQUOT; -- } -- up_write(&dqopt->dqptr_sem); -- /* We must put dquots outside of dqptr_sem because we may need to -- * start transaction for dquot_release() */ -- for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -- if (to_drop[cnt]) -- dqput(to_drop[cnt]); -- } - - dqopt->ops[type] = fmt->qf_ops; - dqopt->info[type].dqi_format = fmt; -@@ -1451,6 +1461,7 @@ static int vfs_quota_on_file(struct file - goto out_file_init; - } - up(&dqopt->dqio_sem); -+ up(&inode->i_sem); - set_enable_flags(dqopt, type); - - add_dquot_ref(sb, type); -@@ -1460,19 +1471,18 @@ static int vfs_quota_on_file(struct file - - out_file_init: - dqopt->files[type] = NULL; -+ iput(inode); - out_lock: - up(&dqopt->dqonoff_sem); - if (oldflags != -1) { -- down(&inode->i_sem); - down_write(&dqopt->dqptr_sem); -- /* Reset the NOATIME flag back. I know it could change in the -- * mean time but playing with NOATIME flags on a quota file is -- * never a good idea */ -- inode->i_flags &= ~(S_NOATIME | S_NOQUOTA); -+ /* Set the flags back (in the case of accidental quotaon() -+ * on a wrong file we don't want to mess up the flags) */ -+ inode->i_flags &= ~(S_NOATIME | S_NOQUOTA | S_IMMUTABLE); - inode->i_flags |= oldflags; - up_write(&dqopt->dqptr_sem); -- up(&inode->i_sem); - } -+ up(&inode->i_sem); - out_fmt: - put_quota_format(fmt); - -@@ -1482,47 +1492,37 @@ out_fmt: - /* Actual function called from quotactl() */ - int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path) - { -- struct file *f; -+ struct nameidata nd; - int error; - -- f = filp_open(path, O_RDWR, 0600); -- if (IS_ERR(f)) -- return PTR_ERR(f); -- error = security_quota_on(f); -+ error = path_lookup(path, LOOKUP_FOLLOW, &nd); -+ if (error < 0) -+ return error; -+ error = security_quota_on(nd.dentry); - if (error) -- goto out_f; -- error = vfs_quota_on_file(f, type, format_id); -- if (!error) -- return 0; --out_f: -- filp_close(f, NULL); -+ goto out_path; -+ /* Quota file not on the same filesystem? */ -+ if (nd.mnt->mnt_sb != sb) -+ error = -EXDEV; -+ else -+ error = vfs_quota_on_inode(nd.dentry->d_inode, type, format_id); -+out_path: -+ path_release(&nd); - return error; - } - - /* -- * Function used by filesystems when filp_open() would fail (filesystem is -- * being mounted now). We will use a private file structure. Caller is -- * responsible that it's IO functions won't need vfsmnt structure or -- * some dentry tricks... -+ * This function is used when filesystem needs to initialize quotas -+ * during mount time. - */ - int vfs_quota_on_mount(int type, int format_id, struct dentry *dentry) - { -- struct file *f; - int error; - -- dget(dentry); /* Get a reference for struct file */ -- f = dentry_open(dentry, NULL, O_RDWR); -- if (IS_ERR(f)) { -- error = PTR_ERR(f); -- goto out_dentry; -- } -- error = vfs_quota_on_file(f, type, format_id); -- if (!error) -- return 0; -- fput(f); --out_dentry: -- dput(dentry); -- return error; -+ error = security_quota_on(dentry); -+ if (error) -+ return error; -+ return vfs_quota_on_inode(dentry->d_inode, type, format_id); - } - - /* Generic routine for getting common part of quota structure */ -diff -rup RH_2_6_9_55.orig/fs/quota.c RH_2_6_9_55/fs/quota.c ---- RH_2_6_9_55.orig/fs/quota.c -+++ RH_2_6_9_55/fs/quota.c -@@ -13,6 +13,8 @@ - #include <linux/kernel.h> - #include <linux/smp_lock.h> - #include <linux/security.h> -+#include <linux/syscalls.h> -+#include <linux/buffer_head.h> - - /* Check validity of quotactl */ - static int check_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t id) -@@ -134,16 +136,54 @@ restart: - return NULL; - } - -+void quota_sync_sb(struct super_block *sb, int type) -+{ -+ int cnt; -+ struct inode *discard[MAXQUOTAS]; -+ -+ sb->s_qcop->quota_sync(sb, type); -+ /* This is not very clever (and fast) but currently I don't know about -+ * any other simple way of getting quota data to disk and we must get -+ * them there for userspace to be visible... */ -+ if (sb->s_op->sync_fs) -+ sb->s_op->sync_fs(sb, 1); -+ sync_blockdev(sb->s_bdev); -+ -+ /* Now when everything is written we can discard the pagecache so -+ * that userspace sees the changes. We need i_sem and so we could -+ * not do it inside dqonoff_sem. Moreover we need to be carefull -+ * about races with quotaoff() (that is the reason why we have own -+ * reference to inode). */ -+ down(&sb_dqopt(sb)->dqonoff_sem); -+ for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -+ discard[cnt] = NULL; -+ if (type != -1 && cnt != type) -+ continue; -+ if (!sb_has_quota_enabled(sb, cnt)) -+ continue; -+ discard[cnt] = igrab(sb_dqopt(sb)->files[cnt]); -+ } -+ up(&sb_dqopt(sb)->dqonoff_sem); -+ for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -+ if (discard[cnt]) { -+ down(&discard[cnt]->i_sem); -+ truncate_inode_pages(&discard[cnt]->i_data, 0); -+ up(&discard[cnt]->i_sem); -+ iput(discard[cnt]); -+ } -+ } -+} -+ - void sync_dquots(struct super_block *sb, int type) - { - if (sb) { - if (sb->s_qcop->quota_sync) -- sb->s_qcop->quota_sync(sb, type); -+ quota_sync_sb(sb, type); - } - else { -- while ((sb = get_super_to_sync(type)) != 0) { -+ while ((sb = get_super_to_sync(type)) != NULL) { - if (sb->s_qcop->quota_sync) -- sb->s_qcop->quota_sync(sb, type); -+ quota_sync_sb(sb, type); - drop_super(sb); - } - } -diff -rup RH_2_6_9_55.orig/fs/quota_v1.c RH_2_6_9_55/fs/quota_v1.c ---- RH_2_6_9_55.orig/fs/quota_v1.c -+++ RH_2_6_9_55/fs/quota_v1.c -@@ -7,7 +7,6 @@ - #include <linux/init.h> - #include <linux/module.h> - --#include <asm/uaccess.h> - #include <asm/byteorder.h> - - MODULE_AUTHOR("Jan Kara"); -@@ -41,23 +40,14 @@ static void v1_mem2disk_dqblk(struct v1_ - static int v1_read_dqblk(struct dquot *dquot) - { - int type = dquot->dq_type; -- struct file *filp; -- mm_segment_t fs; -- loff_t offset; - struct v1_disk_dqblk dqblk; - -- filp = sb_dqopt(dquot->dq_sb)->files[type]; -- if (filp == (struct file *)NULL) -+ if (!sb_dqopt(dquot->dq_sb)->files[type]) - return -EINVAL; - -- /* Now we are sure filp is valid */ -- offset = v1_dqoff(dquot->dq_id); - /* Set structure to 0s in case read fails/is after end of file */ - memset(&dqblk, 0, sizeof(struct v1_disk_dqblk)); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset); -- set_fs(fs); -+ dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id)); - - v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk); - if (dquot->dq_dqb.dqb_bhardlimit == 0 && dquot->dq_dqb.dqb_bsoftlimit == 0 && -@@ -71,26 +61,18 @@ static int v1_read_dqblk(struct dquot *d - static int v1_commit_dqblk(struct dquot *dquot) - { - short type = dquot->dq_type; -- struct file *filp; -- mm_segment_t fs; -- loff_t offset; - ssize_t ret; - struct v1_disk_dqblk dqblk; - -- filp = sb_dqopt(dquot->dq_sb)->files[type]; -- offset = v1_dqoff(dquot->dq_id); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- - v1_mem2disk_dqblk(&dqblk, &dquot->dq_dqb); - if (dquot->dq_id == 0) { - dqblk.dqb_btime = sb_dqopt(dquot->dq_sb)->info[type].dqi_bgrace; - dqblk.dqb_itime = sb_dqopt(dquot->dq_sb)->info[type].dqi_igrace; - } - ret = 0; -- if (filp) -- ret = filp->f_op->write(filp, (char *)&dqblk, -- sizeof(struct v1_disk_dqblk), &offset); -+ if (sb_dqopt(dquot->dq_sb)->files[type]) -+ ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type, (char *)&dqblk, -+ sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id)); - if (ret != sizeof(struct v1_disk_dqblk)) { - printk(KERN_WARNING "VFS: dquota write failed on dev %s\n", - dquot->dq_sb->s_id); -@@ -101,7 +83,6 @@ static int v1_commit_dqblk(struct dquot - ret = 0; - - out: -- set_fs(fs); - dqstats.writes++; - - return ret; -@@ -121,14 +102,11 @@ struct v2_disk_dqheader { - - static int v1_check_quota_file(struct super_block *sb, int type) - { -- struct file *f = sb_dqopt(sb)->files[type]; -- struct inode *inode = f->f_dentry->d_inode; -+ struct inode *inode = sb_dqopt(sb)->files[type]; - ulong blocks; - size_t off; - struct v2_disk_dqheader dqhead; -- mm_segment_t fs; - ssize_t size; -- loff_t offset = 0; - loff_t isize; - static const uint quota_magics[] = V2_INITQMAGICS; - -@@ -140,10 +118,7 @@ static int v1_check_quota_file(struct su - if ((blocks % sizeof(struct v1_disk_dqblk) * BLOCK_SIZE + off) % sizeof(struct v1_disk_dqblk)) - return 0; - /* Doublecheck whether we didn't get file with new format - with old quotactl() this could happen */ -- fs = get_fs(); -- set_fs(KERNEL_DS); -- size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset); -- set_fs(fs); -+ size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0); - if (size != sizeof(struct v2_disk_dqheader)) - return 1; /* Probably not new format */ - if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type]) -@@ -155,16 +130,10 @@ static int v1_check_quota_file(struct su - static int v1_read_file_info(struct super_block *sb, int type) - { - struct quota_info *dqopt = sb_dqopt(sb); -- mm_segment_t fs; -- loff_t offset; -- struct file *filp = dqopt->files[type]; - struct v1_disk_dqblk dqblk; - int ret; - -- offset = v1_dqoff(0); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) { -+ if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) { - if (ret >= 0) - ret = -EIO; - goto out; -@@ -173,38 +142,31 @@ static int v1_read_file_info(struct supe - dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME; - dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME; - out: -- set_fs(fs); - return ret; - } - - static int v1_write_file_info(struct super_block *sb, int type) - { - struct quota_info *dqopt = sb_dqopt(sb); -- mm_segment_t fs; -- struct file *filp = dqopt->files[type]; - struct v1_disk_dqblk dqblk; -- loff_t offset; - int ret; - - dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY; -- offset = v1_dqoff(0); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) { -+ if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk, -+ sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) { - if (ret >= 0) - ret = -EIO; - goto out; - } - dqblk.dqb_itime = dqopt->info[type].dqi_igrace; - dqblk.dqb_btime = dqopt->info[type].dqi_bgrace; -- offset = v1_dqoff(0); -- ret = filp->f_op->write(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset); -+ ret = sb->s_op->quota_write(sb, type, (char *)&dqblk, -+ sizeof(struct v1_disk_dqblk), v1_dqoff(0)); - if (ret == sizeof(struct v1_disk_dqblk)) - ret = 0; - else if (ret > 0) - ret = -EIO; - out: -- set_fs(fs); - return ret; - } - -diff -rup RH_2_6_9_55.orig/fs/quota_v2.c RH_2_6_9_55/fs/quota_v2.c ---- RH_2_6_9_55.orig/fs/quota_v2.c -+++ RH_2_6_9_55/fs/quota_v2.c -@@ -13,7 +13,6 @@ - #include <linux/slab.h> - - #include <asm/byteorder.h> --#include <asm/uaccess.h> - - MODULE_AUTHOR("Jan Kara"); - MODULE_DESCRIPTION("Quota format v2 support"); -@@ -30,19 +29,15 @@ typedef char *dqbuf_t; - static int v2_check_quota_file(struct super_block *sb, int type) - { - struct v2_disk_dqheader dqhead; -- struct file *f = sb_dqopt(sb)->files[type]; -- mm_segment_t fs; - ssize_t size; -- loff_t offset = 0; - static const uint quota_magics[] = V2_INITQMAGICS; - static const uint quota_versions[] = V2_INITQVERSIONS; - -- fs = get_fs(); -- set_fs(KERNEL_DS); -- size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset); -- set_fs(fs); -- if (size != sizeof(struct v2_disk_dqheader)) -+ size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0); -+ if (size != sizeof(struct v2_disk_dqheader)) { -+ printk("failed read\n"); - return 0; -+ } - if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || - le32_to_cpu(dqhead.dqh_version) != quota_versions[type]) - return 0; -@@ -52,20 +47,15 @@ static int v2_check_quota_file(struct su - /* Read information header from quota file */ - static int v2_read_file_info(struct super_block *sb, int type) - { -- mm_segment_t fs; - struct v2_disk_dqinfo dinfo; - struct mem_dqinfo *info = sb_dqopt(sb)->info+type; -- struct file *f = sb_dqopt(sb)->files[type]; - ssize_t size; -- loff_t offset = V2_DQINFOOFF; - -- fs = get_fs(); -- set_fs(KERNEL_DS); -- size = f->f_op->read(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset); -- set_fs(fs); -+ size = sb->s_op->quota_read(sb, type, (char *)&dinfo, -+ sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF); - if (size != sizeof(struct v2_disk_dqinfo)) { - printk(KERN_WARNING "Can't read info structure on device %s.\n", -- f->f_dentry->d_sb->s_id); -+ sb->s_id); - return -1; - } - info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace); -@@ -80,12 +70,9 @@ static int v2_read_file_info(struct supe - /* Write information header to quota file */ - static int v2_write_file_info(struct super_block *sb, int type) - { -- mm_segment_t fs; - struct v2_disk_dqinfo dinfo; - struct mem_dqinfo *info = sb_dqopt(sb)->info+type; -- struct file *f = sb_dqopt(sb)->files[type]; - ssize_t size; -- loff_t offset = V2_DQINFOOFF; - - spin_lock(&dq_data_lock); - info->dqi_flags &= ~DQF_INFO_DIRTY; -@@ -96,13 +83,11 @@ static int v2_write_file_info(struct sup - dinfo.dqi_blocks = cpu_to_le32(info->u.v2_i.dqi_blocks); - dinfo.dqi_free_blk = cpu_to_le32(info->u.v2_i.dqi_free_blk); - dinfo.dqi_free_entry = cpu_to_le32(info->u.v2_i.dqi_free_entry); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- size = f->f_op->write(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset); -- set_fs(fs); -+ size = sb->s_op->quota_write(sb, type, (char *)&dinfo, -+ sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF); - if (size != sizeof(struct v2_disk_dqinfo)) { - printk(KERN_WARNING "Can't write info structure on device %s.\n", -- f->f_dentry->d_sb->s_id); -+ sb->s_id); - return -1; - } - return 0; -@@ -146,39 +131,24 @@ static inline void freedqbuf(dqbuf_t buf - kfree(buf); - } - --static ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf) -+static inline ssize_t read_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf) - { -- mm_segment_t fs; -- ssize_t ret; -- loff_t offset = blk<<V2_DQBLKSIZE_BITS; -- - memset(buf, 0, V2_DQBLKSIZE); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- ret = filp->f_op->read(filp, (char *)buf, V2_DQBLKSIZE, &offset); -- set_fs(fs); -- return ret; -+ return sb->s_op->quota_read(sb, type, (char *)buf, -+ V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS); - } - --static ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf) -+static inline ssize_t write_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf) - { -- mm_segment_t fs; -- ssize_t ret; -- loff_t offset = blk<<V2_DQBLKSIZE_BITS; -- -- fs = get_fs(); -- set_fs(KERNEL_DS); -- ret = filp->f_op->write(filp, (char *)buf, V2_DQBLKSIZE, &offset); -- set_fs(fs); -- return ret; -- -+ return sb->s_op->quota_write(sb, type, (char *)buf, -+ V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS); - } - - /* Remove empty block from list and return it */ --static int get_free_dqblk(struct file *filp, int type) -+static int get_free_dqblk(struct super_block *sb, int type) - { - dqbuf_t buf = getdqbuf(); -- struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type); -+ struct mem_dqinfo *info = sb_dqinfo(sb, type); - struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf; - int ret, blk; - -@@ -186,17 +156,18 @@ static int get_free_dqblk(struct file *f - return -ENOMEM; - if (info->u.v2_i.dqi_free_blk) { - blk = info->u.v2_i.dqi_free_blk; -- if ((ret = read_blk(filp, blk, buf)) < 0) -+ if ((ret = read_blk(sb, type, blk, buf)) < 0) - goto out_buf; - info->u.v2_i.dqi_free_blk = le32_to_cpu(dh->dqdh_next_free); - } - else { - memset(buf, 0, V2_DQBLKSIZE); -- if ((ret = write_blk(filp, info->u.v2_i.dqi_blocks, buf)) < 0) /* Assure block allocation... */ -+ /* Assure block allocation... */ -+ if ((ret = write_blk(sb, type, info->u.v2_i.dqi_blocks, buf)) < 0) - goto out_buf; - blk = info->u.v2_i.dqi_blocks++; - } -- mark_info_dirty(filp->f_dentry->d_sb, type); -+ mark_info_dirty(sb, type); - ret = blk; - out_buf: - freedqbuf(buf); -@@ -204,9 +175,9 @@ out_buf: - } - - /* Insert empty block to the list */ --static int put_free_dqblk(struct file *filp, int type, dqbuf_t buf, uint blk) -+static int put_free_dqblk(struct super_block *sb, int type, dqbuf_t buf, uint blk) - { -- struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type); -+ struct mem_dqinfo *info = sb_dqinfo(sb, type); - struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf; - int err; - -@@ -214,17 +185,18 @@ static int put_free_dqblk(struct file *f - dh->dqdh_prev_free = cpu_to_le32(0); - dh->dqdh_entries = cpu_to_le16(0); - info->u.v2_i.dqi_free_blk = blk; -- mark_info_dirty(filp->f_dentry->d_sb, type); -- if ((err = write_blk(filp, blk, buf)) < 0) /* Some strange block. We had better leave it... */ -+ mark_info_dirty(sb, type); -+ /* Some strange block. We had better leave it... */ -+ if ((err = write_blk(sb, type, blk, buf)) < 0) - return err; - return 0; - } - - /* Remove given block from the list of blocks with free entries */ --static int remove_free_dqentry(struct file *filp, int type, dqbuf_t buf, uint blk) -+static int remove_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk) - { - dqbuf_t tmpbuf = getdqbuf(); -- struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type); -+ struct mem_dqinfo *info = sb_dqinfo(sb, type); - struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf; - uint nextblk = le32_to_cpu(dh->dqdh_next_free), prevblk = le32_to_cpu(dh->dqdh_prev_free); - int err; -@@ -232,26 +204,27 @@ static int remove_free_dqentry(struct fi - if (!tmpbuf) - return -ENOMEM; - if (nextblk) { -- if ((err = read_blk(filp, nextblk, tmpbuf)) < 0) -+ if ((err = read_blk(sb, type, nextblk, tmpbuf)) < 0) - goto out_buf; - ((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = dh->dqdh_prev_free; -- if ((err = write_blk(filp, nextblk, tmpbuf)) < 0) -+ if ((err = write_blk(sb, type, nextblk, tmpbuf)) < 0) - goto out_buf; - } - if (prevblk) { -- if ((err = read_blk(filp, prevblk, tmpbuf)) < 0) -+ if ((err = read_blk(sb, type, prevblk, tmpbuf)) < 0) - goto out_buf; - ((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_next_free = dh->dqdh_next_free; -- if ((err = write_blk(filp, prevblk, tmpbuf)) < 0) -+ if ((err = write_blk(sb, type, prevblk, tmpbuf)) < 0) - goto out_buf; - } - else { - info->u.v2_i.dqi_free_entry = nextblk; -- mark_info_dirty(filp->f_dentry->d_sb, type); -+ mark_info_dirty(sb, type); - } - freedqbuf(tmpbuf); - dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0); -- if (write_blk(filp, blk, buf) < 0) /* No matter whether write succeeds block is out of list */ -+ /* No matter whether write succeeds block is out of list */ -+ if (write_blk(sb, type, blk, buf) < 0) - printk(KERN_ERR "VFS: Can't write block (%u) with free entries.\n", blk); - return 0; - out_buf: -@@ -260,10 +233,10 @@ out_buf: - } - - /* Insert given block to the beginning of list with free entries */ --static int insert_free_dqentry(struct file *filp, int type, dqbuf_t buf, uint blk) -+static int insert_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk) - { - dqbuf_t tmpbuf = getdqbuf(); -- struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type); -+ struct mem_dqinfo *info = sb_dqinfo(sb, type); - struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf; - int err; - -@@ -271,18 +244,18 @@ static int insert_free_dqentry(struct fi - return -ENOMEM; - dh->dqdh_next_free = cpu_to_le32(info->u.v2_i.dqi_free_entry); - dh->dqdh_prev_free = cpu_to_le32(0); -- if ((err = write_blk(filp, blk, buf)) < 0) -+ if ((err = write_blk(sb, type, blk, buf)) < 0) - goto out_buf; - if (info->u.v2_i.dqi_free_entry) { -- if ((err = read_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0) -+ if ((err = read_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0) - goto out_buf; - ((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = cpu_to_le32(blk); -- if ((err = write_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0) -+ if ((err = write_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0) - goto out_buf; - } - freedqbuf(tmpbuf); - info->u.v2_i.dqi_free_entry = blk; -- mark_info_dirty(filp->f_dentry->d_sb, type); -+ mark_info_dirty(sb, type); - return 0; - out_buf: - freedqbuf(tmpbuf); -@@ -292,8 +265,8 @@ out_buf: - /* Find space for dquot */ - static uint find_free_dqentry(struct dquot *dquot, int *err) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -- struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info+dquot->dq_type; -+ struct super_block *sb = dquot->dq_sb; -+ struct mem_dqinfo *info = sb_dqopt(sb)->info+dquot->dq_type; - uint blk, i; - struct v2_disk_dqdbheader *dh; - struct v2_disk_dqblk *ddquot; -@@ -309,22 +282,23 @@ static uint find_free_dqentry(struct dqu - ddquot = GETENTRIES(buf); - if (info->u.v2_i.dqi_free_entry) { - blk = info->u.v2_i.dqi_free_entry; -- if ((*err = read_blk(filp, blk, buf)) < 0) -+ if ((*err = read_blk(sb, dquot->dq_type, blk, buf)) < 0) - goto out_buf; - } - else { -- blk = get_free_dqblk(filp, dquot->dq_type); -+ blk = get_free_dqblk(sb, dquot->dq_type); - if ((int)blk < 0) { - *err = blk; - freedqbuf(buf); - return 0; - } - memset(buf, 0, V2_DQBLKSIZE); -- info->u.v2_i.dqi_free_entry = blk; /* This is enough as block is already zeroed and entry list is empty... */ -- mark_info_dirty(dquot->dq_sb, dquot->dq_type); -+ /* This is enough as block is already zeroed and entry list is empty... */ -+ info->u.v2_i.dqi_free_entry = blk; -+ mark_info_dirty(sb, dquot->dq_type); - } - if (le16_to_cpu(dh->dqdh_entries)+1 >= V2_DQSTRINBLK) /* Block will be full? */ -- if ((*err = remove_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0) { -+ if ((*err = remove_free_dqentry(sb, dquot->dq_type, buf, blk)) < 0) { - printk(KERN_ERR "VFS: find_free_dqentry(): Can't remove block (%u) from entry free list.\n", blk); - goto out_buf; - } -@@ -339,7 +313,7 @@ static uint find_free_dqentry(struct dqu - goto out_buf; - } - #endif -- if ((*err = write_blk(filp, blk, buf)) < 0) { -+ if ((*err = write_blk(sb, dquot->dq_type, blk, buf)) < 0) { - printk(KERN_ERR "VFS: find_free_dqentry(): Can't write quota data block %u.\n", blk); - goto out_buf; - } -@@ -354,7 +328,7 @@ out_buf: - /* Insert reference to structure into the trie */ - static int do_insert_tree(struct dquot *dquot, uint *treeblk, int depth) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -+ struct super_block *sb = dquot->dq_sb; - dqbuf_t buf; - int ret = 0, newson = 0, newact = 0; - __le32 *ref; -@@ -363,7 +337,7 @@ static int do_insert_tree(struct dquot * - if (!(buf = getdqbuf())) - return -ENOMEM; - if (!*treeblk) { -- ret = get_free_dqblk(filp, dquot->dq_type); -+ ret = get_free_dqblk(sb, dquot->dq_type); - if (ret < 0) - goto out_buf; - *treeblk = ret; -@@ -371,7 +345,7 @@ static int do_insert_tree(struct dquot * - newact = 1; - } - else { -- if ((ret = read_blk(filp, *treeblk, buf)) < 0) { -+ if ((ret = read_blk(sb, dquot->dq_type, *treeblk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read tree quota block %u.\n", *treeblk); - goto out_buf; - } -@@ -394,10 +368,10 @@ static int do_insert_tree(struct dquot * - ret = do_insert_tree(dquot, &newblk, depth+1); - if (newson && ret >= 0) { - ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(newblk); -- ret = write_blk(filp, *treeblk, buf); -+ ret = write_blk(sb, dquot->dq_type, *treeblk, buf); - } - else if (newact && ret < 0) -- put_free_dqblk(filp, dquot->dq_type, buf, *treeblk); -+ put_free_dqblk(sb, dquot->dq_type, buf, *treeblk); - out_buf: - freedqbuf(buf); - return ret; -@@ -416,20 +390,15 @@ static inline int dq_insert_tree(struct - static int v2_write_dquot(struct dquot *dquot) - { - int type = dquot->dq_type; -- struct file *filp; -- mm_segment_t fs; -- loff_t offset; - ssize_t ret; - struct v2_disk_dqblk ddquot, empty; - - /* dq_off is guarded by dqio_sem */ - if (!dquot->dq_off) - if ((ret = dq_insert_tree(dquot)) < 0) { -- printk(KERN_ERR "VFS: Error %Zd occurred while creating quota.\n", ret); -+ printk(KERN_ERR "VFS: Error %d occurred while creating quota.\n", ret); - return ret; - } -- filp = sb_dqopt(dquot->dq_sb)->files[type]; -- offset = dquot->dq_off; - spin_lock(&dq_data_lock); - mem2diskdqb(&ddquot, &dquot->dq_dqb, dquot->dq_id); - /* Argh... We may need to write structure full of zeroes but that would be -@@ -439,10 +408,8 @@ static int v2_write_dquot(struct dquot * - if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk))) - ddquot.dqb_itime = cpu_to_le64(1); - spin_unlock(&dq_data_lock); -- fs = get_fs(); -- set_fs(KERNEL_DS); -- ret = filp->f_op->write(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset); -- set_fs(fs); -+ ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type, -+ (char *)&ddquot, sizeof(struct v2_disk_dqblk), dquot->dq_off); - if (ret != sizeof(struct v2_disk_dqblk)) { - printk(KERN_WARNING "VFS: dquota write failed on dev %s\n", dquot->dq_sb->s_id); - if (ret >= 0) -@@ -458,7 +425,8 @@ static int v2_write_dquot(struct dquot * - /* Free dquot entry in data block */ - static int free_dqentry(struct dquot *dquot, uint blk) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -+ struct super_block *sb = dquot->dq_sb; -+ int type = dquot->dq_type; - struct v2_disk_dqdbheader *dh; - dqbuf_t buf = getdqbuf(); - int ret = 0; -@@ -466,34 +434,39 @@ static int free_dqentry(struct dquot *dq - if (!buf) - return -ENOMEM; - if (dquot->dq_off >> V2_DQBLKSIZE_BITS != blk) { -- printk(KERN_ERR "VFS: Quota structure has offset to other block (%u) than it should (%u).\n", blk, (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS)); -+ printk(KERN_ERR "VFS: Quota structure has offset to other " -+ "block (%u) than it should (%u).\n", blk, -+ (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS)); - goto out_buf; - } -- if ((ret = read_blk(filp, blk, buf)) < 0) { -+ if ((ret = read_blk(sb, type, blk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read quota data block %u\n", blk); - goto out_buf; - } - dh = (struct v2_disk_dqdbheader *)buf; - dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries)-1); - if (!le16_to_cpu(dh->dqdh_entries)) { /* Block got free? */ -- if ((ret = remove_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0 || -- (ret = put_free_dqblk(filp, dquot->dq_type, buf, blk)) < 0) { -- printk(KERN_ERR "VFS: Can't move quota data block (%u) to free list.\n", blk); -+ if ((ret = remove_free_dqentry(sb, type, buf, blk)) < 0 || -+ (ret = put_free_dqblk(sb, type, buf, blk)) < 0) { -+ printk(KERN_ERR "VFS: Can't move quota data block (%u) " -+ "to free list.\n", blk); - goto out_buf; - } - } - else { -- memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0, sizeof(struct v2_disk_dqblk)); -+ memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0, -+ sizeof(struct v2_disk_dqblk)); - if (le16_to_cpu(dh->dqdh_entries) == V2_DQSTRINBLK-1) { - /* Insert will write block itself */ -- if ((ret = insert_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0) { -+ if ((ret = insert_free_dqentry(sb, type, buf, blk)) < 0) { - printk(KERN_ERR "VFS: Can't insert quota data block (%u) to free entry list.\n", blk); - goto out_buf; - } - } - else -- if ((ret = write_blk(filp, blk, buf)) < 0) { -- printk(KERN_ERR "VFS: Can't write quota data block %u\n", blk); -+ if ((ret = write_blk(sb, type, blk, buf)) < 0) { -+ printk(KERN_ERR "VFS: Can't write quota data " -+ "block %u\n", blk); - goto out_buf; - } - } -@@ -506,7 +479,8 @@ out_buf: - /* Remove reference to dquot from tree */ - static int remove_tree(struct dquot *dquot, uint *blk, int depth) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; -+ struct super_block *sb = dquot->dq_sb; -+ int type = dquot->dq_type; - dqbuf_t buf = getdqbuf(); - int ret = 0; - uint newblk; -@@ -514,7 +488,7 @@ static int remove_tree(struct dquot *dqu - - if (!buf) - return -ENOMEM; -- if ((ret = read_blk(filp, *blk, buf)) < 0) { -+ if ((ret = read_blk(sb, type, *blk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read quota data block %u\n", *blk); - goto out_buf; - } -@@ -530,12 +504,13 @@ static int remove_tree(struct dquot *dqu - ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(0); - for (i = 0; i < V2_DQBLKSIZE && !buf[i]; i++); /* Block got empty? */ - if (i == V2_DQBLKSIZE) { -- put_free_dqblk(filp, dquot->dq_type, buf, *blk); -+ put_free_dqblk(sb, type, buf, *blk); - *blk = 0; - } - else -- if ((ret = write_blk(filp, *blk, buf)) < 0) -- printk(KERN_ERR "VFS: Can't write quota tree block %u.\n", *blk); -+ if ((ret = write_blk(sb, type, *blk, buf)) < 0) -+ printk(KERN_ERR "VFS: Can't write quota tree " -+ "block %u.\n", *blk); - } - out_buf: - freedqbuf(buf); -@@ -555,7 +530,6 @@ static int v2_delete_dquot(struct dquot - /* Find entry in block */ - static loff_t find_block_dqentry(struct dquot *dquot, uint blk) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; - dqbuf_t buf = getdqbuf(); - loff_t ret = 0; - int i; -@@ -563,27 +537,31 @@ static loff_t find_block_dqentry(struct - - if (!buf) - return -ENOMEM; -- if ((ret = read_blk(filp, blk, buf)) < 0) { -+ if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk); - goto out_buf; - } - if (dquot->dq_id) -- for (i = 0; i < V2_DQSTRINBLK && le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++); -+ for (i = 0; i < V2_DQSTRINBLK && -+ le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++); - else { /* ID 0 as a bit more complicated searching... */ - struct v2_disk_dqblk fakedquot; - - memset(&fakedquot, 0, sizeof(struct v2_disk_dqblk)); - for (i = 0; i < V2_DQSTRINBLK; i++) -- if (!le32_to_cpu(ddquot[i].dqb_id) && memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk))) -+ if (!le32_to_cpu(ddquot[i].dqb_id) && -+ memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk))) - break; - } - if (i == V2_DQSTRINBLK) { -- printk(KERN_ERR "VFS: Quota for id %u referenced but not present.\n", dquot->dq_id); -+ printk(KERN_ERR "VFS: Quota for id %u referenced " -+ "but not present.\n", dquot->dq_id); - ret = -EIO; - goto out_buf; - } - else -- ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk); -+ ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct -+ v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk); - out_buf: - freedqbuf(buf); - return ret; -@@ -592,14 +570,13 @@ out_buf: - /* Find entry for given id in the tree */ - static loff_t find_tree_dqentry(struct dquot *dquot, uint blk, int depth) - { -- struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; - dqbuf_t buf = getdqbuf(); - loff_t ret = 0; - __le32 *ref = (__le32 *)buf; - - if (!buf) - return -ENOMEM; -- if ((ret = read_blk(filp, blk, buf)) < 0) { -+ if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) { - printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk); - goto out_buf; - } -@@ -625,16 +602,13 @@ static inline loff_t find_dqentry(struct - static int v2_read_dquot(struct dquot *dquot) - { - int type = dquot->dq_type; -- struct file *filp; -- mm_segment_t fs; - loff_t offset; - struct v2_disk_dqblk ddquot, empty; - int ret = 0; - -- filp = sb_dqopt(dquot->dq_sb)->files[type]; -- - #ifdef __QUOTA_V2_PARANOIA -- if (!filp || !dquot->dq_sb) { /* Invalidated quota? */ -+ /* Invalidated quota? */ -+ if (!dquot->dq_sb || !sb_dqopt(dquot->dq_sb)->files[type]) { - printk(KERN_ERR "VFS: Quota invalidated while reading!\n"); - return -EIO; - } -@@ -642,7 +616,8 @@ static int v2_read_dquot(struct dquot *d - offset = find_dqentry(dquot); - if (offset <= 0) { /* Entry not present? */ - if (offset < 0) -- printk(KERN_ERR "VFS: Can't read quota structure for id %u.\n", dquot->dq_id); -+ printk(KERN_ERR "VFS: Can't read quota " -+ "structure for id %u.\n", dquot->dq_id); - dquot->dq_off = 0; - set_bit(DQ_FAKE_B, &dquot->dq_flags); - memset(&dquot->dq_dqb, 0, sizeof(struct mem_dqblk)); -@@ -650,12 +625,13 @@ static int v2_read_dquot(struct dquot *d - } - else { - dquot->dq_off = offset; -- fs = get_fs(); -- set_fs(KERNEL_DS); -- if ((ret = filp->f_op->read(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset)) != sizeof(struct v2_disk_dqblk)) { -+ if ((ret = dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, -+ (char *)&ddquot, sizeof(struct v2_disk_dqblk), offset)) -+ != sizeof(struct v2_disk_dqblk)) { - if (ret >= 0) - ret = -EIO; -- printk(KERN_ERR "VFS: Error while reading quota structure for id %u.\n", dquot->dq_id); -+ printk(KERN_ERR "VFS: Error while reading quota " -+ "structure for id %u.\n", dquot->dq_id); - memset(&ddquot, 0, sizeof(struct v2_disk_dqblk)); - } - else { -@@ -666,7 +642,6 @@ static int v2_read_dquot(struct dquot *d - if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk))) - ddquot.dqb_itime = 0; - } -- set_fs(fs); - disk2memdqb(&dquot->dq_dqb, &ddquot); - if (!dquot->dq_dqb.dqb_bhardlimit && - !dquot->dq_dqb.dqb_bsoftlimit && -diff -rup RH_2_6_9_55.orig/include/linux/fs.h RH_2_6_9_55/include/linux/fs.h ---- RH_2_6_9_55.orig/include/linux/fs.h -+++ RH_2_6_9_55/include/linux/fs.h -@@ -1042,6 +1042,9 @@ struct super_operations { - void (*umount_lustre) (struct super_block *); - - int (*show_options)(struct seq_file *, struct vfsmount *); -+ -+ ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); -+ ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); - }; - - /* Inode state bits. Protected by inode_lock. */ -diff -rup RH_2_6_9_55.orig/include/linux/quota.h RH_2_6_9_55/include/linux/quota.h ---- RH_2_6_9_55.orig/include/linux/quota.h -+++ RH_2_6_9_55/include/linux/quota.h -@@ -285,7 +285,7 @@ struct quota_info { - struct semaphore dqio_sem; /* lock device while I/O in progress */ - struct semaphore dqonoff_sem; /* Serialize quotaon & quotaoff */ - struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ -- struct file *files[MAXQUOTAS]; /* fp's to quotafiles */ -+ struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ - struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ - struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ - }; -diff -rup RH_2_6_9_55.orig/include/linux/security.h RH_2_6_9_55/include/linux/security.h ---- RH_2_6_9_55.orig/include/linux/security.h -+++ RH_2_6_9_55/include/linux/security.h -@@ -1033,7 +1033,7 @@ struct security_operations { - int (*sysctl) (ctl_table * table, int op); - int (*capable) (struct task_struct * tsk, int cap); - int (*quotactl) (int cmds, int type, int id, struct super_block * sb); -- int (*quota_on) (struct file * f); -+ int (*quota_on) (struct dentry * dentry); - int (*syslog) (int type); - int (*vm_enough_memory) (long pages); - -@@ -1281,9 +1281,9 @@ static inline int security_quotactl (int - return security_ops->quotactl (cmds, type, id, sb); - } - --static inline int security_quota_on (struct file * file) -+static inline int security_quota_on (struct dentry * dentry) - { -- return security_ops->quota_on (file); -+ return security_ops->quota_on (dentry); - } - - static inline int security_syslog(int type) -@@ -1953,7 +1953,7 @@ static inline int security_quotactl (int - return 0; - } - --static inline int security_quota_on (struct file * file) -+static inline int security_quota_on (struct dentry * dentry) - { - return 0; - } -diff -rup RH_2_6_9_55.orig/security/dummy.c RH_2_6_9_55/security/dummy.c ---- RH_2_6_9_55.orig/security/dummy.c -+++ RH_2_6_9_55/security/dummy.c -@@ -92,7 +92,7 @@ static int dummy_quotactl (int cmds, int - return 0; - } - --static int dummy_quota_on (struct file *f) -+static int dummy_quota_on (struct dentry *dentry) - { - return 0; - } -diff -rup RH_2_6_9_55.orig/security/selinux/hooks.c RH_2_6_9_55/security/selinux/hooks.c ---- RH_2_6_9_55.orig/security/selinux/hooks.c -+++ RH_2_6_9_55/security/selinux/hooks.c -@@ -1485,9 +1485,9 @@ static int selinux_quotactl(int cmds, in - return rc; - } - --static int selinux_quota_on(struct file *f) -+static int selinux_quota_on(struct dentry *dentry) - { -- return file_has_perm(current, f, FILE__QUOTAON); -+ return dentry_has_perm(current, NULL, dentry, FILE__QUOTAON); - } - - static int selinux_syslog(int type) diff --git a/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-ext3.patch b/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-ext3.patch deleted file mode 100644 index bcfa38ab63..0000000000 --- a/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-ext3.patch +++ /dev/null @@ -1,273 +0,0 @@ -Index: linux-2.6.9/fs/ext3/inode.c -=================================================================== ---- linux-2.6.9.orig/fs/ext3/inode.c 2006-08-25 16:39:10.000000000 +0800 -+++ linux-2.6.9/fs/ext3/inode.c 2006-09-14 11:44:29.000000000 +0800 -@@ -1028,7 +1028,7 @@ - return ret; - } - --static int -+int - ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh) - { - int err = journal_dirty_data(handle, bh); -Index: linux-2.6.9/fs/ext3/super.c -=================================================================== ---- linux-2.6.9.orig/fs/ext3/super.c 2006-08-25 16:39:48.000000000 +0800 -+++ linux-2.6.9/fs/ext3/super.c 2006-09-14 11:51:48.000000000 +0800 -@@ -529,7 +529,10 @@ - static int ext3_write_info(struct super_block *sb, int type); - static int ext3_quota_on(struct super_block *sb, int type, int format_id, char *path); - static int ext3_quota_on_mount(struct super_block *sb, int type); --static int ext3_quota_off_mount(struct super_block *sb, int type); -+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data, -+ size_t len, loff_t off); -+static ssize_t ext3_quota_write(struct super_block *sb, int type, -+ const char *data, size_t len, loff_t off); - - static struct dquot_operations ext3_quota_operations = { - .initialize = ext3_dquot_initialize, -@@ -572,6 +575,10 @@ - .statfs = ext3_statfs, - .remount_fs = ext3_remount, - .clear_inode = ext3_clear_inode, -+#ifdef CONFIG_QUOTA -+ .quota_read = ext3_quota_read, -+ .quota_write = ext3_quota_write, -+#endif - }; - - static struct dentry *ext3_get_dentry(struct super_block *sb, void *vobjp) -@@ -713,6 +720,7 @@ - int option; - #ifdef CONFIG_QUOTA - int qtype; -+ char *qname; - #endif - - if (!options) -@@ -891,19 +899,22 @@ - "quota options when quota turned on.\n"); - return 0; - } -- if (sbi->s_qf_names[qtype]) { -+ qname = match_strdup(&args[0]); -+ if (!qname) { - printk(KERN_ERR -- "EXT3-fs: %s quota file already " -- "specified.\n", QTYPE2NAME(qtype)); -+ "EXT3-fs: not enough memory for " -+ "storing quotafile name.\n"); - return 0; - } -- sbi->s_qf_names[qtype] = match_strdup(&args[0]); -- if (!sbi->s_qf_names[qtype]) { -+ if (sbi->s_qf_names[qtype] && -+ strcmp(sbi->s_qf_names[qtype], qname)) { - printk(KERN_ERR -- "EXT3-fs: not enough memory for " -- "storing quotafile name.\n"); -+ "EXT3-fs: %s quota file already " -+ "specified.\n", QTYPE2NAME(qtype)); -+ kfree(qname); - return 0; - } -+ sbi->s_qf_names[qtype] = qname; - if (strchr(sbi->s_qf_names[qtype], '/')) { - printk(KERN_ERR - "EXT3-fs: quotafile must be on " -@@ -1223,7 +1234,7 @@ - /* Turn quotas off */ - for (i = 0; i < MAXQUOTAS; i++) { - if (sb_dqopt(sb)->files[i]) -- ext3_quota_off_mount(sb, i); -+ vfs_quota_off(sb, i); - } - #endif - sb->s_flags = s_flags; /* Restore MS_RDONLY status */ -@@ -2240,7 +2251,7 @@ - - static inline struct inode *dquot_to_inode(struct dquot *dquot) - { -- return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]->f_dentry->d_inode; -+ return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; - } - - static int ext3_dquot_initialize(struct inode *inode, int type) -@@ -2279,8 +2290,10 @@ - { - int ret, err; - handle_t *handle; -+ struct inode *inode; - -- handle = ext3_journal_start(dquot_to_inode(dquot), -+ inode = dquot_to_inode(dquot); -+ handle = ext3_journal_start(inode, - EXT3_QUOTA_TRANS_BLOCKS); - if (IS_ERR(handle)) - return PTR_ERR(handle); -@@ -2367,22 +2380,9 @@ - if (IS_ERR(dentry)) - return PTR_ERR(dentry); - err = vfs_quota_on_mount(type, EXT3_SB(sb)->s_jquota_fmt, dentry); -- if (err) -- dput(dentry); -- /* We keep the dentry reference if everything went ok - we drop it -- * on quota_off time */ -- return err; --} -- --/* Turn quotas off during mount time */ --static int ext3_quota_off_mount(struct super_block *sb, int type) --{ -- int err; -- struct dentry *dentry; -- -- dentry = sb_dqopt(sb)->files[type]->f_dentry; -- err = vfs_quota_off_mount(sb, type); -- /* We invalidate dentry - it has at least wrong hash... */ -+ /* Now invalidate and put the dentry - quota got its own reference -+ * to inode and dentry has at least wrong hash so we had better -+ * throw it away */ - d_invalidate(dentry); - dput(dentry); - return err; -@@ -2405,20 +2405,121 @@ - if (err) - return err; - /* Quotafile not on the same filesystem? */ -- if (nd.mnt->mnt_sb != sb) -+ if (nd.mnt->mnt_sb != sb) { -+ path_release(&nd); - return -EXDEV; -+ } - /* Quotafile not of fs root? */ - if (nd.dentry->d_parent->d_inode != sb->s_root->d_inode) - printk(KERN_WARNING - "EXT3-fs: Quota file not on filesystem root. " - "Journalled quota will not work.\n"); -- if (!ext3_should_journal_data(nd.dentry->d_inode)) -- printk(KERN_WARNING "EXT3-fs: Quota file does not have " -- "data-journalling. Journalled quota will not work.\n"); - path_release(&nd); - return vfs_quota_on(sb, type, format_id, path); - } - -+/* Read data from quotafile - avoid pagecache and such because we cannot afford -+ * acquiring the locks... As quota files are never truncated and quota code -+ * itself serializes the operations (and noone else should touch the files) -+ * we don't have to be afraid of races */ -+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data, -+ size_t len, loff_t off) -+{ -+ struct inode *inode = sb_dqopt(sb)->files[type]; -+ sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb); -+ int err = 0; -+ int offset = off & (sb->s_blocksize - 1); -+ int tocopy; -+ size_t toread; -+ struct buffer_head *bh; -+ loff_t i_size = i_size_read(inode); -+ -+ if (off > i_size) -+ return 0; -+ if (off+len > i_size) -+ len = i_size-off; -+ toread = len; -+ while (toread > 0) { -+ tocopy = sb->s_blocksize - offset < toread ? -+ sb->s_blocksize - offset : toread; -+ bh = ext3_bread(NULL, inode, blk, 0, &err); -+ if (err) -+ return err; -+ if (!bh) /* A hole? */ -+ memset(data, 0, tocopy); -+ else -+ memcpy(data, bh->b_data+offset, tocopy); -+ brelse(bh); -+ offset = 0; -+ toread -= tocopy; -+ data += tocopy; -+ blk++; -+ } -+ return len; -+} -+ -+/* Write to quotafile (we know the transaction is already started and has -+ * enough credits) */ -+static ssize_t ext3_quota_write(struct super_block *sb, int type, -+ const char *data, size_t len, loff_t off) -+{ -+ struct inode *inode = sb_dqopt(sb)->files[type]; -+ sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb); -+ int err = 0; -+ int offset = off & (sb->s_blocksize - 1); -+ int tocopy; -+ int journal_quota = EXT3_SB(sb)->s_qf_names[type] != NULL; -+ size_t towrite = len; -+ struct buffer_head *bh; -+ handle_t *handle = journal_current_handle(); -+ -+ down(&inode->i_sem); -+ while (towrite > 0) { -+ tocopy = sb->s_blocksize - offset < towrite ? -+ sb->s_blocksize - offset : towrite; -+ bh = ext3_bread(handle, inode, blk, 1, &err); -+ if (!bh) -+ goto out; -+ if (journal_quota) { -+ err = ext3_journal_get_write_access(handle, bh); -+ if (err) { -+ brelse(bh); -+ goto out; -+ } -+ } -+ lock_buffer(bh); -+ memcpy(bh->b_data+offset, data, tocopy); -+ flush_dcache_page(bh->b_page); -+ unlock_buffer(bh); -+ if (journal_quota) -+ err = ext3_journal_dirty_metadata(handle, bh); -+ else { -+ /* Always do at least ordered writes for quotas */ -+ err = ext3_journal_dirty_data(handle, bh); -+ mark_buffer_dirty(bh); -+ } -+ brelse(bh); -+ if (err) -+ goto out; -+ offset = 0; -+ towrite -= tocopy; -+ data += tocopy; -+ blk++; -+ } -+out: -+ if (len == towrite) -+ return err; -+ if (inode->i_size < off+len-towrite) { -+ i_size_write(inode, off+len-towrite); -+ EXT3_I(inode)->i_disksize = inode->i_size; -+ } -+ inode->i_version++; -+ inode->i_mtime = inode->i_ctime = CURRENT_TIME; -+ ext3_mark_inode_dirty(handle, inode); -+ up(&inode->i_sem); -+ return len - towrite; -+} -+ - #endif - - static struct super_block *ext3_get_sb(struct file_system_type *fs_type, -Index: linux-2.6.9/include/linux/ext3_jbd.h -=================================================================== ---- linux-2.6.9.orig/include/linux/ext3_jbd.h 2006-08-25 16:39:09.000000000 +0800 -+++ linux-2.6.9/include/linux/ext3_jbd.h 2006-09-14 11:44:29.000000000 +0800 -@@ -193,6 +193,8 @@ - #define ext3_journal_forget(handle, bh) \ - __ext3_journal_forget(__FUNCTION__, (handle), (bh)) - -+int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh); -+ - handle_t *ext3_journal_start_sb(struct super_block *sb, int nblocks); - int __ext3_journal_stop(const char *where, handle_t *handle); - diff --git a/lustre/kernel_patches/patches/quota-fix-oops-in-invalidate_dquots.patch b/lustre/kernel_patches/patches/quota-fix-oops-in-invalidate_dquots.patch deleted file mode 100644 index b8c6b0d4b0..0000000000 --- a/lustre/kernel_patches/patches/quota-fix-oops-in-invalidate_dquots.patch +++ /dev/null @@ -1,127 +0,0 @@ -From: Jan Kara <jack@suse.cz> -Date: Thu, 23 Mar 2006 11:00:17 +0000 (-0800) -Subject: [PATCH] Fix oops in invalidate_dquots() -X-Git-Tag: v2.6.17-rc1~1059 -X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6362e4d4eda61efb04ac1cdae32e48ac6d90b701 - -[PATCH] Fix oops in invalidate_dquots() - -When quota is being turned off we assumed that all the references to dquots -were already dropped. That need not be true as inodes being deleted are -not on superblock's inodes list and hence we need not reach it when -removing quota references from inodes. So invalidate_dquots() has to wait -for all the users of dquots (as quota is already marked as turned off, no -new references can be acquired and so this is bound to happen rather -early). When we do this, we can also remove the iprune_sem locking as it -was protecting us against exactly the same problem when freeing inodes -icache memory. - -Signed-off-by: Jan Kara <jack@suse.cz> -Signed-off-by: Andrew Morton <akpm@osdl.org> -Signed-off-by: Linus Torvalds <torvalds@osdl.org> ---- - -diff --git a/fs/dquot.c b/fs/dquot.c -index 1966c89..9376a43 100644 ---- a/fs/dquot.c -+++ b/fs/dquot.c -@@ -118,8 +118,7 @@ - * spinlock to internal buffers before writing. - * - * Lock ordering (including related VFS locks) is the following: -- * i_mutex > dqonoff_sem > iprune_sem > journal_lock > dqptr_sem > -- * > dquot->dq_lock > dqio_sem -+ * i_mutex > dqonoff_sem > journal_lock > dqptr_sem > dquot->dq_lock > dqio_sem - * i_mutex on quota files is special (it's below dqio_sem) - */ - -@@ -407,23 +406,49 @@ out_dqlock: - - /* Invalidate all dquots on the list. Note that this function is called after - * quota is disabled and pointers from inodes removed so there cannot be new -- * quota users. Also because we hold dqonoff_sem there can be no quota users -- * for this sb+type at all. */ -+ * quota users. There can still be some users of quotas due to inodes being -+ * just deleted or pruned by prune_icache() (those are not attached to any -+ * list). We have to wait for such users. -+ */ - static void invalidate_dquots(struct super_block *sb, int type) - { - struct dquot *dquot, *tmp; - -+restart: - spin_lock(&dq_list_lock); - list_for_each_entry_safe(dquot, tmp, &inuse_list, dq_inuse) { - if (dquot->dq_sb != sb) - continue; - if (dquot->dq_type != type) - continue; --#ifdef __DQUOT_PARANOIA -- if (atomic_read(&dquot->dq_count)) -- BUG(); --#endif -- /* Quota now has no users and it has been written on last dqput() */ -+ /* Wait for dquot users */ -+ if (atomic_read(&dquot->dq_count)) { -+ DEFINE_WAIT(wait); -+ -+ atomic_inc(&dquot->dq_count); -+ prepare_to_wait(&dquot->dq_wait_unused, &wait, -+ TASK_UNINTERRUPTIBLE); -+ spin_unlock(&dq_list_lock); -+ /* Once dqput() wakes us up, we know it's time to free -+ * the dquot. -+ * IMPORTANT: we rely on the fact that there is always -+ * at most one process waiting for dquot to free. -+ * Otherwise dq_count would be > 1 and we would never -+ * wake up. -+ */ -+ if (atomic_read(&dquot->dq_count) > 1) -+ schedule(); -+ finish_wait(&dquot->dq_wait_unused, &wait); -+ dqput(dquot); -+ /* At this moment dquot() need not exist (it could be -+ * reclaimed by prune_dqcache(). Hence we must -+ * restart. */ -+ goto restart; -+ } -+ /* -+ * Quota now has no users and it has been written on last -+ * dqput() -+ */ - remove_dquot_hash(dquot); - remove_free_dquot(dquot); - remove_inuse(dquot); -@@ -540,6 +565,10 @@ we_slept: - if (atomic_read(&dquot->dq_count) > 1) { - /* We have more than one user... nothing to do */ - atomic_dec(&dquot->dq_count); -+ /* Releasing dquot during quotaoff phase? */ -+ if (!sb_has_quota_enabled(dquot->dq_sb, dquot->dq_type) && -+ atomic_read(&dquot->dq_count) == 1) -+ wake_up(&dquot->dq_wait_unused); - spin_unlock(&dq_list_lock); - return; - } -@@ -581,6 +610,7 @@ static struct dquot *get_empty_dquot(struct super_block *sb, int type) - INIT_LIST_HEAD(&dquot->dq_inuse); - INIT_HLIST_NODE(&dquot->dq_hash); - INIT_LIST_HEAD(&dquot->dq_dirty); -+ init_waitqueue_head(&dquot->dq_wait_unused); - dquot->dq_sb = sb; - dquot->dq_type = type; - atomic_set(&dquot->dq_count, 1); -@@ -732,13 +762,9 @@ static void drop_dquot_ref(struct super_block *sb, int type) - { - LIST_HEAD(tofree_head); - -- /* We need to be guarded against prune_icache to reach all the -- * inodes - otherwise some can be on the local list of prune_icache */ -- down(&iprune_sem); - down_write(&sb_dqopt(sb)->dqptr_sem); - remove_dquot_ref(sb, type, &tofree_head); - up_write(&sb_dqopt(sb)->dqptr_sem); -- up(&iprune_sem); - put_dquot_list(&tofree_head); - } - diff --git a/lustre/kernel_patches/patches/quota-umount-race-fix.patch b/lustre/kernel_patches/patches/quota-umount-race-fix.patch deleted file mode 100644 index 42428c3bcd..0000000000 --- a/lustre/kernel_patches/patches/quota-umount-race-fix.patch +++ /dev/null @@ -1,139 +0,0 @@ - -From: Jan Kara <jack@suse.cz> - -Fix possible races between umount and quota on/off. - -Finally I decided to take a reference to vfsmount during vfs_quota_on() and -to drop it after the final cleanup in the vfs_quota_off(). This way we -should be all the time guarded against umount. This way was protected also -the old code which used filp_open() for opening quota files. I was also -thinking about other ways of protection but there would be always a window -(provided I don't want to play much with namespace locks) where -vfs_quota_on() could be called while umount() is in progress resulting in -the "Busy inodes after unmount" messages... - -Get a reference to vfsmount during quotaon() so that we are guarded against -umount (as was the old code using filp_open()). - -Signed-off-by: Jan Kara <jack@suse.cz> -Signed-off-by: Andrew Morton <akpm@osdl.org> ---- - - 25-akpm/fs/dquot.c | 45 ++++++++++++++++++++++++++++----------- - 25-akpm/include/linux/quota.h | 1 - 25-akpm/include/linux/quotaops.h | 2 - - 3 files changed, 35 insertions(+), 13 deletions(-) - -diff -puN fs/dquot.c~quota-umount-race-fix fs/dquot.c ---- 25/fs/dquot.c~quota-umount-race-fix Tue Nov 23 17:11:34 2004 -+++ 25-akpm/fs/dquot.c Tue Nov 23 17:11:34 2004 -@@ -1314,12 +1314,14 @@ int vfs_quota_off(struct super_block *sb - { - int cnt; - struct quota_info *dqopt = sb_dqopt(sb); -- struct inode *toput[MAXQUOTAS]; -+ struct inode *toputinode[MAXQUOTAS]; -+ struct vfsmount *toputmnt[MAXQUOTAS]; - - /* We need to serialize quota_off() for device */ - down(&dqopt->dqonoff_sem); - for (cnt = 0; cnt < MAXQUOTAS; cnt++) { -- toput[cnt] = NULL; -+ toputinode[cnt] = NULL; -+ toputmnt[cnt] = NULL; - if (type != -1 && cnt != type) - continue; - if (!sb_has_quota_enabled(sb, cnt)) -@@ -1339,8 +1341,10 @@ int vfs_quota_off(struct super_block *sb - dqopt->ops[cnt]->free_file_info(sb, cnt); - put_quota_format(dqopt->info[cnt].dqi_format); - -- toput[cnt] = dqopt->files[cnt]; -+ toputinode[cnt] = dqopt->files[cnt]; -+ toputmnt[cnt] = dqopt->mnt[cnt]; - dqopt->files[cnt] = NULL; -+ dqopt->mnt[cnt] = NULL; - dqopt->info[cnt].dqi_flags = 0; - dqopt->info[cnt].dqi_igrace = 0; - dqopt->info[cnt].dqi_bgrace = 0; -@@ -1348,7 +1352,10 @@ int vfs_quota_off(struct super_block *sb - } - up(&dqopt->dqonoff_sem); - /* Sync the superblock so that buffers with quota data are written to -- * disk (and so userspace sees correct data afterwards) */ -+ * disk (and so userspace sees correct data afterwards). -+ * The reference to vfsmnt we are still holding protects us from -+ * umount (we don't have it only when quotas are turned on/off for -+ * journal replay but in that case we are guarded by the fs anyway). */ - if (sb->s_op->sync_fs) - sb->s_op->sync_fs(sb, 1); - sync_blockdev(sb->s_bdev); -@@ -1358,13 +1365,24 @@ int vfs_quota_off(struct super_block *sb - * must also discard the blockdev buffers so that we see the - * changes done by userspace on the next quotaon() */ - for (cnt = 0; cnt < MAXQUOTAS; cnt++) -- if (toput[cnt]) { -- down(&toput[cnt]->i_sem); -- toput[cnt]->i_flags &= ~(S_IMMUTABLE | S_NOATIME | S_NOQUOTA); -- truncate_inode_pages(&toput[cnt]->i_data, 0); -- up(&toput[cnt]->i_sem); -- mark_inode_dirty(toput[cnt]); -- iput(toput[cnt]); -+ if (toputinode[cnt]) { -+ down(&dqopt->dqonoff_sem); -+ /* If quota was reenabled in the meantime, we have -+ * nothing to do */ -+ if (!sb_has_quota_enabled(sb, cnt)) { -+ down(&toputinode[cnt]->i_sem); -+ toputinode[cnt]->i_flags &= ~(S_IMMUTABLE | -+ S_NOATIME | S_NOQUOTA); -+ truncate_inode_pages(&toputinode[cnt]->i_data, 0); -+ up(&toputinode[cnt]->i_sem); -+ mark_inode_dirty(toputinode[cnt]); -+ iput(toputinode[cnt]); -+ } -+ up(&dqopt->dqonoff_sem); -+ /* We don't hold the reference when we turned on quotas -+ * just for the journal replay... */ -+ if (toputmnt[cnt]) -+ mntput(toputmnt[cnt]); - } - invalidate_bdev(sb->s_bdev, 0); - return 0; -@@ -1478,8 +1496,11 @@ int vfs_quota_on(struct super_block *sb, - /* Quota file not on the same filesystem? */ - if (nd.mnt->mnt_sb != sb) - error = -EXDEV; -- else -+ else { - error = vfs_quota_on_inode(nd.dentry->d_inode, type, format_id); -+ if (!error) -+ sb_dqopt(sb)->mnt[type] = mntget(nd.mnt); -+ } - out_path: - path_release(&nd); - return error; -diff -puN include/linux/quota.h~quota-umount-race-fix include/linux/quota.h ---- 25/include/linux/quota.h~quota-umount-race-fix Tue Nov 23 17:11:34 2004 -+++ 25-akpm/include/linux/quota.h Tue Nov 23 17:11:34 2004 -@@ -286,6 +286,7 @@ struct quota_info { - struct semaphore dqonoff_sem; /* Serialize quotaon & quotaoff */ - struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ - struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ -+ struct vfsmount *mnt[MAXQUOTAS]; /* mountpoint entries of filesystems with quota files */ - struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ - struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ - }; -diff -puN include/linux/quotaops.h~quota-umount-race-fix include/linux/quotaops.h ---- 25/include/linux/quotaops.h~quota-umount-race-fix Tue Nov 23 17:11:34 2004 -+++ 25-akpm/include/linux/quotaops.h Tue Nov 23 17:11:34 2004 -@@ -177,7 +177,7 @@ static __inline__ int DQUOT_OFF(struct s - { - int ret = -ENOSYS; - -- if (sb->s_qcop && sb->s_qcop->quota_off) -+ if (sb_any_quota_enabled(sb) && sb->s_qcop && sb->s_qcop->quota_off) - ret = sb->s_qcop->quota_off(sb, -1); - return ret; - } -_ diff --git a/lustre/kernel_patches/patches/raid5-configurable-cachesize-rhel5.patch b/lustre/kernel_patches/patches/raid5-configurable-cachesize-rhel5.patch deleted file mode 100644 index be8f6c24f6..0000000000 --- a/lustre/kernel_patches/patches/raid5-configurable-cachesize-rhel5.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c ---- linux-2.6.18-53.orig/drivers/md/raid5.c 2007-12-06 17:23:39.000000000 +0800 -+++ linux-2.6.18-53/drivers/md/raid5.c 2007-12-06 17:24:14.000000000 +0800 -@@ -57,7 +57,7 @@ - * Stripe cache - */ - --#define NR_STRIPES 256 -+static int raid5_nr_stripes = 256 * 8; - #define STRIPE_SIZE PAGE_SIZE - #define STRIPE_SHIFT (PAGE_SHIFT - 9) - #define STRIPE_SECTORS (STRIPE_SIZE>>9) -@@ -3230,7 +3230,7 @@ static int run(mddev_t *mddev) - else - conf->max_degraded = 1; - conf->algorithm = mddev->layout; -- conf->max_nr_stripes = NR_STRIPES; -+ conf->max_nr_stripes = raid5_nr_stripes; - conf->expand_progress = mddev->reshape_position; - - /* device size must be a multiple of chunk size */ -@@ -3821,6 +3821,7 @@ static void raid5_exit(void) - - module_init(raid5_init); - module_exit(raid5_exit); -+module_param(raid5_nr_stripes, int, 0644); - MODULE_LICENSE("GPL"); - MODULE_ALIAS("md-personality-4"); /* RAID5 */ - MODULE_ALIAS("md-raid5"); -Only in linux-2.6.18-53/drivers/md: raid5.c.orig -Only in linux-2.6.18-53.orig/include/linux/raid: .raid5.h.swp diff --git a/lustre/kernel_patches/patches/raid5-configurable-cachesize.patch b/lustre/kernel_patches/patches/raid5-configurable-cachesize.patch deleted file mode 100644 index 70458722e4..0000000000 --- a/lustre/kernel_patches/patches/raid5-configurable-cachesize.patch +++ /dev/null @@ -1,50 +0,0 @@ -Adds a module parameter to control raid5's internal cache size. - -Index: linux-2.6.9/drivers/md/raid5.c -=================================================================== ---- linux-2.6.9.orig/drivers/md/raid5.c 2006-05-21 17:57:25.000000000 +0400 -+++ linux-2.6.9/drivers/md/raid5.c 2006-05-22 00:01:30.000000000 +0400 -@@ -28,7 +28,8 @@ - * Stripe cache - */ - --#define NR_STRIPES 256 -+static int raid5_nr_stripes = 256 * 8; -+ - #define STRIPE_SIZE PAGE_SIZE - #define STRIPE_SHIFT (PAGE_SHIFT - 9) - #define STRIPE_SECTORS (STRIPE_SIZE>>9) -@@ -92,7 +93,7 @@ static inline void __release_stripe(raid - list_add_tail(&sh->lru, &conf->inactive_list); - atomic_dec(&conf->active_stripes); - if (!conf->inactive_blocked || -- atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4)) -+ atomic_read(&conf->active_stripes) < (conf->max_nr_stripes*3/4)) - wake_up(&conf->wait_for_stripe); - } - } -@@ -255,7 +256,7 @@ static struct stripe_head *get_active_st - conf->inactive_blocked = 1; - wait_event_lock_irq(conf->wait_for_stripe, - !list_empty(&conf->inactive_list) && -- (atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4) -+ (atomic_read(&conf->active_stripes) < (conf->max_nr_stripes *3/4) - || !conf->inactive_blocked), - conf->device_lock, - unplug_slaves(conf->mddev); -@@ -1637,7 +1638,7 @@ static int run (mddev_t *mddev) - conf->chunk_size = mddev->chunk_size; - conf->level = mddev->level; - conf->algorithm = mddev->layout; -- conf->max_nr_stripes = NR_STRIPES; -+ conf->max_nr_stripes = raid5_nr_stripes; - - /* device size must be a multiple of chunk size */ - mddev->size &= ~(mddev->chunk_size/1024 -1); -@@ -1957,5 +1958,6 @@ static void raid5_exit (void) - - module_init(raid5_init); - module_exit(raid5_exit); -+module_param(raid5_nr_stripes, int, 0644); - MODULE_LICENSE("GPL"); - MODULE_ALIAS("md-personality-4"); /* RAID5 */ diff --git a/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch b/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch deleted file mode 100644 index a415611511..0000000000 --- a/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c ---- linux-2.6.18-53.orig/drivers/md/raid5.c 2007-12-06 17:26:27.000000000 +0800 -+++ linux-2.6.18-53/drivers/md/raid5.c 2007-12-06 17:26:55.000000000 +0800 -@@ -3340,6 +3340,11 @@ static int run(mddev_t *mddev) - mddev->array_size = mddev->size * (conf->previous_raid_disks - - conf->max_degraded); - -+ /* in order to support large I/Os */ -+ blk_queue_max_sectors(mddev->queue, conf->chunk_size * conf->previous_raid_disks >> 9); -+ mddev->queue->max_phys_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT; -+ mddev->queue->max_hw_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;; -+ - return 0; - abort: - if (conf) { diff --git a/lustre/kernel_patches/patches/raid5-large-io.patch b/lustre/kernel_patches/patches/raid5-large-io.patch deleted file mode 100644 index 591e6c4289..0000000000 --- a/lustre/kernel_patches/patches/raid5-large-io.patch +++ /dev/null @@ -1,20 +0,0 @@ -This patch changes max request size to <chunk size> * <disks> -in order to allow Lustre to submit large I/Os and avoid -unnecessary reads. - -Index: linux-2.6.9/drivers/md/raid5.c -=================================================================== ---- linux-2.6.9.orig/drivers/md/raid5.c 2006-05-22 00:01:30.000000000 +0400 -+++ linux-2.6.9/drivers/md/raid5.c 2006-05-22 00:09:56.000000000 +0400 -@@ -1609,6 +1609,11 @@ static int run (mddev_t *mddev) - mddev->queue->unplug_fn = raid5_unplug_device; - mddev->queue->issue_flush_fn = raid5_issue_flush; - -+ /* in order to support large I/Os */ -+ blk_queue_max_sectors(mddev->queue, mddev->chunk_size * mddev->raid_disks >> 9); -+ mddev->queue->max_phys_segments = mddev->chunk_size * mddev->raid_disks >> PAGE_SHIFT; -+ mddev->queue->max_hw_segments = mddev->chunk_size * mddev->raid_disks >> PAGE_SHIFT;; -+ - PRINTK("raid5: run(%s) called.\n", mdname(mddev)); - - ITERATE_RDEV(mddev,rdev,tmp) { diff --git a/lustre/kernel_patches/patches/raid5-merge-ios-rhel5.patch b/lustre/kernel_patches/patches/raid5-merge-ios-rhel5.patch deleted file mode 100644 index 735af2cf97..0000000000 --- a/lustre/kernel_patches/patches/raid5-merge-ios-rhel5.patch +++ /dev/null @@ -1,185 +0,0 @@ -diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c ---- linux-2.6.18-53.orig/drivers/md/raid5.c 2007-12-28 18:55:24.000000000 +0800 -+++ linux-2.6.18-53/drivers/md/raid5.c 2007-12-28 19:08:15.000000000 +0800 -@@ -1277,7 +1277,26 @@ static void compute_block_2(struct strip - } - } - -+/* -+ * The whole idea is to collect all bio's and then issue them -+ * disk by disk to assist merging a bit -bzzz -+ */ -+static void raid5_flush_bios(raid5_conf_t *conf, struct bio *bios[], int raid_disks) -+{ -+ struct bio *bio, *nbio; -+ int i; - -+ for (i = 0; i < raid_disks; i++) { -+ bio = bios[i]; -+ while (bio) { -+ nbio = bio->bi_next; -+ bio->bi_next = NULL; -+ generic_make_request(bio); -+ bio = nbio; -+ } -+ bios[i] = NULL; -+ } -+} - - /* - * Each stripe/dev can have one or more bion attached. -@@ -1392,7 +1411,7 @@ static int stripe_to_pdidx(sector_t stri - * - */ - --static void handle_stripe5(struct stripe_head *sh) -+static void handle_stripe5(struct stripe_head *sh, struct bio *bios[]) - { - raid5_conf_t *conf = sh->raid_conf; - int disks = sh->disks; -@@ -1939,7 +1958,11 @@ static void handle_stripe5(struct stripe - test_bit(R5_ReWrite, &sh->dev[i].flags)) - atomic_add(STRIPE_SECTORS, &rdev->corrected_errors); - atomic_inc(&conf->out_reqs_in_queue); -- generic_make_request(bi); -+ if (bios) { -+ bi->bi_next = bios[i]; -+ bios[i] = bi; -+ } else -+ generic_make_request(bi); - } else { - if (rw == 1) - set_bit(STRIPE_DEGRADED, &sh->state); -@@ -1951,7 +1974,7 @@ static void handle_stripe5(struct stripe - } - } - --static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page) -+static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page, struct bio *bios[]) - { - raid6_conf_t *conf = sh->raid_conf; - int disks = conf->raid_disks; -@@ -2499,7 +2522,11 @@ static void handle_stripe6(struct stripe - if (rw == WRITE && - test_bit(R5_ReWrite, &sh->dev[i].flags)) - atomic_add(STRIPE_SECTORS, &rdev->corrected_errors); -- generic_make_request(bi); -+ if (bios) { -+ bi->bi_next = bios[i]; -+ bios[i] = bi; -+ } else -+ generic_make_request(bi); - atomic_inc(&conf->out_reqs_in_queue); - } else { - if (rw == 1) -@@ -2512,12 +2539,12 @@ static void handle_stripe6(struct stripe - } - } - --static void handle_stripe(struct stripe_head *sh, struct page *tmp_page) -+static void handle_stripe(struct stripe_head *sh, struct page *tmp_page, struct bio *bios[]) - { - if (sh->raid_conf->level == 6) -- handle_stripe6(sh, tmp_page); -+ handle_stripe6(sh, tmp_page, bios); - else -- handle_stripe5(sh); -+ handle_stripe5(sh, bios); - } - - -@@ -2670,6 +2697,7 @@ static int make_request(request_queue_t - int stripes_per_chunk, sectors_per_block; - int sectors_per_stripe; - int i, j; -+ struct bio *bios[MD_SB_DISKS]; - - DEFINE_WAIT(w); - int disks, data_disks; -@@ -2698,6 +2726,7 @@ static int make_request(request_queue_t - sectors = bi->bi_size >> 9; - stripes_per_chunk = conf->chunk_size / STRIPE_SIZE; - -+ memset(&bios, 0, sizeof(bios)); - redo_bio: - /* stripe by stripe handle needs a stable raid layout, so if this - * reuqest covers the expanding region, wait it over. -@@ -2756,8 +2785,10 @@ retry: - * the raid layout has been changed, we have to redo the - * whole bio because we don't which sectors in it has been - * done, and which is not done. -jay */ -- if (raid5_redo_bio(conf, bi, disks, logical_sector)) -+ if (raid5_redo_bio(conf, bi, disks, logical_sector)) { -+ raid5_flush_bios(conf, bios, disks); - goto redo_bio; -+ } - - if (test_bit(STRIPE_EXPANDING, &sh->state)) { - /* Stripe is busy expanding or -@@ -2766,6 +2797,7 @@ retry: - */ - release_stripe(sh); - sh = NULL; -+ raid5_flush_bios(conf, bios, disks); - raid5_unplug_device(mddev->queue); - schedule(); - goto retry; -@@ -2784,17 +2816,19 @@ retry: - */ - if (r_sector >= mddev->suspend_lo && - r_sector < mddev->suspend_hi) { -- handle_stripe(sh, NULL); -+ handle_stripe(sh, NULL, NULL); - release_stripe(sh); - sh = NULL; -+ raid5_flush_bios(conf, bios, disks); - schedule(); - goto retry; - } - - if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { -- handle_stripe(sh, NULL); -+ handle_stripe(sh, NULL, NULL); - release_stripe(sh); - sh = NULL; -+ raid5_flush_bios(conf, bios, disks); - raid5_unplug_device(mddev->queue); - schedule(); - goto retry; -@@ -2810,7 +2844,7 @@ retry: - r_sector += sectors_per_chunk; - } - if (sh) { -- handle_stripe(sh, NULL); -+ handle_stripe(sh, NULL, NULL); - release_stripe(sh); - sh = NULL; - } -@@ -2820,6 +2854,9 @@ retry: - if (sectors > 0) - goto repeat; - -+ /* flush all of the bios */ -+ raid5_flush_bios(conf, bios, disks); -+ - spin_lock_irq(&conf->device_lock); - remaining = --bi->bi_phys_segments; - spin_unlock_irq(&conf->device_lock); -@@ -3035,7 +3072,7 @@ static inline sector_t sync_request(mdde - clear_bit(STRIPE_INSYNC, &sh->state); - spin_unlock(&sh->lock); - -- handle_stripe(sh, NULL); -+ handle_stripe(sh, NULL, NULL); - release_stripe(sh); - - return STRIPE_SECTORS; -@@ -3091,7 +3128,7 @@ static void raid5d (mddev_t *mddev) - - handled++; - atomic_inc(&conf->handled_in_raid5d); -- handle_stripe(sh, conf->spare_page); -+ handle_stripe(sh, conf->spare_page, NULL); - release_stripe(sh); - - spin_lock_irq(&conf->device_lock); diff --git a/lustre/kernel_patches/patches/raid5-merge-ios.patch b/lustre/kernel_patches/patches/raid5-merge-ios.patch deleted file mode 100644 index 3f5cbbca4f..0000000000 --- a/lustre/kernel_patches/patches/raid5-merge-ios.patch +++ /dev/null @@ -1,129 +0,0 @@ -Merge IO requests to try and get larger requests on underlying drives. - -Index: linux-2.6.9/drivers/md/raid5.c -=================================================================== ---- linux-2.6.9.orig/drivers/md/raid5.c 2006-05-22 00:10:04.000000000 +0400 -+++ linux-2.6.9/drivers/md/raid5.c 2006-05-22 00:10:06.000000000 +0400 -@@ -934,6 +934,26 @@ static void add_stripe_bio (struct strip - } - } - -+/* -+ * The whole idea is to collect all bio's and then issue them -+ * disk by disk to assist merging a bit -bzzz -+ */ -+static void raid5_flush_bios(raid5_conf_t *conf, struct bio *bios[], int raid_disks) -+{ -+ struct bio *bio, *nbio; -+ int i; -+ -+ for (i = 0; i < raid_disks; i++) { -+ bio = bios[i]; -+ while (bio) { -+ nbio = bio->bi_next; -+ bio->bi_next = NULL; -+ generic_make_request(bio); -+ bio = nbio; -+ } -+ bios[i] = NULL; -+ } -+} - - /* - * handle_stripe - do things to a stripe. -@@ -953,7 +973,7 @@ static void add_stripe_bio (struct strip - * - */ - --static void handle_stripe(struct stripe_head *sh) -+static void handle_stripe(struct stripe_head *sh, struct bio *bios[]) - { - raid5_conf_t *conf = sh->raid_conf; - int disks = conf->raid_disks; -@@ -1376,7 +1396,11 @@ static void handle_stripe(struct stripe_ - bi->bi_size = STRIPE_SIZE; - bi->bi_next = NULL; - atomic_inc(&conf->out_reqs_in_queue); -- generic_make_request(bi); -+ if (bios) { -+ bi->bi_next = bios[i]; -+ bios[i] = bi; -+ } else -+ generic_make_request(bi); - } else { - PRINTK("skip op %ld on disc %d for sector %llu\n", - bi->bi_rw, i, (unsigned long long)sh->sector); -@@ -1501,6 +1525,7 @@ static int make_request (request_queue_t - int sectors_per_chunk = conf->chunk_size >> 9; - int stripes_per_chunk, sectors_per_block; - int sectors_per_stripe; -+ struct bio *bios[MD_SB_DISKS]; - int i, j; - - atomic_inc(&conf->in_reqs_in_queue); -@@ -1530,6 +1555,7 @@ static int make_request (request_queue_t - sector_div(block, sectors_per_block); - sectors = bi->bi_size >> 9; - -+ memset(&bios, 0, sizeof(bios)); - repeat: - stripe = block * sectors_per_block / data_disks; - b_sector = stripe * data_disks; -@@ -1549,9 +1575,17 @@ repeat: - new_sector = raid5_compute_sector(r_sector, raid_disks, - data_disks, &dd_idx, - &pd_idx, conf); -- if (sh == NULL) -- sh = get_active_stripe(conf, new_sector, pd_idx, -- (bi->bi_rw&RWA_MASK)); -+ if (sh == NULL) { -+ /* first, try to get stripe w/o blocking -+ * if we can't, then it's time to submit -+ * all collected bio's in order to free -+ * some space in the cache -bzzz */ -+ sh = get_active_stripe(conf, new_sector, pd_idx, 1); -+ if (!sh && !(bi->bi_rw&RWA_MASK)) { -+ raid5_flush_bios(conf, bios, raid_disks); -+ sh = get_active_stripe(conf, new_sector, pd_idx, 0); -+ } -+ } - if (sh) { - add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); - } else { -@@ -1571,7 +1605,7 @@ repeat: - } - if (sh) { - raid5_plug_device(conf); -- handle_stripe(sh); -+ handle_stripe(sh, bios); - release_stripe(sh); - sh = NULL; - } -@@ -1581,6 +1615,9 @@ repeat: - if (sectors > 0) - goto repeat; - -+ /* now flush all bio's */ -+ raid5_flush_bios(conf, bios, raid_disks); -+ - spin_lock_irq(&conf->device_lock); - if (--bi->bi_phys_segments == 0) { - int bytes = bi->bi_size; -@@ -1636,7 +1673,7 @@ static int sync_request (mddev_t *mddev, - clear_bit(STRIPE_INSYNC, &sh->state); - spin_unlock(&sh->lock); - -- handle_stripe(sh); -+ handle_stripe(sh, NULL); - release_stripe(sh); - - return STRIPE_SECTORS; -@@ -1685,7 +1722,7 @@ static void raid5d (mddev_t *mddev) - - handled++; - atomic_inc(&conf->handled_in_raid5d); -- handle_stripe(sh); -+ handle_stripe(sh, NULL); - release_stripe(sh); - - spin_lock_irq(&conf->device_lock); diff --git a/lustre/kernel_patches/patches/raid5-serialize-ovelapping-reqs.patch b/lustre/kernel_patches/patches/raid5-serialize-ovelapping-reqs.patch deleted file mode 100644 index d3c989c7f5..0000000000 --- a/lustre/kernel_patches/patches/raid5-serialize-ovelapping-reqs.patch +++ /dev/null @@ -1,140 +0,0 @@ -RAID5 wasn't designed to support overlapping requests because -in Linux all I/Os are serialized by page/buffer lock. As Lustre -doesn't use pagecache on server, we need to serialize I/Os in RAID5. - -Index: linux-2.6.9/include/linux/raid/raid5.h -=================================================================== ---- linux-2.6.9.orig/include/linux/raid/raid5.h 2006-05-22 00:11:21.000000000 +0400 -+++ linux-2.6.9/include/linux/raid/raid5.h 2006-05-22 00:11:21.000000000 +0400 -@@ -134,6 +134,7 @@ struct stripe_head { - unsigned long state; /* state flags */ - atomic_t count; /* nr of active thread/requests */ - spinlock_t lock; -+ wait_queue_head_t wait; /* waitchan for overlapped bio's */ - struct r5dev { - struct bio req; - struct bio_vec vec; -Index: linux-2.6.9/drivers/md/raid5.c -=================================================================== ---- linux-2.6.9.orig/drivers/md/raid5.c 2006-05-22 00:11:21.000000000 +0400 -+++ linux-2.6.9/drivers/md/raid5.c 2006-05-22 00:19:27.000000000 +0400 -@@ -308,6 +308,7 @@ static int grow_stripes(raid5_conf_t *co - memset(sh, 0, sizeof(*sh) + (devs-1)*sizeof(struct r5dev)); - sh->raid_conf = conf; - sh->lock = SPIN_LOCK_UNLOCKED; -+ init_waitqueue_head(&sh->wait); - - if (grow_buffers(sh, conf->raid_disks)) { - shrink_buffers(sh, conf->raid_disks); -@@ -878,6 +879,9 @@ static void compute_parity(struct stripe - set_bit(R5_LOCKED, &sh->dev[pd_idx].flags); - } else - clear_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); -+ -+ /* probably someone waits for our completion? */ -+ wake_up(&sh->wait); - } - - /* -@@ -885,7 +889,7 @@ static void compute_parity(struct stripe - * toread/towrite point to the first in a chain. - * The bi_next chain must be in order. - */ --static void add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) -+static int add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) - { - struct bio **bip; - raid5_conf_t *conf = sh->raid_conf; -@@ -894,13 +898,21 @@ static void add_stripe_bio (struct strip - (unsigned long long)bi->bi_sector, - (unsigned long long)sh->sector); - -- - spin_lock(&sh->lock); - spin_lock_irq(&conf->device_lock); - if (forwrite) - bip = &sh->dev[dd_idx].towrite; - else - bip = &sh->dev[dd_idx].toread; -+ -+#if 1 -+ if (*bip) { -+ /* overlapping bio, let's wait till first one is completed */ -+ spin_unlock_irq(&conf->device_lock); -+ spin_unlock(&sh->lock); -+ return 1; -+ } -+#else - while (*bip && (*bip)->bi_sector < bi->bi_sector) { - BUG_ON((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector); - bip = & (*bip)->bi_next; -@@ -910,6 +922,7 @@ static void add_stripe_bio (struct strip - BUG(); - if (*bip) - bi->bi_next = *bip; -+#endif - *bip = bi; - bi->bi_phys_segments ++; - spin_unlock_irq(&conf->device_lock); -@@ -932,6 +945,7 @@ static void add_stripe_bio (struct strip - if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS) - set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags); - } -+ return 0; - } - - /* -@@ -1014,6 +1028,7 @@ static void handle_stripe(struct stripe_ - rbi = dev->toread; - dev->toread = NULL; - spin_unlock_irq(&conf->device_lock); -+ wake_up(&sh->wait); - while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) { - copy_data(0, rbi, dev->page, dev->sector); - rbi2 = r5_next_bio(rbi, dev->sector); -@@ -1059,6 +1074,7 @@ static void handle_stripe(struct stripe_ - bi = sh->dev[i].towrite; - sh->dev[i].towrite = NULL; - if (bi) to_write--; -+ wake_up(&sh->wait); - - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); -@@ -1511,6 +1527,16 @@ static inline void raid5_plug_device(rai - spin_unlock_irq(&conf->device_lock); - } - -+static inline void raid5_wait_stripe(struct stripe_head *sh, int dd_idx, int forwrite) -+{ -+ struct bio **bip; -+ if (forwrite) -+ bip = &sh->dev[dd_idx].towrite; -+ else -+ bip = &sh->dev[dd_idx].toread; -+ wait_event(sh->wait, *bip == NULL); -+} -+ - static int make_request (request_queue_t *q, struct bio * bi) - { - mddev_t *mddev = q->queuedata; -@@ -1580,6 +1606,7 @@ repeat: - * if we can't, then it's time to submit - * all collected bio's in order to free - * some space in the cache -bzzz */ -+try_stripe: - sh = get_active_stripe(conf, new_sector, pd_idx, 1); - if (!sh && !(bi->bi_rw&RWA_MASK)) { - raid5_flush_bios(conf, bios, raid_disks); -@@ -1587,7 +1614,11 @@ repeat: - } - } - if (sh) { -- add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); -+ if (add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { -+ release_stripe(sh); -+ raid5_wait_stripe(sh, dd_idx, bi->bi_rw&RW_MASK); -+ goto try_stripe; -+ } - } else { - /* cannot get stripe for read-ahead, just give-up */ - clear_bit(BIO_UPTODATE, &bi->bi_flags); diff --git a/lustre/kernel_patches/patches/raid5-stats-rhel5.patch b/lustre/kernel_patches/patches/raid5-stats-rhel5.patch deleted file mode 100644 index d1e43d6966..0000000000 --- a/lustre/kernel_patches/patches/raid5-stats-rhel5.patch +++ /dev/null @@ -1,256 +0,0 @@ -diff -pru linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c ---- linux-2.6.18-53.orig/drivers/md/raid5.c 2007-12-06 17:15:22.000000000 +0800 -+++ linux-2.6.18-53/drivers/md/raid5.c 2007-12-06 17:17:30.000000000 +0800 -@@ -115,10 +115,12 @@ static void __release_stripe(raid5_conf_ - if (test_bit(STRIPE_DELAYED, &sh->state)) { - list_add_tail(&sh->lru, &conf->delayed_list); - blk_plug_device(conf->mddev->queue); -+ atomic_inc(&conf->delayed); - } else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && - sh->bm_seq - conf->seq_write > 0) { - list_add_tail(&sh->lru, &conf->bitmap_list); - blk_plug_device(conf->mddev->queue); -+ atomic_inc(&conf->bit_delayed); - } else { - clear_bit(STRIPE_BIT_DELAY, &sh->state); - list_add_tail(&sh->lru, &conf->handle_list); -@@ -289,6 +291,7 @@ static struct stripe_head *get_active_st - if (noblock && sh == NULL) - break; - if (!sh) { -+ atomic_inc(&conf->out_of_stripes); - conf->inactive_blocked = 1; - wait_event_lock_irq(conf->wait_for_stripe, - !list_empty(&conf->inactive_list) && -@@ -311,6 +314,10 @@ static struct stripe_head *get_active_st - !test_bit(STRIPE_EXPANDING, &sh->state)) - BUG(); - list_del_init(&sh->lru); -+ if (test_bit(STRIPE_DELAYED, &sh->state)) -+ atomic_dec(&conf->delayed); -+ if (test_bit(STRIPE_BIT_DELAY, &sh->state)) -+ atomic_dec(&conf->bit_delayed); - } - } - } while (sh == NULL); -@@ -529,6 +536,8 @@ static int raid5_end_read_request(struct - if (bi->bi_size) - return 1; - -+ atomic_dec(&conf->out_reqs_in_queue); -+ - for (i=0 ; i<disks; i++) - if (bi == &sh->dev[i].req) - break; -@@ -642,6 +651,8 @@ static int raid5_end_write_request (stru - if (bi->bi_size) - return 1; - -+ atomic_dec(&conf->out_reqs_in_queue); -+ - for (i=0 ; i<disks; i++) - if (bi == &sh->dev[i].req) - break; -@@ -1402,6 +1413,8 @@ static void handle_stripe5(struct stripe - clear_bit(STRIPE_HANDLE, &sh->state); - clear_bit(STRIPE_DELAYED, &sh->state); - -+ atomic_inc(&conf->handle_called); -+ - syncing = test_bit(STRIPE_SYNCING, &sh->state); - expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state); - expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); -@@ -1684,6 +1697,7 @@ static void handle_stripe5(struct stripe - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantread, &dev->flags); - locked++; -+ atomic_inc(&conf->reads_for_rmw); - } else { - set_bit(STRIPE_DELAYED, &sh->state); - set_bit(STRIPE_HANDLE, &sh->state); -@@ -1703,6 +1717,7 @@ static void handle_stripe5(struct stripe - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantread, &dev->flags); - locked++; -+ atomic_inc(&conf->reads_for_rcw); - } else { - set_bit(STRIPE_DELAYED, &sh->state); - set_bit(STRIPE_HANDLE, &sh->state); -@@ -1870,6 +1885,7 @@ static void handle_stripe5(struct stripe - bi->bi_next = NULL; - bi->bi_size = 0; - bi->bi_end_io(bi, bytes, 0); -+ atomic_dec(&conf->in_reqs_in_queue); - } - for (i=disks; i-- ;) { - int rw; -@@ -1885,10 +1901,13 @@ static void handle_stripe5(struct stripe - bi = &sh->dev[i].req; - - bi->bi_rw = rw; -- if (rw) -+ if (rw) { -+ atomic_inc(&conf->writes_out); - bi->bi_end_io = raid5_end_write_request; -- else -+ } else { -+ atomic_inc(&conf->reads_out); - bi->bi_end_io = raid5_end_read_request; -+ } - - rcu_read_lock(); - rdev = rcu_dereference(conf->disks[i].rdev); -@@ -1919,6 +1938,7 @@ static void handle_stripe5(struct stripe - if (rw == WRITE && - test_bit(R5_ReWrite, &sh->dev[i].flags)) - atomic_add(STRIPE_SECTORS, &rdev->corrected_errors); -+ atomic_inc(&conf->out_reqs_in_queue); - generic_make_request(bi); - } else { - if (rw == 1) -@@ -1955,6 +1975,8 @@ static void handle_stripe6(struct stripe - clear_bit(STRIPE_HANDLE, &sh->state); - clear_bit(STRIPE_DELAYED, &sh->state); - -+ atomic_inc(&conf->handle_called); -+ - syncing = test_bit(STRIPE_SYNCING, &sh->state); - /* Now to look around and see what can be done */ - -@@ -2255,6 +2277,7 @@ static void handle_stripe6(struct stripe - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantread, &dev->flags); - locked++; -+ atomic_inc(&conf->reads_for_rcw); - } else { - PRINTK("Request delayed stripe %llu block %d for Reconstruct\n", - (unsigned long long)sh->sector, i); -@@ -2423,6 +2446,7 @@ static void handle_stripe6(struct stripe - bi->bi_next = NULL; - bi->bi_size = 0; - bi->bi_end_io(bi, bytes, 0); -+ atomic_dec(&conf->in_reqs_in_queue); - } - for (i=disks; i-- ;) { - int rw; -@@ -2438,10 +2462,13 @@ static void handle_stripe6(struct stripe - bi = &sh->dev[i].req; - - bi->bi_rw = rw; -- if (rw) -+ if (rw) { -+ atomic_inc(&conf->writes_out); - bi->bi_end_io = raid5_end_write_request; -- else -+ } else { -+ atomic_inc(&conf->reads_out); - bi->bi_end_io = raid5_end_read_request; -+ } - - rcu_read_lock(); - rdev = rcu_dereference(conf->disks[i].rdev); -@@ -2473,6 +2500,7 @@ static void handle_stripe6(struct stripe - test_bit(R5_ReWrite, &sh->dev[i].flags)) - atomic_add(STRIPE_SECTORS, &rdev->corrected_errors); - generic_make_request(bi); -+ atomic_inc(&conf->out_reqs_in_queue); - } else { - if (rw == 1) - set_bit(STRIPE_DEGRADED, &sh->state); -@@ -2506,6 +2534,7 @@ static void raid5_activate_delayed(raid5 - if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) - atomic_inc(&conf->preread_active_stripes); - list_add_tail(&sh->lru, &conf->handle_list); -+ atomic_dec(&conf->delayed); - } - } - } -@@ -2608,6 +2637,8 @@ static int make_request(request_queue_t - const int rw = bio_data_dir(bi); - int remaining; - -+ atomic_inc(&conf->in_reqs_in_queue); -+ - if (unlikely(bio_barrier(bi))) { - bio_endio(bi, bi->bi_size, -EOPNOTSUPP); - return 0; -@@ -2617,6 +2648,11 @@ static int make_request(request_queue_t - - disk_stat_inc(mddev->gendisk, ios[rw]); - disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bi)); -+ if (rw == WRITE) -+ atomic_inc(&conf->writes_in); -+ else -+ atomic_inc(&conf->reads_in); -+ - - logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); - last_sector = bi->bi_sector + (bi->bi_size>>9); -@@ -2724,6 +2760,7 @@ static int make_request(request_queue_t - - if ( rw == WRITE ) - md_write_end(mddev); -+ atomic_dec(&conf->in_reqs_in_queue); - bi->bi_size = 0; - bi->bi_end_io(bi, bytes, 0); - } -@@ -2985,6 +3022,7 @@ static void raid5d (mddev_t *mddev) - spin_unlock_irq(&conf->device_lock); - - handled++; -+ atomic_inc(&conf->handled_in_raid5d); - handle_stripe(sh, conf->spare_page); - release_stripe(sh); - -@@ -3381,6 +3419,21 @@ static void status (struct seq_file *seq - conf->disks[i].rdev && - test_bit(In_sync, &conf->disks[i].rdev->flags) ? "U" : "_"); - seq_printf (seq, "]"); -+ seq_printf (seq, "\n\t\tin: %u reads, %u writes; out: %u reads, %u writes", -+ atomic_read(&conf->reads_in), atomic_read(&conf->writes_in), -+ atomic_read(&conf->reads_out), atomic_read(&conf->writes_out)); -+ seq_printf (seq, "\n\t\t%u in raid5d, %u out of stripes, %u handle called", -+ atomic_read(&conf->handled_in_raid5d), -+ atomic_read(&conf->out_of_stripes), -+ atomic_read(&conf->handle_called)); -+ seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw", -+ atomic_read(&conf->reads_for_rmw), -+ atomic_read(&conf->reads_for_rcw)); -+ seq_printf (seq, "\n\t\t%u delayed, %u bit delayed, %u active, queues: %u in, %u out\n", -+ atomic_read(&conf->delayed), atomic_read(&conf->bit_delayed), -+ atomic_read(&conf->active_stripes), -+ atomic_read(&conf->in_reqs_in_queue), -+ atomic_read(&conf->out_reqs_in_queue)); - #if RAID5_DEBUG - seq_printf (seq, "\n"); - printall(seq, conf); -diff -pru linux-2.6.18-53.orig/include/linux/raid/raid5.h linux-2.6.18-53/include/linux/raid/raid5.h ---- linux-2.6.18-53.orig/include/linux/raid/raid5.h 2007-12-06 17:15:22.000000000 +0800 -+++ linux-2.6.18-53/include/linux/raid/raid5.h 2007-12-06 17:15:32.000000000 +0800 -@@ -259,6 +259,25 @@ struct raid5_private_data { - int pool_size; /* number of disks in stripeheads in pool */ - spinlock_t device_lock; - struct disk_info *disks; -+ -+ /* -+ * Stats -+ */ -+ atomic_t reads_in; -+ atomic_t writes_in; -+ atomic_t reads_out; -+ atomic_t writes_out; -+ atomic_t handled_in_raid5d; -+ atomic_t out_of_stripes; -+ atomic_t reads_for_rmw; -+ atomic_t reads_for_rcw; -+ atomic_t writes_zcopy; -+ atomic_t writes_copied; -+ atomic_t handle_called; -+ atomic_t delayed; -+ atomic_t bit_delayed; -+ atomic_t in_reqs_in_queue; -+ atomic_t out_reqs_in_queue; - }; - - typedef struct raid5_private_data raid5_conf_t; -Only in linux-2.6.18-53.orig/include/linux/raid: .raid5.h.swp diff --git a/lustre/kernel_patches/patches/raid5-stats.patch b/lustre/kernel_patches/patches/raid5-stats.patch deleted file mode 100644 index 1308009cb1..0000000000 --- a/lustre/kernel_patches/patches/raid5-stats.patch +++ /dev/null @@ -1,200 +0,0 @@ -Add RAID statistics counters to /proc/mdstat - -Index: linux-2.6.9/include/linux/raid/raid5.h -=================================================================== ---- linux-2.6.9.orig/include/linux/raid/raid5.h 2004-10-19 01:54:55.000000000 +0400 -+++ linux-2.6.9/include/linux/raid/raid5.h 2006-05-17 14:10:53.000000000 +0400 -@@ -222,6 +222,22 @@ struct raid5_private_data { - int inactive_blocked; /* release of inactive stripes blocked, - * waiting for 25% to be free - */ -+ /* -+ * Stats -+ */ -+ atomic_t reads_in; -+ atomic_t writes_in; -+ atomic_t reads_out; -+ atomic_t writes_out; -+ atomic_t handled_in_raid5d; -+ atomic_t out_of_stripes; -+ atomic_t reads_for_rmw; -+ atomic_t reads_for_rcw; -+ atomic_t handle_called; -+ atomic_t delayed; -+ atomic_t in_reqs_in_queue; -+ atomic_t out_reqs_in_queue; -+ - spinlock_t device_lock; - struct disk_info disks[0]; - }; -Index: linux-2.6.9/drivers/md/raid5.c -=================================================================== ---- linux-2.6.9.orig/drivers/md/raid5.c 2006-03-10 18:20:48.000000000 +0300 -+++ linux-2.6.9/drivers/md/raid5.c 2006-05-17 14:10:53.000000000 +0400 -@@ -77,9 +77,10 @@ static inline void __release_stripe(raid - if (atomic_read(&conf->active_stripes)==0) - BUG(); - if (test_bit(STRIPE_HANDLE, &sh->state)) { -- if (test_bit(STRIPE_DELAYED, &sh->state)) -+ if (test_bit(STRIPE_DELAYED, &sh->state)) { - list_add_tail(&sh->lru, &conf->delayed_list); -- else -+ atomic_inc(&conf->delayed); -+ } else - list_add_tail(&sh->lru, &conf->handle_list); - md_wakeup_thread(conf->mddev->thread); - } else { -@@ -250,6 +251,7 @@ static struct stripe_head *get_active_st - if (noblock && sh == NULL) - break; - if (!sh) { -+ atomic_inc(&conf->out_of_stripes); - conf->inactive_blocked = 1; - wait_event_lock_irq(conf->wait_for_stripe, - !list_empty(&conf->inactive_list) && -@@ -271,6 +273,8 @@ static struct stripe_head *get_active_st - if (list_empty(&sh->lru)) - BUG(); - list_del_init(&sh->lru); -+ if (test_bit(STRIPE_DELAYED, &sh->state)) -+ atomic_dec(&conf->delayed); - } - } - } while (sh == NULL); -@@ -349,6 +353,8 @@ static int raid5_end_read_request (struc - if (bi->bi_size) - return 1; - -+ atomic_dec(&conf->out_reqs_in_queue); -+ - for (i=0 ; i<disks; i++) - if (bi == &sh->dev[i].req) - break; -@@ -422,6 +428,8 @@ static int raid5_end_write_request (stru - if (bi->bi_size) - return 1; - -+ atomic_dec(&conf->out_reqs_in_queue); -+ - for (i=0 ; i<disks; i++) - if (bi == &sh->dev[i].req) - break; -@@ -882,6 +890,7 @@ static void handle_stripe(struct stripe_ - spin_lock(&sh->lock); - clear_bit(STRIPE_HANDLE, &sh->state); - clear_bit(STRIPE_DELAYED, &sh->state); -+ atomic_inc(&conf->handle_called); - - syncing = test_bit(STRIPE_SYNCING, &sh->state); - /* Now to look around and see what can be done */ -@@ -1127,6 +1136,7 @@ static void handle_stripe(struct stripe_ - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantread, &dev->flags); - locked++; -+ atomic_inc(&conf->reads_for_rmw); - } else { - set_bit(STRIPE_DELAYED, &sh->state); - set_bit(STRIPE_HANDLE, &sh->state); -@@ -1146,6 +1156,7 @@ static void handle_stripe(struct stripe_ - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantread, &dev->flags); - locked++; -+ atomic_inc(&conf->reads_for_rcw); - } else { - set_bit(STRIPE_DELAYED, &sh->state); - set_bit(STRIPE_HANDLE, &sh->state); -@@ -1228,6 +1239,7 @@ static void handle_stripe(struct stripe_ - bi->bi_next = NULL; - bi->bi_size = 0; - bi->bi_end_io(bi, bytes, 0); -+ atomic_dec(&conf->in_reqs_in_queue); - } - for (i=disks; i-- ;) { - int rw; -@@ -1243,10 +1255,13 @@ static void handle_stripe(struct stripe_ - bi = &sh->dev[i].req; - - bi->bi_rw = rw; -- if (rw) -+ if (rw) { -+ atomic_inc(&conf->writes_out); - bi->bi_end_io = raid5_end_write_request; -- else -+ } else { -+ atomic_inc(&conf->reads_out); - bi->bi_end_io = raid5_end_read_request; -+ } - - spin_lock_irq(&conf->device_lock); - rdev = conf->disks[i].rdev; -@@ -1274,6 +1289,7 @@ static void handle_stripe(struct stripe_ - bi->bi_io_vec[0].bv_offset = 0; - bi->bi_size = STRIPE_SIZE; - bi->bi_next = NULL; -+ atomic_inc(&conf->out_reqs_in_queue); - generic_make_request(bi); - } else { - PRINTK("skip op %ld on disc %d for sector %llu\n", -@@ -1296,6 +1312,7 @@ static inline void raid5_activate_delaye - if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) - atomic_inc(&conf->preread_active_stripes); - list_add_tail(&sh->lru, &conf->handle_list); -+ atomic_dec(&conf->delayed); - } - } - } -@@ -1395,12 +1412,16 @@ static int make_request (request_queue_t - sector_t logical_sector, last_sector; - struct stripe_head *sh; - -+ atomic_inc(&conf->in_reqs_in_queue); -+ - if (bio_data_dir(bi)==WRITE) { - disk_stat_inc(mddev->gendisk, writes); - disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi)); -+ atomic_inc(&conf->writes_in); - } else { - disk_stat_inc(mddev->gendisk, reads); - disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bi)); -+ atomic_inc(&conf->reads_in); - } - - logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); -@@ -1439,6 +1460,7 @@ static int make_request (request_queue_t - - if ( bio_data_dir(bi) == WRITE ) - md_write_end(mddev); -+ atomic_dec(&conf->in_reqs_in_queue); - bi->bi_size = 0; - bi->bi_end_io(bi, bytes, 0); - } -@@ -1535,6 +1557,7 @@ static void raid5d (mddev_t *mddev) - spin_unlock_irq(&conf->device_lock); - - handled++; -+ atomic_inc(&conf->handled_in_raid5d); - handle_stripe(sh); - release_stripe(sh); - -@@ -1767,6 +1790,21 @@ static void status (struct seq_file *seq - conf->disks[i].rdev && - conf->disks[i].rdev->in_sync ? "U" : "_"); - seq_printf (seq, "]"); -+ seq_printf (seq, "\n\t\tin: %u reads, %u writes; out: %u reads, %u writes", -+ atomic_read(&conf->reads_in), atomic_read(&conf->writes_in), -+ atomic_read(&conf->reads_out), atomic_read(&conf->writes_out)); -+ seq_printf (seq, "\n\t\t%u in raid5d, %u out of stripes, %u handle called", -+ atomic_read(&conf->handled_in_raid5d), -+ atomic_read(&conf->out_of_stripes), -+ atomic_read(&conf->handle_called)); -+ seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw", -+ atomic_read(&conf->reads_for_rmw), -+ atomic_read(&conf->reads_for_rcw)); -+ seq_printf (seq, "\n\t\t%u delayed, %u active, queues: %u in, %u out\n", -+ atomic_read(&conf->delayed), -+ atomic_read(&conf->active_stripes), -+ atomic_read(&conf->in_reqs_in_queue), -+ atomic_read(&conf->out_reqs_in_queue)); - #if RAID5_DEBUG - #define D(x) \ - seq_printf (seq, "<"#x":%d>", atomic_read(&conf->x)) diff --git a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling-rhel5.patch b/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling-rhel5.patch deleted file mode 100644 index 4b72d953ff..0000000000 --- a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling-rhel5.patch +++ /dev/null @@ -1,284 +0,0 @@ -diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c ---- linux-2.6.18-53.orig/drivers/md/raid5.c 2007-12-28 14:55:08.000000000 +0800 -+++ linux-2.6.18-53/drivers/md/raid5.c 2007-12-28 18:52:08.000000000 +0800 -@@ -2626,6 +2626,35 @@ static int raid5_issue_flush(request_que - return ret; - } - -+static inline int raid5_expanding_overlap(raid5_conf_t *conf, struct bio *bi) -+{ -+ sector_t first_sector, last_sector; -+ -+ if (likely(conf->expand_progress == MaxSector)) -+ return 0; -+ -+ first_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); -+ last_sector = bi->bi_sector + (bi->bi_size>>9); -+ -+ return (first_sector < conf->expand_progress && -+ last_sector >= conf->expand_lo); -+} -+ -+static inline int raid5_redo_bio(raid5_conf_t *conf, struct bio *bi, int disks, sector_t sector) -+{ -+ int redo = 0; -+ -+ if (likely(conf->expand_progress == MaxSector)) -+ return 0; -+ -+ spin_lock_irq(&conf->device_lock); -+ redo = (raid5_expanding_overlap(conf, bi) || -+ (unlikely(sector < conf->expand_progress) && -+ disks == conf->previous_raid_disks)); -+ spin_unlock_irq(&conf->device_lock); -+ return redo; -+} -+ - static int make_request(request_queue_t *q, struct bio * bi) - { - mddev_t *mddev = q->queuedata; -@@ -2636,6 +2665,14 @@ static int make_request(request_queue_t - struct stripe_head *sh; - const int rw = bio_data_dir(bi); - int remaining; -+ sector_t stripe, sectors, block, r_sector, b_sector; -+ int sectors_per_chunk = conf->chunk_size >> 9; -+ int stripes_per_chunk, sectors_per_block; -+ int sectors_per_stripe; -+ int i, j; -+ -+ DEFINE_WAIT(w); -+ int disks, data_disks; - - atomic_inc(&conf->in_reqs_in_queue); - -@@ -2653,105 +2690,136 @@ static int make_request(request_queue_t - else - atomic_inc(&conf->reads_in); - -- - logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); - last_sector = bi->bi_sector + (bi->bi_size>>9); - bi->bi_next = NULL; - bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ - -- for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { -- DEFINE_WAIT(w); -- int disks, data_disks; -- -- retry: -- prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE); -- if (likely(conf->expand_progress == MaxSector)) -- disks = conf->raid_disks; -- else { -- /* spinlock is needed as expand_progress may be -- * 64bit on a 32bit platform, and so it might be -- * possible to see a half-updated value -- * Ofcourse expand_progress could change after -- * the lock is dropped, so once we get a reference -- * to the stripe that we think it is, we will have -- * to check again. -- */ -- spin_lock_irq(&conf->device_lock); -- disks = conf->raid_disks; -- if (logical_sector >= conf->expand_progress) -- disks = conf->previous_raid_disks; -- else { -- if (logical_sector >= conf->expand_lo) { -- spin_unlock_irq(&conf->device_lock); -- schedule(); -- goto retry; -- } -- } -- spin_unlock_irq(&conf->device_lock); -- } -- data_disks = disks - conf->max_degraded; -+ sectors = bi->bi_size >> 9; -+ stripes_per_chunk = conf->chunk_size / STRIPE_SIZE; - -- new_sector = raid5_compute_sector(logical_sector, disks, data_disks, -- &dd_idx, &pd_idx, conf); -- PRINTK("raid5: make_request, sector %llu logical %llu\n", -- (unsigned long long)new_sector, -- (unsigned long long)logical_sector); -+redo_bio: -+ /* stripe by stripe handle needs a stable raid layout, so if this -+ * reuqest covers the expanding region, wait it over. -+ * Furthermore, we may get here with partial request handled, so -+ * wait for the bi_phys_segment to be 1 also. -jay */ -+ spin_lock_irq(&conf->device_lock); -+ wait_event_lock_irq(conf->wait_for_overlap, -+ (bi->bi_phys_segments == 1) && -+ !raid5_expanding_overlap(conf, bi), -+ conf->device_lock, -+ (unplug_slaves(conf->mddev), atomic_inc(&conf->expanding_overlap))); -+ -+ disks = conf->raid_disks; -+ if (unlikely(logical_sector >= conf->expand_progress)) -+ disks = conf->previous_raid_disks; -+ data_disks = disks - conf->max_degraded; -+ spin_unlock_irq(&conf->device_lock); - -- sh = get_active_stripe(conf, new_sector, disks, pd_idx, (bi->bi_rw&RWA_MASK)); -- if (sh) { -- if (unlikely(conf->expand_progress != MaxSector)) { -- /* expansion might have moved on while waiting for a -- * stripe, so we must do the range check again. -- * Expansion could still move past after this -- * test, but as we are holding a reference to -- * 'sh', we know that if that happens, -- * STRIPE_EXPANDING will get set and the expansion -- * won't proceed until we finish with the stripe. -- */ -- int must_retry = 0; -- spin_lock_irq(&conf->device_lock); -- if (logical_sector < conf->expand_progress && -- disks == conf->previous_raid_disks) -- /* mismatch, need to try again */ -- must_retry = 1; -- spin_unlock_irq(&conf->device_lock); -- if (must_retry) { -- release_stripe(sh); -- goto retry; -+ /* compute the block # */ -+ sectors_per_stripe = STRIPE_SECTORS * data_disks; -+ sectors_per_block = stripes_per_chunk * sectors_per_stripe; -+ -+ block = logical_sector & ~((sector_t)sectors_per_block - 1); -+ sector_div(block, sectors_per_block); -+ -+repeat: -+ stripe = block * (sectors_per_block / data_disks); -+ b_sector = stripe * data_disks; -+ /* iterate through all stripes in this block, -+ * where block is a set of internal stripes -+ * which covers chunk */ -+ -+ for (i = 0; i < stripes_per_chunk && sectors > 0; i++) { -+ r_sector = b_sector + (i * STRIPE_SECTORS); -+ sh = NULL; -+ /* iterrate through all pages in the stripe */ -+ for (j = 0; j < data_disks && sectors > 0; j++) { -+ DEFINE_WAIT(w); -+ -+ if (r_sector + STRIPE_SECTORS <= bi->bi_sector || -+ r_sector >= last_sector) { -+ r_sector += sectors_per_chunk; -+ continue; -+ } -+ -+retry: -+ prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE); -+ new_sector = raid5_compute_sector(r_sector, disks, -+ data_disks, &dd_idx, -+ &pd_idx, conf); -+ if (sh == NULL) { -+ sh = get_active_stripe(conf, new_sector, disks, pd_idx, -+ (bi->bi_rw&RWA_MASK)); -+ if (sh) { -+ /* we're handling the bio stripe by stripe, so when we found -+ * the raid layout has been changed, we have to redo the -+ * whole bio because we don't which sectors in it has been -+ * done, and which is not done. -jay */ -+ if (raid5_redo_bio(conf, bi, disks, logical_sector)) -+ goto redo_bio; -+ -+ if (test_bit(STRIPE_EXPANDING, &sh->state)) { -+ /* Stripe is busy expanding or -+ * add failed due to overlap. Flush everything -+ * and wait a while -+ */ -+ release_stripe(sh); -+ sh = NULL; -+ raid5_unplug_device(mddev->queue); -+ schedule(); -+ goto retry; -+ } -+ } else { -+ /* cannot get stripe for read-ahead, just give-up */ -+ finish_wait(&conf->wait_for_overlap, &w); -+ clear_bit(BIO_UPTODATE, &bi->bi_flags); -+ sectors = 0; -+ break; - } - } -+ - /* FIXME what if we get a false positive because these - * are being updated. - */ -- if (logical_sector >= mddev->suspend_lo && -- logical_sector < mddev->suspend_hi) { -+ if (r_sector >= mddev->suspend_lo && -+ r_sector < mddev->suspend_hi) { -+ handle_stripe(sh, NULL); - release_stripe(sh); -+ sh = NULL; - schedule(); - goto retry; - } - -- if (test_bit(STRIPE_EXPANDING, &sh->state) || -- !add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { -- /* Stripe is busy expanding or -- * add failed due to overlap. Flush everything -- * and wait a while -- */ -- raid5_unplug_device(mddev->queue); -+ if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { -+ handle_stripe(sh, NULL); - release_stripe(sh); -+ sh = NULL; -+ raid5_unplug_device(mddev->queue); - schedule(); - goto retry; - } - finish_wait(&conf->wait_for_overlap, &w); -+ -+ BUG_ON (new_sector != stripe); -+ sectors -= STRIPE_SECTORS; -+ if (bi->bi_sector > r_sector) -+ sectors += bi->bi_sector - r_sector; -+ if (r_sector + STRIPE_SECTORS > last_sector) -+ sectors += r_sector + STRIPE_SECTORS - last_sector; -+ r_sector += sectors_per_chunk; -+ } -+ if (sh) { - handle_stripe(sh, NULL); - release_stripe(sh); -- } else { -- /* cannot get stripe for read-ahead, just give-up */ -- clear_bit(BIO_UPTODATE, &bi->bi_flags); -- finish_wait(&conf->wait_for_overlap, &w); -- break; -+ sh = NULL; - } -- -+ stripe += STRIPE_SECTORS; - } -+ block++; -+ if (sectors > 0) -+ goto repeat; -+ - spin_lock_irq(&conf->device_lock); - remaining = --bi->bi_phys_segments; - spin_unlock_irq(&conf->device_lock); -@@ -3439,6 +3507,8 @@ static void status (struct seq_file *seq - atomic_read(&conf->active_stripes), - atomic_read(&conf->in_reqs_in_queue), - atomic_read(&conf->out_reqs_in_queue)); -+ seq_printf (seq, "\t\t%u expanding overlap\n", -+ atomic_read(&conf->expanding_overlap)); - #if RAID5_DEBUG - seq_printf (seq, "\n"); - printall(seq, conf); -diff -pur linux-2.6.18-53.orig/include/linux/raid/raid5.h linux-2.6.18-53/include/linux/raid/raid5.h ---- linux-2.6.18-53.orig/include/linux/raid/raid5.h 2007-12-28 14:55:08.000000000 +0800 -+++ linux-2.6.18-53/include/linux/raid/raid5.h 2007-12-28 18:09:37.000000000 +0800 -@@ -278,6 +278,7 @@ struct raid5_private_data { - atomic_t bit_delayed; - atomic_t in_reqs_in_queue; - atomic_t out_reqs_in_queue; -+ atomic_t expanding_overlap; - }; - - typedef struct raid5_private_data raid5_conf_t; diff --git a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch b/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch deleted file mode 100644 index d86a42ab4e..0000000000 --- a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch +++ /dev/null @@ -1,104 +0,0 @@ -Helps to avoid unnesessary reads if request covers full stripe. - -Note that reads needed to update parity hurt performance badly - -Index: linux-2.6.9/drivers/md/raid5.c -=================================================================== ---- linux-2.6.9.orig/drivers/md/raid5.c 2006-05-22 00:09:56.000000000 +0400 -+++ linux-2.6.9/drivers/md/raid5.c 2006-05-22 00:10:01.000000000 +0400 -@@ -1412,6 +1412,11 @@ static int make_request (request_queue_t - sector_t new_sector; - sector_t logical_sector, last_sector; - struct stripe_head *sh; -+ sector_t stripe, sectors, block, r_sector, b_sector; -+ int sectors_per_chunk = conf->chunk_size >> 9; -+ int stripes_per_chunk, sectors_per_block; -+ int sectors_per_stripe; -+ int i, j; - - atomic_inc(&conf->in_reqs_in_queue); - -@@ -1431,30 +1436,66 @@ static int make_request (request_queue_t - bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ - if ( bio_data_dir(bi) == WRITE ) - md_write_start(mddev); -- for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { -- -- new_sector = raid5_compute_sector(logical_sector, -- raid_disks, data_disks, &dd_idx, &pd_idx, conf); -- -- PRINTK("raid5: make_request, sector %Lu logical %Lu\n", -- (unsigned long long)new_sector, -- (unsigned long long)logical_sector); - -- sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK)); -+ stripes_per_chunk = conf->chunk_size / STRIPE_SIZE; -+ sectors_per_stripe = STRIPE_SECTORS * data_disks; -+ sectors_per_block = stripes_per_chunk * sectors_per_stripe; -+ -+ block = logical_sector & ~((sector_t)sectors_per_block - 1); -+ sector_div(block, sectors_per_block); -+ sectors = bi->bi_size >> 9; -+ -+repeat: -+ stripe = block * (sectors_per_block / data_disks); -+ b_sector = stripe * data_disks; -+ /* iterate through all stripes in this block, -+ * where block is a set of internal stripes -+ * which covers chunk */ -+ for (i = 0; i < stripes_per_chunk && sectors > 0; i++) { -+ r_sector = b_sector + (i * STRIPE_SECTORS); -+ sh = NULL; -+ /* iterrate through all pages in the stripe */ -+ for (j = 0; j < data_disks && sectors > 0; j++) { -+ if (r_sector + STRIPE_SECTORS <= bi->bi_sector || -+ r_sector >= last_sector) { -+ r_sector += sectors_per_chunk; -+ continue; -+ } -+ new_sector = raid5_compute_sector(r_sector, raid_disks, -+ data_disks, &dd_idx, -+ &pd_idx, conf); -+ if (sh == NULL) -+ sh = get_active_stripe(conf, new_sector, pd_idx, -+ (bi->bi_rw&RWA_MASK)); -+ if (sh) { -+ add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); -+ } else { -+ /* cannot get stripe for read-ahead, just give-up */ -+ clear_bit(BIO_UPTODATE, &bi->bi_flags); -+ sectors = 0; -+ break; -+ } -+ -+ BUG_ON (new_sector != stripe); -+ sectors -= STRIPE_SECTORS; -+ if (bi->bi_sector > r_sector) -+ sectors += bi->bi_sector - r_sector; -+ if (r_sector + STRIPE_SECTORS > last_sector) -+ sectors += r_sector + STRIPE_SECTORS - last_sector; -+ r_sector += sectors_per_chunk; -+ } - if (sh) { -- -- add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); -- - raid5_plug_device(conf); - handle_stripe(sh); - release_stripe(sh); -- } else { -- /* cannot get stripe for read-ahead, just give-up */ -- clear_bit(BIO_UPTODATE, &bi->bi_flags); -- break; -+ sh = NULL; - } -- -+ stripe += STRIPE_SECTORS; - } -+ block++; -+ if (sectors > 0) -+ goto repeat; -+ - spin_lock_irq(&conf->device_lock); - if (--bi->bi_phys_segments == 0) { - int bytes = bi->bi_size; diff --git a/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch b/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch deleted file mode 100644 index fa929777da..0000000000 --- a/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch +++ /dev/null @@ -1,446 +0,0 @@ -diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c ---- linux-2.6.18-53.orig/drivers/md/raid5.c 2007-12-28 19:09:20.000000000 +0800 -+++ linux-2.6.18-53/drivers/md/raid5.c 2007-12-28 19:09:32.000000000 +0800 -@@ -633,6 +633,7 @@ static int raid5_end_read_request(struct - clear_buffer_uptodate(bh); - } - #endif -+ BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags)); - clear_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(STRIPE_HANDLE, &sh->state); - release_stripe(sh); -@@ -671,6 +672,10 @@ static int raid5_end_write_request (stru - - rdev_dec_pending(conf->disks[i].rdev, conf->mddev); - -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) { -+ BUG_ON(sh->dev[i].req.bi_io_vec[0].bv_page == sh->dev[i].page); -+ sh->dev[i].req.bi_io_vec[0].bv_page = sh->dev[i].page; -+ } - clear_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(STRIPE_HANDLE, &sh->state); - __release_stripe(conf, sh); -@@ -911,7 +916,27 @@ static sector_t compute_blocknr(struct s - return r_sector; - } - -+static struct page *zero_copy_data(struct bio *bio, sector_t sector) -+{ -+ sector_t bi_sector = bio->bi_sector; -+ struct page *page = NULL; -+ struct bio_vec *bvl; -+ int i; - -+ bio_for_each_segment(bvl, bio, i) { -+ if (sector == bi_sector) -+ page = bio_iovec_idx(bio, i)->bv_page; -+ bi_sector += bio_iovec_idx(bio, i)->bv_len >> 9; -+ if (bi_sector >= sector + STRIPE_SECTORS) { -+ /* check if the stripe is covered by one page */ -+ if (page == bio_iovec_idx(bio, i)->bv_page && -+ PageConstant(page)) -+ return page; -+ return NULL; -+ } -+ } -+ return NULL; -+} - - /* - * Copy data between a page in the stripe cache, and one or more bion -@@ -1003,8 +1028,9 @@ static void compute_parity5(struct strip - { - raid5_conf_t *conf = sh->raid_conf; - int i, pd_idx = sh->pd_idx, disks = sh->disks, count; -- void *ptr[MAX_XOR_BLOCKS]; -+ void *ptr[MAX_XOR_BLOCKS], *h_ptr[2]; - struct bio *chosen; -+ struct page *page; - - PRINTK("compute_parity5, stripe %llu, method %d\n", - (unsigned long long)sh->sector, method); -@@ -1054,34 +1080,90 @@ static void compute_parity5(struct strip - count = 1; - } - -- for (i = disks; i--;) -- if (sh->dev[i].written) { -- sector_t sector = sh->dev[i].sector; -- struct bio *wbi = sh->dev[i].written; -- while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { -- copy_data(1, wbi, sh->dev[i].page, sector); -- wbi = r5_next_bio(wbi, sector); -+ for (i = disks; i--;) { -+ struct r5dev *dev = &sh->dev[i]; -+ struct bio *wbi = dev->written; -+ sector_t sector; -+ -+ if (!wbi) -+ continue; -+ -+ sector = dev->sector; -+ set_bit(R5_LOCKED, &sh->dev[i].flags); -+ BUG_ON(test_bit(R5_Direct, &dev->flags)); -+ -+ /* check if it's covered by a single page -+ and whole stripe is written at once. -+ * in this case we can avoid memcpy() */ -+ if (!wbi->bi_next && test_bit(R5_OVERWRITE, &dev->flags) && -+ test_bit(R5_Insync, &dev->flags)) { -+ page = zero_copy_data(wbi, sector); -+ if (page) { -+ atomic_inc(&conf->writes_zcopy); -+ dev->req.bi_io_vec[0].bv_page = page; -+ set_bit(R5_Direct, &dev->flags); -+ clear_bit(R5_UPTODATE, &sh->dev[i].flags); -+ clear_bit(R5_OVERWRITE, &sh->dev[i].flags); -+ continue; - } -+ } - -- set_bit(R5_LOCKED, &sh->dev[i].flags); -- set_bit(R5_UPTODATE, &sh->dev[i].flags); -+ /* do copy write */ -+ atomic_inc(&conf->writes_copied); -+ clear_bit(R5_OVERWRITE, &sh->dev[i].flags); -+ set_bit(R5_UPTODATE, &sh->dev[i].flags); -+ while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { -+ copy_data(1, wbi, sh->dev[i].page, sector); -+ wbi = r5_next_bio(wbi, sector); - } -+ } - -+ h_ptr[0] = ptr[0]; - switch(method) { - case RECONSTRUCT_WRITE: - case CHECK_PARITY: -- for (i=disks; i--;) -- if (i != pd_idx) { -- ptr[count++] = page_address(sh->dev[i].page); -- check_xor(); -+ for (i=disks; i--;) { -+ if (i == pd_idx) -+ continue; -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) -+ page = sh->dev[i].req.bi_io_vec[0].bv_page; -+ else -+ page = sh->dev[i].page; -+ -+ /* have to compute the parity immediately for -+ * a highmem page. it would happen for zerocopy. -jay -+ */ -+ if (PageHighMem(page)) { -+ h_ptr[1] = kmap_atomic(page, KM_USER0); -+ xor_block(2, STRIPE_SIZE, h_ptr); -+ kunmap_atomic(page, KM_USER0); -+ } else { -+ ptr[count++] = page_address(page); - } -+ check_xor(); -+ } - break; - case READ_MODIFY_WRITE: -- for (i = disks; i--;) -- if (sh->dev[i].written) { -- ptr[count++] = page_address(sh->dev[i].page); -- check_xor(); -+ for (i = disks; i--;) { -+ if (!sh->dev[i].written) -+ continue; -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) -+ page = sh->dev[i].req.bi_io_vec[0].bv_page; -+ else -+ page = sh->dev[i].page; -+ -+ /* have to compute the parity immediately for -+ * a highmem page. it would happen for zerocopy. -jay -+ */ -+ if (PageHighMem(page)) { -+ h_ptr[1] = kmap_atomic(page, KM_USER0); -+ xor_block(2, STRIPE_SIZE, h_ptr); -+ kunmap_atomic(page, KM_USER0); -+ } else { -+ ptr[count++] = page_address(page); - } -+ check_xor(); -+ } - } - if (count != 1) - xor_block(count, STRIPE_SIZE, ptr); -@@ -1098,6 +1180,7 @@ static void compute_parity6(struct strip - raid6_conf_t *conf = sh->raid_conf; - int i, pd_idx = sh->pd_idx, qd_idx, d0_idx, disks = conf->raid_disks, count; - struct bio *chosen; -+ struct page *page; - /**** FIX THIS: This could be very bad if disks is close to 256 ****/ - void *ptrs[disks]; - -@@ -1127,18 +1210,47 @@ static void compute_parity6(struct strip - BUG(); /* Not implemented yet */ - } - -- for (i = disks; i--;) -- if (sh->dev[i].written) { -- sector_t sector = sh->dev[i].sector; -- struct bio *wbi = sh->dev[i].written; -- while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { -- copy_data(1, wbi, sh->dev[i].page, sector); -- wbi = r5_next_bio(wbi, sector); -+ for (i = disks; i--;) { -+ struct r5dev *dev = &sh->dev[i]; -+ struct bio *wbi = dev->written; -+ sector_t sector; -+ -+ if (!wbi) -+ continue; -+ -+ sector = sh->dev[i].sector; -+ set_bit(R5_LOCKED, &sh->dev[i].flags); -+ BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags)); -+ -+ /* check if it's covered by a single page -+ * and whole stripe is written at once. -+ * in this case we can avoid memcpy() */ -+ if (!wbi->bi_next && test_bit(R5_Insync, &sh->dev[i].flags) && -+ test_bit(R5_OVERWRITE, &sh->dev[i].flags)) { -+ page = zero_copy_data(wbi, sector); -+ /* we don't do zerocopy on a HighMem page. Raid6 tend -+ * to prepare all of the pages' content to be accessed -+ * before computing PQ parity. If we need to support HighMem -+ * page also, we have to modify the gen_syndrome() -+ * algorithm. -jay */ -+ if (page && !PageHighMem(page)) { -+ atomic_inc(&conf->writes_zcopy); -+ sh->dev[i].req.bi_io_vec[0].bv_page = page; -+ set_bit(R5_Direct, &sh->dev[i].flags); -+ clear_bit(R5_UPTODATE, &sh->dev[i].flags); -+ clear_bit(R5_OVERWRITE, &sh->dev[i].flags); -+ continue; - } -+ } - -- set_bit(R5_LOCKED, &sh->dev[i].flags); -- set_bit(R5_UPTODATE, &sh->dev[i].flags); -+ atomic_inc(&conf->writes_copied); -+ clear_bit(R5_OVERWRITE, &sh->dev[i].flags); -+ set_bit(R5_UPTODATE, &sh->dev[i].flags); -+ while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { -+ copy_data(1, wbi, sh->dev[i].page, sector); -+ wbi = r5_next_bio(wbi, sector); - } -+ } - - // switch(method) { - // case RECONSTRUCT_WRITE: -@@ -1149,8 +1261,12 @@ static void compute_parity6(struct strip - count = 0; - i = d0_idx; - do { -- ptrs[count++] = page_address(sh->dev[i].page); -- if (count <= disks-2 && !test_bit(R5_UPTODATE, &sh->dev[i].flags)) -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) -+ ptrs[count++] = page_address(sh->dev[i].req.bi_io_vec[0].bv_page); -+ else -+ ptrs[count++] = page_address(sh->dev[i].page); -+ if (count <= disks-2 && !test_bit(R5_UPTODATE, &sh->dev[i].flags) && -+ !test_bit(R5_Direct, &sh->dev[i].flags)) - printk("block %d/%d not uptodate on parity calc\n", i,count); - i = raid6_next_disk(i, disks); - } while ( i != d0_idx ); -@@ -1597,7 +1713,8 @@ static void handle_stripe5(struct stripe - if (sh->dev[i].written) { - dev = &sh->dev[i]; - if (!test_bit(R5_LOCKED, &dev->flags) && -- test_bit(R5_UPTODATE, &dev->flags) ) { -+ (test_bit(R5_UPTODATE, &dev->flags) || -+ test_bit(R5_Direct, &dev->flags)) ) { - /* We can return any write requests */ - struct bio *wbi, *wbi2; - int bitmap_end = 0; -@@ -1605,6 +1722,7 @@ static void handle_stripe5(struct stripe - spin_lock_irq(&conf->device_lock); - wbi = dev->written; - dev->written = NULL; -+ clear_bit(R5_Direct, &dev->flags); - while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) { - wbi2 = r5_next_bio(wbi, dev->sector); - if (--wbi->bi_phys_segments == 0) { -@@ -2173,7 +2291,8 @@ static void handle_stripe6(struct stripe - if (sh->dev[i].written) { - dev = &sh->dev[i]; - if (!test_bit(R5_LOCKED, &dev->flags) && -- test_bit(R5_UPTODATE, &dev->flags) ) { -+ (test_bit(R5_UPTODATE, &dev->flags) || -+ test_bit(R5_Direct, &dev->flags)) ) { - /* We can return any write requests */ - int bitmap_end = 0; - struct bio *wbi, *wbi2; -@@ -2182,6 +2301,7 @@ static void handle_stripe6(struct stripe - spin_lock_irq(&conf->device_lock); - wbi = dev->written; - dev->written = NULL; -+ clear_bit(R5_Direct, &dev->flags); - while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) { - wbi2 = r5_next_bio(wbi, dev->sector); - if (--wbi->bi_phys_segments == 0) { -@@ -3450,6 +3570,9 @@ static int run(mddev_t *mddev) - mddev->queue->max_phys_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT; - mddev->queue->max_hw_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;; - -+ /* raid5 device is able to do zcopy right now. */ -+ mddev->queue->backing_dev_info.capabilities |= BDI_CAP_PAGE_CONSTANT_WRITE; -+ - return 0; - abort: - if (conf) { -@@ -3536,9 +3659,11 @@ static void status (struct seq_file *seq - atomic_read(&conf->handled_in_raid5d), - atomic_read(&conf->out_of_stripes), - atomic_read(&conf->handle_called)); -- seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw", -+ seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw. zcopy writes: %u, copied writes: %u", - atomic_read(&conf->reads_for_rmw), -- atomic_read(&conf->reads_for_rcw)); -+ atomic_read(&conf->reads_for_rcw), -+ atomic_read(&conf->writes_zcopy), -+ atomic_read(&conf->writes_copied)); - seq_printf (seq, "\n\t\t%u delayed, %u bit delayed, %u active, queues: %u in, %u out\n", - atomic_read(&conf->delayed), atomic_read(&conf->bit_delayed), - atomic_read(&conf->active_stripes), -diff -pur linux-2.6.18-53.orig/include/linux/backing-dev.h linux-2.6.18-53/include/linux/backing-dev.h ---- linux-2.6.18-53.orig/include/linux/backing-dev.h 2007-12-28 14:49:26.000000000 +0800 -+++ linux-2.6.18-53/include/linux/backing-dev.h 2007-12-28 19:09:32.000000000 +0800 -@@ -48,6 +48,7 @@ struct backing_dev_info { - #define BDI_CAP_READ_MAP 0x00000010 /* Can be mapped for reading */ - #define BDI_CAP_WRITE_MAP 0x00000020 /* Can be mapped for writing */ - #define BDI_CAP_EXEC_MAP 0x00000040 /* Can be mapped for execution */ -+#define BDI_CAP_PAGE_CONSTANT_WRITE 0x00000080 /* Zcopy write - for raid5 */ - #define BDI_CAP_VMFLAGS \ - (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP) - -@@ -94,11 +95,18 @@ static inline int bdi_rw_congested(struc - #define bdi_cap_account_dirty(bdi) \ - (!((bdi)->capabilities & BDI_CAP_NO_ACCT_DIRTY)) - -+#define bdi_cap_page_constant_write(bdi) \ -+ ((bdi)->capabilities & BDI_CAP_PAGE_CONSTANT_WRITE) -+ - #define mapping_cap_writeback_dirty(mapping) \ - bdi_cap_writeback_dirty((mapping)->backing_dev_info) - - #define mapping_cap_account_dirty(mapping) \ - bdi_cap_account_dirty((mapping)->backing_dev_info) - -+#define mapping_cap_page_constant_write(mapping) \ -+ bdi_cap_page_constant_write((mapping)->backing_dev_info) -+ -+ - - #endif /* _LINUX_BACKING_DEV_H */ -diff -pur linux-2.6.18-53.orig/include/linux/page-flags.h linux-2.6.18-53/include/linux/page-flags.h ---- linux-2.6.18-53.orig/include/linux/page-flags.h 2007-12-28 14:49:26.000000000 +0800 -+++ linux-2.6.18-53/include/linux/page-flags.h 2007-12-28 19:09:32.000000000 +0800 -@@ -86,6 +86,7 @@ - #define PG_reclaim 17 /* To be reclaimed asap */ - #define PG_nosave_free 18 /* Free, should not be written */ - #define PG_buddy 19 /* Page is free, on buddy lists */ -+#define PG_constant 20 /* To mark if the page is constant */ - - /* PG_owner_priv_1 users should have descriptive aliases */ - #define PG_checked PG_owner_priv_1 /* Used by some filesystems */ -@@ -252,6 +253,14 @@ - - struct page; /* forward declaration */ - -+#define PageConstant(page) test_bit(PG_constant, &(page)->flags) -+#define SetPageConstant(page) set_bit(PG_constant, &(page)->flags) -+#define ClearPageConstant(page) clear_bit(PG_constant, &(page->flags)) -+#define TestSetPageConstant(page) test_and_set_bit(PG_constant, &(page)->flags) -+ -+extern int set_page_constant(struct page *page); -+extern void clear_page_constant(struct page *); -+ - int test_clear_page_dirty(struct page *page); - int test_clear_page_writeback(struct page *page); - int test_set_page_writeback(struct page *page); -diff -pur linux-2.6.18-53.orig/include/linux/raid/raid5.h linux-2.6.18-53/include/linux/raid/raid5.h ---- linux-2.6.18-53.orig/include/linux/raid/raid5.h 2007-12-28 18:55:24.000000000 +0800 -+++ linux-2.6.18-53/include/linux/raid/raid5.h 2007-12-28 19:09:32.000000000 +0800 -@@ -156,8 +156,9 @@ struct stripe_head { - #define R5_Overlap 7 /* There is a pending overlapping request on this block */ - #define R5_ReadError 8 /* seen a read error here recently */ - #define R5_ReWrite 9 /* have tried to over-write the readerror */ -- - #define R5_Expanded 10 /* This block now has post-expand data */ -+#define R5_Direct 11 /* Use the pages in bio to do the write directly. */ -+ - /* - * Write method - */ -diff -pur linux-2.6.18-53.orig/mm/filemap.c linux-2.6.18-53/mm/filemap.c ---- linux-2.6.18-53.orig/mm/filemap.c 2007-12-28 14:49:26.000000000 +0800 -+++ linux-2.6.18-53/mm/filemap.c 2007-12-28 19:09:32.000000000 +0800 -@@ -30,6 +30,7 @@ - #include <linux/security.h> - #include <linux/syscalls.h> - #include <linux/cpuset.h> -+#include <linux/rmap.h> - #include "filemap.h" - #include "internal.h" - -@@ -566,11 +567,55 @@ void end_page_writeback(struct page *pag - if (!test_clear_page_writeback(page)) - BUG(); - } -+ clear_page_constant(page); - smp_mb__after_clear_bit(); - wake_up_page(page, PG_writeback); - } - EXPORT_SYMBOL(end_page_writeback); - -+/* Make a page to be constant, `constant' means any write to this page will -+ * be blocked until clear_page_constant is called. -+ * The page lock must be held. -+ */ -+int set_page_constant(struct page *page) -+{ -+ BUG_ON(!PageLocked(page)); -+ -+ /* If it's an anonymous page and haven't been added to swap cache, -+ * return directly because we have no way to swap this page. -+ */ -+ if (page_mapping(page) == NULL) -+ return SWAP_FAIL; -+ -+ BUG_ON(!PageUptodate(page)); -+ -+ /* I have to clear page uptodate before trying to remove -+ * it from user's page table because otherwise, the page may be -+ * reinstalled by a page access which happens between try_to_unmap() -+ * and ClearPageUptodate(). -jay -+ */ -+ ClearPageUptodate(page); -+ if (page_mapped(page) && try_to_unmap(page, 0) != SWAP_SUCCESS) { -+ SetPageUptodate(page); -+ return SWAP_FAIL; -+ } -+ SetPageConstant(page); -+ return SWAP_SUCCESS; -+} -+ -+void clear_page_constant(struct page *page) -+{ -+ if (PageConstant(page)) { -+ BUG_ON(!PageLocked(page)); -+ BUG_ON(PageUptodate(page)); -+ ClearPageConstant(page); -+ SetPageUptodate(page); -+ unlock_page(page); -+ } -+} -+EXPORT_SYMBOL(set_page_constant); -+EXPORT_SYMBOL(clear_page_constant); -+ - /** - * __lock_page - get a lock on the page, assuming we need to sleep to get it - * @page: the page to lock diff --git a/lustre/kernel_patches/patches/raid5-zerocopy.patch b/lustre/kernel_patches/patches/raid5-zerocopy.patch deleted file mode 100644 index 5095906dfb..0000000000 --- a/lustre/kernel_patches/patches/raid5-zerocopy.patch +++ /dev/null @@ -1,376 +0,0 @@ -diff -pru linux-2.6.9.orig/drivers/md/raid5.c linux-2.6.9/drivers/md/raid5.c ---- linux-2.6.9.orig/drivers/md/raid5.c 2007-07-09 02:43:33.000000000 -0600 -+++ linux-2.6.9/drivers/md/raid5.c 2007-07-13 00:39:15.000000000 -0600 -@@ -412,6 +412,7 @@ static int raid5_end_read_request (struc - clear_buffer_uptodate(bh); - } - #endif -+ BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags)); - clear_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(STRIPE_HANDLE, &sh->state); - release_stripe(sh); -@@ -450,6 +451,10 @@ static int raid5_end_write_request (stru - - rdev_dec_pending(conf->disks[i].rdev, conf->mddev); - -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) { -+ BUG_ON(sh->dev[i].req.bi_io_vec[0].bv_page == sh->dev[i].page); -+ sh->dev[i].req.bi_io_vec[0].bv_page = sh->dev[i].page; -+ } - clear_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(STRIPE_HANDLE, &sh->state); - __release_stripe(conf, sh); -@@ -620,7 +625,27 @@ static sector_t compute_blocknr(struct s - return r_sector; - } - -+static struct page *zero_copy_data(struct bio *bio, sector_t sector) -+{ -+ sector_t bi_sector = bio->bi_sector; -+ struct page *page = NULL; -+ struct bio_vec *bvl; -+ int i; - -+ bio_for_each_segment(bvl, bio, i) { -+ if (sector == bi_sector) -+ page = bio_iovec_idx(bio, i)->bv_page; -+ bi_sector += bio_iovec_idx(bio, i)->bv_len >> 9; -+ if (bi_sector >= sector + STRIPE_SECTORS) { -+ /* check if the stripe is covered by one page */ -+ if (page == bio_iovec_idx(bio, i)->bv_page && -+ PageConstant(page)) -+ return page; -+ return NULL; -+ } -+ } -+ return NULL; -+} - - /* - * Copy data between a page in the stripe cache, and one or more bion -@@ -716,8 +741,9 @@ static void compute_parity(struct stripe - { - raid5_conf_t *conf = sh->raid_conf; - int i, pd_idx = sh->pd_idx, disks = conf->raid_disks, count; -- void *ptr[MAX_XOR_BLOCKS]; -+ void *ptr[MAX_XOR_BLOCKS], *h_ptr[2]; - struct bio *chosen; -+ struct page *page; - - PRINTK("compute_parity, stripe %llu, method %d\n", - (unsigned long long)sh->sector, method); -@@ -744,13 +770,14 @@ static void compute_parity(struct stripe - break; - case RECONSTRUCT_WRITE: - memset(ptr[0], 0, STRIPE_SIZE); -- for (i= disks; i-- ;) -+ for (i= disks; i-- ;) { - if (i!=pd_idx && sh->dev[i].towrite) { - chosen = sh->dev[i].towrite; - sh->dev[i].towrite = NULL; - if (sh->dev[i].written) BUG(); - sh->dev[i].written = chosen; - } -+ } - break; - case CHECK_PARITY: - break; -@@ -760,34 +787,88 @@ static void compute_parity(struct stripe - count = 1; - } - -- for (i = disks; i--;) -- if (sh->dev[i].written) { -- sector_t sector = sh->dev[i].sector; -- struct bio *wbi = sh->dev[i].written; -- while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { -- copy_data(1, wbi, sh->dev[i].page, sector); -- wbi = r5_next_bio(wbi, sector); -+ for (i = disks; i--;) { -+ struct bio *wbi = sh->dev[i].written; -+ sector_t sector; -+ -+ if (!wbi) -+ continue; -+ -+ sector = sh->dev[i].sector; -+ set_bit(R5_LOCKED, &sh->dev[i].flags); -+ BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags)); -+ -+ /* check if it's covered by a single page -+ and whole stripe is written at once. -+ * in this case we can avoid memcpy() */ -+ if (!wbi->bi_next && test_bit(R5_OVERWRITE, &sh->dev[i].flags) && -+ test_bit(R5_Insync, &sh->dev[i].flags)) { -+ page = zero_copy_data(wbi, sector); -+ if (page) { -+ atomic_inc(&conf->writes_zcopy); -+ sh->dev[i].req.bi_io_vec[0].bv_page = page; -+ set_bit(R5_Direct, &sh->dev[i].flags); -+ clear_bit(R5_UPTODATE, &sh->dev[i].flags); -+ clear_bit(R5_OVERWRITE, &sh->dev[i].flags); -+ continue; - } -+ } - -- set_bit(R5_LOCKED, &sh->dev[i].flags); -- set_bit(R5_UPTODATE, &sh->dev[i].flags); -+ atomic_inc(&conf->writes_copied); -+ clear_bit(R5_OVERWRITE, &sh->dev[i].flags); -+ set_bit(R5_UPTODATE, &sh->dev[i].flags); -+ while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { -+ copy_data(1, wbi, sh->dev[i].page, sector); -+ wbi = r5_next_bio(wbi, sector); - } -+ } - -+ h_ptr[0] = ptr[0]; - switch(method) { - case RECONSTRUCT_WRITE: - case CHECK_PARITY: -- for (i=disks; i--;) -- if (i != pd_idx) { -- ptr[count++] = page_address(sh->dev[i].page); -- check_xor(); -+ for (i=disks; i--;) { -+ if (i == pd_idx) -+ continue; -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) -+ page = sh->dev[i].req.bi_io_vec[0].bv_page; -+ else -+ page = sh->dev[i].page; -+ -+ /* have to compute the parity immediately for -+ * a highmem page. it would happen for zerocopy. -jay -+ */ -+ if (PageHighMem(page)) { -+ h_ptr[1] = kmap_atomic(page, KM_USER0); -+ xor_block(2, STRIPE_SIZE, h_ptr); -+ kunmap_atomic(page, KM_USER0); -+ } else { -+ ptr[count++] = page_address(page); - } -+ check_xor(); -+ } - break; - case READ_MODIFY_WRITE: -- for (i = disks; i--;) -- if (sh->dev[i].written) { -- ptr[count++] = page_address(sh->dev[i].page); -- check_xor(); -+ for (i = disks; i--;) { -+ if (!sh->dev[i].written) -+ continue; -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) -+ page = sh->dev[i].req.bi_io_vec[0].bv_page; -+ else -+ page = sh->dev[i].page; -+ -+ /* have to compute the parity immediately for -+ * a highmem page. it would happen for zerocopy. -jay -+ */ -+ if (PageHighMem(page)) { -+ h_ptr[1] = kmap_atomic(page, KM_USER0); -+ xor_block(2, STRIPE_SIZE, h_ptr); -+ kunmap_atomic(page, KM_USER0); -+ } else { -+ ptr[count++] = page_address(page); - } -+ check_xor(); -+ } - } - if (count != 1) - xor_block(count, STRIPE_SIZE, ptr); -@@ -1059,13 +1140,15 @@ static void handle_stripe(struct stripe_ - if (sh->dev[i].written) { - dev = &sh->dev[i]; - if (!test_bit(R5_LOCKED, &dev->flags) && -- test_bit(R5_UPTODATE, &dev->flags) ) { -+ (test_bit(R5_UPTODATE, &dev->flags) || -+ test_bit(R5_Direct, &dev->flags)) ) { - /* We can return any write requests */ - struct bio *wbi, *wbi2; - PRINTK("Return write for disc %d\n", i); - spin_lock_irq(&conf->device_lock); - wbi = dev->written; - dev->written = NULL; -+ clear_bit(R5_Direct, &dev->flags); - while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) { - wbi2 = r5_next_bio(wbi, dev->sector); - if (--wbi->bi_phys_segments == 0) { -@@ -1831,6 +1914,7 @@ memory = conf->max_nr_stripes * (sizeof( - if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe) - mddev->queue->backing_dev_info.ra_pages = 2 * stripe; - } -+ mddev->queue->backing_dev_info.capabilities |= BDI_CAP_PAGE_CONST_WRITE; - - /* Ok, everything is just fine now */ - mddev->array_size = mddev->size * (mddev->raid_disks - 1); -@@ -1918,9 +2002,11 @@ static void status (struct seq_file *seq - atomic_read(&conf->handled_in_raid5d), - atomic_read(&conf->out_of_stripes), - atomic_read(&conf->handle_called)); -- seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw", -+ seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw. zcopy writes: %u, copied writes: %u", - atomic_read(&conf->reads_for_rmw), -- atomic_read(&conf->reads_for_rcw)); -+ atomic_read(&conf->reads_for_rcw), -+ atomic_read(&conf->writes_zcopy), -+ atomic_read(&conf->writes_copied)); - seq_printf (seq, "\n\t\t%u delayed, %u active, queues: %u in, %u out\n", - atomic_read(&conf->delayed), - atomic_read(&conf->active_stripes), -diff -pru linux-2.6.9.orig/include/linux/backing-dev.h linux-2.6.9/include/linux/backing-dev.h ---- linux-2.6.9.orig/include/linux/backing-dev.h 2004-10-18 15:53:46.000000000 -0600 -+++ linux-2.6.9/include/linux/backing-dev.h 2007-07-13 00:12:46.000000000 -0600 -@@ -30,8 +30,11 @@ struct backing_dev_info { - void *congested_data; /* Pointer to aux data for congested func */ - void (*unplug_io_fn)(struct backing_dev_info *, struct page *); - void *unplug_io_data; -+ unsigned int capabilities; - }; - -+#define BDI_CAP_PAGE_CONST_WRITE 0x00000001 -+ - extern struct backing_dev_info default_backing_dev_info; - void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); - -@@ -62,4 +65,7 @@ static inline int bdi_rw_congested(struc - (1 << BDI_write_congested)); - } - -+#define mapping_cap_page_constant_write(mapping) \ -+ ((mapping)->backing_dev_info->capabilities & BDI_CAP_PAGE_CONST_WRITE) -+ - #endif /* _LINUX_BACKING_DEV_H */ -diff -pru linux-2.6.9.orig/include/linux/page-flags.h linux-2.6.9/include/linux/page-flags.h ---- linux-2.6.9.orig/include/linux/page-flags.h 2004-10-18 15:54:39.000000000 -0600 -+++ linux-2.6.9/include/linux/page-flags.h 2007-07-13 00:12:46.000000000 -0600 -@@ -74,6 +74,7 @@ - #define PG_swapcache 16 /* Swap page: swp_entry_t in private */ - #define PG_mappedtodisk 17 /* Has blocks allocated on-disk */ - #define PG_reclaim 18 /* To be reclaimed asap */ -+#define PG_constant 19 /* To mark the page is constant */ - - - /* -@@ -298,6 +299,11 @@ extern unsigned long __read_page_state(u - #define PageSwapCache(page) 0 - #endif - -+#define PageConstant(page) test_bit(PG_constant, &(page)->flags) -+#define SetPageConstant(page) set_bit(PG_constant, &(page)->flags) -+#define ClearPageConstant(page) clear_bit(PG_constant, &(page->flags)) -+#define TestSetPageConstant(page) test_and_set_bit(PG_constant, &(page)->flags) -+ - struct page; /* forward declaration */ - - int test_clear_page_dirty(struct page *page); -diff -pru linux-2.6.9.orig/include/linux/pagemap.h linux-2.6.9/include/linux/pagemap.h ---- linux-2.6.9.orig/include/linux/pagemap.h 2004-10-18 15:53:06.000000000 -0600 -+++ linux-2.6.9/include/linux/pagemap.h 2007-07-13 00:12:46.000000000 -0600 -@@ -191,6 +191,19 @@ static inline void wait_on_page_writebac - - extern void end_page_writeback(struct page *page); - -+extern int set_page_constant(struct page *page); -+extern void clear_page_constant(struct page *); -+static inline int set_page_constant_lock(struct page *page) -+{ -+ BUG_ON(PageLocked(page)); -+ lock_page(page); -+ if (set_page_constant(page)) { -+ unlock_page(page); -+ return 1; -+ } -+ return 0; -+} -+ - /* - * Fault a userspace page into pagetables. Return non-zero on a fault. - * -diff -pru linux-2.6.9.orig/include/linux/raid/raid5.h linux-2.6.9/include/linux/raid/raid5.h ---- linux-2.6.9.orig/include/linux/raid/raid5.h 2007-07-09 02:43:33.000000000 -0600 -+++ linux-2.6.9/include/linux/raid/raid5.h 2007-07-13 00:39:15.000000000 -0600 -@@ -153,6 +153,7 @@ struct stripe_head { - #define R5_Wantread 4 /* want to schedule a read */ - #define R5_Wantwrite 5 - #define R5_Syncio 6 /* this io need to be accounted as resync io */ -+#define R5_Direct 7 /* use page from passed bio to avoid memcpy */ - - /* - * Write method -@@ -234,6 +235,8 @@ struct raid5_private_data { - atomic_t out_of_stripes; - atomic_t reads_for_rmw; - atomic_t reads_for_rcw; -+ atomic_t writes_zcopy; -+ atomic_t writes_copied; - atomic_t handle_called; - atomic_t delayed; - atomic_t in_reqs_in_queue; -diff -pru linux-2.6.9.orig/mm/filemap.c linux-2.6.9/mm/filemap.c ---- linux-2.6.9.orig/mm/filemap.c 2007-07-09 02:43:33.000000000 -0600 -+++ linux-2.6.9/mm/filemap.c 2007-07-13 00:12:46.000000000 -0600 -@@ -27,6 +27,8 @@ - #include <linux/pagevec.h> - #include <linux/blkdev.h> - #include <linux/security.h> -+#include <linux/rmap.h> -+ - /* - * This is needed for the following functions: - * - try_to_release_page -@@ -486,11 +488,52 @@ void end_page_writeback(struct page *pag - BUG(); - smp_mb__after_clear_bit(); - } -+ clear_page_constant(page); - wake_up_page(page); - } - - EXPORT_SYMBOL(end_page_writeback); - -+/* Mark a page in bio to be constant, page must be locked */ -+int set_page_constant(struct page *page) -+{ -+ BUG_ON(!PageLocked(page)); -+ -+ /* If it's an anonymous page and haven't been added to swap cache, -+ * do it here. -+ */ -+ if (PageAnon(page) && !PageSwapCache(page)) -+ return 1; -+ -+ BUG_ON(!PageUptodate(page)); -+ -+ /* I have to clear page uptodate before trying to remove -+ * it from user's page table because otherwise, the page may be -+ * reinstalled by a page access which happens between try_to_unmap() -+ * and ClearPageUptodate(). -jay -+ */ -+ ClearPageUptodate(page); -+ if (page_mapped(page) && try_to_unmap(page) != SWAP_SUCCESS) { -+ SetPageUptodate(page); -+ return 1; -+ } -+ SetPageConstant(page); -+ return 0; -+} -+ -+void clear_page_constant(struct page *page) -+{ -+ if (PageConstant(page)) { -+ BUG_ON(!PageLocked(page)); -+ BUG_ON(PageUptodate(page)); -+ ClearPageConstant(page); -+ SetPageUptodate(page); -+ unlock_page(page); -+ } -+} -+EXPORT_SYMBOL(set_page_constant); -+EXPORT_SYMBOL(clear_page_constant); -+ - /* - * Get a lock on the page, assuming we need to sleep to get it. - * diff --git a/lustre/kernel_patches/patches/raid6-configurable-cachesize.patch b/lustre/kernel_patches/patches/raid6-configurable-cachesize.patch deleted file mode 100644 index fa28bc3528..0000000000 --- a/lustre/kernel_patches/patches/raid6-configurable-cachesize.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- linux-2.6.9.orig/drivers/md/raid6main.c 2006-09-07 23:10:43.000000000 +0800 -+++ linux-2.6.9/drivers/md/raid6main.c 2006-09-07 23:11:25.000000000 +0800 -@@ -33,7 +33,7 @@ - * Stripe cache - */ - --#define NR_STRIPES 256 -+static int raid6_nr_stripes = 256 * 8; - #define STRIPE_SIZE PAGE_SIZE - #define STRIPE_SHIFT (PAGE_SHIFT - 9) - #define STRIPE_SECTORS (STRIPE_SIZE>>9) -@@ -111,7 +111,7 @@ static inline void __release_stripe(raid - list_add_tail(&sh->lru, &conf->inactive_list); - atomic_dec(&conf->active_stripes); - if (!conf->inactive_blocked || -- atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4)) -+ atomic_read(&conf->active_stripes) < (raid6_nr_stripes*3/4)) - wake_up(&conf->wait_for_stripe); - } - } -@@ -274,7 +274,7 @@ static struct stripe_head *get_active_st - conf->inactive_blocked = 1; - wait_event_lock_irq(conf->wait_for_stripe, - !list_empty(&conf->inactive_list) && -- (atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4) -+ (atomic_read(&conf->active_stripes) < (raid6_nr_stripes *3/4) - || !conf->inactive_blocked), - conf->device_lock, - unplug_slaves(conf->mddev); -@@ -1805,7 +1805,7 @@ static int run (mddev_t *mddev) - conf->chunk_size = mddev->chunk_size; - conf->level = mddev->level; - conf->algorithm = mddev->layout; -- conf->max_nr_stripes = NR_STRIPES; -+ conf->max_nr_stripes = raid6_nr_stripes; - - /* device size must be a multiple of chunk size */ - mddev->size &= ~(mddev->chunk_size/1024 -1); -@@ -2139,5 +2139,6 @@ static void raid6_exit (void) - - module_init(raid6_init); - module_exit(raid6_exit); -+module_param(raid6_nr_stripes, int, 0644); - MODULE_LICENSE("GPL"); - MODULE_ALIAS("md-personality-8"); /* RAID6 */ diff --git a/lustre/kernel_patches/patches/raid6-large-io.patch b/lustre/kernel_patches/patches/raid6-large-io.patch deleted file mode 100644 index 85a7f43ab5..0000000000 --- a/lustre/kernel_patches/patches/raid6-large-io.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- linux-2.6.9.orig/drivers/md/raid6main.c 2006-09-07 23:12:09.000000000 +0800 -+++ linux-2.6.9/drivers/md/raid6main.c 2006-09-07 23:12:44.000000000 +0800 -@@ -1775,6 +1775,11 @@ static int run (mddev_t *mddev) - mddev->queue->unplug_fn = raid6_unplug_device; - mddev->queue->issue_flush_fn = raid6_issue_flush; - -+ /* in order to support large I/Os */ -+ blk_queue_max_sectors(mddev->queue, mddev->chunk_size * mddev->raid_disks >> 9); -+ mddev->queue->max_phys_segments = mddev->chunk_size * mddev->raid_disks >> PAGE_SHIFT; -+ mddev->queue->max_hw_segments = mddev->chunk_size * mddev->raid_disks >> PAGE_SHIFT; -+ - PRINTK("raid6: run(%s) called.\n", mdname(mddev)); - - ITERATE_RDEV(mddev,rdev,tmp) { diff --git a/lustre/kernel_patches/patches/raid6-merge-ios.patch b/lustre/kernel_patches/patches/raid6-merge-ios.patch deleted file mode 100644 index e245ba7500..0000000000 --- a/lustre/kernel_patches/patches/raid6-merge-ios.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -pur linux-2.6.9.orig/drivers/md/raid6main.c linux-2.6.9/drivers/md/raid6main.c ---- linux-2.6.9.orig/drivers/md/raid6main.c 2008-01-10 13:51:32.000000000 +0800 -+++ linux-2.6.9/drivers/md/raid6main.c 2008-01-10 13:52:20.000000000 +0800 -@@ -956,6 +956,26 @@ static void add_stripe_bio (struct strip - } - } - -+/* -+ * The whole idea is to collect all bio's and then issue them -+ * disk by disk to assist merging a bit -bzzz -+ */ -+static void raid6_flush_bios(raid6_conf_t *conf, struct bio *bios[], int raid_disks) -+{ -+ struct bio *bio, *nbio; -+ int i; -+ -+ for (i = 0; i < raid_disks; i++) { -+ bio = bios[i]; -+ while (bio) { -+ nbio = bio->bi_next; -+ bio->bi_next = NULL; -+ generic_make_request(bio); -+ bio = nbio; -+ } -+ bios[i] = NULL; -+ } -+} - - /* - * handle_stripe - do things to a stripe. -@@ -975,7 +995,7 @@ static void add_stripe_bio (struct strip - * - */ - --static void handle_stripe(struct stripe_head *sh) -+static void handle_stripe(struct stripe_head *sh, struct bio *bios[]) - { - raid6_conf_t *conf = sh->raid_conf; - int disks = conf->raid_disks; -@@ -1452,7 +1472,11 @@ static void handle_stripe(struct stripe_ - bi->bi_size = STRIPE_SIZE; - bi->bi_next = NULL; - atomic_inc(&conf->out_reqs_in_queue); -- generic_make_request(bi); -+ if(bios) { -+ bi->bi_next = bios[i]; -+ bios[i] = bi; -+ } else -+ generic_make_request(bi); - } else { - PRINTK("skip op %ld on disc %d for sector %llu\n", - bi->bi_rw, i, (unsigned long long)sh->sector); -@@ -1575,6 +1599,7 @@ static int make_request (request_queue_t - int sectors_per_chunk; - int stripes_per_chunk, sectors_per_block; - int sectors_per_stripe; -+ struct bio *bios[MD_SB_DISKS]; - int i, j; - - atomic_inc(&conf->in_reqs_in_queue); -@@ -1611,6 +1636,7 @@ static int make_request (request_queue_t - sector_div(block, sectors_per_block); - sectors = bi->bi_size >> 9; - -+ memset(&bios, 0, sizeof(bios)); - repeat: - stripe = block * (sectors_per_block / data_disks); - b_sector = stripe * data_disks; -@@ -1630,9 +1656,17 @@ static int make_request (request_queue_t - new_sector = raid6_compute_sector(r_sector, raid_disks, - data_disks, &dd_idx, - &pd_idx, conf); -- if (sh == NULL) -- sh = get_active_stripe(conf, new_sector, pd_idx, -- (bi->bi_rw&RWA_MASK)); -+ if (sh == NULL) { -+ /* first, try to get stripe w/o blocking -+ * if we can't, then it's time to submit -+ * all collected bio's in order to free -+ * some space in the cache -bzzz */ -+ sh = get_active_stripe(conf, new_sector, pd_idx, 1); -+ if (!sh && !(bi->bi_rw&RWA_MASK)) { -+ raid6_flush_bios(conf, bios, raid_disks); -+ sh = get_active_stripe(conf, new_sector, pd_idx, 0); -+ } -+ } - if (sh) { - add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); - } else { -@@ -1653,7 +1687,7 @@ static int make_request (request_queue_t - - if (sh) { - raid6_plug_device(conf); -- handle_stripe(sh); -+ handle_stripe(sh, bios); - release_stripe(sh); - sh = NULL; - } -@@ -1664,6 +1698,9 @@ static int make_request (request_queue_t - if(sectors > 0) - goto repeat; - -+ /* now flush all bio's */ -+ raid6_flush_bios(conf, bios, raid_disks); -+ - spin_lock_irq(&conf->device_lock); - if (--bi->bi_phys_segments == 0) { - int bytes = bi->bi_size; -@@ -1719,7 +1756,7 @@ static int sync_request (mddev_t *mddev, - clear_bit(STRIPE_INSYNC, &sh->state); - spin_unlock(&sh->lock); - -- handle_stripe(sh); -+ handle_stripe(sh, NULL); - release_stripe(sh); - - return STRIPE_SECTORS; -@@ -1769,7 +1806,7 @@ static void raid6d (mddev_t *mddev) - handled++; - - atomic_inc(&conf->handled_in_raid5d); -- handle_stripe(sh); -+ handle_stripe(sh, NULL); - release_stripe(sh); - - spin_lock_irq(&conf->device_lock); diff --git a/lustre/kernel_patches/patches/raid6-serialize-ovelapping-reqs.patch b/lustre/kernel_patches/patches/raid6-serialize-ovelapping-reqs.patch deleted file mode 100644 index 5bc0a3e650..0000000000 --- a/lustre/kernel_patches/patches/raid6-serialize-ovelapping-reqs.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff -pur linux-2.6.9.orig/drivers/md/raid6main.c linux-2.6.9/drivers/md/raid6main.c ---- linux-2.6.9.orig/drivers/md/raid6main.c 2008-01-10 13:55:37.000000000 +0800 -+++ linux-2.6.9/drivers/md/raid6main.c 2008-01-10 13:55:56.000000000 +0800 -@@ -749,6 +749,10 @@ static void compute_parity(struct stripe - if ( i != pd_idx && i != qd_idx && sh->dev[i].towrite ) { - chosen = sh->dev[i].towrite; - sh->dev[i].towrite = NULL; -+ -+ if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -+ wake_up(&conf->wait_for_overlap); -+ - if (sh->dev[i].written) BUG(); - sh->dev[i].written = chosen; - } -@@ -907,7 +911,7 @@ static void compute_block_2(struct strip - * toread/towrite point to the first in a chain. - * The bi_next chain must be in order. - */ --static void add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) -+static int add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) - { - struct bio **bip; - raid6_conf_t *conf = sh->raid_conf; -@@ -924,10 +928,13 @@ static void add_stripe_bio (struct strip - else - bip = &sh->dev[dd_idx].toread; - while (*bip && (*bip)->bi_sector < bi->bi_sector) { -- BUG_ON((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector); -+ if((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector) -+ goto overlap; - bip = & (*bip)->bi_next; - } --/* FIXME do I need to worry about overlapping bion */ -+ if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9)) -+ goto overlap; -+ - if (*bip && bi->bi_next && (*bip) != bi->bi_next) - BUG(); - if (*bip) -@@ -954,6 +961,14 @@ static void add_stripe_bio (struct strip - if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS) - set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags); - } -+ -+ return 1; -+ -+overlap: -+ set_bit(R5_Overlap, &sh->dev[dd_idx].flags); -+ spin_unlock_irq(&conf->device_lock); -+ spin_unlock(&sh->lock); -+ return 0; - } - - /* -@@ -1038,6 +1053,9 @@ static void handle_stripe(struct stripe_ - spin_lock_irq(&conf->device_lock); - rbi = dev->toread; - dev->toread = NULL; -+ -+ if (test_and_clear_bit(R5_Overlap, &dev->flags)) -+ wake_up(&conf->wait_for_overlap); - spin_unlock_irq(&conf->device_lock); - while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) { - copy_data(0, rbi, dev->page, dev->sector); -@@ -1087,6 +1105,9 @@ static void handle_stripe(struct stripe_ - sh->dev[i].towrite = NULL; - if (bi) to_write--; - -+ if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -+ wake_up(&conf->wait_for_overlap); -+ - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); - clear_bit(BIO_UPTODATE, &bi->bi_flags); -@@ -1115,6 +1136,8 @@ static void handle_stripe(struct stripe_ - if (!test_bit(R5_Insync, &sh->dev[i].flags)) { - bi = sh->dev[i].toread; - sh->dev[i].toread = NULL; -+ if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -+ wake_up(&conf->wait_for_overlap); - if (bi) to_read--; - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); -@@ -1648,6 +1671,8 @@ static int make_request (request_queue_t - sh = NULL; - /* iterrate through all pages in the stripe */ - for (j = 0; j < data_disks && sectors > 0; j++) { -+ DEFINE_WAIT(w); -+ - if (r_sector + STRIPE_SECTORS <= bi->bi_sector || - r_sector >= last_sector) { - r_sector += sectors_per_chunk; -@@ -1656,6 +1681,9 @@ static int make_request (request_queue_t - new_sector = raid6_compute_sector(r_sector, raid_disks, - data_disks, &dd_idx, - &pd_idx, conf); -+ -+retry: -+ prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE); - if (sh == NULL) { - /* first, try to get stripe w/o blocking - * if we can't, then it's time to submit -@@ -1668,10 +1696,18 @@ static int make_request (request_queue_t - } - } - if (sh) { -- add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); -+ if(!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { -+ /* Failed to be added due to overlapped. */ -+ raid6_unplug_device(mddev->queue); -+ release_stripe(sh); -+ schedule(); -+ goto retry; -+ } -+ finish_wait(&conf->wait_for_overlap, &w); - } else { - /* cannot get stripe for read-ahead, just give-up */ - clear_bit(BIO_UPTODATE, &bi->bi_flags); -+ finish_wait(&conf->wait_for_overlap, &w); - sectors = 0; - break; - } -@@ -1847,6 +1883,7 @@ static int run (mddev_t *mddev) - - conf->device_lock = SPIN_LOCK_UNLOCKED; - init_waitqueue_head(&conf->wait_for_stripe); -+ init_waitqueue_head(&conf->wait_for_overlap); - INIT_LIST_HEAD(&conf->handle_list); - INIT_LIST_HEAD(&conf->delayed_list); - INIT_LIST_HEAD(&conf->inactive_list); -diff -pur linux-2.6.9.orig/include/linux/raid/raid5.h linux-2.6.9/include/linux/raid/raid5.h ---- linux-2.6.9.orig/include/linux/raid/raid5.h 2008-01-10 13:46:05.000000000 +0800 -+++ linux-2.6.9/include/linux/raid/raid5.h 2008-01-10 13:55:56.000000000 +0800 -@@ -154,6 +154,8 @@ struct stripe_head { - #define R5_Wantwrite 5 - #define R5_Syncio 6 /* this io need to be accounted as resync io */ - #define R5_Direct 7 /* use page from passed bio to avoid memcpy */ -+#define R5_Overlap 8 /* There is a pending overlapping request -+ * on this block */ - - /* - * Write method -@@ -221,6 +223,7 @@ struct raid5_private_data { - atomic_t active_stripes; - struct list_head inactive_list; - wait_queue_head_t wait_for_stripe; -+ wait_queue_head_t wait_for_overlap; - int inactive_blocked; /* release of inactive stripes blocked, - * waiting for 25% to be free - */ diff --git a/lustre/kernel_patches/patches/raid6-stats.patch b/lustre/kernel_patches/patches/raid6-stats.patch deleted file mode 100644 index c173a088da..0000000000 --- a/lustre/kernel_patches/patches/raid6-stats.patch +++ /dev/null @@ -1,169 +0,0 @@ -diff -pur linux-2.6.9-55.0.9.orig/drivers/md/raid6main.c linux-2.6.9-55.0.9/drivers/md/raid6main.c ---- linux-2.6.9-55.0.9.orig/drivers/md/raid6main.c 2007-09-28 17:53:55.000000000 +0800 -+++ linux-2.6.9-55.0.9/drivers/md/raid6main.c 2007-12-13 20:19:11.000000000 +0800 -@@ -96,9 +96,10 @@ static inline void __release_stripe(raid - if (atomic_read(&conf->active_stripes)==0) - BUG(); - if (test_bit(STRIPE_HANDLE, &sh->state)) { -- if (test_bit(STRIPE_DELAYED, &sh->state)) -+ if (test_bit(STRIPE_DELAYED, &sh->state)) { - list_add_tail(&sh->lru, &conf->delayed_list); -- else -+ atomic_inc(&conf->delayed); -+ } else - list_add_tail(&sh->lru, &conf->handle_list); - md_wakeup_thread(conf->mddev->thread); - } else { -@@ -269,6 +270,7 @@ static struct stripe_head *get_active_st - if (noblock && sh == NULL) - break; - if (!sh) { -+ atomic_inc(&conf->out_of_stripes); - conf->inactive_blocked = 1; - wait_event_lock_irq(conf->wait_for_stripe, - !list_empty(&conf->inactive_list) && -@@ -290,6 +292,9 @@ static struct stripe_head *get_active_st - if (list_empty(&sh->lru)) - BUG(); - list_del_init(&sh->lru); -+ if (test_bit(STRIPE_DELAYED, &sh->state)) -+ atomic_dec(&conf->delayed); -+ - } - } - } while (sh == NULL); -@@ -368,6 +373,8 @@ static int raid6_end_read_request (struc - if (bi->bi_size) - return 1; - -+ atomic_dec(&conf->out_reqs_in_queue); -+ - for (i=0 ; i<disks; i++) - if (bi == &sh->dev[i].req) - break; -@@ -445,6 +452,8 @@ static int raid6_end_write_request (stru - if (bi == &sh->dev[i].req) - break; - -+ atomic_dec(&conf->out_reqs_in_queue); -+ - PRINTK("end_write_request %llu/%d, count %d, uptodate: %d.\n", - (unsigned long long)sh->sector, i, atomic_read(&sh->count), - uptodate); -@@ -989,6 +998,7 @@ static void handle_stripe(struct stripe_ - spin_lock(&sh->lock); - clear_bit(STRIPE_HANDLE, &sh->state); - clear_bit(STRIPE_DELAYED, &sh->state); -+ atomic_inc(&conf->handle_called); - - syncing = test_bit(STRIPE_SYNCING, &sh->state); - /* Now to look around and see what can be done */ -@@ -1257,6 +1267,7 @@ static void handle_stripe(struct stripe_ - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantread, &dev->flags); - locked++; -+ atomic_inc(&conf->reads_for_rcw); - } else { - PRINTK("Request delayed stripe %llu block %d for Reconstruct\n", - (unsigned long long)sh->sector, i); -@@ -1390,6 +1401,7 @@ static void handle_stripe(struct stripe_ - bi->bi_next = NULL; - bi->bi_size = 0; - bi->bi_end_io(bi, bytes, 0); -+ atomic_dec(&conf->in_reqs_in_queue); - } - for (i=disks; i-- ;) { - int rw; -@@ -1405,10 +1417,13 @@ static void handle_stripe(struct stripe_ - bi = &sh->dev[i].req; - - bi->bi_rw = rw; -- if (rw) -+ if (rw) { -+ atomic_inc(&conf->writes_out); - bi->bi_end_io = raid6_end_write_request; -- else -+ } else { -+ atomic_inc(&conf->reads_out); - bi->bi_end_io = raid6_end_read_request; -+ } - - spin_lock_irq(&conf->device_lock); - rdev = conf->disks[i].rdev; -@@ -1436,12 +1451,14 @@ static void handle_stripe(struct stripe_ - bi->bi_io_vec[0].bv_offset = 0; - bi->bi_size = STRIPE_SIZE; - bi->bi_next = NULL; -+ atomic_inc(&conf->out_reqs_in_queue); - generic_make_request(bi); - } else { - PRINTK("skip op %ld on disc %d for sector %llu\n", - bi->bi_rw, i, (unsigned long long)sh->sector); - clear_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(STRIPE_HANDLE, &sh->state); -+ atomic_dec(&conf->delayed); - } - } - } -@@ -1555,6 +1572,8 @@ static int make_request (request_queue_t - sector_t logical_sector, last_sector; - struct stripe_head *sh; - -+ atomic_inc(&conf->in_reqs_in_queue); -+ - if (unlikely(bio_barrier(bi))) { - bio_endio(bi, bi->bi_size, -EOPNOTSUPP); - return 0; -@@ -1563,9 +1582,11 @@ static int make_request (request_queue_t - if (bio_data_dir(bi)==WRITE) { - disk_stat_inc(mddev->gendisk, writes); - disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi)); -+ atomic_inc(&conf->writes_in); - } else { - disk_stat_inc(mddev->gendisk, reads); - disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bi)); -+ atomic_inc(&conf->reads_in); - } - - logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); -@@ -1605,6 +1626,7 @@ static int make_request (request_queue_t - - if ( bio_data_dir(bi) == WRITE ) - md_write_end(mddev); -+ atomic_dec(&conf->in_reqs_in_queue); - bi->bi_size = 0; - bi->bi_end_io(bi, bytes, 0); - } -@@ -1701,6 +1723,8 @@ static void raid6d (mddev_t *mddev) - spin_unlock_irq(&conf->device_lock); - - handled++; -+ -+ atomic_inc(&conf->handled_in_raid5d); - handle_stripe(sh); - release_stripe(sh); - -@@ -1940,6 +1964,23 @@ static void status (struct seq_file *seq - conf->disks[i].rdev && - conf->disks[i].rdev->in_sync ? "U" : "_"); - seq_printf (seq, "]"); -+ -+ seq_printf (seq, "\n\t\tin: %u reads, %u writes; out: %u reads, %u writes", -+ atomic_read(&conf->reads_in), atomic_read(&conf->writes_in), -+ atomic_read(&conf->reads_out), atomic_read(&conf->writes_out)); -+ seq_printf (seq, "\n\t\t%u in raid5d, %u out of stripes, %u handle called", -+ atomic_read(&conf->handled_in_raid5d), -+ atomic_read(&conf->out_of_stripes), -+ atomic_read(&conf->handle_called)); -+ seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw", -+ atomic_read(&conf->reads_for_rmw), -+ atomic_read(&conf->reads_for_rcw)); -+ seq_printf (seq, "\n\t\t%u delayed, %u active, queues: %u in, %u out\n", -+ atomic_read(&conf->delayed), -+ atomic_read(&conf->active_stripes), -+ atomic_read(&conf->in_reqs_in_queue), -+ atomic_read(&conf->out_reqs_in_queue)); -+ - #if RAID6_DUMPSTATE - seq_printf (seq, "\n"); - printall(seq, conf); diff --git a/lustre/kernel_patches/patches/raid6-stripe-by-stripe-handling.patch b/lustre/kernel_patches/patches/raid6-stripe-by-stripe-handling.patch deleted file mode 100644 index d29a6c3d47..0000000000 --- a/lustre/kernel_patches/patches/raid6-stripe-by-stripe-handling.patch +++ /dev/null @@ -1,100 +0,0 @@ -diff -pur linux-2.6.9.orig/drivers/md/raid6main.c linux-2.6.9/drivers/md/raid6main.c ---- linux-2.6.9.orig/drivers/md/raid6main.c 2008-01-10 13:47:18.000000000 +0800 -+++ linux-2.6.9/drivers/md/raid6main.c 2008-01-10 13:49:06.000000000 +0800 -@@ -1571,6 +1571,11 @@ static int make_request (request_queue_t - sector_t new_sector; - sector_t logical_sector, last_sector; - struct stripe_head *sh; -+ sector_t stripe, sectors, block, r_sector, b_sector; -+ int sectors_per_chunk; -+ int stripes_per_chunk, sectors_per_block; -+ int sectors_per_stripe; -+ int i, j; - - atomic_inc(&conf->in_reqs_in_queue); - -@@ -1596,30 +1601,69 @@ static int make_request (request_queue_t - bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ - if ( bio_data_dir(bi) == WRITE ) - md_write_start(mddev); -- for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { - -- new_sector = raid6_compute_sector(logical_sector, -- raid_disks, data_disks, &dd_idx, &pd_idx, conf); -- -- PRINTK("raid6: make_request, sector %Lu logical %Lu\n", -- (unsigned long long)new_sector, -- (unsigned long long)logical_sector); -+ sectors_per_chunk = conf->chunk_size >> 9; -+ stripes_per_chunk = conf->chunk_size / STRIPE_SIZE; -+ sectors_per_stripe = STRIPE_SECTORS * data_disks; -+ sectors_per_block = stripes_per_chunk * sectors_per_stripe; -+ -+ block = logical_sector & ~((sector_t)sectors_per_block - 1); -+ sector_div(block, sectors_per_block); -+ sectors = bi->bi_size >> 9; -+ -+ repeat: -+ stripe = block * (sectors_per_block / data_disks); -+ b_sector = stripe * data_disks; -+ /* iterate through all stripes in this block, -+ * where block is a set of internal stripes -+ * which covers chunk */ -+ for (i = 0; i < stripes_per_chunk && sectors > 0; i++) { -+ r_sector = b_sector + (i * STRIPE_SECTORS); -+ sh = NULL; -+ /* iterrate through all pages in the stripe */ -+ for (j = 0; j < data_disks && sectors > 0; j++) { -+ if (r_sector + STRIPE_SECTORS <= bi->bi_sector || -+ r_sector >= last_sector) { -+ r_sector += sectors_per_chunk; -+ continue; -+ } -+ new_sector = raid6_compute_sector(r_sector, raid_disks, -+ data_disks, &dd_idx, -+ &pd_idx, conf); -+ if (sh == NULL) -+ sh = get_active_stripe(conf, new_sector, pd_idx, -+ (bi->bi_rw&RWA_MASK)); -+ if (sh) { -+ add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); -+ } else { -+ /* cannot get stripe for read-ahead, just give-up */ -+ clear_bit(BIO_UPTODATE, &bi->bi_flags); -+ sectors = 0; -+ break; -+ } -+ -+ BUG_ON (new_sector != stripe); -+ sectors -= STRIPE_SECTORS; -+ if (bi->bi_sector > r_sector) -+ sectors += bi->bi_sector - r_sector; -+ if (r_sector + STRIPE_SECTORS > last_sector) -+ sectors += r_sector + STRIPE_SECTORS - last_sector; -+ r_sector += sectors_per_chunk; -+ } - -- sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK)); - if (sh) { -- -- add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); -- - raid6_plug_device(conf); - handle_stripe(sh); - release_stripe(sh); -- } else { -- /* cannot get stripe for read-ahead, just give-up */ -- clear_bit(BIO_UPTODATE, &bi->bi_flags); -- break; -+ sh = NULL; - } - -+ stripe += STRIPE_SECTORS; - } -+ block++; -+ if(sectors > 0) -+ goto repeat; -+ - spin_lock_irq(&conf->device_lock); - if (--bi->bi_phys_segments == 0) { - int bytes = bi->bi_size; diff --git a/lustre/kernel_patches/patches/raid6-zerocopy.patch b/lustre/kernel_patches/patches/raid6-zerocopy.patch deleted file mode 100644 index 95b713d465..0000000000 --- a/lustre/kernel_patches/patches/raid6-zerocopy.patch +++ /dev/null @@ -1,166 +0,0 @@ -diff -pur linux-2.6.9.orig/drivers/md/raid6main.c linux-2.6.9/drivers/md/raid6main.c ---- linux-2.6.9.orig/drivers/md/raid6main.c 2008-01-10 14:02:08.000000000 +0800 -+++ linux-2.6.9/drivers/md/raid6main.c 2008-01-10 14:01:56.000000000 +0800 -@@ -430,6 +430,7 @@ static int raid6_end_read_request (struc - clear_buffer_uptodate(bh); - } - #endif -+ BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags)); - clear_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(STRIPE_HANDLE, &sh->state); - release_stripe(sh); -@@ -468,6 +469,10 @@ static int raid6_end_write_request (stru - - rdev_dec_pending(conf->disks[i].rdev, conf->mddev); - -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) { -+ BUG_ON(sh->dev[i].req.bi_io_vec[0].bv_page == sh->dev[i].page); -+ sh->dev[i].req.bi_io_vec[0].bv_page = sh->dev[i].page; -+ } - clear_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(STRIPE_HANDLE, &sh->state); - __release_stripe(conf, sh); -@@ -664,7 +669,27 @@ static sector_t compute_blocknr(struct s - return r_sector; - } - -+static struct page *zero_copy_data(struct bio *bio, sector_t sector) -+{ -+ sector_t bi_sector = bio->bi_sector; -+ struct page *page = NULL; -+ struct bio_vec *bvl; -+ int i; - -+ bio_for_each_segment(bvl, bio, i) { -+ if (sector == bi_sector) -+ page = bio_iovec_idx(bio, i)->bv_page; -+ bi_sector += bio_iovec_idx(bio, i)->bv_len >> 9; -+ if (bi_sector >= sector + STRIPE_SECTORS) { -+ /* check if the stripe is covered by one page */ -+ if (page == bio_iovec_idx(bio, i)->bv_page && -+ PageConstant(page)) -+ return page; -+ return NULL; -+ } -+ } -+ return NULL; -+} - - /* - * Copy data between a page in the stripe cache, and one or more bion -@@ -731,6 +756,7 @@ static void compute_parity(struct stripe - raid6_conf_t *conf = sh->raid_conf; - int i, pd_idx = sh->pd_idx, qd_idx, d0_idx, disks = conf->raid_disks, count; - struct bio *chosen; -+ struct page *page; - /**** FIX THIS: This could be very bad if disks is close to 256 ****/ - void *ptrs[disks]; - -@@ -761,18 +787,46 @@ static void compute_parity(struct stripe - BUG(); /* Not implemented yet */ - } - -- for (i = disks; i--;) -- if (sh->dev[i].written) { -- sector_t sector = sh->dev[i].sector; -- struct bio *wbi = sh->dev[i].written; -- while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { -- copy_data(1, wbi, sh->dev[i].page, sector); -- wbi = r5_next_bio(wbi, sector); -+ for (i = disks; i--;) { -+ struct bio *wbi = sh->dev[i].written; -+ sector_t sector; -+ -+ if (!wbi) -+ continue; -+ -+ sector = sh->dev[i].sector; -+ set_bit(R5_LOCKED, &sh->dev[i].flags); -+ BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags)); -+ -+ /* check if it's covered by a single page -+ * and whole stripe is written at once. -+ * in this case we can avoid memcpy() */ -+ if (!wbi->bi_next && test_bit(R5_Insync, &sh->dev[i].flags) && -+ test_bit(R5_OVERWRITE, &sh->dev[i].flags)) { -+ page = zero_copy_data(wbi, sector); -+ /* we don't do zerocopy on a HighMem page. Raid6 tend -+ * to prepare all of the pages' content to be accessed -+ * before computing PQ parity. If we need to support HighMem -+ * page also, we have to modify the gen_syndrome() -+ * algorithm. -jay */ -+ if (page && !PageHighMem(page)) { -+ atomic_inc(&conf->writes_zcopy); -+ sh->dev[i].req.bi_io_vec[0].bv_page = page; -+ set_bit(R5_Direct, &sh->dev[i].flags); -+ clear_bit(R5_UPTODATE, &sh->dev[i].flags); -+ clear_bit(R5_OVERWRITE, &sh->dev[i].flags); -+ continue; - } -+ } - -- set_bit(R5_LOCKED, &sh->dev[i].flags); -- set_bit(R5_UPTODATE, &sh->dev[i].flags); -+ atomic_inc(&conf->writes_copied); -+ clear_bit(R5_OVERWRITE, &sh->dev[i].flags); -+ set_bit(R5_UPTODATE, &sh->dev[i].flags); -+ while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { -+ copy_data(1, wbi, sh->dev[i].page, sector); -+ wbi = r5_next_bio(wbi, sector); - } -+ } - - // switch(method) { - // case RECONSTRUCT_WRITE: -@@ -783,7 +837,10 @@ static void compute_parity(struct stripe - count = 0; - i = d0_idx; - do { -- ptrs[count++] = page_address(sh->dev[i].page); -+ if (test_bit(R5_Direct, &sh->dev[i].flags)) -+ ptrs[count++] = page_address(sh->dev[i].req.bi_io_vec[0].bv_page); -+ else -+ ptrs[count++] = page_address(sh->dev[i].page); - - i = raid6_next_disk(i, disks); - } while ( i != d0_idx ); -@@ -1185,7 +1242,8 @@ static void handle_stripe(struct stripe_ - if (sh->dev[i].written) { - dev = &sh->dev[i]; - if (!test_bit(R5_LOCKED, &dev->flags) && -- test_bit(R5_UPTODATE, &dev->flags) ) { -+ (test_bit(R5_UPTODATE, &dev->flags) || -+ test_bit(R5_Direct, &dev->flags)) ) { - /* We can return any write requests */ - struct bio *wbi, *wbi2; - PRINTK("Return write for stripe %llu disc %d\n", -@@ -1193,6 +1251,7 @@ static void handle_stripe(struct stripe_ - spin_lock_irq(&conf->device_lock); - wbi = dev->written; - dev->written = NULL; -+ clear_bit(R5_Direct, &dev->flags); - while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) { - wbi2 = r5_next_bio(wbi, dev->sector); - if (--wbi->bi_phys_segments == 0) { -@@ -2008,6 +2067,7 @@ static int run (mddev_t *mddev) - if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe) - mddev->queue->backing_dev_info.ra_pages = 2 * stripe; - } -+ mddev->queue->backing_dev_info.capabilities |= BDI_CAP_PAGE_CONST_WRITE; - - /* Ok, everything is just fine now */ - mddev->array_size = mddev->size * (mddev->raid_disks - 2); -@@ -2095,9 +2155,11 @@ static void status (struct seq_file *seq - atomic_read(&conf->handled_in_raid5d), - atomic_read(&conf->out_of_stripes), - atomic_read(&conf->handle_called)); -- seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw", -+ seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw. zcopy writes: %u, copied writes: %u", - atomic_read(&conf->reads_for_rmw), -- atomic_read(&conf->reads_for_rcw)); -+ atomic_read(&conf->reads_for_rcw), -+ atomic_read(&conf->writes_zcopy), -+ atomic_read(&conf->writes_copied)); - seq_printf (seq, "\n\t\t%u delayed, %u active, queues: %u in, %u out\n", - atomic_read(&conf->delayed), - atomic_read(&conf->active_stripes), diff --git a/lustre/kernel_patches/patches/remove-suid-2.6-suse.patch b/lustre/kernel_patches/patches/remove-suid-2.6-suse.patch deleted file mode 100644 index 4a4e10fd19..0000000000 --- a/lustre/kernel_patches/patches/remove-suid-2.6-suse.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- linux-2.6.5-7.141/mm/filemap.c.orig 2005-02-18 14:53:26.000000000 +0200 -+++ linux-2.6.5-7.141/mm/filemap.c 2005-02-18 22:37:28.727492096 +0200 -@@ -1816,6 +1816,19 @@ int remove_suid(struct dentry *dentry) - - if (unlikely(kill && !capable(CAP_FSETID))) { - struct iattr newattrs; -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ if (op && op->setattr_raw) { -+ newattrs.ia_mode = mode & ~S_ISUID; -+ if (kill & ATTR_KILL_SGID) -+ newattrs.ia_mode &= ~S_ISGID; -+ -+ newattrs.ia_valid = ATTR_FORCE | ATTR_MODE; -+ result = op->setattr_raw(dentry->d_inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (result != -EOPNOTSUPP) -+ return result; -+ } - - newattrs.ia_valid = ATTR_FORCE | kill; - result = notify_change(dentry, &newattrs); diff --git a/lustre/kernel_patches/patches/rollback-raid5ch-to-55.patch b/lustre/kernel_patches/patches/rollback-raid5ch-to-55.patch deleted file mode 100644 index 5c4eab5b8e..0000000000 --- a/lustre/kernel_patches/patches/rollback-raid5ch-to-55.patch +++ /dev/null @@ -1,329 +0,0 @@ ---- linux-2.6.9-67/drivers/md/raid5.c 2007-11-21 21:12:50.000000000 -0700 -+++ linux-2.6.9-55.0.12/drivers/md/raid5.c 2007-11-02 01:10:35.000000000 -0700 -@@ -49,7 +49,7 @@ - * This macro is used to determine the 'next' bio in the list, given the sector - * of the current stripe+device - */ --#define r5_next_bio(bio, sect) ( ( (bio)->bi_sector + ((bio)->bi_size>>9) < sect + STRIPE_SECTORS) ? (bio)->bi_next : NULL) -+#define r5_next_bio(bio, sect) ( ( bio->bi_sector + (bio->bi_size>>9) < sect + STRIPE_SECTORS) ? bio->bi_next : NULL) - /* - * The following can be used to debug the driver - */ -@@ -232,7 +232,6 @@ static struct stripe_head *__find_stripe - } - - static void unplug_slaves(mddev_t *mddev); --static void raid5_unplug_device(request_queue_t *q); - - static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector, - int pd_idx, int noblock) -@@ -727,10 +726,6 @@ static void compute_parity(struct stripe - ptr[count++] = page_address(sh->dev[i].page); - chosen = sh->dev[i].towrite; - sh->dev[i].towrite = NULL; -- -- if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -- wake_up(&conf->wait_for_overlap); -- - if (sh->dev[i].written) BUG(); - sh->dev[i].written = chosen; - check_xor(); -@@ -743,10 +738,6 @@ static void compute_parity(struct stripe - if (i!=pd_idx && sh->dev[i].towrite) { - chosen = sh->dev[i].towrite; - sh->dev[i].towrite = NULL; -- -- if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -- wake_up(&conf->wait_for_overlap); -- - if (sh->dev[i].written) BUG(); - sh->dev[i].written = chosen; - } -@@ -803,7 +794,7 @@ static void compute_parity(struct stripe - * toread/towrite point to the first in a chain. - * The bi_next chain must be in order. - */ --static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) -+static void add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) - { - struct bio **bip; - raid5_conf_t *conf = sh->raid_conf; -@@ -820,13 +811,10 @@ static int add_stripe_bio(struct stripe_ - else - bip = &sh->dev[dd_idx].toread; - while (*bip && (*bip)->bi_sector < bi->bi_sector) { -- if ((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector) -- goto overlap; -+ BUG_ON((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector); - bip = & (*bip)->bi_next; - } -- if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9)) -- goto overlap; -- -+/* FIXME do I need to worry about overlapping bion */ - if (*bip && bi->bi_next && (*bip) != bi->bi_next) - BUG(); - if (*bip) -@@ -841,7 +829,7 @@ static int add_stripe_bio(struct stripe_ - (unsigned long long)sh->sector, dd_idx); - - if (forwrite) { -- /* check if page is covered */ -+ /* check if page is coverred */ - sector_t sector = sh->dev[dd_idx].sector; - for (bi=sh->dev[dd_idx].towrite; - sector < sh->dev[dd_idx].sector + STRIPE_SECTORS && -@@ -853,13 +841,6 @@ static int add_stripe_bio(struct stripe_ - if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS) - set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags); - } -- return 1; -- -- overlap: -- set_bit(R5_Overlap, &sh->dev[dd_idx].flags); -- spin_unlock_irq(&conf->device_lock); -- spin_unlock(&sh->lock); -- return 0; - } - - -@@ -920,8 +901,6 @@ static void handle_stripe(struct stripe_ - spin_lock_irq(&conf->device_lock); - rbi = dev->toread; - dev->toread = NULL; -- if (test_and_clear_bit(R5_Overlap, &dev->flags)) -- wake_up(&conf->wait_for_overlap); - spin_unlock_irq(&conf->device_lock); - while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) { - copy_data(0, rbi, dev->page, dev->sector); -@@ -969,9 +948,6 @@ static void handle_stripe(struct stripe_ - sh->dev[i].towrite = NULL; - if (bi) to_write--; - -- if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -- wake_up(&conf->wait_for_overlap); -- - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); - clear_bit(BIO_UPTODATE, &bi->bi_flags); -@@ -1000,8 +976,6 @@ static void handle_stripe(struct stripe_ - if (!test_bit(R5_Insync, &sh->dev[i].flags)) { - bi = sh->dev[i].toread; - sh->dev[i].toread = NULL; -- if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -- wake_up(&conf->wait_for_overlap); - if (bi) to_read--; - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); -@@ -1441,7 +1415,6 @@ static int make_request (request_queue_t - if ( bio_data_dir(bi) == WRITE ) - md_write_start(mddev); - for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { -- DEFINE_WAIT(w); - - new_sector = raid5_compute_sector(logical_sector, - raid_disks, data_disks, &dd_idx, &pd_idx, conf); -@@ -1450,28 +1423,17 @@ static int make_request (request_queue_t - (unsigned long long)new_sector, - (unsigned long long)logical_sector); - -- retry: -- prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE); - sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK)); - if (sh) { -- if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { -- /* Add failed due to overlap. Flush everything -- * and wait a while -- */ -- raid5_unplug_device(mddev->queue); -- release_stripe(sh); -- schedule(); -- goto retry; -- } -- finish_wait(&conf->wait_for_overlap, &w); -+ -+ add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); -+ - raid5_plug_device(conf); - handle_stripe(sh); - release_stripe(sh); -- - } else { - /* cannot get stripe for read-ahead, just give-up */ - clear_bit(BIO_UPTODATE, &bi->bi_flags); -- finish_wait(&conf->wait_for_overlap, &w); - break; - } - -@@ -1619,7 +1581,6 @@ static int run (mddev_t *mddev) - - conf->device_lock = SPIN_LOCK_UNLOCKED; - init_waitqueue_head(&conf->wait_for_stripe); -- init_waitqueue_head(&conf->wait_for_overlap); - INIT_LIST_HEAD(&conf->handle_list); - INIT_LIST_HEAD(&conf->delayed_list); - INIT_LIST_HEAD(&conf->inactive_list); ---- linux-2.6.9-67/include/linux/raid/raid5.h 2007-11-21 21:12:41.000000000 -0700 -+++ linux-2.6.9-55.0.12/include/linux/raid/raid5.h 2004-10-18 15:54:55.000000000 -0600 -@@ -152,7 +152,6 @@ struct stripe_head { - #define R5_Wantread 4 /* want to schedule a read */ - #define R5_Wantwrite 5 - #define R5_Syncio 6 /* this io need to be accounted as resync io */ --#define R5_Overlap 7 /* There is a pending overlapping request on this block */ - - /* - * Write method -@@ -220,7 +219,6 @@ struct raid5_private_data { - atomic_t active_stripes; - struct list_head inactive_list; - wait_queue_head_t wait_for_stripe; -- wait_queue_head_t wait_for_overlap; - int inactive_blocked; /* release of inactive stripes blocked, - * waiting for 25% to be free - */ ---- linux-2.6.9-67/drivers/md/raid6main.c 2007-11-21 21:12:41.000000000 -0700 -+++ linux-2.6.9-55.0.12/drivers/md/raid6main.c 2007-11-02 01:10:20.000000000 -0700 -@@ -54,7 +54,7 @@ - * This macro is used to determine the 'next' bio in the list, given the sector - * of the current stripe+device - */ --#define r5_next_bio(bio, sect) ( ( (bio)->bi_sector + ((bio)->bi_size>>9) < sect + STRIPE_SECTORS) ? (bio)->bi_next : NULL) -+#define r5_next_bio(bio, sect) ( ( bio->bi_sector + (bio->bi_size>>9) < sect + STRIPE_SECTORS) ? bio->bi_next : NULL) - /* - * The following can be used to debug the driver - */ -@@ -740,10 +740,6 @@ static void compute_parity(struct stripe - if ( i != pd_idx && i != qd_idx && sh->dev[i].towrite ) { - chosen = sh->dev[i].towrite; - sh->dev[i].towrite = NULL; -- -- if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -- wake_up(&conf->wait_for_overlap); -- - if (sh->dev[i].written) BUG(); - sh->dev[i].written = chosen; - } -@@ -902,7 +898,7 @@ static void compute_block_2(struct strip - * toread/towrite point to the first in a chain. - * The bi_next chain must be in order. - */ --static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) -+static void add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) - { - struct bio **bip; - raid6_conf_t *conf = sh->raid_conf; -@@ -919,13 +915,10 @@ static int add_stripe_bio(struct stripe_ - else - bip = &sh->dev[dd_idx].toread; - while (*bip && (*bip)->bi_sector < bi->bi_sector) { -- if ((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector) -- goto overlap; -- bip = &(*bip)->bi_next; -+ BUG_ON((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector); -+ bip = & (*bip)->bi_next; - } -- if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9)) -- goto overlap; -- -+/* FIXME do I need to worry about overlapping bion */ - if (*bip && bi->bi_next && (*bip) != bi->bi_next) - BUG(); - if (*bip) -@@ -940,7 +933,7 @@ static int add_stripe_bio(struct stripe_ - (unsigned long long)sh->sector, dd_idx); - - if (forwrite) { -- /* check if page is covered */ -+ /* check if page is coverred */ - sector_t sector = sh->dev[dd_idx].sector; - for (bi=sh->dev[dd_idx].towrite; - sector < sh->dev[dd_idx].sector + STRIPE_SECTORS && -@@ -952,13 +945,6 @@ static int add_stripe_bio(struct stripe_ - if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS) - set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags); - } -- return 1; -- -- overlap: -- set_bit(R5_Overlap, &sh->dev[dd_idx].flags); -- spin_unlock_irq(&conf->device_lock); -- spin_unlock(&sh->lock); -- return 0; - } - - -@@ -1022,8 +1008,6 @@ static void handle_stripe(struct stripe_ - spin_lock_irq(&conf->device_lock); - rbi = dev->toread; - dev->toread = NULL; -- if (test_and_clear_bit(R5_Overlap, &dev->flags)) -- wake_up(&conf->wait_for_overlap); - spin_unlock_irq(&conf->device_lock); - while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) { - copy_data(0, rbi, dev->page, dev->sector); -@@ -1073,9 +1057,6 @@ static void handle_stripe(struct stripe_ - sh->dev[i].towrite = NULL; - if (bi) to_write--; - -- if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -- wake_up(&conf->wait_for_overlap); -- - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); - clear_bit(BIO_UPTODATE, &bi->bi_flags); -@@ -1104,8 +1085,6 @@ static void handle_stripe(struct stripe_ - if (!test_bit(R5_Insync, &sh->dev[i].flags)) { - bi = sh->dev[i].toread; - sh->dev[i].toread = NULL; -- if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) -- wake_up(&conf->wait_for_overlap); - if (bi) to_read--; - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); -@@ -1597,7 +1576,6 @@ static int make_request (request_queue_t - if ( bio_data_dir(bi) == WRITE ) - md_write_start(mddev); - for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { -- DEFINE_WAIT(w); - - new_sector = raid6_compute_sector(logical_sector, - raid_disks, data_disks, &dd_idx, &pd_idx, conf); -@@ -1606,27 +1584,17 @@ static int make_request (request_queue_t - (unsigned long long)new_sector, - (unsigned long long)logical_sector); - -- retry: -- prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE); - sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK)); - if (sh) { -- if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { -- /* Add failed due to overlap. Flush everything -- * and wait a while -- */ -- raid6_unplug_device(mddev->queue); -- release_stripe(sh); -- schedule(); -- goto retry; -- } -- finish_wait(&conf->wait_for_overlap, &w); -+ -+ add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK)); -+ - raid6_plug_device(conf); - handle_stripe(sh); - release_stripe(sh); - } else { - /* cannot get stripe for read-ahead, just give-up */ - clear_bit(BIO_UPTODATE, &bi->bi_flags); -- finish_wait(&conf->wait_for_overlap, &w); - break; - } - -@@ -1774,7 +1742,6 @@ static int run (mddev_t *mddev) - - conf->device_lock = SPIN_LOCK_UNLOCKED; - init_waitqueue_head(&conf->wait_for_stripe); -- init_waitqueue_head(&conf->wait_for_overlap); - INIT_LIST_HEAD(&conf->handle_list); - INIT_LIST_HEAD(&conf->delayed_list); - INIT_LIST_HEAD(&conf->inactive_list); diff --git a/lustre/kernel_patches/patches/sd_iostats-2.6-rhel4.patch b/lustre/kernel_patches/patches/sd_iostats-2.6-rhel4.patch deleted file mode 100644 index 33160d9915..0000000000 --- a/lustre/kernel_patches/patches/sd_iostats-2.6-rhel4.patch +++ /dev/null @@ -1,652 +0,0 @@ -Index: linux-2.6.9-5.0.3.EL/drivers/scsi/Kconfig -=================================================================== -Index: linux-2.6.9/drivers/scsi/Kconfig -=================================================================== ---- linux-2.6.9.orig/drivers/scsi/Kconfig 2007-07-23 14:19:13.000000000 +0400 -+++ linux-2.6.9/drivers/scsi/Kconfig 2007-07-26 14:16:36.000000000 +0400 -@@ -61,6 +61,14 @@ config SCSI_DUMP - help - SCSI dump support - -+config SD_IOSTATS -+ bool "Enable SCSI disk I/O stats" -+ depends on BLK_DEV_SD -+ default y -+ ---help--- -+ This enables SCSI disk I/O stats collection. You must also enable -+ /proc file system support if you want this feature. -+ - config CHR_DEV_ST - tristate "SCSI tape support" - depends on SCSI -Index: linux-2.6.9/drivers/scsi/scsi_proc.c -=================================================================== ---- linux-2.6.9.orig/drivers/scsi/scsi_proc.c 2007-03-13 02:47:28.000000000 +0300 -+++ linux-2.6.9/drivers/scsi/scsi_proc.c 2007-07-26 14:16:36.000000000 +0400 -@@ -38,7 +38,8 @@ - /* 4K page size, but our output routines, use some slack for overruns */ - #define PROC_BLOCK_SIZE (3*1024) - --static struct proc_dir_entry *proc_scsi; -+struct proc_dir_entry *proc_scsi; -+EXPORT_SYMBOL(proc_scsi); - - /* Protect sht->present and sht->proc_dir */ - static DECLARE_MUTEX(global_host_template_sem); -Index: linux-2.6.9/drivers/scsi/sd.c -=================================================================== ---- linux-2.6.9.orig/drivers/scsi/sd.c 2007-03-13 02:47:27.000000000 +0300 -+++ linux-2.6.9/drivers/scsi/sd.c 2007-07-28 14:55:56.000000000 +0400 -@@ -63,6 +63,67 @@ - - #include "scsi_logging.h" - -+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS)) -+# include <linux/proc_fs.h> -+# include <linux/seq_file.h> -+ -+typedef struct { -+ unsigned long long iostat_size; -+ unsigned long long iostat_count; -+} iostat_counter_t; -+ -+#define IOSTAT_NCOUNTERS 16 -+typedef struct { -+ iostat_counter_t iostat_read_histogram[IOSTAT_NCOUNTERS]; -+ iostat_counter_t iostat_write_histogram[IOSTAT_NCOUNTERS]; -+ struct timeval iostat_timeval; -+ -+ /* queue depth: how well the pipe is filled up */ -+ unsigned long long iostat_queue_ticks[IOSTAT_NCOUNTERS]; -+ unsigned long long iostat_queue_ticks_sum; -+ unsigned long iostat_queue_depth; -+ unsigned long iostat_queue_stamp; -+ -+ /* seeks: how linear the traffic is */ -+ unsigned long long iostat_next_sector; -+ unsigned long long iostat_seek_sectors; -+ unsigned long long iostat_seeks; -+ unsigned long long iostat_sectors; -+ unsigned long long iostat_reqs; -+ unsigned long iostat_read_reqs; -+ unsigned long iostat_write_reqs; -+ -+ /* process time: how long it takes to process requests */ -+ unsigned long iostat_rtime[IOSTAT_NCOUNTERS]; -+ unsigned long iostat_wtime[IOSTAT_NCOUNTERS]; -+ -+ /* queue time: how long process spent in elevator's queue */ -+ unsigned long iostat_rtime_in_queue[IOSTAT_NCOUNTERS]; -+ unsigned long iostat_wtime_in_queue[IOSTAT_NCOUNTERS]; -+ -+ char iostat_name[32]; -+ -+ /* must be the last field, as it's used to know size to be memset'ed */ -+ spinlock_t iostat_lock; -+} ____cacheline_aligned_in_smp iostat_stats_t; -+ -+iostat_stats_t **sd_iostats; -+struct proc_dir_entry *sd_iostats_procdir; -+char sd_iostats_procdir_name[] = "sd_iostats"; -+ -+extern void sd_iostats_init(void); -+extern void sd_iostats_init_disk(struct gendisk *); -+extern void sd_iostats_fini(void); -+void sd_iostats_start_req(struct scsi_cmnd *SCpnt); -+void sd_iostats_finish_req(struct scsi_cmnd *SCpnt); -+#else -+static inline void sd_iostats_init(void) {} -+static inline void sd_iostats_init_disk(struct gendisk *disk) {} -+static inline void sd_iostats_fini(void) {} -+static inline void sd_iostats_start_req(struct scsi_cmnd *SCpnt) {} -+static inline void sd_iostats_finish_req(struct scsi_cmnd *SCpnt) {} -+#endif -+ - /* - * More than enough for everybody ;) The huge number of majors - * is a leftover from 16bit dev_t days, we don't really need that -@@ -76,6 +137,7 @@ - */ - #define SD_MAX_DISKS (((26 * 26) + 26 + 1) * 26) - -+#define SD_STATS 256 - /* - * Time out in seconds for disks and Magneto-opticals (which are slower). - */ -@@ -278,6 +340,8 @@ static int sd_init_command(struct scsi_c - SCSI_LOG_HLQUEUE(2, printk("%s : block=%llu\n", - disk->disk_name, (unsigned long long)block)); - -+ sd_iostats_start_req(SCpnt); -+ - /* - * If we have a 1K hardware sectorsize, prevent access to single - * 512 byte sectors. In theory we could handle this - in fact -@@ -474,6 +538,7 @@ static int sd_open(struct inode *inode, - scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT); - } - -+ sd_iostats_init_disk(disk); - return 0; - - error_out: -@@ -849,6 +914,9 @@ static void sd_rw_intr(struct scsi_cmnd - break; - } - } -+ -+ sd_iostats_finish_req(SCpnt); -+ - /* - * This calls the generic completion function, now that we know - * how many actual sectors finished, and how many sectors we need -@@ -1575,6 +1643,481 @@ static void sd_shutdown(struct device *d - sd_sync_cache(sdp); - } - -+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS)) -+static int -+sd_iostats_seq_show(struct seq_file *seq, void *v) -+{ -+ struct timeval now; -+ struct gendisk *disk = seq->private; -+ iostat_stats_t *stats; -+ unsigned long long read_len; -+ unsigned long long read_len_tot; -+ unsigned long read_num; -+ unsigned long read_num_tot; -+ unsigned long long write_len; -+ unsigned long long write_len_tot; -+ unsigned long write_num; -+ unsigned long write_num_tot; -+ int i; -+ int maxi; -+ -+ if (sd_iostats == NULL) { -+ printk(KERN_ERR "sd_iostats_seq_show: NULL stats array\n"); -+ BUG(); -+ } -+ -+ stats = sd_iostats[scsi_disk(disk)->index]; -+ if (stats == NULL) { -+ printk(KERN_ERR "sd_iostats_seq_show: NULL stats entry\n"); -+ BUG(); -+ } -+ -+ do_gettimeofday(&now); -+ now.tv_sec -= stats->iostat_timeval.tv_sec; -+ now.tv_usec -= stats->iostat_timeval.tv_usec; -+ if (now.tv_usec < 0) { -+ now.tv_usec += 1000000; -+ now.tv_sec--; -+ } -+ -+ /* this sampling races with updates */ -+ seq_printf(seq, "index: %lu snapshot_time: %lu.%06lu\n", -+ (unsigned long) scsi_disk(disk)->index, -+ now.tv_sec, now.tv_usec); -+ -+ for (i = IOSTAT_NCOUNTERS - 1; i > 0; i--) -+ if (stats->iostat_read_histogram[i].iostat_count != 0 || -+ stats->iostat_write_histogram[i].iostat_count != 0) -+ break; -+ maxi = i; -+ -+ seq_printf(seq, "%8s %8s %12s %8s %12s\n", "size", -+ "reads", "total", "writes", "total"); -+ -+ read_len_tot = write_len_tot = 0; -+ read_num_tot = write_num_tot = 0; -+ for (i = 0; i <= maxi; i++) { -+ read_len = stats->iostat_read_histogram[i].iostat_size; -+ read_len_tot += read_len; -+ read_num = stats->iostat_read_histogram[i].iostat_count; -+ read_num_tot += read_num; -+ -+ write_len = stats->iostat_write_histogram[i].iostat_size; -+ write_len_tot += write_len; -+ write_num = stats->iostat_write_histogram[i].iostat_count; -+ write_num_tot += write_num; -+ -+ seq_printf (seq, "%8d %8lu %12llu %8lu %12llu\n", -+ 512<<i, read_num, read_len, write_num, write_len); -+ } -+ -+ seq_printf(seq, "%8s %8lu %12llu %8lu %12llu\n\n", "total", -+ read_num_tot, read_len_tot, -+ write_num_tot, write_len_tot); -+ -+ seq_printf(seq, "%8s %8s %8s\n", "qdepth", "ticks", "%"); -+ for (i = 0; i < IOSTAT_NCOUNTERS; i++) { -+ unsigned long long ticks, percent; -+ ticks = stats->iostat_queue_ticks[i]; -+ if (ticks == 0) -+ continue; -+ percent = stats->iostat_queue_ticks[i] * 100; -+ do_div(percent, stats->iostat_queue_ticks_sum); -+ seq_printf(seq, "%8d %8llu %8llu\n", i, ticks, percent); -+ } -+ -+ if (stats->iostat_reqs != 0) { -+ unsigned long long aveseek = 0, percent = 0; -+ -+ if (stats->iostat_seeks) { -+ aveseek = stats->iostat_seek_sectors; -+ do_div(aveseek, stats->iostat_seeks); -+ percent = stats->iostat_seeks * 100; -+ do_div(percent, stats->iostat_reqs); -+ } -+ -+ seq_printf(seq, "\n%llu sectors in %llu reqs: %llu seek(s) over " -+ "%llu sectors in ave, %llu%% of all reqs\n", -+ stats->iostat_sectors, stats->iostat_reqs, -+ stats->iostat_seeks, aveseek, percent); -+ } -+ -+ seq_printf(seq, "\n%16s %8s %8s %8s %8s\n", "process time", "reads", -+ "%%", "writes", "%%"); -+ for (i = 0; i < IOSTAT_NCOUNTERS; i++) { -+ unsigned long read_percent = 0, write_percent = 0; -+ if (stats->iostat_wtime[i] == 0 && -+ stats->iostat_rtime[i] == 0) -+ continue; -+ if (stats->iostat_read_reqs) -+ read_percent = stats->iostat_rtime[i] * 100 / -+ stats->iostat_read_reqs; -+ if (stats->iostat_write_reqs) -+ write_percent = stats->iostat_wtime[i] * 100 / -+ stats->iostat_write_reqs; -+ seq_printf(seq, "%16u %8lu %8lu %8lu %8lu\n", -+ jiffies_to_msecs(((1UL << i) >> 1) << 1), -+ stats->iostat_rtime[i], read_percent, -+ stats->iostat_wtime[i], write_percent); -+ } -+ -+ seq_printf(seq, "\n%16s %8s %8s %8s %8s\n", "time in queue", "reads", -+ "%%", "writes", "%%"); -+ for (i = 0; i < IOSTAT_NCOUNTERS; i++) { -+ unsigned long read_percent = 0, write_percent = 0; -+ if (stats->iostat_wtime_in_queue[i] == 0 && -+ stats->iostat_rtime_in_queue[i] == 0) -+ continue; -+ if (stats->iostat_read_reqs) -+ read_percent = stats->iostat_rtime_in_queue[i] * 100 / -+ stats->iostat_read_reqs; -+ if (stats->iostat_write_reqs) -+ write_percent = stats->iostat_wtime_in_queue[i] * 100 / -+ stats->iostat_write_reqs; -+ seq_printf(seq, "%16u %8lu %8lu %8lu %8lu\n", -+ jiffies_to_msecs(((1UL << i) >> 1) << 1), -+ stats->iostat_rtime_in_queue[i], -+ read_percent, -+ stats->iostat_wtime_in_queue[i], -+ write_percent); -+ } -+ -+ return 0; -+} -+ -+static void * -+sd_iostats_seq_start(struct seq_file *p, loff_t *pos) -+{ -+ return (*pos == 0) ? (void *)1 : NULL; -+} -+ -+static void * -+sd_iostats_seq_next(struct seq_file *p, void *v, loff_t *pos) -+{ -+ ++*pos; -+ return NULL; -+} -+ -+static void -+sd_iostats_seq_stop(struct seq_file *p, void *v) -+{ -+} -+ -+static struct seq_operations sd_iostats_seqops = { -+ .start = sd_iostats_seq_start, -+ .stop = sd_iostats_seq_stop, -+ .next = sd_iostats_seq_next, -+ .show = sd_iostats_seq_show, -+}; -+ -+static int -+sd_iostats_seq_open (struct inode *inode, struct file *file) -+{ -+ int rc; -+ -+ rc = seq_open(file, &sd_iostats_seqops); -+ if (rc != 0) -+ return rc; -+ -+ ((struct seq_file *)file->private_data)->private = PDE(inode)->data; -+ return 0; -+} -+ -+static ssize_t -+sd_iostats_seq_write(struct file *file, const char *buffer, -+ size_t len, loff_t *off) -+{ -+ struct seq_file *seq = file->private_data; -+ struct gendisk *disk = seq->private; -+ iostat_stats_t *stats = sd_iostats[scsi_disk(disk)->index]; -+ unsigned long flags; -+ unsigned long qdepth; -+ -+ -+ spin_lock_irqsave (&stats->iostat_lock, flags); -+ qdepth = stats->iostat_queue_depth; -+ memset (stats, 0, offsetof(iostat_stats_t, iostat_lock)); -+ do_gettimeofday(&stats->iostat_timeval); -+ stats->iostat_queue_stamp = jiffies; -+ stats->iostat_queue_depth = qdepth; -+ spin_unlock_irqrestore (&stats->iostat_lock, flags); -+ -+ return len; -+} -+ -+static struct file_operations sd_iostats_proc_fops = { -+ .owner = THIS_MODULE, -+ .open = sd_iostats_seq_open, -+ .read = seq_read, -+ .write = sd_iostats_seq_write, -+ .llseek = seq_lseek, -+ .release = seq_release, -+}; -+ -+extern struct proc_dir_entry *proc_scsi; -+ -+void -+sd_iostats_init(void) -+{ -+ int i; -+ -+ sd_iostats = kmalloc(SD_STATS * sizeof(iostat_stats_t *), GFP_KERNEL); -+ if (sd_iostats == NULL) { -+ printk(KERN_WARNING "Can't keep sd iostats: " -+ "ENOMEM allocating stats array size %d\n", -+ SD_STATS * sizeof(iostat_stats_t *)); -+ return; -+ } -+ -+ for (i = 0; i < SD_STATS; i++) -+ sd_iostats[i] = NULL; -+ -+ if (proc_scsi == NULL) { -+ printk(KERN_WARNING "No access to sd iostats: " -+ "proc_scsi is NULL\n"); -+ return; -+ } -+ -+ sd_iostats_procdir = create_proc_entry(sd_iostats_procdir_name, -+ S_IFDIR | S_IRUGO | S_IXUGO, -+ proc_scsi); -+ if (sd_iostats_procdir == NULL) { -+ printk(KERN_WARNING "No access to sd iostats: " -+ "can't create /proc/scsi/%s\n", sd_iostats_procdir_name); -+ return; -+ } -+} -+ -+void -+sd_iostats_init_disk(struct gendisk *disk) -+{ -+ struct proc_dir_entry *pde; -+ unsigned long flags; -+ iostat_stats_t *stats; -+ -+ if (sd_iostats == NULL || sd_iostats_procdir == NULL) -+ return; -+ -+ if (scsi_disk(disk)->index > SD_STATS) { -+ printk(KERN_ERR "sd_iostats_init_disk: " -+ "unexpected disk index %d(%d)\n", -+ scsi_disk(disk)->index, SD_STATS); -+ return; -+ } -+ -+ if (sd_iostats[scsi_disk(disk)->index] != NULL) -+ return; -+ -+ stats = kmalloc(sizeof(*stats), GFP_KERNEL); -+ if (stats == NULL) { -+ printk(KERN_WARNING "Can't keep %s iostats: " -+ "ENOMEM allocating stats size %d\n", -+ disk->disk_name, sizeof(*stats)); -+ return; -+ } -+ -+ memset (stats, 0, sizeof(*stats)); -+ do_gettimeofday(&stats->iostat_timeval); -+ stats->iostat_queue_stamp = jiffies; -+ spin_lock_init(&stats->iostat_lock); -+ -+ -+ spin_lock_irqsave(&stats->iostat_lock, flags); -+ -+ if (sd_iostats[scsi_disk(disk)->index] != NULL) { -+ spin_unlock_irqrestore(&stats->iostat_lock, flags); -+ kfree (stats); -+ return; -+ } -+ -+ sd_iostats[scsi_disk(disk)->index] = stats; -+ -+ spin_unlock_irqrestore(&stats->iostat_lock, flags); -+ -+ strncpy(stats->iostat_name, disk->disk_name, -+ sizeof(stats->iostat_name)-1); -+ -+ pde = create_proc_entry(stats->iostat_name, S_IRUGO | S_IWUSR, -+ sd_iostats_procdir); -+ if (pde == NULL) { -+ printk(KERN_WARNING "Can't create /proc/scsi/%s/%s\n", -+ sd_iostats_procdir_name, disk->disk_name); -+ } else { -+ pde->proc_fops = &sd_iostats_proc_fops; -+ pde->data = disk; -+ } -+} -+ -+void sd_iostats_fini(void) -+{ -+ int i; -+ -+ if (sd_iostats == NULL) -+ return; -+ -+ for (i = 0; i < SD_STATS; i++) { -+ if (sd_iostats[i] == NULL) -+ continue; -+ if (sd_iostats_procdir != NULL) -+ remove_proc_entry(sd_iostats[i]->iostat_name, -+ sd_iostats_procdir); -+ kfree(sd_iostats[i]); -+ } -+ -+ if (proc_scsi != NULL && sd_iostats_procdir != NULL) -+ remove_proc_entry(sd_iostats_procdir_name, proc_scsi); -+ -+ sd_iostats_procdir = NULL; -+ kfree(sd_iostats); -+ sd_iostats = NULL; -+} -+ -+void sd_iostats_finish_req(struct scsi_cmnd *SCpnt) -+{ -+ struct request *rq = SCpnt->request; -+ iostat_stats_t *stats; -+ unsigned long *tcounter; -+ int tbucket; -+ int tmp; -+ unsigned long irqflags; -+ int disk, i; -+ -+ disk = scsi_disk(rq->rq_disk)->index; -+ -+ if (sd_iostats == NULL) -+ return; -+ -+ if (disk < 0 || disk >= SD_STATS) { -+ printk(KERN_ERR "sd_iostats_bump: unexpected disk index " -+ "%d([0-%d])\n", disk, SD_STATS); -+ BUG(); -+ } -+ -+ stats = sd_iostats[disk]; -+ if (stats == NULL) -+ return; -+ -+ tmp = jiffies - rq->start_time; -+ for (tbucket = 0; tmp > 1; tbucket++) -+ tmp >>= 1; -+ if (tbucket >= IOSTAT_NCOUNTERS) -+ tbucket = IOSTAT_NCOUNTERS - 1; -+ //printk("%u ticks in D to %u\n", jiffies - rq->start_time, tbucket); -+ -+ tcounter = rq_data_dir(rq) == WRITE ? -+ &stats->iostat_wtime[tbucket] : &stats->iostat_rtime[tbucket]; -+ -+ spin_lock_irqsave(&stats->iostat_lock, irqflags); -+ -+ /* update delay stats */ -+ (*tcounter)++; -+ -+ /* update queue depth stats */ -+ i = stats->iostat_queue_depth; -+ if (i >= IOSTAT_NCOUNTERS) -+ i = IOSTAT_NCOUNTERS - 1; -+ stats->iostat_queue_ticks[i] += jiffies - stats->iostat_queue_stamp; -+ stats->iostat_queue_ticks_sum += jiffies - stats->iostat_queue_stamp; -+ stats->iostat_queue_depth--; -+ -+ /* update seek stats. XXX: not sure about nr_sectors */ -+ stats->iostat_sectors += rq->nr_sectors; -+ stats->iostat_reqs++; -+ if (rq->sector != stats->iostat_next_sector) { -+ stats->iostat_seek_sectors += -+ rq->sector > stats->iostat_next_sector ? -+ rq->sector - stats->iostat_next_sector : -+ stats->iostat_next_sector - rq->sector; -+ stats->iostat_seeks++; -+ } -+ stats->iostat_next_sector = rq->sector + rq->nr_sectors; -+ -+ stats->iostat_queue_stamp = jiffies; -+ -+ spin_unlock_irqrestore(&stats->iostat_lock, irqflags); -+} -+ -+void sd_iostats_start_req(struct scsi_cmnd *SCpnt) -+{ -+ struct request *rq = SCpnt->request; -+ iostat_stats_t *stats; -+ iostat_counter_t *counter; -+ int bucket; -+ int tbucket; -+ int tmp; -+ unsigned long irqflags; -+ int disk, i; -+ int nsect; -+ -+ disk = scsi_disk(rq->rq_disk)->index; -+ -+ if (sd_iostats == NULL) -+ return; -+ -+ if (disk < 0 || disk >= SD_STATS) { -+ printk(KERN_ERR "sd_iostats_bump: unexpected disk index %d([0-%d])\n", -+ disk, SD_STATS); -+ BUG(); -+ } -+ -+ stats = sd_iostats[disk]; -+ if (stats == NULL) -+ return; -+ -+ nsect = SCpnt->request_bufflen >> 9; -+ for (bucket = 0, tmp = nsect; tmp > 1; bucket++) -+ tmp >>= 1; -+ -+ if (bucket >= IOSTAT_NCOUNTERS) { -+ printk (KERN_ERR "sd_iostats_bump: nsect %d too big\n", nsect); -+ BUG(); -+ } -+ -+ counter = rq_data_dir(rq) == WRITE ? -+ &stats->iostat_write_histogram[bucket] : -+ &stats->iostat_read_histogram[bucket]; -+ -+ tmp = jiffies - rq->start_time; -+ for (tbucket = 0; tmp > 1; tbucket++) -+ tmp >>= 1; -+ if (tbucket >= IOSTAT_NCOUNTERS) -+ tbucket = IOSTAT_NCOUNTERS - 1; -+ //printk("%u ticks in Q to %u\n", jiffies - rq->start_time, tbucket); -+ -+ /* an ugly hack to know exact processing time. the right -+ * solution is to add one more field to struct request -+ * hopefully it will break nothing ... */ -+ rq->start_time = jiffies; -+ -+ spin_lock_irqsave(&stats->iostat_lock, irqflags); -+ -+ /* update queue depth stats */ -+ i = stats->iostat_queue_depth; -+ if (i >= IOSTAT_NCOUNTERS) -+ i = IOSTAT_NCOUNTERS - 1; -+ stats->iostat_queue_ticks[i] += jiffies - stats->iostat_queue_stamp; -+ stats->iostat_queue_ticks_sum += jiffies - stats->iostat_queue_stamp; -+ stats->iostat_queue_depth++; -+ -+ /* update delay stats */ -+ if (rq_data_dir(rq) == WRITE) { -+ stats->iostat_wtime_in_queue[tbucket]++; -+ stats->iostat_write_reqs++; -+ } else { -+ stats->iostat_rtime_in_queue[tbucket]++; -+ stats->iostat_read_reqs++; -+ } -+ -+ /* update size stats */ -+ counter->iostat_size += nsect; -+ counter->iostat_count++; -+ -+ stats->iostat_queue_stamp = jiffies; -+ -+ spin_unlock_irqrestore(&stats->iostat_lock, irqflags); -+} -+#endif -+ - /** - * init_sd - entry point for this driver (both when built in or when - * a module). -@@ -1584,6 +2127,7 @@ static void sd_shutdown(struct device *d - static int __init init_sd(void) - { - int majors = 0, i; -+ int rc = 0; - - SCSI_LOG_HLQUEUE(3, printk("init_sd: sd driver entry point\n")); - -@@ -1594,7 +2138,10 @@ static int __init init_sd(void) - if (!majors) - return -ENODEV; - -- return scsi_register_driver(&sd_template.gendrv); -+ rc = scsi_register_driver(&sd_template.gendrv); -+ if (rc == 0) -+ sd_iostats_init(); -+ return rc; - } - - /** -@@ -1608,6 +2155,7 @@ static void __exit exit_sd(void) - - SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n")); - -+ sd_iostats_fini(); - scsi_unregister_driver(&sd_template.gendrv); - for (i = 0; i < SD_MAJORS; i++) - unregister_blkdev(sd_major(i), "sd"); diff --git a/lustre/kernel_patches/patches/sd_iostats-2.6-rhel5.patch b/lustre/kernel_patches/patches/sd_iostats-2.6-rhel5.patch deleted file mode 100644 index e38e22af27..0000000000 --- a/lustre/kernel_patches/patches/sd_iostats-2.6-rhel5.patch +++ /dev/null @@ -1,650 +0,0 @@ -Index: linux-2.6.9-5.0.3.EL/drivers/scsi/Kconfig -=================================================================== -Index: linux-2.6.9/drivers/scsi/Kconfig -=================================================================== ---- linux-2.6.9.orig/drivers/scsi/Kconfig 2007-07-23 14:19:13.000000000 +0400 -+++ linux-2.6.9/drivers/scsi/Kconfig 2007-07-26 14:16:36.000000000 +0400 -@@ -61,6 +61,14 @@ config SCSI_DUMP - help - SCSI dump support - -+config SD_IOSTATS -+ bool "Enable SCSI disk I/O stats" -+ depends on BLK_DEV_SD -+ default y -+ ---help--- -+ This enables SCSI disk I/O stats collection. You must also enable -+ /proc file system support if you want this feature. -+ - config CHR_DEV_ST - tristate "SCSI tape support" - depends on SCSI -Index: linux-2.6.9/drivers/scsi/scsi_proc.c -=================================================================== ---- linux-2.6.9.orig/drivers/scsi/scsi_proc.c 2007-03-13 02:47:28.000000000 +0300 -+++ linux-2.6.9/drivers/scsi/scsi_proc.c 2007-07-26 14:16:36.000000000 +0400 -@@ -38,7 +38,8 @@ - /* 4K page size, but our output routines, use some slack for overruns */ - #define PROC_BLOCK_SIZE (3*1024) - --static struct proc_dir_entry *proc_scsi; -+struct proc_dir_entry *proc_scsi; -+EXPORT_SYMBOL(proc_scsi); - - /* Protect sht->present and sht->proc_dir */ - static DECLARE_MUTEX(global_host_template_sem); -Index: linux-2.6.9/drivers/scsi/sd.c -=================================================================== ---- linux-2.6.9.orig/drivers/scsi/sd.c 2007-03-13 02:47:27.000000000 +0300 -+++ linux-2.6.9/drivers/scsi/sd.c 2007-07-28 14:55:56.000000000 +0400 -@@ -63,6 +63,67 @@ - - #include "scsi_logging.h" - -+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS)) -+# include <linux/proc_fs.h> -+# include <linux/seq_file.h> -+ -+typedef struct { -+ unsigned long long iostat_size; -+ unsigned long long iostat_count; -+} iostat_counter_t; -+ -+#define IOSTAT_NCOUNTERS 16 -+typedef struct { -+ iostat_counter_t iostat_read_histogram[IOSTAT_NCOUNTERS]; -+ iostat_counter_t iostat_write_histogram[IOSTAT_NCOUNTERS]; -+ struct timeval iostat_timeval; -+ -+ /* queue depth: how well the pipe is filled up */ -+ unsigned long long iostat_queue_ticks[IOSTAT_NCOUNTERS]; -+ unsigned long long iostat_queue_ticks_sum; -+ unsigned long iostat_queue_depth; -+ unsigned long iostat_queue_stamp; -+ -+ /* seeks: how linear the traffic is */ -+ unsigned long long iostat_next_sector; -+ unsigned long long iostat_seek_sectors; -+ unsigned long long iostat_seeks; -+ unsigned long long iostat_sectors; -+ unsigned long long iostat_reqs; -+ unsigned long iostat_read_reqs; -+ unsigned long iostat_write_reqs; -+ -+ /* process time: how long it takes to process requests */ -+ unsigned long iostat_rtime[IOSTAT_NCOUNTERS]; -+ unsigned long iostat_wtime[IOSTAT_NCOUNTERS]; -+ -+ /* queue time: how long process spent in elevator's queue */ -+ unsigned long iostat_rtime_in_queue[IOSTAT_NCOUNTERS]; -+ unsigned long iostat_wtime_in_queue[IOSTAT_NCOUNTERS]; -+ -+ char iostat_name[32]; -+ -+ /* must be the last field, as it's used to know size to be memset'ed */ -+ spinlock_t iostat_lock; -+} ____cacheline_aligned_in_smp iostat_stats_t; -+ -+iostat_stats_t **sd_iostats; -+struct proc_dir_entry *sd_iostats_procdir; -+char sd_iostats_procdir_name[] = "sd_iostats"; -+ -+extern void sd_iostats_init(void); -+extern void sd_iostats_init_disk(struct gendisk *); -+extern void sd_iostats_fini(void); -+void sd_iostats_start_req(struct scsi_cmnd *SCpnt); -+void sd_iostats_finish_req(struct scsi_cmnd *SCpnt); -+#else -+static inline void sd_iostats_init(void) {} -+static inline void sd_iostats_init_disk(struct gendisk *disk) {} -+static inline void sd_iostats_fini(void) {} -+static inline void sd_iostats_start_req(struct scsi_cmnd *SCpnt) {} -+static inline void sd_iostats_finish_req(struct scsi_cmnd *SCpnt) {} -+#endif -+ - /* - * More than enough for everybody ;) The huge number of majors - * is a leftover from 16bit dev_t days, we don't really need that -@@ -76,6 +137,7 @@ - */ - #define SD_MAX_DISKS (((26 * 26) + 26 + 1) * 26) - -+#define SD_STATS 256 - /* - * Time out in seconds for disks and Magneto-opticals (which are slower). - */ -@@ -278,6 +340,8 @@ static int sd_init_command(struct scsi_c - SCSI_LOG_HLQUEUE(2, printk("%s : block=%llu\n", - disk->disk_name, (unsigned long long)block)); - -+ sd_iostats_start_req(SCpnt); -+ - /* - * If we have a 1K hardware sectorsize, prevent access to single - * 512 byte sectors. In theory we could handle this - in fact -@@ -474,6 +538,7 @@ static int sd_open(struct inode *inode, - scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT); - } - -+ sd_iostats_init_disk(disk); - return 0; - - error_out: -@@ -849,6 +914,7 @@ static void sd_rw_intr(struct scsi_cmnd - break; - } - out: -+ sd_iostats_finish_req(SCpnt); - scsi_io_completion(SCpnt, good_bytes); - } - -@@ -1575,6 +1643,481 @@ static void sd_shutdown(struct device *d - sd_sync_cache(sdp); - } - -+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS)) -+static int -+sd_iostats_seq_show(struct seq_file *seq, void *v) -+{ -+ struct timeval now; -+ struct gendisk *disk = seq->private; -+ iostat_stats_t *stats; -+ unsigned long long read_len; -+ unsigned long long read_len_tot; -+ unsigned long read_num; -+ unsigned long read_num_tot; -+ unsigned long long write_len; -+ unsigned long long write_len_tot; -+ unsigned long write_num; -+ unsigned long write_num_tot; -+ int i; -+ int maxi; -+ -+ if (sd_iostats == NULL) { -+ printk(KERN_ERR "sd_iostats_seq_show: NULL stats array\n"); -+ BUG(); -+ } -+ -+ stats = sd_iostats[scsi_disk(disk)->index]; -+ if (stats == NULL) { -+ printk(KERN_ERR "sd_iostats_seq_show: NULL stats entry\n"); -+ BUG(); -+ } -+ -+ do_gettimeofday(&now); -+ now.tv_sec -= stats->iostat_timeval.tv_sec; -+ now.tv_usec -= stats->iostat_timeval.tv_usec; -+ if (now.tv_usec < 0) { -+ now.tv_usec += 1000000; -+ now.tv_sec--; -+ } -+ -+ /* this sampling races with updates */ -+ seq_printf(seq, "index: %lu snapshot_time: %lu.%06lu\n", -+ (unsigned long) scsi_disk(disk)->index, -+ now.tv_sec, now.tv_usec); -+ -+ for (i = IOSTAT_NCOUNTERS - 1; i > 0; i--) -+ if (stats->iostat_read_histogram[i].iostat_count != 0 || -+ stats->iostat_write_histogram[i].iostat_count != 0) -+ break; -+ maxi = i; -+ -+ seq_printf(seq, "%8s %8s %12s %8s %12s\n", "size", -+ "reads", "total", "writes", "total"); -+ -+ read_len_tot = write_len_tot = 0; -+ read_num_tot = write_num_tot = 0; -+ for (i = 0; i <= maxi; i++) { -+ read_len = stats->iostat_read_histogram[i].iostat_size; -+ read_len_tot += read_len; -+ read_num = stats->iostat_read_histogram[i].iostat_count; -+ read_num_tot += read_num; -+ -+ write_len = stats->iostat_write_histogram[i].iostat_size; -+ write_len_tot += write_len; -+ write_num = stats->iostat_write_histogram[i].iostat_count; -+ write_num_tot += write_num; -+ -+ seq_printf (seq, "%8d %8lu %12llu %8lu %12llu\n", -+ 512<<i, read_num, read_len, write_num, write_len); -+ } -+ -+ seq_printf(seq, "%8s %8lu %12llu %8lu %12llu\n\n", "total", -+ read_num_tot, read_len_tot, -+ write_num_tot, write_len_tot); -+ -+ seq_printf(seq, "%8s %8s %8s\n", "qdepth", "ticks", "%"); -+ for (i = 0; i < IOSTAT_NCOUNTERS; i++) { -+ unsigned long long ticks, percent; -+ ticks = stats->iostat_queue_ticks[i]; -+ if (ticks == 0) -+ continue; -+ percent = stats->iostat_queue_ticks[i] * 100; -+ do_div(percent, stats->iostat_queue_ticks_sum); -+ seq_printf(seq, "%8d %8llu %8llu\n", i, ticks, percent); -+ } -+ -+ if (stats->iostat_reqs != 0) { -+ unsigned long long aveseek = 0, percent = 0; -+ -+ if (stats->iostat_seeks) { -+ aveseek = stats->iostat_seek_sectors; -+ do_div(aveseek, stats->iostat_seeks); -+ percent = stats->iostat_seeks * 100; -+ do_div(percent, stats->iostat_reqs); -+ } -+ -+ seq_printf(seq, "\n%llu sectors in %llu reqs: %llu seek(s) over " -+ "%llu sectors in ave, %llu%% of all reqs\n", -+ stats->iostat_sectors, stats->iostat_reqs, -+ stats->iostat_seeks, aveseek, percent); -+ } -+ -+ seq_printf(seq, "\n%16s %8s %8s %8s %8s\n", "process time", "reads", -+ "%%", "writes", "%%"); -+ for (i = 0; i < IOSTAT_NCOUNTERS; i++) { -+ unsigned long read_percent = 0, write_percent = 0; -+ if (stats->iostat_wtime[i] == 0 && -+ stats->iostat_rtime[i] == 0) -+ continue; -+ if (stats->iostat_read_reqs) -+ read_percent = stats->iostat_rtime[i] * 100 / -+ stats->iostat_read_reqs; -+ if (stats->iostat_write_reqs) -+ write_percent = stats->iostat_wtime[i] * 100 / -+ stats->iostat_write_reqs; -+ seq_printf(seq, "%16u %8lu %8lu %8lu %8lu\n", -+ jiffies_to_msecs(((1UL << i) >> 1) << 1), -+ stats->iostat_rtime[i], read_percent, -+ stats->iostat_wtime[i], write_percent); -+ } -+ -+ seq_printf(seq, "\n%16s %8s %8s %8s %8s\n", "time in queue", "reads", -+ "%%", "writes", "%%"); -+ for (i = 0; i < IOSTAT_NCOUNTERS; i++) { -+ unsigned long read_percent = 0, write_percent = 0; -+ if (stats->iostat_wtime_in_queue[i] == 0 && -+ stats->iostat_rtime_in_queue[i] == 0) -+ continue; -+ if (stats->iostat_read_reqs) -+ read_percent = stats->iostat_rtime_in_queue[i] * 100 / -+ stats->iostat_read_reqs; -+ if (stats->iostat_write_reqs) -+ write_percent = stats->iostat_wtime_in_queue[i] * 100 / -+ stats->iostat_write_reqs; -+ seq_printf(seq, "%16u %8lu %8lu %8lu %8lu\n", -+ jiffies_to_msecs(((1UL << i) >> 1) << 1), -+ stats->iostat_rtime_in_queue[i], -+ read_percent, -+ stats->iostat_wtime_in_queue[i], -+ write_percent); -+ } -+ -+ return 0; -+} -+ -+static void * -+sd_iostats_seq_start(struct seq_file *p, loff_t *pos) -+{ -+ return (*pos == 0) ? (void *)1 : NULL; -+} -+ -+static void * -+sd_iostats_seq_next(struct seq_file *p, void *v, loff_t *pos) -+{ -+ ++*pos; -+ return NULL; -+} -+ -+static void -+sd_iostats_seq_stop(struct seq_file *p, void *v) -+{ -+} -+ -+static struct seq_operations sd_iostats_seqops = { -+ .start = sd_iostats_seq_start, -+ .stop = sd_iostats_seq_stop, -+ .next = sd_iostats_seq_next, -+ .show = sd_iostats_seq_show, -+}; -+ -+static int -+sd_iostats_seq_open (struct inode *inode, struct file *file) -+{ -+ int rc; -+ -+ rc = seq_open(file, &sd_iostats_seqops); -+ if (rc != 0) -+ return rc; -+ -+ ((struct seq_file *)file->private_data)->private = PDE(inode)->data; -+ return 0; -+} -+ -+static ssize_t -+sd_iostats_seq_write(struct file *file, const char *buffer, -+ size_t len, loff_t *off) -+{ -+ struct seq_file *seq = file->private_data; -+ struct gendisk *disk = seq->private; -+ iostat_stats_t *stats = sd_iostats[scsi_disk(disk)->index]; -+ unsigned long flags; -+ unsigned long qdepth; -+ -+ -+ spin_lock_irqsave (&stats->iostat_lock, flags); -+ qdepth = stats->iostat_queue_depth; -+ memset (stats, 0, offsetof(iostat_stats_t, iostat_lock)); -+ do_gettimeofday(&stats->iostat_timeval); -+ stats->iostat_queue_stamp = jiffies; -+ stats->iostat_queue_depth = qdepth; -+ spin_unlock_irqrestore (&stats->iostat_lock, flags); -+ -+ return len; -+} -+ -+static struct file_operations sd_iostats_proc_fops = { -+ .owner = THIS_MODULE, -+ .open = sd_iostats_seq_open, -+ .read = seq_read, -+ .write = sd_iostats_seq_write, -+ .llseek = seq_lseek, -+ .release = seq_release, -+}; -+ -+extern struct proc_dir_entry *proc_scsi; -+ -+void -+sd_iostats_init(void) -+{ -+ int i; -+ -+ sd_iostats = kmalloc(SD_STATS * sizeof(iostat_stats_t *), GFP_KERNEL); -+ if (sd_iostats == NULL) { -+ printk(KERN_WARNING "Can't keep sd iostats: " -+ "ENOMEM allocating stats array size %d\n", -+ SD_STATS * sizeof(iostat_stats_t *)); -+ return; -+ } -+ -+ for (i = 0; i < SD_STATS; i++) -+ sd_iostats[i] = NULL; -+ -+ if (proc_scsi == NULL) { -+ printk(KERN_WARNING "No access to sd iostats: " -+ "proc_scsi is NULL\n"); -+ return; -+ } -+ -+ sd_iostats_procdir = create_proc_entry(sd_iostats_procdir_name, -+ S_IFDIR | S_IRUGO | S_IXUGO, -+ proc_scsi); -+ if (sd_iostats_procdir == NULL) { -+ printk(KERN_WARNING "No access to sd iostats: " -+ "can't create /proc/scsi/%s\n", sd_iostats_procdir_name); -+ return; -+ } -+} -+ -+void -+sd_iostats_init_disk(struct gendisk *disk) -+{ -+ struct proc_dir_entry *pde; -+ unsigned long flags; -+ iostat_stats_t *stats; -+ -+ if (sd_iostats == NULL || sd_iostats_procdir == NULL) -+ return; -+ -+ if (scsi_disk(disk)->index > SD_STATS) { -+ printk(KERN_ERR "sd_iostats_init_disk: " -+ "unexpected disk index %d(%d)\n", -+ scsi_disk(disk)->index, SD_STATS); -+ return; -+ } -+ -+ if (sd_iostats[scsi_disk(disk)->index] != NULL) -+ return; -+ -+ stats = kmalloc(sizeof(*stats), GFP_KERNEL); -+ if (stats == NULL) { -+ printk(KERN_WARNING "Can't keep %s iostats: " -+ "ENOMEM allocating stats size %d\n", -+ disk->disk_name, sizeof(*stats)); -+ return; -+ } -+ -+ memset (stats, 0, sizeof(*stats)); -+ do_gettimeofday(&stats->iostat_timeval); -+ stats->iostat_queue_stamp = jiffies; -+ spin_lock_init(&stats->iostat_lock); -+ -+ -+ spin_lock_irqsave(&stats->iostat_lock, flags); -+ -+ if (sd_iostats[scsi_disk(disk)->index] != NULL) { -+ spin_unlock_irqrestore(&stats->iostat_lock, flags); -+ kfree (stats); -+ return; -+ } -+ -+ sd_iostats[scsi_disk(disk)->index] = stats; -+ -+ spin_unlock_irqrestore(&stats->iostat_lock, flags); -+ -+ strncpy(stats->iostat_name, disk->disk_name, -+ sizeof(stats->iostat_name)-1); -+ -+ pde = create_proc_entry(stats->iostat_name, S_IRUGO | S_IWUSR, -+ sd_iostats_procdir); -+ if (pde == NULL) { -+ printk(KERN_WARNING "Can't create /proc/scsi/%s/%s\n", -+ sd_iostats_procdir_name, disk->disk_name); -+ } else { -+ pde->proc_fops = &sd_iostats_proc_fops; -+ pde->data = disk; -+ } -+} -+ -+void sd_iostats_fini(void) -+{ -+ int i; -+ -+ if (sd_iostats == NULL) -+ return; -+ -+ for (i = 0; i < SD_STATS; i++) { -+ if (sd_iostats[i] == NULL) -+ continue; -+ if (sd_iostats_procdir != NULL) -+ remove_proc_entry(sd_iostats[i]->iostat_name, -+ sd_iostats_procdir); -+ kfree(sd_iostats[i]); -+ } -+ -+ if (proc_scsi != NULL && sd_iostats_procdir != NULL) -+ remove_proc_entry(sd_iostats_procdir_name, proc_scsi); -+ -+ sd_iostats_procdir = NULL; -+ kfree(sd_iostats); -+ sd_iostats = NULL; -+} -+ -+void sd_iostats_finish_req(struct scsi_cmnd *SCpnt) -+{ -+ struct request *rq = SCpnt->request; -+ iostat_stats_t *stats; -+ unsigned long *tcounter; -+ int tbucket; -+ int tmp; -+ unsigned long irqflags; -+ int disk, i; -+ -+ disk = scsi_disk(rq->rq_disk)->index; -+ -+ if (sd_iostats == NULL) -+ return; -+ -+ if (disk < 0 || disk >= SD_STATS) { -+ printk(KERN_ERR "sd_iostats_bump: unexpected disk index " -+ "%d([0-%d])\n", disk, SD_STATS); -+ BUG(); -+ } -+ -+ stats = sd_iostats[disk]; -+ if (stats == NULL) -+ return; -+ -+ tmp = jiffies - rq->start_time; -+ for (tbucket = 0; tmp > 1; tbucket++) -+ tmp >>= 1; -+ if (tbucket >= IOSTAT_NCOUNTERS) -+ tbucket = IOSTAT_NCOUNTERS - 1; -+ //printk("%u ticks in D to %u\n", jiffies - rq->start_time, tbucket); -+ -+ tcounter = rq_data_dir(rq) == WRITE ? -+ &stats->iostat_wtime[tbucket] : &stats->iostat_rtime[tbucket]; -+ -+ spin_lock_irqsave(&stats->iostat_lock, irqflags); -+ -+ /* update delay stats */ -+ (*tcounter)++; -+ -+ /* update queue depth stats */ -+ i = stats->iostat_queue_depth; -+ if (i >= IOSTAT_NCOUNTERS) -+ i = IOSTAT_NCOUNTERS - 1; -+ stats->iostat_queue_ticks[i] += jiffies - stats->iostat_queue_stamp; -+ stats->iostat_queue_ticks_sum += jiffies - stats->iostat_queue_stamp; -+ stats->iostat_queue_depth--; -+ -+ /* update seek stats. XXX: not sure about nr_sectors */ -+ stats->iostat_sectors += rq->nr_sectors; -+ stats->iostat_reqs++; -+ if (rq->sector != stats->iostat_next_sector) { -+ stats->iostat_seek_sectors += -+ rq->sector > stats->iostat_next_sector ? -+ rq->sector - stats->iostat_next_sector : -+ stats->iostat_next_sector - rq->sector; -+ stats->iostat_seeks++; -+ } -+ stats->iostat_next_sector = rq->sector + rq->nr_sectors; -+ -+ stats->iostat_queue_stamp = jiffies; -+ -+ spin_unlock_irqrestore(&stats->iostat_lock, irqflags); -+} -+ -+void sd_iostats_start_req(struct scsi_cmnd *SCpnt) -+{ -+ struct request *rq = SCpnt->request; -+ iostat_stats_t *stats; -+ iostat_counter_t *counter; -+ int bucket; -+ int tbucket; -+ int tmp; -+ unsigned long irqflags; -+ int disk, i; -+ int nsect; -+ -+ disk = scsi_disk(rq->rq_disk)->index; -+ -+ if (sd_iostats == NULL) -+ return; -+ -+ if (disk < 0 || disk >= SD_STATS) { -+ printk(KERN_ERR "sd_iostats_bump: unexpected disk index %d([0-%d])\n", -+ disk, SD_STATS); -+ BUG(); -+ } -+ -+ stats = sd_iostats[disk]; -+ if (stats == NULL) -+ return; -+ -+ nsect = SCpnt->request_bufflen >> 9; -+ for (bucket = 0, tmp = nsect; tmp > 1; bucket++) -+ tmp >>= 1; -+ -+ if (bucket >= IOSTAT_NCOUNTERS) { -+ printk (KERN_ERR "sd_iostats_bump: nsect %d too big\n", nsect); -+ BUG(); -+ } -+ -+ counter = rq_data_dir(rq) == WRITE ? -+ &stats->iostat_write_histogram[bucket] : -+ &stats->iostat_read_histogram[bucket]; -+ -+ tmp = jiffies - rq->start_time; -+ for (tbucket = 0; tmp > 1; tbucket++) -+ tmp >>= 1; -+ if (tbucket >= IOSTAT_NCOUNTERS) -+ tbucket = IOSTAT_NCOUNTERS - 1; -+ //printk("%u ticks in Q to %u\n", jiffies - rq->start_time, tbucket); -+ -+ /* an ugly hack to know exact processing time. the right -+ * solution is to add one more field to struct request -+ * hopefully it will break nothing ... */ -+ rq->start_time = jiffies; -+ -+ spin_lock_irqsave(&stats->iostat_lock, irqflags); -+ -+ /* update queue depth stats */ -+ i = stats->iostat_queue_depth; -+ if (i >= IOSTAT_NCOUNTERS) -+ i = IOSTAT_NCOUNTERS - 1; -+ stats->iostat_queue_ticks[i] += jiffies - stats->iostat_queue_stamp; -+ stats->iostat_queue_ticks_sum += jiffies - stats->iostat_queue_stamp; -+ stats->iostat_queue_depth++; -+ -+ /* update delay stats */ -+ if (rq_data_dir(rq) == WRITE) { -+ stats->iostat_wtime_in_queue[tbucket]++; -+ stats->iostat_write_reqs++; -+ } else { -+ stats->iostat_rtime_in_queue[tbucket]++; -+ stats->iostat_read_reqs++; -+ } -+ -+ /* update size stats */ -+ counter->iostat_size += nsect; -+ counter->iostat_count++; -+ -+ stats->iostat_queue_stamp = jiffies; -+ -+ spin_unlock_irqrestore(&stats->iostat_lock, irqflags); -+} -+#endif -+ - /** - * init_sd - entry point for this driver (both when built in or when - * a module). -@@ -1584,6 +2127,7 @@ static void sd_shutdown(struct device *d - static int __init init_sd(void) - { - int majors = 0, i; -+ int rc = 0; - - SCSI_LOG_HLQUEUE(3, printk("init_sd: sd driver entry point\n")); - -@@ -1594,7 +2138,10 @@ static int __init init_sd(void) - if (!majors) - return -ENODEV; - -- return scsi_register_driver(&sd_template.gendrv); -+ rc = scsi_register_driver(&sd_template.gendrv); -+ if (rc == 0) -+ sd_iostats_init(); -+ return rc; - } - - /** -@@ -1608,6 +2155,7 @@ static void __exit exit_sd(void) - - SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n")); - -+ sd_iostats_fini(); - scsi_unregister_driver(&sd_template.gendrv); - for (i = 0; i < SD_MAJORS; i++) - unregister_blkdev(sd_major(i), "sd"); diff --git a/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch deleted file mode 100644 index d6efdc68a8..0000000000 --- a/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch +++ /dev/null @@ -1,484 +0,0 @@ -Index: linux-2.6.22.5/drivers/scsi/Kconfig -=================================================================== ---- linux-2.6.22.5.orig/drivers/scsi/Kconfig 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/drivers/scsi/Kconfig 2008-02-21 01:20:41.000000000 -0700 -@@ -76,6 +76,14 @@ - In this case, do not compile the driver for your SCSI host adapter - (below) as a module either. - -+config SD_IOSTATS -+ bool "Enable SCSI disk I/O stats" -+ depends on BLK_DEV_SD -+ default y -+ ---help--- -+ This enables SCSI disk I/O stats collection. You must also enable -+ /proc file system support if you want this feature. -+ - config CHR_DEV_ST - tristate "SCSI tape support" - depends on SCSI -Index: linux-2.6.22.5/drivers/scsi/sd.c -=================================================================== ---- linux-2.6.22.5.orig/drivers/scsi/sd.c 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/drivers/scsi/sd.c 2008-02-21 01:20:41.000000000 -0700 -@@ -62,6 +62,38 @@ - - #include "scsi_logging.h" - -+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS)) -+# include <linux/proc_fs.h> -+# include <linux/seq_file.h> -+ -+typedef struct { -+ unsigned long long iostat_size; -+ unsigned long long iostat_count; -+} iostat_counter_t; -+ -+#define IOSTAT_NCOUNTERS 16 -+typedef struct { -+ iostat_counter_t iostat_read_histogram[IOSTAT_NCOUNTERS]; -+ iostat_counter_t iostat_write_histogram[IOSTAT_NCOUNTERS]; -+ struct timeval iostat_timeval; -+} iostat_stats_t; -+ -+iostat_stats_t **sd_iostats; -+spinlock_t sd_iostats_lock; -+struct proc_dir_entry *sd_iostats_procdir; -+char sd_iostats_procdir_name[] = "sd_iostats"; -+ -+extern void sd_iostats_init(void); -+extern void sd_iostats_init_disk(struct gendisk *); -+extern void sd_iostats_fini(void); -+extern void sd_iostats_bump(int disk, unsigned int nsect, int iswrite); -+#else -+static inline void sd_iostats_init(void) {} -+static inline void sd_iostats_init_disk(struct gendisk *disk) {} -+static inline void sd_iostats_fini(void) {} -+static inline void sd_iostats_bump(int disk, unsigned int nsect, int iswrite) {} -+#endif -+ - MODULE_AUTHOR("Eric Youngdale"); - MODULE_DESCRIPTION("SCSI disk (sd) driver"); - MODULE_LICENSE("GPL"); -@@ -89,6 +121,7 @@ - static DEFINE_IDR(sd_index_idr); - static DEFINE_SPINLOCK(sd_index_lock); - -+#define SD_STATS 256 - /* This semaphore is used to mediate the 0->1 reference get in the - * face of object destruction (i.e. we can't allow a get on an - * object after last put) */ -@@ -368,6 +401,9 @@ - SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt, "block=%llu\n", - (unsigned long long)block)); - -+ sd_iostats_bump(scsi_disk(disk)->index, this_count, -+ rq_data_dir(SCpnt->request) == WRITE); -+ - /* - * If we have a 1K hardware sectorsize, prevent access to single - * 512 byte sectors. In theory we could handle this - in fact -@@ -575,6 +611,7 @@ - scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT); - } - -+ sd_iostats_init_disk(disk); - return 0; - - error_out: -@@ -601,8 +638,20 @@ - - SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, "sd_release\n")); - -- if (!--sdkp->openers && sdev->removable) { -- if (scsi_block_when_processing_errors(sdev)) -+ if (!--sdkp->openers) { -+ /* -+ * Remove sd_iostats information about this disk -+ */ -+ if (sd_iostats_procdir != NULL) { -+ remove_proc_entry(disk->disk_name, sd_iostats_procdir); -+ } -+ if (sd_iostats != NULL) { -+ if (sd_iostats[sdkp->index] != NULL) { -+ kfree (sd_iostats[sdkp->index]); -+ sd_iostats[sdkp->index] = NULL; -+ } -+ } -+ if (sdev->removable && scsi_block_when_processing_errors(sdev)) - scsi_set_medium_removal(sdev, SCSI_REMOVAL_ALLOW); - } - -@@ -1563,6 +1612,342 @@ - return 0; - } - -+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS)) -+static int -+sd_iostats_seq_show(struct seq_file *seq, void *v) -+{ -+ struct timeval now; -+ struct gendisk *disk; -+ iostat_stats_t *stats; -+ unsigned long long read_len; -+ unsigned long long read_len_tot; -+ unsigned long read_num; -+ unsigned long read_num_tot; -+ unsigned long long write_len; -+ unsigned long long write_len_tot; -+ unsigned long write_num; -+ unsigned long write_num_tot; -+ int i; -+ int maxi; -+ -+ if (seq == NULL || seq->private == NULL) { -+ printk(KERN_ERR "sd_iostats_seq_show: NULL disk\n"); -+ BUG(); -+ } -+ -+ disk = seq->private; -+ -+ if (scsi_disk(disk) == NULL || (disk->flags & GENHD_FL_UP) == 0) { -+ seq_printf(seq, "sd_iostats_seq_show: Device %s " -+ "does not exist\n", disk->disk_name); -+ return 0; -+ } -+ -+ if (sd_iostats == NULL) { -+ printk(KERN_ERR "sd_iostats_seq_show: NULL stats array\n"); -+ BUG(); -+ } -+ -+ stats = sd_iostats[scsi_disk(disk)->index]; -+ if (stats == NULL) { -+ seq_printf(seq, "sd_iostats_seq_show: sd_iostats " -+ "entry %d does not exist\n", -+ scsi_disk(disk)->index); -+ return 0; -+ } -+ -+ do_gettimeofday(&now); -+ now.tv_sec -= stats->iostat_timeval.tv_sec; -+ now.tv_usec -= stats->iostat_timeval.tv_usec; -+ if (now.tv_usec < 0) { -+ now.tv_usec += 1000000; -+ now.tv_sec--; -+ } -+ -+ /* this sampling races with updates */ -+ seq_printf(seq, "index: %lu snapshot_time: %lu.%06lu\n", -+ scsi_disk(disk)->index, now.tv_sec, now.tv_usec); -+ -+ for (i = IOSTAT_NCOUNTERS - 1; i > 0; i--) -+ if (stats->iostat_read_histogram[i].iostat_count != 0 || -+ stats->iostat_write_histogram[i].iostat_count != 0) -+ break; -+ maxi = i; -+ -+ seq_printf(seq, "%8s %8s %12s %8s %12s\n", "size", -+ "reads", "total", "writes", "total"); -+ -+ read_len_tot = write_len_tot = 0; -+ read_num_tot = write_num_tot = 0; -+ for (i = 0; i <= maxi; i++) { -+ read_len = stats->iostat_read_histogram[i].iostat_size; -+ read_len_tot += read_len; -+ read_num = stats->iostat_read_histogram[i].iostat_count; -+ read_num_tot += read_num; -+ -+ write_len = stats->iostat_write_histogram[i].iostat_size; -+ write_len_tot += write_len; -+ write_num = stats->iostat_write_histogram[i].iostat_count; -+ write_num_tot += write_num; -+ -+ seq_printf (seq, "%8d %8lu %12llu %8lu %12llu\n", -+ 512<<i, read_num, read_len, write_num, write_len); -+ } -+ -+ seq_printf(seq, "%8s %8lu %12llu %8lu %12llu\n", "total", -+ read_num_tot, read_len_tot, -+ write_num_tot, write_len_tot); -+ return 0; -+} -+ -+static void * -+sd_iostats_seq_start(struct seq_file *p, loff_t *pos) -+{ -+ return (*pos == 0) ? (void *)1 : NULL; -+} -+ -+static void * -+sd_iostats_seq_next(struct seq_file *p, void *v, loff_t *pos) -+{ -+ ++*pos; -+ return NULL; -+} -+ -+static void -+sd_iostats_seq_stop(struct seq_file *p, void *v) -+{ -+} -+ -+static struct seq_operations sd_iostats_seqops = { -+ .start = sd_iostats_seq_start, -+ .stop = sd_iostats_seq_stop, -+ .next = sd_iostats_seq_next, -+ .show = sd_iostats_seq_show, -+}; -+ -+static int -+sd_iostats_seq_open (struct inode *inode, struct file *file) -+{ -+ int rc; -+ -+ rc = seq_open(file, &sd_iostats_seqops); -+ if (rc != 0) -+ return rc; -+ -+ ((struct seq_file *)file->private_data)->private = PDE(inode)->data; -+ return 0; -+} -+ -+static ssize_t -+sd_iostats_seq_write(struct file *file, const char *buffer, -+ size_t len, loff_t *off) -+{ -+ struct seq_file *seq = file->private_data; -+ struct gendisk *disk = seq->private; -+ iostat_stats_t *stats = sd_iostats[scsi_disk(disk)->index]; -+ unsigned long flags; -+ -+ -+ spin_lock_irqsave (&sd_iostats_lock, flags); -+ memset (stats, 0, sizeof(*stats)); -+ do_gettimeofday(&stats->iostat_timeval); -+ spin_unlock_irqrestore (&sd_iostats_lock, flags); -+ -+ return len; -+} -+ -+static struct file_operations sd_iostats_proc_fops = { -+ .owner = THIS_MODULE, -+ .open = sd_iostats_seq_open, -+ .read = seq_read, -+ .write = sd_iostats_seq_write, -+ .llseek = seq_lseek, -+ .release = seq_release, -+}; -+ -+extern struct proc_dir_entry *proc_scsi; -+ -+void -+sd_iostats_init(void) -+{ -+ int i; -+ -+ spin_lock_init(&sd_iostats_lock); -+ -+ sd_iostats = kmalloc(SD_STATS * sizeof(iostat_stats_t *), GFP_KERNEL); -+ if (sd_iostats == NULL) { -+ printk(KERN_WARNING "Can't keep sd iostats: " -+ "ENOMEM allocating stats array size %ld\n", -+ SD_STATS * sizeof(iostat_stats_t *)); -+ return; -+ } -+ -+ for (i = 0; i < SD_STATS; i++) -+ sd_iostats[i] = NULL; -+ -+ if (proc_scsi == NULL) { -+ printk(KERN_WARNING "No access to sd iostats: " -+ "proc_scsi is NULL\n"); -+ return; -+ } -+ -+ sd_iostats_procdir = create_proc_entry(sd_iostats_procdir_name, -+ S_IFDIR | S_IRUGO | S_IXUGO, -+ proc_scsi); -+ if (sd_iostats_procdir == NULL) { -+ printk(KERN_WARNING "No access to sd iostats: " -+ "can't create /proc/scsi/%s\n", sd_iostats_procdir_name); -+ return; -+ } -+} -+ -+void -+sd_iostats_init_disk(struct gendisk *disk) -+{ -+ struct proc_dir_entry *pde; -+ unsigned long flags; -+ iostat_stats_t *stats; -+ -+ if (sd_iostats == NULL || -+ sd_iostats_procdir == NULL) -+ return; -+ -+ if (scsi_disk(disk)->index > SD_STATS) { -+ printk(KERN_ERR "sd_iostats_init_disk: " -+ "unexpected disk index %d(%d)\n", -+ scsi_disk(disk)->index, SD_STATS); -+ return; -+ } -+ -+ if (sd_iostats[scsi_disk(disk)->index] != NULL) -+ return; -+ -+ stats = kmalloc(sizeof(*stats), GFP_KERNEL); -+ if (stats == NULL) { -+ printk(KERN_WARNING "Can't keep %s iostats: " -+ "ENOMEM allocating stats size %ld\n", -+ disk->disk_name, sizeof(*stats)); -+ return; -+ } -+ -+ memset (stats, 0, sizeof(*stats)); -+ do_gettimeofday(&stats->iostat_timeval); -+ -+ spin_lock_irqsave(&sd_iostats_lock, flags); -+ -+ if (sd_iostats[scsi_disk(disk)->index] != NULL) { -+ spin_unlock_irqrestore(&sd_iostats_lock, flags); -+ kfree (stats); -+ return; -+ } -+ -+ sd_iostats[scsi_disk(disk)->index] = stats; -+ -+ spin_unlock_irqrestore(&sd_iostats_lock, flags); -+ -+ pde = create_proc_entry(disk->disk_name, S_IRUGO | S_IWUSR, -+ sd_iostats_procdir); -+ if (pde == NULL) { -+ printk(KERN_WARNING "Can't create /proc/scsi/%s/%s\n", -+ sd_iostats_procdir_name, disk->disk_name); -+ } else { -+ pde->proc_fops = &sd_iostats_proc_fops; -+ pde->data = disk; -+ } -+} -+ -+static void sd_devname(unsigned int disknum, char *buffer) -+{ -+ if (disknum < 26) -+ sprintf(buffer, "sd%c", 'a' + disknum); -+ else { -+ unsigned int min1; -+ unsigned int min2; -+ /* -+ * For larger numbers of disks, we need to go to a new -+ * naming scheme. -+ */ -+ min1 = disknum / 26; -+ min2 = disknum % 26; -+ sprintf(buffer, "sd%c%c", 'a' + min1 - 1, 'a' + min2); -+ } -+} -+ -+void -+sd_iostats_fini(void) -+{ -+ char name[6]; -+ int i; -+ -+ if (sd_iostats_procdir != NULL) { -+ for (i = 0; i < SD_STATS; i++) { -+ sd_devname(i, name); -+ remove_proc_entry(name, sd_iostats_procdir); -+ } -+ -+ if (proc_scsi == NULL) { -+ printk(KERN_ERR "sd_iostats_fini: proc_scsi NULL\n"); -+ BUG(); -+ } -+ remove_proc_entry(sd_iostats_procdir_name, -+ proc_scsi); -+ -+ sd_iostats_procdir = NULL; -+ } -+ -+ if (sd_iostats != NULL) { -+ for (i = 0; i < SD_STATS; i++) { -+ if (sd_iostats[i] != NULL) -+ kfree (sd_iostats[i]); -+ } -+ -+ kfree(sd_iostats); -+ sd_iostats = NULL; -+ } -+} -+ -+void -+sd_iostats_bump(int disk, unsigned int nsect, int iswrite) -+{ -+ iostat_stats_t *stats; -+ iostat_counter_t *counter; -+ int bucket; -+ int tmp; -+ unsigned long irqflags; -+ -+ if (sd_iostats == NULL) -+ return; -+ -+ if (disk < 0 || disk >= SD_STATS) { -+ printk(KERN_ERR "sd_iostats_bump: unexpected disk index %d([0-%d])\n", -+ disk, SD_STATS); -+ BUG(); -+ } -+ -+ for (bucket = 0, tmp = nsect; tmp > 1; bucket++) -+ tmp /= 2; -+ -+ if (bucket >= IOSTAT_NCOUNTERS) { -+ printk (KERN_ERR "sd_iostats_bump: nsect %d too big\n", nsect); -+ BUG(); -+ } -+ -+ spin_lock_irqsave(&sd_iostats_lock, irqflags); -+ -+ stats = sd_iostats[disk]; -+ if (stats != NULL) { -+ counter = iswrite ? -+ &stats->iostat_write_histogram[bucket] : -+ &stats->iostat_read_histogram[bucket]; -+ -+ counter->iostat_size += nsect; -+ counter->iostat_count++; -+ } -+ -+ spin_unlock_irqrestore(&sd_iostats_lock, irqflags); -+} -+#endif -+ - /** - * sd_probe - called during driver initialization and whenever a - * new scsi device is attached to the system. It is called once -@@ -1854,6 +2239,7 @@ - err = scsi_register_driver(&sd_template.gendrv); - if (err) - goto err_out_class; -+ sd_iostats_init(); - - return 0; - -@@ -1876,6 +2262,7 @@ - - SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n")); - -+ sd_iostats_fini(); - scsi_unregister_driver(&sd_template.gendrv); - class_unregister(&sd_disk_class); - -Index: linux-2.6.22.5/drivers/scsi/scsi_proc.c -=================================================================== ---- linux-2.6.22.5.orig/drivers/scsi/scsi_proc.c 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/drivers/scsi/scsi_proc.c 2008-02-21 01:20:41.000000000 -0700 -@@ -40,7 +40,8 @@ - /* 4K page size, but our output routines, use some slack for overruns */ - #define PROC_BLOCK_SIZE (3*1024) - --static struct proc_dir_entry *proc_scsi; -+struct proc_dir_entry *proc_scsi; -+EXPORT_SYMBOL(proc_scsi); - - /* Protect sht->present and sht->proc_dir */ - static DEFINE_MUTEX(global_host_template_mutex); diff --git a/lustre/kernel_patches/patches/tcp-rto_proc-2.6.9.patch b/lustre/kernel_patches/patches/tcp-rto_proc-2.6.9.patch deleted file mode 100644 index 0f94dd572a..0000000000 --- a/lustre/kernel_patches/patches/tcp-rto_proc-2.6.9.patch +++ /dev/null @@ -1,130 +0,0 @@ -Index: linux+rhel4+chaos/include/linux/sysctl.h -=================================================================== ---- linux+rhel4+chaos.orig/include/linux/sysctl.h -+++ linux+rhel4+chaos/include/linux/sysctl.h -@@ -348,6 +348,8 @@ enum - NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109, - NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=110, - NET_TCP_SLOW_START_AFTER_IDLE=111, -+ NET_TCP_RTO_MAX=112, -+ NET_TCP_RTO_INIT=113, - }; - - enum { -Index: linux+rhel4+chaos/net/ipv4/sysctl_net_ipv4.c -=================================================================== ---- linux+rhel4+chaos.orig/net/ipv4/sysctl_net_ipv4.c -+++ linux+rhel4+chaos/net/ipv4/sysctl_net_ipv4.c -@@ -49,6 +49,10 @@ extern int inet_peer_maxttl; - extern int inet_peer_gc_mintime; - extern int inet_peer_gc_maxtime; - -+/* From tcp_timer.c */ -+extern unsigned sysctl_tcp_rto_max; -+extern unsigned sysctl_tcp_rto_init; -+ - #ifdef CONFIG_SYSCTL - static int tcp_retr1_max = 255; - static int ip_local_port_range_min[] = { 1, 1 }; -@@ -699,6 +703,22 @@ ctl_table ipv4_table[] = { - .mode = 0644, - .proc_handler = &proc_dointvec, - }, -+ { -+ .ctl_name = NET_TCP_RTO_MAX, -+ .procname = "tcp_rto_max", -+ .data = &sysctl_tcp_rto_max, -+ .maxlen = sizeof(unsigned), -+ .mode = 0644, -+ .proc_handler = &proc_dointvec -+ }, -+ { -+ .ctl_name = NET_TCP_RTO_INIT, -+ .procname = "tcp_rto_init", -+ .data = &sysctl_tcp_rto_init, -+ .maxlen = sizeof(unsigned), -+ .mode = 0644, -+ .proc_handler = &proc_dointvec -+ }, - { .ctl_name = 0 } - }; - -Index: linux+rhel4+chaos/net/ipv4/tcp_timer.c -=================================================================== ---- linux+rhel4+chaos.orig/net/ipv4/tcp_timer.c -+++ linux+rhel4+chaos/net/ipv4/tcp_timer.c -@@ -32,6 +32,9 @@ int sysctl_tcp_retries1 = TCP_RETR1; - int sysctl_tcp_retries2 = TCP_RETR2; - int sysctl_tcp_orphan_retries; - -+unsigned sysctl_tcp_rto_max = TCP_RTO_MAX; -+unsigned sysctl_tcp_rto_init = TCP_TIMEOUT_INIT; -+ - static void tcp_write_timer(unsigned long); - static void tcp_delack_timer(unsigned long); - static void tcp_keepalive_timer (unsigned long data); -@@ -104,7 +107,7 @@ static int tcp_out_of_resources(struct s - - /* If peer does not open window for long time, or did not transmit - * anything for long time, penalize it. */ -- if ((s32)(tcp_time_stamp - tp->lsndtime) > 2*TCP_RTO_MAX || !do_reset) -+ if ((s32)(tcp_time_stamp - tp->lsndtime) > 2*sysctl_tcp_rto_max || !do_reset) - orphans <<= 1; - - /* If some dubious ICMP arrived, penalize even more. */ -@@ -186,7 +189,7 @@ static int tcp_write_timeout(struct sock - - retry_until = sysctl_tcp_retries2; - if (sock_flag(sk, SOCK_DEAD)) { -- int alive = (tp->rto < TCP_RTO_MAX); -+ int alive = (tp->rto < sysctl_tcp_rto_max); - - retry_until = tcp_orphan_retries(sk, alive); - -@@ -292,7 +295,7 @@ static void tcp_probe_timer(struct sock - max_probes = sysctl_tcp_retries2; - - if (sock_flag(sk, SOCK_DEAD)) { -- int alive = ((tp->rto<<tp->backoff) < TCP_RTO_MAX); -+ int alive = ((tp->rto<<tp->backoff) < sysctl_tcp_rto_max); - - max_probes = tcp_orphan_retries(sk, alive); - -@@ -336,7 +339,7 @@ static void tcp_retransmit_timer(struct - inet->num, tp->snd_una, tp->snd_nxt); - } - #endif -- if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) { -+ if (tcp_time_stamp - tp->rcv_tstamp > sysctl_tcp_rto_max) { - tcp_write_err(sk); - goto out; - } -@@ -405,7 +408,7 @@ static void tcp_retransmit_timer(struct - tp->retransmits++; - - out_reset_timer: -- tp->rto = min(tp->rto << 1, TCP_RTO_MAX); -+ tp->rto = min(tp->rto << 1, sysctl_tcp_rto_max); - tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto); - if (tp->retransmits > sysctl_tcp_retries1) - __sk_dst_reset(sk); -@@ -502,7 +505,7 @@ static void tcp_synack_timer(struct sock - if (tp->defer_accept) - max_retries = tp->defer_accept; - -- budget = 2*(TCP_SYNQ_HSIZE/(TCP_TIMEOUT_INIT/TCP_SYNQ_INTERVAL)); -+ budget = 2*(TCP_SYNQ_HSIZE/(sysctl_tcp_rto_init/TCP_SYNQ_INTERVAL)); - i = lopt->clock_hand; - - do { -@@ -516,8 +519,8 @@ static void tcp_synack_timer(struct sock - - if (req->retrans++ == 0) - lopt->qlen_young--; -- timeo = min((TCP_TIMEOUT_INIT << req->retrans), -- TCP_RTO_MAX); -+ timeo = min((sysctl_tcp_rto_init << req->retrans), -+ sysctl_tcp_rto_max); - req->expires = now + timeo; - reqp = &req->dl_next; - continue; diff --git a/lustre/kernel_patches/patches/uml-2.6.10-fc3.patch b/lustre/kernel_patches/patches/uml-2.6.10-fc3.patch deleted file mode 100644 index 625b21c2ad..0000000000 --- a/lustre/kernel_patches/patches/uml-2.6.10-fc3.patch +++ /dev/null @@ -1,3781 +0,0 @@ -Index: linux-2.6.10/lib/Kconfig.debug -=================================================================== ---- linux-2.6.10.orig/lib/Kconfig.debug 2004-12-25 05:35:24.000000000 +0800 -+++ linux-2.6.10/lib/Kconfig.debug 2005-04-07 22:05:29.475761192 +0800 -@@ -23,7 +23,6 @@ - config MAGIC_SYSRQ - bool "Magic SysRq key" - depends on DEBUG_KERNEL && (H8300 || M68KNOMMU || V850) -- depends (USERMODE && MCONSOLE) - help - Enables console device to interpret special characters as - commands to dump state information. -Index: linux-2.6.10/mm/mprotect.c -=================================================================== ---- linux-2.6.10.orig/mm/mprotect.c 2004-12-25 05:35:50.000000000 +0800 -+++ linux-2.6.10/mm/mprotect.c 2005-04-07 22:05:29.475761192 +0800 -@@ -93,19 +93,20 @@ - { - pgd_t *dir; - unsigned long beg = start; -+ struct mm_struct * mm = vma->vm_mm; - -- dir = pgd_offset(current->mm, start); -+ dir = pgd_offset(mm, start); - flush_cache_range(vma, beg, end); - if (start >= end) - BUG(); -- spin_lock(¤t->mm->page_table_lock); -+ spin_lock(&mm->page_table_lock); - do { - change_pmd_range(dir, start, end - start, newprot); - start = (start + PGDIR_SIZE) & PGDIR_MASK; - dir++; - } while (start && (start < end)); - flush_tlb_range(vma, beg, end); -- spin_unlock(¤t->mm->page_table_lock); -+ spin_unlock(&mm->page_table_lock); - return; - } - -@@ -190,8 +191,9 @@ - return error; - } - --asmlinkage long --sys_mprotect(unsigned long start, size_t len, unsigned long prot) -+long -+do_mprotect(struct mm_struct *mm, unsigned long start, size_t len, -+ unsigned long prot) - { - unsigned long vm_flags, nstart, end, tmp; - struct vm_area_struct *vma, *prev; -@@ -220,9 +222,9 @@ - - vm_flags = calc_vm_prot_bits(prot); - -- down_write(¤t->mm->mmap_sem); -+ down_write(&mm->mmap_sem); - -- vma = find_vma_prev(current->mm, start, &prev); -+ vma = find_vma_prev(mm, start, &prev); - error = -ENOMEM; - if (!vma) - goto out; -@@ -288,6 +290,11 @@ - } - } - out: -- up_write(¤t->mm->mmap_sem); -+ up_write(&mm->mmap_sem); - return error; - } -+ -+asmlinkage long sys_mprotect(unsigned long start, size_t len, unsigned long prot) -+{ -+ return(do_mprotect(current->mm, start, len, prot)); -+} -Index: linux-2.6.10/mm/mmap.c -=================================================================== ---- linux-2.6.10.orig/mm/mmap.c 2005-04-06 23:38:33.000000000 +0800 -+++ linux-2.6.10/mm/mmap.c 2005-04-07 22:05:29.476761040 +0800 -@@ -759,11 +759,11 @@ - * The caller must hold down_write(current->mm->mmap_sem). - */ - --unsigned long do_mmap_pgoff(struct file * file, unsigned long addr, -- unsigned long len, unsigned long prot, -- unsigned long flags, unsigned long pgoff) -+unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file * file, -+ unsigned long addr, unsigned long len, -+ unsigned long prot, unsigned long flags, -+ unsigned long pgoff) - { -- struct mm_struct * mm = current->mm; - struct vm_area_struct * vma, * prev; - struct inode *inode; - unsigned int vm_flags; -@@ -1037,7 +1037,7 @@ - return error; - } - --EXPORT_SYMBOL(do_mmap_pgoff); -+EXPORT_SYMBOL(__do_mmap_pgoff); - - /* Get an address range which is currently unmapped. - * For shmat() with addr=0. -Index: linux-2.6.10/mm/proc_mm.c -=================================================================== ---- linux-2.6.10.orig/mm/proc_mm.c 2005-04-07 19:34:21.197950744 +0800 -+++ linux-2.6.10/mm/proc_mm.c 2005-04-07 22:05:29.476761040 +0800 -@@ -0,0 +1,181 @@ -+/* -+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -+ * Licensed under the GPL -+ */ -+ -+#include "linux/mm.h" -+#include "linux/init.h" -+#include "linux/proc_fs.h" -+#include "linux/proc_mm.h" -+#include "linux/file.h" -+#include "linux/mman.h" -+#include "asm/uaccess.h" -+#include "asm/mmu_context.h" -+ -+static struct file_operations proc_mm_fops; -+ -+struct mm_struct *proc_mm_get_mm(int fd) -+{ -+ struct mm_struct *ret = ERR_PTR(-EBADF); -+ struct file *file; -+ -+ file = fget(fd); -+ if (!file) -+ goto out; -+ -+ ret = ERR_PTR(-EINVAL); -+ if(file->f_op != &proc_mm_fops) -+ goto out_fput; -+ -+ ret = file->private_data; -+ out_fput: -+ fput(file); -+ out: -+ return(ret); -+} -+ -+extern long do_mmap2(struct mm_struct *mm, unsigned long addr, -+ unsigned long len, unsigned long prot, -+ unsigned long flags, unsigned long fd, -+ unsigned long pgoff); -+ -+static ssize_t write_proc_mm(struct file *file, const char *buffer, -+ size_t count, loff_t *ppos) -+{ -+ struct mm_struct *mm = file->private_data; -+ struct proc_mm_op req; -+ int n, ret; -+ -+ if(count > sizeof(req)) -+ return(-EINVAL); -+ -+ n = copy_from_user(&req, buffer, count); -+ if(n != 0) -+ return(-EFAULT); -+ -+ ret = count; -+ switch(req.op){ -+ case MM_MMAP: { -+ struct mm_mmap *map = &req.u.mmap; -+ -+ /* Nobody ever noticed it, but do_mmap_pgoff() calls -+ * get_unmapped_area() which checks current->mm, if -+ * MAP_FIXED is not set, so mmap() could replace -+ * an old mapping. -+ */ -+ if (! (map->flags & MAP_FIXED)) -+ return(-EINVAL); -+ -+ ret = do_mmap2(mm, map->addr, map->len, map->prot, -+ map->flags, map->fd, map->offset >> PAGE_SHIFT); -+ if((ret & ~PAGE_MASK) == 0) -+ ret = count; -+ -+ break; -+ } -+ case MM_MUNMAP: { -+ struct mm_munmap *unmap = &req.u.munmap; -+ -+ down_write(&mm->mmap_sem); -+ ret = do_munmap(mm, unmap->addr, unmap->len); -+ up_write(&mm->mmap_sem); -+ -+ if(ret == 0) -+ ret = count; -+ break; -+ } -+ case MM_MPROTECT: { -+ struct mm_mprotect *protect = &req.u.mprotect; -+ -+ ret = do_mprotect(mm, protect->addr, protect->len, -+ protect->prot); -+ if(ret == 0) -+ ret = count; -+ break; -+ } -+ -+ case MM_COPY_SEGMENTS: { -+ struct mm_struct *from = proc_mm_get_mm(req.u.copy_segments); -+ -+ if(IS_ERR(from)){ -+ ret = PTR_ERR(from); -+ break; -+ } -+ -+ ret = copy_context(mm, from); -+ if(ret == 0) -+ ret = count; -+ break; -+ } -+ default: -+ ret = -EINVAL; -+ break; -+ } -+ -+ return(ret); -+} -+ -+static int open_proc_mm(struct inode *inode, struct file *file) -+{ -+ struct mm_struct *mm = mm_alloc(); -+ int ret; -+ -+ ret = -ENOMEM; -+ if(mm == NULL) -+ goto out_mem; -+ -+ init_new_empty_context(mm); -+ arch_pick_mmap_layout(mm); -+ -+ spin_lock(&mmlist_lock); -+ list_add(&mm->mmlist, ¤t->mm->mmlist); -+ spin_unlock(&mmlist_lock); -+ -+ file->private_data = mm; -+ -+ return(0); -+ -+ out_mem: -+ return(ret); -+} -+ -+static int release_proc_mm(struct inode *inode, struct file *file) -+{ -+ struct mm_struct *mm = file->private_data; -+ -+ mmput(mm); -+ return(0); -+} -+ -+static struct file_operations proc_mm_fops = { -+ .open = open_proc_mm, -+ .release = release_proc_mm, -+ .write = write_proc_mm, -+}; -+ -+static int make_proc_mm(void) -+{ -+ struct proc_dir_entry *ent; -+ -+ ent = create_proc_entry("mm", 0222, &proc_root); -+ if(ent == NULL){ -+ printk("make_proc_mm : Failed to register /proc/mm\n"); -+ return(0); -+ } -+ ent->proc_fops = &proc_mm_fops; -+ -+ return(0); -+} -+ -+__initcall(make_proc_mm); -+ -+/* -+ * Overrides for Emacs so that we follow Linus's tabbing style. -+ * Emacs will notice this stuff at the end of the file and automatically -+ * adjust the settings for this buffer only. This must remain at the end -+ * of the file. -+ * --------------------------------------------------------------------------- -+ * Local variables: -+ * c-file-style: "linux" -+ * End: -+ */ -Index: linux-2.6.10/mm/Makefile -=================================================================== ---- linux-2.6.10.orig/mm/Makefile 2004-12-25 05:35:00.000000000 +0800 -+++ linux-2.6.10/mm/Makefile 2005-04-07 22:05:29.477760888 +0800 -@@ -18,3 +18,4 @@ - obj-$(CONFIG_SHMEM) += shmem.o - obj-$(CONFIG_TINY_SHMEM) += tiny-shmem.o - -+obj-$(CONFIG_PROC_MM) += proc_mm.o -Index: linux-2.6.10/arch/um/drivers/mconsole_kern.c -=================================================================== ---- linux-2.6.10.orig/arch/um/drivers/mconsole_kern.c 2004-12-25 05:33:49.000000000 +0800 -+++ linux-2.6.10/arch/um/drivers/mconsole_kern.c 2005-04-07 22:05:29.477760888 +0800 -@@ -204,6 +204,68 @@ - } - #endif - -+/* This is a more convoluted version of mconsole_proc, which has some stability -+ * problems; however, we need it fixed, because it is expected that UML users -+ * mount HPPFS instead of procfs on /proc. And we want mconsole_proc to still -+ * show the real procfs content, not the ones from hppfs.*/ -+#if 0 -+void mconsole_proc(struct mc_request *req) -+{ -+ char path[64]; -+ char *buf; -+ int len; -+ int fd; -+ int first_chunk = 1; -+ char *ptr = req->request.data; -+ -+ ptr += strlen("proc"); -+ while(isspace(*ptr)) ptr++; -+ snprintf(path, sizeof(path), "/proc/%s", ptr); -+ -+ fd = sys_open(path, 0, 0); -+ if (fd < 0) { -+ mconsole_reply(req, "Failed to open file", 1, 0); -+ printk("open %s: %d\n",path,fd); -+ goto out; -+ } -+ -+ buf = kmalloc(PAGE_SIZE, GFP_KERNEL); -+ if(buf == NULL){ -+ mconsole_reply(req, "Failed to allocate buffer", 1, 0); -+ goto out_close; -+ } -+ -+ for (;;) { -+ len = sys_read(fd, buf, PAGE_SIZE-1); -+ if (len < 0) { -+ mconsole_reply(req, "Read of file failed", 1, 0); -+ goto out_free; -+ } -+ /*Begin the file content on his own line.*/ -+ if (first_chunk) { -+ mconsole_reply(req, "\n", 0, 1); -+ first_chunk = 0; -+ } -+ if (len == PAGE_SIZE-1) { -+ buf[len] = '\0'; -+ mconsole_reply(req, buf, 0, 1); -+ } else { -+ buf[len] = '\0'; -+ mconsole_reply(req, buf, 0, 0); -+ break; -+ } -+ } -+ /*END*/ -+ -+ out_free: -+ kfree(buf); -+ out_close: -+ sys_close(fd); -+ out: -+ /* nothing */; -+} -+#endif -+ - void mconsole_proc(struct mc_request *req) - { - char path[64]; -Index: linux-2.6.10/arch/um/drivers/net_kern.c -=================================================================== ---- linux-2.6.10.orig/arch/um/drivers/net_kern.c 2004-12-25 05:34:44.000000000 +0800 -+++ linux-2.6.10/arch/um/drivers/net_kern.c 2005-04-07 22:05:29.478760736 +0800 -@@ -126,10 +126,6 @@ - lp->tl.data = (unsigned long) &lp->user; - netif_start_queue(dev); - -- spin_lock(&opened_lock); -- list_add(&lp->list, &opened); -- spin_unlock(&opened_lock); -- - /* clear buffer - it can happen that the host side of the interface - * is full when we get here. In this case, new data is never queued, - * SIGIOs never arrive, and the net never works. -@@ -152,9 +148,6 @@ - free_irq(dev->irq, dev); - if(lp->close != NULL) (*lp->close)(lp->fd, &lp->user); - lp->fd = -1; -- spin_lock(&opened_lock); -- list_del(&lp->list); -- spin_unlock(&opened_lock); - - spin_unlock(&lp->lock); - return 0; -@@ -397,6 +390,11 @@ - - if (device->have_mac) - set_ether_mac(dev, device->mac); -+ -+ spin_lock(&opened_lock); -+ list_add(&lp->list, &opened); -+ spin_unlock(&opened_lock); -+ - return(0); - } - -@@ -705,7 +703,7 @@ - static void close_devices(void) - { - struct list_head *ele; -- struct uml_net_private *lp; -+ struct uml_net_private *lp; - - list_for_each(ele, &opened){ - lp = list_entry(ele, struct uml_net_private, list); -Index: linux-2.6.10/arch/um/drivers/net_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/drivers/net_user.c 2004-12-25 05:34:26.000000000 +0800 -+++ linux-2.6.10/arch/um/drivers/net_user.c 2005-04-07 22:05:29.478760736 +0800 -@@ -173,10 +173,12 @@ - pe_data.stdout = fds[1]; - pid = run_helper(change_pre_exec, &pe_data, argv, NULL); - -- os_close_file(fds[1]); - read_output(fds[0], output, output_len); -+ os_close_file(fds[0]); -+ os_close_file(fds[1]); - -- CATCH_EINTR(err = waitpid(pid, NULL, 0)); -+ if (pid > 0) -+ CATCH_EINTR(err = waitpid(pid, NULL, 0)); - return(pid); - } - -Index: linux-2.6.10/arch/um/os-Linux/process.c -=================================================================== ---- linux-2.6.10.orig/arch/um/os-Linux/process.c 2004-12-25 05:34:00.000000000 +0800 -+++ linux-2.6.10/arch/um/os-Linux/process.c 2005-04-07 22:14:57.660384000 +0800 -@@ -94,10 +94,16 @@ - CATCH_EINTR(waitpid(pid, NULL, 0)); - - } -+/* Kill off a ptraced child by all means available. kill it normally first, -+ * then PTRACE_KILL it, then PTRACE_CONT it in case it's in a run state from -+ * which it can't exit directly. -+ */ - - void os_kill_ptraced_process(int pid, int reap_child) - { -+ kill(pid, SIGKILL); - ptrace(PTRACE_KILL, pid); -+ ptrace(PTRACE_CONT, pid); - if(reap_child) - CATCH_EINTR(waitpid(pid, NULL, 0)); - } -Index: linux-2.6.10/arch/um/os-Linux/elf_aux.c -=================================================================== ---- linux-2.6.10.orig/arch/um/os-Linux/elf_aux.c 2005-04-07 19:34:21.197950744 +0800 -+++ linux-2.6.10/arch/um/os-Linux/elf_aux.c 2005-04-07 22:05:29.478760736 +0800 -@@ -0,0 +1,67 @@ -+/* -+ * arch/um/kernel/elf_aux.c -+ * -+ * Scan the Elf auxiliary vector provided by the host to extract -+ * information about vsyscall-page, etc. -+ * -+ * Copyright (C) 2004 Fujitsu Siemens Computers GmbH -+ * Author: Bodo Stroesser (bodo.stroesser@fujitsu-siemens.com) -+ */ -+#include <elf.h> -+#include <stddef.h> -+#include "init.h" -+#include "elf_user.h" -+ -+#if ELF_CLASS == ELFCLASS32 -+typedef Elf32_auxv_t elf_auxv_t; -+#else -+typedef Elf64_auxv_t elf_auxv_t; -+#endif -+ -+char * elf_aux_platform; -+long elf_aux_hwcap; -+ -+unsigned long vsyscall_ehdr; -+unsigned long vsyscall_end; -+ -+unsigned long __kernel_vsyscall; -+ -+ -+__init void scan_elf_aux( char **envp) -+{ -+ long page_size = 0; -+ elf_auxv_t * auxv; -+ -+ while ( *envp++ != NULL) ; -+ -+ for ( auxv = (elf_auxv_t *)envp; auxv->a_type != AT_NULL; auxv++) { -+ switch ( auxv->a_type ) { -+ case AT_SYSINFO: -+ __kernel_vsyscall = auxv->a_un.a_val; -+ break; -+ case AT_SYSINFO_EHDR: -+ vsyscall_ehdr = auxv->a_un.a_val; -+ break; -+ case AT_HWCAP: -+ elf_aux_hwcap = auxv->a_un.a_val; -+ break; -+ case AT_PLATFORM: -+ elf_aux_platform = auxv->a_un.a_val; -+ break; -+ case AT_PAGESZ: -+ page_size = auxv->a_un.a_val; -+ break; -+ } -+ } -+ if ( ! __kernel_vsyscall || ! vsyscall_ehdr || -+ ! elf_aux_hwcap || ! elf_aux_platform || -+ ! page_size || (vsyscall_ehdr % page_size) ) { -+ __kernel_vsyscall = 0; -+ vsyscall_ehdr = 0; -+ elf_aux_hwcap = 0; -+ elf_aux_platform = "i586"; -+ } -+ else { -+ vsyscall_end = vsyscall_ehdr + page_size; -+ } -+} -Index: linux-2.6.10/arch/um/os-Linux/user_syms.c -=================================================================== ---- linux-2.6.10.orig/arch/um/os-Linux/user_syms.c 2004-12-25 05:35:23.000000000 +0800 -+++ linux-2.6.10/arch/um/os-Linux/user_syms.c 2005-04-07 22:05:29.478760736 +0800 -@@ -26,6 +26,9 @@ - - EXPORT_SYMBOL(strstr); - -+EXPORT_SYMBOL(vsyscall_ehdr); -+EXPORT_SYMBOL(vsyscall_end); -+ - /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms. - * However, the modules will use the CRC defined *here*, no matter if it is - * good; so the versions of these symbols will always match -Index: linux-2.6.10/arch/um/os-Linux/Makefile -=================================================================== ---- linux-2.6.10.orig/arch/um/os-Linux/Makefile 2004-12-25 05:35:00.000000000 +0800 -+++ linux-2.6.10/arch/um/os-Linux/Makefile 2005-04-07 22:05:29.479760584 +0800 -@@ -3,9 +3,9 @@ - # Licensed under the GPL - # - --obj-y = file.o process.o time.o tty.o user_syms.o drivers/ -+obj-y = elf_aux.o file.o process.o time.o tty.o user_syms.o drivers/ - --USER_OBJS := $(foreach file,file.o process.o time.o tty.o,$(obj)/$(file)) -+USER_OBJS := $(foreach file,elf_aux.o file.o process.o time.o tty.o,$(obj)/$(file)) - - $(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< -Index: linux-2.6.10/arch/um/sys-i386/signal.c -=================================================================== ---- linux-2.6.10.orig/arch/um/sys-i386/signal.c 2005-04-07 19:34:21.197950744 +0800 -+++ linux-2.6.10/arch/um/sys-i386/signal.c 2005-04-07 22:05:29.479760584 +0800 -@@ -0,0 +1,374 @@ -+/* -+ * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com) -+ * Licensed under the GPL -+ */ -+ -+#include "linux/signal.h" -+#include "linux/ptrace.h" -+#include "asm/current.h" -+#include "asm/ucontext.h" -+#include "asm/uaccess.h" -+#include "asm/unistd.h" -+#include "frame_kern.h" -+#include "signal_user.h" -+#include "ptrace_user.h" -+#include "sigcontext.h" -+#include "mode.h" -+ -+#ifdef CONFIG_MODE_SKAS -+ -+#include "skas.h" -+ -+static int copy_sc_from_user_skas(struct pt_regs *regs, -+ struct sigcontext *from) -+{ -+ struct sigcontext sc; -+ unsigned long fpregs[HOST_FP_SIZE]; -+ int err; -+ -+ err = copy_from_user(&sc, from, sizeof(sc)); -+ err |= copy_from_user(fpregs, sc.fpstate, sizeof(fpregs)); -+ if(err) -+ return(err); -+ -+ REGS_GS(regs->regs.skas.regs) = sc.gs; -+ REGS_FS(regs->regs.skas.regs) = sc.fs; -+ REGS_ES(regs->regs.skas.regs) = sc.es; -+ REGS_DS(regs->regs.skas.regs) = sc.ds; -+ REGS_EDI(regs->regs.skas.regs) = sc.edi; -+ REGS_ESI(regs->regs.skas.regs) = sc.esi; -+ REGS_EBP(regs->regs.skas.regs) = sc.ebp; -+ REGS_SP(regs->regs.skas.regs) = sc.esp; -+ REGS_EBX(regs->regs.skas.regs) = sc.ebx; -+ REGS_EDX(regs->regs.skas.regs) = sc.edx; -+ REGS_ECX(regs->regs.skas.regs) = sc.ecx; -+ REGS_EAX(regs->regs.skas.regs) = sc.eax; -+ REGS_IP(regs->regs.skas.regs) = sc.eip; -+ REGS_CS(regs->regs.skas.regs) = sc.cs; -+ REGS_EFLAGS(regs->regs.skas.regs) = sc.eflags; -+ REGS_SS(regs->regs.skas.regs) = sc.ss; -+ regs->regs.skas.fault_addr = sc.cr2; -+ regs->regs.skas.fault_type = FAULT_WRITE(sc.err); -+ regs->regs.skas.trap_type = sc.trapno; -+ -+ err = ptrace_setfpregs(userspace_pid[0], fpregs); -+ if(err < 0){ -+ printk("copy_sc_from_user_skas - PTRACE_SETFPREGS failed, " -+ "errno = %d\n", err); -+ return(1); -+ } -+ -+ return(0); -+} -+ -+int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp, -+ struct pt_regs *regs, unsigned long fault_addr, -+ int fault_type) -+{ -+ struct sigcontext sc; -+ unsigned long fpregs[HOST_FP_SIZE]; -+ int err; -+ -+ sc.gs = REGS_GS(regs->regs.skas.regs); -+ sc.fs = REGS_FS(regs->regs.skas.regs); -+ sc.es = REGS_ES(regs->regs.skas.regs); -+ sc.ds = REGS_DS(regs->regs.skas.regs); -+ sc.edi = REGS_EDI(regs->regs.skas.regs); -+ sc.esi = REGS_ESI(regs->regs.skas.regs); -+ sc.ebp = REGS_EBP(regs->regs.skas.regs); -+ sc.esp = REGS_SP(regs->regs.skas.regs); -+ sc.ebx = REGS_EBX(regs->regs.skas.regs); -+ sc.edx = REGS_EDX(regs->regs.skas.regs); -+ sc.ecx = REGS_ECX(regs->regs.skas.regs); -+ sc.eax = REGS_EAX(regs->regs.skas.regs); -+ sc.eip = REGS_IP(regs->regs.skas.regs); -+ sc.cs = REGS_CS(regs->regs.skas.regs); -+ sc.eflags = REGS_EFLAGS(regs->regs.skas.regs); -+ sc.esp_at_signal = regs->regs.skas.regs[UESP]; -+ sc.ss = regs->regs.skas.regs[SS]; -+ sc.cr2 = fault_addr; -+ sc.err = TO_SC_ERR(fault_type); -+ sc.trapno = regs->regs.skas.trap_type; -+ -+ err = ptrace_getfpregs(userspace_pid[0], fpregs); -+ if(err < 0){ -+ printk("copy_sc_to_user_skas - PTRACE_GETFPREGS failed, " -+ "errno = %d\n", err); -+ return(1); -+ } -+ to_fp = (to_fp ? to_fp : (struct _fpstate *) (to + 1)); -+ sc.fpstate = to_fp; -+ -+ if(err) -+ return(err); -+ -+ return(copy_to_user(to, &sc, sizeof(sc)) || -+ copy_to_user(to_fp, fpregs, sizeof(fpregs))); -+} -+#endif -+ -+#ifdef CONFIG_MODE_TT -+int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, -+ int fpsize) -+{ -+ struct _fpstate *to_fp, *from_fp; -+ unsigned long sigs; -+ int err; -+ -+ to_fp = to->fpstate; -+ from_fp = from->fpstate; -+ sigs = to->oldmask; -+ err = copy_from_user(to, from, sizeof(*to)); -+ to->oldmask = sigs; -+ if(to_fp != NULL){ -+ err |= copy_from_user(&to->fpstate, &to_fp, -+ sizeof(to->fpstate)); -+ err |= copy_from_user(to_fp, from_fp, fpsize); -+ } -+ return(err); -+} -+ -+int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp, -+ struct sigcontext *from, int fpsize) -+{ -+ struct _fpstate *to_fp, *from_fp; -+ int err; -+ -+ to_fp = (fp ? fp : (struct _fpstate *) (to + 1)); -+ from_fp = from->fpstate; -+ err = copy_to_user(to, from, sizeof(*to)); -+ if(from_fp != NULL){ -+ err |= copy_to_user(&to->fpstate, &to_fp, -+ sizeof(to->fpstate)); -+ err |= copy_to_user(to_fp, from_fp, fpsize); -+ } -+ return(err); -+} -+#endif -+ -+static int copy_sc_from_user(struct pt_regs *to, void *from) -+{ -+ int ret; -+ -+ ret = CHOOSE_MODE(copy_sc_from_user_tt(UPT_SC(&to->regs), from, -+ sizeof(struct _fpstate)), -+ copy_sc_from_user_skas(to, from)); -+ return(ret); -+} -+ -+static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp, -+ struct pt_regs *from) -+{ -+ return(CHOOSE_MODE(copy_sc_to_user_tt(to, fp, UPT_SC(&from->regs), -+ sizeof(*fp)), -+ copy_sc_to_user_skas(to, fp, from, -+ current->thread.cr2, -+ current->thread.err))); -+} -+ -+static int copy_ucontext_to_user(struct ucontext *uc, struct _fpstate *fp, -+ sigset_t *set, unsigned long sp) -+{ -+ int err = 0; -+ -+ err |= put_user(current->sas_ss_sp, &uc->uc_stack.ss_sp); -+ err |= put_user(sas_ss_flags(sp), &uc->uc_stack.ss_flags); -+ err |= put_user(current->sas_ss_size, &uc->uc_stack.ss_size); -+ err |= copy_sc_to_user(&uc->uc_mcontext, fp, ¤t->thread.regs); -+ err |= copy_to_user(&uc->uc_sigmask, set, sizeof(*set)); -+ return(err); -+} -+ -+struct sigframe -+{ -+ char *pretcode; -+ int sig; -+ struct sigcontext sc; -+ struct _fpstate fpstate; -+ unsigned long extramask[_NSIG_WORDS-1]; -+ char retcode[8]; -+}; -+ -+struct rt_sigframe -+{ -+ char *pretcode; -+ int sig; -+ struct siginfo *pinfo; -+ void *puc; -+ struct siginfo info; -+ struct ucontext uc; -+ struct _fpstate fpstate; -+ char retcode[8]; -+}; -+ -+int setup_signal_stack_sc(unsigned long stack_top, int sig, -+ struct k_sigaction *ka, struct pt_regs *regs, -+ sigset_t *mask) -+{ -+ struct sigframe __user *frame; -+ void *restorer; -+ int err = 0; -+ -+ stack_top &= -8UL; -+ frame = (struct sigframe *) stack_top - 1; -+ if(verify_area(VERIFY_WRITE, frame, sizeof(*frame))) -+ return(1); -+ -+ restorer = (void *) frame->retcode; -+ if(ka->sa.sa_flags & SA_RESTORER) -+ restorer = ka->sa.sa_restorer; -+ -+ err |= __put_user(restorer, &frame->pretcode); -+ err |= __put_user(sig, &frame->sig); -+ err |= copy_sc_to_user(&frame->sc, NULL, regs); -+ err |= __put_user(mask->sig[0], &frame->sc.oldmask); -+ if (_NSIG_WORDS > 1) -+ err |= __copy_to_user(&frame->extramask, &mask->sig[1], -+ sizeof(frame->extramask)); -+ -+ /* -+ * This is popl %eax ; movl $,%eax ; int $0x80 -+ * -+ * WE DO NOT USE IT ANY MORE! It's only left here for historical -+ * reasons and because gdb uses it as a signature to notice -+ * signal handler stack frames. -+ */ -+ err |= __put_user(0xb858, (short __user *)(frame->retcode+0)); -+ err |= __put_user(__NR_sigreturn, (int __user *)(frame->retcode+2)); -+ err |= __put_user(0x80cd, (short __user *)(frame->retcode+6)); -+ -+ if(err) -+ return(err); -+ -+ PT_REGS_SP(regs) = (unsigned long) frame; -+ PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler; -+ PT_REGS_EAX(regs) = (unsigned long) sig; -+ PT_REGS_EDX(regs) = (unsigned long) 0; -+ PT_REGS_ECX(regs) = (unsigned long) 0; -+ -+ if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) -+ ptrace_notify(SIGTRAP); -+ return(0); -+} -+ -+int setup_signal_stack_si(unsigned long stack_top, int sig, -+ struct k_sigaction *ka, struct pt_regs *regs, -+ siginfo_t *info, sigset_t *mask) -+{ -+ struct rt_sigframe __user *frame; -+ void *restorer; -+ int err = 0; -+ -+ stack_top &= -8UL; -+ frame = (struct rt_sigframe *) stack_top - 1; -+ if(verify_area(VERIFY_WRITE, frame, sizeof(*frame))) -+ return(1); -+ -+ restorer = (void *) frame->retcode; -+ if(ka->sa.sa_flags & SA_RESTORER) -+ restorer = ka->sa.sa_restorer; -+ -+ err |= __put_user(restorer, &frame->pretcode); -+ err |= __put_user(sig, &frame->sig); -+ err |= __put_user(&frame->info, &frame->pinfo); -+ err |= __put_user(&frame->uc, &frame->puc); -+ err |= copy_siginfo_to_user(&frame->info, info); -+ err |= copy_ucontext_to_user(&frame->uc, &frame->fpstate, mask, -+ PT_REGS_SP(regs)); -+ -+ /* -+ * This is movl $,%eax ; int $0x80 -+ * -+ * WE DO NOT USE IT ANY MORE! It's only left here for historical -+ * reasons and because gdb uses it as a signature to notice -+ * signal handler stack frames. -+ */ -+ err |= __put_user(0xb8, (char __user *)(frame->retcode+0)); -+ err |= __put_user(__NR_rt_sigreturn, (int __user *)(frame->retcode+1)); -+ err |= __put_user(0x80cd, (short __user *)(frame->retcode+5)); -+ -+ if(err) -+ return(err); -+ -+ PT_REGS_SP(regs) = (unsigned long) frame; -+ PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler; -+ PT_REGS_EAX(regs) = (unsigned long) sig; -+ PT_REGS_EDX(regs) = (unsigned long) &frame->info; -+ PT_REGS_ECX(regs) = (unsigned long) &frame->uc; -+ -+ if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) -+ ptrace_notify(SIGTRAP); -+ return(0); -+} -+ -+long sys_sigreturn(struct pt_regs regs) -+{ -+ unsigned long __user sp = PT_REGS_SP(¤t->thread.regs); -+ struct sigframe __user *frame = (struct sigframe *)(sp - 8); -+ sigset_t set; -+ struct sigcontext __user *sc = &frame->sc; -+ unsigned long __user *oldmask = &sc->oldmask; -+ unsigned long __user *extramask = &frame->extramask; -+ int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long); -+ -+ if(copy_from_user(&set.sig[0], oldmask, sizeof(&set.sig[0])) || -+ copy_from_user(&set.sig[1], extramask, sig_size)) -+ goto segfault; -+ -+ sigdelsetmask(&set, ~_BLOCKABLE); -+ -+ spin_lock_irq(¤t->sighand->siglock); -+ current->blocked = set; -+ recalc_sigpending(); -+ spin_unlock_irq(¤t->sighand->siglock); -+ -+ if(copy_sc_from_user(¤t->thread.regs, sc)) -+ goto segfault; -+ -+ PT_REGS_SYSCALL_NR(¤t->thread.regs) = -1; /* Avoid ERESTART handling */ -+ return(PT_REGS_SYSCALL_RET(¤t->thread.regs)); -+ -+ segfault: -+ force_sig(SIGSEGV, current); -+ return 0; -+} -+ -+long sys_rt_sigreturn(struct pt_regs regs) -+{ -+ unsigned long __user sp = PT_REGS_SP(¤t->thread.regs); -+ struct rt_sigframe __user *frame = (struct rt_sigframe *) (sp - 4); -+ sigset_t set; -+ struct ucontext __user *uc = &frame->uc; -+ int sig_size = _NSIG_WORDS * sizeof(unsigned long); -+ -+ if(copy_from_user(&set, &uc->uc_sigmask, sig_size)) -+ goto segfault; -+ -+ sigdelsetmask(&set, ~_BLOCKABLE); -+ -+ spin_lock_irq(¤t->sighand->siglock); -+ current->blocked = set; -+ recalc_sigpending(); -+ spin_unlock_irq(¤t->sighand->siglock); -+ -+ if(copy_sc_from_user(¤t->thread.regs, &uc->uc_mcontext)) -+ goto segfault; -+ -+ PT_REGS_SYSCALL_NR(¤t->thread.regs) = -1; /* Avoid ERESTART handling */ -+ return(PT_REGS_SYSCALL_RET(¤t->thread.regs)); -+ -+ segfault: -+ force_sig(SIGSEGV, current); -+ return 0; -+} -+ -+/* -+ * Overrides for Emacs so that we follow Linus's tabbing style. -+ * Emacs will notice this stuff at the end of the file and automatically -+ * adjust the settings for this buffer only. This must remain at the end -+ * of the file. -+ * --------------------------------------------------------------------------- -+ * Local variables: -+ * c-file-style: "linux" -+ * End: -+ */ -Index: linux-2.6.10/arch/um/sys-i386/ptrace_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/sys-i386/ptrace_user.c 2004-12-25 05:35:50.000000000 +0800 -+++ linux-2.6.10/arch/um/sys-i386/ptrace_user.c 2005-04-07 22:05:29.480760432 +0800 -@@ -17,17 +17,30 @@ - - int ptrace_getregs(long pid, unsigned long *regs_out) - { -- return(ptrace(PTRACE_GETREGS, pid, 0, regs_out)); -+ if(ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0) -+ return(-errno); -+ return(0); - } - - int ptrace_setregs(long pid, unsigned long *regs) - { -- return(ptrace(PTRACE_SETREGS, pid, 0, regs)); -+ if(ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) -+ return(-errno); -+ return(0); - } - - int ptrace_getfpregs(long pid, unsigned long *regs) - { -- return(ptrace(PTRACE_GETFPREGS, pid, 0, regs)); -+ if(ptrace(PTRACE_GETFPREGS, pid, 0, regs) < 0) -+ return(-errno); -+ return(0); -+} -+ -+int ptrace_setfpregs(long pid, unsigned long *regs) -+{ -+ if(ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0) -+ return(-errno); -+ return(0); - } - - static void write_debugregs(int pid, unsigned long *regs) -Index: linux-2.6.10/arch/um/sys-i386/sysrq.c -=================================================================== ---- linux-2.6.10.orig/arch/um/sys-i386/sysrq.c 2004-12-25 05:33:49.000000000 +0800 -+++ linux-2.6.10/arch/um/sys-i386/sysrq.c 2005-04-07 22:05:29.480760432 +0800 -@@ -33,3 +33,13 @@ - - show_trace((unsigned long *) ®s); - } -+ -+/* Overrides for Emacs so that we follow Linus's tabbing style. -+ * Emacs will notice this stuff at the end of the file and automatically -+ * adjust the settings for this buffer only. This must remain at the end -+ * of the file. -+ * --------------------------------------------------------------------------- -+ * Local variables: -+ * c-file-style: "linux" -+ * End: -+ */ -Index: linux-2.6.10/arch/um/sys-i386/Makefile -=================================================================== ---- linux-2.6.10.orig/arch/um/sys-i386/Makefile 2004-12-25 05:34:01.000000000 +0800 -+++ linux-2.6.10/arch/um/sys-i386/Makefile 2005-04-07 22:05:29.480760432 +0800 -@@ -1,5 +1,5 @@ - obj-y = bitops.o bugs.o checksum.o fault.o ksyms.o ldt.o ptrace.o \ -- ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o -+ ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o - - obj-$(CONFIG_HIGHMEM) += highmem.o - obj-$(CONFIG_MODULES) += module.o -Index: linux-2.6.10/arch/um/sys-i386/sigcontext.c -=================================================================== ---- linux-2.6.10.orig/arch/um/sys-i386/sigcontext.c 2004-12-25 05:33:49.000000000 +0800 -+++ linux-2.6.10/arch/um/sys-i386/sigcontext.c 2005-04-07 22:05:29.480760432 +0800 -@@ -9,22 +9,14 @@ - #include <asm/sigcontext.h> - #include "sysdep/ptrace.h" - #include "kern_util.h" --#include "frame_user.h" -- --int sc_size(void *data) --{ -- struct arch_frame_data *arch = data; -- -- return(sizeof(struct sigcontext) + arch->fpstate_size); --} - - void sc_to_sc(void *to_ptr, void *from_ptr) - { - struct sigcontext *to = to_ptr, *from = from_ptr; -- int size = sizeof(*to) + signal_frame_sc.common.arch.fpstate_size; - -- memcpy(to, from, size); -- if(from->fpstate != NULL) to->fpstate = (struct _fpstate *) (to + 1); -+ memcpy(to, from, sizeof(*to) + sizeof(struct _fpstate)); -+ if(from->fpstate != NULL) -+ to->fpstate = (struct _fpstate *) (to + 1); - } - - unsigned long *sc_sigmask(void *sc_ptr) -Index: linux-2.6.10/arch/um/kernel/main.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/main.c 2004-12-25 05:35:24.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/main.c 2005-04-07 22:05:29.480760432 +0800 -@@ -81,6 +81,8 @@ - - extern int uml_exitcode; - -+extern void scan_elf_aux( char **envp); -+ - int main(int argc, char **argv, char **envp) - { - char **new_argv; -@@ -147,6 +149,8 @@ - set_handler(SIGTERM, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1); - set_handler(SIGHUP, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1); - -+ scan_elf_aux( envp); -+ - do_uml_initcalls(); - ret = linux_main(argc, argv); - -@@ -155,18 +159,20 @@ - int err; - - printf("\n"); -- -- /* Let any pending signals fire, then disable them. This -- * ensures that they won't be delivered after the exec, when -- * they are definitely not expected. -- */ -- unblock_signals(); -+ /* stop timers and set SIG*ALRM to be ignored */ - disable_timer(); -+ /* disable SIGIO for the fds and set SIGIO to be ignored */ - err = deactivate_all_fds(); - if(err) - printf("deactivate_all_fds failed, errno = %d\n", - -err); - -+ /* Let any pending signals fire now. This ensures -+ * that they won't be delivered after the exec, when -+ * they are definitely not expected. -+ */ -+ unblock_signals(); -+ - execvp(new_argv[0], new_argv); - perror("Failed to exec kernel"); - ret = 1; -Index: linux-2.6.10/arch/um/kernel/process.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/process.c 2004-12-25 05:35:25.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/process.c 2005-04-07 22:05:29.481760280 +0800 -@@ -13,6 +13,7 @@ - #include <setjmp.h> - #include <sys/time.h> - #include <sys/ptrace.h> -+#include <linux/ptrace.h> - #include <sys/wait.h> - #include <sys/mman.h> - #include <asm/ptrace.h> -@@ -285,6 +286,9 @@ - printk("Checking that ptrace can change system call numbers..."); - pid = start_ptraced_child(&stack); - -+ if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) -+ panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno); -+ - while(1){ - if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) - panic("check_ptrace : ptrace failed, errno = %d", -@@ -292,8 +296,8 @@ - CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); - if(n < 0) - panic("check_ptrace : wait failed, errno = %d", errno); -- if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) -- panic("check_ptrace : expected SIGTRAP, " -+ if(!WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP|SYSCALL_TRAP))) -+ panic("check_ptrace : expected (SIGTRAP|SYSCALL_TRAP), " - "got status = %d", status); - - syscall = ptrace(PTRACE_PEEKUSER, pid, PT_SYSCALL_NR_OFFSET, -Index: linux-2.6.10/arch/um/kernel/initrd_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/initrd_user.c 2004-12-25 05:34:26.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/initrd_user.c 2005-04-07 22:05:29.481760280 +0800 -@@ -29,6 +29,8 @@ - filename, -n); - return(-1); - } -+ -+ os_close_file(fd); - return(0); - } - -Index: linux-2.6.10/arch/um/kernel/time_kern.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/time_kern.c 2004-12-25 05:35:00.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/time_kern.c 2005-04-07 22:05:29.481760280 +0800 -@@ -170,7 +170,7 @@ - void timer_handler(int sig, union uml_pt_regs *regs) - { - local_irq_disable(); -- update_process_times(user_context(UPT_SP(regs))); -+ update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)), (regs)->skas.is_user)); - local_irq_enable(); - if(current_thread->cpu == 0) - timer_irq(regs); -Index: linux-2.6.10/arch/um/kernel/helper.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/helper.c 2004-12-25 05:34:45.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/helper.c 2005-04-07 22:05:29.482760128 +0800 -@@ -49,14 +49,14 @@ - return(0); - } - --/* XXX The alloc_stack here breaks if this is called in the tracing thread */ -- -+/* Returns either the pid of the child process we run or -E* on failure. -+ * XXX The alloc_stack here breaks if this is called in the tracing thread */ - int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv, - unsigned long *stack_out) - { - struct helper_data data; - unsigned long stack, sp; -- int pid, fds[2], err, n; -+ int pid, fds[2], ret, n; - - if((stack_out != NULL) && (*stack_out != 0)) - stack = *stack_out; -@@ -64,16 +64,16 @@ - if(stack == 0) - return(-ENOMEM); - -- err = os_pipe(fds, 1, 0); -- if(err < 0){ -- printk("run_helper : pipe failed, err = %d\n", -err); -+ ret = os_pipe(fds, 1, 0); -+ if(ret < 0){ -+ printk("run_helper : pipe failed, ret = %d\n", -ret); - goto out_free; - } - -- err = os_set_exec_close(fds[1], 1); -- if(err < 0){ -- printk("run_helper : setting FD_CLOEXEC failed, err = %d\n", -- -err); -+ ret = os_set_exec_close(fds[1], 1); -+ if(ret < 0){ -+ printk("run_helper : setting FD_CLOEXEC failed, ret = %d\n", -+ -ret); - goto out_close; - } - -@@ -85,34 +85,36 @@ - pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data); - if(pid < 0){ - printk("run_helper : clone failed, errno = %d\n", errno); -- err = -errno; -+ ret = -errno; - goto out_close; - } - - os_close_file(fds[1]); -- n = os_read_file(fds[0], &err, sizeof(err)); -+ fds[1] = -1; -+ -+ /*Read the errno value from the child.*/ -+ n = os_read_file(fds[0], &ret, sizeof(ret)); - if(n < 0){ -- printk("run_helper : read on pipe failed, err = %d\n", -n); -- err = n; -- goto out_kill; -+ printk("run_helper : read on pipe failed, ret = %d\n", -n); -+ ret = n; -+ os_kill_process(pid, 1); - } - else if(n != 0){ - CATCH_EINTR(n = waitpid(pid, NULL, 0)); -- pid = -errno; -+ ret = -errno; -+ } else { -+ ret = pid; - } - -- if(stack_out == NULL) free_stack(stack, 0); -- else *stack_out = stack; -- return(pid); -- -- out_kill: -- os_kill_process(pid, 1); - out_close: -+ if (fds[1] != -1) -+ os_close_file(fds[1]); - os_close_file(fds[0]); -- os_close_file(fds[1]); - out_free: -- free_stack(stack, 0); -- return(err); -+ if(stack_out == NULL) -+ free_stack(stack, 0); -+ else *stack_out = stack; -+ return(ret); - } - - int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, -Index: linux-2.6.10/arch/um/kernel/irq_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/irq_user.c 2004-12-25 05:34:32.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/irq_user.c 2005-04-07 22:05:29.482760128 +0800 -@@ -374,6 +374,8 @@ - if(err) - return(err); - } -+ /* If there is a signal already queued, after unblocking ignore it */ -+ set_handler(SIGIO, SIG_IGN, 0, -1); - - return(0); - } -Index: linux-2.6.10/arch/um/kernel/mem.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/mem.c 2004-12-25 05:34:32.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/mem.c 2005-04-07 22:05:29.482760128 +0800 -@@ -175,6 +175,30 @@ - } - #endif /* CONFIG_HIGHMEM */ - -+static void __init fixaddr_user_init( void) -+{ -+ long size = FIXADDR_USER_END - FIXADDR_USER_START; -+ pgd_t *pgd; -+ pmd_t *pmd; -+ pte_t *pte; -+ unsigned long paddr, vaddr = FIXADDR_USER_START; -+ -+ if ( ! size ) -+ return; -+ -+ fixrange_init( FIXADDR_USER_START, FIXADDR_USER_END, swapper_pg_dir); -+ paddr = (unsigned long)alloc_bootmem_low_pages( size); -+ memcpy( (void *)paddr, (void *)FIXADDR_USER_START, size); -+ paddr = __pa(paddr); -+ for ( ; size > 0; size-=PAGE_SIZE, vaddr+=PAGE_SIZE, paddr+=PAGE_SIZE) { -+ pgd = swapper_pg_dir + pgd_index(vaddr); -+ pmd = pmd_offset(pgd, vaddr); -+ pte = pte_offset_kernel(pmd, vaddr); -+ /*pte_set_val( (*pte), paddr, PAGE_READONLY);*/ -+ pte_val(*pte) = paddr | pgprot_val(PAGE_READONLY); -+ } -+} -+ - void paging_init(void) - { - unsigned long zones_size[MAX_NR_ZONES], vaddr; -@@ -195,6 +219,8 @@ - vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK; - fixrange_init(vaddr, FIXADDR_TOP, swapper_pg_dir); - -+ fixaddr_user_init(); -+ - #ifdef CONFIG_HIGHMEM - init_highmem(); - #endif -Index: linux-2.6.10/arch/um/kernel/skas/process.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/process.c 2004-12-25 05:35:39.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/process.c 2005-04-07 22:05:29.483759976 +0800 -@@ -11,6 +11,7 @@ - #include <sched.h> - #include <sys/wait.h> - #include <sys/ptrace.h> -+#include <linux/ptrace.h> - #include <sys/mman.h> - #include <sys/user.h> - #include <asm/unistd.h> -@@ -60,15 +61,10 @@ - /*To use the same value of using_sysemu as the caller, ask it that value (in local_using_sysemu)*/ - static void handle_trap(int pid, union uml_pt_regs *regs, int local_using_sysemu) - { -- int err, syscall_nr, status; -- -- syscall_nr = PT_SYSCALL_NR(regs->skas.regs); -- UPT_SYSCALL_NR(regs) = syscall_nr; -- if(syscall_nr < 0){ -- relay_signal(SIGTRAP, regs); -- return; -- } - -+ int err, status; -+ -+ UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->skas.regs); /* Mark this as a syscall */ - if (!local_using_sysemu) - { - err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid); -@@ -82,7 +78,8 @@ - "errno = %d\n", errno); - - CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); -- if((err < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) -+ if((err < 0) || !WIFSTOPPED(status) || -+ (WSTOPSIG(status) != (SIGTRAP|SYSCALL_TRAP))) - panic("handle_trap - failed to wait at end of syscall, " - "errno = %d, status = %d\n", errno, status); - } -@@ -131,6 +128,10 @@ - panic("start_userspace : expected SIGSTOP, got status = %d", - status); - -+ if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, (void *)PTRACE_O_TRACESYSGOOD) < 0) -+ panic("start_userspace : PTRACE_SETOPTIONS failed, errno=%d\n", -+ errno); -+ - if(munmap(stack, PAGE_SIZE) < 0) - panic("start_userspace : munmap failed, errno = %d\n", errno); - -@@ -160,15 +161,19 @@ - - regs->skas.is_user = 1; - save_registers(regs); -+ UPT_SYSCALL_NR(regs) = -1; /* Assume: It's not a syscall */ - - if(WIFSTOPPED(status)){ - switch(WSTOPSIG(status)){ - case SIGSEGV: - handle_segv(pid); - break; -- case SIGTRAP: -+ case (SIGTRAP|SYSCALL_TRAP): - handle_trap(pid, regs, local_using_sysemu); - break; -+ case SIGTRAP: -+ relay_signal(SIGTRAP, regs); -+ break; - case SIGIO: - case SIGVTALRM: - case SIGILL: -@@ -222,9 +227,10 @@ - block_signals(); - if(sigsetjmp(fork_buf, 1) == 0) - new_thread_proc(stack, handler); -- set_signals(flags); - - remove_sigstack(); -+ -+ set_signals(flags); - } - - void thread_wait(void *sw, void *fb) -Index: linux-2.6.10/arch/um/kernel/skas/sys-i386/Makefile -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/sys-i386/Makefile 2004-12-25 05:35:27.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/sys-i386/Makefile 2005-04-07 19:34:21.197950744 +0800 -@@ -1,12 +0,0 @@ --# --# Copyright (C) 2002 Jeff Dike (jdike@karaya.com) --# Licensed under the GPL --# -- --obj-y = sigcontext.o -- --USER_OBJS = sigcontext.o --USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) -- --$(USER_OBJS) : %.o: %.c -- $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< -Index: linux-2.6.10/arch/um/kernel/skas/sys-i386/sigcontext.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/sys-i386/sigcontext.c 2004-12-25 05:33:51.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/sys-i386/sigcontext.c 2005-04-07 19:34:21.197950744 +0800 -@@ -1,114 +0,0 @@ --/* -- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -- * Licensed under the GPL -- */ -- --#include <errno.h> --#include <asm/sigcontext.h> --#include <sys/ptrace.h> --#include <linux/ptrace.h> --#include "sysdep/ptrace.h" --#include "sysdep/ptrace_user.h" --#include "kern_util.h" --#include "user.h" --#include "sigcontext.h" --#include "mode.h" -- --int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs, void *from_ptr) --{ -- struct sigcontext sc, *from = from_ptr; -- unsigned long fpregs[FP_FRAME_SIZE]; -- int err; -- -- err = copy_from_user_proc(&sc, from, sizeof(sc)); -- err |= copy_from_user_proc(fpregs, sc.fpstate, sizeof(fpregs)); -- if(err) -- return(err); -- -- regs->skas.regs[GS] = sc.gs; -- regs->skas.regs[FS] = sc.fs; -- regs->skas.regs[ES] = sc.es; -- regs->skas.regs[DS] = sc.ds; -- regs->skas.regs[EDI] = sc.edi; -- regs->skas.regs[ESI] = sc.esi; -- regs->skas.regs[EBP] = sc.ebp; -- regs->skas.regs[UESP] = sc.esp; -- regs->skas.regs[EBX] = sc.ebx; -- regs->skas.regs[EDX] = sc.edx; -- regs->skas.regs[ECX] = sc.ecx; -- regs->skas.regs[EAX] = sc.eax; -- regs->skas.regs[EIP] = sc.eip; -- regs->skas.regs[CS] = sc.cs; -- regs->skas.regs[EFL] = sc.eflags; -- regs->skas.regs[SS] = sc.ss; -- regs->skas.fault_addr = sc.cr2; -- regs->skas.fault_type = FAULT_WRITE(sc.err); -- regs->skas.trap_type = sc.trapno; -- -- err = ptrace(PTRACE_SETFPREGS, pid, 0, fpregs); -- if(err < 0){ -- printk("copy_sc_to_user - PTRACE_SETFPREGS failed, " -- "errno = %d\n", errno); -- return(1); -- } -- -- return(0); --} -- --int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp, -- union uml_pt_regs *regs, unsigned long fault_addr, -- int fault_type) --{ -- struct sigcontext sc, *to = to_ptr; -- struct _fpstate *to_fp; -- unsigned long fpregs[FP_FRAME_SIZE]; -- int err; -- -- sc.gs = regs->skas.regs[GS]; -- sc.fs = regs->skas.regs[FS]; -- sc.es = regs->skas.regs[ES]; -- sc.ds = regs->skas.regs[DS]; -- sc.edi = regs->skas.regs[EDI]; -- sc.esi = regs->skas.regs[ESI]; -- sc.ebp = regs->skas.regs[EBP]; -- sc.esp = regs->skas.regs[UESP]; -- sc.ebx = regs->skas.regs[EBX]; -- sc.edx = regs->skas.regs[EDX]; -- sc.ecx = regs->skas.regs[ECX]; -- sc.eax = regs->skas.regs[EAX]; -- sc.eip = regs->skas.regs[EIP]; -- sc.cs = regs->skas.regs[CS]; -- sc.eflags = regs->skas.regs[EFL]; -- sc.esp_at_signal = regs->skas.regs[UESP]; -- sc.ss = regs->skas.regs[SS]; -- sc.cr2 = fault_addr; -- sc.err = TO_SC_ERR(fault_type); -- sc.trapno = regs->skas.trap_type; -- -- err = ptrace(PTRACE_GETFPREGS, pid, 0, fpregs); -- if(err < 0){ -- printk("copy_sc_to_user - PTRACE_GETFPREGS failed, " -- "errno = %d\n", errno); -- return(1); -- } -- to_fp = (struct _fpstate *) -- (fp ? (unsigned long) fp : ((unsigned long) to + sizeof(*to))); -- sc.fpstate = to_fp; -- -- if(err) -- return(err); -- -- return(copy_to_user_proc(to, &sc, sizeof(sc)) || -- copy_to_user_proc(to_fp, fpregs, sizeof(fpregs))); --} -- --/* -- * Overrides for Emacs so that we follow Linus's tabbing style. -- * Emacs will notice this stuff at the end of the file and automatically -- * adjust the settings for this buffer only. This must remain at the end -- * of the file. -- * --------------------------------------------------------------------------- -- * Local variables: -- * c-file-style: "linux" -- * End: -- */ -Index: linux-2.6.10/arch/um/kernel/skas/process_kern.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/process_kern.c 2004-12-25 05:35:50.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/process_kern.c 2005-04-07 22:05:29.488759216 +0800 -@@ -19,7 +19,6 @@ - #include "os.h" - #include "user_util.h" - #include "tlb.h" --#include "frame.h" - #include "kern.h" - #include "mode.h" - #include "proc_mm.h" -@@ -183,7 +182,6 @@ - int start_uml_skas(void) - { - start_userspace(0); -- capture_signal_stack(); - - init_new_thread_signals(1); - uml_idle_timer(); -Index: linux-2.6.10/arch/um/kernel/skas/trap_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/trap_user.c 2004-12-25 05:34:32.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/trap_user.c 2005-04-07 22:05:29.488759216 +0800 -@@ -21,6 +21,14 @@ - int save_errno = errno; - int save_user; - -+ /* This is done because to allow SIGSEGV to be delivered inside a SEGV -+ * handler. This can happen in copy_user, and if SEGV is disabled, -+ * the process will die. -+ * XXX Figure out why this is better than SA_NODEFER -+ */ -+ if(sig == SIGSEGV) -+ change_sig(SIGSEGV, 1); -+ - r = &TASK_REGS(get_current())->skas; - save_user = r->is_user; - r->is_user = 0; -Index: linux-2.6.10/arch/um/kernel/skas/syscall_kern.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/syscall_kern.c 2004-12-25 05:35:00.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/syscall_kern.c 2005-04-07 22:05:29.488759216 +0800 -@@ -6,6 +6,7 @@ - #include "linux/sys.h" - #include "linux/ptrace.h" - #include "asm/errno.h" -+#include "linux/ptrace.h" - #include "asm/unistd.h" - #include "asm/ptrace.h" - #include "asm/current.h" -Index: linux-2.6.10/arch/um/kernel/skas/Makefile -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/Makefile 2004-12-25 05:34:30.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/Makefile 2005-04-07 22:05:29.488759216 +0800 -@@ -4,8 +4,7 @@ - # - - obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \ -- syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o \ -- sys-$(SUBARCH)/ -+ syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o - - subdir-y := util - -Index: linux-2.6.10/arch/um/kernel/skas/include/mmu-skas.h -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/include/mmu-skas.h 2004-12-25 05:35:24.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/include/mmu-skas.h 2005-04-07 22:05:29.488759216 +0800 -@@ -22,3 +22,27 @@ - * c-file-style: "linux" - * End: - */ -+/* -+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -+ * Licensed under the GPL -+ */ -+ -+#ifndef __SKAS_MMU_H -+#define __SKAS_MMU_H -+ -+struct mmu_context_skas { -+ int mm_fd; -+}; -+ -+#endif -+ -+/* -+ * Overrides for Emacs so that we follow Linus's tabbing style. -+ * Emacs will notice this stuff at the end of the file and automatically -+ * adjust the settings for this buffer only. This must remain at the end -+ * of the file. -+ * --------------------------------------------------------------------------- -+ * Local variables: -+ * c-file-style: "linux" -+ * End: -+ */ -Index: linux-2.6.10/arch/um/kernel/skas/include/mode-skas.h -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/include/mode-skas.h 2004-12-25 05:34:58.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/include/mode-skas.h 2005-04-07 22:05:29.489759064 +0800 -@@ -14,6 +14,40 @@ - extern int have_fpx_regs; - - extern void user_time_init_skas(void); -+extern void sig_handler_common_skas(int sig, void *sc_ptr); -+extern void halt_skas(void); -+extern void reboot_skas(void); -+extern void kill_off_processes_skas(void); -+extern int is_skas_winch(int pid, int fd, void *data); -+ -+#endif -+ -+/* -+ * Overrides for Emacs so that we follow Linus's tabbing style. -+ * Emacs will notice this stuff at the end of the file and automatically -+ * adjust the settings for this buffer only. This must remain at the end -+ * of the file. -+ * --------------------------------------------------------------------------- -+ * Local variables: -+ * c-file-style: "linux" -+ * End: -+ */ -+/* -+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -+ * Licensed under the GPL -+ */ -+ -+#ifndef __MODE_SKAS_H__ -+#define __MODE_SKAS_H__ -+ -+#include <sysdep/ptrace.h> -+ -+extern unsigned long exec_regs[]; -+extern unsigned long exec_fp_regs[]; -+extern unsigned long exec_fpx_regs[]; -+extern int have_fpx_regs; -+ -+extern void user_time_init_skas(void); - extern int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs, - void *from_ptr); - extern int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp, -Index: linux-2.6.10/arch/um/kernel/skas/include/uaccess-skas.h -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/skas/include/uaccess-skas.h 2004-12-25 05:34:32.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/skas/include/uaccess-skas.h 2005-04-07 22:05:29.489759064 +0800 -@@ -7,6 +7,51 @@ - #define __SKAS_UACCESS_H - - #include "asm/errno.h" -+#include "asm/fixmap.h" -+ -+#define access_ok_skas(type, addr, size) \ -+ ((segment_eq(get_fs(), KERNEL_DS)) || \ -+ (((unsigned long) (addr) < TASK_SIZE) && \ -+ ((unsigned long) (addr) + (size) <= TASK_SIZE)) || \ -+ ((type == VERIFY_READ ) && \ -+ ((unsigned long) (addr) >= FIXADDR_USER_START) && \ -+ ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \ -+ ((unsigned long) (addr) + (size) >= (unsigned long)(addr)))) -+ -+static inline int verify_area_skas(int type, const void * addr, -+ unsigned long size) -+{ -+ return(access_ok_skas(type, addr, size) ? 0 : -EFAULT); -+} -+ -+extern int copy_from_user_skas(void *to, const void *from, int n); -+extern int copy_to_user_skas(void *to, const void *from, int n); -+extern int strncpy_from_user_skas(char *dst, const char *src, int count); -+extern int __clear_user_skas(void *mem, int len); -+extern int clear_user_skas(void *mem, int len); -+extern int strnlen_user_skas(const void *str, int len); -+ -+#endif -+ -+/* -+ * Overrides for Emacs so that we follow Linus's tabbing style. -+ * Emacs will notice this stuff at the end of the file and automatically -+ * adjust the settings for this buffer only. This must remain at the end -+ * of the file. -+ * --------------------------------------------------------------------------- -+ * Local variables: -+ * c-file-style: "linux" -+ * End: -+ */ -+/* -+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -+ * Licensed under the GPL -+ */ -+ -+#ifndef __SKAS_UACCESS_H -+#define __SKAS_UACCESS_H -+ -+#include "asm/errno.h" - - #define access_ok_skas(type, addr, size) \ - ((segment_eq(get_fs(), KERNEL_DS)) || \ -Index: linux-2.6.10/arch/um/kernel/tt/syscall_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/tt/syscall_user.c 2004-12-25 05:35:01.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/tt/syscall_user.c 2005-04-07 22:05:29.489759064 +0800 -@@ -42,37 +42,31 @@ - syscall_trace(regs, 1); - record_syscall_end(index, result); - } -- --int do_syscall(void *task, int pid, int local_using_sysemu) --{ -- unsigned long proc_regs[FRAME_SIZE]; -- union uml_pt_regs *regs; -- int syscall; -- -- if(ptrace_getregs(pid, proc_regs) < 0) -- tracer_panic("Couldn't read registers"); -- syscall = PT_SYSCALL_NR(proc_regs); -- -- regs = TASK_REGS(task); -- UPT_SYSCALL_NR(regs) = syscall; -- -- if(syscall < 0) -- return(0); -- -- if((syscall != __NR_sigreturn) && -- ((unsigned long *) PT_IP(proc_regs) >= &_stext) && -- ((unsigned long *) PT_IP(proc_regs) <= &_etext)) -- tracer_panic("I'm tracing myself and I can't get out"); -- -- if(local_using_sysemu) -- return(1); -- -- if(ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, -- __NR_getpid) < 0) -- tracer_panic("do_syscall : Nullifying syscall failed, " -- "errno = %d", errno); -- return(1); --} -+ -+ void do_sigtrap(void *task) -+ { -+ UPT_SYSCALL_NR(TASK_REGS(task)) = -1; -+ } -+ -+ void do_syscall(void *task, int pid, int local_using_sysemu) -+ { -+ unsigned long proc_regs[FRAME_SIZE]; -+ -+ if(ptrace_getregs(pid, proc_regs) < 0) -+ tracer_panic("Couldn't read registers"); -+ -+ UPT_SYSCALL_NR(TASK_REGS(task)) = PT_SYSCALL_NR(proc_regs); -+ -+ if(((unsigned long *) PT_IP(proc_regs) >= &_stext) && -+ ((unsigned long *) PT_IP(proc_regs) <= &_etext)) -+ tracer_panic("I'm tracing myself and I can't get out"); -+ -+ /* syscall number -1 in sysemu skips syscall restarting in host */ -+ if(ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, -+ local_using_sysemu ? -1 : __NR_getpid) < 0) -+ tracer_panic("do_syscall : Nullifying syscall failed, " -+ "errno = %d", errno); -+ } - - /* - * Overrides for Emacs so that we follow Linus's tabbing style. -Index: linux-2.6.10/arch/um/kernel/tt/sys-i386/Makefile -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/tt/sys-i386/Makefile 2004-12-25 05:34:32.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/tt/sys-i386/Makefile 2005-04-07 19:34:21.197950744 +0800 -@@ -1,12 +0,0 @@ --# --# Copyright (C) 2002 Jeff Dike (jdike@karaya.com) --# Licensed under the GPL --# -- --obj-y = sigcontext.o -- --USER_OBJS = sigcontext.o --USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) -- --$(USER_OBJS) : %.o: %.c -- $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< -Index: linux-2.6.10/arch/um/kernel/tt/sys-i386/sigcontext.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/tt/sys-i386/sigcontext.c 2004-12-25 05:35:39.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/tt/sys-i386/sigcontext.c 2005-04-07 19:34:21.197950744 +0800 -@@ -1,60 +0,0 @@ --/* -- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -- * Licensed under the GPL -- */ -- --#include <stdlib.h> --#include <asm/sigcontext.h> --#include "kern_util.h" --#include "sysdep/frame.h" -- --int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data) --{ -- struct arch_frame_data *arch = data; -- struct sigcontext *to = to_ptr, *from = from_ptr; -- struct _fpstate *to_fp, *from_fp; -- unsigned long sigs; -- int err; -- -- to_fp = to->fpstate; -- from_fp = from->fpstate; -- sigs = to->oldmask; -- err = copy_from_user_proc(to, from, sizeof(*to)); -- to->oldmask = sigs; -- if(to_fp != NULL){ -- err |= copy_from_user_proc(&to->fpstate, &to_fp, -- sizeof(to->fpstate)); -- err |= copy_from_user_proc(to_fp, from_fp, arch->fpstate_size); -- } -- return(err); --} -- --int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr, void *data) --{ -- struct arch_frame_data *arch = data; -- struct sigcontext *to = to_ptr, *from = from_ptr; -- struct _fpstate *to_fp, *from_fp; -- int err; -- -- to_fp = (struct _fpstate *) -- (fp ? (unsigned long) fp : ((unsigned long) to + sizeof(*to))); -- from_fp = from->fpstate; -- err = copy_to_user_proc(to, from, sizeof(*to)); -- if(from_fp != NULL){ -- err |= copy_to_user_proc(&to->fpstate, &to_fp, -- sizeof(to->fpstate)); -- err |= copy_to_user_proc(to_fp, from_fp, arch->fpstate_size); -- } -- return(err); --} -- --/* -- * Overrides for Emacs so that we follow Linus's tabbing style. -- * Emacs will notice this stuff at the end of the file and automatically -- * adjust the settings for this buffer only. This must remain at the end -- * of the file. -- * --------------------------------------------------------------------------- -- * Local variables: -- * c-file-style: "linux" -- * End: -- */ -Index: linux-2.6.10/arch/um/kernel/tt/exec_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/tt/exec_user.c 2004-12-25 05:35:24.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/tt/exec_user.c 2005-04-07 22:05:29.490758912 +0800 -@@ -10,6 +10,7 @@ - #include <errno.h> - #include <sys/wait.h> - #include <sys/ptrace.h> -+#include <linux/ptrace.h> - #include <signal.h> - #include "user_util.h" - #include "kern_util.h" -@@ -35,7 +36,10 @@ - tracer_panic("do_exec failed to get registers - errno = %d", - errno); - -- kill(old_pid, SIGKILL); -+ os_kill_ptraced_process(old_pid, 0); -+ -+ if (ptrace(PTRACE_OLDSETOPTIONS, new_pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) -+ tracer_panic("do_exec: PTRACE_SETOPTIONS failed, errno = %d", errno); - - if(ptrace_setregs(new_pid, regs) < 0) - tracer_panic("do_exec failed to start new proc - errno = %d", -Index: linux-2.6.10/arch/um/kernel/tt/tracer.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/tt/tracer.c 2004-12-25 05:33:49.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/tt/tracer.c 2005-04-07 22:10:59.446598000 +0800 -@@ -13,6 +13,7 @@ - #include <string.h> - #include <sys/mman.h> - #include <sys/ptrace.h> -+#include <linux/ptrace.h> - #include <sys/time.h> - #include <sys/wait.h> - #include "user.h" -@@ -25,7 +26,6 @@ - #include "mem_user.h" - #include "process.h" - #include "kern_util.h" --#include "frame.h" - #include "chan_user.h" - #include "ptrace_user.h" - #include "mode.h" -@@ -72,6 +72,8 @@ - (ptrace(PTRACE_CONT, pid, 0, 0) < 0)) - tracer_panic("OP_FORK failed to attach pid"); - wait_for_stop(pid, SIGSTOP, PTRACE_CONT, NULL); -+ if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) -+ tracer_panic("OP_FORK: PTRACE_SETOPTIONS failed, errno = %d", errno); - if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) - tracer_panic("OP_FORK failed to continue process"); - } -@@ -141,7 +143,7 @@ - * any more, the trace of those will land here. So, we need to just - * PTRACE_SYSCALL it. - */ -- case SIGTRAP: -+ case (SIGTRAP|SYSCALL_TRAP): - if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) - tracer_panic("sleeping_process_signal : Failed to " - "PTRACE_SYSCALL pid %d, errno = %d\n", -@@ -184,9 +186,8 @@ - unsigned long eip = 0; - int status, pid = 0, sig = 0, cont_type, tracing = 0, op = 0; - int last_index, proc_id = 0, n, err, old_tracing = 0, strace = 0; -- int pt_syscall_parm, local_using_sysemu; -+ int pt_syscall_parm, local_using_sysemu = 0; - -- capture_signal_stack(); - signal(SIGPIPE, SIG_IGN); - setup_tracer_winch(); - tracing_pid = os_getpid(); -@@ -198,6 +199,10 @@ - printf("waitpid on idle thread failed, errno = %d\n", errno); - exit(1); - } -+ if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) { -+ printf("Failed to PTRACE_SETOPTIONS for idle thread, errno = %d\n", errno); -+ exit(1); -+ } - if((ptrace(PTRACE_CONT, pid, 0, 0) < 0)){ - printf("Failed to continue idle thread, errno = %d\n", errno); - exit(1); -@@ -265,7 +270,25 @@ - #endif - else if(WIFSIGNALED(status)){ - sig = WTERMSIG(status); -- if(sig != 9){ -+ if(sig == SIGKILL){ -+ /* This is to make sure that processes die -+ * immediately without becoming zombies on -+ * all hosts. Before 2.6.9, kill(pid, SIGKILL) -+ * was enough to make sure a process went away -+ * immediately. After 2.6.9, they don't run -+ * any more, but they remain as zombies. So, -+ * a PTRACE_CONT is necessary in order to put -+ * them in a normal run state so that they die. -+ * I do a PTRACE_KILL here for good measure. -+ * Might as well kill it by all available -+ * means. These calls will likely fail when -+ * they are not needed because the process has -+ * already disappeared. However, they don't -+ * hurt. -+ */ -+ ptrace(PTRACE_KILL, pid, 0, 0); -+ ptrace(PTRACE_CONT, pid, 0, 0); -+ } else { - printf("Child %d exited with signal %d\n", pid, - sig); - } -@@ -297,7 +320,8 @@ - task = cpu_tasks[proc_id].task; - tracing = is_tracing(task); - old_tracing = tracing; -- -+ if ( tracing ) /* Assume: no syscall, when coming from user */ -+ do_sigtrap(task); - local_using_sysemu = get_using_sysemu(); - pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL; - -@@ -306,6 +330,15 @@ - sig = 0; - op = do_proc_op(task, proc_id); - switch(op){ -+ /* -+ * This is called when entering user mode; after -+ * this, we start intercepting syscalls. -+ * -+ * In fact, a process is started in kernel mode, -+ * so with is_tracing() == 0 (and that is reset -+ * when executing syscalls, since UML kernel has -+ * the right to do syscalls); -+ */ - case OP_TRACE_ON: - arch_leave_kernel(task, pid); - tracing = 1; -@@ -314,7 +347,13 @@ - case OP_HALT: - unmap_physmem(); - kmalloc_ok = 0; -- ptrace(PTRACE_KILL, pid, 0, 0); -+ os_kill_ptraced_process(pid, 0); -+ /* Now let's reap remaining zombies */ -+ errno = 0; -+ do { -+ waitpid(-1, &status, -+ WUNTRACED); -+ } while (errno != ECHILD); - return(op == OP_REBOOT); - case OP_NONE: - printf("Detaching pid %d\n", pid); -@@ -328,14 +367,26 @@ - */ - pid = cpu_tasks[proc_id].pid; - break; -+ case (SIGTRAP|SYSCALL_TRAP): -+ if(!tracing && (debugger_pid != -1)){ -+ child_signal(pid, W_STOPCODE(SIGTRAP)); -+ continue; -+ } -+ tracing = 0; -+ /* local_using_sysemu has been already set -+ * below, since if we are here, is_tracing() on -+ * the traced task was 1, i.e. the process had -+ * already run through one iteration of the -+ * loop which executed a OP_TRACE_ON request.*/ -+ do_syscall(task, pid, local_using_sysemu); -+ sig = SIGUSR2; -+ break; - case SIGTRAP: - if(!tracing && (debugger_pid != -1)){ - child_signal(pid, status); - continue; - } - tracing = 0; -- if(do_syscall(task, pid, local_using_sysemu)) -- sig = SIGUSR2; - break; - case SIGPROF: - if(tracing) sig = 0; -@@ -371,6 +422,9 @@ - continue; - } - -+ local_using_sysemu = get_using_sysemu(); -+ pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL; -+ - if(tracing){ - if(singlestepping(task)) - cont_type = PTRACE_SINGLESTEP; -Index: linux-2.6.10/arch/um/kernel/tt/Makefile -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/tt/Makefile 2004-12-25 05:34:57.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/tt/Makefile 2005-04-07 22:05:29.491758760 +0800 -@@ -8,7 +8,7 @@ - - obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ - syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ -- uaccess.o uaccess_user.o sys-$(SUBARCH)/ -+ uaccess.o uaccess_user.o - - obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/ - -Index: linux-2.6.10/arch/um/kernel/tt/include/mode-tt.h -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/tt/include/mode-tt.h 2004-12-25 05:35:01.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/tt/include/mode-tt.h 2005-04-07 22:05:29.491758760 +0800 -@@ -14,6 +14,41 @@ - - extern int tracer(int (*init_proc)(void *), void *sp); - extern void user_time_init_tt(void); -+extern void sig_handler_common_tt(int sig, void *sc); -+extern void syscall_handler_tt(int sig, union uml_pt_regs *regs); -+extern void reboot_tt(void); -+extern void halt_tt(void); -+extern int is_tracer_winch(int pid, int fd, void *data); -+extern void kill_off_processes_tt(void); -+ -+#endif -+ -+/* -+ * Overrides for Emacs so that we follow Linus's tabbing style. -+ * Emacs will notice this stuff at the end of the file and automatically -+ * adjust the settings for this buffer only. This must remain at the end -+ * of the file. -+ * --------------------------------------------------------------------------- -+ * Local variables: -+ * c-file-style: "linux" -+ * End: -+ */ -+/* -+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -+ * Licensed under the GPL -+ */ -+ -+#ifndef __MODE_TT_H__ -+#define __MODE_TT_H__ -+ -+#include "sysdep/ptrace.h" -+ -+enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB }; -+ -+extern int tracing_pid; -+ -+extern int tracer(int (*init_proc)(void *), void *sp); -+extern void user_time_init_tt(void); - extern int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data); - extern int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr, - void *data); -Index: linux-2.6.10/arch/um/kernel/tt/include/tt.h -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/tt/include/tt.h 2004-12-25 05:34:58.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/tt/include/tt.h 2005-04-07 22:05:29.491758760 +0800 -@@ -26,7 +26,8 @@ - extern int is_tracing(void *task); - extern void syscall_handler(int sig, union uml_pt_regs *regs); - extern void exit_kernel(int pid, void *task); --extern int do_syscall(void *task, int pid, int local_using_sysemu); -+extern void do_syscall(void *task, int pid, int local_using_sysemu); -+extern void do_sigtrap(void *task); - extern int is_valid_pid(int pid); - extern void remap_data(void *segment_start, void *segment_end, int w); - -Index: linux-2.6.10/arch/um/kernel/ptrace.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/ptrace.c 2004-12-25 05:35:50.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/ptrace.c 2005-04-07 22:05:29.491758760 +0800 -@@ -16,6 +16,7 @@ - #include "asm/uaccess.h" - #include "kern_util.h" - #include "ptrace_user.h" -+#include "signal_user.h" - - /* - * Called by kernel/ptrace.c when detaching.. -@@ -328,8 +329,10 @@ - /* the 0x80 provides a way for the tracing parent to distinguish - between a syscall stop and SIGTRAP delivery */ - tracesysgood = (current->ptrace & PT_TRACESYSGOOD) && !is_singlestep; -- ptrace_notify(SIGTRAP | (tracesysgood ? 0x80 : 0)); -- -+ ptrace_notify(SIGTRAP | (tracesysgood ? SYSCALL_TRAP : 0)); -+ if ( entryexit ) /* force do_signal() --> is_syscall() */ -+ set_thread_flag(TIF_SIGPENDING); -+ - /* force do_signal() --> is_syscall() */ - set_thread_flag(TIF_SIGPENDING); - -Index: linux-2.6.10/arch/um/kernel/dyn.lds.S -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/dyn.lds.S 2004-12-25 05:34:48.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/dyn.lds.S 2005-04-07 22:05:29.492758608 +0800 -@@ -7,8 +7,11 @@ - - SECTIONS - { -+ PROVIDE (__executable_start = START); - . = START + SIZEOF_HEADERS; - .interp : { *(.interp) } -+ /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start -+ * is remapped.*/ - __binary_start = .; - . = ALIGN(4096); /* Init code and data */ - _stext = .; -Index: linux-2.6.10/arch/um/kernel/um_arch.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/um_arch.c 2004-12-25 05:35:24.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/um_arch.c 2005-04-07 22:05:29.492758608 +0800 -@@ -44,11 +44,6 @@ - .ipi_pipe = { -1, -1 } - }; - --/* Placeholder to make UML link until the vsyscall stuff is actually -- * implemented -- */ --void *__kernel_vsyscall; -- - unsigned long thread_saved_pc(struct task_struct *task) - { - return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas, -@@ -326,6 +321,11 @@ - */ - check_tmpexec(); - -+ /* Need to check this early because mmapping happens before the -+ * kernel is running. -+ */ -+ check_tmpexec(); -+ - brk_start = (unsigned long) sbrk(0); - CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start); - /* Increase physical memory size for exec-shield users -Index: linux-2.6.10/arch/um/kernel/time.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/time.c 2004-12-25 05:34:26.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/time.c 2005-04-07 22:05:29.492758608 +0800 -@@ -60,6 +60,9 @@ - (setitimer(ITIMER_REAL, &disable, NULL) < 0)) - printk("disnable_timer - setitimer failed, errno = %d\n", - errno); -+ /* If there are signals already queued, after unblocking ignore them */ -+ set_handler(SIGALRM, SIG_IGN, 0, -1); -+ set_handler(SIGVTALRM, SIG_IGN, 0, -1); - } - - void switch_timers(int to_real) -Index: linux-2.6.10/arch/um/kernel/process_kern.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/process_kern.c 2004-12-25 05:34:57.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/process_kern.c 2005-04-07 22:05:29.493758456 +0800 -@@ -291,8 +291,6 @@ - - EXPORT_SYMBOL(disable_hlt); - --extern int signal_frame_size; -- - void *um_kmalloc(int size) - { - return(kmalloc(size, GFP_KERNEL)); -Index: linux-2.6.10/arch/um/kernel/trap_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/trap_user.c 2004-12-25 05:34:44.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/trap_user.c 2005-04-07 22:05:29.493758456 +0800 -@@ -18,7 +18,6 @@ - #include "sigcontext.h" - #include "sysdep/sigcontext.h" - #include "irq_user.h" --#include "frame_user.h" - #include "signal_user.h" - #include "time_user.h" - #include "task.h" -Index: linux-2.6.10/arch/um/kernel/signal_kern.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/signal_kern.c 2004-12-25 05:34:58.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/signal_kern.c 2005-04-07 22:05:29.493758456 +0800 -@@ -230,53 +230,6 @@ - return(do_sigaltstack(uss, uoss, PT_REGS_SP(¤t->thread.regs))); - } - --extern int userspace_pid[]; -- --static int copy_sc_from_user(struct pt_regs *to, void *from, -- struct arch_frame_data *arch) --{ -- int ret; -- -- ret = CHOOSE_MODE(copy_sc_from_user_tt(UPT_SC(&to->regs), from, arch), -- copy_sc_from_user_skas(userspace_pid[0], -- &to->regs, from)); -- return(ret); --} -- --long sys_sigreturn(struct pt_regs regs) --{ -- void __user *sc = sp_to_sc(PT_REGS_SP(¤t->thread.regs)); -- void __user *mask = sp_to_mask(PT_REGS_SP(¤t->thread.regs)); -- int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long); -- -- spin_lock_irq(¤t->sighand->siglock); -- copy_from_user(¤t->blocked.sig[0], sc_sigmask(sc), -- sizeof(current->blocked.sig[0])); -- copy_from_user(¤t->blocked.sig[1], mask, sig_size); -- sigdelsetmask(¤t->blocked, ~_BLOCKABLE); -- recalc_sigpending(); -- spin_unlock_irq(¤t->sighand->siglock); -- copy_sc_from_user(¤t->thread.regs, sc, -- &signal_frame_sc.common.arch); -- return(PT_REGS_SYSCALL_RET(¤t->thread.regs)); --} -- --long sys_rt_sigreturn(struct pt_regs regs) --{ -- unsigned long sp = PT_REGS_SP(¤t->thread.regs); -- struct ucontext __user *uc = sp_to_uc(sp); -- int sig_size = _NSIG_WORDS * sizeof(unsigned long); -- -- spin_lock_irq(¤t->sighand->siglock); -- copy_from_user(¤t->blocked, &uc->uc_sigmask, sig_size); -- sigdelsetmask(¤t->blocked, ~_BLOCKABLE); -- recalc_sigpending(); -- spin_unlock_irq(¤t->sighand->siglock); -- copy_sc_from_user(¤t->thread.regs, &uc->uc_mcontext, -- &signal_frame_si.common.arch); -- return(PT_REGS_SYSCALL_RET(¤t->thread.regs)); --} -- - /* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically -Index: linux-2.6.10/arch/um/kernel/uml.lds.S -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/uml.lds.S 2004-12-25 05:34:44.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/uml.lds.S 2005-04-07 22:05:29.494758304 +0800 -@@ -7,8 +7,12 @@ - - SECTIONS - { -+ /*This must contain the right address - not quite the default ELF one.*/ -+ PROVIDE (__executable_start = START); - . = START + SIZEOF_HEADERS; - -+ /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start -+ * is remapped.*/ - __binary_start = .; - #ifdef MODE_TT - .thread_private : { -@@ -20,9 +24,13 @@ - } - . = ALIGN(4096); - .remap : { arch/um/kernel/tt/unmap_fin.o (.text) } --#endif - -+ /*If you put this after #endif, STATIC build without TT mode -+ gives a segfaulting binary. And after all, a hole just after -+ binary_start is not very polite to glibc.*/ - . = ALIGN(4096); /* Init code and data */ -+#endif -+ - _stext = .; - __init_begin = .; - .init.text : { -Index: linux-2.6.10/arch/um/kernel/ksyms.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/ksyms.c 2004-12-25 05:33:50.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/ksyms.c 2005-04-07 22:05:29.494758304 +0800 -@@ -48,6 +48,7 @@ - EXPORT_SYMBOL(mode_tt); - EXPORT_SYMBOL(handle_page_fault); - EXPORT_SYMBOL(find_iomem); -+EXPORT_SYMBOL(end_iomem); - - #ifdef CONFIG_MODE_TT - EXPORT_SYMBOL(strncpy_from_user_tt); -Index: linux-2.6.10/arch/um/kernel/signal_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/signal_user.c 2004-12-25 05:35:23.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/signal_user.c 2005-04-07 22:05:29.494758304 +0800 -@@ -61,6 +61,10 @@ - * disable profiling; it's safe because the profiling code does not interact - * with the kernel code at all.*/ - -+/* Both here and in set/get_signal we don't touch SIGPROF, because we must not -+ * disable profiling; it's safe because the profiling code does not interact -+ * with the kernel code at all.*/ -+ - static void change_signals(int type) - { - sigset_t mask; -Index: linux-2.6.10/arch/um/kernel/mem_user.c -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/mem_user.c 2004-12-25 05:34:57.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/mem_user.c 2005-04-07 22:05:29.494758304 +0800 -@@ -101,6 +101,8 @@ - } - printf("OK\n"); - munmap(addr, UM_KERN_PAGE_SIZE); -+ -+ os_close_file(fd); - } - - static int have_devanon = 0; -@@ -261,6 +263,39 @@ - } - #endif - -+#if 0 -+/* Debugging facility for dumping stuff out to the host, avoiding the timing -+ * problems that come with printf and breakpoints. -+ * Enable in case of emergency. -+ */ -+ -+int logging = 1; -+int logging_fd = -1; -+ -+int logging_line = 0; -+char logging_buf[512]; -+ -+void log(char *fmt, ...) -+{ -+ va_list ap; -+ struct timeval tv; -+ struct openflags flags; -+ -+ if(logging == 0) return; -+ if(logging_fd < 0){ -+ flags = of_create(of_trunc(of_rdwr(OPENFLAGS()))); -+ logging_fd = os_open_file("log", flags, 0644); -+ } -+ gettimeofday(&tv, NULL); -+ sprintf(logging_buf, "%d\t %u.%u ", logging_line++, tv.tv_sec, -+ tv.tv_usec); -+ va_start(ap, fmt); -+ vsprintf(&logging_buf[strlen(logging_buf)], fmt, ap); -+ va_end(ap); -+ write(logging_fd, logging_buf, strlen(logging_buf)); -+} -+#endif -+ - /* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically -Index: linux-2.6.10/arch/um/kernel/Makefile -=================================================================== ---- linux-2.6.10.orig/arch/um/kernel/Makefile 2004-12-25 05:35:01.000000000 +0800 -+++ linux-2.6.10/arch/um/kernel/Makefile 2005-04-07 22:05:29.495758152 +0800 -@@ -6,7 +6,7 @@ - extra-y := vmlinux.lds - clean-files := vmlinux.lds.S - --obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \ -+obj-y = checksum.o config.o exec_kern.o exitcode.o \ - helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ - physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \ - sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \ -Index: linux-2.6.10/arch/um/Kconfig -=================================================================== ---- linux-2.6.10.orig/arch/um/Kconfig 2004-12-25 05:34:45.000000000 +0800 -+++ linux-2.6.10/arch/um/Kconfig 2005-04-07 22:05:29.495758152 +0800 -@@ -139,6 +139,25 @@ - - It is safe to say 'Y' here. - -+config MAGIC_SYSRQ -+ bool "Magic SysRq key" -+ depends on MCONSOLE -+ ---help--- -+ If you say Y here, you will have some control over the system even -+ if the system crashes for example during kernel debugging (e.g., you -+ will be able to flush the buffer cache to disk, reboot the system -+ immediately or dump some status information). A key for each of the -+ possible requests is provided. -+ -+ This is the feature normally accomplished by pressing a key -+ while holding SysRq (Alt+PrintScreen). -+ -+ On UML, this is accomplished by sending a "sysrq" command with -+ mconsole, followed by the letter for the requested command. -+ -+ The keys are documented in <file:Documentation/sysrq.txt>. Don't say Y -+ unless you really know what this hack does. -+ - config HOST_2G_2G - bool "2G/2G host address space split" - default n -@@ -153,28 +172,28 @@ - So, if you do not know what to do here, say 'N'. - - config SMP -- bool "Symmetric multi-processing support (EXPERIMENTAL)" -- default n -- depends on MODE_TT && EXPERIMENTAL -- help -- This option enables UML SMP support. -- It is NOT related to having a real SMP box. Not directly, at least. -+ bool "Symmetric multi-processing support (EXPERIMENTAL)" -+ default n -+ depends on MODE_TT && EXPERIMENTAL -+ help -+ This option enables UML SMP support. -+ It is NOT related to having a real SMP box. Not directly, at least. -+ -+ UML implements virtual SMP by allowing as many processes to run -+ simultaneously on the host as there are virtual processors configured. -+ -+ Obviously, if the host is a uniprocessor, those processes will -+ timeshare, but, inside UML, will appear to be running simultaneously. -+ If the host is a multiprocessor, then UML processes may run -+ simultaneously, depending on the host scheduler. -+ -+ This, however, is supported only in TT mode. So, if you use the SKAS -+ patch on your host, switching to TT mode and enabling SMP usually gives -+ you worse performances. -+ Also, since the support for SMP has been under-developed, there could -+ be some bugs being exposed by enabling SMP. - -- UML implements virtual SMP by allowing as many processes to run -- simultaneously on the host as there are virtual processors configured. -- -- Obviously, if the host is a uniprocessor, those processes will -- timeshare, but, inside UML, will appear to be running simultaneously. -- If the host is a multiprocessor, then UML processes may run -- simultaneously, depending on the host scheduler. -- -- This, however, is supported only in TT mode. So, if you use the SKAS -- patch on your host, switching to TT mode and enabling SMP usually gives -- you worse performances. -- Also, since the support for SMP has been under-developed, there could -- be some bugs being exposed by enabling SMP. -- -- If you don't know what to do, say N. -+ If you don't know what to do, say N. - - config NR_CPUS - int "Maximum number of CPUs (2-32)" -@@ -282,4 +301,8 @@ - bool - default n - -+config INPUT -+ bool -+ default n -+ - source "arch/um/Kconfig.debug" -Index: linux-2.6.10/arch/um/include/frame.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/frame.h 2004-12-25 05:34:31.000000000 +0800 -+++ linux-2.6.10/arch/um/include/frame.h 2005-04-07 19:34:21.197950744 +0800 -@@ -1,53 +0,0 @@ --/* -- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -- * Licensed under the GPL -- */ -- --#ifndef __FRAME_H_ --#define __FRAME_H_ -- --#include "sysdep/frame.h" -- --struct frame_common { -- void *data; -- int len; -- int sig_index; -- int sr_index; -- int sr_relative; -- int sp_index; -- struct arch_frame_data arch; --}; -- --struct sc_frame { -- struct frame_common common; -- int sc_index; --}; -- --extern struct sc_frame signal_frame_sc; -- --extern struct sc_frame signal_frame_sc_sr; -- --struct si_frame { -- struct frame_common common; -- int sip_index; -- int si_index; -- int ucp_index; -- int uc_index; --}; -- --extern struct si_frame signal_frame_si; -- --extern void capture_signal_stack(void); -- --#endif -- --/* -- * Overrides for Emacs so that we follow Linus's tabbing style. -- * Emacs will notice this stuff at the end of the file and automatically -- * adjust the settings for this buffer only. This must remain at the end -- * of the file. -- * --------------------------------------------------------------------------- -- * Local variables: -- * c-file-style: "linux" -- * End: -- */ -Index: linux-2.6.10/arch/um/include/elf_user.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/elf_user.h 2005-04-07 19:34:21.197950744 +0800 -+++ linux-2.6.10/arch/um/include/elf_user.h 2005-04-07 22:05:29.495758152 +0800 -@@ -0,0 +1,19 @@ -+/* -+ * Copyright (C) 2004 Fujitsu Siemens Computers GmbH -+ * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> -+ * Licensed under the GPL -+ */ -+ -+#ifndef __ELF_USER_H__ -+#define __ELF_USER_H__ -+ -+/* For compilation on a host that doesn't support AT_SYSINFO (Linux 2.4) */ -+ -+#ifndef AT_SYSINFO -+#define AT_SYSINFO 32 -+#endif -+#ifndef AT_SYSINFO_EHDR -+#define AT_SYSINFO_EHDR 33 -+#endif -+ -+#endif -Index: linux-2.6.10/arch/um/include/signal_user.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/signal_user.h 2004-12-25 05:33:49.000000000 +0800 -+++ linux-2.6.10/arch/um/include/signal_user.h 2005-04-07 22:05:29.496758000 +0800 -@@ -14,6 +14,8 @@ - extern int set_signals(int enable); - extern int get_signals(void); - -+#define SYSCALL_TRAP 0x80 -+ - #endif - - /* -Index: linux-2.6.10/arch/um/include/skas_ptrace.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/skas_ptrace.h 2004-12-25 05:35:27.000000000 +0800 -+++ linux-2.6.10/arch/um/include/skas_ptrace.h 2005-04-07 22:05:29.496758000 +0800 -@@ -6,6 +6,7 @@ - #ifndef __SKAS_PTRACE_H - #define __SKAS_PTRACE_H - -+#ifndef PTRACE_FAULTINFO - struct ptrace_faultinfo { - int is_write; - unsigned long addr; -@@ -21,6 +22,7 @@ - #define PTRACE_SIGPENDING 53 - #define PTRACE_LDT 54 - #define PTRACE_SWITCH_MM 55 -+#endif - - #endif - -Index: linux-2.6.10/arch/um/include/frame_kern.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/frame_kern.h 2004-12-25 05:34:57.000000000 +0800 -+++ linux-2.6.10/arch/um/include/frame_kern.h 2005-04-07 22:05:29.496758000 +0800 -@@ -6,8 +6,8 @@ - #ifndef __FRAME_KERN_H_ - #define __FRAME_KERN_H_ - --#include "frame.h" --#include "sysdep/frame_kern.h" -+#define _S(nr) (1<<((nr)-1)) -+#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP))) - - extern int setup_signal_stack_sc(unsigned long stack_top, int sig, - struct k_sigaction *ka, -Index: linux-2.6.10/arch/um/include/ptrace_user.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/ptrace_user.h 2004-12-25 05:33:51.000000000 +0800 -+++ linux-2.6.10/arch/um/include/ptrace_user.h 2005-04-07 22:05:29.496758000 +0800 -@@ -26,4 +26,35 @@ - int get_using_sysemu(void); - extern int sysemu_supported; - -+ -+/* syscall emulation path in ptrace */ -+ -+#ifndef PTRACE_SYSEMU -+#define PTRACE_SYSEMU 31 -+#endif -+ -+/* On architectures, that started to support PTRACE_O_TRACESYSGOOD -+ * in linux 2.4, there are two different definitions of -+ * PTRACE_SETOPTIONS: linux 2.4 uses 21 while linux 2.6 uses 0x4200. -+ * For binary compatibility, 2.6 also supports the old "21", named -+ * PTRACE_OLDSETOPTION. On these architectures, UML always must use -+ * "21", to ensure the kernel runs on 2.4 and 2.6 host without -+ * recompilation. So, we use PTRACE_OLDSETOPTIONS in UML. -+ * We also want to be able to build the kernel on 2.4, which doesn't -+ * have PTRACE_OLDSETOPTIONS. So, if it is missing, we declare -+ * PTRACE_OLDSETOPTIONS to to be the same as PTRACE_SETOPTIONS. -+ * -+ * On architectures, that start to support PTRACE_O_TRACESYSGOOD on -+ * linux 2.6, PTRACE_OLDSETOPTIONS never is defined, and also isn't -+ * supported by the host kernel. In that case, our trick lets us use -+ * the new 0x4200 with the name PTRACE_OLDSETOPTIONS. -+ */ -+#ifndef PTRACE_OLDSETOPTIONS -+#define PTRACE_OLDSETOPTIONS PTRACE_SETOPTIONS -+#endif -+ -+void set_using_sysemu(int value); -+int get_using_sysemu(void); -+extern int sysemu_supported; -+ - #endif -Index: linux-2.6.10/arch/um/include/sysdep-i386/frame.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/sysdep-i386/frame.h 2004-12-25 05:35:01.000000000 +0800 -+++ linux-2.6.10/arch/um/include/sysdep-i386/frame.h 2005-04-07 19:34:21.197950744 +0800 -@@ -1,29 +0,0 @@ --/* -- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -- * Licensed under the GPL -- */ -- --#ifndef __FRAME_I386_H --#define __FRAME_I386_H -- --struct arch_frame_data_raw { -- unsigned long fp_start; -- unsigned long sr; --}; -- --struct arch_frame_data { -- int fpstate_size; --}; -- --#endif -- --/* -- * Overrides for Emacs so that we follow Linus's tabbing style. -- * Emacs will notice this stuff at the end of the file and automatically -- * adjust the settings for this buffer only. This must remain at the end -- * of the file. -- * --------------------------------------------------------------------------- -- * Local variables: -- * c-file-style: "linux" -- * End: -- */ -Index: linux-2.6.10/arch/um/include/sysdep-i386/frame_kern.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/sysdep-i386/frame_kern.h 2004-12-25 05:34:26.000000000 +0800 -+++ linux-2.6.10/arch/um/include/sysdep-i386/frame_kern.h 2005-04-07 19:34:21.197950744 +0800 -@@ -1,69 +0,0 @@ --/* -- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -- * Licensed under the GPL -- */ -- --#ifndef __FRAME_KERN_I386_H --#define __FRAME_KERN_I386_H -- --/* This is called from sys_sigreturn. It takes the sp at the point of the -- * sigreturn system call and returns the address of the sigcontext struct -- * on the stack. -- */ -- --static inline void *sp_to_sc(unsigned long sp) --{ -- return((void *) sp); --} -- --static inline void *sp_to_uc(unsigned long sp) --{ -- unsigned long uc; -- -- uc = sp + signal_frame_si.uc_index - -- signal_frame_si.common.sp_index - 4; -- return((void *) uc); --} -- --static inline void *sp_to_rt_sc(unsigned long sp) --{ -- unsigned long sc; -- -- sc = sp - signal_frame_si.common.sp_index + -- signal_frame_si.common.len - 4; -- return((void *) sc); --} -- --static inline void *sp_to_mask(unsigned long sp) --{ -- unsigned long mask; -- -- mask = sp - signal_frame_sc.common.sp_index + -- signal_frame_sc.common.len - 8; -- return((void *) mask); --} -- --extern int sc_size(void *data); -- --static inline void *sp_to_rt_mask(unsigned long sp) --{ -- unsigned long mask; -- -- mask = sp - signal_frame_si.common.sp_index + -- signal_frame_si.common.len + -- sc_size(&signal_frame_si.common.arch) - 4; -- return((void *) mask); --} -- --#endif -- --/* -- * Overrides for Emacs so that we follow Linus's tabbing style. -- * Emacs will notice this stuff at the end of the file and automatically -- * adjust the settings for this buffer only. This must remain at the end -- * of the file. -- * --------------------------------------------------------------------------- -- * Local variables: -- * c-file-style: "linux" -- * End: -- */ -Index: linux-2.6.10/arch/um/include/sysdep-i386/frame_user.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/sysdep-i386/frame_user.h 2004-12-25 05:35:28.000000000 +0800 -+++ linux-2.6.10/arch/um/include/sysdep-i386/frame_user.h 2005-04-07 19:34:21.197950744 +0800 -@@ -1,91 +0,0 @@ --/* -- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -- * Licensed under the GPL -- */ -- --#ifndef __FRAME_USER_I386_H --#define __FRAME_USER_I386_H -- --#include <asm/page.h> --#include "sysdep/frame.h" -- --/* This stuff is to calculate the size of the fp state struct at runtime -- * because it has changed between 2.2 and 2.4 and it would be good for a -- * UML compiled on one to work on the other. -- * So, setup_arch_frame_raw fills in the arch struct with the raw data, which -- * just contains the address of the end of the sigcontext. This is invoked -- * from the signal handler. -- * setup_arch_frame uses that data to figure out what -- * arch_frame_data.fpstate_size should be. It really has no idea, since it's -- * not allowed to do sizeof(struct fpstate) but it's safe to consider that it's -- * everything from the end of the sigcontext up to the top of the stack. So, -- * it masks off the page number to get the offset within the page and subtracts -- * that from the page size, and that's how big the fpstate struct will be -- * considered to be. -- */ -- --static inline void setup_arch_frame_raw(struct arch_frame_data_raw *data, -- void *end, unsigned long srp) --{ -- unsigned long sr = *((unsigned long *) srp); -- -- data->fp_start = (unsigned long) end; -- if((sr & PAGE_MASK) == ((unsigned long) end & PAGE_MASK)) -- data->sr = sr; -- else data->sr = 0; --} -- --static inline void setup_arch_frame(struct arch_frame_data_raw *in, -- struct arch_frame_data *out) --{ -- unsigned long fpstate_start = in->fp_start; -- -- if(in->sr == 0){ -- fpstate_start &= ~PAGE_MASK; -- out->fpstate_size = PAGE_SIZE - fpstate_start; -- } -- else { -- out->fpstate_size = in->sr - fpstate_start; -- } --} -- --/* This figures out where on the stack the SA_RESTORER function address -- * is stored. For i386, it's the signal handler return address, so it's -- * located next to the frame pointer. -- * This is inlined, so __builtin_frame_address(0) is correct. Otherwise, -- * it would have to be __builtin_frame_address(1). -- */ -- --#define frame_restorer() \ --({ \ -- unsigned long *fp; \ --\ -- fp = __builtin_frame_address(0); \ -- ((unsigned long) (fp + 1)); \ --}) -- --/* Similarly, this returns the value of sp when the handler was first -- * entered. This is used to calculate the proper sp when delivering -- * signals. -- */ -- --#define frame_sp() \ --({ \ -- unsigned long *fp; \ --\ -- fp = __builtin_frame_address(0); \ -- ((unsigned long) (fp + 1)); \ --}) -- --#endif -- --/* -- * Overrides for Emacs so that we follow Linus's tabbing style. -- * Emacs will notice this stuff at the end of the file and automatically -- * adjust the settings for this buffer only. This must remain at the end -- * of the file. -- * --------------------------------------------------------------------------- -- * Local variables: -- * c-file-style: "linux" -- * End: -- */ -Index: linux-2.6.10/arch/um/include/frame_user.h -=================================================================== ---- linux-2.6.10.orig/arch/um/include/frame_user.h 2004-12-25 05:33:50.000000000 +0800 -+++ linux-2.6.10/arch/um/include/frame_user.h 2005-04-07 19:34:21.197950744 +0800 -@@ -1,23 +0,0 @@ --/* -- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -- * Licensed under the GPL -- */ -- --#ifndef __FRAME_USER_H_ --#define __FRAME_USER_H_ -- --#include "sysdep/frame_user.h" --#include "frame.h" -- --#endif -- --/* -- * Overrides for Emacs so that we follow Linus's tabbing style. -- * Emacs will notice this stuff at the end of the file and automatically -- * adjust the settings for this buffer only. This must remain at the end -- * of the file. -- * --------------------------------------------------------------------------- -- * Local variables: -- * c-file-style: "linux" -- * End: -- */ -Index: linux-2.6.10/arch/i386/kernel/ptrace.c -=================================================================== ---- linux-2.6.10.orig/arch/i386/kernel/ptrace.c 2004-12-25 05:34:29.000000000 +0800 -+++ linux-2.6.10/arch/i386/kernel/ptrace.c 2005-04-07 22:05:29.498757696 +0800 -@@ -15,6 +15,7 @@ - #include <linux/user.h> - #include <linux/security.h> - #include <linux/audit.h> -+#include <linux/proc_mm.h> - - #include <asm/uaccess.h> - #include <asm/pgtable.h> -@@ -406,15 +407,27 @@ - } - break; - -+ case PTRACE_SYSEMU: /* continue and stop at next syscall, which will not be executed */ - case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ - case PTRACE_CONT: /* restart after signal. */ - ret = -EIO; - if ((unsigned long) data > _NSIG) - break; -+ /* If we came here with PTRACE_SYSEMU and now continue with -+ * PTRACE_SYSCALL, entry.S used to intercept the syscall return. -+ * But it shouldn't! -+ * So we don't clear TIF_SYSCALL_EMU, which is always unused in -+ * this special case, to remember, we came from SYSEMU. That -+ * flag will be cleared by do_syscall_trace(). -+ */ -+ if (request == PTRACE_SYSEMU) { -+ set_tsk_thread_flag(child, TIF_SYSCALL_EMU); -+ } else if (request == PTRACE_CONT) { -+ clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); -+ } - if (request == PTRACE_SYSCALL) { - set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); -- } -- else { -+ } else { - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - } - child->exit_code = data; -@@ -443,6 +456,8 @@ - ret = -EIO; - if ((unsigned long) data > _NSIG) - break; -+ /*See do_syscall_trace to know why we don't clear -+ * TIF_SYSCALL_EMU.*/ - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - set_singlestep(child); - child->exit_code = data; -@@ -542,6 +557,58 @@ - (struct user_desc __user *) data); - break; - -+#ifdef CONFIG_PROC_MM -+ case PTRACE_FAULTINFO: { -+ struct ptrace_faultinfo fault; -+ -+ fault = ((struct ptrace_faultinfo) -+ { .is_write = child->thread.error_code, -+ .addr = child->thread.cr2 }); -+ ret = copy_to_user((unsigned long *) data, &fault, -+ sizeof(fault)); -+ if(ret) -+ break; -+ break; -+ } -+ -+ case PTRACE_SIGPENDING: -+ ret = copy_to_user((unsigned long *) data, -+ &child->pending.signal, -+ sizeof(child->pending.signal)); -+ break; -+ -+ case PTRACE_LDT: { -+ struct ptrace_ldt ldt; -+ -+ if(copy_from_user(&ldt, (unsigned long *) data, -+ sizeof(ldt))){ -+ ret = -EIO; -+ break; -+ } -+ ret = __modify_ldt(child->mm, ldt.func, ldt.ptr, ldt.bytecount); -+ break; -+ } -+ -+ case PTRACE_SWITCH_MM: { -+ struct mm_struct *old = child->mm; -+ struct mm_struct *new = proc_mm_get_mm(data); -+ -+ if(IS_ERR(new)){ -+ ret = PTR_ERR(new); -+ break; -+ } -+ -+ atomic_inc(&new->mm_users); -+ task_lock(child); -+ child->mm = new; -+ child->active_mm = new; -+ task_unlock(child); -+ mmput(old); -+ ret = 0; -+ break; -+ } -+#endif -+ - default: - ret = ptrace_request(child, request, addr, data); - break; -@@ -557,8 +624,9 @@ - * - triggered by current->work.syscall_trace - */ - __attribute__((regparm(3))) --void do_syscall_trace(struct pt_regs *regs, int entryexit) -+int do_syscall_trace(struct pt_regs *regs, int entryexit) - { -+ int is_sysemu, is_systrace, is_singlestep; - if (unlikely(current->audit_context)) { - if (!entryexit) - audit_syscall_entry(current, regs->orig_eax, -@@ -567,16 +635,27 @@ - else - audit_syscall_exit(current, regs->eax); - } -- -- if (!test_thread_flag(TIF_SYSCALL_TRACE) && -- !test_thread_flag(TIF_SINGLESTEP)) -- return; -+ is_sysemu = test_thread_flag(TIF_SYSCALL_EMU); -+ is_systrace = test_thread_flag(TIF_SYSCALL_TRACE); -+ is_singlestep = test_thread_flag(TIF_SINGLESTEP); -+ -+ if (!is_systrace && !is_singlestep && !is_sysemu) -+ return 0; -+ /* We can detect the case of coming from PTRACE_SYSEMU and now running -+ * with PTRACE_SYSCALL or PTRACE_SINGLESTEP, by TIF_SYSCALL_EMU being -+ * set additionally. -+ * If so let's reset the flag and return without action. -+ */ -+ if (is_sysemu && (is_systrace || is_singlestep)) { -+ clear_thread_flag(TIF_SYSCALL_EMU); -+ return 0; -+ } - if (!(current->ptrace & PT_PTRACED)) -- return; -+ return 0; - /* the 0x80 provides a way for the tracing parent to distinguish - between a syscall stop and SIGTRAP delivery */ - ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) && -- !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0)); -+ !is_singlestep ? 0x80 : 0)); - - /* - * this isn't the same as continuing with a signal, but it will do -@@ -587,4 +666,6 @@ - send_sig(current->exit_code, current, 1); - current->exit_code = 0; - } -+ /* != 0 if nullifying the syscall, 0 if running it normally */ -+ return is_sysemu; - } -Index: linux-2.6.10/arch/i386/kernel/ldt.c -=================================================================== ---- linux-2.6.10.orig/arch/i386/kernel/ldt.c 2004-12-25 05:35:23.000000000 +0800 -+++ linux-2.6.10/arch/i386/kernel/ldt.c 2005-04-07 22:05:29.498757696 +0800 -@@ -18,6 +18,7 @@ - #include <asm/system.h> - #include <asm/ldt.h> - #include <asm/desc.h> -+#include <asm/mmu_context.h> - - #ifdef CONFIG_SMP /* avoids "defined but not used" warnig */ - static void flush_ldt(void *null) -@@ -27,11 +28,12 @@ - } - #endif - --static int alloc_ldt(mm_context_t *pc, int mincount, int reload) -+static int alloc_ldt(struct mm_struct *mm, int mincount, int reload) - { - void *oldldt; - void *newldt; - int oldsize; -+ mm_context_t * pc = &mm->context; - - if (mincount <= pc->size) - return 0; -@@ -58,13 +60,15 @@ - #ifdef CONFIG_SMP - cpumask_t mask; - preempt_disable(); -- load_LDT(pc); -+ if (¤t->active_mm->context == pc) -+ load_LDT(pc); - mask = cpumask_of_cpu(smp_processor_id()); -- if (!cpus_equal(current->mm->cpu_vm_mask, mask)) -+ if (!cpus_equal(mm->cpu_vm_mask, mask)) - smp_call_function(flush_ldt, NULL, 1, 1); - preempt_enable(); - #else -- load_LDT(pc); -+ if (¤t->active_mm->context == pc) -+ load_LDT(pc); - #endif - } - if (oldsize) { -@@ -76,12 +80,12 @@ - return 0; - } - --static inline int copy_ldt(mm_context_t *new, mm_context_t *old) -+static inline int copy_ldt(struct mm_struct *new, struct mm_struct *old) - { -- int err = alloc_ldt(new, old->size, 0); -+ int err = alloc_ldt(new, old->context.size, 0); - if (err < 0) - return err; -- memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); -+ memcpy(new->context.ldt, old->context.ldt, old->context.size*LDT_ENTRY_SIZE); - return 0; - } - -@@ -89,22 +93,24 @@ - * we do not have to muck with descriptors here, that is - * done in switch_mm() as needed. - */ --int init_new_context(struct task_struct *tsk, struct mm_struct *mm) -+int copy_context(struct mm_struct *mm, struct mm_struct *old_mm) - { -- struct mm_struct * old_mm; - int retval = 0; - -- init_MUTEX(&mm->context.sem); -- mm->context.size = 0; -- old_mm = current->mm; - if (old_mm && old_mm->context.size > 0) { - down(&old_mm->context.sem); -- retval = copy_ldt(&mm->context, &old_mm->context); -+ retval = copy_ldt(mm, old_mm); - up(&old_mm->context.sem); - } - return retval; - } - -+int init_new_context(struct task_struct *tsk, struct mm_struct *mm) -+{ -+ init_new_empty_context(mm); -+ return copy_context(mm, current->mm); -+} -+ - /* - * No need to lock the MM as we are the last user - */ -@@ -121,11 +127,11 @@ - } - } - --static int read_ldt(void __user * ptr, unsigned long bytecount) -+static int read_ldt(struct mm_struct * mm, void __user * ptr, -+ unsigned long bytecount) - { - int err; - unsigned long size; -- struct mm_struct * mm = current->mm; - - if (!mm->context.size) - return 0; -@@ -174,9 +180,8 @@ - return err; - } - --static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode) -+static int write_ldt(struct mm_struct * mm, void __user * ptr, unsigned long bytecount, int oldmode) - { -- struct mm_struct * mm = current->mm; - __u32 entry_1, entry_2, *lp; - int error; - struct user_desc ldt_info; -@@ -200,7 +205,7 @@ - - down(&mm->context.sem); - if (ldt_info.entry_number >= mm->context.size) { -- error = alloc_ldt(¤t->mm->context, ldt_info.entry_number+1, 1); -+ error = alloc_ldt(mm, ldt_info.entry_number+1, 1); - if (error < 0) - goto out_unlock; - } -@@ -233,23 +238,29 @@ - return error; - } - --asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount) -+int __modify_ldt(struct mm_struct * mm, int func, void __user *ptr, -+ unsigned long bytecount) - { - int ret = -ENOSYS; - - switch (func) { - case 0: -- ret = read_ldt(ptr, bytecount); -+ ret = read_ldt(mm, ptr, bytecount); - break; - case 1: -- ret = write_ldt(ptr, bytecount, 1); -+ ret = write_ldt(mm, ptr, bytecount, 1); - break; - case 2: - ret = read_default_ldt(ptr, bytecount); - break; - case 0x11: -- ret = write_ldt(ptr, bytecount, 0); -+ ret = write_ldt(mm, ptr, bytecount, 0); - break; - } - return ret; - } -+ -+asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount) -+{ -+ return __modify_ldt(current->mm, func, ptr, bytecount); -+} -Index: linux-2.6.10/arch/i386/kernel/sys_i386.c -=================================================================== ---- linux-2.6.10.orig/arch/i386/kernel/sys_i386.c 2004-12-25 05:35:39.000000000 +0800 -+++ linux-2.6.10/arch/i386/kernel/sys_i386.c 2005-04-07 22:05:29.499757544 +0800 -@@ -41,7 +41,7 @@ - } - - /* common code for old and new mmaps */ --static inline long do_mmap2( -+long do_mmap2(struct mm_struct *mm, - unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, - unsigned long fd, unsigned long pgoff) -@@ -56,9 +56,9 @@ - goto out; - } - -- down_write(¤t->mm->mmap_sem); -- error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); -- up_write(¤t->mm->mmap_sem); -+ down_write(&mm->mmap_sem); -+ error = __do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff); -+ up_write(&mm->mmap_sem); - - if (file) - fput(file); -@@ -70,7 +70,7 @@ - unsigned long prot, unsigned long flags, - unsigned long fd, unsigned long pgoff) - { -- return do_mmap2(addr, len, prot, flags, fd, pgoff); -+ return do_mmap2(current->mm, addr, len, prot, flags, fd, pgoff); - } - - /* -@@ -101,7 +101,7 @@ - if (a.offset & ~PAGE_MASK) - goto out; - -- err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); -+ err = do_mmap2(current->mm, a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); - out: - return err; - } -Index: linux-2.6.10/arch/i386/kernel/entry.S -=================================================================== ---- linux-2.6.10.orig/arch/i386/kernel/entry.S 2005-04-06 23:38:35.000000000 +0800 -+++ linux-2.6.10/arch/i386/kernel/entry.S 2005-04-07 22:05:29.499757544 +0800 -@@ -222,7 +222,7 @@ - SAVE_ALL - GET_THREAD_INFO(%ebp) - -- testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) -+ testb $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) - jnz syscall_trace_entry - cmpl $(nr_syscalls), %eax - jae syscall_badsys -@@ -245,8 +245,8 @@ - pushl %eax # save orig_eax - SAVE_ALL - GET_THREAD_INFO(%ebp) -- # system call tracing in operation -- testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) -+ # system call tracing in operation / emulation -+ testb $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) - jnz syscall_trace_entry - cmpl $(nr_syscalls), %eax - jae syscall_badsys -@@ -307,6 +307,9 @@ - movl %esp, %eax - xorl %edx,%edx - call do_syscall_trace -+ cmpl $0, %eax -+ jne syscall_exit # ret != 0 -> running under PTRACE_SYSEMU, -+ # so must skip actual syscall - movl ORIG_EAX(%esp), %eax - cmpl $(nr_syscalls), %eax - jnae syscall_call -Index: linux-2.6.10/arch/i386/Kconfig -=================================================================== ---- linux-2.6.10.orig/arch/i386/Kconfig 2005-04-06 23:38:33.000000000 +0800 -+++ linux-2.6.10/arch/i386/Kconfig 2005-04-07 22:05:29.500757392 +0800 -@@ -738,6 +738,10 @@ - depends on HIGHMEM64G - default y - -+config PROC_MM -+ bool "/proc/mm support" -+ default y -+ - # Common NUMA Features - config NUMA - bool "Numa Memory Allocation and Scheduler Support" -Index: linux-2.6.10/fs/hostfs/hostfs.h -=================================================================== ---- linux-2.6.10.orig/fs/hostfs/hostfs.h 2004-12-25 05:35:24.000000000 +0800 -+++ linux-2.6.10/fs/hostfs/hostfs.h 2005-04-07 22:05:29.500757392 +0800 -@@ -16,9 +16,30 @@ - #define HOSTFS_ATTR_CTIME 64 - #define HOSTFS_ATTR_ATIME_SET 128 - #define HOSTFS_ATTR_MTIME_SET 256 -+ -+/* These two are unused by hostfs. */ - #define HOSTFS_ATTR_FORCE 512 /* Not a change, but a change it */ - #define HOSTFS_ATTR_ATTR_FLAG 1024 - -+/* If you are very careful, you'll notice that these two are missing: -+ * -+ * #define ATTR_KILL_SUID 2048 -+ * #define ATTR_KILL_SGID 4096 -+ * -+ * and this is because they were added in 2.5 development in this patch: -+ * -+ * http://linux.bkbits.net:8080/linux-2.5/ -+ * cset@3caf4a12k4XgDzK7wyK-TGpSZ9u2Ww?nav=index.html -+ * |src/.|src/include|src/include/linux|related/include/linux/fs.h -+ * -+ * Actually, they are not needed by most ->setattr() methods - they are set by -+ * callers of notify_change() to notify that the setuid/setgid bits must be -+ * dropped. -+ * notify_change() will delete those flags, make sure attr->ia_valid & ATTR_MODE -+ * is on, and remove the appropriate bits from attr->ia_mode (attr is a -+ * "struct iattr *"). -BlaisorBlade -+ */ -+ - struct hostfs_iattr { - unsigned int ia_valid; - mode_t ia_mode; -Index: linux-2.6.10/fs/hostfs/hostfs_kern.c -=================================================================== ---- linux-2.6.10.orig/fs/hostfs/hostfs_kern.c 2004-12-25 05:34:01.000000000 +0800 -+++ linux-2.6.10/fs/hostfs/hostfs_kern.c 2005-04-07 22:05:29.501757240 +0800 -@@ -393,6 +393,7 @@ - static struct file_operations hostfs_file_fops = { - .llseek = generic_file_llseek, - .read = generic_file_read, -+ .sendfile = generic_file_sendfile, - .write = generic_file_write, - .mmap = generic_file_mmap, - .open = hostfs_file_open, -@@ -818,6 +819,10 @@ - char *name; - int err; - -+ err = inode_change_ok(dentry->d_inode, attr); -+ if (err) -+ return err; -+ - if(append) - attr->ia_valid &= ~ATTR_SIZE; - -Index: linux-2.6.10/kernel/fork.c -=================================================================== ---- linux-2.6.10.orig/kernel/fork.c 2005-04-06 23:38:35.000000000 +0800 -+++ linux-2.6.10/kernel/fork.c 2005-04-07 22:05:29.502757088 +0800 -@@ -927,6 +927,9 @@ - * of CLONE_PTRACE. - */ - clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE); -+#ifdef TIF_SYSCALL_EMU -+ clear_tsk_thread_flag(p, TIF_SYSCALL_EMU); -+#endif - - /* Our parent execution domain becomes current domain - These must match for thread signalling to apply */ -Index: linux-2.6.10/include/linux/ptrace.h -=================================================================== ---- linux-2.6.10.orig/include/linux/ptrace.h 2005-04-06 23:38:33.000000000 +0800 -+++ linux-2.6.10/include/linux/ptrace.h 2005-04-07 22:05:29.503756936 +0800 -@@ -20,6 +20,7 @@ - #define PTRACE_DETACH 0x11 - - #define PTRACE_SYSCALL 24 -+#define PTRACE_SYSEMU 31 - - /* 0x4200-0x4300 are reserved for architecture-independent additions. */ - #define PTRACE_SETOPTIONS 0x4200 -Index: linux-2.6.10/include/linux/mm.h -=================================================================== ---- linux-2.6.10.orig/include/linux/mm.h 2005-04-06 23:38:33.000000000 +0800 -+++ linux-2.6.10/include/linux/mm.h 2005-04-07 22:05:29.503756936 +0800 -@@ -625,6 +625,9 @@ - extern struct shrinker *set_shrinker(int, shrinker_t); - extern void remove_shrinker(struct shrinker *shrinker); - -+extern long do_mprotect(struct mm_struct *mm, unsigned long start, -+ size_t len, unsigned long prot); -+ - /* - * On a two-level page table, this ends up being trivial. Thus the - * inlining and the symmetry break with pte_alloc_map() that does all -@@ -684,9 +687,15 @@ - - extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); - --extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, -+extern unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file *file, -+ unsigned long addr, unsigned long len, -+ unsigned long prot, unsigned long flag, -+ unsigned long pgoff); -+static inline unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, - unsigned long len, unsigned long prot, -- unsigned long flag, unsigned long pgoff); -+ unsigned long flag, unsigned long pgoff) { -+ return __do_mmap_pgoff(current->mm, file, addr, len, prot, flag, pgoff); -+} - - static inline unsigned long do_mmap(struct file *file, unsigned long addr, - unsigned long len, unsigned long prot, -Index: linux-2.6.10/include/linux/proc_mm.h -=================================================================== ---- linux-2.6.10.orig/include/linux/proc_mm.h 2005-04-07 19:34:21.197950744 +0800 -+++ linux-2.6.10/include/linux/proc_mm.h 2005-04-07 22:05:29.503756936 +0800 -@@ -0,0 +1,48 @@ -+/* -+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) -+ * Licensed under the GPL -+ */ -+ -+#ifndef __PROC_MM_H -+#define __PROC_MM_H -+ -+#include "linux/sched.h" -+ -+#define MM_MMAP 54 -+#define MM_MUNMAP 55 -+#define MM_MPROTECT 56 -+#define MM_COPY_SEGMENTS 57 -+ -+struct mm_mmap { -+ unsigned long addr; -+ unsigned long len; -+ unsigned long prot; -+ unsigned long flags; -+ unsigned long fd; -+ unsigned long offset; -+}; -+ -+struct mm_munmap { -+ unsigned long addr; -+ unsigned long len; -+}; -+ -+struct mm_mprotect { -+ unsigned long addr; -+ unsigned long len; -+ unsigned int prot; -+}; -+ -+struct proc_mm_op { -+ int op; -+ union { -+ struct mm_mmap mmap; -+ struct mm_munmap munmap; -+ struct mm_mprotect mprotect; -+ int copy_segments; -+ } u; -+}; -+ -+extern struct mm_struct *proc_mm_get_mm(int fd); -+ -+#endif -Index: linux-2.6.10/include/asm-um/elf.h -=================================================================== ---- linux-2.6.10.orig/include/asm-um/elf.h 2004-12-25 05:35:01.000000000 +0800 -+++ linux-2.6.10/include/asm-um/elf.h 2005-04-07 22:05:29.504756784 +0800 -@@ -3,7 +3,8 @@ - - #include "asm/archparam.h" - --#define ELF_HWCAP (0) -+extern long elf_aux_hwcap; -+#define ELF_HWCAP (elf_aux_hwcap) - - #define SET_PERSONALITY(ex, ibcs2) do ; while(0) - -Index: linux-2.6.10/include/asm-um/archparam-i386.h -=================================================================== ---- linux-2.6.10.orig/include/asm-um/archparam-i386.h 2004-12-25 05:35:24.000000000 +0800 -+++ linux-2.6.10/include/asm-um/archparam-i386.h 2005-04-07 22:05:29.504756784 +0800 -@@ -10,7 +10,8 @@ - - #include "user.h" - --#define ELF_PLATFORM "i586" -+extern char * elf_aux_platform; -+#define ELF_PLATFORM (elf_aux_platform) - - #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) - -@@ -56,15 +57,13 @@ - pr_reg[16] = PT_REGS_SS(regs); \ - } while(0); - --#if 0 /* Turn this back on when UML has VSYSCALL working */ --#define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL)) --#else --#define VSYSCALL_BASE 0 --#endif - --#define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE) --#define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall) --extern void *__kernel_vsyscall; -+extern unsigned long vsyscall_ehdr; -+extern unsigned long vsyscall_end; -+extern unsigned long __kernel_vsyscall; -+ -+#define VSYSCALL_BASE vsyscall_ehdr -+#define VSYSCALL_END vsyscall_end - - /* - * Architecture-neutral AT_ values in 0-17, leave some room -@@ -75,8 +74,10 @@ - - #define ARCH_DLINFO \ - do { \ -- NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \ -- NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE); \ -+ if ( vsyscall_ehdr ) { \ -+ NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); \ -+ NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); \ -+ } \ - } while (0) - - /* -@@ -87,22 +88,18 @@ - * Dumping its extra ELF program headers includes all the other information - * a debugger needs to easily find how the vsyscall DSO was being used. - */ --#if 0 --#define ELF_CORE_EXTRA_PHDRS (VSYSCALL_EHDR->e_phnum) --#endif -- --#undef ELF_CORE_EXTRA_PHDRS -+#define ELF_CORE_EXTRA_PHDRS \ -+ (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 ) - --#if 0 - #define ELF_CORE_WRITE_EXTRA_PHDRS \ --do { \ -- const struct elf_phdr *const vsyscall_phdrs = \ -- (const struct elf_phdr *) (VSYSCALL_BASE \ -- + VSYSCALL_EHDR->e_phoff); \ -+if ( vsyscall_ehdr ) { \ -+ const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ -+ const struct elf_phdr *const phdrp = \ -+ (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ - int i; \ - Elf32_Off ofs = 0; \ -- for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \ -- struct elf_phdr phdr = vsyscall_phdrs[i]; \ -+ for (i = 0; i < ehdrp->e_phnum; ++i) { \ -+ struct elf_phdr phdr = phdrp[i]; \ - if (phdr.p_type == PT_LOAD) { \ - ofs = phdr.p_offset = offset; \ - offset += phdr.p_filesz; \ -@@ -112,23 +109,19 @@ - phdr.p_paddr = 0; /* match other core phdrs */ \ - DUMP_WRITE(&phdr, sizeof(phdr)); \ - } \ --} while (0) -+} - #define ELF_CORE_WRITE_EXTRA_DATA \ --do { \ -- const struct elf_phdr *const vsyscall_phdrs = \ -- (const struct elf_phdr *) (VSYSCALL_BASE \ -- + VSYSCALL_EHDR->e_phoff); \ -+if ( vsyscall_ehdr ) { \ -+ const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ -+ const struct elf_phdr *const phdrp = \ -+ (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ - int i; \ -- for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \ -- if (vsyscall_phdrs[i].p_type == PT_LOAD) \ -- DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \ -- vsyscall_phdrs[i].p_filesz); \ -+ for (i = 0; i < ehdrp->e_phnum; ++i) { \ -+ if (phdrp[i].p_type == PT_LOAD) \ -+ DUMP_WRITE((void *) phdrp[i].p_vaddr, \ -+ phdrp[i].p_filesz); \ - } \ --} while (0) --#endif -- --#undef ELF_CORE_WRITE_EXTRA_PHDRS --#undef ELF_CORE_WRITE_EXTRA_DATA -+} - - #define R_386_NONE 0 - #define R_386_32 1 -Index: linux-2.6.10/include/asm-um/fixmap.h -=================================================================== ---- linux-2.6.10.orig/include/asm-um/fixmap.h 2004-12-25 05:35:28.000000000 +0800 -+++ linux-2.6.10/include/asm-um/fixmap.h 2005-04-07 22:05:29.504756784 +0800 -@@ -3,6 +3,7 @@ - - #include <linux/config.h> - #include <asm/kmap_types.h> -+#include <asm/archparam.h> - - /* - * Here we define all the compile-time 'special' virtual -@@ -34,7 +35,6 @@ - FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ - FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, - #endif -- FIX_VSYSCALL, - __end_of_fixed_addresses - }; - -@@ -68,8 +68,8 @@ - * This is the range that is readable by user mode, and things - * acting like user mode such as get_user_pages. - */ --#define FIXADDR_USER_START (__fix_to_virt(FIX_VSYSCALL)) --#define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) -+#define FIXADDR_USER_START VSYSCALL_BASE -+#define FIXADDR_USER_END VSYSCALL_END - - extern void __this_fixmap_does_not_exist(void); - -Index: linux-2.6.10/include/asm-i386/thread_info.h -=================================================================== ---- linux-2.6.10.orig/include/asm-i386/thread_info.h 2004-12-25 05:34:00.000000000 +0800 -+++ linux-2.6.10/include/asm-i386/thread_info.h 2005-04-07 22:05:29.505756632 +0800 -@@ -139,6 +139,7 @@ - #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ - #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ - #define TIF_IRET 5 /* return with iret */ -+#define TIF_SYSCALL_EMU 6 /* syscall emulation active */ - #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ - #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ - -@@ -148,12 +149,14 @@ - #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) - #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) - #define _TIF_IRET (1<<TIF_IRET) -+#define _TIF_SYSCALL_EMU (1<<TIF_SYSCALL_EMU) - #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) - #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) - - /* work to do on interrupt/exception return */ - #define _TIF_WORK_MASK \ -- (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP)) -+ (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|\ -+ _TIF_SYSCALL_EMU)) - #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ - - /* -Index: linux-2.6.10/include/asm-i386/ptrace.h -=================================================================== ---- linux-2.6.10.orig/include/asm-i386/ptrace.h 2004-12-25 05:33:51.000000000 +0800 -+++ linux-2.6.10/include/asm-i386/ptrace.h 2005-04-07 22:05:29.505756632 +0800 -@@ -64,4 +64,26 @@ - #endif - #endif - -+/*For SKAS3 support.*/ -+#ifndef _LINUX_PTRACE_STRUCT_DEF -+#define _LINUX_PTRACE_STRUCT_DEF -+ -+#define PTRACE_FAULTINFO 52 -+#define PTRACE_SIGPENDING 53 -+#define PTRACE_LDT 54 -+#define PTRACE_SWITCH_MM 55 -+ -+struct ptrace_faultinfo { -+ int is_write; -+ unsigned long addr; -+}; -+ -+struct ptrace_ldt { -+ int func; -+ void *ptr; -+ unsigned long bytecount; -+}; -+ -+#endif /*ifndef _LINUX_PTRACE_STRUCT_DEF*/ -+ - #endif -Index: linux-2.6.10/include/asm-i386/mmu_context.h -=================================================================== ---- linux-2.6.10.orig/include/asm-i386/mmu_context.h 2004-12-25 05:33:48.000000000 +0800 -+++ linux-2.6.10/include/asm-i386/mmu_context.h 2005-04-07 22:05:29.505756632 +0800 -@@ -6,13 +6,25 @@ - #include <asm/atomic.h> - #include <asm/pgalloc.h> - #include <asm/tlbflush.h> -+#include <asm/semaphore.h> - - /* -- * Used for LDT copy/destruction. -+ * Used for LDT initialization/destruction. You cannot copy an LDT with -+ * init_new_context, since it thinks you are passing it a new LDT and won't -+ * deallocate its old content. - */ - int init_new_context(struct task_struct *tsk, struct mm_struct *mm); - void destroy_context(struct mm_struct *mm); - -+/* LDT initialization for a clean environment - needed for SKAS.*/ -+static inline void init_new_empty_context(struct mm_struct *mm) -+{ -+ init_MUTEX(&mm->context.sem); -+ mm->context.size = 0; -+} -+ -+/* LDT copy for SKAS - for the above problem.*/ -+int copy_context(struct mm_struct *mm, struct mm_struct *old_mm); - - static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) - { -@@ -29,6 +41,10 @@ - { - int cpu = smp_processor_id(); - -+#ifdef CONFIG_SMP -+ prev = per_cpu(cpu_tlbstate, cpu).active_mm; -+#endif -+ - if (likely(prev != next)) { - /* stop flush ipis for the previous mm */ - cpu_clear(cpu, prev->cpu_vm_mask); -@@ -50,7 +66,6 @@ - #ifdef CONFIG_SMP - else { - per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK; -- BUG_ON(per_cpu(cpu_tlbstate, cpu).active_mm != next); - - if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) { - /* We were in lazy tlb mode and leave_mm disabled -Index: linux-2.6.10/include/asm-i386/desc.h -=================================================================== ---- linux-2.6.10.orig/include/asm-i386/desc.h 2004-12-25 05:33:48.000000000 +0800 -+++ linux-2.6.10/include/asm-i386/desc.h 2005-04-07 22:05:29.505756632 +0800 -@@ -126,6 +126,9 @@ - put_cpu(); - } - -+extern int __modify_ldt(struct mm_struct * mm, int func, void __user *ptr, -+ unsigned long bytecount); -+ - #endif /* !__ASSEMBLY__ */ - - #endif diff --git a/lustre/kernel_patches/patches/uml-exprt-clearuser.patch b/lustre/kernel_patches/patches/uml-exprt-clearuser.patch deleted file mode 100644 index 22992c1da9..0000000000 --- a/lustre/kernel_patches/patches/uml-exprt-clearuser.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: uml-2.4.24/arch/um/kernel/tt/ksyms.c -=================================================================== ---- uml-2.4.24.orig/arch/um/kernel/tt/ksyms.c 2005-05-04 13:59:58.000000000 +0300 -+++ uml-2.4.24/arch/um/kernel/tt/ksyms.c 2005-05-05 23:49:51.508354472 +0300 -@@ -12,6 +12,7 @@ - EXPORT_SYMBOL(__do_strncpy_from_user); - EXPORT_SYMBOL(__do_strnlen_user); - EXPORT_SYMBOL(__do_clear_user); -+EXPORT_SYMBOL(clear_user_tt); - - EXPORT_SYMBOL(tracing_pid); - EXPORT_SYMBOL(honeypot); -Index: uml-2.4.24/arch/um/kernel/ksyms.c -=================================================================== ---- uml-2.4.24.orig/arch/um/kernel/ksyms.c 2005-05-04 13:54:24.000000000 +0300 -+++ uml-2.4.24/arch/um/kernel/ksyms.c 2005-05-05 23:50:19.649076432 +0300 -@@ -53,6 +53,7 @@ - #ifdef CONFIG_MODE_SKAS - EXPORT_SYMBOL(copy_to_user_skas); - EXPORT_SYMBOL(copy_from_user_skas); -+EXPORT_SYMBOL(clear_user_skas); - #endif - - EXPORT_SYMBOL(os_stat_fd); diff --git a/lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch b/lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch deleted file mode 100644 index 449dd660ff..0000000000 --- a/lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/fs/inode.c.orig 2007-10-01 16:42:24.567821866 +0100 -+++ b/fs/inode.c 2007-10-01 16:43:30.022037788 +0100 -@@ -288,6 +288,12 @@ - if (inode->i_data.nrpages) - truncate_inode_pages(&inode->i_data, 0); - clear_inode(inode); -+ -+ spin_lock(&inode_lock); -+ hlist_del_init(&inode->i_hash); -+ spin_unlock(&inode_lock); -+ -+ wake_up_inode(inode); - destroy_inode(inode); - nr_disposed++; - } -@@ -317,7 +323,6 @@ - else { - invalidate_inode_buffers(inode); - if (!atomic_read(&inode->i_count)) { -- hlist_del_init(&inode->i_hash); - list_move(&inode->i_list, dispose); - inode->i_state |= I_FREEING; - count++; -@@ -455,7 +460,6 @@ - if (!can_unuse(inode)) - continue; - } -- hlist_del_init(&inode->i_hash); - list_move(&inode->i_list, &freeable); - inode->i_state |= I_FREEING; - nr_pruned++; - diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-fc3.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-fc3.patch deleted file mode 100644 index 77631da170..0000000000 --- a/lustre/kernel_patches/patches/vfs_intent-2.6-fc3.patch +++ /dev/null @@ -1,756 +0,0 @@ ---- linux-2.6.10.orig/fs/exec.c -+++ linux-2.6.10/fs/exec.c -@@ -124,9 +124,10 @@ - struct file * file; - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_OPEN); - -- nd.intent.open.flags = FMODE_READ; -- error = __user_walk(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd); -+ nd.intent.it_flags = FMODE_READ|FMODE_EXEC; -+ error = __user_walk_it(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd); - if (error) - goto out; - -@@ -138,7 +139,7 @@ - if (error) - goto exit; - -- file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); -+ file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent); - error = PTR_ERR(file); - if (IS_ERR(file)) - goto out; -@@ -485,8 +486,9 @@ - int err; - struct file *file; - -- nd.intent.open.flags = FMODE_READ; -- err = path_lookup(name, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd); -+ intent_init(&nd.intent, IT_OPEN); -+ nd.intent.it_flags = FMODE_READ|FMODE_EXEC; -+ err = path_lookup(name, LOOKUP_FOLLOW, &nd); - file = ERR_PTR(err); - - if (!err) { -@@ -499,7 +501,7 @@ - err = -EACCES; - file = ERR_PTR(err); - if (!err) { -- file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); -+ file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent); - if (!IS_ERR(file)) { - err = deny_write_access(file); - if (err) { ---- linux-2.6.10.orig/fs/inode.c -+++ linux-2.6.10/fs/inode.c -@@ -233,6 +233,7 @@ - inodes_stat.nr_unused--; - } - -+EXPORT_SYMBOL(__iget); - /** - * clear_inode - clear an inode - * @inode: inode to clear ---- linux-2.6.10.orig/fs/namei.c -+++ linux-2.6.10/fs/namei.c -@@ -288,8 +288,19 @@ - return 0; - } - -+void intent_release(struct lookup_intent *it) -+{ -+ if (!it) -+ return; -+ if (it->it_magic != INTENT_MAGIC) -+ return; -+ if (it->it_op_release) -+ it->it_op_release(it); -+} -+ - void path_release(struct nameidata *nd) - { -+ intent_release(&nd->intent); - dput(nd->dentry); - mntput(nd->mnt); - } -@@ -379,7 +390,10 @@ - { - struct dentry * result; - struct inode *dir = parent->d_inode; -+ int counter = 0; - -+again: -+ counter++; - down(&dir->i_sem); - /* - * First re-do the cached lookup just in case it was created -@@ -418,7 +432,10 @@ - if (result->d_op && result->d_op->d_revalidate) { - if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) { - dput(result); -- result = ERR_PTR(-ENOENT); -+ if (counter > 10) -+ result = ERR_PTR(-ESTALE); -+ if (!IS_ERR(result)) -+ goto again; - } - } - return result; -@@ -449,6 +466,7 @@ - { - int res = 0; - char *name; -+ - if (IS_ERR(link)) - goto fail; - -@@ -458,6 +476,7 @@ - /* weird __emul_prefix() stuff did it */ - goto out; - } -+ intent_reset_fs_part(&nd->intent); - res = link_path_walk(link, nd); - out: - if (nd->depth || res || nd->last_type!=LAST_NORM) -@@ -666,6 +685,33 @@ - return PTR_ERR(dentry); - } - -+static int revalidate_special(struct nameidata *nd) -+{ -+ struct dentry *dentry = nd->dentry; -+ int err, counter = 0; -+ -+ revalidate_again: -+ if (!dentry->d_op || !dentry->d_op->d_revalidate) -+ return 0; -+ if (!dentry->d_op->d_revalidate(dentry, nd)) { -+ struct dentry *new; -+ if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd))) -+ return err; -+ new = real_lookup(dentry->d_parent, &dentry->d_name, nd); -+ if (IS_ERR(new)) -+ return PTR_ERR(new); -+ d_invalidate(dentry); -+ dput(dentry); -+ nd->dentry = dentry = new; -+ counter++; -+ if (counter < 10) -+ goto revalidate_again; -+ //printk("excessive revalidate_it loops\n"); -+ return -ESTALE; -+ } -+ return 0; -+} -+ - /* - * Name resolution. - * -@@ -767,8 +813,12 @@ - goto out_dput; - - if (inode->i_op->follow_link) { -+ int save_flags = nd->flags; - mntget(next.mnt); -+ nd->flags |= LOOKUP_LINK_NOTLAST; - err = do_follow_link(next.dentry, nd); -+ if (!(save_flags & LOOKUP_LINK_NOTLAST)) -+ nd->flags &= ~LOOKUP_LINK_NOTLAST; - dput(next.dentry); - mntput(next.mnt); - if (err) -@@ -807,14 +857,34 @@ - inode = nd->dentry->d_inode; - /* fallthrough */ - case 1: -+ nd->flags |= LOOKUP_LAST; -+ err = revalidate_special(nd); -+ nd->flags &= ~LOOKUP_LAST; -+ if (!nd->dentry->d_inode) -+ err = -ENOENT; -+ if (err) { -+ path_release(nd); -+ goto return_err; -+ } -+ if (lookup_flags & LOOKUP_DIRECTORY) { -+ err = -ENOTDIR; -+ if (!nd->dentry->d_inode->i_op || -+ !nd->dentry->d_inode->i_op->lookup){ -+ path_release(nd); -+ goto return_err; -+ } -+ } - goto return_reval; - } -+ - if (nd->dentry->d_op && nd->dentry->d_op->d_hash) { - err = nd->dentry->d_op->d_hash(nd->dentry, &this); - if (err < 0) - break; - } -+ nd->flags |= LOOKUP_LAST; - err = do_lookup(nd, &this, &next, atomic); -+ nd->flags &= ~LOOKUP_LAST; - if (err) - break; - follow_mount(&next.mnt, &next.dentry); -@@ -1032,7 +1102,7 @@ - } - - /* SMP-safe */ --struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd) - { - unsigned long hash; - struct qstr this; -@@ -1052,11 +1122,16 @@ - } - this.hash = end_name_hash(hash); - -- return lookup_hash(&this, base); -+ return __lookup_hash(&this, base, nd); - access: - return ERR_PTR(-EACCES); - } - -+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+{ -+ return lookup_one_len_it(name, base, len, NULL); -+} -+ - /* - * namei() - * -@@ -1068,7 +1143,7 @@ - * that namei follows links, while lnamei does not. - * SMP-safe - */ --int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd) -+int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd) - { - char *tmp = getname(name); - int err = PTR_ERR(tmp); -@@ -1080,6 +1155,12 @@ - return err; - } - -+int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd) -+{ -+ intent_init(&nd->intent, IT_LOOKUP); -+ return __user_walk_it(name, flags, nd); -+} -+ - /* - * It's inline, so penalty for filesystems that don't use sticky bit is - * minimal. -@@ -1363,8 +1444,8 @@ - acc_mode |= MAY_APPEND; - - /* Fill in the open() intent data */ -- nd->intent.open.flags = flag; -- nd->intent.open.create_mode = mode; -+ nd->intent.it_flags = flag; -+ nd->intent.it_create_mode = mode; - - /* - * The simplest case - just a plain lookup. -@@ -1379,6 +1460,7 @@ - /* - * Create - we need to know the parent. - */ -+ nd->intent.it_op |= IT_CREAT; - error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd); - if (error) - return error; -@@ -1395,7 +1477,9 @@ - dir = nd->dentry; - nd->flags &= ~LOOKUP_PARENT; - down(&dir->d_inode->i_sem); -+ nd->flags |= LOOKUP_LAST; - dentry = __lookup_hash(&nd->last, nd->dentry, nd); -+ nd->flags &= ~LOOKUP_LAST; - - do_last: - error = PTR_ERR(dentry); -@@ -1508,7 +1592,9 @@ - } - dir = nd->dentry; - down(&dir->d_inode->i_sem); -+ nd->flags |= LOOKUP_LAST; - dentry = __lookup_hash(&nd->last, nd->dentry, nd); -+ nd->flags &= ~LOOKUP_LAST; - putname(nd->last.name); - goto do_last; - } ---- linux-2.6.10.orig/fs/namespace.c -+++ linux-2.6.10/fs/namespace.c -@@ -62,6 +62,7 @@ - INIT_LIST_HEAD(&mnt->mnt_mounts); - INIT_LIST_HEAD(&mnt->mnt_list); - INIT_LIST_HEAD(&mnt->mnt_fslink); -+ INIT_LIST_HEAD(&mnt->mnt_lustre_list); - if (name) { - int size = strlen(name)+1; - char *newname = kmalloc(size, GFP_KERNEL); -@@ -113,6 +114,7 @@ - - static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd) - { -+ memset(old_nd, 0, sizeof(*old_nd)); - old_nd->dentry = mnt->mnt_mountpoint; - old_nd->mnt = mnt->mnt_parent; - mnt->mnt_parent = mnt; -@@ -176,6 +178,9 @@ - { - struct super_block *sb = mnt->mnt_sb; - dput(mnt->mnt_root); -+ spin_lock(&dcache_lock); -+ list_del(&mnt->mnt_lustre_list); -+ spin_unlock(&dcache_lock); - free_vfsmnt(mnt); - deactivate_super(sb); - } -@@ -402,6 +407,8 @@ - */ - - lock_kernel(); -+ if (sb->s_op->umount_lustre) -+ sb->s_op->umount_lustre(sb); - if( (flags&MNT_FORCE) && sb->s_op->umount_begin) - sb->s_op->umount_begin(sb); - unlock_kernel(); -@@ -627,6 +634,7 @@ - return err; - if (!old_name || !*old_name) - return -EINVAL; -+ intent_init(&old_nd.intent, IT_LOOKUP); - err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; -@@ -701,6 +709,7 @@ - return -EPERM; - if (!old_name || !*old_name) - return -EINVAL; -+ intent_init(&old_nd.intent, IT_LOOKUP); - err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; -@@ -1012,6 +1021,7 @@ - int retval = 0; - int mnt_flags = 0; - -+ intent_init(&nd.intent, IT_LOOKUP); - /* Discard magic */ - if ((flags & MS_MGC_MSK) == MS_MGC_VAL) - flags &= ~MS_MGC_MSK; ---- linux-2.6.10.orig/fs/open.c -+++ linux-2.6.10/fs/open.c -@@ -216,12 +216,12 @@ - struct nameidata nd; - struct inode * inode; - int error; -- -+ intent_init(&nd.intent, IT_GETATTR); - error = -EINVAL; - if (length < 0) /* sorry, but loff_t says... */ - goto out; - -- error = user_path_walk(path, &nd); -+ error = user_path_walk_it(path, &nd); - if (error) - goto out; - inode = nd.dentry->d_inode; -@@ -475,6 +475,7 @@ - int old_fsuid, old_fsgid; - kernel_cap_t old_cap; - int res; -+ intent_init(&nd.intent, IT_GETATTR); - - if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ - return -EINVAL; -@@ -499,13 +500,14 @@ - else - current->cap_effective = current->cap_permitted; - -- res = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); -+ res = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); - if (!res) { - res = permission(nd.dentry->d_inode, mode, &nd); - /* SuS v2 requires we report a read only fs too */ - if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode) - && !special_file(nd.dentry->d_inode->i_mode)) - res = -EROFS; -+ - path_release(&nd); - } - -@@ -520,8 +522,9 @@ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); -+ error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); - if (error) - goto out; - -@@ -573,8 +576,9 @@ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); -+ error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); - if (error) - goto out; - -@@ -758,8 +762,10 @@ - struct file *filp_open(const char * filename, int flags, int mode) - { - int namei_flags, error; -+ struct file * temp_filp; - struct nameidata nd; - -+ intent_init(&nd.intent, IT_OPEN); - namei_flags = flags; - if ((namei_flags+1) & O_ACCMODE) - namei_flags++; -@@ -767,15 +773,26 @@ - namei_flags |= 2; - - error = open_namei(filename, namei_flags, mode, &nd); -- if (!error) -- return dentry_open(nd.dentry, nd.mnt, flags); -- -+ if (!error) { -+ temp_filp = dentry_open_it(nd.dentry, nd.mnt, flags, &nd.intent); -+ return temp_filp; -+ } - return ERR_PTR(error); - } - --EXPORT_SYMBOL(filp_open); - - struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags) -+ { -+ -+ struct lookup_intent it; -+ intent_init(&it, IT_LOOKUP); -+ -+ return dentry_open_it(dentry, mnt, flags, &it); -+} -+ -+EXPORT_SYMBOL(dentry_open); -+ -+struct file *dentry_open_it(struct dentry *dentry, struct vfsmount *mnt, int flags,struct lookup_intent *it) - { - struct file * f; - struct inode *inode; -@@ -787,6 +804,7 @@ - goto cleanup_dentry; - f->f_flags = flags; - f->f_mode = ((flags+1) & O_ACCMODE) | FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE; -+ f->f_it = it; - inode = dentry->d_inode; - if (f->f_mode & FMODE_WRITE) { - error = get_write_access(inode); -@@ -805,6 +823,7 @@ - error = f->f_op->open(inode,f); - if (error) - goto cleanup_all; -+ intent_release(it); - } - f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); - -@@ -830,13 +849,12 @@ - cleanup_file: - put_filp(f); - cleanup_dentry: -+ intent_release(it); - dput(dentry); - mntput(mnt); - return ERR_PTR(error); - } - --EXPORT_SYMBOL(dentry_open); -- - /* - * Find an empty file descriptor entry, and mark it busy. - */ ---- linux-2.6.10.orig/fs/stat.c -+++ linux-2.6.10/fs/stat.c -@@ -38,7 +38,7 @@ - - EXPORT_SYMBOL(generic_fillattr); - --int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat) - { - struct inode *inode = dentry->d_inode; - int retval; -@@ -47,6 +47,8 @@ - if (retval) - return retval; - -+ if (inode->i_op->getattr_it) -+ return inode->i_op->getattr_it(mnt, dentry, it, stat); - if (inode->i_op->getattr) - return inode->i_op->getattr(mnt, dentry, stat); - -@@ -63,14 +65,20 @@ - - EXPORT_SYMBOL(vfs_getattr); - -+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+{ -+ return vfs_getattr_it(mnt, dentry, NULL, stat); -+} -+ - int vfs_stat(char __user *name, struct kstat *stat) - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = user_path_walk(name, &nd); -+ error = user_path_walk_it(name, &nd); - if (!error) { -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -82,10 +90,11 @@ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = user_path_walk_link(name, &nd); -+ error = user_path_walk_link_it(name, &nd); - if (!error) { -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -97,9 +106,12 @@ - { - struct file *f = fget(fd); - int error = -EBADF; -+ struct nameidata nd; -+ intent_init(&nd.intent, IT_GETATTR); - - if (f) { -- error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat); -+ error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat); -+ intent_release(&nd.intent); - fput(f); - } - return error; ---- linux-2.6.10.orig/include/linux/dcache.h -+++ linux-2.6.10/include/linux/dcache.h -@@ -4,6 +4,7 @@ - #ifdef __KERNEL__ - - #include <asm/atomic.h> -+#include <linux/string.h> - #include <linux/list.h> - #include <linux/spinlock.h> - #include <linux/cache.h> -@@ -37,6 +38,8 @@ - const unsigned char *name; - }; - -+#include <linux/namei.h> -+ - struct dentry_stat_t { - int nr_dentry; - int nr_unused; ---- linux-2.6.10.orig/include/linux/fs.h -+++ linux-2.6.10/include/linux/fs.h -@@ -78,6 +78,7 @@ - - #define FMODE_READ 1 - #define FMODE_WRITE 2 -+#define FMODE_EXEC 4 - - /* Internal kernel extensions */ - #define FMODE_LSEEK 4 -@@ -262,6 +263,8 @@ - #define ATTR_ATTR_FLAG 1024 - #define ATTR_KILL_SUID 2048 - #define ATTR_KILL_SGID 4096 -+#define ATTR_RAW 8192 /* file system, not vfs will massage attrs */ -+#define ATTR_FROM_OPEN 16384 /* called from open path, ie O_TRUNC */ - - /* - * This is the Inode Attributes structure, used for notify_change(). It -@@ -465,6 +468,7 @@ - struct block_device *i_bdev; - struct cdev *i_cdev; - int i_cindex; -+ void *i_filterdata; - - __u32 i_generation; - -@@ -600,6 +604,7 @@ - spinlock_t f_ep_lock; - #endif /* #ifdef CONFIG_EPOLL */ - struct address_space *f_mapping; -+ struct lookup_intent *f_it; - }; - extern spinlock_t files_lock; - #define file_list_lock() spin_lock(&files_lock); -@@ -950,7 +955,9 @@ - void (*truncate) (struct inode *); - int (*permission) (struct inode *, int, struct nameidata *); - int (*setattr) (struct dentry *, struct iattr *); -+ int (*setattr_raw) (struct inode *, struct iattr *); - int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); -+ int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *); - int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); - ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); - ssize_t (*listxattr) (struct dentry *, char *, size_t); -@@ -990,6 +997,7 @@ - int (*remount_fs) (struct super_block *, int *, char *); - void (*clear_inode) (struct inode *); - void (*umount_begin) (struct super_block *); -+ void (*umount_lustre) (struct super_block *); - - int (*show_options)(struct seq_file *, struct vfsmount *); - }; -@@ -1181,6 +1189,7 @@ - extern struct vfsmount *kern_mount(struct file_system_type *); - extern int may_umount_tree(struct vfsmount *); - extern int may_umount(struct vfsmount *); -+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data); - extern long do_mount(char *, char *, char *, unsigned long, void *); - - extern int vfs_statfs(struct super_block *, struct kstatfs *); -@@ -1245,6 +1254,7 @@ - extern int do_truncate(struct dentry *, loff_t start); - extern struct file *filp_open(const char *, int, int); - extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); -+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *); - extern int filp_close(struct file *, fl_owner_t id); - extern char * getname(const char __user *); - ---- linux-2.6.10.orig/include/linux/mount.h -+++ linux-2.6.10/include/linux/mount.h -@@ -36,6 +36,8 @@ - struct list_head mnt_list; - struct list_head mnt_fslink; /* link in fs-specific expiry list */ - struct namespace *mnt_namespace; /* containing namespace */ -+ struct list_head mnt_lustre_list; /* GNS mount list */ -+ unsigned long mnt_last_used; /* for GNS auto-umount (jiffies) */ - }; - - static inline struct vfsmount *mntget(struct vfsmount *mnt) ---- linux-2.6.10.orig/include/linux/namei.h -+++ linux-2.6.10/include/linux/namei.h -@@ -2,14 +2,55 @@ - #define _LINUX_NAMEI_H - - #include <linux/linkage.h> -+#include <linux/string.h> - - struct vfsmount; -+struct nameidata; - --struct open_intent { -- int flags; -- int create_mode; -+/* intent opcodes */ -+#define IT_OPEN (1) -+#define IT_CREAT (1<<1) -+#define IT_READDIR (1<<2) -+#define IT_GETATTR (1<<3) -+#define IT_LOOKUP (1<<4) -+#define IT_UNLINK (1<<5) -+#define IT_TRUNC (1<<6) -+#define IT_GETXATTR (1<<7) -+ -+struct lustre_intent_data { -+ int it_disposition; -+ int it_status; -+ __u64 it_lock_handle; -+ void *it_data; -+ int it_lock_mode; - }; - -+#define INTENT_MAGIC 0x19620323 -+struct lookup_intent { -+ int it_magic; -+ void (*it_op_release)(struct lookup_intent *); -+ int it_op; -+ int it_flags; -+ int it_create_mode; -+ union { -+ struct lustre_intent_data lustre; -+ } d; -+}; -+ -+static inline void intent_reset_fs_part(struct lookup_intent *it) -+{ -+ memset(&it->d, 0, sizeof(it->d)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op_release = NULL; -+} -+ -+static inline void intent_init(struct lookup_intent *it, int op) -+{ -+ memset(it, 0, sizeof(*it)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op = op; -+} -+ - enum { MAX_NESTED_LINKS = 8 }; - - struct nameidata { -@@ -21,10 +62,7 @@ - unsigned depth; - char *saved_names[MAX_NESTED_LINKS + 1]; - -- /* Intent data */ -- union { -- struct open_intent open; -- } intent; -+ struct lookup_intent intent; - }; - - /* -@@ -47,6 +85,8 @@ - #define LOOKUP_NOALT 32 - #define LOOKUP_ATOMIC 64 - #define LOOKUP_REVAL 128 -+#define LOOKUP_LAST (0x1000) -+#define LOOKUP_LINK_NOTLAST (0x2000) - - /* - * Intent data -@@ -56,6 +96,12 @@ - #define LOOKUP_ACCESS (0x0400) - - extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); -+extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)); -+#define user_path_walk_it(name,nd) \ -+ __user_walk_it(name, LOOKUP_FOLLOW, nd) -+#define user_path_walk_link_it(name,nd) \ -+ __user_walk_it(name, 0, nd) -+extern void intent_release(struct lookup_intent *); - #define user_path_walk(name,nd) \ - __user_walk(name, LOOKUP_FOLLOW, nd) - #define user_path_walk_link(name,nd) \ -@@ -68,7 +114,6 @@ - - extern struct dentry * lookup_one_len(const char *, struct dentry *, int); - extern struct dentry * lookup_hash(struct qstr *, struct dentry *); -- - extern int follow_down(struct vfsmount **, struct dentry **); - extern int follow_up(struct vfsmount **, struct dentry **); - diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-fc5-fix.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-fc5-fix.patch deleted file mode 100644 index e3a0f09318..0000000000 --- a/lustre/kernel_patches/patches/vfs_intent-2.6-fc5-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: linux-2.6.15.i686-cy/include/linux/dcache.h -=================================================================== ---- linux-2.6.15.i686-cy.orig/include/linux/dcache.h 2006-06-01 23:07:05.000000000 +0800 -+++ linux-2.6.15.i686-cy/include/linux/dcache.h 2006-06-01 23:10:21.000000000 +0800 -@@ -4,7 +4,6 @@ - #ifdef __KERNEL__ - - #include <asm/atomic.h> --#include <linux/string.h> - #include <linux/list.h> - #include <linux/spinlock.h> - #include <linux/cache.h> -@@ -42,6 +41,7 @@ - const unsigned char *name; - }; - -+struct inode; - #include <linux/namei.h> - - struct dentry_stat_t { diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-fc5.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-fc5.patch deleted file mode 100644 index ac628b922f..0000000000 --- a/lustre/kernel_patches/patches/vfs_intent-2.6-fc5.patch +++ /dev/null @@ -1,827 +0,0 @@ -Index: linux-2.6.15-fc5/fs/inode.c -=================================================================== ---- linux-2.6.15-fc5.orig/fs/inode.c 2006-05-31 04:08:19.000000000 +0800 -+++ linux-2.6.15-fc5/fs/inode.c 2006-05-31 17:24:35.000000000 +0800 -@@ -236,6 +236,7 @@ - inodes_stat.nr_unused--; - } - -+EXPORT_SYMBOL(__iget); - /** - * clear_inode - clear an inode - * @inode: inode to clear -Index: linux-2.6.15-fc5/fs/open.c -=================================================================== ---- linux-2.6.15-fc5.orig/fs/open.c 2006-05-31 04:08:39.000000000 +0800 -+++ linux-2.6.15-fc5/fs/open.c 2006-05-31 17:24:35.000000000 +0800 -@@ -224,12 +224,12 @@ - struct nameidata nd; - struct inode * inode; - int error; -- -+ intent_init(&nd.intent, IT_GETATTR); - error = -EINVAL; - if (length < 0) /* sorry, but loff_t says... */ - goto out; - -- error = user_path_walk(path, &nd); -+ error = user_path_walk_it(path, &nd); - if (error) - goto out; - inode = nd.dentry->d_inode; -@@ -488,6 +488,7 @@ - int old_fsuid, old_fsgid; - kernel_cap_t old_cap; - int res; -+ intent_init(&nd.intent, IT_GETATTR); - - if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ - return -EINVAL; -@@ -512,7 +513,7 @@ - else - current->cap_effective = current->cap_permitted; - -- res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); -+ res = __user_walk_fd_it(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); - if (!res) { - res = vfs_permission(&nd, mode); - /* SuS v2 requires we report a read only fs too */ -@@ -538,8 +539,9 @@ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); -+ error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); - if (error) - goto out; - -@@ -591,8 +593,9 @@ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); -+ error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); - if (error) - goto out; - -@@ -815,6 +818,7 @@ - error = open(inode, f); - if (error) - goto cleanup_all; -+ intent_release(f->f_it); - } - - f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); -@@ -841,6 +845,7 @@ - f->f_dentry = NULL; - f->f_vfsmnt = NULL; - cleanup_file: -+ intent_release(f->f_it); - put_filp(f); - dput(dentry); - mntput(mnt); -@@ -866,6 +871,7 @@ - { - int namei_flags, error; - struct nameidata nd; -+ intent_init(&nd.intent, IT_OPEN); - - namei_flags = flags; - if ((namei_flags+1) & O_ACCMODE) -@@ -902,19 +908,19 @@ - struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, - int (*open)(struct inode *, struct file *)) - { -- if (IS_ERR(nd->intent.open.file)) -+ if (IS_ERR(nd->intent.file)) - goto out; - if (IS_ERR(dentry)) - goto out_err; -- nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->mnt), -- nd->intent.open.flags - 1, -- nd->intent.open.file, -+ nd->intent.file = __dentry_open(dget(dentry), mntget(nd->mnt), -+ nd->intent.flags - 1, -+ nd->intent.file, - open); - out: -- return nd->intent.open.file; -+ return nd->intent.file; - out_err: - release_open_intent(nd); -- nd->intent.open.file = (struct file *)dentry; -+ nd->intent.file = (struct file *)dentry; - goto out; - } - EXPORT_SYMBOL_GPL(lookup_instantiate_filp); -@@ -931,7 +937,8 @@ - struct file *filp; - - /* Pick up the filp from the open intent */ -- filp = nd->intent.open.file; -+ filp = nd->intent.file; -+ filp->f_it = &nd->intent; - /* Has the filesystem initialised the file for us? */ - if (filp->f_dentry == NULL) - filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL); -Index: linux-2.6.15-fc5/fs/nfsctl.c -=================================================================== ---- linux-2.6.15-fc5.orig/fs/nfsctl.c 2006-05-31 04:08:20.000000000 +0800 -+++ linux-2.6.15-fc5/fs/nfsctl.c 2006-05-31 17:24:35.000000000 +0800 -@@ -26,6 +26,7 @@ - struct nameidata nd; - int error; - -+ intent_init(&nd.intent, IT_OPEN); - nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL); - - if (IS_ERR(nd.mnt)) -Index: linux-2.6.15-fc5/fs/namei.c -=================================================================== ---- linux-2.6.15-fc5.orig/fs/namei.c 2006-05-31 04:08:33.000000000 +0800 -+++ linux-2.6.15-fc5/fs/namei.c 2006-05-31 17:24:35.000000000 +0800 -@@ -337,8 +337,19 @@ - return 0; - } - -+void intent_release(struct lookup_intent *it) -+{ -+ if (!it) -+ return; -+ if (it->it_magic != INTENT_MAGIC) -+ return; -+ if (it->it_op_release) -+ it->it_op_release(it); -+} -+ - void path_release(struct nameidata *nd) - { -+ intent_release(&nd->intent); - dput(nd->dentry); - mntput(nd->mnt); - } -@@ -359,10 +370,10 @@ - */ - void release_open_intent(struct nameidata *nd) - { -- if (nd->intent.open.file->f_dentry == NULL) -- put_filp(nd->intent.open.file); -+ if (nd->intent.file->f_dentry == NULL) -+ put_filp(nd->intent.file); - else -- fput(nd->intent.open.file); -+ fput(nd->intent.file); - } - - /* -@@ -440,8 +451,12 @@ - { - struct dentry * result; - struct inode *dir = parent->d_inode; -- -+ int counter = 0; -+ - mutex_lock(&dir->i_mutex); -+again: -+ counter++; -+ - /* - * First re-do the cached lookup just in case it was created - * while we waited for the directory semaphore.. -@@ -475,13 +490,16 @@ - * Uhhuh! Nasty case: the cache was re-populated while - * we waited on the semaphore. Need to revalidate. - */ -- mutex_unlock(&dir->i_mutex); - if (result->d_op && result->d_op->d_revalidate) { - if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) { - dput(result); -- result = ERR_PTR(-ENOENT); -+ if (counter > 10) -+ result = ERR_PTR(-ESTALE); -+ if (!IS_ERR(result)) -+ goto again; - } - } -+ mutex_unlock(&dir->i_mutex); - return result; - } - -@@ -509,7 +527,9 @@ - static __always_inline int __vfs_follow_link(struct nameidata *nd, const char *link) - { - int res = 0; -+ struct lookup_intent it = nd->intent; - char *name; -+ - if (IS_ERR(link)) - goto fail; - -@@ -519,6 +539,10 @@ - /* weird __emul_prefix() stuff did it */ - goto out; - } -+ intent_init(&nd->intent, it.it_op); -+ nd->intent.it_flags = it.it_flags; -+ nd->intent.it_create_mode = it.it_create_mode; -+ nd->intent.file = it.file; - res = link_path_walk(link, nd); - out: - if (nd->depth || res || nd->last_type!=LAST_NORM) -@@ -772,6 +796,33 @@ - return PTR_ERR(dentry); - } - -+static int revalidate_special(struct nameidata *nd) -+{ -+ struct dentry *dentry = nd->dentry; -+ int err, counter = 0; -+ -+ revalidate_again: -+ if (!dentry->d_op || !dentry->d_op->d_revalidate) -+ return 0; -+ if (!dentry->d_op->d_revalidate(dentry, nd)) { -+ struct dentry *new; -+ if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd))) -+ return err; -+ new = real_lookup(dentry->d_parent, &dentry->d_name, nd); -+ if (IS_ERR(new)) -+ return PTR_ERR(new); -+ d_invalidate(dentry); -+ dput(dentry); -+ nd->dentry = dentry = new; -+ counter++; -+ if (counter < 10) -+ goto revalidate_again; -+ //printk("excessive revalidate_it loops\n"); -+ return -ESTALE; -+ } -+ return 0; -+} -+ - /* - * Name resolution. - * This is the basic name resolution function, turning a pathname into -@@ -870,7 +921,11 @@ - goto out_dput; - - if (inode->i_op->follow_link) { -+ int save_flags = nd->flags; -+ nd->flags |= LOOKUP_LINK_NOTLAST; - err = do_follow_link(&next, nd); -+ if (!(save_flags & LOOKUP_LINK_NOTLAST)) -+ nd->flags &= ~LOOKUP_LINK_NOTLAST; - if (err) - goto return_err; - err = -ENOENT; -@@ -905,6 +960,23 @@ - inode = nd->dentry->d_inode; - /* fallthrough */ - case 1: -+ nd->flags |= LOOKUP_LAST; -+ err = revalidate_special(nd); -+ nd->flags &= ~LOOKUP_LAST; -+ if (!nd->dentry->d_inode) -+ err = -ENOENT; -+ if (err) { -+ path_release(nd); -+ goto return_err; -+ } -+ if (lookup_flags & LOOKUP_DIRECTORY) { -+ err = -ENOTDIR; -+ if(!nd->dentry->d_inode->i_op || -+ !nd->dentry->d_inode->i_op->lookup) { -+ path_release(nd); -+ goto return_err; -+ } -+ } - goto return_reval; - } - if (nd->dentry->d_op && nd->dentry->d_op->d_hash) { -@@ -912,7 +984,9 @@ - if (err < 0) - break; - } -+ nd->flags |= LOOKUP_LAST; - err = do_lookup(nd, &this, &next, atomic); -+ nd->flags &= ~LOOKUP_LAST; - if (err) - break; - inode = next.dentry->d_inode; -@@ -1154,13 +1228,13 @@ - - if (filp == NULL) - return -ENFILE; -- nd->intent.open.file = filp; -- nd->intent.open.flags = open_flags; -- nd->intent.open.create_mode = create_mode; -+ nd->intent.file = filp; -+ nd->intent.flags = open_flags; -+ nd->intent.create_mode = create_mode; - err = do_path_lookup(dfd, name, lookup_flags|LOOKUP_OPEN, nd); -- if (IS_ERR(nd->intent.open.file)) { -+ if (IS_ERR(nd->intent.file)) { - if (err == 0) { -- err = PTR_ERR(nd->intent.open.file); -+ err = PTR_ERR(nd->intent.file); - path_release(nd); - } - } else if (err != 0) -@@ -1263,7 +1337,7 @@ - } - - /* SMP-safe */ --struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd) - { - unsigned long hash; - struct qstr this; -@@ -1283,11 +1357,17 @@ - } - this.hash = end_name_hash(hash); - -- return __lookup_hash(&this, base, NULL); -+ return __lookup_hash(&this, base, nd); - access: - return ERR_PTR(-EACCES); - } - -+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+{ -+ return lookup_one_len_it(name, base, len, NULL); -+} -+ -+ - /* - * namei() - * -@@ -1299,8 +1379,9 @@ - * that namei follows links, while lnamei does not. - * SMP-safe - */ --int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags, -- struct nameidata *nd) -+ -+int fastcall __user_walk_fd_it(int dfd, const char __user *name, unsigned flags, -+ struct nameidata *nd) - { - char *tmp = getname(name); - int err = PTR_ERR(tmp); -@@ -1312,9 +1393,22 @@ - return err; - } - -+int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags, -+ struct nameidata *nd) -+{ -+ intent_init(&nd->intent, IT_LOOKUP); -+ return __user_walk_fd_it(dfd, name, flags, nd); -+} -+ -+int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd) -+{ -+ return __user_walk_fd_it(AT_FDCWD, name, flags, nd); -+} -+ - int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd) - { -- return __user_walk_fd(AT_FDCWD, name, flags, nd); -+ intent_init(&nd->intent, IT_LOOKUP); -+ return __user_walk_it(name, flags, nd); - } - - /* -@@ -1596,6 +1690,8 @@ - if (flag & O_APPEND) - acc_mode |= MAY_APPEND; - -+ nd->intent.it_flags = flag; -+ nd->intent.it_create_mode = mode; - /* - * The simplest case - just a plain lookup. - */ -@@ -1610,6 +1706,7 @@ - /* - * Create - we need to know the parent. - */ -+ nd->intent.it_op |= IT_CREAT; - error = path_lookup_create(dfd,pathname,LOOKUP_PARENT,nd,flag,mode); - if (error) - return error; -@@ -1626,7 +1723,9 @@ - dir = nd->dentry; - nd->flags &= ~LOOKUP_PARENT; - mutex_lock(&dir->d_inode->i_mutex); -+ nd->flags |= LOOKUP_LAST; - path.dentry = lookup_hash(nd); -+ nd->flags &= ~LOOKUP_LAST; - path.mnt = nd->mnt; - - do_last: -@@ -1685,7 +1784,7 @@ - exit_dput: - dput_path(&path, nd); - exit: -- if (!IS_ERR(nd->intent.open.file)) -+ if (!IS_ERR(nd->intent.file)) - release_open_intent(nd); - path_release(nd); - return error; -@@ -1728,7 +1827,9 @@ - } - dir = nd->dentry; - mutex_lock(&dir->d_inode->i_mutex); -+ nd->flags |= LOOKUP_LAST; - path.dentry = lookup_hash(nd); -+ nd->flags &= ~LOOKUP_LAST; - path.mnt = nd->mnt; - __putname(nd->last.name); - goto do_last; -@@ -2240,6 +2341,8 @@ - int error; - char * to; - -+ intent_init(&nd.intent, IT_LOOKUP); -+ intent_init(&old_nd.intent, IT_LOOKUP); - if (flags != 0) - return -EINVAL; - -@@ -2247,7 +2350,7 @@ - if (IS_ERR(to)) - return PTR_ERR(to); - -- error = __user_walk_fd(olddfd, oldname, 0, &old_nd); -+ error = __user_walk_fd_it(olddfd, oldname, 0, &old_nd); - if (error) - goto exit; - error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd); -Index: linux-2.6.15-fc5/fs/stat.c -=================================================================== ---- linux-2.6.15-fc5.orig/fs/stat.c 2006-05-31 04:08:20.000000000 +0800 -+++ linux-2.6.15-fc5/fs/stat.c 2006-05-31 17:24:35.000000000 +0800 -@@ -38,7 +38,7 @@ - - EXPORT_SYMBOL(generic_fillattr); - --int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat) - { - struct inode *inode = dentry->d_inode; - int retval; -@@ -47,6 +47,8 @@ - if (retval) - return retval; - -+ if (inode->i_op->getattr_it) -+ return inode->i_op->getattr_it(mnt, dentry, it, stat); - if (inode->i_op->getattr) - return inode->i_op->getattr(mnt, dentry, stat); - -@@ -61,6 +63,11 @@ - return 0; - } - -+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+{ -+ return vfs_getattr_it(mnt, dentry, NULL, stat); -+} -+ - EXPORT_SYMBOL(vfs_getattr); - - int vfs_stat_fd(int dfd, char __user *name, struct kstat *stat) -@@ -68,9 +75,10 @@ - struct nameidata nd; - int error; - -- error = __user_walk_fd(dfd, name, LOOKUP_FOLLOW, &nd); -+ intent_init(&nd.intent, IT_GETATTR); -+ error = __user_walk_fd_it(dfd, name, LOOKUP_FOLLOW, &nd); - if (!error) { -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -88,9 +96,10 @@ - struct nameidata nd; - int error; - -- error = __user_walk_fd(dfd, name, 0, &nd); -+ intent_init(&nd.intent, IT_GETATTR); -+ error = __user_walk_fd_it(dfd, name, 0, &nd); - if (!error) { -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -107,9 +116,12 @@ - { - struct file *f = fget(fd); - int error = -EBADF; -+ struct nameidata nd; -+ intent_init(&nd.intent, IT_GETATTR); - - if (f) { -- error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat); -+ error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat); -+ intent_release(&nd.intent); - fput(f); - } - return error; -Index: linux-2.6.15-fc5/fs/namespace.c -=================================================================== ---- linux-2.6.15-fc5.orig/fs/namespace.c 2006-05-31 04:08:33.000000000 +0800 -+++ linux-2.6.15-fc5/fs/namespace.c 2006-05-31 17:24:35.000000000 +0800 -@@ -74,6 +74,7 @@ - INIT_LIST_HEAD(&mnt->mnt_share); - INIT_LIST_HEAD(&mnt->mnt_slave_list); - INIT_LIST_HEAD(&mnt->mnt_slave); -+ INIT_LIST_HEAD(&mnt->mnt_lustre_list); - if (name) { - int size = strlen(name) + 1; - char *newname = kmalloc(size, GFP_KERNEL); -@@ -154,6 +155,7 @@ - - static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd) - { -+ memset(old_nd, 0, sizeof(*old_nd)); - old_nd->dentry = mnt->mnt_mountpoint; - old_nd->mnt = mnt->mnt_parent; - mnt->mnt_parent = mnt; -@@ -272,6 +274,9 @@ - { - struct super_block *sb = mnt->mnt_sb; - dput(mnt->mnt_root); -+ spin_lock(&dcache_lock); -+ list_del(&mnt->mnt_lustre_list); -+ spin_unlock(&dcache_lock); - free_vfsmnt(mnt); - deactivate_super(sb); - } -@@ -538,6 +543,8 @@ - */ - - lock_kernel(); -+ if (sb->s_op->umount_lustre) -+ sb->s_op->umount_lustre(sb); - if ((flags & MNT_FORCE) && sb->s_op->umount_begin) - sb->s_op->umount_begin(sb); - unlock_kernel(); -@@ -870,6 +877,7 @@ - return err; - if (!old_name || !*old_name) - return -EINVAL; -+ intent_init(&old_nd.intent, IT_LOOKUP); - err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; -@@ -955,6 +963,7 @@ - return -EPERM; - if (!old_name || !*old_name) - return -EINVAL; -+ intent_init(&old_nd.intent, IT_LOOKUP); - err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; -@@ -1270,6 +1279,7 @@ - int retval = 0; - int mnt_flags = 0; - -+ intent_init(&nd.intent, IT_LOOKUP); - /* Discard magic */ - if ((flags & MS_MGC_MSK) == MS_MGC_VAL) - flags &= ~MS_MGC_MSK; -Index: linux-2.6.15-fc5/fs/exec.c -=================================================================== ---- linux-2.6.15-fc5.orig/fs/exec.c 2006-05-31 04:08:33.000000000 +0800 -+++ linux-2.6.15-fc5/fs/exec.c 2006-05-31 17:24:35.000000000 +0800 -@@ -127,7 +127,9 @@ - struct nameidata nd; - int error; - -- error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ); -+ intent_init(&nd.intent, IT_OPEN); -+ error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, -+ FMODE_READ | FMODE_EXEC); - if (error) - goto out; - -@@ -477,7 +479,9 @@ - int err; - struct file *file; - -- err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ); -+ intent_init(&nd.intent, IT_OPEN); -+ err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, -+ FMODE_READ | FMODE_EXEC); - file = ERR_PTR(err); - - if (!err) { -Index: linux-2.6.15-fc5/include/linux/dcache.h -=================================================================== ---- linux-2.6.15-fc5.orig/include/linux/dcache.h 2006-05-31 04:08:33.000000000 +0800 -+++ linux-2.6.15-fc5/include/linux/dcache.h 2006-05-31 17:24:41.000000000 +0800 -@@ -4,6 +4,7 @@ - #ifdef __KERNEL__ - - #include <asm/atomic.h> -+#include <linux/string.h> - #include <linux/list.h> - #include <linux/spinlock.h> - #include <linux/cache.h> -@@ -36,6 +37,8 @@ - const unsigned char *name; - }; - -+#include <linux/namei.h> -+ - struct dentry_stat_t { - int nr_dentry; - int nr_unused; -Index: linux-2.6.15-fc5/include/linux/fs.h -=================================================================== ---- linux-2.6.15-fc5.orig/include/linux/fs.h 2006-05-31 04:08:33.000000000 +0800 -+++ linux-2.6.15-fc5/include/linux/fs.h 2006-05-31 17:24:35.000000000 +0800 -@@ -59,6 +59,7 @@ - - #define FMODE_READ 1 - #define FMODE_WRITE 2 -+#define FMODE_EXEC 4 - - /* Internal kernel extensions */ - #define FMODE_LSEEK 4 -@@ -265,6 +266,8 @@ - #define ATTR_KILL_SUID 2048 - #define ATTR_KILL_SGID 4096 - #define ATTR_FILE 8192 -+#define ATTR_RAW 16384 /* file system, not vfs will massage attrs */ -+#define ATTR_FROM_OPEN 32768 /* called from open path, ie O_TRUNC */ - - /* - * This is the Inode Attributes structure, used for notify_change(). It -@@ -499,6 +502,7 @@ - struct block_device *i_bdev; - struct cdev *i_cdev; - int i_cindex; -+ void *i_filterdata; - - __u32 i_generation; - -@@ -646,6 +650,7 @@ - spinlock_t f_ep_lock; - #endif /* #ifdef CONFIG_EPOLL */ - struct address_space *f_mapping; -+ struct lookup_intent *f_it; - }; - extern spinlock_t files_lock; - #define file_list_lock() spin_lock(&files_lock); -@@ -1043,7 +1048,9 @@ - void (*truncate) (struct inode *); - int (*permission) (struct inode *, int, struct nameidata *); - int (*setattr) (struct dentry *, struct iattr *); -+ int (*setattr_raw) (struct inode *, struct iattr *); - int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); -+ int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *); - int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); - ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); - ssize_t (*listxattr) (struct dentry *, char *, size_t); -@@ -1084,6 +1091,7 @@ - int (*remount_fs) (struct super_block *, int *, char *); - void (*clear_inode) (struct inode *); - void (*umount_begin) (struct super_block *); -+ void (*umount_lustre) (struct super_block *); - - int (*show_options)(struct seq_file *, struct vfsmount *); - -@@ -1286,6 +1294,7 @@ - extern int may_umount(struct vfsmount *); - extern void umount_tree(struct vfsmount *, int, struct list_head *); - extern void release_mounts(struct list_head *); -+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data); - extern long do_mount(char *, char *, char *, unsigned long, void *); - extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); - extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, -@@ -1347,6 +1356,7 @@ - int mode); - extern struct file *filp_open(const char *, int, int); - extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); -+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *); - extern int filp_close(struct file *, fl_owner_t id); - extern char * getname(const char __user *); - -Index: linux-2.6.15-fc5/include/linux/namei.h -=================================================================== ---- linux-2.6.15-fc5.orig/include/linux/namei.h 2006-05-31 04:08:39.000000000 +0800 -+++ linux-2.6.15-fc5/include/linux/namei.h 2006-05-31 17:24:35.000000000 +0800 -@@ -5,10 +5,39 @@ - - struct vfsmount; - -+#define IT_OPEN (1) -+#define IT_CREAT (1<<1) -+#define IT_READDIR (1<<2) -+#define IT_GETATTR (1<<3) -+#define IT_LOOKUP (1<<4) -+#define IT_UNLINK (1<<5) -+#define IT_TRUNC (1<<6) -+#define IT_GETXATTR (1<<7) -+ -+struct lustre_intent_data { -+ int it_disposition; -+ int it_status; -+ __u64 it_lock_handle; -+ void *it_data; -+ int it_lock_mode; -+}; -+ -+#define INTENT_MAGIC 0x19620323 -+ -+#define it_flags flags -+#define it_create_mode create_mode -+#define lookup_intent open_intent -+ - struct open_intent { -- int flags; -- int create_mode; -- struct file *file; -+ int it_magic; -+ void (*it_op_release)(struct open_intent *); -+ int it_op; -+ int flags; -+ int create_mode; -+ struct file *file; -+ union { -+ struct lustre_intent_data lustre; -+ } d; - }; - - enum { MAX_NESTED_LINKS = 8 }; -@@ -22,12 +51,16 @@ - unsigned depth; - char *saved_names[MAX_NESTED_LINKS + 1]; - -- /* Intent data */ -- union { -- struct open_intent open; -- } intent; -+ struct lookup_intent intent; - }; - -+static inline void intent_init(struct lookup_intent *it, int op) -+{ -+ memset(it, 0, sizeof(*it)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op = op; -+} -+ - /* - * Type of the last component on LOOKUP_PARENT - */ -@@ -49,7 +82,8 @@ - #define LOOKUP_NOALT 32 - #define LOOKUP_REVAL 64 - #define LOOKUP_ATOMIC 128 -- -+#define LOOKUP_LAST (0x1000) -+#define LOOKUP_LINK_NOTLAST (0x2000) - /* - * Intent data - */ -@@ -59,10 +93,19 @@ - - extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); - extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *)); -+extern int FASTCALL(__user_walk_fd_it(int dfd, const char __user *, unsigned, struct nameidata *)); - #define user_path_walk(name,nd) \ - __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd) - #define user_path_walk_link(name,nd) \ - __user_walk_fd(AT_FDCWD, name, 0, nd) -+ -+extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)); -+#define user_path_walk_it(name,nd) \ -+ __user_walk_it(name, LOOKUP_FOLLOW, nd) -+#define user_path_walk_link_it(name,nd) \ -+ __user_walk_it(name, 0, nd) -+extern void intent_release(struct lookup_intent *); -+ - extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); - extern int FASTCALL(path_walk(const char *, struct nameidata *)); - extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); -Index: linux-2.6.15-fc5/include/linux/mount.h -=================================================================== ---- linux-2.6.15-fc5.orig/include/linux/mount.h 2006-05-31 04:08:22.000000000 +0800 -+++ linux-2.6.15-fc5/include/linux/mount.h 2006-05-31 17:24:35.000000000 +0800 -@@ -46,6 +46,8 @@ - struct list_head mnt_slave; /* slave list entry */ - struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ - struct namespace *mnt_namespace; /* containing namespace */ -+ struct list_head mnt_lustre_list; /* GNS mount list */ -+ unsigned long mnt_last_used; /* for GNS auto-umount (jiffies) */ - int mnt_pinned; - }; - diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-rhel4.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-rhel4.patch deleted file mode 100644 index 66e65fb09a..0000000000 --- a/lustre/kernel_patches/patches/vfs_intent-2.6-rhel4.patch +++ /dev/null @@ -1,1461 +0,0 @@ -diff -rup RH_2_6_9_55.orig/fs/cifs/dir.c RH_2_6_9_55/fs/cifs/dir.c ---- RH_2_6_9_55.orig/fs/cifs/dir.c -+++ RH_2_6_9_55/fs/cifs/dir.c -@@ -157,11 +157,7 @@ cifs_create(struct inode *inode, struct - - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) - if(nd && (nd->flags & LOOKUP_OPEN)) { --#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,5) /* SUSE included Lustre patch */ - int oflags = nd->intent.it_flags; --#else -- int oflags = nd->intent.open.flags; --#endif - - desiredAccess = 0; - if (oflags & FMODE_READ) -diff -rup RH_2_6_9_55.orig/fs/exec.c RH_2_6_9_55/fs/exec.c ---- RH_2_6_9_55.orig/fs/exec.c -+++ RH_2_6_9_55/fs/exec.c -@@ -126,9 +126,10 @@ asmlinkage long sys_uselib(const char __ - struct file * file; - struct nameidata nd; - int error; -- -- nd.intent.open.flags = FMODE_READ|FMODE_EXEC; -- error = __user_walk(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd); -+ intent_init(&nd.intent, IT_OPEN); -+ -+ nd.intent.it_flags = FMODE_READ|FMODE_EXEC; -+ error = __user_walk_it(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd); - if (error) - goto out; - -@@ -140,7 +141,7 @@ asmlinkage long sys_uselib(const char __ - if (error) - goto exit; - -- file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); -+ file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent); - error = PTR_ERR(file); - if (IS_ERR(file)) - goto out; -@@ -489,8 +490,9 @@ struct file *open_exec(const char *name) - int err; - struct file *file; - -- nd.intent.open.flags = FMODE_READ|FMODE_EXEC; -- err = path_lookup(name, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd); -+ intent_init(&nd.intent, IT_OPEN); -+ nd.intent.it_flags = FMODE_READ|FMODE_EXEC; -+ err = path_lookup_it(name, LOOKUP_FOLLOW, &nd); - file = ERR_PTR(err); - - if (!err) { -@@ -501,7 +503,7 @@ struct file *open_exec(const char *name) - int err = permission(inode, MAY_EXEC, &nd); - file = ERR_PTR(err); - if (!err) { -- file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); -+ file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent); - if (!IS_ERR(file)) { - err = deny_write_access(file); - if (err) { -diff -rup RH_2_6_9_55.orig/fs/inode.c RH_2_6_9_55/fs/inode.c ---- RH_2_6_9_55.orig/fs/inode.c -+++ RH_2_6_9_55/fs/inode.c -@@ -235,6 +235,7 @@ void __iget(struct inode * inode) - inodes_stat.nr_unused--; - } - -+EXPORT_SYMBOL(__iget); - /** - * clear_inode - clear an inode - * @inode: inode to clear -diff -rup RH_2_6_9_55.orig/fs/namei.c RH_2_6_9_55/fs/namei.c ---- RH_2_6_9_55.orig/fs/namei.c -+++ RH_2_6_9_55/fs/namei.c -@@ -282,8 +282,19 @@ int deny_write_access(struct file * file - return 0; - } - -+void intent_release(struct lookup_intent *it) -+{ -+ if (!it) -+ return; -+ if (it->it_magic != INTENT_MAGIC) -+ return; -+ if (it->it_op_release) -+ it->it_op_release(it); -+} -+ - void path_release(struct nameidata *nd) - { -+ intent_release(&nd->intent); - dput(nd->dentry); - mntput(nd->mnt); - } -@@ -395,8 +406,12 @@ static struct dentry * real_lookup(struc - { - struct dentry * result; - struct inode *dir = parent->d_inode; -- -+ int counter = 0; -+ -+again: - down(&dir->i_sem); -+ counter++; -+ - /* - * First re-do the cached lookup just in case it was created - * while we waited for the directory semaphore.. -@@ -433,8 +448,12 @@ static struct dentry * real_lookup(struc - up(&dir->i_sem); - if (result->d_op && result->d_op->d_revalidate) { - result = do_revalidate(result, nd); -- if (!result) -- result = ERR_PTR(-ENOENT); -+ if (!result) { -+ if (counter > 10) -+ result = ERR_PTR(-ESTALE); -+ if (!IS_ERR(result)) -+ goto again; -+ } - } - return result; - } -@@ -464,6 +483,7 @@ static inline int __vfs_follow_link(stru - { - int res = 0; - char *name; -+ - if (IS_ERR(link)) - goto fail; - -@@ -473,6 +493,7 @@ static inline int __vfs_follow_link(stru - /* weird __emul_prefix() stuff did it */ - goto out; - } -+ intent_reset_fs_part(&nd->intent); - res = link_path_walk(link, nd); - out: - if (nd->depth || res || nd->last_type!=LAST_NORM) -@@ -681,6 +702,33 @@ fail: - return PTR_ERR(dentry); - } - -+static int revalidate_special(struct nameidata *nd) -+{ -+ struct dentry *dentry = nd->dentry; -+ int err, counter = 0; -+ -+ revalidate_again: -+ if (!dentry->d_op || !dentry->d_op->d_revalidate) -+ return 0; -+ if (!dentry->d_op->d_revalidate(dentry, nd)) { -+ struct dentry *new; -+ if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd))) -+ return err; -+ new = real_lookup(dentry->d_parent, &dentry->d_name, nd); -+ if (IS_ERR(new)) -+ return PTR_ERR(new); -+ d_invalidate(dentry); -+ dput(dentry); -+ nd->dentry = dentry = new; -+ counter++; -+ if (counter < 10) -+ goto revalidate_again; -+ //printk("excessive revalidate_it loops\n"); -+ return -ESTALE; -+ } -+ return 0; -+} -+ - /* - * Name resolution. - * This is the basic name resolution function, turning a pathname into -@@ -782,13 +830,17 @@ static fastcall int __link_path_walk(con - goto out_dput; - - if (inode->i_op->follow_link) { -+ int save_flags = nd->flags; - mntget(next.mnt); - if (next.mnt != nd->mnt) { - dput(nd->dentry); - nd->mnt = next.mnt; - nd->dentry = dget(next.dentry); - } -+ nd->flags |= LOOKUP_LINK_NOTLAST; - err = do_follow_link(next.dentry, nd); -+ if (!(save_flags & LOOKUP_LINK_NOTLAST)) -+ nd->flags &= ~LOOKUP_LINK_NOTLAST; - dput(next.dentry); - mntput(next.mnt); - if (err) -@@ -828,14 +880,34 @@ last_component: - inode = nd->dentry->d_inode; - /* fallthrough */ - case 1: -+ nd->flags |= LOOKUP_LAST; -+ err = revalidate_special(nd); -+ nd->flags &= ~LOOKUP_LAST; -+ if (!nd->dentry->d_inode) -+ err = -ENOENT; -+ if (err) { -+ path_release(nd); -+ goto return_err; -+ } -+ if (lookup_flags & LOOKUP_DIRECTORY) { -+ err = -ENOTDIR; -+ if (!nd->dentry->d_inode->i_op || -+ !nd->dentry->d_inode->i_op->lookup){ -+ path_release(nd); -+ goto return_err; -+ } -+ } - goto return_reval; - } -+ - if (nd->dentry->d_op && nd->dentry->d_op->d_hash) { - err = nd->dentry->d_op->d_hash(nd->dentry, &this); - if (err < 0) - break; - } -+ nd->flags |= LOOKUP_LAST; - err = do_lookup(nd, &this, &next, atomic); -+ nd->flags &= ~LOOKUP_LAST; - if (err) - break; - follow_mount(&next.mnt, &next.dentry); -@@ -1007,7 +1079,7 @@ set_it: - } - - /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */ --int fastcall path_lookup(const char *name, unsigned int flags, struct nameidata *nd) -+int fastcall path_lookup_it(const char *name, unsigned int flags, struct nameidata *nd) - { - int retval = 0; - -@@ -1041,6 +1113,12 @@ out: - return retval; - } - -+int fastcall path_lookup(const char *name, unsigned int flags, struct nameidata *nd) -+{ -+ intent_init(&nd->intent, IT_GETATTR); -+ return path_lookup_it(name, flags, nd); -+} -+ - /* - * Restricted form of lookup. Doesn't follow links, single-component only, - * needs parent already locked. Doesn't follow mounts. -@@ -1091,7 +1169,7 @@ struct dentry * lookup_hash(struct qstr - } - - /* SMP-safe */ --struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd) - { - unsigned long hash; - struct qstr this; -@@ -1111,11 +1189,16 @@ struct dentry * lookup_one_len(const cha - } - this.hash = end_name_hash(hash); - -- return lookup_hash(&this, base); -+ return __lookup_hash(&this, base, nd); - access: - return ERR_PTR(-EACCES); - } - -+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+{ -+ return lookup_one_len_it(name, base, len, NULL); -+} -+ - /* - * namei() - * -@@ -1127,18 +1210,24 @@ access: - * that namei follows links, while lnamei does not. - * SMP-safe - */ --int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd) -+int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd) - { - char *tmp = getname(name); - int err = PTR_ERR(tmp); - - if (!IS_ERR(tmp)) { -- err = path_lookup(tmp, flags, nd); -+ err = path_lookup_it(tmp, flags, nd); - putname(tmp); - } - return err; - } - -+int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd) -+{ -+ intent_init(&nd->intent, IT_LOOKUP); -+ return __user_walk_it(name, flags, nd); -+} -+ - /* - * It's inline, so penalty for filesystems that don't use sticky bit is - * minimal. -@@ -1384,7 +1473,7 @@ int may_open(struct nameidata *nd, int a - if (!error) { - DQUOT_INIT(inode); - -- error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME); -+ error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME|ATTR_FROM_OPEN); - } - put_write_access(inode); - if (error) -@@ -1425,14 +1514,14 @@ int open_namei(const char * pathname, in - acc_mode |= MAY_APPEND; - - /* Fill in the open() intent data */ -- nd->intent.open.flags = flag; -- nd->intent.open.create_mode = mode; -+ nd->intent.it_flags = flag; -+ nd->intent.it_create_mode = mode; - - /* - * The simplest case - just a plain lookup. - */ - if (!(flag & O_CREAT)) { -- error = path_lookup(pathname, lookup_flags(flag)|LOOKUP_OPEN, nd); -+ error = path_lookup_it(pathname, lookup_flags(flag)|LOOKUP_OPEN, nd); - if (error) - return error; - goto ok; -@@ -1441,7 +1530,8 @@ int open_namei(const char * pathname, in - /* - * Create - we need to know the parent. - */ -- error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd); -+ nd->intent.it_op |= IT_CREAT; -+ error = path_lookup_it(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd); - if (error) - return error; - -@@ -1457,7 +1547,9 @@ int open_namei(const char * pathname, in - dir = nd->dentry; - nd->flags &= ~LOOKUP_PARENT; - down(&dir->d_inode->i_sem); -+ nd->flags |= LOOKUP_LAST; - dentry = __lookup_hash(&nd->last, nd->dentry, nd); -+ nd->flags &= ~LOOKUP_LAST; - - do_last: - error = PTR_ERR(dentry); -@@ -1570,7 +1662,9 @@ do_link: - } - dir = nd->dentry; - down(&dir->d_inode->i_sem); -+ nd->flags |= LOOKUP_LAST; - dentry = __lookup_hash(&nd->last, nd->dentry, nd); -+ nd->flags &= ~LOOKUP_LAST; - __putname(nd->last.name); - goto do_last; - } -@@ -1644,10 +1738,20 @@ asmlinkage long sys_mknod(const char __u - tmp = getname(filename); - if (IS_ERR(tmp)) - return PTR_ERR(tmp); -- -- error = path_lookup(tmp, LOOKUP_PARENT, &nd); -+ -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = path_lookup_it(tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->mknod_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mknod_raw(&nd, mode, dev); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - -@@ -1674,6 +1778,7 @@ asmlinkage long sys_mknod(const char __u - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1716,10 +1821,20 @@ asmlinkage long sys_mkdir(const char __u - if (!IS_ERR(tmp)) { - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - -- error = path_lookup(tmp, LOOKUP_PARENT, &nd); -+ error = path_lookup_it(tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->mkdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mkdir_raw(&nd, mode); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 1); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -1729,6 +1844,7 @@ asmlinkage long sys_mkdir(const char __u - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1814,7 +1930,8 @@ asmlinkage long sys_rmdir(const char __u - if(IS_ERR(name)) - return PTR_ERR(name); - -- error = path_lookup(name, LOOKUP_PARENT, &nd); -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = path_lookup_it(name, LOOKUP_PARENT, &nd); - if (error) - goto exit; - -@@ -1829,6 +1946,16 @@ asmlinkage long sys_rmdir(const char __u - error = -EBUSY; - goto exit1; - } -+ -+ if (nd.dentry->d_inode->i_op->rmdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ error = op->rmdir_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } -+ - down(&nd.dentry->d_inode->i_sem); - dentry = lookup_hash(&nd.last, nd.dentry); - error = PTR_ERR(dentry); -@@ -1892,12 +2019,22 @@ asmlinkage long sys_unlink(const char __ - if(IS_ERR(name)) - return PTR_ERR(name); - -- error = path_lookup(name, LOOKUP_PARENT, &nd); -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = path_lookup_it(name, LOOKUP_PARENT, &nd); - if (error) - goto exit; - error = -EISDIR; - if (nd.last_type != LAST_NORM) - goto exit1; -+ -+ if (nd.dentry->d_inode->i_op->unlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->unlink_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } -+ - down(&nd.dentry->d_inode->i_sem); - dentry = lookup_hash(&nd.last, nd.dentry); - error = PTR_ERR(dentry); -@@ -1965,10 +2102,20 @@ asmlinkage long sys_symlink(const char _ - if (!IS_ERR(to)) { - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - -- error = path_lookup(to, LOOKUP_PARENT, &nd); -+ error = path_lookup_it(to, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->symlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->symlink_raw(&nd, from); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -1976,6 +2123,7 @@ asmlinkage long sys_symlink(const char _ - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - putname(to); -@@ -2045,15 +2193,26 @@ asmlinkage long sys_link(const char __us - if (IS_ERR(to)) - return PTR_ERR(to); - -- error = __user_walk(oldname, 0, &old_nd); -+ intent_init(&old_nd.intent, IT_LOOKUP); -+ error = __user_walk_it(oldname, 0, &old_nd); - if (error) - goto exit; -- error = path_lookup(to, LOOKUP_PARENT, &nd); -+ -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = path_lookup_it(to, LOOKUP_PARENT, &nd); - if (error) - goto out; - error = -EXDEV; - if (old_nd.mnt != nd.mnt) - goto out_release; -+ if (nd.dentry->d_inode->i_op->link_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->link_raw(&old_nd, &nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out_release; -+ } -+ - new_dentry = lookup_create(&nd, 0); - error = PTR_ERR(new_dentry); - if (!IS_ERR(new_dentry)) { -@@ -2229,11 +2388,13 @@ static inline int do_rename(const char * - struct dentry * trap; - struct nameidata oldnd, newnd; - -- error = path_lookup(oldname, LOOKUP_PARENT, &oldnd); -+ intent_init(&oldnd.intent, IT_LOOKUP); -+ error = path_lookup_it(oldname, LOOKUP_PARENT, &oldnd); - if (error) - goto exit; - -- error = path_lookup(newname, LOOKUP_PARENT, &newnd); -+ intent_init(&newnd.intent, IT_LOOKUP); -+ error = path_lookup_it(newname, LOOKUP_PARENT, &newnd); - if (error) - goto exit1; - -@@ -2250,6 +2411,13 @@ static inline int do_rename(const char * - if (newnd.last_type != LAST_NORM) - goto exit2; - -+ if (old_dir->d_inode->i_op->rename_raw) { -+ error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit2; -+ } -+ - trap = lock_rename(new_dir, old_dir); - - old_dentry = lookup_hash(&oldnd.last, old_dir); -@@ -2281,8 +2449,7 @@ static inline int do_rename(const char * - if (new_dentry == trap) - goto exit5; - -- error = vfs_rename(old_dir->d_inode, old_dentry, -- new_dir->d_inode, new_dentry); -+ error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); - exit5: - dput(new_dentry); - exit4: -@@ -2473,6 +2640,7 @@ EXPORT_SYMBOL(page_readlink); - EXPORT_SYMBOL(page_symlink); - EXPORT_SYMBOL(page_symlink_inode_operations); - EXPORT_SYMBOL(path_lookup); -+EXPORT_SYMBOL(path_lookup_it); - EXPORT_SYMBOL(path_release); - EXPORT_SYMBOL(path_walk); - EXPORT_SYMBOL(permission); -diff -urNp RH_2_6_9_42_0_3.orig/fs/namespace.c RH_2_6_9_42_0_3/fs/namespace.c ---- RH_2_6_9_42_0_3.orig/fs/namespace.c -+++ RH_2_6_9_42_0_3/fs/namespace.c -@@ -114,6 +115,7 @@ static inline int check_mnt(struct vfsmo - - static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd) - { -+ memset(old_nd, 0, sizeof(*old_nd)); - old_nd->dentry = mnt->mnt_mountpoint; - old_nd->mnt = mnt->mnt_parent; - mnt->mnt_parent = mnt; -@@ -441,6 +442,8 @@ static int do_umount(struct vfsmount *mn - */ - - lock_kernel(); -+ if (sb->s_op->umount_lustre) -+ sb->s_op->umount_lustre(sb); - if( (flags&MNT_FORCE) && sb->s_op->umount_begin) - sb->s_op->umount_begin(sb); - unlock_kernel(); -@@ -665,7 +668,8 @@ static int do_loopback(struct nameidata - return err; - if (!old_name || !*old_name) - return -EINVAL; -- err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); -+ intent_init(&old_nd.intent, IT_LOOKUP); -+ err = path_lookup_it(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; - -@@ -739,7 +743,8 @@ static int do_move_mount(struct nameidat - return -EPERM; - if (!old_name || !*old_name) - return -EINVAL; -- err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); -+ intent_init(&old_nd.intent, IT_LOOKUP); -+ err = path_lookup_it(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; - -@@ -1074,7 +1079,8 @@ long do_mount(char * dev_name, char * di - flags &= ~(MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_ACTIVE); - - /* ... and get the mountpoint */ -- retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd); -+ intent_init(&nd.intent, IT_LOOKUP); -+ retval = path_lookup_it(dir_name, LOOKUP_FOLLOW, &nd); - if (retval) - return retval; - -diff -rup RH_2_6_9_55.orig/fs/nfs/dir.c RH_2_6_9_55/fs/nfs/dir.c ---- RH_2_6_9_55.orig/fs/nfs/dir.c -+++ RH_2_6_9_55/fs/nfs/dir.c -@@ -839,7 +839,7 @@ int nfs_is_exclusive_create(struct inode - return 0; - if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE)) - return 0; -- return (nd->intent.open.flags & O_EXCL) != 0; -+ return (nd->intent.it_flags & O_EXCL) != 0; - } - - static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) -@@ -915,7 +915,7 @@ static int is_atomic_open(struct inode * - if (nd->flags & LOOKUP_DIRECTORY) - return 0; - /* Are we trying to write to a read only partition? */ -- if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) -+ if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) - return 0; - return 1; - } -@@ -936,7 +936,7 @@ static struct dentry *nfs_atomic_lookup( - dentry->d_op = NFS_PROTO(dir)->dentry_ops; - - /* Let vfs_create() deal with O_EXCL */ -- if (nd->intent.open.flags & O_EXCL) -+ if (nd->intent.it_flags & O_EXCL) - goto no_entry; - - /* Open the file on the server */ -@@ -948,7 +948,7 @@ static struct dentry *nfs_atomic_lookup( - goto out; - } - -- if (nd->intent.open.flags & O_CREAT) { -+ if (nd->intent.it_flags & O_CREAT) { - nfs_begin_data_update(dir); - inode = nfs4_atomic_open(dir, dentry, nd); - nfs_end_data_update(dir); -@@ -967,7 +967,7 @@ static struct dentry *nfs_atomic_lookup( - case -ENOTDIR: - goto no_open; - case -ELOOP: -- if (!(nd->intent.open.flags & O_NOFOLLOW)) -+ if (!(nd->intent.it_flags & O_NOFOLLOW)) - goto no_open; - /* case -EINVAL: */ - default: -@@ -1005,7 +1005,7 @@ static int nfs_open_revalidate(struct de - /* NFS only supports OPEN on regular files */ - if (!S_ISREG(inode->i_mode)) - goto no_open; -- openflags = nd->intent.open.flags; -+ openflags = nd->intent.it_flags; - /* We cannot do exclusive creation on a positive dentry */ - if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) - goto no_open; -@@ -1213,7 +1213,7 @@ static int nfs_create(struct inode *dir, - attr.ia_valid = ATTR_MODE; - - if (nd && (nd->flags & LOOKUP_CREATE)) -- open_flags = nd->intent.open.flags; -+ open_flags = nd->intent.it_flags; - - /* - * The 0 argument passed into the create function should one day -diff -rup RH_2_6_9_55.orig/fs/nfs/nfs4proc.c RH_2_6_9_55/fs/nfs/nfs4proc.c ---- RH_2_6_9_55.orig/fs/nfs/nfs4proc.c -+++ RH_2_6_9_55/fs/nfs/nfs4proc.c -@@ -770,27 +770,27 @@ nfs4_atomic_open(struct inode *dir, stru - struct nfs4_inc_open *inc_open; - - if (nd->flags & LOOKUP_CREATE) { -- attr.ia_mode = nd->intent.open.create_mode; -+ attr.ia_mode = nd->intent.it_create_mode; - attr.ia_valid = ATTR_MODE; - if (!IS_POSIXACL(dir)) - attr.ia_mode &= ~current->fs->umask; - } else { - attr.ia_valid = 0; -- BUG_ON(nd->intent.open.flags & O_CREAT); -+ BUG_ON(nd->intent.it_flags & O_CREAT); - } - - /* track info in case the open never completes */ - if (!(inc_open = kmalloc(sizeof(*inc_open), GFP_KERNEL))) - return ERR_PTR(-ENOMEM); - cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); -- state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred); -+ state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred); - put_rpccred(cred); - if (IS_ERR(state)) { - kfree(inc_open); - return (struct inode *)state; - } - inc_open->task = current; -- inc_open->flags = nd->intent.open.flags; -+ inc_open->flags = nd->intent.it_flags; - INIT_LIST_HEAD(&inc_open->state); - spin_lock(&state->inode->i_lock); - list_add(&inc_open->state, &state->inc_open); -diff -rup RH_2_6_9_55.orig/fs/open.c RH_2_6_9_55/fs/open.c ---- RH_2_6_9_55.orig/fs/open.c -+++ RH_2_6_9_55/fs/open.c -@@ -195,6 +195,7 @@ out: - int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs) - { - int err; -+ struct inode_operations *op = dentry->d_inode->i_op; - struct iattr newattrs; - - /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */ -@@ -204,8 +205,16 @@ int do_truncate(struct dentry *dentry, l - newattrs.ia_size = length; - newattrs.ia_valid = ATTR_SIZE | time_attrs; - down(&dentry->d_inode->i_sem); -- err = notify_change(dentry, &newattrs); -- up(&dentry->d_inode->i_sem); -+ if (op->setattr_raw) { -+ newattrs.ia_valid |= ATTR_RAW; -+ newattrs.ia_ctime = CURRENT_TIME; -+ down_write(&dentry->d_inode->i_alloc_sem); -+ err = op->setattr_raw(dentry->d_inode, &newattrs); -+ up_write(&dentry->d_inode->i_alloc_sem); -+ } else -+ err = notify_change(dentry, &newattrs); -+ up(&dentry->d_inode->i_sem); -+ - return err; - } - -@@ -214,12 +223,13 @@ static inline long do_sys_truncate(const - struct nameidata nd; - struct inode * inode; - int error; -- -+ - error = -EINVAL; - if (length < 0) /* sorry, but loff_t says... */ - goto out; -- -- error = user_path_walk(path, &nd); -+ -+ intent_init(&nd.intent, IT_GETATTR); -+ error = user_path_walk_it(path, &nd); - if (error) - goto out; - inode = nd.dentry->d_inode; -@@ -390,9 +400,19 @@ asmlinkage long sys_utime(char __user * - (error = permission(inode,MAY_WRITE,&nd)) != 0) - goto dput_and_out; - } -- down(&inode->i_sem); -- error = notify_change(nd.dentry, &newattrs); -- up(&inode->i_sem); -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto dput_and_out; -+ } else { -+ down(&inode->i_sem); -+ error = notify_change(nd.dentry, &newattrs); -+ up(&inode->i_sem); -+ } - dput_and_out: - path_release(&nd); - out: -@@ -443,9 +463,19 @@ long do_utimes(char __user * filename, s - (error = permission(inode,MAY_WRITE,&nd)) != 0) - goto dput_and_out; - } -- down(&inode->i_sem); -- error = notify_change(nd.dentry, &newattrs); -- up(&inode->i_sem); -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto dput_and_out; -+ } else { -+ down(&inode->i_sem); -+ error = notify_change(nd.dentry, &newattrs); -+ up(&inode->i_sem); -+ } - dput_and_out: - path_release(&nd); - out: -@@ -473,6 +503,7 @@ asmlinkage long sys_access(const char __ - int old_fsuid, old_fsgid; - kernel_cap_t old_cap; - int res; -+ intent_init(&nd.intent, IT_GETATTR); - - if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ - return -EINVAL; -@@ -497,13 +528,14 @@ asmlinkage long sys_access(const char __ - else - current->cap_effective = current->cap_permitted; - -- res = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); -+ res = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); - if (!res) { - res = permission(nd.dentry->d_inode, mode, &nd); - /* SuS v2 requires we report a read only fs too */ - if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode) - && !special_file(nd.dentry->d_inode->i_mode)) - res = -EROFS; -+ - path_release(&nd); - } - -@@ -518,8 +550,9 @@ asmlinkage long sys_chdir(const char __u - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); -+ error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); - if (error) - goto out; - -@@ -571,8 +604,9 @@ asmlinkage long sys_chroot(const char __ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); -+ error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); - if (error) - goto out; - -@@ -595,36 +629,52 @@ out: - - EXPORT_SYMBOL_GPL(sys_chroot); - --asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+int chmod_common(struct dentry *dentry, mode_t mode) - { -- struct inode * inode; -- struct dentry * dentry; -- struct file * file; -- int err = -EBADF; -+ struct inode * inode = dentry->d_inode; - struct iattr newattrs; -+ int error = -EROFS; - -- file = fget(fd); -- if (!file) -+ if (IS_RDONLY(inode)) - goto out; -+ -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; - -- dentry = file->f_dentry; -- inode = dentry->d_inode; -+ newattrs.ia_mode = mode; -+ newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use the normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out; -+ } - -- err = -EROFS; -- if (IS_RDONLY(inode)) -- goto out_putf; -- err = -EPERM; -+ error = -EPERM; - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto out_putf; -+ goto out; -+ - down(&inode->i_sem); - if (mode == (mode_t) -1) - mode = inode->i_mode; - newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); - newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- err = notify_change(dentry, &newattrs); -+ error = notify_change(dentry, &newattrs); - up(&inode->i_sem); -+out: -+ return error; -+} - --out_putf: -+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+{ -+ struct file * file; -+ int err = -EBADF; -+ -+ file = fget(fd); -+ if (!file) -+ goto out; -+ -+ err = chmod_common(file->f_dentry, mode); - fput(file); - out: - return err; -@@ -633,32 +683,13 @@ out: - asmlinkage long sys_chmod(const char __user * filename, mode_t mode) - { - struct nameidata nd; -- struct inode * inode; - int error; -- struct iattr newattrs; - - error = user_path_walk(filename, &nd); - if (error) - goto out; -- inode = nd.dentry->d_inode; - -- error = -EROFS; -- if (IS_RDONLY(inode)) -- goto dput_and_out; -- -- error = -EPERM; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto dput_and_out; -- -- down(&inode->i_sem); -- if (mode == (mode_t) -1) -- mode = inode->i_mode; -- newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -- newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- error = notify_change(nd.dentry, &newattrs); -- up(&inode->i_sem); -- --dput_and_out: -+ error = chmod_common(nd.dentry, mode); - path_release(&nd); - out: - return error; -@@ -679,6 +710,18 @@ static int chown_common(struct dentry * - if (IS_RDONLY(inode)) - goto out; - error = -EPERM; -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_uid = user; -+ newattrs.ia_gid = group; -+ newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ return error; -+ } - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - goto out; - newattrs.ia_valid = ATTR_CTIME; -@@ -692,6 +735,7 @@ static int chown_common(struct dentry * - } - if (!S_ISDIR(inode->i_mode)) - newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID; -+ - down(&inode->i_sem); - error = notify_change(dentry, &newattrs); - up(&inode->i_sem); -@@ -739,8 +783,6 @@ asmlinkage long sys_fchown(unsigned int - return error; - } - --static struct file *__dentry_open(struct dentry *, struct vfsmount *, int, struct file *); -- - /* - * Note that while the flag value (low two bits) for sys_open means: - * 00 - read-only -@@ -758,8 +800,9 @@ static struct file *__dentry_open(struct - struct file *filp_open(const char * filename, int flags, int mode) - { - int namei_flags, error; -+ struct file * temp_filp; - struct nameidata nd; -- struct file *f; -+ intent_init(&nd.intent, IT_OPEN); - - namei_flags = flags; - if ((namei_flags+1) & O_ACCMODE) -@@ -767,16 +810,11 @@ struct file *filp_open(const char * file - if (namei_flags & O_TRUNC) - namei_flags |= 2; - -- error = -ENFILE; -- f = get_empty_filp(); -- if (f == NULL) -- return ERR_PTR(error); -- - error = open_namei(filename, namei_flags, mode, &nd); -- if (!error) -- return __dentry_open(nd.dentry, nd.mnt, flags, f); -- -- put_filp(f); -+ if (!error) { -+ temp_filp = dentry_open_it(nd.dentry, nd.mnt, flags, &nd.intent); -+ return temp_filp; -+ } - return ERR_PTR(error); - } - -@@ -784,29 +822,27 @@ EXPORT_SYMBOL(filp_open); - - struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags) - { -- int error; -- struct file *f; -+ struct lookup_intent it; -+ intent_init(&it, IT_LOOKUP); - -- error = -ENFILE; -- f = get_empty_filp(); -- if (f == NULL) { -- dput(dentry); -- mntput(mnt); -- return ERR_PTR(error); -- } -- -- return __dentry_open(dentry, mnt, flags, f); -+ return dentry_open_it(dentry, mnt, flags, &it); - } - - EXPORT_SYMBOL(dentry_open); - --static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags, struct file *f) -+struct file *dentry_open_it(struct dentry *dentry, struct vfsmount *mnt, int flags, struct lookup_intent *it) - { -+ struct file *f; - struct inode *inode; - int error; - -+ error = -ENFILE; -+ f = get_empty_filp(); -+ if (!f) -+ goto cleanup_dentry; - f->f_flags = flags; - f->f_mode = ((flags+1) & O_ACCMODE) | FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE; -+ f->f_it = it; - inode = dentry->d_inode; - if (f->f_mode & FMODE_WRITE) { - error = get_write_access(inode); -@@ -825,6 +861,7 @@ static struct file *__dentry_open(struct - error = f->f_op->open(inode,f); - if (error) - goto cleanup_all; -+ intent_release(it); - } - f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); - -@@ -849,6 +886,8 @@ cleanup_all: - f->f_vfsmnt = NULL; - cleanup_file: - put_filp(f); -+cleanup_dentry: -+ intent_release(it); - dput(dentry); - mntput(mnt); - return ERR_PTR(error); -diff -rup RH_2_6_9_55.orig/fs/stat.c RH_2_6_9_55/fs/stat.c ---- RH_2_6_9_55.orig/fs/stat.c -+++ RH_2_6_9_55/fs/stat.c -@@ -37,7 +37,7 @@ void generic_fillattr(struct inode *inod - - EXPORT_SYMBOL(generic_fillattr); - --int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat) - { - struct inode *inode = dentry->d_inode; - int retval; -@@ -46,6 +46,8 @@ int vfs_getattr(struct vfsmount *mnt, st - if (retval) - return retval; - -+ if (inode->i_op->getattr_it) -+ return inode->i_op->getattr_it(mnt, dentry, it, stat); - if (inode->i_op->getattr) - return inode->i_op->getattr(mnt, dentry, stat); - -@@ -62,7 +64,7 @@ int vfs_getattr(struct vfsmount *mnt, st - - EXPORT_SYMBOL(vfs_getattr); - --int vfs_getattr64(struct vfsmount *mnt, struct dentry *dentry, struct kstat64 *stat) -+int vfs_getattr64_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat64 *stat) - { - struct inode *inode = dentry->d_inode; - int retval; -@@ -79,6 +81,13 @@ int vfs_getattr64(struct vfsmount *mnt, - return ixop->getattr64(mnt, dentry, stat); - } - -+ if (inode->i_op->getattr_it) { -+ retval = inode->i_op->getattr_it(mnt, dentry, it, (struct kstat *) stat); -+ if (retval == 0) -+ stat->ino64 = stat->ino; -+ return retval; -+ } -+ - if (inode->i_op->getattr) { - retval = inode->i_op->getattr(mnt, dentry, (struct kstat *) stat); - if (retval == 0) -@@ -98,16 +107,28 @@ int vfs_getattr64(struct vfsmount *mnt, - return 0; - } - -+ - EXPORT_SYMBOL(vfs_getattr64); - -+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+{ -+ return vfs_getattr_it(mnt, dentry, NULL, stat); -+} -+ -+int vfs_getattr64(struct vfsmount *mnt, struct dentry *dentry, struct kstat64 *stat) -+{ -+ return vfs_getattr64_it(mnt, dentry, NULL, stat); -+} -+ - int vfs_stat(char __user *name, struct kstat *stat) - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = user_path_walk(name, &nd); -+ error = user_path_walk_it(name, &nd); - if (!error) { -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -119,10 +140,11 @@ int vfs_lstat(char __user *name, struct - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = user_path_walk_link(name, &nd); -+ error = user_path_walk_link_it(name, &nd); - if (!error) { -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -134,9 +156,12 @@ int vfs_fstat(unsigned int fd, struct ks - { - struct file *f = fget(fd); - int error = -EBADF; -+ struct nameidata nd; -+ intent_init(&nd.intent, IT_GETATTR); - - if (f) { -- error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat); -+ error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat); -+ intent_release(&nd.intent); - fput(f); - } - return error; -@@ -148,10 +173,11 @@ int vfs_stat64(char __user *name, struct - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = user_path_walk(name, &nd); -+ error = user_path_walk_it(name, &nd); - if (!error) { -- error = vfs_getattr64(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr64_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -163,10 +189,11 @@ int vfs_lstat64(char __user *name, struc - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = user_path_walk_link(name, &nd); -+ error = user_path_walk_link_it(name, &nd); - if (!error) { -- error = vfs_getattr64(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr64_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -178,9 +205,11 @@ int vfs_fstat64(unsigned int fd, struct - { - struct file *f = fget(fd); - int error = -EBADF; -+ struct nameidata nd; -+ intent_init(&nd.intent, IT_GETATTR); - - if (f) { -- error = vfs_getattr64(f->f_vfsmnt, f->f_dentry, stat); -+ error = vfs_getattr64_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat); - fput(f); - } - return error; -diff -rup RH_2_6_9_55.orig/include/linux/dcache.h RH_2_6_9_55/include/linux/dcache.h ---- RH_2_6_9_55.orig/include/linux/dcache.h -+++ RH_2_6_9_55/include/linux/dcache.h -@@ -4,6 +4,7 @@ - #ifdef __KERNEL__ - - #include <asm/atomic.h> -+#include <linux/string.h> - #include <linux/list.h> - #include <linux/spinlock.h> - #include <linux/cache.h> -@@ -37,6 +38,8 @@ struct qstr { - const unsigned char *name; - }; - -+#include <linux/namei.h> -+ - struct dentry_stat_t { - int nr_dentry; - int nr_unused; -diff -rup RH_2_6_9_55.orig/include/linux/fs.h RH_2_6_9_55/include/linux/fs.h ---- RH_2_6_9_55.orig/include/linux/fs.h -+++ RH_2_6_9_55/include/linux/fs.h -@@ -266,6 +266,8 @@ typedef void (dio_iodone_t)(struct inode - #define ATTR_ATTR_FLAG 1024 - #define ATTR_KILL_SUID 2048 - #define ATTR_KILL_SGID 4096 -+#define ATTR_RAW 8192 /* file system, not vfs will massage attrs */ -+#define ATTR_FROM_OPEN 16384 /* called from open path, ie O_TRUNC */ - - /* - * This is the Inode Attributes structure, used for notify_change(). It -@@ -464,6 +466,7 @@ struct inode { - struct block_device *i_bdev; - struct cdev *i_cdev; - int i_cindex; -+ void *i_filterdata; - - __u32 i_generation; - -@@ -597,6 +600,7 @@ struct file { - spinlock_t f_ep_lock; - #endif /* #ifdef CONFIG_EPOLL */ - struct address_space *f_mapping; -+ struct lookup_intent *f_it; - }; - extern spinlock_t files_lock; - #define file_list_lock() spin_lock(&files_lock); -@@ -967,20 +971,29 @@ struct inode_operations { - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); - int (*link) (struct dentry *,struct inode *,struct dentry *); -+ int (*link_raw) (struct nameidata *,struct nameidata *); - int (*unlink) (struct inode *,struct dentry *); -+ int (*unlink_raw) (struct nameidata *); - int (*symlink) (struct inode *,struct dentry *,const char *); -+ int (*symlink_raw) (struct nameidata *,const char *); - int (*mkdir) (struct inode *,struct dentry *,int); -+ int (*mkdir_raw) (struct nameidata *,int); - int (*rmdir) (struct inode *,struct dentry *); -+ int (*rmdir_raw) (struct nameidata *); - int (*mknod) (struct inode *,struct dentry *,int,dev_t); -+ int (*mknod_raw) (struct nameidata *,int,dev_t); - int (*rename) (struct inode *, struct dentry *, - struct inode *, struct dentry *); -+ int (*rename_raw) (struct nameidata *, struct nameidata *); - int (*readlink) (struct dentry *, char __user *,int); - int (*follow_link) (struct dentry *, struct nameidata *); - void (*put_link) (struct dentry *, struct nameidata *); - void (*truncate) (struct inode *); - int (*permission) (struct inode *, int, struct nameidata *); - int (*setattr) (struct dentry *, struct iattr *); -+ int (*setattr_raw) (struct inode *, struct iattr *); - int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); -+ int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *); - int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); - ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); - ssize_t (*listxattr) (struct dentry *, char *, size_t); -@@ -1025,6 +1038,7 @@ struct super_operations { - int (*remount_fs) (struct super_block *, int *, char *); - void (*clear_inode) (struct inode *); - void (*umount_begin) (struct super_block *); -+ void (*umount_lustre) (struct super_block *); - - int (*show_options)(struct seq_file *, struct vfsmount *); - }; -@@ -1217,6 +1231,7 @@ extern int unregister_filesystem(struct - extern struct vfsmount *kern_mount(struct file_system_type *); - extern int may_umount_tree(struct vfsmount *); - extern int may_umount(struct vfsmount *); -+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data); - extern long do_mount(char *, char *, char *, unsigned long, void *); - - extern int vfs_statfs(struct super_block *, struct kstatfs *); -@@ -1277,10 +1292,10 @@ static inline int break_lease(struct ino - } - - /* fs/open.c */ -- - extern int do_truncate(struct dentry *, loff_t start, unsigned int); - extern struct file *filp_open(const char *, int, int); - extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); -+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *); - extern int filp_close(struct file *, fl_owner_t id); - extern char * getname(const char __user *); - -diff -rup RH_2_6_9_55.orig/include/linux/mount.h RH_2_6_9_55/include/linux/mount.h ---- RH_2_6_9_55.orig/include/linux/mount.h -+++ RH_2_6_9_55/include/linux/mount.h -@@ -34,6 +34,7 @@ struct vfsmount - struct list_head mnt_list; - struct list_head mnt_fslink; /* link in fs-specific expiry list */ - struct namespace *mnt_namespace; /* containing namespace */ -+ unsigned long mnt_last_used; /* for GNS auto-umount (jiffies) */ - }; - - static inline struct vfsmount *mntget(struct vfsmount *mnt) -diff -rup RH_2_6_9_55.orig/include/linux/namei.h RH_2_6_9_55/include/linux/namei.h ---- RH_2_6_9_55.orig/include/linux/namei.h -+++ RH_2_6_9_55/include/linux/namei.h -@@ -2,14 +2,55 @@ - #define _LINUX_NAMEI_H - - #include <linux/linkage.h> -+#include <linux/string.h> - - struct vfsmount; -+struct nameidata; - --struct open_intent { -- int flags; -- int create_mode; -+/* intent opcodes */ -+#define IT_OPEN (1) -+#define IT_CREAT (1<<1) -+#define IT_READDIR (1<<2) -+#define IT_GETATTR (1<<3) -+#define IT_LOOKUP (1<<4) -+#define IT_UNLINK (1<<5) -+#define IT_TRUNC (1<<6) -+#define IT_GETXATTR (1<<7) -+ -+struct lustre_intent_data { -+ int it_disposition; -+ int it_status; -+ __u64 it_lock_handle; -+ void *it_data; -+ int it_lock_mode; - }; - -+#define INTENT_MAGIC 0x19620323 -+struct lookup_intent { -+ int it_magic; -+ void (*it_op_release)(struct lookup_intent *); -+ int it_op; -+ int it_flags; -+ int it_create_mode; -+ union { -+ struct lustre_intent_data lustre; -+ } d; -+}; -+ -+static inline void intent_reset_fs_part(struct lookup_intent *it) -+{ -+ memset(&it->d, 0, sizeof(it->d)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op_release = NULL; -+} -+ -+static inline void intent_init(struct lookup_intent *it, int op) -+{ -+ memset(it, 0, sizeof(*it)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op = op; -+} -+ - enum { MAX_NESTED_LINKS = 8 }; - - struct nameidata { -@@ -21,10 +62,7 @@ struct nameidata { - unsigned depth; - char *saved_names[MAX_NESTED_LINKS + 1]; - -- /* Intent data */ -- union { -- struct open_intent open; -- } intent; -+ struct lookup_intent intent; - }; - - /* -@@ -47,6 +85,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA - #define LOOKUP_NOALT 32 - #define LOOKUP_ATOMIC 64 - #define LOOKUP_REVAL 128 -+#define LOOKUP_LAST (0x1000) -+#define LOOKUP_LINK_NOTLAST (0x2000) - - /* - * Intent data -@@ -56,11 +96,18 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA - #define LOOKUP_ACCESS (0x0400) - - extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); -+extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)); -+#define user_path_walk_it(name,nd) \ -+ __user_walk_it(name, LOOKUP_FOLLOW, nd) -+#define user_path_walk_link_it(name,nd) \ -+ __user_walk_it(name, 0, nd) -+extern void intent_release(struct lookup_intent *); - #define user_path_walk(name,nd) \ - __user_walk(name, LOOKUP_FOLLOW, nd) - #define user_path_walk_link(name,nd) \ - __user_walk(name, 0, nd) - extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); -+extern int FASTCALL(path_lookup_it(const char *, unsigned, struct nameidata *)); - extern int FASTCALL(path_walk(const char *, struct nameidata *)); - extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); - extern void path_release(struct nameidata *); diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-sles10.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-sles10.patch deleted file mode 100644 index f1530698eb..0000000000 --- a/lustre/kernel_patches/patches/vfs_intent-2.6-sles10.patch +++ /dev/null @@ -1,1500 +0,0 @@ -Index: LINUX-SRC-TREE/fs/9p/vfs_inode.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/9p/vfs_inode.c -+++ LINUX-SRC-TREE/fs/9p/vfs_inode.c -@@ -469,7 +469,7 @@ v9fs_vfs_create(struct inode *dir, struc - perm = unixmode2p9mode(v9ses, mode); - - if (nd && nd->flags & LOOKUP_OPEN) -- flags = nd->intent.open.flags - 1; -+ flags = nd->intent.flags - 1; - else - flags = O_RDWR; - -Index: LINUX-SRC-TREE/fs/cifs/dir.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/cifs/dir.c -+++ LINUX-SRC-TREE/fs/cifs/dir.c -@@ -157,11 +157,7 @@ cifs_create(struct inode *inode, struct - - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) - if(nd && (nd->flags & LOOKUP_OPEN)) { --#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,5) /* SUSE included Lustre patch */ - int oflags = nd->intent.it_flags; --#else -- int oflags = nd->intent.open.flags; --#endif - - desiredAccess = 0; - if (oflags & FMODE_READ) -Index: LINUX-SRC-TREE/fs/exec.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/exec.c -+++ LINUX-SRC-TREE/fs/exec.c -@@ -129,7 +129,9 @@ asmlinkage long sys_uselib(const char __ - struct nameidata nd; - int error; - -- error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ); -+ intent_init(&nd.intent, IT_OPEN); -+ error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, -+ FMODE_READ | FMODE_EXEC); - if (error) - goto out; - -@@ -481,7 +483,9 @@ struct file *open_exec(const char *name) - int err; - struct file *file; - -- err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ); -+ intent_init(&nd.intent, IT_OPEN); -+ err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, -+ FMODE_READ | FMODE_EXEC, 0); - file = ERR_PTR(err); - - if (!err) { -@@ -1543,7 +1547,7 @@ int do_coredump(long signr, int exit_cod - goto close_fail; - if (!file->f_op->write) - goto close_fail; -- if (do_truncate(file->f_dentry, 0, 0, file) != 0) -+ if (do_truncate(file->f_dentry, 0, 0, file, 0) != 0) - goto close_fail; - - retval = binfmt->core_dump(signr, regs, file); -Index: LINUX-SRC-TREE/fs/fuse/dir.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/fuse/dir.c -+++ LINUX-SRC-TREE/fs/fuse/dir.c -@@ -242,7 +242,7 @@ static int fuse_create_open(struct inode - struct fuse_entry_out outentry; - struct fuse_file *ff; - struct file *file; -- int flags = nd->intent.open.flags - 1; -+ int flags = nd->intent.flags - 1; - - err = -ENOSYS; - if (fc->no_create) -Index: LINUX-SRC-TREE/fs/inode.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/inode.c -+++ LINUX-SRC-TREE/fs/inode.c -@@ -236,6 +236,7 @@ void __iget(struct inode * inode) - inodes_stat.nr_unused--; - } - -+EXPORT_SYMBOL(__iget); - /** - * clear_inode - clear an inode - * @inode: inode to clear -Index: LINUX-SRC-TREE/fs/namei.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/namei.c -+++ LINUX-SRC-TREE/fs/namei.c -@@ -337,8 +337,19 @@ int deny_write_access(struct file * file - return 0; - } - -+void intent_release(struct lookup_intent *it) -+{ -+ if (!it) -+ return; -+ if (it->it_magic != INTENT_MAGIC) -+ return; -+ if (it->it_op_release) -+ it->it_op_release(it); -+} -+ - void path_release(struct nameidata *nd) - { -+ intent_release(&nd->intent); - dput(nd->dentry); - mntput(nd->mnt); - } -@@ -359,10 +370,10 @@ void path_release_on_umount(struct namei - */ - void release_open_intent(struct nameidata *nd) - { -- if (nd->intent.open.file->f_dentry == NULL) -- put_filp(nd->intent.open.file); -+ if (nd->intent.file->f_dentry == NULL) -+ put_filp(nd->intent.file); - else -- fput(nd->intent.open.file); -+ fput(nd->intent.file); - } - - /* -@@ -440,8 +451,12 @@ static struct dentry * real_lookup(struc - { - struct dentry * result; - struct inode *dir = parent->d_inode; -+ int counter = 0; - - mutex_lock(&dir->i_mutex); -+again: -+ counter++; -+ - /* - * First re-do the cached lookup just in case it was created - * while we waited for the directory semaphore.. -@@ -475,13 +490,16 @@ static struct dentry * real_lookup(struc - * Uhhuh! Nasty case: the cache was re-populated while - * we waited on the semaphore. Need to revalidate. - */ -- mutex_unlock(&dir->i_mutex); - if (result->d_op && result->d_op->d_revalidate) { - if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) { - dput(result); -- result = ERR_PTR(-ENOENT); -+ if (counter > 10) -+ result = ERR_PTR(-ESTALE); -+ if (!IS_ERR(result)) -+ goto again; - } - } -+ mutex_unlock(&dir->i_mutex); - return result; - } - -@@ -510,6 +528,7 @@ static __always_inline int __vfs_follow_ - { - int res = 0; - char *name; -+ - if (IS_ERR(link)) - goto fail; - -@@ -519,6 +538,7 @@ static __always_inline int __vfs_follow_ - /* weird __emul_prefix() stuff did it */ - goto out; - } -+ intent_reset_fs_part(&nd->intent); - res = link_path_walk(link, nd); - out: - if (nd->depth || res || nd->last_type!=LAST_NORM) -@@ -768,6 +788,33 @@ fail: - return PTR_ERR(dentry); - } - -+static int revalidate_special(struct nameidata *nd) -+{ -+ struct dentry *dentry = nd->dentry; -+ int err, counter = 0; -+ -+ revalidate_again: -+ if (!dentry->d_op || !dentry->d_op->d_revalidate) -+ return 0; -+ if (!dentry->d_op->d_revalidate(dentry, nd)) { -+ struct dentry *new; -+ if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd))) -+ return err; -+ new = real_lookup(dentry->d_parent, &dentry->d_name, nd); -+ if (IS_ERR(new)) -+ return PTR_ERR(new); -+ d_invalidate(dentry); -+ dput(dentry); -+ nd->dentry = dentry = new; -+ counter++; -+ if (counter < 10) -+ goto revalidate_again; -+ //printk("excessive revalidate_it loops\n"); -+ return -ESTALE; -+ } -+ return 0; -+} -+ - /* - * Name resolution. - * This is the basic name resolution function, turning a pathname into -@@ -864,7 +911,11 @@ static fastcall int __link_path_walk(con - goto out_dput; - - if (inode->i_op->follow_link) { -+ int save_flags = nd->flags; -+ nd->flags |= LOOKUP_LINK_NOTLAST; - err = do_follow_link(&next, nd); -+ if (!(save_flags & LOOKUP_LINK_NOTLAST)) -+ nd->flags &= ~LOOKUP_LINK_NOTLAST; - if (err) - goto return_err; - err = -ENOENT; -@@ -899,6 +950,23 @@ last_component: - inode = nd->dentry->d_inode; - /* fallthrough */ - case 1: -+ nd->flags |= LOOKUP_LAST; -+ err = revalidate_special(nd); -+ nd->flags &= ~LOOKUP_LAST; -+ if (!nd->dentry->d_inode) -+ err = -ENOENT; -+ if (err) { -+ path_release(nd); -+ goto return_err; -+ } -+ if (lookup_flags & LOOKUP_DIRECTORY) { -+ err = -ENOTDIR; -+ if(!nd->dentry->d_inode->i_op || -+ !nd->dentry->d_inode->i_op->lookup) { -+ path_release(nd); -+ goto return_err; -+ } -+ } - goto return_reval; - } - if (nd->dentry->d_op && nd->dentry->d_op->d_hash) { -@@ -906,7 +974,9 @@ last_component: - if (err < 0) - break; - } -+ nd->flags |= LOOKUP_LAST; - err = do_lookup(nd, &this, &next); -+ nd->flags &= ~LOOKUP_LAST; - if (err) - break; - inode = next.dentry->d_inode; -@@ -1066,7 +1136,7 @@ set_it: - } - - /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */ --static int fastcall do_path_lookup(int dfd, const char *name, -+static int fastcall do_path_lookup_it(int dfd, const char *name, - unsigned int flags, struct nameidata *nd) - { - int retval = 0; -@@ -1134,10 +1204,23 @@ fput_fail: - goto out_fail; - } - --int fastcall path_lookup(const char *name, unsigned int flags, -+static int fastcall do_path_lookup(int dfd, const char *name, -+ unsigned int flags, struct nameidata *nd) -+{ -+ intent_init(&nd->intent, IT_GETATTR); -+ return do_path_lookup_it(dfd, name, flags, nd); -+} -+ -+int fastcall path_lookup_it(const char *name, unsigned int flags, - struct nameidata *nd) - { -- return do_path_lookup(AT_FDCWD, name, flags, nd); -+ return do_path_lookup_it(AT_FDCWD, name, flags, nd); -+} -+ -+int fastcall path_lookup(const char *name, unsigned int flags, struct nameidata *nd) -+{ -+ intent_init(&nd->intent, IT_GETATTR); -+ return path_lookup_it(name, flags, nd); - } - - static int __path_lookup_intent_open(int dfd, const char *name, -@@ -1149,13 +1232,13 @@ static int __path_lookup_intent_open(int - - if (filp == NULL) - return -ENFILE; -- nd->intent.open.file = filp; -- nd->intent.open.flags = open_flags; -- nd->intent.open.create_mode = create_mode; -- err = do_path_lookup(dfd, name, lookup_flags|LOOKUP_OPEN, nd); -- if (IS_ERR(nd->intent.open.file)) { -+ nd->intent.file = filp; -+ nd->intent.flags = open_flags; -+ nd->intent.create_mode = create_mode; -+ err = do_path_lookup_it(dfd, name, lookup_flags|LOOKUP_OPEN, nd); -+ if (IS_ERR(nd->intent.file)) { - if (err == 0) { -- err = PTR_ERR(nd->intent.open.file); -+ err = PTR_ERR(nd->intent.file); - path_release(nd); - } - } else if (err != 0) -@@ -1172,10 +1255,10 @@ static int __path_lookup_intent_open(int - * @open_flags: open intent flags - */ - int path_lookup_open(int dfd, const char *name, unsigned int lookup_flags, -- struct nameidata *nd, int open_flags) -+ struct nameidata *nd, int open_flags, int create_mode) - { - return __path_lookup_intent_open(dfd, name, lookup_flags, nd, -- open_flags, 0); -+ open_flags, create_mode); - } - - /** -@@ -1258,7 +1341,7 @@ struct dentry * lookup_hash(struct namei - } - - /* SMP-safe */ --struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd) - { - unsigned long hash; - struct qstr this; -@@ -1278,11 +1361,17 @@ struct dentry * lookup_one_len(const cha - } - this.hash = end_name_hash(hash); - -- return __lookup_hash(&this, base, NULL); -+ return __lookup_hash(&this, base, nd); - access: - return ERR_PTR(-EACCES); - } - -+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+{ -+ return lookup_one_len_it(name, base, len, NULL); -+} -+ -+ - /* - * namei() - * -@@ -1294,22 +1383,36 @@ access: - * that namei follows links, while lnamei does not. - * SMP-safe - */ --int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags, -- struct nameidata *nd) -+ -+int fastcall __user_walk_fd_it(int dfd, const char __user *name, unsigned flags, -+ struct nameidata *nd) - { - char *tmp = getname(name); - int err = PTR_ERR(tmp); - - if (!IS_ERR(tmp)) { -- err = do_path_lookup(dfd, tmp, flags, nd); -+ err = do_path_lookup_it(dfd, tmp, flags, nd); - putname(tmp); - } - return err; - } - -+int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags, -+ struct nameidata *nd) -+{ -+ intent_init(&nd->intent, IT_LOOKUP); -+ return __user_walk_fd_it(dfd, name, flags, nd); -+} -+ -+int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd) -+{ -+ return __user_walk_fd_it(AT_FDCWD, name, flags, nd); -+} -+ - int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd) - { -- return __user_walk_fd(AT_FDCWD, name, flags, nd); -+ intent_init(&nd->intent, IT_LOOKUP); -+ return __user_walk_it(name, flags, nd); - } - - /* -@@ -1545,7 +1648,7 @@ int may_open(struct nameidata *nd, int a - if (!error) { - DQUOT_INIT(inode); - -- error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL); -+ error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL, 1); - } - put_write_access(inode); - if (error) -@@ -1595,7 +1698,7 @@ int open_namei(int dfd, const char *path - */ - if (!(flag & O_CREAT)) { - error = path_lookup_open(dfd, pathname, lookup_flags(flag), -- nd, flag); -+ nd, flag, mode); - if (error) - return error; - goto ok; -@@ -1604,6 +1707,7 @@ int open_namei(int dfd, const char *path - /* - * Create - we need to know the parent. - */ -+ nd->intent.it_op |= IT_CREAT; - error = path_lookup_create(dfd,pathname,LOOKUP_PARENT,nd,flag,mode); - if (error) - return error; -@@ -1620,7 +1724,9 @@ int open_namei(int dfd, const char *path - dir = nd->dentry; - nd->flags &= ~LOOKUP_PARENT; - mutex_lock(&dir->d_inode->i_mutex); -+ nd->flags |= LOOKUP_LAST; - path.dentry = lookup_hash(nd); -+ nd->flags &= ~LOOKUP_LAST; - path.mnt = nd->mnt; - - do_last: -@@ -1630,9 +1736,9 @@ do_last: - goto exit; - } - -- if (IS_ERR(nd->intent.open.file)) { -+ if (IS_ERR(nd->intent.file)) { - mutex_unlock(&dir->d_inode->i_mutex); -- error = PTR_ERR(nd->intent.open.file); -+ error = PTR_ERR(nd->intent.file); - goto exit_dput; - } - -@@ -1687,7 +1793,7 @@ ok: - exit_dput: - dput_path(&path, nd); - exit: -- if (!IS_ERR(nd->intent.open.file)) -+ if (!IS_ERR(nd->intent.file)) - release_open_intent(nd); - path_release(nd); - return error; -@@ -1736,7 +1842,9 @@ do_link: - } - dir = nd->dentry; - mutex_lock(&dir->d_inode->i_mutex); -+ nd->flags |= LOOKUP_LAST; - path.dentry = lookup_hash(nd); -+ nd->flags &= ~LOOKUP_LAST; - path.mnt = nd->mnt; - __putname(nd->last.name); - goto do_last; -@@ -1821,15 +1929,26 @@ asmlinkage long sys_mknodat(int dfd, con - struct dentry * dentry; - struct nameidata nd; - -+ - if (S_ISDIR(mode)) - return -EPERM; - tmp = getname(filename); - if (IS_ERR(tmp)) - return PTR_ERR(tmp); - -- error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd); -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = do_path_lookup_it(dfd, tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->mknod_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mknod_raw(&nd, mode, dev); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - -@@ -1856,6 +1975,7 @@ asmlinkage long sys_mknodat(int dfd, con - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1901,9 +2021,18 @@ asmlinkage long sys_mkdirat(int dfd, con - struct dentry *dentry; - struct nameidata nd; - -- error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd); -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = do_path_lookup_it(dfd, tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->mkdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mkdir_raw(&nd, mode); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 1); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -1913,6 +2042,7 @@ asmlinkage long sys_mkdirat(int dfd, con - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1997,8 +2127,9 @@ static long do_rmdir(int dfd, const char - name = getname(pathname); - if(IS_ERR(name)) - return PTR_ERR(name); -- -- error = do_path_lookup(dfd, name, LOOKUP_PARENT, &nd); -+ -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = do_path_lookup_it(dfd, name, LOOKUP_PARENT, &nd); - if (error) - goto exit; - -@@ -2013,6 +2144,14 @@ static long do_rmdir(int dfd, const char - error = -EBUSY; - goto exit1; - } -+ if (nd.dentry->d_inode->i_op->rmdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ error = op->rmdir_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } - mutex_lock(&nd.dentry->d_inode->i_mutex); - dentry = lookup_hash(&nd); - error = PTR_ERR(dentry); -@@ -2081,12 +2220,20 @@ static long do_unlinkat(int dfd, const c - if(IS_ERR(name)) - return PTR_ERR(name); - -- error = do_path_lookup(dfd, name, LOOKUP_PARENT, &nd); -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = do_path_lookup_it(dfd, name, LOOKUP_PARENT, &nd); - if (error) - goto exit; - error = -EISDIR; - if (nd.last_type != LAST_NORM) - goto exit1; -+ if (nd.dentry->d_inode->i_op->unlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->unlink_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } - mutex_lock(&nd.dentry->d_inode->i_mutex); - dentry = lookup_hash(&nd); - error = PTR_ERR(dentry); -@@ -2169,9 +2316,17 @@ asmlinkage long sys_symlinkat(const char - struct dentry *dentry; - struct nameidata nd; - -- error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd); -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = do_path_lookup_it(newdfd, to, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->symlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->symlink_raw(&nd, from); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -2179,6 +2334,7 @@ asmlinkage long sys_symlinkat(const char - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(to); -@@ -2255,15 +2411,25 @@ asmlinkage long sys_linkat(int olddfd, c - if (IS_ERR(to)) - return PTR_ERR(to); - -- error = __user_walk_fd(olddfd, oldname, 0, &old_nd); -+ intent_init(&old_nd.intent, IT_LOOKUP); -+ error = __user_walk_fd_it(olddfd, oldname, 0, &old_nd); - if (error) - goto exit; -- error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd); -+ -+ intent_init(&nd.intent, IT_LOOKUP); -+ error = do_path_lookup_it(newdfd, to, LOOKUP_PARENT, &nd); - if (error) - goto out; - error = -EXDEV; - if (old_nd.mnt != nd.mnt) - goto out_release; -+ if (nd.dentry->d_inode->i_op->link_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->link_raw(&old_nd, &nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out_release; -+ } - new_dentry = lookup_create(&nd, 0); - error = PTR_ERR(new_dentry); - if (!IS_ERR(new_dentry)) { -@@ -2440,12 +2606,14 @@ static int do_rename(int olddfd, const c - struct dentry * old_dentry, *new_dentry; - struct dentry * trap; - struct nameidata oldnd, newnd; -- -- error = do_path_lookup(olddfd, oldname, LOOKUP_PARENT, &oldnd); -+ -+ intent_init(&oldnd.intent, IT_LOOKUP); -+ error = do_path_lookup_it(olddfd, oldname, LOOKUP_PARENT, &oldnd); - if (error) - goto exit; -- -- error = do_path_lookup(newdfd, newname, LOOKUP_PARENT, &newnd); -+ -+ intent_init(&newnd.intent, IT_LOOKUP); -+ error = do_path_lookup_it(newdfd, newname, LOOKUP_PARENT, &newnd); - if (error) - goto exit1; - -@@ -2462,6 +2630,13 @@ static int do_rename(int olddfd, const c - if (newnd.last_type != LAST_NORM) - goto exit2; - -+ if (old_dir->d_inode->i_op->rename_raw) { -+ error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit2; -+ } -+ - trap = lock_rename(new_dir, old_dir); - - old_dentry = lookup_hash(&oldnd); -@@ -2493,8 +2668,7 @@ static int do_rename(int olddfd, const c - if (new_dentry == trap) - goto exit5; - -- error = vfs_rename(old_dir->d_inode, old_dentry, -- new_dir->d_inode, new_dentry); -+ error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); - exit5: - dput(new_dentry); - exit4: -@@ -2700,6 +2874,7 @@ EXPORT_SYMBOL(__page_symlink); - EXPORT_SYMBOL(page_symlink); - EXPORT_SYMBOL(page_symlink_inode_operations); - EXPORT_SYMBOL(path_lookup); -+EXPORT_SYMBOL(path_lookup_it); - EXPORT_SYMBOL(path_release); - EXPORT_SYMBOL(path_walk); - EXPORT_SYMBOL(permission); -Index: LINUX-SRC-TREE/fs/namespace.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/namespace.c -+++ LINUX-SRC-TREE/fs/namespace.c -@@ -75,6 +75,7 @@ struct vfsmount *alloc_vfsmnt(const char - INIT_LIST_HEAD(&mnt->mnt_share); - INIT_LIST_HEAD(&mnt->mnt_slave_list); - INIT_LIST_HEAD(&mnt->mnt_slave); -+ INIT_LIST_HEAD(&mnt->mnt_lustre_list); - if (name) { - int size = strlen(name) + 1; - char *newname = kmalloc(size, GFP_KERNEL); -@@ -155,6 +156,7 @@ static void __touch_namespace(struct nam - - static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd) - { -+ memset(old_nd, 0, sizeof(*old_nd)); - old_nd->dentry = mnt->mnt_mountpoint; - old_nd->mnt = mnt->mnt_parent; - mnt->mnt_parent = mnt; -@@ -273,6 +275,9 @@ static inline void __mntput(struct vfsmo - { - struct super_block *sb = mnt->mnt_sb; - dput(mnt->mnt_root); -+ spin_lock(&dcache_lock); -+ list_del(&mnt->mnt_lustre_list); -+ spin_unlock(&dcache_lock); - free_vfsmnt(mnt); - deactivate_super(sb); - } -@@ -539,6 +544,8 @@ static int do_umount(struct vfsmount *mn - */ - - lock_kernel(); -+ if (sb->s_op->umount_lustre) -+ sb->s_op->umount_lustre(sb); - if ((flags & MNT_FORCE) && sb->s_op->umount_begin) - sb->s_op->umount_begin(sb); - unlock_kernel(); -@@ -871,7 +878,8 @@ static int do_loopback(struct nameidata - return err; - if (!old_name || !*old_name) - return -EINVAL; -- err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); -+ intent_init(&old_nd.intent, IT_LOOKUP); -+ err = path_lookup_it(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; - -@@ -956,7 +964,8 @@ static int do_move_mount(struct nameidat - return -EPERM; - if (!old_name || !*old_name) - return -EINVAL; -- err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); -+ intent_init(&old_nd.intent, IT_LOOKUP); -+ err = path_lookup_it(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; - -@@ -1271,6 +1280,7 @@ long do_mount(char *dev_name, char *dir_ - int retval = 0; - int mnt_flags = 0; - -+ - /* Discard magic */ - if ((flags & MS_MGC_MSK) == MS_MGC_VAL) - flags &= ~MS_MGC_MSK; -@@ -1301,7 +1311,8 @@ long do_mount(char *dev_name, char *dir_ - MS_NOATIME | MS_NODIRATIME); - - /* ... and get the mountpoint */ -- retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd); -+ intent_init(&nd.intent, IT_LOOKUP); -+ retval = path_lookup_it(dir_name, LOOKUP_FOLLOW, &nd); - if (retval) - return retval; - -Index: LINUX-SRC-TREE/fs/nfs/dir.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/nfs/dir.c -+++ LINUX-SRC-TREE/fs/nfs/dir.c -@@ -834,7 +834,7 @@ int nfs_is_exclusive_create(struct inode - return 0; - if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0) - return 0; -- return (nd->intent.open.flags & O_EXCL) != 0; -+ return (nd->intent.it_flags & O_EXCL) != 0; - } - - static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) -@@ -911,7 +911,7 @@ static int is_atomic_open(struct inode * - if (nd->flags & LOOKUP_DIRECTORY) - return 0; - /* Are we trying to write to a read only partition? */ -- if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) -+ if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) - return 0; - return 1; - } -@@ -932,7 +932,7 @@ static struct dentry *nfs_atomic_lookup( - dentry->d_op = NFS_PROTO(dir)->dentry_ops; - - /* Let vfs_create() deal with O_EXCL */ -- if (nd->intent.open.flags & O_EXCL) { -+ if (nd->intent.it_flags & O_EXCL) { - d_add(dentry, NULL); - goto out; - } -@@ -947,7 +947,7 @@ static struct dentry *nfs_atomic_lookup( - goto out; - } - -- if (nd->intent.open.flags & O_CREAT) { -+ if (nd->intent.it_flags & O_CREAT) { - nfs_begin_data_update(dir); - res = nfs4_atomic_open(dir, dentry, nd); - nfs_end_data_update(dir); -@@ -966,7 +966,7 @@ static struct dentry *nfs_atomic_lookup( - case -ENOTDIR: - goto no_open; - case -ELOOP: -- if (!(nd->intent.open.flags & O_NOFOLLOW)) -+ if (!(nd->intent.it_flags & O_NOFOLLOW)) - goto no_open; - /* case -EINVAL: */ - default: -@@ -1002,7 +1002,7 @@ static int nfs_open_revalidate(struct de - /* NFS only supports OPEN on regular files */ - if (!S_ISREG(inode->i_mode)) - goto no_open; -- openflags = nd->intent.open.flags; -+ openflags = nd->intent.it_flags; - /* We cannot do exclusive creation on a positive dentry */ - if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) - goto no_open; -@@ -1138,7 +1138,7 @@ static int nfs_create(struct inode *dir, - attr.ia_valid = ATTR_MODE; - - if (nd && (nd->flags & LOOKUP_CREATE)) -- open_flags = nd->intent.open.flags; -+ open_flags = nd->intent.it_flags; - - lock_kernel(); - nfs_begin_data_update(dir); -Index: LINUX-SRC-TREE/fs/nfs/nfs4proc.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/nfs/nfs4proc.c -+++ LINUX-SRC-TREE/fs/nfs/nfs4proc.c -@@ -1220,7 +1220,7 @@ static void nfs4_intent_set_file(struct - ctx = (struct nfs_open_context *)filp->private_data; - ctx->state = state; - } else -- nfs4_close_state(state, nd->intent.open.flags); -+ nfs4_close_state(state, nd->intent.flags); - } - - struct dentry * -@@ -1232,19 +1232,19 @@ nfs4_atomic_open(struct inode *dir, stru - struct dentry *res; - - if (nd->flags & LOOKUP_CREATE) { -- attr.ia_mode = nd->intent.open.create_mode; -+ attr.ia_mode = nd->intent.create_mode; - attr.ia_valid = ATTR_MODE; - if (!IS_POSIXACL(dir)) - attr.ia_mode &= ~current->fs->umask; - } else { - attr.ia_valid = 0; -- BUG_ON(nd->intent.open.flags & O_CREAT); -+ BUG_ON(nd->intent.flags & O_CREAT); - } - - cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); - if (IS_ERR(cred)) - return (struct dentry *)cred; -- state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred); -+ state = nfs4_do_open(dir, dentry, nd->intent.flags, &attr, cred); - put_rpccred(cred); - if (IS_ERR(state)) { - if (PTR_ERR(state) == -ENOENT) -Index: LINUX-SRC-TREE/fs/nfsctl.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/nfsctl.c -+++ LINUX-SRC-TREE/fs/nfsctl.c -@@ -26,6 +26,7 @@ static struct file *do_open(char *name, - struct nameidata nd; - int error; - -+ intent_init(&nd.intent, IT_OPEN); - nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL); - - if (IS_ERR(nd.mnt)) -Index: LINUX-SRC-TREE/fs/open.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/open.c -+++ LINUX-SRC-TREE/fs/open.c -@@ -198,9 +198,10 @@ out: - } - - int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, -- struct file *filp) -+ struct file *filp, int called_from_open) - { - int err; -+ struct inode_operations *op = dentry->d_inode->i_op; - struct iattr newattrs; - - /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */ -@@ -215,7 +216,17 @@ int do_truncate(struct dentry *dentry, l - } - - mutex_lock(&dentry->d_inode->i_mutex); -- err = notify_change(dentry, &newattrs); -+ if (called_from_open) -+ newattrs.ia_valid |= ATTR_FROM_OPEN; -+ if (op->setattr_raw) { -+ newattrs.ia_valid |= ATTR_RAW; -+ newattrs.ia_ctime = CURRENT_TIME; -+ down_write(&dentry->d_inode->i_alloc_sem); -+ err = op->setattr_raw(dentry->d_inode, &newattrs); -+ up_write(&dentry->d_inode->i_alloc_sem); -+ } else -+ err = notify_change(dentry, &newattrs); -+ - mutex_unlock(&dentry->d_inode->i_mutex); - return err; - } -@@ -225,12 +236,12 @@ static long do_sys_truncate(const char _ - struct nameidata nd; - struct inode * inode; - int error; -- -+ intent_init(&nd.intent, IT_GETATTR); - error = -EINVAL; - if (length < 0) /* sorry, but loff_t says... */ - goto out; - -- error = user_path_walk(path, &nd); -+ error = user_path_walk_it(path, &nd); - if (error) - goto out; - inode = nd.dentry->d_inode; -@@ -270,7 +281,7 @@ static long do_sys_truncate(const char _ - error = locks_verify_truncate(inode, NULL, length); - if (!error) { - DQUOT_INIT(inode); -- error = do_truncate(nd.dentry, length, 0, NULL); -+ error = do_truncate(nd.dentry, length, 0, NULL, 0); - } - put_write_access(inode); - -@@ -322,7 +333,7 @@ static long do_sys_ftruncate(unsigned in - - error = locks_verify_truncate(inode, file, length); - if (!error) -- error = do_truncate(dentry, length, 0, file); -+ error = do_truncate(dentry, length, 0, file, 0); - out_putf: - fput(file); - out: -@@ -407,9 +418,20 @@ asmlinkage long sys_utime(char __user * - (error = vfs_permission(&nd, MAY_WRITE)) != 0) - goto dput_and_out; - } -- mutex_lock(&inode->i_mutex); -- error = notify_change(nd.dentry, &newattrs); -- mutex_unlock(&inode->i_mutex); -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto dput_and_out; -+ } else { -+ mutex_lock(&inode->i_mutex); -+ error = notify_change(nd.dentry, &newattrs); -+ mutex_unlock(&inode->i_mutex); -+ } -+ - dput_and_out: - path_release(&nd); - out: -@@ -495,6 +517,7 @@ asmlinkage long sys_faccessat(int dfd, c - int old_fsuid, old_fsgid; - kernel_cap_t old_cap; - int res; -+ intent_init(&nd.intent, IT_GETATTR); - - if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ - return -EINVAL; -@@ -519,7 +542,7 @@ asmlinkage long sys_faccessat(int dfd, c - else - current->cap_effective = current->cap_permitted; - -- res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); -+ res = __user_walk_fd_it(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); - if (!res) { - res = vfs_permission(&nd, mode); - /* SuS v2 requires we report a read only fs too */ -@@ -545,8 +568,9 @@ asmlinkage long sys_chdir(const char __u - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); -+ error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); - if (error) - goto out; - -@@ -596,8 +620,9 @@ asmlinkage long sys_chroot(const char __ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); -+ error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); - if (error) - goto out; - -@@ -618,38 +643,55 @@ out: - return error; - } - --asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+int chmod_common(struct dentry *dentry, mode_t mode) - { -- struct inode * inode; -- struct dentry * dentry; -- struct file * file; -- int err = -EBADF; -+ struct inode * inode = dentry->d_inode; - struct iattr newattrs; -+ int error = -EROFS; - -- file = fget(fd); -- if (!file) -+ if (IS_RDONLY(inode)) - goto out; - -- dentry = file->f_dentry; -- inode = dentry->d_inode; -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; - -- audit_inode(NULL, inode); -+ newattrs.ia_mode = mode; -+ newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out; -+ } - -- err = -EROFS; -- if (IS_RDONLY(inode)) -- goto out_putf; -- err = -EPERM; -+ error = -EPERM; - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto out_putf; -+ goto out; -+ - mutex_lock(&inode->i_mutex); - if (mode == (mode_t) -1) - mode = inode->i_mode; - newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); - newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- err = notify_change(dentry, &newattrs); -+ error = notify_change(dentry, &newattrs); - mutex_unlock(&inode->i_mutex); -+out: -+ return error; -+} -+ -+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+{ -+ struct file * file; -+ int err = -EBADF; -+ -+ file = fget(fd); -+ if (!file) -+ goto out; -+ -+ audit_inode(NULL, file->f_dentry->d_inode); -+ -+ err = chmod_common(file->f_dentry, mode); - --out_putf: - fput(file); - out: - return err; -@@ -659,32 +701,12 @@ asmlinkage long sys_fchmodat(int dfd, co - mode_t mode) - { - struct nameidata nd; -- struct inode * inode; - int error; -- struct iattr newattrs; - - error = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW, &nd); - if (error) - goto out; -- inode = nd.dentry->d_inode; -- -- error = -EROFS; -- if (IS_RDONLY(inode)) -- goto dput_and_out; -- -- error = -EPERM; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto dput_and_out; -- -- mutex_lock(&inode->i_mutex); -- if (mode == (mode_t) -1) -- mode = inode->i_mode; -- newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -- newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- error = notify_change(nd.dentry, &newattrs); -- mutex_unlock(&inode->i_mutex); -- --dput_and_out: -+ error = chmod_common(nd.dentry, mode); - path_release(&nd); - out: - return error; -@@ -710,6 +732,18 @@ static int chown_common(struct dentry * - if (IS_RDONLY(inode)) - goto out; - error = -EPERM; -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_uid = user; -+ newattrs.ia_gid = group; -+ newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ return error; -+ } - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - goto out; - newattrs.ia_valid = ATTR_CTIME; -@@ -823,6 +857,7 @@ static struct file *__dentry_open(struct - error = open(inode, f); - if (error) - goto cleanup_all; -+ intent_release(f->f_it); - } - - f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); -@@ -849,6 +884,7 @@ cleanup_all: - f->f_dentry = NULL; - f->f_vfsmnt = NULL; - cleanup_file: -+ intent_release(f->f_it); - put_filp(f); - dput(dentry); - mntput(mnt); -@@ -874,6 +910,7 @@ static struct file *do_filp_open(int dfd - { - int namei_flags, error; - struct nameidata nd; -+ intent_init(&nd.intent, IT_OPEN); - - namei_flags = flags; - if ((namei_flags+1) & O_ACCMODE) -@@ -910,19 +947,19 @@ EXPORT_SYMBOL(filp_open); - struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, - int (*open)(struct inode *, struct file *)) - { -- if (IS_ERR(nd->intent.open.file)) -+ if (IS_ERR(nd->intent.file)) - goto out; - if (IS_ERR(dentry)) - goto out_err; -- nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->mnt), -- nd->intent.open.flags - 1, -- nd->intent.open.file, -+ nd->intent.file = __dentry_open(dget(dentry), mntget(nd->mnt), -+ nd->intent.flags - 1, -+ nd->intent.file, - open); - out: -- return nd->intent.open.file; -+ return nd->intent.file; - out_err: - release_open_intent(nd); -- nd->intent.open.file = (struct file *)dentry; -+ nd->intent.file = (struct file *)dentry; - goto out; - } - EXPORT_SYMBOL_GPL(lookup_instantiate_filp); -@@ -939,7 +976,8 @@ struct file *nameidata_to_filp(struct na - struct file *filp; - - /* Pick up the filp from the open intent */ -- filp = nd->intent.open.file; -+ filp = nd->intent.file; -+ filp->f_it = &nd->intent; - /* Has the filesystem initialised the file for us? */ - if (filp->f_dentry == NULL) - filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL); -Index: LINUX-SRC-TREE/fs/stat.c -=================================================================== ---- LINUX-SRC-TREE.orig/fs/stat.c -+++ LINUX-SRC-TREE/fs/stat.c -@@ -38,7 +38,7 @@ void generic_fillattr(struct inode *inod - - EXPORT_SYMBOL(generic_fillattr); - --int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat) - { - struct inode *inode = dentry->d_inode; - int retval; -@@ -47,6 +47,8 @@ int vfs_getattr(struct vfsmount *mnt, st - if (retval) - return retval; - -+ if (inode->i_op->getattr_it) -+ return inode->i_op->getattr_it(mnt, dentry, it, stat); - if (inode->i_op->getattr) - return inode->i_op->getattr(mnt, dentry, stat); - -@@ -61,6 +63,11 @@ int vfs_getattr(struct vfsmount *mnt, st - return 0; - } - -+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+{ -+ return vfs_getattr_it(mnt, dentry, NULL, stat); -+} -+ - EXPORT_SYMBOL(vfs_getattr); - - int vfs_stat_fd(int dfd, char __user *name, struct kstat *stat) -@@ -68,9 +75,10 @@ int vfs_stat_fd(int dfd, char __user *na - struct nameidata nd; - int error; - -- error = __user_walk_fd(dfd, name, LOOKUP_FOLLOW, &nd); -+ intent_init(&nd.intent, IT_GETATTR); -+ error = __user_walk_fd_it(dfd, name, LOOKUP_FOLLOW, &nd); - if (!error) { -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -88,9 +96,10 @@ int vfs_lstat_fd(int dfd, char __user *n - struct nameidata nd; - int error; - -- error = __user_walk_fd(dfd, name, 0, &nd); -+ intent_init(&nd.intent, IT_GETATTR); -+ error = __user_walk_fd_it(dfd, name, 0, &nd); - if (!error) { -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - } - return error; -@@ -107,9 +116,12 @@ int vfs_fstat(unsigned int fd, struct ks - { - struct file *f = fget(fd); - int error = -EBADF; -+ struct nameidata nd; -+ intent_init(&nd.intent, IT_GETATTR); - - if (f) { -- error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat); -+ error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat); -+ intent_release(&nd.intent); - fput(f); - } - return error; -Index: LINUX-SRC-TREE/include/linux/dcache.h -=================================================================== ---- LINUX-SRC-TREE.orig/include/linux/dcache.h -+++ LINUX-SRC-TREE/include/linux/dcache.h -@@ -36,6 +36,9 @@ struct qstr { - const unsigned char *name; - }; - -+struct inode; -+#include <linux/namei.h> -+ - struct dentry_stat_t { - int nr_dentry; - int nr_unused; -Index: LINUX-SRC-TREE/include/linux/fs.h -=================================================================== ---- LINUX-SRC-TREE.orig/include/linux/fs.h -+++ LINUX-SRC-TREE/include/linux/fs.h -@@ -61,6 +61,7 @@ extern int dir_notify_enable; - - #define FMODE_READ 1 - #define FMODE_WRITE 2 -+#define FMODE_EXEC 16 - - /* Internal kernel extensions */ - #define FMODE_LSEEK 4 -@@ -272,6 +273,8 @@ typedef void (dio_iodone_t)(struct kiocb - #define ATTR_KILL_SUID 2048 - #define ATTR_KILL_SGID 4096 - #define ATTR_FILE 8192 -+#define ATTR_RAW 16384 /* file system, not vfs will massage attrs */ -+#define ATTR_FROM_OPEN 65536 /* called from open path, ie O_TRUNC */ - #define ATTR_NO_BLOCK 32768 /* Return EAGAIN and don't block on long truncates */ - - /* -@@ -517,6 +520,7 @@ struct inode { - struct block_device *i_bdev; - struct cdev *i_cdev; - int i_cindex; -+ void *i_filterdata; - - __u32 i_generation; - -@@ -664,6 +668,7 @@ struct file { - spinlock_t f_ep_lock; - #endif /* #ifdef CONFIG_EPOLL */ - struct address_space *f_mapping; -+ struct lookup_intent *f_it; - }; - extern spinlock_t files_lock; - #define file_list_lock() spin_lock(&files_lock); -@@ -1059,20 +1064,29 @@ struct inode_operations { - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); - int (*link) (struct dentry *,struct inode *,struct dentry *); -+ int (*link_raw) (struct nameidata *,struct nameidata *); - int (*unlink) (struct inode *,struct dentry *); -+ int (*unlink_raw) (struct nameidata *); - int (*symlink) (struct inode *,struct dentry *,const char *); -+ int (*symlink_raw) (struct nameidata *,const char *); - int (*mkdir) (struct inode *,struct dentry *,int); -+ int (*mkdir_raw) (struct nameidata *,int); - int (*rmdir) (struct inode *,struct dentry *); -+ int (*rmdir_raw) (struct nameidata *); - int (*mknod) (struct inode *,struct dentry *,int,dev_t); -+ int (*mknod_raw) (struct nameidata *,int,dev_t); - int (*rename) (struct inode *, struct dentry *, - struct inode *, struct dentry *); -+ int (*rename_raw) (struct nameidata *, struct nameidata *); - int (*readlink) (struct dentry *, char __user *,int); - void * (*follow_link) (struct dentry *, struct nameidata *); - void (*put_link) (struct dentry *, struct nameidata *, void *); - void (*truncate) (struct inode *); - int (*permission) (struct inode *, int, struct nameidata *); - int (*setattr) (struct dentry *, struct iattr *); -+ int (*setattr_raw) (struct inode *, struct iattr *); - int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); -+ int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *); - int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); - ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); - ssize_t (*listxattr) (struct dentry *, char *, size_t); -@@ -1113,6 +1127,7 @@ struct super_operations { - int (*remount_fs) (struct super_block *, int *, char *); - void (*clear_inode) (struct inode *); - void (*umount_begin) (struct super_block *); -+ void (*umount_lustre) (struct super_block *); - - int (*show_options)(struct seq_file *, struct vfsmount *); - -@@ -1322,6 +1337,7 @@ extern int may_umount_tree(struct vfsmou - extern int may_umount(struct vfsmount *); - extern void umount_tree(struct vfsmount *, int, struct list_head *); - extern void release_mounts(struct list_head *); -+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data); - extern long do_mount(char *, char *, char *, unsigned long, void *); - extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); - extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, -@@ -1378,11 +1394,12 @@ static inline int break_lease(struct ino - /* fs/open.c */ - - extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, -- struct file *filp); -+ struct file *filp, int called_from_open); - extern long do_sys_open(int fdf, const char __user *filename, int flags, - int mode); - extern struct file *filp_open(const char *, int, int); - extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); -+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *); - extern int filp_close(struct file *, fl_owner_t id); - extern char * getname(const char __user *); - -Index: LINUX-SRC-TREE/include/linux/mount.h -=================================================================== ---- LINUX-SRC-TREE.orig/include/linux/mount.h -+++ LINUX-SRC-TREE/include/linux/mount.h -@@ -46,6 +46,8 @@ struct vfsmount { - struct list_head mnt_slave; /* slave list entry */ - struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ - struct namespace *mnt_namespace; /* containing namespace */ -+ struct list_head mnt_lustre_list; /* GNS mount list */ -+ unsigned long mnt_last_used; /* for GNS auto-umount (jiffies) */ - int mnt_pinned; - }; - -Index: LINUX-SRC-TREE/include/linux/namei.h -=================================================================== ---- LINUX-SRC-TREE.orig/include/linux/namei.h -+++ LINUX-SRC-TREE/include/linux/namei.h -@@ -5,10 +5,39 @@ - - struct vfsmount; - -+#define IT_OPEN (1) -+#define IT_CREAT (1<<1) -+#define IT_READDIR (1<<2) -+#define IT_GETATTR (1<<3) -+#define IT_LOOKUP (1<<4) -+#define IT_UNLINK (1<<5) -+#define IT_TRUNC (1<<6) -+#define IT_GETXATTR (1<<7) -+ -+struct lustre_intent_data { -+ int it_disposition; -+ int it_status; -+ __u64 it_lock_handle; -+ void *it_data; -+ int it_lock_mode; -+}; -+ -+#define INTENT_MAGIC 0x19620323 -+ -+#define it_flags flags -+#define it_create_mode create_mode -+#define lookup_intent open_intent -+ - struct open_intent { -- int flags; -- int create_mode; -- struct file *file; -+ int it_magic; -+ void (*it_op_release)(struct open_intent *); -+ int it_op; -+ int flags; -+ int create_mode; -+ struct file *file; -+ union { -+ struct lustre_intent_data lustre; -+ } d; - }; - - enum { MAX_NESTED_LINKS = 8 }; -@@ -22,12 +51,23 @@ struct nameidata { - unsigned depth; - char *saved_names[MAX_NESTED_LINKS + 1]; - -- /* Intent data */ -- union { -- struct open_intent open; -- } intent; -+ struct lookup_intent intent; - }; - -+static inline void intent_reset_fs_part(struct lookup_intent *it) -+{ -+ memset(&it->d, 0, sizeof(it->d)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op_release = NULL; -+} -+ -+static inline void intent_init(struct lookup_intent *it, int op) -+{ -+ memset(it, 0, sizeof(*it)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op = op; -+} -+ - /* - * Type of the last component on LOOKUP_PARENT - */ -@@ -48,6 +88,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA - #define LOOKUP_PARENT 16 - #define LOOKUP_NOALT 32 - #define LOOKUP_REVAL 64 -+#define LOOKUP_LAST (0x1000) -+#define LOOKUP_LINK_NOTLAST (0x2000) - /* - * Intent data - */ -@@ -57,18 +99,29 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA - - extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); - extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *)); -+extern int FASTCALL(__user_walk_fd_it(int dfd, const char __user *, unsigned, struct nameidata *)); - #define user_path_walk(name,nd) \ - __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd) - #define user_path_walk_link(name,nd) \ - __user_walk_fd(AT_FDCWD, name, 0, nd) -+ -+extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)); -+#define user_path_walk_it(name,nd) \ -+ __user_walk_it(name, LOOKUP_FOLLOW, nd) -+#define user_path_walk_link_it(name,nd) \ -+ __user_walk_it(name, 0, nd) -+extern void intent_release(struct lookup_intent *); -+ - extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); -+extern int FASTCALL(path_lookup_it(const char *, unsigned, struct nameidata *)); - extern int FASTCALL(path_walk(const char *, struct nameidata *)); - extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); - extern void path_release(struct nameidata *); - extern void path_release_on_umount(struct nameidata *); - - extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags); --extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); -+extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, -+ int open_flags, int create_mode); - extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, - int (*open)(struct inode *, struct file *)); - extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch deleted file mode 100644 index 862b94f0cf..0000000000 --- a/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch +++ /dev/null @@ -1,833 +0,0 @@ -Index: linux-2.6.5-12.1/fs/exec.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/exec.c 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/fs/exec.c 2004-06-03 18:31:28.000000000 -0400 -@@ -125,9 +125,10 @@ - struct nameidata nd; - int error; - -- nd.intent.open.flags = FMODE_READ; -+ intent_init(&nd.intent, IT_OPEN); - -- FSHOOK_BEGIN_USER_WALK(open, -+ nd.intent.it_flags = FMODE_READ|FMODE_EXEC; -+ FSHOOK_BEGIN_USER_WALK_IT(open, - error, - library, - LOOKUP_FOLLOW|LOOKUP_OPEN, -@@ -144,7 +145,7 @@ - goto out; - } - -- file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); -+ file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent); - error = PTR_ERR(file); - if (IS_ERR(file)) - goto out; -@@ -495,8 +496,9 @@ - - FSHOOK_BEGIN(open, err, .filename = name, .flags = O_RDONLY) - -- nd.intent.open.flags = FMODE_READ; -- err = path_lookup(name, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd); -+ intent_init(&nd.intent, IT_OPEN); -+ nd.intent.it_flags = FMODE_READ|FMODE_EXEC; -+ err = path_lookup(name, LOOKUP_FOLLOW, &nd); - file = ERR_PTR(err); - - if (!err) { -@@ -509,7 +511,7 @@ - err = -EACCES; - file = ERR_PTR(err); - if (!err) { -- file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); -+ file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent); - if (!IS_ERR(file)) { - err = deny_write_access(file); - if (err) { -Index: linux-2.6.5-12.1/fs/namei.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/namei.c 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/fs/namei.c 2004-06-03 18:42:17.000000000 -0400 -@@ -270,8 +270,19 @@ - return 0; - } - -+void intent_release(struct lookup_intent *it) -+{ -+ if (!it) -+ return; -+ if (it->it_magic != INTENT_MAGIC) -+ return; -+ if (it->it_op_release) -+ it->it_op_release(it); -+} -+ - void path_release(struct nameidata *nd) - { -+ intent_release(&nd->intent); - dput(nd->dentry); - mntput(nd->mnt); - } -@@ -348,7 +359,10 @@ - { - struct dentry * result; - struct inode *dir = parent->d_inode; -+ int counter = 0; - -+again: -+ counter++; - down(&dir->i_sem); - /* - * First re-do the cached lookup just in case it was created -@@ -387,7 +401,10 @@ - if (result->d_op && result->d_op->d_revalidate) { - if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) { - dput(result); -- result = ERR_PTR(-ENOENT); -+ if (counter > 10) -+ result = ERR_PTR(-ESTALE); -+ if (!IS_ERR(result)) -+ goto again; - } - } - return result; -@@ -564,6 +581,33 @@ - return PTR_ERR(dentry); - } - -+static int revalidate_special(struct nameidata *nd) -+{ -+ struct dentry *dentry = nd->dentry; -+ int err, counter = 0; -+ -+ revalidate_again: -+ if (!dentry->d_op || !dentry->d_op->d_revalidate) -+ return 0; -+ if (!dentry->d_op->d_revalidate(dentry, nd)) { -+ struct dentry *new; -+ if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd))) -+ return err; -+ new = real_lookup(dentry->d_parent, &dentry->d_name, nd); -+ if (IS_ERR(new)) -+ return PTR_ERR(new); -+ d_invalidate(dentry); -+ dput(dentry); -+ nd->dentry = dentry = new; -+ counter++; -+ if (counter < 10) -+ goto revalidate_again; -+ //printk("excessive revalidate_it loops\n"); -+ return -ESTALE; -+ } -+ return 0; -+} -+ - /* - * Name resolution. - * -@@ -664,8 +708,12 @@ - goto out_dput; - - if (inode->i_op->follow_link) { -+ int save_flags = nd->flags; - mntget(next.mnt); -+ nd->flags |= LOOKUP_LINK_NOTLAST; - err = do_follow_link(next.dentry, nd); -+ if (!(save_flags & LOOKUP_LINK_NOTLAST)) -+ nd->flags &= ~LOOKUP_LINK_NOTLAST; - dput(next.dentry); - mntput(next.mnt); - if (err) -@@ -703,14 +749,34 @@ - inode = nd->dentry->d_inode; - /* fallthrough */ - case 1: -+ nd->flags |= LOOKUP_LAST; -+ err = revalidate_special(nd); -+ nd->flags &= ~LOOKUP_LAST; -+ if (!nd->dentry->d_inode) -+ err = -ENOENT; -+ if (err) { -+ path_release(nd); -+ goto return_err; -+ } -+ if (lookup_flags & LOOKUP_DIRECTORY) { -+ err = -ENOTDIR; -+ if(!nd->dentry->d_inode->i_op || -+ !nd->dentry->d_inode->i_op->lookup) { -+ path_release(nd); -+ goto return_err; -+ } -+ } - goto return_reval; - } -+ - if (nd->dentry->d_op && nd->dentry->d_op->d_hash) { - err = nd->dentry->d_op->d_hash(nd->dentry, &this); - if (err < 0) - break; - } -+ nd->flags |= LOOKUP_LAST; - err = do_lookup(nd, &this, &next); -+ nd->flags &= ~LOOKUP_LAST; - if (err) - break; - follow_mount(&next.mnt, &next.dentry); -@@ -936,7 +992,7 @@ - } - - /* SMP-safe */ --struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd) - { - unsigned long hash; - struct qstr this; -@@ -956,11 +1012,16 @@ - } - this.hash = end_name_hash(hash); - -- return lookup_hash(&this, base); -+ return __lookup_hash(&this, base, nd); - access: - return ERR_PTR(-EACCES); - } - -+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+{ -+ return lookup_one_len_it(name, base, len, NULL); -+} -+ - /* - * namei() - * -@@ -972,7 +1033,8 @@ - * that namei follows links, while lnamei does not. - * SMP-safe - */ --int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd, const char **pname) -+int fastcall __user_walk_it(const char __user *name, unsigned flags, -+ struct nameidata *nd, const char **pname) - { - char *tmp = getname(name); - int err = PTR_ERR(tmp); -@@ -987,6 +1049,13 @@ - return err; - } - -+int fastcall __user_walk(const char __user *name, unsigned flags, -+ struct nameidata *nd, const char **pname) -+{ -+ intent_init(&nd->intent, IT_LOOKUP); -+ return __user_walk_it(name, flags, nd, pname); -+} -+ - /* - * It's inline, so penalty for filesystems that don't use sticky bit is - * minimal. -@@ -1259,8 +1328,8 @@ - acc_mode |= MAY_APPEND; - - /* Fill in the open() intent data */ -- nd->intent.open.flags = flag; -- nd->intent.open.create_mode = mode; -+ nd->intent.it_flags = flag; -+ nd->intent.it_create_mode = mode; - - /* - * The simplest case - just a plain lookup. -@@ -1275,6 +1344,7 @@ - /* - * Create - we need to know the parent. - */ -+ nd->intent.it_op |= IT_CREAT; - error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd); - if (error) - return error; -@@ -1291,7 +1361,9 @@ - dir = nd->dentry; - nd->flags &= ~LOOKUP_PARENT; - down(&dir->d_inode->i_sem); -+ nd->flags |= LOOKUP_LAST; - dentry = __lookup_hash(&nd->last, nd->dentry, nd); -+ nd->flags &= ~LOOKUP_LAST; - - do_last: - error = PTR_ERR(dentry); -@@ -1396,7 +1468,9 @@ - } - dir = nd->dentry; - down(&dir->d_inode->i_sem); -+ nd->flags |= LOOKUP_LAST; - dentry = __lookup_hash(&nd->last, nd->dentry, nd); -+ nd->flags &= ~LOOKUP_LAST; - putname(nd->last.name); - goto do_last; - } -@@ -2196,7 +2270,9 @@ - __vfs_follow_link(struct nameidata *nd, const char *link) - { - int res = 0; -+ struct lookup_intent it = nd->intent; - char *name; -+ - if (IS_ERR(link)) - goto fail; - -@@ -2206,6 +2282,10 @@ - /* weird __emul_prefix() stuff did it */ - goto out; - } -+ -+ intent_init(&nd->intent, it.it_op); -+ nd->intent.it_flags = it.it_flags; -+ nd->intent.it_create_mode = it.it_create_mode; - res = link_path_walk(link, nd); - out: - if (current->link_count || res || nd->last_type!=LAST_NORM) -Index: linux-2.6.5-12.1/fs/namespace.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/namespace.c 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/fs/namespace.c 2004-06-03 18:31:28.000000000 -0400 -@@ -108,6 +108,7 @@ - - static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd) - { -+ memset(old_nd, 0, sizeof(*old_nd)); - old_nd->dentry = mnt->mnt_mountpoint; - old_nd->mnt = mnt->mnt_parent; - mnt->mnt_parent = mnt; -@@ -533,6 +534,8 @@ - return err; - if (!old_name || !*old_name) - return -EINVAL; -+ -+ intent_init(&old_nd.intent, IT_LOOKUP); - err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; -@@ -601,6 +604,7 @@ - return -EPERM; - if (!old_name || !*old_name) - return -EINVAL; -+ intent_init(&old_nd.intent, IT_LOOKUP); - err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); - if (err) - return err; -@@ -750,6 +754,7 @@ - int retval = 0; - int mnt_flags = 0; - -+ intent_init(&nd.intent, IT_LOOKUP); - /* Discard magic */ - if ((flags & MS_MGC_MSK) == MS_MGC_VAL) - flags &= ~MS_MGC_MSK; -Index: linux-2.6.5-12.1/fs/open.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/open.c 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/fs/open.c 2004-06-03 18:31:28.000000000 -0400 -@@ -227,12 +227,12 @@ - struct nameidata nd; - struct inode * inode; - int error; -- -+ intent_init(&nd.intent, IT_GETATTR); - error = -EINVAL; - if (length < 0) /* sorry, but loff_t says... */ - goto out; - -- FSHOOK_BEGIN_USER_PATH_WALK(truncate, error, path, nd, filename, .length = length) -+ FSHOOK_BEGIN_USER_PATH_WALK_IT(truncate, error, path, nd, filename, .length = length) - - inode = nd.dentry->d_inode; - -@@ -466,6 +466,7 @@ - int old_fsuid, old_fsgid; - kernel_cap_t old_cap; - int res; -+ intent_init(&nd.intent, IT_GETATTR); - - if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ - return -EINVAL; -@@ -490,7 +491,7 @@ - else - current->cap_effective = current->cap_permitted; - -- FSHOOK_BEGIN_USER_WALK(access, -+ FSHOOK_BEGIN_USER_WALK_IT(access, - res, - filename, - LOOKUP_FOLLOW|LOOKUP_ACCESS, -@@ -506,6 +507,7 @@ - if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode) - && !special_file(nd.dentry->d_inode->i_mode)) - res = -EROFS; -+ - path_release(&nd); - - FSHOOK_END_USER_WALK(access, res, path) -@@ -545,11 +547,13 @@ - - asmlinkage long sys_fchdir(unsigned int fd) - { -+ struct nameidata nd; - struct file *file; - struct dentry *dentry; - struct inode *inode; - struct vfsmount *mnt; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - - FSHOOK_BEGIN(fchdir, error, .fd = fd) - -@@ -582,8 +586,9 @@ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- FSHOOK_BEGIN_USER_WALK(chroot, -+ FSHOOK_BEGIN_USER_WALK_IT(chroot, - error, - filename, - LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, -@@ -670,7 +675,7 @@ - error = -EROFS; - if (IS_RDONLY(inode)) - goto dput_and_out; -- -+ - error = -EPERM; - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - goto dput_and_out; -@@ -804,27 +809,8 @@ - * for the internal routines (ie open_namei()/follow_link() etc). 00 is - * used by symlinks. - */ --struct file *filp_open(const char * filename, int flags, int mode) --{ -- int namei_flags, error; -- struct nameidata nd; -- -- namei_flags = flags; -- if ((namei_flags+1) & O_ACCMODE) -- namei_flags++; -- if (namei_flags & O_TRUNC) -- namei_flags |= 2; -- -- error = open_namei(filename, namei_flags, mode, &nd); -- if (!error) -- return dentry_open(nd.dentry, nd.mnt, flags); -- -- return ERR_PTR(error); --} -- --EXPORT_SYMBOL(filp_open); -- --struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags) -+struct file *dentry_open_it(struct dentry *dentry, struct vfsmount *mnt, int flags, -+ struct lookup_intent *it) - { - struct file * f; - struct inode *inode; -@@ -836,6 +822,7 @@ - goto cleanup_dentry; - f->f_flags = flags; - f->f_mode = (flags+1) & O_ACCMODE; -+ f->f_it = it; - inode = dentry->d_inode; - if (f->f_mode & FMODE_WRITE) { - error = get_write_access(inode); -@@ -855,6 +842,7 @@ - error = f->f_op->open(inode,f); - if (error) - goto cleanup_all; -+ intent_release(it); - } - f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); - -@@ -879,6 +867,7 @@ - cleanup_file: - put_filp(f); - cleanup_dentry: -+ intent_release(it); - dput(dentry); - mntput(mnt); - return ERR_PTR(error); -@@ -886,6 +875,36 @@ - - EXPORT_SYMBOL(dentry_open); - -+struct file *filp_open(const char * filename, int flags, int mode) -+{ -+ int namei_flags, error; -+ struct file * temp_filp; -+ struct nameidata nd; -+ intent_init(&nd.intent, IT_OPEN); -+ -+ namei_flags = flags; -+ if ((namei_flags+1) & O_ACCMODE) -+ namei_flags++; -+ if (namei_flags & O_TRUNC) -+ namei_flags |= 2; -+ -+ error = open_namei(filename, namei_flags, mode, &nd); -+ if (!error) { -+ temp_filp = dentry_open_it(nd.dentry, nd.mnt, flags, &nd.intent); -+ return temp_filp; -+ } -+ return ERR_PTR(error); -+} -+ -+ -+struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags) -+{ -+ struct lookup_intent it; -+ intent_init(&it, IT_LOOKUP); -+ -+ return dentry_open_it(dentry, mnt, flags, &it); -+} -+ - /* - * Find an empty file descriptor entry, and mark it busy. - */ -Index: linux-2.6.5-12.1/fs/stat.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/stat.c 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/fs/stat.c 2004-06-03 18:31:28.000000000 -0400 -@@ -37,7 +37,7 @@ - - EXPORT_SYMBOL(generic_fillattr); - --int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat) - { - struct inode *inode = dentry->d_inode; - int retval; -@@ -46,6 +46,8 @@ - if (retval) - return retval; - -+ if (inode->i_op->getattr_it) -+ return inode->i_op->getattr_it(mnt, dentry, it, stat); - if (inode->i_op->getattr) - return inode->i_op->getattr(mnt, dentry, stat); - -@@ -62,14 +64,20 @@ - - EXPORT_SYMBOL(vfs_getattr); - -+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -+{ -+ return vfs_getattr_it(mnt, dentry, NULL, stat); -+} -+ - int vfs_stat(char __user *name, struct kstat *stat) - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- FSHOOK_BEGIN_USER_PATH_WALK(stat, error, name, nd, path, .link = false) -+ FSHOOK_BEGIN_USER_PATH_WALK_IT(stat, error, name, nd, path, .link = false) - -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - - FSHOOK_END_USER_WALK(stat, error, path) -@@ -83,10 +91,11 @@ - { - struct nameidata nd; - int error; -+ intent_init(&nd.intent, IT_GETATTR); - -- FSHOOK_BEGIN_USER_PATH_WALK_LINK(stat, error, name, nd, path, .link = true) -+ FSHOOK_BEGIN_USER_PATH_WALK_LINK_IT(stat, error, name, nd, path, .link = true) - -- error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); - path_release(&nd); - - FSHOOK_END_USER_WALK(stat, error, path) -@@ -99,6 +108,8 @@ - int vfs_fstat(unsigned int fd, struct kstat *stat) - { - int error; -+ struct nameidata nd; -+ intent_init(&nd.intent, IT_GETATTR); - - FSHOOK_BEGIN(fstat, error, .fd = fd) - -@@ -106,7 +117,8 @@ - - error = -EBADF; - if (f) { -- error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat); -+ error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat); -+ intent_release(&nd.intent); - fput(f); - } - -Index: linux-2.6.5-12.1/fs/inode.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/inode.c 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/fs/inode.c 2004-06-03 18:31:28.000000000 -0400 -@@ -221,6 +221,7 @@ - inodes_stat.nr_unused--; - } - -+EXPORT_SYMBOL(__iget); - /** - * clear_inode - clear an inode - * @inode: inode to clear -Index: linux-2.6.5-12.1/fs/super.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/super.c 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/fs/super.c 2004-06-03 18:31:28.000000000 -0400 -@@ -789,6 +789,8 @@ - return (struct vfsmount *)sb; - } - -+EXPORT_SYMBOL(do_kern_mount); -+ - struct vfsmount *kern_mount(struct file_system_type *type) - { - return do_kern_mount(type->name, 0, type->name, NULL); -Index: linux-2.6.5-12.1/fs/block_dev.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/block_dev.c 2004-05-10 12:21:55.000000000 -0400 -+++ linux-2.6.5-12.1/fs/block_dev.c 2004-06-03 18:31:28.000000000 -0400 -@@ -834,6 +834,7 @@ - if (!path || !*path) - return ERR_PTR(-EINVAL); - -+ intent_init(&nd.intent, IT_LOOKUP); - error = path_lookup(path, LOOKUP_FOLLOW, &nd); - if (error) - return ERR_PTR(error); -Index: linux-2.6.5-12.1/include/linux/dcache.h -=================================================================== ---- linux-2.6.5-12.1.orig/include/linux/dcache.h 2004-04-03 22:38:24.000000000 -0500 -+++ linux-2.6.5-12.1/include/linux/dcache.h 2004-06-03 18:31:28.000000000 -0400 -@@ -4,6 +4,7 @@ - #ifdef __KERNEL__ - - #include <asm/atomic.h> -+#include <linux/string.h> - #include <linux/list.h> - #include <linux/spinlock.h> - #include <linux/cache.h> -@@ -35,6 +36,8 @@ - char name_str[0]; - }; - -+#include <linux/namei.h> -+ - struct dentry_stat_t { - int nr_dentry; - int nr_unused; -Index: linux-2.6.5-12.1/include/linux/fs.h -=================================================================== ---- linux-2.6.5-12.1.orig/include/linux/fs.h 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/include/linux/fs.h 2004-06-03 18:31:28.000000000 -0400 -@@ -76,6 +76,7 @@ - - #define FMODE_READ 1 - #define FMODE_WRITE 2 -+#define FMODE_EXEC 4 - - #define RW_MASK 1 - #define RWA_MASK 2 -@@ -250,6 +250,8 @@ - #define ATTR_ATTR_FLAG 1024 - #define ATTR_KILL_SUID 2048 - #define ATTR_KILL_SGID 4096 -+#define ATTR_RAW 8192 /* file system, not vfs will massage attrs */ -+#define ATTR_FROM_OPEN 16384 /* called from open path, ie O_TRUNC */ - - /* - * This is the Inode Attributes structure, used for notify_change(). It -@@ -423,6 +425,7 @@ - struct block_device *i_bdev; - struct cdev *i_cdev; - int i_cindex; -+ void *i_filterdata; - - unsigned long i_dnotify_mask; /* Directory notify events */ - struct dnotify_struct *i_dnotify; /* for directory notifications */ -@@ -556,6 +559,7 @@ - spinlock_t f_ep_lock; - #endif /* #ifdef CONFIG_EPOLL */ - struct address_space *f_mapping; -+ struct lookup_intent *f_it; - }; - extern spinlock_t files_lock; - #define file_list_lock() spin_lock(&files_lock); -@@ -886,7 +890,9 @@ - void (*truncate) (struct inode *); - int (*permission) (struct inode *, int, struct nameidata *); - int (*setattr) (struct dentry *, struct iattr *); -+ int (*setattr_raw) (struct inode *, struct iattr *); - int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); -+ int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *); - int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); - ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); - ssize_t (*listxattr) (struct dentry *, char *, size_t); -@@ -1114,6 +1120,7 @@ - extern int unregister_filesystem(struct file_system_type *); - extern struct vfsmount *kern_mount(struct file_system_type *); - extern int may_umount(struct vfsmount *); -+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data); - extern long do_mount(char *, char *, char *, unsigned long, void *); - - extern int vfs_statfs(struct super_block *, struct kstatfs *); -@@ -1178,6 +1185,7 @@ - extern int do_truncate(struct dentry *, loff_t start); - extern struct file *filp_open(const char *, int, int); - extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); -+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *); - extern int filp_close(struct file *, fl_owner_t id); - extern char * getname(const char __user *); - -Index: linux-2.6.5-12.1/include/linux/namei.h -=================================================================== ---- linux-2.6.5-12.1.orig/include/linux/namei.h 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/include/linux/namei.h 2004-06-03 18:31:28.000000000 -0400 -@@ -2,25 +2,55 @@ - #define _LINUX_NAMEI_H - - #include <linux/linkage.h> -+#include <linux/string.h> - - struct vfsmount; -+struct nameidata; - --struct open_intent { -- int flags; -- int create_mode; -+/* intent opcodes */ -+#define IT_OPEN (1) -+#define IT_CREAT (1<<1) -+#define IT_READDIR (1<<2) -+#define IT_GETATTR (1<<3) -+#define IT_LOOKUP (1<<4) -+#define IT_UNLINK (1<<5) -+#define IT_TRUNC (1<<6) -+#define IT_GETXATTR (1<<7) -+ -+struct lustre_intent_data { -+ int it_disposition; -+ int it_status; -+ __u64 it_lock_handle; -+ void *it_data; -+ int it_lock_mode; - }; - -+#define INTENT_MAGIC 0x19620323 -+struct lookup_intent { -+ int it_magic; -+ void (*it_op_release)(struct lookup_intent *); -+ int it_op; -+ int it_flags; -+ int it_create_mode; -+ union { -+ struct lustre_intent_data lustre; -+ } d; -+}; -+ -+static inline void intent_init(struct lookup_intent *it, int op) -+{ -+ memset(it, 0, sizeof(*it)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op = op; -+} -+ - struct nameidata { - struct dentry *dentry; - struct vfsmount *mnt; - struct qstr last; - unsigned int flags; - int last_type; -- -- /* Intent data */ -- union { -- struct open_intent open; -- } intent; -+ struct lookup_intent intent; - }; - - /* -@@ -41,6 +71,9 @@ - #define LOOKUP_CONTINUE 4 - #define LOOKUP_PARENT 16 - #define LOOKUP_NOALT 32 -+#define LOOKUP_LAST (1<<6) -+#define LOOKUP_LINK_NOTLAST (1<<7) -+ - /* - * Intent data - */ -@@ -49,6 +82,12 @@ - #define LOOKUP_ACCESS (0x0400) - - extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *, const char **)); -+extern int FASTCALL(__user_walk_it(const char __user *, unsigned, struct nameidata *, const char **)); -+#define user_path_walk_it(name,nd) \ -+ __user_walk_it(name, LOOKUP_FOLLOW, nd, 0) -+#define user_path_walk_link_it(name,nd) \ -+ __user_walk_it(name, 0, nd, 0) -+extern void intent_release(struct lookup_intent *); - #define user_path_walk(name,nd) \ - __user_walk(name, LOOKUP_FOLLOW, nd, 0) - #define user_path_walk_link(name,nd) \ -@@ -60,7 +99,6 @@ - - extern struct dentry * lookup_one_len(const char *, struct dentry *, int); - extern struct dentry * lookup_hash(struct qstr *, struct dentry *); -- - extern int follow_down(struct vfsmount **, struct dentry **); - extern int follow_up(struct vfsmount **, struct dentry **); - -Index: linux-2.6.5-12.1/include/linux/fshooks.h -=================================================================== ---- linux-2.6.5-12.1.orig/include/linux/fshooks.h 2004-05-10 12:21:56.000000000 -0400 -+++ linux-2.6.5-12.1/include/linux/fshooks.h 2004-06-03 18:31:28.000000000 -0400 -@@ -90,12 +90,18 @@ - - #define FSHOOK_BEGIN_USER_WALK(type, err, path, flags, nd, field, args...) \ - FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk(path, flags, &nd, &info.field), nd, args) -+#define FSHOOK_BEGIN_USER_WALK_IT(type, err, path, flags, nd, field, args...) \ -+ FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk_it(path, flags, &nd, &info.field), nd, args) - - #define FSHOOK_BEGIN_USER_PATH_WALK(type, err, path, nd, field, args...) \ - FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk(path, LOOKUP_FOLLOW, &nd, &info.field), nd, args) -+#define FSHOOK_BEGIN_USER_PATH_WALK_IT(type, err, path, nd, field, args...) \ -+ FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk_it(path, LOOKUP_FOLLOW, &nd, &info.field), nd, args) - - #define FSHOOK_BEGIN_USER_PATH_WALK_LINK(type, err, path, nd, field, args...) \ - FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk(path, 0, &nd, &info.field), nd, args) -+#define FSHOOK_BEGIN_USER_PATH_WALK_LINK_IT(type, err, path, nd, field, args...) \ -+ FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk_it(path, 0, &nd, &info.field), nd, args) - - #define FSHOOK_END_USER_WALK(type, err, field) \ - (void)(&info != (struct fshook_##type##_info *)-1L); \ -@@ -126,12 +132,18 @@ - - #define FSHOOK_BEGIN_USER_WALK(type, err, path, flags, nd, field, args...) \ - if (!(err = __user_walk(path, flags, &nd, 0))) { -+#define FSHOOK_BEGIN_USER_WALK_IT(type, err, path, flags, nd, field, args...) \ -+ if (!(err = __user_walk_it(path, flags, &nd, 0))) { - - #define FSHOOK_BEGIN_USER_PATH_WALK(type, err, path, nd, field, args...) \ - if (!(err = user_path_walk(path, &nd))) { -+#define FSHOOK_BEGIN_USER_PATH_WALK_IT(type, err, path, nd, field, args...) \ -+ if (!(err = user_path_walk_it(path, &nd))) { - - #define FSHOOK_BEGIN_USER_PATH_WALK_LINK(type, err, path, nd, field, args...) \ - if (!(err = user_path_walk_link(path, &nd))) { -+#define FSHOOK_BEGIN_USER_PATH_WALK_LINK_IT(type, err, path, nd, field, args...) \ -+ if (!(err = user_path_walk_link_it(path, &nd))) { - - #define FSHOOK_END_USER_WALK(type, err, field) ((void)0);} - diff --git a/lustre/kernel_patches/patches/vfs_intent-reduce-stack-usage-2.6-suse-newer.patch b/lustre/kernel_patches/patches/vfs_intent-reduce-stack-usage-2.6-suse-newer.patch deleted file mode 100644 index fc386d77b2..0000000000 --- a/lustre/kernel_patches/patches/vfs_intent-reduce-stack-usage-2.6-suse-newer.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- - fs/namei.c | 5 +---- - include/linux/namei.h | 7 +++++++ - 2 files changed, 8 insertions(+), 4 deletions(-) - ---- linux-2.6.5-7.282.orig/fs/namei.c -+++ linux-2.6.5-7.282/fs/namei.c -@@ -2369,7 +2369,6 @@ static inline int - __vfs_follow_link(struct nameidata *nd, const char *link) - { - int res = 0; -- struct lookup_intent it = nd->intent; - char *name; - - if (IS_ERR(link)) -@@ -2382,9 +2381,7 @@ __vfs_follow_link(struct nameidata *nd, - goto out; - } - -- intent_init(&nd->intent, it.it_op); -- nd->intent.it_flags = it.it_flags; -- nd->intent.it_create_mode = it.it_create_mode; -+ intent_reset_fs_part(&nd->intent); - res = link_path_walk(link, nd); - out: - if (current->link_count || res || nd->last_type!=LAST_NORM) ---- linux-2.6.5-7.282.orig/include/linux/namei.h -+++ linux-2.6.5-7.282/include/linux/namei.h -@@ -37,6 +37,13 @@ struct lookup_intent { - } d; - }; - -+static inline void intent_reset_fs_part(struct lookup_intent *it) -+{ -+ memset(&it->d, 0, sizeof(it->d)); -+ it->it_magic = INTENT_MAGIC; -+ it->it_op_release = NULL; -+} -+ - static inline void intent_init(struct lookup_intent *it, int op) - { - memset(it, 0, sizeof(*it)); diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-fc5.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-fc5.patch deleted file mode 100644 index 35e013853d..0000000000 --- a/lustre/kernel_patches/patches/vfs_nointent-2.6-fc5.patch +++ /dev/null @@ -1,472 +0,0 @@ -Index: linux-2.6.16.i686/net/unix/af_unix.c -=================================================================== ---- linux-2.6.16.i686.orig/net/unix/af_unix.c 2006-03-20 13:53:29.000000000 +0800 -+++ linux-2.6.16.i686/net/unix/af_unix.c 2006-05-30 22:27:40.000000000 +0800 -@@ -673,6 +673,7 @@ - int err = 0; - - if (sunname->sun_path[0]) { -+ intent_init(&nd.intent, IT_LOOKUP); - err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd); - if (err) - goto fail; -Index: linux-2.6.16.i686/fs/open.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/open.c 2006-05-30 22:10:06.000000000 +0800 -+++ linux-2.6.16.i686/fs/open.c 2006-05-30 22:27:40.000000000 +0800 -@@ -197,9 +197,10 @@ - } - - int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, -- struct file *filp) -+ struct file *filp, int called_from_open) - { - int err; -+ struct inode_operations *op = dentry->d_inode->i_op; - struct iattr newattrs; - - /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */ -@@ -214,7 +215,17 @@ - } - - mutex_lock(&dentry->d_inode->i_mutex); -- err = notify_change(dentry, &newattrs); -+ if (called_from_open) -+ newattrs.ia_valid |= ATTR_FROM_OPEN; -+ if (op->setattr_raw) { -+ newattrs.ia_valid |= ATTR_RAW; -+ newattrs.ia_ctime = CURRENT_TIME; -+ down_write(&dentry->d_inode->i_alloc_sem); -+ err = op->setattr_raw(dentry->d_inode, &newattrs); -+ up_write(&dentry->d_inode->i_alloc_sem); -+ } else -+ err = notify_change(dentry, &newattrs); -+ - mutex_unlock(&dentry->d_inode->i_mutex); - return err; - } -@@ -269,7 +280,7 @@ - error = locks_verify_truncate(inode, NULL, length); - if (!error) { - DQUOT_INIT(inode); -- error = do_truncate(nd.dentry, length, 0, NULL); -+ error = do_truncate(nd.dentry, length, 0, NULL, 0); - } - put_write_access(inode); - -@@ -321,7 +332,7 @@ - - error = locks_verify_truncate(inode, file, length); - if (!error) -- error = do_truncate(dentry, length, 0, file); -+ error = do_truncate(dentry, length, 0, file, 0); - out_putf: - fput(file); - out: -@@ -406,9 +417,20 @@ - (error = vfs_permission(&nd, MAY_WRITE)) != 0) - goto dput_and_out; - } -- mutex_lock(&inode->i_mutex); -- error = notify_change(nd.dentry, &newattrs); -- mutex_unlock(&inode->i_mutex); -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto dput_and_out; -+ } else { -+ mutex_lock(&inode->i_mutex); -+ error = notify_change(nd.dentry, &newattrs); -+ mutex_unlock(&inode->i_mutex); -+ } -+ - dput_and_out: - path_release(&nd); - out: -@@ -623,77 +645,74 @@ - } - - EXPORT_SYMBOL_GPL(sys_chroot); -- --asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+ -+int chmod_common(struct dentry *dentry, mode_t mode) - { -- struct inode * inode; -- struct dentry * dentry; -- struct file * file; -- int err = -EBADF; -- struct iattr newattrs; -- -- file = fget(fd); -- if (!file) -- goto out; -- -- dentry = file->f_dentry; -- inode = dentry->d_inode; -- -- err = -EROFS; -- if (IS_RDONLY(inode)) -- goto out_putf; -- err = -EPERM; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto out_putf; -+ struct inode * inode = dentry->d_inode; -+ struct iattr newattrs; -+ int error = -EROFS; -+ -+ if (IS_RDONLY(inode)) -+ goto out; -+ -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_mode = mode; -+ newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out; -+ } -+ -+ error = -EPERM; -+ if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -+ goto out; -+ - mutex_lock(&inode->i_mutex); -- if (mode == (mode_t) -1) -- mode = inode->i_mode; -- newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -- newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- err = notify_change(dentry, &newattrs); -+ if (mode == (mode_t) -1) -+ mode = inode->i_mode; -+ newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -+ newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -+ error = notify_change(dentry, &newattrs); - mutex_unlock(&inode->i_mutex); -+out: -+ return error; -+} - --out_putf: -- fput(file); -+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+{ -+ struct file * file; -+ int err = -EBADF; -+ -+ file = fget(fd); -+ if (!file) -+ goto out; -+ -+ err = chmod_common(file->f_dentry, mode); -+ fput(file); - out: -- return err; -+ return err; - } - - asmlinkage long sys_fchmodat(int dfd, const char __user *filename, - mode_t mode) - { - struct nameidata nd; -- struct inode * inode; - int error; -- struct iattr newattrs; - - error = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW, &nd); - if (error) - goto out; -- inode = nd.dentry->d_inode; -- -- error = -EROFS; -- if (IS_RDONLY(inode)) -- goto dput_and_out; -- -- error = -EPERM; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto dput_and_out; -- -- mutex_lock(&inode->i_mutex); -- if (mode == (mode_t) -1) -- mode = inode->i_mode; -- newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -- newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- error = notify_change(nd.dentry, &newattrs); -- mutex_unlock(&inode->i_mutex); -- --dput_and_out: -- path_release(&nd); -+ error = chmod_common(nd.dentry, mode); -+ path_release(&nd); - out: -- return error; -+ return error; - } - -+ - asmlinkage long sys_chmod(const char __user *filename, mode_t mode) - { - return sys_fchmodat(AT_FDCWD, filename, mode); -@@ -714,6 +733,18 @@ - if (IS_RDONLY(inode)) - goto out; - error = -EPERM; -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_uid = user; -+ newattrs.ia_gid = group; -+ newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ return error; -+ } - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - goto out; - newattrs.ia_valid = ATTR_CTIME; -Index: linux-2.6.16.i686/fs/namei.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/namei.c 2006-05-30 22:24:53.000000000 +0800 -+++ linux-2.6.16.i686/fs/namei.c 2006-05-30 22:27:51.000000000 +0800 -@@ -1644,7 +1644,7 @@ - if (!error) { - DQUOT_INIT(inode); - -- error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL); -+ error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL, 1); - } - put_write_access(inode); - if (error) -@@ -1912,6 +1912,7 @@ - char * tmp; - struct dentry * dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - if (S_ISDIR(mode)) - return -EPERM; -@@ -1922,6 +1923,15 @@ - error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->mknod_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mknod_raw(&nd, mode, dev); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - -@@ -1948,6 +1958,7 @@ - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1993,9 +2004,18 @@ - struct dentry *dentry; - struct nameidata nd; - -+ intent_init(&nd.intent, IT_LOOKUP); - error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->mkdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mkdir_raw(&nd, mode); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 1); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -2005,6 +2025,7 @@ - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -2085,6 +2106,7 @@ - char * name; - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - name = getname(pathname); - if(IS_ERR(name)) -@@ -2105,6 +2127,14 @@ - error = -EBUSY; - goto exit1; - } -+ if (nd.dentry->d_inode->i_op->rmdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ error = op->rmdir_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } - mutex_lock(&nd.dentry->d_inode->i_mutex); - dentry = lookup_hash(&nd); - error = PTR_ERR(dentry); -@@ -2168,6 +2198,7 @@ - struct dentry *dentry; - struct nameidata nd; - struct inode *inode = NULL; -+ intent_init(&nd.intent, IT_LOOKUP); - - name = getname(pathname); - if(IS_ERR(name)) -@@ -2179,6 +2210,13 @@ - error = -EISDIR; - if (nd.last_type != LAST_NORM) - goto exit1; -+ if (nd.dentry->d_inode->i_op->unlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->unlink_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } - mutex_lock(&nd.dentry->d_inode->i_mutex); - dentry = lookup_hash(&nd); - error = PTR_ERR(dentry); -@@ -2261,9 +2299,17 @@ - struct dentry *dentry; - struct nameidata nd; - -+ intent_init(&nd.intent, IT_LOOKUP); - error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->symlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->symlink_raw(&nd, from); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -2271,6 +2317,7 @@ - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(to); -@@ -2358,6 +2405,13 @@ - error = -EXDEV; - if (old_nd.mnt != nd.mnt) - goto out_release; -+ if (nd.dentry->d_inode->i_op->link_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->link_raw(&old_nd, &nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out_release; -+ } - new_dentry = lookup_create(&nd, 0); - error = PTR_ERR(new_dentry); - if (!IS_ERR(new_dentry)) { -@@ -2534,6 +2588,8 @@ - struct dentry * old_dentry, *new_dentry; - struct dentry * trap; - struct nameidata oldnd, newnd; -+ intent_init(&oldnd.intent, IT_LOOKUP); -+ intent_init(&newnd.intent, IT_LOOKUP); - - error = do_path_lookup(olddfd, oldname, LOOKUP_PARENT, &oldnd); - if (error) -@@ -2556,6 +2612,13 @@ - if (newnd.last_type != LAST_NORM) - goto exit2; - -+ if (old_dir->d_inode->i_op->rename_raw) { -+ error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit2; -+ } -+ - trap = lock_rename(new_dir, old_dir); - - old_dentry = lookup_hash(&oldnd); -@@ -2587,8 +2650,7 @@ - if (new_dentry == trap) - goto exit5; - -- error = vfs_rename(old_dir->d_inode, old_dentry, -- new_dir->d_inode, new_dentry); -+ error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); - exit5: - dput(new_dentry); - exit4: -Index: linux-2.6.16.i686/fs/exec.c -=================================================================== ---- linux-2.6.16.i686.orig/fs/exec.c 2006-05-30 21:33:00.000000000 +0800 -+++ linux-2.6.16.i686/fs/exec.c 2006-05-30 22:27:40.000000000 +0800 -@@ -1517,7 +1517,7 @@ - goto close_fail; - if (!file->f_op->write) - goto close_fail; -- if (do_truncate(file->f_dentry, 0, 0, file) != 0) -+ if (do_truncate(file->f_dentry, 0, 0, file, 0) != 0) - goto close_fail; - - retval = binfmt->core_dump(signr, regs, file); -Index: linux-2.6.16.i686/include/linux/fs.h -=================================================================== ---- linux-2.6.16.i686.orig/include/linux/fs.h 2006-05-30 21:33:00.000000000 +0800 -+++ linux-2.6.16.i686/include/linux/fs.h 2006-05-30 22:27:40.000000000 +0800 -@@ -1035,13 +1035,20 @@ - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); - int (*link) (struct dentry *,struct inode *,struct dentry *); -+ int (*link_raw) (struct nameidata *,struct nameidata *); - int (*unlink) (struct inode *,struct dentry *); -+ int (*unlink_raw) (struct nameidata *); - int (*symlink) (struct inode *,struct dentry *,const char *); -+ int (*symlink_raw) (struct nameidata *,const char *); - int (*mkdir) (struct inode *,struct dentry *,int); -+ int (*mkdir_raw) (struct nameidata *,int); - int (*rmdir) (struct inode *,struct dentry *); -+ int (*rmdir_raw) (struct nameidata *); - int (*mknod) (struct inode *,struct dentry *,int,dev_t); -+ int (*mknod_raw) (struct nameidata *,int,dev_t); - int (*rename) (struct inode *, struct dentry *, - struct inode *, struct dentry *); -+ int (*rename_raw) (struct nameidata *, struct nameidata *); - int (*readlink) (struct dentry *, char __user *,int); - void * (*follow_link) (struct dentry *, struct nameidata *); - void (*put_link) (struct dentry *, struct nameidata *, void *); -@@ -1351,7 +1358,7 @@ - /* fs/open.c */ - - extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, -- struct file *filp); -+ struct file *filp, int called_from_open); - extern long do_sys_open(int fdf, const char __user *filename, int flags, - int mode); - extern struct file *filp_open(const char *, int, int); diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch deleted file mode 100644 index c0e0c3d690..0000000000 --- a/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch +++ /dev/null @@ -1,487 +0,0 @@ -Index: linux-2.6.9-5.0.3.EL/fs/namei.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/fs/namei.c 2005-02-26 13:29:11.948782168 +0200 -+++ linux-2.6.9-5.0.3.EL/fs/namei.c 2005-02-26 13:29:13.355568304 +0200 -@@ -1380,7 +1380,7 @@ - if (!error) { - DQUOT_INIT(inode); - -- error = do_truncate(dentry, 0); -+ error = do_truncate(dentry, 0, 1); - } - put_write_access(inode); - if (error) -@@ -1638,6 +1638,7 @@ - char * tmp; - struct dentry * dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - if (S_ISDIR(mode)) - return -EPERM; -@@ -1648,6 +1649,15 @@ - error = path_lookup(tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->mknod_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mknod_raw(&nd, mode, dev); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - -@@ -1674,6 +1684,7 @@ - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1715,10 +1726,18 @@ - if (!IS_ERR(tmp)) { - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - error = path_lookup(tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->mkdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mkdir_raw(&nd, mode); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } - dentry = lookup_create(&nd, 1); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -1728,6 +1747,7 @@ - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1808,6 +1828,7 @@ - char * name; - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - name = getname(pathname); - if(IS_ERR(name)) -@@ -1828,6 +1849,16 @@ - error = -EBUSY; - goto exit1; - } -+ -+ if (nd.dentry->d_inode->i_op->rmdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ error = op->rmdir_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } -+ - down(&nd.dentry->d_inode->i_sem); - dentry = lookup_hash(&nd.last, nd.dentry); - error = PTR_ERR(dentry); -@@ -1886,6 +1917,7 @@ - struct dentry *dentry; - struct nameidata nd; - struct inode *inode = NULL; -+ intent_init(&nd.intent, IT_LOOKUP); - - name = getname(pathname); - if(IS_ERR(name)) -@@ -1897,6 +1929,13 @@ - error = -EISDIR; - if (nd.last_type != LAST_NORM) - goto exit1; -+ if (nd.dentry->d_inode->i_op->unlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->unlink_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } - down(&nd.dentry->d_inode->i_sem); - dentry = lookup_hash(&nd.last, nd.dentry); - error = PTR_ERR(dentry); -@@ -1963,10 +2002,18 @@ - if (!IS_ERR(to)) { - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - error = path_lookup(to, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->symlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->symlink_raw(&nd, from); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -1974,6 +2021,7 @@ - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - putname(to); -@@ -2037,6 +2085,8 @@ - struct nameidata nd, old_nd; - int error; - char * to; -+ intent_init(&nd.intent, IT_LOOKUP); -+ intent_init(&old_nd.intent, IT_LOOKUP); - - to = getname(newname); - if (IS_ERR(to)) -@@ -2051,6 +2101,13 @@ - error = -EXDEV; - if (old_nd.mnt != nd.mnt) - goto out_release; -+ if (nd.dentry->d_inode->i_op->link_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->link_raw(&old_nd, &nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out_release; -+ } - new_dentry = lookup_create(&nd, 0); - error = PTR_ERR(new_dentry); - if (!IS_ERR(new_dentry)) { -@@ -2223,6 +2280,8 @@ - struct dentry * old_dentry, *new_dentry; - struct dentry * trap; - struct nameidata oldnd, newnd; -+ intent_init(&oldnd.intent, IT_LOOKUP); -+ intent_init(&newnd.intent, IT_LOOKUP); - - error = path_lookup(oldname, LOOKUP_PARENT, &oldnd); - if (error) -@@ -2245,6 +2304,13 @@ - if (newnd.last_type != LAST_NORM) - goto exit2; - -+ if (old_dir->d_inode->i_op->rename_raw) { -+ error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit2; -+ } -+ - trap = lock_rename(new_dir, old_dir); - - old_dentry = lookup_hash(&oldnd.last, old_dir); -@@ -2276,8 +2342,7 @@ - if (new_dentry == trap) - goto exit5; - -- error = vfs_rename(old_dir->d_inode, old_dentry, -- new_dir->d_inode, new_dentry); -+ error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); - exit5: - dput(new_dentry); - exit4: -Index: linux-2.6.9-5.0.3.EL/fs/open.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/fs/open.c 2005-02-26 13:29:11.962780040 +0200 -+++ linux-2.6.9-5.0.3.EL/fs/open.c 2005-02-26 13:29:13.359567696 +0200 -@@ -191,9 +191,10 @@ - return error; - } - --int do_truncate(struct dentry *dentry, loff_t length) -+int do_truncate(struct dentry *dentry, loff_t length, int called_from_open) - { - int err; -+ struct inode_operations *op = dentry->d_inode->i_op; - struct iattr newattrs; - - /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */ -@@ -204,7 +205,14 @@ - newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME; - down(&dentry->d_inode->i_sem); - down_write(&dentry->d_inode->i_alloc_sem); -- err = notify_change(dentry, &newattrs); -+ if (called_from_open) -+ newattrs.ia_valid |= ATTR_FROM_OPEN; -+ if (op->setattr_raw) { -+ newattrs.ia_valid |= ATTR_RAW; -+ newattrs.ia_ctime = CURRENT_TIME; -+ err = op->setattr_raw(dentry->d_inode, &newattrs); -+ } else -+ err = notify_change(dentry, &newattrs); - up_write(&dentry->d_inode->i_alloc_sem); - up(&dentry->d_inode->i_sem); - return err; -@@ -260,7 +268,7 @@ - error = locks_verify_truncate(inode, NULL, length); - if (!error) { - DQUOT_INIT(inode); -- error = do_truncate(nd.dentry, length); -+ error = do_truncate(nd.dentry, length, 0); - } - put_write_access(inode); - -@@ -312,7 +320,7 @@ - - error = locks_verify_truncate(inode, file, length); - if (!error) -- error = do_truncate(dentry, length); -+ error = do_truncate(dentry, length, 0); - out_putf: - fput(file); - out: -@@ -391,9 +399,19 @@ - (error = permission(inode,MAY_WRITE,&nd)) != 0) - goto dput_and_out; - } -- down(&inode->i_sem); -- error = notify_change(nd.dentry, &newattrs); -- up(&inode->i_sem); -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto dput_and_out; -+ } else { -+ down(&inode->i_sem); -+ error = notify_change(nd.dentry, &newattrs); -+ up(&inode->i_sem); -+ } - dput_and_out: - path_release(&nd); - out: -@@ -444,9 +462,19 @@ - (error = permission(inode,MAY_WRITE,&nd)) != 0) - goto dput_and_out; - } -- down(&inode->i_sem); -- error = notify_change(nd.dentry, &newattrs); -- up(&inode->i_sem); -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto dput_and_out; -+ } else { -+ down(&inode->i_sem); -+ error = notify_change(nd.dentry, &newattrs); -+ up(&inode->i_sem); -+ } - dput_and_out: - path_release(&nd); - out: -@@ -600,36 +628,52 @@ - - EXPORT_SYMBOL_GPL(sys_chroot); - --asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+int chmod_common(struct dentry *dentry, mode_t mode) - { -- struct inode * inode; -- struct dentry * dentry; -- struct file * file; -- int err = -EBADF; -+ struct inode * inode = dentry->d_inode; - struct iattr newattrs; -+ int error = -EROFS; - -- file = fget(fd); -- if (!file) -+ if (IS_RDONLY(inode)) - goto out; -+ -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; - -- dentry = file->f_dentry; -- inode = dentry->d_inode; -+ newattrs.ia_mode = mode; -+ newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use the normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out; -+ } - -- err = -EROFS; -- if (IS_RDONLY(inode)) -- goto out_putf; -- err = -EPERM; -+ error = -EPERM; - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto out_putf; -+ goto out; -+ - down(&inode->i_sem); - if (mode == (mode_t) -1) - mode = inode->i_mode; - newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); - newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- err = notify_change(dentry, &newattrs); -+ error = notify_change(dentry, &newattrs); - up(&inode->i_sem); -+out: -+ return error; -+} - --out_putf: -+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+{ -+ struct file * file; -+ int err = -EBADF; -+ -+ file = fget(fd); -+ if (!file) -+ goto out; -+ -+ err = chmod_common(file->f_dentry, mode); - fput(file); - out: - return err; -@@ -638,32 +682,13 @@ - asmlinkage long sys_chmod(const char __user * filename, mode_t mode) - { - struct nameidata nd; -- struct inode * inode; - int error; -- struct iattr newattrs; - - error = user_path_walk(filename, &nd); - if (error) - goto out; -- inode = nd.dentry->d_inode; -- -- error = -EROFS; -- if (IS_RDONLY(inode)) -- goto dput_and_out; -- -- error = -EPERM; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto dput_and_out; -- -- down(&inode->i_sem); -- if (mode == (mode_t) -1) -- mode = inode->i_mode; -- newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -- newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- error = notify_change(nd.dentry, &newattrs); -- up(&inode->i_sem); - --dput_and_out: -+ error = chmod_common(nd.dentry, mode); - path_release(&nd); - out: - return error; -@@ -684,6 +709,18 @@ - if (IS_RDONLY(inode)) - goto out; - error = -EPERM; -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_uid = user; -+ newattrs.ia_gid = group; -+ newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ return error; -+ } - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - goto out; - newattrs.ia_valid = ATTR_CTIME; -@@ -697,6 +734,7 @@ - } - if (!S_ISDIR(inode->i_mode)) - newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID; -+ - down(&inode->i_sem); - error = notify_change(dentry, &newattrs); - up(&inode->i_sem); -Index: linux-2.6.9-5.0.3.EL/fs/exec.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/fs/exec.c 2005-02-26 13:29:11.936783992 +0200 -+++ linux-2.6.9-5.0.3.EL/fs/exec.c 2005-02-26 13:29:13.362567240 +0200 -@@ -1451,7 +1451,7 @@ - goto close_fail; - if (!file->f_op->write) - goto close_fail; -- if (do_truncate(file->f_dentry, 0) != 0) -+ if (do_truncate(file->f_dentry, 0, 0) != 0) - goto close_fail; - - retval = binfmt->core_dump(signr, regs, file); -Index: linux-2.6.9-5.0.3.EL/include/linux/fs.h -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/include/linux/fs.h 2005-02-26 13:29:11.987776240 +0200 -+++ linux-2.6.9-5.0.3.EL/include/linux/fs.h 2005-02-26 13:29:13.365566784 +0200 -@@ -926,13 +926,20 @@ - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); - int (*link) (struct dentry *,struct inode *,struct dentry *); -+ int (*link_raw) (struct nameidata *,struct nameidata *); - int (*unlink) (struct inode *,struct dentry *); -+ int (*unlink_raw) (struct nameidata *); - int (*symlink) (struct inode *,struct dentry *,const char *); -+ int (*symlink_raw) (struct nameidata *,const char *); - int (*mkdir) (struct inode *,struct dentry *,int); -+ int (*mkdir_raw) (struct nameidata *,int); - int (*rmdir) (struct inode *,struct dentry *); -+ int (*rmdir_raw) (struct nameidata *); - int (*mknod) (struct inode *,struct dentry *,int,dev_t); -+ int (*mknod_raw) (struct nameidata *,int,dev_t); - int (*rename) (struct inode *, struct dentry *, - struct inode *, struct dentry *); -+ int (*rename_raw) (struct nameidata *, struct nameidata *); - int (*readlink) (struct dentry *, char __user *,int); - int (*follow_link) (struct dentry *, struct nameidata *); - void (*put_link) (struct dentry *, struct nameidata *); -@@ -1234,7 +1241,7 @@ - - /* fs/open.c */ - --extern int do_truncate(struct dentry *, loff_t start); -+extern int do_truncate(struct dentry *, loff_t start, int called_from_open); - extern struct file *filp_open(const char *, int, int); - extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); - extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *); -Index: linux-2.6.9-5.0.3.EL/net/unix/af_unix.c -=================================================================== ---- linux-2.6.9-5.0.3.EL.orig/net/unix/af_unix.c 2005-02-25 10:25:31.000000000 +0200 -+++ linux-2.6.9-5.0.3.EL/net/unix/af_unix.c 2005-02-26 13:29:13.387563440 +0200 -@@ -676,6 +676,7 @@ - int err = 0; - - if (sunname->sun_path[0]) { -+ intent_init(&nd.intent, IT_LOOKUP); - err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd); - if (err) - goto fail; diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-sles10.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-sles10.patch deleted file mode 100644 index aba3c8b3da..0000000000 --- a/lustre/kernel_patches/patches/vfs_nointent-2.6-sles10.patch +++ /dev/null @@ -1,453 +0,0 @@ -Index: linux-2.6.16.21-0.8/net/unix/af_unix.c -=================================================================== ---- linux-2.6.16.21-0.8.orig/net/unix/af_unix.c 2006-08-03 01:34:33.000000000 -0600 -+++ linux-2.6.16.21-0.8/net/unix/af_unix.c 2006-08-03 01:35:38.000000000 -0600 -@@ -673,6 +673,7 @@ - int err = 0; - - if (sunname->sun_path[0]) { -+ intent_init(&nd.intent, IT_LOOKUP); - err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd); - if (err) - goto fail; -Index: linux-2.6.16.21-0.8/fs/open.c -=================================================================== ---- linux-2.6.16.21-0.8.orig/fs/open.c 2006-08-03 01:34:33.000000000 -0600 -+++ linux-2.6.16.21-0.8/fs/open.c 2006-08-03 02:54:31.000000000 -0600 -@@ -197,9 +197,10 @@ - } - - int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, -- struct file *filp) -+ struct file *filp, int called_from_open) - { - int err; -+ struct inode_operations *op = dentry->d_inode->i_op; - struct iattr newattrs; - - /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */ -@@ -214,7 +215,17 @@ - } - - mutex_lock(&dentry->d_inode->i_mutex); -- err = notify_change(dentry, &newattrs); -+ if (called_from_open) -+ newattrs.ia_valid |= ATTR_FROM_OPEN; -+ if (op->setattr_raw) { -+ newattrs.ia_valid |= ATTR_RAW; -+ newattrs.ia_ctime = CURRENT_TIME; -+ down_write(&dentry->d_inode->i_alloc_sem); -+ err = op->setattr_raw(dentry->d_inode, &newattrs); -+ up_write(&dentry->d_inode->i_alloc_sem); -+ } else -+ err = notify_change(dentry, &newattrs); -+ - mutex_unlock(&dentry->d_inode->i_mutex); - return err; - } -@@ -269,7 +280,7 @@ - error = locks_verify_truncate(inode, NULL, length); - if (!error) { - DQUOT_INIT(inode); -- error = do_truncate(nd.dentry, length, 0, NULL); -+ error = do_truncate(nd.dentry, length, 0, NULL, 0); - } - put_write_access(inode); - -@@ -321,7 +332,7 @@ - - error = locks_verify_truncate(inode, file, length); - if (!error) -- error = do_truncate(dentry, length, 0, file); -+ error = do_truncate(dentry, length, 0, file, 0); - out_putf: - fput(file); - out: -@@ -406,9 +417,20 @@ - (error = vfs_permission(&nd, MAY_WRITE)) != 0) - goto dput_and_out; - } -- mutex_lock(&inode->i_mutex); -- error = notify_change(nd.dentry, &newattrs); -- mutex_unlock(&inode->i_mutex); -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto dput_and_out; -+ } else { -+ mutex_lock(&inode->i_mutex); -+ error = notify_change(nd.dentry, &newattrs); -+ mutex_unlock(&inode->i_mutex); -+ } -+ - dput_and_out: - path_release(&nd); - out: -@@ -620,36 +642,52 @@ - return error; - } - -+int chmod_common(struct dentry *dentry, mode_t mode) -+{ -+ struct inode * inode = dentry->d_inode; -+ struct iattr newattrs; -+ int error = -EROFS; -+ -+ if (IS_RDONLY(inode)) -+ goto out; -+ -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_mode = mode; -+ newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out; -+ } -+ -+ error = -EPERM; -+ if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -+ goto out; -+ -+ mutex_lock(&inode->i_mutex); -+ if (mode == (mode_t) -1) -+ mode = inode->i_mode; -+ newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -+ newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -+ error = notify_change(dentry, &newattrs); -+ mutex_unlock(&inode->i_mutex); -+out: -+ return error; -+} -+ - asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) - { -- struct inode * inode; -- struct dentry * dentry; - struct file * file; - int err = -EBADF; -- struct iattr newattrs; - - file = fget(fd); - if (!file) - goto out; - -- dentry = file->f_dentry; -- inode = dentry->d_inode; -- -- err = -EROFS; -- if (IS_RDONLY(inode)) -- goto out_putf; -- err = -EPERM; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto out_putf; -- mutex_lock(&inode->i_mutex); -- if (mode == (mode_t) -1) -- mode = inode->i_mode; -- newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -- newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- err = notify_change(dentry, &newattrs); -- mutex_unlock(&inode->i_mutex); -- --out_putf: -+ err = chmod_common(file->f_dentry, mode); - fput(file); - out: - return err; -@@ -659,32 +697,12 @@ - mode_t mode) - { - struct nameidata nd; -- struct inode * inode; - int error; -- struct iattr newattrs; - - error = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW, &nd); - if (error) - goto out; -- inode = nd.dentry->d_inode; -- -- error = -EROFS; -- if (IS_RDONLY(inode)) -- goto dput_and_out; -- -- error = -EPERM; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto dput_and_out; -- -- mutex_lock(&inode->i_mutex); -- if (mode == (mode_t) -1) -- mode = inode->i_mode; -- newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -- newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- error = notify_change(nd.dentry, &newattrs); -- mutex_unlock(&inode->i_mutex); -- --dput_and_out: -+ error = chmod_common(nd.dentry, mode); - path_release(&nd); - out: - return error; -@@ -710,6 +728,18 @@ - if (IS_RDONLY(inode)) - goto out; - error = -EPERM; -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_uid = user; -+ newattrs.ia_gid = group; -+ newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ return error; -+ } - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - goto out; - newattrs.ia_valid = ATTR_CTIME; -Index: linux-2.6.16.21-0.8/fs/namei.c -=================================================================== ---- linux-2.6.16.21-0.8.orig/fs/namei.c 2006-08-03 01:34:33.000000000 -0600 -+++ linux-2.6.16.21-0.8/fs/namei.c 2006-08-03 02:54:31.000000000 -0600 -@@ -1637,7 +1637,7 @@ - if (!error) { - DQUOT_INIT(inode); - -- error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL); -+ error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL, 1); - } - put_write_access(inode); - if (error) -@@ -1911,6 +1911,7 @@ - char * tmp; - struct dentry * dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - if (S_ISDIR(mode)) - return -EPERM; -@@ -1921,6 +1922,15 @@ - error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->mknod_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mknod_raw(&nd, mode, dev); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - -@@ -1947,6 +1957,7 @@ - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1992,9 +2003,18 @@ - struct dentry *dentry; - struct nameidata nd; - -+ intent_init(&nd.intent, IT_LOOKUP); - error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->mkdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mkdir_raw(&nd, mode); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 1); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -2004,6 +2024,7 @@ - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -2084,6 +2105,7 @@ - char * name; - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - name = getname(pathname); - if(IS_ERR(name)) -@@ -2104,6 +2126,14 @@ - error = -EBUSY; - goto exit1; - } -+ if (nd.dentry->d_inode->i_op->rmdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ error = op->rmdir_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } - mutex_lock(&nd.dentry->d_inode->i_mutex); - dentry = lookup_hash(&nd); - error = PTR_ERR(dentry); -@@ -2167,6 +2197,7 @@ - struct dentry *dentry; - struct nameidata nd; - struct inode *inode = NULL; -+ intent_init(&nd.intent, IT_LOOKUP); - - name = getname(pathname); - if(IS_ERR(name)) -@@ -2178,6 +2209,13 @@ - error = -EISDIR; - if (nd.last_type != LAST_NORM) - goto exit1; -+ if (nd.dentry->d_inode->i_op->unlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->unlink_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } - mutex_lock(&nd.dentry->d_inode->i_mutex); - dentry = lookup_hash(&nd); - error = PTR_ERR(dentry); -@@ -2260,9 +2298,17 @@ - struct dentry *dentry; - struct nameidata nd; - -+ intent_init(&nd.intent, IT_LOOKUP); - error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->symlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->symlink_raw(&nd, from); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -2270,6 +2316,7 @@ - dput(dentry); - } - mutex_unlock(&nd.dentry->d_inode->i_mutex); -+out2: - path_release(&nd); - out: - putname(to); -@@ -2357,6 +2404,13 @@ - error = -EXDEV; - if (old_nd.mnt != nd.mnt) - goto out_release; -+ if (nd.dentry->d_inode->i_op->link_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->link_raw(&old_nd, &nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out_release; -+ } - new_dentry = lookup_create(&nd, 0); - error = PTR_ERR(new_dentry); - if (!IS_ERR(new_dentry)) { -@@ -2533,6 +2587,8 @@ - struct dentry * old_dentry, *new_dentry; - struct dentry * trap; - struct nameidata oldnd, newnd; -+ intent_init(&oldnd.intent, IT_LOOKUP); -+ intent_init(&newnd.intent, IT_LOOKUP); - - error = do_path_lookup(olddfd, oldname, LOOKUP_PARENT, &oldnd); - if (error) -@@ -2555,6 +2611,13 @@ - if (newnd.last_type != LAST_NORM) - goto exit2; - -+ if (old_dir->d_inode->i_op->rename_raw) { -+ error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit2; -+ } -+ - trap = lock_rename(new_dir, old_dir); - - old_dentry = lookup_hash(&oldnd); -@@ -2586,8 +2649,7 @@ - if (new_dentry == trap) - goto exit5; - -- error = vfs_rename(old_dir->d_inode, old_dentry, -- new_dir->d_inode, new_dentry); -+ error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); - exit5: - dput(new_dentry); - exit4: -Index: linux-2.6.16.21-0.8/fs/exec.c -=================================================================== ---- linux-2.6.16.21-0.8.orig/fs/exec.c 2006-08-03 01:34:33.000000000 -0600 -+++ linux-2.6.16.21-0.8/fs/exec.c 2006-08-03 01:35:38.000000000 -0600 -@@ -1524,7 +1524,7 @@ - goto close_fail; - if (!file->f_op->write) - goto close_fail; -- if (do_truncate(file->f_dentry, 0, 0, file) != 0) -+ if (do_truncate(file->f_dentry, 0, 0, file, 0) != 0) - goto close_fail; - - retval = binfmt->core_dump(signr, regs, file); -Index: linux-2.6.16.21-0.8/include/linux/fs.h -=================================================================== ---- linux-2.6.16.21-0.8.orig/include/linux/fs.h 2006-08-03 01:34:33.000000000 -0600 -+++ linux-2.6.16.21-0.8/include/linux/fs.h 2006-08-03 01:35:38.000000000 -0600 -@@ -1041,13 +1041,20 @@ - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); - int (*link) (struct dentry *,struct inode *,struct dentry *); -+ int (*link_raw) (struct nameidata *,struct nameidata *); - int (*unlink) (struct inode *,struct dentry *); -+ int (*unlink_raw) (struct nameidata *); - int (*symlink) (struct inode *,struct dentry *,const char *); -+ int (*symlink_raw) (struct nameidata *,const char *); - int (*mkdir) (struct inode *,struct dentry *,int); -+ int (*mkdir_raw) (struct nameidata *,int); - int (*rmdir) (struct inode *,struct dentry *); -+ int (*rmdir_raw) (struct nameidata *); - int (*mknod) (struct inode *,struct dentry *,int,dev_t); -+ int (*mknod_raw) (struct nameidata *,int,dev_t); - int (*rename) (struct inode *, struct dentry *, - struct inode *, struct dentry *); -+ int (*rename_raw) (struct nameidata *, struct nameidata *); - int (*readlink) (struct dentry *, char __user *,int); - void * (*follow_link) (struct dentry *, struct nameidata *); - void (*put_link) (struct dentry *, struct nameidata *, void *); -@@ -1357,7 +1364,7 @@ - /* fs/open.c */ - - extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, -- struct file *filp); -+ struct file *filp, int called_from_open); - extern long do_sys_open(int fdf, const char __user *filename, int flags, - int mode); - extern struct file *filp_open(const char *, int, int); diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch deleted file mode 100644 index 184fa49401..0000000000 --- a/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch +++ /dev/null @@ -1,472 +0,0 @@ - 0 files changed - -.old..........pc/vfs_nointent_2.6.0-suse/fs/namei.c -.new.........fs/namei.c -Index: linux-2.6.5-12.1/fs/namei.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/namei.c 2004-05-11 15:41:54.000000000 -0400 -+++ linux-2.6.5-12.1/fs/namei.c 2004-05-11 15:42:00.000000000 -0400 -@@ -1292,7 +1292,7 @@ - if (!error) { - DQUOT_INIT(inode); - -- error = do_truncate(dentry, 0); -+ error = do_truncate(dentry, 0, 1); - } - put_write_access(inode); - if (error) -@@ -1542,6 +1542,7 @@ - char * tmp; - struct dentry * dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - if (S_ISDIR(mode)) - return -EPERM; -@@ -1554,6 +1555,15 @@ - error = path_lookup(tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->mknod_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mknod_raw(&nd, mode, dev); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - -@@ -1580,6 +1590,7 @@ - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - putname(tmp); -@@ -1626,10 +1637,20 @@ - - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - error = path_lookup(tmp, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ -+ if (nd.dentry->d_inode->i_op->mkdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->mkdir_raw(&nd, mode); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } -+ - dentry = lookup_create(&nd, 1); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -1639,6 +1658,7 @@ - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - -@@ -1722,6 +1742,7 @@ - char * name; - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - name = getname(pathname); - if(IS_ERR(name)) -@@ -1744,6 +1765,16 @@ - error = -EBUSY; - goto exit1; - } -+ -+ if (nd.dentry->d_inode->i_op->rmdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ error = op->rmdir_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } -+ - down(&nd.dentry->d_inode->i_sem); - dentry = lookup_hash(&nd.last, nd.dentry); - error = PTR_ERR(dentry); -@@ -1805,6 +1834,7 @@ - struct dentry *dentry; - struct nameidata nd; - struct inode *inode = NULL; -+ intent_init(&nd.intent, IT_LOOKUP); - - name = getname(pathname); - if(IS_ERR(name)) -@@ -1818,6 +1848,13 @@ - error = -EISDIR; - if (nd.last_type != LAST_NORM) - goto exit1; -+ if (nd.dentry->d_inode->i_op->unlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->unlink_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } - down(&nd.dentry->d_inode->i_sem); - dentry = lookup_hash(&nd.last, nd.dentry); - error = PTR_ERR(dentry); -@@ -1891,10 +1928,18 @@ - - struct dentry *dentry; - struct nameidata nd; -+ intent_init(&nd.intent, IT_LOOKUP); - - error = path_lookup(to, LOOKUP_PARENT, &nd); - if (error) - goto out; -+ if (nd.dentry->d_inode->i_op->symlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->symlink_raw(&nd, from); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out2; -+ } - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { -@@ -1902,6 +1947,7 @@ - dput(dentry); - } - up(&nd.dentry->d_inode->i_sem); -+out2: - path_release(&nd); - out: - -@@ -1968,6 +2014,8 @@ - struct nameidata nd, old_nd; - int error; - char * to; -+ intent_init(&nd.intent, IT_LOOKUP); -+ intent_init(&old_nd.intent, IT_LOOKUP); - - to = getname(newname); - if (IS_ERR(to)) -@@ -1986,6 +2034,13 @@ - error = -EXDEV; - if (old_nd.mnt != nd.mnt) - goto out_release; -+ if (nd.dentry->d_inode->i_op->link_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->link_raw(&old_nd, &nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out_release; -+ } - new_dentry = lookup_create(&nd, 0); - error = PTR_ERR(new_dentry); - if (!IS_ERR(new_dentry)) { -@@ -2160,6 +2215,8 @@ - struct dentry * old_dentry, *new_dentry; - struct dentry * trap; - struct nameidata oldnd, newnd; -+ intent_init(&oldnd.intent, IT_LOOKUP); -+ intent_init(&newnd.intent, IT_LOOKUP); - - error = path_lookup(oldname, LOOKUP_PARENT, &oldnd); - if (error) -@@ -2182,6 +2239,13 @@ - if (newnd.last_type != LAST_NORM) - goto exit2; - -+ if (old_dir->d_inode->i_op->rename_raw) { -+ error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit2; -+ } -+ - trap = lock_rename(new_dir, old_dir); - - old_dentry = lookup_hash(&oldnd.last, old_dir); -@@ -2213,8 +2277,7 @@ - if (new_dentry == trap) - goto exit5; - -- error = vfs_rename(old_dir->d_inode, old_dentry, -- new_dir->d_inode, new_dentry); -+ error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); - exit5: - dput(new_dentry); - exit4: -Index: linux-2.6.5-12.1/fs/open.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/open.c 2004-05-11 15:41:54.000000000 -0400 -+++ linux-2.6.5-12.1/fs/open.c 2004-05-11 16:07:02.000000000 -0400 -@@ -203,9 +203,10 @@ - return error; - } - --int do_truncate(struct dentry *dentry, loff_t length) -+int do_truncate(struct dentry *dentry, loff_t length, int called_from_open) - { - int err; -+ struct inode_operations *op = dentry->d_inode->i_op; - struct iattr newattrs; - - /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */ -@@ -216,7 +217,14 @@ - newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME; - down(&dentry->d_inode->i_sem); - down_write(&dentry->d_inode->i_alloc_sem); -- err = notify_change(dentry, &newattrs); -+ if (called_from_open) -+ newattrs.ia_valid |= ATTR_FROM_OPEN; -+ if (op->setattr_raw) { -+ newattrs.ia_valid |= ATTR_RAW; -+ newattrs.ia_ctime = CURRENT_TIME; -+ err = op->setattr_raw(dentry->d_inode, &newattrs); -+ } else -+ err = notify_change(dentry, &newattrs); - up_write(&dentry->d_inode->i_alloc_sem); - up(&dentry->d_inode->i_sem); - return err; -@@ -271,7 +279,7 @@ - error = locks_verify_truncate(inode, NULL, length); - if (!error) { - DQUOT_INIT(inode); -- error = do_truncate(nd.dentry, length); -+ error = do_truncate(nd.dentry, length, 0); - } - put_write_access(inode); - -@@ -328,7 +336,7 @@ - - error = locks_verify_truncate(inode, file, length); - if (!error) -- error = do_truncate(dentry, length); -+ error = do_truncate(dentry, length, 0); - out_putf: - fput(file); - out: -@@ -402,9 +410,19 @@ - (error = permission(inode,MAY_WRITE,&nd)) != 0) - goto dput_and_out; - } -- down(&inode->i_sem); -- error = notify_change(nd.dentry, &newattrs); -- up(&inode->i_sem); -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto dput_and_out; -+ } else { -+ down(&inode->i_sem); -+ error = notify_change(nd.dentry, &newattrs); -+ up(&inode->i_sem); -+ } - dput_and_out: - path_release(&nd); - -@@ -613,39 +631,55 @@ - return error; - } - --asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+int chmod_common(struct dentry *dentry, mode_t mode) - { -- struct inode * inode; -- struct dentry * dentry; -- struct file * file; -- int err; -+ struct inode * inode = dentry->d_inode; - struct iattr newattrs; -+ int error = -EROFS; - -- FSHOOK_BEGIN(fchmod, err, .fd = fd, .mode = mode) -- -- err = -EBADF; -- file = fget(fd); -- if (!file) -+ if (IS_RDONLY(inode)) - goto out; -+ -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_mode = mode; -+ newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use the normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto out; -+ } - -- dentry = file->f_dentry; -- inode = dentry->d_inode; -- -- err = -EROFS; -- if (IS_RDONLY(inode)) -- goto out_putf; -- err = -EPERM; -+ error = -EPERM; - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto out_putf; -+ goto out; -+ - down(&inode->i_sem); - if (mode == (mode_t) -1) - mode = inode->i_mode; - newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); - newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- err = notify_change(dentry, &newattrs); -+ error = notify_change(dentry, &newattrs); - up(&inode->i_sem); - --out_putf: -+out: -+ return error; -+} -+ -+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) -+{ -+ struct file * file; -+ int err = -EBADF; -+ -+ FSHOOK_BEGIN(fchmod, err, .fd = fd, .mode = mode) -+ -+ file = fget(fd); -+ if (!file) -+ goto out; -+ -+ err = chmod_common(file->f_dentry, mode); - fput(file); - out: - -@@ -657,9 +691,7 @@ - asmlinkage long sys_chmod(const char __user * filename, mode_t mode) - { - struct nameidata nd; -- struct inode * inode; - int error; -- struct iattr newattrs; - - FSHOOK_BEGIN_USER_PATH_WALK(chmod, - error, -@@ -669,25 +701,7 @@ - .mode = mode, - .link = false) - -- inode = nd.dentry->d_inode; -- -- error = -EROFS; -- if (IS_RDONLY(inode)) -- goto dput_and_out; -- -- error = -EPERM; -- if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) -- goto dput_and_out; -- -- down(&inode->i_sem); -- if (mode == (mode_t) -1) -- mode = inode->i_mode; -- newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); -- newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; -- error = notify_change(nd.dentry, &newattrs); -- up(&inode->i_sem); -- --dput_and_out: -+ error = chmod_common(nd.dentry, mode); - path_release(&nd); - - FSHOOK_END_USER_WALK(chmod, error, path) -@@ -710,6 +724,18 @@ - if (IS_RDONLY(inode)) - goto out; - error = -EPERM; -+ if (inode->i_op->setattr_raw) { -+ struct inode_operations *op = dentry->d_inode->i_op; -+ -+ newattrs.ia_uid = user; -+ newattrs.ia_gid = group; -+ newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME; -+ newattrs.ia_valid |= ATTR_RAW; -+ error = op->setattr_raw(inode, &newattrs); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ return error; -+ } - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - goto out; - newattrs.ia_valid = ATTR_CTIME; -Index: linux-2.6.5-12.1/fs/exec.c -=================================================================== ---- linux-2.6.5-12.1.orig/fs/exec.c 2004-05-11 15:41:54.000000000 -0400 -+++ linux-2.6.5-12.1/fs/exec.c 2004-05-11 15:42:00.000000000 -0400 -@@ -1435,7 +1435,7 @@ - goto close_fail; - if (!file->f_op->write) - goto close_fail; -- if (do_truncate(file->f_dentry, 0) != 0) -+ if (do_truncate(file->f_dentry, 0, 0) != 0) - goto close_fail; - - retval = binfmt->core_dump(signr, regs, file); -Index: linux-2.6.5-12.1/include/linux/fs.h -=================================================================== ---- linux-2.6.5-12.1.orig/include/linux/fs.h 2004-05-11 15:41:54.000000000 -0400 -+++ linux-2.6.5-12.1/include/linux/fs.h 2004-05-11 15:42:00.000000000 -0400 -@@ -878,13 +878,20 @@ - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); - int (*link) (struct dentry *,struct inode *,struct dentry *); -+ int (*link_raw) (struct nameidata *,struct nameidata *); - int (*unlink) (struct inode *,struct dentry *); -+ int (*unlink_raw) (struct nameidata *); - int (*symlink) (struct inode *,struct dentry *,const char *); -+ int (*symlink_raw) (struct nameidata *,const char *); - int (*mkdir) (struct inode *,struct dentry *,int); -+ int (*mkdir_raw) (struct nameidata *,int); - int (*rmdir) (struct inode *,struct dentry *); -+ int (*rmdir_raw) (struct nameidata *); - int (*mknod) (struct inode *,struct dentry *,int,dev_t); -+ int (*mknod_raw) (struct nameidata *,int,dev_t); - int (*rename) (struct inode *, struct dentry *, - struct inode *, struct dentry *); -+ int (*rename_raw) (struct nameidata *, struct nameidata *); - int (*readlink) (struct dentry *, char __user *,int); - int (*follow_link) (struct dentry *, struct nameidata *); - void (*truncate) (struct inode *); -@@ -1182,7 +1189,7 @@ - - /* fs/open.c */ - --extern int do_truncate(struct dentry *, loff_t start); -+extern int do_truncate(struct dentry *, loff_t start, int called_from_open); - extern struct file *filp_open(const char *, int, int); - extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); - extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *); -Index: linux-2.6.5-12.1/net/unix/af_unix.c -=================================================================== ---- linux-2.6.5-12.1.orig/net/unix/af_unix.c 2004-04-03 22:37:36.000000000 -0500 -+++ linux-2.6.5-12.1/net/unix/af_unix.c 2004-05-11 15:42:00.000000000 -0400 -@@ -676,6 +676,7 @@ - int err = 0; - - if (sunname->sun_path[0]) { -+ intent_init(&nd.intent, IT_LOOKUP); - err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd); - if (err) - goto fail; diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-fc3.patch b/lustre/kernel_patches/patches/vfs_races-2.6-fc3.patch deleted file mode 100644 index e0db838a12..0000000000 --- a/lustre/kernel_patches/patches/vfs_races-2.6-fc3.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: linux-2.6.11/fs/dcache.c -=================================================================== ---- linux-2.6.11.orig/fs/dcache.c 2005-04-13 22:44:37.698760922 -0400 -+++ linux-2.6.11/fs/dcache.c 2005-04-13 22:44:50.482498026 -0400 -@@ -1197,15 +1197,24 @@ - * Adds a dentry to the hash according to its name. - */ - --void d_rehash(struct dentry * entry) -+void d_rehash_cond(struct dentry * entry, int lock) - { - struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash); - -- spin_lock(&dcache_lock); -+ if (lock) -+ spin_lock(&dcache_lock); - spin_lock(&entry->d_lock); - __d_rehash(entry, list); - spin_unlock(&entry->d_lock); -- spin_unlock(&dcache_lock); -+ if (lock) -+ spin_unlock(&dcache_lock); -+} -+ -+EXPORT_SYMBOL(d_rehash_cond); -+ -+void d_rehash(struct dentry * entry) -+{ -+ d_rehash_cond(entry, 1); - } - - #define do_switch(x,y) do { \ -Index: linux-2.6.11/include/linux/dcache.h -=================================================================== ---- linux-2.6.11.orig/include/linux/dcache.h 2005-04-13 22:35:23.515178600 -0400 -+++ linux-2.6.11/include/linux/dcache.h 2005-04-13 22:44:43.188221365 -0400 -@@ -159,6 +159,8 @@ - - #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ - #define DCACHE_UNHASHED 0x0010 -+#define DCACHE_LUSTRE_INVALID 0x0020 /* Lustre invalidated */ -+ - - extern spinlock_t dcache_lock; - -@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-rhel4.patch b/lustre/kernel_patches/patches/vfs_races-2.6-rhel4.patch deleted file mode 100644 index 04ac6fe2c0..0000000000 --- a/lustre/kernel_patches/patches/vfs_races-2.6-rhel4.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -urp RH_2_6_9_42_0_3.orig/fs/dcache.c RH_2_6_9_42_0_3/fs/dcache.c ---- RH_2_6_9_42_0_3.orig/fs/dcache.c -+++ RH_2_6_9_42_0_3/fs/dcache.c -@@ -229,7 +229,14 @@ int d_invalidate(struct dentry * dentry) - spin_unlock(&dcache_lock); - return 0; - } -- /* -+ -+ /* network invalidation by Lustre */ -+ if (dentry->d_flags & DCACHE_LUSTRE_INVALID) { -+ spin_unlock(&dcache_lock); -+ return 0; -+ } -+ -+ /* - * Check whether to do a partial shrink_dcache - * to get rid of unused child entries. - */ -@@ -1187,19 +1194,28 @@ void d_delete(struct dentry * dentry) - * Adds a dentry to the hash according to its name. - */ - --void d_rehash(struct dentry * entry) -+void d_rehash_cond(struct dentry * entry, int lock) - { - struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash); - -- spin_lock(&dcache_lock); -+ if (lock) -+ spin_lock(&dcache_lock); - spin_lock(&entry->d_lock); - entry->d_flags &= ~DCACHE_UNHASHED; - spin_unlock(&entry->d_lock); - entry->d_bucket = list; - hlist_add_head_rcu(&entry->d_hash, list); -- spin_unlock(&dcache_lock); -+ if (lock) -+ spin_unlock(&dcache_lock); - } - -+EXPORT_SYMBOL(d_rehash_cond); -+ -+void d_rehash(struct dentry * entry) -+{ -+ d_rehash_cond(entry, 1); -+} -+ - #define do_switch(x,y) do { \ - __typeof__ (x) __tmp = x; \ - x = y; y = __tmp; } while (0) -diff -urp RH_2_6_9_42_0_3.orig/include/linux/dcache.h RH_2_6_9_42_0_3/include/linux/dcache.h ---- RH_2_6_9_42_0_3.orig/include/linux/dcache.h -+++ RH_2_6_9_42_0_3/include/linux/dcache.h -@@ -157,6 +157,8 @@ d_iput: no no no yes - - #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ - #define DCACHE_UNHASHED 0x0010 -+#define DCACHE_LUSTRE_INVALID 0x0020 /* Lustre invalidated */ -+ - - extern spinlock_t dcache_lock; - diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch b/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch deleted file mode 100644 index cf1616742b..0000000000 --- a/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff -urp linux-2.6.18.rawops/fs/dcache.c linux-2.6.18.races/fs/dcache.c ---- linux-2.6.18.rawops/fs/dcache.c 2007-02-08 19:00:31.000000000 +0200 -+++ linux-2.6.18.races/fs/dcache.c 2007-02-14 19:23:49.000000000 +0200 -@@ -230,6 +230,13 @@ int d_invalidate(struct dentry * dentry) - spin_unlock(&dcache_lock); - return 0; - } -+ -+ /* network invalidation by Lustre */ -+ if (dentry->d_flags & DCACHE_LUSTRE_INVALID) { -+ spin_unlock(&dcache_lock); -+ return 0; -+ } -+ - /* - * Check whether to do a partial shrink_dcache - * to get rid of unused child entries. -@@ -1400,13 +1407,21 @@ static void _d_rehash(struct dentry * en - * Adds a dentry to the hash according to its name. - */ - --void d_rehash(struct dentry * entry) -+void d_rehash_cond(struct dentry * entry, int lock) - { -- spin_lock(&dcache_lock); -+ if (lock) -+ spin_lock(&dcache_lock); - spin_lock(&entry->d_lock); - _d_rehash(entry); - spin_unlock(&entry->d_lock); -- spin_unlock(&dcache_lock); -+ if (lock) -+ spin_unlock(&dcache_lock); -+} -+EXPORT_SYMBOL(d_rehash_cond); -+ -+void d_rehash(struct dentry * entry) -+{ -+ d_rehash_cond(entry, 1); - } - - #define do_switch(x,y) do { \ -@@ -1481,7 +1496,7 @@ static void switch_names(struct dentry * - * Update the dcache to reflect the move of a file name. Negative - * dcache entries should not be moved in this way. - */ --static void d_move_locked(struct dentry * dentry, struct dentry * target) -+void d_move_locked(struct dentry * dentry, struct dentry * target) - { - struct hlist_head *list; - -@@ -1549,6 +1563,8 @@ already_unhashed: - spin_unlock(&dentry->d_lock); - write_sequnlock(&rename_lock); - } -+ -+EXPORT_SYMBOL(d_move_locked); - - /** - * d_move - move a dentry -diff -urp linux-2.6.18.rawops/include/linux/dcache.h linux-2.6.18.races/include/linux/dcache.h ---- linux-2.6.18.rawops/include/linux/dcache.h 2007-02-14 16:52:37.000000000 +0200 -+++ linux-2.6.18.races/include/linux/dcache.h 2007-02-14 19:21:14.000000000 +0200 -@@ -177,6 +177,7 @@ d_iput: no no no yes - - #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ - #define DCACHE_UNHASHED 0x0010 -+#define DCACHE_LUSTRE_INVALID 0x0040 /* Lustre invalidated */ - - #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */ - -@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues -@@ -289,6 +291,7 @@ static inline struct dentry *d_add_uniqu - - /* used for rename() and baskets */ - extern void d_move(struct dentry *, struct dentry *); -+extern void d_move_locked(struct dentry *, struct dentry *); - - /* appendix may either be NULL or be used for transname suffixes */ - extern struct dentry * d_lookup(struct dentry *, struct qstr *); diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-suse.patch b/lustre/kernel_patches/patches/vfs_races-2.6-suse.patch deleted file mode 100644 index 756ac9e2e4..0000000000 --- a/lustre/kernel_patches/patches/vfs_races-2.6-suse.patch +++ /dev/null @@ -1,68 +0,0 @@ - fs/dcache.c | 24 ++++++++++++++++++++---- - include/linux/dcache.h | 2 ++ - 2 files changed, 22 insertions(+), 4 deletions(-) - ---- linux-2.6.0-test1/fs/dcache.c~vfs_races_2.5.72_rev1 2003-07-24 15:52:47.000000000 +0400 -+++ linux-2.6.0-test1-alexey/fs/dcache.c 2003-09-13 16:21:16.000000000 +0400 -@@ -212,6 +212,13 @@ int d_invalidate(struct dentry * dentry) - spin_unlock(&dcache_lock); - return 0; - } -+ -+ /* network invalidation by Lustre */ -+ if (dentry->d_flags & DCACHE_LUSTRE_INVALID) { -+ spin_unlock(&dcache_lock); -+ return 0; -+ } -+ - /* - * Check whether to do a partial shrink_dcache - * to get rid of unused child entries. -@@ -1135,14 +1142,23 @@ void d_delete(struct dentry * dentry) - * Adds a dentry to the hash according to its name. - */ - --void d_rehash(struct dentry * entry) -+void d_rehash_cond(struct dentry * entry, int lock) - { - struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash); -- spin_lock(&dcache_lock); -+ if (lock) -+ spin_lock(&dcache_lock); - entry->d_vfs_flags &= ~DCACHE_UNHASHED; - entry->d_bucket = list; - hlist_add_head_rcu(&entry->d_hash, list); -- spin_unlock(&dcache_lock); -+ if (lock) -+ spin_unlock(&dcache_lock); -+} -+ -+EXPORT_SYMBOL(d_rehash_cond); -+ -+void d_rehash(struct dentry * entry) -+{ -+ d_rehash_cond(entry, 1); - } - - #define do_switch(x,y) do { \ ---- linux-2.6.0-test1/include/linux/dcache.h~vfs_races_2.5.72_rev1 2003-09-13 16:21:05.000000000 +0400 -+++ linux-2.6.0-test1-alexey/include/linux/dcache.h 2003-09-13 16:21:16.000000000 +0400 -@@ -156,6 +156,8 @@ d_iput: no no yes - - #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ - #define DCACHE_UNHASHED 0x0010 -+#define DCACHE_LUSTRE_INVALID 0x0020 /* Lustre invalidated */ -+ - - extern spinlock_t dcache_lock; - -@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues - -_ diff --git a/lustre/kernel_patches/patches/vfs_races-2.6.12.patch b/lustre/kernel_patches/patches/vfs_races-2.6.12.patch deleted file mode 100644 index 86661256d7..0000000000 --- a/lustre/kernel_patches/patches/vfs_races-2.6.12.patch +++ /dev/null @@ -1,69 +0,0 @@ -Index: linux-2.6.7-vanilla/fs/dcache.c -=================================================================== ---- linux-2.6.7-vanilla.orig/fs/dcache.c 2004-07-01 12:09:19.000000000 +0300 -+++ linux-2.6.7-vanilla/fs/dcache.c 2004-07-01 12:29:12.510193264 +0300 -@@ -219,6 +219,13 @@ - spin_unlock(&dcache_lock); - return 0; - } -+ -+ /* network invalidation by Lustre */ -+ if (dentry->d_flags & DCACHE_LUSTRE_INVALID) { -+ spin_unlock(&dcache_lock); -+ return 0; -+ } -+ - /* - * Check whether to do a partial shrink_dcache - * to get rid of unused child entries. -@@ -1199,16 +1199,25 @@ - * Adds a dentry to the hash according to its name. - */ - --void d_rehash(struct dentry * entry) -+void d_rehash_cond(struct dentry * entry, int lock) - { - struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash); - -- spin_lock(&dcache_lock); -+ if (lock) -+ spin_lock(&dcache_lock); - spin_lock(&entry->d_lock); - __d_rehash(entry, list); - spin_unlock(&entry->d_lock); -- spin_unlock(&dcache_lock); -+ if (lock) -+ spin_unlock(&dcache_lock); - } - -+EXPORT_SYMBOL(d_rehash_cond); -+ -+void d_rehash(struct dentry * entry) -+{ -+ d_rehash_cond(entry, 1); -+ } -+ - #define do_switch(x,y) do { \ - __typeof__ (x) __tmp = x; \ - x = y; y = __tmp; } while (0) -Index: linux-2.6.7-vanilla/include/linux/dcache.h -=================================================================== ---- linux-2.6.7-vanilla.orig/include/linux/dcache.h 2004-07-01 12:24:53.602553208 +0300 -+++ linux-2.6.7-vanilla/include/linux/dcache.h 2004-07-01 12:27:29.757814000 +0300 -@@ -159,6 +159,8 @@ - - #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ - #define DCACHE_UNHASHED 0x0010 -+#define DCACHE_LUSTRE_INVALID 0x0020 /* Lustre invalidated */ -+ - - extern spinlock_t dcache_lock; - -@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues diff --git a/lustre/kernel_patches/patches/vfs_races-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/vfs_races-2.6.18-vanilla.patch deleted file mode 100644 index 2d3fc7f404..0000000000 --- a/lustre/kernel_patches/patches/vfs_races-2.6.18-vanilla.patch +++ /dev/null @@ -1,68 +0,0 @@ -Index: linux-2.6/fs/dcache.c -=================================================================== ---- linux-2.6.orig/fs/dcache.c 2006-08-31 11:59:09.000000000 +0800 -+++ linux-2.6/fs/dcache.c 2006-09-06 14:01:37.000000000 +0800 -@@ -226,6 +226,13 @@ int d_invalidate(struct dentry * dentry) - spin_unlock(&dcache_lock); - return 0; - } -+ -+ /* network invalidation by Lustre */ -+ if (dentry->d_flags & DCACHE_LUSTRE_INVALID) { -+ spin_unlock(&dcache_lock); -+ return 0; -+ } -+ - /* - * Check whether to do a partial shrink_dcache - * to get rid of unused child entries. -@@ -1242,17 +1249,26 @@ static void __d_rehash(struct dentry * e - * Adds a dentry to the hash according to its name. - */ - --void d_rehash(struct dentry * entry) -+void d_rehash_cond(struct dentry * entry, int lock) - { - struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash); - -- spin_lock(&dcache_lock); -+ if (lock) -+ spin_lock(&dcache_lock); - spin_lock(&entry->d_lock); - __d_rehash(entry, list); - spin_unlock(&entry->d_lock); -- spin_unlock(&dcache_lock); -+ if (lock) -+ spin_unlock(&dcache_lock); - } - -+EXPORT_SYMBOL(d_rehash_cond); -+ -+void d_rehash(struct dentry * entry) -+{ -+ d_rehash_cond(entry, 1); -+ } -+ - #define do_switch(x,y) do { \ - __typeof__ (x) __tmp = x; \ - x = y; y = __tmp; } while (0) -Index: linux-2.6/include/linux/dcache.h -=================================================================== ---- linux-2.6.orig/include/linux/dcache.h 2006-08-31 12:00:23.000000000 +0800 -+++ linux-2.6/include/linux/dcache.h 2006-09-06 14:02:36.000000000 +0800 -@@ -176,6 +176,7 @@ d_iput: no no no yes - - #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ - #define DCACHE_UNHASHED 0x0010 -+#define DCACHE_LUSTRE_INVALID 0x0040 /* Lustre invalidated */ - - #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */ - -@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry - * This adds the entry to the hash queues. - */ - extern void d_rehash(struct dentry *); -+extern void d_rehash_cond(struct dentry *, int lock); - - /** - * d_add - add dentry to hash queues diff --git a/lustre/kernel_patches/patches/vfs_races-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/vfs_races-2.6.22-vanilla.patch deleted file mode 100644 index 264349404c..0000000000 --- a/lustre/kernel_patches/patches/vfs_races-2.6.22-vanilla.patch +++ /dev/null @@ -1,56 +0,0 @@ -Index: linux-2.6.22.5/fs/dcache.c -=================================================================== ---- linux-2.6.22.5.orig/fs/dcache.c 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/fs/dcache.c 2008-02-21 00:56:09.000000000 -0700 -@@ -245,6 +245,13 @@ - spin_unlock(&dcache_lock); - return 0; - } -+ -+ /* network invalidation by Lustre */ -+ if (dentry->d_flags & DCACHE_LUSTRE_INVALID) { -+ spin_unlock(&dcache_lock); -+ return 0; -+ } -+ - /* - * Check whether to do a partial shrink_dcache - * to get rid of unused child entries. -@@ -1441,13 +1448,22 @@ - * Adds a dentry to the hash according to its name. - */ - --void d_rehash(struct dentry * entry) -+void d_rehash_cond(struct dentry * entry, int lock) - { -- spin_lock(&dcache_lock); -+ if (lock) -+ spin_lock(&dcache_lock); - spin_lock(&entry->d_lock); - _d_rehash(entry); - spin_unlock(&entry->d_lock); -- spin_unlock(&dcache_lock); -+ if (lock) -+ spin_unlock(&dcache_lock); -+} -+ -+EXPORT_SYMBOL(d_rehash_cond); -+ -+void d_rehash(struct dentry * entry) -+{ -+ d_rehash_cond(entry, 1); - } - - #define do_switch(x,y) do { \ -Index: linux-2.6.22.5/include/linux/dcache.h -=================================================================== ---- linux-2.6.22.5.orig/include/linux/dcache.h 2007-08-22 17:23:54.000000000 -0600 -+++ linux-2.6.22.5/include/linux/dcache.h 2008-02-21 00:56:09.000000000 -0700 -@@ -174,6 +174,7 @@ - - #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ - #define DCACHE_UNHASHED 0x0010 -+#define DCACHE_LUSTRE_INVALID 0x0040 /* Lustre invalidated */ - - #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */ - diff --git a/lustre/kernel_patches/patches/vm-tunables-rhel4.patch b/lustre/kernel_patches/patches/vm-tunables-rhel4.patch deleted file mode 100644 index db2460b217..0000000000 --- a/lustre/kernel_patches/patches/vm-tunables-rhel4.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: linux+rhel4+chaos/mm/page_alloc.c -=================================================================== ---- linux+rhel4+chaos.orig/mm/page_alloc.c -+++ linux+rhel4+chaos/mm/page_alloc.c -@@ -1972,8 +1972,12 @@ static void setup_per_zone_pages_min(voi - lowmem_pages; - } - -- zone->pages_low = zone->pages_min * 2; -- zone->pages_high = zone->pages_min * 3; -+ /* -+ * When interpreting these watermarks, just keep in mind that: -+ * zone->pages_min == (zone->pages_min * 4) / 4; -+ */ -+ zone->pages_low = (zone->pages_min * 5) / 4; -+ zone->pages_high = (zone->pages_min * 6) / 4; - spin_unlock_irqrestore(&zone->lru_lock, flags); - } - } diff --git a/lustre/kernel_patches/series/2.6-fc3.series b/lustre/kernel_patches/series/2.6-fc3.series deleted file mode 100644 index dff06960dc..0000000000 --- a/lustre/kernel_patches/series/2.6-fc3.series +++ /dev/null @@ -1,23 +0,0 @@ -uml-2.6.10-fc3.patch -lustre_version.patch -fc3_to_rhel4_updates.patch -vfs_intent-2.6-fc3.patch -vfs_nointent-2.6-rhel4.patch -vfs_races-2.6-fc3.patch -nfs-cifs-intent-2.6-fc3.patch -iopen-misc-2.6-fc3.patch -export-truncate-2.6-suse.patch -export_symbols-2.6-rhel4.patch -dev_read_only-2.6-suse.patch -export-2.6-suse.patch -lookup_bdev_init_intent.patch -remove-suid-2.6-suse.patch -export-show_task-2.6-vanilla.patch -sd_iostats-2.6-rhel4.patch -jbd-2.6.10-jcberr.patch -hostfs_readdir_large.patch -ext3-patch-fuzz-fixup-fc3.patch -uml-exprt-clearuser.patch -fsprivate-2.6.patch -linux-2.6.9-ext3-sub-second-timestamp.patch -bitops_ext2_find_next_le_bit-2.6.patch diff --git a/lustre/kernel_patches/series/2.6-fc5.series b/lustre/kernel_patches/series/2.6-fc5.series deleted file mode 100644 index 8dd8c569eb..0000000000 --- a/lustre/kernel_patches/series/2.6-fc5.series +++ /dev/null @@ -1,18 +0,0 @@ -lustre_version.patch -vfs_intent-2.6-fc5.patch -vfs_nointent-2.6-fc5.patch -vfs_races-2.6.12.patch -jbd-2.6.10-jcberr.patch -nfs-cifs-intent-2.6-fc5.patch -iopen-misc-2.6.12.patch -export-truncate-2.6-suse.patch -export_symbols-2.6.12.patch -dev_read_only-2.6-fc5.patch -export-2.6-fc5.patch -lookup_bdev_init_intent.patch -8kstack-2.6.12.patch -remove-suid-2.6-suse.patch -export-show_task-2.6-fc5.patch -sd_iostats-2.6-rhel4.patch -export_symbol_numa-2.6-fc5.patch -vfs_intent-2.6-fc5-fix.patch diff --git a/lustre/kernel_patches/series/2.6-rhel4.series b/lustre/kernel_patches/series/2.6-rhel4.series deleted file mode 100644 index 8cdcacb5fb..0000000000 --- a/lustre/kernel_patches/series/2.6-rhel4.series +++ /dev/null @@ -1,41 +0,0 @@ -lustre_version.patch -vfs_intent-2.6-rhel4.patch -vfs_races-2.6-rhel4.patch -iopen-misc-2.6-suse.patch -export_symbols-2.6-rhel4.patch -dev_read_only-2.6-suse.patch -export-log-2.6-rhel4.patch -lookup_bdev_init_intent.patch -remove-suid-2.6-suse.patch -export-show_task-2.6-vanilla.patch -sd_iostats-2.6-rhel4.patch -blkdev_tunables-2.6-suse.patch -fsprivate-2.6.patch -export_symbol_numa.patch -qsnet-rhel4-2.6.patch -linux-2.6-binutils-2.16.patch -vm-tunables-rhel4.patch -tcp-rto_proc-2.6.9.patch -rollback-raid5ch-to-55.patch -raid5-stats.patch -raid5-configurable-cachesize.patch -raid5-large-io.patch -raid5-stripe-by-stripe-handling.patch -raid5-merge-ios.patch -raid5-serialize-ovelapping-reqs.patch -raid5-zerocopy.patch -raid6-stats.patch -raid6-configurable-cachesize.patch -raid6-large-io.patch -raid6-stripe-by-stripe-handling.patch -raid6-merge-ios.patch -raid6-serialize-ovelapping-reqs.patch -raid6-zerocopy.patch -jbd-stats-2.6.9.patch -bitops_ext2_find_next_le_bit-2.6.patch -quota-deadlock-on-pagelock-core.patch -quota-umount-race-fix.patch -quota-deadlock-on-pagelock-ext3.patch -vfs-keep-inode-hashed-for-clear-inode.patch -modpost_external_module_updates_rhel4.patch -mpt-fusion-downgrade-to-3_02_73-rhel4.patch diff --git a/lustre/kernel_patches/series/2.6-rhel5.series b/lustre/kernel_patches/series/2.6-rhel5.series deleted file mode 100644 index 1f2cb664da..0000000000 --- a/lustre/kernel_patches/series/2.6-rhel5.series +++ /dev/null @@ -1,19 +0,0 @@ -lustre_version.patch -vfs_races-2.6-rhel5.patch -i_filter_data.patch -jbd-jcberr-2.6.18-vanilla.patch -export_symbols-2.6.18-vanilla.patch -dev_read_only-2.6.18-vanilla.patch -export-2.6.18-vanilla.patch -8kstack-2.6.12.patch -export-show_task-2.6.18-vanilla.patch -sd_iostats-2.6-rhel5.patch -export_symbol_numa-2.6-fc5.patch -jbd-stats-2.6-rhel5.patch -raid5-stats-rhel5.patch -raid5-configurable-cachesize-rhel5.patch -raid5-large-io-rhel5.patch -raid5-stripe-by-stripe-handling-rhel5.patch -raid5-merge-ios-rhel5.patch -raid5-zerocopy-rhel5.patch -md-rebuild-policy.patch diff --git a/lustre/kernel_patches/series/2.6-sles10.series b/lustre/kernel_patches/series/2.6-sles10.series deleted file mode 100644 index 8a3494302e..0000000000 --- a/lustre/kernel_patches/series/2.6-sles10.series +++ /dev/null @@ -1,14 +0,0 @@ -lustre_version.patch -jbd-2.6.10-jcberr.patch -iopen-misc-2.6.12.patch -export_symbols-2.6.12.patch -dev_read_only-2.6-fc5.patch -export-2.6-fc5.patch -export-show_task-2.6-fc5.patch -sd_iostats-2.6-rhel5.patch -export_symbol_numa-2.6-fc5.patch -blkdev_tunables-2.6-sles10.patch -jbd-stats-2.6-sles10.patch -i_filter_data.patch -quota-fix-oops-in-invalidate_dquots.patch -fmode-exec-2.6-sles10.patch diff --git a/lustre/kernel_patches/series/2.6-suse-newer.series b/lustre/kernel_patches/series/2.6-suse-newer.series deleted file mode 100644 index 1f092e8e9b..0000000000 --- a/lustre/kernel_patches/series/2.6-suse-newer.series +++ /dev/null @@ -1,17 +0,0 @@ -lustre-version-revert_suse.patch -lustre_version.patch -dev_read_only-2.6-lnxi.patch -sd_iostats-2.6-rhel4.patch -blkdev_tunables-2.6-suse.patch -uml-exprt-clearuser.patch -qsnet-suse-2.6.patch -fsprivate-2.6.patch -dcache-qstr-api-fix-2.6-suse.patch -iallocsem_consistency.patch -jbd-stats-2.6.5.patch -bitops_ext2_find_next_le_bit-2.6.patch -2.6.5-quotafix.patch -vfs_intent-reduce-stack-usage-2.6-suse-newer.patch -atomic_add_return-sles9.patch -modpost_external_module_updates_sles9.patch -netpoll_xmit_lock-2.6-suse.patch diff --git a/lustre/kernel_patches/series/2.6-suse.series b/lustre/kernel_patches/series/2.6-suse.series deleted file mode 100644 index 8bc1f6e89a..0000000000 --- a/lustre/kernel_patches/series/2.6-suse.series +++ /dev/null @@ -1,14 +0,0 @@ -lustre_version.patch -vfs_intent-2.6-suse.patch -vfs_nointent-2.6-suse.patch -vfs_races-2.6-suse.patch -nfs-cifs-intent-2.6-suse.patch -iopen-misc-2.6-suse.patch -export-truncate-2.6-suse.patch -export_symbols-2.6-suse.patch -dev_read_only-2.6-suse.patch -export-2.6-suse.patch -header-guards-2.6-suse.patch -md_path_lookup-2.6-suse.patch -ext3-super-ntohl.patch -export-show_task-2.6-vanilla.patch diff --git a/lustre/kernel_patches/series/2.6.18-vanilla.series b/lustre/kernel_patches/series/2.6.18-vanilla.series deleted file mode 100644 index 7dc4f8e9f9..0000000000 --- a/lustre/kernel_patches/series/2.6.18-vanilla.series +++ /dev/null @@ -1,16 +0,0 @@ -lustre_version.patch -vfs_races-2.6.18-vanilla.patch -i_filter_data.patch -jbd-jcberr-2.6.18-vanilla.patch -iopen-misc-2.6.18-vanilla.patch -export-truncate-2.6.18-vanilla.patch -export_symbols-2.6.18-vanilla.patch -dev_read_only-2.6.18-vanilla.patch -export-2.6.18-vanilla.patch -8kstack-2.6.12.patch -export-show_task-2.6.18-vanilla.patch -sd_iostats-2.6-rhel5.patch -export_symbol_numa-2.6.18.patch -jbd-16tb-overflow-fixes.patch -jbd-check-for-unmapped-buffer.patch -jbd-stats-2.6-rhel5.patch diff --git a/lustre/kernel_patches/series/2.6.22-vanilla.series b/lustre/kernel_patches/series/2.6.22-vanilla.series deleted file mode 100644 index e259c63084..0000000000 --- a/lustre/kernel_patches/series/2.6.22-vanilla.series +++ /dev/null @@ -1,12 +0,0 @@ -lustre_version.patch -vfs_races-2.6.22-vanilla.patch -i_filter_data.patch -jbd-jcberr-2.6.18-vanilla.patch -iopen-misc-2.6.22-vanilla.patch -export-truncate-2.6.18-vanilla.patch -export_symbols-2.6.22-vanilla.patch -dev_read_only-2.6.22-vanilla.patch -export-2.6.18-vanilla.patch -8kstack-2.6.12.patch -export-show_task-2.6.18-vanilla.patch -sd_iostats-2.6.22-vanilla.patch diff --git a/lustre/kernel_patches/targets/.cvsignore b/lustre/kernel_patches/targets/.cvsignore deleted file mode 100644 index ba141e8c6a..0000000000 --- a/lustre/kernel_patches/targets/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.target diff --git a/lustre/kernel_patches/targets/2.6-fc5.target.in b/lustre/kernel_patches/targets/2.6-fc5.target.in deleted file mode 100644 index fe27302105..0000000000 --- a/lustre/kernel_patches/targets/2.6-fc5.target.in +++ /dev/null @@ -1,18 +0,0 @@ -lnxmaj="2.6.15" -lnxrel="fc5" - -KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2 -SERIES=2.6-fc5.series -VERSION=${lnxmaj} -EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ -RHBUILD=1 -LINUX26=1 -LUSTRE_VERSION=@VERSION@ - -BASE_ARCHS="i686" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686" -UP_ARCHS="" - diff --git a/lustre/kernel_patches/targets/2.6-patchless.target.in b/lustre/kernel_patches/targets/2.6-patchless.target.in deleted file mode 100644 index ed2a1202b0..0000000000 --- a/lustre/kernel_patches/targets/2.6-patchless.target.in +++ /dev/null @@ -1,25 +0,0 @@ -lnxmaj="2.6.16" -lnxrel="22" - -KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2 -SERIES= -VERSION=${lnxmaj} -EXTRA_VERSION=${lnxrel} -RHBUILD=1 -LINUX26=1 -LUSTRE_VERSION=@VERSION@ - -BASE_ARCHS="i686 x86_64 ia64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686 x86_64 ia64" -UP_ARCHS="" - -# Modules in this kernel do not build with gcc 4 or gcc 2.96 -for cc in gcc33 gcc32 ; do - if which $cc >/dev/null 2>/dev/null ; then - export CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/2.6-rhel4.target.in b/lustre/kernel_patches/targets/2.6-rhel4.target.in deleted file mode 100644 index 390f959abb..0000000000 --- a/lustre/kernel_patches/targets/2.6-rhel4.target.in +++ /dev/null @@ -1,25 +0,0 @@ -lnxmaj="2.6.9" -lnxrel="67.0.7.EL" - -KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2 -SERIES=2.6-rhel4.series -VERSION=${lnxmaj} -EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ -RHBUILD=1 -LINUX26=1 -LUSTRE_VERSION=@VERSION@ - -BASE_ARCHS="i686 x86_64 ia64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686 x86_64 ia64" -UP_ARCHS="" - -# Modules in this kernel do not build with gcc 4 or gcc 2.96 -for cc in gcc33 gcc32 ; do - if which $cc >/dev/null 2>/dev/null ; then - export CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/2.6-rhel5.target.in b/lustre/kernel_patches/targets/2.6-rhel5.target.in deleted file mode 100644 index 6c39710a62..0000000000 --- a/lustre/kernel_patches/targets/2.6-rhel5.target.in +++ /dev/null @@ -1,24 +0,0 @@ -lnxmaj="2.6.18" -lnxrel="53.1.14.el5" - -KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2 -SERIES=2.6-rhel5.series -VERSION=${lnxmaj} -EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ -RHBUILD=1 -LINUX26=1 -LUSTRE_VERSION=@VERSION@ - -BASE_ARCHS="i686 x86_64 ia64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686 x86_64 ia64" -UP_ARCHS="" - -for cc in gcc ; do - if which $cc >/dev/null 2>/dev/null ; then - export CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/2.6-sles10.target.in b/lustre/kernel_patches/targets/2.6-sles10.target.in deleted file mode 100644 index 35ddd8529b..0000000000 --- a/lustre/kernel_patches/targets/2.6-sles10.target.in +++ /dev/null @@ -1,37 +0,0 @@ -lnxmaj="2.6.16" -lnxrel="54-0.2.5" - -# this is the delimeter that goes between $lnxmaj and $lnxrel -# defaults to "-" -EXTRA_VERSION_DELIMITER="." - -# this is the delimeter that goes before the "smp" at the end of the version -# defaults to empty -TARGET_DELIMITER="-" - -KERNEL=linux-$lnxmaj.$lnxrel.tar.bz2 -SERIES=2.6-sles10.series -VERSION=$lnxmaj -EXTRA_VERSION="${lnxrel}_lustre.@VERSION@" -LUSTRE_VERSION=@VERSION@ -RHBUILD=0 -LINUX26=1 -# No /boot/Kerntypes* in SLES10 -SUSEBUILD=0 - -BASE_ARCHS="i686 ppc x86_64 ia64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="x86_64 ia64" -BIGSMP_ARCHS="i686" -PSERIES64_ARCHS="ppc" -UP_ARCHS="" -SRC_ARCHS="" - -for cc in gcc ; do - if which $cc >/dev/null 2>/dev/null ; then - export CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/2.6-suse.target.in b/lustre/kernel_patches/targets/2.6-suse.target.in deleted file mode 100644 index 872367957f..0000000000 --- a/lustre/kernel_patches/targets/2.6-suse.target.in +++ /dev/null @@ -1,29 +0,0 @@ -lnxmaj="2.6.5" -lnxrel="7.311" - -KERNEL=linux-$lnxmaj-$lnxrel.tar.bz2 -# they include our patches -SERIES=2.6-suse-newer.series -VERSION=$lnxmaj -EXTRA_VERSION="${lnxrel}_lustre.@VERSION@" -LUSTRE_VERSION=@VERSION@ -RHBUILD=0 -LINUX26=1 -SUSEBUILD=1 - -BASE_ARCHS="i686 ppc x86_64 ia64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="x86_64 ia64" -BIGSMP_ARCHS="i686" -PSERIES64_ARCHS="ppc" -UP_ARCHS="" -SRC_ARCHS="" - -for cc in gcc33 ; do - if which $cc >/dev/null 2>/dev/null ; then - export CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/2.6-vanilla.target.in b/lustre/kernel_patches/targets/2.6-vanilla.target.in deleted file mode 100644 index dd7a0c2fc9..0000000000 --- a/lustre/kernel_patches/targets/2.6-vanilla.target.in +++ /dev/null @@ -1,29 +0,0 @@ -lnxmaj="2.6.18" -lnxrel="8" - -KERNEL=linux-$lnxmaj.$lnxrel.tar.bz2 -SERIES=2.6.18-vanilla.series -VERSION=$lnxmaj -EXTRA_VERSION="${lnxrel}_lustre.@VERSION@" -LUSTRE_VERSION=@VERSION@ -RHBUILD=0 -LINUX26=1 -# No /boot/Kerntypes* in SLES10 -SUSEBUILD=0 - - -BASE_ARCHS="i686 x86_64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686 x86_64" -BIGSMP_ARCHS="" -UP_ARCHS="" -SRC_ARCHS="" - -for cc in gcc ; do - if which $cc >/dev/null 2>/dev/null ; then - export CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/hp_pnnl-2.4.target.in b/lustre/kernel_patches/targets/hp_pnnl-2.4.target.in deleted file mode 100644 index 28c1be3a09..0000000000 --- a/lustre/kernel_patches/targets/hp_pnnl-2.4.target.in +++ /dev/null @@ -1,17 +0,0 @@ -lnxmaj=2.4.20 -lnxrel=hp_pnnl - -KERNEL=linux-$lnxmaj-$lnxrel.tar.gz -SERIES=hp-pnnl-2.4.20 -VERSION=$lnxmaj -EXTRA_VERSION=$lnxrel_lustre.@VERSION@ -LUSTRE_VERSION=@VERSION@ -RHBUILD=0 - -BASE_ARCHS="ia64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="ia64" -UP_ARCHS="" -SRC_ARCHS="ia64" diff --git a/lustre/kernel_patches/targets/rh-2.4.target.in b/lustre/kernel_patches/targets/rh-2.4.target.in deleted file mode 100644 index d27ed40111..0000000000 --- a/lustre/kernel_patches/targets/rh-2.4.target.in +++ /dev/null @@ -1,24 +0,0 @@ -lnxmaj="2.4.20" -lnxrel="31.9" - -KERNEL=linux-${lnxmaj}-${lnxrel}.tar.gz -SERIES=rh-2.4.20 -VERSION=$lnxmaj -EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ -LUSTRE_VERSION=@VERSION@ -RHBUILD=1 - -BASE_ARCHS="i686" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686" -UP_ARCHS="" - -# the modules in this kernel do not build with gcc 3 -for cc in i386-redhat-linux-gcc-2.96 gcc296 gcc ; do - if which $cc >/dev/null 2>/dev/null ; then - CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/rhel-2.4.target.in b/lustre/kernel_patches/targets/rhel-2.4.target.in deleted file mode 100644 index cea2b02d4f..0000000000 --- a/lustre/kernel_patches/targets/rhel-2.4.target.in +++ /dev/null @@ -1,24 +0,0 @@ -lnxmaj="2.4.21" -lnxrel="47.0.1.EL" - -KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2 -SERIES=rhel-2.4.21 -VERSION=${lnxmaj} -LUSTRE_VERSION=@VERSION@ -EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ -RHBUILD=1 - -BASE_ARCHS="i686 x86_64 ia64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686 x86_64 ia64" -UP_ARCHS="" - -# the modules in this kernel do not build with gcc 4, 3.4, or 2.96 -for cc in gcc32 gcc33 ; do - if which $cc >/dev/null 2>/dev/null ; then - export CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/sles-2.4.target.in b/lustre/kernel_patches/targets/sles-2.4.target.in deleted file mode 100644 index badeaebbbf..0000000000 --- a/lustre/kernel_patches/targets/sles-2.4.target.in +++ /dev/null @@ -1,26 +0,0 @@ -lnxmaj="2.4.21" -lnxrel="273" - -KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2 -SERIES=suse-2.4.21-jvn -VERSION=${lnxmaj} -EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ -LUSTRE_VERSION=@VERSION@ -RHBUILD=0 -LINUX26=0 -SUSEBUILD=1 - -BASE_ARCHS="i686" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686" -UP_ARCHS="" - -# the modules in this kernel do not build with gcc 4 or 2.96 -for cc in gcc32 gcc33 ; do - if which $cc >/dev/null 2>/dev/null ; then - export CC=$cc - break - fi -done diff --git a/lustre/kernel_patches/targets/suse-2.4.21-2.target.in b/lustre/kernel_patches/targets/suse-2.4.21-2.target.in deleted file mode 100644 index d00ca78dfe..0000000000 --- a/lustre/kernel_patches/targets/suse-2.4.21-2.target.in +++ /dev/null @@ -1,15 +0,0 @@ -KERNEL=linux-2.4.21-x86_64.tar.gz -SERIES=suse-2.4.21-2 -VERSION=2.4.21 -EXTRA_VERSION=lustre.@VERSION@ -LUSTRE_VERSION=@VERSION@ -RHBUILD=0 - -BASE_ARCHS="x86_64" -BIGMEM_ARCHS="" -BOOT_ARCH="" -JENSEN_ARCHS="" -SMP_ARCHS="" -UP_ARCHS="x86_64" - -ARCH="x86_64" diff --git a/lustre/kernel_patches/which_patch b/lustre/kernel_patches/which_patch deleted file mode 100644 index 937ae2b472..0000000000 --- a/lustre/kernel_patches/which_patch +++ /dev/null @@ -1,19 +0,0 @@ -SERIES VERSION COMMENT - -SUPPORTED KERNELS: -2.6-suse SLES9 before SP1 already in SLES9 SP1 kernel -2.6-suse-newer SLES9: 2.6.5-7.311 extra patches for SLES9 after SP1 -2.6-rhel4 RHEL4: 2.6.9-67.0.7.EL -2.6-sles10 SLES10: 2.6.16.54-0.2.5 -2.6-rhel5 RHEL5: 2.6.18-53.1.14.el5 -2.6.18-vanilla kernel.org: 2.6.18.8 -2.6.22-vanilla kernel.org: 2.6.22.14 - -CLIENT SUPPORT FOR UNPATCHED KERNELS: - kernel.org 2.6.16-2.6.19 - RHEL4: 2.6.9-42.0.8EL - -NB - The patches in the 2.6-suse series should already be in the SLES9 SP1 - kernel. The patches in the 2.6-suse-newer series are patches that - have been created since the SP1 kernel was released and should be - applied to the already-patched SP1 kernel. diff --git a/lustre/ldlm/.cvsignore b/lustre/ldlm/.cvsignore deleted file mode 100644 index bde2a9fdf5..0000000000 --- a/lustre/ldlm/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -Makefile -Makefile.in -.*.cmd -.*.flags -.tmp_versions diff --git a/lustre/ldlm/Makefile.am b/lustre/ldlm/Makefile.am deleted file mode 100644 index b5993fc928..0000000000 --- a/lustre/ldlm/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -# -# ldlm is built into ptlrpc -# - -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ -DIST_SOURCES = ldlm_extent.c ldlm_flock.c ldlm_internal.h ldlm_lib.c \ - ldlm_lock.c ldlm_lockd.c ldlm_plain.c ldlm_request.c \ - ldlm_resource.c l_lock.c ldlm_inodebits.c ldlm_pool.c \ - interval_tree.c diff --git a/lustre/ldlm/interval_tree.c b/lustre/ldlm/interval_tree.c deleted file mode 100644 index bedf5b3a45..0000000000 --- a/lustre/ldlm/interval_tree.c +++ /dev/null @@ -1,752 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Interval tree library used by ldlm extent lock code - * - * Copyright (c) 2007 Cluster File Systems, Inc. - * Author: Huang Wei <huangwei@clusterfs.com> - * Author: Jay Xiong <jinshan.xiong@sun.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ -#ifdef __KERNEL__ -# include <lustre_dlm.h> -#else -# include <liblustre.h> -# include <libcfs/kp30.h> -#endif -#include <obd_support.h> -#include <interval_tree.h> - -enum { - INTERVAL_RED = 0, - INTERVAL_BLACK = 1 -}; - -static inline int node_is_left_child(struct interval_node *node) -{ - LASSERT(node->in_parent != NULL); - return node == node->in_parent->in_left; -} - -static inline int node_is_right_child(struct interval_node *node) -{ - LASSERT(node->in_parent != NULL); - return node == node->in_parent->in_right; -} - -static inline int node_is_red(struct interval_node *node) -{ - return node->in_color == INTERVAL_RED; -} - -static inline int node_is_black(struct interval_node *node) -{ - return node->in_color == INTERVAL_BLACK; -} - -static inline int extent_compare(struct interval_node_extent *e1, - struct interval_node_extent *e2) -{ - int rc; - if (e1->start == e2->start) { - if (e1->end < e2->end) - rc = -1; - else if (e1->end > e2->end) - rc = 1; - else - rc = 0; - } else { - if (e1->start < e2->start) - rc = -1; - else - rc = 1; - } - return rc; -} - -static inline int extent_equal(struct interval_node_extent *e1, - struct interval_node_extent *e2) -{ - return (e1->start == e2->start) && (e1->end == e2->end); -} - -static inline int extent_overlapped(struct interval_node_extent *e1, - struct interval_node_extent *e2) -{ - return (e1->start <= e2->end) && (e2->start <= e1->end); -} - -static inline int node_compare(struct interval_node *n1, - struct interval_node *n2) -{ - return extent_compare(&n1->in_extent, &n2->in_extent); -} - -static inline int node_equal(struct interval_node *n1, - struct interval_node *n2) -{ - return extent_equal(&n1->in_extent, &n2->in_extent); -} - -static inline __u64 max_u64(__u64 x, __u64 y) -{ - return x > y ? x : y; -} - -static inline __u64 min_u64(__u64 x, __u64 y) -{ - return x < y ? x : y; -} - -#define interval_for_each(node, root) \ -for (node = interval_first(root); node != NULL; \ - node = interval_next(node)) - -#define interval_for_each_reverse(node, root) \ -for (node = interval_last(root); node != NULL; \ - node = interval_prev(node)) - -static struct interval_node *interval_first(struct interval_node *node) -{ - ENTRY; - - if (!node) - RETURN(NULL); - while (node->in_left) - node = node->in_left; - RETURN(node); -} - -static struct interval_node *interval_last(struct interval_node *node) -{ - ENTRY; - - if (!node) - RETURN(NULL); - while (node->in_right) - node = node->in_right; - RETURN(node); -} - -static struct interval_node *interval_next(struct interval_node *node) -{ - ENTRY; - - if (!node) - RETURN(NULL); - if (node->in_right) - RETURN(interval_first(node->in_right)); - while (node->in_parent && node_is_right_child(node)) - node = node->in_parent; - RETURN(node->in_parent); -} - -static struct interval_node *interval_prev(struct interval_node *node) -{ - ENTRY; - - if (!node) - RETURN(NULL); - - if (node->in_left) - RETURN(interval_last(node->in_left)); - - while (node->in_parent && node_is_left_child(node)) - node = node->in_parent; - - RETURN(node->in_parent); -} - -enum interval_iter interval_iterate(struct interval_node *root, - interval_callback_t func, - void *data) -{ - struct interval_node *node; - enum interval_iter rc = INTERVAL_ITER_CONT; - ENTRY; - - interval_for_each(node, root) { - rc = func(node, data); - if (rc == INTERVAL_ITER_STOP) - break; - } - - RETURN(rc); -} -EXPORT_SYMBOL(interval_iterate); - -enum interval_iter interval_iterate_reverse(struct interval_node *root, - interval_callback_t func, - void *data) -{ - struct interval_node *node; - enum interval_iter rc = INTERVAL_ITER_CONT; - ENTRY; - - interval_for_each_reverse(node, root) { - rc = func(node, data); - if (rc == INTERVAL_ITER_STOP) - break; - } - - RETURN(rc); -} -EXPORT_SYMBOL(interval_iterate_reverse); - -/* try to find a node with same interval in the tree, - * if found, return the pointer to the node, otherwise return NULL*/ -struct interval_node *interval_find(struct interval_node *root, - struct interval_node_extent *ex) -{ - struct interval_node *walk = root; - int rc; - ENTRY; - - while (walk) { - rc = extent_compare(ex, &walk->in_extent); - if (rc == 0) - break; - else if (rc < 0) - walk = walk->in_left; - else - walk = walk->in_right; - } - - RETURN(walk); -} -EXPORT_SYMBOL(interval_find); - -static void __rotate_change_maxhigh(struct interval_node *node, - struct interval_node *rotate) -{ - __u64 left_max, right_max; - - rotate->in_max_high = node->in_max_high; - left_max = node->in_left ? node->in_left->in_max_high : 0; - right_max = node->in_right ? node->in_right->in_max_high : 0; - node->in_max_high = max_u64(interval_high(node), - max_u64(left_max,right_max)); -} - -/* The left rotation "pivots" around the link from node to node->right, and - * - node will be linked to node->right's left child, and - * - node->right's left child will be linked to node's right child. */ -static void __rotate_left(struct interval_node *node, - struct interval_node **root) -{ - struct interval_node *right = node->in_right; - struct interval_node *parent = node->in_parent; - - node->in_right = right->in_left; - if (node->in_right) - right->in_left->in_parent = node; - - right->in_left = node; - right->in_parent = parent; - if (parent) { - if (node_is_left_child(node)) - parent->in_left = right; - else - parent->in_right = right; - } else { - *root = right; - } - node->in_parent = right; - - /* update max_high for node and right */ - __rotate_change_maxhigh(node, right); -} - -/* The right rotation "pivots" around the link from node to node->left, and - * - node will be linked to node->left's right child, and - * - node->left's right child will be linked to node's left child. */ -static void __rotate_right(struct interval_node *node, - struct interval_node **root) -{ - struct interval_node *left = node->in_left; - struct interval_node *parent = node->in_parent; - - node->in_left = left->in_right; - if (node->in_left) - left->in_right->in_parent = node; - left->in_right = node; - - left->in_parent = parent; - if (parent) { - if (node_is_right_child(node)) - parent->in_right = left; - else - parent->in_left = left; - } else { - *root = left; - } - node->in_parent = left; - - /* update max_high for node and left */ - __rotate_change_maxhigh(node, left); -} - -#define interval_swap(a, b) do { \ - struct interval_node *c = a; a = b; b = c; \ -} while (0) - -/* - * Operations INSERT and DELETE, when run on a tree with n keys, - * take O(logN) time.Because they modify the tree, the result - * may violate the red-black properties.To restore these properties, - * we must change the colors of some of the nodes in the tree - * and also change the pointer structure. - */ -static void interval_insert_color(struct interval_node *node, - struct interval_node **root) -{ - struct interval_node *parent, *gparent; - ENTRY; - - while ((parent = node->in_parent) && node_is_red(parent)) { - gparent = parent->in_parent; - /* Parent is RED, so gparent must not be NULL */ - if (node_is_left_child(parent)) { - struct interval_node *uncle; - uncle = gparent->in_right; - if (uncle && node_is_red(uncle)) { - uncle->in_color = INTERVAL_BLACK; - parent->in_color = INTERVAL_BLACK; - gparent->in_color = INTERVAL_RED; - node = gparent; - continue; - } - - if (parent->in_right == node) { - __rotate_left(parent, root); - interval_swap(node, parent); - } - - parent->in_color = INTERVAL_BLACK; - gparent->in_color = INTERVAL_RED; - __rotate_right(gparent, root); - } else { - struct interval_node *uncle; - uncle = gparent->in_left; - if (uncle && node_is_red(uncle)) { - uncle->in_color = INTERVAL_BLACK; - parent->in_color = INTERVAL_BLACK; - gparent->in_color = INTERVAL_RED; - node = gparent; - continue; - } - - if (node_is_left_child(node)) { - __rotate_right(parent, root); - interval_swap(node, parent); - } - - parent->in_color = INTERVAL_BLACK; - gparent->in_color = INTERVAL_RED; - __rotate_left(gparent, root); - } - } - - (*root)->in_color = INTERVAL_BLACK; - EXIT; -} - -struct interval_node *interval_insert(struct interval_node *node, - struct interval_node **root) - -{ - struct interval_node **p, *parent = NULL; - ENTRY; - - p = root; - while (*p) { - parent = *p; - if (node_equal(parent, node)) - RETURN(parent); - - /* max_high field must be updated after each iteration */ - if (parent->in_max_high < interval_high(node)) - parent->in_max_high = interval_high(node); - - if (node_compare(node, parent) < 0) - p = &parent->in_left; - else - p = &parent->in_right; - } - - /* link node into the tree */ - node->in_parent = parent; - node->in_color = INTERVAL_RED; - node->in_left = node->in_right = NULL; - *p = node; - - interval_insert_color(node, root); - - RETURN(NULL); -} -EXPORT_SYMBOL(interval_insert); - -static inline int node_is_black_or_0(struct interval_node *node) -{ - return !node || node_is_black(node); -} - -static void interval_erase_color(struct interval_node *node, - struct interval_node *parent, - struct interval_node **root) -{ - struct interval_node *tmp; - ENTRY; - - while (node_is_black_or_0(node) && node != *root) { - if (parent->in_left == node) { - tmp = parent->in_right; - if (node_is_red(tmp)) { - tmp->in_color = INTERVAL_BLACK; - parent->in_color = INTERVAL_RED; - __rotate_left(parent, root); - tmp = parent->in_right; - } - if (node_is_black_or_0(tmp->in_left) && - node_is_black_or_0(tmp->in_right)) { - tmp->in_color = INTERVAL_RED; - node = parent; - parent = node->in_parent; - } else { - if (node_is_black_or_0(tmp->in_right)) { - struct interval_node *o_left; - if ((o_left = tmp->in_left)) - o_left->in_color = INTERVAL_BLACK; - tmp->in_color = INTERVAL_RED; - __rotate_right(tmp, root); - tmp = parent->in_right; - } - tmp->in_color = parent->in_color; - parent->in_color = INTERVAL_BLACK; - if (tmp->in_right) - tmp->in_right->in_color = INTERVAL_BLACK; - __rotate_left(parent, root); - node = *root; - break; - } - } else { - tmp = parent->in_left; - if (node_is_red(tmp)) { - tmp->in_color = INTERVAL_BLACK; - parent->in_color = INTERVAL_RED; - __rotate_right(parent, root); - tmp = parent->in_left; - } - if (node_is_black_or_0(tmp->in_left) && - node_is_black_or_0(tmp->in_right)) { - tmp->in_color = INTERVAL_RED; - node = parent; - parent = node->in_parent; - } else { - if (node_is_black_or_0(tmp->in_left)) { - struct interval_node *o_right; - if ((o_right = tmp->in_right)) - o_right->in_color = INTERVAL_BLACK; - tmp->in_color = INTERVAL_RED; - __rotate_left(tmp, root); - tmp = parent->in_left; - } - tmp->in_color = parent->in_color; - parent->in_color = INTERVAL_BLACK; - if (tmp->in_left) - tmp->in_left->in_color = INTERVAL_BLACK; - __rotate_right(parent, root); - node = *root; - break; - } - } - } - if (node) - node->in_color = INTERVAL_BLACK; - EXIT; -} - -/* - * if the @max_high value of @node is changed, this function traverse a path - * from node up to the root to update max_high for the whole tree. - */ -static void update_maxhigh(struct interval_node *node, - __u64 old_maxhigh) -{ - __u64 left_max, right_max; - ENTRY; - - while (node) { - left_max = node->in_left ? node->in_left->in_max_high : 0; - right_max = node->in_right ? node->in_right->in_max_high : 0; - node->in_max_high = max_u64(interval_high(node), - max_u64(left_max, right_max)); - - if (node->in_max_high >= old_maxhigh) - break; - node = node->in_parent; - } - EXIT; -} - -void interval_erase(struct interval_node *node, - struct interval_node **root) -{ - struct interval_node *child, *parent; - int color; - ENTRY; - - if (!node->in_left) { - child = node->in_right; - } else if (!node->in_right) { - child = node->in_left; - } else { /* Both left and right child are not NULL */ - struct interval_node *old = node; - - node = interval_next(node); - child = node->in_right; - parent = node->in_parent; - color = node->in_color; - - if (child) - child->in_parent = parent; - if (parent == old) { - parent->in_right = child; - parent = node; - } else { - parent->in_left = child; - } - - node->in_color = old->in_color; - node->in_right = old->in_right; - node->in_left = old->in_left; - node->in_parent = old->in_parent; - - if (old->in_parent) { - if (node_is_left_child(old)) - old->in_parent->in_left = node; - else - old->in_parent->in_right = node; - } else { - *root = node; - } - - old->in_left->in_parent = node; - if (old->in_right) - old->in_right->in_parent = node; - update_maxhigh(child, node->in_max_high); - update_maxhigh(node, old->in_max_high); - goto color; - } - parent = node->in_parent; - color = node->in_color; - - if (child) - child->in_parent = parent; - if (parent) { - if (node_is_left_child(node)) - parent->in_left = child; - else - parent->in_right = child; - } else { - *root = child; - } - - update_maxhigh(child, node->in_max_high); - -color: - if (color == INTERVAL_BLACK) - interval_erase_color(child, parent, root); - EXIT; -} -EXPORT_SYMBOL(interval_erase); - -static inline int interval_may_overlap(struct interval_node *node, - struct interval_node_extent *ext) -{ - return (ext->start <= node->in_max_high && - ext->end >= interval_low(node)); -} - -/* - * This function finds all intervals that overlap interval ext, - * and calls func to handle resulted intervals one by one. - * in lustre, this function will find all conflicting locks in - * the granted queue and add these locks to the ast work list. - * - * { - * if (node == NULL) - * return 0; - * if (ext->end < interval_low(node)) { - * interval_search(node->in_left, ext, func, data); - * } else if (interval_may_overlap(node, ext)) { - * if (extent_overlapped(ext, &node->in_extent)) - * func(node, data); - * interval_search(node->in_left, ext, func, data); - * interval_search(node->in_right, ext, func, data); - * } - * return 0; - * } - * - */ -enum interval_iter interval_search(struct interval_node *node, - struct interval_node_extent *ext, - interval_callback_t func, - void *data) -{ - struct interval_node *parent; - enum interval_iter rc = INTERVAL_ITER_CONT; - - LASSERT(ext != NULL); - LASSERT(func != NULL); - - while (node) { - if (ext->end < interval_low(node)) { - if (node->in_left) { - node = node->in_left; - continue; - } - } else if (interval_may_overlap(node, ext)) { - if (extent_overlapped(ext, &node->in_extent)) { - rc = func(node, data); - if (rc == INTERVAL_ITER_STOP) - break; - } - - if (node->in_left) { - node = node->in_left; - continue; - } - if (node->in_right) { - node = node->in_right; - continue; - } - } - - parent = node->in_parent; - while (parent) { - if (node_is_left_child(node) && - parent->in_right) { - /* If we ever got the left, it means that the - * parent met ext->end<interval_low(parent), or - * may_overlap(parent). If the former is true, - * we needn't go back. So stop early and check - * may_overlap(parent) after this loop. */ - node = parent->in_right; - break; - } - node = parent; - parent = parent->in_parent; - } - if (parent == NULL || !interval_may_overlap(parent, ext)) - break; - } - - return rc; -} -EXPORT_SYMBOL(interval_search); - -static enum interval_iter interval_overlap_cb(struct interval_node *n, - void *args) -{ - *(int *)args = 1; - return INTERVAL_ITER_STOP; -} - -int interval_is_overlapped(struct interval_node *root, - struct interval_node_extent *ext) -{ - int has = 0; - (void)interval_search(root, ext, interval_overlap_cb, &has); - return has; -} -EXPORT_SYMBOL(interval_is_overlapped); - -/* Don't expand to low. Expanding downwards is expensive, and meaningless to - * some extents, because programs seldom do IO backward. - * - * The recursive algorithm of expanding low: - * expand_low { - * struct interval_node *tmp; - * static __u64 res = 0; - * - * if (root == NULL) - * return res; - * if (root->in_max_high < low) { - * res = max_u64(root->in_max_high + 1, res); - * return res; - * } else if (low < interval_low(root)) { - * interval_expand_low(root->in_left, low); - * return res; - * } - * - * if (interval_high(root) < low) - * res = max_u64(interval_high(root) + 1, res); - * interval_expand_low(root->in_left, low); - * interval_expand_low(root->in_right, low); - * - * return res; - * } - * - * It's much easy to eliminate the recursion, see interval_search for - * an example. -jay - */ -static inline __u64 interval_expand_low(struct interval_node *root, __u64 low) -{ - /* we only concern the empty tree right now. */ - if (root == NULL) - return 0; - return low; -} - -static inline __u64 interval_expand_high(struct interval_node *node, __u64 high) -{ - __u64 result = ~0; - - while (node != NULL) { - if (node->in_max_high < high) - break; - - if (interval_low(node) > high) { - result = interval_low(node) - 1; - node = node->in_left; - } else { - node = node->in_right; - } - } - - return result; -} - -/* expanding the extent based on @ext. */ -void interval_expand(struct interval_node *root, - struct interval_node_extent *ext, - struct interval_node_extent *limiter) -{ - /* The assertion of interval_is_overlapped is expensive because we may - * travel many nodes to find the overlapped node. */ - LASSERT(interval_is_overlapped(root, ext) == 0); - if (!limiter || limiter->start < ext->start) - ext->start = interval_expand_low(root, ext->start); - if (!limiter || limiter->end > ext->end) - ext->end = interval_expand_high(root, ext->end); - LASSERT(interval_is_overlapped(root, ext) == 0); -} -EXPORT_SYMBOL(interval_expand); diff --git a/lustre/ldlm/l_lock.c b/lustre/ldlm/l_lock.c deleted file mode 100644 index e23a75530c..0000000000 --- a/lustre/ldlm/l_lock.c +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001, 2002 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - */ - -#define DEBUG_SUBSYSTEM S_LDLM -#ifdef __KERNEL__ -#include <libcfs/libcfs.h> -#else -#include <liblustre.h> -#endif - -#include <lustre_dlm.h> -#include <lustre_lib.h> - -/* - * ldlm locking uses resource to serialize access to locks - * but there is a case when we change resource of lock upon - * enqueue reply. we rely on that lock->l_resource = new_res - * is atomic - */ -struct ldlm_resource * lock_res_and_lock(struct ldlm_lock *lock) -{ - struct ldlm_resource *res = lock->l_resource; - - if (ns_is_server(res->lr_namespace)) { - /* on server-side resource of lock doesn't change */ - lock_res(res); - return res; - } - - spin_lock(&lock->l_lock); - res = lock->l_resource; - lock_res(res); - return res; -} - -void unlock_res_and_lock(struct ldlm_lock *lock) -{ - struct ldlm_resource *res = lock->l_resource; - - if (ns_is_server(res->lr_namespace)) { - /* on server-side resource of lock doesn't change */ - unlock_res(res); - return; - } - - unlock_res(res); - spin_unlock(&lock->l_lock); -} - diff --git a/lustre/ldlm/ldlm_extent.c b/lustre/ldlm/ldlm_extent.c deleted file mode 100644 index cc0e3aa920..0000000000 --- a/lustre/ldlm/ldlm_extent.c +++ /dev/null @@ -1,881 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_LDLM -#ifndef __KERNEL__ -# include <liblustre.h> -#endif - -#include <lustre_dlm.h> -#include <obd_support.h> -#include <obd.h> -#include <lustre_lib.h> - -#include "ldlm_internal.h" - -#define LDLM_MAX_GROWN_EXTENT (32 * 1024 * 1024 - 1) - -/* fixup the ldlm_extent after expanding */ -static void ldlm_extent_internal_policy_fixup(struct ldlm_lock *req, - struct ldlm_extent *new_ex, - int conflicting) -{ - ldlm_mode_t req_mode = req->l_req_mode; - __u64 req_start = req->l_req_extent.start; - __u64 req_end = req->l_req_extent.end; - __u64 req_align, mask; - - if (conflicting > 32 && (req_mode == LCK_PW || req_mode == LCK_CW)) { - if (req_end < req_start + LDLM_MAX_GROWN_EXTENT) - new_ex->end = min(req_start + LDLM_MAX_GROWN_EXTENT, - new_ex->end); - } - - if (new_ex->start == 0 && new_ex->end == OBD_OBJECT_EOF) { - EXIT; - return; - } - - /* we need to ensure that the lock extent is properly aligned to what - * the client requested. We align it to the lowest-common denominator - * of the clients requested lock start and end alignment. */ - mask = 0x1000ULL; - req_align = (req_end + 1) | req_start; - if (req_align != 0) { - while ((req_align & mask) == 0) - mask <<= 1; - } - mask -= 1; - /* We can only shrink the lock, not grow it. - * This should never cause lock to be smaller than requested, - * since requested lock was already aligned on these boundaries. */ - new_ex->start = ((new_ex->start - 1) | mask) + 1; - new_ex->end = ((new_ex->end + 1) & ~mask) - 1; - LASSERTF(new_ex->start <= req_start, - "mask "LPX64" grant start "LPU64" req start "LPU64"\n", - mask, new_ex->start, req_start); - LASSERTF(new_ex->end >= req_end, - "mask "LPX64" grant end "LPU64" req end "LPU64"\n", - mask, new_ex->end, req_end); -} - -/* The purpose of this function is to return: - * - the maximum extent - * - containing the requested extent - * - and not overlapping existing conflicting extents outside the requested one - * - * Use interval tree to expand the lock extent for granted lock. - */ -static void ldlm_extent_internal_policy_granted(struct ldlm_lock *req, - struct ldlm_extent *new_ex) -{ - struct ldlm_resource *res = req->l_resource; - ldlm_mode_t req_mode = req->l_req_mode; - __u64 req_start = req->l_req_extent.start; - __u64 req_end = req->l_req_extent.end; - struct ldlm_interval_tree *tree; - struct interval_node_extent limiter = { new_ex->start, new_ex->end }; - int conflicting = 0; - int idx; - ENTRY; - - lockmode_verify(req_mode); - - /* using interval tree to handle the ldlm extent granted locks */ - for (idx = 0; idx < LCK_MODE_NUM; idx++) { - struct interval_node_extent ext = { req_start, req_end }; - - tree = &res->lr_itree[idx]; - if (lockmode_compat(tree->lit_mode, req_mode)) - continue; - - conflicting += tree->lit_size; - if (conflicting > 4) - limiter.start = req_start; - - if (interval_is_overlapped(tree->lit_root, &ext)) - printk("req_mode = %d, tree->lit_mode = %d, tree->lit_size = %d\n", - req_mode, tree->lit_mode, tree->lit_size); - interval_expand(tree->lit_root, &ext, &limiter); - limiter.start = max(limiter.start, ext.start); - limiter.end = min(limiter.end, ext.end); - if (limiter.start == req_start && limiter.end == req_end) - break; - } - - new_ex->start = limiter.start; - new_ex->end = limiter.end; - LASSERT(new_ex->start <= req_start); - LASSERT(new_ex->end >= req_end); - - ldlm_extent_internal_policy_fixup(req, new_ex, conflicting); - EXIT; -} - -/* The purpose of this function is to return: - * - the maximum extent - * - containing the requested extent - * - and not overlapping existing conflicting extents outside the requested one - */ -static void -ldlm_extent_internal_policy_waiting(struct ldlm_lock *req, - struct ldlm_extent *new_ex) -{ - struct list_head *tmp; - struct ldlm_resource *res = req->l_resource; - ldlm_mode_t req_mode = req->l_req_mode; - __u64 req_start = req->l_req_extent.start; - __u64 req_end = req->l_req_extent.end; - int conflicting = 0; - ENTRY; - - lockmode_verify(req_mode); - - /* for waiting locks */ - list_for_each(tmp, &res->lr_waiting) { - struct ldlm_lock *lock; - struct ldlm_extent *l_extent; - - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - l_extent = &lock->l_policy_data.l_extent; - - /* We already hit the minimum requested size, search no more */ - if (new_ex->start == req_start && new_ex->end == req_end) { - EXIT; - return; - } - - /* Don't conflict with ourselves */ - if (req == lock) - continue; - - /* Locks are compatible, overlap doesn't matter */ - /* Until bug 20 is fixed, try to avoid granting overlapping - * locks on one client (they take a long time to cancel) */ - if (lockmode_compat(lock->l_req_mode, req_mode) && - lock->l_export != req->l_export) - continue; - - /* If this is a high-traffic lock, don't grow downwards at all - * or grow upwards too much */ - ++conflicting; - if (conflicting > 4) - new_ex->start = req_start; - - /* If lock doesn't overlap new_ex, skip it. */ - if (!ldlm_extent_overlap(l_extent, new_ex)) - continue; - - /* Locks conflicting in requested extents and we can't satisfy - * both locks, so ignore it. Either we will ping-pong this - * extent (we would regardless of what extent we granted) or - * lock is unused and it shouldn't limit our extent growth. */ - if (ldlm_extent_overlap(&lock->l_req_extent,&req->l_req_extent)) - continue; - - /* We grow extents downwards only as far as they don't overlap - * with already-granted locks, on the assumtion that clients - * will be writing beyond the initial requested end and would - * then need to enqueue a new lock beyond previous request. - * l_req_extent->end strictly < req_start, checked above. */ - if (l_extent->start < req_start && new_ex->start != req_start) { - if (l_extent->end >= req_start) - new_ex->start = req_start; - else - new_ex->start = min(l_extent->end+1, req_start); - } - - /* If we need to cancel this lock anyways because our request - * overlaps the granted lock, we grow up to its requested - * extent start instead of limiting this extent, assuming that - * clients are writing forwards and the lock had over grown - * its extent downwards before we enqueued our request. */ - if (l_extent->end > req_end) { - if (l_extent->start <= req_end) - new_ex->end = max(lock->l_req_extent.start - 1, - req_end); - else - new_ex->end = max(l_extent->start - 1, req_end); - } - } - - ldlm_extent_internal_policy_fixup(req, new_ex, conflicting); - EXIT; -} - - -/* In order to determine the largest possible extent we can grant, we need - * to scan all of the queues. */ -static void ldlm_extent_policy(struct ldlm_resource *res, - struct ldlm_lock *lock, int *flags) -{ - struct ldlm_extent new_ex = { .start = 0, .end = OBD_OBJECT_EOF }; - - if (lock->l_export == NULL) - /* - * this is local lock taken by server (e.g., as a part of - * OST-side locking, or unlink handling). Expansion doesn't - * make a lot of sense for local locks, because they are - * dropped immediately on operation completion and would only - * conflict with other threads. - */ - return; - - if (lock->l_policy_data.l_extent.start == 0 && - lock->l_policy_data.l_extent.end == OBD_OBJECT_EOF) - /* fast-path whole file locks */ - return; - - ldlm_extent_internal_policy_granted(lock, &new_ex); - ldlm_extent_internal_policy_waiting(lock, &new_ex); - - if (new_ex.start != lock->l_policy_data.l_extent.start || - new_ex.end != lock->l_policy_data.l_extent.end) { - *flags |= LDLM_FL_LOCK_CHANGED; - lock->l_policy_data.l_extent.start = new_ex.start; - lock->l_policy_data.l_extent.end = new_ex.end; - } -} - -static int ldlm_check_contention(struct ldlm_lock *lock, int contended_locks) -{ - struct ldlm_resource *res = lock->l_resource; - cfs_time_t now = cfs_time_current(); - - CDEBUG(D_DLMTRACE, "contended locks = %d\n", contended_locks); - if (contended_locks > res->lr_namespace->ns_contended_locks) - res->lr_contention_time = now; - return cfs_time_before(now, cfs_time_add(res->lr_contention_time, - cfs_time_seconds(res->lr_namespace->ns_contention_time))); -} - -struct ldlm_extent_compat_args { - struct list_head *work_list; - struct ldlm_lock *lock; - ldlm_mode_t mode; - int *locks; - int *compat; -}; - -static enum interval_iter ldlm_extent_compat_cb(struct interval_node *n, - void *data) -{ - struct ldlm_extent_compat_args *priv = data; - struct ldlm_interval *node = to_ldlm_interval(n); - struct ldlm_extent *extent; - struct list_head *work_list = priv->work_list; - struct ldlm_lock *lock, *enq = priv->lock; - ldlm_mode_t mode = priv->mode; - int count = 0; - ENTRY; - - LASSERT(!list_empty(&node->li_group)); - - list_for_each_entry(lock, &node->li_group, l_sl_policy) { - /* interval tree is for granted lock */ - LASSERTF(mode == lock->l_granted_mode, - "mode = %s, lock->l_granted_mode = %s\n", - ldlm_lockname[mode], - ldlm_lockname[lock->l_granted_mode]); - - count++; - if (lock->l_blocking_ast) - ldlm_add_ast_work_item(lock, enq, work_list); - } - LASSERT(count > 0); - - /* don't count conflicting glimpse locks */ - extent = ldlm_interval_extent(node); - if (!(mode == LCK_PR && - extent->start == 0 && extent->end == OBD_OBJECT_EOF)) - *priv->locks += count; - - if (priv->compat) - *priv->compat = 0; - - RETURN(INTERVAL_ITER_CONT); -} - -/* Determine if the lock is compatible with all locks on the queue. - * We stop walking the queue if we hit ourselves so we don't take - * conflicting locks enqueued after us into accound, or we'd wait forever. - * - * 0 if the lock is not compatible - * 1 if the lock is compatible - * 2 if this group lock is compatible and requires no further checking - * negative error, such as EWOULDBLOCK for group locks - */ -static int -ldlm_extent_compat_queue(struct list_head *queue, struct ldlm_lock *req, - int *flags, ldlm_error_t *err, - struct list_head *work_list, int *contended_locks) -{ - struct list_head *tmp; - struct ldlm_lock *lock; - struct ldlm_resource *res = req->l_resource; - ldlm_mode_t req_mode = req->l_req_mode; - __u64 req_start = req->l_req_extent.start; - __u64 req_end = req->l_req_extent.end; - int compat = 1; - int scan = 0; - int check_contention; - ENTRY; - - lockmode_verify(req_mode); - - /* Using interval tree for granted lock */ - if (queue == &res->lr_granted) { - struct ldlm_interval_tree *tree; - struct ldlm_extent_compat_args data = {.work_list = work_list, - .lock = req, - .locks = contended_locks, - .compat = &compat }; - struct interval_node_extent ex = { .start = req_start, - .end = req_end }; - int idx, rc; - - for (idx = 0; idx < LCK_MODE_NUM; idx++) { - tree = &res->lr_itree[idx]; - if (tree->lit_root == NULL) /* empty tree, skipped */ - continue; - - data.mode = tree->lit_mode; - if (lockmode_compat(req_mode, tree->lit_mode)) { - struct ldlm_interval *node; - struct ldlm_extent *extent; - - if (req_mode != LCK_GROUP) - continue; - - /* group lock, grant it immediately if - * compatible */ - node = to_ldlm_interval(tree->lit_root); - extent = ldlm_interval_extent(node); - if (req->l_policy_data.l_extent.gid == - extent->gid) - RETURN(2); - } - - if (tree->lit_mode == LCK_GROUP) { - if (*flags & LDLM_FL_BLOCK_NOWAIT) { - compat = -EWOULDBLOCK; - goto destroylock; - } - - *flags |= LDLM_FL_NO_TIMEOUT; - if (!work_list) - RETURN(0); - - /* if work list is not NULL,add all - locks in the tree to work list */ - compat = 0; - interval_iterate(tree->lit_root, - ldlm_extent_compat_cb, &data); - continue; - } - - if (!work_list) { - rc = interval_is_overlapped(tree->lit_root,&ex); - if (rc) - RETURN(0); - } else { - interval_search(tree->lit_root, &ex, - ldlm_extent_compat_cb, &data); - if (!list_empty(work_list) && compat) - compat = 0; - } - } - RETURN(compat); - } - - /* for waiting queue */ - list_for_each(tmp, queue) { - check_contention = 1; - - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (req == lock) - break; - - if (unlikely(scan)) { - /* We only get here if we are queuing GROUP lock - and met some incompatible one. The main idea of this - code is to insert GROUP lock past compatible GROUP - lock in the waiting queue or if there is not any, - then in front of first non-GROUP lock */ - if (lock->l_req_mode != LCK_GROUP) { - /* Ok, we hit non-GROUP lock, there should be no - more GROUP locks later on, queue in front of - first non-GROUP lock */ - - ldlm_resource_insert_lock_after(lock, req); - list_del_init(&lock->l_res_link); - ldlm_resource_insert_lock_after(req, lock); - compat = 0; - break; - } - if (req->l_policy_data.l_extent.gid == - lock->l_policy_data.l_extent.gid) { - /* found it */ - ldlm_resource_insert_lock_after(lock, req); - compat = 0; - break; - } - continue; - } - - /* locks are compatible, overlap doesn't matter */ - if (lockmode_compat(lock->l_req_mode, req_mode)) { - if (req_mode == LCK_PR && - ((lock->l_policy_data.l_extent.start <= - req->l_policy_data.l_extent.start) && - (lock->l_policy_data.l_extent.end >= - req->l_policy_data.l_extent.end))) { - /* If we met a PR lock just like us or wider, - and nobody down the list conflicted with - it, that means we can skip processing of - the rest of the list and safely place - ourselves at the end of the list, or grant - (dependent if we met an conflicting locks - before in the list). - In case of 1st enqueue only we continue - traversing if there is something conflicting - down the list because we need to make sure - that something is marked as AST_SENT as well, - in cse of empy worklist we would exit on - first conflict met. */ - /* There IS a case where such flag is - not set for a lock, yet it blocks - something. Luckily for us this is - only during destroy, so lock is - exclusive. So here we are safe */ - if (!(lock->l_flags & LDLM_FL_AST_SENT)) { - RETURN(compat); - } - } - - /* non-group locks are compatible, overlap doesn't - matter */ - if (likely(req_mode != LCK_GROUP)) - continue; - - /* If we are trying to get a GROUP lock and there is - another one of this kind, we need to compare gid */ - if (req->l_policy_data.l_extent.gid == - lock->l_policy_data.l_extent.gid) { - /* If existing lock with matched gid is granted, - we grant new one too. */ - if (lock->l_req_mode == lock->l_granted_mode) - RETURN(2); - - /* Otherwise we are scanning queue of waiting - * locks and it means current request would - * block along with existing lock (that is - * already blocked. - * If we are in nonblocking mode - return - * immediately */ - if (*flags & LDLM_FL_BLOCK_NOWAIT) { - compat = -EWOULDBLOCK; - goto destroylock; - } - /* If this group lock is compatible with another - * group lock on the waiting list, they must be - * together in the list, so they can be granted - * at the same time. Otherwise the later lock - * can get stuck behind another, incompatible, - * lock. */ - ldlm_resource_insert_lock_after(lock, req); - /* Because 'lock' is not granted, we can stop - * processing this queue and return immediately. - * There is no need to check the rest of the - * list. */ - RETURN(0); - } - } - - if (unlikely(req_mode == LCK_GROUP && - (lock->l_req_mode != lock->l_granted_mode))) { - scan = 1; - compat = 0; - if (lock->l_req_mode != LCK_GROUP) { - /* Ok, we hit non-GROUP lock, there should - * be no more GROUP locks later on, queue in - * front of first non-GROUP lock */ - - ldlm_resource_insert_lock_after(lock, req); - list_del_init(&lock->l_res_link); - ldlm_resource_insert_lock_after(req, lock); - break; - } - if (req->l_policy_data.l_extent.gid == - lock->l_policy_data.l_extent.gid) { - /* found it */ - ldlm_resource_insert_lock_after(lock, req); - break; - } - continue; - } - - if (unlikely(lock->l_req_mode == LCK_GROUP)) { - /* If compared lock is GROUP, then requested is PR/PW/ - * so this is not compatible; extent range does not - * matter */ - if (*flags & LDLM_FL_BLOCK_NOWAIT) { - compat = -EWOULDBLOCK; - goto destroylock; - } else { - *flags |= LDLM_FL_NO_TIMEOUT; - } - } else if (lock->l_policy_data.l_extent.end < req_start || - lock->l_policy_data.l_extent.start > req_end) { - /* if a non group lock doesn't overlap skip it */ - continue; - } else if (lock->l_req_extent.end < req_start || - lock->l_req_extent.start > req_end) - /* false contention, the requests doesn't really overlap */ - check_contention = 0; - - if (!work_list) - RETURN(0); - - /* don't count conflicting glimpse locks */ - if (lock->l_req_mode == LCK_PR && - lock->l_policy_data.l_extent.start == 0 && - lock->l_policy_data.l_extent.end == OBD_OBJECT_EOF) - check_contention = 0; - - *contended_locks += check_contention; - - compat = 0; - if (lock->l_blocking_ast) - ldlm_add_ast_work_item(lock, req, work_list); - } - - if (ldlm_check_contention(req, *contended_locks) && - compat == 0 && - (*flags & LDLM_FL_DENY_ON_CONTENTION) && - req->l_req_mode != LCK_GROUP && - req_end - req_start <= - req->l_resource->lr_namespace->ns_max_nolock_size) - GOTO(destroylock, compat = -EUSERS); - - RETURN(compat); -destroylock: - list_del_init(&req->l_res_link); - ldlm_lock_destroy_nolock(req); - *err = compat; - RETURN(compat); -} - -static void discard_bl_list(struct list_head *bl_list) -{ - struct list_head *tmp, *pos; - ENTRY; - - list_for_each_safe(pos, tmp, bl_list) { - struct ldlm_lock *lock = - list_entry(pos, struct ldlm_lock, l_bl_ast); - - list_del_init(&lock->l_bl_ast); - LASSERT(lock->l_flags & LDLM_FL_AST_SENT); - lock->l_flags &= ~LDLM_FL_AST_SENT; - LASSERT(lock->l_bl_ast_run == 0); - LASSERT(lock->l_blocking_lock); - LDLM_LOCK_PUT(lock->l_blocking_lock); - lock->l_blocking_lock = NULL; - LDLM_LOCK_PUT(lock); - } - EXIT; -} - -/* If first_enq is 0 (ie, called from ldlm_reprocess_queue): - * - blocking ASTs have already been sent - * - must call this function with the ns lock held - * - * If first_enq is 1 (ie, called from ldlm_lock_enqueue): - * - blocking ASTs have not been sent - * - must call this function with the ns lock held once */ -int ldlm_process_extent_lock(struct ldlm_lock *lock, int *flags, int first_enq, - ldlm_error_t *err, struct list_head *work_list) -{ - struct ldlm_resource *res = lock->l_resource; - struct list_head rpc_list = CFS_LIST_HEAD_INIT(rpc_list); - int rc, rc2; - int contended_locks = 0; - ENTRY; - - LASSERT(list_empty(&res->lr_converting)); - LASSERT(!(*flags & LDLM_FL_DENY_ON_CONTENTION) || - !(lock->l_flags & LDLM_AST_DISCARD_DATA)); - check_res_locked(res); - *err = ELDLM_OK; - - if (!first_enq) { - /* Careful observers will note that we don't handle -EWOULDBLOCK - * here, but it's ok for a non-obvious reason -- compat_queue - * can only return -EWOULDBLOCK if (flags & BLOCK_NOWAIT). - * flags should always be zero here, and if that ever stops - * being true, we want to find out. */ - LASSERT(*flags == 0); - rc = ldlm_extent_compat_queue(&res->lr_granted, lock, flags, - err, NULL, &contended_locks); - if (rc == 1) { - rc = ldlm_extent_compat_queue(&res->lr_waiting, lock, - flags, err, NULL, - &contended_locks); - } - if (rc == 0) - RETURN(LDLM_ITER_STOP); - - ldlm_resource_unlink_lock(lock); - - if (!OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_EVICT_RACE)) - ldlm_extent_policy(res, lock, flags); - ldlm_grant_lock(lock, work_list); - RETURN(LDLM_ITER_CONTINUE); - } - - restart: - contended_locks = 0; - rc = ldlm_extent_compat_queue(&res->lr_granted, lock, flags, err, - &rpc_list, &contended_locks); - if (rc < 0) - GOTO(out, rc); /* lock was destroyed */ - if (rc == 2) - goto grant; - - rc2 = ldlm_extent_compat_queue(&res->lr_waiting, lock, flags, err, - &rpc_list, &contended_locks); - if (rc2 < 0) - GOTO(out, rc = rc2); /* lock was destroyed */ - - if (rc + rc2 == 2) { - grant: - ldlm_extent_policy(res, lock, flags); - ldlm_resource_unlink_lock(lock); - ldlm_grant_lock(lock, NULL); - } else { - /* If either of the compat_queue()s returned failure, then we - * have ASTs to send and must go onto the waiting list. - * - * bug 2322: we used to unlink and re-add here, which was a - * terrible folly -- if we goto restart, we could get - * re-ordered! Causes deadlock, because ASTs aren't sent! */ - if (list_empty(&lock->l_res_link)) - ldlm_resource_add_lock(res, &res->lr_waiting, lock); - unlock_res(res); - rc = ldlm_run_bl_ast_work(&rpc_list); - lock_res(res); - - if (rc == -ERESTART) { - /* lock was granted while resource was unlocked. */ - if (lock->l_granted_mode == lock->l_req_mode) { - /* bug 11300: if the lock has been granted, - * break earlier because otherwise, we will go - * to restart and ldlm_resource_unlink will be - * called and it causes the interval node to be - * freed. Then we will fail at - * ldlm_extent_add_lock() */ - *flags &= ~(LDLM_FL_BLOCK_GRANTED | LDLM_FL_BLOCK_CONV | - LDLM_FL_BLOCK_WAIT); - GOTO(out, rc = 0); - } - - GOTO(restart, -ERESTART); - } - - *flags |= LDLM_FL_BLOCK_GRANTED; - /* this way we force client to wait for the lock - * endlessly once the lock is enqueued -bzzz */ - *flags |= LDLM_FL_NO_TIMEOUT; - - } - RETURN(0); -out: - if (!list_empty(&rpc_list)) { - LASSERT(!(lock->l_flags & LDLM_AST_DISCARD_DATA)); - discard_bl_list(&rpc_list); - } - RETURN(rc); -} - -/* When a lock is cancelled by a client, the KMS may undergo change if this - * is the "highest lock". This function returns the new KMS value. - * Caller must hold ns_lock already. - * - * NB: A lock on [x,y] protects a KMS of up to y + 1 bytes! */ -__u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms) -{ - struct ldlm_resource *res = lock->l_resource; - struct list_head *tmp; - struct ldlm_lock *lck; - __u64 kms = 0; - ENTRY; - - /* don't let another thread in ldlm_extent_shift_kms race in - * just after we finish and take our lock into account in its - * calculation of the kms */ - lock->l_flags |= LDLM_FL_KMS_IGNORE; - - list_for_each(tmp, &res->lr_granted) { - lck = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (lck->l_flags & LDLM_FL_KMS_IGNORE) - continue; - - if (lck->l_policy_data.l_extent.end >= old_kms) - RETURN(old_kms); - - /* This extent _has_ to be smaller than old_kms (checked above) - * so kms can only ever be smaller or the same as old_kms. */ - if (lck->l_policy_data.l_extent.end + 1 > kms) - kms = lck->l_policy_data.l_extent.end + 1; - } - LASSERTF(kms <= old_kms, "kms "LPU64" old_kms "LPU64"\n", kms, old_kms); - - RETURN(kms); -} - -cfs_mem_cache_t *ldlm_interval_slab; -struct ldlm_interval *ldlm_interval_alloc(struct ldlm_lock *lock) -{ - struct ldlm_interval *node; - ENTRY; - - LASSERT(lock->l_resource->lr_type == LDLM_EXTENT); - OBD_SLAB_ALLOC(node, ldlm_interval_slab, CFS_ALLOC_IO, sizeof(*node)); - if (node == NULL) - RETURN(NULL); - - CFS_INIT_LIST_HEAD(&node->li_group); - ldlm_interval_attach(node, lock); - RETURN(node); -} - -void ldlm_interval_free(struct ldlm_interval *node) -{ - if (node) { - LASSERT(list_empty(&node->li_group)); - OBD_SLAB_FREE(node, ldlm_interval_slab, sizeof(*node)); - } -} - -/* interval tree, for LDLM_EXTENT. */ -void ldlm_interval_attach(struct ldlm_interval *n, - struct ldlm_lock *l) -{ - LASSERT(l->l_tree_node == NULL); - LASSERT(l->l_resource->lr_type == LDLM_EXTENT); - - list_add_tail(&l->l_sl_policy, &n->li_group); - l->l_tree_node = n; -} - -struct ldlm_interval *ldlm_interval_detach(struct ldlm_lock *l) -{ - struct ldlm_interval *n = l->l_tree_node; - - if (n == NULL) - return NULL; - - LASSERT(!list_empty(&n->li_group)); - l->l_tree_node = NULL; - list_del_init(&l->l_sl_policy); - - return (list_empty(&n->li_group) ? n : NULL); -} - -static inline int lock_mode_to_index(ldlm_mode_t mode) -{ - int index; - - LASSERT(mode != 0); - LASSERT(IS_PO2(mode)); - for (index = -1; mode; index++, mode >>= 1) ; - LASSERT(index < LCK_MODE_NUM); - return index; -} - -void ldlm_extent_add_lock(struct ldlm_resource *res, - struct ldlm_lock *lock) -{ - struct interval_node *found, **root; - struct ldlm_interval *node; - struct ldlm_extent *extent; - int idx; - - LASSERT(lock->l_granted_mode == lock->l_req_mode); - - node = lock->l_tree_node; - LASSERT(node != NULL); - - idx = lock_mode_to_index(lock->l_granted_mode); - LASSERT(lock->l_granted_mode == 1 << idx); - LASSERT(lock->l_granted_mode == res->lr_itree[idx].lit_mode); - - /* node extent initialize */ - extent = &lock->l_policy_data.l_extent; - interval_set(&node->li_node, extent->start, extent->end); - - root = &res->lr_itree[idx].lit_root; - found = interval_insert(&node->li_node, root); - if (found) { /* The policy group found. */ - struct ldlm_interval *tmp = ldlm_interval_detach(lock); - LASSERT(tmp != NULL); - ldlm_interval_free(tmp); - ldlm_interval_attach(to_ldlm_interval(found), lock); - } - res->lr_itree[idx].lit_size++; - - /* even though we use interval tree to manage the extent lock, we also - * add the locks into grant list, for debug purpose, .. */ - ldlm_resource_add_lock(res, &res->lr_granted, lock); -} - -void ldlm_extent_unlink_lock(struct ldlm_lock *lock) -{ - struct ldlm_resource *res = lock->l_resource; - struct ldlm_interval *node; - struct ldlm_interval_tree *tree; - int idx; - - if (lock->l_granted_mode != lock->l_req_mode) - return; - - LASSERT(lock->l_tree_node != NULL); - idx = lock_mode_to_index(lock->l_granted_mode); - LASSERT(lock->l_granted_mode == 1 << idx); - tree = &res->lr_itree[idx]; - - LASSERT(tree->lit_root != NULL); /* assure the tree is not null */ - - tree->lit_size--; - node = ldlm_interval_detach(lock); - if (node) { - interval_erase(&node->li_node, &tree->lit_root); - ldlm_interval_free(node); - } -} diff --git a/lustre/ldlm/ldlm_flock.c b/lustre/ldlm/ldlm_flock.c deleted file mode 100644 index bd92a84d8b..0000000000 --- a/lustre/ldlm/ldlm_flock.c +++ /dev/null @@ -1,579 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2003 Hewlett-Packard Development Company LP. - * Developed under the sponsorship of the US Government under - * Subcontract No. B514193 - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_LDLM - -#ifdef __KERNEL__ -#include <lustre_dlm.h> -#include <obd_support.h> -#include <obd_class.h> -#include <lustre_lib.h> -#include <libcfs/list.h> -#else -#include <liblustre.h> -#include <obd_class.h> -#endif - -#include "ldlm_internal.h" - -#define l_flock_waitq l_lru - -static struct list_head ldlm_flock_waitq = CFS_LIST_HEAD_INIT(ldlm_flock_waitq); - -int ldlm_flock_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, - void *data, int flag); - -/** - * list_for_remaining_safe - iterate over the remaining entries in a list - * and safeguard against removal of a list entry. - * @pos: the &struct list_head to use as a loop counter. pos MUST - * have been initialized prior to using it in this macro. - * @n: another &struct list_head to use as temporary storage - * @head: the head for your list. - */ -#define list_for_remaining_safe(pos, n, head) \ - for (n = pos->next; pos != (head); pos = n, n = pos->next) - -static inline int -ldlm_same_flock_owner(struct ldlm_lock *lock, struct ldlm_lock *new) -{ - return((new->l_policy_data.l_flock.pid == - lock->l_policy_data.l_flock.pid) && - (new->l_export == lock->l_export)); -} - -static inline int -ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new) -{ - return((new->l_policy_data.l_flock.start <= - lock->l_policy_data.l_flock.end) && - (new->l_policy_data.l_flock.end >= - lock->l_policy_data.l_flock.start)); -} - -static inline void -ldlm_flock_destroy(struct ldlm_lock *lock, ldlm_mode_t mode, int flags) -{ - ENTRY; - - LDLM_DEBUG(lock, "ldlm_flock_destroy(mode: %d, flags: 0x%x)", - mode, flags); - - LASSERT(list_empty(&lock->l_flock_waitq)); - - list_del_init(&lock->l_res_link); - if (flags == LDLM_FL_WAIT_NOREPROC) { - /* client side - set a flag to prevent sending a CANCEL */ - lock->l_flags |= LDLM_FL_LOCAL_ONLY | LDLM_FL_CBPENDING; - - /* when reaching here, it is under lock_res_and_lock(). Thus, - need call the nolock version of ldlm_lock_decref_internal*/ - ldlm_lock_decref_internal_nolock(lock, mode); - } - - ldlm_lock_destroy_nolock(lock); - EXIT; -} - -static int -ldlm_flock_deadlock(struct ldlm_lock *req, struct ldlm_lock *blocking_lock) -{ - struct obd_export *req_export = req->l_export; - struct obd_export *blocking_export = blocking_lock->l_export; - pid_t req_pid = req->l_policy_data.l_flock.pid; - pid_t blocking_pid = blocking_lock->l_policy_data.l_flock.pid; - struct ldlm_lock *lock; - -restart: - list_for_each_entry(lock, &ldlm_flock_waitq, l_flock_waitq) { - if ((lock->l_policy_data.l_flock.pid != blocking_pid) || - (lock->l_export != blocking_export)) - continue; - - blocking_pid = lock->l_policy_data.l_flock.blocking_pid; - blocking_export = (struct obd_export *)(long) - lock->l_policy_data.l_flock.blocking_export; - if (blocking_pid == req_pid && blocking_export == req_export) - return 1; - - goto restart; - } - - return 0; -} - -int -ldlm_process_flock_lock(struct ldlm_lock *req, int *flags, int first_enq, - ldlm_error_t *err, struct list_head *work_list) -{ - struct ldlm_resource *res = req->l_resource; - struct ldlm_namespace *ns = res->lr_namespace; - struct list_head *tmp; - struct list_head *ownlocks = NULL; - struct ldlm_lock *lock = NULL; - struct ldlm_lock *new = req; - struct ldlm_lock *new2 = NULL; - ldlm_mode_t mode = req->l_req_mode; - int local = ns_is_client(ns); - int added = (mode == LCK_NL); - int overlaps = 0; - int splitted = 0; - ENTRY; - - CDEBUG(D_DLMTRACE, "flags %#x pid %u mode %u start "LPU64" end "LPU64 - "\n", *flags, new->l_policy_data.l_flock.pid, mode, - req->l_policy_data.l_flock.start, - req->l_policy_data.l_flock.end); - - *err = ELDLM_OK; - - if (local) { - /* No blocking ASTs are sent to the clients for - * Posix file & record locks */ - req->l_blocking_ast = NULL; - } else { - /* Called on the server for lock cancels. */ - req->l_blocking_ast = ldlm_flock_blocking_ast; - } - -reprocess: - if ((*flags == LDLM_FL_WAIT_NOREPROC) || (mode == LCK_NL)) { - /* This loop determines where this processes locks start - * in the resource lr_granted list. */ - list_for_each(tmp, &res->lr_granted) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - if (ldlm_same_flock_owner(lock, req)) { - ownlocks = tmp; - break; - } - } - } else { - lockmode_verify(mode); - - /* This loop determines if there are existing locks - * that conflict with the new lock request. */ - list_for_each(tmp, &res->lr_granted) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (ldlm_same_flock_owner(lock, req)) { - if (!ownlocks) - ownlocks = tmp; - continue; - } - - /* locks are compatible, overlap doesn't matter */ - if (lockmode_compat(lock->l_granted_mode, mode)) - continue; - - if (!ldlm_flocks_overlap(lock, req)) - continue; - - if (!first_enq) - RETURN(LDLM_ITER_CONTINUE); - - if (*flags & LDLM_FL_BLOCK_NOWAIT) { - ldlm_flock_destroy(req, mode, *flags); - *err = -EAGAIN; - RETURN(LDLM_ITER_STOP); - } - - if (*flags & LDLM_FL_TEST_LOCK) { - ldlm_flock_destroy(req, mode, *flags); - req->l_req_mode = lock->l_granted_mode; - req->l_policy_data.l_flock.pid = - lock->l_policy_data.l_flock.pid; - req->l_policy_data.l_flock.start = - lock->l_policy_data.l_flock.start; - req->l_policy_data.l_flock.end = - lock->l_policy_data.l_flock.end; - *flags |= LDLM_FL_LOCK_CHANGED; - RETURN(LDLM_ITER_STOP); - } - - if (ldlm_flock_deadlock(req, lock)) { - ldlm_flock_destroy(req, mode, *flags); - *err = -EDEADLK; - RETURN(LDLM_ITER_STOP); - } - - req->l_policy_data.l_flock.blocking_pid = - lock->l_policy_data.l_flock.pid; - req->l_policy_data.l_flock.blocking_export = - (long)(void *)lock->l_export; - - LASSERT(list_empty(&req->l_flock_waitq)); - list_add_tail(&req->l_flock_waitq, &ldlm_flock_waitq); - - ldlm_resource_add_lock(res, &res->lr_waiting, req); - *flags |= LDLM_FL_BLOCK_GRANTED; - RETURN(LDLM_ITER_STOP); - } - } - - if (*flags & LDLM_FL_TEST_LOCK) { - ldlm_flock_destroy(req, mode, *flags); - req->l_req_mode = LCK_NL; - *flags |= LDLM_FL_LOCK_CHANGED; - RETURN(LDLM_ITER_STOP); - } - - /* In case we had slept on this lock request take it off of the - * deadlock detection waitq. */ - list_del_init(&req->l_flock_waitq); - - /* Scan the locks owned by this process that overlap this request. - * We may have to merge or split existing locks. */ - - if (!ownlocks) - ownlocks = &res->lr_granted; - - list_for_remaining_safe(ownlocks, tmp, &res->lr_granted) { - lock = list_entry(ownlocks, struct ldlm_lock, l_res_link); - - if (!ldlm_same_flock_owner(lock, new)) - break; - - if (lock->l_granted_mode == mode) { - /* If the modes are the same then we need to process - * locks that overlap OR adjoin the new lock. The extra - * logic condition is necessary to deal with arithmetic - * overflow and underflow. */ - if ((new->l_policy_data.l_flock.start > - (lock->l_policy_data.l_flock.end + 1)) - && (lock->l_policy_data.l_flock.end != - OBD_OBJECT_EOF)) - continue; - - if ((new->l_policy_data.l_flock.end < - (lock->l_policy_data.l_flock.start - 1)) - && (lock->l_policy_data.l_flock.start != 0)) - break; - - if (new->l_policy_data.l_flock.start < - lock->l_policy_data.l_flock.start) { - lock->l_policy_data.l_flock.start = - new->l_policy_data.l_flock.start; - } else { - new->l_policy_data.l_flock.start = - lock->l_policy_data.l_flock.start; - } - - if (new->l_policy_data.l_flock.end > - lock->l_policy_data.l_flock.end) { - lock->l_policy_data.l_flock.end = - new->l_policy_data.l_flock.end; - } else { - new->l_policy_data.l_flock.end = - lock->l_policy_data.l_flock.end; - } - - if (added) { - ldlm_flock_destroy(lock, mode, *flags); - } else { - new = lock; - added = 1; - } - continue; - } - - if (new->l_policy_data.l_flock.start > - lock->l_policy_data.l_flock.end) - continue; - - if (new->l_policy_data.l_flock.end < - lock->l_policy_data.l_flock.start) - break; - - ++overlaps; - - if (new->l_policy_data.l_flock.start <= - lock->l_policy_data.l_flock.start) { - if (new->l_policy_data.l_flock.end < - lock->l_policy_data.l_flock.end) { - lock->l_policy_data.l_flock.start = - new->l_policy_data.l_flock.end + 1; - break; - } - ldlm_flock_destroy(lock, lock->l_req_mode, *flags); - continue; - } - if (new->l_policy_data.l_flock.end >= - lock->l_policy_data.l_flock.end) { - lock->l_policy_data.l_flock.end = - new->l_policy_data.l_flock.start - 1; - continue; - } - - /* split the existing lock into two locks */ - - /* if this is an F_UNLCK operation then we could avoid - * allocating a new lock and use the req lock passed in - * with the request but this would complicate the reply - * processing since updates to req get reflected in the - * reply. The client side replays the lock request so - * it must see the original lock data in the reply. */ - - /* XXX - if ldlm_lock_new() can sleep we should - * release the ns_lock, allocate the new lock, - * and restart processing this lock. */ - if (!new2) { - unlock_res_and_lock(req); - new2 = ldlm_lock_create(ns, res->lr_name, LDLM_FLOCK, - lock->l_granted_mode, NULL, NULL, NULL, - NULL, 0); - lock_res_and_lock(req); - if (!new2) { - ldlm_flock_destroy(req, lock->l_granted_mode, *flags); - *err = -ENOLCK; - RETURN(LDLM_ITER_STOP); - } - goto reprocess; - } - - splitted = 1; - - new2->l_granted_mode = lock->l_granted_mode; - new2->l_policy_data.l_flock.pid = - new->l_policy_data.l_flock.pid; - new2->l_policy_data.l_flock.start = - lock->l_policy_data.l_flock.start; - new2->l_policy_data.l_flock.end = - new->l_policy_data.l_flock.start - 1; - lock->l_policy_data.l_flock.start = - new->l_policy_data.l_flock.end + 1; - new2->l_conn_export = lock->l_conn_export; - if (lock->l_export != NULL) { - new2->l_export = class_export_get(lock->l_export); - spin_lock(&new2->l_export->exp_ldlm_data.led_lock); - list_add(&new2->l_export_chain, - &new2->l_export->exp_ldlm_data.led_held_locks); - spin_unlock(&new2->l_export->exp_ldlm_data.led_lock); - } - if (*flags == LDLM_FL_WAIT_NOREPROC) { - ldlm_lock_addref_internal_nolock(new2, lock->l_granted_mode); - } - - /* insert new2 at lock */ - ldlm_resource_add_lock(res, ownlocks, new2); - LDLM_LOCK_PUT(new2); - break; - } - - /* if new2 is created but never used, destroy it*/ - if (splitted == 0 && new2 != NULL) - ldlm_lock_destroy_nolock(new2); - - /* At this point we're granting the lock request. */ - req->l_granted_mode = req->l_req_mode; - - /* Add req to the granted queue before calling ldlm_reprocess_all(). */ - if (!added) { - list_del_init(&req->l_res_link); - /* insert new lock before ownlocks in list. */ - ldlm_resource_add_lock(res, ownlocks, req); - } - - if (*flags != LDLM_FL_WAIT_NOREPROC) { - if (first_enq) { - /* If this is an unlock, reprocess the waitq and - * send completions ASTs for locks that can now be - * granted. The only problem with doing this - * reprocessing here is that the completion ASTs for - * newly granted locks will be sent before the unlock - * completion is sent. It shouldn't be an issue. Also - * note that ldlm_process_flock_lock() will recurse, - * but only once because first_enq will be false from - * ldlm_reprocess_queue. */ - if ((mode == LCK_NL) && overlaps) { - struct list_head rpc_list - = CFS_LIST_HEAD_INIT(rpc_list); - int rc; -restart: - ldlm_reprocess_queue(res, &res->lr_waiting, - &rpc_list); - - unlock_res_and_lock(req); - rc = ldlm_run_cp_ast_work(&rpc_list); - lock_res_and_lock(req); - if (rc == -ERESTART) - GOTO(restart, -ERESTART); - } - } else { - LASSERT(req->l_completion_ast); - ldlm_add_ast_work_item(req, NULL, work_list); - } - } - - /* In case we're reprocessing the requested lock we can't destroy - * it until after calling ldlm_ast_work_item() above so that lawi() - * can bump the reference count on req. Otherwise req could be freed - * before the completion AST can be sent. */ - if (added) - ldlm_flock_destroy(req, mode, *flags); - - ldlm_resource_dump(D_OTHER, res); - RETURN(LDLM_ITER_CONTINUE); -} - -struct ldlm_flock_wait_data { - struct ldlm_lock *fwd_lock; - int fwd_generation; -}; - -static void -ldlm_flock_interrupted_wait(void *data) -{ - struct ldlm_lock *lock; - struct lustre_handle lockh; - int rc; - ENTRY; - - lock = ((struct ldlm_flock_wait_data *)data)->fwd_lock; - - /* take lock off the deadlock detection waitq. */ - list_del_init(&lock->l_flock_waitq); - - /* client side - set flag to prevent lock from being put on lru list */ - lock->l_flags |= LDLM_FL_CBPENDING; - - ldlm_lock_decref_internal(lock, lock->l_req_mode); - ldlm_lock2handle(lock, &lockh); - rc = ldlm_cli_cancel(&lockh); - if (rc != ELDLM_OK) - CERROR("ldlm_cli_cancel: %d\n", rc); - - EXIT; -} - -int -ldlm_flock_completion_ast(struct ldlm_lock *lock, int flags, void *data) -{ - struct ldlm_namespace *ns; - cfs_flock_t *getlk = lock->l_ast_data; - struct ldlm_flock_wait_data fwd; - struct obd_device *obd; - struct obd_import *imp = NULL; - ldlm_error_t err; - int rc = 0; - struct l_wait_info lwi; - ENTRY; - - CDEBUG(D_DLMTRACE, "flags: 0x%x data: %p getlk: %p\n", - flags, data, getlk); - - LASSERT(flags != LDLM_FL_WAIT_NOREPROC); - - if (!(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED | - LDLM_FL_BLOCK_CONV))) - goto granted; - - LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, " - "sleeping"); - - fwd.fwd_lock = lock; - obd = class_exp2obd(lock->l_conn_export); - - /* if this is a local lock, then there is no import */ - if (obd != NULL) - imp = obd->u.cli.cl_import; - - if (imp != NULL) { - spin_lock(&imp->imp_lock); - fwd.fwd_generation = imp->imp_generation; - spin_unlock(&imp->imp_lock); - } - - lwi = LWI_TIMEOUT_INTR(0, NULL, ldlm_flock_interrupted_wait, &fwd); - - /* Go to sleep until the lock is granted. */ - rc = l_wait_event(lock->l_waitq, - ((lock->l_req_mode == lock->l_granted_mode) || - lock->l_destroyed), &lwi); - - LDLM_DEBUG(lock, "client-side enqueue waking up: rc = %d", rc); - RETURN(rc); - -granted: - - LDLM_DEBUG(lock, "client-side enqueue granted"); - ns = lock->l_resource->lr_namespace; - lock_res_and_lock(lock); - - /* take lock off the deadlock detection waitq. */ - list_del_init(&lock->l_flock_waitq); - - /* ldlm_lock_enqueue() has already placed lock on the granted list. */ - list_del_init(&lock->l_res_link); - - if (flags & LDLM_FL_TEST_LOCK) { - /* fcntl(F_GETLK) request */ - /* The old mode was saved in getlk->fl_type so that if the mode - * in the lock changes we can decref the approprate refcount. */ - ldlm_flock_destroy(lock, cfs_flock_type(getlk), LDLM_FL_WAIT_NOREPROC); - switch (lock->l_granted_mode) { - case LCK_PR: - cfs_flock_set_type(getlk, F_RDLCK); - break; - case LCK_PW: - cfs_flock_set_type(getlk, F_WRLCK); - break; - default: - cfs_flock_set_type(getlk, F_UNLCK); - } - cfs_flock_set_pid(getlk, (pid_t)lock->l_policy_data.l_flock.pid); - cfs_flock_set_start(getlk, (loff_t)lock->l_policy_data.l_flock.start); - cfs_flock_set_end(getlk, (loff_t)lock->l_policy_data.l_flock.end); - } else { - int noreproc = LDLM_FL_WAIT_NOREPROC; - - /* We need to reprocess the lock to do merges or splits - * with existing locks owned by this process. */ - ldlm_process_flock_lock(lock, &noreproc, 1, &err, NULL); - if (flags == 0) - cfs_waitq_signal(&lock->l_waitq); - } - unlock_res_and_lock(lock); - RETURN(0); -} -EXPORT_SYMBOL(ldlm_flock_completion_ast); - -int ldlm_flock_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, - void *data, int flag) -{ - struct ldlm_namespace *ns; - ENTRY; - - LASSERT(lock); - LASSERT(flag == LDLM_CB_CANCELING); - - ns = lock->l_resource->lr_namespace; - - /* take lock off the deadlock detection waitq. */ - lock_res_and_lock(lock); - list_del_init(&lock->l_flock_waitq); - unlock_res_and_lock(lock); - RETURN(0); -} diff --git a/lustre/ldlm/ldlm_inodebits.c b/lustre/ldlm/ldlm_inodebits.c deleted file mode 100644 index c378c28ff5..0000000000 --- a/lustre/ldlm/ldlm_inodebits.c +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2002, 2003, 2004 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LDLM -#ifndef __KERNEL__ -# include <liblustre.h> -#endif - -#include <lustre_dlm.h> -#include <obd_support.h> -#include <lustre_lib.h> - -#include "ldlm_internal.h" - -/* Determine if the lock is compatible with all locks on the queue. */ -static int -ldlm_inodebits_compat_queue(struct list_head *queue, struct ldlm_lock *req, - struct list_head *work_list) -{ - struct list_head *tmp, *tmp_tail; - struct ldlm_lock *lock; - ldlm_mode_t req_mode = req->l_req_mode; - __u64 req_bits = req->l_policy_data.l_inodebits.bits; - int compat = 1; - ENTRY; - - LASSERT(req_bits); /* There is no sense in lock with no bits set, - I think. Also such a lock would be compatible - with any other bit lock */ - list_for_each(tmp, queue) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (req == lock) - RETURN(compat); - - /* locks are compatible, bits don't matter */ - if (lockmode_compat(lock->l_req_mode, req_mode)) { - /* jump to next mode group */ - if (LDLM_SL_HEAD(&lock->l_sl_mode)) - tmp = &list_entry(lock->l_sl_mode.next, - struct ldlm_lock, - l_sl_mode)->l_res_link; - continue; - } - - tmp_tail = tmp; - if (LDLM_SL_HEAD(&lock->l_sl_mode)) - tmp_tail = &list_entry(lock->l_sl_mode.next, - struct ldlm_lock, - l_sl_mode)->l_res_link; - for (;;) { - /* locks with bits overlapped are conflicting locks */ - if (lock->l_policy_data.l_inodebits.bits & req_bits) { - /* conflicting policy */ - if (!work_list) - RETURN(0); - - compat = 0; - if (lock->l_blocking_ast) - ldlm_add_ast_work_item(lock, req, - work_list); - /* add all members of the policy group */ - if (LDLM_SL_HEAD(&lock->l_sl_policy)) { - do { - tmp = lock->l_res_link.next; - lock = list_entry(tmp, - struct ldlm_lock, - l_res_link); - if (lock->l_blocking_ast) - ldlm_add_ast_work_item( - lock, - req, - work_list); - } while (!LDLM_SL_TAIL(&lock->l_sl_policy)); - } - } else if (LDLM_SL_HEAD(&lock->l_sl_policy)) { - /* jump to next policy group */ - tmp = &list_entry(lock->l_sl_policy.next, - struct ldlm_lock, - l_sl_policy)->l_res_link; - } - if (tmp == tmp_tail) - break; - else - tmp = tmp->next; - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - } /* for locks in a mode group */ - } /* for each lock in the queue */ - - RETURN(compat); -} - -/* If first_enq is 0 (ie, called from ldlm_reprocess_queue): - * - blocking ASTs have already been sent - * - must call this function with the ns lock held - * - * If first_enq is 1 (ie, called from ldlm_lock_enqueue): - * - blocking ASTs have not been sent - * - must call this function with the ns lock held once */ -int ldlm_process_inodebits_lock(struct ldlm_lock *lock, int *flags, - int first_enq, ldlm_error_t *err, - struct list_head *work_list) -{ - struct ldlm_resource *res = lock->l_resource; - struct list_head rpc_list = CFS_LIST_HEAD_INIT(rpc_list); - int rc; - ENTRY; - - LASSERT(list_empty(&res->lr_converting)); - check_res_locked(res); - - if (!first_enq) { - LASSERT(work_list != NULL); - rc = ldlm_inodebits_compat_queue(&res->lr_granted, lock, NULL); - if (!rc) - RETURN(LDLM_ITER_STOP); - rc = ldlm_inodebits_compat_queue(&res->lr_waiting, lock, NULL); - if (!rc) - RETURN(LDLM_ITER_STOP); - - ldlm_resource_unlink_lock(lock); - ldlm_grant_lock(lock, work_list); - RETURN(LDLM_ITER_CONTINUE); - } - - restart: - rc = ldlm_inodebits_compat_queue(&res->lr_granted, lock, &rpc_list); - rc += ldlm_inodebits_compat_queue(&res->lr_waiting, lock, &rpc_list); - - if (rc != 2) { - /* If either of the compat_queue()s returned 0, then we - * have ASTs to send and must go onto the waiting list. - * - * bug 2322: we used to unlink and re-add here, which was a - * terrible folly -- if we goto restart, we could get - * re-ordered! Causes deadlock, because ASTs aren't sent! */ - if (list_empty(&lock->l_res_link)) - ldlm_resource_add_lock(res, &res->lr_waiting, lock); - unlock_res(res); - rc = ldlm_run_bl_ast_work(&rpc_list); - lock_res(res); - if (rc == -ERESTART) - GOTO(restart, -ERESTART); - *flags |= LDLM_FL_BLOCK_GRANTED; - } else { - ldlm_resource_unlink_lock(lock); - ldlm_grant_lock(lock, NULL); - } - RETURN(0); -} diff --git a/lustre/ldlm/ldlm_internal.h b/lustre/ldlm/ldlm_internal.h deleted file mode 100644 index 1e8cf31a48..0000000000 --- a/lustre/ldlm/ldlm_internal.h +++ /dev/null @@ -1,204 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#define MAX_STRING_SIZE 128 - -extern atomic_t ldlm_srv_namespace_nr; -extern atomic_t ldlm_cli_namespace_nr; -extern struct semaphore ldlm_srv_namespace_lock; -extern struct list_head ldlm_srv_namespace_list; -extern struct semaphore ldlm_cli_namespace_lock; -extern struct list_head ldlm_cli_namespace_list; - -static inline atomic_t *ldlm_namespace_nr(ldlm_side_t client) -{ - return client == LDLM_NAMESPACE_SERVER ? - &ldlm_srv_namespace_nr : &ldlm_cli_namespace_nr; -} - -static inline struct list_head *ldlm_namespace_list(ldlm_side_t client) -{ - return client == LDLM_NAMESPACE_SERVER ? - &ldlm_srv_namespace_list : &ldlm_cli_namespace_list; -} - -static inline struct semaphore *ldlm_namespace_lock(ldlm_side_t client) -{ - return client == LDLM_NAMESPACE_SERVER ? - &ldlm_srv_namespace_lock : &ldlm_cli_namespace_lock; -} - -/* ldlm_request.c */ -typedef enum { - LDLM_ASYNC, - LDLM_SYNC, -} ldlm_sync_t; - -/* Cancel lru flag, it indicates we cancel aged locks. */ -enum { - LDLM_CANCEL_AGED = 1 << 0, /* Cancel aged locks (non lru resize). */ - LDLM_CANCEL_PASSED = 1 << 1, /* Cancel passed number of locks. */ - LDLM_CANCEL_SHRINK = 1 << 2, /* Cancel locks from shrinker. */ - LDLM_CANCEL_LRUR = 1 << 3 /* Cancel locks from lru resize. */ -}; - -int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, ldlm_sync_t sync, - int flags); -int ldlm_cancel_lru_local(struct ldlm_namespace *ns, struct list_head *cancels, - int count, int max, int cancel_flags, int flags); -int ldlm_cancel_lru_estimate(struct ldlm_namespace *ns, int count, int max, - int flags); -extern int ldlm_enqueue_min; -int ldlm_get_enq_timeout(struct ldlm_lock *lock); - -/* ldlm_resource.c */ -int ldlm_resource_putref_locked(struct ldlm_resource *res); -void ldlm_resource_insert_lock_after(struct ldlm_lock *original, - struct ldlm_lock *new); -int ldlm_namespace_free_prior(struct ldlm_namespace *ns); -int ldlm_namespace_free_post(struct ldlm_namespace *ns, int force); - -/* ldlm_lock.c */ - -/* Number of blocking/completion callbacks that will be sent in - * parallel (see bug 11301). */ -#define PARALLEL_AST_LIMIT 200 - -struct ldlm_cb_set_arg { - struct ptlrpc_request_set *set; - atomic_t restart; - __u32 type; /* LDLM_BL_CALLBACK or LDLM_CP_CALLBACK */ -}; - -void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list); -struct ldlm_lock * -ldlm_lock_create(struct ldlm_namespace *ns, struct ldlm_res_id, - ldlm_type_t type, ldlm_mode_t, ldlm_blocking_callback, - ldlm_completion_callback, ldlm_glimpse_callback, void *data, - __u32 lvb_len); -ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **, - void *cookie, int *flags); -void ldlm_lock_addref_internal(struct ldlm_lock *, __u32 mode); -void ldlm_lock_addref_internal_nolock(struct ldlm_lock *, __u32 mode); -void ldlm_lock_decref_internal(struct ldlm_lock *, __u32 mode); -void ldlm_lock_decref_internal_nolock(struct ldlm_lock *, __u32 mode); -void ldlm_add_ast_work_item(struct ldlm_lock *lock, struct ldlm_lock *new, - struct list_head *work_list); -int ldlm_reprocess_queue(struct ldlm_resource *res, struct list_head *queue, - struct list_head *work_list); -int ldlm_run_bl_ast_work(struct list_head *rpc_list); -int ldlm_run_cp_ast_work(struct list_head *rpc_list); -int ldlm_lock_remove_from_lru(struct ldlm_lock *lock); -int ldlm_lock_remove_from_lru_nolock(struct ldlm_lock *lock); -void ldlm_lock_add_to_lru_nolock(struct ldlm_lock *lock); -void ldlm_lock_add_to_lru(struct ldlm_lock *lock); -void ldlm_lock_touch_in_lru(struct ldlm_lock *lock); -void ldlm_lock_destroy_nolock(struct ldlm_lock *lock); - -/* ldlm_lockd.c */ -int ldlm_bl_to_thread_lock(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld, - struct ldlm_lock *lock); -int ldlm_bl_to_thread_list(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld, - struct list_head *cancels, int count); - -void ldlm_handle_bl_callback(struct ldlm_namespace *ns, - struct ldlm_lock_desc *ld, struct ldlm_lock *lock); - -/* ldlm_plain.c */ -int ldlm_process_plain_lock(struct ldlm_lock *lock, int *flags, int first_enq, - ldlm_error_t *err, struct list_head *work_list); - -/* ldlm_extent.c */ -int ldlm_process_extent_lock(struct ldlm_lock *lock, int *flags, int first_enq, - ldlm_error_t *err, struct list_head *work_list); -void ldlm_extent_add_lock(struct ldlm_resource *res, struct ldlm_lock *lock); -void ldlm_extent_unlink_lock(struct ldlm_lock *lock); - -/* ldlm_flock.c */ -int ldlm_process_flock_lock(struct ldlm_lock *req, int *flags, int first_enq, - ldlm_error_t *err, struct list_head *work_list); - -/* ldlm_inodebits.c */ -int ldlm_process_inodebits_lock(struct ldlm_lock *lock, int *flags, - int first_enq, ldlm_error_t *err, - struct list_head *work_list); - -/* l_lock.c */ -void l_check_ns_lock(struct ldlm_namespace *ns); -void l_check_no_ns_lock(struct ldlm_namespace *ns); - -extern cfs_proc_dir_entry_t *ldlm_svc_proc_dir; -extern cfs_proc_dir_entry_t *ldlm_type_proc_dir; - -struct ldlm_state { - struct ptlrpc_service *ldlm_cb_service; - struct ptlrpc_service *ldlm_cancel_service; - struct ptlrpc_client *ldlm_client; - struct ptlrpc_connection *ldlm_server_conn; - struct ldlm_bl_pool *ldlm_bl_pool; -}; - -/* interval tree, for LDLM_EXTENT. */ -extern cfs_mem_cache_t *ldlm_interval_slab; /* slab cache for ldlm_interval */ -extern void ldlm_interval_attach(struct ldlm_interval *n, struct ldlm_lock *l); -extern struct ldlm_interval *ldlm_interval_detach(struct ldlm_lock *l); -extern struct ldlm_interval *ldlm_interval_alloc(struct ldlm_lock *lock); -extern void ldlm_interval_free(struct ldlm_interval *node); -/* this function must be called with res lock held */ -static inline struct ldlm_extent * -ldlm_interval_extent(struct ldlm_interval *node) -{ - struct ldlm_lock *lock; - LASSERT(!list_empty(&node->li_group)); - - lock = list_entry(node->li_group.next, struct ldlm_lock, l_sl_policy); - return &lock->l_policy_data.l_extent; -} - -int ldlm_init(void); -void ldlm_exit(void); - -enum ldlm_policy_res { - LDLM_POLICY_CANCEL_LOCK, - LDLM_POLICY_KEEP_LOCK -}; - -typedef enum ldlm_policy_res ldlm_policy_res_t; - -#define LDLM_POOL_PROC_READER(var, type) \ - static int lprocfs_rd_##var(char *page, char **start, off_t off, \ - int count, int *eof, void *data) \ - { \ - struct ldlm_pool *pl = data; \ - type tmp; \ - \ - spin_lock(&pl->pl_lock); \ - tmp = pl->pl_##var; \ - spin_unlock(&pl->pl_lock); \ - \ - return lprocfs_rd_uint(page, start, off, count, eof, &tmp); \ - } \ - struct __##var##__dummy_read {;} /* semicolon catcher */ - -#define LDLM_POOL_PROC_WRITER(var, type) \ - int lprocfs_wr_##var(struct file *file, const char *buffer, \ - unsigned long count, void *data) \ - { \ - struct ldlm_pool *pl = data; \ - type tmp; \ - int rc; \ - \ - rc = lprocfs_wr_uint(file, buffer, count, &tmp); \ - if (rc) { \ - CERROR("Can't parse user input, rc = %d\n", rc); \ - return rc; \ - } \ - \ - spin_lock(&pl->pl_lock); \ - pl->pl_##var = tmp; \ - spin_unlock(&pl->pl_lock); \ - \ - return rc; \ - } \ - struct __##var##__dummy_write {;} /* semicolon catcher */ diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c deleted file mode 100644 index bdb1ac731c..0000000000 --- a/lustre/ldlm/ldlm_lib.c +++ /dev/null @@ -1,1749 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LDLM - -#ifdef __KERNEL__ -# include <libcfs/libcfs.h> -#else -# include <liblustre.h> -#endif -#include <obd.h> -#include <lustre_mds.h> -#include <lustre_dlm.h> -#include <lustre_net.h> -#include "ldlm_internal.h" - -/* @priority: if non-zero, move the selected to the list head - * @create: if zero, only search in existed connections - */ -static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid, - int priority, int create) -{ - struct ptlrpc_connection *ptlrpc_conn; - struct obd_import_conn *imp_conn = NULL, *item; - int rc = 0; - ENTRY; - - if (!create && !priority) { - CDEBUG(D_HA, "Nothing to do\n"); - RETURN(-EINVAL); - } - - ptlrpc_conn = ptlrpc_uuid_to_connection(uuid); - if (!ptlrpc_conn) { - CDEBUG(D_HA, "can't find connection %s\n", uuid->uuid); - RETURN (-ENOENT); - } - - if (create) { - OBD_ALLOC(imp_conn, sizeof(*imp_conn)); - if (!imp_conn) { - GOTO(out_put, rc = -ENOMEM); - } - } - - spin_lock(&imp->imp_lock); - list_for_each_entry(item, &imp->imp_conn_list, oic_item) { - if (obd_uuid_equals(uuid, &item->oic_uuid)) { - if (priority) { - list_del(&item->oic_item); - list_add(&item->oic_item, &imp->imp_conn_list); - item->oic_last_attempt = 0; - } - CDEBUG(D_HA, "imp %p@%s: found existing conn %s%s\n", - imp, imp->imp_obd->obd_name, uuid->uuid, - (priority ? ", moved to head" : "")); - spin_unlock(&imp->imp_lock); - GOTO(out_free, rc = 0); - } - } - /* not found */ - if (create) { - imp_conn->oic_conn = ptlrpc_conn; - imp_conn->oic_uuid = *uuid; - item->oic_last_attempt = 0; - if (priority) - list_add(&imp_conn->oic_item, &imp->imp_conn_list); - else - list_add_tail(&imp_conn->oic_item, &imp->imp_conn_list); - CDEBUG(D_HA, "imp %p@%s: add connection %s at %s\n", - imp, imp->imp_obd->obd_name, uuid->uuid, - (priority ? "head" : "tail")); - } else { - spin_unlock(&imp->imp_lock); - GOTO(out_free, rc = -ENOENT); - - } - - spin_unlock(&imp->imp_lock); - RETURN(0); -out_free: - if (imp_conn) - OBD_FREE(imp_conn, sizeof(*imp_conn)); -out_put: - ptlrpc_put_connection(ptlrpc_conn); - RETURN(rc); -} - -int import_set_conn_priority(struct obd_import *imp, struct obd_uuid *uuid) -{ - return import_set_conn(imp, uuid, 1, 0); -} - -int client_import_add_conn(struct obd_import *imp, struct obd_uuid *uuid, - int priority) -{ - return import_set_conn(imp, uuid, priority, 1); -} - -int client_import_del_conn(struct obd_import *imp, struct obd_uuid *uuid) -{ - struct obd_import_conn *imp_conn; - struct obd_export *dlmexp; - int rc = -ENOENT; - ENTRY; - - spin_lock(&imp->imp_lock); - if (list_empty(&imp->imp_conn_list)) { - LASSERT(!imp->imp_connection); - GOTO(out, rc); - } - - list_for_each_entry(imp_conn, &imp->imp_conn_list, oic_item) { - if (!obd_uuid_equals(uuid, &imp_conn->oic_uuid)) - continue; - LASSERT(imp_conn->oic_conn); - - /* is current conn? */ - if (imp_conn == imp->imp_conn_current) { - LASSERT(imp_conn->oic_conn == imp->imp_connection); - - if (imp->imp_state != LUSTRE_IMP_CLOSED && - imp->imp_state != LUSTRE_IMP_DISCON) { - CERROR("can't remove current connection\n"); - GOTO(out, rc = -EBUSY); - } - - ptlrpc_put_connection(imp->imp_connection); - imp->imp_connection = NULL; - - dlmexp = class_conn2export(&imp->imp_dlm_handle); - if (dlmexp && dlmexp->exp_connection) { - LASSERT(dlmexp->exp_connection == - imp_conn->oic_conn); - ptlrpc_put_connection(dlmexp->exp_connection); - dlmexp->exp_connection = NULL; - } - } - - list_del(&imp_conn->oic_item); - ptlrpc_put_connection(imp_conn->oic_conn); - OBD_FREE(imp_conn, sizeof(*imp_conn)); - CDEBUG(D_HA, "imp %p@%s: remove connection %s\n", - imp, imp->imp_obd->obd_name, uuid->uuid); - rc = 0; - break; - } -out: - spin_unlock(&imp->imp_lock); - if (rc == -ENOENT) - CERROR("connection %s not found\n", uuid->uuid); - RETURN(rc); -} - -/* configure an RPC client OBD device - * - * lcfg parameters: - * 1 - client UUID - * 2 - server UUID - * 3 - inactive-on-startup - */ -int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf) -{ - struct lustre_cfg* lcfg = buf; - struct client_obd *cli = &obddev->u.cli; - struct obd_import *imp; - struct obd_uuid server_uuid; - int rq_portal, rp_portal, connect_op; - char *name = obddev->obd_type->typ_name; - int rc; - ENTRY; - - /* In a more perfect world, we would hang a ptlrpc_client off of - * obd_type and just use the values from there. */ - if (!strcmp(name, LUSTRE_OSC_NAME)) { -#ifdef __KERNEL__ - /* Can be removed in Lustre 1.8, for compatibility only */ - rq_portal = OST_IO_PORTAL; -#else - rq_portal = OST_REQUEST_PORTAL; -#endif - rp_portal = OSC_REPLY_PORTAL; - connect_op = OST_CONNECT; - } else if (!strcmp(name, LUSTRE_MDC_NAME)) { - rq_portal = MDS_REQUEST_PORTAL; - rp_portal = MDC_REPLY_PORTAL; - connect_op = MDS_CONNECT; - } else if (!strcmp(name, LUSTRE_MGC_NAME)) { - rq_portal = MGS_REQUEST_PORTAL; - rp_portal = MGC_REPLY_PORTAL; - connect_op = MGS_CONNECT; - } else { - CERROR("unknown client OBD type \"%s\", can't setup\n", - name); - RETURN(-EINVAL); - } - - if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) { - CERROR("requires a TARGET UUID\n"); - RETURN(-EINVAL); - } - - if (LUSTRE_CFG_BUFLEN(lcfg, 1) > 37) { - CERROR("client UUID must be less than 38 characters\n"); - RETURN(-EINVAL); - } - - if (LUSTRE_CFG_BUFLEN(lcfg, 2) < 1) { - CERROR("setup requires a SERVER UUID\n"); - RETURN(-EINVAL); - } - - if (LUSTRE_CFG_BUFLEN(lcfg, 2) > 37) { - CERROR("target UUID must be less than 38 characters\n"); - RETURN(-EINVAL); - } - - sema_init(&cli->cl_sem, 1); - sema_init(&cli->cl_mgc_sem, 1); - cli->cl_conn_count = 0; - memcpy(server_uuid.uuid, lustre_cfg_buf(lcfg, 2), - min_t(unsigned int, LUSTRE_CFG_BUFLEN(lcfg, 2), - sizeof(server_uuid))); - - cli->cl_dirty = 0; - cli->cl_avail_grant = 0; - /* FIXME: should limit this for the sum of all cl_dirty_max */ - cli->cl_dirty_max = OSC_MAX_DIRTY_DEFAULT * 1024 * 1024; - if (cli->cl_dirty_max >> CFS_PAGE_SHIFT > num_physpages / 8) - cli->cl_dirty_max = num_physpages << (CFS_PAGE_SHIFT - 3); - CFS_INIT_LIST_HEAD(&cli->cl_cache_waiters); - CFS_INIT_LIST_HEAD(&cli->cl_loi_ready_list); - CFS_INIT_LIST_HEAD(&cli->cl_loi_write_list); - CFS_INIT_LIST_HEAD(&cli->cl_loi_read_list); - client_obd_list_lock_init(&cli->cl_loi_list_lock); - cli->cl_r_in_flight = 0; - cli->cl_w_in_flight = 0; - spin_lock_init(&cli->cl_read_rpc_hist.oh_lock); - spin_lock_init(&cli->cl_write_rpc_hist.oh_lock); - spin_lock_init(&cli->cl_read_page_hist.oh_lock); - spin_lock_init(&cli->cl_write_page_hist.oh_lock); - spin_lock_init(&cli->cl_read_offset_hist.oh_lock); - spin_lock_init(&cli->cl_write_offset_hist.oh_lock); - cfs_waitq_init(&cli->cl_destroy_waitq); - atomic_set(&cli->cl_destroy_in_flight, 0); -#ifdef ENABLE_CHECKSUM - /* Turn on checksumming by default. */ - cli->cl_checksum = 1; - /* - * The supported checksum types will be worked out at connect time - * Set cl_chksum* to CRC32 for now to avoid returning screwed info - * through procfs. - */ - cli->cl_cksum_type = cli->cl_supp_cksum_types = OBD_CKSUM_CRC32; -#endif - atomic_set(&cli->cl_resends, OSC_DEFAULT_RESENDS); - - /* This value may be changed at connect time in - ptlrpc_connect_interpret. */ - cli->cl_max_pages_per_rpc = min((int)PTLRPC_MAX_BRW_PAGES, - (int)(1024 * 1024 >> CFS_PAGE_SHIFT)); - - if (!strcmp(name, LUSTRE_MDC_NAME)) { - cli->cl_max_rpcs_in_flight = MDC_MAX_RIF_DEFAULT; - } else if (num_physpages >> (20 - CFS_PAGE_SHIFT) <= 128 /* MB */) { - cli->cl_max_rpcs_in_flight = 2; - } else if (num_physpages >> (20 - CFS_PAGE_SHIFT) <= 256 /* MB */) { - cli->cl_max_rpcs_in_flight = 3; - } else if (num_physpages >> (20 - CFS_PAGE_SHIFT) <= 512 /* MB */) { - cli->cl_max_rpcs_in_flight = 4; - } else { - cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT; - } - rc = ldlm_get_ref(); - if (rc) { - CERROR("ldlm_get_ref failed: %d\n", rc); - GOTO(err, rc); - } - - ptlrpc_init_client(rq_portal, rp_portal, name, - &obddev->obd_ldlm_client); - - imp = class_new_import(obddev); - if (imp == NULL) - GOTO(err_ldlm, rc = -ENOENT); - imp->imp_client = &obddev->obd_ldlm_client; - imp->imp_connect_op = connect_op; - imp->imp_initial_recov = 1; - imp->imp_initial_recov_bk = 0; - CFS_INIT_LIST_HEAD(&imp->imp_pinger_chain); - memcpy(cli->cl_target_uuid.uuid, lustre_cfg_buf(lcfg, 1), - LUSTRE_CFG_BUFLEN(lcfg, 1)); - class_import_put(imp); - - rc = client_import_add_conn(imp, &server_uuid, 1); - if (rc) { - CERROR("can't add initial connection\n"); - GOTO(err_import, rc); - } - - cli->cl_import = imp; - /* cli->cl_max_mds_{easize,cookiesize} updated by mdc_init_ea_size() */ - cli->cl_max_mds_easize = sizeof(struct lov_mds_md); - cli->cl_max_mds_cookiesize = sizeof(struct llog_cookie); - - if (LUSTRE_CFG_BUFLEN(lcfg, 3) > 0) { - if (!strcmp(lustre_cfg_string(lcfg, 3), "inactive")) { - CDEBUG(D_HA, "marking %s %s->%s as inactive\n", - name, obddev->obd_name, - cli->cl_target_uuid.uuid); - spin_lock(&imp->imp_lock); - imp->imp_invalid = 1; - spin_unlock(&imp->imp_lock); - } - } - - cli->cl_qchk_stat = CL_NOT_QUOTACHECKED; - - RETURN(rc); - -err_import: - class_destroy_import(imp); -err_ldlm: - ldlm_put_ref(0); -err: - RETURN(rc); - -} - -int client_obd_cleanup(struct obd_device *obddev) -{ - ENTRY; - ldlm_put_ref(obddev->obd_force); - RETURN(0); -} - -/* ->o_connect() method for client side (OSC and MDC and MGC) */ -int client_connect_import(struct lustre_handle *dlm_handle, - struct obd_device *obd, struct obd_uuid *cluuid, - struct obd_connect_data *data, void *localdata) -{ - struct client_obd *cli = &obd->u.cli; - struct obd_import *imp = cli->cl_import; - struct obd_export *exp; - struct obd_connect_data *ocd; - struct ldlm_namespace *to_be_freed = NULL; - int rc; - ENTRY; - - mutex_down(&cli->cl_sem); - rc = class_connect(dlm_handle, obd, cluuid); - if (rc) - GOTO(out_sem, rc); - - cli->cl_conn_count++; - if (cli->cl_conn_count > 1) - GOTO(out_sem, rc); - exp = class_conn2export(dlm_handle); - - if (obd->obd_namespace != NULL) - CERROR("already have namespace!\n"); - obd->obd_namespace = ldlm_namespace_new(obd->obd_name, - LDLM_NAMESPACE_CLIENT, - LDLM_NAMESPACE_GREEDY); - if (obd->obd_namespace == NULL) - GOTO(out_disco, rc = -ENOMEM); - - imp->imp_dlm_handle = *dlm_handle; - rc = ptlrpc_init_import(imp); - if (rc != 0) - GOTO(out_ldlm, rc); - - ocd = &imp->imp_connect_data; - if (data) { - *ocd = *data; - imp->imp_connect_flags_orig = data->ocd_connect_flags; - } - - rc = ptlrpc_connect_import(imp, NULL); - if (rc != 0) { - LASSERT (imp->imp_state == LUSTRE_IMP_DISCON); - GOTO(out_ldlm, rc); - } - LASSERT(exp->exp_connection); - - if (data) { - LASSERT((ocd->ocd_connect_flags & data->ocd_connect_flags) == - ocd->ocd_connect_flags); - data->ocd_connect_flags = ocd->ocd_connect_flags; - } - - ptlrpc_pinger_add_import(imp); - EXIT; - - if (rc) { -out_ldlm: - ldlm_namespace_free_prior(obd->obd_namespace); - to_be_freed = obd->obd_namespace; - obd->obd_namespace = NULL; -out_disco: - cli->cl_conn_count--; - class_disconnect(exp); - } else { - class_export_put(exp); - } -out_sem: - mutex_up(&cli->cl_sem); - if (to_be_freed) - ldlm_namespace_free_post(to_be_freed, 0); - return rc; -} - -int client_disconnect_export(struct obd_export *exp) -{ - struct obd_device *obd = class_exp2obd(exp); - struct client_obd *cli; - struct obd_import *imp; - struct ldlm_namespace *to_be_freed = NULL; - int rc = 0, err; - ENTRY; - - if (!obd) { - CERROR("invalid export for disconnect: exp %p cookie "LPX64"\n", - exp, exp ? exp->exp_handle.h_cookie : -1); - RETURN(-EINVAL); - } - - cli = &obd->u.cli; - imp = cli->cl_import; - - mutex_down(&cli->cl_sem); - if (!cli->cl_conn_count) { - CERROR("disconnecting disconnected device (%s)\n", - obd->obd_name); - GOTO(out_sem, rc = -EINVAL); - } - - cli->cl_conn_count--; - if (cli->cl_conn_count) - GOTO(out_no_disconnect, rc = 0); - - /* Mark import deactivated now, so we don't try to reconnect if any - * of the cleanup RPCs fails (e.g. ldlm cancel, etc). We don't - * fully deactivate the import, or that would drop all requests. */ - spin_lock(&imp->imp_lock); - imp->imp_deactive = 1; - spin_unlock(&imp->imp_lock); - - /* Some non-replayable imports (MDS's OSCs) are pinged, so just - * delete it regardless. (It's safe to delete an import that was - * never added.) */ - (void)ptlrpc_pinger_del_import(imp); - - if (obd->obd_namespace != NULL) { - /* obd_force == local only */ - ldlm_cli_cancel_unused(obd->obd_namespace, NULL, - obd->obd_force ? LDLM_FL_LOCAL_ONLY:0, - NULL); - ldlm_namespace_free_prior(obd->obd_namespace); - to_be_freed = obd->obd_namespace; - } - - rc = ptlrpc_disconnect_import(imp, 0); - - ptlrpc_invalidate_import(imp); - /* set obd_namespace to NULL only after invalidate, because we can have - * some connect requests in flight, and his need store a connect flags - * in obd_namespace. bug 14260 */ - obd->obd_namespace = NULL; - - ptlrpc_free_rq_pool(imp->imp_rq_pool); - class_destroy_import(imp); - cli->cl_import = NULL; - - EXIT; - out_no_disconnect: - err = class_disconnect(exp); - if (!rc && err) - rc = err; - out_sem: - mutex_up(&cli->cl_sem); - if (to_be_freed) - ldlm_namespace_free_post(to_be_freed, obd->obd_force); - RETURN(rc); -} - -/* -------------------------------------------------------------------------- - * from old lib/target.c - * -------------------------------------------------------------------------- */ - -int target_handle_reconnect(struct lustre_handle *conn, struct obd_export *exp, - struct obd_uuid *cluuid) -{ - ENTRY; - if (exp->exp_connection && exp->exp_imp_reverse) { - struct lustre_handle *hdl; - hdl = &exp->exp_imp_reverse->imp_remote_handle; - /* Might be a re-connect after a partition. */ - if (!memcmp(&conn->cookie, &hdl->cookie, sizeof conn->cookie)) { - CWARN("%s: %s reconnecting\n", exp->exp_obd->obd_name, - cluuid->uuid); - conn->cookie = exp->exp_handle.h_cookie; - /* target_handle_connect() treats EALREADY and - * -EALREADY differently. EALREADY means we are - * doing a valid reconnect from the same client. */ - RETURN(EALREADY); - } else { - CERROR("%s reconnecting from %s, " - "handle mismatch (ours "LPX64", theirs " - LPX64")\n", cluuid->uuid, - exp->exp_connection->c_remote_uuid.uuid, - hdl->cookie, conn->cookie); - memset(conn, 0, sizeof *conn); - /* target_handle_connect() treats EALREADY and - * -EALREADY differently. -EALREADY is an error - * (same UUID, different handle). */ - RETURN(-EALREADY); - } - } - - conn->cookie = exp->exp_handle.h_cookie; - CDEBUG(D_HA, "connect export for UUID '%s' at %p, cookie "LPX64"\n", - cluuid->uuid, exp, conn->cookie); - RETURN(0); -} - -void target_client_add_cb(struct obd_device *obd, __u64 transno, void *cb_data, - int error) -{ - struct obd_export *exp = cb_data; - - CDEBUG(D_RPCTRACE, "%s: committing for initial connect of %s\n", - obd->obd_name, exp->exp_client_uuid.uuid); - - spin_lock(&exp->exp_lock); - exp->exp_need_sync = 0; - spin_unlock(&exp->exp_lock); -} -EXPORT_SYMBOL(target_client_add_cb); - -static void -target_start_and_reset_recovery_timer(struct obd_device *obd, - svc_handler_t handler, - struct ptlrpc_request *req, - int new_client); - -int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) -{ - struct obd_device *target, *targref = NULL; - struct obd_export *export = NULL; - struct obd_import *revimp; - struct lustre_handle conn; - struct obd_uuid tgtuuid; - struct obd_uuid cluuid; - struct obd_uuid remote_uuid; - char *str, *tmp; - int rc = 0, abort_recovery; - struct obd_connect_data *data; - int size[2] = { sizeof(struct ptlrpc_body), sizeof(*data) }; - lnet_nid_t client_nid = 0; - ENTRY; - - OBD_RACE(OBD_FAIL_TGT_CONN_RACE); - - lustre_set_req_swabbed(req, REQ_REC_OFF); - str = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF, sizeof(tgtuuid)-1); - if (str == NULL) { - DEBUG_REQ(D_ERROR, req, "bad target UUID for connect"); - GOTO(out, rc = -EINVAL); - } - - obd_str2uuid (&tgtuuid, str); - target = class_uuid2obd(&tgtuuid); - /* COMPAT_146 */ - /* old (pre 1.6) lustre_process_log tries to connect to mdsname - (eg. mdsA) instead of uuid. */ - if (!target) { - snprintf((char *)tgtuuid.uuid, sizeof(tgtuuid), "%s_UUID", str); - target = class_uuid2obd(&tgtuuid); - } - if (!target) - target = class_name2obd(str); - /* end COMPAT_146 */ - - if (!target || target->obd_stopping || !target->obd_set_up) { - LCONSOLE_ERROR_MSG(0x137, "UUID '%s' is not available " - " for connect (%s)\n", str, - !target ? "no target" : - (target->obd_stopping ? "stopping" : - "not set up")); - GOTO(out, rc = -ENODEV); - } - - if (target->obd_no_conn) { - LCONSOLE_WARN("%s: temporarily refusing client connection " - "from %s\n", target->obd_name, - libcfs_nid2str(req->rq_peer.nid)); - GOTO(out, rc = -EAGAIN); - } - - /* Make sure the target isn't cleaned up while we're here. Yes, - there's still a race between the above check and our incref here. - Really, class_uuid2obd should take the ref. */ - targref = class_incref(target); - - lustre_set_req_swabbed(req, REQ_REC_OFF + 1); - str = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF + 1, - sizeof(cluuid) - 1); - if (str == NULL) { - DEBUG_REQ(D_ERROR, req, "bad client UUID for connect"); - GOTO(out, rc = -EINVAL); - } - - obd_str2uuid (&cluuid, str); - - /* XXX extract a nettype and format accordingly */ - switch (sizeof(lnet_nid_t)) { - /* NB the casts only avoid compiler warnings */ - case 8: - snprintf(remote_uuid.uuid, sizeof remote_uuid, - "NET_"LPX64"_UUID", (__u64)req->rq_peer.nid); - break; - case 4: - snprintf(remote_uuid.uuid, sizeof remote_uuid, - "NET_%x_UUID", (__u32)req->rq_peer.nid); - break; - default: - LBUG(); - } - - spin_lock_bh(&target->obd_processing_task_lock); - abort_recovery = target->obd_abort_recovery; - spin_unlock_bh(&target->obd_processing_task_lock); - if (abort_recovery) - target_abort_recovery(target); - - tmp = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2, sizeof conn); - if (tmp == NULL) - GOTO(out, rc = -EPROTO); - - memcpy(&conn, tmp, sizeof conn); - - data = lustre_swab_reqbuf(req, REQ_REC_OFF + 3, sizeof(*data), - lustre_swab_connect); - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - GOTO(out, rc); - - if (lustre_msg_get_op_flags(req->rq_reqmsg) & MSG_CONNECT_LIBCLIENT) { - if (!data) { - DEBUG_REQ(D_WARNING, req, "Refusing old (unversioned) " - "libclient connection attempt"); - GOTO(out, rc = -EPROTO); - } else if (data->ocd_version < LUSTRE_VERSION_CODE - - LUSTRE_VERSION_ALLOWED_OFFSET || - data->ocd_version > LUSTRE_VERSION_CODE + - LUSTRE_VERSION_ALLOWED_OFFSET) { - DEBUG_REQ(D_WARNING, req, "Refusing %s (%d.%d.%d.%d) " - "libclient connection attempt", - data->ocd_version < LUSTRE_VERSION_CODE ? - "old" : "new", - OBD_OCD_VERSION_MAJOR(data->ocd_version), - OBD_OCD_VERSION_MINOR(data->ocd_version), - OBD_OCD_VERSION_PATCH(data->ocd_version), - OBD_OCD_VERSION_FIX(data->ocd_version)); - data = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - offsetof(typeof(*data), - ocd_version) + - sizeof(data->ocd_version)); - if (data) { - data->ocd_connect_flags = OBD_CONNECT_VERSION; - data->ocd_version = LUSTRE_VERSION_CODE; - } - GOTO(out, rc = -EPROTO); - } - } - - /* lctl gets a backstage, all-access pass. */ - if (obd_uuid_equals(&cluuid, &target->obd_uuid)) - goto dont_check_exports; - - spin_lock(&target->obd_dev_lock); - export = lustre_hash_get_object_by_key(target->obd_uuid_hash_body, &cluuid); - - if (export != NULL && export->exp_connecting) { /* bug 9635, et. al. */ - CWARN("%s: exp %p already connecting\n", - export->exp_obd->obd_name, export); - class_export_put(export); - export = NULL; - rc = -EALREADY; - } else if (export != NULL && export->exp_connection != NULL && - req->rq_peer.nid != export->exp_connection->c_peer.nid) { - /* make darn sure this is coming from the same peer - * if the UUIDs matched */ - CWARN("%s: cookie %s seen on new NID %s when " - "existing NID %s is already connected\n", - target->obd_name, cluuid.uuid, - libcfs_nid2str(req->rq_peer.nid), - libcfs_nid2str(export->exp_connection->c_peer.nid)); - class_export_put(export); - export = NULL; - rc = -EALREADY; - } else if (export != NULL && export->exp_failed) { /* bug 11327 */ - CDEBUG(D_HA, "%s: exp %p evict in progress - new cookie needed " - "for connect\n", export->exp_obd->obd_name, export); - class_export_put(export); - export = NULL; - rc = -ENODEV; - } else if (export != NULL) { - spin_lock(&export->exp_lock); - export->exp_connecting = 1; - spin_unlock(&export->exp_lock); - class_export_put(export); - spin_unlock(&target->obd_dev_lock); - LASSERT(export->exp_obd == target); - - rc = target_handle_reconnect(&conn, export, &cluuid); - } - - /* If we found an export, we already unlocked. */ - if (!export) { - spin_unlock(&target->obd_dev_lock); - OBD_FAIL_TIMEOUT(OBD_FAIL_TGT_DELAY_CONNECT, 2 * obd_timeout); - } else if (req->rq_export == NULL && - atomic_read(&export->exp_rpc_count) > 0) { - CWARN("%s: refuse connection from %s/%s to 0x%p; still busy " - "with %d references\n", target->obd_name, cluuid.uuid, - libcfs_nid2str(req->rq_peer.nid), - export, atomic_read(&export->exp_refcount)); - GOTO(out, rc = -EBUSY); - } else if (req->rq_export != NULL && - atomic_read(&export->exp_rpc_count) > 1) { - CWARN("%s: refuse reconnection from %s@%s to 0x%p; still busy " - "with %d active RPCs\n", target->obd_name, cluuid.uuid, - libcfs_nid2str(req->rq_peer.nid), - export, atomic_read(&export->exp_rpc_count)); - GOTO(out, rc = -EBUSY); - } else if (lustre_msg_get_conn_cnt(req->rq_reqmsg) == 1) { - CERROR("%s: NID %s (%s) reconnected with 1 conn_cnt; " - "cookies not random?\n", target->obd_name, - libcfs_nid2str(req->rq_peer.nid), cluuid.uuid); - GOTO(out, rc = -EALREADY); - } else { - OBD_FAIL_TIMEOUT(OBD_FAIL_TGT_DELAY_RECONNECT, 2 * obd_timeout); - } - - if (rc < 0) - GOTO(out, rc); - - /* Tell the client if we're in recovery. */ - if (target->obd_recovering) { - lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_RECOVERING); - /* If this is the first time a client connects, - reset the recovery timer */ - if (rc == 0) - target_start_and_reset_recovery_timer(target, handler, - req, !export); - } - - /* We want to handle EALREADY but *not* -EALREADY from - * target_handle_reconnect(), return reconnection state in a flag */ - if (rc == EALREADY) { - lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_RECONNECT); - rc = 0; - } else { - LASSERT(rc == 0); - } - - /* Tell the client if we support replayable requests */ - if (target->obd_replayable) - lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_REPLAYABLE); - client_nid = req->rq_peer.nid; - - if (export == NULL) { - if (target->obd_recovering) { - CERROR("%s: denying connection for new client %s (%s): " - "%d clients in recovery for %lds\n", - target->obd_name, - libcfs_nid2str(req->rq_peer.nid), cluuid.uuid, - target->obd_recoverable_clients, - cfs_duration_sec(cfs_time_sub(cfs_timer_deadline(&target->obd_recovery_timer), - cfs_time_current()))); - rc = -EBUSY; - } else { - dont_check_exports: - rc = obd_connect(&conn, target, &cluuid, data, - &client_nid); - } - } else { - rc = obd_reconnect(export, target, &cluuid, data); - } - - if (rc) - GOTO(out, rc); - - /* Return only the parts of obd_connect_data that we understand, so the - * client knows that we don't understand the rest. */ - if (data) - memcpy(lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*data)), - data, sizeof(*data)); - - /* If all else goes well, this is our RPC return code. */ - req->rq_status = 0; - - lustre_msg_set_handle(req->rq_repmsg, &conn); - - /* ownership of this export ref transfers to the request AFTER we - * drop any previous reference the request had, but we don't want - * that to go to zero before we get our new export reference. */ - export = class_conn2export(&conn); - if (!export) { - DEBUG_REQ(D_ERROR, req, "Missing export!"); - GOTO(out, rc = -ENODEV); - } - - /* If the client and the server are the same node, we will already - * have an export that really points to the client's DLM export, - * because we have a shared handles table. - * - * XXX this will go away when shaver stops sending the "connect" handle - * in the real "remote handle" field of the request --phik 24 Apr 2003 - */ - if (req->rq_export != NULL) - class_export_put(req->rq_export); - - req->rq_export = export; - - spin_lock(&export->exp_lock); - if (export->exp_conn_cnt >= lustre_msg_get_conn_cnt(req->rq_reqmsg)) { - CERROR("%s: %s already connected at higher conn_cnt: %d > %d\n", - cluuid.uuid, libcfs_nid2str(req->rq_peer.nid), - export->exp_conn_cnt, - lustre_msg_get_conn_cnt(req->rq_reqmsg)); - - spin_unlock(&export->exp_lock); - GOTO(out, rc = -EALREADY); - } - export->exp_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg); - - /* request from liblustre? Don't evict it for not pinging. */ - if (lustre_msg_get_op_flags(req->rq_reqmsg) & MSG_CONNECT_LIBCLIENT) { - export->exp_libclient = 1; - spin_unlock(&export->exp_lock); - - spin_lock(&target->obd_dev_lock); - list_del_init(&export->exp_obd_chain_timed); - spin_unlock(&target->obd_dev_lock); - } else { - spin_unlock(&export->exp_lock); - } - - if (export->exp_connection != NULL) - ptlrpc_put_connection(export->exp_connection); - export->exp_connection = ptlrpc_get_connection(req->rq_peer, - req->rq_self, - &remote_uuid); - - spin_lock(&target->obd_dev_lock); - /* Export might be hashed already, e.g. if this is reconnect */ - if (hlist_unhashed(&export->exp_nid_hash)) - lustre_hash_additem(export->exp_obd->obd_nid_hash_body, - &export->exp_connection->c_peer.nid, - &export->exp_nid_hash); - spin_unlock(&target->obd_dev_lock); - - if (lustre_msg_get_op_flags(req->rq_repmsg) & MSG_CONNECT_RECONNECT) { - revimp = class_import_get(export->exp_imp_reverse); - GOTO(set_flags, rc = 0); - } - - if (target->obd_recovering) - target->obd_connected_clients++; - - memcpy(&conn, - lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2, sizeof conn), - sizeof conn); - - if (export->exp_imp_reverse != NULL) - class_destroy_import(export->exp_imp_reverse); - revimp = export->exp_imp_reverse = class_new_import(target); - revimp->imp_connection = ptlrpc_connection_addref(export->exp_connection); - revimp->imp_client = &export->exp_obd->obd_ldlm_client; - revimp->imp_remote_handle = conn; - revimp->imp_dlm_fake = 1; - revimp->imp_state = LUSTRE_IMP_FULL; - -set_flags: - if (req->rq_reqmsg->lm_magic == LUSTRE_MSG_MAGIC_V1 && - lustre_msg_get_op_flags(req->rq_reqmsg) & MSG_CONNECT_NEXT_VER) { - revimp->imp_msg_magic = LUSTRE_MSG_MAGIC_V2; - lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_NEXT_VER); - } else { - /* unknown versions will be caught in - * ptlrpc_handle_server_req_in->lustre_unpack_msg() */ - revimp->imp_msg_magic = req->rq_reqmsg->lm_magic; - } - - if (revimp->imp_msg_magic != LUSTRE_MSG_MAGIC_V1) { - if (export->exp_connect_flags & OBD_CONNECT_AT) - revimp->imp_msghdr_flags |= MSGHDR_AT_SUPPORT; - else - revimp->imp_msghdr_flags &= ~MSGHDR_AT_SUPPORT; - } - - class_import_put(revimp); -out: - if (export) { - spin_lock(&export->exp_lock); - export->exp_connecting = 0; - spin_unlock(&export->exp_lock); - } - if (targref) - class_decref(targref); - if (rc) - req->rq_status = rc; - RETURN(rc); -} - -int target_handle_disconnect(struct ptlrpc_request *req) -{ - int rc; - ENTRY; - - rc = lustre_pack_reply(req, 1, NULL, NULL); - if (rc) - RETURN(rc); - - /* keep the rq_export around so we can send the reply */ - req->rq_status = obd_disconnect(class_export_get(req->rq_export)); - RETURN(0); -} - -void target_destroy_export(struct obd_export *exp) -{ - /* exports created from last_rcvd data, and "fake" - exports created by lctl don't have an import */ - if (exp->exp_imp_reverse != NULL) - class_destroy_import(exp->exp_imp_reverse); - - /* We cancel locks at disconnect time, but this will catch any locks - * granted in a race with recovery-induced disconnect. */ - if (exp->exp_obd->obd_namespace != NULL) - ldlm_cancel_locks_for_export(exp); -} - -/* - * Recovery functions - */ - - -static void target_release_saved_req(struct ptlrpc_request *req) -{ - ptlrpc_req_drop_rs(req); - class_export_put(req->rq_export); - OBD_FREE(req->rq_reqmsg, req->rq_reqlen); - OBD_FREE(req, sizeof *req); -} - -static void target_finish_recovery(struct obd_device *obd) -{ - struct list_head *tmp, *n; - - LCONSOLE_INFO("%s: sending delayed replies to recovered clients\n", - obd->obd_name); - - ldlm_reprocess_all_ns(obd->obd_namespace); - - /* when recovery finished, cleanup orphans on mds and ost */ - if (OBT(obd) && OBP(obd, postrecov)) { - int rc = OBP(obd, postrecov)(obd); - LCONSOLE_WARN("%s: recovery %s: rc %d\n", obd->obd_name, - rc < 0 ? "failed" : "complete", rc); - } - - list_for_each_safe(tmp, n, &obd->obd_delayed_reply_queue) { - struct ptlrpc_request *req; - req = list_entry(tmp, struct ptlrpc_request, rq_list); - list_del(&req->rq_list); - DEBUG_REQ(D_HA, req, "delayed:"); - ptlrpc_reply(req); - target_release_saved_req(req); - } - obd->obd_recovery_end = cfs_time_current_sec(); -} - -static void abort_recovery_queue(struct obd_device *obd) -{ - struct ptlrpc_request *req; - struct list_head *tmp, *n; - int rc; - - list_for_each_safe(tmp, n, &obd->obd_recovery_queue) { - req = list_entry(tmp, struct ptlrpc_request, rq_list); - list_del(&req->rq_list); - DEBUG_REQ(D_ERROR, req, "aborted:"); - req->rq_status = -ENOTCONN; - req->rq_type = PTL_RPC_MSG_ERR; - rc = lustre_pack_reply(req, 1, NULL, NULL); - if (rc == 0) - ptlrpc_reply(req); - else - DEBUG_REQ(D_ERROR, req, - "packing failed for abort-reply; skipping"); - target_release_saved_req(req); - } -} - -/* Called from a cleanup function if the device is being cleaned up - forcefully. The exports should all have been disconnected already, - the only thing left to do is - - clear the recovery flags - - cancel the timer - - free queued requests and replies, but don't send replies - Because the obd_stopping flag is set, no new requests should be received. - -*/ -void target_cleanup_recovery(struct obd_device *obd) -{ - struct list_head *tmp, *n; - struct ptlrpc_request *req; - ENTRY; - - LASSERT(obd->obd_stopping); - - spin_lock_bh(&obd->obd_processing_task_lock); - if (!obd->obd_recovering) { - spin_unlock_bh(&obd->obd_processing_task_lock); - EXIT; - return; - } - obd->obd_recovering = obd->obd_abort_recovery = 0; - target_cancel_recovery_timer(obd); - spin_unlock_bh(&obd->obd_processing_task_lock); - - list_for_each_safe(tmp, n, &obd->obd_delayed_reply_queue) { - req = list_entry(tmp, struct ptlrpc_request, rq_list); - list_del(&req->rq_list); - target_release_saved_req(req); - } - - list_for_each_safe(tmp, n, &obd->obd_recovery_queue) { - req = list_entry(tmp, struct ptlrpc_request, rq_list); - list_del(&req->rq_list); - target_release_saved_req(req); - } - EXIT; -} - -void target_abort_recovery(void *data) -{ - struct obd_device *obd = data; - ENTRY; - - spin_lock_bh(&obd->obd_processing_task_lock); - if (!obd->obd_recovering) { - spin_unlock_bh(&obd->obd_processing_task_lock); - EXIT; - return; - } - obd->obd_recovering = obd->obd_abort_recovery = 0; - target_cancel_recovery_timer(obd); - spin_unlock_bh(&obd->obd_processing_task_lock); - - LCONSOLE_WARN("%s: recovery period over; %d clients never reconnected " - "after %lds (%d clients did)\n", - obd->obd_name, obd->obd_recoverable_clients, - cfs_time_current_sec()- obd->obd_recovery_start, - obd->obd_connected_clients); - class_disconnect_stale_exports(obd); - abort_recovery_queue(obd); - - target_finish_recovery(obd); - CDEBUG(D_HA, "%s: recovery complete\n", obd_uuid2str(&obd->obd_uuid)); - EXIT; -} - -static void target_recovery_expired(unsigned long castmeharder) -{ - struct obd_device *obd = (struct obd_device *)castmeharder; - CERROR("%s: recovery timed out, aborting\n", obd->obd_name); - spin_lock_bh(&obd->obd_processing_task_lock); - if (obd->obd_recovering) - obd->obd_abort_recovery = 1; - cfs_waitq_signal(&obd->obd_next_transno_waitq); - spin_unlock_bh(&obd->obd_processing_task_lock); -} - - -/* obd_processing_task_lock should be held */ -void target_cancel_recovery_timer(struct obd_device *obd) -{ - CDEBUG(D_HA, "%s: cancel recovery timer\n", obd->obd_name); - cfs_timer_disarm(&obd->obd_recovery_timer); -} - -/* extend = 1 means require at least "duration" seconds left in the timer, - extend = 0 means set the total duration (start_recovery_timer) */ -static void reset_recovery_timer(struct obd_device *obd, int duration, - int extend) -{ - cfs_time_t now = cfs_time_current_sec(); - cfs_duration_t left; - - spin_lock_bh(&obd->obd_processing_task_lock); - if (!obd->obd_recovering) { - spin_unlock_bh(&obd->obd_processing_task_lock); - return; - } - - left = cfs_time_sub(obd->obd_recovery_end, now); - - if (extend && (duration > left)) - obd->obd_recovery_timeout += duration - left; - else if (!extend && (duration > obd->obd_recovery_timeout)) - /* Track the client's largest expected replay time */ - obd->obd_recovery_timeout = duration; -#ifdef CRAY_XT3 - /* - * If total recovery time already exceed the - * obd_recovery_max_time, then CRAY XT3 will - * abort the recovery - */ - if(obd->obd_recovery_timeout > obd->obd_recovery_max_time) - obd->obd_recovery_timeout = obd->obd_recovery_max_time; -#endif - obd->obd_recovery_end = obd->obd_recovery_start + - obd->obd_recovery_timeout; - if (cfs_time_before(now, obd->obd_recovery_end)) { - left = cfs_time_sub(obd->obd_recovery_end, now); - cfs_timer_arm(&obd->obd_recovery_timer, cfs_time_shift(left)); - } - spin_unlock_bh(&obd->obd_processing_task_lock); - CDEBUG(D_HA, "%s: recovery timer will expire in %u seconds\n", - obd->obd_name, (unsigned)left); -} - -static void check_and_start_recovery_timer(struct obd_device *obd, - svc_handler_t handler) -{ - spin_lock_bh(&obd->obd_processing_task_lock); - if (obd->obd_recovery_handler) { - spin_unlock_bh(&obd->obd_processing_task_lock); - return; - } - CWARN("%s: starting recovery timer\n", obd->obd_name); - obd->obd_recovery_start = cfs_time_current_sec(); - /* minimum */ - obd->obd_recovery_timeout = OBD_RECOVERY_FACTOR * obd_timeout; - obd->obd_recovery_handler = handler; - cfs_timer_init(&obd->obd_recovery_timer, target_recovery_expired, obd); - spin_unlock_bh(&obd->obd_processing_task_lock); - - reset_recovery_timer(obd, obd->obd_recovery_timeout, 0); -} - -/* Reset the timer with each new client connection */ -/* - * This timer is actually reconnect_timer, which is for making sure - * the total recovery window is at least as big as my reconnect - * attempt timing. So the initial recovery time_out will be set to - * OBD_RECOVERY_FACTOR * obd_timeout. If the timeout coming - * from client is bigger than this, then the recovery time_out will - * be extend to make sure the client could be reconnected, in the - * process, the timeout from the new client should be ignored. - */ - -static void -target_start_and_reset_recovery_timer(struct obd_device *obd, - svc_handler_t handler, - struct ptlrpc_request *req, - int new_client) -{ - int req_timeout = OBD_RECOVERY_FACTOR * - lustre_msg_get_timeout(req->rq_reqmsg); - - check_and_start_recovery_timer(obd, handler); - - if (req_timeout > obd->obd_recovery_timeout && !new_client) - reset_recovery_timer(obd, req_timeout, 0); -} - -static int check_for_next_transno(struct obd_device *obd) -{ - struct ptlrpc_request *req; - int wake_up = 0, connected, completed, queue_len, max; - __u64 next_transno, req_transno; - - spin_lock_bh(&obd->obd_processing_task_lock); - req = list_entry(obd->obd_recovery_queue.next, - struct ptlrpc_request, rq_list); - max = obd->obd_max_recoverable_clients; - req_transno = lustre_msg_get_transno(req->rq_reqmsg); - connected = obd->obd_connected_clients; - completed = max - obd->obd_recoverable_clients; - queue_len = obd->obd_requests_queued_for_recovery; - next_transno = obd->obd_next_recovery_transno; - - CDEBUG(D_HA,"max: %d, connected: %d, completed: %d, queue_len: %d, " - "req_transno: "LPU64", next_transno: "LPU64"\n", - max, connected, completed, queue_len, req_transno, next_transno); - if (obd->obd_abort_recovery) { - CDEBUG(D_HA, "waking for aborted recovery\n"); - wake_up = 1; - } else if (!obd->obd_recovering) { - CDEBUG(D_HA, "waking for completed recovery (?)\n"); - wake_up = 1; - } else if (req_transno == next_transno) { - CDEBUG(D_HA, "waking for next ("LPD64")\n", next_transno); - wake_up = 1; - } else if (queue_len + completed == max) { - CDEBUG(D_ERROR, - "waking for skipped transno (skip: "LPD64 - ", ql: %d, comp: %d, conn: %d, next: "LPD64")\n", - next_transno, queue_len, completed, max, req_transno); - obd->obd_next_recovery_transno = req_transno; - wake_up = 1; - } - spin_unlock_bh(&obd->obd_processing_task_lock); - LASSERT(lustre_msg_get_transno(req->rq_reqmsg) >= next_transno); - return wake_up; -} - -static void process_recovery_queue(struct obd_device *obd) -{ - struct ptlrpc_request *req; - int abort_recovery = 0; - struct l_wait_info lwi = { 0 }; - ENTRY; - - for (;;) { - spin_lock_bh(&obd->obd_processing_task_lock); - LASSERT(obd->obd_processing_task == cfs_curproc_pid()); - req = list_entry(obd->obd_recovery_queue.next, - struct ptlrpc_request, rq_list); - - if (lustre_msg_get_transno(req->rq_reqmsg) != - obd->obd_next_recovery_transno) { - spin_unlock_bh(&obd->obd_processing_task_lock); - CDEBUG(D_HA, "Waiting for transno "LPD64" (1st is " - LPD64", x"LPU64")\n", - obd->obd_next_recovery_transno, - lustre_msg_get_transno(req->rq_reqmsg), - req->rq_xid); - l_wait_event(obd->obd_next_transno_waitq, - check_for_next_transno(obd), &lwi); - spin_lock_bh(&obd->obd_processing_task_lock); - abort_recovery = obd->obd_abort_recovery; - spin_unlock_bh(&obd->obd_processing_task_lock); - if (abort_recovery) { - target_abort_recovery(obd); - return; - } - continue; - } - list_del_init(&req->rq_list); - obd->obd_requests_queued_for_recovery--; - spin_unlock_bh(&obd->obd_processing_task_lock); - - DEBUG_REQ(D_HA, req, "processing: "); - (void)obd->obd_recovery_handler(req); - obd->obd_replayed_requests++; - reset_recovery_timer(obd, OBD_RECOVERY_FACTOR * - AT_OFF ? obd_timeout : - at_get(&req->rq_rqbd->rqbd_service->srv_at_estimate), 1); - /* bug 1580: decide how to properly sync() in recovery */ - //mds_fsync_super(obd->u.obt.obt_sb); - class_export_put(req->rq_export); - ptlrpc_req_drop_rs(req); - OBD_FREE(req->rq_reqmsg, req->rq_reqlen); - OBD_FREE(req, sizeof *req); - spin_lock_bh(&obd->obd_processing_task_lock); - obd->obd_next_recovery_transno++; - if (list_empty(&obd->obd_recovery_queue)) { - obd->obd_processing_task = 0; - spin_unlock_bh(&obd->obd_processing_task_lock); - break; - } - spin_unlock_bh(&obd->obd_processing_task_lock); - } - EXIT; -} - -int target_queue_recovery_request(struct ptlrpc_request *req, - struct obd_device *obd) -{ - struct list_head *tmp; - int inserted = 0; - __u64 transno = lustre_msg_get_transno(req->rq_reqmsg); - struct ptlrpc_request *saved_req; - struct lustre_msg *reqmsg; - - /* CAVEAT EMPTOR: The incoming request message has been swabbed - * (i.e. buflens etc are in my own byte order), but type-dependent - * buffers (eg mds_body, ost_body etc) have NOT been swabbed. */ - - if (!transno) { - CFS_INIT_LIST_HEAD(&req->rq_list); - DEBUG_REQ(D_HA, req, "not queueing"); - return 1; - } - - /* XXX If I were a real man, these LBUGs would be sane cleanups. */ - /* XXX just like the request-dup code in queue_final_reply */ - OBD_ALLOC(saved_req, sizeof *saved_req); - if (!saved_req) - LBUG(); - OBD_ALLOC(reqmsg, req->rq_reqlen); - if (!reqmsg) - LBUG(); - - spin_lock_bh(&obd->obd_processing_task_lock); - - /* If we're processing the queue, we want don't want to queue this - * message. - * - * Also, if this request has a transno less than the one we're waiting - * for, we should process it now. It could (and currently always will) - * be an open request for a descriptor that was opened some time ago. - * - * Also, a resent, replayed request that has already been - * handled will pass through here and be processed immediately. - */ - if (obd->obd_processing_task == cfs_curproc_pid() || - transno < obd->obd_next_recovery_transno) { - /* Processing the queue right now, don't re-add. */ - LASSERT(list_empty(&req->rq_list)); - spin_unlock_bh(&obd->obd_processing_task_lock); - OBD_FREE(reqmsg, req->rq_reqlen); - OBD_FREE(saved_req, sizeof *saved_req); - return 1; - } - - /* A resent, replayed request that is still on the queue; just drop it. - The queued request will handle this. */ - if ((lustre_msg_get_flags(req->rq_reqmsg) & (MSG_RESENT|MSG_REPLAY)) == - (MSG_RESENT | MSG_REPLAY)) { - DEBUG_REQ(D_ERROR, req, "dropping resent queued req"); - spin_unlock_bh(&obd->obd_processing_task_lock); - OBD_FREE(reqmsg, req->rq_reqlen); - OBD_FREE(saved_req, sizeof *saved_req); - return 0; - } - - memcpy(saved_req, req, sizeof *req); - memcpy(reqmsg, req->rq_reqmsg, req->rq_reqlen); - req = saved_req; - req->rq_reqmsg = reqmsg; - class_export_get(req->rq_export); - CFS_INIT_LIST_HEAD(&req->rq_list); - - /* XXX O(n^2) */ - list_for_each(tmp, &obd->obd_recovery_queue) { - struct ptlrpc_request *reqiter = - list_entry(tmp, struct ptlrpc_request, rq_list); - - if (lustre_msg_get_transno(reqiter->rq_reqmsg) > transno) { - list_add_tail(&req->rq_list, &reqiter->rq_list); - inserted = 1; - break; - } - } - - if (!inserted) { - list_add_tail(&req->rq_list, &obd->obd_recovery_queue); - } - - obd->obd_requests_queued_for_recovery++; - - if (obd->obd_processing_task != 0) { - /* Someone else is processing this queue, we'll leave it to - * them. - */ - cfs_waitq_signal(&obd->obd_next_transno_waitq); - spin_unlock_bh(&obd->obd_processing_task_lock); - return 0; - } - - /* Nobody is processing, and we know there's (at least) one to process - * now, so we'll do the honours. - */ - obd->obd_processing_task = cfs_curproc_pid(); - spin_unlock_bh(&obd->obd_processing_task_lock); - - process_recovery_queue(obd); - return 0; -} - -struct obd_device * target_req2obd(struct ptlrpc_request *req) -{ - return req->rq_export->exp_obd; -} - -int target_queue_last_replay_reply(struct ptlrpc_request *req, int rc) -{ - struct obd_device *obd = target_req2obd(req); - struct ptlrpc_request *saved_req; - struct lustre_msg *reqmsg; - int recovery_done = 0; - - LASSERT ((rc == 0) == req->rq_packed_final); - - if (!req->rq_packed_final) { - /* Just like ptlrpc_error, but without the sending. */ - rc = lustre_pack_reply(req, 1, NULL, NULL); - if (rc) - return rc; - req->rq_type = PTL_RPC_MSG_ERR; - } - - LASSERT(!req->rq_reply_state->rs_difficult); - LASSERT(list_empty(&req->rq_list)); - /* XXX a bit like the request-dup code in queue_recovery_request */ - OBD_ALLOC(saved_req, sizeof *saved_req); - if (!saved_req) - return -ENOMEM; - OBD_ALLOC(reqmsg, req->rq_reqlen); - if (!reqmsg) { - OBD_FREE(saved_req, sizeof *req); - return -ENOMEM; - } - *saved_req = *req; - memcpy(reqmsg, req->rq_reqmsg, req->rq_reqlen); - - /* Don't race cleanup */ - spin_lock_bh(&obd->obd_processing_task_lock); - if (obd->obd_stopping) { - spin_unlock_bh(&obd->obd_processing_task_lock); - OBD_FREE(reqmsg, req->rq_reqlen); - OBD_FREE(saved_req, sizeof *req); - req->rq_status = -ENOTCONN; - /* rv is ignored anyhow */ - return -ENOTCONN; - } - ptlrpc_rs_addref(req->rq_reply_state); /* +1 ref for saved reply */ - req = saved_req; - req->rq_reqmsg = reqmsg; - class_export_get(req->rq_export); - list_add(&req->rq_list, &obd->obd_delayed_reply_queue); - - /* only count the first "replay over" request from each - export */ - if (req->rq_export->exp_replay_needed) { - --obd->obd_recoverable_clients; - - spin_lock(&req->rq_export->exp_lock); - req->rq_export->exp_replay_needed = 0; - spin_unlock(&req->rq_export->exp_lock); - } - recovery_done = (obd->obd_recoverable_clients == 0); - spin_unlock_bh(&obd->obd_processing_task_lock); - - OBD_RACE(OBD_FAIL_LDLM_RECOV_CLIENTS); - if (recovery_done) { - spin_lock_bh(&obd->obd_processing_task_lock); - obd->obd_recovering = obd->obd_abort_recovery = 0; - target_cancel_recovery_timer(obd); - spin_unlock_bh(&obd->obd_processing_task_lock); - - target_finish_recovery(obd); - CDEBUG(D_HA, "%s: recovery complete\n", - obd_uuid2str(&obd->obd_uuid)); - } else { - CWARN("%s: %d recoverable clients remain\n", - obd->obd_name, obd->obd_recoverable_clients); - cfs_waitq_signal(&obd->obd_next_transno_waitq); - } - - return 1; -} - -static inline struct ldlm_pool *ldlm_exp2pl(struct obd_export *exp) -{ - LASSERT(exp != NULL); - return &exp->exp_obd->obd_namespace->ns_pool; -} - -int target_pack_pool_reply(struct ptlrpc_request *req) -{ - struct ldlm_pool *pl; - ENTRY; - - if (!req->rq_export || !req->rq_export->exp_obd || - !req->rq_export->exp_obd->obd_namespace || - !exp_connect_lru_resize(req->rq_export)) { - lustre_msg_set_slv(req->rq_repmsg, 0); - lustre_msg_set_limit(req->rq_repmsg, 0); - RETURN(0); - } - - pl = ldlm_exp2pl(req->rq_export); - - spin_lock(&pl->pl_lock); - LASSERT(ldlm_pool_get_slv(pl) != 0 && ldlm_pool_get_limit(pl) != 0); - lustre_msg_set_slv(req->rq_repmsg, ldlm_pool_get_slv(pl)); - lustre_msg_set_limit(req->rq_repmsg, ldlm_pool_get_limit(pl)); - spin_unlock(&pl->pl_lock); - - RETURN(0); -} - -int -target_send_reply_msg (struct ptlrpc_request *req, int rc, int fail_id) -{ - if (OBD_FAIL_CHECK(fail_id | OBD_FAIL_ONCE)) { - obd_fail_loc |= OBD_FAIL_ONCE | OBD_FAILED; - DEBUG_REQ(D_ERROR, req, "dropping reply"); - return (-ECOMM); - } - - if (rc) { - DEBUG_REQ(D_ERROR, req, "processing error (%d)", rc); - req->rq_status = rc; - return (ptlrpc_error(req)); - } else { - DEBUG_REQ(D_NET, req, "sending reply"); - } - - return (ptlrpc_send_reply(req, PTLRPC_REPLY_MAYBE_DIFFICULT)); -} - -void -target_send_reply(struct ptlrpc_request *req, int rc, int fail_id) -{ - int netrc; - struct ptlrpc_reply_state *rs; - struct obd_device *obd; - struct obd_export *exp; - struct ptlrpc_service *svc; - - svc = req->rq_rqbd->rqbd_service; - rs = req->rq_reply_state; - if (rs == NULL || !rs->rs_difficult) { - /* no notifiers */ - target_send_reply_msg (req, rc, fail_id); - return; - } - - /* must be an export if locks saved */ - LASSERT (req->rq_export != NULL); - /* req/reply consistent */ - LASSERT (rs->rs_service == svc); - - /* "fresh" reply */ - LASSERT (!rs->rs_scheduled); - LASSERT (!rs->rs_scheduled_ever); - LASSERT (!rs->rs_handled); - LASSERT (!rs->rs_on_net); - LASSERT (rs->rs_export == NULL); - LASSERT (list_empty(&rs->rs_obd_list)); - LASSERT (list_empty(&rs->rs_exp_list)); - - exp = class_export_get (req->rq_export); - obd = exp->exp_obd; - - /* disable reply scheduling onto srv_reply_queue while I'm setting up */ - rs->rs_scheduled = 1; - rs->rs_on_net = 1; - rs->rs_xid = req->rq_xid; - rs->rs_transno = req->rq_transno; - rs->rs_export = exp; - - spin_lock(&obd->obd_uncommitted_replies_lock); - - if (rs->rs_transno > obd->obd_last_committed) { - /* not committed already */ - list_add_tail (&rs->rs_obd_list, - &obd->obd_uncommitted_replies); - } - - spin_unlock (&obd->obd_uncommitted_replies_lock); - spin_lock (&exp->exp_lock); - - list_add_tail (&rs->rs_exp_list, &exp->exp_outstanding_replies); - - spin_unlock(&exp->exp_lock); - - netrc = target_send_reply_msg (req, rc, fail_id); - - spin_lock(&svc->srv_lock); - - svc->srv_n_difficult_replies++; - - if (netrc != 0) { - /* error sending: reply is off the net. Also we need +1 - * reply ref until ptlrpc_server_handle_reply() is done - * with the reply state (if the send was successful, there - * would have been +1 ref for the net, which - * reply_out_callback leaves alone) */ - rs->rs_on_net = 0; - ptlrpc_rs_addref(rs); - atomic_inc (&svc->srv_outstanding_replies); - } - - if (!rs->rs_on_net || /* some notifier */ - list_empty(&rs->rs_exp_list) || /* completed already */ - list_empty(&rs->rs_obd_list)) { - list_add_tail (&rs->rs_list, &svc->srv_reply_queue); - cfs_waitq_signal (&svc->srv_waitq); - } else { - list_add (&rs->rs_list, &svc->srv_active_replies); - rs->rs_scheduled = 0; /* allow notifier to schedule */ - } - - spin_unlock(&svc->srv_lock); -} - -int target_handle_ping(struct ptlrpc_request *req) -{ - obd_ping(req->rq_export); - return lustre_pack_reply(req, 1, NULL, NULL); -} - -void target_committed_to_req(struct ptlrpc_request *req) -{ - struct obd_device *obd = req->rq_export->exp_obd; - - if (!obd->obd_no_transno && req->rq_repmsg != NULL) - lustre_msg_set_last_committed(req->rq_repmsg, - obd->obd_last_committed); - else - DEBUG_REQ(D_IOCTL, req, "not sending last_committed update (%d/" - "%d)", obd->obd_no_transno, req->rq_repmsg == NULL); - - CDEBUG(D_INFO, "last_committed x"LPU64", this req x"LPU64"\n", - obd->obd_last_committed, req->rq_xid); -} - -EXPORT_SYMBOL(target_committed_to_req); - -#ifdef HAVE_QUOTA_SUPPORT -int target_handle_qc_callback(struct ptlrpc_request *req) -{ - struct obd_quotactl *oqctl; - struct client_obd *cli = &req->rq_export->exp_obd->u.cli; - - oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl), - lustre_swab_obd_quotactl); - if (oqctl == NULL) { - CERROR("Can't unpack obd_quotactl\n"); - RETURN(-EPROTO); - } - - cli->cl_qchk_stat = oqctl->qc_stat; - - return 0; -} - -int target_handle_dqacq_callback(struct ptlrpc_request *req) -{ -#ifdef __KERNEL__ - struct obd_device *obd = req->rq_export->exp_obd; - struct obd_device *master_obd; - struct lustre_quota_ctxt *qctxt; - struct qunit_data *qdata = NULL; - int rc = 0; - int repsize[2] = { sizeof(struct ptlrpc_body), 0 }; - ENTRY; - - if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_DROP_QUOTA_REQ)) - RETURN(rc); - - repsize[1] = quota_get_qunit_data_size(req->rq_export-> - exp_connect_flags); - - rc = lustre_pack_reply(req, 2, repsize, NULL); - if (rc) - RETURN(rc); - - LASSERT(req->rq_export); - - /* there are three forms of qunit(historic causes), so we need to - * adjust qunits from slaves to the same form here */ - OBD_ALLOC(qdata, sizeof(struct qunit_data)); - if (!qdata) - RETURN(-ENOMEM); - rc = quota_get_qdata(req, qdata, QUOTA_REQUEST, QUOTA_EXPORT); - if (rc < 0) { - CDEBUG(D_ERROR, "Can't unpack qunit_data\n"); - GOTO(out, rc = -EPROTO); - } - - /* we use the observer */ - LASSERT(obd->obd_observer && obd->obd_observer->obd_observer); - master_obd = obd->obd_observer->obd_observer; - qctxt = &master_obd->u.obt.obt_qctxt; - - LASSERT(qctxt->lqc_handler); - rc = qctxt->lqc_handler(master_obd, qdata, - lustre_msg_get_opc(req->rq_reqmsg)); - if (rc && rc != -EDQUOT) - CDEBUG(rc == -EBUSY ? D_QUOTA : D_ERROR, - "dqacq failed! (rc:%d)\n", rc); - req->rq_status = rc; - - /* there are three forms of qunit(historic causes), so we need to - * adjust the same form to different forms slaves needed */ - rc = quota_copy_qdata(req, qdata, QUOTA_REPLY, QUOTA_EXPORT); - if (rc < 0) { - CDEBUG(D_ERROR, "Can't pack qunit_data\n"); - GOTO(out, rc = -EPROTO); - } - - /* Block the quota req. b=14840 */ - OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_BLOCK_QUOTA_REQ, obd_timeout); - - rc = ptlrpc_reply(req); -out: - OBD_FREE(qdata, sizeof(struct qunit_data)); - RETURN(rc); -#else - return 0; -#endif /* !__KERNEL__ */ -} -#endif /* HAVE_QUOTA_SUPPORT */ - -ldlm_mode_t lck_compat_array[] = { - [LCK_EX] LCK_COMPAT_EX, - [LCK_PW] LCK_COMPAT_PW, - [LCK_PR] LCK_COMPAT_PR, - [LCK_CW] LCK_COMPAT_CW, - [LCK_CR] LCK_COMPAT_CR, - [LCK_NL] LCK_COMPAT_NL, - [LCK_GROUP] LCK_COMPAT_GROUP -}; diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c deleted file mode 100644 index b63aaba665..0000000000 --- a/lustre/ldlm/ldlm_lock.c +++ /dev/null @@ -1,1968 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_LDLM - -#ifdef __KERNEL__ -# include <libcfs/libcfs.h> -# include <linux/lustre_intent.h> -#else -# include <liblustre.h> -# include <libcfs/kp30.h> -#endif - -#include <obd_class.h> -#include "ldlm_internal.h" - -//struct lustre_lock ldlm_everything_lock; - -/* lock's skip list pointers fix mode */ -#define LDLM_JOIN_NONE 0 -#define LDLM_MODE_JOIN_RIGHT 1 -#define LDLM_MODE_JOIN_LEFT (1 << 1) -#define LDLM_POLICY_JOIN_RIGHT (1 << 2) -#define LDLM_POLICY_JOIN_LEFT (1 << 3) - -/* lock types */ -char *ldlm_lockname[] = { - [0] "--", - [LCK_EX] "EX", - [LCK_PW] "PW", - [LCK_PR] "PR", - [LCK_CW] "CW", - [LCK_CR] "CR", - [LCK_NL] "NL", - [LCK_GROUP] "GROUP" -}; - -char *ldlm_typename[] = { - [LDLM_PLAIN] "PLN", - [LDLM_EXTENT] "EXT", - [LDLM_FLOCK] "FLK", - [LDLM_IBITS] "IBT", -}; - -char *ldlm_it2str(int it) -{ - switch (it) { - case IT_OPEN: - return "open"; - case IT_CREAT: - return "creat"; - case (IT_OPEN | IT_CREAT): - return "open|creat"; - case IT_READDIR: - return "readdir"; - case IT_GETATTR: - return "getattr"; - case IT_LOOKUP: - return "lookup"; - case IT_UNLINK: - return "unlink"; - case IT_GETXATTR: - return "getxattr"; - default: - CERROR("Unknown intent %d\n", it); - return "UNKNOWN"; - } -} - -extern cfs_mem_cache_t *ldlm_lock_slab; - -static ldlm_processing_policy ldlm_processing_policy_table[] = { - [LDLM_PLAIN] ldlm_process_plain_lock, - [LDLM_EXTENT] ldlm_process_extent_lock, -#ifdef __KERNEL__ - [LDLM_FLOCK] ldlm_process_flock_lock, -#endif - [LDLM_IBITS] ldlm_process_inodebits_lock, -}; - -ldlm_processing_policy ldlm_get_processing_policy(struct ldlm_resource *res) -{ - return ldlm_processing_policy_table[res->lr_type]; -} - -void ldlm_register_intent(struct ldlm_namespace *ns, ldlm_res_policy arg) -{ - ns->ns_policy = arg; -} - -/* - * REFCOUNTED LOCK OBJECTS - */ - - -/* - * Lock refcounts, during creation: - * - one special one for allocation, dec'd only once in destroy - * - one for being a lock that's in-use - * - one for the addref associated with a new lock - */ -struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock) -{ - atomic_inc(&lock->l_refc); - return lock; -} - -static void ldlm_lock_free(struct ldlm_lock *lock, size_t size) -{ - LASSERT(size == sizeof(*lock)); - OBD_SLAB_FREE(lock, ldlm_lock_slab, sizeof(*lock)); -} - -void ldlm_lock_put(struct ldlm_lock *lock) -{ - ENTRY; - - LASSERT(lock->l_resource != LP_POISON); - LASSERT(atomic_read(&lock->l_refc) > 0); - if (atomic_dec_and_test(&lock->l_refc)) { - struct ldlm_resource *res; - - LDLM_DEBUG(lock, "final lock_put on destroyed lock, freeing it."); - - res = lock->l_resource; - LASSERT(lock->l_destroyed); - LASSERT(list_empty(&lock->l_res_link)); - LASSERT(list_empty(&lock->l_pending_chain)); - - atomic_dec(&res->lr_namespace->ns_locks); - ldlm_resource_putref(res); - lock->l_resource = NULL; - if (lock->l_export) { - class_export_put(lock->l_export); - lock->l_export = NULL; - } - - if (lock->l_lvb_data != NULL) - OBD_FREE(lock->l_lvb_data, lock->l_lvb_len); - - ldlm_interval_free(ldlm_interval_detach(lock)); - OBD_FREE_RCU_CB(lock, sizeof(*lock), &lock->l_handle, - ldlm_lock_free); - } - - EXIT; -} - -int ldlm_lock_remove_from_lru_nolock(struct ldlm_lock *lock) -{ - int rc = 0; - if (!list_empty(&lock->l_lru)) { - struct ldlm_namespace *ns = lock->l_resource->lr_namespace; - LASSERT(lock->l_resource->lr_type != LDLM_FLOCK); - list_del_init(&lock->l_lru); - ns->ns_nr_unused--; - LASSERT(ns->ns_nr_unused >= 0); - rc = 1; - } - return rc; -} - -int ldlm_lock_remove_from_lru(struct ldlm_lock *lock) -{ - struct ldlm_namespace *ns = lock->l_resource->lr_namespace; - int rc; - ENTRY; - spin_lock(&ns->ns_unused_lock); - rc = ldlm_lock_remove_from_lru_nolock(lock); - spin_unlock(&ns->ns_unused_lock); - EXIT; - return rc; -} - -void ldlm_lock_add_to_lru_nolock(struct ldlm_lock *lock) -{ - struct ldlm_namespace *ns = lock->l_resource->lr_namespace; - lock->l_last_used = cfs_time_current(); - LASSERT(list_empty(&lock->l_lru)); - list_add_tail(&lock->l_lru, &ns->ns_unused_list); - LASSERT(ns->ns_nr_unused >= 0); - ns->ns_nr_unused++; -} - -void ldlm_lock_add_to_lru(struct ldlm_lock *lock) -{ - struct ldlm_namespace *ns = lock->l_resource->lr_namespace; - ENTRY; - spin_lock(&ns->ns_unused_lock); - ldlm_lock_add_to_lru_nolock(lock); - spin_unlock(&ns->ns_unused_lock); - EXIT; -} - -void ldlm_lock_touch_in_lru(struct ldlm_lock *lock) -{ - struct ldlm_namespace *ns = lock->l_resource->lr_namespace; - ENTRY; - spin_lock(&ns->ns_unused_lock); - if (!list_empty(&lock->l_lru)) { - ldlm_lock_remove_from_lru_nolock(lock); - ldlm_lock_add_to_lru_nolock(lock); - } - spin_unlock(&ns->ns_unused_lock); - EXIT; -} - -/* This used to have a 'strict' flag, which recovery would use to mark an - * in-use lock as needing-to-die. Lest I am ever tempted to put it back, I - * shall explain why it's gone: with the new hash table scheme, once you call - * ldlm_lock_destroy, you can never drop your final references on this lock. - * Because it's not in the hash table anymore. -phil */ -int ldlm_lock_destroy_internal(struct ldlm_lock *lock) -{ - ENTRY; - - if (lock->l_readers || lock->l_writers) { - LDLM_ERROR(lock, "lock still has references"); - ldlm_lock_dump(D_ERROR, lock, 0); - LBUG(); - } - - if (!list_empty(&lock->l_res_link)) { - LDLM_ERROR(lock, "lock still on resource"); - ldlm_lock_dump(D_ERROR, lock, 0); - LBUG(); - } - - if (lock->l_destroyed) { - LASSERT(list_empty(&lock->l_lru)); - EXIT; - return 0; - } - lock->l_destroyed = 1; - - if (lock->l_export) - spin_lock(&lock->l_export->exp_ldlm_data.led_lock); - list_del_init(&lock->l_export_chain); - if (lock->l_export) - spin_unlock(&lock->l_export->exp_ldlm_data.led_lock); - - ldlm_lock_remove_from_lru(lock); - class_handle_unhash(&lock->l_handle); - -#if 0 - /* Wake anyone waiting for this lock */ - /* FIXME: I should probably add yet another flag, instead of using - * l_export to only call this on clients */ - if (lock->l_export) - class_export_put(lock->l_export); - lock->l_export = NULL; - if (lock->l_export && lock->l_completion_ast) - lock->l_completion_ast(lock, 0); -#endif - EXIT; - return 1; -} - -void ldlm_lock_destroy(struct ldlm_lock *lock) -{ - int first; - ENTRY; - lock_res_and_lock(lock); - first = ldlm_lock_destroy_internal(lock); - unlock_res_and_lock(lock); - - /* drop reference from hashtable only for first destroy */ - if (first) - LDLM_LOCK_PUT(lock); - EXIT; -} - -void ldlm_lock_destroy_nolock(struct ldlm_lock *lock) -{ - int first; - ENTRY; - first = ldlm_lock_destroy_internal(lock); - /* drop reference from hashtable only for first destroy */ - if (first) - LDLM_LOCK_PUT(lock); - EXIT; -} - -/* this is called by portals_handle2object with the handle lock taken */ -static void lock_handle_addref(void *lock) -{ - LDLM_LOCK_GET((struct ldlm_lock *)lock); -} - -/* - * usage: pass in a resource on which you have done ldlm_resource_get - * pass in a parent lock on which you have done a ldlm_lock_get - * after return, ldlm_*_put the resource and parent - * returns: lock with refcount 2 - one for current caller and one for remote - */ -static struct ldlm_lock *ldlm_lock_new(struct ldlm_resource *resource) -{ - struct ldlm_lock *lock; - ENTRY; - - if (resource == NULL) - LBUG(); - - OBD_SLAB_ALLOC(lock, ldlm_lock_slab, CFS_ALLOC_IO, sizeof(*lock)); - if (lock == NULL) - RETURN(NULL); - - spin_lock_init(&lock->l_lock); - lock->l_resource = ldlm_resource_getref(resource); - - atomic_set(&lock->l_refc, 2); - CFS_INIT_LIST_HEAD(&lock->l_res_link); - CFS_INIT_LIST_HEAD(&lock->l_lru); - CFS_INIT_LIST_HEAD(&lock->l_export_chain); - CFS_INIT_LIST_HEAD(&lock->l_pending_chain); - CFS_INIT_LIST_HEAD(&lock->l_bl_ast); - CFS_INIT_LIST_HEAD(&lock->l_cp_ast); - cfs_waitq_init(&lock->l_waitq); - lock->l_blocking_lock = NULL; - lock->l_sl_mode.prev = NULL; - lock->l_sl_mode.next = NULL; - lock->l_sl_policy.prev = NULL; - lock->l_sl_policy.next = NULL; - - atomic_inc(&resource->lr_namespace->ns_locks); - CFS_INIT_LIST_HEAD(&lock->l_handle.h_link); - class_handle_hash(&lock->l_handle, lock_handle_addref); - - CFS_INIT_LIST_HEAD(&lock->l_extents_list); - spin_lock_init(&lock->l_extents_list_lock); - CFS_INIT_LIST_HEAD(&lock->l_cache_locks_list); - - RETURN(lock); -} - -int ldlm_lock_change_resource(struct ldlm_namespace *ns, struct ldlm_lock *lock, - struct ldlm_res_id new_resid) -{ - struct ldlm_resource *oldres = lock->l_resource; - struct ldlm_resource *newres; - int type; - ENTRY; - - LASSERT(ns_is_client(ns)); - - lock_res_and_lock(lock); - if (memcmp(&new_resid, &lock->l_resource->lr_name, - sizeof(lock->l_resource->lr_name)) == 0) { - /* Nothing to do */ - unlock_res_and_lock(lock); - RETURN(0); - } - - LASSERT(new_resid.name[0] != 0); - - /* This function assumes that the lock isn't on any lists */ - LASSERT(list_empty(&lock->l_res_link)); - - type = oldres->lr_type; - unlock_res_and_lock(lock); - - newres = ldlm_resource_get(ns, NULL, new_resid, type, 1); - if (newres == NULL) { - LBUG(); - RETURN(-ENOMEM); - } - - lock_res_and_lock(lock); - LASSERT(memcmp(&new_resid, &lock->l_resource->lr_name, - sizeof(lock->l_resource->lr_name)) != 0); - lock_res(newres); - lock->l_resource = newres; - unlock_res(oldres); - unlock_res_and_lock(lock); - - /* ...and the flowers are still standing! */ - ldlm_resource_putref(oldres); - - RETURN(0); -} - -/* - * HANDLES - */ - -void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh) -{ - lockh->cookie = lock->l_handle.h_cookie; -} - -/* if flags: atomically get the lock and set the flags. - * Return NULL if flag already set - */ - -struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *handle, int flags) -{ - struct ldlm_namespace *ns; - struct ldlm_lock *lock = NULL, *retval = NULL; - ENTRY; - - LASSERT(handle); - - lock = class_handle2object(handle->cookie); - if (lock == NULL) - RETURN(NULL); - - LASSERT(lock->l_resource != NULL); - ns = lock->l_resource->lr_namespace; - LASSERT(ns != NULL); - - lock_res_and_lock(lock); - - /* It's unlikely but possible that someone marked the lock as - * destroyed after we did handle2object on it */ - if (lock->l_destroyed) { - unlock_res_and_lock(lock); - CDEBUG(D_INFO, "lock already destroyed: lock %p\n", lock); - LDLM_LOCK_PUT(lock); - GOTO(out, retval); - } - - if (flags && (lock->l_flags & flags)) { - unlock_res_and_lock(lock); - LDLM_LOCK_PUT(lock); - GOTO(out, retval); - } - - if (flags) - lock->l_flags |= flags; - - unlock_res_and_lock(lock); - retval = lock; - EXIT; - out: - return retval; -} - -struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *ns, - struct lustre_handle *handle) -{ - struct ldlm_lock *retval = NULL; - retval = __ldlm_handle2lock(handle, 0); - return retval; -} - -void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc) -{ - struct obd_export *exp = lock->l_export?:lock->l_conn_export; - /* INODEBITS_INTEROP: If the other side does not support - * inodebits, reply with a plain lock descriptor. - */ - if ((lock->l_resource->lr_type == LDLM_IBITS) && - (exp && !(exp->exp_connect_flags & OBD_CONNECT_IBITS))) { - struct ldlm_resource res = *lock->l_resource; - - /* Make sure all the right bits are set in this lock we - are going to pass to client */ - LASSERTF(lock->l_policy_data.l_inodebits.bits == - (MDS_INODELOCK_LOOKUP|MDS_INODELOCK_UPDATE), - "Inappropriate inode lock bits during " - "conversion " LPU64 "\n", - lock->l_policy_data.l_inodebits.bits); - res.lr_type = LDLM_PLAIN; - ldlm_res2desc(&res, &desc->l_resource); - /* Convert "new" lock mode to something old client can - understand */ - if ((lock->l_req_mode == LCK_CR) || - (lock->l_req_mode == LCK_CW)) - desc->l_req_mode = LCK_PR; - else - desc->l_req_mode = lock->l_req_mode; - if ((lock->l_granted_mode == LCK_CR) || - (lock->l_granted_mode == LCK_CW)) { - desc->l_granted_mode = LCK_PR; - } else { - /* We never grant PW/EX locks to clients */ - LASSERT((lock->l_granted_mode != LCK_PW) && - (lock->l_granted_mode != LCK_EX)); - desc->l_granted_mode = lock->l_granted_mode; - } - - /* We do not copy policy here, because there is no - policy for plain locks */ - } else { - ldlm_res2desc(lock->l_resource, &desc->l_resource); - desc->l_req_mode = lock->l_req_mode; - desc->l_granted_mode = lock->l_granted_mode; - desc->l_policy_data = lock->l_policy_data; - } -} - -void ldlm_add_bl_work_item(struct ldlm_lock *lock, struct ldlm_lock *new, - struct list_head *work_list) -{ - if ((lock->l_flags & LDLM_FL_AST_SENT) == 0) { - LDLM_DEBUG(lock, "lock incompatible; sending blocking AST."); - lock->l_flags |= LDLM_FL_AST_SENT; - /* If the enqueuing client said so, tell the AST recipient to - * discard dirty data, rather than writing back. */ - if (new->l_flags & LDLM_AST_DISCARD_DATA) - lock->l_flags |= LDLM_FL_DISCARD_DATA; - LASSERT(list_empty(&lock->l_bl_ast)); - list_add(&lock->l_bl_ast, work_list); - LDLM_LOCK_GET(lock); - LASSERT(lock->l_blocking_lock == NULL); - lock->l_blocking_lock = LDLM_LOCK_GET(new); - } -} - -void ldlm_add_cp_work_item(struct ldlm_lock *lock, struct list_head *work_list) -{ - if ((lock->l_flags & LDLM_FL_CP_REQD) == 0) { - lock->l_flags |= LDLM_FL_CP_REQD; - LDLM_DEBUG(lock, "lock granted; sending completion AST."); - LASSERT(list_empty(&lock->l_cp_ast)); - list_add(&lock->l_cp_ast, work_list); - LDLM_LOCK_GET(lock); - } -} - -/* must be called with lr_lock held */ -void ldlm_add_ast_work_item(struct ldlm_lock *lock, struct ldlm_lock *new, - struct list_head *work_list) -{ - ENTRY; - check_res_locked(lock->l_resource); - if (new) - ldlm_add_bl_work_item(lock, new, work_list); - else - ldlm_add_cp_work_item(lock, work_list); - EXIT; -} - -void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode) -{ - struct ldlm_lock *lock; - - lock = ldlm_handle2lock(lockh); - LASSERT(lock != NULL); - ldlm_lock_addref_internal(lock, mode); - LDLM_LOCK_PUT(lock); -} - -void ldlm_lock_addref_internal_nolock(struct ldlm_lock *lock, __u32 mode) -{ - ldlm_lock_remove_from_lru(lock); - if (mode & (LCK_NL | LCK_CR | LCK_PR)) - lock->l_readers++; - if (mode & (LCK_EX | LCK_CW | LCK_PW | LCK_GROUP)) - lock->l_writers++; - LDLM_LOCK_GET(lock); - LDLM_DEBUG(lock, "ldlm_lock_addref(%s)", ldlm_lockname[mode]); -} - -/* only called for local locks */ -void ldlm_lock_addref_internal(struct ldlm_lock *lock, __u32 mode) -{ - lock_res_and_lock(lock); - ldlm_lock_addref_internal_nolock(lock, mode); - unlock_res_and_lock(lock); -} - -/* only called in ldlm_flock_destroy and for local locks. - * for LDLM_FLOCK type locks, l_blocking_ast is null, and - * ldlm_lock_remove_from_lru() does nothing, it is safe - * for ldlm_flock_destroy usage by dropping some code */ -void ldlm_lock_decref_internal_nolock(struct ldlm_lock *lock, __u32 mode) -{ - LDLM_DEBUG(lock, "ldlm_lock_decref(%s)", ldlm_lockname[mode]); - if (mode & (LCK_NL | LCK_CR | LCK_PR)) { - LASSERT(lock->l_readers > 0); - lock->l_readers--; - } - if (mode & (LCK_EX | LCK_CW | LCK_PW | LCK_GROUP)) { - LASSERT(lock->l_writers > 0); - lock->l_writers--; - } - - LDLM_LOCK_PUT(lock); /* matches the ldlm_lock_get in addref */ -} - -void ldlm_lock_decref_internal(struct ldlm_lock *lock, __u32 mode) -{ - struct ldlm_namespace *ns; - ENTRY; - - lock_res_and_lock(lock); - - ns = lock->l_resource->lr_namespace; - - ldlm_lock_decref_internal_nolock(lock, mode); - - if (lock->l_flags & LDLM_FL_LOCAL && - !lock->l_readers && !lock->l_writers) { - /* If this is a local lock on a server namespace and this was - * the last reference, cancel the lock. */ - CDEBUG(D_INFO, "forcing cancel of local lock\n"); - lock->l_flags |= LDLM_FL_CBPENDING; - } - - if (!lock->l_readers && !lock->l_writers && - (lock->l_flags & LDLM_FL_CBPENDING)) { - /* If we received a blocked AST and this was the last reference, - * run the callback. */ - if (ns_is_server(ns) && lock->l_export) - CERROR("FL_CBPENDING set on non-local lock--just a " - "warning\n"); - - LDLM_DEBUG(lock, "final decref done on cbpending lock"); - - LDLM_LOCK_GET(lock); /* dropped by bl thread */ - ldlm_lock_remove_from_lru(lock); - unlock_res_and_lock(lock); - if ((lock->l_flags & LDLM_FL_ATOMIC_CB) || - ldlm_bl_to_thread_lock(ns, NULL, lock) != 0) - ldlm_handle_bl_callback(ns, NULL, lock); - } else if (ns_is_client(ns) && - !lock->l_readers && !lock->l_writers && - !(lock->l_flags & LDLM_FL_NO_LRU) && - !(lock->l_flags & LDLM_FL_BL_AST)) { - /* If this is a client-side namespace and this was the last - * reference, put it on the LRU. */ - ldlm_lock_add_to_lru(lock); - unlock_res_and_lock(lock); - /* Call ldlm_cancel_lru() only if EARLY_CANCEL and LRU RESIZE - * are not supported by the server, otherwise, it is done on - * enqueue. */ - if (!exp_connect_cancelset(lock->l_conn_export) && - !ns_connect_lru_resize(ns)) - ldlm_cancel_lru(ns, 0, LDLM_ASYNC, 0); - } else { - unlock_res_and_lock(lock); - } - - EXIT; -} - -void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode) -{ - struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0); - LASSERTF(lock != NULL, "Non-existing lock: "LPX64"\n", lockh->cookie); - ldlm_lock_decref_internal(lock, mode); - LDLM_LOCK_PUT(lock); -} - -/* This will drop a lock reference and mark it for destruction, but will not - * necessarily cancel the lock before returning. */ -void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode) -{ - struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0); - ENTRY; - - LASSERT(lock != NULL); - - LDLM_DEBUG(lock, "ldlm_lock_decref(%s)", ldlm_lockname[mode]); - lock_res_and_lock(lock); - lock->l_flags |= LDLM_FL_CBPENDING; - unlock_res_and_lock(lock); - ldlm_lock_decref_internal(lock, mode); - LDLM_LOCK_PUT(lock); -} - -/* - * search_granted_lock - * - * Description: - * Finds a position to insert the new lock. - * Parameters: - * queue [input]: the granted list where search acts on; - * req [input]: the lock whose position to be located; - * lockp [output]: the position where the lock should be inserted before, or - * NULL indicating @req should be appended to @queue. - * Return Values: - * Bit-masks combination of following values indicating in which way the - * lock need to be inserted. - * - LDLM_JOIN_NONE: noting about skip list needs to be fixed; - * - LDLM_MODE_JOIN_RIGHT: @req needs join right becoming the head of a - * mode group; - * - LDLM_POLICY_JOIN_RIGHT: @req needs join right becoming the head of - * a policy group. - * NOTE: called by - * - ldlm_grant_lock_with_skiplist - */ -static int search_granted_lock(struct list_head *queue, - struct ldlm_lock *req, - struct ldlm_lock **lockp) -{ - struct list_head *tmp, *tmp_tail; - struct ldlm_lock *lock, *mode_head_lock; - int rc = LDLM_JOIN_NONE; - ENTRY; - - list_for_each(tmp, queue) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (lock->l_req_mode != req->l_req_mode) { - if (LDLM_SL_HEAD(&lock->l_sl_mode)) - tmp = &list_entry(lock->l_sl_mode.next, - struct ldlm_lock, - l_sl_mode)->l_res_link; - continue; - } - - /* found the same mode group */ - if (lock->l_resource->lr_type == LDLM_PLAIN) { - *lockp = lock; - rc = LDLM_MODE_JOIN_RIGHT; - GOTO(out, rc); - } else if (lock->l_resource->lr_type == LDLM_IBITS) { - tmp_tail = tmp; - if (LDLM_SL_HEAD(&lock->l_sl_mode)) - tmp_tail = &list_entry(lock->l_sl_mode.next, - struct ldlm_lock, - l_sl_mode)->l_res_link; - mode_head_lock = lock; - for (;;) { - if (lock->l_policy_data.l_inodebits.bits == - req->l_policy_data.l_inodebits.bits) { - /* matched policy lock is found */ - *lockp = lock; - rc |= LDLM_POLICY_JOIN_RIGHT; - - /* if the policy group head is also a - * mode group head or a single mode - * group lock */ - if (LDLM_SL_HEAD(&lock->l_sl_mode) || - (tmp == tmp_tail && - LDLM_SL_EMPTY(&lock->l_sl_mode))) - rc |= LDLM_MODE_JOIN_RIGHT; - GOTO(out, rc); - } - - if (LDLM_SL_HEAD(&lock->l_sl_policy)) - tmp = &list_entry(lock->l_sl_policy.next, - struct ldlm_lock, - l_sl_policy)->l_res_link; - - if (tmp == tmp_tail) - break; - else - tmp = tmp->next; - lock = list_entry(tmp, struct ldlm_lock, - l_res_link); - } /* for all locks in the matched mode group */ - - /* no matched policy group is found, insert before - * the mode group head lock */ - *lockp = mode_head_lock; - rc = LDLM_MODE_JOIN_RIGHT; - GOTO(out, rc); - } else { - LDLM_ERROR(lock, "is not LDLM_PLAIN or LDLM_IBITS lock"); - LBUG(); - } - } - - /* no matched mode group is found, append to the end */ - *lockp = NULL; - rc = LDLM_JOIN_NONE; - EXIT; -out: - return rc; -} - -static void ldlm_granted_list_add_lock(struct ldlm_lock *lock, - struct ldlm_lock *lockp, - int join) -{ - struct ldlm_resource *res = lock->l_resource; - ENTRY; - - LASSERT(lockp || join == LDLM_JOIN_NONE); - - check_res_locked(res); - - ldlm_resource_dump(D_OTHER, res); - CDEBUG(D_OTHER, "About to add this lock:\n"); - ldlm_lock_dump(D_OTHER, lock, 0); - - if (lock->l_destroyed) { - CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n"); - return; - } - - LASSERT(list_empty(&lock->l_res_link)); - - if (!lockp) - list_add_tail(&lock->l_res_link, &lock->l_resource->lr_granted); - else if ((join & LDLM_MODE_JOIN_LEFT) || (join & LDLM_POLICY_JOIN_LEFT)) - list_add(&lock->l_res_link, &lockp->l_res_link); - else - list_add_tail(&lock->l_res_link, &lockp->l_res_link); - - /* fix skip lists */ - if (join & LDLM_MODE_JOIN_RIGHT) { - LASSERT(! LDLM_SL_TAIL(&lockp->l_sl_mode)); - if (LDLM_SL_EMPTY(&lockp->l_sl_mode)) { - lock->l_sl_mode.next = &lockp->l_sl_mode; - lockp->l_sl_mode.prev = &lock->l_sl_mode; - } else if (LDLM_SL_HEAD(&lockp->l_sl_mode)) { - lock->l_sl_mode.next = lockp->l_sl_mode.next; - lockp->l_sl_mode.next = NULL; - lock->l_sl_mode.next->prev = &lock->l_sl_mode; - } - } else if (join & LDLM_MODE_JOIN_LEFT) { - LASSERT(! LDLM_SL_HEAD(&lockp->l_sl_mode)); - if (LDLM_SL_EMPTY(&lockp->l_sl_mode)) { - lock->l_sl_mode.prev = &lockp->l_sl_mode; - lockp->l_sl_mode.next = &lock->l_sl_mode; - } else if (LDLM_SL_TAIL(&lockp->l_sl_mode)) { - lock->l_sl_mode.prev = lockp->l_sl_mode.prev; - lockp->l_sl_mode.prev = NULL; - lock->l_sl_mode.prev->next = &lock->l_sl_mode; - } - } - - if (join & LDLM_POLICY_JOIN_RIGHT) { - LASSERT(! LDLM_SL_TAIL(&lockp->l_sl_policy)); - if (LDLM_SL_EMPTY(&lockp->l_sl_policy)) { - lock->l_sl_policy.next = &lockp->l_sl_policy; - lockp->l_sl_policy.prev = &lock->l_sl_policy; - } else if (LDLM_SL_HEAD(&lockp->l_sl_policy)) { - lock->l_sl_policy.next = lockp->l_sl_policy.next; - lockp->l_sl_policy.next = NULL; - lock->l_sl_policy.next->prev = &lock->l_sl_policy; - } - } else if (join & LDLM_POLICY_JOIN_LEFT) { - LASSERT(! LDLM_SL_HEAD(&lockp->l_sl_policy)); - if (LDLM_SL_EMPTY(&lockp->l_sl_policy)) { - lock->l_sl_policy.prev = &lockp->l_sl_policy; - lockp->l_sl_policy.next = &lock->l_sl_policy; - } else if (LDLM_SL_TAIL(&lockp->l_sl_policy)) { - lock->l_sl_policy.prev = lockp->l_sl_policy.prev; - lockp->l_sl_policy.prev = NULL; - lock->l_sl_policy.prev->next = &lock->l_sl_policy; - } - } - - EXIT; -} - -static void ldlm_grant_lock_with_skiplist(struct ldlm_lock *lock) -{ - int join = LDLM_JOIN_NONE; - struct ldlm_lock *lockp = NULL; - ENTRY; - - LASSERT(lock->l_req_mode == lock->l_granted_mode); - - join = search_granted_lock(&lock->l_resource->lr_granted, lock, &lockp); - ldlm_granted_list_add_lock(lock, lockp, join); - EXIT; -} - -/* NOTE: called by - * - ldlm_lock_enqueue - * - ldlm_reprocess_queue - * - ldlm_lock_convert - * - * must be called with lr_lock held - */ -void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list) -{ - struct ldlm_resource *res = lock->l_resource; - ENTRY; - - check_res_locked(res); - - lock->l_granted_mode = lock->l_req_mode; - if (res->lr_type == LDLM_PLAIN || res->lr_type == LDLM_IBITS) - ldlm_grant_lock_with_skiplist(lock); - else if (res->lr_type == LDLM_EXTENT) - ldlm_extent_add_lock(res, lock); - else - ldlm_resource_add_lock(res, &res->lr_granted, lock); - - if (lock->l_granted_mode < res->lr_most_restr) - res->lr_most_restr = lock->l_granted_mode; - - if (work_list && lock->l_completion_ast != NULL) - ldlm_add_ast_work_item(lock, NULL, work_list); - - ldlm_pool_add(&res->lr_namespace->ns_pool, lock); - EXIT; -} - -/* returns a referenced lock or NULL. See the flag descriptions below, in the - * comment above ldlm_lock_match */ -static struct ldlm_lock *search_queue(struct list_head *queue, - ldlm_mode_t *mode, - ldlm_policy_data_t *policy, - struct ldlm_lock *old_lock, int flags) -{ - struct ldlm_lock *lock; - struct list_head *tmp; - - list_for_each(tmp, queue) { - ldlm_mode_t match; - - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (lock == old_lock) - continue; - - /* llite sometimes wants to match locks that will be - * canceled when their users drop, but we allow it to match - * if it passes in CBPENDING and the lock still has users. - * this is generally only going to be used by children - * whose parents already hold a lock so forward progress - * can still happen. */ - if (lock->l_flags & LDLM_FL_CBPENDING && - !(flags & LDLM_FL_CBPENDING)) - continue; - if (lock->l_flags & LDLM_FL_CBPENDING && - lock->l_readers == 0 && lock->l_writers == 0) - continue; - - if (!(lock->l_req_mode & *mode)) - continue; - - match = lock->l_req_mode; - if (lock->l_resource->lr_type == LDLM_EXTENT && - (lock->l_policy_data.l_extent.start > - policy->l_extent.start || - lock->l_policy_data.l_extent.end < policy->l_extent.end)) - continue; - - if (unlikely(match == LCK_GROUP) && - lock->l_resource->lr_type == LDLM_EXTENT && - lock->l_policy_data.l_extent.gid != policy->l_extent.gid) - continue; - - /* We match if we have existing lock with same or wider set - of bits. */ - if (lock->l_resource->lr_type == LDLM_IBITS && - ((lock->l_policy_data.l_inodebits.bits & - policy->l_inodebits.bits) != - policy->l_inodebits.bits)) - continue; - - if (lock->l_destroyed || (lock->l_flags & LDLM_FL_FAILED)) - continue; - - if ((flags & LDLM_FL_LOCAL_ONLY) && - !(lock->l_flags & LDLM_FL_LOCAL)) - continue; - - if (flags & LDLM_FL_TEST_LOCK) { - LDLM_LOCK_GET(lock); - ldlm_lock_touch_in_lru(lock); - } else { - ldlm_lock_addref_internal_nolock(lock, match); - } - *mode = match; - return lock; - } - - return NULL; -} - -void ldlm_lock_allow_match(struct ldlm_lock *lock) -{ - lock_res_and_lock(lock); - lock->l_flags |= LDLM_FL_LVB_READY; - cfs_waitq_signal(&lock->l_waitq); - unlock_res_and_lock(lock); -} - -/* Can be called in two ways: - * - * If 'ns' is NULL, then lockh describes an existing lock that we want to look - * for a duplicate of. - * - * Otherwise, all of the fields must be filled in, to match against. - * - * If 'flags' contains LDLM_FL_LOCAL_ONLY, then only match local locks on the - * server (ie, connh is NULL) - * If 'flags' contains LDLM_FL_BLOCK_GRANTED, then only locks on the granted - * list will be considered - * If 'flags' contains LDLM_FL_CBPENDING, then locks that have been marked - * to be canceled can still be matched as long as they still have reader - * or writer refernces - * If 'flags' contains LDLM_FL_TEST_LOCK, then don't actually reference a lock, - * just tell us if we would have matched. - * - * Returns 1 if it finds an already-existing lock that is compatible; in this - * case, lockh is filled in with a addref()ed lock - */ -ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, int flags, - struct ldlm_res_id *res_id, ldlm_type_t type, - ldlm_policy_data_t *policy, ldlm_mode_t mode, - struct lustre_handle *lockh) -{ - struct ldlm_resource *res; - struct ldlm_lock *lock, *old_lock = NULL; - int rc = 0; - ENTRY; - - if (ns == NULL) { - old_lock = ldlm_handle2lock(lockh); - LASSERT(old_lock); - - ns = old_lock->l_resource->lr_namespace; - res_id = &old_lock->l_resource->lr_name; - type = old_lock->l_resource->lr_type; - mode = old_lock->l_req_mode; - } - - res = ldlm_resource_get(ns, NULL, *res_id, type, 0); - if (res == NULL) { - LASSERT(old_lock == NULL); - RETURN(0); - } - - lock_res(res); - - lock = search_queue(&res->lr_granted, &mode, policy, old_lock, flags); - if (lock != NULL) - GOTO(out, rc = 1); - if (flags & LDLM_FL_BLOCK_GRANTED) - GOTO(out, rc = 0); - lock = search_queue(&res->lr_converting, &mode, policy, old_lock, flags); - if (lock != NULL) - GOTO(out, rc = 1); - lock = search_queue(&res->lr_waiting, &mode, policy, old_lock, flags); - if (lock != NULL) - GOTO(out, rc = 1); - - EXIT; - out: - unlock_res(res); - ldlm_resource_putref(res); - - if (lock) { - ldlm_lock2handle(lock, lockh); - if ((flags & LDLM_FL_LVB_READY) && (!(lock->l_flags & LDLM_FL_LVB_READY))) { - struct l_wait_info lwi; - if (lock->l_completion_ast) { - int err = lock->l_completion_ast(lock, - LDLM_FL_WAIT_NOREPROC, - NULL); - if (err) { - if (flags & LDLM_FL_TEST_LOCK) - LDLM_LOCK_PUT(lock); - else - ldlm_lock_decref_internal(lock, mode); - rc = 0; - goto out2; - } - } - - lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(obd_timeout), NULL, - LWI_ON_SIGNAL_NOOP, NULL); - - /* XXX FIXME see comment on CAN_MATCH in lustre_dlm.h */ - l_wait_event(lock->l_waitq, - (lock->l_flags & LDLM_FL_LVB_READY), &lwi); - } - } - out2: - if (rc) { - LDLM_DEBUG(lock, "matched ("LPU64" "LPU64")", - (type == LDLM_PLAIN || type == LDLM_IBITS) ? - res_id->name[2] : policy->l_extent.start, - (type == LDLM_PLAIN || type == LDLM_IBITS) ? - res_id->name[3] : policy->l_extent.end); - } else if (!(flags & LDLM_FL_TEST_LOCK)) {/*less verbose for test-only*/ - LDLM_DEBUG_NOLOCK("not matched ns %p type %u mode %u res " - LPU64"/"LPU64" ("LPU64" "LPU64")", ns, - type, mode, res_id->name[0], res_id->name[1], - (type == LDLM_PLAIN || type == LDLM_IBITS) ? - res_id->name[2] :policy->l_extent.start, - (type == LDLM_PLAIN || type == LDLM_IBITS) ? - res_id->name[3] : policy->l_extent.end); - } - if (old_lock) - LDLM_LOCK_PUT(old_lock); - if (flags & LDLM_FL_TEST_LOCK && rc) - LDLM_LOCK_PUT(lock); - - return rc ? mode : 0; -} - -/* Returns a referenced lock */ -struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns, - struct ldlm_res_id res_id, ldlm_type_t type, - ldlm_mode_t mode, - ldlm_blocking_callback blocking, - ldlm_completion_callback completion, - ldlm_glimpse_callback glimpse, - void *data, __u32 lvb_len) -{ - struct ldlm_lock *lock; - struct ldlm_resource *res; - ENTRY; - - res = ldlm_resource_get(ns, NULL, res_id, type, 1); - if (res == NULL) - RETURN(NULL); - - lock = ldlm_lock_new(res); - ldlm_resource_putref(res); - - if (lock == NULL) - RETURN(NULL); - - lock->l_req_mode = mode; - lock->l_ast_data = data; - lock->l_blocking_ast = blocking; - lock->l_completion_ast = completion; - lock->l_glimpse_ast = glimpse; - lock->l_pid = cfs_curproc_pid(); - - lock->l_tree_node = NULL; - /* if this is the extent lock, allocate the interval tree node */ - if (type == LDLM_EXTENT) { - if (ldlm_interval_alloc(lock) == NULL) - GOTO(out, 0); - } - - if (lvb_len) { - lock->l_lvb_len = lvb_len; - OBD_ALLOC(lock->l_lvb_data, lvb_len); - if (lock->l_lvb_data == NULL) - GOTO(out, 0); - } - - RETURN(lock); - -out: - if (lock->l_lvb_data) - OBD_FREE(lock->l_lvb_data, lvb_len); - ldlm_interval_free(ldlm_interval_detach(lock)); - OBD_SLAB_FREE(lock, ldlm_lock_slab, sizeof(*lock)); - return NULL; -} - -ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *ns, - struct ldlm_lock **lockp, - void *cookie, int *flags) -{ - struct ldlm_lock *lock = *lockp; - struct ldlm_resource *res = lock->l_resource; - int local = ns_is_client(res->lr_namespace); - ldlm_processing_policy policy; - ldlm_error_t rc = ELDLM_OK; - struct ldlm_interval *node = NULL; - ENTRY; - - do_gettimeofday(&lock->l_enqueued_time); - /* policies are not executed on the client or during replay */ - if ((*flags & (LDLM_FL_HAS_INTENT|LDLM_FL_REPLAY)) == LDLM_FL_HAS_INTENT - && !local && ns->ns_policy) { - rc = ns->ns_policy(ns, lockp, cookie, lock->l_req_mode, *flags, - NULL); - if (rc == ELDLM_LOCK_REPLACED) { - /* The lock that was returned has already been granted, - * and placed into lockp. If it's not the same as the - * one we passed in, then destroy the old one and our - * work here is done. */ - if (lock != *lockp) { - ldlm_lock_destroy(lock); - LDLM_LOCK_PUT(lock); - } - *flags |= LDLM_FL_LOCK_CHANGED; - RETURN(0); - } else if (rc != ELDLM_OK || - (rc == ELDLM_OK && (*flags & LDLM_FL_INTENT_ONLY))) { - ldlm_lock_destroy(lock); - RETURN(rc); - } - } - - /* For a replaying lock, it might be already in granted list. So - * unlinking the lock will cause the interval node to be freed, we - * have to allocate the interval node early otherwise we can't regrant - * this lock in the future. - jay */ - if (!local && (*flags & LDLM_FL_REPLAY) && res->lr_type == LDLM_EXTENT) - OBD_SLAB_ALLOC(node, ldlm_interval_slab, CFS_ALLOC_IO, - sizeof(*node)); - - lock_res_and_lock(lock); - if (local && lock->l_req_mode == lock->l_granted_mode) { - /* The server returned a blocked lock, but it was granted - * before we got a chance to actually enqueue it. We don't - * need to do anything else. */ - *flags &= ~(LDLM_FL_BLOCK_GRANTED | - LDLM_FL_BLOCK_CONV | LDLM_FL_BLOCK_WAIT); - GOTO(out, ELDLM_OK); - } - - ldlm_resource_unlink_lock(lock); - if (res->lr_type == LDLM_EXTENT && lock->l_tree_node == NULL) { - if (node == NULL) { - ldlm_lock_destroy_nolock(lock); - GOTO(out, rc = -ENOMEM); - } - - CFS_INIT_LIST_HEAD(&node->li_group); - ldlm_interval_attach(node, lock); - node = NULL; - } - - /* Some flags from the enqueue want to make it into the AST, via the - * lock's l_flags. */ - lock->l_flags |= *flags & LDLM_AST_DISCARD_DATA; - - /* This distinction between local lock trees is very important; a client - * namespace only has information about locks taken by that client, and - * thus doesn't have enough information to decide for itself if it can - * be granted (below). In this case, we do exactly what the server - * tells us to do, as dictated by the 'flags'. - * - * We do exactly the same thing during recovery, when the server is - * more or less trusting the clients not to lie. - * - * FIXME (bug 268): Detect obvious lies by checking compatibility in - * granted/converting queues. */ - if (local) { - if (*flags & LDLM_FL_BLOCK_CONV) - ldlm_resource_add_lock(res, &res->lr_converting, lock); - else if (*flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED)) - ldlm_resource_add_lock(res, &res->lr_waiting, lock); - else - ldlm_grant_lock(lock, NULL); - GOTO(out, ELDLM_OK); - } else if (*flags & LDLM_FL_REPLAY) { - if (*flags & LDLM_FL_BLOCK_CONV) { - ldlm_resource_add_lock(res, &res->lr_converting, lock); - GOTO(out, ELDLM_OK); - } else if (*flags & LDLM_FL_BLOCK_WAIT) { - ldlm_resource_add_lock(res, &res->lr_waiting, lock); - GOTO(out, ELDLM_OK); - } else if (*flags & LDLM_FL_BLOCK_GRANTED) { - ldlm_grant_lock(lock, NULL); - GOTO(out, ELDLM_OK); - } - /* If no flags, fall through to normal enqueue path. */ - } - - policy = ldlm_processing_policy_table[res->lr_type]; - policy(lock, flags, 1, &rc, NULL); - GOTO(out, rc); -out: - unlock_res_and_lock(lock); - if (node) - OBD_SLAB_FREE(node, ldlm_interval_slab, sizeof(*node)); - return rc; -} - -/* Must be called with namespace taken: queue is waiting or converting. */ -int ldlm_reprocess_queue(struct ldlm_resource *res, struct list_head *queue, - struct list_head *work_list) -{ - struct list_head *tmp, *pos; - ldlm_processing_policy policy; - int flags; - int rc = LDLM_ITER_CONTINUE; - ldlm_error_t err; - ENTRY; - - check_res_locked(res); - - policy = ldlm_processing_policy_table[res->lr_type]; - LASSERT(policy); - - list_for_each_safe(tmp, pos, queue) { - struct ldlm_lock *pending; - pending = list_entry(tmp, struct ldlm_lock, l_res_link); - - CDEBUG(D_INFO, "Reprocessing lock %p\n", pending); - - flags = 0; - rc = policy(pending, &flags, 0, &err, work_list); - if (rc != LDLM_ITER_CONTINUE) - break; - } - - RETURN(rc); -} - -/* Helper function for pair ldlm_run_{bl,cp}_ast_work(). - * - * Send an existing rpc set specified by @arg->set and then - * destroy it. Create new one if @do_create flag is set. */ -static void -ldlm_send_and_maybe_create_set(struct ldlm_cb_set_arg *arg, int do_create) -{ - int rc; - - rc = ptlrpc_set_wait(arg->set); - if (arg->type == LDLM_BL_CALLBACK) - OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_GLIMPSE, 2); - ptlrpc_set_destroy(arg->set); - - if (do_create) - arg->set = ptlrpc_prep_set(); -} - -int ldlm_run_bl_ast_work(struct list_head *rpc_list) -{ - struct ldlm_cb_set_arg arg; - struct list_head *tmp, *pos; - struct ldlm_lock_desc d; - int ast_count; - int rc = 0; - ENTRY; - - arg.set = ptlrpc_prep_set(); - atomic_set(&arg.restart, 0); - arg.type = LDLM_BL_CALLBACK; - - ast_count = 0; - list_for_each_safe(tmp, pos, rpc_list) { - struct ldlm_lock *lock = - list_entry(tmp, struct ldlm_lock, l_bl_ast); - - /* nobody should touch l_bl_ast */ - lock_res_and_lock(lock); - list_del_init(&lock->l_bl_ast); - - LASSERT(lock->l_flags & LDLM_FL_AST_SENT); - LASSERT(lock->l_bl_ast_run == 0); - LASSERT(lock->l_blocking_lock); - lock->l_bl_ast_run++; - unlock_res_and_lock(lock); - - ldlm_lock2desc(lock->l_blocking_lock, &d); - - LDLM_LOCK_PUT(lock->l_blocking_lock); - lock->l_blocking_lock = NULL; - rc = lock->l_blocking_ast(lock, &d, (void *)&arg, - LDLM_CB_BLOCKING); - LDLM_LOCK_PUT(lock); - ast_count++; - - /* Send the request set if it exceeds the PARALLEL_AST_LIMIT, - * and create a new set for requests that remained in - * @rpc_list */ - if (unlikely(ast_count == PARALLEL_AST_LIMIT)) { - ldlm_send_and_maybe_create_set(&arg, 1); - ast_count = 0; - } - } - - if (ast_count > 0) - ldlm_send_and_maybe_create_set(&arg, 0); - else - /* In case when number of ASTs is multiply of - * PARALLEL_AST_LIMIT or @rpc_list was initially empty, - * @arg.set must be destroyed here, otherwise we get - * write memory leaking. */ - ptlrpc_set_destroy(arg.set); - - RETURN(atomic_read(&arg.restart) ? -ERESTART : 0); -} - -int ldlm_run_cp_ast_work(struct list_head *rpc_list) -{ - struct ldlm_cb_set_arg arg; - struct list_head *tmp, *pos; - int ast_count; - int rc = 0; - ENTRY; - - arg.set = ptlrpc_prep_set(); - atomic_set(&arg.restart, 0); - arg.type = LDLM_CP_CALLBACK; - - /* It's possible to receive a completion AST before we've set - * the l_completion_ast pointer: either because the AST arrived - * before the reply, or simply because there's a small race - * window between receiving the reply and finishing the local - * enqueue. (bug 842) - * - * This can't happen with the blocking_ast, however, because we - * will never call the local blocking_ast until we drop our - * reader/writer reference, which we won't do until we get the - * reply and finish enqueueing. */ - - ast_count = 0; - list_for_each_safe(tmp, pos, rpc_list) { - struct ldlm_lock *lock = - list_entry(tmp, struct ldlm_lock, l_cp_ast); - ldlm_completion_callback completion_callback; - - /* nobody should touch l_cp_ast */ - lock_res_and_lock(lock); - list_del_init(&lock->l_cp_ast); - LASSERT(lock->l_flags & LDLM_FL_CP_REQD); - /* save l_completion_ast since it can be changed by - * mds_intent_policy(), see bug 14225 */ - completion_callback = lock->l_completion_ast; - lock->l_flags &= ~LDLM_FL_CP_REQD; - unlock_res_and_lock(lock); - - if (completion_callback != NULL) { - rc = completion_callback(lock, 0, (void *)&arg); - ast_count++; - } - LDLM_LOCK_PUT(lock); - - /* Send the request set if it exceeds the PARALLEL_AST_LIMIT, - * and create a new set for requests that remained in - * @rpc_list */ - if (unlikely(ast_count == PARALLEL_AST_LIMIT)) { - ldlm_send_and_maybe_create_set(&arg, 1); - ast_count = 0; - } - } - - if (ast_count > 0) - ldlm_send_and_maybe_create_set(&arg, 0); - else - /* In case when number of ASTs is multiply of - * PARALLEL_AST_LIMIT or @rpc_list was initially empty, - * @arg.set must be destroyed here, otherwise we get - * write memory leaking. */ - ptlrpc_set_destroy(arg.set); - - RETURN(atomic_read(&arg.restart) ? -ERESTART : 0); -} - -static int reprocess_one_queue(struct ldlm_resource *res, void *closure) -{ - ldlm_reprocess_all(res); - return LDLM_ITER_CONTINUE; -} - -void ldlm_reprocess_all_ns(struct ldlm_namespace *ns) -{ - struct list_head *tmp; - int i, rc; - - ENTRY; - spin_lock(&ns->ns_hash_lock); - for (i = 0; i < RES_HASH_SIZE; i++) { - tmp = ns->ns_hash[i].next; - while (tmp != &(ns->ns_hash[i])) { - struct ldlm_resource *res = - list_entry(tmp, struct ldlm_resource, lr_hash); - - ldlm_resource_getref(res); - spin_unlock(&ns->ns_hash_lock); - - rc = reprocess_one_queue(res, NULL); - - spin_lock(&ns->ns_hash_lock); - tmp = tmp->next; - ldlm_resource_putref_locked(res); - - if (rc == LDLM_ITER_STOP) - GOTO(out, rc); - } - } - out: - spin_unlock(&ns->ns_hash_lock); - EXIT; -} - -void ldlm_reprocess_all(struct ldlm_resource *res) -{ - CFS_LIST_HEAD(rpc_list); - int rc; - ENTRY; - - /* Local lock trees don't get reprocessed. */ - if (ns_is_client(res->lr_namespace)) { - EXIT; - return; - } - - restart: - lock_res(res); - rc = ldlm_reprocess_queue(res, &res->lr_converting, &rpc_list); - if (rc == LDLM_ITER_CONTINUE) - ldlm_reprocess_queue(res, &res->lr_waiting, &rpc_list); - unlock_res(res); - - rc = ldlm_run_cp_ast_work(&rpc_list); - if (rc == -ERESTART) { - LASSERT(list_empty(&rpc_list)); - goto restart; - } - EXIT; -} - -void ldlm_cancel_callback(struct ldlm_lock *lock) -{ - check_res_locked(lock->l_resource); - if (!(lock->l_flags & LDLM_FL_CANCEL)) { - lock->l_flags |= LDLM_FL_CANCEL; - if (lock->l_blocking_ast) { - // l_check_no_ns_lock(ns); - unlock_res_and_lock(lock); - lock->l_blocking_ast(lock, NULL, lock->l_ast_data, - LDLM_CB_CANCELING); - lock_res_and_lock(lock); - } else { - LDLM_DEBUG(lock, "no blocking ast"); - } - } - lock->l_flags |= LDLM_FL_BL_DONE; -} - -void ldlm_unlink_lock_skiplist(struct ldlm_lock *req) -{ - struct ldlm_lock *lock; - - if (req->l_resource->lr_type != LDLM_PLAIN && - req->l_resource->lr_type != LDLM_IBITS) - return; - - if (LDLM_SL_HEAD(&req->l_sl_mode)) { - lock = list_entry(req->l_res_link.next, struct ldlm_lock, - l_res_link); - if (req->l_sl_mode.next == &lock->l_sl_mode) { - lock->l_sl_mode.prev = NULL; - } else { - lock->l_sl_mode.next = req->l_sl_mode.next; - lock->l_sl_mode.next->prev = &lock->l_sl_mode; - } - req->l_sl_mode.next = NULL; - } else if (LDLM_SL_TAIL(&req->l_sl_mode)) { - lock = list_entry(req->l_res_link.prev, struct ldlm_lock, - l_res_link); - if (req->l_sl_mode.prev == &lock->l_sl_mode) { - lock->l_sl_mode.next = NULL; - } else { - lock->l_sl_mode.prev = req->l_sl_mode.prev; - lock->l_sl_mode.prev->next = &lock->l_sl_mode; - } - req->l_sl_mode.prev = NULL; - } - - if (LDLM_SL_HEAD(&req->l_sl_policy)) { - lock = list_entry(req->l_res_link.next, struct ldlm_lock, - l_res_link); - if (req->l_sl_policy.next == &lock->l_sl_policy) { - lock->l_sl_policy.prev = NULL; - } else { - lock->l_sl_policy.next = req->l_sl_policy.next; - lock->l_sl_policy.next->prev = &lock->l_sl_policy; - } - req->l_sl_policy.next = NULL; - } else if (LDLM_SL_TAIL(&req->l_sl_policy)) { - lock = list_entry(req->l_res_link.prev, struct ldlm_lock, - l_res_link); - if (req->l_sl_policy.prev == &lock->l_sl_policy) { - lock->l_sl_policy.next = NULL; - } else { - lock->l_sl_policy.prev = req->l_sl_policy.prev; - lock->l_sl_policy.prev->next = &lock->l_sl_policy; - } - req->l_sl_policy.prev = NULL; - } -} - -void ldlm_lock_cancel(struct ldlm_lock *lock) -{ - struct ldlm_resource *res; - struct ldlm_namespace *ns; - ENTRY; - - lock_res_and_lock(lock); - - res = lock->l_resource; - ns = res->lr_namespace; - - /* Please do not, no matter how tempting, remove this LBUG without - * talking to me first. -phik */ - if (lock->l_readers || lock->l_writers) { - LDLM_ERROR(lock, "lock still has references"); - LBUG(); - } - - ldlm_del_waiting_lock(lock); - - /* Releases res lock */ - ldlm_cancel_callback(lock); - - /* Yes, second time, just in case it was added again while we were - running with no res lock in ldlm_cancel_callback */ - ldlm_del_waiting_lock(lock); - ldlm_resource_unlink_lock(lock); - ldlm_lock_destroy_nolock(lock); - - if (lock->l_granted_mode == lock->l_req_mode) - ldlm_pool_del(&ns->ns_pool, lock); - - /* Make sure we will not be called again for same lock what is possible - * if not to zero out lock->l_granted_mode */ - lock->l_granted_mode = 0; - unlock_res_and_lock(lock); - - EXIT; -} - -int ldlm_lock_set_data(struct lustre_handle *lockh, void *data) -{ - struct ldlm_lock *lock = ldlm_handle2lock(lockh); - ENTRY; - - if (lock == NULL) - RETURN(-EINVAL); - - lock->l_ast_data = data; - LDLM_LOCK_PUT(lock); - RETURN(0); -} - -void ldlm_cancel_locks_for_export(struct obd_export *exp) -{ - struct ldlm_lock *lock; - struct ldlm_resource *res; - - spin_lock(&exp->exp_ldlm_data.led_lock); - while(!list_empty(&exp->exp_ldlm_data.led_held_locks)) { - lock = list_entry(exp->exp_ldlm_data.led_held_locks.next, - struct ldlm_lock, l_export_chain); - res = ldlm_resource_getref(lock->l_resource); - LDLM_LOCK_GET(lock); - spin_unlock(&exp->exp_ldlm_data.led_lock); - - LDLM_DEBUG(lock, "export %p", exp); - ldlm_res_lvbo_update(res, NULL, 0, 1); - - ldlm_lock_cancel(lock); - ldlm_reprocess_all(res); - - ldlm_resource_putref(res); - LDLM_LOCK_PUT(lock); - spin_lock(&exp->exp_ldlm_data.led_lock); - } - spin_unlock(&exp->exp_ldlm_data.led_lock); -} - -struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode, - __u32 *flags) -{ - CFS_LIST_HEAD(rpc_list); - struct ldlm_resource *res; - struct ldlm_namespace *ns; - int granted = 0; - int old_mode, rc; - struct ldlm_lock *mark_lock = NULL; - int join= LDLM_JOIN_NONE; - ldlm_error_t err; - struct ldlm_interval *node; - ENTRY; - - if (new_mode == lock->l_granted_mode) { // No changes? Just return. - *flags |= LDLM_FL_BLOCK_GRANTED; - RETURN(lock->l_resource); - } - - /* I can't check the type of lock here because the bitlock of lock - * is not held here, so do the allocation blindly. -jay */ - OBD_SLAB_ALLOC(node, ldlm_interval_slab, CFS_ALLOC_IO, sizeof(*node)); - if (node == NULL) /* Actually, this causes EDEADLOCK to be returned */ - RETURN(NULL); - - LASSERTF(new_mode == LCK_PW && lock->l_granted_mode == LCK_PR, - "new_mode %u, granted %u\n", new_mode, lock->l_granted_mode); - - lock_res_and_lock(lock); - - res = lock->l_resource; - ns = res->lr_namespace; - - old_mode = lock->l_req_mode; - lock->l_req_mode = new_mode; - if (res->lr_type == LDLM_PLAIN || res->lr_type == LDLM_IBITS) { - /* remember the lock position where the lock might be - * added back to the granted list later and also - * remember the join mode for skiplist fixing. */ - if (LDLM_SL_HEAD(&lock->l_sl_mode)) - join = LDLM_MODE_JOIN_RIGHT; - else if (LDLM_SL_TAIL(&lock->l_sl_mode)) - join = LDLM_MODE_JOIN_LEFT; - if (LDLM_SL_HEAD(&lock->l_sl_policy)) - join |= LDLM_POLICY_JOIN_RIGHT; - else if (LDLM_SL_TAIL(&lock->l_sl_policy)) - join |= LDLM_POLICY_JOIN_LEFT; - - LASSERT(!((join & LDLM_MODE_JOIN_RIGHT) && - (join & LDLM_POLICY_JOIN_LEFT))); - LASSERT(!((join & LDLM_MODE_JOIN_LEFT) && - (join & LDLM_POLICY_JOIN_RIGHT))); - - if ((join & LDLM_MODE_JOIN_LEFT) || - (join & LDLM_POLICY_JOIN_LEFT)) - mark_lock = list_entry(lock->l_res_link.prev, - struct ldlm_lock, l_res_link); - else if (lock->l_res_link.next != &res->lr_granted) - mark_lock = list_entry(lock->l_res_link.next, - struct ldlm_lock, l_res_link); - } else { - ldlm_resource_unlink_lock(lock); - if (res->lr_type == LDLM_EXTENT) { - /* FIXME: ugly code, I have to attach the lock to a - * interval node again since perhaps it will be granted - * soon */ - CFS_INIT_LIST_HEAD(&node->li_group); - ldlm_interval_attach(node, lock); - node = NULL; - } - } - - /* If this is a local resource, put it on the appropriate list. */ - if (ns_is_client(res->lr_namespace)) { - if (*flags & (LDLM_FL_BLOCK_CONV | LDLM_FL_BLOCK_GRANTED)) { - ldlm_resource_add_lock(res, &res->lr_converting, lock); - } else { - /* This should never happen, because of the way the - * server handles conversions. */ - LDLM_ERROR(lock, "Erroneous flags %d on local lock\n", - *flags); - LBUG(); - - ldlm_grant_lock(lock, &rpc_list); - granted = 1; - /* FIXME: completion handling not with ns_lock held ! */ - if (lock->l_completion_ast) - lock->l_completion_ast(lock, 0, NULL); - } - } else { - int pflags = 0; - ldlm_processing_policy policy; - policy = ldlm_processing_policy_table[res->lr_type]; - rc = policy(lock, &pflags, 0, &err, &rpc_list); - if (rc == LDLM_ITER_STOP) { - lock->l_req_mode = old_mode; - if (res->lr_type == LDLM_EXTENT) - ldlm_extent_add_lock(res, lock); - else - ldlm_granted_list_add_lock(lock, mark_lock, - join); - res = NULL; - } else { - *flags |= LDLM_FL_BLOCK_GRANTED; - granted = 1; - } - } - unlock_res_and_lock(lock); - - if (granted) - ldlm_run_cp_ast_work(&rpc_list); - if (node) - OBD_SLAB_FREE(node, ldlm_interval_slab, sizeof(*node)); - RETURN(res); -} - -void ldlm_lock_dump(int level, struct ldlm_lock *lock, int pos) -{ - struct obd_device *obd = NULL; - - if (!((libcfs_debug | D_ERROR) & level)) - return; - - if (!lock) { - CDEBUG(level, " NULL LDLM lock\n"); - return; - } - - CDEBUG(level," -- Lock dump: %p/"LPX64" (rc: %d) (pos: %d) (pid: %d)\n", - lock, lock->l_handle.h_cookie, atomic_read(&lock->l_refc), - pos, lock->l_pid); - if (lock->l_conn_export != NULL) - obd = lock->l_conn_export->exp_obd; - if (lock->l_export && lock->l_export->exp_connection) { - CDEBUG(level, " Node: NID %s (rhandle: "LPX64")\n", - libcfs_nid2str(lock->l_export->exp_connection->c_peer.nid), - lock->l_remote_handle.cookie); - } else if (obd == NULL) { - CDEBUG(level, " Node: local\n"); - } else { - struct obd_import *imp = obd->u.cli.cl_import; - CDEBUG(level, " Node: NID %s (rhandle: "LPX64")\n", - libcfs_nid2str(imp->imp_connection->c_peer.nid), - lock->l_remote_handle.cookie); - } - CDEBUG(level, " Resource: %p ("LPU64"/"LPU64")\n", lock->l_resource, - lock->l_resource->lr_name.name[0], - lock->l_resource->lr_name.name[1]); - CDEBUG(level, " Req mode: %s, grant mode: %s, rc: %u, read: %d, " - "write: %d flags: %#x\n", ldlm_lockname[lock->l_req_mode], - ldlm_lockname[lock->l_granted_mode], - atomic_read(&lock->l_refc), lock->l_readers, lock->l_writers, - lock->l_flags); - if (lock->l_resource->lr_type == LDLM_EXTENT) - CDEBUG(level, " Extent: "LPU64" -> "LPU64 - " (req "LPU64"-"LPU64")\n", - lock->l_policy_data.l_extent.start, - lock->l_policy_data.l_extent.end, - lock->l_req_extent.start, lock->l_req_extent.end); - else if (lock->l_resource->lr_type == LDLM_FLOCK) - CDEBUG(level, " Pid: %d Extent: "LPU64" -> "LPU64"\n", - lock->l_policy_data.l_flock.pid, - lock->l_policy_data.l_flock.start, - lock->l_policy_data.l_flock.end); - else if (lock->l_resource->lr_type == LDLM_IBITS) - CDEBUG(level, " Bits: "LPX64"\n", - lock->l_policy_data.l_inodebits.bits); -} - -void ldlm_lock_dump_handle(int level, struct lustre_handle *lockh) -{ - struct ldlm_lock *lock; - - if (!((libcfs_debug | D_ERROR) & level)) - return; - - lock = ldlm_handle2lock(lockh); - if (lock == NULL) - return; - - ldlm_lock_dump(D_OTHER, lock, 0); - - LDLM_LOCK_PUT(lock); -} - -void _ldlm_lock_debug(struct ldlm_lock *lock, __u32 level, - struct libcfs_debug_msg_data *data, const char *fmt, - ...) -{ - va_list args; - cfs_debug_limit_state_t *cdls = data->msg_cdls; - - va_start(args, fmt); - if (lock->l_resource == NULL) { - libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file, - data->msg_fn, data->msg_line, fmt, args, - " ns: \?\? lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s " - "res: \?\? rrc=\?\? type: \?\?\? flags: %x remote: " - LPX64" expref: %d pid: %u\n", lock, - lock->l_handle.h_cookie, atomic_read(&lock->l_refc), - lock->l_readers, lock->l_writers, - ldlm_lockname[lock->l_granted_mode], - ldlm_lockname[lock->l_req_mode], - lock->l_flags, lock->l_remote_handle.cookie, - lock->l_export ? - atomic_read(&lock->l_export->exp_refcount) : -99, - lock->l_pid); - va_end(args); - return; - } - - switch (lock->l_resource->lr_type) { - case LDLM_EXTENT: - libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file, - data->msg_fn, data->msg_line, fmt, args, - " ns: %s lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s " - "res: "LPU64"/"LPU64" rrc: %d type: %s ["LPU64"->"LPU64 - "] (req "LPU64"->"LPU64") flags: %x remote: "LPX64 - " expref: %d pid: %u\n", - lock->l_resource->lr_namespace->ns_name, lock, - lock->l_handle.h_cookie, atomic_read(&lock->l_refc), - lock->l_readers, lock->l_writers, - ldlm_lockname[lock->l_granted_mode], - ldlm_lockname[lock->l_req_mode], - lock->l_resource->lr_name.name[0], - lock->l_resource->lr_name.name[1], - atomic_read(&lock->l_resource->lr_refcount), - ldlm_typename[lock->l_resource->lr_type], - lock->l_policy_data.l_extent.start, - lock->l_policy_data.l_extent.end, - lock->l_req_extent.start, lock->l_req_extent.end, - lock->l_flags, lock->l_remote_handle.cookie, - lock->l_export ? - atomic_read(&lock->l_export->exp_refcount) : -99, - lock->l_pid); - break; - case LDLM_FLOCK: - libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file, - data->msg_fn, data->msg_line, fmt, args, - " ns: %s lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s " - "res: "LPU64"/"LPU64" rrc: %d type: %s pid: %d " - "["LPU64"->"LPU64"] flags: %x remote: "LPX64 - " expref: %d pid: %u\n", - lock->l_resource->lr_namespace->ns_name, lock, - lock->l_handle.h_cookie, atomic_read(&lock->l_refc), - lock->l_readers, lock->l_writers, - ldlm_lockname[lock->l_granted_mode], - ldlm_lockname[lock->l_req_mode], - lock->l_resource->lr_name.name[0], - lock->l_resource->lr_name.name[1], - atomic_read(&lock->l_resource->lr_refcount), - ldlm_typename[lock->l_resource->lr_type], - lock->l_policy_data.l_flock.pid, - lock->l_policy_data.l_flock.start, - lock->l_policy_data.l_flock.end, - lock->l_flags, lock->l_remote_handle.cookie, - lock->l_export ? - atomic_read(&lock->l_export->exp_refcount) : -99, - lock->l_pid); - break; - case LDLM_IBITS: - libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file, - data->msg_fn, data->msg_line, fmt, args, - " ns: %s lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s " - "res: "LPU64"/"LPU64" bits "LPX64" rrc: %d type: %s " - "flags: %x remote: "LPX64" expref: %d " - "pid %u\n", - lock->l_resource->lr_namespace->ns_name, - lock, lock->l_handle.h_cookie, - atomic_read (&lock->l_refc), - lock->l_readers, lock->l_writers, - ldlm_lockname[lock->l_granted_mode], - ldlm_lockname[lock->l_req_mode], - lock->l_resource->lr_name.name[0], - lock->l_resource->lr_name.name[1], - lock->l_policy_data.l_inodebits.bits, - atomic_read(&lock->l_resource->lr_refcount), - ldlm_typename[lock->l_resource->lr_type], - lock->l_flags, lock->l_remote_handle.cookie, - lock->l_export ? - atomic_read(&lock->l_export->exp_refcount) : -99, - lock->l_pid); - break; - default: - libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file, - data->msg_fn, data->msg_line, fmt, args, - " ns: %s lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s " - "res: "LPU64"/"LPU64" rrc: %d type: %s flags: %x " - "remote: "LPX64" expref: %d pid: %u\n", - lock->l_resource->lr_namespace->ns_name, - lock, lock->l_handle.h_cookie, - atomic_read (&lock->l_refc), - lock->l_readers, lock->l_writers, - ldlm_lockname[lock->l_granted_mode], - ldlm_lockname[lock->l_req_mode], - lock->l_resource->lr_name.name[0], - lock->l_resource->lr_name.name[1], - atomic_read(&lock->l_resource->lr_refcount), - ldlm_typename[lock->l_resource->lr_type], - lock->l_flags, lock->l_remote_handle.cookie, - lock->l_export ? - atomic_read(&lock->l_export->exp_refcount) : -99, - lock->l_pid); - break; - } - va_end(args); -} -EXPORT_SYMBOL(_ldlm_lock_debug); diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c deleted file mode 100644 index 850f540f03..0000000000 --- a/lustre/ldlm/ldlm_lockd.c +++ /dev/null @@ -1,2222 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002-2004 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LDLM - -#ifdef __KERNEL__ -# include <libcfs/libcfs.h> -#else -# include <liblustre.h> -#endif - -#include <lustre_dlm.h> -#include <obd_class.h> -#include <libcfs/list.h> -#include "ldlm_internal.h" - -#ifdef __KERNEL__ -static int ldlm_num_threads; -CFS_MODULE_PARM(ldlm_num_threads, "i", int, 0444, - "number of DLM service threads to start"); -#endif - -extern cfs_mem_cache_t *ldlm_resource_slab; -extern cfs_mem_cache_t *ldlm_lock_slab; -extern struct lustre_lock ldlm_handle_lock; - -static struct semaphore ldlm_ref_sem; -static int ldlm_refcount; - -static struct ldlm_state *ldlm_state; - -inline cfs_time_t round_timeout(cfs_time_t timeout) -{ - return cfs_time_seconds((int)cfs_duration_sec(cfs_time_sub(timeout, 0)) + 1); -} - -/* timeout for initial callback (AST) reply (bz10399) */ -static inline unsigned int ldlm_get_rq_timeout(void) -{ - /* Non-AT value */ - unsigned int timeout = min(ldlm_timeout, obd_timeout / 3); - - return timeout < 1 ? 1 : timeout; -} - -#ifdef __KERNEL__ -/* w_l_spinlock protects both waiting_locks_list and expired_lock_thread */ -static spinlock_t waiting_locks_spinlock; /* BH lock (timer) */ -static struct list_head waiting_locks_list; -static cfs_timer_t waiting_locks_timer; - -static struct expired_lock_thread { - cfs_waitq_t elt_waitq; - int elt_state; - int elt_dump; - struct list_head elt_expired_locks; -} expired_lock_thread; -#endif - -#define ELT_STOPPED 0 -#define ELT_READY 1 -#define ELT_TERMINATE 2 - -struct ldlm_bl_pool { - spinlock_t blp_lock; - - /* - * blp_prio_list is used for callbacks that should be handled - * as a priority. It is used for LDLM_FL_DISCARD_DATA requests. - * see bug 13843 - */ - struct list_head blp_prio_list; - - /* - * blp_list is used for all other callbacks which are likely - * to take longer to process. - */ - struct list_head blp_list; - - cfs_waitq_t blp_waitq; - struct completion blp_comp; - atomic_t blp_num_threads; - atomic_t blp_busy_threads; - int blp_min_threads; - int blp_max_threads; -}; - -struct ldlm_bl_work_item { - struct list_head blwi_entry; - struct ldlm_namespace *blwi_ns; - struct ldlm_lock_desc blwi_ld; - struct ldlm_lock *blwi_lock; - struct list_head blwi_head; - int blwi_count; -}; - -#ifdef __KERNEL__ - -static inline int have_expired_locks(void) -{ - int need_to_run; - - ENTRY; - spin_lock_bh(&waiting_locks_spinlock); - need_to_run = !list_empty(&expired_lock_thread.elt_expired_locks); - spin_unlock_bh(&waiting_locks_spinlock); - - RETURN(need_to_run); -} - -static int expired_lock_main(void *arg) -{ - struct list_head *expired = &expired_lock_thread.elt_expired_locks; - struct l_wait_info lwi = { 0 }; - int do_dump; - - ENTRY; - cfs_daemonize("ldlm_elt"); - - expired_lock_thread.elt_state = ELT_READY; - cfs_waitq_signal(&expired_lock_thread.elt_waitq); - - while (1) { - l_wait_event(expired_lock_thread.elt_waitq, - have_expired_locks() || - expired_lock_thread.elt_state == ELT_TERMINATE, - &lwi); - - spin_lock_bh(&waiting_locks_spinlock); - if (expired_lock_thread.elt_dump) { - spin_unlock_bh(&waiting_locks_spinlock); - - /* from waiting_locks_callback, but not in timer */ - libcfs_debug_dumplog(); - libcfs_run_lbug_upcall(__FILE__, - "waiting_locks_callback", - expired_lock_thread.elt_dump); - - spin_lock_bh(&waiting_locks_spinlock); - expired_lock_thread.elt_dump = 0; - } - - do_dump = 0; - - while (!list_empty(expired)) { - struct obd_export *export; - struct ldlm_lock *lock; - - lock = list_entry(expired->next, struct ldlm_lock, - l_pending_chain); - if ((void *)lock < LP_POISON + CFS_PAGE_SIZE && - (void *)lock >= LP_POISON) { - spin_unlock_bh(&waiting_locks_spinlock); - CERROR("free lock on elt list %p\n", lock); - LBUG(); - } - list_del_init(&lock->l_pending_chain); - if ((void *)lock->l_export < LP_POISON + CFS_PAGE_SIZE && - (void *)lock->l_export >= LP_POISON) { - CERROR("lock with free export on elt list %p\n", - lock->l_export); - lock->l_export = NULL; - LDLM_ERROR(lock, "free export"); - continue; - } - export = class_export_get(lock->l_export); - spin_unlock_bh(&waiting_locks_spinlock); - - do_dump++; - class_fail_export(export); - class_export_put(export); - spin_lock_bh(&waiting_locks_spinlock); - } - spin_unlock_bh(&waiting_locks_spinlock); - - if (do_dump && obd_dump_on_eviction) { - CERROR("dump the log upon eviction\n"); - libcfs_debug_dumplog(); - } - - if (expired_lock_thread.elt_state == ELT_TERMINATE) - break; - } - - expired_lock_thread.elt_state = ELT_STOPPED; - cfs_waitq_signal(&expired_lock_thread.elt_waitq); - RETURN(0); -} - -/* This is called from within a timer interrupt and cannot schedule */ -static void waiting_locks_callback(unsigned long unused) -{ - struct ldlm_lock *lock, *last = NULL; - - spin_lock_bh(&waiting_locks_spinlock); - while (!list_empty(&waiting_locks_list)) { - lock = list_entry(waiting_locks_list.next, struct ldlm_lock, - l_pending_chain); - - if (cfs_time_after(lock->l_callback_timeout, cfs_time_current()) - || (lock->l_req_mode == LCK_GROUP)) - break; - - LDLM_ERROR(lock, "lock callback timer expired after %lds: " - "evicting client at %s ", - cfs_time_current_sec()- lock->l_enqueued_time.tv_sec, - libcfs_nid2str( - lock->l_export->exp_connection->c_peer.nid)); - if (lock == last) { - LDLM_ERROR(lock, "waiting on lock multiple times"); - CERROR("wll %p n/p %p/%p, l_pending %p n/p %p/%p\n", - &waiting_locks_list, - waiting_locks_list.next, waiting_locks_list.prev, - &lock->l_pending_chain, - lock->l_pending_chain.next, - lock->l_pending_chain.prev); - - CFS_INIT_LIST_HEAD(&waiting_locks_list); /* HACK */ - expired_lock_thread.elt_dump = __LINE__; - - /* LBUG(); */ - CEMERG("would be an LBUG, but isn't (bug 5653)\n"); - libcfs_debug_dumpstack(NULL); - /*blocks* libcfs_debug_dumplog(); */ - /*blocks* libcfs_run_lbug_upcall(file, func, line); */ - break; - } - last = lock; - - list_del(&lock->l_pending_chain); - list_add(&lock->l_pending_chain, - &expired_lock_thread.elt_expired_locks); - } - - if (!list_empty(&expired_lock_thread.elt_expired_locks)) { - if (obd_dump_on_timeout) - expired_lock_thread.elt_dump = __LINE__; - - cfs_waitq_signal(&expired_lock_thread.elt_waitq); - } - - /* - * Make sure the timer will fire again if we have any locks - * left. - */ - if (!list_empty(&waiting_locks_list)) { - cfs_time_t timeout_rounded; - lock = list_entry(waiting_locks_list.next, struct ldlm_lock, - l_pending_chain); - timeout_rounded = (cfs_time_t)round_timeout(lock->l_callback_timeout); - cfs_timer_arm(&waiting_locks_timer, timeout_rounded); - } - spin_unlock_bh(&waiting_locks_spinlock); -} - -/* - * Indicate that we're waiting for a client to call us back cancelling a given - * lock. We add it to the pending-callback chain, and schedule the lock-timeout - * timer to fire appropriately. (We round up to the next second, to avoid - * floods of timer firings during periods of high lock contention and traffic). - * - * Called with the namespace lock held. - */ -static int __ldlm_add_waiting_lock(struct ldlm_lock *lock) -{ - int timeout; - cfs_time_t timeout_rounded; - - if (!list_empty(&lock->l_pending_chain)) - return 0; - - timeout = ldlm_get_enq_timeout(lock); - - lock->l_callback_timeout = cfs_time_shift(timeout); - - timeout_rounded = round_timeout(lock->l_callback_timeout); - - if (cfs_time_before(timeout_rounded, - cfs_timer_deadline(&waiting_locks_timer)) || - !cfs_timer_is_armed(&waiting_locks_timer)) { - cfs_timer_arm(&waiting_locks_timer, timeout_rounded); - } - /* if the new lock has a shorter timeout than something earlier on - the list, we'll wait the longer amount of time; no big deal. */ - list_add_tail(&lock->l_pending_chain, &waiting_locks_list); /* FIFO */ - return 1; -} - -static int ldlm_add_waiting_lock(struct ldlm_lock *lock) -{ - int ret; - - LASSERT(!(lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK)); - - spin_lock_bh(&waiting_locks_spinlock); - if (lock->l_destroyed) { - static cfs_time_t next; - spin_unlock_bh(&waiting_locks_spinlock); - LDLM_ERROR(lock, "not waiting on destroyed lock (bug 5653)"); - if (cfs_time_after(cfs_time_current(), next)) { - next = cfs_time_shift(14400); - libcfs_debug_dumpstack(NULL); - } - return 0; - } - - ret = __ldlm_add_waiting_lock(lock); - spin_unlock_bh(&waiting_locks_spinlock); - - LDLM_DEBUG(lock, "%sadding to wait list", - ret == 0 ? "not re-" : ""); - return ret; -} - -/* - * Remove a lock from the pending list, likely because it had its cancellation - * callback arrive without incident. This adjusts the lock-timeout timer if - * needed. Returns 0 if the lock wasn't pending after all, 1 if it was. - * - * Called with namespace lock held. - */ -int __ldlm_del_waiting_lock(struct ldlm_lock *lock) -{ - struct list_head *list_next; - - if (list_empty(&lock->l_pending_chain)) - return 0; - - list_next = lock->l_pending_chain.next; - if (lock->l_pending_chain.prev == &waiting_locks_list) { - /* Removing the head of the list, adjust timer. */ - if (list_next == &waiting_locks_list) { - /* No more, just cancel. */ - cfs_timer_disarm(&waiting_locks_timer); - } else { - struct ldlm_lock *next; - next = list_entry(list_next, struct ldlm_lock, - l_pending_chain); - cfs_timer_arm(&waiting_locks_timer, - round_timeout(next->l_callback_timeout)); - } - } - list_del_init(&lock->l_pending_chain); - - return 1; -} - -int ldlm_del_waiting_lock(struct ldlm_lock *lock) -{ - int ret; - - if (lock->l_export == NULL) { - /* We don't have a "waiting locks list" on clients. */ - LDLM_DEBUG(lock, "client lock: no-op"); - return 0; - } - - spin_lock_bh(&waiting_locks_spinlock); - ret = __ldlm_del_waiting_lock(lock); - spin_unlock_bh(&waiting_locks_spinlock); - - LDLM_DEBUG(lock, "%s", ret == 0 ? "wasn't waiting" : "removed"); - return ret; -} - -/* - * Prolong the lock - * - * Called with namespace lock held. - */ -int ldlm_refresh_waiting_lock(struct ldlm_lock *lock) -{ - if (lock->l_export == NULL) { - /* We don't have a "waiting locks list" on clients. */ - LDLM_DEBUG(lock, "client lock: no-op"); - return 0; - } - - spin_lock_bh(&waiting_locks_spinlock); - - if (list_empty(&lock->l_pending_chain)) { - spin_unlock_bh(&waiting_locks_spinlock); - LDLM_DEBUG(lock, "wasn't waiting"); - return 0; - } - - __ldlm_del_waiting_lock(lock); - __ldlm_add_waiting_lock(lock); - spin_unlock_bh(&waiting_locks_spinlock); - - LDLM_DEBUG(lock, "refreshed"); - return 1; -} - -#else /* !__KERNEL__ */ - -static int ldlm_add_waiting_lock(struct ldlm_lock *lock) -{ - LASSERT(!(lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK)); - RETURN(1); -} - -int ldlm_del_waiting_lock(struct ldlm_lock *lock) -{ - RETURN(0); -} - -int ldlm_refresh_waiting_lock(struct ldlm_lock *lock) -{ - RETURN(0); -} -#endif /* __KERNEL__ */ - -static void ldlm_failed_ast(struct ldlm_lock *lock, int rc, - const char *ast_type) -{ - struct ptlrpc_connection *conn = lock->l_export->exp_connection; - char *str = libcfs_nid2str(conn->c_peer.nid); - - LCONSOLE_ERROR_MSG(0x138, "%s: A client on nid %s was evicted due " - "to a lock %s callback to %s timed out: rc %d\n", - lock->l_export->exp_obd->obd_name, str, - ast_type, obd_export_nid2str(lock->l_export), rc); - - if (obd_dump_on_timeout) - libcfs_debug_dumplog(); - class_fail_export(lock->l_export); -} - -static int ldlm_handle_ast_error(struct ldlm_lock *lock, - struct ptlrpc_request *req, int rc, - const char *ast_type) -{ - lnet_process_id_t peer = req->rq_import->imp_connection->c_peer; - - if (rc == -ETIMEDOUT || rc == -EINTR || rc == -ENOTCONN) { - LASSERT(lock->l_export); - if (lock->l_export->exp_libclient) { - LDLM_DEBUG(lock, "%s AST to liblustre client (nid %s)" - " timeout, just cancelling lock", ast_type, - libcfs_nid2str(peer.nid)); - ldlm_lock_cancel(lock); - rc = -ERESTART; - } else if (lock->l_flags & LDLM_FL_CANCEL) { - LDLM_DEBUG(lock, "%s AST timeout from nid %s, but " - "cancel was received (AST reply lost?)", - ast_type, libcfs_nid2str(peer.nid)); - ldlm_lock_cancel(lock); - rc = -ERESTART; - } else { - ldlm_del_waiting_lock(lock); - ldlm_failed_ast(lock, rc, ast_type); - } - } else if (rc) { - if (rc == -EINVAL) - LDLM_DEBUG(lock, "client (nid %s) returned %d" - " from %s AST - normal race", - libcfs_nid2str(peer.nid), - lustre_msg_get_status(req->rq_repmsg), - ast_type); - else - LDLM_ERROR(lock, "client (nid %s) returned %d " - "from %s AST", libcfs_nid2str(peer.nid), - (req->rq_repmsg != NULL) ? - lustre_msg_get_status(req->rq_repmsg) : 0, - ast_type); - ldlm_lock_cancel(lock); - /* Server-side AST functions are called from ldlm_reprocess_all, - * which needs to be told to please restart its reprocessing. */ - rc = -ERESTART; - } - - return rc; -} - -static int ldlm_cb_interpret(struct ptlrpc_request *req, void *data, int rc) -{ - struct ldlm_cb_set_arg *arg; - struct ldlm_lock *lock; - ENTRY; - - LASSERT(data != NULL); - - arg = req->rq_async_args.pointer_arg[0]; - lock = req->rq_async_args.pointer_arg[1]; - LASSERT(lock != NULL); - if (rc != 0) { - /* If client canceled the lock but the cancel has not - * been recieved yet, we need to update lvbo to have the - * proper attributes cached. */ - if (rc == -EINVAL && arg->type == LDLM_BL_CALLBACK) - ldlm_res_lvbo_update(lock->l_resource, NULL, - 0, 1); - rc = ldlm_handle_ast_error(lock, req, rc, - arg->type == LDLM_BL_CALLBACK - ? "blocking" : "completion"); - } - - LDLM_LOCK_PUT(lock); - - if (rc == -ERESTART) - atomic_set(&arg->restart, 1); - - RETURN(0); -} - -static inline int ldlm_bl_and_cp_ast_fini(struct ptlrpc_request *req, - struct ldlm_cb_set_arg *arg, - struct ldlm_lock *lock, - int instant_cancel) -{ - int rc = 0; - ENTRY; - - if (unlikely(instant_cancel)) { - rc = ptl_send_rpc(req, 1); - ptlrpc_req_finished(req); - if (rc == 0) - /* If we cancelled the lock, we need to restart - * ldlm_reprocess_queue */ - atomic_set(&arg->restart, 1); - } else { - LDLM_LOCK_GET(lock); - ptlrpc_set_add_req(arg->set, req); - } - - RETURN(rc); -} - -/* - * ->l_blocking_ast() method for server-side locks. This is invoked when newly - * enqueued server lock conflicts with given one. - * - * Sends blocking ast rpc to the client owning that lock; arms timeout timer - * to wait for client response. - */ -int ldlm_server_blocking_ast(struct ldlm_lock *lock, - struct ldlm_lock_desc *desc, - void *data, int flag) -{ - struct ldlm_cb_set_arg *arg = data; - struct ldlm_request *body; - struct ptlrpc_request *req; - int size[] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(*body) }; - int instant_cancel = 0, rc; - ENTRY; - - if (flag == LDLM_CB_CANCELING) { - /* Don't need to do anything here. */ - RETURN(0); - } - - LASSERT(lock); - LASSERT(data != NULL); - - req = ptlrpc_prep_req(lock->l_export->exp_imp_reverse, - LUSTRE_DLM_VERSION, LDLM_BL_CALLBACK, 2, size, - NULL); - if (req == NULL) - RETURN(-ENOMEM); - - req->rq_async_args.pointer_arg[0] = arg; - req->rq_async_args.pointer_arg[1] = lock; - req->rq_interpret_reply = ldlm_cb_interpret; - req->rq_no_resend = 1; - - lock_res(lock->l_resource); - if (lock->l_granted_mode != lock->l_req_mode) { - /* this blocking AST will be communicated as part of the - * completion AST instead */ - unlock_res(lock->l_resource); - ptlrpc_req_finished(req); - LDLM_DEBUG(lock, "lock not granted, not sending blocking AST"); - RETURN(0); - } - - if (lock->l_destroyed) { - /* What's the point? */ - unlock_res(lock->l_resource); - ptlrpc_req_finished(req); - RETURN(0); - } - -#if 0 - if (CURRENT_SECONDS - lock->l_export->exp_last_request_time > 30){ - unlock_res(lock->l_resource); - ptlrpc_req_finished(req); - ldlm_failed_ast(lock, -ETIMEDOUT, "Not-attempted blocking"); - RETURN(-ETIMEDOUT); - } -#endif - - if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK) - instant_cancel = 1; - - body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body)); - body->lock_handle[0] = lock->l_remote_handle; - body->lock_desc = *desc; - body->lock_flags |= (lock->l_flags & LDLM_AST_FLAGS); - - LDLM_DEBUG(lock, "server preparing blocking AST"); - - ptlrpc_req_set_repsize(req, 1, NULL); - if (instant_cancel) { - unlock_res(lock->l_resource); - ldlm_lock_cancel(lock); - } else { - LASSERT(lock->l_granted_mode == lock->l_req_mode); - ldlm_add_waiting_lock(lock); - unlock_res(lock->l_resource); - } - - req->rq_send_state = LUSTRE_IMP_FULL; - /* ptlrpc_prep_req already set timeout */ - if (AT_OFF) - req->rq_timeout = ldlm_get_rq_timeout(); - - if (lock->l_export && lock->l_export->exp_ldlm_stats) - lprocfs_counter_incr(lock->l_export->exp_ldlm_stats, - LDLM_BL_CALLBACK - LDLM_FIRST_OPC); - - rc = ldlm_bl_and_cp_ast_fini(req, arg, lock, instant_cancel); - - RETURN(rc); -} - -int ldlm_server_completion_ast(struct ldlm_lock *lock, int flags, void *data) -{ - struct ldlm_cb_set_arg *arg = data; - struct ldlm_request *body; - struct ptlrpc_request *req; - struct timeval granted_time; - long total_enqueue_wait; - int size[3] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(*body) }; - int rc, buffers = 2, instant_cancel = 0; - ENTRY; - - LASSERT(lock != NULL); - LASSERT(data != NULL); - - do_gettimeofday(&granted_time); - total_enqueue_wait = cfs_timeval_sub(&granted_time, - &lock->l_enqueued_time, NULL); - - if (total_enqueue_wait / ONE_MILLION > obd_timeout) - /* non-fatal with AT - change to LDLM_DEBUG? */ - LDLM_ERROR(lock, "enqueue wait took %luus from %lu", - total_enqueue_wait, lock->l_enqueued_time.tv_sec); - - lock_res_and_lock(lock); - if (lock->l_resource->lr_lvb_len) { - size[DLM_REQ_REC_OFF] = lock->l_resource->lr_lvb_len; - buffers = 3; - } - unlock_res_and_lock(lock); - - req = ptlrpc_prep_req(lock->l_export->exp_imp_reverse, - LUSTRE_DLM_VERSION, LDLM_CP_CALLBACK, buffers, - size, NULL); - if (req == NULL) - RETURN(-ENOMEM); - - req->rq_async_args.pointer_arg[0] = arg; - req->rq_async_args.pointer_arg[1] = lock; - req->rq_interpret_reply = ldlm_cb_interpret; - req->rq_no_resend = 1; - - body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body)); - body->lock_handle[0] = lock->l_remote_handle; - body->lock_flags = flags; - ldlm_lock2desc(lock, &body->lock_desc); - - if (buffers == 3) { - void *lvb; - - lvb = lustre_msg_buf(req->rq_reqmsg, DLM_REQ_REC_OFF, - lock->l_resource->lr_lvb_len); - lock_res_and_lock(lock); - memcpy(lvb, lock->l_resource->lr_lvb_data, - lock->l_resource->lr_lvb_len); - unlock_res_and_lock(lock); - } - - LDLM_DEBUG(lock, "server preparing completion AST (after %ldus wait)", - total_enqueue_wait); - - /* Server-side enqueue wait time estimate, used in - __ldlm_add_waiting_lock to set future enqueue timers */ - at_add(&lock->l_resource->lr_namespace->ns_at_estimate, - total_enqueue_wait / ONE_MILLION); - - ptlrpc_req_set_repsize(req, 1, NULL); - - req->rq_send_state = LUSTRE_IMP_FULL; - /* ptlrpc_prep_req already set timeout */ - if (AT_OFF) - req->rq_timeout = ldlm_get_rq_timeout(); - - /* We only send real blocking ASTs after the lock is granted */ - lock_res_and_lock(lock); - if (lock->l_flags & LDLM_FL_AST_SENT) { - body->lock_flags |= LDLM_FL_AST_SENT; - - /* We might get here prior to ldlm_handle_enqueue setting - * LDLM_FL_CANCEL_ON_BLOCK flag. Then we will put this lock - * into waiting list, but this is safe and similar code in - * ldlm_handle_enqueue will call ldlm_lock_cancel() still, - * that would not only cancel the lock, but will also remove - * it from waiting list */ - if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK) { - unlock_res_and_lock(lock); - ldlm_lock_cancel(lock); - instant_cancel = 1; - lock_res_and_lock(lock); - } else { - ldlm_add_waiting_lock(lock); /* start the lock-timeout - clock */ - } - } - unlock_res_and_lock(lock); - - if (lock->l_export && lock->l_export->exp_ldlm_stats) - lprocfs_counter_incr(lock->l_export->exp_ldlm_stats, - LDLM_CP_CALLBACK - LDLM_FIRST_OPC); - - rc = ldlm_bl_and_cp_ast_fini(req, arg, lock, instant_cancel); - - RETURN(rc); -} - -int ldlm_server_glimpse_ast(struct ldlm_lock *lock, void *data) -{ - struct ldlm_resource *res = lock->l_resource; - struct ldlm_request *body; - struct ptlrpc_request *req; - int size[] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(*body) }; - int rc = 0; - ENTRY; - - LASSERT(lock != NULL); - - req = ptlrpc_prep_req(lock->l_export->exp_imp_reverse, - LUSTRE_DLM_VERSION, LDLM_GL_CALLBACK, 2, size, - NULL); - if (req == NULL) - RETURN(-ENOMEM); - - body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body)); - body->lock_handle[0] = lock->l_remote_handle; - ldlm_lock2desc(lock, &body->lock_desc); - - lock_res_and_lock(lock); - size[REPLY_REC_OFF] = lock->l_resource->lr_lvb_len; - unlock_res_and_lock(lock); - res = lock->l_resource; - ptlrpc_req_set_repsize(req, 2, size); - - req->rq_send_state = LUSTRE_IMP_FULL; - /* ptlrpc_prep_req already set timeout */ - if (AT_OFF) - req->rq_timeout = ldlm_get_rq_timeout(); - - if (lock->l_export && lock->l_export->exp_ldlm_stats) - lprocfs_counter_incr(lock->l_export->exp_ldlm_stats, - LDLM_GL_CALLBACK - LDLM_FIRST_OPC); - - rc = ptlrpc_queue_wait(req); - if (rc == -ELDLM_NO_LOCK_DATA) - LDLM_DEBUG(lock, "lost race - client has a lock but no inode"); - else if (rc != 0) - rc = ldlm_handle_ast_error(lock, req, rc, "glimpse"); - else - rc = ldlm_res_lvbo_update(res, req->rq_repmsg, - REPLY_REC_OFF, 1); - ptlrpc_req_finished(req); - RETURN(rc); -} - -static struct ldlm_lock * -find_existing_lock(struct obd_export *exp, struct lustre_handle *remote_hdl) -{ - struct list_head *iter; - - spin_lock(&exp->exp_ldlm_data.led_lock); - list_for_each(iter, &exp->exp_ldlm_data.led_held_locks) { - struct ldlm_lock *lock; - lock = list_entry(iter, struct ldlm_lock, l_export_chain); - if (lock->l_remote_handle.cookie == remote_hdl->cookie) { - LDLM_LOCK_GET(lock); - spin_unlock(&exp->exp_ldlm_data.led_lock); - return lock; - } - } - spin_unlock(&exp->exp_ldlm_data.led_lock); - return NULL; -} - -static void ldlm_svc_get_eopc(struct ldlm_request *dlm_req, - struct lprocfs_stats *srv_stats) -{ - int lock_type = 0, op = 0; - - lock_type = dlm_req->lock_desc.l_resource.lr_type; - - switch (lock_type) { - case LDLM_PLAIN: - op = PTLRPC_LAST_CNTR + LDLM_PLAIN_ENQUEUE; - break; - case LDLM_EXTENT: - if (dlm_req->lock_flags & LDLM_FL_HAS_INTENT) - op = PTLRPC_LAST_CNTR + LDLM_GLIMPSE_ENQUEUE; - else - op = PTLRPC_LAST_CNTR + LDLM_EXTENT_ENQUEUE; - break; - case LDLM_FLOCK: - op = PTLRPC_LAST_CNTR + LDLM_FLOCK_ENQUEUE; - break; - case LDLM_IBITS: - op = PTLRPC_LAST_CNTR + LDLM_IBITS_ENQUEUE; - break; - default: - op = 0; - break; - } - - if (op) - lprocfs_counter_incr(srv_stats, op); - - return ; -} - -/* - * Main server-side entry point into LDLM. This is called by ptlrpc service - * threads to carry out client lock enqueueing requests. - */ -int ldlm_handle_enqueue(struct ptlrpc_request *req, - ldlm_completion_callback completion_callback, - ldlm_blocking_callback blocking_callback, - ldlm_glimpse_callback glimpse_callback) -{ - struct obd_device *obddev = req->rq_export->exp_obd; - struct ldlm_reply *dlm_rep; - struct ldlm_request *dlm_req; - int size[3] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREPLY_OFF] = sizeof(*dlm_rep) }; - int rc = 0; - __u32 flags; - ldlm_error_t err = ELDLM_OK; - struct ldlm_lock *lock = NULL; - void *cookie = NULL; - ENTRY; - - LDLM_DEBUG_NOLOCK("server-side enqueue handler START"); - - dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, sizeof(*dlm_req), - lustre_swab_ldlm_request); - if (dlm_req == NULL) { - CERROR ("Can't unpack dlm_req\n"); - GOTO(out, rc = -EFAULT); - } - - ldlm_request_cancel(req, dlm_req, LDLM_ENQUEUE_CANCEL_OFF); - flags = dlm_req->lock_flags; - - LASSERT(req->rq_export); - - if (req->rq_rqbd->rqbd_service->srv_stats) - ldlm_svc_get_eopc(dlm_req, - req->rq_rqbd->rqbd_service->srv_stats); - - if (req->rq_export->exp_ldlm_stats) - lprocfs_counter_incr(req->rq_export->exp_ldlm_stats, - LDLM_ENQUEUE - LDLM_FIRST_OPC); - - if (dlm_req->lock_desc.l_resource.lr_type < LDLM_MIN_TYPE || - dlm_req->lock_desc.l_resource.lr_type >= LDLM_MAX_TYPE) { - DEBUG_REQ(D_ERROR, req, "invalid lock request type %d", - dlm_req->lock_desc.l_resource.lr_type); - GOTO(out, rc = -EFAULT); - } - - if (dlm_req->lock_desc.l_req_mode <= LCK_MINMODE || - dlm_req->lock_desc.l_req_mode >= LCK_MAXMODE || - dlm_req->lock_desc.l_req_mode & (dlm_req->lock_desc.l_req_mode-1)) { - DEBUG_REQ(D_ERROR, req, "invalid lock request mode %d", - dlm_req->lock_desc.l_req_mode); - GOTO(out, rc = -EFAULT); - } - - if (req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS) { - if (dlm_req->lock_desc.l_resource.lr_type == LDLM_PLAIN) { - DEBUG_REQ(D_ERROR, req, - "PLAIN lock request from IBITS client?"); - GOTO(out, rc = -EPROTO); - } - } else if (dlm_req->lock_desc.l_resource.lr_type == LDLM_IBITS) { - DEBUG_REQ(D_ERROR, req, - "IBITS lock request from unaware client?"); - GOTO(out, rc = -EPROTO); - } - -#if 0 - /* FIXME this makes it impossible to use LDLM_PLAIN locks -- check - against server's _CONNECT_SUPPORTED flags? (I don't want to use - ibits for mgc/mgs) */ - - /* INODEBITS_INTEROP: Perform conversion from plain lock to - * inodebits lock if client does not support them. */ - if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS) && - (dlm_req->lock_desc.l_resource.lr_type == LDLM_PLAIN)) { - dlm_req->lock_desc.l_resource.lr_type = LDLM_IBITS; - dlm_req->lock_desc.l_policy_data.l_inodebits.bits = - MDS_INODELOCK_LOOKUP | MDS_INODELOCK_UPDATE; - if (dlm_req->lock_desc.l_req_mode == LCK_PR) - dlm_req->lock_desc.l_req_mode = LCK_CR; - } -#endif - - if (flags & LDLM_FL_REPLAY) { - lock = find_existing_lock(req->rq_export, - &dlm_req->lock_handle[0]); - if (lock != NULL) { - DEBUG_REQ(D_DLMTRACE, req, "found existing lock cookie " - LPX64, lock->l_handle.h_cookie); - GOTO(existing_lock, rc = 0); - } - } - - /* The lock's callback data might be set in the policy function */ - lock = ldlm_lock_create(obddev->obd_namespace, - dlm_req->lock_desc.l_resource.lr_name, - dlm_req->lock_desc.l_resource.lr_type, - dlm_req->lock_desc.l_req_mode, - blocking_callback, completion_callback, - glimpse_callback, NULL, 0); - if (!lock) - GOTO(out, rc = -ENOMEM); - - do_gettimeofday(&lock->l_enqueued_time); - lock->l_remote_handle = dlm_req->lock_handle[0]; - LDLM_DEBUG(lock, "server-side enqueue handler, new lock created"); - - OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_ENQUEUE_BLOCKED, obd_timeout * 2); - /* Don't enqueue a lock onto the export if it has already - * been evicted. Cancel it now instead. (bug 3822) */ - if (req->rq_export->exp_failed) { - LDLM_ERROR(lock, "lock on destroyed export %p", req->rq_export); - GOTO(out, rc = -ENOTCONN); - } - lock->l_export = class_export_get(req->rq_export); - spin_lock(&lock->l_export->exp_ldlm_data.led_lock); - list_add(&lock->l_export_chain, - &lock->l_export->exp_ldlm_data.led_held_locks); - spin_unlock(&lock->l_export->exp_ldlm_data.led_lock); - -existing_lock: - - if (flags & LDLM_FL_HAS_INTENT) { - /* In this case, the reply buffer is allocated deep in - * local_lock_enqueue by the policy function. */ - cookie = req; - } else { - int buffers = 2; - - lock_res_and_lock(lock); - if (lock->l_resource->lr_lvb_len) { - size[DLM_REPLY_REC_OFF] = lock->l_resource->lr_lvb_len; - buffers = 3; - } - unlock_res_and_lock(lock); - - if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR)) - GOTO(out, rc = -ENOMEM); - - rc = lustre_pack_reply(req, buffers, size, NULL); - if (rc) - GOTO(out, rc); - } - - if (dlm_req->lock_desc.l_resource.lr_type != LDLM_PLAIN) - lock->l_policy_data = dlm_req->lock_desc.l_policy_data; - if (dlm_req->lock_desc.l_resource.lr_type == LDLM_EXTENT) - lock->l_req_extent = lock->l_policy_data.l_extent; - - err = ldlm_lock_enqueue(obddev->obd_namespace, &lock, cookie, (int *)&flags); - if (err) - GOTO(out, err); - - dlm_rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, - sizeof(*dlm_rep)); - dlm_rep->lock_flags = flags; - - ldlm_lock2desc(lock, &dlm_rep->lock_desc); - ldlm_lock2handle(lock, &dlm_rep->lock_handle); - - /* We never send a blocking AST until the lock is granted, but - * we can tell it right now */ - lock_res_and_lock(lock); - - /* Now take into account flags to be inherited from original lock - request both in reply to client and in our own lock flags. */ - dlm_rep->lock_flags |= dlm_req->lock_flags & LDLM_INHERIT_FLAGS; - lock->l_flags |= dlm_req->lock_flags & LDLM_INHERIT_FLAGS; - - /* Don't move a pending lock onto the export if it has already - * been evicted. Cancel it now instead. (bug 5683) */ - if (req->rq_export->exp_failed || - OBD_FAIL_CHECK_ONCE(OBD_FAIL_LDLM_ENQUEUE_OLD_EXPORT)) { - LDLM_ERROR(lock, "lock on destroyed export %p", req->rq_export); - rc = -ENOTCONN; - } else if (lock->l_flags & LDLM_FL_AST_SENT) { - dlm_rep->lock_flags |= LDLM_FL_AST_SENT; - if (lock->l_granted_mode == lock->l_req_mode) { - /* Only cancel lock if it was granted, because it - * would be destroyed immediatelly and would never - * be granted in the future, causing timeouts on client. - * Not granted lock will be cancelled immediatelly after - * sending completion AST. - */ - if (dlm_rep->lock_flags & LDLM_FL_CANCEL_ON_BLOCK) { - unlock_res_and_lock(lock); - ldlm_lock_cancel(lock); - lock_res_and_lock(lock); - } else - ldlm_add_waiting_lock(lock); - } - } - /* Make sure we never ever grant usual metadata locks to liblustre - clients */ - if ((dlm_req->lock_desc.l_resource.lr_type == LDLM_PLAIN || - dlm_req->lock_desc.l_resource.lr_type == LDLM_IBITS) && - req->rq_export->exp_libclient) { - if (!(lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK) || - !(dlm_rep->lock_flags & LDLM_FL_CANCEL_ON_BLOCK)) { - CERROR("Granting sync lock to libclient. " - "req fl %d, rep fl %d, lock fl %d\n", - dlm_req->lock_flags, dlm_rep->lock_flags, - lock->l_flags); - LDLM_ERROR(lock, "sync lock"); - if (dlm_req->lock_flags & LDLM_FL_HAS_INTENT) { - struct ldlm_intent *it; - it = lustre_msg_buf(req->rq_reqmsg, - DLM_INTENT_IT_OFF, - sizeof(*it)); - if (it != NULL) { - CERROR("This is intent %s ("LPU64")\n", - ldlm_it2str(it->opc), it->opc); - } - } - } - } - - unlock_res_and_lock(lock); - - EXIT; - out: - req->rq_status = rc ?: err; /* return either error - bug 11190 */ - if (!req->rq_packed_final) { - err = lustre_pack_reply(req, 1, NULL, NULL); - if (rc == 0) - rc = err; - } - - /* The LOCK_CHANGED code in ldlm_lock_enqueue depends on this - * ldlm_reprocess_all. If this moves, revisit that code. -phil */ - if (lock) { - LDLM_DEBUG(lock, "server-side enqueue handler, sending reply" - "(err=%d, rc=%d)", err, rc); - - if (rc == 0) { - lock_res_and_lock(lock); - size[DLM_REPLY_REC_OFF] = lock->l_resource->lr_lvb_len; - if (size[DLM_REPLY_REC_OFF] > 0) { - void *lvb = lustre_msg_buf(req->rq_repmsg, - DLM_REPLY_REC_OFF, - size[DLM_REPLY_REC_OFF]); - LASSERTF(lvb != NULL, "req %p, lock %p\n", - req, lock); - - memcpy(lvb, lock->l_resource->lr_lvb_data, - size[DLM_REPLY_REC_OFF]); - } - unlock_res_and_lock(lock); - } else { - lock_res_and_lock(lock); - ldlm_resource_unlink_lock(lock); - ldlm_lock_destroy_nolock(lock); - unlock_res_and_lock(lock); - } - - if (!err && dlm_req->lock_desc.l_resource.lr_type != LDLM_FLOCK) - ldlm_reprocess_all(lock->l_resource); - - LDLM_LOCK_PUT(lock); - } - - LDLM_DEBUG_NOLOCK("server-side enqueue handler END (lock %p, rc %d)", - lock, rc); - - return rc; -} - -int ldlm_handle_convert(struct ptlrpc_request *req) -{ - struct ldlm_request *dlm_req; - struct ldlm_reply *dlm_rep; - struct ldlm_lock *lock; - int rc; - int size[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREPLY_OFF] = sizeof(*dlm_rep) }; - ENTRY; - - dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, sizeof(*dlm_req), - lustre_swab_ldlm_request); - if (dlm_req == NULL) { - CERROR ("Can't unpack dlm_req\n"); - RETURN (-EFAULT); - } - - if (req->rq_export && req->rq_export->exp_ldlm_stats) - lprocfs_counter_incr(req->rq_export->exp_ldlm_stats, - LDLM_CONVERT - LDLM_FIRST_OPC); - - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - RETURN(rc); - - dlm_rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, - sizeof(*dlm_rep)); - dlm_rep->lock_flags = dlm_req->lock_flags; - - lock = ldlm_handle2lock(&dlm_req->lock_handle[0]); - if (!lock) { - req->rq_status = EINVAL; - } else { - void *res = NULL; - - LDLM_DEBUG(lock, "server-side convert handler START"); - - do_gettimeofday(&lock->l_enqueued_time); - res = ldlm_lock_convert(lock, dlm_req->lock_desc.l_req_mode, - &dlm_rep->lock_flags); - if (res) { - if (ldlm_del_waiting_lock(lock)) - LDLM_DEBUG(lock, "converted waiting lock"); - req->rq_status = 0; - } else { - req->rq_status = EDEADLOCK; - } - } - - if (lock) { - if (!req->rq_status) - ldlm_reprocess_all(lock->l_resource); - LDLM_DEBUG(lock, "server-side convert handler END"); - LDLM_LOCK_PUT(lock); - } else - LDLM_DEBUG_NOLOCK("server-side convert handler END"); - - RETURN(0); -} - -/* Cancel all the locks whos handles are packed into ldlm_request */ -int ldlm_request_cancel(struct ptlrpc_request *req, - struct ldlm_request *dlm_req, int first) -{ - struct ldlm_resource *res, *pres = NULL; - struct ldlm_lock *lock; - int i, count, done = 0; - ENTRY; - - count = dlm_req->lock_count ? dlm_req->lock_count : 1; - if (first >= count) - RETURN(0); - - /* There is no lock on the server at the replay time, - * skip lock cancelling to make replay tests to pass. */ - if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) - RETURN(0); - - LDLM_DEBUG_NOLOCK("server-side cancel handler START: %d locks", - count - first); - for (i = first; i < count; i++) { - lock = ldlm_handle2lock(&dlm_req->lock_handle[i]); - if (!lock) { - LDLM_DEBUG_NOLOCK("server-side cancel handler stale " - "lock (cookie "LPU64")", - dlm_req->lock_handle[i].cookie); - continue; - } - - done++; - res = lock->l_resource; - if (res != pres) { - if (pres != NULL) { - ldlm_reprocess_all(pres); - ldlm_resource_putref(pres); - } - if (res != NULL) { - ldlm_resource_getref(res); - ldlm_res_lvbo_update(res, NULL, 0, 1); - } - pres = res; - } - ldlm_lock_cancel(lock); - LDLM_LOCK_PUT(lock); - } - if (pres != NULL) { - ldlm_reprocess_all(pres); - ldlm_resource_putref(pres); - } - LDLM_DEBUG_NOLOCK("server-side cancel handler END"); - RETURN(done); -} - -int ldlm_handle_cancel(struct ptlrpc_request *req) -{ - struct ldlm_request *dlm_req; - int rc; - ENTRY; - - dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, sizeof(*dlm_req), - lustre_swab_ldlm_request); - if (dlm_req == NULL) { - CERROR("bad request buffer for cancel\n"); - RETURN(-EFAULT); - } - - if (req->rq_export && req->rq_export->exp_ldlm_stats) - lprocfs_counter_incr(req->rq_export->exp_ldlm_stats, - LDLM_CANCEL - LDLM_FIRST_OPC); - - rc = lustre_pack_reply(req, 1, NULL, NULL); - if (rc) - RETURN(rc); - - if (!ldlm_request_cancel(req, dlm_req, 0)) - req->rq_status = ESTALE; - - if (ptlrpc_reply(req) != 0) - LBUG(); - - RETURN(0); -} - -void ldlm_handle_bl_callback(struct ldlm_namespace *ns, - struct ldlm_lock_desc *ld, struct ldlm_lock *lock) -{ - int do_ast; - ENTRY; - - LDLM_DEBUG(lock, "client blocking AST callback handler START"); - - lock_res_and_lock(lock); - lock->l_flags |= LDLM_FL_CBPENDING; - - if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK) - lock->l_flags |= LDLM_FL_CANCEL; - - do_ast = (!lock->l_readers && !lock->l_writers); - unlock_res_and_lock(lock); - - if (do_ast) { - LDLM_DEBUG(lock, "already unused, calling " - "callback (%p)", lock->l_blocking_ast); - if (lock->l_blocking_ast != NULL) - lock->l_blocking_ast(lock, ld, lock->l_ast_data, - LDLM_CB_BLOCKING); - } else { - LDLM_DEBUG(lock, "Lock still has references, will be" - " cancelled later"); - } - - LDLM_DEBUG(lock, "client blocking callback handler END"); - LDLM_LOCK_PUT(lock); - EXIT; -} - -static void ldlm_handle_cp_callback(struct ptlrpc_request *req, - struct ldlm_namespace *ns, - struct ldlm_request *dlm_req, - struct ldlm_lock *lock) -{ - CFS_LIST_HEAD(ast_list); - ENTRY; - - LDLM_DEBUG(lock, "client completion callback handler START"); - - if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_BL_CB_RACE)) { - int to = cfs_time_seconds(1); - while (to > 0) { - to = schedule_timeout(to); - if (lock->l_granted_mode == lock->l_req_mode || - lock->l_destroyed) - break; - } - } - - lock_res_and_lock(lock); - if (lock->l_destroyed || - lock->l_granted_mode == lock->l_req_mode) { - /* bug 11300: the lock has already been granted */ - unlock_res_and_lock(lock); - LDLM_DEBUG(lock, "Double grant race happened"); - LDLM_LOCK_PUT(lock); - EXIT; - return; - } - - /* If we receive the completion AST before the actual enqueue returned, - * then we might need to switch lock modes, resources, or extents. */ - if (dlm_req->lock_desc.l_granted_mode != lock->l_req_mode) { - lock->l_req_mode = dlm_req->lock_desc.l_granted_mode; - LDLM_DEBUG(lock, "completion AST, new lock mode"); - } - - if (lock->l_resource->lr_type != LDLM_PLAIN) { - lock->l_policy_data = dlm_req->lock_desc.l_policy_data; - LDLM_DEBUG(lock, "completion AST, new policy data"); - } - - ldlm_resource_unlink_lock(lock); - if (memcmp(&dlm_req->lock_desc.l_resource.lr_name, - &lock->l_resource->lr_name, - sizeof(lock->l_resource->lr_name)) != 0) { - unlock_res_and_lock(lock); - ldlm_lock_change_resource(ns, lock, - dlm_req->lock_desc.l_resource.lr_name); - LDLM_DEBUG(lock, "completion AST, new resource"); - CERROR("change resource!\n"); - lock_res_and_lock(lock); - } - - if (dlm_req->lock_flags & LDLM_FL_AST_SENT) { - /* BL_AST locks are not needed in lru. - * let ldlm_cancel_lru() be fast. */ - ldlm_lock_remove_from_lru(lock); - lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_BL_AST; - LDLM_DEBUG(lock, "completion AST includes blocking AST"); - } - - if (lock->l_lvb_len) { - void *lvb; - lvb = lustre_swab_reqbuf(req, DLM_REQ_REC_OFF, lock->l_lvb_len, - lock->l_lvb_swabber); - if (lvb == NULL) { - LDLM_ERROR(lock, "completion AST did not contain " - "expected LVB!"); - } else { - memcpy(lock->l_lvb_data, lvb, lock->l_lvb_len); - } - } - - ldlm_grant_lock(lock, &ast_list); - unlock_res_and_lock(lock); - - LDLM_DEBUG(lock, "callback handler finished, about to run_ast_work"); - - ldlm_run_cp_ast_work(&ast_list); - - LDLM_DEBUG_NOLOCK("client completion callback handler END (lock %p)", - lock); - LDLM_LOCK_PUT(lock); - EXIT; -} - -static void ldlm_handle_gl_callback(struct ptlrpc_request *req, - struct ldlm_namespace *ns, - struct ldlm_request *dlm_req, - struct ldlm_lock *lock) -{ - int rc = -ENOSYS; - ENTRY; - - LDLM_DEBUG(lock, "client glimpse AST callback handler"); - - if (lock->l_glimpse_ast != NULL) - rc = lock->l_glimpse_ast(lock, req); - - if (req->rq_repmsg != NULL) { - ptlrpc_reply(req); - } else { - req->rq_status = rc; - ptlrpc_error(req); - } - - lock_res_and_lock(lock); - if (lock->l_granted_mode == LCK_PW && - !lock->l_readers && !lock->l_writers && - cfs_time_after(cfs_time_current(), - cfs_time_add(lock->l_last_used, - cfs_time_seconds(10)))) { - unlock_res_and_lock(lock); - if (ldlm_bl_to_thread_lock(ns, NULL, lock)) - ldlm_handle_bl_callback(ns, NULL, lock); - - EXIT; - return; - } - unlock_res_and_lock(lock); - LDLM_LOCK_PUT(lock); - EXIT; -} - -static int ldlm_callback_reply(struct ptlrpc_request *req, int rc) -{ - req->rq_status = rc; - if (!req->rq_packed_final) { - rc = lustre_pack_reply(req, 1, NULL, NULL); - if (rc) - return rc; - } - return ptlrpc_reply(req); -} - -#ifdef __KERNEL__ -static int ldlm_bl_to_thread(struct ldlm_namespace *ns, - struct ldlm_lock_desc *ld, struct ldlm_lock *lock, - struct list_head *cancels, int count) -{ - struct ldlm_bl_pool *blp = ldlm_state->ldlm_bl_pool; - struct ldlm_bl_work_item *blwi; - ENTRY; - - if (cancels && count == 0) - RETURN(0); - - OBD_ALLOC(blwi, sizeof(*blwi)); - if (blwi == NULL) - RETURN(-ENOMEM); - - blwi->blwi_ns = ns; - if (ld != NULL) - blwi->blwi_ld = *ld; - if (count) { - list_add(&blwi->blwi_head, cancels); - list_del_init(cancels); - blwi->blwi_count = count; - } else { - blwi->blwi_lock = lock; - } - spin_lock(&blp->blp_lock); - if (lock && lock->l_flags & LDLM_FL_DISCARD_DATA) { - /* add LDLM_FL_DISCARD_DATA requests to the priority list */ - list_add_tail(&blwi->blwi_entry, &blp->blp_prio_list); - } else { - /* other blocking callbacks are added to the regular list */ - list_add_tail(&blwi->blwi_entry, &blp->blp_list); - } - cfs_waitq_signal(&blp->blp_waitq); - spin_unlock(&blp->blp_lock); - - RETURN(0); -} -#endif - -int ldlm_bl_to_thread_lock(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld, - struct ldlm_lock *lock) -{ -#ifdef __KERNEL__ - RETURN(ldlm_bl_to_thread(ns, ld, lock, NULL, 0)); -#else - RETURN(-ENOSYS); -#endif -} - -int ldlm_bl_to_thread_list(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld, - struct list_head *cancels, int count) -{ -#ifdef __KERNEL__ - RETURN(ldlm_bl_to_thread(ns, ld, NULL, cancels, count)); -#else - RETURN(-ENOSYS); -#endif -} - -static int ldlm_callback_handler(struct ptlrpc_request *req) -{ - struct ldlm_namespace *ns; - struct ldlm_request *dlm_req; - struct ldlm_lock *lock; - int rc; - ENTRY; - - /* Requests arrive in sender's byte order. The ptlrpc service - * handler has already checked and, if necessary, byte-swapped the - * incoming request message body, but I am responsible for the - * message buffers. */ - - if (req->rq_export == NULL) { - struct ldlm_request *dlm_req; - - CDEBUG(D_RPCTRACE, "operation %d from %s with bad " - "export cookie "LPX64"; this is " - "normal if this node rebooted with a lock held\n", - lustre_msg_get_opc(req->rq_reqmsg), - libcfs_id2str(req->rq_peer), - lustre_msg_get_handle(req->rq_reqmsg)->cookie); - - dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, - sizeof(*dlm_req), - lustre_swab_ldlm_request); - if (dlm_req != NULL) - CDEBUG(D_RPCTRACE, "--> lock cookie: "LPX64"\n", - dlm_req->lock_handle[0].cookie); - - ldlm_callback_reply(req, -ENOTCONN); - RETURN(0); - } - - LASSERT(req->rq_export != NULL); - LASSERT(req->rq_export->exp_obd != NULL); - - switch (lustre_msg_get_opc(req->rq_reqmsg)) { - case LDLM_BL_CALLBACK: - OBD_FAIL_RETURN(OBD_FAIL_LDLM_BL_CALLBACK, 0); - break; - case LDLM_CP_CALLBACK: - OBD_FAIL_RETURN(OBD_FAIL_LDLM_CP_CALLBACK, 0); - break; - case LDLM_GL_CALLBACK: - OBD_FAIL_RETURN(OBD_FAIL_LDLM_GL_CALLBACK, 0); - break; - case OBD_LOG_CANCEL: /* remove this eventually - for 1.4.0 compat */ - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOG_CANCEL_NET, 0); - rc = llog_origin_handle_cancel(req); - ldlm_callback_reply(req, rc); - RETURN(0); - case OBD_QC_CALLBACK: - OBD_FAIL_RETURN(OBD_FAIL_OBD_QC_CALLBACK_NET, 0); - rc = target_handle_qc_callback(req); - ldlm_callback_reply(req, rc); - RETURN(0); - case QUOTA_DQACQ: - case QUOTA_DQREL: - /* reply in handler */ - rc = target_handle_dqacq_callback(req); - RETURN(0); - case LLOG_ORIGIN_HANDLE_CREATE: - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_create(req); - ldlm_callback_reply(req, rc); - RETURN(0); - case LLOG_ORIGIN_HANDLE_NEXT_BLOCK: - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_next_block(req); - ldlm_callback_reply(req, rc); - RETURN(0); - case LLOG_ORIGIN_HANDLE_READ_HEADER: - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_read_header(req); - ldlm_callback_reply(req, rc); - RETURN(0); - case LLOG_ORIGIN_HANDLE_CLOSE: - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_close(req); - ldlm_callback_reply(req, rc); - RETURN(0); - default: - CERROR("unknown opcode %u\n", - lustre_msg_get_opc(req->rq_reqmsg)); - ldlm_callback_reply(req, -EPROTO); - RETURN(0); - } - - ns = req->rq_export->exp_obd->obd_namespace; - LASSERT(ns != NULL); - - dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, sizeof(*dlm_req), - lustre_swab_ldlm_request); - if (dlm_req == NULL) { - CERROR ("can't unpack dlm_req\n"); - ldlm_callback_reply(req, -EPROTO); - RETURN (0); - } - - /* Force a known safe race, send a cancel to the server for a lock - * which the server has already started a blocking callback on. */ - if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_BL_CB_RACE) && - lustre_msg_get_opc(req->rq_reqmsg) == LDLM_BL_CALLBACK) { - rc = ldlm_cli_cancel(&dlm_req->lock_handle[0]); - if (rc < 0) - CERROR("ldlm_cli_cancel: %d\n", rc); - } - - lock = ldlm_handle2lock_ns(ns, &dlm_req->lock_handle[0]); - if (!lock) { - CDEBUG(D_DLMTRACE, "callback on lock "LPX64" - lock " - "disappeared\n", dlm_req->lock_handle[0].cookie); - ldlm_callback_reply(req, -EINVAL); - RETURN(0); - } - - /* Copy hints/flags (e.g. LDLM_FL_DISCARD_DATA) from AST. */ - lock_res_and_lock(lock); - lock->l_flags |= (dlm_req->lock_flags & LDLM_AST_FLAGS); - if (lustre_msg_get_opc(req->rq_reqmsg) == LDLM_BL_CALLBACK) { - /* If somebody cancels locks and cache is already droped, - * we can tell the server we have no lock. Otherwise, we - * should send cancel after dropping the cache. */ - if ((lock->l_flags & LDLM_FL_CANCELING) && - (lock->l_flags & LDLM_FL_BL_DONE)) { - LDLM_DEBUG(lock, "callback on lock " - LPX64" - lock disappeared\n", - dlm_req->lock_handle[0].cookie); - unlock_res_and_lock(lock); - LDLM_LOCK_PUT(lock); - ldlm_callback_reply(req, -EINVAL); - RETURN(0); - } - /* BL_AST locks are not needed in lru. - * let ldlm_cancel_lru() be fast. */ - ldlm_lock_remove_from_lru(lock); - lock->l_flags |= LDLM_FL_BL_AST; - } - unlock_res_and_lock(lock); - - /* We want the ost thread to get this reply so that it can respond - * to ost requests (write cache writeback) that might be triggered - * in the callback. - * - * But we'd also like to be able to indicate in the reply that we're - * cancelling right now, because it's unused, or have an intent result - * in the reply, so we might have to push the responsibility for sending - * the reply down into the AST handlers, alas. */ - - switch (lustre_msg_get_opc(req->rq_reqmsg)) { - case LDLM_BL_CALLBACK: - CDEBUG(D_INODE, "blocking ast\n"); - if (!(lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK)) - ldlm_callback_reply(req, 0); - if (ldlm_bl_to_thread_lock(ns, &dlm_req->lock_desc, lock)) - ldlm_handle_bl_callback(ns, &dlm_req->lock_desc, lock); - break; - case LDLM_CP_CALLBACK: - CDEBUG(D_INODE, "completion ast\n"); - ldlm_callback_reply(req, 0); - ldlm_handle_cp_callback(req, ns, dlm_req, lock); - break; - case LDLM_GL_CALLBACK: - CDEBUG(D_INODE, "glimpse ast\n"); - ldlm_handle_gl_callback(req, ns, dlm_req, lock); - break; - default: - LBUG(); /* checked above */ - } - - RETURN(0); -} - -static int ldlm_cancel_handler(struct ptlrpc_request *req) -{ - int rc; - ENTRY; - - /* Requests arrive in sender's byte order. The ptlrpc service - * handler has already checked and, if necessary, byte-swapped the - * incoming request message body, but I am responsible for the - * message buffers. */ - - if (req->rq_export == NULL) { - struct ldlm_request *dlm_req; - - CERROR("operation %d from %s with bad export cookie "LPU64"\n", - lustre_msg_get_opc(req->rq_reqmsg), - libcfs_id2str(req->rq_peer), - lustre_msg_get_handle(req->rq_reqmsg)->cookie); - - dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, - sizeof(*dlm_req), - lustre_swab_ldlm_request); - if (dlm_req != NULL) - ldlm_lock_dump_handle(D_ERROR, - &dlm_req->lock_handle[0]); - - ldlm_callback_reply(req, -ENOTCONN); - RETURN(0); - } - - switch (lustre_msg_get_opc(req->rq_reqmsg)) { - - /* XXX FIXME move this back to mds/handler.c, bug 249 */ - case LDLM_CANCEL: - CDEBUG(D_INODE, "cancel\n"); - OBD_FAIL_RETURN(OBD_FAIL_LDLM_CANCEL, 0); - rc = ldlm_handle_cancel(req); - if (rc) - break; - RETURN(0); - case OBD_LOG_CANCEL: - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOG_CANCEL_NET, 0); - rc = llog_origin_handle_cancel(req); - ldlm_callback_reply(req, rc); - RETURN(0); - default: - CERROR("invalid opcode %d\n", - lustre_msg_get_opc(req->rq_reqmsg)); - ldlm_callback_reply(req, -EINVAL); - } - - RETURN(0); -} - -#ifdef __KERNEL__ -static struct ldlm_bl_work_item *ldlm_bl_get_work(struct ldlm_bl_pool *blp) -{ - struct ldlm_bl_work_item *blwi = NULL; - static unsigned int num_bl = 0; - - spin_lock(&blp->blp_lock); - /* process a request from the blp_list at least every blp_num_threads */ - if (!list_empty(&blp->blp_list) && - (list_empty(&blp->blp_prio_list) || num_bl == 0)) - blwi = list_entry(blp->blp_list.next, - struct ldlm_bl_work_item, blwi_entry); - else - if (!list_empty(&blp->blp_prio_list)) - blwi = list_entry(blp->blp_prio_list.next, - struct ldlm_bl_work_item, blwi_entry); - - if (blwi) { - if (++num_bl >= atomic_read(&blp->blp_num_threads)) - num_bl = 0; - list_del(&blwi->blwi_entry); - } - spin_unlock(&blp->blp_lock); - - return blwi; -} - -/* This only contains temporary data until the thread starts */ -struct ldlm_bl_thread_data { - char bltd_name[CFS_CURPROC_COMM_MAX]; - struct ldlm_bl_pool *bltd_blp; - struct completion bltd_comp; - int bltd_num; -}; - -static int ldlm_bl_thread_main(void *arg); - -static int ldlm_bl_thread_start(struct ldlm_bl_pool *blp) -{ - struct ldlm_bl_thread_data bltd = { .bltd_blp = blp }; - int rc; - - init_completion(&bltd.bltd_comp); - rc = cfs_kernel_thread(ldlm_bl_thread_main, &bltd, 0); - if (rc < 0) { - CERROR("cannot start LDLM thread ldlm_bl_%02d: rc %d\n", - atomic_read(&blp->blp_num_threads), rc); - return rc; - } - wait_for_completion(&bltd.bltd_comp); - - return 0; -} - -static int ldlm_bl_thread_main(void *arg) -{ - struct ldlm_bl_pool *blp; - ENTRY; - - { - struct ldlm_bl_thread_data *bltd = arg; - - blp = bltd->bltd_blp; - - bltd->bltd_num = atomic_inc_return(&blp->blp_num_threads) - 1; - atomic_inc(&blp->blp_busy_threads); - - snprintf(bltd->bltd_name, sizeof(bltd->bltd_name) - 1, - "ldlm_bl_%02d", bltd->bltd_num); - cfs_daemonize(bltd->bltd_name); - - complete(&bltd->bltd_comp); - /* cannot use bltd after this, it is only on caller's stack */ - } - - while (1) { - struct l_wait_info lwi = { 0 }; - struct ldlm_bl_work_item *blwi = NULL; - - blwi = ldlm_bl_get_work(blp); - - if (blwi == NULL) { - int busy; - - atomic_dec(&blp->blp_busy_threads); - l_wait_event_exclusive(blp->blp_waitq, - (blwi = ldlm_bl_get_work(blp)) != NULL, - &lwi); - busy = atomic_inc_return(&blp->blp_busy_threads); - - if (blwi->blwi_ns == NULL) - /* added by ldlm_cleanup() */ - break; - - /* Not fatal if racy and have a few too many threads */ - if (unlikely(busy < blp->blp_max_threads && - busy >= atomic_read(&blp->blp_num_threads))) - /* discard the return value, we tried */ - ldlm_bl_thread_start(blp); - } else { - if (blwi->blwi_ns == NULL) - /* added by ldlm_cleanup() */ - break; - } - - if (blwi->blwi_count) { - /* The special case when we cancel locks in lru - * asynchronously, we pass the list of locks here. - * Thus lock is marked LDLM_FL_CANCELING, and already - * canceled locally. */ - ldlm_cli_cancel_list(&blwi->blwi_head, - blwi->blwi_count, NULL, 0); - } else { - ldlm_handle_bl_callback(blwi->blwi_ns, &blwi->blwi_ld, - blwi->blwi_lock); - } - OBD_FREE(blwi, sizeof(*blwi)); - } - - atomic_dec(&blp->blp_busy_threads); - atomic_dec(&blp->blp_num_threads); - complete(&blp->blp_comp); - RETURN(0); -} - -#endif - -static int ldlm_setup(void); -static int ldlm_cleanup(int force); - -int ldlm_get_ref(void) -{ - int rc = 0; - ENTRY; - mutex_down(&ldlm_ref_sem); - if (++ldlm_refcount == 1) { - rc = ldlm_setup(); - if (rc) - ldlm_refcount--; - } - mutex_up(&ldlm_ref_sem); - - RETURN(rc); -} - -void ldlm_put_ref(int force) -{ - ENTRY; - mutex_down(&ldlm_ref_sem); - if (ldlm_refcount == 1) { - int rc = ldlm_cleanup(force); - if (rc) - CERROR("ldlm_cleanup failed: %d\n", rc); - else - ldlm_refcount--; - } else { - ldlm_refcount--; - } - mutex_up(&ldlm_ref_sem); - - EXIT; -} - -static int ldlm_setup(void) -{ - struct ldlm_bl_pool *blp; - int rc = 0; - int ldlm_min_threads = LDLM_THREADS_AUTO_MIN; - int ldlm_max_threads = LDLM_THREADS_AUTO_MAX; -#ifdef __KERNEL__ - int i; -#endif - ENTRY; - - if (ldlm_state != NULL) - RETURN(-EALREADY); - - OBD_ALLOC(ldlm_state, sizeof(*ldlm_state)); - if (ldlm_state == NULL) - RETURN(-ENOMEM); - -#ifdef LPROCFS - rc = ldlm_proc_setup(); - if (rc != 0) - GOTO(out_free, rc); -#endif - -#ifdef __KERNEL__ - if (ldlm_num_threads) { - /* If ldlm_num_threads is set, it is the min and the max. */ - if (ldlm_num_threads > LDLM_THREADS_AUTO_MAX) - ldlm_num_threads = LDLM_THREADS_AUTO_MAX; - if (ldlm_num_threads < LDLM_THREADS_AUTO_MIN) - ldlm_num_threads = LDLM_THREADS_AUTO_MIN; - ldlm_min_threads = ldlm_max_threads = ldlm_num_threads; - } -#endif - - ldlm_state->ldlm_cb_service = - ptlrpc_init_svc(LDLM_NBUFS, LDLM_BUFSIZE, LDLM_MAXREQSIZE, - LDLM_MAXREPSIZE, LDLM_CB_REQUEST_PORTAL, - LDLM_CB_REPLY_PORTAL, 1800, - ldlm_callback_handler, "ldlm_cbd", - ldlm_svc_proc_dir, NULL, - ldlm_min_threads, ldlm_max_threads, - "ldlm_cb"); - - if (!ldlm_state->ldlm_cb_service) { - CERROR("failed to start service\n"); - GOTO(out_proc, rc = -ENOMEM); - } - - ldlm_state->ldlm_cancel_service = - ptlrpc_init_svc(LDLM_NBUFS, LDLM_BUFSIZE, LDLM_MAXREQSIZE, - LDLM_MAXREPSIZE, LDLM_CANCEL_REQUEST_PORTAL, - LDLM_CANCEL_REPLY_PORTAL, 6000, - ldlm_cancel_handler, "ldlm_canceld", - ldlm_svc_proc_dir, NULL, - ldlm_min_threads, ldlm_max_threads, - "ldlm_cn"); - - if (!ldlm_state->ldlm_cancel_service) { - CERROR("failed to start service\n"); - GOTO(out_proc, rc = -ENOMEM); - } - - OBD_ALLOC(blp, sizeof(*blp)); - if (blp == NULL) - GOTO(out_proc, rc = -ENOMEM); - ldlm_state->ldlm_bl_pool = blp; - - spin_lock_init(&blp->blp_lock); - CFS_INIT_LIST_HEAD(&blp->blp_list); - CFS_INIT_LIST_HEAD(&blp->blp_prio_list); - cfs_waitq_init(&blp->blp_waitq); - atomic_set(&blp->blp_num_threads, 0); - atomic_set(&blp->blp_busy_threads, 0); - blp->blp_min_threads = ldlm_min_threads; - blp->blp_max_threads = ldlm_max_threads; - -#ifdef __KERNEL__ - for (i = 0; i < blp->blp_min_threads; i++) { - rc = ldlm_bl_thread_start(blp); - if (rc < 0) - GOTO(out_thread, rc); - } - - rc = ptlrpc_start_threads(NULL, ldlm_state->ldlm_cancel_service); - if (rc) - GOTO(out_thread, rc); - - rc = ptlrpc_start_threads(NULL, ldlm_state->ldlm_cb_service); - if (rc) - GOTO(out_thread, rc); - - CFS_INIT_LIST_HEAD(&expired_lock_thread.elt_expired_locks); - expired_lock_thread.elt_state = ELT_STOPPED; - cfs_waitq_init(&expired_lock_thread.elt_waitq); - - CFS_INIT_LIST_HEAD(&waiting_locks_list); - spin_lock_init(&waiting_locks_spinlock); - cfs_timer_init(&waiting_locks_timer, waiting_locks_callback, 0); - - rc = cfs_kernel_thread(expired_lock_main, NULL, CLONE_VM | CLONE_FILES); - if (rc < 0) { - CERROR("Cannot start ldlm expired-lock thread: %d\n", rc); - GOTO(out_thread, rc); - } - - wait_event(expired_lock_thread.elt_waitq, - expired_lock_thread.elt_state == ELT_READY); -#endif - -#ifdef __KERNEL__ - rc = ldlm_pools_init(); - if (rc) - GOTO(out_thread, rc); -#endif - - RETURN(0); - -#ifdef __KERNEL__ - out_thread: - ptlrpc_unregister_service(ldlm_state->ldlm_cancel_service); - ptlrpc_unregister_service(ldlm_state->ldlm_cb_service); -#endif - - out_proc: -#ifdef LPROCFS - ldlm_proc_cleanup(); - out_free: -#endif - OBD_FREE(ldlm_state, sizeof(*ldlm_state)); - ldlm_state = NULL; - return rc; -} - -static int ldlm_cleanup(int force) -{ -#ifdef __KERNEL__ - struct ldlm_bl_pool *blp = ldlm_state->ldlm_bl_pool; -#endif - ENTRY; - - if (!list_empty(ldlm_namespace_list(LDLM_NAMESPACE_SERVER)) || - !list_empty(ldlm_namespace_list(LDLM_NAMESPACE_CLIENT))) { - CERROR("ldlm still has namespaces; clean these up first.\n"); - ldlm_dump_all_namespaces(LDLM_NAMESPACE_SERVER, D_DLMTRACE); - ldlm_dump_all_namespaces(LDLM_NAMESPACE_CLIENT, D_DLMTRACE); - RETURN(-EBUSY); - } - -#ifdef __KERNEL__ - ldlm_pools_fini(); -#endif - -#ifdef __KERNEL__ - while (atomic_read(&blp->blp_num_threads) > 0) { - struct ldlm_bl_work_item blwi = { .blwi_ns = NULL }; - - init_completion(&blp->blp_comp); - - spin_lock(&blp->blp_lock); - list_add_tail(&blwi.blwi_entry, &blp->blp_list); - cfs_waitq_signal(&blp->blp_waitq); - spin_unlock(&blp->blp_lock); - - wait_for_completion(&blp->blp_comp); - } - OBD_FREE(blp, sizeof(*blp)); - - ptlrpc_unregister_service(ldlm_state->ldlm_cb_service); - ptlrpc_unregister_service(ldlm_state->ldlm_cancel_service); - ldlm_proc_cleanup(); - - expired_lock_thread.elt_state = ELT_TERMINATE; - cfs_waitq_signal(&expired_lock_thread.elt_waitq); - wait_event(expired_lock_thread.elt_waitq, - expired_lock_thread.elt_state == ELT_STOPPED); -#else - ptlrpc_unregister_service(ldlm_state->ldlm_cb_service); - ptlrpc_unregister_service(ldlm_state->ldlm_cancel_service); -#endif - - OBD_FREE(ldlm_state, sizeof(*ldlm_state)); - ldlm_state = NULL; - - RETURN(0); -} - -int __init ldlm_init(void) -{ - init_mutex(&ldlm_ref_sem); - init_mutex(ldlm_namespace_lock(LDLM_NAMESPACE_SERVER)); - init_mutex(ldlm_namespace_lock(LDLM_NAMESPACE_CLIENT)); - ldlm_resource_slab = cfs_mem_cache_create("ldlm_resources", - sizeof(struct ldlm_resource), 0, - SLAB_HWCACHE_ALIGN); - if (ldlm_resource_slab == NULL) - return -ENOMEM; - - ldlm_lock_slab = cfs_mem_cache_create("ldlm_locks", - sizeof(struct ldlm_lock), 0, - SLAB_HWCACHE_ALIGN); - if (ldlm_lock_slab == NULL) { - cfs_mem_cache_destroy(ldlm_resource_slab); - return -ENOMEM; - } - - ldlm_interval_slab = cfs_mem_cache_create("interval_node", - sizeof(struct ldlm_interval), - 0, SLAB_HWCACHE_ALIGN); - if (ldlm_interval_slab == NULL) { - cfs_mem_cache_destroy(ldlm_resource_slab); - cfs_mem_cache_destroy(ldlm_lock_slab); - return -ENOMEM; - } - - return 0; -} - -void __exit ldlm_exit(void) -{ - int rc; - if (ldlm_refcount) - CERROR("ldlm_refcount is %d in ldlm_exit!\n", ldlm_refcount); - rc = cfs_mem_cache_destroy(ldlm_resource_slab); - LASSERTF(rc == 0, "couldn't free ldlm resource slab\n"); - rc = cfs_mem_cache_destroy(ldlm_lock_slab); - LASSERTF(rc == 0, "couldn't free ldlm lock slab\n"); - rc = cfs_mem_cache_destroy(ldlm_interval_slab); - LASSERTF(rc == 0, "couldn't free interval node slab\n"); -} - -/* ldlm_extent.c */ -EXPORT_SYMBOL(ldlm_extent_shift_kms); - -/* ldlm_lock.c */ -EXPORT_SYMBOL(ldlm_get_processing_policy); -EXPORT_SYMBOL(ldlm_lock2desc); -EXPORT_SYMBOL(ldlm_register_intent); -EXPORT_SYMBOL(ldlm_lockname); -EXPORT_SYMBOL(ldlm_typename); -EXPORT_SYMBOL(ldlm_lock2handle); -EXPORT_SYMBOL(__ldlm_handle2lock); -EXPORT_SYMBOL(ldlm_lock_get); -EXPORT_SYMBOL(ldlm_lock_put); -EXPORT_SYMBOL(ldlm_lock_match); -EXPORT_SYMBOL(ldlm_lock_cancel); -EXPORT_SYMBOL(ldlm_lock_addref); -EXPORT_SYMBOL(ldlm_lock_decref); -EXPORT_SYMBOL(ldlm_lock_decref_and_cancel); -EXPORT_SYMBOL(ldlm_lock_change_resource); -EXPORT_SYMBOL(ldlm_lock_set_data); -EXPORT_SYMBOL(ldlm_it2str); -EXPORT_SYMBOL(ldlm_lock_dump); -EXPORT_SYMBOL(ldlm_lock_dump_handle); -EXPORT_SYMBOL(ldlm_cancel_locks_for_export); -EXPORT_SYMBOL(ldlm_reprocess_all_ns); -EXPORT_SYMBOL(ldlm_lock_allow_match); - -/* ldlm_request.c */ -EXPORT_SYMBOL(ldlm_completion_ast); -EXPORT_SYMBOL(ldlm_blocking_ast); -EXPORT_SYMBOL(ldlm_glimpse_ast); -EXPORT_SYMBOL(ldlm_expired_completion_wait); -EXPORT_SYMBOL(ldlm_prep_enqueue_req); -EXPORT_SYMBOL(ldlm_prep_elc_req); -EXPORT_SYMBOL(ldlm_cli_convert); -EXPORT_SYMBOL(ldlm_cli_enqueue); -EXPORT_SYMBOL(ldlm_cli_enqueue_fini); -EXPORT_SYMBOL(ldlm_cli_enqueue_local); -EXPORT_SYMBOL(ldlm_cli_cancel); -EXPORT_SYMBOL(ldlm_cli_cancel_unused); -EXPORT_SYMBOL(ldlm_cli_cancel_req); -EXPORT_SYMBOL(ldlm_cli_join_lru); -EXPORT_SYMBOL(ldlm_replay_locks); -EXPORT_SYMBOL(ldlm_resource_foreach); -EXPORT_SYMBOL(ldlm_namespace_foreach); -EXPORT_SYMBOL(ldlm_namespace_foreach_res); -EXPORT_SYMBOL(ldlm_resource_iterate); -EXPORT_SYMBOL(ldlm_cancel_resource_local); -EXPORT_SYMBOL(ldlm_cli_cancel_list); - -/* ldlm_lockd.c */ -EXPORT_SYMBOL(ldlm_server_blocking_ast); -EXPORT_SYMBOL(ldlm_server_completion_ast); -EXPORT_SYMBOL(ldlm_server_glimpse_ast); -EXPORT_SYMBOL(ldlm_handle_enqueue); -EXPORT_SYMBOL(ldlm_handle_cancel); -EXPORT_SYMBOL(ldlm_request_cancel); -EXPORT_SYMBOL(ldlm_handle_convert); -EXPORT_SYMBOL(ldlm_del_waiting_lock); -EXPORT_SYMBOL(ldlm_get_ref); -EXPORT_SYMBOL(ldlm_put_ref); -EXPORT_SYMBOL(ldlm_refresh_waiting_lock); - -/* ldlm_resource.c */ -EXPORT_SYMBOL(ldlm_namespace_new); -EXPORT_SYMBOL(ldlm_namespace_cleanup); -EXPORT_SYMBOL(ldlm_namespace_free); -EXPORT_SYMBOL(ldlm_namespace_dump); -EXPORT_SYMBOL(ldlm_dump_all_namespaces); -EXPORT_SYMBOL(ldlm_resource_get); -EXPORT_SYMBOL(ldlm_resource_putref); -EXPORT_SYMBOL(ldlm_resource_unlink_lock); - -/* ldlm_lib.c */ -EXPORT_SYMBOL(client_import_add_conn); -EXPORT_SYMBOL(client_import_del_conn); -EXPORT_SYMBOL(client_obd_setup); -EXPORT_SYMBOL(client_obd_cleanup); -EXPORT_SYMBOL(client_connect_import); -EXPORT_SYMBOL(client_disconnect_export); -EXPORT_SYMBOL(target_abort_recovery); -EXPORT_SYMBOL(target_cleanup_recovery); -EXPORT_SYMBOL(target_handle_connect); -EXPORT_SYMBOL(target_destroy_export); -EXPORT_SYMBOL(target_cancel_recovery_timer); -EXPORT_SYMBOL(target_send_reply); -EXPORT_SYMBOL(target_queue_recovery_request); -EXPORT_SYMBOL(target_handle_ping); -EXPORT_SYMBOL(target_pack_pool_reply); -EXPORT_SYMBOL(target_handle_disconnect); -EXPORT_SYMBOL(target_queue_last_replay_reply); - -/* l_lock.c */ -EXPORT_SYMBOL(lock_res_and_lock); -EXPORT_SYMBOL(unlock_res_and_lock); - diff --git a/lustre/ldlm/ldlm_plain.c b/lustre/ldlm/ldlm_plain.c deleted file mode 100644 index 71778cd072..0000000000 --- a/lustre/ldlm/ldlm_plain.c +++ /dev/null @@ -1,144 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_LDLM - -#ifdef __KERNEL__ -#include <lustre_dlm.h> -#include <obd_support.h> -#include <lustre_lib.h> -#else -#include <liblustre.h> -#endif - -#include "ldlm_internal.h" - -static inline int -ldlm_plain_compat_queue(struct list_head *queue, struct ldlm_lock *req, - struct list_head *work_list) -{ - struct list_head *tmp; - struct ldlm_lock *lock; - ldlm_mode_t req_mode = req->l_req_mode; - int compat = 1; - ENTRY; - - lockmode_verify(req_mode); - - list_for_each(tmp, queue) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (req == lock) - RETURN(compat); - - if (lockmode_compat(lock->l_req_mode, req_mode)) { - /* jump to next mode group */ - if (LDLM_SL_HEAD(&lock->l_sl_mode)) - tmp = &list_entry(lock->l_sl_mode.next, - struct ldlm_lock, - l_sl_mode)->l_res_link; - continue; - } - - if (!work_list) - RETURN(0); - - compat = 0; - if (lock->l_blocking_ast) - ldlm_add_ast_work_item(lock, req, work_list); - if (LDLM_SL_HEAD(&lock->l_sl_mode)) { - /* add all members of the mode group */ - do { - tmp = lock->l_res_link.next; - lock = list_entry(tmp, struct ldlm_lock, - l_res_link); - if (lock->l_blocking_ast) - ldlm_add_ast_work_item( - lock, req, work_list); - } while (!LDLM_SL_TAIL(&lock->l_sl_mode)); - } - } - - RETURN(compat); -} - -/* If first_enq is 0 (ie, called from ldlm_reprocess_queue): - * - blocking ASTs have already been sent - * - must call this function with the resource lock held - * - * If first_enq is 1 (ie, called from ldlm_lock_enqueue): - * - blocking ASTs have not been sent - * - must call this function with the resource lock held */ -int ldlm_process_plain_lock(struct ldlm_lock *lock, int *flags, int first_enq, - ldlm_error_t *err, struct list_head *work_list) -{ - struct ldlm_resource *res = lock->l_resource; - struct list_head rpc_list = CFS_LIST_HEAD_INIT(rpc_list); - int rc; - ENTRY; - - check_res_locked(res); - LASSERT(list_empty(&res->lr_converting)); - - if (!first_enq) { - LASSERT(work_list != NULL); - rc = ldlm_plain_compat_queue(&res->lr_granted, lock, NULL); - if (!rc) - RETURN(LDLM_ITER_STOP); - rc = ldlm_plain_compat_queue(&res->lr_waiting, lock, NULL); - if (!rc) - RETURN(LDLM_ITER_STOP); - - ldlm_resource_unlink_lock(lock); - ldlm_grant_lock(lock, work_list); - RETURN(LDLM_ITER_CONTINUE); - } - - restart: - rc = ldlm_plain_compat_queue(&res->lr_granted, lock, &rpc_list); - rc += ldlm_plain_compat_queue(&res->lr_waiting, lock, &rpc_list); - - if (rc != 2) { - /* If either of the compat_queue()s returned 0, then we - * have ASTs to send and must go onto the waiting list. - * - * bug 2322: we used to unlink and re-add here, which was a - * terrible folly -- if we goto restart, we could get - * re-ordered! Causes deadlock, because ASTs aren't sent! */ - if (list_empty(&lock->l_res_link)) - ldlm_resource_add_lock(res, &res->lr_waiting, lock); - unlock_res(res); - rc = ldlm_run_bl_ast_work(&rpc_list); - lock_res(res); - if (rc == -ERESTART) - GOTO(restart, -ERESTART); - *flags |= LDLM_FL_BLOCK_GRANTED; - } else { - ldlm_resource_unlink_lock(lock); - ldlm_grant_lock(lock, NULL); - } - RETURN(0); -} diff --git a/lustre/ldlm/ldlm_pool.c b/lustre/ldlm/ldlm_pool.c deleted file mode 100644 index dcae25431d..0000000000 --- a/lustre/ldlm/ldlm_pool.c +++ /dev/null @@ -1,1145 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2007 Cluster File Systems, Inc. - * Author: Yury Umanets <umka@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -/* Idea of this code is rather simple. Each second, for each server namespace - * we have SLV - server lock volume which is calculated on current number of - * granted locks, grant speed for past period, etc - that is, locking load. - * This SLV number may be thought as a flow definition for simplicity. It is - * sent to clients with each occasion to let them know what is current load - * situation on the server. By default, at the beginning, SLV on server is - * set max value which is calculated as the following: allow to one client - * have all locks of limit ->pl_limit for 10h. - * - * Next, on clients, number of cached locks is not limited artificially in any - * way as it was before. Instead, client calculates CLV, that is, client lock - * volume for each lock and compares it with last SLV from the server. CLV is - * calculated as the number of locks in LRU * lock live time in seconds. If - * CLV > SLV - lock is canceled. - * - * Client has LVF, that is, lock volume factor which regulates how much sensitive - * client should be about last SLV from server. The higher LVF is the more locks - * will be canceled on client. Default value for it is 1. Setting LVF to 2 means - * that client will cancel locks 2 times faster. - * - * Locks on a client will be canceled more intensively in these cases: - * (1) if SLV is smaller, that is, load is higher on the server; - * (2) client has a lot of locks (the more locks are held by client, the bigger - * chances that some of them should be canceled); - * (3) client has old locks (taken some time ago); - * - * Thus, according to flow paradigm that we use for better understanding SLV, - * CLV is the volume of particle in flow described by SLV. According to this, - * if flow is getting thinner, more and more particles become outside of it and - * as particles are locks, they should be canceled. - * - * General idea of this belongs to Vitaly Fertman (vitaly@clusterfs.com). Andreas - * Dilger (adilger@clusterfs.com) proposed few nice ideas like using LVF and many - * cleanups. Flow definition to allow more easy understanding of the logic belongs - * to Nikita Danilov (nikita@clusterfs.com) as well as many cleanups and fixes. - * And design and implementation are done by Yury Umanets (umka@clusterfs.com). - * - * Glossary for terms used: - * - * pl_limit - Number of allowed locks in pool. Applies to server and client - * side (tunable); - * - * pl_granted - Number of granted locks (calculated); - * pl_grant_rate - Number of granted locks for last T (calculated); - * pl_cancel_rate - Number of canceled locks for last T (calculated); - * pl_grant_speed - Grant speed (GR - CR) for last T (calculated); - * pl_grant_plan - Planned number of granted locks for next T (calculated); - * - * pl_grant_step - Grant plan step, that is how ->pl_grant_plan - * will change in next T (tunable); - * - * pl_server_lock_volume - Current server lock volume (calculated); - * - * As it may be seen from list above, we have few possible tunables which may - * affect behavior much. They all may be modified via proc. However, they also - * give a possibility for constructing few pre-defined behavior policies. If - * none of predefines is suitable for a working pattern being used, new one may - * be "constructed" via proc tunables. - */ - -#define DEBUG_SUBSYSTEM S_LDLM - -#ifdef __KERNEL__ -# include <lustre_dlm.h> -#else -# include <liblustre.h> -# include <libcfs/kp30.h> -#endif - -#include <obd_class.h> -#include <obd_support.h> -#include "ldlm_internal.h" - -#ifdef HAVE_LRU_RESIZE_SUPPORT - -/* 50 ldlm locks for 1MB of RAM. */ -#define LDLM_POOL_HOST_L ((num_physpages >> (20 - PAGE_SHIFT)) * 50) - -/* Default step in % for grant plan. */ -#define LDLM_POOL_GSP (10) - -/* LDLM_POOL_GSP% of all locks is default GP. */ -#define LDLM_POOL_GP(L) (((L) * LDLM_POOL_GSP) / 100) - -/* Max age for locks on clients. */ -#define LDLM_POOL_MAX_AGE (36000) - -#ifdef __KERNEL__ -extern cfs_proc_dir_entry_t *ldlm_ns_proc_dir; -#endif - -#define avg(src, add) \ - ((src) = ((src) + (add)) / 2) - -static inline __u64 dru(__u64 val, __u32 div) -{ - __u64 ret = val + (div - 1); - do_div(ret, div); - return ret; -} - -static inline __u64 ldlm_pool_slv_max(__u32 L) -{ - /* Allow to have all locks for 1 client for 10 hrs. - * Formula is the following: limit * 10h / 1 client. */ - __u64 lim = L * LDLM_POOL_MAX_AGE / 1; - return lim; -} - -static inline __u64 ldlm_pool_slv_min(__u32 L) -{ - return 1; -} - -enum { - LDLM_POOL_FIRST_STAT = 0, - LDLM_POOL_GRANTED_STAT = LDLM_POOL_FIRST_STAT, - LDLM_POOL_GRANT_STAT, - LDLM_POOL_CANCEL_STAT, - LDLM_POOL_GRANT_RATE_STAT, - LDLM_POOL_CANCEL_RATE_STAT, - LDLM_POOL_GRANT_PLAN_STAT, - LDLM_POOL_SLV_STAT, - LDLM_POOL_SHRINK_REQTD_STAT, - LDLM_POOL_SHRINK_FREED_STAT, - LDLM_POOL_RECALC_STAT, - LDLM_POOL_TIMING_STAT, - LDLM_POOL_LAST_STAT -}; - -static inline struct ldlm_namespace *ldlm_pl2ns(struct ldlm_pool *pl) -{ - return container_of(pl, struct ldlm_namespace, ns_pool); -} - -/* Should be called under ->pl_lock taken */ -static inline void ldlm_pool_recalc_grant_plan(struct ldlm_pool *pl) -{ - int granted, grant_step, limit; - - limit = ldlm_pool_get_limit(pl); - granted = atomic_read(&pl->pl_granted); - - grant_step = ((limit - granted) * pl->pl_grant_step) / 100; - pl->pl_grant_plan = granted + grant_step; -} - -/* Should be called under ->pl_lock taken */ -static inline void ldlm_pool_recalc_slv(struct ldlm_pool *pl) -{ - int grant_usage, granted, grant_plan; - __u64 slv, slv_factor; - __u32 limit; - - slv = ldlm_pool_get_slv(pl); - grant_plan = pl->pl_grant_plan; - limit = ldlm_pool_get_limit(pl); - granted = atomic_read(&pl->pl_granted); - - grant_usage = limit - (granted - grant_plan); - if (grant_usage <= 0) - grant_usage = 1; - - /* Find out SLV change factor which is the ratio of grant usage - * from limit. SLV changes as fast as the ratio of grant plan - * consumtion. The more locks from grant plan are not consumed - * by clients in last interval (idle time), the faster grows - * SLV. And the opposite, the more grant plan is over-consumed - * (load time) the faster drops SLV. */ - slv_factor = (grant_usage * 100) / limit; - if (2 * abs(granted - limit) > limit) { - slv_factor *= slv_factor; - slv_factor = dru(slv_factor, 100); - } - slv = slv * slv_factor; - slv = dru(slv, 100); - - if (slv > ldlm_pool_slv_max(limit)) { - slv = ldlm_pool_slv_max(limit); - } else if (slv < ldlm_pool_slv_min(limit)) { - slv = ldlm_pool_slv_min(limit); - } - - ldlm_pool_set_slv(pl, slv); -} - -static inline void ldlm_pool_recalc_stats(struct ldlm_pool *pl) -{ - __u64 slv = ldlm_pool_get_slv(pl); - int grant_plan = pl->pl_grant_plan; - int granted = atomic_read(&pl->pl_granted); - int grant_rate = atomic_read(&pl->pl_grant_rate); - int cancel_rate = atomic_read(&pl->pl_cancel_rate); - - lprocfs_counter_add(pl->pl_stats, LDLM_POOL_SLV_STAT, - slv); - lprocfs_counter_add(pl->pl_stats, LDLM_POOL_GRANTED_STAT, - granted); - lprocfs_counter_add(pl->pl_stats, LDLM_POOL_GRANT_RATE_STAT, - grant_rate); - lprocfs_counter_add(pl->pl_stats, LDLM_POOL_GRANT_PLAN_STAT, - grant_plan); - lprocfs_counter_add(pl->pl_stats, LDLM_POOL_CANCEL_RATE_STAT, - cancel_rate); -} - -static int ldlm_srv_pool_recalc(struct ldlm_pool *pl) -{ - time_t recalc_interval_sec; - ENTRY; - - spin_lock(&pl->pl_lock); - recalc_interval_sec = cfs_time_current_sec() - pl->pl_recalc_time; - if (recalc_interval_sec > 0) { - /* Update statistics */ - ldlm_pool_recalc_stats(pl); - - /* Recalc SLV after last period. This should be done - * _before_ recalculating new grant plan. */ - ldlm_pool_recalc_slv(pl); - - /* Update grant_plan for new period. */ - ldlm_pool_recalc_grant_plan(pl); - - /* Zero out all rates and speed for the last period. */ - atomic_set(&pl->pl_grant_rate, 0); - atomic_set(&pl->pl_cancel_rate, 0); - atomic_set(&pl->pl_grant_speed, 0); - pl->pl_recalc_time = cfs_time_current_sec(); - lprocfs_counter_add(pl->pl_stats, LDLM_POOL_TIMING_STAT, - recalc_interval_sec); - } - spin_unlock(&pl->pl_lock); - RETURN(0); -} - -/* Our goal here is to decrease SLV the way to make a client hold - * @nr locks smaller in next 10h. */ -static int ldlm_srv_pool_shrink(struct ldlm_pool *pl, - int nr, unsigned int gfp_mask) -{ - __u32 limit; - ENTRY; - - /* VM is asking how many entries may be potentially freed. */ - if (nr == 0) - RETURN(atomic_read(&pl->pl_granted)); - - /* Client already canceled locks but server is already in shrinker - * and can't cancel anything. Let's catch this race. */ - if (atomic_read(&pl->pl_granted) == 0) - RETURN(0); - - spin_lock(&pl->pl_lock); - - /* We want shrinker to possibly cause cancelation of @nr locks from - * clients or grant approximately @nr locks smaller next intervals. - * - * This is why we decresed SLV by @nr. This effect will only be as - * long as one re-calc interval (1s these days) and this should be - * enough to pass this decreased SLV to all clients. On next recalc - * interval pool will either increase SLV if locks load is not high - * or will keep on same level or even decrease again, thus, shrinker - * decreased SLV will affect next recalc intervals and this way will - * make locking load lower. */ - if (nr < ldlm_pool_get_slv(pl)) { - ldlm_pool_set_slv(pl, ldlm_pool_get_slv(pl) - nr); - } else { - limit = ldlm_pool_get_limit(pl); - ldlm_pool_set_slv(pl, ldlm_pool_slv_min(limit)); - } - spin_unlock(&pl->pl_lock); - - /* We did not really free any memory here so far, it only will be - * freed later may be, so that we return 0 to not confuse VM. */ - RETURN(0); -} - -static int ldlm_srv_pool_setup(struct ldlm_pool *pl, int limit) -{ - ENTRY; - ldlm_pool_set_limit(pl, limit); - RETURN(0); -} - -static int ldlm_cli_pool_recalc(struct ldlm_pool *pl) -{ - time_t recalc_interval_sec; - ENTRY; - - spin_lock(&pl->pl_lock); - - recalc_interval_sec = cfs_time_current_sec() - pl->pl_recalc_time; - if (recalc_interval_sec > 0) { - /* Update statistics only every T */ - ldlm_pool_recalc_stats(pl); - - /* Zero out grant/cancel rates and speed for last period. */ - atomic_set(&pl->pl_grant_rate, 0); - atomic_set(&pl->pl_cancel_rate, 0); - atomic_set(&pl->pl_grant_speed, 0); - pl->pl_recalc_time = cfs_time_current_sec(); - lprocfs_counter_add(pl->pl_stats, LDLM_POOL_TIMING_STAT, - recalc_interval_sec); - } - spin_unlock(&pl->pl_lock); - - /* Do not cancel locks in case lru resize is disabled for this ns */ - if (!ns_connect_lru_resize(ldlm_pl2ns(pl))) - RETURN(0); - - /* In the time of canceling locks on client we do not need to maintain - * sharp timing, we only want to cancel locks asap according to new SLV. - * This may be called when SLV has changed much, this is why we do not - * take into account pl->pl_recalc_time here. */ - RETURN(ldlm_cancel_lru(ldlm_pl2ns(pl), 0, LDLM_ASYNC, - LDLM_CANCEL_LRUR)); -} - -static int ldlm_cli_pool_shrink(struct ldlm_pool *pl, - int nr, unsigned int gfp_mask) -{ - ENTRY; - - /* Do not cancel locks in case lru resize is disabled for this ns */ - if (!ns_connect_lru_resize(ldlm_pl2ns(pl))) - RETURN(0); - - /* Find out how many locks may be released according to shrink - * policy. */ - if (nr == 0) - RETURN(ldlm_cancel_lru_estimate(ldlm_pl2ns(pl), 0, 0, - LDLM_CANCEL_SHRINK)); - - /* Cancel @nr locks accoding to shrink policy */ - RETURN(ldlm_cancel_lru(ldlm_pl2ns(pl), nr, LDLM_SYNC, - LDLM_CANCEL_SHRINK)); -} - -struct ldlm_pool_ops ldlm_srv_pool_ops = { - .po_recalc = ldlm_srv_pool_recalc, - .po_shrink = ldlm_srv_pool_shrink, - .po_setup = ldlm_srv_pool_setup -}; - -struct ldlm_pool_ops ldlm_cli_pool_ops = { - .po_recalc = ldlm_cli_pool_recalc, - .po_shrink = ldlm_cli_pool_shrink -}; - -int ldlm_pool_recalc(struct ldlm_pool *pl) -{ - int count; - - if (pl->pl_ops->po_recalc != NULL) { - count = pl->pl_ops->po_recalc(pl); - lprocfs_counter_add(pl->pl_stats, LDLM_POOL_RECALC_STAT, - count); - return count; - } - return 0; -} -EXPORT_SYMBOL(ldlm_pool_recalc); - -int ldlm_pool_shrink(struct ldlm_pool *pl, int nr, - unsigned int gfp_mask) -{ - int cancel = 0; - - if (pl->pl_ops->po_shrink != NULL) { - cancel = pl->pl_ops->po_shrink(pl, nr, gfp_mask); - if (nr > 0) { - lprocfs_counter_add(pl->pl_stats, - LDLM_POOL_SHRINK_REQTD_STAT, - nr); - lprocfs_counter_add(pl->pl_stats, - LDLM_POOL_SHRINK_FREED_STAT, - cancel); - CDEBUG(D_DLMTRACE, "%s: request to shrink %d locks, " - "shrunk %d\n", pl->pl_name, nr, cancel); - } - } - return cancel; -} -EXPORT_SYMBOL(ldlm_pool_shrink); - -/* The purpose of this function is to re-setup limit and maximal allowed - * slv according to the passed limit. */ -int ldlm_pool_setup(struct ldlm_pool *pl, int limit) -{ - ENTRY; - if (pl->pl_ops->po_setup != NULL) - RETURN(pl->pl_ops->po_setup(pl, limit)); - RETURN(0); -} -EXPORT_SYMBOL(ldlm_pool_setup); - -#ifdef __KERNEL__ -static int lprocfs_rd_pool_state(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int granted, grant_rate, cancel_rate, grant_step; - int nr = 0, grant_speed, grant_plan; - struct ldlm_pool *pl = data; - __u32 limit; - __u64 slv; - - spin_lock(&pl->pl_lock); - slv = ldlm_pool_get_slv(pl); - limit = ldlm_pool_get_limit(pl); - grant_plan = pl->pl_grant_plan; - grant_step = pl->pl_grant_step; - granted = atomic_read(&pl->pl_granted); - grant_rate = atomic_read(&pl->pl_grant_rate); - grant_speed = atomic_read(&pl->pl_grant_speed); - cancel_rate = atomic_read(&pl->pl_cancel_rate); - spin_unlock(&pl->pl_lock); - - nr += snprintf(page + nr, count - nr, "LDLM pool state (%s):\n", - pl->pl_name); - nr += snprintf(page + nr, count - nr, " SLV: "LPU64"\n", slv); - - nr += snprintf(page + nr, count - nr, " LVF: %d\n", - atomic_read(&pl->pl_lock_volume_factor)); - - nr += snprintf(page + nr, count - nr, " GSP: %d%%\n", - grant_step); - nr += snprintf(page + nr, count - nr, " GP: %d\n", - grant_plan); - nr += snprintf(page + nr, count - nr, " GR: %d\n", - grant_rate); - nr += snprintf(page + nr, count - nr, " CR: %d\n", - cancel_rate); - nr += snprintf(page + nr, count - nr, " GS: %d\n", - grant_speed); - nr += snprintf(page + nr, count - nr, " G: %d\n", - granted); - nr += snprintf(page + nr, count - nr, " L: %d\n", - limit); - return nr; -} - -LDLM_POOL_PROC_READER(grant_plan, int); -LDLM_POOL_PROC_READER(grant_step, int); -LDLM_POOL_PROC_WRITER(grant_step, int); - -static int ldlm_pool_proc_init(struct ldlm_pool *pl) -{ - struct ldlm_namespace *ns = ldlm_pl2ns(pl); - struct proc_dir_entry *parent_ns_proc; - struct lprocfs_vars pool_vars[2]; - char *var_name = NULL; - int rc = 0; - ENTRY; - - OBD_ALLOC(var_name, MAX_STRING_SIZE + 1); - if (!var_name) - RETURN(-ENOMEM); - - parent_ns_proc = lprocfs_srch(ldlm_ns_proc_dir, ns->ns_name); - if (parent_ns_proc == NULL) { - CERROR("%s: proc entry is not initialized\n", - ns->ns_name); - GOTO(out_free_name, rc = -EINVAL); - } - pl->pl_proc_dir = lprocfs_register("pool", parent_ns_proc, - NULL, NULL); - if (IS_ERR(pl->pl_proc_dir)) { - CERROR("LProcFS failed in ldlm-pool-init\n"); - rc = PTR_ERR(pl->pl_proc_dir); - GOTO(out_free_name, rc); - } - - var_name[MAX_STRING_SIZE] = '\0'; - memset(pool_vars, 0, sizeof(pool_vars)); - pool_vars[0].name = var_name; - - snprintf(var_name, MAX_STRING_SIZE, "server_lock_volume"); - pool_vars[0].data = &pl->pl_server_lock_volume; - pool_vars[0].read_fptr = lprocfs_rd_u64; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "limit"); - pool_vars[0].data = &pl->pl_limit; - pool_vars[0].read_fptr = lprocfs_rd_atomic; - pool_vars[0].write_fptr = lprocfs_wr_atomic; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "granted"); - pool_vars[0].data = &pl->pl_granted; - pool_vars[0].read_fptr = lprocfs_rd_atomic; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "grant_speed"); - pool_vars[0].data = &pl->pl_grant_speed; - pool_vars[0].read_fptr = lprocfs_rd_atomic; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "cancel_rate"); - pool_vars[0].data = &pl->pl_cancel_rate; - pool_vars[0].read_fptr = lprocfs_rd_atomic; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "grant_rate"); - pool_vars[0].data = &pl->pl_grant_rate; - pool_vars[0].read_fptr = lprocfs_rd_atomic; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "grant_plan"); - pool_vars[0].data = pl; - pool_vars[0].read_fptr = lprocfs_rd_grant_plan; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "grant_step"); - pool_vars[0].data = pl; - pool_vars[0].read_fptr = lprocfs_rd_grant_step; - if (ns_is_server(ns)) - pool_vars[0].write_fptr = lprocfs_wr_grant_step; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "lock_volume_factor"); - pool_vars[0].data = &pl->pl_lock_volume_factor; - pool_vars[0].read_fptr = lprocfs_rd_atomic; - pool_vars[0].write_fptr = lprocfs_wr_atomic; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - snprintf(var_name, MAX_STRING_SIZE, "state"); - pool_vars[0].data = pl; - pool_vars[0].read_fptr = lprocfs_rd_pool_state; - lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0); - - pl->pl_stats = lprocfs_alloc_stats(LDLM_POOL_LAST_STAT - - LDLM_POOL_FIRST_STAT, 0); - if (!pl->pl_stats) - GOTO(out_free_name, rc = -ENOMEM); - - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANTED_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "granted", "locks"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANT_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "grant", "locks"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_CANCEL_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "cancel", "locks"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANT_RATE_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "grant_rate", "locks/s"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_CANCEL_RATE_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "cancel_rate", "locks/s"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANT_PLAN_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "grant_plan", "locks/s"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_SLV_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "slv", "slv"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_SHRINK_REQTD_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "shrink_request", "locks"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_SHRINK_FREED_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "shrink_freed", "locks"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_RECALC_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "recalc_freed", "locks"); - lprocfs_counter_init(pl->pl_stats, LDLM_POOL_TIMING_STAT, - LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, - "recalc_timing", "sec"); - lprocfs_register_stats(pl->pl_proc_dir, "stats", pl->pl_stats); - - EXIT; -out_free_name: - OBD_FREE(var_name, MAX_STRING_SIZE + 1); - return rc; -} - -static void ldlm_pool_proc_fini(struct ldlm_pool *pl) -{ - if (pl->pl_stats != NULL) { - lprocfs_free_stats(&pl->pl_stats); - pl->pl_stats = NULL; - } - if (pl->pl_proc_dir != NULL) { - lprocfs_remove(&pl->pl_proc_dir); - pl->pl_proc_dir = NULL; - } -} -#else /* !__KERNEL__*/ -#define ldlm_pool_proc_init(pl) (0) -#define ldlm_pool_proc_fini(pl) while (0) {} -#endif - -int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns, - int idx, ldlm_side_t client) -{ - int rc; - ENTRY; - - spin_lock_init(&pl->pl_lock); - atomic_set(&pl->pl_granted, 0); - pl->pl_recalc_time = cfs_time_current_sec(); - atomic_set(&pl->pl_lock_volume_factor, 1); - - atomic_set(&pl->pl_grant_rate, 0); - atomic_set(&pl->pl_cancel_rate, 0); - atomic_set(&pl->pl_grant_speed, 0); - pl->pl_grant_step = LDLM_POOL_GSP; - pl->pl_grant_plan = LDLM_POOL_GP(LDLM_POOL_HOST_L); - - snprintf(pl->pl_name, sizeof(pl->pl_name), "ldlm-pool-%s-%d", - ns->ns_name, idx); - - if (client == LDLM_NAMESPACE_SERVER) { - pl->pl_ops = &ldlm_srv_pool_ops; - ldlm_pool_set_limit(pl, LDLM_POOL_HOST_L); - ldlm_pool_set_slv(pl, ldlm_pool_slv_max(LDLM_POOL_HOST_L)); - } else { - ldlm_pool_set_slv(pl, 1); - ldlm_pool_set_limit(pl, 1); - pl->pl_ops = &ldlm_cli_pool_ops; - } - - rc = ldlm_pool_proc_init(pl); - if (rc) - RETURN(rc); - - CDEBUG(D_DLMTRACE, "Lock pool %s is initialized\n", pl->pl_name); - - RETURN(rc); -} -EXPORT_SYMBOL(ldlm_pool_init); - -void ldlm_pool_fini(struct ldlm_pool *pl) -{ - ENTRY; - ldlm_pool_proc_fini(pl); - pl->pl_ops = NULL; - EXIT; -} -EXPORT_SYMBOL(ldlm_pool_fini); - -void ldlm_pool_add(struct ldlm_pool *pl, struct ldlm_lock *lock) -{ - /* FLOCK locks are special in a sense that they are almost never - * cancelled, instead special kind of lock is used to drop them. - * also there is no LRU for flock locks, so no point in tracking - * them anyway */ - if (lock->l_resource->lr_type == LDLM_FLOCK) - return; - - ENTRY; - - atomic_inc(&pl->pl_granted); - atomic_inc(&pl->pl_grant_rate); - atomic_inc(&pl->pl_grant_speed); - - lprocfs_counter_incr(pl->pl_stats, LDLM_POOL_GRANT_STAT); - - /* Do not do pool recalc for client side as all locks which - * potentially may be canceled has already been packed into - * enqueue/cancel rpc. Also we do not want to run out of stack - * with too long call paths. */ - if (ns_is_server(ldlm_pl2ns(pl))) - ldlm_pool_recalc(pl); - EXIT; -} -EXPORT_SYMBOL(ldlm_pool_add); - -void ldlm_pool_del(struct ldlm_pool *pl, struct ldlm_lock *lock) -{ - if (lock->l_resource->lr_type == LDLM_FLOCK) - return; - ENTRY; - LASSERT(atomic_read(&pl->pl_granted) > 0); - atomic_dec(&pl->pl_granted); - atomic_inc(&pl->pl_cancel_rate); - atomic_dec(&pl->pl_grant_speed); - - lprocfs_counter_incr(pl->pl_stats, LDLM_POOL_CANCEL_STAT); - - if (ns_is_server(ldlm_pl2ns(pl))) - ldlm_pool_recalc(pl); - EXIT; -} -EXPORT_SYMBOL(ldlm_pool_del); - -/* ->pl_lock should be taken. */ -__u64 ldlm_pool_get_slv(struct ldlm_pool *pl) -{ - return pl->pl_server_lock_volume; -} -EXPORT_SYMBOL(ldlm_pool_get_slv); - -/* ->pl_lock should be taken. */ -void ldlm_pool_set_slv(struct ldlm_pool *pl, __u64 slv) -{ - pl->pl_server_lock_volume = slv; -} -EXPORT_SYMBOL(ldlm_pool_set_slv); - -__u32 ldlm_pool_get_limit(struct ldlm_pool *pl) -{ - return atomic_read(&pl->pl_limit); -} -EXPORT_SYMBOL(ldlm_pool_get_limit); - -void ldlm_pool_set_limit(struct ldlm_pool *pl, __u32 limit) -{ - atomic_set(&pl->pl_limit, limit); -} -EXPORT_SYMBOL(ldlm_pool_set_limit); - -/* Server side is only enabled for kernel space for now. */ -#ifdef __KERNEL__ -static int ldlm_pool_granted(struct ldlm_pool *pl) -{ - return atomic_read(&pl->pl_granted); -} - -static struct ptlrpc_thread *ldlm_pools_thread; -static struct shrinker *ldlm_pools_srv_shrinker; -static struct shrinker *ldlm_pools_cli_shrinker; -static struct completion ldlm_pools_comp; - -void ldlm_pools_wakeup(void) -{ - ENTRY; - if (ldlm_pools_thread == NULL) - return; - ldlm_pools_thread->t_flags |= SVC_EVENT; - cfs_waitq_signal(&ldlm_pools_thread->t_ctl_waitq); - EXIT; -} -EXPORT_SYMBOL(ldlm_pools_wakeup); - -/* Cancel @nr locks from all namespaces (if possible). Returns number of - * cached locks after shrink is finished. All namespaces are asked to - * cancel approximately equal amount of locks. */ -static int ldlm_pools_shrink(ldlm_side_t client, int nr, - unsigned int gfp_mask) -{ - int total = 0, cached = 0, nr_ns; - struct ldlm_namespace *ns; - - if (nr != 0 && !(gfp_mask & __GFP_FS)) - return -1; - - CDEBUG(D_DLMTRACE, "request to shrink %d %s locks from all pools\n", - nr, client == LDLM_NAMESPACE_CLIENT ? "client" : "server"); - - /* Find out how many resources we may release. */ - for (nr_ns = atomic_read(ldlm_namespace_nr(client)); - nr_ns > 0; nr_ns--) - { - mutex_down(ldlm_namespace_lock(client)); - if (list_empty(ldlm_namespace_list(client))) { - mutex_up(ldlm_namespace_lock(client)); - return 0; - } - ns = ldlm_namespace_first(client); - ldlm_namespace_get(ns); - ldlm_namespace_move(ns, client); - mutex_up(ldlm_namespace_lock(client)); - total += ldlm_pool_shrink(&ns->ns_pool, 0, gfp_mask); - ldlm_namespace_put(ns, 1); - } - - if (nr == 0 || total == 0) - return total; - - /* Shrink at least ldlm_namespace_nr(client) namespaces. */ - for (nr_ns = atomic_read(ldlm_namespace_nr(client)); - nr_ns > 0; nr_ns--) - { - int cancel, nr_locks; - - /* Do not call shrink under ldlm_namespace_lock(client) */ - mutex_down(ldlm_namespace_lock(client)); - if (list_empty(ldlm_namespace_list(client))) { - mutex_up(ldlm_namespace_lock(client)); - /* If list is empty, we can't return any @cached > 0, - * that probably would cause needless shrinker - * call. */ - cached = 0; - break; - } - ns = ldlm_namespace_first(client); - ldlm_namespace_get(ns); - ldlm_namespace_move(ns, client); - mutex_up(ldlm_namespace_lock(client)); - - nr_locks = ldlm_pool_granted(&ns->ns_pool); - cancel = 1 + nr_locks * nr / total; - ldlm_pool_shrink(&ns->ns_pool, cancel, gfp_mask); - cached += ldlm_pool_granted(&ns->ns_pool); - ldlm_namespace_put(ns, 1); - } - return cached; -} - -static int ldlm_pools_srv_shrink(int nr, unsigned int gfp_mask) -{ - return ldlm_pools_shrink(LDLM_NAMESPACE_SERVER, nr, gfp_mask); -} - -static int ldlm_pools_cli_shrink(int nr, unsigned int gfp_mask) -{ - return ldlm_pools_shrink(LDLM_NAMESPACE_CLIENT, nr, gfp_mask); -} - -void ldlm_pools_recalc(ldlm_side_t client) -{ - __u32 nr_l = 0, nr_p = 0, l; - struct ldlm_namespace *ns; - int nr, equal = 0; - - /* No need to setup pool limit for client pools. */ - if (client == LDLM_NAMESPACE_SERVER) { - /* Check all modest namespaces first. */ - mutex_down(ldlm_namespace_lock(client)); - list_for_each_entry(ns, ldlm_namespace_list(client), - ns_list_chain) - { - if (ns->ns_appetite != LDLM_NAMESPACE_MODEST) - continue; - - l = ldlm_pool_granted(&ns->ns_pool); - if (l == 0) - l = 1; - - /* Set the modest pools limit equal to their avg granted - * locks + 5%. */ - l += dru(l * LDLM_POOLS_MODEST_MARGIN, 100); - ldlm_pool_setup(&ns->ns_pool, l); - nr_l += l; - nr_p++; - } - - /* Make sure that modest namespaces did not eat more that 2/3 - * of limit */ - if (nr_l >= 2 * (LDLM_POOL_HOST_L / 3)) { - CWARN("\"Modest\" pools eat out 2/3 of server locks " - "limit (%d of %lu). This means that you have too " - "many clients for this amount of server RAM. " - "Upgrade server!\n", nr_l, LDLM_POOL_HOST_L); - equal = 1; - } - - /* The rest is given to greedy namespaces. */ - list_for_each_entry(ns, ldlm_namespace_list(client), - ns_list_chain) - { - if (!equal && ns->ns_appetite != LDLM_NAMESPACE_GREEDY) - continue; - - if (equal) { - /* In the case 2/3 locks are eaten out by - * modest pools, we re-setup equal limit - * for _all_ pools. */ - l = LDLM_POOL_HOST_L / - atomic_read(ldlm_namespace_nr(client)); - } else { - /* All the rest of greedy pools will have - * all locks in equal parts.*/ - l = (LDLM_POOL_HOST_L - nr_l) / - (atomic_read(ldlm_namespace_nr(client)) - - nr_p); - } - ldlm_pool_setup(&ns->ns_pool, l); - } - mutex_up(ldlm_namespace_lock(client)); - } - - /* Recalc at least ldlm_namespace_nr(client) namespaces. */ - for (nr = atomic_read(ldlm_namespace_nr(client)); nr > 0; nr--) { - /* Lock the list, get first @ns in the list, getref, move it - * to the tail, unlock and call pool recalc. This way we avoid - * calling recalc under @ns lock what is really good as we get - * rid of potential deadlock on client nodes when canceling - * locks synchronously. */ - mutex_down(ldlm_namespace_lock(client)); - if (list_empty(ldlm_namespace_list(client))) { - mutex_up(ldlm_namespace_lock(client)); - break; - } - ns = ldlm_namespace_first(client); - ldlm_namespace_get(ns); - ldlm_namespace_move(ns, client); - mutex_up(ldlm_namespace_lock(client)); - - /* After setup is done - recalc the pool. */ - ldlm_pool_recalc(&ns->ns_pool); - ldlm_namespace_put(ns, 1); - } -} -EXPORT_SYMBOL(ldlm_pools_recalc); - -static int ldlm_pools_thread_main(void *arg) -{ - struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg; - char *t_name = "ldlm_poold"; - ENTRY; - - cfs_daemonize(t_name); - thread->t_flags = SVC_RUNNING; - cfs_waitq_signal(&thread->t_ctl_waitq); - - CDEBUG(D_DLMTRACE, "%s: pool thread starting, process %d\n", - t_name, cfs_curproc_pid()); - - while (1) { - struct l_wait_info lwi; - - /* Recal all pools on this tick. */ - ldlm_pools_recalc(LDLM_NAMESPACE_SERVER); - ldlm_pools_recalc(LDLM_NAMESPACE_CLIENT); - - /* Wait until the next check time, or until we're - * stopped. */ - lwi = LWI_TIMEOUT(cfs_time_seconds(LDLM_POOLS_THREAD_PERIOD), - NULL, NULL); - l_wait_event(thread->t_ctl_waitq, (thread->t_flags & - (SVC_STOPPING|SVC_EVENT)), - &lwi); - - if (thread->t_flags & SVC_STOPPING) { - thread->t_flags &= ~SVC_STOPPING; - break; - } else if (thread->t_flags & SVC_EVENT) { - thread->t_flags &= ~SVC_EVENT; - } - } - - thread->t_flags = SVC_STOPPED; - cfs_waitq_signal(&thread->t_ctl_waitq); - - CDEBUG(D_DLMTRACE, "%s: pool thread exiting, process %d\n", - t_name, cfs_curproc_pid()); - - complete_and_exit(&ldlm_pools_comp, 0); -} - -static int ldlm_pools_thread_start(void) -{ - struct l_wait_info lwi = { 0 }; - int rc; - ENTRY; - - if (ldlm_pools_thread != NULL) - RETURN(-EALREADY); - - OBD_ALLOC_PTR(ldlm_pools_thread); - if (ldlm_pools_thread == NULL) - RETURN(-ENOMEM); - - init_completion(&ldlm_pools_comp); - cfs_waitq_init(&ldlm_pools_thread->t_ctl_waitq); - - /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we - * just drop the VM and FILES in ptlrpc_daemonize() right away. */ - rc = cfs_kernel_thread(ldlm_pools_thread_main, ldlm_pools_thread, - CLONE_VM | CLONE_FILES); - if (rc < 0) { - CERROR("Can't start pool thread, error %d\n", - rc); - OBD_FREE(ldlm_pools_thread, sizeof(*ldlm_pools_thread)); - ldlm_pools_thread = NULL; - RETURN(rc); - } - l_wait_event(ldlm_pools_thread->t_ctl_waitq, - (ldlm_pools_thread->t_flags & SVC_RUNNING), &lwi); - RETURN(0); -} - -static void ldlm_pools_thread_stop(void) -{ - ENTRY; - - if (ldlm_pools_thread == NULL) { - EXIT; - return; - } - - ldlm_pools_thread->t_flags = SVC_STOPPING; - cfs_waitq_signal(&ldlm_pools_thread->t_ctl_waitq); - - /* Make sure that pools thread is finished before freeing @thread. - * This fixes possible race and oops due to accessing freed memory - * in pools thread. */ - wait_for_completion(&ldlm_pools_comp); - OBD_FREE_PTR(ldlm_pools_thread); - ldlm_pools_thread = NULL; - EXIT; -} - -int ldlm_pools_init(void) -{ - int rc; - ENTRY; - - rc = ldlm_pools_thread_start(); - if (rc == 0) { - ldlm_pools_srv_shrinker = set_shrinker(DEFAULT_SEEKS, - ldlm_pools_srv_shrink); - ldlm_pools_cli_shrinker = set_shrinker(DEFAULT_SEEKS, - ldlm_pools_cli_shrink); - } - RETURN(rc); -} -EXPORT_SYMBOL(ldlm_pools_init); - -void ldlm_pools_fini(void) -{ - if (ldlm_pools_srv_shrinker != NULL) { - remove_shrinker(ldlm_pools_srv_shrinker); - ldlm_pools_srv_shrinker = NULL; - } - if (ldlm_pools_cli_shrinker != NULL) { - remove_shrinker(ldlm_pools_cli_shrinker); - ldlm_pools_cli_shrinker = NULL; - } - ldlm_pools_thread_stop(); -} -EXPORT_SYMBOL(ldlm_pools_fini); -#endif /* __KERNEL__ */ - -#else /* !HAVE_LRU_RESIZE_SUPPORT */ -int ldlm_pool_setup(struct ldlm_pool *pl, int limit) -{ - return 0; -} -EXPORT_SYMBOL(ldlm_pool_setup); - -int ldlm_pool_recalc(struct ldlm_pool *pl) -{ - return 0; -} -EXPORT_SYMBOL(ldlm_pool_recalc); - -int ldlm_pool_shrink(struct ldlm_pool *pl, - int nr, unsigned int gfp_mask) -{ - return 0; -} -EXPORT_SYMBOL(ldlm_pool_shrink); - -int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns, - int idx, ldlm_side_t client) -{ - return 0; -} -EXPORT_SYMBOL(ldlm_pool_init); - -void ldlm_pool_fini(struct ldlm_pool *pl) -{ - return; -} -EXPORT_SYMBOL(ldlm_pool_fini); - -void ldlm_pool_add(struct ldlm_pool *pl, struct ldlm_lock *lock) -{ - return; -} -EXPORT_SYMBOL(ldlm_pool_add); - -void ldlm_pool_del(struct ldlm_pool *pl, struct ldlm_lock *lock) -{ - return; -} -EXPORT_SYMBOL(ldlm_pool_del); - -__u64 ldlm_pool_get_slv(struct ldlm_pool *pl) -{ - return 1; -} -EXPORT_SYMBOL(ldlm_pool_get_slv); - -void ldlm_pool_set_slv(struct ldlm_pool *pl, __u64 slv) -{ - return; -} -EXPORT_SYMBOL(ldlm_pool_set_slv); - -__u32 ldlm_pool_get_limit(struct ldlm_pool *pl) -{ - return 0; -} -EXPORT_SYMBOL(ldlm_pool_get_limit); - -void ldlm_pool_set_limit(struct ldlm_pool *pl, __u32 limit) -{ - return; -} -EXPORT_SYMBOL(ldlm_pool_set_limit); - -int ldlm_pools_init(void) -{ - return 0; -} -EXPORT_SYMBOL(ldlm_pools_init); - -void ldlm_pools_fini(void) -{ - return; -} -EXPORT_SYMBOL(ldlm_pools_fini); - -void ldlm_pools_wakeup(void) -{ - return; -} -EXPORT_SYMBOL(ldlm_pools_wakeup); - -void ldlm_pools_recalc(ldlm_side_t client) -{ - return; -} -EXPORT_SYMBOL(ldlm_pools_recalc); -#endif /* HAVE_LRU_RESIZE_SUPPORT */ diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c deleted file mode 100644 index aa3d1ae7b2..0000000000 --- a/lustre/ldlm/ldlm_request.c +++ /dev/null @@ -1,2002 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_LDLM -#ifndef __KERNEL__ -#include <signal.h> -#include <liblustre.h> -#endif - -#include <lustre_dlm.h> -#include <obd_class.h> -#include <obd.h> - -#include "ldlm_internal.h" - -int ldlm_enqueue_min = OBD_TIMEOUT_DEFAULT; -CFS_MODULE_PARM(ldlm_enqueue_min, "i", int, 0644, - "lock enqueue timeout minimum"); - -static void interrupted_completion_wait(void *data) -{ -} - -struct lock_wait_data { - struct ldlm_lock *lwd_lock; - __u32 lwd_conn_cnt; -}; - -struct ldlm_async_args { - struct lustre_handle lock_handle; -}; - -int ldlm_expired_completion_wait(void *data) -{ - struct lock_wait_data *lwd = data; - struct ldlm_lock *lock = lwd->lwd_lock; - struct obd_import *imp; - struct obd_device *obd; - - ENTRY; - if (lock->l_conn_export == NULL) { - static cfs_time_t next_dump = 0, last_dump = 0; - - LDLM_ERROR(lock, "lock timed out (enqueued at %lu, %lus ago); " - "not entering recovery in server code, just going " - "back to sleep", lock->l_enqueued_time.tv_sec, - cfs_time_current_sec() - - lock->l_enqueued_time.tv_sec); - if (cfs_time_after(cfs_time_current(), next_dump)) { - last_dump = next_dump; - next_dump = cfs_time_shift(300); - ldlm_namespace_dump(D_DLMTRACE, - lock->l_resource->lr_namespace); - if (last_dump == 0) - libcfs_debug_dumplog(); - } - RETURN(0); - } - - obd = lock->l_conn_export->exp_obd; - imp = obd->u.cli.cl_import; - ptlrpc_fail_import(imp, lwd->lwd_conn_cnt); - LDLM_ERROR(lock, "lock timed out (enqueued at %lu, %lus ago), entering " - "recovery for %s@%s", lock->l_enqueued_time.tv_sec, - CURRENT_SECONDS - lock->l_enqueued_time.tv_sec, - obd2cli_tgt(obd), imp->imp_connection->c_remote_uuid.uuid); - - RETURN(0); -} - -/* We use the same basis for both server side and client side functions - from a single node. */ -int ldlm_get_enq_timeout(struct ldlm_lock *lock) -{ - int timeout = at_get(&lock->l_resource->lr_namespace->ns_at_estimate); - if (AT_OFF) - return obd_timeout / 2; - /* Since these are non-updating timeouts, we should be conservative. - It would be nice to have some kind of "early reply" mechanism for - lock callbacks too... */ - timeout = timeout + (timeout >> 1); /* 150% */ - return max(timeout, ldlm_enqueue_min); -} - -static int is_granted_or_cancelled(struct ldlm_lock *lock) -{ - int ret = 0; - - lock_res_and_lock(lock); - if (((lock->l_req_mode == lock->l_granted_mode) && - !(lock->l_flags & LDLM_FL_CP_REQD)) || - (lock->l_flags & LDLM_FL_FAILED)) - ret = 1; - unlock_res_and_lock(lock); - - return ret; -} - -int ldlm_completion_ast(struct ldlm_lock *lock, int flags, void *data) -{ - /* XXX ALLOCATE - 160 bytes */ - struct lock_wait_data lwd; - struct obd_device *obd; - struct obd_import *imp = NULL; - struct l_wait_info lwi; - __u32 timeout; - int rc = 0; - ENTRY; - - if (flags == LDLM_FL_WAIT_NOREPROC) { - LDLM_DEBUG(lock, "client-side enqueue waiting on pending lock"); - goto noreproc; - } - - if (!(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED | - LDLM_FL_BLOCK_CONV))) { - cfs_waitq_signal(&lock->l_waitq); - RETURN(0); - } - - LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, " - "sleeping"); - ldlm_lock_dump(D_OTHER, lock, 0); - ldlm_reprocess_all(lock->l_resource); - -noreproc: - - obd = class_exp2obd(lock->l_conn_export); - - /* if this is a local lock, then there is no import */ - if (obd != NULL) { - imp = obd->u.cli.cl_import; - } - - /* Wait a long time for enqueue - server may have to callback a - lock from another client. Server will evict the other client if it - doesn't respond reasonably, and then give us the lock. */ - timeout = ldlm_get_enq_timeout(lock) * 2; - - lwd.lwd_lock = lock; - - if (lock->l_flags & LDLM_FL_NO_TIMEOUT) { - LDLM_DEBUG(lock, "waiting indefinitely because of NO_TIMEOUT"); - lwi = LWI_INTR(interrupted_completion_wait, &lwd); - } else { - lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(timeout), - ldlm_expired_completion_wait, - interrupted_completion_wait, &lwd); - } - - if (imp != NULL) { - spin_lock(&imp->imp_lock); - lwd.lwd_conn_cnt = imp->imp_conn_cnt; - spin_unlock(&imp->imp_lock); - } - - /* Go to sleep until the lock is granted or cancelled. */ - rc = l_wait_event(lock->l_waitq, is_granted_or_cancelled(lock), &lwi); - - if (lock->l_destroyed || lock->l_flags & LDLM_FL_FAILED) { - LDLM_DEBUG(lock, "client-side enqueue waking up: destroyed"); - RETURN(-EIO); - } - - if (rc) { - LDLM_DEBUG(lock, "client-side enqueue waking up: failed (%d)", - rc); - RETURN(rc); - } - - LDLM_DEBUG(lock, "client-side enqueue waking up: granted after %lds", - cfs_time_current_sec() - lock->l_enqueued_time.tv_sec); - - /* Update our time estimate */ - at_add(&lock->l_resource->lr_namespace->ns_at_estimate, - cfs_time_current_sec() - lock->l_enqueued_time.tv_sec); - - RETURN(0); -} - -/* - * ->l_blocking_ast() callback for LDLM locks acquired by server-side OBDs. - */ -int ldlm_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, - void *data, int flag) -{ - int do_ast; - ENTRY; - - if (flag == LDLM_CB_CANCELING) { - /* Don't need to do anything here. */ - RETURN(0); - } - - lock_res_and_lock(lock); - /* Get this: if ldlm_blocking_ast is racing with intent_policy, such - * that ldlm_blocking_ast is called just before intent_policy method - * takes the ns_lock, then by the time we get the lock, we might not - * be the correct blocking function anymore. So check, and return - * early, if so. */ - if (lock->l_blocking_ast != ldlm_blocking_ast) { - unlock_res_and_lock(lock); - RETURN(0); - } - - lock->l_flags |= LDLM_FL_CBPENDING; - do_ast = (!lock->l_readers && !lock->l_writers); - unlock_res_and_lock(lock); - - if (do_ast) { - struct lustre_handle lockh; - int rc; - - LDLM_DEBUG(lock, "already unused, calling ldlm_cli_cancel"); - ldlm_lock2handle(lock, &lockh); - rc = ldlm_cli_cancel(&lockh); - if (rc < 0) - CERROR("ldlm_cli_cancel: %d\n", rc); - } else { - LDLM_DEBUG(lock, "Lock still has references, will be " - "cancelled later"); - } - RETURN(0); -} - -/* - * ->l_glimpse_ast() for DLM extent locks acquired on the server-side. See - * comment in filter_intent_policy() on why you may need this. - */ -int ldlm_glimpse_ast(struct ldlm_lock *lock, void *reqp) -{ - /* - * Returning -ELDLM_NO_LOCK_DATA actually works, but the reason for - * that is rather subtle: with OST-side locking, it may so happen that - * _all_ extent locks are held by the OST. If client wants to obtain - * current file size it calls ll{,u}_glimpse_size(), and (as locks are - * on the server), dummy glimpse callback fires and does - * nothing. Client still receives correct file size due to the - * following fragment in filter_intent_policy(): - * - * rc = l->l_glimpse_ast(l, NULL); // this will update the LVB - * if (rc != 0 && res->lr_namespace->ns_lvbo && - * res->lr_namespace->ns_lvbo->lvbo_update) { - * res->lr_namespace->ns_lvbo->lvbo_update(res, NULL, 0, 1); - * } - * - * that is, after glimpse_ast() fails, filter_lvbo_update() runs, and - * returns correct file size to the client. - */ - return -ELDLM_NO_LOCK_DATA; -} - -int ldlm_cli_enqueue_local(struct ldlm_namespace *ns, - struct ldlm_res_id *res_id, - ldlm_type_t type, ldlm_policy_data_t *policy, - ldlm_mode_t mode, int *flags, - ldlm_blocking_callback blocking, - ldlm_completion_callback completion, - ldlm_glimpse_callback glimpse, - void *data, __u32 lvb_len, void *lvb_swabber, - struct lustre_handle *lockh) -{ - struct ldlm_lock *lock; - int err; - ENTRY; - - LASSERT(!(*flags & LDLM_FL_REPLAY)); - if (ns_is_client(ns)) { - CERROR("Trying to enqueue local lock in a shadow namespace\n"); - LBUG(); - } - - lock = ldlm_lock_create(ns, *res_id, type, mode, blocking, - completion, glimpse, data, lvb_len); - if (!lock) - GOTO(out_nolock, err = -ENOMEM); - LDLM_DEBUG(lock, "client-side local enqueue handler, new lock created"); - - ldlm_lock_addref_internal(lock, mode); - ldlm_lock2handle(lock, lockh); - lock_res_and_lock(lock); - lock->l_flags |= LDLM_FL_LOCAL; - if (*flags & LDLM_FL_ATOMIC_CB) - lock->l_flags |= LDLM_FL_ATOMIC_CB; - lock->l_lvb_swabber = lvb_swabber; - unlock_res_and_lock(lock); - if (policy != NULL) - lock->l_policy_data = *policy; - if (type == LDLM_EXTENT) - lock->l_req_extent = policy->l_extent; - - err = ldlm_lock_enqueue(ns, &lock, policy, flags); - if (err != ELDLM_OK) - GOTO(out, err); - - if (policy != NULL) - *policy = lock->l_policy_data; - if ((*flags) & LDLM_FL_LOCK_CHANGED) - *res_id = lock->l_resource->lr_name; - - LDLM_DEBUG_NOLOCK("client-side local enqueue handler END (lock %p)", - lock); - - if (lock->l_completion_ast) - lock->l_completion_ast(lock, *flags, NULL); - - LDLM_DEBUG(lock, "client-side local enqueue END"); - EXIT; - out: - LDLM_LOCK_PUT(lock); - out_nolock: - return err; -} - -static void failed_lock_cleanup(struct ldlm_namespace *ns, - struct ldlm_lock *lock, - struct lustre_handle *lockh, int mode) -{ - /* Set a flag to prevent us from sending a CANCEL (bug 407) */ - lock_res_and_lock(lock); - lock->l_flags |= LDLM_FL_LOCAL_ONLY; - unlock_res_and_lock(lock); - LDLM_DEBUG(lock, "setting FL_LOCAL_ONLY"); - - ldlm_lock_decref_and_cancel(lockh, mode); - - /* XXX - HACK because we shouldn't call ldlm_lock_destroy() - * from llite/file.c/ll_file_flock(). */ - if (lock->l_resource->lr_type == LDLM_FLOCK) { - ldlm_lock_destroy(lock); - } -} - -int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, - ldlm_type_t type, __u8 with_policy, ldlm_mode_t mode, - int *flags, void *lvb, __u32 lvb_len, - void *lvb_swabber, struct lustre_handle *lockh,int rc) -{ - struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; - int is_replay = *flags & LDLM_FL_REPLAY; - struct ldlm_lock *lock; - struct ldlm_reply *reply; - int cleanup_phase = 1; - ENTRY; - - lock = ldlm_handle2lock(lockh); - /* ldlm_cli_enqueue is holding a reference on this lock. */ - if (!lock) { - LASSERT(type == LDLM_FLOCK); - RETURN(-ENOLCK); - } - - if (rc != ELDLM_OK) { - LASSERT(!is_replay); - LDLM_DEBUG(lock, "client-side enqueue END (%s)", - rc == ELDLM_LOCK_ABORTED ? "ABORTED" : "FAILED"); - if (rc == ELDLM_LOCK_ABORTED) { - /* Before we return, swab the reply */ - reply = lustre_swab_repbuf(req, DLM_LOCKREPLY_OFF, - sizeof(*reply), - lustre_swab_ldlm_reply); - if (reply == NULL) { - CERROR("Can't unpack ldlm_reply\n"); - rc = -EPROTO; - } - if (lvb_len) { - void *tmplvb; - tmplvb = lustre_swab_repbuf(req, - DLM_REPLY_REC_OFF, - lvb_len, - lvb_swabber); - if (tmplvb == NULL) - GOTO(cleanup, rc = -EPROTO); - if (lvb != NULL) - memcpy(lvb, tmplvb, lvb_len); - } - } - GOTO(cleanup, rc); - } - - reply = lustre_swab_repbuf(req, DLM_LOCKREPLY_OFF, sizeof(*reply), - lustre_swab_ldlm_reply); - if (reply == NULL) { - CERROR("Can't unpack ldlm_reply\n"); - GOTO(cleanup, rc = -EPROTO); - } - - /* lock enqueued on the server */ - cleanup_phase = 0; - - lock_res_and_lock(lock); - lock->l_remote_handle = reply->lock_handle; - *flags = reply->lock_flags; - lock->l_flags |= reply->lock_flags & LDLM_INHERIT_FLAGS; - /* move NO_TIMEOUT flag to the lock to force ldlm_lock_match() - * to wait with no timeout as well */ - lock->l_flags |= reply->lock_flags & LDLM_FL_NO_TIMEOUT; - unlock_res_and_lock(lock); - - CDEBUG(D_INFO, "local: %p, remote cookie: "LPX64", flags: 0x%x\n", - lock, reply->lock_handle.cookie, *flags); - - /* If enqueue returned a blocked lock but the completion handler has - * already run, then it fixed up the resource and we don't need to do it - * again. */ - if ((*flags) & LDLM_FL_LOCK_CHANGED) { - int newmode = reply->lock_desc.l_req_mode; - LASSERT(!is_replay); - if (newmode && newmode != lock->l_req_mode) { - LDLM_DEBUG(lock, "server returned different mode %s", - ldlm_lockname[newmode]); - lock->l_req_mode = newmode; - } - - if (reply->lock_desc.l_resource.lr_name.name[0] != - lock->l_resource->lr_name.name[0]) { - CDEBUG(D_INFO, "remote intent success, locking %ld " - "instead of %ld\n", - (long)reply->lock_desc.l_resource.lr_name.name[0], - (long)lock->l_resource->lr_name.name[0]); - - ldlm_lock_change_resource(ns, lock, - reply->lock_desc.l_resource.lr_name); - if (lock->l_resource == NULL) { - LBUG(); - GOTO(cleanup, rc = -ENOMEM); - } - LDLM_DEBUG(lock, "client-side enqueue, new resource"); - } - if (with_policy) - if (!(type == LDLM_IBITS && !(exp->exp_connect_flags & - OBD_CONNECT_IBITS))) - lock->l_policy_data = - reply->lock_desc.l_policy_data; - if (type != LDLM_PLAIN) - LDLM_DEBUG(lock,"client-side enqueue, new policy data"); - } - - if ((*flags) & LDLM_FL_AST_SENT || - /* Cancel extent locks as soon as possible on a liblustre client, - * because it cannot handle asynchronous ASTs robustly (see - * bug 7311). */ - (LIBLUSTRE_CLIENT && type == LDLM_EXTENT)) { - lock_res_and_lock(lock); - lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_BL_AST; - unlock_res_and_lock(lock); - LDLM_DEBUG(lock, "enqueue reply includes blocking AST"); - } - - /* If the lock has already been granted by a completion AST, don't - * clobber the LVB with an older one. */ - if (lvb_len && (lock->l_req_mode != lock->l_granted_mode)) { - void *tmplvb; - tmplvb = lustre_swab_repbuf(req, DLM_REPLY_REC_OFF, lvb_len, - lvb_swabber); - if (tmplvb == NULL) - GOTO(cleanup, rc = -EPROTO); - memcpy(lock->l_lvb_data, tmplvb, lvb_len); - } - - if (!is_replay) { - rc = ldlm_lock_enqueue(ns, &lock, NULL, flags); - if (lock->l_completion_ast != NULL) { - int err = lock->l_completion_ast(lock, *flags, NULL); - if (!rc) - rc = err; - if (rc && type != LDLM_FLOCK) /* bug 9425, bug 10250 */ - cleanup_phase = 1; - } - } - - if (lvb_len && lvb != NULL) { - /* Copy the LVB here, and not earlier, because the completion - * AST (if any) can override what we got in the reply */ - memcpy(lvb, lock->l_lvb_data, lvb_len); - } - - LDLM_DEBUG(lock, "client-side enqueue END"); - EXIT; -cleanup: - if (cleanup_phase == 1 && rc) - failed_lock_cleanup(ns, lock, lockh, mode); - /* Put lock 2 times, the second reference is held by ldlm_cli_enqueue */ - LDLM_LOCK_PUT(lock); - LDLM_LOCK_PUT(lock); - return rc; -} - -/* PAGE_SIZE-512 is to allow TCP/IP and LNET headers to fit into - * a single page on the send/receive side. XXX: 512 should be changed - * to more adequate value. */ -static inline int ldlm_req_handles_avail(struct obd_export *exp, - int *size, int bufcount, int off) -{ - int avail = min_t(int, LDLM_MAXREQSIZE, PAGE_SIZE - 512); - - avail -= lustre_msg_size(class_exp2cliimp(exp)->imp_msg_magic, - bufcount, size); - avail /= sizeof(struct lustre_handle); - avail += LDLM_LOCKREQ_HANDLES - off; - - return avail; -} - -static inline int ldlm_cancel_handles_avail(struct obd_export *exp) -{ - int size[2] = { sizeof(struct ptlrpc_body), - sizeof(struct ldlm_request) }; - return ldlm_req_handles_avail(exp, size, 2, 0); -} - -/* Cancel lru locks and pack them into the enqueue request. Pack there the given - * @count locks in @cancels. */ -struct ptlrpc_request *ldlm_prep_elc_req(struct obd_export *exp, int version, - int opc, int bufcount, int *size, - int bufoff, int canceloff, - struct list_head *cancels, int count) -{ - struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; - int flags, avail, to_free, pack = 0; - struct ldlm_request *dlm = NULL; - struct ptlrpc_request *req; - CFS_LIST_HEAD(head); - ENTRY; - - if (cancels == NULL) - cancels = &head; - if (exp_connect_cancelset(exp)) { - /* Estimate the amount of free space in the request. */ - LASSERT(bufoff < bufcount); - - avail = ldlm_req_handles_avail(exp, size, bufcount, canceloff); - flags = ns_connect_lru_resize(ns) ? - LDLM_CANCEL_LRUR : LDLM_CANCEL_AGED; - to_free = !ns_connect_lru_resize(ns) && - opc == LDLM_ENQUEUE ? 1 : 0; - - /* Cancel lru locks here _only_ if the server supports - * EARLY_CANCEL. Otherwise we have to send extra CANCEL - * rpc, what will make us slower. */ - if (avail > count) - count += ldlm_cancel_lru_local(ns, cancels, to_free, - avail - count, 0, flags); - if (avail > count) - pack = count; - else - pack = avail; - size[bufoff] = ldlm_request_bufsize(pack, opc); - } - req = ptlrpc_prep_req(class_exp2cliimp(exp), version, - opc, bufcount, size, NULL); - if (exp_connect_cancelset(exp) && req) { - if (canceloff) { - dlm = lustre_msg_buf(req->rq_reqmsg, bufoff, - sizeof(*dlm)); - /* Skip first lock handler in ldlm_request_pack(), - * this method will incrment @lock_count according - * to the lock handle amount actually written to - * the buffer. */ - dlm->lock_count = canceloff; - } - /* Pack into the request @pack lock handles. */ - ldlm_cli_cancel_list(cancels, pack, req, bufoff); - /* Prepare and send separate cancel rpc for others. */ - ldlm_cli_cancel_list(cancels, count - pack, NULL, 0); - } else { - ldlm_lock_list_put(cancels, l_bl_ast, count); - } - RETURN(req); -} - -struct ptlrpc_request *ldlm_prep_enqueue_req(struct obd_export *exp, - int bufcount, int *size, - struct list_head *cancels, - int count) -{ - return ldlm_prep_elc_req(exp, LUSTRE_DLM_VERSION, LDLM_ENQUEUE, - bufcount, size, DLM_LOCKREQ_OFF, - LDLM_ENQUEUE_CANCEL_OFF, cancels, count); -} - -/* If a request has some specific initialisation it is passed in @reqp, - * otherwise it is created in ldlm_cli_enqueue. - * - * Supports sync and async requests, pass @async flag accordingly. If a - * request was created in ldlm_cli_enqueue and it is the async request, - * pass it to the caller in @reqp. */ -int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, - struct ldlm_enqueue_info *einfo, struct ldlm_res_id res_id, - ldlm_policy_data_t *policy, int *flags, - void *lvb, __u32 lvb_len, void *lvb_swabber, - struct lustre_handle *lockh, int async) -{ - struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; - struct ldlm_lock *lock; - struct ldlm_request *body; - struct ldlm_reply *reply; - int size[3] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(*body), - [DLM_REPLY_REC_OFF] = lvb_len }; - int is_replay = *flags & LDLM_FL_REPLAY; - int req_passed_in = 1, rc, err; - struct ptlrpc_request *req; - ENTRY; - - LASSERT(exp != NULL); - - /* If we're replaying this lock, just check some invariants. - * If we're creating a new lock, get everything all setup nice. */ - if (is_replay) { - lock = ldlm_handle2lock(lockh); - LASSERT(lock != NULL); - LDLM_DEBUG(lock, "client-side enqueue START"); - LASSERT(exp == lock->l_conn_export); - } else { - lock = ldlm_lock_create(ns, res_id, einfo->ei_type, - einfo->ei_mode, einfo->ei_cb_bl, - einfo->ei_cb_cp, einfo->ei_cb_gl, - einfo->ei_cbdata, lvb_len); - if (lock == NULL) - RETURN(-ENOMEM); - /* for the local lock, add the reference */ - ldlm_lock_addref_internal(lock, einfo->ei_mode); - ldlm_lock2handle(lock, lockh); - lock->l_lvb_swabber = lvb_swabber; - if (policy != NULL) { - /* INODEBITS_INTEROP: If the server does not support - * inodebits, we will request a plain lock in the - * descriptor (ldlm_lock2desc() below) but use an - * inodebits lock internally with both bits set. - */ - if (einfo->ei_type == LDLM_IBITS && - !(exp->exp_connect_flags & OBD_CONNECT_IBITS)) - lock->l_policy_data.l_inodebits.bits = - MDS_INODELOCK_LOOKUP | - MDS_INODELOCK_UPDATE; - else - lock->l_policy_data = *policy; - } - - if (einfo->ei_type == LDLM_EXTENT) - lock->l_req_extent = policy->l_extent; - LDLM_DEBUG(lock, "client-side enqueue START"); - } - - /* lock not sent to server yet */ - - if (reqp == NULL || *reqp == NULL) { - req = ldlm_prep_enqueue_req(exp, 2, size, NULL, 0); - if (req == NULL) { - failed_lock_cleanup(ns, lock, lockh, einfo->ei_mode); - LDLM_LOCK_PUT(lock); - RETURN(-ENOMEM); - } - req_passed_in = 0; - if (reqp) - *reqp = req; - } else { - req = *reqp; - LASSERTF(lustre_msg_buflen(req->rq_reqmsg, DLM_LOCKREQ_OFF) >= - sizeof(*body), "buflen[%d] = %d, not "LPSZ"\n", - DLM_LOCKREQ_OFF, - lustre_msg_buflen(req->rq_reqmsg, DLM_LOCKREQ_OFF), - sizeof(*body)); - } - - lock->l_conn_export = exp; - lock->l_export = NULL; - lock->l_blocking_ast = einfo->ei_cb_bl; - - /* Dump lock data into the request buffer */ - body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body)); - ldlm_lock2desc(lock, &body->lock_desc); - body->lock_flags = *flags; - body->lock_handle[0] = *lockh; - - /* Continue as normal. */ - if (!req_passed_in) { - size[DLM_LOCKREPLY_OFF] = sizeof(*reply); - ptlrpc_req_set_repsize(req, 2 + (lvb_len > 0), size); - } - - /* - * Liblustre client doesn't get extent locks, except for O_APPEND case - * where [0, OBD_OBJECT_EOF] lock is taken, or truncate, where - * [i_size, OBD_OBJECT_EOF] lock is taken. - */ - LASSERT(ergo(LIBLUSTRE_CLIENT, einfo->ei_type != LDLM_EXTENT || - policy->l_extent.end == OBD_OBJECT_EOF)); - - if (async) { - LASSERT(reqp != NULL); - RETURN(0); - } - - LDLM_DEBUG(lock, "sending request"); - rc = ptlrpc_queue_wait(req); - err = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, policy ? 1 : 0, - einfo->ei_mode, flags, lvb, lvb_len, - lvb_swabber, lockh, rc); - - /* If ldlm_cli_enqueue_fini did not find the lock, we need to free - * one reference that we took */ - if (err == -ENOLCK) - LDLM_LOCK_PUT(lock); - else - rc = err; - - if (!req_passed_in && req != NULL) { - ptlrpc_req_finished(req); - if (reqp) - *reqp = NULL; - } - - RETURN(rc); -} - -static int ldlm_cli_convert_local(struct ldlm_lock *lock, int new_mode, - __u32 *flags) -{ - struct ldlm_resource *res; - int rc; - ENTRY; - if (ns_is_client(lock->l_resource->lr_namespace)) { - CERROR("Trying to cancel local lock\n"); - LBUG(); - } - LDLM_DEBUG(lock, "client-side local convert"); - - res = ldlm_lock_convert(lock, new_mode, flags); - if (res) { - ldlm_reprocess_all(res); - rc = 0; - } else { - rc = EDEADLOCK; - } - LDLM_DEBUG(lock, "client-side local convert handler END"); - LDLM_LOCK_PUT(lock); - RETURN(rc); -} - -/* FIXME: one of ldlm_cli_convert or the server side should reject attempted - * conversion of locks which are on the waiting or converting queue */ -/* Caller of this code is supposed to take care of lock readers/writers - accounting */ -int ldlm_cli_convert(struct lustre_handle *lockh, int new_mode, __u32 *flags) -{ - struct ldlm_request *body; - struct ldlm_reply *reply; - struct ldlm_lock *lock; - struct ldlm_resource *res; - struct ptlrpc_request *req; - int size[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(*body) }; - int rc; - ENTRY; - - lock = ldlm_handle2lock(lockh); - if (!lock) { - LBUG(); - RETURN(-EINVAL); - } - *flags = 0; - - if (lock->l_conn_export == NULL) - RETURN(ldlm_cli_convert_local(lock, new_mode, flags)); - - LDLM_DEBUG(lock, "client-side convert"); - - req = ptlrpc_prep_req(class_exp2cliimp(lock->l_conn_export), - LUSTRE_DLM_VERSION, LDLM_CONVERT, 2, size, NULL); - if (!req) - GOTO(out, rc = -ENOMEM); - - body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body)); - body->lock_handle[0] = lock->l_remote_handle; - - body->lock_desc.l_req_mode = new_mode; - body->lock_flags = *flags; - - size[DLM_LOCKREPLY_OFF] = sizeof(*reply); - ptlrpc_req_set_repsize(req, 2, size); - - rc = ptlrpc_queue_wait(req); - if (rc != ELDLM_OK) - GOTO(out, rc); - - reply = lustre_swab_repbuf(req, DLM_LOCKREPLY_OFF, sizeof(*reply), - lustre_swab_ldlm_reply); - if (reply == NULL) { - CERROR ("Can't unpack ldlm_reply\n"); - GOTO (out, rc = -EPROTO); - } - - if (req->rq_status) - GOTO(out, rc = req->rq_status); - - res = ldlm_lock_convert(lock, new_mode, &reply->lock_flags); - if (res != NULL) { - ldlm_reprocess_all(res); - /* Go to sleep until the lock is granted. */ - /* FIXME: or cancelled. */ - if (lock->l_completion_ast) { - rc = lock->l_completion_ast(lock, LDLM_FL_WAIT_NOREPROC, - NULL); - if (rc) - GOTO(out, rc); - } - } else { - rc = EDEADLOCK; - } - EXIT; - out: - LDLM_LOCK_PUT(lock); - ptlrpc_req_finished(req); - return rc; -} - -/* Cancel locks locally. - * Returns: - * LDLM_FL_LOCAL_ONLY if tere is no need in a CANCEL rpc to the server; - * LDLM_FL_CANCELING otherwise; - * LDLM_FL_BL_AST if there is a need in a separate CANCEL rpc. */ -static int ldlm_cli_cancel_local(struct ldlm_lock *lock) -{ - int rc = LDLM_FL_LOCAL_ONLY; - ENTRY; - - if (lock->l_conn_export) { - int local_only; - - LDLM_DEBUG(lock, "client-side cancel"); - /* Set this flag to prevent others from getting new references*/ - lock_res_and_lock(lock); - lock->l_flags |= LDLM_FL_CBPENDING; - local_only = (lock->l_flags & - (LDLM_FL_LOCAL_ONLY|LDLM_FL_CANCEL_ON_BLOCK)); - ldlm_cancel_callback(lock); - rc = (lock->l_flags & LDLM_FL_BL_AST) ? - LDLM_FL_BL_AST : LDLM_FL_CANCELING; - unlock_res_and_lock(lock); - - if (local_only) { - CDEBUG(D_DLMTRACE, "not sending request (at caller's " - "instruction)\n"); - rc = LDLM_FL_LOCAL_ONLY; - } - ldlm_lock_cancel(lock); - } else { - if (ns_is_client(lock->l_resource->lr_namespace)) { - LDLM_ERROR(lock, "Trying to cancel local lock"); - LBUG(); - } - LDLM_DEBUG(lock, "server-side local cancel"); - ldlm_lock_cancel(lock); - ldlm_reprocess_all(lock->l_resource); - LDLM_DEBUG(lock, "server-side local cancel handler END"); - } - - RETURN(rc); -} - -/* Pack @count locks in @head into ldlm_request buffer at the offset @off, - of the request @req. */ -static void ldlm_cancel_pack(struct ptlrpc_request *req, int off, - struct list_head *head, int count) -{ - struct ldlm_request *dlm; - struct ldlm_lock *lock; - int max, packed = 0; - ENTRY; - - dlm = lustre_msg_buf(req->rq_reqmsg, off, sizeof(*dlm)); - LASSERT(dlm != NULL); - - /* Check the room in the request buffer. */ - max = lustre_msg_buflen(req->rq_reqmsg, off) - - sizeof(struct ldlm_request); - max /= sizeof(struct lustre_handle); - max += LDLM_LOCKREQ_HANDLES; - LASSERT(max >= dlm->lock_count + count); - - /* XXX: it would be better to pack lock handles grouped by resource. - * so that the server cancel would call filter_lvbo_update() less - * frequently. */ - list_for_each_entry(lock, head, l_bl_ast) { - if (!count--) - break; - LASSERT(lock->l_conn_export); - /* Pack the lock handle to the given request buffer. */ - LDLM_DEBUG(lock, "packing"); - dlm->lock_handle[dlm->lock_count++] = lock->l_remote_handle; - packed++; - } - CDEBUG(D_DLMTRACE, "%d locks packed\n", packed); - EXIT; -} - -/* Prepare and send a batched cancel rpc, it will include count lock handles - * of locks given in @head. */ -int ldlm_cli_cancel_req(struct obd_export *exp, - struct list_head *cancels, int count) -{ - struct ptlrpc_request *req = NULL; - struct ldlm_request *body; - int size[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(*body) }; - struct obd_import *imp; - int free, sent = 0; - int rc = 0; - ENTRY; - - LASSERT(exp != NULL); - LASSERT(count > 0); - - OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_PAUSE_CANCEL, obd_fail_val); - - if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_RACE)) - RETURN(count); - - free = ldlm_req_handles_avail(exp, size, 2, 0); - if (count > free) - count = free; - - size[DLM_LOCKREQ_OFF] = ldlm_request_bufsize(count, LDLM_CANCEL); - while (1) { - imp = class_exp2cliimp(exp); - if (imp == NULL || imp->imp_invalid) { - CDEBUG(D_DLMTRACE, - "skipping cancel on invalid import %p\n", imp); - RETURN(count); - } - - req = ptlrpc_prep_req(imp, LUSTRE_DLM_VERSION, LDLM_CANCEL, 2, - size, NULL); - if (!req) - GOTO(out, rc = -ENOMEM); - - req->rq_no_resend = 1; - req->rq_no_delay = 1; - - req->rq_request_portal = LDLM_CANCEL_REQUEST_PORTAL; - req->rq_reply_portal = LDLM_CANCEL_REPLY_PORTAL; - ptlrpc_at_set_req_timeout(req); - - body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, - sizeof(*body)); - ldlm_cancel_pack(req, DLM_LOCKREQ_OFF, cancels, count); - - ptlrpc_req_set_repsize(req, 1, NULL); - rc = ptlrpc_queue_wait(req); - - if (rc == ESTALE) { - CDEBUG(D_DLMTRACE, "client/server (nid %s) " - "out of sync -- not fatal\n", - libcfs_nid2str(req->rq_import-> - imp_connection->c_peer.nid)); - rc = 0; - } else if (rc == -ETIMEDOUT && /* check there was no reconnect*/ - req->rq_import_generation == imp->imp_generation) { - ptlrpc_req_finished(req); - continue; - } else if (rc != ELDLM_OK) { - CERROR("Got rc %d from cancel RPC: canceling " - "anyway\n", rc); - break; - } - sent = count; - break; - } - - ptlrpc_req_finished(req); - EXIT; -out: - return sent ? sent : rc; -} - -static inline struct ldlm_pool *ldlm_imp2pl(struct obd_import *imp) -{ - LASSERT(imp != NULL); - return &imp->imp_obd->obd_namespace->ns_pool; -} - -int ldlm_cli_update_pool(struct ptlrpc_request *req) -{ - __u64 old_slv, new_slv; - struct ldlm_pool *pl; - __u32 new_limit; - ENTRY; - - if (!imp_connect_lru_resize(req->rq_import)) - RETURN(0); - - /* In some cases RPC may contain slv and limit zeroed out. This is - * the case when server does not support lru resize feature. This is - * also possible in some recovery cases when server side reqs have no - * ref to obd export and thus access to server side namespace is no - * possible. */ - if (lustre_msg_get_slv(req->rq_repmsg) == 0 || - lustre_msg_get_limit(req->rq_repmsg) == 0) { - DEBUG_REQ(D_HA, req, "zero SLV or Limit found " - "(SLV: "LPU64", Limit: %u)", - lustre_msg_get_slv(req->rq_repmsg), - lustre_msg_get_limit(req->rq_repmsg)); - RETURN(0); - } - - new_limit = lustre_msg_get_limit(req->rq_repmsg); - new_slv = lustre_msg_get_slv(req->rq_repmsg); - pl = ldlm_imp2pl(req->rq_import); - - spin_lock(&pl->pl_lock); - old_slv = ldlm_pool_get_slv(pl); - ldlm_pool_set_slv(pl, new_slv); - ldlm_pool_set_limit(pl, new_limit); - - /* Check if we need to wakeup pools thread for fast SLV change. - * This is only done when threads period is noticably long like - * 10s or more. */ -#if defined(__KERNEL__) && (LDLM_POOLS_THREAD_PERIOD >= 10) - { - __u64 fast_change = old_slv * LDLM_POOLS_FAST_SLV_CHANGE; - do_div(fast_change, 100); - - /* Wake up pools thread only if SLV has changed more than - * 50% since last update. In this case we want to react asap. - * Otherwise it is no sense to wake up pools as they are - * re-calculated every LDLM_POOLS_THREAD_PERIOD anyways. */ - if (old_slv > new_slv && old_slv - new_slv > fast_change) - ldlm_pools_wakeup(); - } -#endif - spin_unlock(&pl->pl_lock); - RETURN(0); -} -EXPORT_SYMBOL(ldlm_cli_update_pool); - -int ldlm_cli_cancel(struct lustre_handle *lockh) -{ - struct ldlm_namespace *ns; - int avail, flags, count = 1, rc = 0; - struct ldlm_lock *lock; - CFS_LIST_HEAD(cancels); - ENTRY; - - /* concurrent cancels on the same handle can happen */ - lock = __ldlm_handle2lock(lockh, LDLM_FL_CANCELING); - if (lock == NULL) { - LDLM_DEBUG_NOLOCK("lock is already being destroyed\n"); - RETURN(0); - } - - rc = ldlm_cli_cancel_local(lock); - if (rc < 0 || rc == LDLM_FL_LOCAL_ONLY) { - LDLM_LOCK_PUT(lock); - RETURN(rc < 0 ? rc : 0); - } - /* Even if the lock is marked as LDLM_FL_BL_AST, this is a LDLM_CANCEL - * rpc which goes to canceld portal, so we can cancel other lru locks - * here and send them all as one LDLM_CANCEL rpc. */ - LASSERT(list_empty(&lock->l_bl_ast)); - list_add(&lock->l_bl_ast, &cancels); - - if (exp_connect_cancelset(lock->l_conn_export)) { - avail = ldlm_cancel_handles_avail(lock->l_conn_export); - LASSERT(avail > 0); - - ns = lock->l_resource->lr_namespace; - flags = ns_connect_lru_resize(ns) ? - LDLM_CANCEL_LRUR : LDLM_CANCEL_AGED; - count += ldlm_cancel_lru_local(ns, &cancels, 0, avail - 1, - LDLM_FL_BL_AST, flags); - } - ldlm_cli_cancel_list(&cancels, count, NULL, 0); - RETURN(0); -} - -/* XXX until we will have compound requests and can cut cancels from generic rpc - * we need send cancels with LDLM_FL_BL_AST flag as separate rpc */ -static int ldlm_cancel_list(struct list_head *cancels, int count, int flags) -{ - CFS_LIST_HEAD(head); - struct ldlm_lock *lock, *next; - int left = 0, bl_ast = 0, rc; - - left = count; - list_for_each_entry_safe(lock, next, cancels, l_bl_ast) { - if (left-- == 0) - break; - - if (flags & LDLM_FL_LOCAL_ONLY) { - rc = LDLM_FL_LOCAL_ONLY; - ldlm_lock_cancel(lock); - } else { - rc = ldlm_cli_cancel_local(lock); - } - if (!(flags & LDLM_FL_BL_AST) && (rc == LDLM_FL_BL_AST)) { - LDLM_DEBUG(lock, "Cancel lock separately"); - list_del_init(&lock->l_bl_ast); - list_add(&lock->l_bl_ast, &head); - bl_ast ++; - continue; - } - if (rc == LDLM_FL_LOCAL_ONLY) { - /* CANCEL RPC should not be sent to server. */ - list_del_init(&lock->l_bl_ast); - LDLM_LOCK_PUT(lock); - count--; - } - - } - if (bl_ast > 0) { - count -= bl_ast; - ldlm_cli_cancel_list(&head, bl_ast, NULL, 0); - } - - RETURN(count); -} - -/* Return 1 to stop lru processing and keep current lock cached. Return zero - * otherwise. */ -static ldlm_policy_res_t ldlm_cancel_shrink_policy(struct ldlm_namespace *ns, - struct ldlm_lock *lock, - int unused, int added, - int count) -{ - int lock_cost; - __u64 page_nr; - - /* Stop lru processing when we reached passed @count or checked all - * locks in lru. */ - if (count && added >= count) - return LDLM_POLICY_KEEP_LOCK; - - if (lock->l_resource->lr_type == LDLM_EXTENT) { - struct ldlm_extent *l_extent; - - /* For all extent locks cost is 1 + number of pages in - * their extent. */ - l_extent = &lock->l_policy_data.l_extent; - page_nr = (l_extent->end - l_extent->start); - do_div(page_nr, CFS_PAGE_SIZE); - -#ifdef __KERNEL__ - /* XXX: In fact this is evil hack, we can't access inode - * here. For doing it right we need somehow to have number - * of covered by lock. This should be fixed later when 10718 - * is landed. */ - if (lock->l_ast_data != NULL) { - struct inode *inode = lock->l_ast_data; - if (page_nr > inode->i_mapping->nrpages) - page_nr = inode->i_mapping->nrpages; - } -#endif - lock_cost = 1 + page_nr; - } else { - /* For all locks which are not extent ones cost is 1 */ - lock_cost = 1; - } - - /* Keep all expensive locks in lru for the memory pressure time - * cancel policy. They anyways may be canceled by lru resize - * pplicy if they have not small enough CLV. */ - return lock_cost > ns->ns_shrink_thumb ? - LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK; -} - -/* Return 1 to stop lru processing and keep current lock cached. Return zero - * otherwise. */ -static ldlm_policy_res_t ldlm_cancel_lrur_policy(struct ldlm_namespace *ns, - struct ldlm_lock *lock, - int unused, int added, - int count) -{ - cfs_time_t cur = cfs_time_current(); - struct ldlm_pool *pl = &ns->ns_pool; - __u64 slv, lvf, lv; - cfs_time_t la; - - /* Stop lru processing when we reached passed @count or checked all - * locks in lru. */ - if (count && added >= count) - return LDLM_POLICY_KEEP_LOCK; - - spin_lock(&pl->pl_lock); - slv = ldlm_pool_get_slv(pl); - lvf = atomic_read(&pl->pl_lock_volume_factor); - spin_unlock(&pl->pl_lock); - - la = cfs_duration_sec(cfs_time_sub(cur, - lock->l_last_used)); - - /* Stop when slv is not yet come from server or - * lv is smaller than it is. */ - lv = lvf * la * unused; - return (slv == 1 || lv < slv) ? - LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK; -} - -/* Return 1 to stop lru processing and keep current lock cached. Return zero - * otherwise. */ -static ldlm_policy_res_t ldlm_cancel_passed_policy(struct ldlm_namespace *ns, - struct ldlm_lock *lock, - int unused, int added, - int count) -{ - /* Stop lru processing when we reached passed @count or checked all - * locks in lru. */ - return (added >= count) ? - LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK; -} - -/* Return 1 to stop lru processing and keep current lock cached. Return zero - * otherwise. */ -static ldlm_policy_res_t ldlm_cancel_aged_policy(struct ldlm_namespace *ns, - struct ldlm_lock *lock, - int unused, int added, - int count) -{ - /* Stop lru processing if young lock is found and we reached passed - * @count. */ - return ((added >= count) && - cfs_time_before(cfs_time_current(), - cfs_time_add(lock->l_last_used, - ns->ns_max_age))) ? - LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK; -} - -/* Return 1 to stop lru processing and keep current lock cached. Return zero - * otherwise. */ -static ldlm_policy_res_t ldlm_cancel_default_policy(struct ldlm_namespace *ns, - struct ldlm_lock *lock, - int unused, int added, - int count) -{ - /* Stop lru processing when we reached passed @count or checked all - * locks in lru. */ - return (added >= count) ? - LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK; -} - -typedef ldlm_policy_res_t (*ldlm_cancel_lru_policy_t)(struct ldlm_namespace *, - struct ldlm_lock *, int, - int, int); - -static ldlm_cancel_lru_policy_t -ldlm_cancel_lru_policy(struct ldlm_namespace *ns, int flags) -{ - if (ns_connect_lru_resize(ns)) { - if (flags & LDLM_CANCEL_SHRINK) - return ldlm_cancel_shrink_policy; - else if (flags & LDLM_CANCEL_LRUR) - return ldlm_cancel_lrur_policy; - else if (flags & LDLM_CANCEL_PASSED) - return ldlm_cancel_passed_policy; - } else { - if (flags & LDLM_CANCEL_AGED) - return ldlm_cancel_aged_policy; - } - - return ldlm_cancel_default_policy; -} - -/* - Free space in lru for @count new locks, - * redundant unused locks are canceled locally; - * - also cancel locally unused aged locks; - * - do not cancel more than @max locks; - * - GET the found locks and add them into the @cancels list. - * - * A client lock can be added to the l_bl_ast list only when it is - * marked LDLM_FL_CANCELING. Otherwise, somebody is already doing CANCEL. - * There are the following use cases: ldlm_cancel_resource_local(), - * ldlm_cancel_lru_local() and ldlm_cli_cancel(), which check&set this - * flag properly. As any attempt to cancel a lock rely on this flag, - * l_bl_ast list is accessed later without any special locking. - * - * Calling policies for enabled lru resize: - * ---------------------------------------- - * flags & LDLM_CANCEL_LRUR - use lru resize policy (SLV from server) to - * cancel not more than @count locks; - * - * flags & LDLM_CANCEL_PASSED - cancel @count number of old locks (located at - * the beginning of lru list); - * - * flags & LDLM_CANCEL_SHRINK - cancel not more than @count locks according to - * memory pressre policy function; - * - * flags & LDLM_CANCEL_AGED - cancel locks according to "aged policy". - */ -int ldlm_cancel_lru_local(struct ldlm_namespace *ns, struct list_head *cancels, - int count, int max, int cancel_flags, int flags) -{ - ldlm_cancel_lru_policy_t pf; - struct ldlm_lock *lock, *next; - int added = 0, unused; - ENTRY; - - spin_lock(&ns->ns_unused_lock); - unused = ns->ns_nr_unused; - - if (!ns_connect_lru_resize(ns)) - count += unused - ns->ns_max_unused; - - pf = ldlm_cancel_lru_policy(ns, flags); - LASSERT(pf != NULL); - - while (!list_empty(&ns->ns_unused_list)) { - /* For any flags, stop scanning if @max is reached. */ - if (max && added >= max) - break; - - list_for_each_entry_safe(lock, next, &ns->ns_unused_list, l_lru){ - /* No locks which got blocking requests. */ - LASSERT(!(lock->l_flags & LDLM_FL_BL_AST)); - - /* Somebody is already doing CANCEL. No need in this - * lock in lru, do not traverse it again. */ - if (!(lock->l_flags & LDLM_FL_CANCELING)) - break; - - ldlm_lock_remove_from_lru_nolock(lock); - } - if (&lock->l_lru == &ns->ns_unused_list) - break; - - /* Pass the lock through the policy filter and see if it - * should stay in lru. - * - * Even for shrinker policy we stop scanning if - * we find a lock that should stay in the cache. - * We should take into account lock age anyway - * as new lock even if it is small of weight is - * valuable resource. - * - * That is, for shrinker policy we drop only - * old locks, but additionally chose them by - * their weight. Big extent locks will stay in - * the cache. */ - if (pf(ns, lock, unused, added, count) == LDLM_POLICY_KEEP_LOCK) - break; - - LDLM_LOCK_GET(lock); /* dropped by bl thread */ - spin_unlock(&ns->ns_unused_lock); - - lock_res_and_lock(lock); - /* Check flags again under the lock. */ - if ((lock->l_flags & LDLM_FL_CANCELING) || - (ldlm_lock_remove_from_lru(lock) == 0)) { - /* other thread is removing lock from lru or - * somebody is already doing CANCEL or - * there is a blocking request which will send - * cancel by itseft or the lock is matched - * is already not unused. */ - unlock_res_and_lock(lock); - LDLM_LOCK_PUT(lock); - spin_lock(&ns->ns_unused_lock); - continue; - } - LASSERT(!lock->l_readers && !lock->l_writers); - - /* If we have chosen to cancel this lock voluntarily, we - * better send cancel notification to server, so that it - * frees appropriate state. This might lead to a race - * where while we are doing cancel here, server is also - * silently cancelling this lock. */ - lock->l_flags &= ~LDLM_FL_CANCEL_ON_BLOCK; - - /* Setting the CBPENDING flag is a little misleading, - * but prevents an important race; namely, once - * CBPENDING is set, the lock can accumulate no more - * readers/writers. Since readers and writers are - * already zero here, ldlm_lock_decref() won't see - * this flag and call l_blocking_ast */ - lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_CANCELING; - - /* We can't re-add to l_lru as it confuses the - * refcounting in ldlm_lock_remove_from_lru() if an AST - * arrives after we drop ns_lock below. We use l_bl_ast - * and can't use l_pending_chain as it is used both on - * server and client nevertheless bug 5666 says it is - * used only on server */ - LASSERT(list_empty(&lock->l_bl_ast)); - list_add(&lock->l_bl_ast, cancels); - unlock_res_and_lock(lock); - spin_lock(&ns->ns_unused_lock); - added++; - unused--; - } - spin_unlock(&ns->ns_unused_lock); - RETURN(ldlm_cancel_list(cancels, added, cancel_flags)); -} - -/* Returns number of locks which could be canceled next time when - * ldlm_cancel_lru() is called. Used from locks pool shrinker. */ -int ldlm_cancel_lru_estimate(struct ldlm_namespace *ns, - int count, int max, int flags) -{ - ldlm_cancel_lru_policy_t pf; - struct ldlm_lock *lock; - int added = 0, unused; - ENTRY; - - pf = ldlm_cancel_lru_policy(ns, flags); - LASSERT(pf != NULL); - spin_lock(&ns->ns_unused_lock); - unused = ns->ns_nr_unused; - - list_for_each_entry(lock, &ns->ns_unused_list, l_lru) { - /* For any flags, stop scanning if @max is reached. */ - if (max && added >= max) - break; - - /* Somebody is already doing CANCEL or there is a - * blocking request will send cancel. Let's not count - * this lock. */ - if ((lock->l_flags & LDLM_FL_CANCELING) || - (lock->l_flags & LDLM_FL_BL_AST)) - continue; - - /* Pass the lock through the policy filter and see if it - * should stay in lru. */ - if (pf(ns, lock, unused, added, count) == LDLM_POLICY_KEEP_LOCK) - break; - - added++; - unused--; - } - spin_unlock(&ns->ns_unused_lock); - RETURN(added); -} - -/* when called with LDLM_ASYNC the blocking callback will be handled - * in a thread and this function will return after the thread has been - * asked to call the callback. when called with LDLM_SYNC the blocking - * callback will be performed in this function. */ -int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, ldlm_sync_t sync, - int flags) -{ - CFS_LIST_HEAD(cancels); - int count, rc; - ENTRY; - -#ifndef __KERNEL__ - sync = LDLM_SYNC; /* force to be sync in user space */ -#endif - count = ldlm_cancel_lru_local(ns, &cancels, nr, 0, 0, flags); - if (sync == LDLM_ASYNC) { - rc = ldlm_bl_to_thread_list(ns, NULL, &cancels, count); - if (rc == 0) - RETURN(count); - } - - /* If an error occured in ASYNC mode, or - * this is SYNC mode, cancel the list. */ - ldlm_cli_cancel_list(&cancels, count, NULL, 0); - RETURN(count); -} - -/* Find and cancel locally unused locks found on resource, matched to the - * given policy, mode. GET the found locks and add them into the @cancels - * list. */ -int ldlm_cancel_resource_local(struct ldlm_resource *res, - struct list_head *cancels, - ldlm_policy_data_t *policy, - ldlm_mode_t mode, int lock_flags, - int cancel_flags, void *opaque) -{ - struct ldlm_lock *lock; - int count = 0; - ENTRY; - - lock_res(res); - list_for_each_entry(lock, &res->lr_granted, l_res_link) { - if (opaque != NULL && lock->l_ast_data != opaque) { - LDLM_ERROR(lock, "data %p doesn't match opaque %p", - lock->l_ast_data, opaque); - //LBUG(); - continue; - } - - if (lock->l_readers || lock->l_writers) { - if (cancel_flags & LDLM_FL_WARN) { - LDLM_ERROR(lock, "lock in use"); - //LBUG(); - } - continue; - } - - /* If somebody is already doing CANCEL, or blocking ast came, - * skip this lock. */ - if (lock->l_flags & LDLM_FL_BL_AST || - lock->l_flags & LDLM_FL_CANCELING) - continue; - - if (lockmode_compat(lock->l_granted_mode, mode)) - continue; - - /* If policy is given and this is IBITS lock, add to list only - * those locks that match by policy. */ - if (policy && (lock->l_resource->lr_type == LDLM_IBITS) && - !(lock->l_policy_data.l_inodebits.bits & - policy->l_inodebits.bits)) - continue; - - /* See CBPENDING comment in ldlm_cancel_lru */ - lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_CANCELING | - lock_flags; - - LASSERT(list_empty(&lock->l_bl_ast)); - list_add(&lock->l_bl_ast, cancels); - LDLM_LOCK_GET(lock); - count++; - } - unlock_res(res); - - /* Handle only @count inserted locks. */ - RETURN(ldlm_cancel_list(cancels, count, cancel_flags)); -} - -/* If @req is NULL, send CANCEL request to server with handles of locks - * in the @cancels. If EARLY_CANCEL is not supported, send CANCEL requests - * separately per lock. - * If @req is not NULL, put handles of locks in @cancels into the request - * buffer at the offset @off. - * Destroy @cancels at the end. */ -int ldlm_cli_cancel_list(struct list_head *cancels, int count, - struct ptlrpc_request *req, int off) -{ - struct ldlm_lock *lock; - int res = 0; - ENTRY; - - if (list_empty(cancels) || count == 0) - RETURN(0); - - while (count) { - LASSERT(!list_empty(cancels)); - lock = list_entry(cancels->next, struct ldlm_lock, l_bl_ast); - LASSERT(lock->l_conn_export); - - if (exp_connect_cancelset(lock->l_conn_export)) { - res = count; - if (req) - ldlm_cancel_pack(req, off, cancels, count); - else - res = ldlm_cli_cancel_req(lock->l_conn_export, - cancels, count); - } else { - res = ldlm_cli_cancel_req(lock->l_conn_export, - cancels, 1); - } - - if (res < 0) { - CERROR("ldlm_cli_cancel_list: %d\n", res); - res = count; - } - - count -= res; - ldlm_lock_list_put(cancels, l_bl_ast, res); - } - RETURN(0); -} - -static int ldlm_cli_cancel_unused_resource(struct ldlm_namespace *ns, - struct ldlm_res_id res_id, - int flags, void *opaque) -{ - struct ldlm_resource *res; - CFS_LIST_HEAD(cancels); - int count; - int rc; - ENTRY; - - res = ldlm_resource_get(ns, NULL, res_id, 0, 0); - if (res == NULL) { - /* This is not a problem. */ - CDEBUG(D_INFO, "No resource "LPU64"\n", res_id.name[0]); - RETURN(0); - } - - count = ldlm_cancel_resource_local(res, &cancels, NULL, LCK_MINMODE, - 0, flags, opaque); - rc = ldlm_cli_cancel_list(&cancels, count, NULL, 0); - if (rc != ELDLM_OK) - CERROR("ldlm_cli_cancel_unused_resource: %d\n", rc); - - ldlm_resource_putref(res); - RETURN(0); -} - -static inline int have_no_nsresource(struct ldlm_namespace *ns) -{ - int no_resource = 0; - - spin_lock(&ns->ns_hash_lock); - if (ns->ns_resources == 0) - no_resource = 1; - spin_unlock(&ns->ns_hash_lock); - - RETURN(no_resource); -} - -/* Cancel all locks on a namespace (or a specific resource, if given) - * that have 0 readers/writers. - * - * If flags & LDLM_FL_LOCAL_ONLY, throw the locks away without trying - * to notify the server. */ -int ldlm_cli_cancel_unused(struct ldlm_namespace *ns, - struct ldlm_res_id *res_id, int flags, void *opaque) -{ - int i; - ENTRY; - - if (ns == NULL) - RETURN(ELDLM_OK); - - if (res_id) - RETURN(ldlm_cli_cancel_unused_resource(ns, *res_id, flags, - opaque)); - - spin_lock(&ns->ns_hash_lock); - for (i = 0; i < RES_HASH_SIZE; i++) { - struct list_head *tmp; - tmp = ns->ns_hash[i].next; - while (tmp != &(ns->ns_hash[i])) { - struct ldlm_resource *res; - int rc; - - res = list_entry(tmp, struct ldlm_resource, lr_hash); - ldlm_resource_getref(res); - spin_unlock(&ns->ns_hash_lock); - - rc = ldlm_cli_cancel_unused_resource(ns, res->lr_name, - flags, opaque); - - if (rc) - CERROR("ldlm_cli_cancel_unused ("LPU64"): %d\n", - res->lr_name.name[0], rc); - - spin_lock(&ns->ns_hash_lock); - tmp = tmp->next; - ldlm_resource_putref_locked(res); - } - } - spin_unlock(&ns->ns_hash_lock); - - RETURN(ELDLM_OK); -} - -/* join/split resource locks to/from lru list */ -int ldlm_cli_join_lru(struct ldlm_namespace *ns, - struct ldlm_res_id *res_id, int join) -{ - struct ldlm_resource *res; - struct ldlm_lock *lock, *n; - int count = 0; - ENTRY; - - LASSERT(ns_is_client(ns)); - - res = ldlm_resource_get(ns, NULL, *res_id, LDLM_EXTENT, 0); - if (res == NULL) - RETURN(count); - LASSERT(res->lr_type == LDLM_EXTENT); - - lock_res(res); - if (!join) - goto split; - - list_for_each_entry_safe (lock, n, &res->lr_granted, l_res_link) { - if (list_empty(&lock->l_lru) && - !lock->l_readers && !lock->l_writers && - !(lock->l_flags & LDLM_FL_LOCAL) && - !(lock->l_flags & LDLM_FL_CBPENDING) && - !(lock->l_flags & LDLM_FL_BL_AST)) { - ldlm_lock_add_to_lru(lock); - lock->l_flags &= ~LDLM_FL_NO_LRU; - LDLM_DEBUG(lock, "join lock to lru"); - count++; - } - } - goto unlock; -split: - spin_lock(&ns->ns_unused_lock); - list_for_each_entry_safe (lock, n, &ns->ns_unused_list, l_lru) { - if (lock->l_resource == res) { - ldlm_lock_remove_from_lru_nolock(lock); - lock->l_flags |= LDLM_FL_NO_LRU; - LDLM_DEBUG(lock, "split lock from lru"); - count++; - } - } - spin_unlock(&ns->ns_unused_lock); -unlock: - unlock_res(res); - ldlm_resource_putref(res); - RETURN(count); -} - -/* Lock iterators. */ - -int ldlm_resource_foreach(struct ldlm_resource *res, ldlm_iterator_t iter, - void *closure) -{ - struct list_head *tmp, *next; - struct ldlm_lock *lock; - int rc = LDLM_ITER_CONTINUE; - - ENTRY; - - if (!res) - RETURN(LDLM_ITER_CONTINUE); - - lock_res(res); - list_for_each_safe(tmp, next, &res->lr_granted) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (iter(lock, closure) == LDLM_ITER_STOP) - GOTO(out, rc = LDLM_ITER_STOP); - } - - list_for_each_safe(tmp, next, &res->lr_converting) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (iter(lock, closure) == LDLM_ITER_STOP) - GOTO(out, rc = LDLM_ITER_STOP); - } - - list_for_each_safe(tmp, next, &res->lr_waiting) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - - if (iter(lock, closure) == LDLM_ITER_STOP) - GOTO(out, rc = LDLM_ITER_STOP); - } - out: - unlock_res(res); - RETURN(rc); -} - -struct iter_helper_data { - ldlm_iterator_t iter; - void *closure; -}; - -static int ldlm_iter_helper(struct ldlm_lock *lock, void *closure) -{ - struct iter_helper_data *helper = closure; - return helper->iter(lock, helper->closure); -} - -static int ldlm_res_iter_helper(struct ldlm_resource *res, void *closure) -{ - return ldlm_resource_foreach(res, ldlm_iter_helper, closure); -} - -int ldlm_namespace_foreach(struct ldlm_namespace *ns, ldlm_iterator_t iter, - void *closure) -{ - struct iter_helper_data helper = { iter: iter, closure: closure }; - return ldlm_namespace_foreach_res(ns, ldlm_res_iter_helper, &helper); -} - -int ldlm_namespace_foreach_res(struct ldlm_namespace *ns, - ldlm_res_iterator_t iter, void *closure) -{ - int i, rc = LDLM_ITER_CONTINUE; - struct ldlm_resource *res; - struct list_head *tmp; - - ENTRY; - spin_lock(&ns->ns_hash_lock); - for (i = 0; i < RES_HASH_SIZE; i++) { - tmp = ns->ns_hash[i].next; - while (tmp != &(ns->ns_hash[i])) { - res = list_entry(tmp, struct ldlm_resource, lr_hash); - ldlm_resource_getref(res); - spin_unlock(&ns->ns_hash_lock); - - rc = iter(res, closure); - - spin_lock(&ns->ns_hash_lock); - tmp = tmp->next; - ldlm_resource_putref_locked(res); - if (rc == LDLM_ITER_STOP) - GOTO(out, rc); - } - } - out: - spin_unlock(&ns->ns_hash_lock); - RETURN(rc); -} - -/* non-blocking function to manipulate a lock whose cb_data is being put away.*/ -void ldlm_resource_iterate(struct ldlm_namespace *ns, struct ldlm_res_id *res_id, - ldlm_iterator_t iter, void *data) -{ - struct ldlm_resource *res; - ENTRY; - - if (ns == NULL) { - CERROR("must pass in namespace\n"); - LBUG(); - } - - res = ldlm_resource_get(ns, NULL, *res_id, 0, 0); - if (res == NULL) { - EXIT; - return; - } - - ldlm_resource_foreach(res, iter, data); - ldlm_resource_putref(res); - EXIT; -} - -/* Lock replay */ - -static int ldlm_chain_lock_for_replay(struct ldlm_lock *lock, void *closure) -{ - struct list_head *list = closure; - - /* we use l_pending_chain here, because it's unused on clients. */ - LASSERTF(list_empty(&lock->l_pending_chain),"lock %p next %p prev %p\n", - lock, &lock->l_pending_chain.next,&lock->l_pending_chain.prev); - /* bug 9573: don't replay locks left after eviction */ - if (!(lock->l_flags & LDLM_FL_FAILED)) - list_add(&lock->l_pending_chain, list); - return LDLM_ITER_CONTINUE; -} - -static int replay_lock_interpret(struct ptlrpc_request *req, - struct ldlm_async_args *aa, int rc) -{ - struct ldlm_lock *lock; - struct ldlm_reply *reply; - - ENTRY; - atomic_dec(&req->rq_import->imp_replay_inflight); - if (rc != ELDLM_OK) - GOTO(out, rc); - - - reply = lustre_swab_repbuf(req, DLM_LOCKREPLY_OFF, sizeof(*reply), - lustre_swab_ldlm_reply); - if (reply == NULL) { - CERROR("Can't unpack ldlm_reply\n"); - GOTO (out, rc = -EPROTO); - } - - lock = ldlm_handle2lock(&aa->lock_handle); - if (!lock) { - CERROR("received replay ack for unknown local cookie "LPX64 - " remote cookie "LPX64 " from server %s id %s\n", - aa->lock_handle.cookie, reply->lock_handle.cookie, - req->rq_export->exp_client_uuid.uuid, - libcfs_id2str(req->rq_peer)); - GOTO(out, rc = -ESTALE); - } - - lock->l_remote_handle = reply->lock_handle; - LDLM_DEBUG(lock, "replayed lock:"); - ptlrpc_import_recovery_state_machine(req->rq_import); - LDLM_LOCK_PUT(lock); -out: - if (rc != ELDLM_OK) - ptlrpc_connect_import(req->rq_import, NULL); - - - RETURN(rc); -} - -static int replay_one_lock(struct obd_import *imp, struct ldlm_lock *lock) -{ - struct ptlrpc_request *req; - struct ldlm_request *body; - struct ldlm_reply *reply; - struct ldlm_async_args *aa; - int buffers = 2; - int size[3] = { sizeof(struct ptlrpc_body) }; - int flags; - ENTRY; - - - /* Bug 11974: Do not replay a lock which is actively being canceled */ - if (lock->l_flags & LDLM_FL_CANCELING) { - LDLM_DEBUG(lock, "Not replaying canceled lock:"); - RETURN(0); - } - - /* If this is reply-less callback lock, we cannot replay it, since - * server might have long dropped it, but notification of that event was - * lost by network. (and server granted conflicting lock already) */ - if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK) { - LDLM_DEBUG(lock, "Not replaying reply-less lock:"); - ldlm_lock_cancel(lock); - RETURN(0); - } - /* - * If granted mode matches the requested mode, this lock is granted. - * - * If they differ, but we have a granted mode, then we were granted - * one mode and now want another: ergo, converting. - * - * If we haven't been granted anything and are on a resource list, - * then we're blocked/waiting. - * - * If we haven't been granted anything and we're NOT on a resource list, - * then we haven't got a reply yet and don't have a known disposition. - * This happens whenever a lock enqueue is the request that triggers - * recovery. - */ - if (lock->l_granted_mode == lock->l_req_mode) - flags = LDLM_FL_REPLAY | LDLM_FL_BLOCK_GRANTED; - else if (lock->l_granted_mode) - flags = LDLM_FL_REPLAY | LDLM_FL_BLOCK_CONV; - else if (!list_empty(&lock->l_res_link)) - flags = LDLM_FL_REPLAY | LDLM_FL_BLOCK_WAIT; - else - flags = LDLM_FL_REPLAY; - - size[DLM_LOCKREQ_OFF] = sizeof(*body); - req = ptlrpc_prep_req(imp, LUSTRE_DLM_VERSION, LDLM_ENQUEUE, 2, size, - NULL); - if (!req) - RETURN(-ENOMEM); - - /* We're part of recovery, so don't wait for it. */ - req->rq_send_state = LUSTRE_IMP_REPLAY_LOCKS; - - body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body)); - ldlm_lock2desc(lock, &body->lock_desc); - body->lock_flags = flags; - - ldlm_lock2handle(lock, &body->lock_handle[0]); - size[DLM_LOCKREPLY_OFF] = sizeof(*reply); - if (lock->l_lvb_len != 0) { - buffers = 3; - size[DLM_REPLY_REC_OFF] = lock->l_lvb_len; - } - ptlrpc_req_set_repsize(req, buffers, size); - - LDLM_DEBUG(lock, "replaying lock:"); - - atomic_inc(&req->rq_import->imp_replay_inflight); - CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args)); - aa = (struct ldlm_async_args *)&req->rq_async_args; - aa->lock_handle = body->lock_handle[0]; - req->rq_interpret_reply = replay_lock_interpret; - ptlrpcd_add_req(req); - - RETURN(0); -} - -int ldlm_replay_locks(struct obd_import *imp) -{ - struct ldlm_namespace *ns = imp->imp_obd->obd_namespace; - struct list_head list; - struct ldlm_lock *lock, *next; - int rc = 0; - - ENTRY; - CFS_INIT_LIST_HEAD(&list); - - LASSERT(atomic_read(&imp->imp_replay_inflight) == 0); - - /* ensure this doesn't fall to 0 before all have been queued */ - atomic_inc(&imp->imp_replay_inflight); - - (void)ldlm_namespace_foreach(ns, ldlm_chain_lock_for_replay, &list); - - list_for_each_entry_safe(lock, next, &list, l_pending_chain) { - list_del_init(&lock->l_pending_chain); - if (rc) - continue; /* or try to do the rest? */ - rc = replay_one_lock(imp, lock); - } - - atomic_dec(&imp->imp_replay_inflight); - - RETURN(rc); -} diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c deleted file mode 100644 index df5bc2cbd4..0000000000 --- a/lustre/ldlm/ldlm_resource.c +++ /dev/null @@ -1,1061 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * Author: Phil Schwan <phil@clusterfs.com> - * Author: Peter Braam <braam@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_LDLM -#ifdef __KERNEL__ -# include <lustre_dlm.h> -#else -# include <liblustre.h> -#endif - -#include <obd_class.h> -#include "ldlm_internal.h" - -cfs_mem_cache_t *ldlm_resource_slab, *ldlm_lock_slab; - -atomic_t ldlm_srv_namespace_nr = ATOMIC_INIT(0); -atomic_t ldlm_cli_namespace_nr = ATOMIC_INIT(0); - -struct semaphore ldlm_srv_namespace_lock; -struct list_head ldlm_srv_namespace_list = - CFS_LIST_HEAD_INIT(ldlm_srv_namespace_list); - -struct semaphore ldlm_cli_namespace_lock; -struct list_head ldlm_cli_namespace_list = - CFS_LIST_HEAD_INIT(ldlm_cli_namespace_list); - -cfs_proc_dir_entry_t *ldlm_type_proc_dir = NULL; -cfs_proc_dir_entry_t *ldlm_ns_proc_dir = NULL; -cfs_proc_dir_entry_t *ldlm_svc_proc_dir = NULL; - -#ifdef LPROCFS -static int ldlm_proc_dump_ns(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - ldlm_dump_all_namespaces(LDLM_NAMESPACE_SERVER, D_DLMTRACE); - ldlm_dump_all_namespaces(LDLM_NAMESPACE_CLIENT, D_DLMTRACE); - RETURN(count); -} - -int ldlm_proc_setup(void) -{ - int rc; - struct lprocfs_vars list[] = { - { "dump_namespaces", NULL, ldlm_proc_dump_ns, NULL }, - { NULL }}; - ENTRY; - LASSERT(ldlm_ns_proc_dir == NULL); - - ldlm_type_proc_dir = lprocfs_register(OBD_LDLM_DEVICENAME, - proc_lustre_root, - NULL, NULL); - if (IS_ERR(ldlm_type_proc_dir)) { - CERROR("LProcFS failed in ldlm-init\n"); - rc = PTR_ERR(ldlm_type_proc_dir); - GOTO(err, rc); - } - - ldlm_ns_proc_dir = lprocfs_register("namespaces", - ldlm_type_proc_dir, - NULL, NULL); - if (IS_ERR(ldlm_ns_proc_dir)) { - CERROR("LProcFS failed in ldlm-init\n"); - rc = PTR_ERR(ldlm_ns_proc_dir); - GOTO(err_type, rc); - } - - ldlm_svc_proc_dir = lprocfs_register("services", - ldlm_type_proc_dir, - NULL, NULL); - if (IS_ERR(ldlm_svc_proc_dir)) { - CERROR("LProcFS failed in ldlm-init\n"); - rc = PTR_ERR(ldlm_svc_proc_dir); - GOTO(err_ns, rc); - } - - rc = lprocfs_add_vars(ldlm_type_proc_dir, list, NULL); - - RETURN(0); - -err_ns: - lprocfs_remove(&ldlm_ns_proc_dir); -err_type: - lprocfs_remove(&ldlm_type_proc_dir); -err: - ldlm_svc_proc_dir = NULL; - RETURN(rc); -} - -void ldlm_proc_cleanup(void) -{ - if (ldlm_svc_proc_dir) - lprocfs_remove(&ldlm_svc_proc_dir); - - if (ldlm_ns_proc_dir) - lprocfs_remove(&ldlm_ns_proc_dir); - - if (ldlm_type_proc_dir) - lprocfs_remove(&ldlm_type_proc_dir); -} - -static int lprocfs_rd_lru_size(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct ldlm_namespace *ns = data; - __u32 *nr = &ns->ns_max_unused; - - if (ns_connect_lru_resize(ns)) - nr = &ns->ns_nr_unused; - return lprocfs_rd_uint(page, start, off, count, eof, nr); -} - -static int lprocfs_wr_lru_size(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct ldlm_namespace *ns = data; - char dummy[MAX_STRING_SIZE + 1], *end; - unsigned long tmp; - int lru_resize; - - dummy[MAX_STRING_SIZE] = '\0'; - if (copy_from_user(dummy, buffer, MAX_STRING_SIZE)) - return -EFAULT; - - if (count == 6 && memcmp(dummy, "clear", 5) == 0) { - CDEBUG(D_DLMTRACE, - "dropping all unused locks from namespace %s\n", - ns->ns_name); - if (ns_connect_lru_resize(ns)) { - int canceled, unused = ns->ns_nr_unused; - - /* Try to cancel all @ns_nr_unused locks. */ - canceled = ldlm_cancel_lru(ns, unused, LDLM_SYNC, - LDLM_CANCEL_PASSED); - if (canceled < unused) { - CERROR("not all requested locks are canceled, " - "requested: %d, canceled: %d\n", unused, - canceled); - return -EINVAL; - } - } else { - tmp = ns->ns_max_unused; - ns->ns_max_unused = 0; - ldlm_cancel_lru(ns, 0, LDLM_SYNC, LDLM_CANCEL_PASSED); - ns->ns_max_unused = tmp; - } - return count; - } - - tmp = simple_strtoul(dummy, &end, 0); - if (dummy == end) { - CERROR("invalid value written\n"); - return -EINVAL; - } - lru_resize = (tmp == 0); - - if (ns_connect_lru_resize(ns)) { - if (!lru_resize) - ns->ns_max_unused = (unsigned int)tmp; - - if (tmp > ns->ns_nr_unused) - tmp = ns->ns_nr_unused; - tmp = ns->ns_nr_unused - tmp; - - CDEBUG(D_DLMTRACE, "changing namespace %s unused locks from %u to %u\n", - ns->ns_name, ns->ns_nr_unused, (unsigned int)tmp); - ldlm_cancel_lru(ns, (unsigned int)tmp, LDLM_ASYNC, LDLM_CANCEL_PASSED); - - if (!lru_resize) { - CDEBUG(D_DLMTRACE, "disable lru_resize for namespace %s\n", - ns->ns_name); - ns->ns_connect_flags &= ~OBD_CONNECT_LRU_RESIZE; - } - } else { - CDEBUG(D_DLMTRACE, "changing namespace %s max_unused from %u to %u\n", - ns->ns_name, ns->ns_max_unused, (unsigned int)tmp); - ns->ns_max_unused = (unsigned int)tmp; - ldlm_cancel_lru(ns, 0, LDLM_ASYNC, LDLM_CANCEL_PASSED); - - /* Make sure that originally lru resize was supported before - * turning it on here. */ - if (lru_resize && - (ns->ns_orig_connect_flags & OBD_CONNECT_LRU_RESIZE)) { - CDEBUG(D_DLMTRACE, "enable lru_resize for namespace %s\n", - ns->ns_name); - ns->ns_connect_flags |= OBD_CONNECT_LRU_RESIZE; - } - } - return count; -} - -void ldlm_proc_namespace(struct ldlm_namespace *ns) -{ - struct lprocfs_vars lock_vars[2]; - char lock_name[MAX_STRING_SIZE + 1]; - - LASSERT(ns != NULL); - LASSERT(ns->ns_name != NULL); - - lock_name[MAX_STRING_SIZE] = '\0'; - - memset(lock_vars, 0, sizeof(lock_vars)); - lock_vars[0].name = lock_name; - - snprintf(lock_name, MAX_STRING_SIZE, "%s/resource_count", ns->ns_name); - lock_vars[0].data = &ns->ns_refcount; - lock_vars[0].read_fptr = lprocfs_rd_atomic; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - - snprintf(lock_name, MAX_STRING_SIZE, "%s/lock_count", ns->ns_name); - lock_vars[0].data = &ns->ns_locks; - lock_vars[0].read_fptr = lprocfs_rd_atomic; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - - if (ns_is_client(ns)) { - snprintf(lock_name, MAX_STRING_SIZE, "%s/lock_unused_count", - ns->ns_name); - lock_vars[0].data = &ns->ns_nr_unused; - lock_vars[0].read_fptr = lprocfs_rd_uint; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - - snprintf(lock_name, MAX_STRING_SIZE, "%s/lru_size", - ns->ns_name); - lock_vars[0].data = ns; - lock_vars[0].read_fptr = lprocfs_rd_lru_size; - lock_vars[0].write_fptr = lprocfs_wr_lru_size; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - - snprintf(lock_name, MAX_STRING_SIZE, "%s/shrink_thumb", - ns->ns_name); - lock_vars[0].data = ns; - lock_vars[0].read_fptr = lprocfs_rd_uint; - lock_vars[0].write_fptr = lprocfs_wr_uint; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - - snprintf(lock_name, MAX_STRING_SIZE, "%s/lru_max_age", - ns->ns_name); - lock_vars[0].data = &ns->ns_max_age; - lock_vars[0].read_fptr = lprocfs_rd_uint; - lock_vars[0].write_fptr = lprocfs_wr_uint; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - } else { - snprintf(lock_name, MAX_STRING_SIZE, "%s/max_nolock_bytes", - ns->ns_name); - lock_vars[0].data = &ns->ns_max_nolock_size; - lock_vars[0].read_fptr = lprocfs_rd_uint; - lock_vars[0].write_fptr = lprocfs_wr_uint; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - - snprintf(lock_name, MAX_STRING_SIZE, "%s/contention_seconds", - ns->ns_name); - lock_vars[0].data = &ns->ns_contention_time; - lock_vars[0].read_fptr = lprocfs_rd_uint; - lock_vars[0].write_fptr = lprocfs_wr_uint; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - - snprintf(lock_name, MAX_STRING_SIZE, "%s/contended_locks", - ns->ns_name); - lock_vars[0].data = &ns->ns_contended_locks; - lock_vars[0].read_fptr = lprocfs_rd_uint; - lock_vars[0].write_fptr = lprocfs_wr_uint; - lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0); - } -} -#undef MAX_STRING_SIZE -#else -#define ldlm_proc_namespace(ns) do {} while (0) -#endif /* LPROCFS */ - -struct ldlm_namespace *ldlm_namespace_new(char *name, ldlm_side_t client, - ldlm_appetite_t apt) -{ - struct ldlm_namespace *ns = NULL; - struct list_head *bucket; - int rc, idx, namelen; - ENTRY; - - rc = ldlm_get_ref(); - if (rc) { - CERROR("ldlm_get_ref failed: %d\n", rc); - RETURN(NULL); - } - - OBD_ALLOC_PTR(ns); - if (!ns) - GOTO(out_ref, NULL); - - OBD_VMALLOC(ns->ns_hash, sizeof(*ns->ns_hash) * RES_HASH_SIZE); - if (!ns->ns_hash) - GOTO(out_ns, NULL); - - namelen = strlen(name); - OBD_ALLOC(ns->ns_name, namelen + 1); - if (!ns->ns_name) - GOTO(out_hash, NULL); - - ns->ns_shrink_thumb = LDLM_LOCK_SHRINK_THUMB; - ns->ns_appetite = apt; - strcpy(ns->ns_name, name); - - CFS_INIT_LIST_HEAD(&ns->ns_root_list); - ns->ns_refcount = 0; - ns->ns_client = client; - spin_lock_init(&ns->ns_hash_lock); - atomic_set(&ns->ns_locks, 0); - ns->ns_resources = 0; - cfs_waitq_init(&ns->ns_waitq); - ns->ns_max_nolock_size = NS_DEFAULT_MAX_NOLOCK_BYTES; - ns->ns_contention_time = NS_DEFAULT_CONTENTION_SECONDS; - ns->ns_contended_locks = NS_DEFAULT_CONTENDED_LOCKS; - - for (bucket = ns->ns_hash + RES_HASH_SIZE - 1; bucket >= ns->ns_hash; - bucket--) - CFS_INIT_LIST_HEAD(bucket); - - CFS_INIT_LIST_HEAD(&ns->ns_unused_list); - ns->ns_nr_unused = 0; - ns->ns_max_unused = LDLM_DEFAULT_LRU_SIZE; - ns->ns_max_age = LDLM_DEFAULT_MAX_ALIVE; - spin_lock_init(&ns->ns_unused_lock); - ns->ns_orig_connect_flags = 0; - ns->ns_connect_flags = 0; - - ldlm_proc_namespace(ns); - - idx = atomic_read(ldlm_namespace_nr(client)); - - rc = ldlm_pool_init(&ns->ns_pool, ns, idx, client); - if (rc) { - CERROR("Can't initialize lock pool, rc %d\n", rc); - GOTO(out_proc, rc); - } - - at_init(&ns->ns_at_estimate, ldlm_enqueue_min, 0); - - mutex_down(ldlm_namespace_lock(client)); - list_add(&ns->ns_list_chain, ldlm_namespace_list(client)); - atomic_inc(ldlm_namespace_nr(client)); - mutex_up(ldlm_namespace_lock(client)); - - RETURN(ns); -out_proc: - ldlm_namespace_cleanup(ns, 0); - OBD_FREE(ns->ns_name, namelen + 1); -out_hash: - OBD_VFREE(ns->ns_hash, sizeof(*ns->ns_hash) * RES_HASH_SIZE); -out_ns: - OBD_FREE_PTR(ns); -out_ref: - ldlm_put_ref(0); - RETURN(NULL); -} - -extern struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock); - -/* If flags contains FL_LOCAL_ONLY, don't try to tell the server, just cleanup. - * This is currently only used for recovery, and we make certain assumptions - * as a result--notably, that we shouldn't cancel locks with refs. -phil - * - * Called with the ns_lock held. */ -static void cleanup_resource(struct ldlm_resource *res, struct list_head *q, - int flags) -{ - struct list_head *tmp; - int rc = 0, client = ns_is_client(res->lr_namespace); - int local_only = (flags & LDLM_FL_LOCAL_ONLY); - ENTRY; - - - do { - struct ldlm_lock *lock = NULL; - - /* first, we look for non-cleaned-yet lock - * all cleaned locks are marked by CLEANED flag */ - lock_res(res); - list_for_each(tmp, q) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - if (lock->l_flags & LDLM_FL_CLEANED) { - lock = NULL; - continue; - } - LDLM_LOCK_GET(lock); - lock->l_flags |= LDLM_FL_CLEANED; - break; - } - - if (lock == NULL) { - unlock_res(res); - break; - } - - /* Set CBPENDING so nothing in the cancellation path - * can match this lock */ - lock->l_flags |= LDLM_FL_CBPENDING; - lock->l_flags |= LDLM_FL_FAILED; - lock->l_flags |= flags; - - /* ... without sending a CANCEL message for local_only. */ - if (local_only) - lock->l_flags |= LDLM_FL_LOCAL_ONLY; - - if (local_only && (lock->l_readers || lock->l_writers)) { - /* This is a little bit gross, but much better than the - * alternative: pretend that we got a blocking AST from - * the server, so that when the lock is decref'd, it - * will go away ... */ - unlock_res(res); - LDLM_DEBUG(lock, "setting FL_LOCAL_ONLY"); - if (lock->l_completion_ast) - lock->l_completion_ast(lock, 0, NULL); - LDLM_LOCK_PUT(lock); - continue; - } - - if (client) { - struct lustre_handle lockh; - - unlock_res(res); - ldlm_lock2handle(lock, &lockh); - rc = ldlm_cli_cancel(&lockh); - if (rc) - CERROR("ldlm_cli_cancel: %d\n", rc); - } else { - ldlm_resource_unlink_lock(lock); - unlock_res(res); - LDLM_DEBUG(lock, "Freeing a lock still held by a " - "client node"); - ldlm_lock_destroy(lock); - } - LDLM_LOCK_PUT(lock); - } while (1); - - EXIT; -} - -int ldlm_namespace_cleanup(struct ldlm_namespace *ns, int flags) -{ - struct list_head *tmp; - int i; - - if (ns == NULL) { - CDEBUG(D_INFO, "NULL ns, skipping cleanup\n"); - return ELDLM_OK; - } - - for (i = 0; i < RES_HASH_SIZE; i++) { - spin_lock(&ns->ns_hash_lock); - tmp = ns->ns_hash[i].next; - while (tmp != &(ns->ns_hash[i])) { - struct ldlm_resource *res; - res = list_entry(tmp, struct ldlm_resource, lr_hash); - ldlm_resource_getref(res); - spin_unlock(&ns->ns_hash_lock); - - cleanup_resource(res, &res->lr_granted, flags); - cleanup_resource(res, &res->lr_converting, flags); - cleanup_resource(res, &res->lr_waiting, flags); - - spin_lock(&ns->ns_hash_lock); - tmp = tmp->next; - - /* XXX: former stuff caused issues in case of race - * between ldlm_namespace_cleanup() and lockd() when - * client gets blocking ast when lock gets distracted by - * server. This is 1_4 branch solution, let's see how - * will it behave. */ - if (!ldlm_resource_putref_locked(res)) - CDEBUG(D_INFO, - "Namespace %s resource refcount nonzero " - "(%d) after lock cleanup; forcing cleanup.\n", - ns->ns_name, atomic_read(&res->lr_refcount)); - } - spin_unlock(&ns->ns_hash_lock); - } - - return ELDLM_OK; -} - -int ldlm_namespace_free_prior(struct ldlm_namespace *ns) -{ - ENTRY; - if (!ns) - RETURN(ELDLM_OK); - - mutex_down(ldlm_namespace_lock(ns->ns_client)); - /* - * Some asserts and possibly other parts of code still using - * list_empty(&ns->ns_list_chain). This is why it is important - * to use list_del_init() here. - */ - list_del_init(&ns->ns_list_chain); - atomic_dec(ldlm_namespace_nr(ns->ns_client)); - ldlm_pool_fini(&ns->ns_pool); - mutex_up(ldlm_namespace_lock(ns->ns_client)); - - /* At shutdown time, don't call the cancellation callback */ - ldlm_namespace_cleanup(ns, 0); - - if (ns->ns_refcount > 0) { - struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL); - int rc; - CDEBUG(D_DLMTRACE, - "dlm namespace %s free waiting on refcount %d\n", - ns->ns_name, ns->ns_refcount); - rc = l_wait_event(ns->ns_waitq, - ns->ns_refcount == 0, &lwi); - if (ns->ns_refcount) - LCONSOLE_ERROR_MSG(0x139, "Lock manager: wait for %s " - "namespace cleanup aborted with %d " - "resources in use. (%d)\nI'm going " - "to try to clean up anyway, but I " - "might need a reboot of this node.\n", - ns->ns_name, (int) ns->ns_refcount, - rc); - CDEBUG(D_DLMTRACE, - "dlm namespace %s free done waiting\n", ns->ns_name); - } - - RETURN(ELDLM_OK); -} - -int ldlm_namespace_free_post(struct ldlm_namespace *ns, int force) -{ - ENTRY; - if (!ns) - RETURN(ELDLM_OK); - -#ifdef LPROCFS - { - struct proc_dir_entry *dir; - dir = lprocfs_srch(ldlm_ns_proc_dir, ns->ns_name); - if (dir == NULL) { - CERROR("dlm namespace %s has no procfs dir?\n", - ns->ns_name); - } else { - lprocfs_remove(&dir); - } - } -#endif - OBD_VFREE(ns->ns_hash, sizeof(*ns->ns_hash) * RES_HASH_SIZE); - OBD_FREE(ns->ns_name, strlen(ns->ns_name) + 1); - /* - * @ns should be not on list in this time, otherwise this will cause - * issues realted to using freed @ns in pools thread. - */ - LASSERT(list_empty(&ns->ns_list_chain)); - OBD_FREE_PTR(ns); - ldlm_put_ref(force); - RETURN(ELDLM_OK); -} - -/* Cleanup the resource, and free namespace. - * bug 12864: - * Deadlock issue: - * proc1: destroy import - * class_disconnect_export(grab cl_sem) -> - * -> ldlm_namespace_free -> - * -> lprocfs_remove(grab _lprocfs_lock). - * proc2: read proc info - * lprocfs_fops_read(grab _lprocfs_lock) -> - * -> osc_rd_active, etc(grab cl_sem). - * - * So that I have to split the ldlm_namespace_free into two parts - the first - * part ldlm_namespace_free_prior is used to cleanup the resource which is - * being used; the 2nd part ldlm_namespace_free_post is used to unregister the - * lprocfs entries, and then free memory. It will be called w/o cli->cl_sem - * held. - */ -int ldlm_namespace_free(struct ldlm_namespace *ns, int force) -{ - ldlm_namespace_free_prior(ns); - ldlm_namespace_free_post(ns, force); - return ELDLM_OK; -} - -void ldlm_namespace_get_nolock(struct ldlm_namespace *ns) -{ - LASSERT(ns->ns_refcount >= 0); - ns->ns_refcount++; -} - -void ldlm_namespace_get(struct ldlm_namespace *ns) -{ - spin_lock(&ns->ns_hash_lock); - ldlm_namespace_get_nolock(ns); - spin_unlock(&ns->ns_hash_lock); -} - -void ldlm_namespace_put_nolock(struct ldlm_namespace *ns, int wakeup) -{ - LASSERT(ns->ns_refcount > 0); - ns->ns_refcount--; - if (ns->ns_refcount == 0 && wakeup) - wake_up(&ns->ns_waitq); -} - -void ldlm_namespace_put(struct ldlm_namespace *ns, int wakeup) -{ - spin_lock(&ns->ns_hash_lock); - ldlm_namespace_put_nolock(ns, wakeup); - spin_unlock(&ns->ns_hash_lock); -} - -/* Should be called under ldlm_namespace_lock(client) taken */ -void ldlm_namespace_move(struct ldlm_namespace *ns, ldlm_side_t client) -{ - LASSERT(!list_empty(&ns->ns_list_chain)); - LASSERT_SEM_LOCKED(ldlm_namespace_lock(client)); - list_move_tail(&ns->ns_list_chain, ldlm_namespace_list(client)); -} - -/* Should be called under ldlm_namespace_lock(client) taken */ -struct ldlm_namespace *ldlm_namespace_first(ldlm_side_t client) -{ - LASSERT_SEM_LOCKED(ldlm_namespace_lock(client)); - LASSERT(!list_empty(ldlm_namespace_list(client))); - return container_of(ldlm_namespace_list(client)->next, - struct ldlm_namespace, ns_list_chain); -} - -static __u32 ldlm_hash_fn(struct ldlm_resource *parent, struct ldlm_res_id name) -{ - __u32 hash = 0; - int i; - - for (i = 0; i < RES_NAME_SIZE; i++) - hash += name.name[i]; - - hash += (__u32)((unsigned long)parent >> 4); - - return (hash & RES_HASH_MASK); -} - -static struct ldlm_resource *ldlm_resource_new(void) -{ - struct ldlm_resource *res; - int idx; - - OBD_SLAB_ALLOC(res, ldlm_resource_slab, CFS_ALLOC_IO, sizeof *res); - if (res == NULL) - return NULL; - - memset(res, 0, sizeof(*res)); - - CFS_INIT_LIST_HEAD(&res->lr_children); - CFS_INIT_LIST_HEAD(&res->lr_childof); - CFS_INIT_LIST_HEAD(&res->lr_granted); - CFS_INIT_LIST_HEAD(&res->lr_converting); - CFS_INIT_LIST_HEAD(&res->lr_waiting); - - /* initialize interval trees for each lock mode*/ - for (idx = 0; idx < LCK_MODE_NUM; idx++) { - res->lr_itree[idx].lit_size = 0; - res->lr_itree[idx].lit_mode = 1 << idx; - res->lr_itree[idx].lit_root = NULL; - } - - atomic_set(&res->lr_refcount, 1); - spin_lock_init(&res->lr_lock); - - /* one who creates the resource must unlock - * the semaphore after lvb initialization */ - init_MUTEX_LOCKED(&res->lr_lvb_sem); - - return res; -} - -/* must be called with hash lock held */ -static struct ldlm_resource * -ldlm_resource_find(struct ldlm_namespace *ns, struct ldlm_res_id name, __u32 hash) -{ - struct list_head *bucket, *tmp; - struct ldlm_resource *res; - - LASSERT_SPIN_LOCKED(&ns->ns_hash_lock); - bucket = ns->ns_hash + hash; - - list_for_each(tmp, bucket) { - res = list_entry(tmp, struct ldlm_resource, lr_hash); - if (memcmp(&res->lr_name, &name, sizeof(res->lr_name)) == 0) - return res; - } - - return NULL; -} - -/* Args: locked namespace - * Returns: newly-allocated, referenced, unlocked resource */ -static struct ldlm_resource * -ldlm_resource_add(struct ldlm_namespace *ns, struct ldlm_resource *parent, - struct ldlm_res_id name, __u32 hash, ldlm_type_t type) -{ - struct list_head *bucket; - struct ldlm_resource *res, *old_res; - ENTRY; - - LASSERTF(type >= LDLM_MIN_TYPE && type < LDLM_MAX_TYPE, - "type: %d\n", type); - - res = ldlm_resource_new(); - if (!res) - RETURN(NULL); - - res->lr_name = name; - res->lr_namespace = ns; - res->lr_type = type; - res->lr_most_restr = LCK_NL; - - spin_lock(&ns->ns_hash_lock); - old_res = ldlm_resource_find(ns, name, hash); - if (old_res) { - /* someone won the race and added the resource before */ - ldlm_resource_getref(old_res); - spin_unlock(&ns->ns_hash_lock); - OBD_SLAB_FREE(res, ldlm_resource_slab, sizeof *res); - /* synchronize WRT resource creation */ - if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) { - down(&old_res->lr_lvb_sem); - up(&old_res->lr_lvb_sem); - } - RETURN(old_res); - } - - /* we won! let's add the resource */ - bucket = ns->ns_hash + hash; - list_add(&res->lr_hash, bucket); - ns->ns_resources++; - ldlm_namespace_get_nolock(ns); - - if (parent == NULL) { - list_add(&res->lr_childof, &ns->ns_root_list); - } else { - res->lr_parent = parent; - list_add(&res->lr_childof, &parent->lr_children); - } - spin_unlock(&ns->ns_hash_lock); - - if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) { - int rc; - - OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CREATE_RESOURCE, 2); - rc = ns->ns_lvbo->lvbo_init(res); - if (rc) - CERROR("lvbo_init failed for resource " - LPU64": rc %d\n", name.name[0], rc); - /* we create resource with locked lr_lvb_sem */ - up(&res->lr_lvb_sem); - } - - RETURN(res); -} - -/* Args: unlocked namespace - * Locks: takes and releases ns->ns_lock and res->lr_lock - * Returns: referenced, unlocked ldlm_resource or NULL */ -struct ldlm_resource * -ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, - struct ldlm_res_id name, ldlm_type_t type, int create) -{ - __u32 hash = ldlm_hash_fn(parent, name); - struct ldlm_resource *res = NULL; - ENTRY; - - LASSERT(ns != NULL); - LASSERT(ns->ns_hash != NULL); - LASSERT(name.name[0] != 0); - - spin_lock(&ns->ns_hash_lock); - res = ldlm_resource_find(ns, name, hash); - if (res) { - ldlm_resource_getref(res); - spin_unlock(&ns->ns_hash_lock); - /* synchronize WRT resource creation */ - if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) { - down(&res->lr_lvb_sem); - up(&res->lr_lvb_sem); - } - RETURN(res); - } - spin_unlock(&ns->ns_hash_lock); - - if (create == 0) - RETURN(NULL); - - res = ldlm_resource_add(ns, parent, name, hash, type); - RETURN(res); -} - -struct ldlm_resource *ldlm_resource_getref(struct ldlm_resource *res) -{ - LASSERT(res != NULL); - LASSERT(res != LP_POISON); - atomic_inc(&res->lr_refcount); - CDEBUG(D_INFO, "getref res: %p count: %d\n", res, - atomic_read(&res->lr_refcount)); - return res; -} - -void __ldlm_resource_putref_final(struct ldlm_resource *res) -{ - struct ldlm_namespace *ns = res->lr_namespace; - - LASSERT_SPIN_LOCKED(&ns->ns_hash_lock); - - if (!list_empty(&res->lr_granted)) { - ldlm_resource_dump(D_ERROR, res); - LBUG(); - } - - if (!list_empty(&res->lr_converting)) { - ldlm_resource_dump(D_ERROR, res); - LBUG(); - } - - if (!list_empty(&res->lr_waiting)) { - ldlm_resource_dump(D_ERROR, res); - LBUG(); - } - - if (!list_empty(&res->lr_children)) { - ldlm_resource_dump(D_ERROR, res); - LBUG(); - } - - /* Pass 0 as second argument to not wake up ->ns_waitq yet, will do it - * later. */ - ldlm_namespace_put_nolock(ns, 0); - list_del_init(&res->lr_hash); - list_del_init(&res->lr_childof); - - ns->ns_resources--; - if (ns->ns_resources == 0) - wake_up(&ns->ns_waitq); -} - -/* Returns 1 if the resource was freed, 0 if it remains. */ -int ldlm_resource_putref(struct ldlm_resource *res) -{ - struct ldlm_namespace *ns = res->lr_namespace; - int rc = 0; - ENTRY; - - CDEBUG(D_INFO, "putref res: %p count: %d\n", res, - atomic_read(&res->lr_refcount) - 1); - LASSERTF(atomic_read(&res->lr_refcount) > 0, "%d", - atomic_read(&res->lr_refcount)); - LASSERTF(atomic_read(&res->lr_refcount) < LI_POISON, "%d", - atomic_read(&res->lr_refcount)); - - if (atomic_dec_and_lock(&res->lr_refcount, &ns->ns_hash_lock)) { - __ldlm_resource_putref_final(res); - spin_unlock(&ns->ns_hash_lock); - if (res->lr_lvb_data) - OBD_FREE(res->lr_lvb_data, res->lr_lvb_len); - OBD_SLAB_FREE(res, ldlm_resource_slab, sizeof *res); - rc = 1; - } - - RETURN(rc); -} - -/* Returns 1 if the resource was freed, 0 if it remains. */ -int ldlm_resource_putref_locked(struct ldlm_resource *res) -{ - int rc = 0; - ENTRY; - - CDEBUG(D_INFO, "putref res: %p count: %d\n", res, - atomic_read(&res->lr_refcount) - 1); - LASSERT(atomic_read(&res->lr_refcount) > 0); - LASSERT(atomic_read(&res->lr_refcount) < LI_POISON); - - LASSERT(atomic_read(&res->lr_refcount) >= 0); - if (atomic_dec_and_test(&res->lr_refcount)) { - __ldlm_resource_putref_final(res); - if (res->lr_lvb_data) - OBD_FREE(res->lr_lvb_data, res->lr_lvb_len); - OBD_SLAB_FREE(res, ldlm_resource_slab, sizeof *res); - rc = 1; - } - - RETURN(rc); -} - -void ldlm_resource_add_lock(struct ldlm_resource *res, struct list_head *head, - struct ldlm_lock *lock) -{ - check_res_locked(res); - - ldlm_resource_dump(D_OTHER, res); - CDEBUG(D_OTHER, "About to add this lock:\n"); - ldlm_lock_dump(D_OTHER, lock, 0); - - if (lock->l_destroyed) { - CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n"); - return; - } - - LASSERT(list_empty(&lock->l_res_link)); - - list_add_tail(&lock->l_res_link, head); -} - -void ldlm_resource_insert_lock_after(struct ldlm_lock *original, - struct ldlm_lock *new) -{ - struct ldlm_resource *res = original->l_resource; - - check_res_locked(res); - - ldlm_resource_dump(D_OTHER, res); - CDEBUG(D_OTHER, "About to insert this lock after %p:\n", original); - ldlm_lock_dump(D_OTHER, new, 0); - - if (new->l_destroyed) { - CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n"); - goto out; - } - - LASSERT(list_empty(&new->l_res_link)); - - list_add(&new->l_res_link, &original->l_res_link); - out:; -} - -void ldlm_resource_unlink_lock(struct ldlm_lock *lock) -{ - int type = lock->l_resource->lr_type; - - check_res_locked(lock->l_resource); - if (type == LDLM_IBITS || type == LDLM_PLAIN) - ldlm_unlink_lock_skiplist(lock); - else if (type == LDLM_EXTENT) - ldlm_extent_unlink_lock(lock); - list_del_init(&lock->l_res_link); -} - -void ldlm_res2desc(struct ldlm_resource *res, struct ldlm_resource_desc *desc) -{ - desc->lr_type = res->lr_type; - desc->lr_name = res->lr_name; -} - -void ldlm_dump_all_namespaces(ldlm_side_t client, int level) -{ - struct list_head *tmp; - - if (!((libcfs_debug | D_ERROR) & level)) - return; - - mutex_down(ldlm_namespace_lock(client)); - - list_for_each(tmp, ldlm_namespace_list(client)) { - struct ldlm_namespace *ns; - ns = list_entry(tmp, struct ldlm_namespace, ns_list_chain); - ldlm_namespace_dump(level, ns); - } - - mutex_up(ldlm_namespace_lock(client)); -} - -void ldlm_namespace_dump(int level, struct ldlm_namespace *ns) -{ - struct list_head *tmp; - - if (!((libcfs_debug | D_ERROR) & level)) - return; - - CDEBUG(level, "--- Namespace: %s (rc: %d, side: %s)\n", - ns->ns_name, ns->ns_refcount, - ns_is_client(ns) ? "client" : "server"); - - if (cfs_time_before(cfs_time_current(), ns->ns_next_dump)) - return; - - spin_lock(&ns->ns_hash_lock); - tmp = ns->ns_root_list.next; - while (tmp != &ns->ns_root_list) { - struct ldlm_resource *res; - res = list_entry(tmp, struct ldlm_resource, lr_childof); - - ldlm_resource_getref(res); - spin_unlock(&ns->ns_hash_lock); - - lock_res(res); - ldlm_resource_dump(level, res); - unlock_res(res); - - spin_lock(&ns->ns_hash_lock); - tmp = tmp->next; - ldlm_resource_putref_locked(res); - } - ns->ns_next_dump = cfs_time_shift(10); - spin_unlock(&ns->ns_hash_lock); -} - -void ldlm_resource_dump(int level, struct ldlm_resource *res) -{ - struct list_head *tmp; - int pos; - - CLASSERT(RES_NAME_SIZE == 4); - - if (!((libcfs_debug | D_ERROR) & level)) - return; - - CDEBUG(level, "--- Resource: %p ("LPU64"/"LPU64"/"LPU64"/"LPU64 - ") (rc: %d)\n", res, res->lr_name.name[0], res->lr_name.name[1], - res->lr_name.name[2], res->lr_name.name[3], - atomic_read(&res->lr_refcount)); - - if (!list_empty(&res->lr_granted)) { - pos = 0; - CDEBUG(level, "Granted locks:\n"); - list_for_each(tmp, &res->lr_granted) { - struct ldlm_lock *lock; - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - ldlm_lock_dump(level, lock, ++pos); - } - } - if (!list_empty(&res->lr_converting)) { - pos = 0; - CDEBUG(level, "Converting locks:\n"); - list_for_each(tmp, &res->lr_converting) { - struct ldlm_lock *lock; - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - ldlm_lock_dump(level, lock, ++pos); - } - } - if (!list_empty(&res->lr_waiting)) { - pos = 0; - CDEBUG(level, "Waiting locks:\n"); - list_for_each(tmp, &res->lr_waiting) { - struct ldlm_lock *lock; - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - ldlm_lock_dump(level, lock, ++pos); - } - } -} diff --git a/lustre/liblustre/.cvsignore b/lustre/liblustre/.cvsignore deleted file mode 100644 index fb1a186e8b..0000000000 --- a/lustre/liblustre/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -Makefile.in -.deps -TAGS -libtest diff --git a/lustre/liblustre/Makefile.am b/lustre/liblustre/Makefile.am deleted file mode 100644 index cf60902e3e..0000000000 --- a/lustre/liblustre/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -## Liblustre excecutables & libraries Makefile -SUBDIRS = . tests - -AM_CPPFLAGS = $(HAVE_EFENCE) -I$(SYSIO)/include -D_LARGEFILE64_SOURCE=1 \ - $(LLCPPFLAGS) -I$(top_srcdir)/lnet/ulnds -AM_CFLAGS = $(LLCFLAGS) - -AM_LIBS = $(LIBEFENCE) - - - -LUSTRE_LIBS = libllite.a \ - $(top_builddir)/lustre/lov/liblov.a \ - $(top_builddir)/lustre/obdecho/libobdecho.a \ - $(top_builddir)/lustre/osc/libosc.a \ - $(top_builddir)/lustre/mdc/libmdc.a \ - $(top_builddir)/lustre/mgc/libmgc.a \ - $(top_builddir)/lustre/ptlrpc/libptlrpc.a \ - $(top_builddir)/lustre/obdclass/liblustreclass.a \ - $(top_builddir)/lustre/lvfs/liblvfs.a - -if QUOTA -QUOTA_LIBS = $(top_builddir)/lustre/quota/libquota.a -endif - -LND_LIBS = -if BUILD_USOCKLND -LND_LIBS += $(top_builddir)/lnet/ulnds/socklnd/libsocklnd.a -endif -if BUILD_UPTLLND -LND_LIBS += $(top_builddir)/lnet/ulnds/ptllnd/libptllnd.a -endif - -LNET_LIBS = $(top_builddir)/lnet/utils/libuptlctl.a \ - $(top_builddir)/lnet/lnet/liblnet.a - -SYSIO_LIBS = $(SYSIO)/lib/libsysio.a - -if LIBLUSTRE -lib_LIBRARIES = liblustre.a -noinst_LIBRARIES = libllite.a - -install-exec-hook: liblustre.so - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libdir) - @list=$< ; for p in $$list; do \ - if test -f $$p; then \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \ - $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \ - else :; fi; \ - done -else -install-exec-hook: -endif - -libllite_a_SOURCES = llite_lib.c super.c namei.c rw.c file.c dir.c \ - lutil.c lutil.h llite_lib.h - -# for make rpms -- need cleanup -liblustre_a_SOURCES = llite_lib.c super.c namei.c rw.c file.c dir.c \ - llite_lib.h - -liblustre.a : $(LUSTRE_LIBS) $(LND_LIBS) $(LNET_LIBS) $(SYSIO_LIBS) $(QUOTA_LIBS) - sh $(srcdir)/genlib.sh "$(SYSIO)" "$(LIBS)" "$(LND_LIBS)" "$(PTHREAD_LIBS)" "$(QUOTA_LIBS)" "$(CAP_LIBS)" "$(ZLIB)" - -EXTRA_DIST = genlib.sh - -CLEANFILES := liblsupport.a liblustre.so diff --git a/lustre/liblustre/dir.c b/lustre/liblustre/dir.c deleted file mode 100644 index e6788bfe60..0000000000 --- a/lustre/liblustre/dir.c +++ /dev/null @@ -1,275 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light directory handling - * - * Copyright (c) 2002-2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/queue.h> - -#include <sysio.h> -#ifdef HAVE_XTIO_H -#include <xtio.h> -#endif -#include <fs.h> -#include <mount.h> -#include <inode.h> -#ifdef HAVE_FILE_H -#include <file.h> -#endif - -#undef LIST_HEAD - -#ifdef HAVE_ASM_TYPES_H -#include <asm/types.h> -#elif defined(HAVE_SYS_TYPES_H) -#include <sys/types.h> -#endif - -#ifdef HAVE_LINUX_UNISTD_H -#include <linux/unistd.h> -#elif defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif - -#include <dirent.h> - -#include "llite_lib.h" - -static int llu_dir_do_readpage(struct inode *inode, struct page *page) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct intnl_stat *st = llu_i2stat(inode); - struct llu_sb_info *sbi = llu_i2sbi(inode); - struct ll_fid mdc_fid; - __u64 offset; - int rc = 0; - struct ptlrpc_request *request; - struct lustre_handle lockh; - struct mds_body *body; - struct lookup_intent it = { .it_op = IT_READDIR }; - struct mdc_op_data data; - struct obd_device *obddev = class_exp2obd(sbi->ll_mdc_exp); - struct ldlm_res_id res_id = - { .name = {st->st_ino, (__u64)lli->lli_st_generation} }; - ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_UPDATE } }; - ENTRY; - - rc = ldlm_lock_match(obddev->obd_namespace, LDLM_FL_BLOCK_GRANTED, - &res_id, LDLM_IBITS, &policy, LCK_CR, &lockh); - if (!rc) { - struct ldlm_enqueue_info einfo = {LDLM_IBITS, LCK_CR, - llu_mdc_blocking_ast, ldlm_completion_ast, NULL, inode}; - - llu_prepare_mdc_op_data(&data, inode, NULL, NULL, 0, 0); - - rc = mdc_enqueue(sbi->ll_mdc_exp, &einfo, &it, - &data, &lockh, NULL, 0, - LDLM_FL_CANCEL_ON_BLOCK); - request = (struct ptlrpc_request *)it.d.lustre.it_data; - if (request) - ptlrpc_req_finished(request); - if (rc < 0) { - CERROR("lock enqueue: err: %d\n", rc); - RETURN(rc); - } - } - ldlm_lock_dump_handle(D_OTHER, &lockh); - - mdc_pack_fid(&mdc_fid, st->st_ino, lli->lli_st_generation, S_IFDIR); - - offset = (__u64)page->index << CFS_PAGE_SHIFT; - rc = mdc_readpage(sbi->ll_mdc_exp, &mdc_fid, - offset, page, &request); - if (!rc) { - body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); /* checked by mdc_readpage() */ - /* swabbed by mdc_readpage() */ - LASSERT(lustre_rep_swabbed(request, REPLY_REC_OFF)); - - st->st_size = body->size; - } else { - CERROR("read_dir_page(%ld) error %d\n", page->index, rc); - } - ptlrpc_req_finished(request); - EXIT; - - ldlm_lock_decref(&lockh, LCK_CR); - return rc; -} - -static struct page *llu_dir_read_page(struct inode *ino, unsigned long pgidx) -{ - struct page *page; - int rc; - ENTRY; - - OBD_PAGE_ALLOC(page, 0); - if (!page) - RETURN(ERR_PTR(-ENOMEM)); - page->index = pgidx; - - rc = llu_dir_do_readpage(ino, page); - if (rc) { - OBD_PAGE_FREE(page); - RETURN(ERR_PTR(rc)); - } - - return page; -} - -enum { - EXT2_FT_UNKNOWN, - EXT2_FT_REG_FILE, - EXT2_FT_DIR, - EXT2_FT_CHRDEV, - EXT2_FT_BLKDEV, - EXT2_FT_FIFO, - EXT2_FT_SOCK, - EXT2_FT_SYMLINK, - EXT2_FT_MAX -}; - -static unsigned char ext2_filetype_table[EXT2_FT_MAX] = { - [EXT2_FT_UNKNOWN] DT_UNKNOWN, - [EXT2_FT_REG_FILE] DT_REG, - [EXT2_FT_DIR] DT_DIR, - [EXT2_FT_CHRDEV] DT_CHR, - [EXT2_FT_BLKDEV] DT_BLK, - [EXT2_FT_FIFO] DT_FIFO, - [EXT2_FT_SOCK] DT_SOCK, - [EXT2_FT_SYMLINK] DT_LNK, -}; - -#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) -#define ROUND_UP64(x) (((x)+sizeof(__u64)-1) & ~(sizeof(__u64)-1)) - -static int filldir(char *buf, int buflen, - const char *name, int namelen, loff_t offset, - ino_t ino, unsigned int d_type, int *filled) -{ - struct dirent64 *dirent = (struct dirent64 *) (buf + *filled); - int reclen = ROUND_UP64(NAME_OFFSET(dirent) + namelen + 1); - - /* check overflow */ - if ((*filled + reclen) > buflen) - return 1; - - dirent->d_ino = ino; - dirent->d_off = offset; - dirent->d_reclen = reclen; -#ifndef _AIX - dirent->d_type = (unsigned short) d_type; -#endif - memcpy(dirent->d_name, name, namelen); - dirent->d_name[namelen] = 0; - - *filled += reclen; - - return 0; -} - -ssize_t llu_iop_filldirentries(struct inode *ino, _SYSIO_OFF_T *basep, - char *buf, size_t nbytes) -{ - struct llu_inode_info *lli = llu_i2info(ino); - struct intnl_stat *st = llu_i2stat(ino); - loff_t pos = *basep, offset; - int filled = 0; - unsigned long pgidx, maxpages; - ENTRY; - - liblustre_wait_event(0); - - if (st->st_size == 0) { - CWARN("dir size is 0?\n"); - RETURN(0); - } - - if (pos == -1) - pos = lli->lli_dir_pos; - - maxpages = (st->st_size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT; - pgidx = pos >> CFS_PAGE_SHIFT; - offset = pos & ~CFS_PAGE_MASK; - - for ( ; pgidx < maxpages ; pgidx++, offset = 0) { - struct page *page; - struct ext2_dirent *de; - char *addr, *limit; - - page = llu_dir_read_page(ino, pgidx); - if (IS_ERR(page)) - continue; - - /* size might have been updated by mdc_readpage */ - maxpages = (st->st_size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT; - - /* fill in buffer */ - addr = page->addr; - limit = addr + CFS_PAGE_SIZE - EXT2_DIR_REC_LEN(1); - de = (struct ext2_dirent *) (addr + offset); - - for ( ; (char*) de <= limit; de = ext2_next_entry(de)) { - if (de->inode) { - int over; - unsigned char d_type = DT_UNKNOWN; - - if (de->file_type < EXT2_FT_MAX) - d_type = ext2_filetype_table[de->file_type]; - - offset = (char*) de - addr; - over = filldir(buf, nbytes, de->name, de->name_len, - (((__u64)pgidx << CFS_PAGE_SHIFT) | offset) - + le16_to_cpu(de->rec_len), - le32_to_cpu(de->inode), d_type, &filled); - if (over) { - OBD_PAGE_FREE(page); - /* - * if buffer overflow with no data - * returned yet, then report error - * instead of eof - */ - if (filled == 0) - RETURN(-EINVAL); - - GOTO(done, 0); - } - } - } - - OBD_PAGE_FREE(page); - } -done: - lli->lli_dir_pos = (__u64)pgidx << CFS_PAGE_SHIFT | offset; - *basep = lli->lli_dir_pos; - liblustre_wait_event(0); - RETURN(filled); -} diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c deleted file mode 100644 index bd67c0f87c..0000000000 --- a/lustre/liblustre/file.c +++ /dev/null @@ -1,521 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light file operations - * - * Copyright (c) 2002-2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/queue.h> -#include <fcntl.h> - -#include <sysio.h> -#ifdef HAVE_XTIO_H -#include <xtio.h> -#endif -#include <fs.h> -#include <mount.h> -#include <inode.h> -#ifdef HAVE_FILE_H -#include <file.h> -#endif - -#undef LIST_HEAD - -#include "llite_lib.h" - -/* Pack the required supplementary groups into the supplied groups array. - * If we don't need to use the groups from the target inode(s) then we - * instead pack one or more groups from the user's supplementary group - * array in case it might be useful. Not needed if doing an MDS-side upcall. */ -void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2) -{ - LASSERT(i1 != NULL); - LASSERT(suppgids != NULL); - - if (in_group_p(i1->i_stbuf.st_gid)) - suppgids[0] = i1->i_stbuf.st_gid; - else - suppgids[0] = -1; - - if (i2) { - if (in_group_p(i2->i_stbuf.st_gid)) - suppgids[1] = i2->i_stbuf.st_gid; - else - suppgids[1] = -1; - } else { - suppgids[1] = -1; - } -} - -void llu_prepare_mdc_op_data(struct mdc_op_data *data, - struct inode *i1, - struct inode *i2, - const char *name, - int namelen, - int mode) -{ - LASSERT(i1 != NULL || i2 != NULL); - - if (i1) { - ll_i2gids(data->suppgids, i1, i2); - ll_inode2fid(&data->fid1, i1); - }else { - ll_i2gids(data->suppgids, i2, i1); - ll_inode2fid(&data->fid1, i2); - } - - if (i2) - ll_inode2fid(&data->fid2, i2); - else - memset(&data->fid2, 0, sizeof(data->fid2)); - - data->name = name; - data->namelen = namelen; - data->create_mode = mode; - data->mod_time = CURRENT_TIME; - data->data = NULL; -} - -void obdo_refresh_inode(struct inode *dst, - struct obdo *src, - obd_flag valid) -{ - struct intnl_stat *st = llu_i2stat(dst); - valid &= src->o_valid; - - if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE,"valid "LPX64", cur time %lu/%lu, new %lu/%lu\n", - src->o_valid, LTIME_S(st->st_mtime), - LTIME_S(st->st_ctime), - (long)src->o_mtime, (long)src->o_ctime); - - if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(st->st_atime)) - LTIME_S(st->st_atime) = src->o_atime; - - /* mtime is always updated with ctime, but can be set in past. - As write and utime(2) may happen within 1 second, and utime's - mtime has a priority over write's one, leave mtime from mds - for the same ctimes. */ - if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(st->st_ctime)) { - LTIME_S(st->st_ctime) = src->o_ctime; - if (valid & OBD_MD_FLMTIME) - LTIME_S(st->st_mtime) = src->o_mtime; - } - if (valid & OBD_MD_FLSIZE && src->o_size > st->st_size) - st->st_size = src->o_size; - /* optimum IO size */ - if (valid & OBD_MD_FLBLKSZ) - st->st_blksize = src->o_blksize; - /* allocation of space */ - if (valid & OBD_MD_FLBLOCKS && src->o_blocks > st->st_blocks) - st->st_blocks = src->o_blocks; -} - -int llu_local_open(struct llu_inode_info *lli, struct lookup_intent *it) -{ - struct ptlrpc_request *req = it->d.lustre.it_data; - struct ll_file_data *fd; - struct mds_body *body; - ENTRY; - - body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body)); - LASSERT(body != NULL); /* reply already checked out */ - /* and swabbed down */ - LASSERT(lustre_rep_swabbed(req, DLM_REPLY_REC_OFF)); - - /* already opened? */ - if (lli->lli_open_count++) - RETURN(0); - - LASSERT(!lli->lli_file_data); - - OBD_ALLOC(fd, sizeof(*fd)); - /* We can't handle this well without reorganizing ll_file_open and - * ll_mdc_close, so don't even try right now. */ - LASSERT(fd != NULL); - - memcpy(&fd->fd_mds_och.och_fh, &body->handle, sizeof(body->handle)); - fd->fd_mds_och.och_magic = OBD_CLIENT_HANDLE_MAGIC; - lli->lli_file_data = fd; - - mdc_set_open_replay_data(&fd->fd_mds_och, it->d.lustre.it_data); - - RETURN(0); -} - -int llu_iop_open(struct pnode *pnode, int flags, mode_t mode) -{ - struct inode *inode = pnode->p_base->pb_ino; - struct llu_inode_info *lli = llu_i2info(inode); - struct intnl_stat *st = llu_i2stat(inode); - struct ll_file_data *fd; - struct ptlrpc_request *request; - struct lookup_intent *it; - struct lov_stripe_md *lsm; - int rc = 0; - ENTRY; - - liblustre_wait_event(0); - - /* don't do anything for '/' */ - if (llu_is_root_inode(inode)) - RETURN(0); - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu\n", (long long)st->st_ino); - LL_GET_INTENT(inode, it); - - if (!it->d.lustre.it_disposition) { - LBUG(); - } - - rc = it_open_error(DISP_OPEN_OPEN, it); - if (rc) - GOTO(out_release, rc); - - rc = llu_local_open(lli, it); - if (rc) - LBUG(); - - if (!S_ISREG(st->st_mode)) - GOTO(out_release, rc = 0); - - fd = lli->lli_file_data; - - lsm = lli->lli_smd; - if (lsm == NULL) { - if (fd->fd_flags & O_LOV_DELAY_CREATE) { - CDEBUG(D_INODE, "object creation was delayed\n"); - GOTO(out_release, rc); - } - } - fd->fd_flags &= ~O_LOV_DELAY_CREATE; - - lli->lli_open_flags = flags & ~(O_CREAT | O_EXCL | O_TRUNC); - - out_release: - request = it->d.lustre.it_data; - ptlrpc_req_finished(request); - - it->it_op_release(it); - OBD_FREE(it, sizeof(*it)); - - /* libsysio hasn't done anything for O_TRUNC. here we - * simply simulate it as open(...); truncate(...); */ - if (rc == 0 && (flags & O_TRUNC) && S_ISREG(st->st_mode)) { - struct iattr attr; - - memset(&attr, 0, sizeof(attr)); - attr.ia_size = 0; - attr.ia_valid |= ATTR_SIZE | ATTR_RAW; - rc = llu_setattr_raw(inode, &attr); - if (rc) - CERROR("error %d truncate in open()\n", rc); - } - - liblustre_wait_event(0); - RETURN(rc); -} - -int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir) -{ - struct mds_body *body; - struct lov_mds_md *eadata; - struct lov_stripe_md *lsm = NULL; - struct obd_trans_info oti = { 0 }; - struct obdo *oa; - int rc; - ENTRY; - - /* req is swabbed so this is safe */ - body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF, sizeof(*body)); - - if (!(body->valid & OBD_MD_FLEASIZE)) - RETURN(0); - - if (body->eadatasize == 0) { - CERROR("OBD_MD_FLEASIZE set but eadatasize zero\n"); - GOTO(out, rc = -EPROTO); - } - - /* The MDS sent back the EA because we unlinked the last reference - * to this file. Use this EA to unlink the objects on the OST. - * It's opaque so we don't swab here; we leave it to obd_unpackmd() to - * check it is complete and sensible. */ - eadata = lustre_swab_repbuf(request, REPLY_REC_OFF+1, body->eadatasize, - NULL); - LASSERT(eadata != NULL); - if (eadata == NULL) { - CERROR("Can't unpack MDS EA data\n"); - GOTO(out, rc = -EPROTO); - } - - rc = obd_unpackmd(llu_i2obdexp(dir), &lsm, eadata,body->eadatasize); - if (rc < 0) { - CERROR("obd_unpackmd: %d\n", rc); - GOTO(out, rc); - } - LASSERT(rc >= sizeof(*lsm)); - - OBDO_ALLOC(oa); - if (oa == NULL) - GOTO(out_free_memmd, rc = -ENOMEM); - - oa->o_id = lsm->lsm_object_id; - oa->o_mode = body->mode & S_IFMT; - oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE; - - if (body->valid & OBD_MD_FLCOOKIE) { - oa->o_valid |= OBD_MD_FLCOOKIE; - oti.oti_logcookies = - lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF + 2, - sizeof(struct llog_cookie) * - lsm->lsm_stripe_count); - if (oti.oti_logcookies == NULL) { - oa->o_valid &= ~OBD_MD_FLCOOKIE; - body->valid &= ~OBD_MD_FLCOOKIE; - } - } - - rc = obd_destroy(llu_i2obdexp(dir), oa, lsm, &oti, NULL); - OBDO_FREE(oa); - if (rc) - CERROR("obd destroy objid 0x"LPX64" error %d\n", - lsm->lsm_object_id, rc); - out_free_memmd: - obd_free_memmd(llu_i2obdexp(dir), &lsm); - out: - return rc; -} - -int llu_mdc_close(struct obd_export *mdc_exp, struct inode *inode) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct intnl_stat *st = llu_i2stat(inode); - struct ll_file_data *fd = lli->lli_file_data; - struct ptlrpc_request *req = NULL; - struct obd_client_handle *och = &fd->fd_mds_och; - struct obdo obdo; - int rc, valid; - ENTRY; - - /* clear group lock, if present */ - if (fd->fd_flags & LL_FILE_GROUP_LOCKED) { - struct lov_stripe_md *lsm = llu_i2info(inode)->lli_smd; - fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK); - rc = llu_extent_unlock(fd, inode, lsm, LCK_GROUP, - &fd->fd_cwlockh); - } - - obdo.o_id = st->st_ino; - obdo.o_valid = OBD_MD_FLID; - valid = OBD_MD_FLTYPE | OBD_MD_FLMODE | OBD_MD_FLSIZE |OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME; - if (test_bit(LLI_F_HAVE_OST_SIZE_LOCK, &lli->lli_flags)) - valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS; - - obdo_from_inode(&obdo, inode, valid); - - if (0 /* ll_is_inode_dirty(inode) */) { - obdo.o_flags = MDS_BFLAG_UNCOMMITTED_WRITES; - obdo.o_valid |= OBD_MD_FLFLAGS; - } - rc = mdc_close(mdc_exp, &obdo, och, &req); - if (rc == EAGAIN) { - /* We are the last writer, so the MDS has instructed us to get - * the file size and any write cookies, then close again. */ - //ll_queue_done_writing(inode); - rc = 0; - } else if (rc) { - CERROR("inode %llu close failed: rc %d\n", - (long long)st->st_ino, rc); - } else { - rc = llu_objects_destroy(req, inode); - if (rc) - CERROR("inode %llu ll_objects destroy: rc = %d\n", - (long long)st->st_ino, rc); - } - - mdc_clear_open_replay_data(och); - ptlrpc_req_finished(req); - och->och_fh.cookie = DEAD_HANDLE_MAGIC; - lli->lli_file_data = NULL; - OBD_FREE(fd, sizeof(*fd)); - - RETURN(rc); -} - -int llu_file_release(struct inode *inode) -{ - struct ll_file_data *fd; - struct llu_sb_info *sbi = llu_i2sbi(inode); - struct llu_inode_info *lli = llu_i2info(inode); - int rc = 0, rc2; - - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu\n", - (long long)llu_i2stat(inode)->st_ino, lli->lli_st_generation); - - if (llu_is_root_inode(inode)) - RETURN(0); - - /* still opened by others? */ - if (--lli->lli_open_count) - RETURN(0); - - fd = lli->lli_file_data; - if (!fd) /* no process opened the file after an mcreate */ - RETURN(0); - - rc2 = llu_mdc_close(sbi->ll_mdc_exp, inode); - if (rc2 && !rc) - rc = rc2; - - RETURN(rc); -} - -/* - * libsysio require us return 0 - */ -int llu_iop_close(struct inode *inode) -{ - int rc; - struct ldlm_res_id res_id = - { .name = {llu_i2stat(inode)->st_ino, - (__u64)llu_i2info(inode)->lli_st_generation, LDLM_FLOCK} }; - struct lustre_handle lockh = {0}; - - liblustre_wait_event(0); - - /* If we have posix locks on this file - clear all of those */ - if (ldlm_lock_match( - class_exp2obd(llu_i2mdcexp(inode))->obd_namespace, - LDLM_FL_BLOCK_GRANTED|LDLM_FL_TEST_LOCK|LDLM_FL_CBPENDING, - &res_id, LDLM_FLOCK, NULL, LCK_PR|LCK_PW, &lockh)) { - struct file_lock lock; - lock.fl_type = F_UNLCK; - lock.fl_flags = FL_POSIX; - lock.fl_start = 0; - lock.fl_end = OFFSET_MAX; - lock.fl_pid = getpid(); - lock.fl_notify = NULL; - lock.fl_insert = NULL; - lock.fl_remove = NULL; - lock.fl_owner = NULL; - lock.fl_file = NULL; - - llu_file_flock(inode, F_SETLK, &lock); - } - - rc = llu_file_release(inode); - if (rc) { - CERROR("file close error %d\n", rc); - } - /* if open count == 0 && stale_flag is set, should we - * remove the inode immediately? */ - liblustre_wait_idle(); - return 0; -} - -_SYSIO_OFF_T llu_iop_pos(struct inode *ino, _SYSIO_OFF_T off) -{ - ENTRY; - - liblustre_wait_event(0); - - if (off < 0 || off > ll_file_maxbytes(ino)) - RETURN(-EINVAL); - - RETURN(off); -} - -/* this isn't where truncate starts. roughly: - * llu_iop_{open,setattr}->llu_setattr_raw->llu_vmtruncate->llu_truncate - * we grab the lock back in setattr_raw to avoid races. */ -static void llu_truncate(struct inode *inode, obd_flag flags) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct intnl_stat *st = llu_i2stat(inode); - struct obd_info oinfo = { { { 0 } } }; - struct obdo oa = { 0 }; - int rc; - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu(%p) to %llu\n", - (long long)st->st_ino, lli->lli_st_generation, inode, - (long long)st->st_size); - - if (!lli->lli_smd) { - CDEBUG(D_INODE, "truncate on inode %llu with no objects\n", - (long long)st->st_ino); - EXIT; - return; - } - - oinfo.oi_md = lli->lli_smd; - oinfo.oi_policy.l_extent.start = st->st_size; - oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF; - oinfo.oi_oa = &oa; - oa.o_id = lli->lli_smd->lsm_object_id; - oa.o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS; - oa.o_flags = flags; /* We don't actually want to copy inode flags */ - - obdo_from_inode(&oa, inode, - OBD_MD_FLTYPE | OBD_MD_FLMODE | OBD_MD_FLATIME | - OBD_MD_FLMTIME | OBD_MD_FLCTIME); - - obd_adjust_kms(llu_i2obdexp(inode), lli->lli_smd, st->st_size, 1); - - CDEBUG(D_INFO, "calling punch for "LPX64" (all bytes after %Lu)\n", - oa.o_id, (long long)st->st_size); - - /* truncate == punch from new size to absolute end of file */ - rc = obd_punch_rqset(llu_i2obdexp(inode), &oinfo, NULL); - if (rc) - CERROR("obd_truncate fails (%d) ino %llu\n", - rc, (long long)st->st_ino); - else - obdo_to_inode(inode, &oa, OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME | - OBD_MD_FLCTIME); - - EXIT; - return; -} /* llu_truncate */ - -int llu_vmtruncate(struct inode * inode, loff_t offset, obd_flag flags) -{ - llu_i2stat(inode)->st_size = offset; - - /* - * llu_truncate() is only called from this - * point. llu_vmtruncate/llu_truncate split exists to mimic the - * structure of Linux VFS truncate code path. - */ - - llu_truncate(inode, flags); - - return 0; -} diff --git a/lustre/liblustre/genlib.sh b/lustre/liblustre/genlib.sh deleted file mode 100755 index 8bbecd85d6..0000000000 --- a/lustre/liblustre/genlib.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash -#set -xv -set -e - -# -# This script is to generate lib lustre library as a whole. It will leave -# two files on current directory: liblustre.a and liblustre.so. -# -# Most concern here is the libraries linking order -# -# FIXME: How to do this cleanly use makefile? -# - -AR=/usr/bin/ar -# see http://osdir.com/ml/gmane.comp.gnu.binutils.bugs/2006-01/msg00016.php -LD=gcc -RANLIB=/usr/bin/ranlib - -CWD=`pwd` - -SYSIO=$1 -LIBS=$2 -LND_LIBS=$3 -PTHREAD_LIBS=$4 -QUOTA_LIBS=$5 -CAP_LIBS=$6 -ZLIB=$7 - -if [ ! -f $SYSIO/lib/libsysio.a ]; then - echo "ERROR: $SYSIO/lib/libsysio.a dosen't exist" - exit 1 -fi - -# do cleanup at first -rm -f liblustre.so - -ALL_OBJS= - -build_obj_list() { - _objs=`$AR -t $1/$2` - for _lib in $_objs; do - ALL_OBJS=$ALL_OBJS"$1/$_lib "; - done; -} - -# -# special treatment for libsysio -# -sysio_tmp=$CWD/sysio_tmp_`date +%s` -rm -rf $sysio_tmp -build_sysio_obj_list() { - _objs=`$AR -t $1` - mkdir -p $sysio_tmp - cd $sysio_tmp - $AR -x $1 - cd .. - for _lib in $_objs; do - ALL_OBJS=$ALL_OBJS"$sysio_tmp/$_lib "; - done -} - -# lustre components libs -build_obj_list . libllite.a -build_obj_list ../lov liblov.a -build_obj_list ../obdecho libobdecho.a -build_obj_list ../osc libosc.a -build_obj_list ../mdc libmdc.a -build_obj_list ../mgc libmgc.a -build_obj_list ../ptlrpc libptlrpc.a -build_obj_list ../obdclass liblustreclass.a -build_obj_list ../lvfs liblvfs.a - -# lnet components libs -build_obj_list ../../lnet/utils libuptlctl.a -build_obj_list ../../lnet/libcfs libcfs.a -if $(echo "$LND_LIBS" | grep "socklnd" >/dev/null) ; then - build_obj_list ../../lnet/ulnds/socklnd libsocklnd.a -fi -if $(echo "$LND_LIBS" | grep "ptllnd" >/dev/null) ; then - build_obj_list ../../lnet/ulnds/ptllnd libptllnd.a -fi -build_obj_list ../../lnet/lnet liblnet.a - -if [ "x$QUOTA_LIBS" != "x" ]; then - build_obj_list ../quota libquota.a -fi - -# create static lib lsupport -rm -f $CWD/liblsupport.a -$AR -cru $CWD/liblsupport.a $ALL_OBJS -$RANLIB $CWD/liblsupport.a - -# if libsysio is already in our LIBS we don't need to link against it here -if $(echo "$LIBS" | grep -v -- "-lsysio" >/dev/null) ; then - build_sysio_obj_list $SYSIO/lib/libsysio.a -fi - -# create static lib lustre -rm -f $CWD/liblustre.a -$AR -cru $CWD/liblustre.a $ALL_OBJS -$RANLIB $CWD/liblustre.a - -# create shared lib lustre -rm -f $CWD/liblustre.so -OS=`uname` -if test x$OS = xAIX; then -$LD -shared -o $CWD/liblustre.so $ALL_OBJS -lpthread -Xlinker -bnoipath ../../libsyscall.so -else -$LD -shared -nostdlib -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB -fi - -rm -rf $sysio_tmp diff --git a/lustre/liblustre/llite_lib.c b/lustre/liblustre/llite_lib.c deleted file mode 100644 index 09d17c342c..0000000000 --- a/lustre/liblustre/llite_lib.c +++ /dev/null @@ -1,390 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light common routines - * - * Copyright (c) 2002-2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <signal.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/queue.h> - -#include <sysio.h> -#ifdef HAVE_XTIO_H -#include <xtio.h> -#endif -#include <fs.h> -#include <mount.h> -#include <inode.h> -#ifdef HAVE_FILE_H -#include <file.h> -#endif - -/* both sys/queue.h (libsysio require it) and portals/lists.h have definition - * of 'LIST_HEAD'. undef it to suppress warnings - */ -#undef LIST_HEAD -#include <liblustre.h> -#include <lnet/lnetctl.h> /* needed for parse_dump */ - -#include "lutil.h" -#include "llite_lib.h" - -static int lllib_init(void) -{ - if (liblustre_init_current("liblustre") || - init_lib_portals() || - init_obdclass() || - ptlrpc_init() || - mgc_init() || - mdc_init() || - lov_init() || - osc_init()) - return -1; - - return _sysio_fssw_register("lustre", &llu_fssw_ops); -} - -int liblustre_process_log(struct config_llog_instance *cfg, - char *mgsnid, char *profile, - int allow_recov) -{ - struct lustre_cfg_bufs bufs; - struct lustre_cfg *lcfg; - char *peer = "MGS_UUID"; - struct obd_device *obd; - struct lustre_handle mgc_conn = {0, }; - struct obd_export *exp; - char *name = "mgc_dev"; - class_uuid_t uuid; - struct obd_uuid mgc_uuid; - struct llog_ctxt *ctxt; - lnet_nid_t nid = 0; - char *mdsnid; - int err, rc = 0; - struct obd_connect_data *ocd = NULL; - ENTRY; - - ll_generate_random_uuid(uuid); - class_uuid_unparse(uuid, &mgc_uuid); - - nid = libcfs_str2nid(mgsnid); - if (nid == LNET_NID_ANY) { - CERROR("Can't parse NID %s\n", mgsnid); - RETURN(-EINVAL); - } - - lustre_cfg_bufs_reset(&bufs, NULL); - lustre_cfg_bufs_set_string(&bufs, 1, peer); - lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs); - lcfg->lcfg_nid = nid; - rc = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (rc < 0) - GOTO(out, rc); - - lustre_cfg_bufs_reset(&bufs, name); - lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_MGC_NAME); - lustre_cfg_bufs_set_string(&bufs, 2, mgc_uuid.uuid); - lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs); - rc = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (rc < 0) - GOTO(out_del_uuid, rc); - - lustre_cfg_bufs_reset(&bufs, name); - lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_MGS_OBDNAME); - lustre_cfg_bufs_set_string(&bufs, 2, peer); - lcfg = lustre_cfg_new(LCFG_SETUP, &bufs); - rc = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (rc < 0) - GOTO(out_detach, rc); - - while ((mdsnid = strsep(&mgsnid, ","))) { - nid = libcfs_str2nid(mdsnid); - lustre_cfg_bufs_reset(&bufs, NULL); - lustre_cfg_bufs_set_string(&bufs, 1, libcfs_nid2str(nid)); - lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs); - lcfg->lcfg_nid = nid; - rc = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (rc) { - CERROR("Add uuid for %s failed %d\n", - libcfs_nid2str(nid), rc); - continue; - } - - lustre_cfg_bufs_reset(&bufs, name); - lustre_cfg_bufs_set_string(&bufs, 1, libcfs_nid2str(nid)); - lcfg = lustre_cfg_new(LCFG_ADD_CONN, &bufs); - lcfg->lcfg_nid = nid; - rc = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (rc) { - CERROR("Add conn for %s failed %d\n", - libcfs_nid2str(nid), rc); - continue; - } - } - - obd = class_name2obd(name); - if (obd == NULL) - GOTO(out_cleanup, rc = -EINVAL); - - OBD_ALLOC(ocd, sizeof(*ocd)); - if (ocd == NULL) - GOTO(out_cleanup, rc = -ENOMEM); - - ocd->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_AT; -#ifdef LIBLUSTRE_POSIX_ACL - ocd->ocd_connect_flags |= OBD_CONNECT_ACL; -#endif - ocd->ocd_version = LUSTRE_VERSION_CODE; - - rc = obd_connect(&mgc_conn, obd, &mgc_uuid, ocd, NULL); - if (rc) { - CERROR("cannot connect to %s at %s: rc = %d\n", - LUSTRE_MGS_OBDNAME, mgsnid, rc); - GOTO(out_cleanup, rc); - } - - exp = class_conn2export(&mgc_conn); - - ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT); - cfg->cfg_flags |= CFG_F_COMPAT146; - rc = class_config_parse_llog(ctxt, profile, cfg); - llog_ctxt_put(ctxt); - if (rc) { - CERROR("class_config_parse_llog failed: rc = %d\n", rc); - } - - /* We don't so much care about errors in cleaning up the config llog - * connection, as we have already read the config by this point. */ - err = obd_disconnect(exp); - if (err) - CERROR("obd_disconnect failed: rc = %d\n", err); - -out_cleanup: - if (ocd) - OBD_FREE(ocd, sizeof(*ocd)); - - lustre_cfg_bufs_reset(&bufs, name); - lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs); - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err) - CERROR("mdc_cleanup failed: rc = %d\n", err); - -out_detach: - lustre_cfg_bufs_reset(&bufs, name); - lcfg = lustre_cfg_new(LCFG_DETACH, &bufs); - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err) - CERROR("mdc_detach failed: rc = %d\n", err); - -out_del_uuid: - lustre_cfg_bufs_reset(&bufs, name); - lustre_cfg_bufs_set_string(&bufs, 1, peer); - lcfg = lustre_cfg_new(LCFG_DEL_UUID, &bufs); - err = class_process_config(lcfg); - if (err) - CERROR("del MDC UUID failed: rc = %d\n", err); - lustre_cfg_free(lcfg); -out: - - RETURN(rc); -} - -/* parse host:/fsname string */ -int ll_parse_mount_target(const char *target, char **mgsnid, - char **fsname) -{ - static char buf[256]; - char *s; - - buf[255] = 0; - strncpy(buf, target, 255); - - if ((s = strchr(buf, ':'))) { - *mgsnid = buf; - *s = '\0'; - - while (*++s == '/') - ; - sprintf(s + strlen(s), "-client"); - *fsname = s; - - return 0; - } - - return -1; -} - -/* - * early liblustre init - * called from C startup in catamount apps, before main() - * - * The following is a skeleton sysio startup sequence, - * as implemented in C startup (skipping error handling). - * In this framework none of these calls need be made here - * or in the apps themselves. The NAMESPACE_STRING specifying - * the initial set of fs ops (creates, mounts, etc.) is passed - * as an environment variable. - * - * _sysio_init(); - * _sysio_incore_init(); - * _sysio_native_init(); - * _sysio_lustre_init(); - * _sysio_boot(NAMESPACE_STRING); - * - * the name _sysio_lustre_init() follows the naming convention - * established in other fs drivers from libsysio: - * _sysio_incore_init(), _sysio_native_init() - * - * _sysio_lustre_init() must be called before _sysio_boot() - * to enable libsysio's processing of namespace init strings containing - * lustre filesystem operations - */ -int _sysio_lustre_init(void) -{ - int err; - char *envstr; -#ifndef INIT_SYSIO - extern void __liblustre_cleanup_(void); -#endif - - liblustre_init_random(); - - err = lllib_init(); - if (err) { - perror("init llite driver"); - return err; - } - - envstr = getenv("LIBLUSTRE_TIMEOUT"); - if (envstr != NULL) { - obd_timeout = (unsigned int)strtol(envstr, NULL, 0); - printf("LibLustre: obd timeout=%u seconds\n", - obd_timeout); - } - - /* debug peer on timeout? */ - envstr = getenv("LIBLUSTRE_DEBUG_PEER_ON_TIMEOUT"); - if (envstr != NULL) { - obd_debug_peer_on_timeout = - (unsigned int)strtol(envstr, NULL, 0); - printf("LibLustre: debug peer on timeout=%d\n", - obd_debug_peer_on_timeout ? 0 : 1); - } - -#ifndef INIT_SYSIO - (void)atexit(__liblustre_cleanup_); -#endif - return err; -} - -extern int _sysio_native_init(); - -char *lustre_path = NULL; - -void __liblustre_setup_(void) -{ - char *target = NULL; - char *lustre_driver = "lustre"; - unsigned mntflgs = 0; - int err; - - lustre_path = getenv("LIBLUSTRE_MOUNT_POINT"); - if (!lustre_path) { - lustre_path = "/mnt/lustre"; - } - - /* mount target */ - target = getenv("LIBLUSTRE_MOUNT_TARGET"); - if (!target) { - printf("LibLustre: no mount target specified\n"); - exit(1); - } - - CDEBUG(D_CONFIG, "LibLustre: mount point %s, target %s\n", - lustre_path, target); - -#ifdef INIT_SYSIO - /* initialize libsysio & mount rootfs */ - if (_sysio_init()) { - perror("init sysio"); - exit(1); - } - _sysio_native_init(); - - err = _sysio_mount_root("/", "native", mntflgs, NULL); - if (err) { - fprintf(stderr, "sysio mount failed: %s\n", strerror(errno)); - exit(1); - } - - if (_sysio_lustre_init()) - exit(1); -#endif /* INIT_SYSIO */ - - err = mount(target, lustre_path, lustre_driver, mntflgs, NULL); - if (err) { - fprintf(stderr, "Lustre mount failed: %s\n", strerror(errno)); - exit(1); - } -} - -void __liblustre_cleanup_(void) -{ -#ifndef INIT_SYSIO - /* guard against being called multiple times */ - static int cleaned = 0; - - if (cleaned) - return; - cleaned++; -#endif - - /* user app might chdir to a lustre directory, and leave busy pnode - * during finaly libsysio cleanup. here we chdir back to "/". - * but it can't fix the situation that liblustre is mounted - * at "/". - */ - chdir("/"); -#if 0 - umount(lustre_path); -#endif - /* we can't call umount here, because libsysio will not cleanup - * opening files for us. _sysio_shutdown() will cleanup fds at - * first but which will also close the sockets we need for umount - * liblutre. this dilema lead to another hack in - * libsysio/src/file_hack.c FIXME - */ -#ifdef INIT_SYSIO - _sysio_shutdown(); - cleanup_lib_portals(); - LNetFini(); -#endif -} diff --git a/lustre/liblustre/llite_lib.h b/lustre/liblustre/llite_lib.h deleted file mode 100644 index e943aa46ec..0000000000 --- a/lustre/liblustre/llite_lib.h +++ /dev/null @@ -1,276 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef __LLU_H_ -#define __LLU_H_ - -#include <liblustre.h> -#include <obd.h> -#include <obd_class.h> -#include <lustre_mds.h> -#include <lustre_lite.h> -#include <lustre_ver.h> - -#include <sys/types.h> -#include <sys/stat.h> - -/* This should not be "optimized" use ~0ULL because page->index is a long and - * 32-bit systems are therefore limited to 16TB in a mapping */ -#define PAGE_CACHE_MAXBYTES ((__u64)(~0UL) << CFS_PAGE_SHIFT) - -struct ll_file_data { - struct obd_client_handle fd_mds_och; - __u32 fd_flags; - struct lustre_handle fd_cwlockh; - unsigned long fd_gid; -}; - -struct llu_sb_info -{ - struct obd_uuid ll_sb_uuid; - struct obd_export *ll_mdc_exp; - struct obd_export *ll_osc_exp; - obd_id ll_rootino; - int ll_flags; - struct lustre_client_ocd ll_lco; - struct list_head ll_conn_chain; - - struct obd_uuid ll_mds_uuid; - struct obd_uuid ll_mds_peer_uuid; - char *ll_instance; -}; - -#define LL_SBI_NOLCK 0x1 - -#define LLI_F_HAVE_OST_SIZE_LOCK 0 -#define LLI_F_HAVE_MDS_SIZE_LOCK 1 - -struct llu_inode_info { - struct llu_sb_info *lli_sbi; - struct ll_fid lli_fid; - - struct lov_stripe_md *lli_smd; - char *lli_symlink_name; - struct semaphore lli_open_sem; - __u64 lli_maxbytes; - unsigned long lli_flags; - - /* for libsysio */ - struct file_identifier lli_sysio_fid; - - struct lookup_intent *lli_it; - - /* XXX workaround for libsysio readdir */ - loff_t lli_dir_pos; - - /* in libsysio we have no chance to store data in file, - * so place it here. since it's possible that an file - * was opened several times without close, we track an - * open_count here */ - struct ll_file_data *lli_file_data; - int lli_open_flags; - int lli_open_count; - - /* not for stat, change it later */ - int lli_st_flags; - unsigned long lli_st_generation; -}; - -static inline struct llu_sb_info *llu_fs2sbi(struct filesys *fs) -{ - return (struct llu_sb_info*)(fs->fs_private); -} - -static inline struct llu_inode_info *llu_i2info(struct inode *inode) -{ - return (struct llu_inode_info*)(inode->i_private); -} - -static inline struct intnl_stat *llu_i2stat(struct inode *inode) -{ - return &inode->i_stbuf; -} - -static inline struct llu_sb_info *llu_i2sbi(struct inode *inode) -{ - return llu_i2info(inode)->lli_sbi; -} - -static inline struct obd_export *llu_i2obdexp(struct inode *inode) -{ - return llu_i2info(inode)->lli_sbi->ll_osc_exp; -} - -static inline struct obd_export *llu_i2mdcexp(struct inode *inode) -{ - return llu_i2info(inode)->lli_sbi->ll_mdc_exp; -} - -static inline int llu_is_root_inode(struct inode *inode) -{ - return (llu_i2info(inode)->lli_fid.id == - llu_i2info(inode)->lli_sbi->ll_rootino); -} - -#define LL_SAVE_INTENT(inode, it) \ -do { \ - struct lookup_intent *temp; \ - LASSERT(llu_i2info(inode)->lli_it == NULL); \ - OBD_ALLOC(temp, sizeof(*temp)); \ - memcpy(temp, it, sizeof(*temp)); \ - llu_i2info(inode)->lli_it = temp; \ - CDEBUG(D_DENTRY, "alloc intent %p to inode %p(ino %llu)\n", \ - temp, inode, (long long)llu_i2stat(inode)->st_ino); \ -} while(0) - - -#define LL_GET_INTENT(inode, it) \ -do { \ - it = llu_i2info(inode)->lli_it; \ - \ - LASSERT(it); \ - llu_i2info(inode)->lli_it = NULL; \ - CDEBUG(D_DENTRY, "dettach intent %p from inode %p(ino %llu)\n", \ - it, inode, (long long)llu_i2stat(inode)->st_ino); \ -} while(0) - -/* interpet return codes from intent lookup */ -#define LL_LOOKUP_POSITIVE 1 -#define LL_LOOKUP_NEGATIVE 2 - -static inline void ll_inode2fid(struct ll_fid *fid, struct inode *inode) -{ - *fid = llu_i2info(inode)->lli_fid; -} - -struct it_cb_data { - struct inode *icbd_parent; - struct pnode *icbd_child; - obd_id hash; -}; - -void ll_i2gids(__u32 *suppgids, struct inode *i1,struct inode *i2); - -typedef int (*intent_finish_cb)(struct ptlrpc_request *, - struct inode *parent, struct pnode *pnode, - struct lookup_intent *, int offset, obd_id ino); -int llu_intent_lock(struct inode *parent, struct pnode *pnode, - struct lookup_intent *, int flags, intent_finish_cb); - -static inline __u64 ll_file_maxbytes(struct inode *inode) -{ - return llu_i2info(inode)->lli_maxbytes; -} - -struct mount_option_s -{ - char *mdc_uuid; - char *osc_uuid; -}; - -#define IS_BAD_PTR(ptr) \ - ((unsigned long)(ptr) == 0 || (unsigned long)(ptr) > -1000UL) - -/* llite_lib.c */ -int liblustre_process_log(struct config_llog_instance *cfg, char *mgsnid, - char *profile, int allow_recov); -int ll_parse_mount_target(const char *target, char **mgsnid, - char **fsname); - -extern struct mount_option_s mount_option; - -/* super.c */ -void llu_update_inode(struct inode *inode, struct mds_body *body, - struct lov_stripe_md *lmm); -void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid); -void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid); -int ll_it_open_error(int phase, struct lookup_intent *it); -struct inode *llu_iget(struct filesys *fs, struct lustre_md *md); -int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm); -int llu_setattr_raw(struct inode *inode, struct iattr *attr); -int llu_file_flock(struct inode *ino, int cmd, struct file_lock *file_lock); - -extern struct fssw_ops llu_fssw_ops; - -/* file.c */ -void llu_prepare_mdc_op_data(struct mdc_op_data *data, - struct inode *i1, - struct inode *i2, - const char *name, - int namelen, - int mode); -int llu_create(struct inode *dir, struct pnode_base *pnode, int mode); -int llu_local_open(struct llu_inode_info *lli, struct lookup_intent *it); -int llu_iop_open(struct pnode *pnode, int flags, mode_t mode); -int llu_mdc_close(struct obd_export *mdc_exp, struct inode *inode); -int llu_file_release(struct inode *inode); -int llu_iop_close(struct inode *inode); -_SYSIO_OFF_T llu_iop_pos(struct inode *ino, _SYSIO_OFF_T off); -int llu_vmtruncate(struct inode * inode, loff_t offset, obd_flag obd_flags); -void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid); -int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir); - -/* rw.c */ -int llu_iop_read(struct inode *ino, struct ioctx *ioctxp); -int llu_iop_write(struct inode *ino, struct ioctx *ioctxp); -int llu_iop_iodone(struct ioctx *ioctxp); -int llu_glimpse_size(struct inode *inode); -int llu_extent_lock_cancel_cb(struct ldlm_lock *lock, - struct ldlm_lock_desc *new, void *data, - int flag); -int llu_extent_lock(struct ll_file_data *fd, struct inode *inode, - struct lov_stripe_md *lsm, int mode, - ldlm_policy_data_t *policy, struct lustre_handle *lockh, - int ast_flags); -int llu_extent_unlock(struct ll_file_data *fd, struct inode *inode, - struct lov_stripe_md *lsm, int mode, - struct lustre_handle *lockh); - -/* namei.c */ -int llu_iop_lookup(struct pnode *pnode, - struct inode **inop, - struct intent *intnt, - const char *path); -void unhook_stale_inode(struct pnode *pno); -struct inode *llu_inode_from_lock(struct ldlm_lock *lock); -int llu_mdc_blocking_ast(struct ldlm_lock *lock, - struct ldlm_lock_desc *desc, - void *data, int flag); - -/* dir.c */ -ssize_t llu_iop_filldirentries(struct inode *ino, _SYSIO_OFF_T *basep, - char *buf, size_t nbytes); - -/* ext2 related */ -#define EXT2_NAME_LEN (255) - -struct ext2_dirent { - __u32 inode; - __u16 rec_len; - __u8 name_len; - __u8 file_type; - char name[EXT2_NAME_LEN]; -}; - -#define EXT2_DIR_PAD 4 -#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1) -#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \ - ~EXT2_DIR_ROUND) - -static inline struct ext2_dirent *ext2_next_entry(struct ext2_dirent *p) -{ - return (struct ext2_dirent*)((char*) p + le16_to_cpu(p->rec_len)); -} - -static inline void inode_init_lvb(struct inode *inode, struct ost_lvb *lvb) -{ - struct intnl_stat *st = llu_i2stat(inode); - lvb->lvb_size = st->st_size; - lvb->lvb_blocks = st->st_blocks; - lvb->lvb_mtime = st->st_mtime; - lvb->lvb_atime = st->st_atime; - lvb->lvb_ctime = st->st_ctime; -} - -#endif diff --git a/lustre/liblustre/lutil.c b/lustre/liblustre/lutil.c deleted file mode 100644 index 99f1cfe955..0000000000 --- a/lustre/liblustre/lutil.c +++ /dev/null @@ -1,239 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <signal.h> -#include <sys/types.h> - -#include <fcntl.h> -#ifdef HAVE_NETDB_H -#include <netdb.h> -#endif -#ifdef _AIX -#include "syscall_AIX.h" -#else -#include <syscall.h> -#endif -#include <sys/utsname.h> -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#include <sys/socket.h> -#ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> -#endif -#ifdef HAVE_CATAMOUNT_DATA_H -#include <catamount/data.h> -#endif - -#include "lutil.h" - - -unsigned int libcfs_subsystem_debug = ~0 - (S_LNET | S_LND); -unsigned int libcfs_debug = 0; - -struct task_struct *current; - -void *inter_module_get(char *arg) -{ - if (!strcmp(arg, "ldlm_cli_cancel_unused")) - return ldlm_cli_cancel_unused; - else if (!strcmp(arg, "ldlm_namespace_cleanup")) - return ldlm_namespace_cleanup; - else if (!strcmp(arg, "ldlm_replay_locks")) - return ldlm_replay_locks; -#ifdef HAVE_QUOTA_SUPPORT - else if (!strcmp(arg, "osc_quota_interface")) - return &osc_quota_interface; - else if (!strcmp(arg, "mdc_quota_interface")) - return &mdc_quota_interface; - else if (!strcmp(arg, "lov_quota_interface")) - return &lov_quota_interface; -#endif - else - return NULL; -} - -/* - * random number generator stuff - */ - -#ifdef HAVE_GETHOSTBYNAME -static int get_ipv4_addr() -{ - struct utsname myname; - struct hostent *hptr; - int ip; - - if (uname(&myname) < 0) - return 0; - - hptr = gethostbyname(myname.nodename); - if (hptr == NULL || - hptr->h_addrtype != AF_INET || - *hptr->h_addr_list == NULL) { - CWARN("Warning: fail to get local IPv4 address\n"); - return 0; - } - - ip = ntohl(*((int *) *hptr->h_addr_list)); - - return ip; -} -#endif - -void liblustre_init_random() -{ - int seed[2]; - struct timeval tv; - -#ifdef LIBLUSTRE_USE_URANDOM - int _rand_dev_fd; - _rand_dev_fd = syscall(SYS_open, "/dev/urandom", O_RDONLY); - if (_rand_dev_fd >= 0) { - if (syscall(SYS_read, _rand_dev_fd, - &seed, sizeof(seed)) == sizeof(seed)) { - ll_srand(seed[0], seed[1]); - return; - } - syscall(SYS_close, _rand_dev_fd); - } -#endif /* LIBLUSTRE_USE_URANDOM */ - -#ifdef HAVE_GETHOSTBYNAME - seed[0] = get_ipv4_addr(); -#else - seed[0] = _my_pnid; -#endif - gettimeofday(&tv, NULL); - ll_srand(tv.tv_sec ^ __swab32(seed[0]), tv.tv_usec ^__swab32(getpid())); -} - -static void init_capability(__u32 *res) -{ -#ifdef HAVE_LIBCAP - cap_t syscap; - cap_flag_value_t capval; - int i; - - *res = 0; - - syscap = cap_get_proc(); - if (!syscap) { - CWARN("Warning: failed to get system capability, " - "set to minimal\n"); - return; - } - - for (i = 0; i < sizeof(cap_value_t) * 8; i++) { - if (!cap_get_flag(syscap, i, CAP_EFFECTIVE, &capval)) { - if (capval == CAP_SET) { - *res |= 1 << i; - } - } - } -#else - /* - * set fake cap flags to ship to linux server - * from client platforms that have none (eg. catamount) - * full capability for root - * no capability for anybody else - */ -#define FAKE_ROOT_CAP 0x1ffffeff -#define FAKE_USER_CAP 0 - - *res = (current->fsuid == 0) ? FAKE_ROOT_CAP: FAKE_USER_CAP; -#endif -} - -int in_group_p(gid_t gid) -{ - int i; - - if (gid == current->fsgid) - return 1; - - for (i = 0; i < current->ngroups; i++) { - if (gid == current->groups[i]) - return 1; - } - - return 0; -} - -int liblustre_init_current(char *comm) -{ - current = malloc(sizeof(*current)); - if (!current) { - CERROR("Not enough memory\n"); - return -ENOMEM; - } - - strncpy(current->comm, comm, sizeof(current->comm)); - current->pid = getpid(); - current->fsuid = geteuid(); - current->fsgid = getegid(); - memset(¤t->pending, 0, sizeof(current->pending)); - - current->max_groups = sysconf(_SC_NGROUPS_MAX); - current->groups = malloc(sizeof(gid_t) * current->max_groups); - if (!current->groups) { - CERROR("Not enough memory\n"); - return -ENOMEM; - } - current->ngroups = getgroups(current->max_groups, current->groups); - if (current->ngroups < 0) { - perror("Error getgroups"); - return -EINVAL; - } - - init_capability(¤t->cap_effective); - - return 0; -} - -int init_lib_portals() -{ - int rc; - ENTRY; - - rc = libcfs_debug_init(5 * 1024 * 1024); - if (rc != 0) { - CERROR("libcfs_debug_init() failed: %d\n", rc); - RETURN (-ENXIO); - } - - rc = LNetInit(); - if (rc != 0) { - CERROR("LNetInit() failed: %d\n", rc); - RETURN (-ENXIO); - } - RETURN(0); -} - -extern void ptlrpc_exit_portals(void); -void cleanup_lib_portals() -{ - libcfs_debug_cleanup(); - ptlrpc_exit_portals(); -} diff --git a/lustre/liblustre/lutil.h b/lustre/liblustre/lutil.h deleted file mode 100644 index d235eb8eb4..0000000000 --- a/lustre/liblustre/lutil.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __LUTIL_H_ -#define __LUTIL_H_ - -#include <liblustre.h> -#include <obd.h> -#include <obd_class.h> - -void liblustre_init_random(void); -int liblustre_init_current(char *comm); -int init_lib_portals(void); -void cleanup_lib_portals(void); - -#endif diff --git a/lustre/liblustre/namei.c b/lustre/liblustre/namei.c deleted file mode 100644 index 2404ac5cd4..0000000000 --- a/lustre/liblustre/namei.c +++ /dev/null @@ -1,589 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light name resolution - * - * Copyright (c) 2002-2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/queue.h> - -#include <sysio.h> -#ifdef HAVE_XTIO_H -#include <xtio.h> -#endif -#include <fs.h> -#include <mount.h> -#include <inode.h> -#ifdef HAVE_FILE_H -#include <file.h> -#endif - -#undef LIST_HEAD - -#include "llite_lib.h" - -void ll_intent_drop_lock(struct lookup_intent *it) -{ - struct lustre_handle *handle; - - if (it->it_op && it->d.lustre.it_lock_mode) { - handle = (struct lustre_handle *)&it->d.lustre.it_lock_handle; - CDEBUG(D_DLMTRACE, "releasing lock with cookie "LPX64 - " from it %p\n", handle->cookie, it); - ldlm_lock_decref(handle, it->d.lustre.it_lock_mode); - - /* bug 494: intent_release may be called multiple times, from - * this thread and we don't want to double-decref this lock */ - it->d.lustre.it_lock_mode = 0; - } -} - -void ll_intent_release(struct lookup_intent *it) -{ - ENTRY; - - ll_intent_drop_lock(it); - it->it_magic = 0; - it->it_op_release = 0; - it->d.lustre.it_disposition = 0; - it->d.lustre.it_data = NULL; - EXIT; -} - -#if 0 -/* - * remove the stale inode from pnode - */ -void unhook_stale_inode(struct pnode *pno) -{ - struct inode *inode = pno->p_base->pb_ino; - ENTRY; - - LASSERT(inode); - LASSERT(llu_i2info(inode)->lli_stale_flag); - - pno->p_base->pb_ino = NULL; - I_RELE(inode); - - if (!llu_i2info(inode)->lli_open_count) { - CDEBUG(D_INODE, "unhook inode %p (ino %lu) from pno %p\n", - inode, llu_i2info(inode)->lli_st_ino, pno); - if (!inode->i_ref) - _sysio_i_gone(inode); - } - - EXIT; - return; -} -#endif - -void llu_lookup_finish_locks(struct lookup_intent *it, struct pnode *pnode) -{ - struct inode *inode; - LASSERT(it); - LASSERT(pnode); - - inode = pnode->p_base->pb_ino; - if (it->d.lustre.it_lock_mode && inode != NULL) { - CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%llu/%lu)\n", - inode, (long long)llu_i2stat(inode)->st_ino, - llu_i2info(inode)->lli_st_generation); - mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode); - } - - /* drop lookup/getattr locks */ - if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR) - ll_intent_release(it); - -} - -static inline void llu_invalidate_inode_pages(struct inode * inode) -{ - /* do nothing */ -} - -int llu_mdc_blocking_ast(struct ldlm_lock *lock, - struct ldlm_lock_desc *desc, - void *data, int flag) -{ - int rc; - struct lustre_handle lockh; - ENTRY; - - - switch (flag) { - case LDLM_CB_BLOCKING: - ldlm_lock2handle(lock, &lockh); - rc = ldlm_cli_cancel(&lockh); - if (rc < 0) { - CDEBUG(D_INODE, "ldlm_cli_cancel: %d\n", rc); - RETURN(rc); - } - break; - case LDLM_CB_CANCELING: { - struct inode *inode = llu_inode_from_lock(lock); - struct llu_inode_info *lli; - struct intnl_stat *st; - __u64 bits = lock->l_policy_data.l_inodebits.bits; - - /* Invalidate all dentries associated with this inode */ - if (inode == NULL) - break; - - lli = llu_i2info(inode); - st = llu_i2stat(inode); - - if (bits & MDS_INODELOCK_UPDATE) - clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &lli->lli_flags); - - if (lock->l_resource->lr_name.name[0] != st->st_ino || - lock->l_resource->lr_name.name[1] !=lli->lli_st_generation){ - LDLM_ERROR(lock, "data mismatch with ino %llu/%lu", - (long long)st->st_ino,lli->lli_st_generation); - } - if (S_ISDIR(st->st_mode) && - (bits & MDS_INODELOCK_UPDATE)) { - CDEBUG(D_INODE, "invalidating inode %llu\n", - (long long)st->st_ino); - - llu_invalidate_inode_pages(inode); - } - -/* - if (inode->i_sb->s_root && - inode != inode->i_sb->s_root->d_inode) - ll_unhash_aliases(inode); -*/ - I_RELE(inode); - break; - } - default: - LBUG(); - } - - RETURN(0); -} - -static int pnode_revalidate_finish(struct ptlrpc_request *req, - int offset, - struct lookup_intent *it, - struct pnode *pnode) -{ - struct inode *inode = pnode->p_base->pb_ino; - struct lustre_md md; - int rc = 0; - ENTRY; - - LASSERT(inode); - - if (!req) - RETURN(0); - - if (it_disposition(it, DISP_LOOKUP_NEG)) - RETURN(-ENOENT); - - rc = mdc_req2lustre_md(req, offset, llu_i2sbi(inode)->ll_osc_exp, &md); - if (rc) - RETURN(rc); - - llu_update_inode(inode, md.body, md.lsm); - - RETURN(rc); -} - -static int llu_pb_revalidate(struct pnode *pnode, int flags, - struct lookup_intent *it) -{ - struct pnode_base *pb = pnode->p_base; - struct it_cb_data icbd; - struct mdc_op_data op_data; - struct ptlrpc_request *req = NULL; - struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; - struct obd_export *exp; - int rc; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,intent=%x\n", - (int)pb->pb_name.len, pb->pb_name.name, it ? it->it_op : 0); - - /* We don't want to cache negative dentries, so return 0 immediately. - * We believe that this is safe, that negative dentries cannot be - * pinned by someone else */ - if (pb->pb_ino == NULL) { - CDEBUG(D_INODE, "negative pb\n"); - RETURN(0); - } - - /* This is due to bad interaction with libsysio. remove this when we - * switched to libbsdio XXX - */ - { - struct llu_inode_info *lli = llu_i2info(pb->pb_ino); - struct intnl_stat *st = llu_i2stat(pb->pb_ino); - if (lli->lli_it) { - CDEBUG(D_INODE, "inode %llu still have intent " - "%p(opc 0x%x), release it\n", - (long long) st->st_ino, lli->lli_it, - lli->lli_it->it_op); - ll_intent_release(lli->lli_it); - OBD_FREE(lli->lli_it, sizeof(*lli->lli_it)); - lli->lli_it = NULL; - } - } - - exp = llu_i2mdcexp(pb->pb_ino); - icbd.icbd_parent = pnode->p_parent->p_base->pb_ino; - icbd.icbd_child = pnode; - - if (!it) { - it = &lookup_it; - it->it_op_release = ll_intent_release; - } - - llu_prepare_mdc_op_data(&op_data, pnode->p_parent->p_base->pb_ino, - pb->pb_ino, pb->pb_name.name,pb->pb_name.len,0); - - rc = mdc_intent_lock(exp, &op_data, NULL, 0, it, flags, - &req, llu_mdc_blocking_ast, - LDLM_FL_CANCEL_ON_BLOCK); - /* If req is NULL, then mdc_intent_lock only tried to do a lock match; - * if all was well, it will return 1 if it found locks, 0 otherwise. */ - if (req == NULL && rc >= 0) - GOTO(out, rc); - - if (rc < 0) - GOTO(out, rc = 0); - - rc = pnode_revalidate_finish(req, DLM_REPLY_REC_OFF, it, pnode); - if (rc != 0) { - ll_intent_release(it); - GOTO(out, rc = 0); - } - rc = 1; - - /* Note: ll_intent_lock may cause a callback, check this! */ - - if (it->it_op & IT_OPEN) - LL_SAVE_INTENT(pb->pb_ino, it); - - out: - if (req && rc == 1) - ptlrpc_req_finished(req); - if (rc == 0) { - LASSERT(pb->pb_ino); - I_RELE(pb->pb_ino); - pb->pb_ino = NULL; - } else { - llu_lookup_finish_locks(it, pnode); - } - RETURN(rc); -} - -static int lookup_it_finish(struct ptlrpc_request *request, int offset, - struct lookup_intent *it, void *data) -{ - struct it_cb_data *icbd = data; - struct pnode *child = icbd->icbd_child; - struct inode *parent = icbd->icbd_parent; - struct llu_sb_info *sbi = llu_i2sbi(parent); - struct inode *inode = NULL; - int rc; - - /* libsysio require us generate inode right away if success. - * so if mds created new inode for us we need make sure it - * succeeded. thus for any error we can't delay to the - * llu_file_open() time. */ - if (it_disposition(it, DISP_OPEN_CREATE) && - it_open_error(DISP_OPEN_CREATE, it)) { - CDEBUG(D_INODE, "detect mds create error\n"); - return it_open_error(DISP_OPEN_CREATE, it); - } - if (it_disposition(it, DISP_OPEN_OPEN) && - it_open_error(DISP_OPEN_OPEN, it)) { - CDEBUG(D_INODE, "detect mds open error\n"); - /* undo which did by mdc_intent_lock */ - if (it_disposition(it, DISP_OPEN_CREATE) && - !it_open_error(DISP_OPEN_CREATE, it)) { - LASSERT(request); - LASSERT(atomic_read(&request->rq_refcount) > 1); - CDEBUG(D_INODE, "dec a ref of req %p\n", request); - ptlrpc_req_finished(request); - } - return it_open_error(DISP_OPEN_OPEN, it); - } - - /* NB 1 request reference will be taken away by ll_intent_lock() - * when I return - */ - if (!it_disposition(it, DISP_LOOKUP_NEG) || (it->it_op & IT_CREAT)) { - struct lustre_md md; - struct llu_inode_info *lli; - struct intnl_stat *st; - ENTRY; - - if (it_disposition(it, DISP_OPEN_CREATE)) - ptlrpc_req_finished(request); - - rc = mdc_req2lustre_md(request, offset, sbi->ll_osc_exp, &md); - if (rc) - RETURN(rc); - - inode = llu_iget(parent->i_fs, &md); - if (!inode || IS_ERR(inode)) { - /* free the lsm if we allocated one above */ - if (md.lsm != NULL) - obd_free_memmd(sbi->ll_osc_exp, &md.lsm); - RETURN(inode ? PTR_ERR(inode) : -ENOMEM); - } else if (md.lsm != NULL && - llu_i2info(inode)->lli_smd != md.lsm) { - obd_free_memmd(sbi->ll_osc_exp, &md.lsm); - } - - lli = llu_i2info(inode); - st = llu_i2stat(inode); - - /* If this is a stat, get the authoritative file size */ - if (it->it_op == IT_GETATTR && S_ISREG(st->st_mode) && - lli->lli_smd != NULL) { - struct lov_stripe_md *lsm = lli->lli_smd; - ldlm_error_t rc; - - LASSERT(lsm->lsm_object_id != 0); - - /* bug 2334: drop MDS lock before acquiring OST lock */ - ll_intent_drop_lock(it); - - rc = llu_glimpse_size(inode); - if (rc) { - I_RELE(inode); - RETURN(rc); - } - } - } else { - ENTRY; - } - - /* intent will be further used in cases of open()/getattr() */ - if (inode && (it->it_op & IT_OPEN)) - LL_SAVE_INTENT(inode, it); - - child->p_base->pb_ino = inode; - - RETURN(0); -} - -struct inode *llu_inode_from_lock(struct ldlm_lock *lock) -{ - struct inode *inode; - lock_res_and_lock(lock); - - if (lock->l_ast_data) { - inode = (struct inode *)lock->l_ast_data; - I_REF(inode); - } else - inode = NULL; - - unlock_res_and_lock(lock); - return inode; -} - -static int llu_lookup_it(struct inode *parent, struct pnode *pnode, - struct lookup_intent *it, int flags) -{ - struct mdc_op_data op_data; - struct it_cb_data icbd; - struct ptlrpc_request *req = NULL; - struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; - int rc; - ENTRY; - - if (pnode->p_base->pb_name.len > EXT2_NAME_LEN) - RETURN(-ENAMETOOLONG); - - if (!it) { - it = &lookup_it; - it->it_op_release = ll_intent_release; - } - - icbd.icbd_child = pnode; - icbd.icbd_parent = parent; - - llu_prepare_mdc_op_data(&op_data, parent, NULL, - pnode->p_base->pb_name.name, - pnode->p_base->pb_name.len, flags); - - rc = mdc_intent_lock(llu_i2mdcexp(parent), &op_data, NULL, 0, it, - flags, &req, llu_mdc_blocking_ast, - LDLM_FL_CANCEL_ON_BLOCK); - if (rc < 0) - GOTO(out, rc); - - rc = lookup_it_finish(req, DLM_REPLY_REC_OFF, it, &icbd); - if (rc != 0) { - ll_intent_release(it); - GOTO(out, rc); - } - - llu_lookup_finish_locks(it, pnode); - - out: - if (req) - ptlrpc_req_finished(req); - return rc; -} - -static struct lookup_intent* -translate_lookup_intent(struct intent *intent, const char *path) -{ - struct lookup_intent *it; - int fmode; - - /* libsysio trick */ - if (!intent || path) { - CDEBUG(D_VFSTRACE, "not intent needed\n"); - return NULL; - } - - OBD_ALLOC(it, sizeof(*it)); - LASSERT(it); - - memset(it, 0, sizeof(*it)); - - /* libsysio will assign intent like following: - * NOTE: INT_CREAT has include INT_UPDPARENT - * - * open: INT_OPEN [| INT_CREAT] - * mkdir: INT_CREAT - * symlink: INT_CREAT - * unlink: INT_UPDPARENT - * rmdir: INT_UPDPARENT - * mknod: INT_CREAT - * stat: INT_GETATTR - * setattr: NULL - * - * following logic is adjusted for libsysio - */ - - it->it_flags = intent->int_arg2 ? *((int*)intent->int_arg2) : 0; - - if (intent->int_opmask & INT_OPEN) { - it->it_op |= IT_OPEN; - - /* convert access mode from O_ to FMODE_ */ - if (it->it_flags & O_WRONLY) - fmode = FMODE_WRITE; - else if (it->it_flags & O_RDWR) - fmode = FMODE_READ | FMODE_WRITE; - else - fmode = FMODE_READ; - it->it_flags &= ~O_ACCMODE; - it->it_flags |= fmode; - } - - /* XXX libsysio has strange code on intent handling, - * more check later */ - if (it->it_flags & O_CREAT) { - it->it_op |= IT_CREAT; - it->it_create_mode = *((int*)intent->int_arg1); - /* bug 7278: libsysio hack. For O_EXCL, libsysio depends on - this lookup to return negative result, but then there is no - way to find out original intent in ll_iop_open(). So we just - clear O_EXCL from libsysio flags here to avoid checking - for negative result. O_EXCL will be enforced by MDS. */ - *((int*)intent->int_arg2) &= ~O_EXCL; - } - - if (intent->int_opmask & INT_GETATTR) - it->it_op |= IT_GETATTR; - - LASSERT(!(intent->int_opmask & INT_SETATTR)); - - /* libsysio is different to linux vfs when doing unlink/rmdir, - * INT_UPDPARENT was passed down during name resolution. Here - * we treat it as normal lookup, later unlink()/rmdir() will - * do the actual work */ - - /* conform to kernel code, if only IT_LOOKUP was set, don't - * pass down it */ - if (!it->it_op || it->it_op == IT_LOOKUP) { - OBD_FREE(it, sizeof(*it)); - it = NULL; - } - if (it) - it->it_op_release = ll_intent_release; - - CDEBUG(D_VFSTRACE, "final intent 0x%x\n", it ? it->it_op : 0); - return it; -} - -int llu_iop_lookup(struct pnode *pnode, - struct inode **inop, - struct intent *intnt, - const char *path) -{ - struct lookup_intent *it; - int rc; - ENTRY; - - liblustre_wait_event(0); - - *inop = NULL; - - /* the mount root inode have no name, so don't call - * remote in this case. but probably we need revalidate - * it here? FIXME */ - if (pnode->p_mount->mnt_root == pnode) { - struct inode *i = pnode->p_base->pb_ino; - *inop = i; - RETURN(0); - } - - if (!pnode->p_base->pb_name.len) - RETURN(-EINVAL); - - it = translate_lookup_intent(intnt, path); - - /* param flags is not used, let it be 0 */ - if (llu_pb_revalidate(pnode, 0, it)) { - LASSERT(pnode->p_base->pb_ino); - *inop = pnode->p_base->pb_ino; - GOTO(out, rc = 0); - } - - rc = llu_lookup_it(pnode->p_parent->p_base->pb_ino, pnode, it, 0); - if (!rc) { - if (!pnode->p_base->pb_ino) - rc = -ENOENT; - else - *inop = pnode->p_base->pb_ino; - } - -out: - liblustre_wait_event(0); - RETURN(rc); -} diff --git a/lustre/liblustre/rw.c b/lustre/liblustre/rw.c deleted file mode 100644 index e096a0e84a..0000000000 --- a/lustre/liblustre/rw.c +++ /dev/null @@ -1,892 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light block IO - * - * Copyright (c) 2002-2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/queue.h> -#include <fcntl.h> -#include <sys/uio.h> - -#include <sysio.h> -#ifdef HAVE_XTIO_H -#include <xtio.h> -#endif -#include <fs.h> -#include <mount.h> -#include <inode.h> -#ifdef HAVE_FILE_H -#include <file.h> -#endif - -#undef LIST_HEAD - -#include "llite_lib.h" - -struct llu_io_group -{ - struct obd_io_group *lig_oig; - struct inode *lig_inode; - struct lustre_rw_params *lig_params; - int lig_maxpages; - int lig_npages; - __u64 lig_rwcount; - struct ll_async_page *lig_llaps; - struct page *lig_pages; - void *lig_llap_cookies; -}; - -#define LLU_IO_GROUP_SIZE(x) \ - (sizeof(struct llu_io_group) + \ - (sizeof(struct ll_async_page) + \ - sizeof(struct page) + \ - llap_cookie_size) * (x)) - -struct llu_io_session -{ - struct inode *lis_inode; - int lis_cmd; - int lis_max_groups; - int lis_ngroups; - struct llu_io_group *lis_groups[0]; -}; -#define LLU_IO_SESSION_SIZE(x) \ - (sizeof(struct llu_io_session) + (x) * 2 * sizeof(void *)) - - -typedef ssize_t llu_file_piov_t(const struct iovec *iovec, int iovlen, - _SYSIO_OFF_T pos, ssize_t len, - void *private); - -size_t llap_cookie_size; - -static int llu_lock_to_stripe_offset(struct inode *inode, struct ldlm_lock *lock) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct obd_export *exp = llu_i2obdexp(inode); - struct { - char name[16]; - struct ldlm_lock *lock; - struct lov_stripe_md *lsm; - } key = { .name = "lock_to_stripe", .lock = lock, .lsm = lsm }; - __u32 stripe, vallen = sizeof(stripe); - int rc; - ENTRY; - - if (lsm->lsm_stripe_count == 1) - RETURN(0); - - /* get our offset in the lov */ - rc = obd_get_info(exp, sizeof(key), &key, &vallen, &stripe); - if (rc != 0) { - CERROR("obd_get_info: rc = %d\n", rc); - LBUG(); - } - LASSERT(stripe < lsm->lsm_stripe_count); - RETURN(stripe); -} - -int llu_extent_lock_cancel_cb(struct ldlm_lock *lock, - struct ldlm_lock_desc *new, void *data, - int flag) -{ - struct lustre_handle lockh = { 0 }; - int rc; - ENTRY; - - if ((unsigned long)data > 0 && (unsigned long)data < 0x1000) { - LDLM_ERROR(lock, "cancelling lock with bad data %p", data); - LBUG(); - } - - switch (flag) { - case LDLM_CB_BLOCKING: - ldlm_lock2handle(lock, &lockh); - rc = ldlm_cli_cancel(&lockh); - if (rc != ELDLM_OK) - CERROR("ldlm_cli_cancel failed: %d\n", rc); - break; - case LDLM_CB_CANCELING: { - struct inode *inode; - struct llu_inode_info *lli; - struct lov_stripe_md *lsm; - __u32 stripe; - __u64 kms; - - /* This lock wasn't granted, don't try to evict pages */ - if (lock->l_req_mode != lock->l_granted_mode) - RETURN(0); - - inode = llu_inode_from_lock(lock); - if (!inode) - RETURN(0); - lli= llu_i2info(inode); - if (!lli) - goto iput; - if (!lli->lli_smd) - goto iput; - lsm = lli->lli_smd; - - stripe = llu_lock_to_stripe_offset(inode, lock); - lock_res_and_lock(lock); - kms = ldlm_extent_shift_kms(lock, - lsm->lsm_oinfo[stripe]->loi_kms); - unlock_res_and_lock(lock); - if (lsm->lsm_oinfo[stripe]->loi_kms != kms) - LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64, - lsm->lsm_oinfo[stripe]->loi_kms, kms); - lsm->lsm_oinfo[stripe]->loi_kms = kms; -iput: - I_RELE(inode); - break; - } - default: - LBUG(); - } - - RETURN(0); -} - -static int llu_glimpse_callback(struct ldlm_lock *lock, void *reqp) -{ - struct ptlrpc_request *req = reqp; - struct inode *inode = llu_inode_from_lock(lock); - struct llu_inode_info *lli; - struct ost_lvb *lvb; - int size[2] = { sizeof(struct ptlrpc_body), sizeof(*lvb) }; - int rc, stripe = 0; - ENTRY; - - if (inode == NULL) - GOTO(out, rc = -ELDLM_NO_LOCK_DATA); - lli = llu_i2info(inode); - if (lli == NULL) - GOTO(iput, rc = -ELDLM_NO_LOCK_DATA); - if (lli->lli_smd == NULL) - GOTO(iput, rc = -ELDLM_NO_LOCK_DATA); - - /* First, find out which stripe index this lock corresponds to. */ - if (lli->lli_smd->lsm_stripe_count > 1) - stripe = llu_lock_to_stripe_offset(inode, lock); - - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - GOTO(iput, rc); - - lvb = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*lvb)); - lvb->lvb_size = lli->lli_smd->lsm_oinfo[stripe]->loi_kms; - - LDLM_DEBUG(lock, "i_size: %llu -> stripe number %u -> kms "LPU64, - (long long)llu_i2stat(inode)->st_size, stripe,lvb->lvb_size); - iput: - I_RELE(inode); - out: - /* These errors are normal races, so we don't want to fill the console - * with messages by calling ptlrpc_error() */ - if (rc == -ELDLM_NO_LOCK_DATA) - lustre_pack_reply(req, 1, NULL, NULL); - - req->rq_status = rc; - return rc; -} - -/* NB: lov_merge_size will prefer locally cached writes if they extend the - * file (because it prefers KMS over RSS when larger) */ -int llu_glimpse_size(struct inode *inode) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct intnl_stat *st = llu_i2stat(inode); - struct llu_sb_info *sbi = llu_i2sbi(inode); - struct lustre_handle lockh = { 0 }; - struct ldlm_enqueue_info einfo = { 0 }; - struct obd_info oinfo = { { { 0 } } }; - struct ost_lvb lvb; - int rc; - ENTRY; - - CDEBUG(D_DLMTRACE, "Glimpsing inode %llu\n", (long long)st->st_ino); - - if (!lli->lli_smd) { - CDEBUG(D_DLMTRACE, "No objects for inode %llu\n", - (long long)st->st_ino); - RETURN(0); - } - - einfo.ei_type = LDLM_EXTENT; - einfo.ei_mode = LCK_PR; - einfo.ei_cb_bl = osc_extent_blocking_cb; - einfo.ei_cb_cp = ldlm_completion_ast; - einfo.ei_cb_gl = llu_glimpse_callback; - einfo.ei_cbdata = inode; - - oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF; - oinfo.oi_lockh = &lockh; - oinfo.oi_md = lli->lli_smd; - oinfo.oi_flags = LDLM_FL_HAS_INTENT; - - rc = obd_enqueue_rqset(sbi->ll_osc_exp, &oinfo, &einfo); - if (rc) { - CERROR("obd_enqueue returned rc %d, returning -EIO\n", rc); - RETURN(rc > 0 ? -EIO : rc); - } - - inode_init_lvb(inode, &lvb); - rc = obd_merge_lvb(sbi->ll_osc_exp, lli->lli_smd, &lvb, 0); - st->st_size = lvb.lvb_size; - st->st_blocks = lvb.lvb_blocks; - /* handle st_blocks overflow gracefully */ - if (st->st_blocks < lvb.lvb_blocks) - st->st_blocks = ~0UL; - st->st_mtime = lvb.lvb_mtime; - st->st_atime = lvb.lvb_atime; - st->st_ctime = lvb.lvb_ctime; - - CDEBUG(D_DLMTRACE, "glimpse: size: "LPU64", blocks: "LPU64"\n", - (__u64)st->st_size, (__u64)st->st_blocks); - - RETURN(rc); -} - -int llu_extent_lock(struct ll_file_data *fd, struct inode *inode, - struct lov_stripe_md *lsm, int mode, - ldlm_policy_data_t *policy, struct lustre_handle *lockh, - int ast_flags) -{ - struct llu_sb_info *sbi = llu_i2sbi(inode); - struct intnl_stat *st = llu_i2stat(inode); - struct ldlm_enqueue_info einfo = { 0 }; - struct obd_info oinfo = { { { 0 } } }; - struct ost_lvb lvb; - int rc; - ENTRY; - - LASSERT(!lustre_handle_is_used(lockh)); - CLASSERT(ELDLM_OK == 0); - - /* XXX phil: can we do this? won't it screw the file size up? */ - if ((fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) || - (sbi->ll_flags & LL_SBI_NOLCK) || mode == LCK_NL) - RETURN(0); - - CDEBUG(D_DLMTRACE, "Locking inode %llu, start "LPU64" end "LPU64"\n", - (long long)st->st_ino, policy->l_extent.start, - policy->l_extent.end); - - einfo.ei_type = LDLM_EXTENT; - einfo.ei_mode = mode; - einfo.ei_cb_bl = osc_extent_blocking_cb; - einfo.ei_cb_cp = ldlm_completion_ast; - einfo.ei_cb_gl = llu_glimpse_callback; - einfo.ei_cbdata = inode; - - oinfo.oi_policy = *policy; - oinfo.oi_lockh = lockh; - oinfo.oi_md = lsm; - oinfo.oi_flags = ast_flags; - - rc = obd_enqueue(sbi->ll_osc_exp, &oinfo, &einfo, NULL); - *policy = oinfo.oi_policy; - if (rc > 0) - rc = -EIO; - - inode_init_lvb(inode, &lvb); - obd_merge_lvb(sbi->ll_osc_exp, lsm, &lvb, 1); - if (policy->l_extent.start == 0 && - policy->l_extent.end == OBD_OBJECT_EOF) - st->st_size = lvb.lvb_size; - - if (rc == 0) { - st->st_mtime = lvb.lvb_mtime; - st->st_atime = lvb.lvb_atime; - st->st_ctime = lvb.lvb_ctime; - } - - RETURN(rc); -} - -int llu_extent_unlock(struct ll_file_data *fd, struct inode *inode, - struct lov_stripe_md *lsm, int mode, - struct lustre_handle *lockh) -{ - struct llu_sb_info *sbi = llu_i2sbi(inode); - int rc; - ENTRY; - - CLASSERT(ELDLM_OK == 0); - - /* XXX phil: can we do this? won't it screw the file size up? */ - if ((fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) || - (sbi->ll_flags & LL_SBI_NOLCK) || mode == LCK_NL) - RETURN(0); - - rc = obd_cancel(sbi->ll_osc_exp, lsm, mode, lockh); - - RETURN(rc); -} - -#define LLAP_MAGIC 12346789 - -struct ll_async_page { - int llap_magic; - void *llap_cookie; - int llap_queued; - struct page *llap_page; - struct inode *llap_inode; -}; - -static void llu_ap_fill_obdo(void *data, int cmd, struct obdo *oa) -{ - struct ll_async_page *llap; - struct inode *inode; - struct lov_stripe_md *lsm; - obd_flag valid_flags; - ENTRY; - - llap = LLAP_FROM_COOKIE(data); - inode = llap->llap_inode; - lsm = llu_i2info(inode)->lli_smd; - - oa->o_id = lsm->lsm_object_id; - oa->o_valid = OBD_MD_FLID; - valid_flags = OBD_MD_FLTYPE | OBD_MD_FLATIME; - if (cmd & OBD_BRW_WRITE) - valid_flags |= OBD_MD_FLMTIME | OBD_MD_FLCTIME | - OBD_MD_FLUID | OBD_MD_FLGID | - OBD_MD_FLFID | OBD_MD_FLGENER; - - obdo_from_inode(oa, inode, valid_flags); - EXIT; -} - -static void llu_ap_update_obdo(void *data, int cmd, struct obdo *oa, - obd_valid valid) -{ - struct ll_async_page *llap; - ENTRY; - - llap = LLAP_FROM_COOKIE(data); - obdo_from_inode(oa, llap->llap_inode, valid); - - EXIT; -} - -/* called for each page in a completed rpc.*/ -static int llu_ap_completion(void *data, int cmd, struct obdo *oa, int rc) -{ - struct ll_async_page *llap; - struct page *page; - ENTRY; - - llap = LLAP_FROM_COOKIE(data); - llap->llap_queued = 0; - page = llap->llap_page; - - if (rc != 0) { - if (cmd & OBD_BRW_WRITE) - CERROR("writeback error on page %p index %ld: %d\n", - page, page->index, rc); - } - RETURN(0); -} - -static struct obd_async_page_ops llu_async_page_ops = { - .ap_make_ready = NULL, - .ap_refresh_count = NULL, - .ap_fill_obdo = llu_ap_fill_obdo, - .ap_update_obdo = llu_ap_update_obdo, - .ap_completion = llu_ap_completion, -}; - -static int llu_queue_pio(int cmd, struct llu_io_group *group, - char *buf, size_t count, loff_t pos) -{ - struct llu_inode_info *lli = llu_i2info(group->lig_inode); - struct intnl_stat *st = llu_i2stat(group->lig_inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct obd_export *exp = llu_i2obdexp(group->lig_inode); - struct page *pages = &group->lig_pages[group->lig_npages],*page = pages; - struct ll_async_page *llap = &group->lig_llaps[group->lig_npages]; - void *llap_cookie = group->lig_llap_cookies + - llap_cookie_size * group->lig_npages; - int i, rc, npages = 0, ret_bytes = 0; - int local_lock; - ENTRY; - - if (!exp) - RETURN(-EINVAL); - - local_lock = group->lig_params->lrp_lock_mode != LCK_NL; - /* prepare the pages array */ - do { - unsigned long index, offset, bytes; - - offset = (pos & ~CFS_PAGE_MASK); - index = pos >> CFS_PAGE_SHIFT; - bytes = CFS_PAGE_SIZE - offset; - if (bytes > count) - bytes = count; - - /* prevent read beyond file range */ - if (/* local_lock && */ - cmd == OBD_BRW_READ && pos + bytes >= st->st_size) { - if (pos >= st->st_size) - break; - bytes = st->st_size - pos; - } - - /* prepare page for this index */ - page->index = index; - page->addr = buf - offset; - - page->_offset = offset; - page->_count = bytes; - - page++; - npages++; - count -= bytes; - pos += bytes; - buf += bytes; - - group->lig_rwcount += bytes; - ret_bytes += bytes; - } while (count); - - group->lig_npages += npages; - - for (i = 0, page = pages; i < npages; - i++, page++, llap++, llap_cookie += llap_cookie_size){ - llap->llap_magic = LLAP_MAGIC; - llap->llap_cookie = llap_cookie; - rc = obd_prep_async_page(exp, lsm, NULL, page, - (obd_off)page->index << CFS_PAGE_SHIFT, - &llu_async_page_ops, - llap, &llap->llap_cookie, - 1 /* no cache in liblustre at all */, - NULL); - if (rc) { - LASSERT(rc < 0); - llap->llap_cookie = NULL; - RETURN(rc); - } - CDEBUG(D_CACHE, "llap %p page %p group %p obj off "LPU64"\n", - llap, page, llap->llap_cookie, - (obd_off)pages->index << CFS_PAGE_SHIFT); - page->private = (unsigned long)llap; - llap->llap_page = page; - llap->llap_inode = group->lig_inode; - - rc = obd_queue_group_io(exp, lsm, NULL, group->lig_oig, - llap->llap_cookie, cmd, - page->_offset, page->_count, - group->lig_params->lrp_brw_flags, - ASYNC_READY | ASYNC_URGENT | - ASYNC_COUNT_STABLE | ASYNC_GROUP_SYNC); - if (!local_lock && cmd == OBD_BRW_READ) { - /* - * In OST-side locking case short reads cannot be - * detected properly. - * - * The root of the problem is that - * - * kms = lov_merge_size(lsm, 1); - * if (end >= kms) - * glimpse_size(inode); - * else - * st->st_size = kms; - * - * logic in the read code (both llite and liblustre) - * only works correctly when client holds DLM lock on - * [start, end]. Without DLM lock KMS can be - * completely out of date, and client can either make - * spurious short-read (missing concurrent write), or - * return stale data (missing concurrent - * truncate). For llite client this is fatal, because - * incorrect data are cached and can be later sent - * back to the server (vide bug 5047). This is hard to - * fix by handling short-reads on the server, as there - * is no easy way to communicate file size (or amount - * of bytes read/written) back to the client, - * _especially_ because OSC pages can be sliced and - * dices into multiple RPCs arbitrary. Fortunately, - * liblustre doesn't cache data and the worst case is - * that we get race with concurrent write or truncate. - */ - } - if (rc) { - LASSERT(rc < 0); - RETURN(rc); - } - - llap->llap_queued = 1; - } - - RETURN(ret_bytes); -} - -static -struct llu_io_group * get_io_group(struct inode *inode, int maxpages, - struct lustre_rw_params *params) -{ - struct llu_io_group *group; - int rc; - - if (!llap_cookie_size) - llap_cookie_size = obd_prep_async_page(llu_i2obdexp(inode), - NULL, NULL, NULL, 0, - NULL, NULL, NULL, 0, - NULL); - - OBD_ALLOC(group, LLU_IO_GROUP_SIZE(maxpages)); - if (!group) - return ERR_PTR(-ENOMEM); - - I_REF(inode); - group->lig_inode = inode; - group->lig_maxpages = maxpages; - group->lig_params = params; - group->lig_llaps = (struct ll_async_page *)(group + 1); - group->lig_pages = (struct page *)(&group->lig_llaps[maxpages]); - group->lig_llap_cookies = (void *)(&group->lig_pages[maxpages]); - - rc = oig_init(&group->lig_oig); - if (rc) { - OBD_FREE(group, LLU_IO_GROUP_SIZE(maxpages)); - return ERR_PTR(rc); - } - - return group; -} - -static int max_io_pages(ssize_t len, int iovlen) -{ - return (((len + CFS_PAGE_SIZE -1) >> CFS_PAGE_SHIFT) + 2 + iovlen - 1); -} - -static -void put_io_group(struct llu_io_group *group) -{ - struct lov_stripe_md *lsm = llu_i2info(group->lig_inode)->lli_smd; - struct obd_export *exp = llu_i2obdexp(group->lig_inode); - struct ll_async_page *llap = group->lig_llaps; - int i; - - for (i = 0; i < group->lig_npages; i++, llap++) { - if (llap->llap_cookie) - obd_teardown_async_page(exp, lsm, NULL, - llap->llap_cookie); - } - - I_RELE(group->lig_inode); - - oig_release(group->lig_oig); - OBD_FREE(group, LLU_IO_GROUP_SIZE(group->lig_maxpages)); -} - -static -ssize_t llu_file_prwv(const struct iovec *iovec, int iovlen, - _SYSIO_OFF_T pos, ssize_t len, - void *private) -{ - struct llu_io_session *session = (struct llu_io_session *) private; - struct inode *inode = session->lis_inode; - struct llu_inode_info *lli = llu_i2info(inode); - struct intnl_stat *st = llu_i2stat(inode); - struct ll_file_data *fd = lli->lli_file_data; - struct lustre_handle lockh = {0}; - struct lov_stripe_md *lsm = lli->lli_smd; - struct obd_export *exp = NULL; - struct llu_io_group *iogroup; - struct lustre_rw_params p; - struct ost_lvb lvb; - __u64 kms; - int err, is_read, iovidx, ret; - int local_lock; - ssize_t ret_len = len; - ENTRY; - - /* in a large iov read/write we'll be repeatedly called. - * so give a chance to answer cancel ast here - */ - liblustre_wait_event(0); - - exp = llu_i2obdexp(inode); - if (exp == NULL) - RETURN(-EINVAL); - - if (len == 0 || iovlen == 0) - RETURN(0); - - if (pos + len > lli->lli_maxbytes) - RETURN(-ERANGE); - - lustre_build_lock_params(session->lis_cmd, lli->lli_open_flags, - lli->lli_sbi->ll_lco.lco_flags, - pos, len, &p); - - iogroup = get_io_group(inode, max_io_pages(len, iovlen), &p); - if (IS_ERR(iogroup)) - RETURN(PTR_ERR(iogroup)); - - local_lock = p.lrp_lock_mode != LCK_NL; - - err = llu_extent_lock(fd, inode, lsm, p.lrp_lock_mode, &p.lrp_policy, - &lockh, p.lrp_ast_flags); - if (err != ELDLM_OK) - GOTO(err_put, err); - - is_read = (session->lis_cmd == OBD_BRW_READ); - if (is_read) { - /* - * If OST-side locking is used, KMS can be completely out of - * date, and, hence, cannot be used for short-read - * detection. Rely in OST to handle short reads in that case. - */ - inode_init_lvb(inode, &lvb); - obd_merge_lvb(exp, lsm, &lvb, 1); - kms = lvb.lvb_size; - /* extent.end is last byte of the range */ - if (p.lrp_policy.l_extent.end >= kms) { - /* A glimpse is necessary to determine whether - * we return a short read or some zeroes at - * the end of the buffer - * - * In the case of OST-side locking KMS can be - * completely out of date and short-reads maybe - * mishandled. See llu_queue_pio() for more detailed - * comment. - */ - if ((err = llu_glimpse_size(inode))) { - GOTO(err_unlock, err); - } - } else { - st->st_size = kms; - } - } else if (lli->lli_open_flags & O_APPEND) { - pos = st->st_size; - } - - for (iovidx = 0; iovidx < iovlen; iovidx++) { - char *buf = (char *) iovec[iovidx].iov_base; - size_t count = iovec[iovidx].iov_len; - - if (!count) - continue; - if (len < count) - count = len; - if (IS_BAD_PTR(buf) || IS_BAD_PTR(buf + count)) { - GOTO(err_unlock, err = -EFAULT); - } - - if (is_read) { - if (/* local_lock && */ pos >= st->st_size) - break; - } else { - if (pos >= lli->lli_maxbytes) { - GOTO(err_unlock, err = -EFBIG); - } - if (pos + count >= lli->lli_maxbytes) - count = lli->lli_maxbytes - pos; - } - - ret = llu_queue_pio(session->lis_cmd, iogroup, buf, count, pos); - if (ret < 0) { - GOTO(err_unlock, err = ret); - } else { - pos += ret; - if (!is_read) { - LASSERT(ret == count); - obd_adjust_kms(exp, lsm, pos, 0); - /* file size grow immediately */ - if (pos > st->st_size) - st->st_size = pos; - } - len -= ret; - if (!len) - break; - } - } - LASSERT(len == 0 || is_read); /* libsysio should guarantee this */ - - err = obd_trigger_group_io(exp, lsm, NULL, iogroup->lig_oig); - if (err) - GOTO(err_unlock, err); - - err = oig_wait(iogroup->lig_oig); - if (err) { - CERROR("%s error: %s\n", is_read ? "read" : "write", strerror(-err)); - GOTO(err_unlock, err); - } - - ret = llu_extent_unlock(fd, inode, lsm, p.lrp_lock_mode, &lockh); - if (ret) - CERROR("extent unlock error %d\n", ret); - - session->lis_groups[session->lis_ngroups++] = iogroup; - RETURN(ret_len); - -err_unlock: - llu_extent_unlock(fd, inode, lsm, p.lrp_lock_mode, &lockh); -err_put: - put_io_group(iogroup); - RETURN((ssize_t)err); -} - -static -struct llu_io_session *get_io_session(struct inode *ino, int ngroups, int cmd) -{ - struct llu_io_session *session; - - OBD_ALLOC(session, LLU_IO_SESSION_SIZE(ngroups)); - if (!session) - return NULL; - - I_REF(ino); - session->lis_inode = ino; - session->lis_max_groups = ngroups; - session->lis_cmd = cmd; - return session; -} - -static void put_io_session(struct llu_io_session *session) -{ - int i; - - for (i = 0; i < session->lis_ngroups; i++) { - if (session->lis_groups[i]) { - put_io_group(session->lis_groups[i]); - session->lis_groups[i] = NULL; - } - } - - I_RELE(session->lis_inode); - OBD_FREE(session, LLU_IO_SESSION_SIZE(session->lis_max_groups)); -} - -static int llu_file_rwx(struct inode *ino, - struct ioctx *ioctx, - int read) -{ - struct llu_io_session *session; - ssize_t cc; - int cmd = read ? OBD_BRW_READ : OBD_BRW_WRITE; - ENTRY; - - LASSERT(ioctx->ioctx_xtvlen >= 0); - LASSERT(ioctx->ioctx_iovlen >= 0); - - liblustre_wait_event(0); - - if (!ioctx->ioctx_xtvlen) - RETURN(0); - - /* XXX consider other types later */ - if (S_ISDIR(llu_i2stat(ino)->st_mode)) - RETURN(-EISDIR); - if (!S_ISREG(llu_i2stat(ino)->st_mode)) - RETURN(-EOPNOTSUPP); - - session = get_io_session(ino, ioctx->ioctx_xtvlen * 2, cmd); - if (!session) - RETURN(-ENOMEM); - - cc = _sysio_enumerate_extents(ioctx->ioctx_xtv, ioctx->ioctx_xtvlen, - ioctx->ioctx_iov, ioctx->ioctx_iovlen, - llu_file_prwv, session); - - if (cc >= 0) { - LASSERT(!ioctx->ioctx_cc); - ioctx->ioctx_private = session; - cc = 0; - } else { - put_io_session(session); - } - - liblustre_wait_event(0); - RETURN(cc); -} - -int llu_iop_read(struct inode *ino, - struct ioctx *ioctx) -{ - /* BUG: 5972 */ - struct intnl_stat *st = llu_i2stat(ino); - st->st_atime = CURRENT_TIME; - - return llu_file_rwx(ino, ioctx, 1); -} - -int llu_iop_write(struct inode *ino, - struct ioctx *ioctx) -{ - struct intnl_stat *st = llu_i2stat(ino); - st->st_mtime = st->st_ctime = CURRENT_TIME; - - return llu_file_rwx(ino, ioctx, 0); -} - -int llu_iop_iodone(struct ioctx *ioctx) -{ - struct llu_io_session *session; - struct llu_io_group *group; - int i, err = 0, rc = 0; - ENTRY; - - liblustre_wait_event(0); - - session = (struct llu_io_session *) ioctx->ioctx_private; - LASSERT(session); - LASSERT(!IS_ERR(session)); - - for (i = 0; i < session->lis_ngroups; i++) { - group = session->lis_groups[i]; - if (group) { - if (!rc) { - err = oig_wait(group->lig_oig); - if (err) - rc = err; - } - if (!rc) - ioctx->ioctx_cc += group->lig_rwcount; - put_io_group(group); - session->lis_groups[i] = NULL; - } - } - - if (rc) { - LASSERT(rc < 0); - ioctx->ioctx_cc = -1; - ioctx->ioctx_errno = -rc; - } - - put_io_session(session); - ioctx->ioctx_private = NULL; - liblustre_wait_event(0); - - RETURN(1); -} diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c deleted file mode 100644 index 24b40580ad..0000000000 --- a/lustre/liblustre/super.c +++ /dev/null @@ -1,2102 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light Super operations - * - * Copyright (c) 2002-2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/queue.h> -#ifndef __CYGWIN__ -# include <sys/statvfs.h> -#else -# include <sys/statfs.h> -#endif - -#include <sysio.h> -#ifdef HAVE_XTIO_H -#include <xtio.h> -#endif -#include <fs.h> -#include <mount.h> -#include <inode.h> -#ifdef HAVE_FILE_H -#include <file.h> -#endif - -#undef LIST_HEAD - -#include "llite_lib.h" - -#ifndef MAY_EXEC -#define MAY_EXEC 1 -#define MAY_WRITE 2 -#define MAY_READ 4 -#endif - -#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH) - -static int ll_permission(struct inode *inode, int mask) -{ - struct intnl_stat *st = llu_i2stat(inode); - mode_t mode = st->st_mode; - - if (current->fsuid == st->st_uid) - mode >>= 6; - else if (in_group_p(st->st_gid)) - mode >>= 3; - - if ((mode & mask & (MAY_READ|MAY_WRITE|MAY_EXEC)) == mask) - return 0; - - if ((mask & (MAY_READ|MAY_WRITE)) || - (st->st_mode & S_IXUGO)) - if (capable(CAP_DAC_OVERRIDE)) - return 0; - - if (mask == MAY_READ || - (S_ISDIR(st->st_mode) && !(mask & MAY_WRITE))) { - if (capable(CAP_DAC_READ_SEARCH)) - return 0; - } - - return -EACCES; -} - -static void llu_fsop_gone(struct filesys *fs) -{ - struct llu_sb_info *sbi = (struct llu_sb_info *) fs->fs_private; - struct obd_device *obd = class_exp2obd(sbi->ll_mdc_exp); - int next = 0; - ENTRY; - - list_del(&sbi->ll_conn_chain); - obd_unregister_lock_cancel_cb(sbi->ll_osc_exp, - llu_extent_lock_cancel_cb); - obd_disconnect(sbi->ll_osc_exp); - obd_disconnect(sbi->ll_mdc_exp); - - while ((obd = class_devices_in_group(&sbi->ll_sb_uuid, &next)) != NULL) - class_manual_cleanup(obd); - - OBD_FREE(sbi, sizeof(*sbi)); - - liblustre_wait_idle(); - EXIT; -} - -static struct inode_ops llu_inode_ops; - -void llu_update_inode(struct inode *inode, struct mds_body *body, - struct lov_stripe_md *lsm) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct intnl_stat *st = llu_i2stat(inode); - - LASSERT ((lsm != NULL) == ((body->valid & OBD_MD_FLEASIZE) != 0)); - if (lsm != NULL) { - if (lli->lli_smd == NULL) { - lli->lli_smd = lsm; - lli->lli_maxbytes = lsm->lsm_maxbytes; - if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES) - lli->lli_maxbytes = PAGE_CACHE_MAXBYTES; - } else { - if (lov_stripe_md_cmp(lli->lli_smd, lsm)) { - CERROR("lsm mismatch for inode %lld\n", - (long long)st->st_ino); - LBUG(); - } - } - } - - if (body->valid & OBD_MD_FLID) - st->st_ino = body->ino; - if (body->valid & OBD_MD_FLATIME && - body->atime > LTIME_S(st->st_atime)) - LTIME_S(st->st_atime) = body->atime; - - /* mtime is always updated with ctime, but can be set in past. - As write and utime(2) may happen within 1 second, and utime's - mtime has a priority over write's one, so take mtime from mds - for the same ctimes. */ - if (body->valid & OBD_MD_FLCTIME && - body->ctime >= LTIME_S(st->st_ctime)) { - LTIME_S(st->st_ctime) = body->ctime; - if (body->valid & OBD_MD_FLMTIME) - LTIME_S(st->st_mtime) = body->mtime; - } - if (body->valid & OBD_MD_FLMODE) - st->st_mode = (st->st_mode & S_IFMT)|(body->mode & ~S_IFMT); - if (body->valid & OBD_MD_FLTYPE) - st->st_mode = (st->st_mode & ~S_IFMT)|(body->mode & S_IFMT); - if (S_ISREG(st->st_mode)) - st->st_blksize = min(2UL * PTLRPC_MAX_BRW_SIZE, LL_MAX_BLKSIZE); - else - st->st_blksize = 4096; - if (body->valid & OBD_MD_FLUID) - st->st_uid = body->uid; - if (body->valid & OBD_MD_FLGID) - st->st_gid = body->gid; - if (body->valid & OBD_MD_FLNLINK) - st->st_nlink = body->nlink; - if (body->valid & OBD_MD_FLRDEV) - st->st_rdev = body->rdev; - if (body->valid & OBD_MD_FLSIZE) - st->st_size = body->size; - if (body->valid & OBD_MD_FLBLOCKS) - st->st_blocks = body->blocks; - if (body->valid & OBD_MD_FLFLAGS) - lli->lli_st_flags = body->flags; - if (body->valid & OBD_MD_FLGENER) - lli->lli_st_generation = body->generation; - - /* fillin fid */ - if (body->valid & OBD_MD_FLID) - lli->lli_fid.id = body->ino; - if (body->valid & OBD_MD_FLGENER) - lli->lli_fid.generation = body->generation; - if (body->valid & OBD_MD_FLTYPE) - lli->lli_fid.f_type = body->mode & S_IFMT; -} - -void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid) -{ - struct llu_inode_info *lli = llu_i2info(dst); - struct intnl_stat *st = llu_i2stat(dst); - - valid &= src->o_valid; - - if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE,"valid "LPX64", cur time %lu/%lu, new %lu/%lu\n", - src->o_valid, - LTIME_S(st->st_mtime), LTIME_S(st->st_ctime), - (long)src->o_mtime, (long)src->o_ctime); - - if (valid & OBD_MD_FLATIME) - LTIME_S(st->st_atime) = src->o_atime; - if (valid & OBD_MD_FLMTIME) - LTIME_S(st->st_mtime) = src->o_mtime; - if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(st->st_ctime)) - LTIME_S(st->st_ctime) = src->o_ctime; - if (valid & OBD_MD_FLSIZE) - st->st_size = src->o_size; - if (valid & OBD_MD_FLBLOCKS) /* allocation of space */ - st->st_blocks = src->o_blocks; - if (valid & OBD_MD_FLBLKSZ) - st->st_blksize = src->o_blksize; - if (valid & OBD_MD_FLTYPE) - st->st_mode = (st->st_mode & ~S_IFMT) | (src->o_mode & S_IFMT); - if (valid & OBD_MD_FLMODE) - st->st_mode = (st->st_mode & S_IFMT) | (src->o_mode & ~S_IFMT); - if (valid & OBD_MD_FLUID) - st->st_uid = src->o_uid; - if (valid & OBD_MD_FLGID) - st->st_gid = src->o_gid; - if (valid & OBD_MD_FLFLAGS) - lli->lli_st_flags = src->o_flags; - if (valid & OBD_MD_FLGENER) - lli->lli_st_generation = src->o_generation; -} - -#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO) -#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO) - -void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid) -{ - struct llu_inode_info *lli = llu_i2info(src); - struct intnl_stat *st = llu_i2stat(src); - obd_flag newvalid = 0; - - if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n", - valid, LTIME_S(st->st_mtime), - LTIME_S(st->st_ctime)); - - if (valid & OBD_MD_FLATIME) { - dst->o_atime = LTIME_S(st->st_atime); - newvalid |= OBD_MD_FLATIME; - } - if (valid & OBD_MD_FLMTIME) { - dst->o_mtime = LTIME_S(st->st_mtime); - newvalid |= OBD_MD_FLMTIME; - } - if (valid & OBD_MD_FLCTIME) { - dst->o_ctime = LTIME_S(st->st_ctime); - newvalid |= OBD_MD_FLCTIME; - } - if (valid & OBD_MD_FLSIZE) { - dst->o_size = st->st_size; - newvalid |= OBD_MD_FLSIZE; - } - if (valid & OBD_MD_FLBLOCKS) { /* allocation of space (x512 bytes) */ - dst->o_blocks = st->st_blocks; - newvalid |= OBD_MD_FLBLOCKS; - } - if (valid & OBD_MD_FLBLKSZ) { /* optimal block size */ - dst->o_blksize = st->st_blksize; - newvalid |= OBD_MD_FLBLKSZ; - } - if (valid & OBD_MD_FLTYPE) { - dst->o_mode = (dst->o_mode & S_IALLUGO)|(st->st_mode & S_IFMT); - newvalid |= OBD_MD_FLTYPE; - } - if (valid & OBD_MD_FLMODE) { - dst->o_mode = (dst->o_mode & S_IFMT)|(st->st_mode & S_IALLUGO); - newvalid |= OBD_MD_FLMODE; - } - if (valid & OBD_MD_FLUID) { - dst->o_uid = st->st_uid; - newvalid |= OBD_MD_FLUID; - } - if (valid & OBD_MD_FLGID) { - dst->o_gid = st->st_gid; - newvalid |= OBD_MD_FLGID; - } - if (valid & OBD_MD_FLFLAGS) { - dst->o_flags = lli->lli_st_flags; - newvalid |= OBD_MD_FLFLAGS; - } - if (valid & OBD_MD_FLGENER) { - dst->o_generation = lli->lli_st_generation; - newvalid |= OBD_MD_FLGENER; - } - if (valid & OBD_MD_FLFID) { - dst->o_fid = st->st_ino; - newvalid |= OBD_MD_FLFID; - } - - dst->o_valid |= newvalid; -} - -/* - * really does the getattr on the inode and updates its fields - */ -int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct obd_export *exp = llu_i2obdexp(inode); - struct ptlrpc_request_set *set; - struct obd_info oinfo = { { { 0 } } }; - struct obdo oa = { 0 }; - obd_flag refresh_valid; - int rc; - ENTRY; - - LASSERT(lsm); - LASSERT(lli); - - oinfo.oi_md = lsm; - oinfo.oi_oa = &oa; - oa.o_id = lsm->lsm_object_id; - oa.o_mode = S_IFREG; - oa.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLSIZE | - OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME | - OBD_MD_FLCTIME; - - set = ptlrpc_prep_set(); - if (set == NULL) { - CERROR ("ENOMEM allocing request set\n"); - rc = -ENOMEM; - } else { - rc = obd_getattr_async(exp, &oinfo, set); - if (rc == 0) - rc = ptlrpc_set_wait(set); - ptlrpc_set_destroy(set); - } - if (rc) - RETURN(rc); - - refresh_valid = OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME | - OBD_MD_FLCTIME | OBD_MD_FLSIZE; - - obdo_refresh_inode(inode, &oa, refresh_valid); - - RETURN(0); -} - -static struct inode* llu_new_inode(struct filesys *fs, - struct ll_fid *fid) -{ - struct inode *inode; - struct llu_inode_info *lli; - struct intnl_stat st = { - .st_dev = 0, -#ifndef AUTOMOUNT_FILE_NAME - .st_mode = fid->f_type & S_IFMT, -#else - .st_mode = fid->f_type /* all of the bits! */ -#endif - .st_uid = geteuid(), - .st_gid = getegid(), - }; - - OBD_ALLOC(lli, sizeof(*lli)); - if (!lli) - return NULL; - - /* initialize lli here */ - lli->lli_sbi = llu_fs2sbi(fs); - lli->lli_smd = NULL; - lli->lli_symlink_name = NULL; - lli->lli_flags = 0; - lli->lli_maxbytes = (__u64)(~0UL); - lli->lli_file_data = NULL; - - lli->lli_sysio_fid.fid_data = &lli->lli_fid; - lli->lli_sysio_fid.fid_len = sizeof(lli->lli_fid); - lli->lli_fid = *fid; - - /* file identifier is needed by functions like _sysio_i_find() */ - inode = _sysio_i_new(fs, &lli->lli_sysio_fid, - &st, 0, &llu_inode_ops, lli); - - if (!inode) - OBD_FREE(lli, sizeof(*lli)); - - return inode; -} - -static int llu_have_md_lock(struct inode *inode, __u64 lockpart) -{ - struct llu_sb_info *sbi = llu_i2sbi(inode); - struct llu_inode_info *lli = llu_i2info(inode); - struct lustre_handle lockh; - struct ldlm_res_id res_id = { .name = {0} }; - struct obd_device *obddev; - ldlm_policy_data_t policy = { .l_inodebits = { lockpart } }; - int flags; - ENTRY; - - LASSERT(inode); - - obddev = sbi->ll_mdc_exp->exp_obd; - res_id.name[0] = llu_i2stat(inode)->st_ino; - res_id.name[1] = lli->lli_st_generation; - - CDEBUG(D_INFO, "trying to match res "LPU64"\n", res_id.name[0]); - - flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_CBPENDING | LDLM_FL_TEST_LOCK; - if (ldlm_lock_match(obddev->obd_namespace, flags, &res_id, LDLM_IBITS, - &policy, LCK_CR|LCK_CW|LCK_PR|LCK_PW, &lockh)) { - RETURN(1); - } - RETURN(0); -} - -static int llu_inode_revalidate(struct inode *inode) -{ - struct lov_stripe_md *lsm = NULL; - ENTRY; - - if (!inode) { - CERROR("REPORT THIS LINE TO PETER\n"); - RETURN(0); - } - - if (!llu_have_md_lock(inode, MDS_INODELOCK_UPDATE)) { - struct lustre_md md; - struct ptlrpc_request *req = NULL; - struct llu_sb_info *sbi = llu_i2sbi(inode); - struct ll_fid fid; - unsigned long valid = OBD_MD_FLGETATTR; - int rc, ealen = 0; - - /* Why don't we update all valid MDS fields here, if we're - * doing an RPC anyways? -phil */ - if (S_ISREG(llu_i2stat(inode)->st_mode)) { - ealen = obd_size_diskmd(sbi->ll_osc_exp, NULL); - valid |= OBD_MD_FLEASIZE; - } - ll_inode2fid(&fid, inode); - rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, ealen, &req); - if (rc) { - CERROR("failure %d inode %llu\n", rc, - (long long)llu_i2stat(inode)->st_ino); - RETURN(-abs(rc)); - } - rc = mdc_req2lustre_md(req, REPLY_REC_OFF, sbi->ll_osc_exp,&md); - - /* XXX Too paranoid? */ - if (((md.body->valid ^ valid) & OBD_MD_FLEASIZE) && - !((md.body->valid & OBD_MD_FLNLINK) && - (md.body->nlink == 0))) { - CERROR("Asked for %s eadata but got %s (%d)\n", - (valid & OBD_MD_FLEASIZE) ? "some" : "no", - (md.body->valid & OBD_MD_FLEASIZE) ? "some":"none", - md.body->eadatasize); - } - if (rc) { - ptlrpc_req_finished(req); - RETURN(rc); - } - - - llu_update_inode(inode, md.body, md.lsm); - if (md.lsm != NULL && llu_i2info(inode)->lli_smd != md.lsm) - obd_free_memmd(sbi->ll_osc_exp, &md.lsm); - - if (md.body->valid & OBD_MD_FLSIZE) - set_bit(LLI_F_HAVE_MDS_SIZE_LOCK, - &llu_i2info(inode)->lli_flags); - ptlrpc_req_finished(req); - } - - lsm = llu_i2info(inode)->lli_smd; - if (!lsm) /* object not yet allocated, don't validate size */ - RETURN(0); - - /* ll_glimpse_size will prefer locally cached writes if they extend - * the file */ - RETURN(llu_glimpse_size(inode)); -} - -static void copy_stat_buf(struct inode *ino, struct intnl_stat *b) -{ - *b = *llu_i2stat(ino); -} - -static int llu_iop_getattr(struct pnode *pno, - struct inode *ino, - struct intnl_stat *b) -{ - int rc; - ENTRY; - - liblustre_wait_event(0); - - if (!ino) { - LASSERT(pno); - LASSERT(pno->p_base->pb_ino); - ino = pno->p_base->pb_ino; - } else { - LASSERT(!pno || pno->p_base->pb_ino == ino); - } - - /* libsysio might call us directly without intent lock, - * we must re-fetch the attrs here - */ - rc = llu_inode_revalidate(ino); - if (!rc) { - copy_stat_buf(ino, b); - LASSERT(!llu_i2info(ino)->lli_it); - } - - liblustre_wait_event(0); - RETURN(rc); -} - -static int null_if_equal(struct ldlm_lock *lock, void *data) -{ - if (data == lock->l_ast_data) { - lock->l_ast_data = NULL; - - if (lock->l_req_mode != lock->l_granted_mode) - LDLM_ERROR(lock,"clearing inode with ungranted lock\n"); - } - - return LDLM_ITER_CONTINUE; -} - -void llu_clear_inode(struct inode *inode) -{ - struct ll_fid fid; - struct llu_inode_info *lli = llu_i2info(inode); - struct llu_sb_info *sbi = llu_i2sbi(inode); - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu(%p)\n", - (long long)llu_i2stat(inode)->st_ino, lli->lli_st_generation, - inode); - - ll_inode2fid(&fid, inode); - clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &(lli->lli_flags)); - mdc_change_cbdata(sbi->ll_mdc_exp, &fid, null_if_equal, inode); - - if (lli->lli_smd) - obd_change_cbdata(sbi->ll_osc_exp, lli->lli_smd, - null_if_equal, inode); - - if (lli->lli_smd) { - obd_free_memmd(sbi->ll_osc_exp, &lli->lli_smd); - lli->lli_smd = NULL; - } - - if (lli->lli_symlink_name) { - OBD_FREE(lli->lli_symlink_name, - strlen(lli->lli_symlink_name) + 1); - lli->lli_symlink_name = NULL; - } - - EXIT; -} - -void llu_iop_gone(struct inode *inode) -{ - struct llu_inode_info *lli = llu_i2info(inode); - ENTRY; - - liblustre_wait_event(0); - llu_clear_inode(inode); - - OBD_FREE(lli, sizeof(*lli)); - EXIT; -} - -static int inode_setattr(struct inode * inode, struct iattr * attr) -{ - unsigned int ia_valid = attr->ia_valid; - struct intnl_stat *st = llu_i2stat(inode); - int error = 0; - - /* - * inode_setattr() is only ever invoked with ATTR_SIZE (by - * llu_setattr_raw()) when file has no bodies. Check this. - */ - LASSERT(ergo(ia_valid & ATTR_SIZE, llu_i2info(inode)->lli_smd == NULL)); - - if (ia_valid & ATTR_SIZE) - st->st_size = attr->ia_size; - if (ia_valid & ATTR_UID) - st->st_uid = attr->ia_uid; - if (ia_valid & ATTR_GID) - st->st_gid = attr->ia_gid; - if (ia_valid & ATTR_ATIME) - st->st_atime = attr->ia_atime; - if (ia_valid & ATTR_MTIME) - st->st_mtime = attr->ia_mtime; - if (ia_valid & ATTR_CTIME) - st->st_ctime = attr->ia_ctime; - if (ia_valid & ATTR_MODE) { - st->st_mode = attr->ia_mode; - if (!in_group_p(st->st_gid) && !capable(CAP_FSETID)) - st->st_mode &= ~S_ISGID; - } - /* mark_inode_dirty(inode); */ - return error; -} - -/* If this inode has objects allocated to it (lsm != NULL), then the OST - * object(s) determine the file size and mtime. Otherwise, the MDS will - * keep these values until such a time that objects are allocated for it. - * We do the MDS operations first, as it is checking permissions for us. - * We don't to the MDS RPC if there is nothing that we want to store there, - * otherwise there is no harm in updating mtime/atime on the MDS if we are - * going to do an RPC anyways. - * - * If we are doing a truncate, we will send the mtime and ctime updates - * to the OST with the punch RPC, otherwise we do an explicit setattr RPC. - * I don't believe it is possible to get e.g. ATTR_MTIME_SET and ATTR_SIZE - * at the same time. - */ -int llu_setattr_raw(struct inode *inode, struct iattr *attr) -{ - struct lov_stripe_md *lsm = llu_i2info(inode)->lli_smd; - struct llu_sb_info *sbi = llu_i2sbi(inode); - struct intnl_stat *st = llu_i2stat(inode); - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data; - int ia_valid = attr->ia_valid; - int rc = 0; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu\n", (long long)st->st_ino); - - if (ia_valid & ATTR_SIZE) { - if (attr->ia_size > ll_file_maxbytes(inode)) { - CDEBUG(D_INODE, "file too large %llu > "LPU64"\n", - (long long)attr->ia_size, - ll_file_maxbytes(inode)); - RETURN(-EFBIG); - } - - attr->ia_valid |= ATTR_MTIME | ATTR_CTIME; - } - - /* We mark all of the fields "set" so MDS/OST does not re-set them */ - if (attr->ia_valid & ATTR_CTIME) { - attr->ia_ctime = CURRENT_TIME; - attr->ia_valid |= ATTR_CTIME_SET; - } - if (!(ia_valid & ATTR_ATIME_SET) && (attr->ia_valid & ATTR_ATIME)) { - attr->ia_atime = CURRENT_TIME; - attr->ia_valid |= ATTR_ATIME_SET; - } - if (!(ia_valid & ATTR_MTIME_SET) && (attr->ia_valid & ATTR_MTIME)) { - attr->ia_mtime = CURRENT_TIME; - attr->ia_valid |= ATTR_MTIME_SET; - } - if ((attr->ia_valid & ATTR_CTIME) && !(attr->ia_valid & ATTR_MTIME)) { - /* To avoid stale mtime on mds, obtain it from ost and send - to mds. */ - rc = llu_glimpse_size(inode); - if (rc) - RETURN(rc); - - attr->ia_valid |= ATTR_MTIME_SET | ATTR_MTIME; - attr->ia_mtime = inode->i_stbuf.st_mtime; - } - - if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %lu\n", - LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), - LTIME_S(CURRENT_TIME)); - if (lsm) - attr->ia_valid &= ~ATTR_SIZE; - - /* If only OST attributes being set on objects, don't do MDS RPC. - * In that case, we need to check permissions and update the local - * inode ourselves so we can call obdo_from_inode() always. */ - if (ia_valid & (lsm ? ~(ATTR_SIZE | ATTR_FROM_OPEN | ATTR_RAW) : ~0)) { - struct lustre_md md; - llu_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0); - - rc = mdc_setattr(sbi->ll_mdc_exp, &op_data, - attr, NULL, 0, NULL, 0, &request); - - if (rc) { - ptlrpc_req_finished(request); - if (rc != -EPERM && rc != -EACCES) - CERROR("mdc_setattr fails: rc = %d\n", rc); - RETURN(rc); - } - - rc = mdc_req2lustre_md(request, REPLY_REC_OFF, sbi->ll_osc_exp, - &md); - if (rc) { - ptlrpc_req_finished(request); - RETURN(rc); - } - - /* We call inode_setattr to adjust timestamps. - * If there is at least some data in file, we cleared ATTR_SIZE - * above to avoid invoking vmtruncate, otherwise it is important - * to call vmtruncate in inode_setattr to update inode->i_size - * (bug 6196) */ - inode_setattr(inode, attr); - llu_update_inode(inode, md.body, md.lsm); - ptlrpc_req_finished(request); - - if (!lsm || !S_ISREG(st->st_mode)) { - CDEBUG(D_INODE, "no lsm: not setting attrs on OST\n"); - RETURN(0); - } - } else { - /* The OST doesn't check permissions, but the alternative is - * a gratuitous RPC to the MDS. We already rely on the client - * to do read/write/truncate permission checks, so is mtime OK? - */ - if (ia_valid & (ATTR_MTIME | ATTR_ATIME)) { - /* from sys_utime() */ - if (!(ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET))) { - if (current->fsuid != st->st_uid && - (rc = ll_permission(inode, MAY_WRITE)) != 0) - RETURN(rc); - } else { - /* from inode_change_ok() */ - if (current->fsuid != st->st_uid && - !capable(CAP_FOWNER)) - RETURN(-EPERM); - } - } - - /* Won't invoke llu_vmtruncate(), as we already cleared - * ATTR_SIZE */ - inode_setattr(inode, attr); - } - - if (ia_valid & ATTR_SIZE) { - ldlm_policy_data_t policy = { .l_extent = {attr->ia_size, - OBD_OBJECT_EOF} }; - struct lustre_handle lockh = { 0, }; - struct lustre_handle match_lockh = { 0, }; - - int err; - int flags = LDLM_FL_TEST_LOCK; /* for assertion check below */ - int lock_mode; - obd_flag obd_flags; - - /* check that there are no matching locks */ - LASSERT(obd_match(sbi->ll_osc_exp, lsm, LDLM_EXTENT, &policy, - LCK_PW, &flags, inode, &match_lockh) <= 0); - - /* XXX when we fix the AST intents to pass the discard-range - * XXX extent, make ast_flags always LDLM_AST_DISCARD_DATA - * XXX here. */ - flags = (attr->ia_size == 0) ? LDLM_AST_DISCARD_DATA : 0; - - if (sbi->ll_lco.lco_flags & OBD_CONNECT_TRUNCLOCK) { - lock_mode = LCK_NL; - obd_flags = OBD_FL_TRUNCLOCK; - CDEBUG(D_INODE, "delegating locking to the OST"); - } else { - lock_mode = LCK_PW; - obd_flags = 0; - } - - /* with lock_mode == LK_NL no lock is taken. */ - rc = llu_extent_lock(NULL, inode, lsm, lock_mode, &policy, - &lockh, flags); - if (rc != ELDLM_OK) { - if (rc > 0) - RETURN(-ENOLCK); - RETURN(rc); - } - - rc = llu_vmtruncate(inode, attr->ia_size, obd_flags); - - /* unlock now as we don't mind others file lockers racing with - * the mds updates below? */ - err = llu_extent_unlock(NULL, inode, lsm, lock_mode, &lockh); - if (err) { - CERROR("llu_extent_unlock failed: %d\n", err); - if (!rc) - rc = err; - } - } else if (ia_valid & (ATTR_MTIME | ATTR_MTIME_SET)) { - struct obd_info oinfo = { { { 0 } } }; - struct obdo oa; - - CDEBUG(D_INODE, "set mtime on OST inode %llu to %lu\n", - (long long)st->st_ino, LTIME_S(attr->ia_mtime)); - oa.o_id = lsm->lsm_object_id; - oa.o_valid = OBD_MD_FLID; - - obdo_from_inode(&oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME | - OBD_MD_FLMTIME | OBD_MD_FLCTIME); - - oinfo.oi_oa = &oa; - oinfo.oi_md = lsm; - - rc = obd_setattr_rqset(sbi->ll_osc_exp, &oinfo, NULL); - if (rc) - CERROR("obd_setattr_async fails: rc=%d\n", rc); - } - RETURN(rc); -} - -/* here we simply act as a thin layer to glue it with - * llu_setattr_raw(), which is copy from kernel - */ -static int llu_iop_setattr(struct pnode *pno, - struct inode *ino, - unsigned mask, - struct intnl_stat *stbuf) -{ - struct iattr iattr; - int rc; - ENTRY; - - liblustre_wait_event(0); - - LASSERT(!(mask & ~(SETATTR_MTIME | SETATTR_ATIME | - SETATTR_UID | SETATTR_GID | - SETATTR_LEN | SETATTR_MODE))); - memset(&iattr, 0, sizeof(iattr)); - - if (mask & SETATTR_MODE) { - iattr.ia_mode = stbuf->st_mode; - iattr.ia_valid |= ATTR_MODE; - } - if (mask & SETATTR_MTIME) { - iattr.ia_mtime = stbuf->st_mtime; - iattr.ia_valid |= ATTR_MTIME | ATTR_MTIME_SET; - } - if (mask & SETATTR_ATIME) { - iattr.ia_atime = stbuf->st_atime; - iattr.ia_valid |= ATTR_ATIME | ATTR_ATIME_SET; - } - if (mask & SETATTR_UID) { - iattr.ia_uid = stbuf->st_uid; - iattr.ia_valid |= ATTR_UID; - } - if (mask & SETATTR_GID) { - iattr.ia_gid = stbuf->st_gid; - iattr.ia_valid |= ATTR_GID; - } - if (mask & SETATTR_LEN) { - iattr.ia_size = stbuf->st_size; /* XXX signed expansion problem */ - iattr.ia_valid |= ATTR_SIZE; - } - - iattr.ia_valid |= ATTR_RAW | ATTR_CTIME; - iattr.ia_ctime = CURRENT_TIME; - - rc = llu_setattr_raw(ino, &iattr); - liblustre_wait_idle(); - RETURN(rc); -} - -#define EXT2_LINK_MAX 32000 - -static int llu_iop_symlink_raw(struct pnode *pno, const char *tgt) -{ - struct inode *dir = pno->p_base->pb_parent->pb_ino; - struct qstr *qstr = &pno->p_base->pb_name; - const char *name = qstr->name; - int len = qstr->len; - struct ptlrpc_request *request = NULL; - struct llu_sb_info *sbi = llu_i2sbi(dir); - struct mdc_op_data op_data; - int err = -EMLINK; - ENTRY; - - liblustre_wait_event(0); - if (llu_i2stat(dir)->st_nlink >= EXT2_LINK_MAX) - RETURN(err); - - llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0); - err = mdc_create(sbi->ll_mdc_exp, &op_data, - tgt, strlen(tgt) + 1, S_IFLNK | S_IRWXUGO, - current->fsuid, current->fsgid, current->cap_effective, - 0, &request); - ptlrpc_req_finished(request); - liblustre_wait_event(0); - RETURN(err); -} - -static int llu_readlink_internal(struct inode *inode, - struct ptlrpc_request **request, - char **symname) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct llu_sb_info *sbi = llu_i2sbi(inode); - struct ll_fid fid; - struct mds_body *body; - struct intnl_stat *st = llu_i2stat(inode); - int rc, symlen = st->st_size + 1; - ENTRY; - - *request = NULL; - - if (lli->lli_symlink_name) { - *symname = lli->lli_symlink_name; - CDEBUG(D_INODE, "using cached symlink %s\n", *symname); - RETURN(0); - } - - ll_inode2fid(&fid, inode); - rc = mdc_getattr(sbi->ll_mdc_exp, &fid, - OBD_MD_LINKNAME, symlen, request); - if (rc) { - CERROR("inode %llu: rc = %d\n", (long long)st->st_ino, rc); - RETURN(rc); - } - - body = lustre_msg_buf((*request)->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); - LASSERT(lustre_rep_swabbed(*request, REPLY_REC_OFF)); - - if ((body->valid & OBD_MD_LINKNAME) == 0) { - CERROR ("OBD_MD_LINKNAME not set on reply\n"); - GOTO (failed, rc = -EPROTO); - } - - LASSERT(symlen != 0); - if (body->eadatasize != symlen) { - CERROR("inode %llu: symlink length %d not expected %d\n", - (long long)st->st_ino, body->eadatasize - 1, symlen - 1); - GOTO(failed, rc = -EPROTO); - } - - *symname = lustre_msg_buf((*request)->rq_repmsg, REPLY_REC_OFF + 1, - symlen); - if (*symname == NULL || - strnlen(*symname, symlen) != symlen - 1) { - /* not full/NULL terminated */ - CERROR("inode %llu: symlink not NULL terminated string" - "of length %d\n", (long long)st->st_ino, symlen - 1); - GOTO(failed, rc = -EPROTO); - } - - OBD_ALLOC(lli->lli_symlink_name, symlen); - /* do not return an error if we cannot cache the symlink locally */ - if (lli->lli_symlink_name) - memcpy(lli->lli_symlink_name, *symname, symlen); - - RETURN(0); - - failed: - ptlrpc_req_finished (*request); - RETURN (-EPROTO); -} - -static int llu_iop_readlink(struct pnode *pno, char *data, size_t bufsize) -{ - struct inode *inode = pno->p_base->pb_ino; - struct ptlrpc_request *request; - char *symname; - int rc; - ENTRY; - - liblustre_wait_event(0); - rc = llu_readlink_internal(inode, &request, &symname); - if (rc) - GOTO(out, rc); - - LASSERT(symname); - strncpy(data, symname, bufsize); - rc = strlen(symname); - - ptlrpc_req_finished(request); - out: - liblustre_wait_event(0); - RETURN(rc); -} - -static int llu_iop_mknod_raw(struct pnode *pno, - mode_t mode, - dev_t dev) -{ - struct ptlrpc_request *request = NULL; - struct inode *dir = pno->p_parent->p_base->pb_ino; - struct llu_sb_info *sbi = llu_i2sbi(dir); - struct mdc_op_data op_data; - int err = -EMLINK; - ENTRY; - - liblustre_wait_event(0); - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu\n", - (int)pno->p_base->pb_name.len, pno->p_base->pb_name.name, - (long long)llu_i2stat(dir)->st_ino); - - if (llu_i2stat(dir)->st_nlink >= EXT2_LINK_MAX) - RETURN(err); - - switch (mode & S_IFMT) { - case 0: - case S_IFREG: - mode |= S_IFREG; /* for mode = 0 case, fallthrough */ - case S_IFCHR: - case S_IFBLK: - case S_IFIFO: - case S_IFSOCK: - llu_prepare_mdc_op_data(&op_data, dir, NULL, - pno->p_base->pb_name.name, - pno->p_base->pb_name.len, - 0); - err = mdc_create(sbi->ll_mdc_exp, &op_data, NULL, 0, mode, - current->fsuid, current->fsgid, - current->cap_effective, dev, &request); - ptlrpc_req_finished(request); - break; - case S_IFDIR: - err = -EPERM; - break; - default: - err = -EINVAL; - } - liblustre_wait_event(0); - RETURN(err); -} - -static int llu_iop_link_raw(struct pnode *old, struct pnode *new) -{ - struct inode *src = old->p_base->pb_ino; - struct inode *dir = new->p_parent->p_base->pb_ino; - const char *name = new->p_base->pb_name.name; - int namelen = new->p_base->pb_name.len; - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data; - int rc; - ENTRY; - - LASSERT(src); - LASSERT(dir); - - liblustre_wait_event(0); - llu_prepare_mdc_op_data(&op_data, src, dir, name, namelen, 0); - rc = mdc_link(llu_i2sbi(src)->ll_mdc_exp, &op_data, &request); - ptlrpc_req_finished(request); - liblustre_wait_event(0); - - RETURN(rc); -} - -/* - * libsysio will clear the inode immediately after return - */ -static int llu_iop_unlink_raw(struct pnode *pno) -{ - struct inode *dir = pno->p_base->pb_parent->pb_ino; - struct qstr *qstr = &pno->p_base->pb_name; - const char *name = qstr->name; - int len = qstr->len; - struct inode *target = pno->p_base->pb_ino; - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data; - int rc; - ENTRY; - - LASSERT(target); - - liblustre_wait_event(0); - llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0); - rc = mdc_unlink(llu_i2sbi(dir)->ll_mdc_exp, &op_data, &request); - if (!rc) - rc = llu_objects_destroy(request, dir); - ptlrpc_req_finished(request); - liblustre_wait_idle(); - - RETURN(rc); -} - -static int llu_iop_rename_raw(struct pnode *old, struct pnode *new) -{ - struct inode *src = old->p_parent->p_base->pb_ino; - struct inode *tgt = new->p_parent->p_base->pb_ino; - const char *oldname = old->p_base->pb_name.name; - int oldnamelen = old->p_base->pb_name.len; - const char *newname = new->p_base->pb_name.name; - int newnamelen = new->p_base->pb_name.len; - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data; - int rc; - ENTRY; - - LASSERT(src); - LASSERT(tgt); - - liblustre_wait_event(0); - llu_prepare_mdc_op_data(&op_data, src, tgt, NULL, 0, 0); - rc = mdc_rename(llu_i2sbi(src)->ll_mdc_exp, &op_data, - oldname, oldnamelen, newname, newnamelen, - &request); - if (!rc) { - rc = llu_objects_destroy(request, src); - } - - ptlrpc_req_finished(request); - liblustre_wait_idle(); - - RETURN(rc); -} - -#ifdef _HAVE_STATVFS -static int llu_statfs_internal(struct llu_sb_info *sbi, - struct obd_statfs *osfs, __u64 max_age) -{ - struct obd_statfs obd_osfs; - int rc; - ENTRY; - - rc = obd_statfs(class_exp2obd(sbi->ll_mdc_exp), osfs, max_age, 0); - if (rc) { - CERROR("mdc_statfs fails: rc = %d\n", rc); - RETURN(rc); - } - - CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n", - osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files); - - rc = obd_statfs_rqset(class_exp2obd(sbi->ll_osc_exp), - &obd_osfs, max_age, 0); - if (rc) { - CERROR("obd_statfs fails: rc = %d\n", rc); - RETURN(rc); - } - - CDEBUG(D_SUPER, "OSC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n", - obd_osfs.os_bavail, obd_osfs.os_blocks, obd_osfs.os_ffree, - obd_osfs.os_files); - - osfs->os_blocks = obd_osfs.os_blocks; - osfs->os_bfree = obd_osfs.os_bfree; - osfs->os_bavail = obd_osfs.os_bavail; - - /* If we don't have as many objects free on the OST as inodes - * on the MDS, we reduce the total number of inodes to - * compensate, so that the "inodes in use" number is correct. - */ - if (obd_osfs.os_ffree < osfs->os_ffree) { - osfs->os_files = (osfs->os_files - osfs->os_ffree) + - obd_osfs.os_ffree; - osfs->os_ffree = obd_osfs.os_ffree; - } - - RETURN(rc); -} - -static int llu_statfs(struct llu_sb_info *sbi, struct statfs *sfs) -{ - struct obd_statfs osfs; - int rc; - - CDEBUG(D_VFSTRACE, "VFS Op:\n"); - - /* For now we will always get up-to-date statfs values, but in the - * future we may allow some amount of caching on the client (e.g. - * from QOS or lprocfs updates). */ - rc = llu_statfs_internal(sbi, &osfs, cfs_time_current_64() - HZ); - if (rc) - return rc; - - statfs_unpack(sfs, &osfs); - - if (sizeof(sfs->f_blocks) == 4) { - while (osfs.os_blocks > ~0UL) { - sfs->f_bsize <<= 1; - - osfs.os_blocks >>= 1; - osfs.os_bfree >>= 1; - osfs.os_bavail >>= 1; - } - } - - sfs->f_blocks = osfs.os_blocks; - sfs->f_bfree = osfs.os_bfree; - sfs->f_bavail = osfs.os_bavail; - - return 0; -} - -static int llu_iop_statvfs(struct pnode *pno, - struct inode *ino, - struct intnl_statvfs *buf) -{ - struct statfs fs; - int rc; - ENTRY; - - liblustre_wait_event(0); - -#ifndef __CYGWIN__ - LASSERT(pno->p_base->pb_ino); - rc = llu_statfs(llu_i2sbi(pno->p_base->pb_ino), &fs); - if (rc) - RETURN(rc); - - /* from native driver */ - buf->f_bsize = fs.f_bsize; /* file system block size */ - buf->f_frsize = fs.f_bsize; /* file system fundamental block size */ - buf->f_blocks = fs.f_blocks; - buf->f_bfree = fs.f_bfree; - buf->f_bavail = fs.f_bavail; - buf->f_files = fs.f_files; /* Total number serial numbers */ - buf->f_ffree = fs.f_ffree; /* Number free serial numbers */ - buf->f_favail = fs.f_ffree; /* Number free ser num for non-privileged*/ - buf->f_fsid = fs.f_fsid.__val[1]; - buf->f_flag = 0; /* No equiv in statfs; maybe use type? */ - buf->f_namemax = fs.f_namelen; -#endif - - liblustre_wait_event(0); - RETURN(0); -} -#endif /* _HAVE_STATVFS */ - -static int llu_iop_mkdir_raw(struct pnode *pno, mode_t mode) -{ - struct inode *dir = pno->p_base->pb_parent->pb_ino; - struct qstr *qstr = &pno->p_base->pb_name; - const char *name = qstr->name; - int len = qstr->len; - struct ptlrpc_request *request = NULL; - struct intnl_stat *st = llu_i2stat(dir); - struct mdc_op_data op_data; - int err = -EMLINK; - ENTRY; - - liblustre_wait_event(0); - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu/%lu(%p)\n", len, name, - (long long)st->st_ino, llu_i2info(dir)->lli_st_generation, dir); - - if (st->st_nlink >= EXT2_LINK_MAX) - RETURN(err); - - llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0); - err = mdc_create(llu_i2sbi(dir)->ll_mdc_exp, &op_data, NULL, 0, mode | S_IFDIR, - current->fsuid, current->fsgid, current->cap_effective, - 0, &request); - ptlrpc_req_finished(request); - liblustre_wait_event(0); - RETURN(err); -} - -static int llu_iop_rmdir_raw(struct pnode *pno) -{ - struct inode *dir = pno->p_base->pb_parent->pb_ino; - struct qstr *qstr = &pno->p_base->pb_name; - const char *name = qstr->name; - int len = qstr->len; - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data; - int rc; - ENTRY; - - liblustre_wait_event(0); - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu/%lu(%p)\n", len, name, - (long long)llu_i2stat(dir)->st_ino, - llu_i2info(dir)->lli_st_generation, dir); - - llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, S_IFDIR); - rc = mdc_unlink(llu_i2sbi(dir)->ll_mdc_exp, &op_data, &request); - ptlrpc_req_finished(request); - - liblustre_wait_event(0); - RETURN(rc); -} - -#ifdef O_DIRECT -#define FCNTL_FLMASK (O_APPEND|O_NONBLOCK|O_ASYNC|O_DIRECT) -#else -#define FCNTL_FLMASK (O_APPEND|O_NONBLOCK|O_ASYNC) -#endif -#define FCNTL_FLMASK_INVALID (O_NONBLOCK|O_ASYNC) - -/* refer to ll_file_flock() for details */ -int llu_file_flock(struct inode *ino, int cmd, struct file_lock *file_lock) -{ - struct llu_inode_info *lli = llu_i2info(ino); - struct intnl_stat *st = llu_i2stat(ino); - struct ldlm_res_id res_id = - { .name = {st->st_ino, lli->lli_st_generation, LDLM_FLOCK} }; - struct ldlm_enqueue_info einfo = { LDLM_FLOCK, 0, NULL, - ldlm_flock_completion_ast, NULL, file_lock }; - struct lustre_handle lockh = {0}; - ldlm_policy_data_t flock; - int flags = 0; - int rc; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu file_lock=%p\n", - (unsigned long long) st->st_ino, file_lock); - - flock.l_flock.pid = file_lock->fl_pid; - flock.l_flock.start = file_lock->fl_start; - flock.l_flock.end = file_lock->fl_end; - - switch (file_lock->fl_type) { - case F_RDLCK: - einfo.ei_mode = LCK_PR; - break; - case F_UNLCK: - einfo.ei_mode = LCK_NL; - break; - case F_WRLCK: - einfo.ei_mode = LCK_PW; - break; - default: - CERROR("unknown fcntl lock type: %d\n", file_lock->fl_type); - LBUG(); - } - - switch (cmd) { - case F_SETLKW: -#ifdef F_SETLKW64 -#if F_SETLKW64 != F_SETLKW - case F_SETLKW64: -#endif -#endif - flags = 0; - break; - case F_SETLK: -#ifdef F_SETLK64 -#if F_SETLK64 != F_SETLK - case F_SETLK64: -#endif -#endif - flags = LDLM_FL_BLOCK_NOWAIT; - break; - case F_GETLK: -#ifdef F_GETLK64 -#if F_GETLK64 != F_GETLK - case F_GETLK64: -#endif -#endif - flags = LDLM_FL_TEST_LOCK; - file_lock->fl_type = einfo.ei_mode; - break; - default: - CERROR("unknown fcntl cmd: %d\n", cmd); - LBUG(); - } - - CDEBUG(D_DLMTRACE, "inode=%llu, pid=%u, flags=%#x, mode=%u, " - "start="LPU64", end="LPU64"\n", - (unsigned long long) st->st_ino, flock.l_flock.pid, - flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end); - - rc = ldlm_cli_enqueue(llu_i2mdcexp(ino), NULL, &einfo, res_id, - &flock, &flags, NULL, 0, NULL, &lockh, 0); - - RETURN(rc); -} - -static int assign_type(struct file_lock *fl, int type) -{ - switch (type) { - case F_RDLCK: - case F_WRLCK: - case F_UNLCK: - fl->fl_type = type; - return 0; - default: - return -EINVAL; - } -} - -static int flock_to_posix_lock(struct inode *ino, - struct file_lock *fl, - struct flock *l) -{ - switch (l->l_whence) { - /* XXX: only SEEK_SET is supported in lustre */ - case SEEK_SET: - fl->fl_start = 0; - break; - default: - return -EINVAL; - } - - fl->fl_end = l->l_len - 1; - if (l->l_len < 0) - return -EINVAL; - if (l->l_len == 0) - fl->fl_end = OFFSET_MAX; - - fl->fl_pid = getpid(); - fl->fl_flags = FL_POSIX; - fl->fl_notify = NULL; - fl->fl_insert = NULL; - fl->fl_remove = NULL; - /* XXX: these fields can't be filled with suitable values, - but I think lustre doesn't use them. - */ - fl->fl_owner = NULL; - fl->fl_file = NULL; - - return assign_type(fl, l->l_type); -} - -static int llu_fcntl_getlk(struct inode *ino, struct flock *flock) -{ - struct file_lock fl; - int error; - - error = -EINVAL; - if ((flock->l_type != F_RDLCK) && (flock->l_type != F_WRLCK)) - goto out; - - error = flock_to_posix_lock(ino, &fl, flock); - if (error) - goto out; - - error = llu_file_flock(ino, F_GETLK, &fl); - if (error) - goto out; - - flock->l_type = F_UNLCK; - if (fl.fl_type != F_UNLCK) { - flock->l_pid = fl.fl_pid; - flock->l_start = fl.fl_start; - flock->l_len = fl.fl_end == OFFSET_MAX ? 0: - fl.fl_end - fl.fl_start + 1; - flock->l_whence = SEEK_SET; - flock->l_type = fl.fl_type; - } - -out: - return error; -} - -static int llu_fcntl_setlk(struct inode *ino, int cmd, struct flock *flock) -{ - struct file_lock fl; - int flags = llu_i2info(ino)->lli_open_flags + 1; - int error; - - error = flock_to_posix_lock(ino, &fl, flock); - if (error) - goto out; - if (cmd == F_SETLKW) - fl.fl_flags |= FL_SLEEP; - - error = -EBADF; - switch (flock->l_type) { - case F_RDLCK: - if (!(flags & FMODE_READ)) - goto out; - break; - case F_WRLCK: - if (!(flags & FMODE_WRITE)) - goto out; - break; - case F_UNLCK: - break; - default: - error = -EINVAL; - goto out; - } - - error = llu_file_flock(ino, cmd, &fl); - if (error) - goto out; - -out: - return error; -} - -static int llu_iop_fcntl(struct inode *ino, int cmd, va_list ap, int *rtn) -{ - struct llu_inode_info *lli = llu_i2info(ino); - long flags; - struct flock *flock; - long err = 0; - - liblustre_wait_event(0); - switch (cmd) { - case F_GETFL: - *rtn = lli->lli_open_flags; - break; - case F_SETFL: - flags = va_arg(ap, long); - flags &= FCNTL_FLMASK; - if (flags & FCNTL_FLMASK_INVALID) { - LCONSOLE_ERROR_MSG(0x010, "liblustre does not support " - "the O_NONBLOCK or O_ASYNC flags. " - "Please fix your application.\n"); - *rtn = -1; - err = -EINVAL; - break; - } - lli->lli_open_flags = (int)(flags & FCNTL_FLMASK) | - (lli->lli_open_flags & ~FCNTL_FLMASK); - *rtn = 0; - break; - case F_GETLK: -#ifdef F_GETLK64 -#if F_GETLK64 != F_GETLK - case F_GETLK64: -#endif -#endif - flock = va_arg(ap, struct flock *); - err = llu_fcntl_getlk(ino, flock); - *rtn = err? -1: 0; - break; - case F_SETLK: -#ifdef F_SETLKW64 -#if F_SETLKW64 != F_SETLKW - case F_SETLKW64: -#endif -#endif - case F_SETLKW: -#ifdef F_SETLK64 -#if F_SETLK64 != F_SETLK - case F_SETLK64: -#endif -#endif - flock = va_arg(ap, struct flock *); - err = llu_fcntl_setlk(ino, cmd, flock); - *rtn = err? -1: 0; - break; - default: - CERROR("unsupported fcntl cmd %x\n", cmd); - *rtn = -1; - err = -ENOSYS; - break; - } - - liblustre_wait_event(0); - return err; -} - -static int llu_get_grouplock(struct inode *inode, unsigned long arg) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct ll_file_data *fd = lli->lli_file_data; - ldlm_policy_data_t policy = { .l_extent = { .start = 0, - .end = OBD_OBJECT_EOF}}; - struct lustre_handle lockh = { 0 }; - struct lov_stripe_md *lsm = lli->lli_smd; - ldlm_error_t err; - int flags = 0; - ENTRY; - - if (fd->fd_flags & LL_FILE_GROUP_LOCKED) { - RETURN(-EINVAL); - } - - policy.l_extent.gid = arg; - if (lli->lli_open_flags & O_NONBLOCK) - flags = LDLM_FL_BLOCK_NOWAIT; - - err = llu_extent_lock(fd, inode, lsm, LCK_GROUP, &policy, &lockh, - flags); - if (err) - RETURN(err); - - fd->fd_flags |= LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK; - fd->fd_gid = arg; - memcpy(&fd->fd_cwlockh, &lockh, sizeof(lockh)); - - RETURN(0); -} - -static int llu_put_grouplock(struct inode *inode, unsigned long arg) -{ - struct llu_inode_info *lli = llu_i2info(inode); - struct ll_file_data *fd = lli->lli_file_data; - struct lov_stripe_md *lsm = lli->lli_smd; - ldlm_error_t err; - ENTRY; - - if (!(fd->fd_flags & LL_FILE_GROUP_LOCKED)) - RETURN(-EINVAL); - - if (fd->fd_gid != arg) - RETURN(-EINVAL); - - fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK); - - err = llu_extent_unlock(fd, inode, lsm, LCK_GROUP, &fd->fd_cwlockh); - if (err) - RETURN(err); - - fd->fd_gid = 0; - memset(&fd->fd_cwlockh, 0, sizeof(fd->fd_cwlockh)); - - RETURN(0); -} - -static int llu_lov_dir_setstripe(struct inode *ino, unsigned long arg) -{ - struct llu_sb_info *sbi = llu_i2sbi(ino); - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data; - struct iattr attr = { 0 }; - struct lov_user_md lum, *lump = (struct lov_user_md *)arg; - int rc = 0; - - llu_prepare_mdc_op_data(&op_data, ino, NULL, NULL, 0, 0); - - LASSERT(sizeof(lum) == sizeof(*lump)); - LASSERT(sizeof(lum.lmm_objects[0]) == - sizeof(lump->lmm_objects[0])); - rc = copy_from_user(&lum, lump, sizeof(lum)); - if (rc) - return(-EFAULT); - - if (lum.lmm_magic != LOV_USER_MAGIC) - RETURN(-EINVAL); - - if (lum.lmm_magic != cpu_to_le32(LOV_USER_MAGIC)) - lustre_swab_lov_user_md(&lum); - - /* swabbing is done in lov_setstripe() on server side */ - rc = mdc_setattr(sbi->ll_mdc_exp, &op_data, - &attr, &lum, sizeof(lum), NULL, 0, &request); - if (rc) { - ptlrpc_req_finished(request); - if (rc != -EPERM && rc != -EACCES) - CERROR("mdc_setattr fails: rc = %d\n", rc); - return rc; - } - ptlrpc_req_finished(request); - - return rc; -} - -static int llu_lov_setstripe_ea_info(struct inode *ino, int flags, - struct lov_user_md *lum, int lum_size) -{ - struct llu_sb_info *sbi = llu_i2sbi(ino); - struct obd_export *exp = llu_i2obdexp(ino); - struct llu_inode_info *lli = llu_i2info(ino); - struct llu_inode_info *lli2 = NULL; - struct lov_stripe_md *lsm; - struct lookup_intent oit = {.it_op = IT_OPEN, .it_flags = flags}; - struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_CR, - llu_mdc_blocking_ast, ldlm_completion_ast, NULL, NULL }; - - struct ptlrpc_request *req = NULL; - struct lustre_md md; - struct mdc_op_data data; - struct lustre_handle lockh; - int rc = 0; - ENTRY; - - lsm = lli->lli_smd; - if (lsm) { - CDEBUG(D_IOCTL, "stripe already exists for ino "LPU64"\n", - lli->lli_fid.id); - return -EEXIST; - } - - OBD_ALLOC(lli2, sizeof(struct llu_inode_info)); - if (!lli2) - return -ENOMEM; - - memcpy(lli2, lli, sizeof(struct llu_inode_info)); - lli2->lli_open_count = 0; - lli2->lli_it = NULL; - lli2->lli_file_data = NULL; - lli2->lli_smd = NULL; - lli2->lli_symlink_name = NULL; - ino->i_private = lli2; - - llu_prepare_mdc_op_data(&data, NULL, ino, NULL, 0, O_RDWR); - - rc = mdc_enqueue(sbi->ll_mdc_exp, &einfo, &oit, &data, - &lockh, lum, lum_size, LDLM_FL_INTENT_ONLY); - if (rc) - GOTO(out, rc); - - req = oit.d.lustre.it_data; - rc = it_open_error(DISP_IT_EXECD, &oit); - if (rc) { - req->rq_replay = 0; - GOTO(out, rc); - } - - rc = it_open_error(DISP_OPEN_OPEN, &oit); - if (rc) { - req->rq_replay = 0; - GOTO(out, rc); - } - - rc = mdc_req2lustre_md(req, DLM_REPLY_REC_OFF, exp, &md); - if (rc) - GOTO(out, rc); - - llu_update_inode(ino, md.body, md.lsm); - lli->lli_smd = lli2->lli_smd; - lli2->lli_smd = NULL; - - llu_local_open(lli2, &oit); - - /* release intent */ - if (lustre_handle_is_used(&lockh)) - ldlm_lock_decref(&lockh, LCK_CR); - - ptlrpc_req_finished(req); - req = NULL; - - rc = llu_file_release(ino); - out: - ino->i_private = lli; - if (lli2) - OBD_FREE(lli2, sizeof(struct llu_inode_info)); - if (req != NULL) - ptlrpc_req_finished(req); - RETURN(rc); -} - -static int llu_lov_file_setstripe(struct inode *ino, unsigned long arg) -{ - struct lov_user_md lum, *lump = (struct lov_user_md *)arg; - int rc; - int flags = FMODE_WRITE; - ENTRY; - - LASSERT(sizeof(lum) == sizeof(*lump)); - LASSERT(sizeof(lum.lmm_objects[0]) == sizeof(lump->lmm_objects[0])); - rc = copy_from_user(&lum, lump, sizeof(lum)); - if (rc) - RETURN(-EFAULT); - - rc = llu_lov_setstripe_ea_info(ino, flags, &lum, sizeof(lum)); - RETURN(rc); -} - -static int llu_lov_setstripe(struct inode *ino, unsigned long arg) -{ - struct intnl_stat *st = llu_i2stat(ino); - if (S_ISREG(st->st_mode)) - return llu_lov_file_setstripe(ino, arg); - if (S_ISDIR(st->st_mode)) - return llu_lov_dir_setstripe(ino, arg); - - return -EINVAL; -} - -static int llu_lov_getstripe(struct inode *ino, unsigned long arg) -{ - struct lov_stripe_md *lsm = llu_i2info(ino)->lli_smd; - - if (!lsm) - RETURN(-ENODATA); - - return obd_iocontrol(LL_IOC_LOV_GETSTRIPE, llu_i2obdexp(ino), 0, lsm, - (void *)arg); -} - -static int llu_iop_ioctl(struct inode *ino, unsigned long int request, - va_list ap) -{ - unsigned long arg; - int rc; - - liblustre_wait_event(0); - - switch (request) { - case LL_IOC_GROUP_LOCK: - arg = va_arg(ap, unsigned long); - rc = llu_get_grouplock(ino, arg); - break; - case LL_IOC_GROUP_UNLOCK: - arg = va_arg(ap, unsigned long); - rc = llu_put_grouplock(ino, arg); - break; - case LL_IOC_LOV_SETSTRIPE: - arg = va_arg(ap, unsigned long); - rc = llu_lov_setstripe(ino, arg); - break; - case LL_IOC_LOV_GETSTRIPE: - arg = va_arg(ap, unsigned long); - rc = llu_lov_getstripe(ino, arg); - break; - default: - CERROR("did not support ioctl cmd %lx\n", request); - rc = -ENOSYS; - break; - } - - liblustre_wait_event(0); - return rc; -} - -/* - * we already do syncronous read/write - */ -static int llu_iop_sync(struct inode *inode) -{ - liblustre_wait_event(0); - return 0; -} - -static int llu_iop_datasync(struct inode *inode) -{ - liblustre_wait_event(0); - return 0; -} - -struct filesys_ops llu_filesys_ops = -{ - fsop_gone: llu_fsop_gone, -}; - -struct inode *llu_iget(struct filesys *fs, struct lustre_md *md) -{ - struct inode *inode; - struct ll_fid fid; - struct file_identifier fileid = {&fid, sizeof(fid)}; - - if ((md->body->valid & - (OBD_MD_FLGENER | OBD_MD_FLID | OBD_MD_FLTYPE)) != - (OBD_MD_FLGENER | OBD_MD_FLID | OBD_MD_FLTYPE)) { - CERROR("bad md body valid mask "LPX64"\n", md->body->valid); - LBUG(); - return ERR_PTR(-EPERM); - } - - /* try to find existing inode */ - fid.id = md->body->ino; - fid.generation = md->body->generation; - fid.f_type = md->body->mode & S_IFMT; - - inode = _sysio_i_find(fs, &fileid); - if (inode) { - struct llu_inode_info *lli = llu_i2info(inode); - - if (inode->i_zombie || - lli->lli_st_generation != md->body->generation) { - I_RELE(inode); - } - else { - llu_update_inode(inode, md->body, md->lsm); - return inode; - } - } - - inode = llu_new_inode(fs, &fid); - if (inode) - llu_update_inode(inode, md->body, md->lsm); - - return inode; -} - -extern struct list_head lustre_profile_list; - -static int -llu_fsswop_mount(const char *source, - unsigned flags, - const void *data __IS_UNUSED, - struct pnode *tocover, - struct mount **mntp) -{ - struct filesys *fs; - struct inode *root; - struct pnode_base *rootpb; - struct obd_device *obd; - struct ll_fid rootfid; - struct llu_sb_info *sbi; - struct obd_statfs osfs; - static struct qstr noname = { NULL, 0, 0 }; - struct ptlrpc_request *request = NULL; - struct lustre_handle mdc_conn = {0, }; - struct lustre_handle osc_conn = {0, }; - struct lustre_md md; - class_uuid_t uuid; - struct config_llog_instance cfg = {0, }; - char ll_instance[sizeof(sbi) * 2 + 1]; - struct lustre_profile *lprof; - char *zconf_mgsnid, *zconf_profile; - char *osc = NULL, *mdc = NULL; - int async = 1, err = -EINVAL; - struct obd_connect_data ocd = {0,}; - - ENTRY; - - if (ll_parse_mount_target(source, - &zconf_mgsnid, - &zconf_profile)) { - CERROR("mal-formed target %s\n", source); - RETURN(err); - } - if (!zconf_mgsnid || !zconf_profile) { - printf("Liblustre: invalid target %s\n", source); - RETURN(err); - } - /* allocate & initialize sbi */ - OBD_ALLOC(sbi, sizeof(*sbi)); - if (!sbi) - RETURN(-ENOMEM); - - CFS_INIT_LIST_HEAD(&sbi->ll_conn_chain); - ll_generate_random_uuid(uuid); - class_uuid_unparse(uuid, &sbi->ll_sb_uuid); - - /* generate a string unique to this super, let's try - the address of the super itself.*/ - sprintf(ll_instance, "%p", sbi); - - /* retrive & parse config log */ - cfg.cfg_instance = ll_instance; - cfg.cfg_uuid = sbi->ll_sb_uuid; - err = liblustre_process_log(&cfg, zconf_mgsnid, zconf_profile, 1); - if (err < 0) { - CERROR("Unable to process log: %s\n", zconf_profile); - GOTO(out_free, err); - } - - lprof = class_get_profile(zconf_profile); - if (lprof == NULL) { - CERROR("No profile found: %s\n", zconf_profile); - GOTO(out_free, err = -EINVAL); - } - OBD_ALLOC(osc, strlen(lprof->lp_osc) + strlen(ll_instance) + 2); - sprintf(osc, "%s-%s", lprof->lp_osc, ll_instance); - - OBD_ALLOC(mdc, strlen(lprof->lp_mdc) + strlen(ll_instance) + 2); - sprintf(mdc, "%s-%s", lprof->lp_mdc, ll_instance); - - if (!osc) { - CERROR("no osc\n"); - GOTO(out_free, err = -EINVAL); - } - if (!mdc) { - CERROR("no mdc\n"); - GOTO(out_free, err = -EINVAL); - } - - fs = _sysio_fs_new(&llu_filesys_ops, flags, sbi); - if (!fs) { - err = -ENOMEM; - goto out_free; - } - - obd = class_name2obd(mdc); - if (!obd) { - CERROR("MDC %s: not setup or attached\n", mdc); - GOTO(out_free, err = -EINVAL); - } - obd_set_info_async(obd->obd_self_export, strlen("async"), "async", - sizeof(async), &async, NULL); - - ocd.ocd_connect_flags = OBD_CONNECT_IBITS | OBD_CONNECT_VERSION | - OBD_CONNECT_AT; -#ifdef LIBLUSTRE_POSIX_ACL - ocd.ocd_connect_flags |= OBD_CONNECT_ACL; -#endif - ocd.ocd_ibits_known = MDS_INODELOCK_FULL; - ocd.ocd_version = LUSTRE_VERSION_CODE; - - /* setup mdc */ - err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid, &ocd, NULL); - if (err) { - CERROR("cannot connect to %s: rc = %d\n", mdc, err); - GOTO(out_free, err); - } - sbi->ll_mdc_exp = class_conn2export(&mdc_conn); - - err = obd_statfs(obd, &osfs, 100000000, 0); - if (err) - GOTO(out_mdc, err); - - /* - * FIXME fill fs stat data into sbi here!!! FIXME - */ - - /* setup osc */ - obd = class_name2obd(osc); - if (!obd) { - CERROR("OSC %s: not setup or attached\n", osc); - GOTO(out_mdc, err = -EINVAL); - } - obd_set_info_async(obd->obd_self_export, strlen("async"), "async", - sizeof(async), &async, NULL); - - obd->obd_upcall.onu_owner = &sbi->ll_lco; - obd->obd_upcall.onu_upcall = ll_ocd_update; - - ocd.ocd_connect_flags = OBD_CONNECT_SRVLOCK | OBD_CONNECT_REQPORTAL | - OBD_CONNECT_VERSION | OBD_CONNECT_TRUNCLOCK | OBD_CONNECT_AT; - ocd.ocd_version = LUSTRE_VERSION_CODE; - err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid, &ocd, NULL); - if (err) { - CERROR("cannot connect to %s: rc = %d\n", osc, err); - GOTO(out_mdc, err); - } - sbi->ll_osc_exp = class_conn2export(&osc_conn); - sbi->ll_lco.lco_flags = ocd.ocd_connect_flags; - - err = obd_register_lock_cancel_cb(sbi->ll_osc_exp, - llu_extent_lock_cancel_cb); - if (err) { - CERROR("cannot register lock cancel callback: rc = %d\n", err); - GOTO(out_osc, err); - } - - mdc_init_ea_size(sbi->ll_mdc_exp, sbi->ll_osc_exp); - - err = mdc_getstatus(sbi->ll_mdc_exp, &rootfid); - if (err) { - CERROR("cannot mds_connect: rc = %d\n", err); - GOTO(out_lock_cn_cb, err); - } - CDEBUG(D_SUPER, "rootfid "LPU64"\n", rootfid.id); - sbi->ll_rootino = rootfid.id; - - /* fetch attr of root inode */ - err = mdc_getattr(sbi->ll_mdc_exp, &rootfid, - OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS, 0, - &request); - if (err) { - CERROR("mdc_getattr failed for root: rc = %d\n", err); - GOTO(out_lock_cn_cb, err); - } - - err = mdc_req2lustre_md(request, REPLY_REC_OFF, sbi->ll_osc_exp, &md); - if (err) { - CERROR("failed to understand root inode md: rc = %d\n",err); - GOTO(out_request, err); - } - - LASSERT(sbi->ll_rootino != 0); - - root = llu_iget(fs, &md); - if (!root || IS_ERR(root)) { - CERROR("fail to generate root inode\n"); - GOTO(out_request, err = -EBADF); - } - - /* - * Generate base path-node for root. - */ - rootpb = _sysio_pb_new(&noname, NULL, root); - if (!rootpb) { - err = -ENOMEM; - goto out_inode; - } - - err = _sysio_do_mount(fs, rootpb, flags, tocover, mntp); - if (err) { - _sysio_pb_gone(rootpb); - goto out_inode; - } - - ptlrpc_req_finished(request); - - CDEBUG(D_SUPER, "LibLustre: %s mounted successfully!\n", source); - liblustre_wait_idle(); - - return 0; - -out_inode: - _sysio_i_gone(root); -out_request: - ptlrpc_req_finished(request); -out_lock_cn_cb: - obd_unregister_lock_cancel_cb(sbi->ll_osc_exp, - llu_extent_lock_cancel_cb); -out_osc: - obd_disconnect(sbi->ll_osc_exp); -out_mdc: - obd_disconnect(sbi->ll_mdc_exp); -out_free: - if (osc) - OBD_FREE(osc, strlen(osc) + 1); - if (mdc) - OBD_FREE(mdc, strlen(mdc) + 1); - OBD_FREE(sbi, sizeof(*sbi)); - - liblustre_wait_idle(); - return err; -} - -struct fssw_ops llu_fssw_ops = { - llu_fsswop_mount -}; - -static struct inode_ops llu_inode_ops = { - inop_lookup: llu_iop_lookup, - inop_getattr: llu_iop_getattr, - inop_setattr: llu_iop_setattr, - inop_filldirentries: llu_iop_filldirentries, - inop_mkdir: llu_iop_mkdir_raw, - inop_rmdir: llu_iop_rmdir_raw, - inop_symlink: llu_iop_symlink_raw, - inop_readlink: llu_iop_readlink, - inop_open: llu_iop_open, - inop_close: llu_iop_close, - inop_link: llu_iop_link_raw, - inop_unlink: llu_iop_unlink_raw, - inop_rename: llu_iop_rename_raw, - inop_pos: llu_iop_pos, - inop_read: llu_iop_read, - inop_write: llu_iop_write, - inop_iodone: llu_iop_iodone, - inop_fcntl: llu_iop_fcntl, - inop_sync: llu_iop_sync, - inop_datasync: llu_iop_datasync, - inop_ioctl: llu_iop_ioctl, - inop_mknod: llu_iop_mknod_raw, -#ifdef _HAVE_STATVFS - inop_statvfs: llu_iop_statvfs, -#endif - inop_gone: llu_iop_gone, -}; diff --git a/lustre/liblustre/tests/.cvsignore b/lustre/liblustre/tests/.cvsignore deleted file mode 100644 index eb542ffaae..0000000000 --- a/lustre/liblustre/tests/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -Makefile -Makefile.in -.deps -echo_test -recovery_small -replay_ost_single -replay_single -sanity diff --git a/lustre/liblustre/tests/Makefile.am b/lustre/liblustre/tests/Makefile.am deleted file mode 100644 index f3906bfb9b..0000000000 --- a/lustre/liblustre/tests/Makefile.am +++ /dev/null @@ -1,63 +0,0 @@ -## Liblustre excecutables & libraries Makefile - -AM_CPPFLAGS = -I$(SYSIO)/include -I/opt/lam/include $(LLCPPFLAGS) -I$(top_srcdir)/lnet/ulnds -AM_CFLAGS = $(LLCFLAGS) -AM_LIBS = $(LIBEFENCE) $(LIBREADLINE) - -LLIB_EXEC = $(top_builddir)/lustre/utils/liblustreapi.a $(top_builddir)/lustre/liblustre/liblustre.a $(CAP_LIBS) $(PTHREAD_LIBS) $(ZLIB) - -if LIBLUSTRE -noinst_LIBRARIES = libtestcommon.a - -if LIBLUSTRE_TESTS -noinst_PROGRAMS = sanity echo_test - -if !CRAY_XT3 -noinst_PROGRAMS += recovery_small replay_single replay_ost_single -endif # !CRAY_XT3 - -if MPITESTS -noinst_PROGRAMS += test_lock_cancel -endif # MPITESTS - -liblustre_testdir=$(libdir)/lustre/liblustre/tests -liblustre_test_PROGRAMS = $(noinst_PROGRAMS) -liblustre_test_LIBRARIES = $(noinst_LIBRARIES) - -endif # LIBLUSTRE_TESTS -endif # LIBLUSTRE - -libtestcommon_a_SOURCES = test_common.c test_common.h - -echo_test_SOURCES = echo_test.c $(top_srcdir)/lustre/utils/parser.c $(top_srcdir)/lustre/utils/obd.c $(top_srcdir)/lustre/utils/lustre_cfg.c -echo_test_CFLAGS = $(LL_CFLAGS) -echo_test_LDADD = $(top_builddir)/lustre/liblustre/liblsupport.a $(LIBREADLINE) $(CAP_LIBS) $(PTHREAD_LIBS) $(ZLIB) -echo_test_DEPENDENCIES=$(top_builddir)/lustre/liblustre/liblsupport.a - -sanity_SOURCES = sanity.c -sanity_CFLAGS = $(LL_CFLAGS) -sanity_LDADD := libtestcommon.a $(LLIB_EXEC) -sanity_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a - -recovery_small_SOURCES = recovery_small.c -recovery_small_CFLAGS = $(LL_CFLAGS) -recovery_small_LDADD := libtestcommon.a $(LLIB_EXEC) -recovery_small_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a - -replay_single_SOURCES = replay_single.c -replay_single_CFLAGS = $(LL_CFLAGS) -replay_single_LDADD := libtestcommon.a $(LLIB_EXEC) -replay_single_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a - -replay_ost_single_SOURCES = replay_ost_single.c -replay_ost_single_CFLAGS = $(LL_CFLAGS) -replay_ost_single_LDADD := libtestcommon.a $(LLIB_EXEC) -replay_ost_single_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a - -if MPITESTS -test_lock_cancel_SOURCES = test_lock_cancel.c -test_lock_cancel_CFLAGS = $(LL_CFLAGS) -I/opt/lam/include -test_lock_cancel_LDADD := $(LLIB_EXEC) -L/opt/lam/lib -lmpi -llam -endif - - diff --git a/lustre/liblustre/tests/echo_test.c b/lustre/liblustre/tests/echo_test.c deleted file mode 100644 index 62a11de2c4..0000000000 --- a/lustre/liblustre/tests/echo_test.c +++ /dev/null @@ -1,313 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light user test program - * - * Copyright (c) 2002-2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <liblustre.h> -#include <obd.h> -#include <obd_class.h> -#include <obd_ost.h> - -#define LIBLUSTRE_TEST 1 -#include "../utils/lctl.c" - -#include "../lutil.h" - - -#ifdef CRAY_XT3 -int _sysio_lustre_init(void) -{ - /* - * This is an aweful HACK. Basically the problem is on - * Catamount, the build system links in liblustre.a to - * all the test executables, and at this point its not - * clear how to modify the build system to prevent this - * from happening. So providing our own call to - * _sysio_lustre_init() that does nothing, prevents - * liblustre.a from initializing. - * - * Why is liblustre.a initializing a problem anyway. Well - * this main() in this module calls init_obdclass(), as - * well as the llite_lib.c's _sysio_lustre_init(). Two - * calls to init_obdclass() cause an assertion. Secondly - * it doesn't even logically make sense, this is module - * does not need lustre file system functionality, it's - * just the echo_tester. - * - */ - /*lprintf("--> THIS OVERRIDES liblustre.a INITIALIZATION <--\n");*/ - return 0; -} -#endif - - - -extern int class_handle_ioctl(unsigned int cmd, unsigned long arg); - -static int liblustre_ioctl(int dev_id, unsigned int opc, void *ptr) -{ - int rc = -EINVAL; - - switch (dev_id) { - default: - fprintf(stderr, "Unexpected device id %d\n", dev_id); - abort(); - break; - - case OBD_DEV_ID: - rc = class_handle_ioctl(opc, (unsigned long)ptr); - break; - } - - return rc; -} - -static char *echo_server_nid = NULL; -static char *echo_server_ostname = "obd1"; -static char *osc_dev_name = "OSC_DEV_NAME"; -static char *echo_dev_name = "ECHO_CLIENT_DEV_NAME"; - -static int connect_echo_client(void) -{ - struct lustre_cfg *lcfg; - struct lustre_cfg_bufs bufs; - lnet_nid_t nid; - char *peer = "ECHO_PEER_NID"; - class_uuid_t osc_uuid, echo_uuid; - struct obd_uuid osc_uuid_str, echo_uuid_str; - int err; - ENTRY; - - ll_generate_random_uuid(osc_uuid); - class_uuid_unparse(osc_uuid, &osc_uuid_str); - ll_generate_random_uuid(echo_uuid); - class_uuid_unparse(echo_uuid, &echo_uuid_str); - - nid = libcfs_str2nid(echo_server_nid); - if (nid == LNET_NID_ANY) { - CERROR("Can't parse NID %s\n", echo_server_nid); - RETURN(-EINVAL); - } - - /* add uuid */ - lustre_cfg_bufs_reset(&bufs, NULL); - lustre_cfg_bufs_set_string(&bufs, 1, peer); - lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs); - lcfg->lcfg_nid = nid; - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err < 0) { - CERROR("failed add_uuid\n"); - RETURN(-EINVAL); - } - - /* attach osc */ - lustre_cfg_bufs_reset(&bufs, osc_dev_name); - lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_OSC_NAME); - lustre_cfg_bufs_set_string(&bufs, 2, osc_uuid_str.uuid); - lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs); - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err < 0) { - CERROR("failed attach osc\n"); - RETURN(-EINVAL); - } - - /* setup osc */ - lustre_cfg_bufs_reset(&bufs, osc_dev_name); - lustre_cfg_bufs_set_string(&bufs, 1, echo_server_ostname); - lustre_cfg_bufs_set_string(&bufs, 2, peer); - lcfg = lustre_cfg_new(LCFG_SETUP, &bufs); - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err < 0) { - CERROR("failed setup osc\n"); - RETURN(-EINVAL); - } - - /* attach echo_client */ - lustre_cfg_bufs_reset(&bufs, echo_dev_name); - lustre_cfg_bufs_set_string(&bufs, 1, "echo_client"); - lustre_cfg_bufs_set_string(&bufs, 2, echo_uuid_str.uuid); - lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs); - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err < 0) { - CERROR("failed attach echo_client\n"); - RETURN(-EINVAL); - } - - /* setup echo_client */ - lustre_cfg_bufs_reset(&bufs, echo_dev_name); - lustre_cfg_bufs_set_string(&bufs, 1, osc_dev_name); - lustre_cfg_bufs_set_string(&bufs, 2, NULL); - lcfg = lustre_cfg_new(LCFG_SETUP, &bufs); - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err < 0) { - CERROR("failed setup echo_client\n"); - RETURN(-EINVAL); - } - - RETURN(0); -} - -static int disconnect_echo_client(void) -{ - struct lustre_cfg_bufs bufs; - struct lustre_cfg *lcfg = NULL; - int err; - ENTRY; - - /* cleanup echo_client */ - lustre_cfg_bufs_reset(&bufs, echo_dev_name); - lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs); - err = class_process_config(lcfg); - if (err < 0) { - lustre_cfg_free(lcfg); - CERROR("failed cleanup echo_client\n"); - RETURN(-EINVAL); - } - - /* detach echo_client */ - lcfg->lcfg_command = LCFG_DETACH; - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err < 0) { - CERROR("failed detach echo_client\n"); - RETURN(-EINVAL); - } - - /* cleanup osc */ - lustre_cfg_bufs_reset(&bufs, osc_dev_name); - lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs); - err = class_process_config(lcfg); - if (err < 0) { - lustre_cfg_free(lcfg); - CERROR("failed cleanup osc device\n"); - RETURN(-EINVAL); - } - - /* detach osc */ - lcfg->lcfg_command = LCFG_DETACH; - err = class_process_config(lcfg); - lustre_cfg_free(lcfg); - if (err < 0) { - CERROR("failed detach osc device\n"); - RETURN(-EINVAL); - } - - RETURN(0); -} - -static void usage(const char *s) -{ - printf("Usage: %s -s ost_host_name [-n ost_name] [-x lctl_options ...]\n", s); - printf(" ost_host_name: the host name of echo server\n"); - printf(" ost_name: ost name, default is \"obd1\"\n"); - printf(" lctl_options: options to pass to lctl.\n"); - printf(" (e.g. -x --device 1 test_getattr 10000 -5)\n"); -} - -extern int time_ptlwait1; -extern int time_ptlwait2; -extern int time_ptlselect; - -int main(int argc, char **argv) -{ - int c, rc; - int xindex = -1; /* index of -x option */ - - /* loop until all options are consumed or we hit - * a -x option - */ - while ((c = getopt(argc, argv, "s:n:x:")) != -1 && - xindex == -1) { - switch (c) { - case 's': - echo_server_nid = optarg; - break; - case 'n': - echo_server_ostname = optarg; - break; - case 'x': - xindex = optind-1; - break; - default: - usage(argv[0]); - return 1; - } - } - - /* - * Only warn with usage() if the -x option isn't specificed - * because when using -x this check is not valid. - */ - if (optind != argc && xindex == -1) - usage(argv[0]); - - if (!echo_server_nid) { - usage(argv[0]); - return 1; - } - - libcfs_debug = 0; - libcfs_subsystem_debug = 0; - - liblustre_init_random(); - - if (liblustre_init_current(argv[0]) || - init_obdclass() || init_lib_portals() || - ptlrpc_init() || - mdc_init() || - lov_init() || - osc_init() || - echo_client_init()) { - printf("error\n"); - return 1; - } - - rc = connect_echo_client(); - if (rc) - return rc; - - set_ioc_handler(liblustre_ioctl); - - - /* - * If the -x option is not specified pass no args to lctl - * otherwise pass all the options after the "-x" to lctl - * - * HACK: in the case when the -x option is specified - * lctl sees argv[0] == "-x" and not the real argv[0] seen - * in this function. If that is a problem, a mapping will - * have to be done to fix that. However for normal functioning - * it seems to be irrelavant - */ - if( xindex == -1 ) - rc = lctl_main(1, &argv[0]); - else - rc = lctl_main(argc-xindex+1, &argv[xindex-1]); - - rc |= disconnect_echo_client(); - - return rc; -} diff --git a/lustre/liblustre/tests/recovery_small.c b/lustre/liblustre/tests/recovery_small.c deleted file mode 100644 index 6af93f126c..0000000000 --- a/lustre/liblustre/tests/recovery_small.c +++ /dev/null @@ -1,390 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light user test program - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define _BSD_SOURCE - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <getopt.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/queue.h> -#include <getopt.h> - -#include <sysio.h> -#include <mount.h> - -#include "test_common.h" - -#define MAX_STRING_SIZE 2048 - -static struct { - const char *name; - unsigned long code; -} drop_arr [] = -{ - {"MDS_REQUEST", 0x123}, - {"MDS_REPLY", 0x122}, - {NULL, 0} -}; - -static int drop_index = 0; - -static char mds_server[1024] = {0, }; -static char ssh_cmd[MAX_STRING_SIZE] = {0,}; - -int do_stat(const char *name, struct stat *buf) -{ - struct stat stat; - int rc; - - rc = lstat(name, &stat); - if (rc) { - printf("error %d stat %s\n", rc, name); - exit(1); - } - if (buf) - memcpy(buf, &stat, sizeof(*buf)); - - return 0; -} - -void prepare_reg(const char *path) -{ - int fd, rc; - - fd = open(path, O_RDWR|O_CREAT, 00644); - if (fd < 0) { - printf("error %d create %s\n", fd, path); - exit(1); - } - - rc = close(fd); - if (rc) { - printf("error %d close %s\n", rc, path); - exit(1); - } -} - -void cleanup_reg(const char *path) -{ - int rc; - - rc = unlink(path); - if (rc) { - printf("error %d unlink %s\n", rc, path); - exit(1); - } -} - -void prepare_dir(const char *path) -{ - int rc; - - rc = mkdir(path, 00644); - if (rc < 0) { - printf("error %d mkdir %s\n", rc, path); - exit(1); - } -} - -void cleanup_dir(const char *path) -{ - int rc; - - rc = rmdir(path); - if (rc) { - printf("error %d unlink %s\n", rc, path); - exit(1); - } -} - -#define FAIL() \ - do { \ - char cmd[MAX_STRING_SIZE]; \ - int rc; \ - \ - if (drop_arr[drop_index].name) { \ - printf("server drops next %s\n", drop_arr[drop_index].name); \ - sprintf(cmd, \ - "%s %s \"echo %lu > /proc/sys/lustre/fail_loc\"", \ - ssh_cmd, mds_server, drop_arr[drop_index].code); \ - if (system(cmd)) { \ - printf("error excuting remote command: %d\n", rc); \ - exit(rc); \ - } \ - } \ - } while (0) - -#define RECOVER() \ - do { \ - char cmd[1024]; \ - \ - if (drop_arr[drop_index].name) { \ - sprintf(cmd, "%s %s \"echo 0 > /proc/sys/lustre/fail_loc\"", \ - ssh_cmd, mds_server); \ - system(cmd); \ - } \ - } while (0) - -#define ENTRY(str) \ - do { \ - char buf[100]; \ - int len; \ - sprintf(buf, "===== START: %s ", (str)); \ - len = strlen(buf); \ - if (len < 79) { \ - memset(buf+len, '=', 100-len); \ - buf[79] = '\n'; \ - buf[80] = 0; \ - } \ - printf("%s", buf); \ - } while (0) - -#define LEAVE() \ - do { \ - printf("----- END TEST successfully ---"); \ - printf("-----------------------------"); \ - printf("-------------------\n"); \ - } while (0) - - -void t1() -{ - char *path="/mnt/lustre/test_t1"; - ENTRY("create/delete"); - - FAIL(); - t_touch(path); - RECOVER(); - FAIL(); - t_unlink(path); - RECOVER(); - LEAVE(); -} - -void t2() -{ - char *path="/mnt/lustre/test_t2"; - ENTRY("mkdir/rmdir"); - - FAIL(); - t_mkdir(path); - RECOVER(); - FAIL(); - t_rmdir(path); - RECOVER(); - LEAVE(); -} - -void t3() -{ - char *path="/mnt/lustre/test_t3"; - ENTRY("regular stat"); - - t_touch(path); - FAIL(); - t_check_stat(path, NULL); - RECOVER(); - t_unlink(path); - LEAVE(); -} - -void t4() -{ - char *path="/mnt/lustre/test_t4"; - ENTRY("dir stat"); - - t_mkdir(path); - FAIL(); - t_check_stat(path, NULL); - RECOVER(); - t_rmdir(path); - LEAVE(); -} - -void t5() -{ - char *path="/mnt/lustre/test_t5"; - const int bufsize = 4096; - char wbuf[bufsize], rbuf[bufsize]; - int npages = 100; - int fd, rc, i; - ENTRY("sequential page aligned file I/O"); - - t_touch(path); - - fd = t_open(path); - - for (i = 0; i < npages; i++ ) { - memset(wbuf, i, bufsize); - rc = write(fd, wbuf, bufsize); - if (rc != bufsize) { - printf("write error %d (i = %d)\n", rc, i); - exit(1); - } - } - printf("succefully write %d pages\n", npages); - - lseek(fd, 0, SEEK_SET); - - for (i = 0; i < npages; i++ ) { - memset(rbuf, 0, bufsize); - rc = read(fd, rbuf, bufsize); - if (rc != bufsize) { - printf("read error %d (i = %d)\n", rc, i); - exit(1); - } - } - printf("succefully read & verified %d pages\n", npages); - - t_close(fd); - - t_unlink(path); - LEAVE(); -} - -void t6() -{ - char *path="/mnt/lustre/test_t6"; - char *path2="/mnt/lustre/test_t6_link"; - ENTRY("symlink"); - - t_touch(path); - FAIL(); - t_symlink(path, path2); - RECOVER(); - t_check_stat(path2, NULL); - t_unlink(path2); - t_unlink(path); - LEAVE(); -} - -void t7() -{ - char *path="/mnt/lustre/test_t7"; - ENTRY("mknod"); - - FAIL(); - t_mknod(path, S_IFCHR | 0644, 5, 4); - RECOVER(); - t_check_stat(path, NULL); - t_unlink(path); - LEAVE(); -} - -extern int libcfs_debug; -extern int libcfs_subsystem_debug; - -extern void __liblustre_setup_(void); -extern void __liblustre_cleanup_(void); - -void usage(const char *cmd) -{ - printf("Usage: \t%s -s mds_hostname --target mdsnid:/mdsname/profile\n", cmd); - printf(" \t%s -s mds_hostname --dumpfile dumpfile\n", cmd); - exit(-1); -} - -int main(int argc, char * argv[]) -{ - int opt_index, c; - char cmd[1024]; - static struct option long_opts[] = { - {"target", 1, 0, 0}, - {"dumpfile", 1, 0, 0}, - {"ssh", 1, 0, 0}, - {0, 0, 0, 0} - }; - - if (argc < 3 - (getenv(ENV_LUSTRE_MNTTGT)||getenv(ENV_LUSTRE_DUMPFILE))) - usage(argv[0]); - - while ((c = getopt_long(argc, argv, "s:", long_opts, &opt_index)) != -1) { - switch (c) { - case 0: { - if (!optarg[0]) - usage(argv[0]); - - if (!strcmp(long_opts[opt_index].name, "target")) { - setenv(ENV_LUSTRE_MNTTGT, optarg, 1); - } else if (!strcmp(long_opts[opt_index].name, "dumpfile")) { - setenv(ENV_LUSTRE_DUMPFILE, optarg, 1); - } else if (!strcmp(long_opts[opt_index].name, "ssh")) { - safe_strncpy(ssh_cmd, optarg, MAX_STRING_SIZE); - } else - usage(argv[0]); - break; - } - case 's': - safe_strncpy(mds_server, optarg, MAX_STRING_SIZE); - break; - default: - usage(argv[0]); - } - } - - if (optind != argc) - usage(argv[0]); - - if (strlen(mds_server) == 0) - usage(argv[0]); - - /* default to using ssh */ - if (!strlen(ssh_cmd)) { - safe_strncpy(ssh_cmd, "ssh", MAX_STRING_SIZE); - } - - sprintf(cmd, "%s %s cat /dev/null", ssh_cmd, mds_server); - if (system(cmd)) { - printf("Can't access server node: %s using method: %s\n", mds_server, ssh_cmd); - exit(-1); - } - - setenv(ENV_LUSTRE_TIMEOUT, "5", 1); - - __liblustre_setup_(); - - while (drop_arr[drop_index].name) { - t1(); - t2(); - t3(); - t4(); -#if 0 - t5(); -#endif - t6(); - t7(); - - drop_index++; - } - - printf("liblustre is about shutdown\n"); - __liblustre_cleanup_(); - - printf("complete successfully\n"); - return (0); -} diff --git a/lustre/liblustre/tests/replay_ost_single.c b/lustre/liblustre/tests/replay_ost_single.c deleted file mode 100644 index 418ba94177..0000000000 --- a/lustre/liblustre/tests/replay_ost_single.c +++ /dev/null @@ -1,338 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light user test program - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define _BSD_SOURCE - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <getopt.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/queue.h> -#include <signal.h> - -#include <sysio.h> -#include <mount.h> - -#include "test_common.h" - - - -static char mds_server[1024] = {0,}; -static char barrier_script[1024] = {0,}; -static char failover_script[1024] = {0,}; -static char barrier_cmd[1024] = {0,}; -static char failover_cmd[1024] = {0,}; - -static void replay_barrier() -{ - int rc; - - if ((rc = system(barrier_cmd))) { - printf("excute barrier error: %d\n", rc); - exit(rc); - } -} - -static void mds_failover() -{ - int rc; - - if ((rc = system(failover_cmd))) { - printf("excute failover error: %d\n", rc); - exit(rc); - } -} - - -#define ENTRY(str) \ - do { \ - char buf[100]; \ - int len; \ - sprintf(buf, "===== START: %s ", (str)); \ - len = strlen(buf); \ - if (len < 79) { \ - memset(buf+len, '=', 100-len); \ - buf[79] = '\n'; \ - buf[80] = 0; \ - } \ - printf("%s", buf); \ - } while (0) - -#define LEAVE() \ - do { \ - printf("----- END TEST successfully ---"); \ - printf("-----------------------------"); \ - printf("-------------------\n"); \ - } while (0) - -void t0() -{ - const int bufsize = 4096; - char *path = "/mnt/lustre/rp_ost_t0_file"; - char buf[bufsize]; - int fd, i, j, rc; - ENTRY("open-failover-write-verification (no ping involved)"); - - printf("create/open file...\n"); - t_touch(path); - fd = t_open(path); - printf("OST failover...\n"); - replay_barrier(); - mds_failover(); - - printf("write file...\n"); - for (i = 0; i < 20; i++) { - memset(buf, i, bufsize); - if ((rc = write(fd, buf, bufsize)) != bufsize) { - perror("write error after failover"); - printf("i = %d, rc = %d\n", i, rc); - exit(-1); - } - } - - /* verify */ - printf("read & verify...\n"); - lseek(fd, 0, SEEK_SET); - for (i = 0; i < 20; i++) { - memset(buf, -1, bufsize); - if ((rc = read(fd, buf, bufsize)) != bufsize) { - perror("read error rc"); - printf("i = %d, rc = %d\n", i, rc); - exit(-1); - } - for (j = 0; j < bufsize; j++) { - if (buf[j] != i) { - printf("verify error!\n"); - exit(-1); - } - } - } - t_close(fd); - t_unlink(path); - LEAVE(); -} - -void t1() -{ - const int bufsize = 4096; - char *path = "/mnt/lustre/rp_ost_t1_file"; - char buf[bufsize]; - int fd, i, j; - ENTRY("open-write-close-open-failover-read (no ping involved)"); - - printf("create/open file...\n"); - t_touch(path); - fd = t_open(path); - printf("write file...\n"); - for (i = 0; i < 20; i++) { - memset(buf, i, bufsize); - if (write(fd, buf, bufsize) != bufsize) { - perror("write error"); - exit(-1); - } - } - printf("close/reopen...\n"); - t_close(fd); - fd = t_open(path); - lseek(fd, 0, SEEK_SET); - - printf("OST failover...\n"); - replay_barrier(); - mds_failover(); - - printf("read & verify...\n"); - for (i = 0; i < 20; i++) { - memset(buf, -1, bufsize); - if (read(fd, buf, bufsize) != bufsize) { - perror("read error after failover"); - exit(-1); - } - for (j = 0; j < bufsize; j++) { - if (buf[j] != i) { - printf("verify error after failover\n"); - exit(-1); - } - } - } - - t_close(fd); - t_unlink(path); - LEAVE(); -} - -void t2() -{ - char *path = "/mnt/lustre/rp_ost_t2_file"; - char *str = "xxxxjoiwlsdf98lsjdfsjfoajflsjfajfoaidfojaj08eorje;"; - ENTRY("empty replay"); - - replay_barrier(); - mds_failover(); - - t_echo_create(path, str); - t_grep(path, str); - t_unlink(path); -} - -void t3() -{ - char *path = "/mnt/lustre/rp_ost_t3_file"; - char *str = "xxxxjoiwlsdf98lsjdfsjfoajflsjfajfoaidfojaj08eorje;"; - ENTRY("touch"); - - printf("touch to create a file\n"); - t_echo_create(path, str); - replay_barrier(); - mds_failover(); - - printf("read & verify\n"); - t_grep(path, str); - t_unlink(path); - /* XXX have problem without this, seems server side problem XXX */ - sleep(5); -} - -void t4() -{ - char *path = "/mnt/lustre/rp_ost_t4_file"; - char namebuf[1024]; - char str[1024]; - int count = 10, i; - ENTRY("|X| 10 open(CREAT)s (ping involved)"); - - printf("create %d files\n", count); - for (i = 0; i < count; i++) { - sprintf(namebuf, "%s%02d", path, i); - sprintf(str, "%s-%08d-%08x-AAAAA", "content", i, i); - t_echo_create(namebuf, str); - } - replay_barrier(); - mds_failover(); - - printf("read & verify\n"); - for (i = 0; i < count; i++) { - sprintf(namebuf, "%s%02d", path, i); - sprintf(str, "%s-%08d-%08x-AAAAA", "content", i, i); - t_grep(namebuf, str); - t_unlink(namebuf); - } -} - -extern int libcfs_debug; -extern int libcfs_subsystem_debug; - -extern void __liblustre_setup_(void); -extern void __liblustre_cleanup_(void); - -void usage(const char *cmd) -{ - printf("Usage: \t%s --target mdsnid:/mdsname/profile -s ost_hostname " - "-b \"barrier cmd\" -f \"failover cmd\"\n", cmd); - printf(" \t%s --dumpfile dumpfile -s ost_hostname -b \"barrier cmd\" " - "-f \"failover cmd\"\n", cmd); - exit(-1); -} - -void test_ssh() -{ - char cmd[1024]; - - sprintf(cmd, "ssh %s cat /dev/null", mds_server); - if (system(cmd)) { - printf("ssh can't access server node: %s\n", mds_server); - exit(-1); - } -} - -int main(int argc, char * const argv[]) -{ - int opt_index, c; - static struct option long_opts[] = { - {"target", 1, 0, 0}, - {"dumpfile", 1, 0, 0}, - {0, 0, 0, 0} - }; - - if (argc < 4) - usage(argv[0]); - - while ((c = getopt_long(argc, argv, "s:b:f:", long_opts, &opt_index)) != -1) { - switch (c) { - case 0: { - if (!optarg[0]) - usage(argv[0]); - - if (!strcmp(long_opts[opt_index].name, "target")) { - setenv(ENV_LUSTRE_MNTTGT, optarg, 1); - } else if (!strcmp(long_opts[opt_index].name, "dumpfile")) { - setenv(ENV_LUSTRE_DUMPFILE, optarg, 1); - } else - usage(argv[0]); - break; - } - case 's': - strcpy(mds_server, optarg); - break; - case 'b': - strcpy(barrier_script, optarg); - break; - case 'f': - strcpy(failover_script, optarg); - break; - default: - usage(argv[0]); - } - } - - if (optind != argc) - usage(argv[0]); - if (!strlen(mds_server) || !strlen(barrier_script) || - !strlen(failover_script)) - usage(argv[0]); - - test_ssh(); - - /* prepare remote command */ - sprintf(barrier_cmd, "ssh %s \"%s\"", mds_server, barrier_script); - sprintf(failover_cmd, "ssh %s \"%s\"", mds_server, failover_script); - - setenv(ENV_LUSTRE_TIMEOUT, "5", 1); - - __liblustre_setup_(); - - t0(); - t1(); - t2(); - t3(); - t4(); - - printf("liblustre is about shutdown\n"); - __liblustre_cleanup_(); - - printf("complete successfully\n"); - return 0; -} diff --git a/lustre/liblustre/tests/replay_single.c b/lustre/liblustre/tests/replay_single.c deleted file mode 100644 index 17155f80b3..0000000000 --- a/lustre/liblustre/tests/replay_single.c +++ /dev/null @@ -1,423 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light user test program - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define _BSD_SOURCE - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <getopt.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/queue.h> -#include <signal.h> - -#include <sysio.h> -#include <mount.h> - -#include "test_common.h" - -#define MAX_STRING_SIZE 2048 - -static char mds_server[MAX_STRING_SIZE] = {0,}; -static char barrier_script[MAX_STRING_SIZE] = {0,}; -static char failover_script[MAX_STRING_SIZE] = {0,}; -static char barrier_cmd[MAX_STRING_SIZE] = {0,}; -static char failover_cmd[MAX_STRING_SIZE] = {0,}; -static char ssh_cmd[MAX_STRING_SIZE] = {0,}; - -static void replay_barrier() -{ - int rc; - - if ((rc = system(barrier_cmd))) { - printf("excute barrier error: %d\n", rc); - exit(rc); - } -} - -static void mds_failover() -{ - int rc; - - if ((rc = system(failover_cmd))) { - printf("excute failover error: %d\n", rc); - exit(rc); - } -} - - -#define ENTRY(str) \ - do { \ - char buf[100]; \ - int len; \ - sprintf(buf, "===== START: %s ", (str)); \ - len = strlen(buf); \ - if (len < 79) { \ - memset(buf+len, '=', 100-len); \ - buf[79] = '\n'; \ - buf[80] = 0; \ - } \ - printf("%s", buf); \ - } while (0) - -#define LEAVE() \ - do { \ - printf("----- END TEST successfully ---"); \ - printf("-----------------------------"); \ - printf("-------------------\n"); \ - } while (0) - -void t0() -{ - char *path="/mnt/lustre/f0"; - ENTRY("empty replay"); - replay_barrier(); - mds_failover(); - t_check_stat_fail("/mnt/lustre/f0"); - LEAVE(); -} - -void t1() -{ - char *path="/mnt/lustre/f1"; - ENTRY("simple create"); - - replay_barrier(); - t_create(path); - mds_failover(); - t_check_stat(path, NULL); - t_unlink(path); - LEAVE(); -} - -void t2a() -{ - char *path="/mnt/lustre/f2a"; - ENTRY("touch"); - - replay_barrier(); - t_touch(path); - mds_failover(); - t_check_stat(path, NULL); - t_unlink(path); - LEAVE(); -} - -void t2b() -{ - char *path="/mnt/lustre/f2b"; - ENTRY("mcreate+touch"); - - t_create(path); - replay_barrier(); - t_touch(path); - mds_failover(); - t_check_stat(path, NULL); - t_unlink(path); - LEAVE(); -} - - -void n_create_delete(int nfiles) -{ - char *base="/mnt/lustre/f3_"; - char path[100]; - char str[100]; - int i; - - replay_barrier(); - for (i = 0; i < nfiles; i++) { - sprintf(path, "%s%d\n", base, i); - sprintf(str, "TEST#%d CONTENT\n", i); - t_echo_create(path, str); - } - mds_failover(); - for (i = 0; i < nfiles; i++) { - sprintf(path, "%s%d\n", base, i); - sprintf(str, "TEST#%d CONTENT\n", i); - t_grep(path, str); - } - replay_barrier(); - for (i = 0; i < nfiles; i++) { - sprintf(path, "%s%d\n", base, i); - t_unlink(path); - } - mds_failover(); - for (i = 0; i < nfiles; i++) { - sprintf(path, "%s%d\n", base, i); - t_check_stat_fail(path); - } - LEAVE(); -} - -void t3a() -{ - ENTRY("10 create/delete"); - n_create_delete(10); - LEAVE(); -} - -void t3b() -{ - ENTRY("30 create/delete(>1'st block precreated)"); - n_create_delete(30); - LEAVE(); -} - -void t4() -{ - char *dir="/mnt/lustre/d4"; - char *path="/mnt/lustre/d4/f1"; - ENTRY("mkdir + contained create"); - - replay_barrier(); - t_mkdir(dir); - t_create(path); - mds_failover(); - t_check_stat(dir, NULL); - t_check_stat(path, NULL); - sleep(2); /* wait for log process thread */ - - replay_barrier(); - t_unlink(path); - t_rmdir(dir); - mds_failover(); - t_check_stat_fail(dir); - t_check_stat_fail(path); - LEAVE(); -} - -void t5() -{ - char *dir="/mnt/lustre/d5"; - char *path="/mnt/lustre/d5/f1"; - ENTRY("mkdir |X| contained create"); - - t_mkdir(dir); - replay_barrier(); - t_create(path); - mds_failover(); - t_check_stat(dir, NULL); - t_check_stat(path, NULL); - t_unlink(path); - t_rmdir(dir); - LEAVE(); -} - -void t6() -{ - char *path="/mnt/lustre/f6"; - int fd; - ENTRY("open |X| close"); - - replay_barrier(); - t_create(path); - fd = t_open(path); - sleep(1); - mds_failover(); - t_check_stat(path, NULL); - t_close(fd); - t_unlink(path); - LEAVE(); -} - -void t7() -{ - char *path="/mnt/lustre/f7"; - char *path2="/mnt/lustre/f7-2"; - ENTRY("create |X| rename unlink"); - - t_create(path); - replay_barrier(); - t_rename(path, path2); - mds_failover(); - t_check_stat_fail(path); - t_check_stat(path2, NULL); - t_unlink(path2); -} - -void t8() -{ - char *path="/mnt/lustre/f8"; - char *path2="/mnt/lustre/f8-2"; - ENTRY("create open write rename |X| create-old-name read"); - - t_create(path); - t_echo_create(path, "old"); - t_rename(path, path2); - replay_barrier(); - t_echo_create(path, "new"); - mds_failover(); - t_grep(path, "new"); - t_grep(path2, "old"); - t_unlink(path); - t_unlink(path2); -} - -void t9() -{ - char *path="/mnt/lustre/f9"; - char *path2="/mnt/lustre/f9-2"; - ENTRY("|X| open(O_CREAT), unlink, touch new, unlink new"); - - replay_barrier(); - t_create(path); - t_unlink(path); - t_create(path2); - mds_failover(); - t_check_stat_fail(path); - t_check_stat(path2, NULL); - t_unlink(path2); -} - -void t10() -{ - char *path="/mnt/lustre/f10"; - char *path2="/mnt/lustre/f10-2"; - ENTRY("|X| mcreate, open write, rename"); - - replay_barrier(); - t_create(path); - t_echo_create(path, "old"); - t_rename(path, path2); - t_grep(path2, "old"); - mds_failover(); - t_grep(path2, "old"); - t_unlink(path2); -} - -extern int libcfs_debug; -extern int libcfs_subsystem_debug; - -extern void __liblustre_setup_(void); -extern void __liblustre_cleanup_(void); - -void usage(const char *cmd) -{ - printf("Usage: \t%s --target mdsnid:/mdsname/profile -s mds_hostname " - "-b \"barrier cmd\" -f \"failover cmd\" [--rsh \"rsh_cmd\"]\n", cmd); - printf(" \t%s --dumpfile dumpfile -s mds_hostname -b \"barrier cmd\" " - "-f \"failover cmd\" [--rsh \"rsh_cmd\"]\n", cmd); - exit(-1); -} - -void test_ssh() -{ - char cmd[MAX_STRING_SIZE]; - - sprintf(cmd, "%s %s cat /dev/null", ssh_cmd, mds_server); - if (system(cmd)) { - printf("Can't access server node: %s using method: %s\n", mds_server, ssh_cmd); - exit(-1); - } -} - -int main(int argc, char * const argv[]) -{ - int opt_index, c; - static struct option long_opts[] = { - {"target", 1, 0, 0}, - {"dumpfile", 1, 0, 0}, - {"ssh", 1, 0, 0}, - {0, 0, 0, 0} - }; - - if (argc < 4 - (getenv(ENV_LUSTRE_MNTTGT)||getenv(ENV_LUSTRE_DUMPFILE))) - usage(argv[0]); - - while ((c = getopt_long(argc, argv, "s:b:f:", long_opts, &opt_index)) != -1) { - switch (c) { - case 0: { - if (!optarg[0]) - usage(argv[0]); - - if (!strcmp(long_opts[opt_index].name, "target")) { - setenv(ENV_LUSTRE_MNTTGT, optarg, 1); - } else if (!strcmp(long_opts[opt_index].name, "dumpfile")) { - setenv(ENV_LUSTRE_DUMPFILE, optarg, 1); - } else if (!strcmp(long_opts[opt_index].name, "ssh")) { - safe_strncpy(ssh_cmd, optarg, MAX_STRING_SIZE); - } else - usage(argv[0]); - break; - } - case 's': - safe_strncpy(mds_server, optarg, MAX_STRING_SIZE); - break; - case 'b': - safe_strncpy(barrier_script, optarg, MAX_STRING_SIZE); - break; - case 'f': - safe_strncpy(failover_script, optarg, MAX_STRING_SIZE); - break; - default: - usage(argv[0]); - } - } - - if (optind != argc) - usage(argv[0]); - if (!strlen(mds_server) || !strlen(barrier_script) || - !strlen(failover_script)) - usage(argv[0]); - - /* default to using ssh */ - if (!strlen(ssh_cmd)) { - safe_strncpy(ssh_cmd, "ssh", MAX_STRING_SIZE); - } - - test_ssh(); - - /* prepare remote command */ - sprintf(barrier_cmd, "%s %s \"%s\"", - ssh_cmd, mds_server, barrier_script); - sprintf(failover_cmd, "%s %s \"%s\"", - ssh_cmd, mds_server, failover_script); - - setenv(ENV_LUSTRE_TIMEOUT, "10", 1); - - __liblustre_setup_(); - - t0(); - t1(); - t2a(); - t2b(); - t3a(); - t3b(); - t4(); - t5(); - t6(); - t7(); - t8(); - t9(); - t10(); - - printf("liblustre is about shutdown\n"); - __liblustre_cleanup_(); - - printf("complete successfully\n"); - return 0; -} diff --git a/lustre/liblustre/tests/sanity.c b/lustre/liblustre/tests/sanity.c deleted file mode 100644 index 27f7211d43..0000000000 --- a/lustre/liblustre/tests/sanity.c +++ /dev/null @@ -1,1518 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light user test program - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define _BSD_SOURCE -#define _FILE_OFFSET_BITS 64 - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <getopt.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <signal.h> -#include <errno.h> -#include <dirent.h> -#include <sys/uio.h> -#include <sys/time.h> -#include <time.h> - -#include <liblustre.h> -#include "test_common.h" -#include <lustre/liblustreapi.h> - -#define _npages (2048) - -void *buf_alloc; -int buf_size; -int opt_verbose; -struct timeval start; - -extern char *lustre_path; - -#define ENTRY(str) \ - do { \ - char buf[100]; \ - int len; \ - sprintf(buf, "===== START %s: %s ", __FUNCTION__, (str)); \ - len = strlen(buf); \ - if (len < 79) { \ - memset(buf+len, '=', 100-len); \ - buf[79] = '\n'; \ - buf[80] = 0; \ - } \ - printf("%s", buf); \ - gettimeofday(&start, NULL); \ - } while (0) - -#define LEAVE() \ - do { \ - struct timeval stop; \ - char buf[100] = { '\0' }; \ - int len = sizeof(buf) - 1; \ - long usec; \ - gettimeofday(&stop, NULL); \ - usec = (stop.tv_sec - start.tv_sec) * 1000000 + \ - (stop.tv_usec - start.tv_usec); \ - len = snprintf(buf, len, \ - "===== END TEST %s: successfully (%gs)", \ - __FUNCTION__, (double)usec / 1000000); \ - if (len < 79) { \ - memset(buf+len, '=', sizeof(buf) - len); \ - buf[79] = '\n'; \ - buf[80] = 0; \ - } \ - printf("%s", buf); \ - return 0; \ - } while (0) - -#define MAX_PATH_LENGTH 4096 - -int t1(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - - snprintf(path, MAX_PATH_LENGTH, "%s/test_t1", lustre_path); - - if (opt_verbose) - printf("touch+unlink %s\n", path); - - t_touch(path); - t_unlink(path); - LEAVE(); -} - -int t2(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - - ENTRY("mkdir/rmdir"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t2", lustre_path); - - t_mkdir(path); - t_rmdir(path); - LEAVE(); -} - -int t3(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - - ENTRY("regular stat"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t3", lustre_path); - - t_touch(path); - t_check_stat(path, NULL); - t_unlink(path); - LEAVE(); -} - -int t4(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - - ENTRY("dir stat"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t4", lustre_path); - - t_mkdir(path); - t_check_stat(path, NULL); - t_rmdir(path); - LEAVE(); -} - -int t6(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - char path2[MAX_PATH_LENGTH] = ""; - - ENTRY("symlink"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t6", lustre_path); - snprintf(path2, MAX_PATH_LENGTH, "%s/test_t6_link", lustre_path); - - t_touch(path); - t_symlink(path, path2); - t_check_stat(path2, NULL); - t_unlink(path2); - t_unlink(path); - LEAVE(); -} - -int t6b(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - char path2[MAX_PATH_LENGTH] = ""; - char cwd[MAX_PATH_LENGTH] = ""; - char *tmp; - int fd; - - ENTRY("symlink + chdir and open"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t6b", lustre_path); - snprintf(path2, MAX_PATH_LENGTH, "%s/test_t6b_link", lustre_path); - - t_mkdir(path); - t_symlink(path, path2); - t_check_stat(path2, NULL); - - tmp = getcwd(cwd, MAX_PATH_LENGTH); - if (tmp == NULL) { - fprintf(stderr, "current path too long to fit in " - "MAX_PATH_LENGTH?\n"); - LEAVE(); - } - t_chdir(path2); - t_chdir(cwd); - t_rmdir(path); - t_touch(path); - - fd = t_open(path2); - t_close(fd); - - t_unlink(path2); - t_unlink(path); - LEAVE(); -} - -int t7(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - int rc; - - ENTRY("mknod"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t7", lustre_path); - - if (geteuid() != 0) { - rc = mknod(path, S_IFCHR | 0644, (5<<8 | 4)); - if (rc != -1 || errno != EPERM) { - printf("mknod shouldn't success: rc %d, errno %d\n", - rc, errno); - } - } else { - t_mknod(path, S_IFCHR | 0644, 5, 4); - t_check_stat(path, NULL); - t_unlink(path); - } - LEAVE(); -} - -int t8(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - - ENTRY("chmod"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t8", lustre_path); - - /* Check file. */ - t_touch(path); - t_chmod_raw(path, 0700); - t_check_stat(path, NULL); - t_unlink(path); - - /* Check dir. */ - t_mkdir(path); - t_chmod_raw(path, 0700); - t_check_stat(path, NULL); - t_rmdir(path); - - LEAVE(); -} - -int t9(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - char path2[MAX_PATH_LENGTH] = ""; - - ENTRY("hard link"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t9", lustre_path); - snprintf(path2, MAX_PATH_LENGTH, "%s/test_t9_link", lustre_path); - - t_touch(path); - t_link(path, path2); - t_check_stat(path, NULL); - t_check_stat(path2, NULL); - t_unlink(path); - t_unlink(path2); - LEAVE(); -} - -int t10(char *name) -{ - char dir1[MAX_PATH_LENGTH] = ""; - char dir2[MAX_PATH_LENGTH] = ""; - char path1[MAX_PATH_LENGTH] = ""; - char path2[MAX_PATH_LENGTH] = ""; - char rename1[MAX_PATH_LENGTH] = ""; - char rename2[MAX_PATH_LENGTH] = ""; - char rename3[MAX_PATH_LENGTH] = ""; - - ENTRY("rename"); - snprintf(dir1, MAX_PATH_LENGTH, "%s/test_t10_dir1", lustre_path); - snprintf(dir2, MAX_PATH_LENGTH, "%s/test_t10_dir2", lustre_path); - snprintf(path1, MAX_PATH_LENGTH, "%s/test_t10_reg1", lustre_path); - snprintf(path2, MAX_PATH_LENGTH, "%s/test_t10_reg2", lustre_path); - snprintf(rename1, MAX_PATH_LENGTH, "%s/test_t10_dir1/rename1", lustre_path); - snprintf(rename2, MAX_PATH_LENGTH, "%s/test_t10_dir2/rename2", lustre_path); - snprintf(rename3, MAX_PATH_LENGTH, "%s/test_t10_dir2/rename3", lustre_path); - - t_mkdir(dir1); - t_mkdir(dir2); - t_touch(path1); - t_touch(path2); - t_rename(path1, rename1); - t_rename(path2, rename2); - t_rename(rename1, rename2); - t_rename(dir1, rename3); - t_unlink(rename2); - t_rmdir(rename3); - t_rmdir(dir2); - LEAVE(); -} - -int t11(char *name) -{ - char *base=lustre_path; - char path[MAX_PATH_LENGTH], path2[MAX_PATH_LENGTH]; - int i, j, level = 5, nreg = 5; - ENTRY("deep tree"); - - safe_strncpy(path, base, MAX_PATH_LENGTH); - - for (i = 0; i < level; i++) { - for (j = 0; j < nreg; j++) { - sprintf(path2, "%s/file%d", path, j); - t_touch(path2); - } - - strcat(path, "/dir"); - t_mkdir(path); - } - - for (i = level; i > 0; i--) { - safe_strncpy(path, base, MAX_PATH_LENGTH); - for (j = 1; j < i; j++) - strcat(path, "/dir"); - - for (j = 0; j < nreg; j++) { - sprintf(path2, "%s/file%d", path, j); - t_unlink(path2); - } - - strcat(path, "/dir"); - t_rmdir(path); - } - - LEAVE(); -} - -int t12(char *name) -{ - char dir[MAX_PATH_LENGTH] = ""; - char buf[1024*128]; - int fd; - ENTRY("empty directory readdir"); - snprintf(dir, MAX_PATH_LENGTH, "%s/test_t12_dir", lustre_path); - - t_mkdir(dir); - fd = t_opendir(dir); - t_ls(fd, buf, sizeof(buf)); - t_close(fd); - t_rmdir(dir); - LEAVE(); -} - -int t13(char *name) -{ - char dir[MAX_PATH_LENGTH] = ""; - char path[1024]; - char buf[1024]; - const int nfiles = 20; - char *prefix = "test13_filename_prefix_"; - int fd, i; - ENTRY("multiple entries directory readdir"); - snprintf(dir, MAX_PATH_LENGTH, "%s/test_t13_dir/", lustre_path); - - t_mkdir(dir); - printf("Creating %d files...\n", nfiles); - for (i = 0; i < nfiles; i++) { - sprintf(path, "%s%s%05d", dir, prefix, i); - t_touch(path); - } - fd = t_opendir(dir); - t_ls(fd, buf, sizeof(buf)); - t_close(fd); - printf("Cleanup...\n"); - for (i = 0; i < nfiles; i++) { - sprintf(path, "%s%s%05d", dir, prefix, i); - t_unlink(path); - } - t_rmdir(dir); - LEAVE(); -} - -int t14(char *name) -{ - char dir[MAX_PATH_LENGTH] = ""; - char path[1024]; - char buf[1024]; - const int nfiles = 256; - char *prefix = "test14_filename_long_prefix_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA___"; - struct dirent64 *ent; - int fd, i, rc, pos, index; - loff_t base = 0; - ENTRY(">1 block(4k) directory readdir"); - snprintf(dir, MAX_PATH_LENGTH, "%s/test_t14_dir/", lustre_path); - - rc = mkdir(dir, 0755); - if (rc < 0 && errno != EEXIST) { - printf("mkdir(%s) error: %s\n", dir, strerror(errno)); - exit(1); - } - printf("Creating %d files...\n", nfiles); - for (i = 0; i < nfiles; i++) { - sprintf(path, "%s%s%05d", dir, prefix, i); - t_touch(path); - } - fd = t_opendir(dir); - printf("Listing...\n"); - index = 0; - while ((rc = getdirentries64(fd, buf, 1024, &base)) > 0) { - pos = 0; - while (pos < rc) { - char *item; - - ent = (struct dirent64 *) ((char*) buf + pos); - item = (char *) ent->d_name; - if (!strcmp(item, ".") || !strcmp(item, "..")) - goto iter; - if (strstr(item, prefix) != item) { - printf("found bad name %s\n", item); - return(-1); - } - printf("[%03d]: %s\n", - index++, item + strlen(prefix)); -iter: - pos += ent->d_reclen; - } - } - if (rc < 0) { - printf("getdents error %d\n", rc); - return(-1); - } - if (index != nfiles) { - printf("get %d files != %d\n", index, nfiles); - return(-1); - } - t_close(fd); - printf("Cleanup...\n"); - for (i = 0; i < nfiles; i++) { - sprintf(path, "%s%s%05d", dir, prefix, i); - t_unlink(path); - } - t_rmdir(dir); - LEAVE(); -} - -int t15(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - int fd; - ENTRY("open-stat-close"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t15_file", lustre_path); - - t_touch(file); - fd = t_open(file); - t_check_stat(file, NULL); - t_close(fd); - t_unlink(file); - LEAVE(); -} - -int t16(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - ENTRY("small-write-read"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t16_file", lustre_path); - - t_echo_create(file, "aaaaaaaaaaaaaaaaaaaaaa"); - t_grep(file, "aaaaaaaaaaaaaaaaaaaaaa"); - t_unlink(file); - LEAVE(); -} - -int t17(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - int fd; - ENTRY("open-unlink without close"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t17_file", lustre_path); - - fd = open(file, O_WRONLY | O_CREAT, 0666); - if (fd < 0) { - printf("failed to create file: %s\n", strerror(errno)); - return(-1); - } - t_unlink(file); - LEAVE(); -} - -int t18(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - char buf[128]; - int fd, i; - struct stat statbuf[3]; - ENTRY("write should change mtime/ctime"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t18_file", lustre_path); - - for (i = 0; i < 3; i++) { - fd = open(file, O_RDWR|O_CREAT|O_APPEND, (mode_t)0666); - if (fd < 0) { - printf("error open file: %s\n", strerror(errno)); - return(-1); - } - if (write(fd, buf, sizeof(buf)) != sizeof(buf)) { - printf("error write file\n"); - return(-1); - } - close(fd); - if(stat(file, &statbuf[i]) != 0) { - printf("Error stat\n"); - return(1); - } - printf("ctime %lu, mtime %lu\n", - statbuf[i].st_ctime, statbuf[i].st_mtime); - sleep(2); - } - - for (i = 1; i < 3; i++) { - if ((statbuf[i].st_ctime <= statbuf[i-1].st_ctime) || - (statbuf[i].st_mtime <= statbuf[i-1].st_mtime)) { - printf("time error\n"); - return(-1); - } - } - t_unlink(file); - LEAVE(); -} - -int t18b(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - int i; - struct stat statbuf[3]; - ENTRY("utime should change mtime/atime/ctime"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t18b_file", lustre_path); - t_touch(file); - - for (i = 0; i < 3; i++) { - t_utime(file, NULL); - if(stat(file, &statbuf[i]) != 0) { - printf("Error stat\n"); - return(1); - } - printf("atime %lu, mtime %lu, ctime %lu\n", - statbuf[i].st_atime, statbuf[i].st_mtime, - statbuf[i].st_ctime); - sleep(2); - } - - for (i = 1; i < 3; i++) { - if ((statbuf[i].st_atime <= statbuf[i-1].st_atime) || - (statbuf[i].st_mtime <= statbuf[i-1].st_mtime) || - (statbuf[i].st_ctime <= statbuf[i-1].st_ctime)) { - printf("time error\n"); - return(-1); - } - } - t_unlink(file); - LEAVE(); -} - -static int check_file_size(char *file, off_t size) -{ - struct stat statbuf; - - if (stat(file, &statbuf) != 0) { - printf("Error stat(%s)\n", file); - return(1); - } - if (statbuf.st_size != size) { - printf("size of %s: %ld != %lld\n", file, statbuf.st_size, (unsigned long long )size); - return(-1); - } - return 0; -} - -int t19(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - int fd; - int result; - ENTRY("open(O_TRUNC) should truncate file to 0-length"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t19_file", lustre_path); - - t_echo_create(file, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); - - fd = open(file, O_RDWR|O_CREAT|O_TRUNC, (mode_t)0666); - if (fd < 0) { - printf("error open file: %s\n", strerror(errno)); - return(-1); - } - close(fd); - result = check_file_size(file, 0); - if (result != 0) - return result; - t_unlink(file); - LEAVE(); -} - -int t20(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - int fd; - struct iovec iov[2]; - char buf[100]; - ssize_t ret; - ENTRY("trap app's general bad pointer for file i/o"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t20_file", lustre_path); - - fd = open(file, O_RDWR|O_CREAT, (mode_t)0666); - if (fd < 0) { - printf("error open file: %s\n", strerror(errno)); - return(-1); - } - - ret = write(fd, NULL, 20); - if (ret != -1 || errno != EFAULT) { - printf("write 1: ret %ld, errno %d\n", ret, errno); - return(1); - } - ret = write(fd, (void *)-1, 20); - if (ret != -1 || errno != EFAULT) { - printf("write 2: ret %ld, errno %d\n", ret, errno); - return(1); - } - iov[0].iov_base = NULL; - iov[0].iov_len = 10; - iov[1].iov_base = (void *)-1; - iov[1].iov_len = 10; - ret = writev(fd, iov, 2); - if (ret != -1 || errno != EFAULT) { - printf("writev 1: ret %ld, errno %d\n", ret, errno); - return(1); - } - iov[0].iov_base = NULL; - iov[0].iov_len = 0; - iov[1].iov_base = buf; - iov[1].iov_len = sizeof(buf); - ret = writev(fd, iov, 2); - if (ret != sizeof(buf)) { - printf("write 3 ret %ld, error %d\n", ret, errno); - return(1); - } - lseek(fd, 0, SEEK_SET); - - ret = read(fd, NULL, 20); - if (ret != -1 || errno != EFAULT) { - printf("read 1: ret %ld, errno %d\n", ret, errno); - return(1); - } - ret = read(fd, (void *)-1, 20); - if (ret != -1 || errno != EFAULT) { - printf("read 2: ret %ld, errno %d\n", ret, errno); - return(1); - } - iov[0].iov_base = NULL; - iov[0].iov_len = 10; - iov[1].iov_base = (void *)-1; - iov[1].iov_len = 10; - ret = readv(fd, iov, 2); - if (ret != -1 || errno != EFAULT) { - printf("readv 1: ret %ld, errno %d\n", ret, errno); - return(1); - } - iov[0].iov_base = NULL; - iov[0].iov_len = 0; - iov[1].iov_base = buf; - iov[1].iov_len = sizeof(buf); - ret = readv(fd, iov, 2); - if (ret != sizeof(buf)) { - printf("read 3 ret %ld, error %d\n", ret, errno); - return(1); - } - - close(fd); - t_unlink(file); - LEAVE(); -} - -int t21(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - int fd, ret; - struct flock lock = { - .l_type = F_RDLCK, - .l_whence = SEEK_SET, - }; - - ENTRY("basic fcntl support"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t21_file", lustre_path); - - fd = open(file, O_RDWR|O_CREAT, (mode_t)0666); - if (fd < 0) { - printf("error open file: %s\n", file); - return(-1); - } - - t_fcntl(fd, F_SETFL, O_APPEND); - if (!(ret = t_fcntl(fd, F_GETFL)) & O_APPEND) { - printf("error get flag: ret %x\n", ret); - return(-1); - } - - t_fcntl(fd, F_SETLK, &lock); - t_fcntl(fd, F_GETLK, &lock); - lock.l_type = F_WRLCK; - t_fcntl(fd, F_SETLKW, &lock); - t_fcntl(fd, F_GETLK, &lock); - lock.l_type = F_UNLCK; - t_fcntl(fd, F_SETLK, &lock); - - close(fd); - t_unlink(file); - LEAVE(); -} - -int t22(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - int fd; - char *str = "1234567890"; - char buf[100]; - ssize_t ret; - ENTRY("make sure O_APPEND take effect"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t22_file", lustre_path); - - fd = open(file, O_RDWR|O_CREAT|O_APPEND, (mode_t)0666); - if (fd < 0) { - printf("error open file: %s\n", strerror(errno)); - return(-1); - } - - lseek(fd, 100, SEEK_SET); - ret = write(fd, str, strlen(str)); - if (ret != strlen(str)) { - printf("write 1: ret %ld, errno %d\n", ret, errno); - return(1); - } - - lseek(fd, 0, SEEK_SET); - ret = read(fd, buf, sizeof(buf)); - if (ret != strlen(str)) { - printf("read 1 got %ld\n", ret); - return(1); - } - - if (memcmp(buf, str, strlen(str))) { - printf("read 1 data err\n"); - return(1); - } - - if (fcntl(fd, F_SETFL, 0)) { - printf("fcntl err: %s\n", strerror(errno)); - return(1); - } - - lseek(fd, 100, SEEK_SET); - ret = write(fd, str, strlen(str)); - if (ret != strlen(str)) { - printf("write 2: ret %ld, errno %d\n", ret, errno); - return(1); - } - - lseek(fd, 100, SEEK_SET); - ret = read(fd, buf, sizeof(buf)); - if (ret != strlen(str)) { - printf("read 2 got %ld\n", ret); - return(1); - } - - if (memcmp(buf, str, strlen(str))) { - printf("read 2 data err\n"); - return(1); - } - - close(fd); - t_unlink(file); - LEAVE(); -} - -int t23(char *name) -{ - char path[MAX_PATH_LENGTH]; - int fd; - long long ret; - loff_t off; - - ENTRY("handle seek > 2GB"); - snprintf(path, MAX_PATH_LENGTH, "%s/f%s", lustre_path, name); - - fd = open(path, O_WRONLY | O_CREAT | O_LARGEFILE, 0666); - if (fd < 0) { - printf("failed to create file %s: %s\n", path, strerror(errno)); - return(-1); - } - - off = 2048ULL * 1024 * 1024 - buf_size / 2; - ret = lseek(fd, off, SEEK_SET); - if (ret != off) { - printf("seek error for initial %llu != %llu\n", - ret, (long long)off); - return -1; - } - - ret = write(fd, buf_alloc, buf_size); - if (ret != buf_size) { - printf("write error for %d != %llubytes @ %llu\n", - buf_size, ret, (long long)off); - if (ret == -1) - perror("write"); - return -1; - } - - ret = lseek(fd, off, SEEK_SET); - if (ret != off) { - printf("seek < 2GB error for %llu != %llu\n", - ret, (long long)off); - if (ret == -1) - perror("seek < 2GB"); - return -1; - } - - ret = lseek(fd, off + buf_size - 2, SEEK_SET); - if (ret != off + buf_size - 2) { - printf("seek > 2GB error for %llu != %llu\n", - ret, (long long)off); - if (ret == -1) - perror("seek > 2GB"); - return -1; - } - - ret = lseek(fd, -buf_size + 2, SEEK_CUR); - if (ret != off) { - printf("relative seek error for %d %llu != %llu\n", - -buf_size + 2, ret, (unsigned long long) off); - if (ret == -1) - perror("relative seek"); - return -1; - } - - ret = lseek(fd, 0, SEEK_END); - if (ret != off + buf_size) { - printf("end seek error for %llu != %llu\n", - ret, (long long)off + buf_size); - if (ret == -1) - perror("end seek"); - return -1; - } - - ret = lseek(fd, 0, SEEK_SET); - if (ret != 0) { - printf("seek 0 error for %llu != 0\n", ret); - if (ret == -1) - perror("seek 0"); - return -1; - } - - off = 2048ULL * 1024 * 1024, SEEK_SET; - ret = lseek(fd, off, SEEK_SET); - if (ret != off) { - printf("seek 2GB error for %llu != %llu\n", ret, (unsigned long long) off); - if (ret == -1) - perror("seek 2GB"); - return -1; - } - - close(fd); - t_unlink(path); - LEAVE(); -} - -/* pos: i/o start from - * xfer: npages per transfer - */ -static int pages_io(int xfer, loff_t pos) -{ - char path[MAX_PATH_LENGTH] = ""; - - int check_sum[_npages] = {0,}, *buf; - int fd, rc, i, j, data_error = 0; - struct timeval tw1, tw2, tr1, tr2; - double tw, tr; - loff_t ret; - - snprintf(path, MAX_PATH_LENGTH, "%s/test_t50", lustre_path); - - memset(buf_alloc, 0, buf_size); - - /* create sample data */ - for (i = 0, buf = buf_alloc; i < _npages; i++) { - for (j = 0; j < PAGE_SIZE/sizeof(int); j++, buf++) { - *buf = rand(); - } - } - - /* compute checksum */ - for (i = 0, buf = buf_alloc; i < _npages; i++) { - for (j = 0; j < PAGE_SIZE/sizeof(int); j++, buf++) { - check_sum[i] += *buf; - } - } - - unlink(path); - t_touch(path); - - fd = t_open(path); - - /* write */ - ret = lseek(fd, pos, SEEK_SET); - if (ret != pos) { - perror("write seek"); - return 1; - } - gettimeofday(&tw1, NULL); - for (i = 0, buf = buf_alloc; i < _npages; - i += xfer, buf += xfer * PAGE_SIZE / sizeof(int)) { - rc = write(fd, buf, PAGE_SIZE * xfer); - if (rc != PAGE_SIZE * xfer) { - printf("write error (i %d, rc %d): %s\n", i, rc, - strerror(errno)); - return(1); - } - } - gettimeofday(&tw2, NULL); - - memset(buf_alloc, 0, buf_size); - - /* read */ - ret = lseek(fd, pos, SEEK_SET); - if (ret != pos) { - perror("read seek"); - return 1; - } - gettimeofday(&tr1, NULL); - for (i = 0, buf = buf_alloc; i < _npages; - i += xfer, buf += xfer * PAGE_SIZE / sizeof(int)) { - rc = read(fd, buf, PAGE_SIZE * xfer); - if (rc != PAGE_SIZE * xfer) { - printf("read error (i %d, rc %d): %s\n", i, rc, - strerror(errno)); - return(1); - } - } - gettimeofday(&tr2, NULL); - - /* compute checksum */ - for (i = 0, buf = buf_alloc; i < _npages; i++) { - int sum = 0; - for (j = 0; j < PAGE_SIZE/sizeof(int); j++, buf++) { - sum += *buf; - } - if (sum != check_sum[i]) { - data_error = 1; - printf("chunk %d checksum error expected %#x got %#x\n", - i, check_sum[i], sum); - } - } - - t_close(fd); - t_unlink(path); - tw = (tw2.tv_sec - tw1.tv_sec) * 1000000 + (tw2.tv_usec - tw1.tv_usec); - tr = (tr2.tv_sec - tr1.tv_sec) * 1000000 + (tr2.tv_usec - tr1.tv_usec); - printf(" (R:%.3fM/s, W:%.3fM/s)\n", - (_npages * PAGE_SIZE) / (tw / 1000000.0) / (1024 * 1024), - (_npages * PAGE_SIZE) / (tr / 1000000.0) / (1024 * 1024)); - - if (data_error) - return 1; - - return 0; -} - -int t50(char *name) -{ - int np = 1; - loff_t offset = 0; - - ENTRY("4k aligned i/o sanity"); - while (np <= _npages) { - printf("%3d per xfer(total %d)...\t", np, _npages); - fflush(stdout); - if (pages_io(np, offset) != 0) - return 1; - np += np; - } - LEAVE(); -} - -int t50b(char *name) -{ - loff_t off_array[] = {1, 17, 255, 258, 4095, 4097, 8191, - 1024*1024*1024*1024ULL}; - int i; - loff_t offset; - - ENTRY("4k un-aligned i/o sanity"); - for (i = 0; i < sizeof(off_array)/sizeof(loff_t); i++) { - offset = off_array[i]; - printf("16 per xfer(total %d), offset %10lld...\t", - _npages, (unsigned long long) offset); - if (pages_io(16, offset) != 0) - return 1; - } - - LEAVE(); -} - -enum { - T51_STEP = 42, - T51_NR = 1000 -}; - -/* - * truncate(2) checks. - */ -int t51(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - int fd; - off_t size; - int result; - - ENTRY("truncate() should truncate file to proper length"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t51_file", lustre_path); - - for (size = 0; size < T51_NR * T51_STEP; size += T51_STEP) { - t_echo_create(file, ""); - if (truncate(file, size) != 0) { - printf("\nerror truncating file: %s\n",strerror(errno)); - return(-1); - } - result = check_file_size(file, size); - if (result != 0) - return result; - t_unlink(file); - - t_echo_create(file, ""); - fd = open(file, O_RDWR|O_CREAT, (mode_t)0666); - if (fd < 0) { - printf("\nerror open file: %s\n", strerror(errno)); - return(-1); - } - if (ftruncate(fd, size) != 0) { - printf("\nerror ftruncating file:%s\n",strerror(errno)); - return(-1); - } - close(fd); - result = check_file_size(file, size); - if (result != 0) - return result; - t_unlink(file); - if (size % (T51_STEP * (T51_NR / 75)) == 0) { - printf("."); - fflush(stdout); - } - } - printf("\n"); - LEAVE(); -} -/* - * check atime update during read - */ -int t52(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - char buf[16]; - struct stat statbuf; - time_t atime; - time_t diff; - int fd, i; - - ENTRY("atime should be updated during read"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t52_file", lustre_path); - - t_echo_create(file, "check atime update during read"); - fd = open(file, O_RDONLY); - if (fd < 0) { - printf("\nerror open file: %s\n", strerror(errno)); - return(-1); - } - stat(file, &statbuf); - printf("st_atime=%s", ctime(&statbuf.st_atime)); - atime = statbuf.st_atime; - for (i = 0; i < 3; i++) { - sleep(2); - read(fd, buf, sizeof(buf)); - stat(file, &statbuf); - printf("st_atime=%s", ctime(&statbuf.st_atime)); - diff = statbuf.st_atime - atime; - if (diff <= 0) { - printf("atime doesn't updated! failed!\n"); - close(fd); - t_unlink(file); - return -1; - } - atime = statbuf.st_atime; - } - close(fd); - t_unlink(file); - LEAVE(); -} - -#define NEW_TIME 10000 -int t53(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - struct utimbuf times; /* struct. buffer for utime() */ - struct stat stat_buf; /* struct buffer to hold file info. */ - time_t mtime, atime; - - ENTRY("mtime/atime should be updated by utime() call"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t53_file", lustre_path); - - t_echo_create(file, "check mtime/atime update by utime() call"); - - /* Initialize the modification and access time in the times arg */ - times.actime = NEW_TIME+10; - times.modtime = NEW_TIME; - - /* file modification/access time */ - utime(file, ×); - - if (stat(file, &stat_buf) < 0) { - printf("stat(2) of %s failed, error:%d %s\n", - file, errno, strerror(errno)); - } - mtime = stat_buf.st_mtime; - atime = stat_buf.st_atime; - - if ((mtime == NEW_TIME) && (atime == NEW_TIME + 10)) { - t_unlink(file); - LEAVE(); - } - - printf("mod time %ld, expected %ld\n", mtime, (long)NEW_TIME); - printf("acc time %ld, expected %ld\n", atime, (long)NEW_TIME + 10); - - t_unlink(file); - return (-1); -} - -int t54(char *name) -{ - char file[MAX_PATH_LENGTH] = ""; - struct flock lock; - int fd, err; - - ENTRY("fcntl should return 0 when succeed in getting flock"); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t54_file", lustre_path); - - t_echo_create(file, "fcntl should return 0 when succeed"); - - fd = open(file, O_RDWR); - if (fd < 0) { - printf("\nerror open file: %s\n", strerror(errno)); - return(-1); - } - lock.l_type = F_WRLCK; - lock.l_start = 0; - lock.l_whence = 0; - lock.l_len = 1; - if ((err = t_fcntl(fd, F_SETLKW, &lock)) != 0) { - fprintf(stderr, "fcntl returned: %d (%s)\n", - err, strerror(err)); - close(fd); - t_unlink(file); - return (-1); - } - - lock.l_type = F_UNLCK; - t_fcntl(fd, F_SETLKW, &lock); - close(fd); - t_unlink(file); - LEAVE(); -} - -/* for O_DIRECTORY */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#define STRIPE_SIZE (2048 * 2048) -#define STRIPE_OFFSET 0 -#define STRIPE_COUNT 1 -int t55(char *name) -{ - char path[MAX_PATH_LENGTH] = ""; - char file[MAX_PATH_LENGTH] = ""; - struct lov_user_md *lum = NULL; - struct lov_user_ost_data *lo = NULL; - int index, fd, buflen, rc; - - ENTRY("setstripe/getstripe"); - snprintf(path, MAX_PATH_LENGTH, "%s/test_t55", lustre_path); - snprintf(file, MAX_PATH_LENGTH, "%s/test_t55/file_t55", lustre_path); - - buflen = sizeof(struct lov_user_md); - buflen += STRIPE_COUNT * sizeof(struct lov_user_ost_data); - lum = (struct lov_user_md *)malloc(buflen); - if (!lum) { - printf("out of memory!\n"); - return -1; - } - memset(lum, 0, buflen); - - t_mkdir(path); - rc = llapi_file_create(path, STRIPE_SIZE, STRIPE_OFFSET, - STRIPE_COUNT, LOV_PATTERN_RAID0); - if (rc) { - printf("llapi_file_create failed: rc = %d (%s) \n", - rc, strerror(-rc)); - t_rmdir(path); - free(lum); - return -1; - } - - fd = open(file, O_CREAT | O_RDWR, 0644); - if (fd < 0) { - printf("open file(%s) failed: rc = %d (%s) \n)", - file, fd, strerror(errno)); - t_rmdir(path); - free(lum); - return -1; - } - - lum->lmm_magic = LOV_USER_MAGIC; - lum->lmm_stripe_count = STRIPE_COUNT; - rc = ioctl(fd, LL_IOC_LOV_GETSTRIPE, lum); - if (rc) { - printf("dir:ioctl(LL_IOC_LOV_GETSTRIPE) failed: rc = %d(%s)\n", - rc, strerror(errno)); - close(fd); - t_unlink(file); - t_rmdir(path); - free(lum); - return -1; - } - - close(fd); - - if (opt_verbose) { - printf("lmm_magic: 0x%08X\n", lum->lmm_magic); - printf("lmm_object_id: "LPX64"\n", lum->lmm_object_id); - printf("lmm_object_gr: "LPX64"\n", lum->lmm_object_gr); - printf("lmm_stripe_count: %u\n", (int)lum->lmm_stripe_count); - printf("lmm_stripe_size: %u\n", lum->lmm_stripe_size); - printf("lmm_stripe_pattern: %x\n", lum->lmm_pattern); - - for (index = 0; index < lum->lmm_stripe_count; index++) { - lo = lum->lmm_objects + index; - printf("object %d:\n", index); - printf("\tobject_gr: "LPX64"\n", lo->l_object_gr); - printf("\tobject_id: "LPX64"\n", lo->l_object_id); - printf("\tost_gen: %#x\n", lo->l_ost_gen); - printf("\tost_idx: %u\n", lo->l_ost_idx); - } - } - - if (lum->lmm_magic != LOV_USER_MAGIC || - lum->lmm_pattern != LOV_PATTERN_RAID0 || - lum->lmm_stripe_size != STRIPE_SIZE || - lum->lmm_objects[0].l_ost_idx != STRIPE_OFFSET || - lum->lmm_stripe_count != STRIPE_COUNT) { - printf("incorrect striping information!\n"); - t_unlink(file); - t_rmdir(path); - free(lum); - return -1; - } - t_unlink(file); - - /* setstripe on regular file */ - rc = llapi_file_create(file, STRIPE_SIZE, STRIPE_OFFSET, - STRIPE_COUNT, LOV_PATTERN_RAID0); - if (rc) { - printf("llapi_file_create failed: rc = %d (%s) \n", - rc, strerror(-rc)); - t_unlink(file); - t_rmdir(path); - free(lum); - return -1; - } - fd = open(file, O_RDWR, 0644); - if (fd < 0) { - printf("failed to open(%s): rc = %d (%s)\n", - file, fd, strerror(errno)); - t_unlink(file); - t_rmdir(path); - free(lum); - return -1; - } - - lum->lmm_magic = LOV_USER_MAGIC; - lum->lmm_stripe_count = STRIPE_COUNT; - rc = ioctl(fd, LL_IOC_LOV_GETSTRIPE, lum); - if (rc) { - printf("file:ioctl(LL_IOC_LOV_GETSTRIPE) failed: rc = %d(%s)\n", - rc, strerror(errno)); - close(fd); - t_unlink(file); - t_rmdir(path); - free(lum); - return -1; - } - close(fd); - - if (opt_verbose) { - printf("lmm_magic: 0x%08X\n", lum->lmm_magic); - printf("lmm_object_id: "LPX64"\n", lum->lmm_object_id); - printf("lmm_object_gr: "LPX64"\n", lum->lmm_object_gr); - printf("lmm_stripe_count: %u\n", (int)lum->lmm_stripe_count); - printf("lmm_stripe_size: %u\n", lum->lmm_stripe_size); - printf("lmm_stripe_pattern: %x\n", lum->lmm_pattern); - - for (index = 0; index < lum->lmm_stripe_count; index++) { - lo = lum->lmm_objects + index; - printf("object %d:\n", index); - printf("\tobject_gr: "LPX64"\n", lo->l_object_gr); - printf("\tobject_id: "LPX64"\n", lo->l_object_id); - printf("\tost_gen: %#x\n", lo->l_ost_gen); - printf("\tost_idx: %u\n", lo->l_ost_idx); - } - } - - if (lum->lmm_magic != LOV_USER_MAGIC || - lum->lmm_pattern != LOV_PATTERN_RAID0 || - lum->lmm_stripe_size != STRIPE_SIZE || - lum->lmm_objects[0].l_ost_idx != STRIPE_OFFSET || - lum->lmm_stripe_count != STRIPE_COUNT) { - printf("incorrect striping information!\n"); - t_unlink(file); - t_rmdir(path); - free(lum); - return -1; - } - - t_unlink(file); - t_rmdir(path); - free(lum); - LEAVE(); -} - -/* - * getdirentries should return -1 and set errno to EINVAL when the size - * specified as an argument is too small to contain at least one entry - * (see bugzilla ticket 12229) - */ -int t56(char *name) -{ - int fd; - size_t nbytes; - off_t basep = 0; - ssize_t rc = 0; - struct dirent dir; - - ENTRY("getdirentries should fail if nbytes is too small"); - - /* Set count to be very small. The result should be EINVAL */ - nbytes = 8; - - /* open the directory and call getdirentries */ - fd = t_opendir(lustre_path); - - rc = getdirentries(fd, (char *)&dir, nbytes, &basep); - - if (rc != -1) { - printf("Test failed: getdirentries returned %ld\n", rc); - t_close(fd); - return -1; - } - if (errno != EINVAL) { - printf("Test failed: getdirentries returned %ld but errno is set" - " to %d (should be EINVAL)\n", rc, errno); - t_close(fd); - return -1; - } - t_close(fd); - - LEAVE(); -} - - -extern void __liblustre_setup_(void); -extern void __liblustre_cleanup_(void); - - -void usage(char *cmd) -{ - printf("\n" - "usage: %s [--only {test}] --target mgsnid:/fsname\n", - cmd); - printf(" %s --dumpfile dumpfile\n", cmd); - exit(-1); -} - -struct testlist { - int (*test)(char *name); - char *name; -} testlist[] = { - { t1, "1" }, - { t2, "2" }, - { t3, "3" }, - { t4, "4" }, - { t6, "6" }, - { t6b, "6b" }, - { t7, "7" }, - { t8, "8" }, - { t9, "9" }, - { t10, "10" }, - { t11, "11" }, - { t12, "12" }, - { t13, "13" }, - { t14, "14" }, - { t15, "15" }, - { t16, "16" }, - { t17, "17" }, - { t18, "18" }, - { t18b, "t8b" }, - { t19, "19" }, - { t20, "20" }, - { t21, "21" }, - { t22, "22" }, - { t23, "23" }, - { t50, "50" }, - { t50b, "50b" }, - { t51, "51" }, - { t53, "53" }, - { t54, "54" }, - { t55, "55" }, - { t56, "56" }, - { NULL, NULL } -}; - -int main(int argc, char * const argv[]) -{ - struct testlist *test; - int opt_index, c, rc = 0, numonly = 0; - char *only[100]; - static struct option long_opts[] = { - {"dumpfile", 1, 0, 'd'}, - {"only", 1, 0, 'o'}, - {"target", 1, 0, 't'}, - {"verbose", 1, 0, 'v'}, - {0, 0, 0, 0} - }; - - while ((c = getopt_long(argc, argv, "d:o:t:v", long_opts, &opt_index)) != -1) { - switch (c) { - case 'd': - setenv(ENV_LUSTRE_DUMPFILE, optarg, 1); - break; - case 'o': - if (numonly == 0) - printf("Only running test(s): "); - printf("%s ", optarg); - only[numonly++] = optarg; - break; - case 't': - setenv(ENV_LUSTRE_MNTTGT, optarg, 1); - break; - case 'v': - opt_verbose++; - break; - default: - usage(argv[0]); - break; - } - } - - if (getenv(ENV_LUSTRE_MNTTGT) == NULL && - getenv(ENV_LUSTRE_DUMPFILE) == NULL) - usage(argv[0]); - - if (optind != argc) - usage(argv[0]); - - printf("\n"); - - __liblustre_setup_(); - - buf_size = _npages * PAGE_SIZE; - if (opt_verbose) - printf("allocating %d bytes buffer\n", buf_size); - buf_alloc = calloc(1, buf_size); - if (buf_alloc == NULL) { - fprintf(stderr, "error allocating %d\n", buf_size); - exit(-ENOMEM); - } - - for (test = testlist; test->test != NULL; test++) { - int run = 1, i; - - if (numonly > 0) { - int len; - - run = 0; - len = strlen(test->name); - for (i = 0; i < numonly; i++) { - int olen = strlen(only[i]); - - if (len < olen) - continue; - - if (strncmp(only[i], test->name, olen) == 0) { - switch(test->name[olen]) { - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - case '8': case '9': - break; - default: - run = 1; - break; - } - } - } - } - if (run && (rc = (test->test)(test->name)) != 0) - break; - } - - free(buf_alloc); - - printf("liblustre is about to shutdown\n"); - __liblustre_cleanup_(); - - printf("complete successfully\n"); - return rc; -} diff --git a/lustre/liblustre/tests/test_common.c b/lustre/liblustre/tests/test_common.c deleted file mode 100644 index 29377b1880..0000000000 --- a/lustre/liblustre/tests/test_common.c +++ /dev/null @@ -1,434 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#include <sys/stat.h> -#include <sys/types.h> -#include <unistd.h> -#include <stdlib.h> -#include <stdio.h> -#include <fcntl.h> -#include <string.h> -#include <errno.h> -#include <dirent.h> -#include <utime.h> -#include <stdarg.h> - -#include "test_common.h" - -int exit_on_err = 1; - -/****************************************************************** - * util functions - ******************************************************************/ - -#define EXIT(err) \ - do { \ - if (exit_on_err) \ - exit(err); \ - } while (0) - -#define EXIT_RET(err) \ - do { \ - if (exit_on_err) \ - exit(err); \ - else \ - return (err); \ - } while (0) - - -void t_touch(const char *path) -{ - int fd, rc; - - fd = open(path, O_RDWR|O_CREAT, 0644); - if (fd < 0) { - printf("open(%s) error: %s\n", path, strerror(errno)); - EXIT(fd); - } - - rc = close(fd); - if (rc) { - printf("close(%s) error: %s\n", path, strerror(errno)); - EXIT(rc); - } -} - -/* XXX Now libsysio don't support mcreate */ -void t_create(const char *path) -{ - return t_touch(path); -#if 0 - int rc; - - rc = mknod(path, S_IFREG | 0644, 0); - if (rc) { - printf("mknod(%s) error: %s\n", path, strerror(errno)); - exit(-1); - } -#endif -} - -void t_link(const char *src, const char *dst) -{ - int rc; - - rc = link(src, dst); - if (rc) { - printf("link(%s -> %s) error: %s\n", src, dst, strerror(errno)); - EXIT(1); - } -} - -void t_unlink(const char *path) -{ - int rc; - - rc = unlink(path); - if (rc) { - printf("unlink(%s) error: %s\n", path, strerror(errno)); - EXIT(-1); - } -} - -void t_mkdir(const char *path) -{ - int rc; - - rc = mkdir(path, 00755); - if (rc < 0) { - printf("mkdir(%s) error: %s\n", path, strerror(errno)); - EXIT(1); - } -} - -void t_rmdir(const char *path) -{ - int rc; - - rc = rmdir(path); - if (rc) { - printf("rmdir(%s) error: %s\n", path, strerror(errno)); - EXIT(1); - } -} - -void t_symlink(const char *src, const char *new) -{ - int rc; - - rc = symlink(src, new); - if (rc) { - printf("symlink(%s<-%s) error: %s\n", src, new, strerror(errno)); - EXIT(1); - } -} - -#define MKDEV(a,b) (((a) << 8) | (b)) -void t_mknod(const char *path, mode_t mode, int major, int minor) -{ - int rc; - - rc = mknod(path, mode, MKDEV(5, 4)); - if (rc) { - printf("mknod(%s) error: %s\n", path, strerror(errno)); - EXIT(1); - } -} - -void t_chmod_raw(const char *path, mode_t mode) -{ - int rc; - - rc = chmod(path, mode); - if (rc) { - printf("chmod(%s) error: %s\n", path, strerror(errno)); - EXIT(1); - } -} - -void t_chmod(const char *path, const char *format, ...) -{ -} - -void t_rename(const char *oldpath, const char *newpath) -{ - int rc; - - rc = rename(oldpath, newpath); - if (rc) { - printf("rename(%s -> %s) error: %s\n", - oldpath, newpath, strerror(errno)); - EXIT(1); - } -} - -int t_open_readonly(const char *path) -{ - int fd; - - fd = open(path, O_RDONLY); - if (fd < 0) { - printf("open(%s) error: %s\n", path, strerror(errno)); - EXIT_RET(fd); - } - return fd; -} - -int t_open(const char *path) -{ - int fd; - - fd = open(path, O_RDWR | O_LARGEFILE); - if (fd < 0) { - printf("open(%s) error: %s\n", path, strerror(errno)); - EXIT_RET(fd); - } - return fd; -} - -int t_chdir(const char *path) -{ - int rc = chdir(path); - if (rc < 0) { - printf("chdir(%s) error: %s\n", path, strerror(errno)); - EXIT_RET(rc); - } - return rc; -} - -int t_utime(const char *path, const struct utimbuf *buf) -{ - int rc = utime(path, buf); - if (rc < 0) { - printf("utime(%s, %p) error: %s\n", path, buf, - strerror(errno)); - EXIT_RET(rc); - } - return rc; -} - -int t_opendir(const char *path) -{ - int fd; - - fd = open(path, O_RDONLY); - if (fd < 0) { - printf("opendir(%s) error: %s\n", path, strerror(errno)); - EXIT_RET(fd); - } - return fd; -} - -void t_close(int fd) -{ - int rc; - - rc = close(fd); - if (rc < 0) { - printf("close(%d) error: %s\n", fd, strerror(errno)); - EXIT(1); - } -} - -int t_check_stat(const char *name, struct stat *buf) -{ - struct stat stat; - int rc; - - memset(&stat, 0, sizeof(stat)); - - rc = lstat(name, &stat); - if (rc) { - printf("error %d stat %s\n", rc, name); - EXIT_RET(rc); - } - if (buf) - memcpy(buf, &stat, sizeof(*buf)); - if (stat.st_blksize == 0) { - printf("error: blksize is 0\n"); - EXIT_RET(-EINVAL); - } - - return 0; -} - -int t_check_stat_fail(const char *name) -{ - struct stat stat; - int rc; - - rc = lstat(name, &stat); - if (!rc) { - printf("%s still exists\n", name); - EXIT(-1); - } - - return 0; -} - -void t_echo_create(const char *path, const char *str) -{ - int fd, rc; - - fd = open(path, O_RDWR|O_CREAT, 0644); - if (fd < 0) { - printf("open(%s) error: %s\n", path, strerror(errno)); - EXIT(fd); - } - - if (write(fd, str, strlen(str)+1) != strlen(str)+1) { - printf("write(%s) error: %s\n", path, strerror(errno)); - EXIT(fd); - } - - rc = close(fd); - if (rc) { - printf("close(%s) error: %s\n", path, strerror(errno)); - EXIT(rc); - } -} - -static void _t_grep(const char *path, char *str, int should_contain) -{ - char buf[1024]; - int fd; - int rc; - - fd = t_open_readonly(path); - if (lseek(fd, 0, SEEK_SET) == -1) { - printf("pread_once: seek to 0 error: %s\n", strerror(errno)); - EXIT(fd); - } - - rc = read(fd, buf, 1023); - if (rc < 0) { - printf("grep: read error: %s\n", strerror(errno)); - EXIT(-1); - } - close(fd); - buf[rc] = 0; - - if ((strstr(buf, str) != 0) ^ should_contain) { - printf("grep: can't find string %s\n", str); - EXIT(-1); - } -} - -void t_grep(const char *path, char *str) -{ - _t_grep(path, str, 1); -} - -void t_grep_v(const char *path, char *str) -{ - _t_grep(path, str, 0); -} - -void t_ls(int fd, char *buf, int size) -{ - struct dirent64 *ent; - int rc, pos; - loff_t base = 0; - - printf("dir entries listing...\n"); - while ((rc = getdirentries64(fd, buf, size, &base)) > 0) { - pos = 0; - while (pos < rc) { - ent = (struct dirent64 *) ((char*) buf + pos); - printf("%s\n", ent->d_name); - pos += ent->d_reclen; - } - } - - if (rc < 0) { - printf("getdents error %d\n", rc); - EXIT(-1); - } -} - -int t_fcntl(int fd, int cmd, ...) -{ - va_list ap; - long arg; - struct flock *lock; - int rc = -1; - - va_start(ap, cmd); - switch (cmd) { - case F_GETFL: - va_end(ap); - rc = fcntl(fd, cmd); - if (rc == -1) { - printf("fcntl GETFL failed: %s\n", - strerror(errno)); - EXIT(1); - } - break; - case F_SETFL: - arg = va_arg(ap, long); - va_end(ap); - rc = fcntl(fd, cmd, arg); - if (rc == -1) { - printf("fcntl SETFL %ld failed: %s\n", - arg, strerror(errno)); - EXIT(1); - } - break; - case F_GETLK: -#ifdef F_GETLK64 -#if F_GETLK64 != F_GETLK - case F_GETLK64: -#endif -#endif - case F_SETLK: -#ifdef F_SETLK64 -#if F_SETLK64 != F_SETLK - case F_SETLK64: -#endif -#endif - case F_SETLKW: -#ifdef F_SETLKW64 -#if F_SETLKW64 != F_SETLKW - case F_SETLKW64: -#endif -#endif - lock = va_arg(ap, struct flock *); - va_end(ap); - rc = fcntl(fd, cmd, lock); - if (rc == -1) { - printf("fcntl cmd %d failed: %s\n", - cmd, strerror(errno)); - EXIT(1); - } - break; - case F_DUPFD: - arg = va_arg(ap, long); - va_end(ap); - rc = fcntl(fd, cmd, arg); - if (rc == -1) { - printf("fcntl F_DUPFD %d failed: %s\n", - (int)arg, strerror(errno)); - EXIT(1); - } - break; - default: - va_end(ap); - printf("fcntl cmd %d not supported\n", cmd); - EXIT(1); - } - return rc; -} - -char *safe_strncpy(char *dst, char *src, int max_size) -{ - int src_size; - src_size=strlen(src); - if (src_size >= max_size) { - src_size=max_size-1; - } - memcpy(dst, src, src_size); - dst[src_size]=0; - - return(dst); -} diff --git a/lustre/liblustre/tests/test_common.h b/lustre/liblustre/tests/test_common.h deleted file mode 100644 index 5949a42c8a..0000000000 --- a/lustre/liblustre/tests/test_common.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef __TEST_COMMON__H -#define __TEST_COMMON__H - -#define ENV_LUSTRE_MNTPNT "LIBLUSTRE_MOUNT_POINT" -#define ENV_LUSTRE_MNTTGT "LIBLUSTRE_MOUNT_TARGET" -#define ENV_LUSTRE_TIMEOUT "LIBLUSTRE_TIMEOUT" -#define ENV_LUSTRE_DUMPFILE "LIBLUSTRE_DUMPFILE" - -extern int exit_on_err; - -#include <utime.h> /* for utimbuf */ - -void t_touch(const char *path); -void t_create(const char *path); -void t_link(const char *src, const char *dst); -void t_unlink(const char *path); -void t_mkdir(const char *path); -void t_rmdir(const char *path); -void t_symlink(const char *src, const char *new); -void t_mknod(const char *path, mode_t mode, int major, int minor); -void t_chmod_raw(const char *path, mode_t mode); -void t_chmod(const char *path, const char *format, ...); -void t_rename(const char *oldpath, const char *newpath); -int t_open_readonly(const char *path); -int t_open(const char *path); -int t_chdir(const char *path); -int t_utime(const char *path, const struct utimbuf *buf); -int t_opendir(const char *path); -void t_close(int fd); -int t_check_stat(const char *name, struct stat *buf); -int t_check_stat_fail(const char *name); -void t_echo_create(const char *path, const char *str); -void t_grep(const char *path, char *str); -void t_grep_v(const char *path, char *str); -void t_ls(int fd, char *buf, int size); -int t_fcntl(int fd, int cmd, ...); - -char *safe_strncpy(char *dst, char *src, int max_size); - -#endif diff --git a/lustre/liblustre/tests/test_lock_cancel.c b/lustre/liblustre/tests/test_lock_cancel.c deleted file mode 100644 index 9350e4c5f0..0000000000 --- a/lustre/liblustre/tests/test_lock_cancel.c +++ /dev/null @@ -1,194 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light user test program - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define _BSD_SOURCE - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <getopt.h> -#include <string.h> -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/queue.h> - -#include <sysio.h> -#include <mount.h> - -#include <test_common.h> - -#include <mpi.h> - -/******************************************************************************/ -/* - * MPI_CHECK will display a custom error message as well as an error string - * from the MPI_STATUS and then exit the program - */ - -#define MPI_CHECK(MPI_STATUS, MSG) do { \ - char resultString[MPI_MAX_ERROR_STRING]; \ - int resultLength; \ - \ - if (MPI_STATUS != MPI_SUCCESS) { \ - fprintf(stdout, "** error **\n"); \ - fprintf(stdout, "ERROR in %s (line %d): %s.\n", \ - __FILE__, __LINE__, MSG); \ - MPI_Error_string(MPI_STATUS, resultString, &resultLength); \ - fprintf(stdout, "MPI %s\n", resultString); \ - fprintf(stdout, "** exiting **\n"); \ - MPI_Abort(MPI_COMM_WORLD, 1); \ - } \ -} while(0) - -int numTasks = 0, /* MPI variables */ - rank = 0, - tasksPerNode = 0; /* tasks per node */ - - - - -static char *test_file_name = "/mnt/lustre/test_lock_cancel"; - -extern void __liblustre_setup_(void); -extern void __liblustre_cleanup_(void); - -void usage(char *cmd) -{ - printf("Usage: \t%s --target mdsnid:/mdsname/profile\n", cmd); - printf(" \t%s --dumpfile dumpfile\n", cmd); - exit(-1); -} - -int main(int argc, char *argv[]) -{ - int opt_index, c; - static struct option long_opts[] = { - {"target", 1, 0, 0}, - {"dumpfile", 1, 0, 0}, - {0, 0, 0, 0} - }; - int fd; - long time1, time2; - struct stat statbuf; - - if (argc < 3) - usage(argv[0]); - - while ((c = getopt_long(argc, argv, "", long_opts, &opt_index)) != -1) { - switch (c) { - case 0: { - if (!optarg[0]) - usage(argv[0]); - - if (!strcmp(long_opts[opt_index].name, "target")) { - setenv(ENV_LUSTRE_MNTTGT, optarg, 1); - } else if (!strcmp(long_opts[opt_index].name, "dumpfile")) { - setenv(ENV_LUSTRE_DUMPFILE, optarg, 1); - } else - usage(argv[0]); - break; - } - default: - usage(argv[0]); - } - } - - if (optind != argc) - usage(argv[0]); - - __liblustre_setup_(); - - MPI_CHECK(MPI_Init(&argc, &argv), "MPI_Init()"); - MPI_CHECK(MPI_Comm_size(MPI_COMM_WORLD, &numTasks), "MPI_Comm_size"); - MPI_CHECK(MPI_Comm_rank(MPI_COMM_WORLD, &rank), "MPI_Comm_rank"); - - if (numTasks < 2) { - printf("this demo can't run on single node!\n"); - goto cleanup; - } - - if (rank == 0) { - unlink(test_file_name); - } - - MPI_Barrier(MPI_COMM_WORLD); - if (rank == 1) { - printf("Node 1: creating file %s ...\n", test_file_name); - fflush(stdout); - - fd = open(test_file_name, O_CREAT|O_RDWR, 0755); - if (fd < 0) { - printf("Node %d: creat file err: %d", rank, fd); - fflush(stdout); - goto cleanup; - } - close(fd); - printf("Node 1: done creation. perform stat on file %s ...\n", test_file_name); - fflush(stdout); - - if (stat(test_file_name, &statbuf)) { - printf("Node %d: stat file err: %d", rank, fd); - fflush(stdout); - goto cleanup; - } - - printf("Node %d: done stat on file\n", rank); - fflush(stdout); - } else { - printf("Node %d: waiting node 1 create & stat file\n", rank); - fflush(stdout); - } - - MPI_Barrier(MPI_COMM_WORLD); - - if (rank == 1) { - printf("Node 1: file has been create+stat, abort excution here!!!!!!!\n"); - fflush(stdout); - exit(0); - } - - sleep(1); - printf("Node %d: synced with Node 1. sleep 5 seconds...\n", rank); - fflush(stdout); - sleep(5); - printf("Node %d: wakeup from sleep. perform unlink()...\n", rank); - fflush(stdout); - - time1 = time(NULL); - if (unlink(test_file_name)) { - printf("Node %d: error unlink file: %d\n", rank, fd); - fflush(stdout); - goto cleanup; - } - time2 = time(NULL); - printf("Node %d: successfully unlink file, cost %ld seconds.\n", - rank, time2 - time1); - fflush(stdout); - -cleanup: - __liblustre_cleanup_(); - printf("Node %d: end sucessfully.\n", rank); - return 0; -} diff --git a/lustre/llite/.cvsignore b/lustre/llite/.cvsignore deleted file mode 100644 index 016f1949fa..0000000000 --- a/lustre/llite/.cvsignore +++ /dev/null @@ -1,16 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -.deps -TAGS -autoMakefile.in -autoMakefile -*.ko -*.mod.c -.*.cmd -.*.flags -.*.o.d -.tmp_versions -.depend diff --git a/lustre/llite/Makefile.in b/lustre/llite/Makefile.in deleted file mode 100644 index fad7b02fd0..0000000000 --- a/lustre/llite/Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ -MODULES := lustre llite_lloop -lustre-objs := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o rw.o lproc_llite.o namei.o symlink.o llite_mmap.o xattr.o statahead.o - -llite_lloop-objs := lloop.o - -ifeq ($(PATCHLEVEL),4) -lustre-objs += rw24.o super.o -else -lustre-objs += rw26.o super25.o -endif - -@INCLUDE_RULES@ diff --git a/lustre/llite/autoMakefile.am b/lustre/llite/autoMakefile.am deleted file mode 100644 index 3ebe906bec..0000000000 --- a/lustre/llite/autoMakefile.am +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -if MODULES -modulefs_DATA = lustre$(KMODEXT) llite_lloop$(KMODEXT) -endif - -DIST_SOURCES := $(lustre-objs:.o=.c) llite_internal.h rw24.c super.c rw26.c super25.c -DIST_SOURCES += $(llite_lloop-objs:.o=.c) -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c deleted file mode 100644 index 96e01b117c..0000000000 --- a/lustre/llite/dcache.c +++ /dev/null @@ -1,794 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <linux/fs.h> -#include <linux/sched.h> -#include <linux/smp_lock.h> -#include <linux/quotaops.h> - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <obd_support.h> -#include <lustre_lite.h> -#include <lustre/lustre_idl.h> -#include <lustre_dlm.h> -#include <linux/lustre_version.h> - -#include "llite_internal.h" - -/* should NOT be called with the dcache lock, see fs/dcache.c */ -static void ll_release(struct dentry *de) -{ - struct ll_dentry_data *lld; - ENTRY; - LASSERT(de != NULL); - lld = ll_d2d(de); - if (lld == NULL) { /* NFS copies the de->d_op methods (bug 4655) */ - EXIT; - return; - } -#ifndef HAVE_VFS_INTENT_PATCHES - if (lld->lld_it) { - ll_intent_release(lld->lld_it); - OBD_FREE(lld->lld_it, sizeof(*lld->lld_it)); - } -#endif - LASSERT(lld->lld_cwd_count == 0); - LASSERT(lld->lld_mnt_count == 0); - OBD_FREE(de->d_fsdata, sizeof(*lld)); - - EXIT; -} - -#ifdef DCACHE_LUSTRE_INVALID -/* Compare if two dentries are the same. Don't match if the existing dentry - * is marked DCACHE_LUSTRE_INVALID. Returns 1 if different, 0 if the same. - * - * This avoids a race where ll_lookup_it() instantiates a dentry, but we get - * an AST before calling d_revalidate_it(). The dentry still exists (marked - * INVALID) so d_lookup() matches it, but we have no lock on it (so - * lock_match() fails) and we spin around real_lookup(). */ -int ll_dcompare(struct dentry *parent, struct qstr *d_name, struct qstr *name) -{ - struct dentry *dchild; - ENTRY; - - if (d_name->len != name->len) - RETURN(1); - - if (memcmp(d_name->name, name->name, name->len)) - RETURN(1); - - /* XXX: d_name must be in-dentry structure */ - dchild = container_of(d_name, struct dentry, d_name); /* ugh */ - if (dchild->d_flags & DCACHE_LUSTRE_INVALID) { - CDEBUG(D_DENTRY,"INVALID dentry %p not matched, was bug 3784\n", - dchild); - RETURN(1); - } - - RETURN(0); -} -#endif - -/* should NOT be called with the dcache lock, see fs/dcache.c */ -static int ll_ddelete(struct dentry *de) -{ - ENTRY; - LASSERT(de); -#ifndef DCACHE_LUSTRE_INVALID -#define DCACHE_LUSTRE_INVALID 0 -#endif - - CDEBUG(D_DENTRY, "%s dentry %.*s (%p, parent %p, inode %p) %s%s\n", - (de->d_flags & DCACHE_LUSTRE_INVALID ? "deleting" : "keeping"), - de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode, - d_unhashed(de) ? "" : "hashed,", - list_empty(&de->d_subdirs) ? "" : "subdirs"); -#if DCACHE_LUSTRE_INVALID == 0 -#undef DCACHE_LUSTRE_INVALID -#endif - - RETURN(0); -} - -void ll_set_dd(struct dentry *de) -{ - ENTRY; - LASSERT(de != NULL); - - CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n", - de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode, - atomic_read(&de->d_count)); - - if (de->d_fsdata == NULL) { - struct ll_dentry_data *lld; - - OBD_ALLOC(lld, sizeof(struct ll_dentry_data)); - if (likely(lld != NULL)) { - cfs_waitq_init(&lld->lld_waitq); - lock_dentry(de); - if (likely(de->d_fsdata == NULL)) - de->d_fsdata = lld; - else - OBD_FREE(lld, sizeof(struct ll_dentry_data)); - unlock_dentry(de); - } - } - - EXIT; -} - -void ll_intent_drop_lock(struct lookup_intent *it) -{ - struct lustre_handle *handle; - - if (it->it_op && it->d.lustre.it_lock_mode) { - handle = (struct lustre_handle *)&it->d.lustre.it_lock_handle; - CDEBUG(D_DLMTRACE, "releasing lock with cookie "LPX64 - " from it %p\n", handle->cookie, it); - ldlm_lock_decref(handle, it->d.lustre.it_lock_mode); - - /* bug 494: intent_release may be called multiple times, from - * this thread and we don't want to double-decref this lock */ - it->d.lustre.it_lock_mode = 0; - } -} - -void ll_intent_release(struct lookup_intent *it) -{ - ENTRY; - - ll_intent_drop_lock(it); -#ifdef HAVE_VFS_INTENT_PATCHES - it->it_magic = 0; - it->it_op_release = 0; -#endif - /* We are still holding extra reference on a request, need to free it */ - if (it_disposition(it, DISP_ENQ_OPEN_REF)) /* open req for llfile_open*/ - ptlrpc_req_finished(it->d.lustre.it_data); - if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */ - ptlrpc_req_finished(it->d.lustre.it_data); - if (it_disposition(it, DISP_ENQ_COMPLETE)) /* saved req from revalidate - * to lookup */ - ptlrpc_req_finished(it->d.lustre.it_data); - - it->d.lustre.it_disposition = 0; - it->d.lustre.it_data = NULL; - EXIT; -} - -/* Drop dentry if it is not used already, unhash otherwise. - Should be called with dcache lock held! - Returns: 1 if dentry was dropped, 0 if unhashed. */ -int ll_drop_dentry(struct dentry *dentry) -{ - lock_dentry(dentry); - if (atomic_read(&dentry->d_count) == 0) { - CDEBUG(D_DENTRY, "deleting dentry %.*s (%p) parent %p " - "inode %p\n", dentry->d_name.len, - dentry->d_name.name, dentry, dentry->d_parent, - dentry->d_inode); - dget_locked(dentry); - __d_drop(dentry); - unlock_dentry(dentry); - spin_unlock(&dcache_lock); - dput(dentry); - spin_lock(&dcache_lock); - return 1; - } - /* disconected dentry can not be find without lookup, because we - * not need his to unhash or mark invalid. */ - if (dentry->d_flags & DCACHE_DISCONNECTED) { - unlock_dentry(dentry); - RETURN (0); - } - -#ifdef DCACHE_LUSTRE_INVALID - if (!(dentry->d_flags & DCACHE_LUSTRE_INVALID)) { -#else - if (!d_unhashed(dentry)) { -#endif - CDEBUG(D_DENTRY, "unhashing dentry %.*s (%p) parent %p " - "inode %p refc %d\n", dentry->d_name.len, - dentry->d_name.name, dentry, dentry->d_parent, - dentry->d_inode, atomic_read(&dentry->d_count)); - /* actually we don't unhash the dentry, rather just - * mark it inaccessible for to __d_lookup(). otherwise - * sys_getcwd() could return -ENOENT -bzzz */ -#ifdef DCACHE_LUSTRE_INVALID - dentry->d_flags |= DCACHE_LUSTRE_INVALID; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - __d_drop(dentry); - if (dentry->d_inode) { - /* Put positive dentries to orphan list */ - list_add(&dentry->d_hash, - &ll_i2sbi(dentry->d_inode)->ll_orphan_dentry_list); - } -#endif -#else - if (!dentry->d_inode || !S_ISDIR(dentry->d_inode->i_mode)) - __d_drop(dentry); -#endif - - } - unlock_dentry(dentry); - return 0; -} - -void ll_unhash_aliases(struct inode *inode) -{ - struct list_head *tmp, *head; - ENTRY; - - if (inode == NULL) { - CERROR("unexpected NULL inode, tell phil\n"); - return; - } - - CDEBUG(D_INODE, "marking dentries for ino %lu/%u(%p) invalid\n", - inode->i_ino, inode->i_generation, inode); - - head = &inode->i_dentry; - spin_lock(&dcache_lock); -restart: - tmp = head; - while ((tmp = tmp->next) != head) { - struct dentry *dentry = list_entry(tmp, struct dentry, d_alias); - - if (dentry->d_name.len == 1 && dentry->d_name.name[0] == '/') { - CERROR("called on root (?) dentry=%p, inode=%p " - "ino=%lu\n", dentry, inode, inode->i_ino); - lustre_dump_dentry(dentry, 1); - libcfs_debug_dumpstack(NULL); - } else if (d_mountpoint(dentry)) { - /* For mountpoints we skip removal of the dentry - which happens solely because we have a lock on it - obtained when this dentry was not a mountpoint yet */ - CDEBUG(D_DENTRY, "Skippind mountpoint dentry removal " - "%.*s (%p) parent %p\n", - dentry->d_name.len, - dentry->d_name.name, - dentry, dentry->d_parent); - - continue; - } - - if (ll_drop_dentry(dentry)) - goto restart; - } - spin_unlock(&dcache_lock); - EXIT; -} - -int revalidate_it_finish(struct ptlrpc_request *request, int offset, - struct lookup_intent *it, struct dentry *de) -{ - int rc = 0; - ENTRY; - - if (!request) - RETURN(0); - - if (it_disposition(it, DISP_LOOKUP_NEG)) - RETURN(-ENOENT); - - rc = ll_prep_inode(ll_i2sbi(de->d_inode)->ll_osc_exp, &de->d_inode, - request, offset, NULL); - - RETURN(rc); -} - -void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry) -{ - LASSERT(it != NULL); - LASSERT(dentry != NULL); - - if (it->d.lustre.it_lock_mode && dentry->d_inode != NULL) { - struct inode *inode = dentry->d_inode; - CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n", - inode, inode->i_ino, inode->i_generation); - mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode); - } - - /* drop lookup or getattr locks immediately */ - if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR) { -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - /* on 2.6 there are situation when several lookups and - * revalidations may be requested during single operation. - * therefore, we don't release intent here -bzzz */ - ll_intent_drop_lock(it); -#else - ll_intent_release(it); -#endif - } -} - -void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft) -{ - struct lookup_intent *it = *itp; -#if defined(HAVE_VFS_INTENT_PATCHES)&&(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - if (it) { - LASSERTF(it->it_magic == INTENT_MAGIC, "bad intent magic: %x\n", - it->it_magic); - } -#endif - - if (!it || it->it_op == IT_GETXATTR) - it = *itp = deft; - -#ifdef HAVE_VFS_INTENT_PATCHES - it->it_op_release = ll_intent_release; -#endif -} - -int ll_revalidate_it(struct dentry *de, int lookup_flags, - struct lookup_intent *it) -{ - struct mdc_op_data op_data; - struct ptlrpc_request *req = NULL; - struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; - struct obd_export *exp; - int first = 0, rc; - - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:name=%s,intent=%s\n", de->d_name.name, - LL_IT2STR(it)); - - if (de->d_inode == NULL) { - /* We can only use negative dentries if this is stat or lookup, - for opens and stuff we do need to query server. */ - /* If there is IT_CREAT in intent op set, then we must throw - away this negative dentry and actually do the request to - kernel to create whatever needs to be created (if possible)*/ - if (it && (it->it_op & IT_CREAT)) - RETURN(0); - -#ifdef DCACHE_LUSTRE_INVALID - if (de->d_flags & DCACHE_LUSTRE_INVALID) - RETURN(0); -#endif - - rc = ll_have_md_lock(de->d_parent->d_inode, - MDS_INODELOCK_UPDATE); - GOTO(out_sa, rc); - } - - exp = ll_i2mdcexp(de->d_inode); - - /* Never execute intents for mount points. - * Attributes will be fixed up in ll_inode_revalidate_it */ - if (d_mountpoint(de)) - GOTO(out_sa, rc = 1); - - /* Root of the lustre tree. Always valid. - * Attributes will be fixed up in ll_inode_revalidate_it */ - if (de == de->d_sb->s_root) - GOTO(out_sa, rc = 1); - - OBD_FAIL_TIMEOUT(OBD_FAIL_MDC_REVALIDATE_PAUSE, 5); - ll_frob_intent(&it, &lookup_it); - LASSERT(it); - - ll_prepare_mdc_op_data(&op_data, de->d_parent->d_inode, de->d_inode, - de->d_name.name, de->d_name.len, 0, NULL); - - if ((it->it_op == IT_OPEN) && de->d_inode) { - struct inode *inode = de->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - struct obd_client_handle **och_p; - __u64 *och_usecount; - /* We used to check for MDS_INODELOCK_OPEN here, but in fact - * just having LOOKUP lock is enough to justify inode is the - * same. And if inode is the same and we have suitable - * openhandle, then there is no point in doing another OPEN RPC - * just to throw away newly received openhandle. - * There are no security implications too, if file owner or - * access mode is change, LOOKUP lock is revoked */ - - if (it->it_flags & FMODE_WRITE) { - och_p = &lli->lli_mds_write_och; - och_usecount = &lli->lli_open_fd_write_count; - } else if (it->it_flags & FMODE_EXEC) { - och_p = &lli->lli_mds_exec_och; - och_usecount = &lli->lli_open_fd_exec_count; - } else { - och_p = &lli->lli_mds_read_och; - och_usecount = &lli->lli_open_fd_read_count; - } - /* Check for the proper lock. */ - if (!ll_have_md_lock(inode, MDS_INODELOCK_LOOKUP)) - goto do_lock; - down(&lli->lli_och_sem); - if (*och_p) { /* Everything is open already, do nothing */ - /*(*och_usecount)++; Do not let them steal our open - handle from under us */ - /* XXX The code above was my original idea, but in case - we have the handle, but we cannot use it due to later - checks (e.g. O_CREAT|O_EXCL flags set), nobody - would decrement counter increased here. So we just - hope the lock won't be invalidated in between. But - if it would be, we'll reopen the open request to - MDS later during file open path */ - up(&lli->lli_och_sem); - RETURN(1); - } else { - up(&lli->lli_och_sem); - } - } - - if (it->it_op == IT_GETATTR) - first = ll_statahead_enter(de->d_parent->d_inode, &de, 0); - -do_lock: - it->it_create_mode &= ~current->fs->umask; - - rc = mdc_intent_lock(exp, &op_data, NULL, 0, it, lookup_flags, - &req, ll_mdc_blocking_ast, 0); - if (it->it_op == IT_GETATTR && !first) - ll_statahead_exit(de, rc); - /* If req is NULL, then mdc_intent_lock only tried to do a lock match; - * if all was well, it will return 1 if it found locks, 0 otherwise. */ - if (req == NULL && rc >= 0) { - if (!rc) - goto do_lookup; - GOTO(out, rc); - } - - if (rc < 0) { - if (rc != -ESTALE) { - CDEBUG(D_INFO, "ll_intent_lock: rc %d : it->it_status " - "%d\n", rc, it->d.lustre.it_status); - } - GOTO(out, rc = 0); - } - -revalidate_finish: - rc = revalidate_it_finish(req, DLM_REPLY_REC_OFF, it, de); - if (rc != 0) { - ll_intent_release(it); - GOTO(out, rc = 0); - } - if ((it->it_op & IT_OPEN) && de->d_inode && - !S_ISREG(de->d_inode->i_mode) && - !S_ISDIR(de->d_inode->i_mode)) { - ll_release_openhandle(de, it); - } - rc = 1; - - /* unfortunately ll_intent_lock may cause a callback and revoke our - * dentry */ - spin_lock(&dcache_lock); - lock_dentry(de); - __d_drop(de); - unlock_dentry(de); - d_rehash_cond(de, 0); - spin_unlock(&dcache_lock); - - out: - /* We do not free request as it may be reused during following lookup - * (see comment in mdc/mdc_locks.c::mdc_intent_lock()), request will - * be freed in ll_lookup_it or in ll_intent_release. But if - * request was not completed, we need to free it. (bug 5154, 9903) */ - if (req != NULL && !it_disposition(it, DISP_ENQ_COMPLETE)) - ptlrpc_req_finished(req); - if (rc == 0) { -#ifdef DCACHE_LUSTRE_INVALID - ll_unhash_aliases(de->d_inode); - /* done in ll_unhash_aliases() - dentry->d_flags |= DCACHE_LUSTRE_INVALID; */ -#else - /* We do not want d_invalidate to kill all child dentries too */ - d_drop(de); -#endif - } else { - CDEBUG(D_DENTRY, "revalidated dentry %.*s (%p) parent %p " - "inode %p refc %d\n", de->d_name.len, - de->d_name.name, de, de->d_parent, de->d_inode, - atomic_read(&de->d_count)); - ll_lookup_finish_locks(it, de); -#ifdef DCACHE_LUSTRE_INVALID - lock_dentry(de); - de->d_flags &= ~DCACHE_LUSTRE_INVALID; - unlock_dentry(de); -#endif - } - RETURN(rc); -/* This part is here to combat evil-evil race in real_lookup on 2.6 kernels. - * The race details are: We enter do_lookup() looking for some name, - * there is nothing in dcache for this name yet and d_lookup() returns NULL. - * We proceed to real_lookup(), and while we do this, another process does - * open on the same file we looking up (most simple reproducer), open succeeds - * and the dentry is added. Now back to us. In real_lookup() we do d_lookup() - * again and suddenly find the dentry, so we call d_revalidate on it, but there - * is no lock, so without this code we would return 0, but unpatched - * real_lookup just returns -ENOENT in such a case instead of retrying the - * lookup. Once this is dealt with in real_lookup(), all of this ugly mess - * can go and we can just check locks in ->d_revalidate without doing any - * RPCs ever. */ -do_lookup: - if (it != &lookup_it) { - ll_lookup_finish_locks(it, de); - it = &lookup_it; - } - /*do real lookup here */ - ll_prepare_mdc_op_data(&op_data, de->d_parent->d_inode, NULL, - de->d_name.name, de->d_name.len, 0, NULL); - rc = mdc_intent_lock(exp, &op_data, NULL, 0, it, 0, &req, - ll_mdc_blocking_ast, 0); - if (rc >= 0) { - struct mds_body *mds_body = lustre_msg_buf(req->rq_repmsg, - DLM_REPLY_REC_OFF, - sizeof(*mds_body)); - struct ll_fid fid = { 0 }; - - if (de->d_inode) - ll_inode2fid(&fid, de->d_inode); - - /* see if we got same inode, if not - return error */ - if(!memcmp(&fid, &mds_body->fid1, sizeof(struct ll_fid))) - goto revalidate_finish; - ll_intent_release(it); - } - GOTO(out, rc = 0); - -out_sa: - /* - * For rc == 1 case, should not return directly to prevent losing - * statahead windows; for rc == 0 case, the "lookup" will be done later. - */ - if (it && it->it_op == IT_GETATTR && rc == 1) { - first = ll_statahead_enter(de->d_parent->d_inode, &de, 0); - if (!first) - ll_statahead_exit(de, rc); - } - - return rc; -} - -/*static*/ void ll_pin(struct dentry *de, struct vfsmount *mnt, int flag) -{ - struct inode *inode= de->d_inode; - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ll_dentry_data *ldd = ll_d2d(de); - struct obd_client_handle *handle; - int rc = 0; - ENTRY; - LASSERT(ldd); - - lock_kernel(); - /* Strictly speaking this introduces an additional race: the - * increments should wait until the rpc has returned. - * However, given that at present the function is void, this - * issue is moot. */ - if (flag == 1 && (++ldd->lld_mnt_count) > 1) { - unlock_kernel(); - EXIT; - return; - } - - if (flag == 0 && (++ldd->lld_cwd_count) > 1) { - unlock_kernel(); - EXIT; - return; - } - unlock_kernel(); - - handle = (flag) ? &ldd->lld_mnt_och : &ldd->lld_cwd_och; - rc = obd_pin(sbi->ll_mdc_exp, inode->i_ino, inode->i_generation, - inode->i_mode & S_IFMT, handle, flag); - - if (rc) { - lock_kernel(); - memset(handle, 0, sizeof(*handle)); - if (flag == 0) - ldd->lld_cwd_count--; - else - ldd->lld_mnt_count--; - unlock_kernel(); - } - - EXIT; - return; -} - -/*static*/ void ll_unpin(struct dentry *de, struct vfsmount *mnt, int flag) -{ - struct ll_sb_info *sbi = ll_i2sbi(de->d_inode); - struct ll_dentry_data *ldd = ll_d2d(de); - struct obd_client_handle handle; - int count, rc = 0; - ENTRY; - LASSERT(ldd); - - lock_kernel(); - /* Strictly speaking this introduces an additional race: the - * increments should wait until the rpc has returned. - * However, given that at present the function is void, this - * issue is moot. */ - handle = (flag) ? ldd->lld_mnt_och : ldd->lld_cwd_och; - if (handle.och_magic != OBD_CLIENT_HANDLE_MAGIC) { - /* the "pin" failed */ - unlock_kernel(); - EXIT; - return; - } - - if (flag) - count = --ldd->lld_mnt_count; - else - count = --ldd->lld_cwd_count; - unlock_kernel(); - - if (count != 0) { - EXIT; - return; - } - - rc = obd_unpin(sbi->ll_mdc_exp, &handle, flag); - EXIT; - return; -} - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -#ifdef HAVE_VFS_INTENT_PATCHES -static int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd) -{ - int rc; - ENTRY; - - if (nd && nd->flags & LOOKUP_LAST && !(nd->flags & LOOKUP_LINK_NOTLAST)) - rc = ll_revalidate_it(dentry, nd->flags, &nd->intent); - else - rc = ll_revalidate_it(dentry, 0, NULL); - - RETURN(rc); -} -#else -int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd) -{ - int rc; - ENTRY; - - if (nd && !(nd->flags & (LOOKUP_CONTINUE|LOOKUP_PARENT))) { - struct lookup_intent *it; - it = ll_convert_intent(&nd->intent.open, nd->flags); - if (IS_ERR(it)) - RETURN(0); - if (it->it_op == (IT_OPEN|IT_CREAT)) - if (nd->intent.open.flags & O_EXCL) { - CDEBUG(D_VFSTRACE, "create O_EXCL, returning 0\n"); - rc = 0; - goto out_it; - } - - rc = ll_revalidate_it(dentry, nd->flags, it); - - if (rc && (nd->flags & LOOKUP_OPEN) && - it_disposition(it, DISP_OPEN_OPEN)) {/*Open*/ -#ifdef HAVE_FILE_IN_STRUCT_INTENT -// XXX Code duplication with ll_lookup_nd - if (S_ISFIFO(dentry->d_inode->i_mode)) { - // We cannot call open here as it would - // deadlock. - ptlrpc_req_finished( - (struct ptlrpc_request *) - it->d.lustre.it_data); - } else { - struct file *filp; - - nd->intent.open.file->private_data = it; - filp = lookup_instantiate_filp(nd, dentry,NULL); -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) -/* 2.6.1[456] have a bug in open_namei() that forgets to check - * nd->intent.open.file for error, so we need to return it as lookup's result - * instead */ - if (IS_ERR(filp)) - rc = 0; -#endif - } -#else - ll_release_openhandle(dentry, it); -#endif /* HAVE_FILE_IN_STRUCT_INTENT */ - } - if (!rc && (nd->flags & LOOKUP_CREATE) && - it_disposition(it, DISP_OPEN_CREATE)) { - /* We created something but we may only return - * negative dentry here, so save request in dentry, - * if lookup will be called later on, it will - * pick the request, otherwise it would be freed - * with dentry */ - ll_d2d(dentry)->lld_it = it; - it = NULL; /* avoid freeing */ - } - -out_it: - if (it) { - ll_intent_release(it); - OBD_FREE(it, sizeof(*it)); - } - } else { - rc = ll_revalidate_it(dentry, 0, NULL); - } - - RETURN(rc); -} -#endif -#endif - -struct dentry_operations ll_d_ops = { -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - .d_revalidate = ll_revalidate_nd, -#else - .d_revalidate_it = ll_revalidate_it, -#endif - .d_release = ll_release, - .d_delete = ll_ddelete, -#ifdef DCACHE_LUSTRE_INVALID - .d_compare = ll_dcompare, -#endif -#if 0 - .d_pin = ll_pin, - .d_unpin = ll_unpin, -#endif -}; - -static int ll_fini_revalidate_nd(struct dentry *dentry, struct nameidata *nd) -{ - ENTRY; - /* need lookup */ - RETURN(0); -} - -struct dentry_operations ll_fini_d_ops = { - .d_revalidate = ll_fini_revalidate_nd, - .d_release = ll_release, -}; - -/* - * It is for the following race condition: - * When someone (maybe statahead thread) adds the dentry to the dentry hash - * table, the dentry's "d_op" maybe NULL, at the same time, another (maybe - * "ls -l") process finds such dentry by "do_lookup()" without "do_revalidate()" - * called. It causes statahead window lost, and maybe other issues. --Fan Yong - */ -static int ll_init_revalidate_nd(struct dentry *dentry, struct nameidata *nd) -{ - struct l_wait_info lwi = { 0 }; - struct ll_dentry_data *lld; - ENTRY; - - ll_set_dd(dentry); - lld = ll_d2d(dentry); - if (unlikely(lld == NULL)) - RETURN(-ENOMEM); - - l_wait_event(lld->lld_waitq, dentry->d_op != &ll_init_d_ops, &lwi); - if (likely(dentry->d_op == &ll_d_ops)) - RETURN(ll_revalidate_nd(dentry, nd)); - else - RETURN(dentry->d_op == &ll_fini_d_ops ? 0 : -EINVAL); -} - -struct dentry_operations ll_init_d_ops = { - .d_revalidate = ll_init_revalidate_nd, - .d_release = ll_release, -}; diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c deleted file mode 100644 index 5b9955ee5e..0000000000 --- a/lustre/llite/dir.c +++ /dev/null @@ -1,1087 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Directory code for lustre client. - * - * Copyright (C) 2002--2007 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - */ - -#include <linux/fs.h> -#include <linux/pagemap.h> -#include <linux/mm.h> -#include <linux/version.h> -#include <linux/smp_lock.h> -#include <asm/uaccess.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -# include <linux/locks.h> // for wait_on_buffer -#else -# include <linux/buffer_head.h> // for wait_on_buffer -#endif - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <obd_support.h> -#include <obd_class.h> -#include <lustre_lib.h> -#include <lustre/lustre_idl.h> -#include <lustre_lite.h> -#include <lustre_dlm.h> -#include "llite_internal.h" - -/* - * Directory entries are currently in the same format as ext2/ext3, but will - * be changed in the future to accomodate FIDs - */ -#define LL_DIR_NAME_LEN (255) - -static const int LL_DIR_PAD = 4; - -struct ll_dir_entry { - /* number of inode, referenced by this entry */ - __le32 lde_inode; - /* total record length, multiple of LL_DIR_PAD */ - __le16 lde_rec_len; - /* length of name */ - __u8 lde_name_len; - /* file type: regular, directory, device, etc. */ - __u8 lde_file_type; - /* name. NOT NUL-terminated */ - char lde_name[LL_DIR_NAME_LEN]; -}; - -static inline unsigned ll_dir_rec_len(unsigned name_len) -{ - return (name_len + 8 + LL_DIR_PAD - 1) & ~(LL_DIR_PAD - 1); -} - -#ifndef HAVE_PAGE_CHECKED -#ifdef HAVE_PG_FS_MISC -#define PageChecked(page) test_bit(PG_fs_misc, &(page)->flags) -#define SetPageChecked(page) set_bit(PG_fs_misc, &(page)->flags) -#else -#error PageChecked or PageFsMisc not defined in kernel -#endif -#endif - -/* returns the page unlocked, but with a reference */ -static int ll_dir_readpage(struct file *file, struct page *page) -{ - struct inode *inode = page->mapping->host; - struct ll_fid mdc_fid; - __u64 offset; - struct ptlrpc_request *request; - struct mds_body *body; - int rc = 0; - ENTRY; - - offset = (__u64)page->index << CFS_PAGE_SHIFT; - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) off "LPU64"\n", - inode->i_ino, inode->i_generation, inode, offset); - - mdc_pack_fid(&mdc_fid, inode->i_ino, inode->i_generation, S_IFDIR); - - rc = mdc_readpage(ll_i2sbi(inode)->ll_mdc_exp, &mdc_fid, - offset, page, &request); - if (!rc) { - body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); /* checked by mdc_readpage() */ - /* swabbed by mdc_readpage() */ - LASSERT(lustre_rep_swabbed(request, REPLY_REC_OFF)); - - if (body->size != i_size_read(inode)) { - ll_inode_size_lock(inode, 0); - i_size_write(inode, body->size); - ll_inode_size_unlock(inode, 0); - } - - SetPageUptodate(page); - } - ptlrpc_req_finished(request); - - unlock_page(page); - EXIT; - return rc; -} - -struct address_space_operations ll_dir_aops = { - .readpage = ll_dir_readpage, -}; - -static inline unsigned ll_dir_page_mask(struct inode *inode) -{ - return ~(inode->i_sb->s_blocksize - 1); -} - -/* - * Check consistency of a single entry. - */ -static int ll_dir_check_entry(struct inode *dir, struct ll_dir_entry *ent, - unsigned offset, unsigned rec_len, pgoff_t index) -{ - const char *msg; - - /* - * Consider adding more checks. - */ - - if (unlikely(rec_len < ll_dir_rec_len(1))) - msg = "entry is too short"; - else if (unlikely(rec_len & 3)) - msg = "wrong alignment"; - else if (unlikely(rec_len < ll_dir_rec_len(ent->lde_name_len))) - msg = "rec_len doesn't match name_len"; - else if (unlikely(((offset + rec_len - 1) ^ offset) & - ll_dir_page_mask(dir))) - msg = "directory entry across blocks"; - else - return 0; - CERROR("%s: bad entry in directory %lu/%u: %s - " - "offset=%lu+%u, inode=%lu, rec_len=%d," - " name_len=%d\n", ll_i2mdcexp(dir)->exp_obd->obd_name, - dir->i_ino, dir->i_generation, msg, - index << CFS_PAGE_SHIFT, - offset, (unsigned long)le32_to_cpu(ent->lde_inode), - rec_len, ent->lde_name_len); - return -EIO; -} - -static inline struct ll_dir_entry *ll_entry_at(void *base, unsigned offset) -{ - return (struct ll_dir_entry *)(base + offset); -} - -static void ll_dir_check_page(struct inode *dir, struct page *page) -{ - int err; - unsigned size = dir->i_sb->s_blocksize; - char *addr = page_address(page); - unsigned off; - unsigned limit; - unsigned reclen; - - struct ll_dir_entry *ent; - - err = 0; - if ((i_size_read(dir) >> CFS_PAGE_SHIFT) == (__u64)page->index) { - /* - * Last page. - */ - limit = i_size_read(dir) & ~CFS_PAGE_MASK; - if (limit & (size - 1)) { - CERROR("%s: dir %lu/%u size %llu doesn't match %u\n", - ll_i2mdcexp(dir)->exp_obd->obd_name, dir->i_ino, - dir->i_generation, i_size_read(dir), size); - err++; - } else { - /* - * Place dummy forwarding entries to streamline - * ll_readdir(). - */ - for (off = limit; off < CFS_PAGE_SIZE; off += size) { - ent = ll_entry_at(addr, off); - ent->lde_rec_len = cpu_to_le16(size); - ent->lde_name_len = 0; - ent->lde_inode = 0; - } - } - } else - limit = CFS_PAGE_SIZE; - - for (off = 0; - !err && off <= limit - ll_dir_rec_len(1); off += reclen) { - ent = ll_entry_at(addr, off); - reclen = le16_to_cpu(ent->lde_rec_len); - err = ll_dir_check_entry(dir, ent, off, reclen, page->index); - } - - if (!err && off != limit) { - ent = ll_entry_at(addr, off); - CERROR("%s: entry in directory %lu/%u spans the page boundary " - "offset="LPU64"+%u, inode=%lu\n", - ll_i2mdcexp(dir)->exp_obd->obd_name, - dir->i_ino, dir->i_generation, - (__u64)page->index << CFS_PAGE_SHIFT, - off, (unsigned long)le32_to_cpu(ent->lde_inode)); - err++; - } - if (err) - SetPageError(page); - SetPageChecked(page); -} - -struct page *ll_get_dir_page(struct inode *dir, unsigned long n) -{ - struct ldlm_res_id res_id = - { .name = { dir->i_ino, (__u64)dir->i_generation} }; - struct lustre_handle lockh; - struct obd_device *obddev = class_exp2obd(ll_i2sbi(dir)->ll_mdc_exp); - struct address_space *mapping = dir->i_mapping; - struct page *page; - ldlm_policy_data_t policy = {.l_inodebits = {MDS_INODELOCK_UPDATE} }; - int rc; - - rc = ldlm_lock_match(obddev->obd_namespace, LDLM_FL_BLOCK_GRANTED, - &res_id, LDLM_IBITS, &policy, LCK_CR, &lockh); - if (!rc) { - struct lookup_intent it = { .it_op = IT_READDIR }; - struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_CR, - ll_mdc_blocking_ast, ldlm_completion_ast, NULL, dir }; - struct ptlrpc_request *request; - struct mdc_op_data data; - - ll_prepare_mdc_op_data(&data, dir, NULL, NULL, 0, 0, NULL); - - rc = mdc_enqueue(ll_i2sbi(dir)->ll_mdc_exp, &einfo, &it, - &data, &lockh, NULL, 0, 0); - - request = (struct ptlrpc_request *)it.d.lustre.it_data; - if (request) - ptlrpc_req_finished(request); - if (rc < 0) { - CERROR("lock enqueue: rc: %d\n", rc); - return ERR_PTR(rc); - } - } - ldlm_lock_dump_handle(D_OTHER, &lockh); - - page = read_cache_page(mapping, n, - (filler_t*)mapping->a_ops->readpage, NULL); - if (IS_ERR(page)) - GOTO(out_unlock, page); - - wait_on_page(page); - (void)kmap(page); - if (!PageUptodate(page)) - goto fail; - if (!PageChecked(page)) - ll_dir_check_page(dir, page); - if (PageError(page)) - goto fail; - -out_unlock: - ldlm_lock_decref(&lockh, LCK_CR); - return page; - -fail: - kunmap(page); - page_cache_release(page); - page = ERR_PTR(-EIO); - goto out_unlock; -} - -/* - * p is at least 6 bytes before the end of page - */ -static inline struct ll_dir_entry *ll_dir_next_entry(struct ll_dir_entry *p) -{ - return ll_entry_at(p, le16_to_cpu(p->lde_rec_len)); -} - -static inline unsigned ll_dir_validate_entry(char *base, unsigned offset, - unsigned mask) -{ - struct ll_dir_entry *de = ll_entry_at(base, offset); - struct ll_dir_entry *p = ll_entry_at(base, offset & mask); - while (p < de && p->lde_rec_len > 0) - p = ll_dir_next_entry(p); - return (char *)p - base; -} - -/* - * File type constants. The same as in ext2 for compatibility. - */ - -enum { - LL_DIR_FT_UNKNOWN, - LL_DIR_FT_REG_FILE, - LL_DIR_FT_DIR, - LL_DIR_FT_CHRDEV, - LL_DIR_FT_BLKDEV, - LL_DIR_FT_FIFO, - LL_DIR_FT_SOCK, - LL_DIR_FT_SYMLINK, - LL_DIR_FT_MAX -}; - -static unsigned char ll_dir_filetype_table[LL_DIR_FT_MAX] = { - [LL_DIR_FT_UNKNOWN] = DT_UNKNOWN, - [LL_DIR_FT_REG_FILE] = DT_REG, - [LL_DIR_FT_DIR] = DT_DIR, - [LL_DIR_FT_CHRDEV] = DT_CHR, - [LL_DIR_FT_BLKDEV] = DT_BLK, - [LL_DIR_FT_FIFO] = DT_FIFO, - [LL_DIR_FT_SOCK] = DT_SOCK, - [LL_DIR_FT_SYMLINK] = DT_LNK, -}; - -/* - * Process one page. Returns: - * - * -ve: filldir commands readdir to stop. - * +ve: number of entries submitted to filldir. - * 0: no live entries on this page. - */ - -int ll_readdir_page(char *addr, __u64 base, unsigned *offset, - filldir_t filldir, void *cookie) -{ - struct ll_dir_entry *de; - char *end; - int nr; - - de = ll_entry_at(addr, *offset); - end = addr + CFS_PAGE_SIZE - ll_dir_rec_len(1); - for (nr = 0 ;(char*)de <= end; de = ll_dir_next_entry(de)) { - if (de->lde_inode != 0) { - nr++; - *offset = (char *)de - addr; - if (filldir(cookie, de->lde_name, de->lde_name_len, - base | *offset, le32_to_cpu(de->lde_inode), - ll_dir_filetype_table[de->lde_file_type & - (LL_DIR_FT_MAX - 1)])) - return -1; - } - } - return nr; -} - -int ll_readdir(struct file *filp, void *dirent, filldir_t filldir) -{ - struct inode *inode = filp->f_dentry->d_inode; - loff_t pos = filp->f_pos; - unsigned offset = pos & ~CFS_PAGE_MASK; - pgoff_t idx = pos >> CFS_PAGE_SHIFT; - pgoff_t npages = dir_pages(inode); - unsigned chunk_mask = ll_dir_page_mask(inode); - int need_revalidate = (filp->f_version != inode->i_version); - int rc = 0; - int done; /* when this becomes negative --- stop iterating */ - - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) pos %llu/%llu\n", - inode->i_ino, inode->i_generation, inode, - pos, i_size_read(inode)); - - /* - * Checking ->i_size without the lock. Should be harmless, as server - * re-checks. - */ - if (pos > i_size_read(inode) - ll_dir_rec_len(1)) - RETURN(0); - - for (done = 0; idx < npages; idx++, offset = 0) { - /* - * We can assume that all blocks on this page are filled with - * entries, because ll_dir_check_page() placed special dummy - * entries for us. - */ - - char *kaddr; - struct page *page; - - CDEBUG(D_EXT2,"read %lu of dir %lu/%u page %lu/%lu " - "size %llu\n", - CFS_PAGE_SIZE, inode->i_ino, inode->i_generation, - idx, npages, i_size_read(inode)); - page = ll_get_dir_page(inode, idx); - - /* size might have been updated by mdc_readpage */ - npages = dir_pages(inode); - - if (IS_ERR(page)) { - rc = PTR_ERR(page); - CERROR("error reading dir %lu/%u page %lu: rc %d\n", - inode->i_ino, inode->i_generation, idx, rc); - continue; - } - - kaddr = page_address(page); - if (need_revalidate) { - /* - * File offset was changed by lseek() and possibly - * points in the middle of an entry. Re-scan from the - * beginning of the chunk. - */ - offset = ll_dir_validate_entry(kaddr, offset, - chunk_mask); - need_revalidate = 0; - } - done = ll_readdir_page(kaddr, idx << CFS_PAGE_SHIFT, - &offset, filldir, dirent); - kunmap(page); - page_cache_release(page); - if (done > 0) - /* - * Some entries were sent to the user space, return - * success. - */ - rc = 0; - else if (done < 0) - /* - * filldir is satisfied. - */ - break; - } - - filp->f_pos = (idx << CFS_PAGE_SHIFT) | offset; - filp->f_version = inode->i_version; - touch_atime(filp->f_vfsmnt, filp->f_dentry); - - RETURN(rc); -} - -#define QCTL_COPY(out, in) \ -do { \ - Q_COPY(out, in, qc_cmd); \ - Q_COPY(out, in, qc_type); \ - Q_COPY(out, in, qc_id); \ - Q_COPY(out, in, qc_stat); \ - Q_COPY(out, in, qc_dqinfo); \ - Q_COPY(out, in, qc_dqblk); \ -} while (0) - -int ll_send_mgc_param(struct obd_export *mgc, char *string) -{ - struct mgs_send_param *msp; - int rc = 0; - - OBD_ALLOC_PTR(msp); - if (!msp) - return -ENOMEM; - - strncpy(msp->mgs_param, string, MGS_PARAM_MAXLEN); - rc = obd_set_info_async(mgc, strlen(KEY_SET_INFO), KEY_SET_INFO, - sizeof(struct mgs_send_param), msp, NULL); - if (rc) - CERROR("Failed to set parameter: %d\n", rc); - - OBD_FREE_PTR(msp); - return rc; -} - -char *ll_get_fsname(struct inode *inode) -{ - struct lustre_sb_info *lsi = s2lsi(inode->i_sb); - char *ptr, *fsname; - int len; - - OBD_ALLOC(fsname, MGS_PARAM_MAXLEN); - len = strlen(lsi->lsi_lmd->lmd_profile); - ptr = strrchr(lsi->lsi_lmd->lmd_profile, '-'); - if (ptr && (strcmp(ptr, "-client") == 0)) - len -= 7; - strncpy(fsname, lsi->lsi_lmd->lmd_profile, len); - fsname[len] = '\0'; - - return fsname; -} - -int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump, - int set_default) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct mdc_op_data data; - struct ptlrpc_request *req = NULL; - struct lustre_sb_info *lsi = s2lsi(inode->i_sb); - struct obd_device *mgc = lsi->lsi_mgc; - char *fsname = NULL, *param = NULL; - - struct iattr attr = { 0 }; - int rc = 0; - - /* - * This is coming from userspace, so should be in - * local endian. But the MDS would like it in little - * endian, so we swab it before we send it. - */ - if (lump->lmm_magic != LOV_USER_MAGIC) - RETURN(-EINVAL); - - if (lump->lmm_magic != cpu_to_le32(LOV_USER_MAGIC)) - lustre_swab_lov_user_md(lump); - - ll_prepare_mdc_op_data(&data, inode, NULL, NULL, 0, 0, NULL); - - /* swabbing is done in lov_setstripe() on server side */ - rc = mdc_setattr(sbi->ll_mdc_exp, &data, - &attr, lump, sizeof(*lump), NULL, 0, &req); - if (rc) { - ptlrpc_req_finished(req); - if (rc != -EPERM && rc != -EACCES) - CERROR("mdc_setattr fails: rc = %d\n", rc); - return rc; - } - ptlrpc_req_finished(req); - - if (set_default && mgc->u.cli.cl_mgc_mgsexp) { - OBD_ALLOC(param, MGS_PARAM_MAXLEN); - - /* Get fsname and assume devname to be -MDT0000. */ - fsname = ll_get_fsname(inode); - /* Set root stripesize */ - sprintf(param, "%s-MDT0000.lov.stripesize=%u", fsname, - lump->lmm_stripe_size); - rc = ll_send_mgc_param(mgc->u.cli.cl_mgc_mgsexp, param); - if (rc) - goto end; - - /* Set root stripecount */ - sprintf(param, "%s-MDT0000.lov.stripecount=%u", fsname, - lump->lmm_stripe_count); - rc = ll_send_mgc_param(mgc->u.cli.cl_mgc_mgsexp, param); - if (rc) - goto end; - - /* Set root stripeoffset */ - sprintf(param, "%s-MDT0000.lov.stripeoffset=%u", fsname, - lump->lmm_stripe_offset); - rc = ll_send_mgc_param(mgc->u.cli.cl_mgc_mgsexp, param); - if (rc) - goto end; -end: - if (fsname) - OBD_FREE(fsname, MGS_PARAM_MAXLEN); - if (param) - OBD_FREE(param, MGS_PARAM_MAXLEN); - } - return rc; -} - -int ll_dir_getstripe(struct inode *inode, struct lov_mds_md **lmmp, - int *lmm_size, struct ptlrpc_request **request) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ll_fid fid; - struct mds_body *body; - struct lov_mds_md *lmm = NULL; - struct ptlrpc_request *req = NULL; - int rc, lmmsize; - - ll_inode2fid(&fid, inode); - - rc = ll_get_max_mdsize(sbi, &lmmsize); - if (rc) - RETURN(rc); - - rc = mdc_getattr(sbi->ll_mdc_exp, &fid, - OBD_MD_FLEASIZE|OBD_MD_FLDIREA, - lmmsize, &req); - if (rc < 0) { - CDEBUG(D_INFO, "mdc_getattr failed on inode " - "%lu/%u: rc %d\n", inode->i_ino, - inode->i_generation, rc); - GOTO(out, rc); - } - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); /* checked by mdc_getattr_name */ - /* swabbed by mdc_getattr_name */ - LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF)); - - lmmsize = body->eadatasize; - - if (!(body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) || - lmmsize == 0) { - GOTO(out, rc = -ENODATA); - } - - lmm = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, lmmsize); - LASSERT(lmm != NULL); - LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF + 1)); - - /* - * This is coming from the MDS, so is probably in - * little endian. We convert it to host endian before - * passing it to userspace. - */ - if (lmm->lmm_magic == __swab32(LOV_MAGIC)) { - lustre_swab_lov_user_md((struct lov_user_md *)lmm); - } -out: - *lmmp = lmm; - *lmm_size = lmmsize; - *request = req; - return rc; -} - -static int ll_dir_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct obd_ioctl_data *data; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), cmd=%#x\n", - inode->i_ino, inode->i_generation, inode, cmd); - - /* asm-ppc{,64} declares TCGETS, et. al. as type 't' not 'T' */ - if (_IOC_TYPE(cmd) == 'T' || _IOC_TYPE(cmd) == 't') /* tty ioctls */ - return -ENOTTY; - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_IOCTL, 1); - switch(cmd) { - case EXT3_IOC_GETFLAGS: - case EXT3_IOC_SETFLAGS: - RETURN(ll_iocontrol(inode, file, cmd, arg)); - case EXT3_IOC_GETVERSION_OLD: - case EXT3_IOC_GETVERSION: - RETURN(put_user(inode->i_generation, (int *)arg)); - /* We need to special case any other ioctls we want to handle, - * to send them to the MDS/OST as appropriate and to properly - * network encode the arg field. - case EXT3_IOC_SETVERSION_OLD: - case EXT3_IOC_SETVERSION: - */ - case IOC_MDC_LOOKUP: { - struct ptlrpc_request *request = NULL; - struct ll_fid fid; - char *buf = NULL; - char *filename; - int namelen, rc, len = 0; - - rc = obd_ioctl_getdata(&buf, &len, (void *)arg); - if (rc) - RETURN(rc); - data = (void *)buf; - - filename = data->ioc_inlbuf1; - namelen = data->ioc_inllen1; - - if (namelen < 1) { - CDEBUG(D_INFO, "IOC_MDC_LOOKUP missing filename\n"); - GOTO(out, rc = -EINVAL); - } - - ll_inode2fid(&fid, inode); - rc = mdc_getattr_name(sbi->ll_mdc_exp, &fid, filename, namelen, - OBD_MD_FLID, 0, &request); - if (rc < 0) { - CDEBUG(D_INFO, "mdc_getattr_name: %d\n", rc); - GOTO(out, rc); - } - - ptlrpc_req_finished(request); - - EXIT; - out: - obd_ioctl_freedata(buf, len); - return rc; - } - case LL_IOC_LOV_SETSTRIPE: { - struct lov_user_md lum, *lump = (struct lov_user_md *)arg; - int rc = 0; - int set_default = 0; - - LASSERT(sizeof(lum) == sizeof(*lump)); - LASSERT(sizeof(lum.lmm_objects[0]) == - sizeof(lump->lmm_objects[0])); - rc = copy_from_user(&lum, lump, sizeof(lum)); - if (rc) - return(-EFAULT); - - if (inode->i_sb->s_root == file->f_dentry) - set_default = 1; - - rc = ll_dir_setstripe(inode, &lum, set_default); - - return rc; - } - case LL_IOC_OBD_STATFS: - RETURN(ll_obd_statfs(inode, (void *)arg)); - case LL_IOC_LOV_GETSTRIPE: - case LL_IOC_MDC_GETINFO: - case IOC_MDC_GETFILEINFO: - case IOC_MDC_GETFILESTRIPE: { - struct ptlrpc_request *request = NULL; - struct mds_body *body; - struct lov_user_md *lump; - struct lov_mds_md *lmm = NULL; - char *filename = NULL; - int rc, lmmsize; - - if (cmd == IOC_MDC_GETFILEINFO || - cmd == IOC_MDC_GETFILESTRIPE) { - filename = getname((const char *)arg); - if (IS_ERR(filename)) - RETURN(PTR_ERR(filename)); - - rc = ll_lov_getstripe_ea_info(inode, filename, &lmm, - &lmmsize, &request); - } else { - rc = ll_dir_getstripe(inode, &lmm, &lmmsize, &request); - } - - if (request) { - body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); /* checked by mdc_getattr_name */ - /* swabbed by mdc_getattr_name */ - LASSERT(lustre_rep_swabbed(request, REPLY_REC_OFF)); - } else { - GOTO(out_req, rc); - } - - if (rc < 0) { - if (rc == -ENODATA && (cmd == IOC_MDC_GETFILEINFO || - cmd == LL_IOC_MDC_GETINFO)) - GOTO(skip_lmm, rc = 0); - else - GOTO(out_req, rc); - } - - if (cmd == IOC_MDC_GETFILESTRIPE || - cmd == LL_IOC_LOV_GETSTRIPE) { - lump = (struct lov_user_md *)arg; - } else { - struct lov_user_mds_data *lmdp; - lmdp = (struct lov_user_mds_data *)arg; - lump = &lmdp->lmd_lmm; - } - rc = copy_to_user(lump, lmm, lmmsize); - if (rc) - GOTO(out_lmm, rc = -EFAULT); - skip_lmm: - if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) { - struct lov_user_mds_data *lmdp; - lstat_t st = { 0 }; - - st.st_dev = inode->i_sb->s_dev; - st.st_mode = body->mode; - st.st_nlink = body->nlink; - st.st_uid = body->uid; - st.st_gid = body->gid; - st.st_rdev = body->rdev; - st.st_size = body->size; - st.st_blksize = CFS_PAGE_SIZE; - st.st_blocks = body->blocks; - st.st_atime = body->atime; - st.st_mtime = body->mtime; - st.st_ctime = body->ctime; - st.st_ino = body->ino; - - lmdp = (struct lov_user_mds_data *)arg; - rc = copy_to_user(&lmdp->lmd_st, &st, sizeof(st)); - if (rc) - GOTO(out_lmm, rc = -EFAULT); - } - - EXIT; - out_lmm: - if (lmm && lmm->lmm_magic == LOV_MAGIC_JOIN) - OBD_FREE(lmm, lmmsize); - out_req: - ptlrpc_req_finished(request); - if (filename) - putname(filename); - return rc; - } - case IOC_LOV_GETINFO: { - struct lov_user_mds_data *lumd; - struct lov_stripe_md *lsm; - struct lov_user_md *lum; - struct lov_mds_md *lmm; - int lmmsize; - lstat_t st; - int rc; - - lumd = (struct lov_user_mds_data *)arg; - lum = &lumd->lmd_lmm; - - rc = ll_get_max_mdsize(sbi, &lmmsize); - if (rc) - RETURN(rc); - - OBD_ALLOC(lmm, lmmsize); - rc = copy_from_user(lmm, lum, lmmsize); - if (rc) - GOTO(free_lmm, rc = -EFAULT); - - rc = obd_unpackmd(sbi->ll_osc_exp, &lsm, lmm, lmmsize); - if (rc < 0) - GOTO(free_lmm, rc = -ENOMEM); - - rc = obd_checkmd(sbi->ll_osc_exp, sbi->ll_mdc_exp, lsm); - if (rc) - GOTO(free_lsm, rc); - - /* Perform glimpse_size operation. */ - memset(&st, 0, sizeof(st)); - - rc = ll_glimpse_ioctl(sbi, lsm, &st); - if (rc) - GOTO(free_lsm, rc); - - rc = copy_to_user(&lumd->lmd_st, &st, sizeof(st)); - if (rc) - GOTO(free_lsm, rc = -EFAULT); - - EXIT; - free_lsm: - obd_free_memmd(sbi->ll_osc_exp, &lsm); - free_lmm: - OBD_FREE(lmm, lmmsize); - return rc; - } - case OBD_IOC_LLOG_CATINFO: { - struct ptlrpc_request *req = NULL; - char *buf = NULL; - int rc, len = 0; - char *bufs[3] = { NULL }, *str; - int lens[3] = { sizeof(struct ptlrpc_body) }; - int size[2] = { sizeof(struct ptlrpc_body) }; - - rc = obd_ioctl_getdata(&buf, &len, (void *)arg); - if (rc) - RETURN(rc); - data = (void *)buf; - - if (!data->ioc_inlbuf1) { - obd_ioctl_freedata(buf, len); - RETURN(-EINVAL); - } - - lens[REQ_REC_OFF] = data->ioc_inllen1; - bufs[REQ_REC_OFF] = data->ioc_inlbuf1; - if (data->ioc_inllen2) { - lens[REQ_REC_OFF + 1] = data->ioc_inllen2; - bufs[REQ_REC_OFF + 1] = data->ioc_inlbuf2; - } else { - lens[REQ_REC_OFF + 1] = 0; - bufs[REQ_REC_OFF + 1] = NULL; - } - - req = ptlrpc_prep_req(sbi2mdc(sbi)->cl_import, - LUSTRE_LOG_VERSION, LLOG_CATINFO, 3, lens, - bufs); - if (!req) - GOTO(out_catinfo, rc = -ENOMEM); - - size[REPLY_REC_OFF] = data->ioc_plen1; - ptlrpc_req_set_repsize(req, 2, size); - - rc = ptlrpc_queue_wait(req); - str = lustre_msg_string(req->rq_repmsg, REPLY_REC_OFF, - data->ioc_plen1); - if (!rc) - rc = copy_to_user(data->ioc_pbuf1, str,data->ioc_plen1); - ptlrpc_req_finished(req); - out_catinfo: - obd_ioctl_freedata(buf, len); - RETURN(rc); - } - case OBD_IOC_QUOTACHECK: { - struct obd_quotactl *oqctl; - int rc, error = 0; - - if (!capable(CAP_SYS_ADMIN)) - RETURN(-EPERM); - - OBD_ALLOC_PTR(oqctl); - if (!oqctl) - RETURN(-ENOMEM); - oqctl->qc_type = arg; - rc = obd_quotacheck(sbi->ll_mdc_exp, oqctl); - if (rc < 0) { - CDEBUG(D_INFO, "mdc_quotacheck failed: rc %d\n", rc); - error = rc; - } - - rc = obd_quotacheck(sbi->ll_osc_exp, oqctl); - if (rc < 0) - CDEBUG(D_INFO, "osc_quotacheck failed: rc %d\n", rc); - - OBD_FREE_PTR(oqctl); - return error ?: rc; - } - case OBD_IOC_POLL_QUOTACHECK: { - struct if_quotacheck *check; - int rc; - - if (!capable(CAP_SYS_ADMIN)) - RETURN(-EPERM); - - OBD_ALLOC_PTR(check); - if (!check) - RETURN(-ENOMEM); - - rc = obd_iocontrol(cmd, sbi->ll_mdc_exp, 0, (void *)check, - NULL); - if (rc) { - CDEBUG(D_QUOTA, "mdc ioctl %d failed: %d\n", cmd, rc); - if (copy_to_user((void *)arg, check, sizeof(*check))) - rc = -EFAULT; - GOTO(out_poll, rc); - } - - rc = obd_iocontrol(cmd, sbi->ll_osc_exp, 0, (void *)check, - NULL); - if (rc) { - CDEBUG(D_QUOTA, "osc ioctl %d failed: %d\n", cmd, rc); - if (copy_to_user((void *)arg, check, sizeof(*check))) - rc = -EFAULT; - GOTO(out_poll, rc); - } - out_poll: - OBD_FREE_PTR(check); - RETURN(rc); - } -#ifdef HAVE_QUOTA_SUPPORT - case OBD_IOC_QUOTACTL: { - struct if_quotactl *qctl; - struct obd_quotactl *oqctl; - - int cmd, type, id, rc = 0; - - OBD_ALLOC_PTR(qctl); - if (!qctl) - RETURN(-ENOMEM); - - OBD_ALLOC_PTR(oqctl); - if (!oqctl) { - OBD_FREE_PTR(qctl); - RETURN(-ENOMEM); - } - if (copy_from_user(qctl, (void *)arg, sizeof(*qctl))) - GOTO(out_quotactl, rc = -EFAULT); - - cmd = qctl->qc_cmd; - type = qctl->qc_type; - id = qctl->qc_id; - switch (cmd) { - case LUSTRE_Q_INVALIDATE: - case Q_QUOTAON: - case Q_QUOTAOFF: - case Q_SETQUOTA: - case Q_SETINFO: - if (!capable(CAP_SYS_ADMIN)) - GOTO(out_quotactl, rc = -EPERM); - break; - case Q_GETQUOTA: - if (((type == USRQUOTA && current->euid != id) || - (type == GRPQUOTA && !in_egroup_p(id))) && - !capable(CAP_SYS_ADMIN)) - GOTO(out_quotactl, rc = -EPERM); - - /* XXX: dqb_valid is borrowed as a flag to mark that - * only mds quota is wanted */ - if (qctl->qc_dqblk.dqb_valid) { - qctl->obd_uuid = sbi->ll_mdc_exp->exp_obd-> - u.cli.cl_target_uuid; - qctl->qc_dqblk.dqb_valid = 0; - } - - break; - case Q_GETINFO: - break; - default: - CERROR("unsupported quotactl op: %#x\n", cmd); - GOTO(out_quotactl, -ENOTTY); - } - - QCTL_COPY(oqctl, qctl); - - if (qctl->obd_uuid.uuid[0]) { - struct obd_device *obd; - struct obd_uuid *uuid = &qctl->obd_uuid; - - obd = class_find_client_notype(uuid, - &sbi->ll_osc_exp->exp_obd->obd_uuid); - if (!obd) - GOTO(out_quotactl, rc = -ENOENT); - - if (cmd == Q_GETINFO) - oqctl->qc_cmd = Q_GETOINFO; - else if (cmd == Q_GETQUOTA) - oqctl->qc_cmd = Q_GETOQUOTA; - else - GOTO(out_quotactl, rc = -EINVAL); - - if (sbi->ll_mdc_exp->exp_obd == obd) { - rc = obd_quotactl(sbi->ll_mdc_exp, oqctl); - } else { - int i; - struct obd_export *exp; - struct lov_obd *lov = &sbi->ll_osc_exp-> - exp_obd->u.lov; - - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || - !lov->lov_tgts[i]->ltd_active) - continue; - exp = lov->lov_tgts[i]->ltd_exp; - if (exp->exp_obd == obd) { - rc = obd_quotactl(exp, oqctl); - break; - } - } - } - - oqctl->qc_cmd = cmd; - QCTL_COPY(qctl, oqctl); - - if (copy_to_user((void *)arg, qctl, sizeof(*qctl))) - rc = -EFAULT; - - GOTO(out_quotactl, rc); - } - - rc = obd_quotactl(sbi->ll_mdc_exp, oqctl); - if (rc && rc != -EBUSY && cmd == Q_QUOTAON) { - oqctl->qc_cmd = Q_QUOTAOFF; - obd_quotactl(sbi->ll_mdc_exp, oqctl); - } - - QCTL_COPY(qctl, oqctl); - - if (copy_to_user((void *)arg, qctl, sizeof(*qctl))) - rc = -EFAULT; - out_quotactl: - OBD_FREE_PTR(qctl); - OBD_FREE_PTR(oqctl); - RETURN(rc); - } -#endif /* HAVE_QUOTA_SUPPORT */ - case OBD_IOC_GETNAME_OLD: - case OBD_IOC_GETNAME: { - struct obd_device *obd = class_exp2obd(sbi->ll_osc_exp); - if (!obd) - RETURN(-EFAULT); - if (copy_to_user((void *)arg, obd->obd_name, - strlen(obd->obd_name) + 1)) - RETURN (-EFAULT); - RETURN(0); - } - default: - RETURN(obd_iocontrol(cmd, sbi->ll_osc_exp,0,NULL,(void *)arg)); - } -} - -struct file_operations ll_dir_operations = { - .open = ll_file_open, - .release = ll_file_release, - .read = generic_read_dir, - .readdir = ll_readdir, - .ioctl = ll_dir_ioctl -}; - diff --git a/lustre/llite/file.c b/lustre/llite/file.c deleted file mode 100644 index ddaa5aba2e..0000000000 --- a/lustre/llite/file.c +++ /dev/null @@ -1,3093 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE -#include <lustre_dlm.h> -#include <lustre_lite.h> -#include <linux/pagemap.h> -#include <linux/file.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include <linux/lustre_compat25.h> -#endif -#include "llite_internal.h" - -/* also used by llite/special.c:ll_special_open() */ -struct ll_file_data *ll_file_data_get(void) -{ - struct ll_file_data *fd; - - OBD_SLAB_ALLOC_PTR(fd, ll_file_data_slab); - return fd; -} - -static void ll_file_data_put(struct ll_file_data *fd) -{ - if (fd != NULL) - OBD_SLAB_FREE_PTR(fd, ll_file_data_slab); -} - -static int ll_close_inode_openhandle(struct inode *inode, - struct obd_client_handle *och) -{ - struct ptlrpc_request *req = NULL; - struct obd_device *obd; - struct obdo *oa; - int rc; - ENTRY; - - obd = class_exp2obd(ll_i2mdcexp(inode)); - if (obd == NULL) { - CERROR("Invalid MDC connection handle "LPX64"\n", - ll_i2mdcexp(inode)->exp_handle.h_cookie); - GOTO(out, rc = 0); - } - - /* - * here we check if this is forced umount. If so this is called on - * canceling "open lock" and we do not call mdc_close() in this case, as - * it will not be successful, as import is already deactivated. - */ - if (obd->obd_force) - GOTO(out, rc = 0); - - OBDO_ALLOC(oa); - if (!oa) - RETURN(-ENOMEM); // XXX We leak openhandle and request here. - - oa->o_id = inode->i_ino; - oa->o_valid = OBD_MD_FLID; - obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLMODE | - OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME | - OBD_MD_FLCTIME); - if (ll_is_inode_dirty(inode)) { - oa->o_flags = MDS_BFLAG_UNCOMMITTED_WRITES; - oa->o_valid |= OBD_MD_FLFLAGS; - } - - rc = mdc_close(ll_i2mdcexp(inode), oa, och, &req); - if (rc == EAGAIN) { - /* We are the last writer, so the MDS has instructed us to get - * the file size and any write cookies, then close again. */ - ll_queue_done_writing(inode); - rc = 0; - } else if (rc) { - CERROR("inode %lu mdc close failed: rc = %d\n", - inode->i_ino, rc); - } - - OBDO_FREE(oa); - - if (rc == 0) { - rc = ll_objects_destroy(req, inode); - if (rc) - CERROR("inode %lu ll_objects destroy: rc = %d\n", - inode->i_ino, rc); - } - - ptlrpc_req_finished(req); /* This is close request */ - EXIT; -out: - mdc_clear_open_replay_data(och); - - return rc; -} - -int ll_mdc_real_close(struct inode *inode, int flags) -{ - struct ll_inode_info *lli = ll_i2info(inode); - int rc = 0; - struct obd_client_handle **och_p; - struct obd_client_handle *och; - __u64 *och_usecount; - - ENTRY; - - if (flags & FMODE_WRITE) { - och_p = &lli->lli_mds_write_och; - och_usecount = &lli->lli_open_fd_write_count; - } else if (flags & FMODE_EXEC) { - och_p = &lli->lli_mds_exec_och; - och_usecount = &lli->lli_open_fd_exec_count; - } else { - LASSERT(flags & FMODE_READ); - och_p = &lli->lli_mds_read_och; - och_usecount = &lli->lli_open_fd_read_count; - } - - down(&lli->lli_och_sem); - if (*och_usecount) { /* There are still users of this handle, so - skip freeing it. */ - up(&lli->lli_och_sem); - RETURN(0); - } - och=*och_p; - *och_p = NULL; - up(&lli->lli_och_sem); - - if (och) { /* There might be a race and somebody have freed this och - already */ - rc = ll_close_inode_openhandle(inode, och); - och->och_fh.cookie = DEAD_HANDLE_MAGIC; - OBD_FREE(och, sizeof *och); - } - - RETURN(rc); -} - -int ll_mdc_close(struct obd_export *mdc_exp, struct inode *inode, - struct file *file) -{ - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); - struct ll_inode_info *lli = ll_i2info(inode); - int rc = 0; - ENTRY; - - /* clear group lock, if present */ - if (unlikely(fd->fd_flags & LL_FILE_GROUP_LOCKED)) { - struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd; - fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK); - rc = ll_extent_unlock(fd, inode, lsm, LCK_GROUP, - &fd->fd_cwlockh); - } - - /* Let's see if we have good enough OPEN lock on the file and if - we can skip talking to MDS */ - if (file->f_dentry->d_inode) { /* Can this ever be false? */ - int lockmode; - int flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK; - struct lustre_handle lockh; - struct inode *inode = file->f_dentry->d_inode; - struct ldlm_res_id file_res_id = {.name={inode->i_ino, - inode->i_generation}}; - ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}}; - - down(&lli->lli_och_sem); - if (fd->fd_omode & FMODE_WRITE) { - lockmode = LCK_CW; - LASSERT(lli->lli_open_fd_write_count); - lli->lli_open_fd_write_count--; - } else if (fd->fd_omode & FMODE_EXEC) { - lockmode = LCK_PR; - LASSERT(lli->lli_open_fd_exec_count); - lli->lli_open_fd_exec_count--; - } else { - lockmode = LCK_CR; - LASSERT(lli->lli_open_fd_read_count); - lli->lli_open_fd_read_count--; - } - up(&lli->lli_och_sem); - - if (!ldlm_lock_match(mdc_exp->exp_obd->obd_namespace, flags, - &file_res_id, LDLM_IBITS, &policy,lockmode, - &lockh)) { - rc = ll_mdc_real_close(file->f_dentry->d_inode, - fd->fd_omode); - } - } else { - CERROR("Releasing a file %p with negative dentry %p. Name %s", - file, file->f_dentry, file->f_dentry->d_name.name); - } - - LUSTRE_FPRIVATE(file) = NULL; - ll_file_data_put(fd); - - RETURN(rc); -} - -int lov_test_and_clear_async_rc(struct lov_stripe_md *lsm); - -/* While this returns an error code, fput() the caller does not, so we need - * to make every effort to clean up all of our state here. Also, applications - * rarely check close errors and even if an error is returned they will not - * re-try the close call. - */ -int ll_file_release(struct inode *inode, struct file *file) -{ - struct ll_file_data *fd; - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - int rc; - - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino, - inode->i_generation, inode); - - - if (inode->i_sb->s_root != file->f_dentry) - ll_stats_ops_tally(sbi, LPROC_LL_RELEASE, 1); - fd = LUSTRE_FPRIVATE(file); - LASSERT(fd != NULL); - - /* - * The last ref on @file, maybe not the the owner pid of statahead. - * Different processes can open the same dir, "ll_opendir_key" means: - * it is me that should stop the statahead thread. - */ - if (lli->lli_opendir_key == fd) - ll_stop_statahead(inode, fd); - - if (inode->i_sb->s_root == file->f_dentry) { - LUSTRE_FPRIVATE(file) = NULL; - ll_file_data_put(fd); - RETURN(0); - } - - if (lsm) - lov_test_and_clear_async_rc(lsm); - lli->lli_async_rc = 0; - - rc = ll_mdc_close(sbi->ll_mdc_exp, inode, file); - RETURN(rc); -} - -static int ll_intent_file_open(struct file *file, void *lmm, - int lmmsize, struct lookup_intent *itp) -{ - struct ll_sb_info *sbi = ll_i2sbi(file->f_dentry->d_inode); - struct mdc_op_data data; - struct dentry *parent = file->f_dentry->d_parent; - const char *name = file->f_dentry->d_name.name; - const int len = file->f_dentry->d_name.len; - struct inode *inode = file->f_dentry->d_inode; - struct ptlrpc_request *req; - int rc; - ENTRY; - - if (!parent) - RETURN(-ENOENT); - - ll_prepare_mdc_op_data(&data, parent->d_inode, inode, - name, len, O_RDWR, NULL); - - /* Usually we come here only for NFSD, and we want open lock. - But we can also get here with pre 2.6.15 patchless kernels, and in - that case that lock is also ok */ - /* We can also get here if there was cached open handle in revalidate_it - * but it disappeared while we were getting from there to ll_file_open. - * But this means this file was closed and immediatelly opened which - * makes a good candidate for using OPEN lock */ - /* If lmmsize & lmm are not 0, we are just setting stripe info - * parameters. No need for the open lock */ - if (!lmm && !lmmsize) - itp->it_flags |= MDS_OPEN_LOCK; - - rc = mdc_intent_lock(sbi->ll_mdc_exp, &data, lmm, lmmsize, itp, - 0 /*unused */, &req, ll_mdc_blocking_ast, 0); - if (rc == -ESTALE) { - /* reason for keep own exit path - don`t flood log - * with messages with -ESTALE errors. - */ - if (!it_disposition(itp, DISP_OPEN_OPEN) || - it_open_error(DISP_OPEN_OPEN, itp)) - GOTO(out, rc); - ll_release_openhandle(file->f_dentry, itp); - GOTO(out_stale, rc); - } - - if (rc != 0 || it_open_error(DISP_OPEN_OPEN, itp)) { - rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, itp); - CDEBUG(D_VFSTRACE, "lock enqueue: err: %d\n", rc); - GOTO(out, rc); - } - - if (itp->d.lustre.it_lock_mode) - mdc_set_lock_data(&itp->d.lustre.it_lock_handle, - inode); - - rc = ll_prep_inode(sbi->ll_osc_exp, &file->f_dentry->d_inode, - req, DLM_REPLY_REC_OFF, NULL); -out: - ptlrpc_req_finished(itp->d.lustre.it_data); - -out_stale: - it_clear_disposition(itp, DISP_ENQ_COMPLETE); - ll_intent_drop_lock(itp); - - RETURN(rc); -} - - -static void ll_och_fill(struct ll_inode_info *lli, struct lookup_intent *it, - struct obd_client_handle *och) -{ - struct ptlrpc_request *req = it->d.lustre.it_data; - struct mds_body *body; - - LASSERT(och); - - body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body)); - LASSERT(body != NULL); /* reply already checked out */ - /* and swabbed in mdc_enqueue */ - LASSERT(lustre_rep_swabbed(req, DLM_REPLY_REC_OFF)); - - memcpy(&och->och_fh, &body->handle, sizeof(body->handle)); - och->och_magic = OBD_CLIENT_HANDLE_MAGIC; - lli->lli_io_epoch = body->io_epoch; - - mdc_set_open_replay_data(och, it->d.lustre.it_data); -} - -int ll_local_open(struct file *file, struct lookup_intent *it, - struct ll_file_data *fd, struct obd_client_handle *och) -{ - ENTRY; - - LASSERT(!LUSTRE_FPRIVATE(file)); - - LASSERT(fd != NULL); - - if (och) - ll_och_fill(ll_i2info(file->f_dentry->d_inode), it, och); - LUSTRE_FPRIVATE(file) = fd; - ll_readahead_init(file->f_dentry->d_inode, &fd->fd_ras); - fd->fd_omode = it->it_flags; - - RETURN(0); -} - -/* Open a file, and (for the very first open) create objects on the OSTs at - * this time. If opened with O_LOV_DELAY_CREATE, then we don't do the object - * creation or open until ll_lov_setstripe() ioctl is called. We grab - * lli_open_sem to ensure no other process will create objects, send the - * stripe MD to the MDS, or try to destroy the objects if that fails. - * - * If we already have the stripe MD locally then we don't request it in - * mdc_open(), by passing a lmm_size = 0. - * - * It is up to the application to ensure no other processes open this file - * in the O_LOV_DELAY_CREATE case, or the default striping pattern will be - * used. We might be able to avoid races of that sort by getting lli_open_sem - * before returning in the O_LOV_DELAY_CREATE case and dropping it here - * or in ll_file_release(), but I'm not sure that is desirable/necessary. - */ -int ll_file_open(struct inode *inode, struct file *file) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct lookup_intent *it, oit = { .it_op = IT_OPEN, - .it_flags = file->f_flags }; - struct lov_stripe_md *lsm; - struct ptlrpc_request *req = NULL; - struct obd_client_handle **och_p; - __u64 *och_usecount; - struct ll_file_data *fd; - int rc = 0, opendir_set = 0; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), flags %o\n", inode->i_ino, - inode->i_generation, inode, file->f_flags); - -#ifdef HAVE_VFS_INTENT_PATCHES - it = file->f_it; -#else - it = file->private_data; /* XXX: compat macro */ - file->private_data = NULL; /* prevent ll_local_open assertion */ -#endif - - fd = ll_file_data_get(); - if (fd == NULL) - RETURN(-ENOMEM); - - if (S_ISDIR(inode->i_mode)) { - spin_lock(&lli->lli_lock); - /* - * "lli->lli_opendir_pid != 0" means someone has set it. - * "lli->lli_sai != NULL" means the previous statahead has not - * been cleanup. - */ - if (lli->lli_opendir_pid == 0 && lli->lli_sai == NULL) { - opendir_set = 1; - lli->lli_opendir_pid = cfs_curproc_pid(); - lli->lli_opendir_key = fd; - } else if (unlikely(lli->lli_opendir_pid == cfs_curproc_pid())) { - /* Two cases for this: - * (1) The same process open such directory many times. - * (2) The old process opened the directory, and exited - * before its children processes. Then new process - * with the same pid opens such directory before the - * old process's children processes exit. - * Change the owner to the latest one. - */ - opendir_set = 2; - lli->lli_opendir_key = fd; - } - spin_unlock(&lli->lli_lock); - } - - if (inode->i_sb->s_root == file->f_dentry) { - LUSTRE_FPRIVATE(file) = fd; - RETURN(0); - } - - if (!it || !it->d.lustre.it_disposition) { - /* Convert f_flags into access mode. We cannot use file->f_mode, - * because everything but O_ACCMODE mask was stripped from it */ - if ((oit.it_flags + 1) & O_ACCMODE) - oit.it_flags++; - if (file->f_flags & O_TRUNC) - oit.it_flags |= FMODE_WRITE; - - /* kernel only call f_op->open in dentry_open. filp_open calls - * dentry_open after call to open_namei that checks permissions. - * Only nfsd_open call dentry_open directly without checking - * permissions and because of that this code below is safe. */ - if (oit.it_flags & FMODE_WRITE) - oit.it_flags |= MDS_OPEN_OWNEROVERRIDE; - - /* We do not want O_EXCL here, presumably we opened the file - * already? XXX - NFS implications? */ - oit.it_flags &= ~O_EXCL; - - it = &oit; - } - -restart: - /* Let's see if we have file open on MDS already. */ - if (it->it_flags & FMODE_WRITE) { - och_p = &lli->lli_mds_write_och; - och_usecount = &lli->lli_open_fd_write_count; - } else if (it->it_flags & FMODE_EXEC) { - och_p = &lli->lli_mds_exec_och; - och_usecount = &lli->lli_open_fd_exec_count; - } else { - och_p = &lli->lli_mds_read_och; - och_usecount = &lli->lli_open_fd_read_count; - } - - LASSERTF(it->it_flags != 0, "it %p dist %d \n", it, - it->d.lustre.it_disposition); - - down(&lli->lli_och_sem); - if (*och_p) { /* Open handle is present */ - if (it_disposition(it, DISP_OPEN_OPEN)) { - /* Well, there's extra open request that we do not need, - let's close it somehow. This will decref request. */ - rc = it_open_error(DISP_OPEN_OPEN, it); - if (rc) { - up(&lli->lli_och_sem); - ll_file_data_put(fd); - GOTO(out_openerr, rc); - } - ll_release_openhandle(file->f_dentry, it); - lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats, - LPROC_LL_OPEN); - } - (*och_usecount)++; - - rc = ll_local_open(file, it, fd, NULL); - - LASSERTF(rc == 0, "rc = %d\n", rc); - } else { - LASSERT(*och_usecount == 0); - if (!it->d.lustre.it_disposition) { - /* We cannot just request lock handle now, new ELC code - means that one of other OPEN locks for this file - could be cancelled, and since blocking ast handler - would attempt to grab och_sem as well, that would - result in a deadlock */ - up(&lli->lli_och_sem); - rc = ll_intent_file_open(file, NULL, 0, it); - if (rc) { - ll_file_data_put(fd); - GOTO(out_openerr, rc); - } - - mdc_set_lock_data(&it->d.lustre.it_lock_handle, - file->f_dentry->d_inode); - goto restart; - } - - OBD_ALLOC(*och_p, sizeof (struct obd_client_handle)); - if (!*och_p) { - ll_file_data_put(fd); - GOTO(out_och_free, rc = -ENOMEM); - } - (*och_usecount)++; - req = it->d.lustre.it_data; - - /* mdc_intent_lock() didn't get a request ref if there was an - * open error, so don't do cleanup on the request here - * (bug 3430) */ - /* XXX (green): Should not we bail out on any error here, not - * just open error? */ - rc = it_open_error(DISP_OPEN_OPEN, it); - if (rc) { - ll_file_data_put(fd); - GOTO(out_och_free, rc); - } - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_OPEN, 1); - rc = ll_local_open(file, it, fd, *och_p); - LASSERTF(rc == 0, "rc = %d\n", rc); - } - up(&lli->lli_och_sem); - - /* Must do this outside lli_och_sem lock to prevent deadlock where - different kind of OPEN lock for this same inode gets cancelled - by ldlm_cancel_lru */ - if (!S_ISREG(inode->i_mode)) - GOTO(out, rc); - - lsm = lli->lli_smd; - if (lsm == NULL) { - if (file->f_flags & O_LOV_DELAY_CREATE || - !(file->f_mode & FMODE_WRITE)) { - CDEBUG(D_INODE, "object creation was delayed\n"); - GOTO(out, rc); - } - } - file->f_flags &= ~O_LOV_DELAY_CREATE; - GOTO(out, rc); - out: - ptlrpc_req_finished(req); - if (req) - it_clear_disposition(it, DISP_ENQ_OPEN_REF); - if (rc == 0) { - ll_open_complete(inode); - } else { -out_och_free: - if (*och_p) { - OBD_FREE(*och_p, sizeof (struct obd_client_handle)); - *och_p = NULL; /* OBD_FREE writes some magic there */ - (*och_usecount)--; - } - up(&lli->lli_och_sem); -out_openerr: - if (opendir_set) { - lli->lli_opendir_key = NULL; - lli->lli_opendir_pid = 0; - } else if (unlikely(opendir_set == 2)) { - ll_stop_statahead(inode, fd); - } - } - return rc; -} - -/* Fills the obdo with the attributes for the inode defined by lsm */ -int ll_lsm_getattr(struct obd_export *exp, struct lov_stripe_md *lsm, - struct obdo *oa) -{ - struct ptlrpc_request_set *set; - struct obd_info oinfo = { { { 0 } } }; - int rc; - ENTRY; - - LASSERT(lsm != NULL); - - memset(oa, 0, sizeof *oa); - oinfo.oi_md = lsm; - oinfo.oi_oa = oa; - oa->o_id = lsm->lsm_object_id; - oa->o_mode = S_IFREG; - oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLSIZE | - OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME | - OBD_MD_FLCTIME; - - set = ptlrpc_prep_set(); - if (set == NULL) { - rc = -ENOMEM; - } else { - rc = obd_getattr_async(exp, &oinfo, set); - if (rc == 0) - rc = ptlrpc_set_wait(set); - ptlrpc_set_destroy(set); - } - if (rc) - RETURN(rc); - - oa->o_valid &= (OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME | - OBD_MD_FLCTIME | OBD_MD_FLSIZE); - RETURN(0); -} - -static inline void ll_remove_suid(struct inode *inode) -{ - unsigned int mode; - - /* set S_IGID if S_IXGRP is set, and always set S_ISUID */ - mode = (inode->i_mode & S_IXGRP)*(S_ISGID/S_IXGRP) | S_ISUID; - - /* was any of the uid bits set? */ - mode &= inode->i_mode; - if (mode && !capable(CAP_FSETID)) { - inode->i_mode &= ~mode; - // XXX careful here - we cannot change the size - } -} - -static int ll_lock_to_stripe_offset(struct inode *inode, struct ldlm_lock *lock) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct obd_export *exp = ll_i2obdexp(inode); - struct { - char name[16]; - struct ldlm_lock *lock; - struct lov_stripe_md *lsm; - } key = { .name = "lock_to_stripe", .lock = lock, .lsm = lsm }; - __u32 stripe, vallen = sizeof(stripe); - int rc; - ENTRY; - - if (lsm->lsm_stripe_count == 1) - GOTO(check, stripe = 0); - - /* get our offset in the lov */ - rc = obd_get_info(exp, sizeof(key), &key, &vallen, &stripe); - if (rc != 0) { - CERROR("obd_get_info: rc = %d\n", rc); - RETURN(rc); - } - LASSERT(stripe < lsm->lsm_stripe_count); - -check: - if (lsm->lsm_oinfo[stripe]->loi_id != lock->l_resource->lr_name.name[0]|| - lsm->lsm_oinfo[stripe]->loi_gr != lock->l_resource->lr_name.name[1]){ - LDLM_ERROR(lock, "resource doesn't match object "LPU64"/"LPU64, - lsm->lsm_oinfo[stripe]->loi_id, - lsm->lsm_oinfo[stripe]->loi_gr); - RETURN(-ELDLM_NO_LOCK_DATA); - } - - RETURN(stripe); -} - -/* Get extra page reference to ensure it is not going away */ -void ll_pin_extent_cb(void *data) -{ - struct page *page = data; - - page_cache_get(page); - - return; -} -/* Flush the page from page cache for an extent as its canceled. - * Page to remove is delivered as @data. - * - * No one can dirty the extent until we've finished our work and they cannot - * enqueue another lock. The DLM protects us from ll_file_read/write here, - * but other kernel actors could have pages locked. - * - * If @discard is set, there is no need to write the page if it is dirty. - * - * Called with the DLM lock held. */ -int ll_page_removal_cb(void *data, int discard) -{ - int rc; - struct page *page = data; - struct address_space *mapping; - - ENTRY; - - /* We have page reference already from ll_pin_page */ - lock_page(page); - - /* Already truncated by somebody */ - if (!page->mapping) - GOTO(out, rc = 0); - - mapping = page->mapping; - - ll_teardown_mmaps(mapping, - (__u64)page->index << PAGE_CACHE_SHIFT, - ((__u64)page->index<<PAGE_CACHE_SHIFT)| - ~PAGE_CACHE_MASK); - LL_CDEBUG_PAGE(D_PAGE, page, "removing page\n"); - - if (!discard && clear_page_dirty_for_io(page)) { - LASSERT(page->mapping); - rc = ll_call_writepage(page->mapping->host, page); - /* either waiting for io to complete or reacquiring - * the lock that the failed writepage released */ - lock_page(page); - wait_on_page_writeback(page); - if (rc != 0) { - CERROR("writepage inode %lu(%p) of page %p " - "failed: %d\n", mapping->host->i_ino, - mapping->host, page, rc); -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - if (rc == -ENOSPC) - set_bit(AS_ENOSPC, &mapping->flags); - else - set_bit(AS_EIO, &mapping->flags); -#else - mapping->gfp_mask |= AS_EIO_MASK; -#endif - } - } - if (page->mapping != NULL) { - struct ll_async_page *llap = llap_cast_private(page); - // checking again to account for writeback's lock_page() - LL_CDEBUG_PAGE(D_PAGE, page, "truncating\n"); - if (llap) - ll_ra_accounting(llap, page->mapping); - ll_truncate_complete_page(page); - } - EXIT; -out: - LASSERT(!PageWriteback(page)); - unlock_page(page); - page_cache_release(page); - - return 0; -} - -int ll_extent_lock_cancel_cb(struct ldlm_lock *lock, struct ldlm_lock_desc *new, - void *data, int flag) -{ - struct inode *inode; - struct ll_inode_info *lli; - struct lov_stripe_md *lsm; - int stripe; - __u64 kms; - - ENTRY; - - if ((unsigned long)data > 0 && (unsigned long)data < 0x1000) { - LDLM_ERROR(lock, "cancelling lock with bad data %p", data); - LBUG(); - } - - inode = ll_inode_from_lock(lock); - if (inode == NULL) - RETURN(0); - lli = ll_i2info(inode); - if (lli == NULL) - GOTO(iput, 0); - if (lli->lli_smd == NULL) - GOTO(iput, 0); - lsm = lli->lli_smd; - - stripe = ll_lock_to_stripe_offset(inode, lock); - if (stripe < 0) - GOTO(iput, 0); - - lov_stripe_lock(lsm); - lock_res_and_lock(lock); - kms = ldlm_extent_shift_kms(lock, - lsm->lsm_oinfo[stripe]->loi_kms); - - if (lsm->lsm_oinfo[stripe]->loi_kms != kms) - LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64, - lsm->lsm_oinfo[stripe]->loi_kms, kms); - lsm->lsm_oinfo[stripe]->loi_kms = kms; - unlock_res_and_lock(lock); - lov_stripe_unlock(lsm); - ll_try_done_writing(inode); - EXIT; -iput: - iput(inode); - - return 0; -} - -#if 0 -int ll_async_completion_ast(struct ldlm_lock *lock, int flags, void *data) -{ - /* XXX ALLOCATE - 160 bytes */ - struct inode *inode = ll_inode_from_lock(lock); - struct ll_inode_info *lli = ll_i2info(inode); - struct lustre_handle lockh = { 0 }; - struct ost_lvb *lvb; - int stripe; - ENTRY; - - if (flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED | - LDLM_FL_BLOCK_CONV)) { - LBUG(); /* not expecting any blocked async locks yet */ - LDLM_DEBUG(lock, "client-side async enqueue returned a blocked " - "lock, returning"); - ldlm_lock_dump(D_OTHER, lock, 0); - ldlm_reprocess_all(lock->l_resource); - RETURN(0); - } - - LDLM_DEBUG(lock, "client-side async enqueue: granted/glimpsed"); - - stripe = ll_lock_to_stripe_offset(inode, lock); - if (stripe < 0) - goto iput; - - if (lock->l_lvb_len) { - struct lov_stripe_md *lsm = lli->lli_smd; - __u64 kms; - lvb = lock->l_lvb_data; - lsm->lsm_oinfo[stripe].loi_rss = lvb->lvb_size; - - lock_res_and_lock(lock); - ll_inode_size_lock(inode, 1); - kms = MAX(lsm->lsm_oinfo[stripe].loi_kms, lvb->lvb_size); - kms = ldlm_extent_shift_kms(NULL, kms); - if (lsm->lsm_oinfo[stripe].loi_kms != kms) - LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64, - lsm->lsm_oinfo[stripe].loi_kms, kms); - lsm->lsm_oinfo[stripe].loi_kms = kms; - ll_inode_size_unlock(inode, 1); - unlock_res_and_lock(lock); - } - -iput: - iput(inode); - wake_up(&lock->l_waitq); - - ldlm_lock2handle(lock, &lockh); - ldlm_lock_decref(&lockh, LCK_PR); - RETURN(0); -} -#endif - -static int ll_glimpse_callback(struct ldlm_lock *lock, void *reqp) -{ - struct ptlrpc_request *req = reqp; - struct inode *inode = ll_inode_from_lock(lock); - struct ll_inode_info *lli; - struct lov_stripe_md *lsm; - struct ost_lvb *lvb; - int rc, stripe; - int size[2] = { sizeof(struct ptlrpc_body), sizeof(*lvb) }; - ENTRY; - - if (inode == NULL) - GOTO(out, rc = -ELDLM_NO_LOCK_DATA); - lli = ll_i2info(inode); - if (lli == NULL) - GOTO(iput, rc = -ELDLM_NO_LOCK_DATA); - lsm = lli->lli_smd; - if (lsm == NULL) - GOTO(iput, rc = -ELDLM_NO_LOCK_DATA); - - /* First, find out which stripe index this lock corresponds to. */ - stripe = ll_lock_to_stripe_offset(inode, lock); - if (stripe < 0) - GOTO(iput, rc = -ELDLM_NO_LOCK_DATA); - - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - GOTO(iput, rc); - - lvb = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*lvb)); - lvb->lvb_size = lli->lli_smd->lsm_oinfo[stripe]->loi_kms; - lvb->lvb_mtime = LTIME_S(inode->i_mtime); - lvb->lvb_atime = LTIME_S(inode->i_atime); - lvb->lvb_ctime = LTIME_S(inode->i_ctime); - - LDLM_DEBUG(lock, "i_size: %llu -> stripe number %u -> kms "LPU64 - " atime "LPU64", mtime "LPU64", ctime "LPU64, - i_size_read(inode), stripe, lvb->lvb_size, lvb->lvb_mtime, - lvb->lvb_atime, lvb->lvb_ctime); - iput: - iput(inode); - - out: - /* These errors are normal races, so we don't want to fill the console - * with messages by calling ptlrpc_error() */ - if (rc == -ELDLM_NO_LOCK_DATA) - lustre_pack_reply(req, 1, NULL, NULL); - - req->rq_status = rc; - return rc; -} - -int ll_glimpse_ioctl(struct ll_sb_info *sbi, struct lov_stripe_md *lsm, - lstat_t *st) -{ - struct lustre_handle lockh = { 0 }; - struct ldlm_enqueue_info einfo = { 0 }; - struct obd_info oinfo = { { { 0 } } }; - struct ost_lvb lvb; - int rc; - - ENTRY; - - einfo.ei_type = LDLM_EXTENT; - einfo.ei_mode = LCK_PR; - einfo.ei_cb_bl = osc_extent_blocking_cb; - einfo.ei_cb_cp = ldlm_completion_ast; - einfo.ei_cb_gl = ll_glimpse_callback; - einfo.ei_cbdata = NULL; - - oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF; - oinfo.oi_lockh = &lockh; - oinfo.oi_md = lsm; - oinfo.oi_flags = LDLM_FL_HAS_INTENT; - - rc = obd_enqueue_rqset(sbi->ll_osc_exp, &oinfo, &einfo); - if (rc == -ENOENT) - RETURN(rc); - if (rc != 0) { - CERROR("obd_enqueue returned rc %d, " - "returning -EIO\n", rc); - RETURN(rc > 0 ? -EIO : rc); - } - - lov_stripe_lock(lsm); - memset(&lvb, 0, sizeof(lvb)); - obd_merge_lvb(sbi->ll_osc_exp, lsm, &lvb, 0); - st->st_size = lvb.lvb_size; - st->st_blocks = lvb.lvb_blocks; - st->st_mtime = lvb.lvb_mtime; - st->st_atime = lvb.lvb_atime; - st->st_ctime = lvb.lvb_ctime; - lov_stripe_unlock(lsm); - - RETURN(rc); -} - -/* NB: obd_merge_lvb will prefer locally cached writes if they extend the - * file (because it prefers KMS over RSS when larger) */ -int ll_glimpse_size(struct inode *inode, int ast_flags) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct lustre_handle lockh = { 0 }; - struct ldlm_enqueue_info einfo = { 0 }; - struct obd_info oinfo = { { { 0 } } }; - struct ost_lvb lvb; - int rc; - ENTRY; - - CDEBUG(D_DLMTRACE, "Glimpsing inode %lu\n", inode->i_ino); - - if (!lli->lli_smd) { - CDEBUG(D_DLMTRACE, "No objects for inode %lu\n", inode->i_ino); - RETURN(0); - } - - /* NOTE: this looks like DLM lock request, but it may not be one. Due - * to LDLM_FL_HAS_INTENT flag, this is glimpse request, that - * won't revoke any conflicting DLM locks held. Instead, - * ll_glimpse_callback() will be called on each client - * holding a DLM lock against this file, and resulting size - * will be returned for each stripe. DLM lock on [0, EOF] is - * acquired only if there were no conflicting locks. */ - einfo.ei_type = LDLM_EXTENT; - einfo.ei_mode = LCK_PR; - einfo.ei_cb_bl = osc_extent_blocking_cb; - einfo.ei_cb_cp = ldlm_completion_ast; - einfo.ei_cb_gl = ll_glimpse_callback; - einfo.ei_cbdata = inode; - - oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF; - oinfo.oi_lockh = &lockh; - oinfo.oi_md = lli->lli_smd; - oinfo.oi_flags = ast_flags | LDLM_FL_HAS_INTENT; - - rc = obd_enqueue_rqset(sbi->ll_osc_exp, &oinfo, &einfo); - if (rc == -ENOENT) - RETURN(rc); - if (rc != 0) { - CERROR("obd_enqueue returned rc %d, returning -EIO\n", rc); - RETURN(rc > 0 ? -EIO : rc); - } - - ll_inode_size_lock(inode, 1); - inode_init_lvb(inode, &lvb); - rc = obd_merge_lvb(sbi->ll_osc_exp, lli->lli_smd, &lvb, 0); - i_size_write(inode, lvb.lvb_size); - inode->i_blocks = lvb.lvb_blocks; - LTIME_S(inode->i_mtime) = lvb.lvb_mtime; - LTIME_S(inode->i_atime) = lvb.lvb_atime; - LTIME_S(inode->i_ctime) = lvb.lvb_ctime; - ll_inode_size_unlock(inode, 1); - - CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %llu\n", - i_size_read(inode), (long long)inode->i_blocks); - - RETURN(rc); -} - -int ll_extent_lock(struct ll_file_data *fd, struct inode *inode, - struct lov_stripe_md *lsm, int mode, - ldlm_policy_data_t *policy, struct lustre_handle *lockh, - int ast_flags) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ost_lvb lvb; - struct ldlm_enqueue_info einfo = { 0 }; - struct obd_info oinfo = { { { 0 } } }; - int rc; - ENTRY; - - LASSERT(!lustre_handle_is_used(lockh)); - LASSERT(lsm != NULL); - - /* don't drop the mmapped file to LRU */ - if (mapping_mapped(inode->i_mapping)) - ast_flags |= LDLM_FL_NO_LRU; - - /* XXX phil: can we do this? won't it screw the file size up? */ - if ((fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) || - (sbi->ll_flags & LL_SBI_NOLCK)) - RETURN(0); - - CDEBUG(D_DLMTRACE, "Locking inode %lu, start "LPU64" end "LPU64"\n", - inode->i_ino, policy->l_extent.start, policy->l_extent.end); - - einfo.ei_type = LDLM_EXTENT; - einfo.ei_mode = mode; - einfo.ei_cb_bl = osc_extent_blocking_cb; - einfo.ei_cb_cp = ldlm_completion_ast; - einfo.ei_cb_gl = ll_glimpse_callback; - einfo.ei_cbdata = inode; - - oinfo.oi_policy = *policy; - oinfo.oi_lockh = lockh; - oinfo.oi_md = lsm; - oinfo.oi_flags = ast_flags; - - rc = obd_enqueue(sbi->ll_osc_exp, &oinfo, &einfo, NULL); - *policy = oinfo.oi_policy; - if (rc > 0) - rc = -EIO; - - ll_inode_size_lock(inode, 1); - inode_init_lvb(inode, &lvb); - obd_merge_lvb(sbi->ll_osc_exp, lsm, &lvb, 1); - - if (policy->l_extent.start == 0 && - policy->l_extent.end == OBD_OBJECT_EOF) { - /* vmtruncate()->ll_truncate() first sets the i_size and then - * the kms under both a DLM lock and the - * ll_inode_size_lock(). If we don't get the - * ll_inode_size_lock() here we can match the DLM lock and - * reset i_size from the kms before the truncating path has - * updated the kms. generic_file_write can then trust the - * stale i_size when doing appending writes and effectively - * cancel the result of the truncate. Getting the - * ll_inode_size_lock() after the enqueue maintains the DLM - * -> ll_inode_size_lock() acquiring order. */ - i_size_write(inode, lvb.lvb_size); - CDEBUG(D_INODE, "inode=%lu, updating i_size %llu\n", - inode->i_ino, i_size_read(inode)); - } - - if (rc == 0) { - LTIME_S(inode->i_mtime) = lvb.lvb_mtime; - LTIME_S(inode->i_atime) = lvb.lvb_atime; - LTIME_S(inode->i_ctime) = lvb.lvb_ctime; - } - ll_inode_size_unlock(inode, 1); - - RETURN(rc); -} - -int ll_extent_unlock(struct ll_file_data *fd, struct inode *inode, - struct lov_stripe_md *lsm, int mode, - struct lustre_handle *lockh) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - int rc; - ENTRY; - - /* XXX phil: can we do this? won't it screw the file size up? */ - if ((fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) || - (sbi->ll_flags & LL_SBI_NOLCK)) - RETURN(0); - - rc = obd_cancel(sbi->ll_osc_exp, lsm, mode, lockh); - - RETURN(rc); -} - -static void ll_set_file_contended(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - - lli->lli_contention_time = cfs_time_current(); - set_bit(LLI_F_CONTENDED, &lli->lli_flags); -} - -void ll_clear_file_contended(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - - clear_bit(LLI_F_CONTENDED, &lli->lli_flags); -} - -static int ll_is_file_contended(struct file *file) -{ - struct inode *inode = file->f_dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); - ENTRY; - - if (!(sbi->ll_lco.lco_flags & OBD_CONNECT_SRVLOCK)) { - CDEBUG(D_INFO, "the server does not support SRVLOCK feature," - " osc connect flags = 0x"LPX64"\n", - sbi->ll_lco.lco_flags); - RETURN(0); - } - if (fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) - RETURN(1); - if (test_bit(LLI_F_CONTENDED, &lli->lli_flags)) { - cfs_time_t cur_time = cfs_time_current(); - cfs_time_t retry_time; - - retry_time = cfs_time_add( - lli->lli_contention_time, - cfs_time_seconds(sbi->ll_contention_time)); - if (cfs_time_after(cur_time, retry_time)) { - ll_clear_file_contended(inode); - RETURN(0); - } - RETURN(1); - } - RETURN(0); -} - -static int ll_file_get_tree_lock_iov(struct ll_lock_tree *tree, - struct file *file, const struct iovec *iov, - unsigned long nr_segs, - loff_t start, loff_t end, int rw) -{ - int append; - int tree_locked = 0; - int rc; - struct inode * inode = file->f_dentry->d_inode; - - append = (rw == WRITE) && (file->f_flags & O_APPEND); - - if (append || !ll_is_file_contended(file)) { - struct ll_lock_tree_node *node; - int ast_flags; - - ast_flags = append ? 0 : LDLM_FL_DENY_ON_CONTENTION; - if (file->f_flags & O_NONBLOCK) - ast_flags |= LDLM_FL_BLOCK_NOWAIT; - node = ll_node_from_inode(inode, start, end, - (rw == WRITE) ? LCK_PW : LCK_PR); - if (IS_ERR(node)) { - rc = PTR_ERR(node); - GOTO(out, rc); - } - tree->lt_fd = LUSTRE_FPRIVATE(file); - rc = ll_tree_lock_iov(tree, node, iov, nr_segs, ast_flags); - if (rc == 0) - tree_locked = 1; - else if (rc == -EUSERS) - ll_set_file_contended(inode); - else - GOTO(out, rc); - } - RETURN(tree_locked); -out: - return rc; -} - -/* XXX: exact copy from kernel code (__generic_file_aio_write_nolock from rhel4) - */ -static size_t ll_file_get_iov_count(const struct iovec *iov, - unsigned long *nr_segs) -{ - size_t count = 0; - unsigned long seg; - - for (seg = 0; seg < *nr_segs; seg++) { - const struct iovec *iv = &iov[seg]; - - /* - * If any segment has a negative length, or the cumulative - * length ever wraps negative then return -EINVAL. - */ - count += iv->iov_len; - if (unlikely((ssize_t)(count|iv->iov_len) < 0)) - return -EINVAL; - if (access_ok(VERIFY_WRITE, iv->iov_base, iv->iov_len)) - continue; - if (seg == 0) - return -EFAULT; - *nr_segs = seg; - count -= iv->iov_len; /* This segment is no good */ - break; - } - return count; -} - -static int iov_copy_update(unsigned long *nr_segs, const struct iovec **iov_out, - unsigned long *nrsegs_copy, - struct iovec *iov_copy, size_t *offset, - size_t size) -{ - int i; - const struct iovec *iov = *iov_out; - for (i = 0; i < *nr_segs; - i++) { - const struct iovec *iv = &iov[i]; - struct iovec *ivc = &iov_copy[i]; - *ivc = *iv; - if (i == 0) { - ivc->iov_len -= *offset; - ivc->iov_base += *offset; - } - if (ivc->iov_len >= size) { - ivc->iov_len = size; - if (i == 0) - *offset += size; - else - *offset = size; - break; - } - size -= ivc->iov_len; - } - *iov_out += i; - *nr_segs -= i; - *nrsegs_copy = i + 1; - - return 0; -} - -#ifdef HAVE_FILE_READV -static ssize_t ll_file_readv(struct file *file, const struct iovec *iov, - unsigned long nr_segs, loff_t *ppos) -{ -#else -static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov, - unsigned long nr_segs, loff_t pos) -{ - struct file *file = iocb->ki_filp; - loff_t *ppos = &iocb->ki_pos; -#endif - struct inode *inode = file->f_dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ll_lock_tree tree; - struct ost_lvb lvb; - struct ll_ra_read bead; - int ra = 0; - loff_t end; - ssize_t retval, chunk, sum = 0; - int tree_locked; - struct iovec *iov_copy = NULL; - unsigned long nrsegs_copy, nrsegs_orig = 0; - size_t count, iov_offset = 0; - __u64 kms; - ENTRY; - - count = ll_file_get_iov_count(iov, &nr_segs); - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n", - inode->i_ino, inode->i_generation, inode, count, *ppos); - /* "If nbyte is 0, read() will return 0 and have no other results." - * -- Single Unix Spec */ - if (count == 0) - RETURN(0); - - ll_stats_ops_tally(sbi, LPROC_LL_READ_BYTES, count); - - if (!lsm) { - /* Read on file with no objects should return zero-filled - * buffers up to file size (we can get non-zero sizes with - * mknod + truncate, then opening file for read. This is a - * common pattern in NFS case, it seems). Bug 6243 */ - int notzeroed; - /* Since there are no objects on OSTs, we have nothing to get - * lock on and so we are forced to access inode->i_size - * unguarded */ - - /* Read beyond end of file */ - if (*ppos >= i_size_read(inode)) - RETURN(0); - - if (count > i_size_read(inode) - *ppos) - count = i_size_read(inode) - *ppos; - /* Make sure to correctly adjust the file pos pointer for - * EFAULT case */ - for (nrsegs_copy = 0; nrsegs_copy < nr_segs; nrsegs_copy++) { - const struct iovec *iv = &iov[nrsegs_copy]; - - if (count < iv->iov_len) - chunk = count; - else - chunk = iv->iov_len; - notzeroed = clear_user(iv->iov_base, chunk); - sum += (chunk - notzeroed); - count -= (chunk - notzeroed); - if (notzeroed || !count) - break; - } - *ppos += sum; - if (!sum) - RETURN(-EFAULT); - RETURN(sum); - } -repeat: - if (sbi->ll_max_rw_chunk != 0) { - /* first, let's know the end of the current stripe */ - end = *ppos; - obd_extent_calc(sbi->ll_osc_exp, lsm, OBD_CALC_STRIPE_END, - (obd_off *)&end); - - /* correct, the end is beyond the request */ - if (end > *ppos + count - 1) - end = *ppos + count - 1; - - /* and chunk shouldn't be too large even if striping is wide */ - if (end - *ppos > sbi->ll_max_rw_chunk) - end = *ppos + sbi->ll_max_rw_chunk - 1; - - chunk = end - *ppos + 1; - if ((count == chunk) && (iov_offset == 0)) { - if (iov_copy) - OBD_FREE(iov_copy, sizeof(*iov) * nrsegs_orig); - - iov_copy = (struct iovec *)iov; - nrsegs_copy = nr_segs; - } else { - if (!iov_copy) { - nrsegs_orig = nr_segs; - OBD_ALLOC(iov_copy, sizeof(*iov) * nr_segs); - if (!iov_copy) - GOTO(out, retval = -ENOMEM); - } - - iov_copy_update(&nr_segs, &iov, &nrsegs_copy, iov_copy, - &iov_offset, chunk); - } - } else { - end = *ppos + count - 1; - iov_copy = (struct iovec *)iov; - nrsegs_copy = nr_segs; - } - - tree_locked = ll_file_get_tree_lock_iov(&tree, file, iov_copy, - nrsegs_copy, *ppos, end, READ); - if (tree_locked < 0) - GOTO(out, retval = tree_locked); - - ll_inode_size_lock(inode, 1); - /* - * Consistency guarantees: following possibilities exist for the - * relation between region being read and real file size at this - * moment: - * - * (A): the region is completely inside of the file; - * - * (B-x): x bytes of region are inside of the file, the rest is - * outside; - * - * (C): the region is completely outside of the file. - * - * This classification is stable under DLM lock acquired by - * ll_tree_lock() above, because to change class, other client has to - * take DLM lock conflicting with our lock. Also, any updates to - * ->i_size by other threads on this client are serialized by - * ll_inode_size_lock(). This guarantees that short reads are handled - * correctly in the face of concurrent writes and truncates. - */ - inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2sbi(inode)->ll_osc_exp, lsm, &lvb, 1); - kms = lvb.lvb_size; - if (*ppos + count - 1 > kms) { - /* A glimpse is necessary to determine whether we return a - * short read (B) or some zeroes at the end of the buffer (C) */ - ll_inode_size_unlock(inode, 1); - retval = ll_glimpse_size(inode, LDLM_FL_BLOCK_GRANTED); - if (retval) { - ll_tree_unlock(&tree); - goto out; - } - } else { - /* region is within kms and, hence, within real file size (A). - * We need to increase i_size to cover the read region so that - * generic_file_read() will do its job, but that doesn't mean - * the kms size is _correct_, it is only the _minimum_ size. - * If someone does a stat they will get the correct size which - * will always be >= the kms value here. b=11081 */ - if (i_size_read(inode) < kms) - i_size_write(inode, kms); - ll_inode_size_unlock(inode, 1); - } - - chunk = end - *ppos + 1; - CDEBUG(D_INODE,"Read ino %lu, "LPSZ" bytes, offset %lld, i_size %llu\n", - inode->i_ino, chunk, *ppos, i_size_read(inode)); - - /* turn off the kernel's read-ahead */ - if (tree_locked) { -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - file->f_ramax = 0; -#else - file->f_ra.ra_pages = 0; -#endif - /* initialize read-ahead window once per syscall */ - if (ra == 0) { - ra = 1; - bead.lrr_start = *ppos >> CFS_PAGE_SHIFT; - bead.lrr_count = (count + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT; - ll_ra_read_in(file, &bead); - } - - /* BUG: 5972 */ - file_accessed(file); -#ifdef HAVE_FILE_READV - retval = generic_file_readv(file, iov_copy, nrsegs_copy, ppos); -#else - retval = generic_file_aio_read(iocb, iov_copy, nrsegs_copy, - *ppos); -#endif - ll_tree_unlock(&tree); - } else { - retval = ll_file_lockless_io(file, iov_copy, nrsegs_copy, ppos, - READ, chunk); - } - ll_rw_stats_tally(sbi, current->pid, file, count, 0); - if (retval > 0) { - count -= retval; - sum += retval; - if (retval == chunk && count > 0) - goto repeat; - } - - out: - if (ra != 0) - ll_ra_read_ex(file, &bead); - retval = (sum > 0) ? sum : retval; - - if (iov_copy && iov_copy != iov) - OBD_FREE(iov_copy, sizeof(*iov) * nrsegs_orig); - - RETURN(retval); -} - -static ssize_t ll_file_read(struct file *file, char *buf, size_t count, - loff_t *ppos) -{ - struct iovec local_iov = { .iov_base = (void __user *)buf, - .iov_len = count }; -#ifdef HAVE_FILE_READV - return ll_file_readv(file, &local_iov, 1, ppos); -#else - struct kiocb kiocb; - ssize_t ret; - - init_sync_kiocb(&kiocb, file); - kiocb.ki_pos = *ppos; - kiocb.ki_left = count; - - ret = ll_file_aio_read(&kiocb, &local_iov, 1, kiocb.ki_pos); - *ppos = kiocb.ki_pos; - return ret; -#endif -} - -/* - * Write to a file (through the page cache). - */ -#ifdef HAVE_FILE_WRITEV -static ssize_t ll_file_writev(struct file *file, const struct iovec *iov, - unsigned long nr_segs, loff_t *ppos) -{ -#else /* AIO stuff */ -static ssize_t ll_file_aio_write(struct kiocb *iocb, const struct iovec *iov, - unsigned long nr_segs, loff_t pos) -{ - struct file *file = iocb->ki_filp; - loff_t *ppos = &iocb->ki_pos; -#endif - struct inode *inode = file->f_dentry->d_inode; - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd; - struct ll_lock_tree tree; - loff_t maxbytes = ll_file_maxbytes(inode); - loff_t lock_start, lock_end, end; - ssize_t retval, chunk, sum = 0; - int tree_locked; - struct iovec *iov_copy = NULL; - unsigned long nrsegs_copy, nrsegs_orig = 0; - size_t count, iov_offset = 0; - ENTRY; - - count = ll_file_get_iov_count(iov, &nr_segs); - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n", - inode->i_ino, inode->i_generation, inode, count, *ppos); - - SIGNAL_MASK_ASSERT(); /* XXX BUG 1511 */ - - /* POSIX, but surprised the VFS doesn't check this already */ - if (count == 0) - RETURN(0); - - /* If file was opened for LL_IOC_LOV_SETSTRIPE but the ioctl wasn't - * called on the file, don't fail the below assertion (bug 2388). */ - if (file->f_flags & O_LOV_DELAY_CREATE && - ll_i2info(inode)->lli_smd == NULL) - RETURN(-EBADF); - - LASSERT(ll_i2info(inode)->lli_smd != NULL); - - down(&ll_i2info(inode)->lli_write_sem); - -repeat: - chunk = 0; /* just to fix gcc's warning */ - end = *ppos + count - 1; - - if (file->f_flags & O_APPEND) { - lock_start = 0; - lock_end = OBD_OBJECT_EOF; - iov_copy = (struct iovec *)iov; - nrsegs_copy = nr_segs; - } else if (sbi->ll_max_rw_chunk != 0) { - /* first, let's know the end of the current stripe */ - end = *ppos; - obd_extent_calc(sbi->ll_osc_exp, lsm, OBD_CALC_STRIPE_END, - (obd_off *)&end); - - /* correct, the end is beyond the request */ - if (end > *ppos + count - 1) - end = *ppos + count - 1; - - /* and chunk shouldn't be too large even if striping is wide */ - if (end - *ppos > sbi->ll_max_rw_chunk) - end = *ppos + sbi->ll_max_rw_chunk - 1; - lock_start = *ppos; - lock_end = end; - chunk = end - *ppos + 1; - if ((count == chunk) && (iov_offset == 0)) { - if (iov_copy) - OBD_FREE(iov_copy, sizeof(*iov) * nrsegs_orig); - - iov_copy = (struct iovec *)iov; - nrsegs_copy = nr_segs; - } else { - if (!iov_copy) { - nrsegs_orig = nr_segs; - OBD_ALLOC(iov_copy, sizeof(*iov) * nr_segs); - if (!iov_copy) - GOTO(out, retval = -ENOMEM); - } - iov_copy_update(&nr_segs, &iov, &nrsegs_copy, iov_copy, - &iov_offset, chunk); - } - } else { - lock_start = *ppos; - lock_end = end; - iov_copy = (struct iovec *)iov; - nrsegs_copy = nr_segs; - } - - tree_locked = ll_file_get_tree_lock_iov(&tree, file, iov_copy, - nrsegs_copy, lock_start, - lock_end, WRITE); - if (tree_locked < 0) - GOTO(out, retval = tree_locked); - - /* This is ok, g_f_w will overwrite this under i_sem if it races - * with a local truncate, it just makes our maxbyte checking easier. - * The i_size value gets updated in ll_extent_lock() as a consequence - * of the [0,EOF] extent lock we requested above. */ - if (file->f_flags & O_APPEND) { - *ppos = i_size_read(inode); - end = *ppos + count - 1; - } - - if (*ppos >= maxbytes) { - send_sig(SIGXFSZ, current, 0); - GOTO(out_unlock, retval = -EFBIG); - } - if (end > maxbytes - 1) - end = maxbytes - 1; - - /* generic_file_write handles O_APPEND after getting i_mutex */ - chunk = end - *ppos + 1; - CDEBUG(D_INFO, "Writing inode %lu, "LPSZ" bytes, offset %Lu\n", - inode->i_ino, chunk, *ppos); - if (tree_locked) -#ifdef HAVE_FILE_WRITEV - retval = generic_file_writev(file, iov_copy, nrsegs_copy, ppos); -#else - retval = generic_file_aio_write(iocb, iov_copy, nrsegs_copy, - *ppos); -#endif - else - retval = ll_file_lockless_io(file, iov_copy, nrsegs_copy, - ppos, WRITE, chunk); - ll_rw_stats_tally(ll_i2sbi(inode), current->pid, file, chunk, 1); - -out_unlock: - if (tree_locked) - ll_tree_unlock(&tree); - -out: - if (retval > 0) { - count -= retval; - sum += retval; - if (retval == chunk && count > 0) - goto repeat; - } - - up(&ll_i2info(inode)->lli_write_sem); - - if (iov_copy && iov_copy != iov) - OBD_FREE(iov_copy, sizeof(*iov) * nrsegs_orig); - - retval = (sum > 0) ? sum : retval; - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_WRITE_BYTES, - retval > 0 ? retval : 0); - RETURN(retval); -} - -static ssize_t ll_file_write(struct file *file, const char *buf, size_t count, - loff_t *ppos) -{ - struct iovec local_iov = { .iov_base = (void __user *)buf, - .iov_len = count }; - -#ifdef HAVE_FILE_WRITEV - return ll_file_writev(file, &local_iov, 1, ppos); -#else - struct kiocb kiocb; - ssize_t ret; - - init_sync_kiocb(&kiocb, file); - kiocb.ki_pos = *ppos; - kiocb.ki_left = count; - - ret = ll_file_aio_write(&kiocb, &local_iov, 1, kiocb.ki_pos); - *ppos = kiocb.ki_pos; - - return ret; -#endif -} - -/* - * Send file content (through pagecache) somewhere with helper - */ -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -static ssize_t ll_file_sendfile(struct file *in_file, loff_t *ppos,size_t count, - read_actor_t actor, void *target) -{ - struct inode *inode = in_file->f_dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct ll_lock_tree tree; - struct ll_lock_tree_node *node; - struct ost_lvb lvb; - struct ll_ra_read bead; - int rc; - ssize_t retval; - __u64 kms; - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n", - inode->i_ino, inode->i_generation, inode, count, *ppos); - - /* "If nbyte is 0, read() will return 0 and have no other results." - * -- Single Unix Spec */ - if (count == 0) - RETURN(0); - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_READ_BYTES, count); - /* turn off the kernel's read-ahead */ - in_file->f_ra.ra_pages = 0; - - /* File with no objects, nothing to lock */ - if (!lsm) - RETURN(generic_file_sendfile(in_file, ppos, count, actor, target)); - - node = ll_node_from_inode(inode, *ppos, *ppos + count - 1, LCK_PR); - if (IS_ERR(node)) - RETURN(PTR_ERR(node)); - - tree.lt_fd = LUSTRE_FPRIVATE(in_file); - rc = ll_tree_lock(&tree, node, NULL, count, - in_file->f_flags & O_NONBLOCK?LDLM_FL_BLOCK_NOWAIT:0); - if (rc != 0) - RETURN(rc); - - ll_clear_file_contended(inode); - ll_inode_size_lock(inode, 1); - /* - * Consistency guarantees: following possibilities exist for the - * relation between region being read and real file size at this - * moment: - * - * (A): the region is completely inside of the file; - * - * (B-x): x bytes of region are inside of the file, the rest is - * outside; - * - * (C): the region is completely outside of the file. - * - * This classification is stable under DLM lock acquired by - * ll_tree_lock() above, because to change class, other client has to - * take DLM lock conflicting with our lock. Also, any updates to - * ->i_size by other threads on this client are serialized by - * ll_inode_size_lock(). This guarantees that short reads are handled - * correctly in the face of concurrent writes and truncates. - */ - inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2sbi(inode)->ll_osc_exp, lsm, &lvb, 1); - kms = lvb.lvb_size; - if (*ppos + count - 1 > kms) { - /* A glimpse is necessary to determine whether we return a - * short read (B) or some zeroes at the end of the buffer (C) */ - ll_inode_size_unlock(inode, 1); - retval = ll_glimpse_size(inode, LDLM_FL_BLOCK_GRANTED); - if (retval) - goto out; - } else { - /* region is within kms and, hence, within real file size (A) */ - i_size_write(inode, kms); - ll_inode_size_unlock(inode, 1); - } - - CDEBUG(D_INFO, "Send ino %lu, "LPSZ" bytes, offset %lld, i_size %llu\n", - inode->i_ino, count, *ppos, i_size_read(inode)); - - bead.lrr_start = *ppos >> CFS_PAGE_SHIFT; - bead.lrr_count = (count + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT; - ll_ra_read_in(in_file, &bead); - /* BUG: 5972 */ - file_accessed(in_file); - retval = generic_file_sendfile(in_file, ppos, count, actor, target); - ll_ra_read_ex(in_file, &bead); - - out: - ll_tree_unlock(&tree); - RETURN(retval); -} -#endif - -static int ll_lov_recreate_obj(struct inode *inode, struct file *file, - unsigned long arg) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct obd_export *exp = ll_i2obdexp(inode); - struct ll_recreate_obj ucreatp; - struct obd_trans_info oti = { 0 }; - struct obdo *oa = NULL; - int lsm_size; - int rc = 0; - struct lov_stripe_md *lsm, *lsm2; - ENTRY; - - if (!capable (CAP_SYS_ADMIN)) - RETURN(-EPERM); - - rc = copy_from_user(&ucreatp, (struct ll_recreate_obj *)arg, - sizeof(struct ll_recreate_obj)); - if (rc) { - RETURN(-EFAULT); - } - OBDO_ALLOC(oa); - if (oa == NULL) - RETURN(-ENOMEM); - - down(&lli->lli_size_sem); - lsm = lli->lli_smd; - if (lsm == NULL) - GOTO(out, rc = -ENOENT); - lsm_size = sizeof(*lsm) + (sizeof(struct lov_oinfo) * - (lsm->lsm_stripe_count)); - - OBD_ALLOC(lsm2, lsm_size); - if (lsm2 == NULL) - GOTO(out, rc = -ENOMEM); - - oa->o_id = ucreatp.lrc_id; - oa->o_nlink = ucreatp.lrc_ost_idx; - oa->o_flags |= OBD_FL_RECREATE_OBJS; - oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS; - obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME | - OBD_MD_FLMTIME | OBD_MD_FLCTIME); - - memcpy(lsm2, lsm, lsm_size); - rc = obd_create(exp, oa, &lsm2, &oti); - - OBD_FREE(lsm2, lsm_size); - GOTO(out, rc); -out: - up(&lli->lli_size_sem); - OBDO_FREE(oa); - return rc; -} - -int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file, - int flags, struct lov_user_md *lum, - int lum_size) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm; - struct lookup_intent oit = {.it_op = IT_OPEN, .it_flags = flags}; - int rc = 0; - ENTRY; - - down(&lli->lli_size_sem); - lsm = lli->lli_smd; - if (lsm) { - up(&lli->lli_size_sem); - CDEBUG(D_IOCTL, "stripe already exists for ino %lu\n", - inode->i_ino); - RETURN(-EEXIST); - } - - rc = ll_intent_file_open(file, lum, lum_size, &oit); - if (rc) - GOTO(out, rc); - if (it_disposition(&oit, DISP_LOOKUP_NEG)) - GOTO(out_req_free, rc = -ENOENT); - rc = oit.d.lustre.it_status; - if (rc < 0) - GOTO(out_req_free, rc); - - ll_release_openhandle(file->f_dentry, &oit); - - out: - up(&lli->lli_size_sem); - ll_intent_release(&oit); - RETURN(rc); -out_req_free: - ptlrpc_req_finished((struct ptlrpc_request *) oit.d.lustre.it_data); - goto out; -} - -int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename, - struct lov_mds_md **lmmp, int *lmm_size, - struct ptlrpc_request **request) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ll_fid fid; - struct mds_body *body; - struct lov_mds_md *lmm = NULL; - struct ptlrpc_request *req = NULL; - int rc, lmmsize; - - ll_inode2fid(&fid, inode); - - rc = ll_get_max_mdsize(sbi, &lmmsize); - if (rc) - RETURN(rc); - - rc = mdc_getattr_name(sbi->ll_mdc_exp, &fid, - filename, strlen(filename) + 1, - OBD_MD_FLEASIZE | OBD_MD_FLDIREA, - lmmsize, &req); - if (rc < 0) { - CDEBUG(D_INFO, "mdc_getattr_name failed " - "on %s: rc %d\n", filename, rc); - GOTO(out, rc); - } - - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); /* checked by mdc_getattr_name */ - /* swabbed by mdc_getattr_name */ - LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF)); - - lmmsize = body->eadatasize; - - if (!(body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) || - lmmsize == 0) { - GOTO(out, rc = -ENODATA); - } - - lmm = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, - lmmsize); - LASSERT(lmm != NULL); - LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF + 1)); - - /* - * This is coming from the MDS, so is probably in - * little endian. We convert it to host endian before - * passing it to userspace. - */ - if (lmm->lmm_magic == __swab32(LOV_MAGIC)) { - lustre_swab_lov_user_md((struct lov_user_md *)lmm); - lustre_swab_lov_user_md_objects((struct lov_user_md *)lmm); - } else if (lmm->lmm_magic == __swab32(LOV_MAGIC_JOIN)) { - lustre_swab_lov_user_md_join((struct lov_user_md_join *)lmm); - } - - if (lmm->lmm_magic == LOV_MAGIC_JOIN) { - struct lov_stripe_md *lsm; - struct lov_user_md_join *lmj; - int lmj_size, i, aindex = 0; - - rc = obd_unpackmd(sbi->ll_osc_exp, &lsm, lmm, lmmsize); - if (rc < 0) - GOTO(out, rc = -ENOMEM); - rc = obd_checkmd(sbi->ll_osc_exp, sbi->ll_mdc_exp, lsm); - if (rc) - GOTO(out_free_memmd, rc); - - lmj_size = sizeof(struct lov_user_md_join) + - lsm->lsm_stripe_count * - sizeof(struct lov_user_ost_data_join); - OBD_ALLOC(lmj, lmj_size); - if (!lmj) - GOTO(out_free_memmd, rc = -ENOMEM); - - memcpy(lmj, lmm, sizeof(struct lov_user_md_join)); - for (i = 0; i < lsm->lsm_stripe_count; i++) { - struct lov_extent *lex = - &lsm->lsm_array->lai_ext_array[aindex]; - - if (lex->le_loi_idx + lex->le_stripe_count <= i) - aindex ++; - CDEBUG(D_INFO, "aindex %d i %d l_extent_start " - LPU64" len %d\n", aindex, i, - lex->le_start, (int)lex->le_len); - lmj->lmm_objects[i].l_extent_start = - lex->le_start; - - if ((int)lex->le_len == -1) - lmj->lmm_objects[i].l_extent_end = -1; - else - lmj->lmm_objects[i].l_extent_end = - lex->le_start + lex->le_len; - lmj->lmm_objects[i].l_object_id = - lsm->lsm_oinfo[i]->loi_id; - lmj->lmm_objects[i].l_object_gr = - lsm->lsm_oinfo[i]->loi_gr; - lmj->lmm_objects[i].l_ost_gen = - lsm->lsm_oinfo[i]->loi_ost_gen; - lmj->lmm_objects[i].l_ost_idx = - lsm->lsm_oinfo[i]->loi_ost_idx; - } - lmm = (struct lov_mds_md *)lmj; - lmmsize = lmj_size; -out_free_memmd: - obd_free_memmd(sbi->ll_osc_exp, &lsm); - } -out: - *lmmp = lmm; - *lmm_size = lmmsize; - *request = req; - return rc; -} -static int ll_lov_setea(struct inode *inode, struct file *file, - unsigned long arg) -{ - int flags = MDS_OPEN_HAS_OBJS | FMODE_WRITE; - struct lov_user_md *lump; - int lum_size = sizeof(struct lov_user_md) + - sizeof(struct lov_user_ost_data); - int rc; - ENTRY; - - if (!capable (CAP_SYS_ADMIN)) - RETURN(-EPERM); - - OBD_ALLOC(lump, lum_size); - if (lump == NULL) { - RETURN(-ENOMEM); - } - rc = copy_from_user(lump, (struct lov_user_md *)arg, lum_size); - if (rc) { - OBD_FREE(lump, lum_size); - RETURN(-EFAULT); - } - - rc = ll_lov_setstripe_ea_info(inode, file, flags, lump, lum_size); - - OBD_FREE(lump, lum_size); - RETURN(rc); -} - -static int ll_lov_setstripe(struct inode *inode, struct file *file, - unsigned long arg) -{ - struct lov_user_md lum, *lump = (struct lov_user_md *)arg; - int rc; - int flags = FMODE_WRITE; - ENTRY; - - /* Bug 1152: copy properly when this is no longer true */ - LASSERT(sizeof(lum) == sizeof(*lump)); - LASSERT(sizeof(lum.lmm_objects[0]) == sizeof(lump->lmm_objects[0])); - rc = copy_from_user(&lum, lump, sizeof(lum)); - if (rc) - RETURN(-EFAULT); - - rc = ll_lov_setstripe_ea_info(inode, file, flags, &lum, sizeof(lum)); - if (rc == 0) { - put_user(0, &lump->lmm_stripe_count); - rc = obd_iocontrol(LL_IOC_LOV_GETSTRIPE, ll_i2obdexp(inode), - 0, ll_i2info(inode)->lli_smd, lump); - } - RETURN(rc); -} - -static int ll_lov_getstripe(struct inode *inode, unsigned long arg) -{ - struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd; - - if (!lsm) - RETURN(-ENODATA); - - return obd_iocontrol(LL_IOC_LOV_GETSTRIPE, ll_i2obdexp(inode), 0, lsm, - (void *)arg); -} - -static int ll_get_grouplock(struct inode *inode, struct file *file, - unsigned long arg) -{ - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); - ldlm_policy_data_t policy = { .l_extent = { .start = 0, - .end = OBD_OBJECT_EOF}}; - struct lustre_handle lockh = { 0 }; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - int flags = 0, rc; - ENTRY; - - if (fd->fd_flags & LL_FILE_GROUP_LOCKED) { - RETURN(-EINVAL); - } - - policy.l_extent.gid = arg; - if (file->f_flags & O_NONBLOCK) - flags = LDLM_FL_BLOCK_NOWAIT; - - rc = ll_extent_lock(fd, inode, lsm, LCK_GROUP, &policy, &lockh, flags); - if (rc) - RETURN(rc); - - fd->fd_flags |= LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK; - fd->fd_gid = arg; - memcpy(&fd->fd_cwlockh, &lockh, sizeof(lockh)); - - RETURN(0); -} - -static int ll_put_grouplock(struct inode *inode, struct file *file, - unsigned long arg) -{ - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - int rc; - ENTRY; - - if (!(fd->fd_flags & LL_FILE_GROUP_LOCKED)) { - /* Ugh, it's already unlocked. */ - RETURN(-EINVAL); - } - - if (fd->fd_gid != arg) /* Ugh? Unlocking with different gid? */ - RETURN(-EINVAL); - - fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK); - - rc = ll_extent_unlock(fd, inode, lsm, LCK_GROUP, &fd->fd_cwlockh); - if (rc) - RETURN(rc); - - fd->fd_gid = 0; - memset(&fd->fd_cwlockh, 0, sizeof(fd->fd_cwlockh)); - - RETURN(0); -} - -static int join_sanity_check(struct inode *head, struct inode *tail) -{ - ENTRY; - if ((ll_i2sbi(head)->ll_flags & LL_SBI_JOIN) == 0) { - CERROR("server do not support join \n"); - RETURN(-EINVAL); - } - if (!S_ISREG(tail->i_mode) || !S_ISREG(head->i_mode)) { - CERROR("tail ino %lu and ino head %lu must be regular\n", - head->i_ino, tail->i_ino); - RETURN(-EINVAL); - } - if (head->i_ino == tail->i_ino) { - CERROR("file %lu can not be joined to itself \n", head->i_ino); - RETURN(-EINVAL); - } - if (i_size_read(head) % JOIN_FILE_ALIGN) { - CERROR("hsize %llu must be times of 64K\n", i_size_read(head)); - RETURN(-EINVAL); - } - RETURN(0); -} - -static int join_file(struct inode *head_inode, struct file *head_filp, - struct file *tail_filp) -{ - struct dentry *tail_dentry = tail_filp->f_dentry; - struct lookup_intent oit = {.it_op = IT_OPEN, - .it_flags = head_filp->f_flags|O_JOIN_FILE}; - struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_PW, - ll_mdc_blocking_ast, ldlm_completion_ast, NULL, NULL }; - - struct lustre_handle lockh; - struct mdc_op_data *op_data; - int rc; - loff_t data; - ENTRY; - - tail_dentry = tail_filp->f_dentry; - - OBD_ALLOC_PTR(op_data); - if (op_data == NULL) { - RETURN(-ENOMEM); - } - - data = i_size_read(head_inode); - ll_prepare_mdc_op_data(op_data, head_inode, - tail_dentry->d_parent->d_inode, - tail_dentry->d_name.name, - tail_dentry->d_name.len, 0, &data); - rc = mdc_enqueue(ll_i2mdcexp(head_inode), &einfo, &oit, - op_data, &lockh, NULL, 0, 0); - - if (rc < 0) - GOTO(out, rc); - - rc = oit.d.lustre.it_status; - - if (rc < 0 || it_open_error(DISP_OPEN_OPEN, &oit)) { - rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, &oit); - ptlrpc_req_finished((struct ptlrpc_request *) - oit.d.lustre.it_data); - GOTO(out, rc); - } - - if (oit.d.lustre.it_lock_mode) { /* If we got lock - release it right - * away */ - ldlm_lock_decref(&lockh, oit.d.lustre.it_lock_mode); - oit.d.lustre.it_lock_mode = 0; - } - ll_release_openhandle(head_filp->f_dentry, &oit); -out: - if (op_data) - OBD_FREE_PTR(op_data); - ll_intent_release(&oit); - RETURN(rc); -} - -static int ll_file_join(struct inode *head, struct file *filp, - char *filename_tail) -{ - struct inode *tail = NULL, *first = NULL, *second = NULL; - struct dentry *tail_dentry; - struct file *tail_filp, *first_filp, *second_filp; - struct ll_lock_tree first_tree, second_tree; - struct ll_lock_tree_node *first_node, *second_node; - struct ll_inode_info *hlli = ll_i2info(head), *tlli; - int rc = 0, cleanup_phase = 0; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:head=%lu/%u(%p) tail %s\n", - head->i_ino, head->i_generation, head, filename_tail); - - tail_filp = filp_open(filename_tail, O_WRONLY, 0644); - if (IS_ERR(tail_filp)) { - CERROR("Can not open tail file %s", filename_tail); - rc = PTR_ERR(tail_filp); - GOTO(cleanup, rc); - } - tail = igrab(tail_filp->f_dentry->d_inode); - - tlli = ll_i2info(tail); - tail_dentry = tail_filp->f_dentry; - LASSERT(tail_dentry); - cleanup_phase = 1; - - /*reorder the inode for lock sequence*/ - first = head->i_ino > tail->i_ino ? head : tail; - second = head->i_ino > tail->i_ino ? tail : head; - first_filp = head->i_ino > tail->i_ino ? filp : tail_filp; - second_filp = head->i_ino > tail->i_ino ? tail_filp : filp; - - CDEBUG(D_INFO, "reorder object from %lu:%lu to %lu:%lu \n", - head->i_ino, tail->i_ino, first->i_ino, second->i_ino); - first_node = ll_node_from_inode(first, 0, OBD_OBJECT_EOF, LCK_EX); - if (IS_ERR(first_node)){ - rc = PTR_ERR(first_node); - GOTO(cleanup, rc); - } - first_tree.lt_fd = first_filp->private_data; - rc = ll_tree_lock(&first_tree, first_node, NULL, 0, 0); - if (rc != 0) - GOTO(cleanup, rc); - cleanup_phase = 2; - - second_node = ll_node_from_inode(second, 0, OBD_OBJECT_EOF, LCK_EX); - if (IS_ERR(second_node)){ - rc = PTR_ERR(second_node); - GOTO(cleanup, rc); - } - second_tree.lt_fd = second_filp->private_data; - rc = ll_tree_lock(&second_tree, second_node, NULL, 0, 0); - if (rc != 0) - GOTO(cleanup, rc); - cleanup_phase = 3; - - rc = join_sanity_check(head, tail); - if (rc) - GOTO(cleanup, rc); - - rc = join_file(head, filp, tail_filp); - if (rc) - GOTO(cleanup, rc); -cleanup: - switch (cleanup_phase) { - case 3: - ll_tree_unlock(&second_tree); - obd_cancel_unused(ll_i2obdexp(second), - ll_i2info(second)->lli_smd, 0, NULL); - case 2: - ll_tree_unlock(&first_tree); - obd_cancel_unused(ll_i2obdexp(first), - ll_i2info(first)->lli_smd, 0, NULL); - case 1: - filp_close(tail_filp, 0); - if (tail) - iput(tail); - if (head && rc == 0) { - obd_free_memmd(ll_i2sbi(head)->ll_osc_exp, - &hlli->lli_smd); - hlli->lli_smd = NULL; - } - case 0: - break; - default: - CERROR("invalid cleanup_phase %d\n", cleanup_phase); - LBUG(); - } - RETURN(rc); -} - -int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it) -{ - struct inode *inode = dentry->d_inode; - struct obd_client_handle *och; - int rc; - ENTRY; - - LASSERT(inode); - - /* Root ? Do nothing. */ - if (dentry->d_inode->i_sb->s_root == dentry) - RETURN(0); - - /* No open handle to close? Move away */ - if (!it_disposition(it, DISP_OPEN_OPEN)) - RETURN(0); - - LASSERT(it_open_error(DISP_OPEN_OPEN, it) == 0); - - OBD_ALLOC(och, sizeof(*och)); - if (!och) - GOTO(out, rc = -ENOMEM); - - ll_och_fill(ll_i2info(inode), it, och); - - rc = ll_close_inode_openhandle(inode, och); - - OBD_FREE(och, sizeof(*och)); - out: - /* this one is in place of ll_file_open */ - ptlrpc_req_finished(it->d.lustre.it_data); - it_clear_disposition(it, DISP_ENQ_OPEN_REF); - RETURN(rc); -} - -int ll_file_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); - int flags; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),cmd=%x\n", inode->i_ino, - inode->i_generation, inode, cmd); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_IOCTL, 1); - - /* asm-ppc{,64} declares TCGETS, et. al. as type 't' not 'T' */ - if (_IOC_TYPE(cmd) == 'T' || _IOC_TYPE(cmd) == 't') /* tty ioctls */ - RETURN(-ENOTTY); - - switch(cmd) { - case LL_IOC_GETFLAGS: - /* Get the current value of the file flags */ - return put_user(fd->fd_flags, (int *)arg); - case LL_IOC_SETFLAGS: - case LL_IOC_CLRFLAGS: - /* Set or clear specific file flags */ - /* XXX This probably needs checks to ensure the flags are - * not abused, and to handle any flag side effects. - */ - if (get_user(flags, (int *) arg)) - RETURN(-EFAULT); - - if (cmd == LL_IOC_SETFLAGS) { - if ((flags & LL_FILE_IGNORE_LOCK) && - !(file->f_flags & O_DIRECT)) { - CERROR("%s: unable to disable locking on " - "non-O_DIRECT file\n", current->comm); - RETURN(-EINVAL); - } - - fd->fd_flags |= flags; - } else { - fd->fd_flags &= ~flags; - } - RETURN(0); - case LL_IOC_LOV_SETSTRIPE: - RETURN(ll_lov_setstripe(inode, file, arg)); - case LL_IOC_LOV_SETEA: - RETURN(ll_lov_setea(inode, file, arg)); - case LL_IOC_LOV_GETSTRIPE: - RETURN(ll_lov_getstripe(inode, arg)); - case LL_IOC_RECREATE_OBJ: - RETURN(ll_lov_recreate_obj(inode, file, arg)); - case EXT3_IOC_GETFLAGS: - case EXT3_IOC_SETFLAGS: - RETURN(ll_iocontrol(inode, file, cmd, arg)); - case EXT3_IOC_GETVERSION_OLD: - case EXT3_IOC_GETVERSION: - RETURN(put_user(inode->i_generation, (int *)arg)); - case LL_IOC_JOIN: { - char *ftail; - int rc; - - ftail = getname((const char *)arg); - if (IS_ERR(ftail)) - RETURN(PTR_ERR(ftail)); - rc = ll_file_join(inode, file, ftail); - putname(ftail); - RETURN(rc); - } - case LL_IOC_GROUP_LOCK: - RETURN(ll_get_grouplock(inode, file, arg)); - case LL_IOC_GROUP_UNLOCK: - RETURN(ll_put_grouplock(inode, file, arg)); - case IOC_OBD_STATFS: - RETURN(ll_obd_statfs(inode, (void *)arg)); - case OBD_IOC_GETNAME_OLD: - case OBD_IOC_GETNAME: { - struct obd_device *obd = - class_exp2obd(ll_i2sbi(inode)->ll_osc_exp); - if (!obd) - RETURN(-EFAULT); - if (copy_to_user((void *)arg, obd->obd_name, - strlen(obd->obd_name) + 1)) - RETURN (-EFAULT); - RETURN(0); - } - - /* We need to special case any other ioctls we want to handle, - * to send them to the MDS/OST as appropriate and to properly - * network encode the arg field. - case EXT3_IOC_SETVERSION_OLD: - case EXT3_IOC_SETVERSION: - */ - default: { - int err; - - if (LLIOC_STOP == - ll_iocontrol_call(inode, file, cmd, arg, &err)) - RETURN(err); - - RETURN(obd_iocontrol(cmd, ll_i2obdexp(inode), 0, NULL, - (void *)arg)); - } - } -} - -loff_t ll_file_seek(struct file *file, loff_t offset, int origin) -{ - struct inode *inode = file->f_dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - loff_t retval; - ENTRY; - retval = offset + ((origin == 2) ? i_size_read(inode) : - (origin == 1) ? file->f_pos : 0); - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), to=%Lu=%#Lx(%s)\n", - inode->i_ino, inode->i_generation, inode, retval, retval, - origin == 2 ? "SEEK_END": origin == 1 ? "SEEK_CUR" : "SEEK_SET"); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LLSEEK, 1); - - if (origin == 2) { /* SEEK_END */ - int nonblock = 0, rc; - - if (file->f_flags & O_NONBLOCK) - nonblock = LDLM_FL_BLOCK_NOWAIT; - - if (lsm != NULL) { - rc = ll_glimpse_size(inode, nonblock); - if (rc != 0) - RETURN(rc); - } - - ll_inode_size_lock(inode, 0); - offset += i_size_read(inode); - ll_inode_size_unlock(inode, 0); - } else if (origin == 1) { /* SEEK_CUR */ - offset += file->f_pos; - } - - retval = -EINVAL; - if (offset >= 0 && offset <= ll_file_maxbytes(inode)) { - if (offset != file->f_pos) { - file->f_pos = offset; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - file->f_reada = 0; - file->f_version = ++event; -#else - file->f_version = 0; -#endif - } - retval = offset; - } - - RETURN(retval); -} - -int ll_fsync(struct file *file, struct dentry *dentry, int data) -{ - struct inode *inode = dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct ll_fid fid; - struct ptlrpc_request *req; - int rc, err; - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino, - inode->i_generation, inode); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FSYNC, 1); - - /* fsync's caller has already called _fdata{sync,write}, we want - * that IO to finish before calling the osc and mdc sync methods */ - rc = filemap_fdatawait(inode->i_mapping); - - /* catch async errors that were recorded back when async writeback - * failed for pages in this mapping. */ - err = lli->lli_async_rc; - lli->lli_async_rc = 0; - if (rc == 0) - rc = err; - if (lsm) { - err = lov_test_and_clear_async_rc(lsm); - if (rc == 0) - rc = err; - } - - ll_inode2fid(&fid, inode); - err = mdc_sync(ll_i2sbi(inode)->ll_mdc_exp, &fid, &req); - if (!rc) - rc = err; - if (!err) - ptlrpc_req_finished(req); - - if (data && lsm) { - struct obdo *oa; - - OBDO_ALLOC(oa); - if (!oa) - RETURN(rc ? rc : -ENOMEM); - - oa->o_id = lsm->lsm_object_id; - oa->o_valid = OBD_MD_FLID; - obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME | - OBD_MD_FLMTIME | OBD_MD_FLCTIME); - - err = obd_sync(ll_i2sbi(inode)->ll_osc_exp, oa, lsm, - 0, OBD_OBJECT_EOF); - if (!rc) - rc = err; - OBDO_FREE(oa); - } - - RETURN(rc); -} - -int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) -{ - struct inode *inode = file->f_dentry->d_inode; - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ldlm_res_id res_id = - { .name = {inode->i_ino, inode->i_generation, LDLM_FLOCK} }; - struct ldlm_enqueue_info einfo = { LDLM_FLOCK, 0, NULL, - ldlm_flock_completion_ast, NULL, file_lock }; - struct lustre_handle lockh = {0}; - ldlm_policy_data_t flock; - int flags = 0; - int rc; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu file_lock=%p\n", - inode->i_ino, file_lock); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FLOCK, 1); - - if (file_lock->fl_flags & FL_FLOCK) { - LASSERT((cmd == F_SETLKW) || (cmd == F_SETLK)); - /* set missing params for flock() calls */ - file_lock->fl_end = OFFSET_MAX; - file_lock->fl_pid = current->tgid; - } - flock.l_flock.pid = file_lock->fl_pid; - flock.l_flock.start = file_lock->fl_start; - flock.l_flock.end = file_lock->fl_end; - - switch (file_lock->fl_type) { - case F_RDLCK: - einfo.ei_mode = LCK_PR; - break; - case F_UNLCK: - /* An unlock request may or may not have any relation to - * existing locks so we may not be able to pass a lock handle - * via a normal ldlm_lock_cancel() request. The request may even - * unlock a byte range in the middle of an existing lock. In - * order to process an unlock request we need all of the same - * information that is given with a normal read or write record - * lock request. To avoid creating another ldlm unlock (cancel) - * message we'll treat a LCK_NL flock request as an unlock. */ - einfo.ei_mode = LCK_NL; - break; - case F_WRLCK: - einfo.ei_mode = LCK_PW; - break; - default: - CERROR("unknown fcntl lock type: %d\n", file_lock->fl_type); - LBUG(); - } - - switch (cmd) { - case F_SETLKW: -#ifdef F_SETLKW64 - case F_SETLKW64: -#endif - flags = 0; - break; - case F_SETLK: -#ifdef F_SETLK64 - case F_SETLK64: -#endif - flags = LDLM_FL_BLOCK_NOWAIT; - break; - case F_GETLK: -#ifdef F_GETLK64 - case F_GETLK64: -#endif - flags = LDLM_FL_TEST_LOCK; - /* Save the old mode so that if the mode in the lock changes we - * can decrement the appropriate reader or writer refcount. */ - file_lock->fl_type = einfo.ei_mode; - break; - default: - CERROR("unknown fcntl lock command: %d\n", cmd); - LBUG(); - } - - CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#x, mode=%u, " - "start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid, - flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end); - - rc = ldlm_cli_enqueue(sbi->ll_mdc_exp, NULL, &einfo, res_id, - &flock, &flags, NULL, 0, NULL, &lockh, 0); - if ((file_lock->fl_flags & FL_FLOCK) && (rc == 0)) - ll_flock_lock_file_wait(file, file_lock, (cmd == F_SETLKW)); -#ifdef HAVE_F_OP_FLOCK - if ((file_lock->fl_flags & FL_POSIX) && (rc == 0) && - !(flags & LDLM_FL_TEST_LOCK)) - posix_lock_file_wait(file, file_lock); -#endif - - RETURN(rc); -} - -int ll_file_noflock(struct file *file, int cmd, struct file_lock *file_lock) -{ - ENTRY; - - RETURN(-ENOSYS); -} - -int ll_have_md_lock(struct inode *inode, __u64 bits) -{ - struct lustre_handle lockh; - struct ldlm_res_id res_id = { .name = {0} }; - struct obd_device *obddev; - ldlm_policy_data_t policy = { .l_inodebits = {bits}}; - int flags; - ENTRY; - - if (!inode) - RETURN(0); - - obddev = ll_i2mdcexp(inode)->exp_obd; - res_id.name[0] = inode->i_ino; - res_id.name[1] = inode->i_generation; - - CDEBUG(D_INFO, "trying to match res "LPU64"\n", res_id.name[0]); - - flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_CBPENDING | LDLM_FL_TEST_LOCK; - if (ldlm_lock_match(obddev->obd_namespace, flags, &res_id, LDLM_IBITS, - &policy, LCK_CR|LCK_CW|LCK_PR|LCK_PW, &lockh)) { - RETURN(1); - } - - RETURN(0); -} - -static int ll_inode_revalidate_fini(struct inode *inode, int rc) { - if (rc == -ENOENT) { /* Already unlinked. Just update nlink - * and return success */ - inode->i_nlink = 0; - /* This path cannot be hit for regular files unless in - * case of obscure races, so no need to to validate - * size. */ - if (!S_ISREG(inode->i_mode) && - !S_ISDIR(inode->i_mode)) - return 0; - } - - if (rc) { - CERROR("failure %d inode %lu\n", rc, inode->i_ino); - return -abs(rc); - - } - - return 0; -} - -int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it) -{ - struct inode *inode = dentry->d_inode; - struct ptlrpc_request *req = NULL; - struct obd_export *exp; - int rc; - ENTRY; - - if (!inode) { - CERROR("REPORT THIS LINE TO PETER\n"); - RETURN(0); - } - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),name=%s\n", - inode->i_ino, inode->i_generation, inode, dentry->d_name.name); -#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)) - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REVALIDATE, 1); -#endif - - exp = ll_i2mdcexp(inode); - - if (exp->exp_connect_flags & OBD_CONNECT_ATTRFID) { - struct lookup_intent oit = { .it_op = IT_GETATTR }; - struct mdc_op_data op_data; - - /* Call getattr by fid, so do not provide name at all. */ - ll_prepare_mdc_op_data(&op_data, dentry->d_parent->d_inode, - dentry->d_inode, NULL, 0, 0, NULL); - rc = mdc_intent_lock(exp, &op_data, NULL, 0, - /* we are not interested in name - based lookup */ - &oit, 0, &req, - ll_mdc_blocking_ast, 0); - if (rc < 0) { - rc = ll_inode_revalidate_fini(inode, rc); - GOTO (out, rc); - } - - rc = revalidate_it_finish(req, DLM_REPLY_REC_OFF, &oit, dentry); - if (rc != 0) { - ll_intent_release(&oit); - GOTO(out, rc); - } - - /* Unlinked? Unhash dentry, so it is not picked up later by - do_lookup() -> ll_revalidate_it(). We cannot use d_drop - here to preserve get_cwd functionality on 2.6. - Bug 10503 */ - if (!dentry->d_inode->i_nlink) { - spin_lock(&dcache_lock); - ll_drop_dentry(dentry); - spin_unlock(&dcache_lock); - } - - ll_lookup_finish_locks(&oit, dentry); - } else if (!ll_have_md_lock(dentry->d_inode, - MDS_INODELOCK_UPDATE|MDS_INODELOCK_LOOKUP)) { - struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode); - struct ll_fid fid; - obd_valid valid = OBD_MD_FLGETATTR; - int ealen = 0; - - if (S_ISREG(inode->i_mode)) { - rc = ll_get_max_mdsize(sbi, &ealen); - if (rc) - RETURN(rc); - valid |= OBD_MD_FLEASIZE | OBD_MD_FLMODEASIZE; - } - ll_inode2fid(&fid, inode); - rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, ealen, &req); - if (rc) { - rc = ll_inode_revalidate_fini(inode, rc); - RETURN(rc); - } - - rc = ll_prep_inode(sbi->ll_osc_exp, &inode, req, REPLY_REC_OFF, - NULL); - if (rc) - GOTO(out, rc); - } - - /* if object not yet allocated, don't validate size */ - if (ll_i2info(inode)->lli_smd == NULL) - GOTO(out, rc = 0); - - /* ll_glimpse_size will prefer locally cached writes if they extend - * the file */ - rc = ll_glimpse_size(inode, 0); - -out: - ptlrpc_req_finished(req); - RETURN(rc); -} - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -int ll_getattr_it(struct vfsmount *mnt, struct dentry *de, - struct lookup_intent *it, struct kstat *stat) -{ - struct inode *inode = de->d_inode; - int res = 0; - - res = ll_inode_revalidate_it(de, it); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETATTR, 1); - - if (res) - return res; - - stat->dev = inode->i_sb->s_dev; - stat->ino = inode->i_ino; - stat->mode = inode->i_mode; - stat->nlink = inode->i_nlink; - stat->uid = inode->i_uid; - stat->gid = inode->i_gid; - stat->rdev = kdev_t_to_nr(inode->i_rdev); - stat->atime = inode->i_atime; - stat->mtime = inode->i_mtime; - stat->ctime = inode->i_ctime; -#ifdef HAVE_INODE_BLKSIZE - stat->blksize = inode->i_blksize; -#else - stat->blksize = 1<<inode->i_blkbits; -#endif - - ll_inode_size_lock(inode, 0); - stat->size = i_size_read(inode); - stat->blocks = inode->i_blocks; - ll_inode_size_unlock(inode, 0); - - return 0; -} -int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat) -{ - struct lookup_intent it = { .it_op = IT_GETATTR }; - - return ll_getattr_it(mnt, de, &it, stat); -} -#endif - -static -int lustre_check_acl(struct inode *inode, int mask) -{ -#ifdef CONFIG_FS_POSIX_ACL - struct ll_inode_info *lli = ll_i2info(inode); - struct posix_acl *acl; - int rc; - ENTRY; - - spin_lock(&lli->lli_lock); - acl = posix_acl_dup(lli->lli_posix_acl); - spin_unlock(&lli->lli_lock); - - if (!acl) - RETURN(-EAGAIN); - - rc = posix_acl_permission(inode, acl, mask); - posix_acl_release(acl); - - RETURN(rc); -#else - return -EAGAIN; -#endif -} - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)) -int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd) -{ - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), mask %o\n", - inode->i_ino, inode->i_generation, inode, mask); - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_INODE_PERM, 1); - return generic_permission(inode, mask, lustre_check_acl); -} -#else -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd) -#else -int ll_inode_permission(struct inode *inode, int mask) -#endif -{ - int mode = inode->i_mode; - int rc; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), mask %o\n", - inode->i_ino, inode->i_generation, inode, mask); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_INODE_PERM, 1); - - if ((mask & MAY_WRITE) && IS_RDONLY(inode) && - (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))) - return -EROFS; - if ((mask & MAY_WRITE) && IS_IMMUTABLE(inode)) - return -EACCES; - if (current->fsuid == inode->i_uid) { - mode >>= 6; - } else if (1) { - if (((mode >> 3) & mask & S_IRWXO) != mask) - goto check_groups; - rc = lustre_check_acl(inode, mask); - if (rc == -EAGAIN) - goto check_groups; - if (rc == -EACCES) - goto check_capabilities; - return rc; - } else { -check_groups: - if (in_group_p(inode->i_gid)) - mode >>= 3; - } - if ((mode & mask & S_IRWXO) == mask) - return 0; - -check_capabilities: - if (!(mask & MAY_EXEC) || - (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode)) - if (capable(CAP_DAC_OVERRIDE)) - return 0; - - if (capable(CAP_DAC_READ_SEARCH) && ((mask == MAY_READ) || - (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE)))) - return 0; - - return -EACCES; -} -#endif - -/* -o localflock - only provides locally consistent flock locks */ -struct file_operations ll_file_operations = { - .read = ll_file_read, -#ifdef HAVE_FILE_READV - .readv = ll_file_readv, -#else - .aio_read = ll_file_aio_read, -#endif - .write = ll_file_write, -#ifdef HAVE_FILE_WRITEV - .writev = ll_file_writev, -#else - .aio_write = ll_file_aio_write, -#endif - .ioctl = ll_file_ioctl, - .open = ll_file_open, - .release = ll_file_release, - .mmap = ll_file_mmap, - .llseek = ll_file_seek, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - .sendfile = ll_file_sendfile, -#endif - .fsync = ll_fsync, -}; - -struct file_operations ll_file_operations_flock = { - .read = ll_file_read, -#ifdef HAVE_FILE_READV - .readv = ll_file_readv, -#else - .aio_read = ll_file_aio_read, -#endif - .write = ll_file_write, -#ifdef HAVE_FILE_WRITEV - .writev = ll_file_writev, -#else - .aio_write = ll_file_aio_write, -#endif - .ioctl = ll_file_ioctl, - .open = ll_file_open, - .release = ll_file_release, - .mmap = ll_file_mmap, - .llseek = ll_file_seek, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - .sendfile = ll_file_sendfile, -#endif - .fsync = ll_fsync, -#ifdef HAVE_F_OP_FLOCK - .flock = ll_file_flock, -#endif - .lock = ll_file_flock -}; - -/* These are for -o noflock - to return ENOSYS on flock calls */ -struct file_operations ll_file_operations_noflock = { - .read = ll_file_read, -#ifdef HAVE_FILE_READV - .readv = ll_file_readv, -#else - .aio_read = ll_file_aio_read, -#endif - .write = ll_file_write, -#ifdef HAVE_FILE_WRITEV - .writev = ll_file_writev, -#else - .aio_write = ll_file_aio_write, -#endif - .ioctl = ll_file_ioctl, - .open = ll_file_open, - .release = ll_file_release, - .mmap = ll_file_mmap, - .llseek = ll_file_seek, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - .sendfile = ll_file_sendfile, -#endif - .fsync = ll_fsync, -#ifdef HAVE_F_OP_FLOCK - .flock = ll_file_noflock, -#endif - .lock = ll_file_noflock -}; - -struct inode_operations ll_file_inode_operations = { -#ifdef HAVE_VFS_INTENT_PATCHES - .setattr_raw = ll_setattr_raw, -#endif - .setattr = ll_setattr, - .truncate = ll_truncate, -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - .getattr = ll_getattr, -#else - .revalidate_it = ll_inode_revalidate_it, -#endif - .permission = ll_inode_permission, - .setxattr = ll_setxattr, - .getxattr = ll_getxattr, - .listxattr = ll_listxattr, - .removexattr = ll_removexattr, -}; - -/* dynamic ioctl number support routins */ -static struct llioc_ctl_data { - struct rw_semaphore ioc_sem; - struct list_head ioc_head; -} llioc = { - __RWSEM_INITIALIZER(llioc.ioc_sem), - CFS_LIST_HEAD_INIT(llioc.ioc_head) -}; - - -struct llioc_data { - struct list_head iocd_list; - unsigned int iocd_size; - llioc_callback_t iocd_cb; - unsigned int iocd_count; - unsigned int iocd_cmd[0]; -}; - -void *ll_iocontrol_register(llioc_callback_t cb, int count, unsigned int *cmd) -{ - unsigned int size; - struct llioc_data *in_data = NULL; - ENTRY; - - if (cb == NULL || cmd == NULL || - count > LLIOC_MAX_CMD || count < 0) - RETURN(NULL); - - size = sizeof(*in_data) + count * sizeof(unsigned int); - OBD_ALLOC(in_data, size); - if (in_data == NULL) - RETURN(NULL); - - memset(in_data, 0, sizeof(*in_data)); - in_data->iocd_size = size; - in_data->iocd_cb = cb; - in_data->iocd_count = count; - memcpy(in_data->iocd_cmd, cmd, sizeof(unsigned int) * count); - - down_write(&llioc.ioc_sem); - list_add_tail(&in_data->iocd_list, &llioc.ioc_head); - up_write(&llioc.ioc_sem); - - RETURN(in_data); -} - -void ll_iocontrol_unregister(void *magic) -{ - struct llioc_data *tmp; - - if (magic == NULL) - return; - - down_write(&llioc.ioc_sem); - list_for_each_entry(tmp, &llioc.ioc_head, iocd_list) { - if (tmp == magic) { - unsigned int size = tmp->iocd_size; - - list_del(&tmp->iocd_list); - up_write(&llioc.ioc_sem); - - OBD_FREE(tmp, size); - return; - } - } - up_write(&llioc.ioc_sem); - - CWARN("didn't find iocontrol register block with magic: %p\n", magic); -} - -EXPORT_SYMBOL(ll_iocontrol_register); -EXPORT_SYMBOL(ll_iocontrol_unregister); - -enum llioc_iter ll_iocontrol_call(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, int *rcp) -{ - enum llioc_iter ret = LLIOC_CONT; - struct llioc_data *data; - int rc = -EINVAL, i; - - down_read(&llioc.ioc_sem); - list_for_each_entry(data, &llioc.ioc_head, iocd_list) { - for (i = 0; i < data->iocd_count; i++) { - if (cmd != data->iocd_cmd[i]) - continue; - - ret = data->iocd_cb(inode, file, cmd, arg, data, &rc); - break; - } - - if (ret == LLIOC_STOP) - break; - } - up_read(&llioc.ioc_sem); - - if (rcp) - *rcp = rc; - return ret; -} diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c deleted file mode 100644 index d36f2d6f8e..0000000000 --- a/lustre/llite/llite_close.c +++ /dev/null @@ -1,269 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Lite routines to issue a secondary close after writeback - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <linux/module.h> - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <lustre_lite.h> -#include "llite_internal.h" - -#ifdef HAVE_CLOSE_THREAD -/* record that a write is in flight */ -void llap_write_pending(struct inode *inode, struct ll_async_page *llap) -{ - struct ll_inode_info *lli = ll_i2info(inode); - spin_lock(&lli->lli_lock); - list_add(&llap->llap_pending_write, &lli->lli_pending_write_llaps); - spin_unlock(&lli->lli_lock); -} - -/* record that a write has completed */ -void llap_write_complete(struct inode *inode, struct ll_async_page *llap) -{ - struct ll_inode_info *lli = ll_i2info(inode); - spin_lock(&lli->lli_lock); - list_del_init(&llap->llap_pending_write); - spin_unlock(&lli->lli_lock); -} - -void ll_open_complete(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - spin_lock(&lli->lli_lock); - lli->lli_send_done_writing = 0; - spin_unlock(&lli->lli_lock); -} - -/* if we close with writes in flight then we want the completion or cancelation - * of those writes to send a DONE_WRITING rpc to the MDS */ -int ll_is_inode_dirty(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - int rc = 0; - ENTRY; - - spin_lock(&lli->lli_lock); - if (!list_empty(&lli->lli_pending_write_llaps)) - rc = 1; - spin_unlock(&lli->lli_lock); - RETURN(rc); -} - -void ll_try_done_writing(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct ll_close_queue *lcq = ll_i2sbi(inode)->ll_lcq; - - spin_lock(&lli->lli_lock); - - if (lli->lli_send_done_writing && - list_empty(&lli->lli_pending_write_llaps)) { - - spin_lock(&lcq->lcq_lock); - if (list_empty(&lli->lli_close_item)) { - CDEBUG(D_INODE, "adding inode %lu/%u to close list\n", - inode->i_ino, inode->i_generation); - igrab(inode); - list_add_tail(&lli->lli_close_item, &lcq->lcq_list); - wake_up(&lcq->lcq_waitq); - } - spin_unlock(&lcq->lcq_lock); - } - - spin_unlock(&lli->lli_lock); -} - -/* The MDS needs us to get the real file attributes, then send a DONE_WRITING */ -void ll_queue_done_writing(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - ENTRY; - - spin_lock(&lli->lli_lock); - lli->lli_send_done_writing = 1; - spin_unlock(&lli->lli_lock); - - ll_try_done_writing(inode); - EXIT; -} - -/* If we know the file size and have the cookies: - * - send a DONE_WRITING rpc - * - * Otherwise: - * - get a whole-file lock - * - get the authoritative size and all cookies with GETATTRs - * - send a DONE_WRITING rpc - */ -static void ll_close_done_writing(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - ldlm_policy_data_t policy = { .l_extent = {0, OBD_OBJECT_EOF } }; - struct lustre_handle lockh = { 0 }; - struct obdo obdo; - obd_flag valid; - int rc, ast_flags = 0; - ENTRY; - - memset(&obdo, 0, sizeof(obdo)); - if (test_bit(LLI_F_HAVE_OST_SIZE_LOCK, &lli->lli_flags)) - goto rpc; - - rc = ll_extent_lock(NULL, inode, lli->lli_smd, LCK_PW, &policy, &lockh, - ast_flags); - if (rc != 0) { - CERROR("lock acquisition failed (%d): unable to send " - "DONE_WRITING for inode %lu/%u\n", rc, inode->i_ino, - inode->i_generation); - GOTO(out, rc); - } - - rc = ll_lsm_getattr(ll_i2obdexp(inode), lli->lli_smd, &obdo); - if (rc) { - CERROR("inode_getattr failed (%d): unable to send DONE_WRITING " - "for inode %lu/%u\n", rc, inode->i_ino, - inode->i_generation); - ll_extent_unlock(NULL, inode, lli->lli_smd, LCK_PW, &lockh); - GOTO(out, rc); - } - - obdo_refresh_inode(inode, &obdo, valid); - - CDEBUG(D_INODE, "objid "LPX64" size %Lu, blocks %lu, blksize %lu\n", - lli->lli_smd->lsm_object_id, i_size_read(inode), inode->i_blocks, - 1<<inode->i_blkbits); - - set_bit(LLI_F_HAVE_OST_SIZE_LOCK, &lli->lli_flags); - - rc = ll_extent_unlock(NULL, inode, lli->lli_smd, LCK_PW, &lockh); - if (rc != ELDLM_OK) - CERROR("unlock failed (%d)? proceeding anyways...\n", rc); - - rpc: - obdo.o_id = inode->i_ino; - obdo.o_size = i_size_read(inode); - obdo.o_blocks = inode->i_blocks; - obdo.o_valid = OBD_MD_FLID | OBD_MD_FLSIZE | OBD_MD_FLBLOCKS; - - rc = mdc_done_writing(ll_i2sbi(inode)->ll_mdc_exp, &obdo); - out: -} - - -static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq) -{ - struct ll_inode_info *lli = NULL; - - spin_lock(&lcq->lcq_lock); - - if (lcq->lcq_list.next == NULL) - lli = ERR_PTR(-1); - else if (!list_empty(&lcq->lcq_list)) { - lli = list_entry(lcq->lcq_list.next, struct ll_inode_info, - lli_close_item); - list_del(&lli->lli_close_item); - } - - spin_unlock(&lcq->lcq_lock); - return lli; -} -#else -static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq) -{ - if (lcq->lcq_list.next == NULL) - return ERR_PTR(-1); - - return NULL; -} -#endif - -static int ll_close_thread(void *arg) -{ - struct ll_close_queue *lcq = arg; - ENTRY; - - { - char name[CFS_CURPROC_COMM_MAX]; - snprintf(name, sizeof(name) - 1, "ll_close"); - cfs_daemonize(name); - } - - complete(&lcq->lcq_comp); - - while (1) { - struct l_wait_info lwi = { 0 }; - struct ll_inode_info *lli; - //struct inode *inode; - - l_wait_event_exclusive(lcq->lcq_waitq, - (lli = ll_close_next_lli(lcq)) != NULL, - &lwi); - if (IS_ERR(lli)) - break; - - //inode = ll_info2i(lli); - //ll_close_done_writing(inode); - //iput(inode); - } - - complete(&lcq->lcq_comp); - RETURN(0); -} - -int ll_close_thread_start(struct ll_close_queue **lcq_ret) -{ - struct ll_close_queue *lcq; - pid_t pid; - - OBD_FAIL_RETURN(OBD_FAIL_LDLM_CLOSE_THREAD, -EINTR); - OBD_ALLOC(lcq, sizeof(*lcq)); - if (lcq == NULL) - return -ENOMEM; - - spin_lock_init(&lcq->lcq_lock); - INIT_LIST_HEAD(&lcq->lcq_list); - init_waitqueue_head(&lcq->lcq_waitq); - init_completion(&lcq->lcq_comp); - - pid = kernel_thread(ll_close_thread, lcq, 0); - if (pid < 0) { - OBD_FREE(lcq, sizeof(*lcq)); - return pid; - } - - wait_for_completion(&lcq->lcq_comp); - *lcq_ret = lcq; - return 0; -} - -void ll_close_thread_shutdown(struct ll_close_queue *lcq) -{ - init_completion(&lcq->lcq_comp); - lcq->lcq_list.next = NULL; - wake_up(&lcq->lcq_waitq); - wait_for_completion(&lcq->lcq_comp); - OBD_FREE(lcq, sizeof(*lcq)); -} - - diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h deleted file mode 100644 index 3ae815a1bf..0000000000 --- a/lustre/llite/llite_internal.h +++ /dev/null @@ -1,944 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef LLITE_INTERNAL_H -#define LLITE_INTERNAL_H - -#include <linux/ext2_fs.h> -#ifdef CONFIG_FS_POSIX_ACL -# include <linux/fs.h> -#ifdef HAVE_XATTR_ACL -# include <linux/xattr_acl.h> -#endif -#ifdef HAVE_LINUX_POSIX_ACL_XATTR_H -# include <linux/posix_acl_xattr.h> -#endif -#endif - -#include <lustre_debug.h> -#include <lustre_ver.h> -#include <linux/lustre_version.h> -#include <lustre_disk.h> /* for s2sbi */ - -/* -struct lustre_intent_data { - __u64 it_lock_handle[2]; - __u32 it_disposition; - __u32 it_status; - __u32 it_lock_mode; - }; */ - -/* If there is no FMODE_EXEC defined, make it to match nothing */ -#ifndef FMODE_EXEC -#define FMODE_EXEC 0 -#endif - -#define LL_IT2STR(it) ((it) ? ldlm_it2str((it)->it_op) : "0") -#define LUSTRE_FPRIVATE(file) ((file)->private_data) - -#ifdef HAVE_VFS_INTENT_PATCHES -static inline struct lookup_intent *ll_nd2it(struct nameidata *nd) -{ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - return &nd->intent; -#else - return nd->intent; -#endif -} -#endif - -struct ll_dentry_data { - int lld_cwd_count; - int lld_mnt_count; - struct obd_client_handle lld_cwd_och; - struct obd_client_handle lld_mnt_och; -#ifndef HAVE_VFS_INTENT_PATCHES - struct lookup_intent *lld_it; -#endif - cfs_waitq_t lld_waitq; -}; - -#define ll_d2d(de) ((struct ll_dentry_data*)((de)->d_fsdata)) - -extern struct file_operations ll_pgcache_seq_fops; - -#define LLI_INODE_MAGIC 0x111d0de5 -#define LLI_INODE_DEAD 0xdeadd00d -#define LLI_F_HAVE_OST_SIZE_LOCK 0 -#define LLI_F_HAVE_MDS_SIZE_LOCK 1 -#define LLI_F_CONTENDED 2 -#define LLI_F_SRVLOCK 3 - -struct ll_inode_info { - int lli_inode_magic; - struct semaphore lli_size_sem; /* protect open and change size */ - void *lli_size_sem_owner; - struct semaphore lli_write_sem; - struct lov_stripe_md *lli_smd; - char *lli_symlink_name; - __u64 lli_maxbytes; - __u64 lli_io_epoch; - unsigned long lli_flags; - cfs_time_t lli_contention_time; - - /* this lock protects s_d_w and p_w_ll and mmap_cnt */ - spinlock_t lli_lock; -#ifdef HAVE_CLOSE_THREAD - struct list_head lli_pending_write_llaps; - struct list_head lli_close_item; - int lli_send_done_writing; -#endif - atomic_t lli_mmap_cnt; - - /* for writepage() only to communicate to fsync */ - int lli_async_rc; - - struct posix_acl *lli_posix_acl; - - struct list_head lli_dead_list; - - struct semaphore lli_och_sem; /* Protects access to och pointers - and their usage counters */ - /* We need all three because every inode may be opened in different - modes */ - struct obd_client_handle *lli_mds_read_och; - __u64 lli_open_fd_read_count; - struct obd_client_handle *lli_mds_write_och; - __u64 lli_open_fd_write_count; - struct obd_client_handle *lli_mds_exec_och; - __u64 lli_open_fd_exec_count; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - struct inode lli_vfs_inode; -#endif - - /* metadata stat-ahead */ - /* - * "opendir_pid" is the token when lookup/revalid -- I am the owner of - * dir statahead. - */ - pid_t lli_opendir_pid; - /* - * since parent-child threads can share the same @file struct, - * "opendir_key" is the token when dir close for case of parent exit - * before child -- it is me should cleanup the dir readahead. */ - void *lli_opendir_key; - struct ll_statahead_info *lli_sai; -}; - -/* - * Locking to guarantee consistency of non-atomic updates to long long i_size, - * consistency between file size and KMS, and consistency within - * ->lli_smd->lsm_oinfo[]'s. - * - * Implemented by ->lli_size_sem and ->lsm_sem, nested in that order. - */ - -void ll_inode_size_lock(struct inode *inode, int lock_lsm); -void ll_inode_size_unlock(struct inode *inode, int unlock_lsm); - -// FIXME: replace the name of this with LL_I to conform to kernel stuff -// static inline struct ll_inode_info *LL_I(struct inode *inode) -static inline struct ll_inode_info *ll_i2info(struct inode *inode) -{ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - return container_of(inode, struct ll_inode_info, lli_vfs_inode); -#else - CLASSERT(sizeof(inode->u) >= sizeof(struct ll_inode_info)); - return (struct ll_inode_info *)&(inode->u.generic_ip); -#endif -} - -/* default to about 40meg of readahead on a given system. That much tied - * up in 512k readahead requests serviced at 40ms each is about 1GB/s. */ -#define SBI_DEFAULT_READAHEAD_MAX (40UL << (20 - CFS_PAGE_SHIFT)) - -/* default to read-ahead full files smaller than 2MB on the second read */ -#define SBI_DEFAULT_READAHEAD_WHOLE_MAX (2UL << (20 - CFS_PAGE_SHIFT)) - -enum ra_stat { - RA_STAT_HIT = 0, - RA_STAT_MISS, - RA_STAT_DISTANT_READPAGE, - RA_STAT_MISS_IN_WINDOW, - RA_STAT_FAILED_GRAB_PAGE, - RA_STAT_FAILED_MATCH, - RA_STAT_DISCARDED, - RA_STAT_ZERO_LEN, - RA_STAT_ZERO_WINDOW, - RA_STAT_EOF, - RA_STAT_MAX_IN_FLIGHT, - RA_STAT_WRONG_GRAB_PAGE, - _NR_RA_STAT, -}; - -struct ll_ra_info { - unsigned long ra_cur_pages; - unsigned long ra_max_pages; - unsigned long ra_max_read_ahead_whole_pages; - unsigned long ra_stats[_NR_RA_STAT]; -}; - -/* LL_HIST_MAX=32 causes an overflow */ -#define LL_HIST_MAX 28 -#define LL_HIST_START 12 /* buckets start at 2^12 = 4k */ -#define LL_PROCESS_HIST_MAX 10 -struct per_process_info { - pid_t pid; - struct obd_histogram pp_r_hist; - struct obd_histogram pp_w_hist; -}; - -/* pp_extents[LL_PROCESS_HIST_MAX] will hold the combined process info */ -struct ll_rw_extents_info { - struct per_process_info pp_extents[LL_PROCESS_HIST_MAX + 1]; -}; - -#define LL_OFFSET_HIST_MAX 100 -struct ll_rw_process_info { - pid_t rw_pid; - int rw_op; - loff_t rw_range_start; - loff_t rw_range_end; - loff_t rw_last_file_pos; - loff_t rw_offset; - size_t rw_smallest_extent; - size_t rw_largest_extent; - struct file *rw_last_file; -}; - - -enum stats_track_type { - STATS_TRACK_ALL = 0, /* track all processes */ - STATS_TRACK_PID, /* track process with this pid */ - STATS_TRACK_PPID, /* track processes with this ppid */ - STATS_TRACK_GID, /* track processes with this gid */ - STATS_TRACK_LAST, -}; - -/* flags for sbi->ll_flags */ -#define LL_SBI_NOLCK 0x01 /* DLM locking disabled (directio-only) */ -#define LL_SBI_DATA_CHECKSUM 0x02 /* checksum each page on the wire */ -#define LL_SBI_FLOCK 0x04 -#define LL_SBI_USER_XATTR 0x08 /* support user xattr */ -#define LL_SBI_ACL 0x10 /* support ACL */ -#define LL_SBI_JOIN 0x20 /* support JOIN */ -#define LL_SBI_LOCALFLOCK 0x40 /* Local flocks support by kernel */ -#define LL_SBI_LRU_RESIZE 0x80 /* support lru resize */ -#define LL_SBI_LLITE_CHECKSUM 0x100 /* checksum each page in memory */ - -/* default value for ll_sb_info->contention_time */ -#define SBI_DEFAULT_CONTENTION_SECONDS 60 - -struct ll_sb_info { - struct list_head ll_list; - /* this protects pglist and ra_info. It isn't safe to - * grab from interrupt contexts */ - spinlock_t ll_lock; - spinlock_t ll_pp_extent_lock; /* Lock for pp_extent entries */ - spinlock_t ll_process_lock; /* Lock for ll_rw_process_info */ - struct obd_uuid ll_sb_uuid; - struct obd_export *ll_mdc_exp; - struct obd_export *ll_osc_exp; - struct proc_dir_entry *ll_proc_root; - obd_id ll_rootino; /* number of root inode */ - - int ll_flags; - struct list_head ll_conn_chain; /* per-conn chain of SBs */ - struct lustre_client_ocd ll_lco; - - struct list_head ll_orphan_dentry_list; /*please don't ask -p*/ - struct ll_close_queue *ll_lcq; - - struct lprocfs_stats *ll_stats; /* lprocfs stats counter */ - - unsigned long ll_async_page_max; - unsigned long ll_async_page_count; - unsigned long ll_pglist_gen; - struct list_head ll_pglist; /* all pages (llap_pglist_item) */ - - unsigned ll_contention_time; /* seconds */ - - struct ll_ra_info ll_ra_info; - unsigned int ll_namelen; - struct file_operations *ll_fop; - -#ifdef HAVE_EXPORT___IGET - struct list_head ll_deathrow; /* inodes to be destroyed (b1443) */ - spinlock_t ll_deathrow_lock; -#endif - /* =0 - hold lock over whole read/write - * >0 - max. chunk to be read/written w/o lock re-acquiring */ - unsigned long ll_max_rw_chunk; - - /* Statistics */ - struct ll_rw_extents_info ll_rw_extents_info; - int ll_extent_process_count; - struct ll_rw_process_info ll_rw_process_info[LL_PROCESS_HIST_MAX]; - unsigned int ll_offset_process_count; - struct ll_rw_process_info ll_rw_offset_info[LL_OFFSET_HIST_MAX]; - unsigned int ll_rw_offset_entry_count; - enum stats_track_type ll_stats_track_type; - int ll_stats_track_id; - int ll_rw_stats_on; - dev_t ll_sdev_orig; /* save s_dev before assign for - * clustred nfs */ - - /* metadata stat-ahead */ - unsigned int ll_sa_max; /* max statahead RPCs */ - unsigned int ll_sa_wrong; /* statahead thread stopped for - * low hit ratio */ - unsigned int ll_sa_total; /* statahead thread started - * count */ - unsigned long long ll_sa_blocked; /* ls count waiting for - * statahead */ - unsigned long long ll_sa_cached; /* ls count got in cache */ - unsigned long long ll_sa_hit; /* hit count */ - unsigned long long ll_sa_miss; /* miss count */ -}; - -#define LL_DEFAULT_MAX_RW_CHUNK (32 * 1024 * 1024) - -struct ll_ra_read { - pgoff_t lrr_start; - pgoff_t lrr_count; - struct task_struct *lrr_reader; - struct list_head lrr_linkage; -}; - -/* - * per file-descriptor read-ahead data. - */ -struct ll_readahead_state { - spinlock_t ras_lock; - /* - * index of the last page that read(2) needed and that wasn't in the - * cache. Used by ras_update() to detect seeks. - * - * XXX nikita: if access seeks into cached region, Lustre doesn't see - * this. - */ - unsigned long ras_last_readpage; - /* - * number of pages read after last read-ahead window reset. As window - * is reset on each seek, this is effectively a number of consecutive - * accesses. Maybe ->ras_accessed_in_window is better name. - * - * XXX nikita: window is also reset (by ras_update()) when Lustre - * believes that memory pressure evicts read-ahead pages. In that - * case, it probably doesn't make sense to expand window to - * PTLRPC_MAX_BRW_PAGES on the third access. - */ - unsigned long ras_consecutive_pages; - /* - * number of read requests after the last read-ahead window reset - * As window is reset on each seek, this is effectively the number - * on consecutive read request and is used to trigger read-ahead. - */ - unsigned long ras_consecutive_requests; - /* - * Parameters of current read-ahead window. Handled by - * ras_update(). On the initial access to the file or after a seek, - * window is reset to 0. After 3 consecutive accesses, window is - * expanded to PTLRPC_MAX_BRW_PAGES. Afterwards, window is enlarged by - * PTLRPC_MAX_BRW_PAGES chunks up to ->ra_max_pages. - */ - unsigned long ras_window_start, ras_window_len; - /* - * Where next read-ahead should start at. This lies within read-ahead - * window. Read-ahead window is read in pieces rather than at once - * because: 1. lustre limits total number of pages under read-ahead by - * ->ra_max_pages (see ll_ra_count_get()), 2. client cannot read pages - * not covered by DLM lock. - */ - unsigned long ras_next_readahead; - /* - * Total number of ll_file_read requests issued, reads originating - * due to mmap are not counted in this total. This value is used to - * trigger full file read-ahead after multiple reads to a small file. - */ - unsigned long ras_requests; - /* - * Page index with respect to the current request, these value - * will not be accurate when dealing with reads issued via mmap. - */ - unsigned long ras_request_index; - /* - * list of struct ll_ra_read's one per read(2) call current in - * progress against this file descriptor. Used by read-ahead code, - * protected by ->ras_lock. - */ - struct list_head ras_read_beads; - /* - * The following 3 items are used for detecting the stride I/O - * mode. - * In stride I/O mode, - * ...............|-----data-----|****gap*****|--------|******|.... - * offset |-stride_pages-|-stride_gap-| - * ras_stride_offset = offset; - * ras_stride_length = stride_pages + stride_gap; - * ras_stride_pages = stride_pages; - * Note: all these three items are counted by pages. - */ - unsigned long ras_stride_length; - unsigned long ras_stride_pages; - pgoff_t ras_stride_offset; - /* - * number of consecutive stride request count, and it is similar as - * ras_consecutive_requests, but used for stride I/O mode. - * Note: only more than 2 consecutive stride request are detected, - * stride read-ahead will be enable - */ - unsigned long ras_consecutive_stride_requests; -}; - -extern cfs_mem_cache_t *ll_file_data_slab; -struct lustre_handle; -struct ll_file_data { - struct ll_readahead_state fd_ras; - int fd_omode; - struct lustre_handle fd_cwlockh; - unsigned long fd_gid; - __u32 fd_flags; -}; - -struct lov_stripe_md; - -extern spinlock_t inode_lock; - -extern struct proc_dir_entry *proc_lustre_fs_root; - -static inline struct inode *ll_info2i(struct ll_inode_info *lli) -{ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - return &lli->lli_vfs_inode; -#else - return list_entry(lli, struct inode, u.generic_ip); -#endif -} - -struct it_cb_data { - struct inode *icbd_parent; - struct dentry **icbd_childp; - obd_id hash; -}; - -void ll_i2gids(__u32 *suppgids, struct inode *i1,struct inode *i2); - -#define LLAP_MAGIC 98764321 - -extern cfs_mem_cache_t *ll_async_page_slab; -extern size_t ll_async_page_slab_size; -struct ll_async_page { - int llap_magic; - /* only trust these if the page lock is providing exclusion */ - unsigned int llap_write_queued:1, - llap_defer_uptodate:1, - llap_origin:3, - llap_ra_used:1, - llap_ignore_quota:1, - llap_nocache:1, - llap_lockless_io_page:1; - void *llap_cookie; - struct page *llap_page; - struct list_head llap_pending_write; - struct list_head llap_pglist_item; - /* checksum for paranoid I/O debugging */ - __u32 llap_checksum; -}; - -/* - * enumeration of llap_from_page() call-sites. Used to export statistics in - * /proc/fs/lustre/llite/fsN/dump_page_cache. - */ -enum { - LLAP_ORIGIN_UNKNOWN = 0, - LLAP_ORIGIN_READPAGE, - LLAP_ORIGIN_READAHEAD, - LLAP_ORIGIN_COMMIT_WRITE, - LLAP_ORIGIN_WRITEPAGE, - LLAP_ORIGIN_REMOVEPAGE, - LLAP_ORIGIN_LOCKLESS_IO, - LLAP__ORIGIN_MAX, -}; -extern char *llap_origins[]; - -#ifdef HAVE_REGISTER_CACHE -#define ll_register_cache(cache) register_cache(cache) -#define ll_unregister_cache(cache) unregister_cache(cache) -#else -#define ll_register_cache(cache) do {} while (0) -#define ll_unregister_cache(cache) do {} while (0) -#endif - -void ll_ra_read_in(struct file *f, struct ll_ra_read *rar); -void ll_ra_read_ex(struct file *f, struct ll_ra_read *rar); -struct ll_ra_read *ll_ra_read_get(struct file *f); - -/* llite/lproc_llite.c */ -#ifdef LPROCFS -int lprocfs_register_mountpoint(struct proc_dir_entry *parent, - struct super_block *sb, char *osc, char *mdc); -void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi); -void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count); -void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars); -#else -static inline int lprocfs_register_mountpoint(struct proc_dir_entry *parent, - struct super_block *sb, char *osc, char *mdc){return 0;} -static inline void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi) {} -static void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count) {} -static void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars) -{ - memset(lvars, 0, sizeof(*lvars)); -} -#endif - - -/* llite/dir.c */ -extern struct file_operations ll_dir_operations; -extern struct inode_operations ll_dir_inode_operations; - -struct page *ll_get_dir_page(struct inode *dir, unsigned long n); -/* - * p is at least 6 bytes before the end of page - */ -typedef struct ext2_dir_entry_2 ext2_dirent; - -static inline ext2_dirent *ext2_next_entry(ext2_dirent *p) -{ - return (ext2_dirent *)((char*)p + le16_to_cpu(p->rec_len)); -} - -static inline unsigned -ext2_validate_entry(char *base, unsigned offset, unsigned mask) -{ - ext2_dirent *de = (ext2_dirent*)(base + offset); - ext2_dirent *p = (ext2_dirent*)(base + (offset&mask)); - while ((char*)p < (char*)de) - p = ext2_next_entry(p); - return (char *)p - base; -} - -static inline void ext2_put_page(struct page *page) -{ - kunmap(page); - page_cache_release(page); -} - -static inline unsigned long dir_pages(struct inode *inode) -{ - return (inode->i_size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT; -} - -/* llite/namei.c */ -int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir); -struct inode *ll_iget(struct super_block *sb, ino_t hash, - struct lustre_md *lic); -int ll_mdc_cancel_unused(struct lustre_handle *, struct inode *, int flags, - void *opaque); -int ll_mdc_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *, - void *data, int flag); -int ll_prepare_mdc_op_data(struct mdc_op_data *, - struct inode *i1, struct inode *i2, - const char *name, int namelen, int mode, void *data); -#ifndef HAVE_VFS_INTENT_PATCHES -struct lookup_intent *ll_convert_intent(struct open_intent *oit, - int lookup_flags); -#endif -void ll_pin_extent_cb(void *data); -int ll_page_removal_cb(void *data, int discard); -int ll_extent_lock_cancel_cb(struct ldlm_lock *lock, struct ldlm_lock_desc *new, - void *data, int flag); -int lookup_it_finish(struct ptlrpc_request *request, int offset, - struct lookup_intent *it, void *data); -void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry); - -/* llite/rw.c */ -int ll_prepare_write(struct file *, struct page *, unsigned from, unsigned to); -int ll_commit_write(struct file *, struct page *, unsigned from, unsigned to); -int ll_writepage(struct page *page); -void ll_inode_fill_obdo(struct inode *inode, int cmd, struct obdo *oa); -int ll_ap_completion(void *data, int cmd, struct obdo *oa, int rc); -int llap_shrink_cache(struct ll_sb_info *sbi, int shrink_fraction); -extern struct cache_definition ll_cache_definition; -void ll_removepage(struct page *page); -int ll_readpage(struct file *file, struct page *page); -struct ll_async_page *llap_cast_private(struct page *page); -void ll_readahead_init(struct inode *inode, struct ll_readahead_state *ras); -void ll_ra_accounting(struct ll_async_page *llap,struct address_space *mapping); -void ll_truncate(struct inode *inode); -int ll_file_punch(struct inode *, loff_t, int); -ssize_t ll_file_lockless_io(struct file *, const struct iovec *, - unsigned long, loff_t *, int, ssize_t); -void ll_clear_file_contended(struct inode*); -int ll_sync_page_range(struct inode *, struct address_space *, loff_t, size_t); - -/* llite/file.c */ -extern struct file_operations ll_file_operations; -extern struct file_operations ll_file_operations_flock; -extern struct file_operations ll_file_operations_noflock; -extern struct inode_operations ll_file_inode_operations; -extern int ll_inode_revalidate_it(struct dentry *, struct lookup_intent *); -extern int ll_have_md_lock(struct inode *inode, __u64 bits); -int ll_extent_lock(struct ll_file_data *, struct inode *, - struct lov_stripe_md *, int mode, ldlm_policy_data_t *, - struct lustre_handle *, int ast_flags); -int ll_extent_unlock(struct ll_file_data *, struct inode *, - struct lov_stripe_md *, int mode, struct lustre_handle *); -int ll_file_open(struct inode *inode, struct file *file); -int ll_file_release(struct inode *inode, struct file *file); -int ll_lsm_getattr(struct obd_export *, struct lov_stripe_md *, struct obdo *); -int ll_glimpse_ioctl(struct ll_sb_info *sbi, - struct lov_stripe_md *lsm, lstat_t *st); -int ll_glimpse_size(struct inode *inode, int ast_flags); -int ll_local_open(struct file *file, - struct lookup_intent *it, struct ll_file_data *fd, - struct obd_client_handle *och); -int ll_release_openhandle(struct dentry *, struct lookup_intent *); -int ll_mdc_close(struct obd_export *mdc_exp, struct inode *inode, - struct file *file); -int ll_mdc_real_close(struct inode *inode, int flags); -extern void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid, struct file - *file, size_t count, int rw); -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -int ll_getattr_it(struct vfsmount *mnt, struct dentry *de, - struct lookup_intent *it, struct kstat *stat); -int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat); -#endif -struct ll_file_data *ll_file_data_get(void); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd); -#else -int ll_inode_permission(struct inode *inode, int mask); -#endif -int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file, - int flags, struct lov_user_md *lum, - int lum_size); -int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename, - struct lov_mds_md **lmm, int *lmm_size, - struct ptlrpc_request **request); -int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump, - int set_default); -int ll_dir_getstripe(struct inode *inode, struct lov_mds_md **lmm, - int *lmm_size, struct ptlrpc_request **request); - -/* llite/dcache.c */ -extern struct dentry_operations ll_init_d_ops; -extern struct dentry_operations ll_d_ops; -extern struct dentry_operations ll_fini_d_ops; -void ll_intent_drop_lock(struct lookup_intent *); -void ll_intent_release(struct lookup_intent *); -extern void ll_set_dd(struct dentry *de); -int ll_drop_dentry(struct dentry *dentry); -void ll_unhash_aliases(struct inode *); -void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft); -void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry); -int ll_dcompare(struct dentry *parent, struct qstr *d_name, struct qstr *name); -int revalidate_it_finish(struct ptlrpc_request *request, int offset, - struct lookup_intent *it, struct dentry *de); - -/* llite/llite_lib.c */ -extern struct super_operations lustre_super_operations; - -char *ll_read_opt(const char *opt, char *data); -void ll_lli_init(struct ll_inode_info *lli); -int ll_fill_super(struct super_block *sb); -void ll_put_super(struct super_block *sb); -void ll_kill_super(struct super_block *sb); -struct inode *ll_inode_from_lock(struct ldlm_lock *lock); -void ll_clear_inode(struct inode *inode); -int ll_setattr_raw(struct inode *inode, struct iattr *attr); -int ll_setattr(struct dentry *de, struct iattr *attr); -#ifndef HAVE_STATFS_DENTRY_PARAM -int ll_statfs(struct super_block *sb, struct kstatfs *sfs); -#else -int ll_statfs(struct dentry *de, struct kstatfs *sfs); -#endif -int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs, - __u64 max_age, __u32 flags); -void ll_update_inode(struct inode *inode, struct lustre_md *md); -void ll_read_inode2(struct inode *inode, void *opaque); -int ll_iocontrol(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg); -#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT -void ll_umount_begin(struct vfsmount *vfsmnt, int flags); -#else -void ll_umount_begin(struct super_block *sb); -#endif -int ll_remount_fs(struct super_block *sb, int *flags, char *data); -int ll_prep_inode(struct obd_export *exp, struct inode **inode, - struct ptlrpc_request *req, int offset, struct super_block *); -void lustre_dump_dentry(struct dentry *, int recur); -void lustre_dump_inode(struct inode *); -struct ll_async_page *llite_pglist_next_llap(struct ll_sb_info *sbi, - struct list_head *list); -int ll_obd_statfs(struct inode *inode, void *arg); -int ll_get_max_mdsize(struct ll_sb_info *sbi, int *max_mdsize); -int ll_process_config(struct lustre_cfg *lcfg); - -/* llite/llite_nfs.c */ -extern struct export_operations lustre_export_operations; -__u32 get_uuid2int(const char *name, int len); -struct dentry *ll_fh_to_dentry(struct super_block *sb, __u32 *data, int len, - int fhtype, int parent); -int ll_dentry_to_fh(struct dentry *, __u32 *datap, int *lenp, int need_parent); - -/* llite/special.c */ -extern struct inode_operations ll_special_inode_operations; -extern struct file_operations ll_special_chr_inode_fops; -extern struct file_operations ll_special_chr_file_fops; -extern struct file_operations ll_special_blk_inode_fops; -extern struct file_operations ll_special_fifo_inode_fops; -extern struct file_operations ll_special_fifo_file_fops; -extern struct file_operations ll_special_sock_inode_fops; - -/* llite/symlink.c */ -extern struct inode_operations ll_fast_symlink_inode_operations; - -/* llite/llite_close.c */ -struct ll_close_queue { - spinlock_t lcq_lock; - struct list_head lcq_list; - wait_queue_head_t lcq_waitq; - struct completion lcq_comp; -}; - -#ifdef HAVE_CLOSE_THREAD -void llap_write_pending(struct inode *inode, struct ll_async_page *llap); -void llap_write_complete(struct inode *inode, struct ll_async_page *llap); -void ll_open_complete(struct inode *inode); -int ll_is_inode_dirty(struct inode *inode); -void ll_try_done_writing(struct inode *inode); -void ll_queue_done_writing(struct inode *inode); -#else -static inline void llap_write_pending(struct inode *inode, - struct ll_async_page *llap) { return; }; -static inline void llap_write_complete(struct inode *inode, - struct ll_async_page *llap) { return; }; -static inline void ll_open_complete(struct inode *inode) { return; }; -static inline int ll_is_inode_dirty(struct inode *inode) { return 0; }; -static inline void ll_try_done_writing(struct inode *inode) { return; }; -static inline void ll_queue_done_writing(struct inode *inode) { return; }; -//static inline void ll_close_thread_shutdown(struct ll_close_queue *lcq) { return; }; -//static inline int ll_close_thread_start(struct ll_close_queue **lcq_ret) { return 0; }; -#endif -void ll_close_thread_shutdown(struct ll_close_queue *lcq); -int ll_close_thread_start(struct ll_close_queue **lcq_ret); - -/* llite/llite_mmap.c */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -typedef struct rb_root rb_root_t; -typedef struct rb_node rb_node_t; -#endif - -struct ll_lock_tree_node; -struct ll_lock_tree { - rb_root_t lt_root; - struct list_head lt_locked_list; - struct ll_file_data *lt_fd; -}; - -int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last); -int ll_file_mmap(struct file * file, struct vm_area_struct * vma); -struct ll_lock_tree_node * ll_node_from_inode(struct inode *inode, __u64 start, - __u64 end, ldlm_mode_t mode); -int ll_tree_lock(struct ll_lock_tree *tree, - struct ll_lock_tree_node *first_node, - const char *buf, size_t count, int ast_flags); -int ll_tree_lock_iov(struct ll_lock_tree *tree, - struct ll_lock_tree_node *first_node, - const struct iovec *iov, unsigned long nr_segs, - int ast_flags); -int ll_tree_unlock(struct ll_lock_tree *tree); - -#define ll_s2sbi(sb) (s2lsi(sb)->lsi_llsbi) - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -static inline __u64 ll_ts2u64(struct timespec *time) -{ - __u64 t = time->tv_sec; - return t; -} -#else /* 2.4 here */ -static inline __u64 ll_ts2u64(time_t *time) -{ - return *time; -} -#endif - -/* don't need an addref as the sb_info should be holding one */ -static inline struct obd_export *ll_s2obdexp(struct super_block *sb) -{ - return ll_s2sbi(sb)->ll_osc_exp; -} - -/* don't need an addref as the sb_info should be holding one */ -static inline struct obd_export *ll_s2mdcexp(struct super_block *sb) -{ - return ll_s2sbi(sb)->ll_mdc_exp; -} - -static inline struct client_obd *sbi2mdc(struct ll_sb_info *sbi) -{ - struct obd_device *obd = sbi->ll_mdc_exp->exp_obd; - if (obd == NULL) - LBUG(); - return &obd->u.cli; -} - -// FIXME: replace the name of this with LL_SB to conform to kernel stuff -static inline struct ll_sb_info *ll_i2sbi(struct inode *inode) -{ - return ll_s2sbi(inode->i_sb); -} - -static inline struct obd_export *ll_i2obdexp(struct inode *inode) -{ - return ll_s2obdexp(inode->i_sb); -} - -static inline struct obd_export *ll_i2mdcexp(struct inode *inode) -{ - return ll_s2mdcexp(inode->i_sb); -} - -static inline void ll_inode2fid(struct ll_fid *fid, struct inode *inode) -{ - mdc_pack_fid(fid, inode->i_ino, inode->i_generation, - inode->i_mode & S_IFMT); -} - -static inline int ll_mds_max_easize(struct super_block *sb) -{ - return sbi2mdc(ll_s2sbi(sb))->cl_max_mds_easize; -} - -static inline __u64 ll_file_maxbytes(struct inode *inode) -{ - return ll_i2info(inode)->lli_maxbytes; -} - -/* llite/xattr.c */ -int ll_setxattr(struct dentry *dentry, const char *name, - const void *value, size_t size, int flags); -ssize_t ll_getxattr(struct dentry *dentry, const char *name, - void *buffer, size_t size); -ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size); -int ll_removexattr(struct dentry *dentry, const char *name); - -/* statahead.c */ - -#define LL_SA_RPC_MIN 2 -#define LL_SA_RPC_DEF 32 -#define LL_SA_RPC_MAX 8192 - -/* per inode struct, for dir only */ -struct ll_statahead_info { - struct inode *sai_inode; - unsigned int sai_generation; /* generation for statahead */ - atomic_t sai_refcount; /* when access this struct, hold - * refcount */ - unsigned int sai_sent; /* stat requests sent count */ - unsigned int sai_replied; /* stat requests which received - * reply */ - unsigned int sai_max; /* max ahead of lookup */ - unsigned int sai_index; /* index of statahead entry */ - unsigned int sai_hit; /* hit count */ - unsigned int sai_miss; /* miss count: - * for "ls -al" case, it includes - * hidden dentry miss; - * for "ls -l" case, it does not - * include hidden dentry miss. - * "sai_miss_hidden" is used for - * the later case. - */ - unsigned int sai_consecutive_miss; /* consecutive miss */ - unsigned int sai_miss_hidden;/* "ls -al", but first dentry - * is not a hidden one */ - unsigned int sai_skip_hidden;/* skipped hidden dentry count */ - unsigned int sai_ls_all:1; /* "ls -al", do stat-ahead for - * hidden entries */ - cfs_waitq_t sai_waitq; /* stat-ahead wait queue */ - struct ptlrpc_thread sai_thread; /* stat-ahead thread */ - struct list_head sai_entries; /* stat-ahead entries */ -}; - -int do_statahead_enter(struct inode *dir, struct dentry **dentry, int lookup); -void ll_statahead_exit(struct dentry *dentry, int result); -void ll_stop_statahead(struct inode *inode, void *key); - -static inline -void ll_d_wakeup(struct dentry *dentry) -{ - struct ll_dentry_data *lld = ll_d2d(dentry); - - LASSERT(dentry->d_op != &ll_init_d_ops); - if (lld != NULL) - cfs_waitq_broadcast(&lld->lld_waitq); -} - -static inline -int ll_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup) -{ - struct ll_sb_info *sbi = ll_i2sbi(dir); - struct ll_inode_info *lli = ll_i2info(dir); - - if (sbi->ll_sa_max == 0) - return -ENOTSUPP; - - /* not the same process, don't statahead */ - if (lli->lli_opendir_pid != cfs_curproc_pid()) - return -EBADF; - - return do_statahead_enter(dir, dentryp, lookup); -} - -/* llite ioctl register support rountine */ -#ifdef __KERNEL__ -enum llioc_iter { - LLIOC_CONT = 0, - LLIOC_STOP -}; - -#define LLIOC_MAX_CMD 256 - -/* - * Rules to write a callback function: - * - * Parameters: - * @magic: Dynamic ioctl call routine will feed this vaule with the pointer - * returned to ll_iocontrol_register. Callback functions should use this - * data to check the potential collasion of ioctl cmd. If collasion is - * found, callback function should return LLIOC_CONT. - * @rcp: The result of ioctl command. - * - * Return values: - * If @magic matches the pointer returned by ll_iocontrol_data, the - * callback should return LLIOC_STOP; return LLIOC_STOP otherwise. - */ -typedef enum llioc_iter (*llioc_callback_t)(struct inode *inode, - struct file *file, unsigned int cmd, unsigned long arg, - void *magic, int *rcp); - -enum llioc_iter ll_iocontrol_call(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, int *rcp); - -/* export functions */ -/* Register ioctl block dynamatically for a regular file. - * - * @cmd: the array of ioctl command set - * @count: number of commands in the @cmd - * @cb: callback function, it will be called if an ioctl command is found to - * belong to the command list @cmd. - * - * Return vaule: - * A magic pointer will be returned if success; - * otherwise, NULL will be returned. - * */ -void *ll_iocontrol_register(llioc_callback_t cb, int count, unsigned int *cmd); -void ll_iocontrol_unregister(void *magic); - -#endif - -#endif /* LLITE_INTERNAL_H */ diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c deleted file mode 100644 index 54fcd63740..0000000000 --- a/lustre/llite/llite_lib.c +++ /dev/null @@ -1,2188 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light Super operations - * - * Copyright (c) 2002-2005 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <linux/module.h> -#include <linux/types.h> -#include <linux/random.h> -#include <linux/version.h> - -#include <lustre_lite.h> -#include <lustre_ha.h> -#include <lustre_dlm.h> -#include <lprocfs_status.h> -#include <lustre_disk.h> -#include <lustre_param.h> -#include <lustre_cache.h> -#include "llite_internal.h" - -cfs_mem_cache_t *ll_file_data_slab; - -LIST_HEAD(ll_super_blocks); -spinlock_t ll_sb_lock = SPIN_LOCK_UNLOCKED; - -extern struct address_space_operations ll_aops; -extern struct address_space_operations ll_dir_aops; - -#ifndef log2 -#define log2(n) ffz(~(n)) -#endif - - -static struct ll_sb_info *ll_init_sbi(void) -{ - struct ll_sb_info *sbi = NULL; - class_uuid_t uuid; - int i; - ENTRY; - - OBD_ALLOC(sbi, sizeof(*sbi)); - if (!sbi) - RETURN(NULL); - - spin_lock_init(&sbi->ll_lock); - spin_lock_init(&sbi->ll_lco.lco_lock); - spin_lock_init(&sbi->ll_pp_extent_lock); - spin_lock_init(&sbi->ll_process_lock); - sbi->ll_rw_stats_on = 0; - INIT_LIST_HEAD(&sbi->ll_pglist); - if (num_physpages >> (20 - CFS_PAGE_SHIFT) < 512) - sbi->ll_async_page_max = num_physpages / 2; - else - sbi->ll_async_page_max = (num_physpages / 4) * 3; - sbi->ll_ra_info.ra_max_pages = min(num_physpages / 8, - SBI_DEFAULT_READAHEAD_MAX); - sbi->ll_ra_info.ra_max_read_ahead_whole_pages = - SBI_DEFAULT_READAHEAD_WHOLE_MAX; - sbi->ll_contention_time = SBI_DEFAULT_CONTENTION_SECONDS; - INIT_LIST_HEAD(&sbi->ll_conn_chain); - INIT_LIST_HEAD(&sbi->ll_orphan_dentry_list); - - ll_generate_random_uuid(uuid); - class_uuid_unparse(uuid, &sbi->ll_sb_uuid); - CDEBUG(D_CONFIG, "generated uuid: %s\n", sbi->ll_sb_uuid.uuid); - - spin_lock(&ll_sb_lock); - list_add_tail(&sbi->ll_list, &ll_super_blocks); - spin_unlock(&ll_sb_lock); - -#ifdef ENABLE_CHECKSUM - sbi->ll_flags |= LL_SBI_DATA_CHECKSUM; -#endif -#ifdef ENABLE_LLITE_CHECKSUM - sbi->ll_flags |= LL_SBI_LLITE_CHECKSUM; -#endif - -#ifdef HAVE_LRU_RESIZE_SUPPORT - sbi->ll_flags |= LL_SBI_LRU_RESIZE; -#endif - -#ifdef HAVE_EXPORT___IGET - INIT_LIST_HEAD(&sbi->ll_deathrow); - spin_lock_init(&sbi->ll_deathrow_lock); -#endif - for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) { - spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].pp_r_hist.oh_lock); - spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].pp_w_hist.oh_lock); - } - - /* metadata statahead is enabled by default */ - sbi->ll_sa_max = LL_SA_RPC_DEF; - - RETURN(sbi); -} - -void ll_free_sbi(struct super_block *sb) -{ - struct ll_sb_info *sbi = ll_s2sbi(sb); - ENTRY; - - if (sbi != NULL) { - spin_lock(&ll_sb_lock); - list_del(&sbi->ll_list); - spin_unlock(&ll_sb_lock); - OBD_FREE(sbi, sizeof(*sbi)); - } - EXIT; -} - -static struct dentry_operations ll_d_root_ops = { -#ifdef DCACHE_LUSTRE_INVALID - .d_compare = ll_dcompare, -#endif -}; - -static int client_common_fill_super(struct super_block *sb, - char *mdc, char *osc) -{ - struct inode *root = 0; - struct ll_sb_info *sbi = ll_s2sbi(sb); - struct obd_device *obd; - struct ll_fid rootfid; - struct obd_statfs osfs; - struct ptlrpc_request *request = NULL; - struct lustre_handle osc_conn = {0, }; - struct lustre_handle mdc_conn = {0, }; - struct lustre_md md; - struct obd_connect_data *data = NULL; - int err, checksum; - ENTRY; - - obd = class_name2obd(mdc); - if (!obd) { - CERROR("MDC %s: not setup or attached\n", mdc); - RETURN(-EINVAL); - } - - OBD_ALLOC(data, sizeof(*data)); - if (data == NULL) - RETURN(-ENOMEM); - - if (proc_lustre_fs_root) { - err = lprocfs_register_mountpoint(proc_lustre_fs_root, sb, - osc, mdc); - if (err < 0) - CERROR("could not register mount in /proc/lustre"); - } - - /* indicate the features supported by this client */ - data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_IBITS | - OBD_CONNECT_JOIN | OBD_CONNECT_ATTRFID | OBD_CONNECT_NODEVOH | - OBD_CONNECT_CANCELSET | OBD_CONNECT_AT; -#ifdef HAVE_LRU_RESIZE_SUPPORT - if (sbi->ll_flags & LL_SBI_LRU_RESIZE) - data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE; -#endif -#ifdef CONFIG_FS_POSIX_ACL - data->ocd_connect_flags |= OBD_CONNECT_ACL; -#endif - data->ocd_ibits_known = MDS_INODELOCK_FULL; - data->ocd_version = LUSTRE_VERSION_CODE; - - if (sb->s_flags & MS_RDONLY) - data->ocd_connect_flags |= OBD_CONNECT_RDONLY; - if (sbi->ll_flags & LL_SBI_USER_XATTR) - data->ocd_connect_flags |= OBD_CONNECT_XATTR; - -#ifdef HAVE_MS_FLOCK_LOCK - /* force vfs to use lustre handler for flock() calls - bug 10743 */ - sb->s_flags |= MS_FLOCK_LOCK; -#endif - - if (sbi->ll_flags & LL_SBI_FLOCK) - sbi->ll_fop = &ll_file_operations_flock; - else if (sbi->ll_flags & LL_SBI_LOCALFLOCK) - sbi->ll_fop = &ll_file_operations; - else - sbi->ll_fop = &ll_file_operations_noflock; - - err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid, data, NULL); - if (err == -EBUSY) { - LCONSOLE_ERROR_MSG(0x14f, "An MDT (mdc %s) is performing " - "recovery, of which this client is not a " - "part. Please wait for recovery to complete," - " abort, or time out.\n", mdc); - GOTO(out, err); - } else if (err) { - CERROR("cannot connect to %s: rc = %d\n", mdc, err); - GOTO(out, err); - } - sbi->ll_mdc_exp = class_conn2export(&mdc_conn); - - err = obd_statfs(obd, &osfs, cfs_time_current_64() - HZ, 0); - if (err) - GOTO(out_mdc, err); - - /* MDC connect is surely finished by now because we actually sent - * a statfs RPC, otherwise obd_connect() is asynchronous. */ - *data = class_exp2cliimp(sbi->ll_mdc_exp)->imp_connect_data; - - LASSERT(osfs.os_bsize); - sb->s_blocksize = osfs.os_bsize; - sb->s_blocksize_bits = log2(osfs.os_bsize); - sb->s_magic = LL_SUPER_MAGIC; - - /* for bug 11559. in $LINUX/fs/read_write.c, function do_sendfile(): - * retval = in_file->f_op->sendfile(...); - * if (*ppos > max) - * retval = -EOVERFLOW; - * - * it will check if *ppos is greater than max. However, max equals to - * s_maxbytes, which is a negative integer in a x86_64 box since loff_t - * has been defined as a signed long long ineger in linux kernel. */ -#if BITS_PER_LONG == 64 - sb->s_maxbytes = PAGE_CACHE_MAXBYTES >> 1; -#else - sb->s_maxbytes = PAGE_CACHE_MAXBYTES; -#endif - sbi->ll_namelen = osfs.os_namelen; - sbi->ll_max_rw_chunk = LL_DEFAULT_MAX_RW_CHUNK; - - if ((sbi->ll_flags & LL_SBI_USER_XATTR) && - !(data->ocd_connect_flags & OBD_CONNECT_XATTR)) { - LCONSOLE_INFO("Disabling user_xattr feature because " - "it is not supported on the server\n"); - sbi->ll_flags &= ~LL_SBI_USER_XATTR; - } - - if (data->ocd_connect_flags & OBD_CONNECT_ACL) { -#ifdef MS_POSIXACL - sb->s_flags |= MS_POSIXACL; -#endif - sbi->ll_flags |= LL_SBI_ACL; - } else - sbi->ll_flags &= ~LL_SBI_ACL; - - if (data->ocd_connect_flags & OBD_CONNECT_JOIN) - sbi->ll_flags |= LL_SBI_JOIN; - - sbi->ll_sdev_orig = sb->s_dev; - /* We set sb->s_dev equal on all lustre clients in order to support - * NFS export clustering. NFSD requires that the FSID be the same - * on all clients. */ - /* s_dev is also used in lt_compare() to compare two fs, but that is - * only a node-local comparison. */ - sb->s_dev = get_uuid2int(sbi2mdc(sbi)->cl_target_uuid.uuid, - strlen(sbi2mdc(sbi)->cl_target_uuid.uuid)); - obd = class_name2obd(osc); - if (!obd) { - CERROR("OSC %s: not setup or attached\n", osc); - GOTO(out_mdc, err = -ENODEV); - } - - data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_GRANT | - OBD_CONNECT_REQPORTAL | OBD_CONNECT_BRW_SIZE | - OBD_CONNECT_SRVLOCK | OBD_CONNECT_CANCELSET | OBD_CONNECT_AT; - - if (!OBD_FAIL_CHECK(OBD_FAIL_OSC_CONNECT_CKSUM)) { - /* OBD_CONNECT_CKSUM should always be set, even if checksums are - * disabled by default, because it can still be enabled on the - * fly via /proc. As a consequence, we still need to come to an - * agreement on the supported algorithms at connect time */ - data->ocd_connect_flags |= OBD_CONNECT_CKSUM; - - if (OBD_FAIL_CHECK(OBD_FAIL_OSC_CKSUM_ADLER_ONLY)) - data->ocd_cksum_types = OBD_CKSUM_ADLER; - else - /* send the list of supported checksum types */ - data->ocd_cksum_types = OBD_CKSUM_ALL; - } - -#ifdef HAVE_LRU_RESIZE_SUPPORT - if (sbi->ll_flags & LL_SBI_LRU_RESIZE) - data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE; -#endif - - CDEBUG(D_RPCTRACE, "ocd_connect_flags: "LPX64" ocd_version: %d " - "ocd_grant: %d\n", data->ocd_connect_flags, - data->ocd_version, data->ocd_grant); - - obd->obd_upcall.onu_owner = &sbi->ll_lco; - obd->obd_upcall.onu_upcall = ll_ocd_update; - data->ocd_brw_size = PTLRPC_MAX_BRW_PAGES << CFS_PAGE_SHIFT; - - err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid, data, NULL); - if (err == -EBUSY) { - LCONSOLE_ERROR_MSG(0x150, "An OST (osc %s) is performing " - "recovery, of which this client is not a " - "part. Please wait for recovery to " - "complete, abort, or time out.\n", osc); - GOTO(out, err); - } else if (err) { - CERROR("cannot connect to %s: rc = %d\n", osc, err); - GOTO(out_mdc, err); - } - sbi->ll_osc_exp = class_conn2export(&osc_conn); - spin_lock(&sbi->ll_lco.lco_lock); - sbi->ll_lco.lco_flags = data->ocd_connect_flags; - spin_unlock(&sbi->ll_lco.lco_lock); - - err = obd_register_page_removal_cb(sbi->ll_osc_exp, - ll_page_removal_cb, - ll_pin_extent_cb); - if (err) { - CERROR("cannot register page removal callback: rc = %d\n",err); - GOTO(out_osc, err); - } - err = obd_register_lock_cancel_cb(sbi->ll_osc_exp, - ll_extent_lock_cancel_cb); - if (err) { - CERROR("cannot register lock cancel callback: rc = %d\n", err); - GOTO(out_page_rm_cb, err); - } - - err = mdc_init_ea_size(sbi->ll_mdc_exp, sbi->ll_osc_exp); - if (err) { - CERROR("cannot set max EA and cookie sizes: rc = %d\n", err); - GOTO(out_lock_cn_cb, err); - } - - err = obd_prep_async_page(sbi->ll_osc_exp, NULL, NULL, NULL, - 0, NULL, NULL, NULL, 0, NULL); - if (err < 0) { - LCONSOLE_ERROR_MSG(0x151, "There are no OST's in this " - "filesystem. There must be at least one " - "active OST for a client to start.\n"); - GOTO(out_lock_cn_cb, err); - } - - if (!ll_async_page_slab) { - ll_async_page_slab_size = - size_round(sizeof(struct ll_async_page)) + err; - ll_async_page_slab = cfs_mem_cache_create("ll_async_page", - ll_async_page_slab_size, - 0, 0); - if (!ll_async_page_slab) - GOTO(out_lock_cn_cb, -ENOMEM); - } - - err = mdc_getstatus(sbi->ll_mdc_exp, &rootfid); - if (err) { - CERROR("cannot mds_connect: rc = %d\n", err); - GOTO(out_lock_cn_cb, err); - } - CDEBUG(D_SUPER, "rootfid "LPU64"\n", rootfid.id); - sbi->ll_rootino = rootfid.id; - - sb->s_op = &lustre_super_operations; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - sb->s_export_op = &lustre_export_operations; -#endif - - /* make root inode - * XXX: move this to after cbd setup? */ - err = mdc_getattr(sbi->ll_mdc_exp, &rootfid, - OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS | - (sbi->ll_flags & LL_SBI_ACL ? OBD_MD_FLACL : 0), - 0, &request); - if (err) { - CERROR("mdc_getattr failed for root: rc = %d\n", err); - GOTO(out_lock_cn_cb, err); - } - - err = mdc_req2lustre_md(request, REPLY_REC_OFF, sbi->ll_osc_exp, &md); - if (err) { - CERROR("failed to understand root inode md: rc = %d\n",err); - ptlrpc_req_finished (request); - GOTO(out_lock_cn_cb, err); - } - - LASSERT(sbi->ll_rootino != 0); - root = ll_iget(sb, sbi->ll_rootino, &md); - - ptlrpc_req_finished(request); - - if (root == NULL || is_bad_inode(root)) { - mdc_free_lustre_md(sbi->ll_osc_exp, &md); - CERROR("lustre_lite: bad iget4 for root\n"); - GOTO(out_root, err = -EBADF); - } - - err = ll_close_thread_start(&sbi->ll_lcq); - if (err) { - CERROR("cannot start close thread: rc %d\n", err); - GOTO(out_root, err); - } - - checksum = sbi->ll_flags & LL_SBI_DATA_CHECKSUM; - err = obd_set_info_async(sbi->ll_osc_exp, strlen("checksum"), - "checksum", sizeof(checksum), - &checksum, NULL); - - /* making vm readahead 0 for 2.4.x. In the case of 2.6.x, - backing dev info assigned to inode mapping is used for - determining maximal readahead. */ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) && \ - !defined(KERNEL_HAS_AS_MAX_READAHEAD) - /* bug 2805 - set VM readahead to zero */ - vm_max_readahead = vm_min_readahead = 0; -#endif - - sb->s_root = d_alloc_root(root); - if (data != NULL) - OBD_FREE(data, sizeof(*data)); - sb->s_root->d_op = &ll_d_root_ops; - RETURN(err); - -out_root: - if (root) - iput(root); -out_lock_cn_cb: - obd_unregister_lock_cancel_cb(sbi->ll_osc_exp, - ll_extent_lock_cancel_cb); -out_page_rm_cb: - obd_unregister_page_removal_cb(sbi->ll_osc_exp, - ll_page_removal_cb); -out_osc: - obd_disconnect(sbi->ll_osc_exp); - sbi->ll_osc_exp = NULL; -out_mdc: - obd_disconnect(sbi->ll_mdc_exp); - sbi->ll_mdc_exp = NULL; -out: - if (data != NULL) - OBD_FREE(data, sizeof(*data)); - lprocfs_unregister_mountpoint(sbi); - RETURN(err); -} - -int ll_get_max_mdsize(struct ll_sb_info *sbi, int *lmmsize) -{ - int size, rc; - - *lmmsize = obd_size_diskmd(sbi->ll_osc_exp, NULL); - size = sizeof(int); - rc = obd_get_info(sbi->ll_mdc_exp, strlen("max_easize"), "max_easize", - &size, lmmsize); - if (rc) - CERROR("Get max mdsize error rc %d \n", rc); - - RETURN(rc); -} - -void ll_dump_inode(struct inode *inode) -{ - struct list_head *tmp; - int dentry_count = 0; - - LASSERT(inode != NULL); - - list_for_each(tmp, &inode->i_dentry) - dentry_count++; - - CERROR("inode %p dump: dev=%s ino=%lu mode=%o count=%u, %d dentries\n", - inode, ll_i2mdcexp(inode)->exp_obd->obd_name, inode->i_ino, - inode->i_mode, atomic_read(&inode->i_count), dentry_count); -} - -void lustre_dump_dentry(struct dentry *dentry, int recur) -{ - struct list_head *tmp; - int subdirs = 0; - - LASSERT(dentry != NULL); - - list_for_each(tmp, &dentry->d_subdirs) - subdirs++; - - CERROR("dentry %p dump: name=%.*s parent=%.*s (%p), inode=%p, count=%u," - " flags=0x%x, fsdata=%p, %d subdirs\n", dentry, - dentry->d_name.len, dentry->d_name.name, - dentry->d_parent->d_name.len, dentry->d_parent->d_name.name, - dentry->d_parent, dentry->d_inode, atomic_read(&dentry->d_count), - dentry->d_flags, dentry->d_fsdata, subdirs); - if (dentry->d_inode != NULL) - ll_dump_inode(dentry->d_inode); - - if (recur == 0) - return; - - list_for_each(tmp, &dentry->d_subdirs) { - struct dentry *d = list_entry(tmp, struct dentry, d_child); - lustre_dump_dentry(d, recur - 1); - } -} - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -void lustre_throw_orphan_dentries(struct super_block *sb) -{ - struct dentry *dentry, *next; - struct ll_sb_info *sbi = ll_s2sbi(sb); - - /* Do this to get rid of orphaned dentries. That is not really trw. */ - list_for_each_entry_safe(dentry, next, &sbi->ll_orphan_dentry_list, - d_hash) { - CWARN("found orphan dentry %.*s (%p->%p) at unmount, dumping " - "before and after shrink_dcache_parent\n", - dentry->d_name.len, dentry->d_name.name, dentry, next); - lustre_dump_dentry(dentry, 1); - shrink_dcache_parent(dentry); - lustre_dump_dentry(dentry, 1); - } -} -#else -#define lustre_throw_orphan_dentries(sb) -#endif - -#ifdef HAVE_EXPORT___IGET -static void prune_dir_dentries(struct inode *inode) -{ - struct dentry *dentry, *prev = NULL; - - /* due to lustre specific logic, a directory - * can have few dentries - a bug from VFS POV */ -restart: - spin_lock(&dcache_lock); - if (!list_empty(&inode->i_dentry)) { - dentry = list_entry(inode->i_dentry.prev, - struct dentry, d_alias); - /* in order to prevent infinite loops we - * break if previous dentry is busy */ - if (dentry != prev) { - prev = dentry; - dget_locked(dentry); - spin_unlock(&dcache_lock); - - /* try to kill all child dentries */ - shrink_dcache_parent(dentry); - dput(dentry); - - /* now try to get rid of current dentry */ - d_prune_aliases(inode); - goto restart; - } - } - spin_unlock(&dcache_lock); -} - -static void prune_deathrow_one(struct ll_inode_info *lli) -{ - struct inode *inode = ll_info2i(lli); - - /* first, try to drop any dentries - they hold a ref on the inode */ - if (S_ISDIR(inode->i_mode)) - prune_dir_dentries(inode); - else - d_prune_aliases(inode); - - - /* if somebody still uses it, leave it */ - LASSERT(atomic_read(&inode->i_count) > 0); - if (atomic_read(&inode->i_count) > 1) - goto out; - - CDEBUG(D_INODE, "inode %lu/%u(%d) looks a good candidate for prune\n", - inode->i_ino,inode->i_generation, atomic_read(&inode->i_count)); - - /* seems nobody uses it anymore */ - inode->i_nlink = 0; - -out: - iput(inode); - return; -} - -static void prune_deathrow(struct ll_sb_info *sbi, int try) -{ - struct ll_inode_info *lli; - int empty; - - do { - if (need_resched() && try) - break; - - if (try) { - if (!spin_trylock(&sbi->ll_deathrow_lock)) - break; - } else { - spin_lock(&sbi->ll_deathrow_lock); - } - - empty = 1; - lli = NULL; - if (!list_empty(&sbi->ll_deathrow)) { - lli = list_entry(sbi->ll_deathrow.next, - struct ll_inode_info, - lli_dead_list); - list_del_init(&lli->lli_dead_list); - if (!list_empty(&sbi->ll_deathrow)) - empty = 0; - } - spin_unlock(&sbi->ll_deathrow_lock); - - if (lli) - prune_deathrow_one(lli); - - } while (empty == 0); -} -#else /* !HAVE_EXPORT___IGET */ -#define prune_deathrow(sbi, try) do {} while (0) -#endif /* HAVE_EXPORT___IGET */ - -void client_common_put_super(struct super_block *sb) -{ - struct ll_sb_info *sbi = ll_s2sbi(sb); - ENTRY; - - ll_close_thread_shutdown(sbi->ll_lcq); - - lprocfs_unregister_mountpoint(sbi); - - /* destroy inodes in deathrow */ - prune_deathrow(sbi, 0); - - list_del(&sbi->ll_conn_chain); - - /* callbacks is cleared after disconnect each target */ - obd_disconnect(sbi->ll_osc_exp); - sbi->ll_osc_exp = NULL; - - obd_disconnect(sbi->ll_mdc_exp); - sbi->ll_mdc_exp = NULL; - - lustre_throw_orphan_dentries(sb); - - EXIT; -} - -void ll_kill_super(struct super_block *sb) -{ - struct ll_sb_info *sbi; - - ENTRY; - - /* not init sb ?*/ - if (!(sb->s_flags & MS_ACTIVE)) - return; - - sbi = ll_s2sbi(sb); - /* we need restore s_dev from changed for clustred NFS before put_super - * because new kernels have cached s_dev and change sb->s_dev in - * put_super not affected real removing devices */ - if (sbi) - sb->s_dev = sbi->ll_sdev_orig; - EXIT; -} - -char *ll_read_opt(const char *opt, char *data) -{ - char *value; - char *retval; - ENTRY; - - CDEBUG(D_SUPER, "option: %s, data %s\n", opt, data); - if (strncmp(opt, data, strlen(opt))) - RETURN(NULL); - if ((value = strchr(data, '=')) == NULL) - RETURN(NULL); - - value++; - OBD_ALLOC(retval, strlen(value) + 1); - if (!retval) { - CERROR("out of memory!\n"); - RETURN(NULL); - } - - memcpy(retval, value, strlen(value)+1); - CDEBUG(D_SUPER, "Assigned option: %s, value %s\n", opt, retval); - RETURN(retval); -} - -static inline int ll_set_opt(const char *opt, char *data, int fl) -{ - if (strncmp(opt, data, strlen(opt)) != 0) - return(0); - else - return(fl); -} - -/* non-client-specific mount options are parsed in lmd_parse */ -static int ll_options(char *options, int *flags) -{ - int tmp; - char *s1 = options, *s2; - ENTRY; - - if (!options) - RETURN(0); - - CDEBUG(D_CONFIG, "Parsing opts %s\n", options); - - while (*s1) { - CDEBUG(D_SUPER, "next opt=%s\n", s1); - tmp = ll_set_opt("nolock", s1, LL_SBI_NOLCK); - if (tmp) { - *flags |= tmp; - goto next; - } - tmp = ll_set_opt("flock", s1, LL_SBI_FLOCK); - if (tmp) { - *flags |= tmp; - goto next; - } - tmp = ll_set_opt("localflock", s1, LL_SBI_LOCALFLOCK); - if (tmp) { - *flags |= tmp; - goto next; - } - tmp = ll_set_opt("noflock", s1, LL_SBI_FLOCK|LL_SBI_LOCALFLOCK); - if (tmp) { - *flags &= ~tmp; - goto next; - } - tmp = ll_set_opt("user_xattr", s1, LL_SBI_USER_XATTR); - if (tmp) { - *flags |= tmp; - goto next; - } - tmp = ll_set_opt("nouser_xattr", s1, LL_SBI_USER_XATTR); - if (tmp) { - *flags &= ~tmp; - goto next; - } - tmp = ll_set_opt("acl", s1, LL_SBI_ACL); - if (tmp) { - /* Ignore deprecated mount option. The client will - * always try to mount with ACL support, whether this - * is used depends on whether server supports it. */ - goto next; - } - tmp = ll_set_opt("noacl", s1, LL_SBI_ACL); - if (tmp) { - goto next; - } - - tmp = ll_set_opt("checksum", s1, LL_SBI_DATA_CHECKSUM); - if (tmp) { - *flags |= tmp; - goto next; - } - tmp = ll_set_opt("nochecksum", s1, LL_SBI_DATA_CHECKSUM); - if (tmp) { - *flags &= ~tmp; - goto next; - } - - tmp = ll_set_opt("lruresize", s1, LL_SBI_LRU_RESIZE); - if (tmp) { - *flags |= tmp; - goto next; - } - tmp = ll_set_opt("nolruresize", s1, LL_SBI_LRU_RESIZE); - if (tmp) { - *flags &= ~tmp; - goto next; - } - LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n", - s1); - RETURN(-EINVAL); - -next: - /* Find next opt */ - s2 = strchr(s1, ','); - if (s2 == NULL) - break; - s1 = s2 + 1; - } - RETURN(0); -} - -void ll_lli_init(struct ll_inode_info *lli) -{ - lli->lli_inode_magic = LLI_INODE_MAGIC; - sema_init(&lli->lli_size_sem, 1); - sema_init(&lli->lli_write_sem, 1); - lli->lli_flags = 0; - lli->lli_maxbytes = PAGE_CACHE_MAXBYTES; - spin_lock_init(&lli->lli_lock); - sema_init(&lli->lli_och_sem, 1); - lli->lli_mds_read_och = lli->lli_mds_write_och = NULL; - lli->lli_mds_exec_och = NULL; - lli->lli_open_fd_read_count = lli->lli_open_fd_write_count = 0; - lli->lli_open_fd_exec_count = 0; - INIT_LIST_HEAD(&lli->lli_dead_list); -#ifdef HAVE_CLOSE_THREAD - INIT_LIST_HEAD(&lli->lli_pending_write_llaps); -#endif -} - -/* COMPAT_146 */ -#define MDCDEV "mdc_dev" -static int old_lustre_process_log(struct super_block *sb, char *newprofile, - struct config_llog_instance *cfg) -{ - struct lustre_sb_info *lsi = s2lsi(sb); - struct obd_device *obd; - struct lustre_handle mdc_conn = {0, }; - struct obd_export *exp; - char *ptr, *mdt, *profile; - char niduuid[10] = "mdtnid0"; - class_uuid_t uuid; - struct obd_uuid mdc_uuid; - struct llog_ctxt *ctxt; - struct obd_connect_data ocd = { 0 }; - lnet_nid_t nid; - int i, rc = 0, recov_bk = 1, failnodes = 0; - ENTRY; - - ll_generate_random_uuid(uuid); - class_uuid_unparse(uuid, &mdc_uuid); - CDEBUG(D_HA, "generated uuid: %s\n", mdc_uuid.uuid); - - /* Figure out the old mdt and profile name from new-style profile - ("lustre" from "mds/lustre-client") */ - mdt = newprofile; - profile = strchr(mdt, '/'); - if (profile == NULL) { - CDEBUG(D_CONFIG, "Can't find MDT name in %s\n", newprofile); - GOTO(out, rc = -EINVAL); - } - *profile = '\0'; - profile++; - ptr = strrchr(profile, '-'); - if (ptr == NULL) { - CDEBUG(D_CONFIG, "Can't find client name in %s\n", newprofile); - GOTO(out, rc = -EINVAL); - } - *ptr = '\0'; - - LCONSOLE_WARN("This looks like an old mount command; I will try to " - "contact MDT '%s' for profile '%s'\n", mdt, profile); - - /* Use nids from mount line: uml1,1@elan:uml2,2@elan:/lustre */ - i = 0; - ptr = lsi->lsi_lmd->lmd_dev; - while (class_parse_nid(ptr, &nid, &ptr) == 0) { - rc = do_lcfg(MDCDEV, nid, LCFG_ADD_UUID, niduuid, 0,0,0); - i++; - /* Stop at the first failover nid */ - if (*ptr == ':') - break; - } - if (i == 0) { - CERROR("No valid MDT nids found.\n"); - GOTO(out, rc = -EINVAL); - } - failnodes++; - - rc = do_lcfg(MDCDEV, 0, LCFG_ATTACH, LUSTRE_MDC_NAME,mdc_uuid.uuid,0,0); - if (rc < 0) - GOTO(out_del_uuid, rc); - - rc = do_lcfg(MDCDEV, 0, LCFG_SETUP, mdt, niduuid, 0, 0); - if (rc < 0) { - LCONSOLE_ERROR_MSG(0x153, "I couldn't establish a connection " - "with the MDT. Check that the MDT host NID " - "is correct and the networks are up.\n"); - GOTO(out_detach, rc); - } - - obd = class_name2obd(MDCDEV); - if (obd == NULL) - GOTO(out_cleanup, rc = -EINVAL); - - /* Add any failover nids */ - while (*ptr == ':') { - /* New failover node */ - sprintf(niduuid, "mdtnid%d", failnodes); - i = 0; - while (class_parse_nid(ptr, &nid, &ptr) == 0) { - i++; - rc = do_lcfg(MDCDEV, nid, LCFG_ADD_UUID, niduuid,0,0,0); - if (rc) - CERROR("Add uuid for %s failed %d\n", - libcfs_nid2str(nid), rc); - if (*ptr == ':') - break; - } - if (i > 0) { - rc = do_lcfg(MDCDEV, 0, LCFG_ADD_CONN, niduuid, 0, 0,0); - if (rc) - CERROR("Add conn for %s failed %d\n", - libcfs_nid2str(nid), rc); - failnodes++; - } else { - /* at ":/fsname" */ - break; - } - } - - /* Try all connections, but only once. */ - rc = obd_set_info_async(obd->obd_self_export, - strlen("init_recov_bk"), "init_recov_bk", - sizeof(recov_bk), &recov_bk, NULL); - if (rc) - GOTO(out_cleanup, rc); - - /* If we don't have this then an ACL MDS will refuse the connection */ - ocd.ocd_connect_flags = OBD_CONNECT_ACL; - - rc = obd_connect(&mdc_conn, obd, &mdc_uuid, &ocd, NULL); - if (rc) { - CERROR("cannot connect to %s: rc = %d\n", mdt, rc); - GOTO(out_cleanup, rc); - } - - exp = class_conn2export(&mdc_conn); - - ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT); - - cfg->cfg_flags |= CFG_F_COMPAT146; - -#if 1 - rc = class_config_parse_llog(ctxt, profile, cfg); -#else - /* - * For debugging, it's useful to just dump the log - */ - rc = class_config_dump_llog(ctxt, profile, cfg); -#endif - llog_ctxt_put(ctxt); - switch (rc) { - case 0: { - /* Set the caller's profile name to the old-style */ - memcpy(newprofile, profile, strlen(profile) + 1); - break; - } - case -EINVAL: - LCONSOLE_ERROR_MSG(0x154, "%s: The configuration '%s' could not" - " be read from the MDT '%s'. Make sure this" - " client and the MDT are running compatible " - "versions of Lustre.\n", - obd->obd_name, profile, mdt); - /* fall through */ - default: - LCONSOLE_ERROR_MSG(0x155, "%s: The configuration '%s' could not" - " be read from the MDT '%s'. This may be " - "the result of communication errors between " - "the client and the MDT, or if the MDT is " - "not running.\n", obd->obd_name, profile, - mdt); - break; - } - - /* We don't so much care about errors in cleaning up the config llog - * connection, as we have already read the config by this point. */ - obd_disconnect(exp); - -out_cleanup: - do_lcfg(MDCDEV, 0, LCFG_CLEANUP, 0, 0, 0, 0); - -out_detach: - do_lcfg(MDCDEV, 0, LCFG_DETACH, 0, 0, 0, 0); - -out_del_uuid: - /* class_add_uuid adds a nid even if the same uuid exists; we might - delete any copy here. So they all better match. */ - for (i = 0; i < failnodes; i++) { - sprintf(niduuid, "mdtnid%d", i); - do_lcfg(MDCDEV, 0, LCFG_DEL_UUID, niduuid, 0, 0, 0); - } - /* class_import_put will get rid of the additional connections */ -out: - RETURN(rc); -} -/* end COMPAT_146 */ - -int ll_fill_super(struct super_block *sb) -{ - struct lustre_profile *lprof; - struct lustre_sb_info *lsi = s2lsi(sb); - struct ll_sb_info *sbi; - char *osc = NULL, *mdc = NULL; - char *profilenm = get_profile_name(sb); - struct config_llog_instance cfg = {0, }; - char ll_instance[sizeof(sb) * 2 + 1]; - int err; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op: sb %p\n", sb); - - cfs_module_get(); - - /* client additional sb info */ - lsi->lsi_llsbi = sbi = ll_init_sbi(); - if (!sbi) { - cfs_module_put(); - RETURN(-ENOMEM); - } - - err = ll_options(lsi->lsi_lmd->lmd_opts, &sbi->ll_flags); - if (err) - GOTO(out_free, err); - - /* Generate a string unique to this super, in case some joker tries - to mount the same fs at two mount points. - Use the address of the super itself.*/ - sprintf(ll_instance, "%p", sb); - cfg.cfg_instance = ll_instance; - cfg.cfg_uuid = lsi->lsi_llsbi->ll_sb_uuid; - - /* set up client obds */ - if (strchr(profilenm, '/') != NULL) /* COMPAT_146 */ - err = -EINVAL; /* skip error messages, use old config code */ - else - err = lustre_process_log(sb, profilenm, &cfg); - /* COMPAT_146 */ - if (err < 0) { - char *oldname; - int rc, oldnamelen; - oldnamelen = strlen(profilenm) + 1; - /* Temp storage for 1.4.6 profile name */ - OBD_ALLOC(oldname, oldnamelen); - if (oldname) { - memcpy(oldname, profilenm, oldnamelen); - rc = old_lustre_process_log(sb, oldname, &cfg); - if (rc >= 0) { - /* That worked - update the profile name - permanently */ - err = rc; - OBD_FREE(lsi->lsi_lmd->lmd_profile, - strlen(lsi->lsi_lmd->lmd_profile) + 1); - OBD_ALLOC(lsi->lsi_lmd->lmd_profile, - strlen(oldname) + 1); - if (!lsi->lsi_lmd->lmd_profile) { - OBD_FREE(oldname, oldnamelen); - GOTO(out_free, err = -ENOMEM); - } - memcpy(lsi->lsi_lmd->lmd_profile, oldname, - strlen(oldname) + 1); - profilenm = get_profile_name(sb); - /* Don't ever try to recover the MGS */ - rc = ptlrpc_set_import_active( - lsi->lsi_mgc->u.cli.cl_import, 0); - } - OBD_FREE(oldname, oldnamelen); - } - } - /* end COMPAT_146 */ - if (err < 0) { - CERROR("Unable to process log: %d\n", err); - GOTO(out_free, err); - } - - lprof = class_get_profile(profilenm); - if (lprof == NULL) { - LCONSOLE_ERROR_MSG(0x156, "The client profile '%s' could not be" - " read from the MGS. Does that filesystem " - "exist?\n", profilenm); - GOTO(out_free, err = -EINVAL); - } - CDEBUG(D_CONFIG, "Found profile %s: mdc=%s osc=%s\n", profilenm, - lprof->lp_mdc, lprof->lp_osc); - - OBD_ALLOC(osc, strlen(lprof->lp_osc) + - strlen(ll_instance) + 2); - if (!osc) - GOTO(out_free, err = -ENOMEM); - sprintf(osc, "%s-%s", lprof->lp_osc, ll_instance); - - OBD_ALLOC(mdc, strlen(lprof->lp_mdc) + - strlen(ll_instance) + 2); - if (!mdc) - GOTO(out_free, err = -ENOMEM); - sprintf(mdc, "%s-%s", lprof->lp_mdc, ll_instance); - - /* connections, registrations, sb setup */ - err = client_common_fill_super(sb, mdc, osc); - -out_free: - if (mdc) - OBD_FREE(mdc, strlen(mdc) + 1); - if (osc) - OBD_FREE(osc, strlen(osc) + 1); - if (err) - ll_put_super(sb); - else - LCONSOLE_WARN("Client %s has started\n", profilenm); - - RETURN(err); -} /* ll_fill_super */ - - -void ll_put_super(struct super_block *sb) -{ - struct config_llog_instance cfg; - char ll_instance[sizeof(sb) * 2 + 1]; - struct obd_device *obd; - struct lustre_sb_info *lsi = s2lsi(sb); - struct ll_sb_info *sbi = ll_s2sbi(sb); - char *profilenm = get_profile_name(sb); - int force = 1, next; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op: sb %p - %s\n", sb, profilenm); - - sprintf(ll_instance, "%p", sb); - cfg.cfg_instance = ll_instance; - lustre_end_log(sb, NULL, &cfg); - - if (sbi->ll_mdc_exp) { - obd = class_exp2obd(sbi->ll_mdc_exp); - if (obd) - force = obd->obd_force; - } - - /* We need to set force before the lov_disconnect in - lustre_common_put_super, since l_d cleans up osc's as well. */ - if (force) { - next = 0; - while ((obd = class_devices_in_group(&sbi->ll_sb_uuid, - &next)) != NULL) { - obd->obd_force = force; - } - } - - if (sbi->ll_lcq) { - /* Only if client_common_fill_super succeeded */ - client_common_put_super(sb); - } - - next = 0; - while ((obd = class_devices_in_group(&sbi->ll_sb_uuid, &next)) !=NULL) { - class_manual_cleanup(obd); - } - - if (profilenm) - class_del_profile(profilenm); - - ll_free_sbi(sb); - lsi->lsi_llsbi = NULL; - - lustre_common_put_super(sb); - - LCONSOLE_WARN("client %s umount complete\n", ll_instance); - - cfs_module_put(); - - EXIT; -} /* client_put_super */ - -#ifdef HAVE_REGISTER_CACHE -#include <linux/cache_def.h> -#ifdef HAVE_CACHE_RETURN_INT -static int -#else -static void -#endif -ll_shrink_cache(int priority, unsigned int gfp_mask) -{ - struct ll_sb_info *sbi; - int count = 0; - - list_for_each_entry(sbi, &ll_super_blocks, ll_list) - count += llap_shrink_cache(sbi, priority); - -#ifdef HAVE_CACHE_RETURN_INT - return count; -#endif -} - -struct cache_definition ll_cache_definition = { - .name = "llap_cache", - .shrink = ll_shrink_cache -}; -#endif /* HAVE_REGISTER_CACHE */ - -struct inode *ll_inode_from_lock(struct ldlm_lock *lock) -{ - struct inode *inode = NULL; - /* NOTE: we depend on atomic igrab() -bzzz */ - lock_res_and_lock(lock); - if (lock->l_ast_data) { - struct ll_inode_info *lli = ll_i2info(lock->l_ast_data); - if (lli->lli_inode_magic == LLI_INODE_MAGIC) { - inode = igrab(lock->l_ast_data); - } else { - inode = lock->l_ast_data; - ldlm_lock_debug(NULL, inode->i_state & I_FREEING ? - D_INFO : D_WARNING, - lock, __FILE__, __func__, __LINE__, - "l_ast_data %p is bogus: magic %08x", - lock->l_ast_data, lli->lli_inode_magic); - inode = NULL; - } - } - unlock_res_and_lock(lock); - return inode; -} - -static int null_if_equal(struct ldlm_lock *lock, void *data) -{ - if (data == lock->l_ast_data) { - lock->l_ast_data = NULL; - - if (lock->l_req_mode != lock->l_granted_mode) - LDLM_ERROR(lock,"clearing inode with ungranted lock"); - } - - return LDLM_ITER_CONTINUE; -} - -void ll_clear_inode(struct inode *inode) -{ - struct ll_fid fid; - struct ll_inode_info *lli = ll_i2info(inode); - struct ll_sb_info *sbi = ll_i2sbi(inode); - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino, - inode->i_generation, inode); - - if (S_ISDIR(inode->i_mode)) { - /* these should have been cleared in ll_file_release */ - LASSERT(lli->lli_sai == NULL); - LASSERT(lli->lli_opendir_key == NULL); - LASSERT(lli->lli_opendir_pid == 0); - } - - ll_inode2fid(&fid, inode); - clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &lli->lli_flags); - mdc_change_cbdata(sbi->ll_mdc_exp, &fid, null_if_equal, inode); - - LASSERT(!lli->lli_open_fd_write_count); - LASSERT(!lli->lli_open_fd_read_count); - LASSERT(!lli->lli_open_fd_exec_count); - - if (lli->lli_mds_write_och) - ll_mdc_real_close(inode, FMODE_WRITE); - if (lli->lli_mds_exec_och) { - if (!FMODE_EXEC) - CERROR("No FMODE exec, bug exec och is present for " - "inode %ld\n", inode->i_ino); - ll_mdc_real_close(inode, FMODE_EXEC); - } - if (lli->lli_mds_read_och) - ll_mdc_real_close(inode, FMODE_READ); - - - if (lli->lli_smd) { - obd_change_cbdata(sbi->ll_osc_exp, lli->lli_smd, - null_if_equal, inode); - - obd_free_memmd(sbi->ll_osc_exp, &lli->lli_smd); - lli->lli_smd = NULL; - } - - if (lli->lli_symlink_name) { - OBD_FREE(lli->lli_symlink_name, - strlen(lli->lli_symlink_name) + 1); - lli->lli_symlink_name = NULL; - } - -#ifdef CONFIG_FS_POSIX_ACL - if (lli->lli_posix_acl) { - LASSERT(atomic_read(&lli->lli_posix_acl->a_refcount) == 1); - posix_acl_release(lli->lli_posix_acl); - lli->lli_posix_acl = NULL; - } -#endif - - lli->lli_inode_magic = LLI_INODE_DEAD; - -#ifdef HAVE_EXPORT___IGET - spin_lock(&sbi->ll_deathrow_lock); - list_del_init(&lli->lli_dead_list); - spin_unlock(&sbi->ll_deathrow_lock); -#endif - - EXIT; -} -static int ll_setattr_do_truncate(struct inode *inode, loff_t new_size) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - int rc; - ldlm_policy_data_t policy = { .l_extent = {new_size, - OBD_OBJECT_EOF } }; - struct lustre_handle lockh = { 0 }; - int local_lock = 0; /* 0 - no local lock; - * 1 - lock taken by lock_extent; - * 2 - by obd_match*/ - int ast_flags; - int err; - ENTRY; - - UNLOCK_INODE_MUTEX(inode); - UP_WRITE_I_ALLOC_SEM(inode); - - if (sbi->ll_lco.lco_flags & OBD_CONNECT_TRUNCLOCK) { - ast_flags = LDLM_FL_BLOCK_GRANTED; - rc = obd_match(sbi->ll_osc_exp, lsm, LDLM_EXTENT, - &policy, LCK_PW, &ast_flags, inode, &lockh); - if (rc > 0) { - local_lock = 2; - rc = 0; - } else if (rc == 0) { - rc = ll_file_punch(inode, new_size, 1); - } - } else { - /* XXX when we fix the AST intents to pass the discard-range - * XXX extent, make ast_flags always LDLM_AST_DISCARD_DATA - * XXX here. */ - ast_flags = (new_size == 0) ? LDLM_AST_DISCARD_DATA : 0; - rc = ll_extent_lock(NULL, inode, lsm, LCK_PW, &policy, - &lockh, ast_flags); - if (likely(rc == 0)) - local_lock = 1; - } - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - DOWN_WRITE_I_ALLOC_SEM(inode); - LOCK_INODE_MUTEX(inode); -#else - LOCK_INODE_MUTEX(inode); - DOWN_WRITE_I_ALLOC_SEM(inode); -#endif - if (likely(rc == 0)) { - /* Only ll_inode_size_lock is taken at this level. - * lov_stripe_lock() is grabbed by ll_truncate() only over - * call to obd_adjust_kms(). If vmtruncate returns 0, then - * ll_truncate dropped ll_inode_size_lock() */ - ll_inode_size_lock(inode, 0); - if (!local_lock) - set_bit(LLI_F_SRVLOCK, &lli->lli_flags); - rc = vmtruncate(inode, new_size); - clear_bit(LLI_F_SRVLOCK, &lli->lli_flags); - if (rc != 0) { - LASSERT(atomic_read(&lli->lli_size_sem.count) <= 0); - ll_inode_size_unlock(inode, 0); - } - } - if (local_lock) { - if (local_lock == 2) - err = obd_cancel(sbi->ll_osc_exp, lsm, LCK_PW, &lockh); - else - err = ll_extent_unlock(NULL, inode, lsm, LCK_PW, &lockh); - if (unlikely(err != 0)){ - CERROR("extent unlock failed: err=%d," - " unlock method =%d\n", err, local_lock); - if (rc == 0) - rc = err; - } - } - RETURN(rc); -} - -/* If this inode has objects allocated to it (lsm != NULL), then the OST - * object(s) determine the file size and mtime. Otherwise, the MDS will - * keep these values until such a time that objects are allocated for it. - * We do the MDS operations first, as it is checking permissions for us. - * We don't to the MDS RPC if there is nothing that we want to store there, - * otherwise there is no harm in updating mtime/atime on the MDS if we are - * going to do an RPC anyways. - * - * If we are doing a truncate, we will send the mtime and ctime updates - * to the OST with the punch RPC, otherwise we do an explicit setattr RPC. - * I don't believe it is possible to get e.g. ATTR_MTIME_SET and ATTR_SIZE - * at the same time. - */ -int ll_setattr_raw(struct inode *inode, struct iattr *attr) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data; - struct lustre_md md; - int ia_valid = attr->ia_valid; - int rc = 0; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu valid %x\n", inode->i_ino, - attr->ia_valid); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETATTR, 1); - - if (ia_valid & ATTR_SIZE) { - if (attr->ia_size > ll_file_maxbytes(inode)) { - CDEBUG(D_INODE, "file too large %llu > "LPU64"\n", - attr->ia_size, ll_file_maxbytes(inode)); - RETURN(-EFBIG); - } - - attr->ia_valid |= ATTR_MTIME | ATTR_CTIME; - } - - /* POSIX: check before ATTR_*TIME_SET set (from inode_change_ok) */ - if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) { - if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER)) - RETURN(-EPERM); - } - - /* We mark all of the fields "set" so MDS/OST does not re-set them */ - if (attr->ia_valid & ATTR_CTIME) { - attr->ia_ctime = CURRENT_TIME; - attr->ia_valid |= ATTR_CTIME_SET; - } - if (!(ia_valid & ATTR_ATIME_SET) && (attr->ia_valid & ATTR_ATIME)) { - attr->ia_atime = CURRENT_TIME; - attr->ia_valid |= ATTR_ATIME_SET; - } - if (!(ia_valid & ATTR_MTIME_SET) && (attr->ia_valid & ATTR_MTIME)) { - attr->ia_mtime = CURRENT_TIME; - attr->ia_valid |= ATTR_MTIME_SET; - } - if ((attr->ia_valid & ATTR_CTIME) && !(attr->ia_valid & ATTR_MTIME)) { - /* To avoid stale mtime on mds, obtain it from ost and send - to mds. */ - rc = ll_glimpse_size(inode, 0); - if (rc) - RETURN(rc); - - attr->ia_valid |= ATTR_MTIME_SET | ATTR_MTIME; - attr->ia_mtime = inode->i_mtime; - } - - if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %lu\n", - LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), - CURRENT_SECONDS); - - /* NB: ATTR_SIZE will only be set after this point if the size - * resides on the MDS, ie, this file has no objects. */ - if (lsm) - attr->ia_valid &= ~ATTR_SIZE; - - /* We always do an MDS RPC, even if we're only changing the size; - * only the MDS knows whether truncate() should fail with -ETXTBUSY */ - ll_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0, NULL); - - rc = mdc_setattr(sbi->ll_mdc_exp, &op_data, - attr, NULL, 0, NULL, 0, &request); - - if (rc) { - ptlrpc_req_finished(request); - if (rc == -ENOENT) { - inode->i_nlink = 0; - /* Unlinked special device node? Or just a race? - * Pretend we done everything. */ - if (!S_ISREG(inode->i_mode) && - !S_ISDIR(inode->i_mode)) - rc = inode_setattr(inode, attr); - } else if (rc != -EPERM && rc != -EACCES && rc != -ETXTBSY) - CERROR("mdc_setattr fails: rc = %d\n", rc); - RETURN(rc); - } - - rc = mdc_req2lustre_md(request, REPLY_REC_OFF, sbi->ll_osc_exp, &md); - if (rc) { - ptlrpc_req_finished(request); - RETURN(rc); - } - - /* We call inode_setattr to adjust timestamps. - * If there is at least some data in file, we cleared ATTR_SIZE above to - * avoid invoking vmtruncate, otherwise it is important to call - * vmtruncate in inode_setattr to update inode->i_size (bug 6196) */ - rc = inode_setattr(inode, attr); - - ll_update_inode(inode, &md); - ptlrpc_req_finished(request); - - if (!lsm || !S_ISREG(inode->i_mode)) { - CDEBUG(D_INODE, "no lsm: not setting attrs on OST\n"); - RETURN(rc); - } - - /* We really need to get our PW lock before we change inode->i_size. - * If we don't we can race with other i_size updaters on our node, like - * ll_file_read. We can also race with i_size propogation to other - * nodes through dirtying and writeback of final cached pages. This - * last one is especially bad for racing o_append users on other - * nodes. */ - if (ia_valid & ATTR_SIZE) { - rc = ll_setattr_do_truncate(inode, attr->ia_size); - } else if (ia_valid & (ATTR_MTIME | ATTR_MTIME_SET)) { - obd_flag flags; - struct obd_info oinfo = { { { 0 } } }; - struct obdo *oa; - OBDO_ALLOC(oa); - - CDEBUG(D_INODE, "set mtime on OST inode %lu to %lu\n", - inode->i_ino, LTIME_S(attr->ia_mtime)); - - if (oa) { - oa->o_id = lsm->lsm_object_id; - oa->o_valid = OBD_MD_FLID; - - flags = OBD_MD_FLTYPE | OBD_MD_FLATIME | - OBD_MD_FLMTIME | OBD_MD_FLCTIME | - OBD_MD_FLFID | OBD_MD_FLGENER; - - obdo_from_inode(oa, inode, flags); - - oinfo.oi_oa = oa; - oinfo.oi_md = lsm; - - rc = obd_setattr_rqset(sbi->ll_osc_exp, &oinfo, NULL); - if (rc) - CERROR("obd_setattr_async fails: rc=%d\n", rc); - OBDO_FREE(oa); - } else { - rc = -ENOMEM; - } - } - RETURN(rc); -} - -int ll_setattr(struct dentry *de, struct iattr *attr) -{ - if ((attr->ia_valid & (ATTR_CTIME|ATTR_SIZE|ATTR_MODE)) == - (ATTR_CTIME|ATTR_SIZE|ATTR_MODE)) - attr->ia_valid |= MDS_OPEN_OWNEROVERRIDE; - - return ll_setattr_raw(de->d_inode, attr); -} - -int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs, - __u64 max_age, __u32 flags) -{ - struct ll_sb_info *sbi = ll_s2sbi(sb); - struct obd_statfs obd_osfs; - int rc; - ENTRY; - - rc = obd_statfs(class_exp2obd(sbi->ll_mdc_exp), osfs, max_age, flags); - if (rc) { - CERROR("mdc_statfs fails: rc = %d\n", rc); - RETURN(rc); - } - - osfs->os_type = sb->s_magic; - - CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n", - osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files); - - rc = obd_statfs_rqset(class_exp2obd(sbi->ll_osc_exp), - &obd_osfs, max_age, flags); - if (rc) { - CERROR("obd_statfs fails: rc = %d\n", rc); - RETURN(rc); - } - - CDEBUG(D_SUPER, "OSC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n", - obd_osfs.os_bavail, obd_osfs.os_blocks, obd_osfs.os_ffree, - obd_osfs.os_files); - - osfs->os_bsize = obd_osfs.os_bsize; - osfs->os_blocks = obd_osfs.os_blocks; - osfs->os_bfree = obd_osfs.os_bfree; - osfs->os_bavail = obd_osfs.os_bavail; - - /* If we don't have as many objects free on the OST as inodes - * on the MDS, we reduce the total number of inodes to - * compensate, so that the "inodes in use" number is correct. - */ - if (obd_osfs.os_ffree < osfs->os_ffree) { - osfs->os_files = (osfs->os_files - osfs->os_ffree) + - obd_osfs.os_ffree; - osfs->os_ffree = obd_osfs.os_ffree; - } - - RETURN(rc); -} -#ifndef HAVE_STATFS_DENTRY_PARAM -int ll_statfs(struct super_block *sb, struct kstatfs *sfs) -{ -#else -int ll_statfs(struct dentry *de, struct kstatfs *sfs) -{ - struct super_block *sb = de->d_sb; -#endif - struct obd_statfs osfs; - int rc; - - CDEBUG(D_VFSTRACE, "VFS Op: at "LPU64" jiffies\n", get_jiffies_64()); - ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_STAFS, 1); - - /* For now we will always get up-to-date statfs values, but in the - * future we may allow some amount of caching on the client (e.g. - * from QOS or lprocfs updates). */ - rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - 1, 0); - if (rc) - return rc; - - statfs_unpack(sfs, &osfs); - - /* We need to downshift for all 32-bit kernels, because we can't - * tell if the kernel is being called via sys_statfs64() or not. - * Stop before overflowing f_bsize - in which case it is better - * to just risk EOVERFLOW if caller is using old sys_statfs(). */ - if (sizeof(long) < 8) { - while (osfs.os_blocks > ~0UL && sfs->f_bsize < 0x40000000) { - sfs->f_bsize <<= 1; - - osfs.os_blocks >>= 1; - osfs.os_bfree >>= 1; - osfs.os_bavail >>= 1; - } - } - - sfs->f_blocks = osfs.os_blocks; - sfs->f_bfree = osfs.os_bfree; - sfs->f_bavail = osfs.os_bavail; - - return 0; -} - -void ll_inode_size_lock(struct inode *inode, int lock_lsm) -{ - struct ll_inode_info *lli; - struct lov_stripe_md *lsm; - - lli = ll_i2info(inode); - LASSERT(lli->lli_size_sem_owner != current); - down(&lli->lli_size_sem); - LASSERT(lli->lli_size_sem_owner == NULL); - lli->lli_size_sem_owner = current; - lsm = lli->lli_smd; - LASSERTF(lsm != NULL || lock_lsm == 0, "lsm %p, lock_lsm %d\n", - lsm, lock_lsm); - if (lock_lsm) - lov_stripe_lock(lsm); -} - -void ll_inode_size_unlock(struct inode *inode, int unlock_lsm) -{ - struct ll_inode_info *lli; - struct lov_stripe_md *lsm; - - lli = ll_i2info(inode); - lsm = lli->lli_smd; - LASSERTF(lsm != NULL || unlock_lsm == 0, "lsm %p, lock_lsm %d\n", - lsm, unlock_lsm); - if (unlock_lsm) - lov_stripe_unlock(lsm); - LASSERT(lli->lli_size_sem_owner == current); - lli->lli_size_sem_owner = NULL; - up(&lli->lli_size_sem); -} - -static void ll_replace_lsm(struct inode *inode, struct lov_stripe_md *lsm) -{ - struct ll_inode_info *lli = ll_i2info(inode); - - dump_lsm(D_INODE, lsm); - dump_lsm(D_INODE, lli->lli_smd); - LASSERTF(lsm->lsm_magic == LOV_MAGIC_JOIN, - "lsm must be joined lsm %p\n", lsm); - obd_free_memmd(ll_i2obdexp(inode), &lli->lli_smd); - CDEBUG(D_INODE, "replace lsm %p to lli_smd %p for inode %lu%u(%p)\n", - lsm, lli->lli_smd, inode->i_ino, inode->i_generation, inode); - lli->lli_smd = lsm; - lli->lli_maxbytes = lsm->lsm_maxbytes; - if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES) - lli->lli_maxbytes = PAGE_CACHE_MAXBYTES; -} - -void ll_update_inode(struct inode *inode, struct lustre_md *md) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct mds_body *body = md->body; - struct lov_stripe_md *lsm = md->lsm; - - LASSERT ((lsm != NULL) == ((body->valid & OBD_MD_FLEASIZE) != 0)); - if (lsm != NULL) { - if (lli->lli_smd == NULL) { - if (lsm->lsm_magic != LOV_MAGIC && - lsm->lsm_magic != LOV_MAGIC_JOIN) { - dump_lsm(D_ERROR, lsm); - LBUG(); - } - CDEBUG(D_INODE, "adding lsm %p to inode %lu/%u(%p)\n", - lsm, inode->i_ino, inode->i_generation, inode); - /* ll_inode_size_lock() requires it is only called - * with lli_smd != NULL or lock_lsm == 0 or we can - * race between lock/unlock. bug 9547 */ - lli->lli_smd = lsm; - lli->lli_maxbytes = lsm->lsm_maxbytes; - if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES) - lli->lli_maxbytes = PAGE_CACHE_MAXBYTES; - } else { - if (lli->lli_smd->lsm_magic == lsm->lsm_magic && - lli->lli_smd->lsm_stripe_count == - lsm->lsm_stripe_count) { - if (lov_stripe_md_cmp(lli->lli_smd, lsm)) { - CERROR("lsm mismatch for inode %ld\n", - inode->i_ino); - CERROR("lli_smd:\n"); - dump_lsm(D_ERROR, lli->lli_smd); - CERROR("lsm:\n"); - dump_lsm(D_ERROR, lsm); - LBUG(); - } - } else - ll_replace_lsm(inode, lsm); - } - if (lli->lli_smd != lsm) - obd_free_memmd(ll_i2obdexp(inode), &lsm); - } - -#ifdef CONFIG_FS_POSIX_ACL - LASSERT(!md->posix_acl || (body->valid & OBD_MD_FLACL)); - if (body->valid & OBD_MD_FLACL) { - spin_lock(&lli->lli_lock); - if (lli->lli_posix_acl) - posix_acl_release(lli->lli_posix_acl); - lli->lli_posix_acl = md->posix_acl; - spin_unlock(&lli->lli_lock); - } -#endif - - if (body->valid & OBD_MD_FLID) - inode->i_ino = body->ino; - if (body->valid & OBD_MD_FLATIME && - body->atime > LTIME_S(inode->i_atime)) - LTIME_S(inode->i_atime) = body->atime; - - /* mtime is always updated with ctime, but can be set in past. - As write and utime(2) may happen within 1 second, and utime's - mtime has a priority over write's one, so take mtime from mds - for the same ctimes. */ - if (body->valid & OBD_MD_FLCTIME && - body->ctime >= LTIME_S(inode->i_ctime)) { - LTIME_S(inode->i_ctime) = body->ctime; - if (body->valid & OBD_MD_FLMTIME) { - CDEBUG(D_INODE, "setting ino %lu mtime " - "from %lu to "LPU64"\n", inode->i_ino, - LTIME_S(inode->i_mtime), body->mtime); - LTIME_S(inode->i_mtime) = body->mtime; - } - } - if (body->valid & OBD_MD_FLMODE) - inode->i_mode = (inode->i_mode & S_IFMT)|(body->mode & ~S_IFMT); - if (body->valid & OBD_MD_FLTYPE) - inode->i_mode = (inode->i_mode & ~S_IFMT)|(body->mode & S_IFMT); - if (S_ISREG(inode->i_mode)) { - inode->i_blkbits = min(PTLRPC_MAX_BRW_BITS+1, LL_MAX_BLKSIZE_BITS); - } else { - inode->i_blkbits = inode->i_sb->s_blocksize_bits; - } -#ifdef HAVE_INODE_BLKSIZE - inode->i_blksize = 1<<inode->i_blkbits; -#endif - if (body->valid & OBD_MD_FLUID) - inode->i_uid = body->uid; - if (body->valid & OBD_MD_FLGID) - inode->i_gid = body->gid; - if (body->valid & OBD_MD_FLFLAGS) - inode->i_flags = ll_ext_to_inode_flags(body->flags); - if (body->valid & OBD_MD_FLNLINK) - inode->i_nlink = body->nlink; - if (body->valid & OBD_MD_FLGENER) - inode->i_generation = body->generation; - if (body->valid & OBD_MD_FLRDEV) -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - inode->i_rdev = body->rdev; -#else - inode->i_rdev = old_decode_dev(body->rdev); -#endif - if (body->valid & OBD_MD_FLSIZE) { -#if 0 /* Can't block ll_test_inode->ll_update_inode, b=14326*/ - ll_inode_size_lock(inode, 0); - i_size_write(inode, body->size); - ll_inode_size_unlock(inode, 0); -#else - inode->i_size = body->size; -#endif - } - if (body->valid & OBD_MD_FLBLOCKS) - inode->i_blocks = body->blocks; - - if (body->valid & OBD_MD_FLSIZE) - set_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &lli->lli_flags); -} - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -static struct backing_dev_info ll_backing_dev_info = { - .ra_pages = 0, /* No readahead */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) - .capabilities = 0, /* Does contribute to dirty memory */ -#else - .memory_backed = 0, /* Does contribute to dirty memory */ -#endif -}; -#endif - -void ll_read_inode2(struct inode *inode, void *opaque) -{ - struct lustre_md *md = opaque; - struct ll_inode_info *lli = ll_i2info(inode); - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino, - inode->i_generation, inode); - - ll_lli_init(lli); - - LASSERT(!lli->lli_smd); - - /* Core attributes from the MDS first. This is a new inode, and - * the VFS doesn't zero times in the core inode so we have to do - * it ourselves. They will be overwritten by either MDS or OST - * attributes - we just need to make sure they aren't newer. */ - LTIME_S(inode->i_mtime) = 0; - LTIME_S(inode->i_atime) = 0; - LTIME_S(inode->i_ctime) = 0; - inode->i_rdev = 0; - ll_update_inode(inode, md); - - /* OIDEBUG(inode); */ - - if (S_ISREG(inode->i_mode)) { - struct ll_sb_info *sbi = ll_i2sbi(inode); - inode->i_op = &ll_file_inode_operations; - inode->i_fop = sbi->ll_fop; - inode->i_mapping->a_ops = &ll_aops; - EXIT; - } else if (S_ISDIR(inode->i_mode)) { - inode->i_op = &ll_dir_inode_operations; - inode->i_fop = &ll_dir_operations; - inode->i_mapping->a_ops = &ll_dir_aops; - EXIT; - } else if (S_ISLNK(inode->i_mode)) { - inode->i_op = &ll_fast_symlink_inode_operations; - EXIT; - } else { - inode->i_op = &ll_special_inode_operations; - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - init_special_inode(inode, inode->i_mode, - kdev_t_to_nr(inode->i_rdev)); - - /* initializing backing dev info. */ - inode->i_mapping->backing_dev_info = &ll_backing_dev_info; -#else - init_special_inode(inode, inode->i_mode, inode->i_rdev); -#endif - EXIT; - } -} - -int ll_iocontrol(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ptlrpc_request *req = NULL; - int rc, flags = 0; - ENTRY; - - switch(cmd) { - case EXT3_IOC_GETFLAGS: { - struct ll_fid fid; - struct mds_body *body; - - ll_inode2fid(&fid, inode); - rc = mdc_getattr(sbi->ll_mdc_exp, &fid, OBD_MD_FLFLAGS,0,&req); - if (rc) { - CERROR("failure %d inode %lu\n", rc, inode->i_ino); - RETURN(-abs(rc)); - } - - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - - /* We want to return EXT3_*_FL flags to the caller via this - * ioctl. An older MDS may be sending S_* flags, fix it up. */ - flags = ll_inode_to_ext_flags(body->flags, - body->flags &MDS_BFLAG_EXT_FLAGS); - ptlrpc_req_finished (req); - - RETURN(put_user(flags, (int *)arg)); - } - case EXT3_IOC_SETFLAGS: { - struct mdc_op_data op_data; - struct ll_iattr_struct attr; - struct obd_info oinfo = { { { 0 } } }; - struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd; - - if (get_user(flags, (int *)arg)) - RETURN(-EFAULT); - - oinfo.oi_md = lsm; - OBDO_ALLOC(oinfo.oi_oa); - if (!oinfo.oi_oa) - RETURN(-ENOMEM); - - ll_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0, NULL); - - memset(&attr, 0, sizeof(attr)); - attr.ia_attr_flags = flags; - ((struct iattr *)&attr)->ia_valid |= ATTR_ATTR_FLAG; - - rc = mdc_setattr(sbi->ll_mdc_exp, &op_data, - (struct iattr *)&attr, NULL, 0, NULL, 0, &req); - ptlrpc_req_finished(req); - if (rc || lsm == NULL) { - OBDO_FREE(oinfo.oi_oa); - RETURN(rc); - } - - oinfo.oi_oa->o_id = lsm->lsm_object_id; - oinfo.oi_oa->o_flags = flags; - oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS; - - obdo_from_inode(oinfo.oi_oa, inode, - OBD_MD_FLFID | OBD_MD_FLGENER); - rc = obd_setattr_rqset(sbi->ll_osc_exp, &oinfo, NULL); - OBDO_FREE(oinfo.oi_oa); - if (rc) { - if (rc != -EPERM && rc != -EACCES) - CERROR("mdc_setattr_async fails: rc = %d\n", rc); - RETURN(rc); - } - - inode->i_flags = ll_ext_to_inode_flags(flags | - MDS_BFLAG_EXT_FLAGS); - RETURN(0); - } - default: - RETURN(-ENOSYS); - } - - RETURN(0); -} - -/* umount -f client means force down, don't save state */ -#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT -void ll_umount_begin(struct vfsmount *vfsmnt, int flags) -{ - struct super_block *sb = vfsmnt->mnt_sb; -#else -void ll_umount_begin(struct super_block *sb) -{ -#endif - struct lustre_sb_info *lsi = s2lsi(sb); - struct ll_sb_info *sbi = ll_s2sbi(sb); - struct obd_device *obd; - struct obd_ioctl_data ioc_data = { 0 }; - ENTRY; - -#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT - if (!(flags & MNT_FORCE)) { - EXIT; - return; - } -#endif - - /* Tell the MGC we got umount -f */ - lsi->lsi_flags |= LSI_UMOUNT_FORCE; - - CDEBUG(D_VFSTRACE, "VFS Op: superblock %p count %d active %d\n", sb, - sb->s_count, atomic_read(&sb->s_active)); - - obd = class_exp2obd(sbi->ll_mdc_exp); - if (obd == NULL) { - CERROR("Invalid MDC connection handle "LPX64"\n", - sbi->ll_mdc_exp->exp_handle.h_cookie); - EXIT; - return; - } - obd->obd_force = 1; - obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_mdc_exp, sizeof ioc_data, - &ioc_data, NULL); - - obd = class_exp2obd(sbi->ll_osc_exp); - if (obd == NULL) { - CERROR("Invalid LOV connection handle "LPX64"\n", - sbi->ll_osc_exp->exp_handle.h_cookie); - EXIT; - return; - } - - obd->obd_force = 1; - obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_osc_exp, sizeof ioc_data, - &ioc_data, NULL); - - /* Really, we'd like to wait until there are no requests outstanding, - * and then continue. For now, we just invalidate the requests, - * schedule, and hope. - */ - schedule(); - - EXIT; -} - -int ll_remount_fs(struct super_block *sb, int *flags, char *data) -{ - struct ll_sb_info *sbi = ll_s2sbi(sb); - int err; - __u32 read_only; - - if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { - read_only = *flags & MS_RDONLY; - err = obd_set_info_async(sbi->ll_mdc_exp, strlen("read-only"), - "read-only", sizeof(read_only), - &read_only, NULL); - if (err) { - CERROR("Failed to change the read-only flag during " - "remount: %d\n", err); - return err; - } - - if (read_only) - sb->s_flags |= MS_RDONLY; - else - sb->s_flags &= ~MS_RDONLY; - } - return 0; -} - -int ll_prep_inode(struct obd_export *exp, struct inode **inode, - struct ptlrpc_request *req, int offset,struct super_block *sb) -{ - struct lustre_md md; - struct ll_sb_info *sbi = NULL; - int rc = 0; - ENTRY; - - LASSERT(*inode || sb); - sbi = sb ? ll_s2sbi(sb) : ll_i2sbi(*inode); - prune_deathrow(sbi, 1); - - rc = mdc_req2lustre_md(req, offset, exp, &md); - if (rc) - RETURN(rc); - - if (*inode) { - ll_update_inode(*inode, &md); - } else { - LASSERT(sb); - *inode = ll_iget(sb, md.body->ino, &md); - if (*inode == NULL || is_bad_inode(*inode)) { - mdc_free_lustre_md(exp, &md); - rc = -ENOMEM; - CERROR("new_inode -fatal: rc %d\n", rc); - GOTO(out, rc); - } - } - - rc = obd_checkmd(exp, ll_i2mdcexp(*inode), - ll_i2info(*inode)->lli_smd); -out: - RETURN(rc); -} - -char *llap_origins[] = { - [LLAP_ORIGIN_UNKNOWN] = "--", - [LLAP_ORIGIN_READPAGE] = "rp", - [LLAP_ORIGIN_READAHEAD] = "ra", - [LLAP_ORIGIN_COMMIT_WRITE] = "cw", - [LLAP_ORIGIN_WRITEPAGE] = "wp", - [LLAP_ORIGIN_LOCKLESS_IO] = "ls" -}; - -struct ll_async_page *llite_pglist_next_llap(struct ll_sb_info *sbi, - struct list_head *list) -{ - struct ll_async_page *llap; - struct list_head *pos; - - list_for_each(pos, list) { - if (pos == &sbi->ll_pglist) - return NULL; - llap = list_entry(pos, struct ll_async_page, llap_pglist_item); - if (llap->llap_page == NULL) - continue; - return llap; - } - LBUG(); - return NULL; -} - -int ll_obd_statfs(struct inode *inode, void *arg) -{ - struct ll_sb_info *sbi = NULL; - struct obd_device *client_obd = NULL, *lov_obd = NULL; - struct lov_obd *lov = NULL; - struct obd_statfs stat_buf = {0}; - char *buf = NULL; - struct obd_ioctl_data *data = NULL; - __u32 type, index; - int len = 0, rc; - - if (!inode || !(sbi = ll_i2sbi(inode))) - GOTO(out_statfs, rc = -EINVAL); - - rc = obd_ioctl_getdata(&buf, &len, arg); - if (rc) - GOTO(out_statfs, rc); - - data = (void*)buf; - if (!data->ioc_inlbuf1 || !data->ioc_inlbuf2 || - !data->ioc_pbuf1 || !data->ioc_pbuf2) - GOTO(out_statfs, rc = -EINVAL); - - memcpy(&type, data->ioc_inlbuf1, sizeof(__u32)); - memcpy(&index, data->ioc_inlbuf2, sizeof(__u32)); - - if (type == LL_STATFS_MDC) { - if (index > 0) - GOTO(out_statfs, rc = -ENODEV); - client_obd = class_exp2obd(sbi->ll_mdc_exp); - } else if (type == LL_STATFS_LOV) { - lov_obd = class_exp2obd(sbi->ll_osc_exp); - lov = &lov_obd->u.lov; - - if (index >= lov->desc.ld_tgt_count) - GOTO(out_statfs, rc = -ENODEV); - - if (!lov->lov_tgts[index]) - /* Try again with the next index */ - GOTO(out_statfs, rc = -EAGAIN); - - client_obd = class_exp2obd(lov->lov_tgts[index]->ltd_exp); - if (!lov->lov_tgts[index]->ltd_active) - GOTO(out_uuid, rc = -ENODATA); - } - - if (!client_obd) - GOTO(out_statfs, rc = -EINVAL); - - rc = obd_statfs(client_obd, &stat_buf, cfs_time_current_64() - HZ, 1); - if (rc) - GOTO(out_statfs, rc); - - if (copy_to_user(data->ioc_pbuf1, &stat_buf, data->ioc_plen1)) - GOTO(out_statfs, rc = -EFAULT); - -out_uuid: - if (copy_to_user(data->ioc_pbuf2, obd2cli_tgt(client_obd), - data->ioc_plen2)) - rc = -EFAULT; - -out_statfs: - if (buf) - obd_ioctl_freedata(buf, len); - return rc; -} - -int ll_process_config(struct lustre_cfg *lcfg) -{ - char *ptr; - void *sb; - struct lprocfs_static_vars lvars; - unsigned long x; - int rc = 0; - - lprocfs_llite_init_vars(&lvars); - - /* The instance name contains the sb: lustre-client-aacfe000 */ - ptr = strrchr(lustre_cfg_string(lcfg, 0), '-'); - if (!ptr || !*(++ptr)) - return -EINVAL; - if (sscanf(ptr, "%lx", &x) != 1) - return -EINVAL; - sb = (void *)x; - /* This better be a real Lustre superblock! */ - LASSERT(s2lsi((struct super_block *)sb)->lsi_lmd->lmd_magic == LMD_MAGIC); - - /* Note we have not called client_common_fill_super yet, so - proc fns must be able to handle that! */ - rc = class_process_proc_param(PARAM_LLITE, lvars.obd_vars, - lcfg, sb); - return(rc); -} - diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c deleted file mode 100644 index 275ea3d915..0000000000 --- a/lustre/llite/llite_mmap.c +++ /dev/null @@ -1,668 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/string.h> -#include <linux/stat.h> -#include <linux/errno.h> -#include <linux/smp_lock.h> -#include <linux/unistd.h> -#include <linux/version.h> -#include <asm/system.h> -#include <asm/uaccess.h> - -#include <linux/fs.h> -#include <linux/stat.h> -#include <asm/uaccess.h> -#include <linux/mm.h> -#include <linux/pagemap.h> -#include <linux/smp_lock.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include <linux/iobuf.h> -#endif - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <lustre_lite.h> -#include "llite_internal.h" -#include <linux/lustre_compat25.h> - -#define VMA_DEBUG(vma, fmt, arg...) \ - CDEBUG(D_MMAP, "vma(%p) start(%ld) end(%ld) pgoff(%ld) inode(%p) " \ - "ino(%lu) iname(%s): " fmt, vma, vma->vm_start, vma->vm_end, \ - vma->vm_pgoff, vma->vm_file->f_dentry->d_inode, \ - vma->vm_file->f_dentry->d_inode->i_ino, \ - vma->vm_file->f_dentry->d_iname, ## arg); \ - - -struct ll_lock_tree_node { - rb_node_t lt_node; - struct list_head lt_locked_item; - __u64 lt_oid; - ldlm_policy_data_t lt_policy; - struct lustre_handle lt_lockh; - ldlm_mode_t lt_mode; - struct inode *lt_inode; -}; - -int lt_get_mmap_locks(struct ll_lock_tree *tree, - unsigned long addr, size_t count); - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address, - int *type); -#else - -struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address, - int unused); -#endif - -struct ll_lock_tree_node * ll_node_from_inode(struct inode *inode, __u64 start, - __u64 end, ldlm_mode_t mode) -{ - struct ll_lock_tree_node *node; - - OBD_ALLOC(node, sizeof(*node)); - if (node == NULL) - RETURN(ERR_PTR(-ENOMEM)); - - node->lt_inode = inode; - node->lt_oid = ll_i2info(inode)->lli_smd->lsm_object_id; - node->lt_policy.l_extent.start = start; - node->lt_policy.l_extent.end = end; - memset(&node->lt_lockh, 0, sizeof(node->lt_lockh)); - INIT_LIST_HEAD(&node->lt_locked_item); - node->lt_mode = mode; - - return node; -} - -int lt_compare(struct ll_lock_tree_node *one, struct ll_lock_tree_node *two) -{ - /* To avoid multiple fs deadlock */ - if (one->lt_inode->i_sb->s_dev < two->lt_inode->i_sb->s_dev) - return -1; - if (one->lt_inode->i_sb->s_dev > two->lt_inode->i_sb->s_dev) - return 1; - - if (one->lt_oid < two->lt_oid) - return -1; - if (one->lt_oid > two->lt_oid) - return 1; - - if (one->lt_policy.l_extent.end < two->lt_policy.l_extent.start) - return -1; - if (one->lt_policy.l_extent.start > two->lt_policy.l_extent.end) - return 1; - - return 0; /* they are the same object and overlap */ -} - -static void lt_merge(struct ll_lock_tree_node *dst, - struct ll_lock_tree_node *src) -{ - dst->lt_policy.l_extent.start = min(dst->lt_policy.l_extent.start, - src->lt_policy.l_extent.start); - dst->lt_policy.l_extent.end = max(dst->lt_policy.l_extent.end, - src->lt_policy.l_extent.end); - - /* XXX could be a real call to the dlm to find superset modes */ - if (src->lt_mode == LCK_PW && dst->lt_mode != LCK_PW) - dst->lt_mode = LCK_PW; -} - -static void lt_insert(struct ll_lock_tree *tree, - struct ll_lock_tree_node *node) -{ - struct ll_lock_tree_node *walk; - rb_node_t **p, *parent; - ENTRY; - -restart: - p = &tree->lt_root.rb_node; - parent = NULL; - while (*p) { - parent = *p; - walk = rb_entry(parent, struct ll_lock_tree_node, lt_node); - switch (lt_compare(node, walk)) { - case -1: - p = &(*p)->rb_left; - break; - case 1: - p = &(*p)->rb_right; - break; - case 0: - lt_merge(node, walk); - rb_erase(&walk->lt_node, &tree->lt_root); - OBD_FREE(walk, sizeof(*walk)); - goto restart; - break; - default: - LBUG(); - break; - } - } - rb_link_node(&node->lt_node, parent, p); - rb_insert_color(&node->lt_node, &tree->lt_root); - EXIT; -} - -static struct ll_lock_tree_node *lt_least_node(struct ll_lock_tree *tree) -{ - rb_node_t *rbnode; - struct ll_lock_tree_node *node = NULL; - - for ( rbnode = tree->lt_root.rb_node; rbnode != NULL; - rbnode = rbnode->rb_left) { - if (rbnode->rb_left == NULL) { - node = rb_entry(rbnode, struct ll_lock_tree_node, - lt_node); - break; - } - } - RETURN(node); -} - -int ll_tree_unlock(struct ll_lock_tree *tree) -{ - struct ll_lock_tree_node *node; - struct list_head *pos, *n; - struct inode *inode; - int rc = 0; - ENTRY; - - list_for_each_safe(pos, n, &tree->lt_locked_list) { - node = list_entry(pos, struct ll_lock_tree_node, - lt_locked_item); - - inode = node->lt_inode; - rc = ll_extent_unlock(tree->lt_fd, inode, - ll_i2info(inode)->lli_smd, node->lt_mode, - &node->lt_lockh); - if (rc != 0) { - /* XXX better message */ - CERROR("couldn't unlock %d\n", rc); - } - list_del(&node->lt_locked_item); - OBD_FREE(node, sizeof(*node)); - } - - while ((node = lt_least_node(tree))) { - rb_erase(&node->lt_node, &tree->lt_root); - OBD_FREE(node, sizeof(*node)); - } - - RETURN(rc); -} - -int ll_tree_lock_iov(struct ll_lock_tree *tree, - struct ll_lock_tree_node *first_node, - const struct iovec *iov, unsigned long nr_segs, int ast_flags) -{ - struct ll_lock_tree_node *node; - int rc = 0; - unsigned long seg; - ENTRY; - - tree->lt_root.rb_node = NULL; - INIT_LIST_HEAD(&tree->lt_locked_list); - if (first_node != NULL) - lt_insert(tree, first_node); - - /* To avoid such subtle deadlock case: client1 try to read file1 to - * mmapped file2, on the same time, client2 try to read file2 to - * mmapped file1.*/ - for (seg = 0; seg < nr_segs; seg++) { - const struct iovec *iv = &iov[seg]; - rc = lt_get_mmap_locks(tree, (unsigned long)iv->iov_base, - iv->iov_len); - if (rc) - GOTO(out, rc); - } - - while ((node = lt_least_node(tree))) { - struct inode *inode = node->lt_inode; - rc = ll_extent_lock(tree->lt_fd, inode, - ll_i2info(inode)->lli_smd, node->lt_mode, - &node->lt_policy, &node->lt_lockh, - ast_flags); - if (rc != 0) - GOTO(out, rc); - - rb_erase(&node->lt_node, &tree->lt_root); - list_add_tail(&node->lt_locked_item, &tree->lt_locked_list); - } - RETURN(rc); -out: - ll_tree_unlock(tree); - RETURN(rc); -} - -int ll_tree_lock(struct ll_lock_tree *tree, - struct ll_lock_tree_node *first_node, - const char *buf, size_t count, int ast_flags) -{ - struct iovec local_iov = { .iov_base = (void __user *)buf, - .iov_len = count }; - - return ll_tree_lock_iov(tree, first_node, &local_iov, 1, ast_flags); -} - -static ldlm_mode_t mode_from_vma(struct vm_area_struct *vma) -{ - /* we only want to hold PW locks if the mmap() can generate - * writes back to the file and that only happens in shared - * writable vmas */ - if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_WRITE)) - return LCK_PW; - return LCK_PR; -} - -static void policy_from_vma(ldlm_policy_data_t *policy, - struct vm_area_struct *vma, unsigned long addr, - size_t count) -{ - policy->l_extent.start = ((addr - vma->vm_start) & CFS_PAGE_MASK) + - ((__u64)vma->vm_pgoff << CFS_PAGE_SHIFT); - policy->l_extent.end = (policy->l_extent.start + count - 1) | - ~CFS_PAGE_MASK; -} - -static struct vm_area_struct * our_vma(unsigned long addr, size_t count) -{ - struct mm_struct *mm = current->mm; - struct vm_area_struct *vma, *ret = NULL; - ENTRY; - - /* No MM (e.g. NFS)? No vmas too. */ - if (!mm) - RETURN(NULL); - - spin_lock(&mm->page_table_lock); - for(vma = find_vma(mm, addr); - vma != NULL && vma->vm_start < (addr + count); vma = vma->vm_next) { - if (vma->vm_ops && vma->vm_ops->nopage == ll_nopage && - vma->vm_flags & VM_SHARED) { - ret = vma; - break; - } - } - spin_unlock(&mm->page_table_lock); - RETURN(ret); -} - -int lt_get_mmap_locks(struct ll_lock_tree *tree, - unsigned long addr, size_t count) -{ - struct vm_area_struct *vma; - struct ll_lock_tree_node *node; - ldlm_policy_data_t policy; - struct inode *inode; - ENTRY; - - if (count == 0) - RETURN(0); - - /* we need to look up vmas on page aligned addresses */ - count += addr & (~CFS_PAGE_MASK); - addr &= CFS_PAGE_MASK; - - while ((vma = our_vma(addr, count)) != NULL) { - LASSERT(vma->vm_file); - - inode = vma->vm_file->f_dentry->d_inode; - policy_from_vma(&policy, vma, addr, count); - node = ll_node_from_inode(inode, policy.l_extent.start, - policy.l_extent.end, - mode_from_vma(vma)); - if (IS_ERR(node)) { - CERROR("not enough mem for lock_tree_node!\n"); - RETURN(-ENOMEM); - } - lt_insert(tree, node); - - if (vma->vm_end - addr >= count) - break; - count -= vma->vm_end - addr; - addr = vma->vm_end; - } - RETURN(0); -} - -/* FIXME: there is a pagefault race goes as follow (only 2.4): - * 1. A user process on node A accesses a portion of a mapped file, - * resulting in a page fault. The pagefault handler invokes the - * ll_nopage function, which reads the page into memory. - * 2. A user process on node B writes to the same portion of the file - * (either via mmap or write()), that cause node A to cancel the - * lock and truncate the page. - * 3. Node A then executes the rest of do_no_page(), entering the - * now-invalid page into the PTEs. - * - * Make the whole do_no_page as a hook to cover both the page cache - * and page mapping installing with dlm lock would eliminate this race. - * - * In 2.6, the truncate_count of address_space can cover this race. - */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address, - int *type) -#else -struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address, - int type /* unused */) -#endif -{ - struct file *filp = vma->vm_file; - struct ll_file_data *fd = LUSTRE_FPRIVATE(filp); - struct inode *inode = filp->f_dentry->d_inode; - struct lustre_handle lockh = { 0 }; - ldlm_policy_data_t policy; - ldlm_mode_t mode; - struct page *page = NULL; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm; - struct ost_lvb lvb; - __u64 kms, old_mtime; - unsigned long pgoff, size, rand_read, seq_read; - int rc = 0; - ENTRY; - - if (lli->lli_smd == NULL) { - CERROR("No lsm on fault?\n"); - RETURN(NULL); - } - - ll_clear_file_contended(inode); - - /* start and end the lock on the first and last bytes in the page */ - policy_from_vma(&policy, vma, address, CFS_PAGE_SIZE); - - CDEBUG(D_MMAP, "nopage vma %p inode %lu, locking ["LPU64", "LPU64"]\n", - vma, inode->i_ino, policy.l_extent.start, policy.l_extent.end); - - mode = mode_from_vma(vma); - old_mtime = LTIME_S(inode->i_mtime); - - lsm = lli->lli_smd; - rc = ll_extent_lock(fd, inode, lsm, mode, &policy, - &lockh, LDLM_FL_CBPENDING | LDLM_FL_NO_LRU); - if (rc != 0) - RETURN(NULL); - - if (vma->vm_flags & VM_EXEC && LTIME_S(inode->i_mtime) != old_mtime) - CWARN("binary changed. inode %lu\n", inode->i_ino); - - lov_stripe_lock(lsm); - inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1); - kms = lvb.lvb_size; - - pgoff = ((address - vma->vm_start) >> CFS_PAGE_SHIFT) + vma->vm_pgoff; - size = (kms + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT; - - if (pgoff >= size) { - lov_stripe_unlock(lsm); - ll_glimpse_size(inode, LDLM_FL_BLOCK_GRANTED); - } else { - /* XXX change inode size without ll_inode_size_lock() held! - * there is a race condition with truncate path. (see - * ll_extent_lock) */ - /* XXX i_size_write() is not used because it is not safe to - * take the ll_inode_size_lock() due to a potential lock - * inversion (bug 6077). And since it's not safe to use - * i_size_write() without a covering mutex we do the - * assignment directly. It is not critical that the - * size be correct. */ - /* NOTE: region is within kms and, hence, within real file size (A). - * We need to increase i_size to cover the read region so that - * generic_file_read() will do its job, but that doesn't mean - * the kms size is _correct_, it is only the _minimum_ size. - * If someone does a stat they will get the correct size which - * will always be >= the kms value here. b=11081 */ - if (i_size_read(inode) < kms) { - inode->i_size = kms; - CDEBUG(D_INODE, "ino=%lu, updating i_size %llu\n", - inode->i_ino, i_size_read(inode)); - } - lov_stripe_unlock(lsm); - } - - /* If mapping is writeable, adjust kms to cover this page, - * but do not extend kms beyond actual file size. - * policy.l_extent.end is set to the end of the page by policy_from_vma - * bug 10919 */ - lov_stripe_lock(lsm); - if (mode == LCK_PW) - obd_adjust_kms(ll_i2obdexp(inode), lsm, - min_t(loff_t, policy.l_extent.end + 1, - i_size_read(inode)), 0); - lov_stripe_unlock(lsm); - - /* disable VM_SEQ_READ and use VM_RAND_READ to make sure that - * the kernel will not read other pages not covered by ldlm in - * filemap_nopage. we do our readahead in ll_readpage. - */ - rand_read = vma->vm_flags & VM_RAND_READ; - seq_read = vma->vm_flags & VM_SEQ_READ; - vma->vm_flags &= ~ VM_SEQ_READ; - vma->vm_flags |= VM_RAND_READ; - - page = filemap_nopage(vma, address, type); - LL_CDEBUG_PAGE(D_PAGE, page, "got addr %lu type %lx\n", address, - (long)type); - vma->vm_flags &= ~VM_RAND_READ; - vma->vm_flags |= (rand_read | seq_read); - - ll_extent_unlock(fd, inode, ll_i2info(inode)->lli_smd, mode, &lockh); - RETURN(page); -} - -/* To avoid cancel the locks covering mmapped region for lock cache pressure, - * we track the mapped vma count by lli_mmap_cnt. - * ll_vm_open(): when first vma is linked, split locks from lru. - * ll_vm_close(): when last vma is unlinked, join all this file's locks to lru. - * - * XXX we don't check the if the region of vma/lock for performance. - */ -static void ll_vm_open(struct vm_area_struct * vma) -{ - struct inode *inode = vma->vm_file->f_dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - ENTRY; - - LASSERT(vma->vm_file); - - spin_lock(&lli->lli_lock); - LASSERT(atomic_read(&lli->lli_mmap_cnt) >= 0); - - atomic_inc(&lli->lli_mmap_cnt); - if (atomic_read(&lli->lli_mmap_cnt) == 1) { - struct lov_stripe_md *lsm = lli->lli_smd; - struct ll_sb_info *sbi = ll_i2sbi(inode); - int count; - - spin_unlock(&lli->lli_lock); - - if (!lsm) - return; - count = obd_join_lru(sbi->ll_osc_exp, lsm, 0); - VMA_DEBUG(vma, "split %d unused locks from lru\n", count); - } else { - spin_unlock(&lli->lli_lock); - } - -} - -static void ll_vm_close(struct vm_area_struct *vma) -{ - struct inode *inode = vma->vm_file->f_dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - ENTRY; - - LASSERT(vma->vm_file); - - spin_lock(&lli->lli_lock); - LASSERT(atomic_read(&lli->lli_mmap_cnt) > 0); - - atomic_dec(&lli->lli_mmap_cnt); - if (atomic_read(&lli->lli_mmap_cnt) == 0) { - struct lov_stripe_md *lsm = lli->lli_smd; - struct ll_sb_info *sbi = ll_i2sbi(inode); - int count; - - spin_unlock(&lli->lli_lock); - - if (!lsm) - return; - count = obd_join_lru(sbi->ll_osc_exp, lsm, 1); - VMA_DEBUG(vma, "join %d unused locks to lru\n", count); - } else { - spin_unlock(&lli->lli_lock); - } -} - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -#ifndef HAVE_FILEMAP_POPULATE -static int (*filemap_populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); -#endif -static int ll_populate(struct vm_area_struct *area, unsigned long address, - unsigned long len, pgprot_t prot, unsigned long pgoff, - int nonblock) -{ - int rc = 0; - ENTRY; - - /* always set nonblock as true to avoid page read ahead */ - rc = filemap_populate(area, address, len, prot, pgoff, 1); - RETURN(rc); -} -#endif - -/* return the user space pointer that maps to a file offset via a vma */ -static inline unsigned long file_to_user(struct vm_area_struct *vma, __u64 byte) -{ - return vma->vm_start + (byte - ((__u64)vma->vm_pgoff << CFS_PAGE_SHIFT)); - -} - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -/* [first, last] are the byte offsets affected. - * vm_{start, end} are user addresses of the first byte of the mapping and - * the next byte beyond it - * vm_pgoff is the page index of the first byte in the mapping */ -static void teardown_vmas(struct vm_area_struct *vma, __u64 first, - __u64 last) -{ - unsigned long address, len; - for (; vma ; vma = vma->vm_next_share) { - if (last >> CFS_PAGE_SHIFT < vma->vm_pgoff) - continue; - if (first >> CFS_PAGE_SHIFT >= (vma->vm_pgoff + - ((vma->vm_end - vma->vm_start) >> CFS_PAGE_SHIFT))) - continue; - - /* XXX in case of unmap the cow pages of a running file, - * don't unmap these private writeable mapping here! - * though that will break private mappping a little. - * - * the clean way is to check the mapping of every page - * and just unmap the non-cow pages, just like - * unmap_mapping_range() with even_cow=0 in kernel 2.6. - */ - if (!(vma->vm_flags & VM_SHARED) && - (vma->vm_flags & VM_WRITE)) - continue; - - address = max((unsigned long)vma->vm_start, - file_to_user(vma, first)); - len = min((unsigned long)vma->vm_end, - file_to_user(vma, last) + 1) - address; - - VMA_DEBUG(vma, "zapping vma [first="LPU64" last="LPU64" " - "address=%ld len=%ld]\n", first, last, address, len); - LASSERT(len > 0); - ll_zap_page_range(vma, address, len); - } -} -#endif - -/* XXX put nice comment here. talk about __free_pte -> dirty pages and - * nopage's reference passing to the pte */ -int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last) -{ - int rc = -ENOENT; - ENTRY; - - LASSERTF(last > first, "last "LPU64" first "LPU64"\n", last, first); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - if (mapping_mapped(mapping)) { - rc = 0; - unmap_mapping_range(mapping, first + CFS_PAGE_SIZE - 1, - last - first + 1, 0); - } -#else - spin_lock(&mapping->i_shared_lock); - if (mapping->i_mmap != NULL) { - rc = 0; - teardown_vmas(mapping->i_mmap, first, last); - } - if (mapping->i_mmap_shared != NULL) { - rc = 0; - teardown_vmas(mapping->i_mmap_shared, first, last); - } - spin_unlock(&mapping->i_shared_lock); -#endif - RETURN(rc); -} - -static struct vm_operations_struct ll_file_vm_ops = { - .nopage = ll_nopage, - .open = ll_vm_open, - .close = ll_vm_close, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - .populate = ll_populate, -#endif -}; - -int ll_file_mmap(struct file * file, struct vm_area_struct * vma) -{ - int rc; - ENTRY; - - ll_stats_ops_tally(ll_i2sbi(file->f_dentry->d_inode), LPROC_LL_MAP, 1); - rc = generic_file_mmap(file, vma); - if (rc == 0) { -#if !defined(HAVE_FILEMAP_POPULATE) && \ - (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - if (!filemap_populate) - filemap_populate = vma->vm_ops->populate; -#endif - vma->vm_ops = &ll_file_vm_ops; - vma->vm_ops->open(vma); - /* update the inode's size and mtime */ - rc = ll_glimpse_size(file->f_dentry->d_inode, 0); - } - - RETURN(rc); -} diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c deleted file mode 100644 index 03dd480819..0000000000 --- a/lustre/llite/llite_nfs.c +++ /dev/null @@ -1,274 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * NFS export of Lustre Light File System - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE -#include <lustre_lite.h> -#include "llite_internal.h" -#ifdef HAVE_LINUX_EXPORTFS_H -#include <linux/exportfs.h> -#endif - -__u32 get_uuid2int(const char *name, int len) -{ - __u32 key0 = 0x12a3fe2d, key1 = 0x37abe8f9; - while (len--) { - __u32 key = key1 + (key0 ^ (*name++ * 7152373)); - if (key & 0x80000000) key -= 0x7fffffff; - key1 = key0; - key0 = key; - } - return (key0 << 1); -} - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -static int ll_nfs_test_inode(struct inode *inode, unsigned long ino, void *opaque) -#else -static int ll_nfs_test_inode(struct inode *inode, void *opaque) -#endif -{ - struct ll_fid *iid = opaque; - - if (inode->i_ino == iid->id && inode->i_generation == iid->generation) - return 1; - - return 0; -} - -static struct inode * search_inode_for_lustre(struct super_block *sb, - unsigned long ino, - unsigned long generation, - int mode) -{ - struct ptlrpc_request *req = NULL; - struct ll_sb_info *sbi = ll_s2sbi(sb); - struct ll_fid fid; - unsigned long valid = 0; - int eadatalen = 0, rc; - struct inode *inode = NULL; - struct ll_fid iid = { .id = ino, .generation = generation }; - ENTRY; - - inode = ILOOKUP(sb, ino, ll_nfs_test_inode, &iid); - - if (inode) - RETURN(inode); - if (S_ISREG(mode)) { - rc = ll_get_max_mdsize(sbi, &eadatalen); - if (rc) - RETURN(ERR_PTR(rc)); - valid |= OBD_MD_FLEASIZE; - } - fid.id = (__u64)ino; - fid.generation = generation; - fid.f_type = mode; - - rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, eadatalen, &req); - if (rc) { - CERROR("failure %d inode %lu\n", rc, ino); - RETURN(ERR_PTR(rc)); - } - - rc = ll_prep_inode(sbi->ll_osc_exp, &inode, req, REPLY_REC_OFF, sb); - if (rc) { - ptlrpc_req_finished(req); - RETURN(ERR_PTR(rc)); - } - ptlrpc_req_finished(req); - - RETURN(inode); -} - -static struct dentry *ll_iget_for_nfs(struct super_block *sb, unsigned long ino, - __u32 generation, umode_t mode) -{ - struct inode *inode; - struct dentry *result; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - struct list_head *lp; -#endif - ENTRY; - - if (ino == 0) - RETURN(ERR_PTR(-ESTALE)); - - inode = search_inode_for_lustre(sb, ino, generation, mode); - if (IS_ERR(inode)) { - RETURN(ERR_PTR(PTR_ERR(inode))); - } - if (is_bad_inode(inode) || - (generation && inode->i_generation != generation)){ - /* we didn't find the right inode.. */ - CERROR("Inode %lu, Bad count: %lu %d or version %u %u\n", - inode->i_ino, (unsigned long)inode->i_nlink, - atomic_read(&inode->i_count), inode->i_generation, - generation); - iput(inode); - RETURN(ERR_PTR(-ESTALE)); - } - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - result = d_alloc_anon(inode); - if (!result) { - iput(inode); - RETURN(ERR_PTR(-ENOMEM)); - } -#else - /* now to find a dentry. - * If possible, get a well-connected one - */ - spin_lock(&dcache_lock); - for (lp = inode->i_dentry.next; lp != &inode->i_dentry ; lp=lp->next) { - result = list_entry(lp,struct dentry, d_alias); - lock_dentry(result); - if (!(result->d_flags & DCACHE_DISCONNECTED)) { - dget_locked(result); - ll_set_dflags(result, DCACHE_REFERENCED); - unlock_dentry(result); - spin_unlock(&dcache_lock); - iput(inode); - RETURN(result); - } - unlock_dentry(result); - } - spin_unlock(&dcache_lock); - result = d_alloc_root(inode); - if (result == NULL) { - iput(inode); - RETURN(ERR_PTR(-ENOMEM)); - } - result->d_flags |= DCACHE_DISCONNECTED; - -#endif - ll_set_dd(result); - - lock_dentry(result); - if (unlikely(result->d_op == &ll_init_d_ops)) { - result->d_op = &ll_d_ops; - unlock_dentry(result); - smp_wmb(); - ll_d_wakeup(result); - } else { - result->d_op = &ll_d_ops; - unlock_dentry(result); - } - - RETURN(result); -} - -struct dentry *ll_fh_to_dentry(struct super_block *sb, __u32 *data, int len, - int fhtype, int parent) -{ - switch (fhtype) { - case 2: - if (len < 5) - break; - if (parent) - return ll_iget_for_nfs(sb, data[3], 0, data[4]); - case 1: - if (len < 3) - break; - if (parent) - break; - return ll_iget_for_nfs(sb, data[0], data[1], data[2]); - default: break; - } - return ERR_PTR(-EINVAL); -} - -int ll_dentry_to_fh(struct dentry *dentry, __u32 *datap, int *lenp, - int need_parent) -{ - if (*lenp < 3) - return 255; - *datap++ = dentry->d_inode->i_ino; - *datap++ = dentry->d_inode->i_generation; - *datap++ = (__u32)(S_IFMT & dentry->d_inode->i_mode); - - if (*lenp == 3 || S_ISDIR(dentry->d_inode->i_mode)) { - *lenp = 3; - return 1; - } - if (dentry->d_parent) { - *datap++ = dentry->d_parent->d_inode->i_ino; - *datap++ = (__u32)(S_IFMT & dentry->d_parent->d_inode->i_mode); - - *lenp = 5; - return 2; - } - *lenp = 3; - return 1; -} - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -struct dentry *ll_get_dentry(struct super_block *sb, void *data) -{ - __u32 *inump = (__u32*)data; - return ll_iget_for_nfs(sb, inump[0], inump[1], S_IFREG); -} - -struct dentry *ll_get_parent(struct dentry *dchild) -{ - struct ptlrpc_request *req = NULL; - struct inode *dir = dchild->d_inode; - struct ll_sb_info *sbi; - struct dentry *result = NULL; - struct ll_fid fid; - struct mds_body *body; - char dotdot[] = ".."; - int rc = 0; - ENTRY; - - LASSERT(dir && S_ISDIR(dir->i_mode)); - - sbi = ll_s2sbi(dir->i_sb); - - fid.id = (__u64)dir->i_ino; - fid.generation = dir->i_generation; - fid.f_type = S_IFDIR; - - rc = mdc_getattr_name(sbi->ll_mdc_exp, &fid, dotdot, strlen(dotdot) + 1, - 0, 0, &req); - if (rc) { - CERROR("failure %d inode %lu get parent\n", rc, dir->i_ino); - return ERR_PTR(rc); - } - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof (*body)); - - LASSERT((body->valid & OBD_MD_FLGENER) && (body->valid & OBD_MD_FLID)); - - result = ll_iget_for_nfs(dir->i_sb, body->ino, body->generation, S_IFDIR); - - if (IS_ERR(result)) - rc = PTR_ERR(result); - - ptlrpc_req_finished(req); - if (rc) - return ERR_PTR(rc); - RETURN(result); -} - -struct export_operations lustre_export_operations = { - .get_parent = ll_get_parent, - .get_dentry = ll_get_dentry, -}; -#endif diff --git a/lustre/llite/lloop.c b/lustre/llite/lloop.c deleted file mode 100644 index f42fd4a7c0..0000000000 --- a/lustre/llite/lloop.c +++ /dev/null @@ -1,764 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre virtual block device emulator. - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * linux/drivers/block/loop.c - * - * Written by Theodore Ts'o, 3/29/93 - * - * Copyright 1993 by Theodore Ts'o. Redistribution of this file is - * permitted under the GNU General Public License. - * - * DES encryption plus some minor changes by Werner Almesberger, 30-MAY-1993 - * more DES encryption plus IDEA encryption by Nicholas J. Leon, June 20, 1996 - * - * Modularized and updated for 1.1.16 kernel - Mitch Dsouza 28th May 1994 - * Adapted for 1.3.59 kernel - Andries Brouwer, 1 Feb 1996 - * - * Fixed do_loop_request() re-entrancy - Vincent.Renardias@waw.com Mar 20, 1997 - * - * Added devfs support - Richard Gooch <rgooch@atnf.csiro.au> 16-Jan-1998 - * - * Handle sparse backing files correctly - Kenn Humborg, Jun 28, 1998 - * - * Loadable modules and other fixes by AK, 1998 - * - * Make real block number available to downstream transfer functions, enables - * CBC (and relatives) mode encryption requiring unique IVs per data block. - * Reed H. Petty, rhp@draper.net - * - * Maximum number of loop devices now dynamic via max_loop module parameter. - * Russell Kroll <rkroll@exploits.org> 19990701 - * - * Maximum number of loop devices when compiled-in now selectable by passing - * max_loop=<1-255> to the kernel on boot. - * Erik I. Bols?, <eriki@himolde.no>, Oct 31, 1999 - * - * Completely rewrite request handling to be make_request_fn style and - * non blocking, pushing work to a helper thread. Lots of fixes from - * Al Viro too. - * Jens Axboe <axboe@suse.de>, Nov 2000 - * - * Support up to 256 loop devices - * Heinz Mauelshagen <mge@sistina.com>, Feb 2002 - * - * Support for falling back on the write file operation when the address space - * operations prepare_write and/or commit_write are not available on the - * backing filesystem. - * Anton Altaparmakov, 16 Feb 2005 - * - * Still To Fix: - * - Advisory locking is ignored here. - * - Should use an own CAP_* category instead of CAP_SYS_ADMIN - * - */ - -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/module.h> - -#include <linux/sched.h> -#include <linux/fs.h> -#include <linux/file.h> -#include <linux/stat.h> -#include <linux/errno.h> -#include <linux/major.h> -#include <linux/wait.h> -#include <linux/blkdev.h> -#include <linux/blkpg.h> -#include <linux/init.h> -#include <linux/smp_lock.h> -#include <linux/swap.h> -#include <linux/slab.h> -#include <linux/suspend.h> -#include <linux/writeback.h> -#include <linux/buffer_head.h> /* for invalidate_bdev() */ -#include <linux/completion.h> -#include <linux/highmem.h> -#include <linux/gfp.h> -#include <linux/swap.h> -#include <linux/pagevec.h> - -#include <asm/uaccess.h> - -#include <lustre_lib.h> -#include <lustre_lite.h> -#include "llite_internal.h" - -#define LLOOP_MAX_SEGMENTS PTLRPC_MAX_BRW_PAGES - -/* Possible states of device */ -enum { - LLOOP_UNBOUND, - LLOOP_BOUND, - LLOOP_RUNDOWN, -}; - -struct lloop_device { - int lo_number; - int lo_refcnt; - loff_t lo_offset; - loff_t lo_sizelimit; - int lo_flags; - int (*ioctl)(struct lloop_device *, int cmd, - unsigned long arg); - - struct file * lo_backing_file; - struct block_device *lo_device; - unsigned lo_blocksize; - - int old_gfp_mask; - - spinlock_t lo_lock; - struct bio *lo_bio; - struct bio *lo_biotail; - int lo_state; - struct semaphore lo_sem; - struct semaphore lo_ctl_mutex; - struct semaphore lo_bh_mutex; - atomic_t lo_pending; - - request_queue_t *lo_queue; - - /* data to handle bio for lustre. */ - struct lo_request_data { - struct brw_page lrd_pages[LLOOP_MAX_SEGMENTS]; - struct obdo lrd_oa; - } lo_requests[1]; - -}; - -/* - * Loop flags - */ -enum { - LO_FLAGS_READ_ONLY = 1, -}; - -static int lloop_major; -static int max_loop = 8; -static struct lloop_device *loop_dev; -static struct gendisk **disks; -static struct semaphore lloop_mutex; -static void *ll_iocontrol_magic = NULL; - -static loff_t get_loop_size(struct lloop_device *lo, struct file *file) -{ - loff_t size, offset, loopsize; - - /* Compute loopsize in bytes */ - size = i_size_read(file->f_mapping->host); - offset = lo->lo_offset; - loopsize = size - offset; - if (lo->lo_sizelimit > 0 && lo->lo_sizelimit < loopsize) - loopsize = lo->lo_sizelimit; - - /* - * Unfortunately, if we want to do I/O on the device, - * the number of 512-byte sectors has to fit into a sector_t. - */ - return loopsize >> 9; -} - -static int do_bio_filebacked(struct lloop_device *lo, struct bio *bio) -{ - struct inode *inode = lo->lo_backing_file->f_dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct obd_info oinfo = {{{0}}}; - struct brw_page *pg = lo->lo_requests[0].lrd_pages; - struct obdo *oa = &lo->lo_requests[0].lrd_oa; - pgoff_t offset; - int ret, cmd, i; - struct bio_vec *bvec; - - BUG_ON(bio->bi_hw_segments > LLOOP_MAX_SEGMENTS); - - offset = (pgoff_t)(bio->bi_sector << 9) + lo->lo_offset; - bio_for_each_segment(bvec, bio, i) { - BUG_ON(bvec->bv_offset != 0); - BUG_ON(bvec->bv_len != CFS_PAGE_SIZE); - - pg->pg = bvec->bv_page; - pg->off = offset; - pg->count = bvec->bv_len; - pg->flag = OBD_BRW_SRVLOCK; - - pg++; - offset += bvec->bv_len; - } - - oa->o_mode = inode->i_mode; - oa->o_id = lsm->lsm_object_id; - oa->o_valid = OBD_MD_FLID | OBD_MD_FLMODE | OBD_MD_FLTYPE; - obdo_from_inode(oa, inode, OBD_MD_FLFID | OBD_MD_FLGENER); - - cmd = OBD_BRW_READ; - if (bio_rw(bio) == WRITE) - cmd = OBD_BRW_WRITE; - - if (cmd == OBD_BRW_WRITE) - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_BRW_WRITE, bio->bi_size); - else - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_BRW_READ, bio->bi_size); - oinfo.oi_oa = oa; - oinfo.oi_md = lsm; - ret = obd_brw(cmd, ll_i2obdexp(inode), &oinfo, - (obd_count)(i - bio->bi_idx), - lo->lo_requests[0].lrd_pages, NULL); - if (ret == 0) - obdo_to_inode(inode, oa, OBD_MD_FLBLOCKS); - return ret; -} - - -/* - * Add bio to back of pending list - */ -static void loop_add_bio(struct lloop_device *lo, struct bio *bio) -{ - unsigned long flags; - - spin_lock_irqsave(&lo->lo_lock, flags); - if (lo->lo_biotail) { - lo->lo_biotail->bi_next = bio; - lo->lo_biotail = bio; - } else - lo->lo_bio = lo->lo_biotail = bio; - spin_unlock_irqrestore(&lo->lo_lock, flags); - - up(&lo->lo_bh_mutex); -} - -/* - * Grab first pending buffer - */ -static struct bio *loop_get_bio(struct lloop_device *lo) -{ - struct bio *bio; - - spin_lock_irq(&lo->lo_lock); - if ((bio = lo->lo_bio)) { - if (bio == lo->lo_biotail) - lo->lo_biotail = NULL; - lo->lo_bio = bio->bi_next; - bio->bi_next = NULL; - } - spin_unlock_irq(&lo->lo_lock); - - return bio; -} - -static int loop_make_request(request_queue_t *q, struct bio *old_bio) -{ - struct lloop_device *lo = q->queuedata; - int rw = bio_rw(old_bio); - - if (!lo) - goto out; - - spin_lock_irq(&lo->lo_lock); - if (lo->lo_state != LLOOP_BOUND) - goto inactive; - atomic_inc(&lo->lo_pending); - spin_unlock_irq(&lo->lo_lock); - - if (rw == WRITE) { - if (lo->lo_flags & LO_FLAGS_READ_ONLY) - goto err; - } else if (rw == READA) { - rw = READ; - } else if (rw != READ) { - CERROR("lloop: unknown command (%x)\n", rw); - goto err; - } - loop_add_bio(lo, old_bio); - return 0; -err: - if (atomic_dec_and_test(&lo->lo_pending)) - up(&lo->lo_bh_mutex); -out: - bio_io_error(old_bio, old_bio->bi_size); - return 0; -inactive: - spin_unlock_irq(&lo->lo_lock); - goto out; -} - -/* - * kick off io on the underlying address space - */ -static void loop_unplug(request_queue_t *q) -{ - struct lloop_device *lo = q->queuedata; - - clear_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags); - blk_run_address_space(lo->lo_backing_file->f_mapping); -} - -static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio) -{ - int ret; - ret = do_bio_filebacked(lo, bio); - bio_endio(bio, bio->bi_size, ret); -} - -/* - * worker thread that handles reads/writes to file backed loop devices, - * to avoid blocking in our make_request_fn. it also does loop decrypting - * on reads for block backed loop, as that is too heavy to do from - * b_end_io context where irqs may be disabled. - */ -static int loop_thread(void *data) -{ - struct lloop_device *lo = data; - struct bio *bio; - - daemonize("lloop%d", lo->lo_number); - - set_user_nice(current, -20); - - lo->lo_state = LLOOP_BOUND; - atomic_inc(&lo->lo_pending); - - /* - * up sem, we are running - */ - up(&lo->lo_sem); - - for (;;) { - down_interruptible(&lo->lo_bh_mutex); - /* - * could be upped because of tear-down, not because of - * pending work - */ - if (!atomic_read(&lo->lo_pending)) - break; - - bio = loop_get_bio(lo); - if (!bio) { - CWARN("lloop(minor: %d): missing bio\n", lo->lo_number); - continue; - } - loop_handle_bio(lo, bio); - - /* - * upped both for pending work and tear-down, lo_pending - * will hit zero then - */ - if (atomic_dec_and_test(&lo->lo_pending)) - break; - } - - up(&lo->lo_sem); - return 0; -} - -static int loop_set_fd(struct lloop_device *lo, struct file *unused, - struct block_device *bdev, struct file *file) -{ - struct inode *inode; - struct address_space *mapping; - int lo_flags = 0; - int error; - loff_t size; - - if (!try_module_get(THIS_MODULE)) - return -ENODEV; - - error = -EBUSY; - if (lo->lo_state != LLOOP_UNBOUND) - goto out; - - mapping = file->f_mapping; - inode = mapping->host; - - error = -EINVAL; - if (!S_ISREG(inode->i_mode) || inode->i_sb->s_magic != LL_SUPER_MAGIC) - goto out; - - if (!(file->f_mode & FMODE_WRITE)) - lo_flags |= LO_FLAGS_READ_ONLY; - - size = get_loop_size(lo, file); - - if ((loff_t)(sector_t)size != size) { - error = -EFBIG; - goto out; - } - - /* remove all pages in cache so as dirty pages not to be existent. */ - truncate_inode_pages(mapping, 0); - - set_device_ro(bdev, (lo_flags & LO_FLAGS_READ_ONLY) != 0); - - lo->lo_blocksize = CFS_PAGE_SIZE; - lo->lo_device = bdev; - lo->lo_flags = lo_flags; - lo->lo_backing_file = file; - lo->ioctl = NULL; - lo->lo_sizelimit = 0; - lo->old_gfp_mask = mapping_gfp_mask(mapping); - mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); - - lo->lo_bio = lo->lo_biotail = NULL; - - /* - * set queue make_request_fn, and add limits based on lower level - * device - */ - blk_queue_make_request(lo->lo_queue, loop_make_request); - lo->lo_queue->queuedata = lo; - lo->lo_queue->unplug_fn = loop_unplug; - - /* queue parameters */ - blk_queue_hardsect_size(lo->lo_queue, CFS_PAGE_SIZE); - blk_queue_max_sectors(lo->lo_queue, LLOOP_MAX_SEGMENTS); - blk_queue_max_phys_segments(lo->lo_queue, LLOOP_MAX_SEGMENTS); - - set_capacity(disks[lo->lo_number], size); - bd_set_size(bdev, size << 9); - - set_blocksize(bdev, lo->lo_blocksize); - - kernel_thread(loop_thread, lo, CLONE_KERNEL); - down(&lo->lo_sem); - return 0; - - out: - /* This is safe: open() is still holding a reference. */ - module_put(THIS_MODULE); - return error; -} - -static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, - int count) -{ - struct file *filp = lo->lo_backing_file; - int gfp = lo->old_gfp_mask; - - if (lo->lo_state != LLOOP_BOUND) - return -ENXIO; - - if (lo->lo_refcnt > count) /* we needed one fd for the ioctl */ - return -EBUSY; - - if (filp == NULL) - return -EINVAL; - - spin_lock_irq(&lo->lo_lock); - lo->lo_state = LLOOP_RUNDOWN; - if (atomic_dec_and_test(&lo->lo_pending)) - up(&lo->lo_bh_mutex); - spin_unlock_irq(&lo->lo_lock); - - down(&lo->lo_sem); - lo->lo_backing_file = NULL; - lo->ioctl = NULL; - lo->lo_device = NULL; - lo->lo_offset = 0; - lo->lo_sizelimit = 0; - lo->lo_flags = 0; - ll_invalidate_bdev(bdev, 0); - set_capacity(disks[lo->lo_number], 0); - bd_set_size(bdev, 0); - mapping_set_gfp_mask(filp->f_mapping, gfp); - lo->lo_state = LLOOP_UNBOUND; - fput(filp); - /* This is safe: open() is still holding a reference. */ - module_put(THIS_MODULE); - return 0; -} - -static int lo_open(struct inode *inode, struct file *file) -{ - struct lloop_device *lo = inode->i_bdev->bd_disk->private_data; - - down(&lo->lo_ctl_mutex); - lo->lo_refcnt++; - up(&lo->lo_ctl_mutex); - - return 0; -} - -static int lo_release(struct inode *inode, struct file *file) -{ - struct lloop_device *lo = inode->i_bdev->bd_disk->private_data; - - down(&lo->lo_ctl_mutex); - --lo->lo_refcnt; - up(&lo->lo_ctl_mutex); - - return 0; -} - -/* lloop device node's ioctl function. */ -static int lo_ioctl(struct inode *inode, struct file *unused, - unsigned int cmd, unsigned long arg) -{ - struct lloop_device *lo = inode->i_bdev->bd_disk->private_data; - struct block_device *bdev = inode->i_bdev; - int err = 0; - - down(&lloop_mutex); - switch (cmd) { - case LL_IOC_LLOOP_DETACH: { - err = loop_clr_fd(lo, bdev, 2); - if (err == 0) - blkdev_put(bdev); /* grabbed in LLOOP_ATTACH */ - break; - } - - case LL_IOC_LLOOP_INFO: { - __u64 ino = 0; - - if (lo->lo_state == LLOOP_BOUND) - ino = lo->lo_backing_file->f_dentry->d_inode->i_ino; - - if (put_user(ino, (__u64 *)arg)) - err = -EFAULT; - break; - } - - default: - err = -EINVAL; - break; - } - up(&lloop_mutex); - - return err; -} - -static struct block_device_operations lo_fops = { - .owner = THIS_MODULE, - .open = lo_open, - .release = lo_release, - .ioctl = lo_ioctl, -}; - -/* dynamic iocontrol callback. - * This callback is registered in lloop_init and will be called by - * ll_iocontrol_call. - * This is a llite regular file ioctl function. It takes the responsibility - * of attaching a file, and detaching a file by a lloop's device numner. - */ -static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file, - unsigned int cmd, unsigned long arg, - void *magic, int *rcp) -{ - struct lloop_device *lo = NULL; - struct block_device *bdev = NULL; - int err = 0; - dev_t dev; - - if (magic != ll_iocontrol_magic) - return LLIOC_CONT; - - if (disks == NULL) - GOTO(out1, err = -ENODEV); - - down(&lloop_mutex); - switch (cmd) { - case LL_IOC_LLOOP_ATTACH: { - struct lloop_device *lo_free = NULL; - int i; - - for (i = 0; i < max_loop; i++, lo = NULL) { - lo = &loop_dev[i]; - if (lo->lo_state == LLOOP_UNBOUND) { - if (!lo_free) - lo_free = lo; - continue; - } - if (lo->lo_backing_file->f_dentry->d_inode == - file->f_dentry->d_inode) - break; - } - if (lo || !lo_free) - GOTO(out, err = -EBUSY); - - lo = lo_free; - dev = MKDEV(lloop_major, lo->lo_number); - - /* quit if the used pointer is writable */ - if (put_user((long)old_encode_dev(dev), (long*)arg)) - GOTO(out, err = -EFAULT); - - bdev = open_by_devnum(dev, file->f_mode); - if (IS_ERR(bdev)) - GOTO(out, err = PTR_ERR(bdev)); - - get_file(file); - err = loop_set_fd(lo, NULL, bdev, file); - if (err) { - fput(file); - blkdev_put(bdev); - } - - break; - } - - case LL_IOC_LLOOP_DETACH_BYDEV: { - int minor; - - dev = old_decode_dev(arg); - if (MAJOR(dev) != lloop_major) - GOTO(out, err = -EINVAL); - - minor = MINOR(dev); - if (minor > max_loop - 1) - GOTO(out, err = -EINVAL); - - lo = &loop_dev[minor]; - if (lo->lo_state != LLOOP_BOUND) - GOTO(out, err = -EINVAL); - - bdev = lo->lo_device; - err = loop_clr_fd(lo, bdev, 1); - if (err == 0) - blkdev_put(bdev); /* grabbed in LLOOP_ATTACH */ - - break; - } - - default: - err = -EINVAL; - break; - } - -out: - up(&lloop_mutex); -out1: - if (rcp) - *rcp = err; - return LLIOC_STOP; -} - -static int __init lloop_init(void) -{ - int i; - unsigned int cmdlist[] = { - LL_IOC_LLOOP_ATTACH, - LL_IOC_LLOOP_DETACH_BYDEV, - }; - - if (max_loop < 1 || max_loop > 256) { - CWARN("lloop: invalid max_loop (must be between" - " 1 and 256), using default (8)\n"); - max_loop = 8; - } - - lloop_major = register_blkdev(0, "lloop"); - if (lloop_major < 0) - return -EIO; - - ll_iocontrol_magic = ll_iocontrol_register(lloop_ioctl, 2, cmdlist); - if (ll_iocontrol_magic == NULL) - goto out_mem1; - - loop_dev = kmalloc(max_loop * sizeof(struct lloop_device), GFP_KERNEL); - if (!loop_dev) - goto out_mem1; - memset(loop_dev, 0, max_loop * sizeof(struct lloop_device)); - - disks = kmalloc(max_loop * sizeof(struct gendisk *), GFP_KERNEL); - if (!disks) - goto out_mem2; - - for (i = 0; i < max_loop; i++) { - disks[i] = alloc_disk(1); - if (!disks[i]) - goto out_mem3; - } - - init_MUTEX(&lloop_mutex); - - for (i = 0; i < max_loop; i++) { - struct lloop_device *lo = &loop_dev[i]; - struct gendisk *disk = disks[i]; - - memset(lo, 0, sizeof(*lo)); - lo->lo_queue = blk_alloc_queue(GFP_KERNEL); - if (!lo->lo_queue) - goto out_mem4; - - init_MUTEX(&lo->lo_ctl_mutex); - init_MUTEX_LOCKED(&lo->lo_sem); - init_MUTEX_LOCKED(&lo->lo_bh_mutex); - lo->lo_number = i; - spin_lock_init(&lo->lo_lock); - disk->major = lloop_major; - disk->first_minor = i; - disk->fops = &lo_fops; - sprintf(disk->disk_name, "lloop%d", i); - disk->private_data = lo; - disk->queue = lo->lo_queue; - } - - /* We cannot fail after we call this, so another loop!*/ - for (i = 0; i < max_loop; i++) - add_disk(disks[i]); - return 0; - -out_mem4: - while (i--) - blk_put_queue(loop_dev[i].lo_queue); - i = max_loop; -out_mem3: - while (i--) - put_disk(disks[i]); - kfree(disks); -out_mem2: - kfree(loop_dev); -out_mem1: - unregister_blkdev(lloop_major, "lloop"); - ll_iocontrol_unregister(ll_iocontrol_magic); - CERROR("lloop: ran out of memory\n"); - return -ENOMEM; -} - -static void lloop_exit(void) -{ - int i; - - ll_iocontrol_unregister(ll_iocontrol_magic); - for (i = 0; i < max_loop; i++) { - del_gendisk(disks[i]); - blk_put_queue(loop_dev[i].lo_queue); - put_disk(disks[i]); - } - if (ll_unregister_blkdev(lloop_major, "lloop")) - CWARN("lloop: cannot unregister blkdev\n"); - - kfree(disks); - kfree(loop_dev); -} - -module_init(lloop_init); -module_exit(lloop_exit); - -CFS_MODULE_PARM(max_loop, "i", int, 0444, "maximum of lloop_device"); -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre virtual block device"); -MODULE_LICENSE("GPL"); diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c deleted file mode 100644 index 04a7f90610..0000000000 --- a/lustre/llite/lproc_llite.c +++ /dev/null @@ -1,1351 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ -#define DEBUG_SUBSYSTEM S_LLITE - -#include <linux/version.h> -#include <lustre_lite.h> -#include <lprocfs_status.h> -#include <linux/seq_file.h> -#include <obd_support.h> - -#include "llite_internal.h" - -struct proc_dir_entry *proc_lustre_fs_root; - -#ifdef LPROCFS -/* /proc/lustre/llite mount point registration */ -struct file_operations llite_dump_pgcache_fops; -struct file_operations ll_ra_stats_fops; -struct file_operations ll_rw_extents_stats_fops; -struct file_operations ll_rw_extents_stats_pp_fops; -struct file_operations ll_rw_offset_stats_fops; - -static int ll_rd_blksize(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct super_block *sb = (struct super_block *)data; - struct obd_statfs osfs; - int rc; - - LASSERT(sb != NULL); - rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ, - OBD_STATFS_NODELAY); - if (!rc) { - *eof = 1; - rc = snprintf(page, count, "%u\n", osfs.os_bsize); - } - - return rc; -} - -static int ll_rd_kbytestotal(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct super_block *sb = (struct super_block *)data; - struct obd_statfs osfs; - int rc; - - LASSERT(sb != NULL); - rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ, - OBD_STATFS_NODELAY); - if (!rc) { - __u32 blk_size = osfs.os_bsize >> 10; - __u64 result = osfs.os_blocks; - - while (blk_size >>= 1) - result <<= 1; - - *eof = 1; - rc = snprintf(page, count, LPU64"\n", result); - } - return rc; - -} - -static int ll_rd_kbytesfree(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct super_block *sb = (struct super_block *)data; - struct obd_statfs osfs; - int rc; - - LASSERT(sb != NULL); - rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ, - OBD_STATFS_NODELAY); - if (!rc) { - __u32 blk_size = osfs.os_bsize >> 10; - __u64 result = osfs.os_bfree; - - while (blk_size >>= 1) - result <<= 1; - - *eof = 1; - rc = snprintf(page, count, LPU64"\n", result); - } - return rc; -} - -static int ll_rd_kbytesavail(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct super_block *sb = (struct super_block *)data; - struct obd_statfs osfs; - int rc; - - LASSERT(sb != NULL); - rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ, - OBD_STATFS_NODELAY); - if (!rc) { - __u32 blk_size = osfs.os_bsize >> 10; - __u64 result = osfs.os_bavail; - - while (blk_size >>= 1) - result <<= 1; - - *eof = 1; - rc = snprintf(page, count, LPU64"\n", result); - } - return rc; -} - -static int ll_rd_filestotal(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct super_block *sb = (struct super_block *)data; - struct obd_statfs osfs; - int rc; - - LASSERT(sb != NULL); - rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ, - OBD_STATFS_NODELAY); - if (!rc) { - *eof = 1; - rc = snprintf(page, count, LPU64"\n", osfs.os_files); - } - return rc; -} - -static int ll_rd_filesfree(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct super_block *sb = (struct super_block *)data; - struct obd_statfs osfs; - int rc; - - LASSERT(sb != NULL); - rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ, - OBD_STATFS_NODELAY); - if (!rc) { - *eof = 1; - rc = snprintf(page, count, LPU64"\n", osfs.os_ffree); - } - return rc; - -} - -static int ll_rd_fstype(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct super_block *sb = (struct super_block*)data; - - LASSERT(sb != NULL); - *eof = 1; - return snprintf(page, count, "%s\n", sb->s_type->name); -} - -static int ll_rd_sb_uuid(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct super_block *sb = (struct super_block *)data; - - LASSERT(sb != NULL); - *eof = 1; - return snprintf(page, count, "%s\n", ll_s2sbi(sb)->ll_sb_uuid.uuid); -} - -static int ll_rd_max_readahead_mb(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - long pages_number; - int mult; - - spin_lock(&sbi->ll_lock); - pages_number = sbi->ll_ra_info.ra_max_pages; - spin_unlock(&sbi->ll_lock); - - mult = 1 << (20 - CFS_PAGE_SHIFT); - return lprocfs_read_frac_helper(page, count, pages_number, mult); -} - -static int ll_wr_max_readahead_mb(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - int mult, rc, pages_number; - - mult = 1 << (20 - CFS_PAGE_SHIFT); - rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult); - if (rc) - return rc; - - if (pages_number < 0 || pages_number > num_physpages / 2) { - CERROR("can't set file readahead more than %lu MB\n", - num_physpages >> (20 - CFS_PAGE_SHIFT + 1)); /*1/2 of RAM*/ - return -ERANGE; - } - - spin_lock(&sbi->ll_lock); - sbi->ll_ra_info.ra_max_pages = pages_number; - spin_unlock(&sbi->ll_lock); - - return count; -} - -static int ll_rd_max_read_ahead_whole_mb(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - long pages_number; - int mult; - - spin_lock(&sbi->ll_lock); - pages_number = sbi->ll_ra_info.ra_max_read_ahead_whole_pages; - spin_unlock(&sbi->ll_lock); - - mult = 1 << (20 - CFS_PAGE_SHIFT); - return lprocfs_read_frac_helper(page, count, pages_number, mult); -} - -static int ll_wr_max_read_ahead_whole_mb(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - int mult, rc, pages_number; - - mult = 1 << (20 - CFS_PAGE_SHIFT); - rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult); - if (rc) - return rc; - - /* Cap this at the current max readahead window size, the readahead - * algorithm does this anyway so it's pointless to set it larger. */ - if (pages_number < 0 || pages_number > sbi->ll_ra_info.ra_max_pages) { - CERROR("can't set max_read_ahead_whole_mb more than " - "max_read_ahead_mb: %lu\n", - sbi->ll_ra_info.ra_max_pages >> (20 - CFS_PAGE_SHIFT)); - return -ERANGE; - } - - spin_lock(&sbi->ll_lock); - sbi->ll_ra_info.ra_max_read_ahead_whole_pages = pages_number; - spin_unlock(&sbi->ll_lock); - - return count; -} - -static int ll_rd_max_cached_mb(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - long pages_number; - int mult; - - spin_lock(&sbi->ll_lock); - pages_number = sbi->ll_async_page_max; - spin_unlock(&sbi->ll_lock); - - mult = 1 << (20 - CFS_PAGE_SHIFT); - return lprocfs_read_frac_helper(page, count, pages_number, mult);; -} - -static int ll_wr_max_cached_mb(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - int mult, rc, pages_number; - - mult = 1 << (20 - CFS_PAGE_SHIFT); - rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult); - if (rc) - return rc; - - if (pages_number < 0 || pages_number > num_physpages) { - CERROR("can't set max cache more than %lu MB\n", - num_physpages >> (20 - CFS_PAGE_SHIFT)); - return -ERANGE; - } - - spin_lock(&sbi->ll_lock); - sbi->ll_async_page_max = pages_number ; - spin_unlock(&sbi->ll_lock); - - if (!sbi->ll_osc_exp) - /* Not set up yet, don't call llap_shrink_cache */ - return count; - - if (sbi->ll_async_page_count >= sbi->ll_async_page_max) - llap_shrink_cache(sbi, 0); - - return count; -} - -static int ll_rd_checksum(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - - return snprintf(page, count, "%u\n", - (sbi->ll_flags & LL_SBI_LLITE_CHECKSUM) ? 1 : 0); -} - -static int ll_wr_checksum(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - int val, rc; - - if (!sbi->ll_osc_exp) - /* Not set up yet */ - return -EAGAIN; - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - if (val) - sbi->ll_flags |= (LL_SBI_LLITE_CHECKSUM|LL_SBI_DATA_CHECKSUM); - else - sbi->ll_flags &= ~(LL_SBI_LLITE_CHECKSUM|LL_SBI_DATA_CHECKSUM); - - rc = obd_set_info_async(sbi->ll_osc_exp, strlen("checksum"), "checksum", - sizeof(val), &val, NULL); - if (rc) - CWARN("Failed to set OSC checksum flags: %d\n", rc); - - return count; -} - -static int ll_rd_max_rw_chunk(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct super_block *sb = data; - - return snprintf(page, count, "%lu\n", ll_s2sbi(sb)->ll_max_rw_chunk); -} - -static int ll_wr_max_rw_chunk(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct super_block *sb = data; - int rc, val; - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - ll_s2sbi(sb)->ll_max_rw_chunk = val; - return count; -} - -static int ll_rd_track_id(char *page, int count, void *data, - enum stats_track_type type) -{ - struct super_block *sb = data; - - if (ll_s2sbi(sb)->ll_stats_track_type == type) { - return snprintf(page, count, "%d\n", - ll_s2sbi(sb)->ll_stats_track_id); - - } else if (ll_s2sbi(sb)->ll_stats_track_type == STATS_TRACK_ALL) { - return snprintf(page, count, "0 (all)\n"); - } else { - return snprintf(page, count, "untracked\n"); - } -} - -static int ll_wr_track_id(const char *buffer, unsigned long count, void *data, - enum stats_track_type type) -{ - struct super_block *sb = data; - int rc, pid; - - rc = lprocfs_write_helper(buffer, count, &pid); - if (rc) - return rc; - ll_s2sbi(sb)->ll_stats_track_id = pid; - if (pid == 0) - ll_s2sbi(sb)->ll_stats_track_type = STATS_TRACK_ALL; - else - ll_s2sbi(sb)->ll_stats_track_type = type; - lprocfs_clear_stats(ll_s2sbi(sb)->ll_stats); - return count; -} - -static int ll_rd_track_pid(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - return (ll_rd_track_id(page, count, data, STATS_TRACK_PID)); -} - -static int ll_wr_track_pid(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - return (ll_wr_track_id(buffer, count, data, STATS_TRACK_PID)); -} - -static int ll_rd_track_ppid(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - return (ll_rd_track_id(page, count, data, STATS_TRACK_PPID)); -} - -static int ll_wr_track_ppid(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - return (ll_wr_track_id(buffer, count, data, STATS_TRACK_PPID)); -} - -static int ll_rd_track_gid(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - return (ll_rd_track_id(page, count, data, STATS_TRACK_GID)); -} - -static int ll_wr_track_gid(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - return (ll_wr_track_id(buffer, count, data, STATS_TRACK_GID)); -} - -static int ll_rd_contention_time(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct super_block *sb = data; - - *eof = 1; - return snprintf(page, count, "%u\n", ll_s2sbi(sb)->ll_contention_time); - -} - -static int ll_wr_contention_time(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - - return lprocfs_write_helper(buffer, count,&sbi->ll_contention_time) ?: - count; -} - -static int ll_rd_statahead_max(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - - return snprintf(page, count, "%u\n", sbi->ll_sa_max); -} - -static int ll_wr_statahead_max(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - int val, rc; - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val >= 0 && val <= LL_SA_RPC_MAX) - sbi->ll_sa_max = val; - else - CERROR("Bad statahead_max value %d. Valid values are in the " - "range [0, %d]\n", val, LL_SA_RPC_MAX); - - return count; -} - -static int ll_rd_statahead_stats(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct super_block *sb = data; - struct ll_sb_info *sbi = ll_s2sbi(sb); - - return snprintf(page, count, - "statahead wrong: %u\n" - "statahead total: %u\n" - "ls blocked: %llu\n" - "ls cached: %llu\n" - "hit count: %llu\n" - "miss count: %llu\n", - sbi->ll_sa_wrong, - sbi->ll_sa_total, - sbi->ll_sa_blocked, - sbi->ll_sa_cached, - sbi->ll_sa_hit, - sbi->ll_sa_miss); -} - -static struct lprocfs_vars lprocfs_llite_obd_vars[] = { - { "uuid", ll_rd_sb_uuid, 0, 0 }, - //{ "mntpt_path", ll_rd_path, 0, 0 }, - { "fstype", ll_rd_fstype, 0, 0 }, - { "blocksize", ll_rd_blksize, 0, 0 }, - { "kbytestotal", ll_rd_kbytestotal, 0, 0 }, - { "kbytesfree", ll_rd_kbytesfree, 0, 0 }, - { "kbytesavail", ll_rd_kbytesavail, 0, 0 }, - { "filestotal", ll_rd_filestotal, 0, 0 }, - { "filesfree", ll_rd_filesfree, 0, 0 }, - //{ "filegroups", lprocfs_rd_filegroups, 0, 0 }, - { "max_read_ahead_mb", ll_rd_max_readahead_mb, - ll_wr_max_readahead_mb, 0 }, - { "max_read_ahead_whole_mb", ll_rd_max_read_ahead_whole_mb, - ll_wr_max_read_ahead_whole_mb, 0 }, - { "max_cached_mb", ll_rd_max_cached_mb, ll_wr_max_cached_mb, 0 }, - { "checksum_pages", ll_rd_checksum, ll_wr_checksum, 0 }, - { "max_rw_chunk", ll_rd_max_rw_chunk, ll_wr_max_rw_chunk, 0 }, - { "stats_track_pid", ll_rd_track_pid, ll_wr_track_pid, 0 }, - { "stats_track_ppid", ll_rd_track_ppid, ll_wr_track_ppid, 0 }, - { "stats_track_gid", ll_rd_track_gid, ll_wr_track_gid, 0 }, - { "contention_seconds", ll_rd_contention_time, ll_wr_contention_time, 0}, - { "statahead_max", ll_rd_statahead_max, ll_wr_statahead_max, 0 }, - { "statahead_stats", ll_rd_statahead_stats, 0, 0 }, - { 0 } -}; - -#define MAX_STRING_SIZE 128 - -struct llite_file_opcode { - __u32 opcode; - __u32 type; - const char *opname; -} llite_opcode_table[LPROC_LL_FILE_OPCODES] = { - /* file operation */ - { LPROC_LL_DIRTY_HITS, LPROCFS_TYPE_REGS, "dirty_pages_hits" }, - { LPROC_LL_DIRTY_MISSES, LPROCFS_TYPE_REGS, "dirty_pages_misses" }, - { LPROC_LL_WB_WRITEPAGE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, - "writeback_from_writepage" }, - { LPROC_LL_WB_PRESSURE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, - "writeback_from_pressure" }, - { LPROC_LL_WB_OK, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, - "writeback_ok_pages" }, - { LPROC_LL_WB_FAIL, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, - "writeback_failed_pages" }, - { LPROC_LL_READ_BYTES, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, - "read_bytes" }, - { LPROC_LL_WRITE_BYTES, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, - "write_bytes" }, - { LPROC_LL_BRW_READ, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, - "brw_read" }, - { LPROC_LL_BRW_WRITE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, - "brw_write" }, - - { LPROC_LL_IOCTL, LPROCFS_TYPE_REGS, "ioctl" }, - { LPROC_LL_OPEN, LPROCFS_TYPE_REGS, "open" }, - { LPROC_LL_RELEASE, LPROCFS_TYPE_REGS, "close" }, - { LPROC_LL_MAP, LPROCFS_TYPE_REGS, "mmap" }, - { LPROC_LL_LLSEEK, LPROCFS_TYPE_REGS, "seek" }, - { LPROC_LL_FSYNC, LPROCFS_TYPE_REGS, "fsync" }, - /* inode operation */ - { LPROC_LL_SETATTR, LPROCFS_TYPE_REGS, "setattr" }, - { LPROC_LL_TRUNC, LPROCFS_TYPE_REGS, "truncate" }, - { LPROC_LL_FLOCK, LPROCFS_TYPE_REGS, "flock" }, -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - { LPROC_LL_GETATTR, LPROCFS_TYPE_REGS, "getattr" }, -#else - { LPROC_LL_REVALIDATE, LPROCFS_TYPE_REGS, "getattr" }, -#endif - /* special inode operation */ - { LPROC_LL_STAFS, LPROCFS_TYPE_REGS, "statfs" }, - { LPROC_LL_ALLOC_INODE, LPROCFS_TYPE_REGS, "alloc_inode" }, - { LPROC_LL_SETXATTR, LPROCFS_TYPE_REGS, "setxattr" }, - { LPROC_LL_GETXATTR, LPROCFS_TYPE_REGS, "getxattr" }, - { LPROC_LL_LISTXATTR, LPROCFS_TYPE_REGS, "listxattr" }, - { LPROC_LL_REMOVEXATTR, LPROCFS_TYPE_REGS, "removexattr" }, - { LPROC_LL_INODE_PERM, LPROCFS_TYPE_REGS, "inode_permission" }, - { LPROC_LL_DIRECT_READ, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, - "direct_read" }, - { LPROC_LL_DIRECT_WRITE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, - "direct_write" }, - { LPROC_LL_LOCKLESS_READ, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, - "lockless_read_bytes" }, - { LPROC_LL_LOCKLESS_WRITE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, - "lockless_write_bytes" }, - -}; - -void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count) -{ - if (!sbi->ll_stats) - return; - if (sbi->ll_stats_track_type == STATS_TRACK_ALL) - lprocfs_counter_add(sbi->ll_stats, op, count); - else if (sbi->ll_stats_track_type == STATS_TRACK_PID && - sbi->ll_stats_track_id == current->pid) - lprocfs_counter_add(sbi->ll_stats, op, count); - else if (sbi->ll_stats_track_type == STATS_TRACK_PPID && - sbi->ll_stats_track_id == current->p_pptr->pid) - lprocfs_counter_add(sbi->ll_stats, op, count); - else if (sbi->ll_stats_track_type == STATS_TRACK_GID && - sbi->ll_stats_track_id == current->gid) - lprocfs_counter_add(sbi->ll_stats, op, count); -} -EXPORT_SYMBOL(ll_stats_ops_tally); - -int lprocfs_register_mountpoint(struct proc_dir_entry *parent, - struct super_block *sb, char *osc, char *mdc) -{ - struct lprocfs_vars lvars[2]; - struct lustre_sb_info *lsi = s2lsi(sb); - struct ll_sb_info *sbi = ll_s2sbi(sb); - struct obd_device *obd; - char name[MAX_STRING_SIZE + 1], *ptr; - int err, id, len; - struct proc_dir_entry *entry; - ENTRY; - - memset(lvars, 0, sizeof(lvars)); - - name[MAX_STRING_SIZE] = '\0'; - lvars[0].name = name; - - LASSERT(sbi != NULL); - LASSERT(mdc != NULL); - LASSERT(osc != NULL); - - /* Get fsname */ - len = strlen(lsi->lsi_lmd->lmd_profile); - ptr = strrchr(lsi->lsi_lmd->lmd_profile, '-'); - if (ptr && (strcmp(ptr, "-client") == 0)) - len -= 7; - - /* Mount info */ - snprintf(name, MAX_STRING_SIZE, "%.*s-%p", len, - lsi->lsi_lmd->lmd_profile, sb); - - sbi->ll_proc_root = lprocfs_register(name, parent, NULL, NULL); - if (IS_ERR(sbi->ll_proc_root)) { - err = PTR_ERR(sbi->ll_proc_root); - sbi->ll_proc_root = NULL; - RETURN(err); - } - - entry = create_proc_entry("dump_page_cache", 0444, sbi->ll_proc_root); - if (entry == NULL) - GOTO(out, err = -ENOMEM); - entry->proc_fops = &llite_dump_pgcache_fops; - entry->data = sbi; - - entry = create_proc_entry("read_ahead_stats", 0644, sbi->ll_proc_root); - if (entry == NULL) - GOTO(out, err = -ENOMEM); - entry->proc_fops = &ll_ra_stats_fops; - entry->data = sbi; - - entry = create_proc_entry("extents_stats", 0644, sbi->ll_proc_root); - if (entry == NULL) - GOTO(out, err = -ENOMEM); - entry->proc_fops = &ll_rw_extents_stats_fops; - entry->data = sbi; - - entry = create_proc_entry("extents_stats_per_process", 0644, - sbi->ll_proc_root); - if (entry == NULL) - GOTO(out, err = -ENOMEM); - entry->proc_fops = &ll_rw_extents_stats_pp_fops; - entry->data = sbi; - - entry = create_proc_entry("offset_stats", 0644, sbi->ll_proc_root); - if (entry == NULL) - GOTO(out, err = -ENOMEM); - entry->proc_fops = &ll_rw_offset_stats_fops; - entry->data = sbi; - - /* File operations stats */ - sbi->ll_stats = lprocfs_alloc_stats(LPROC_LL_FILE_OPCODES, - LPROCFS_STATS_FLAG_PERCPU); - if (sbi->ll_stats == NULL) - GOTO(out, err = -ENOMEM); - /* do counter init */ - for (id = 0; id < LPROC_LL_FILE_OPCODES; id++) { - __u32 type = llite_opcode_table[id].type; - void *ptr = NULL; - if (type & LPROCFS_TYPE_REGS) - ptr = "regs"; - else if (type & LPROCFS_TYPE_BYTES) - ptr = "bytes"; - else if (type & LPROCFS_TYPE_PAGES) - ptr = "pages"; - lprocfs_counter_init(sbi->ll_stats, - llite_opcode_table[id].opcode, - (type & LPROCFS_CNTR_AVGMINMAX), - llite_opcode_table[id].opname, ptr); - } - err = lprocfs_register_stats(sbi->ll_proc_root, "stats", sbi->ll_stats); - if (err) - GOTO(out, err); - - err = lprocfs_add_vars(sbi->ll_proc_root, lprocfs_llite_obd_vars, sb); - if (err) - GOTO(out, err); - - /* MDC info */ - obd = class_name2obd(mdc); - - LASSERT(obd != NULL); - LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); - LASSERT(obd->obd_type->typ_name != NULL); - - snprintf(name, MAX_STRING_SIZE, "%s/common_name", - obd->obd_type->typ_name); - lvars[0].read_fptr = lprocfs_rd_name; - err = lprocfs_add_vars(sbi->ll_proc_root, lvars, obd); - if (err) - GOTO(out, err); - - snprintf(name, MAX_STRING_SIZE, "%s/uuid", obd->obd_type->typ_name); - lvars[0].read_fptr = lprocfs_rd_uuid; - err = lprocfs_add_vars(sbi->ll_proc_root, lvars, obd); - if (err) - GOTO(out, err); - - /* OSC */ - obd = class_name2obd(osc); - - LASSERT(obd != NULL); - LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); - LASSERT(obd->obd_type->typ_name != NULL); - - snprintf(name, MAX_STRING_SIZE, "%s/common_name", - obd->obd_type->typ_name); - lvars[0].read_fptr = lprocfs_rd_name; - err = lprocfs_add_vars(sbi->ll_proc_root, lvars, obd); - if (err) - GOTO(out, err); - - snprintf(name, MAX_STRING_SIZE, "%s/uuid", obd->obd_type->typ_name); - lvars[0].read_fptr = lprocfs_rd_uuid; - err = lprocfs_add_vars(sbi->ll_proc_root, lvars, obd); -out: - if (err) { - lprocfs_remove(&sbi->ll_proc_root); - lprocfs_free_stats(&sbi->ll_stats); - } - RETURN(err); -} - -void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi) -{ - if (sbi->ll_proc_root) { - lprocfs_remove(&sbi->ll_proc_root); - lprocfs_free_stats(&sbi->ll_stats); - } -} -#undef MAX_STRING_SIZE - -#define seq_page_flag(seq, page, flag, has_flags) do { \ - if (test_bit(PG_##flag, &(page)->flags)) { \ - if (!has_flags) \ - has_flags = 1; \ - else \ - seq_putc(seq, '|'); \ - seq_puts(seq, #flag); \ - } \ - } while(0); - -static void *llite_dump_pgcache_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct ll_async_page *dummy_llap = seq->private; - - if (dummy_llap->llap_magic == 2) - return NULL; - - return (void *)1; -} - -static int llite_dump_pgcache_seq_show(struct seq_file *seq, void *v) -{ - struct ll_async_page *llap, *dummy_llap = seq->private; - struct ll_sb_info *sbi = dummy_llap->llap_cookie; - - /* 2.4 doesn't seem to have SEQ_START_TOKEN, so we implement - * it in our own state */ - if (dummy_llap->llap_magic == 0) { - seq_printf(seq, "gener | llap cookie origin wq du wb | page " - "inode index count [ page flags ]\n"); - return 0; - } - - spin_lock(&sbi->ll_lock); - - llap = llite_pglist_next_llap(sbi, &dummy_llap->llap_pglist_item); - if (llap != NULL) { - int has_flags = 0; - struct page *page = llap->llap_page; - - LASSERTF(llap->llap_origin < LLAP__ORIGIN_MAX, "%u\n", - llap->llap_origin); - - seq_printf(seq," %5lu | %p %p %s %s %s %s | %p %lu/%u(%p) " - "%lu %u [", - sbi->ll_pglist_gen, - llap, llap->llap_cookie, - llap_origins[llap->llap_origin], - llap->llap_write_queued ? "wq" : "- ", - llap->llap_defer_uptodate ? "du" : "- ", - PageWriteback(page) ? "wb" : "-", - page, page->mapping->host->i_ino, - page->mapping->host->i_generation, - page->mapping->host, page->index, - page_count(page)); - seq_page_flag(seq, page, locked, has_flags); - seq_page_flag(seq, page, error, has_flags); - seq_page_flag(seq, page, referenced, has_flags); - seq_page_flag(seq, page, uptodate, has_flags); - seq_page_flag(seq, page, dirty, has_flags); -#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,12)) - seq_page_flag(seq, page, highmem, has_flags); -#endif - seq_page_flag(seq, page, writeback, has_flags); - if (!has_flags) - seq_puts(seq, "-]\n"); - else - seq_puts(seq, "]\n"); - } - - spin_unlock(&sbi->ll_lock); - - return 0; -} - -static void *llite_dump_pgcache_seq_next(struct seq_file *seq, void *v, - loff_t *pos) -{ - struct ll_async_page *llap, *dummy_llap = seq->private; - struct ll_sb_info *sbi = dummy_llap->llap_cookie; - - /* bail if we just displayed the banner */ - if (dummy_llap->llap_magic == 0) { - dummy_llap->llap_magic = 1; - return dummy_llap; - } - - /* we've just displayed the llap that is after us in the list. - * we advance to a position beyond it, returning null if there - * isn't another llap in the list beyond that new position. */ - spin_lock(&sbi->ll_lock); - llap = llite_pglist_next_llap(sbi, &dummy_llap->llap_pglist_item); - list_del_init(&dummy_llap->llap_pglist_item); - if (llap) { - list_add(&dummy_llap->llap_pglist_item,&llap->llap_pglist_item); - llap =llite_pglist_next_llap(sbi,&dummy_llap->llap_pglist_item); - } - spin_unlock(&sbi->ll_lock); - - ++*pos; - if (llap == NULL) { - dummy_llap->llap_magic = 2; - return NULL; - } - return dummy_llap; -} - -static void null_stop(struct seq_file *seq, void *v) -{ -} - -struct seq_operations llite_dump_pgcache_seq_sops = { - .start = llite_dump_pgcache_seq_start, - .stop = null_stop, - .next = llite_dump_pgcache_seq_next, - .show = llite_dump_pgcache_seq_show, -}; - -/* we're displaying llaps in a list_head list. we don't want to hold a lock - * while we walk the entire list, and we don't want to have to seek into - * the right position in the list as an app advances with many syscalls. we - * allocate a dummy llap and hang it off file->private. its position in - * the list records where the app is currently displaying. this way our - * seq .start and .stop don't actually do anything. .next returns null - * when the dummy hits the end of the list which eventually leads to .release - * where we tear down. this kind of displaying is super-racey, so we put - * a generation counter on the list so the output shows when the list - * changes between reads. - */ -static int llite_dump_pgcache_seq_open(struct inode *inode, struct file *file) -{ - struct proc_dir_entry *dp = PDE(inode); - struct ll_async_page *dummy_llap; - struct seq_file *seq; - struct ll_sb_info *sbi = dp->data; - int rc = -ENOMEM; - - LPROCFS_ENTRY_AND_CHECK(dp); - - OBD_ALLOC_PTR_WAIT(dummy_llap); - if (dummy_llap == NULL) - GOTO(out, rc); - - dummy_llap->llap_page = NULL; - dummy_llap->llap_cookie = sbi; - dummy_llap->llap_magic = 0; - - rc = seq_open(file, &llite_dump_pgcache_seq_sops); - if (rc) { - OBD_FREE(dummy_llap, sizeof(*dummy_llap)); - GOTO(out, rc); - } - seq = file->private_data; - seq->private = dummy_llap; - - spin_lock(&sbi->ll_lock); - list_add(&dummy_llap->llap_pglist_item, &sbi->ll_pglist); - spin_unlock(&sbi->ll_lock); - -out: - if (rc) - LPROCFS_EXIT(); - return rc; -} - -static int llite_dump_pgcache_seq_release(struct inode *inode, - struct file *file) -{ - struct seq_file *seq = file->private_data; - struct ll_async_page *dummy_llap = seq->private; - struct ll_sb_info *sbi = dummy_llap->llap_cookie; - - spin_lock(&sbi->ll_lock); - if (!list_empty(&dummy_llap->llap_pglist_item)) - list_del_init(&dummy_llap->llap_pglist_item); - spin_unlock(&sbi->ll_lock); - OBD_FREE(dummy_llap, sizeof(*dummy_llap)); - - return lprocfs_seq_release(inode, file); -} - -struct file_operations llite_dump_pgcache_fops = { - .owner = THIS_MODULE, - .open = llite_dump_pgcache_seq_open, - .read = seq_read, - .release = llite_dump_pgcache_seq_release, -}; - -static int ll_ra_stats_seq_show(struct seq_file *seq, void *v) -{ - struct timeval now; - struct ll_sb_info *sbi = seq->private; - struct ll_ra_info *ra = &sbi->ll_ra_info; - int i; - static char *ra_stat_strings[] = { - [RA_STAT_HIT] = "hits", - [RA_STAT_MISS] = "misses", - [RA_STAT_DISTANT_READPAGE] = "readpage not consecutive", - [RA_STAT_MISS_IN_WINDOW] = "miss inside window", - [RA_STAT_FAILED_GRAB_PAGE] = "failed grab_cache_page", - [RA_STAT_FAILED_MATCH] = "failed lock match", - [RA_STAT_DISCARDED] = "read but discarded", - [RA_STAT_ZERO_LEN] = "zero length file", - [RA_STAT_ZERO_WINDOW] = "zero size window", - [RA_STAT_EOF] = "read-ahead to EOF", - [RA_STAT_MAX_IN_FLIGHT] = "hit max r-a issue", - [RA_STAT_WRONG_GRAB_PAGE] = "wrong page from grab_cache_page", - }; - - do_gettimeofday(&now); - - spin_lock(&sbi->ll_lock); - - seq_printf(seq, "snapshot_time: %lu.%lu (secs.usecs)\n", - now.tv_sec, now.tv_usec); - seq_printf(seq, "pending issued pages: %lu\n", - ra->ra_cur_pages); - - for(i = 0; i < _NR_RA_STAT; i++) - seq_printf(seq, "%-25s %lu\n", ra_stat_strings[i], - ra->ra_stats[i]); - - spin_unlock(&sbi->ll_lock); - - return 0; -} - -static ssize_t ll_ra_stats_seq_write(struct file *file, const char *buf, - size_t len, loff_t *off) -{ - struct seq_file *seq = file->private_data; - struct ll_sb_info *sbi = seq->private; - struct ll_ra_info *ra = &sbi->ll_ra_info; - - spin_lock(&sbi->ll_lock); - memset(ra->ra_stats, 0, sizeof(ra->ra_stats)); - spin_unlock(&sbi->ll_lock); - - return len; -} - -LPROC_SEQ_FOPS(ll_ra_stats); - -#define pct(a,b) (b ? a * 100 / b : 0) - -static void ll_display_extents_info(struct ll_rw_extents_info *io_extents, - struct seq_file *seq, int which) -{ - unsigned long read_tot = 0, write_tot = 0, read_cum, write_cum; - unsigned long start, end, r, w; - char *unitp = "KMGTPEZY"; - int i, units = 10; - struct per_process_info *pp_info = &io_extents->pp_extents[which]; - - read_cum = 0; - write_cum = 0; - start = 0; - - for(i = 0; i < LL_HIST_MAX; i++) { - read_tot += pp_info->pp_r_hist.oh_buckets[i]; - write_tot += pp_info->pp_w_hist.oh_buckets[i]; - } - - for(i = 0; i < LL_HIST_MAX; i++) { - r = pp_info->pp_r_hist.oh_buckets[i]; - w = pp_info->pp_w_hist.oh_buckets[i]; - read_cum += r; - write_cum += w; - end = 1 << (i + LL_HIST_START - units); - seq_printf(seq, "%4lu%c - %4lu%c%c: %14lu %4lu %4lu | " - "%14lu %4lu %4lu\n", start, *unitp, end, *unitp, - (i == LL_HIST_MAX - 1) ? '+' : ' ', - r, pct(r, read_tot), pct(read_cum, read_tot), - w, pct(w, write_tot), pct(write_cum, write_tot)); - start = end; - if (start == 1<<10) { - start = 1; - units += 10; - unitp++; - } - if (read_cum == read_tot && write_cum == write_tot) - break; - } -} - -static int ll_rw_extents_stats_pp_seq_show(struct seq_file *seq, void *v) -{ - struct timeval now; - struct ll_sb_info *sbi = seq->private; - struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info; - int k; - - do_gettimeofday(&now); - - if (!sbi->ll_rw_stats_on) { - seq_printf(seq, "Disabled\n" - "Write anything in this file to activate\n"); - return 0; - } - seq_printf(seq, "snapshot_time: %lu.%lu (secs.usecs)\n", - now.tv_sec, now.tv_usec); - seq_printf(seq, "%15s %19s | %20s\n", " ", "read", "write"); - seq_printf(seq, "%13s %14s %4s %4s | %14s %4s %4s\n", - "extents", "calls", "%", "cum%", - "calls", "%", "cum%"); - spin_lock(&sbi->ll_pp_extent_lock); - for(k = 0; k < LL_PROCESS_HIST_MAX; k++) { - if(io_extents->pp_extents[k].pid != 0) { - seq_printf(seq, "\nPID: %d\n", - io_extents->pp_extents[k].pid); - ll_display_extents_info(io_extents, seq, k); - } - } - spin_unlock(&sbi->ll_pp_extent_lock); - return 0; -} - -static ssize_t ll_rw_extents_stats_pp_seq_write(struct file *file, - const char *buf, size_t len, - loff_t *off) -{ - struct seq_file *seq = file->private_data; - struct ll_sb_info *sbi = seq->private; - struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info; - int i; - - sbi->ll_rw_stats_on = 1; - spin_lock(&sbi->ll_pp_extent_lock); - for(i = 0; i < LL_PROCESS_HIST_MAX; i++) { - io_extents->pp_extents[i].pid = 0; - lprocfs_oh_clear(&io_extents->pp_extents[i].pp_r_hist); - lprocfs_oh_clear(&io_extents->pp_extents[i].pp_w_hist); - } - spin_unlock(&sbi->ll_pp_extent_lock); - return len; -} - -LPROC_SEQ_FOPS(ll_rw_extents_stats_pp); - -static int ll_rw_extents_stats_seq_show(struct seq_file *seq, void *v) -{ - struct timeval now; - struct ll_sb_info *sbi = seq->private; - struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info; - - do_gettimeofday(&now); - - if (!sbi->ll_rw_stats_on) { - seq_printf(seq, "Disabled\n" - "Write anything in this file to activate\n"); - return 0; - } - seq_printf(seq, "snapshot_time: %lu.%lu (secs.usecs)\n", - now.tv_sec, now.tv_usec); - - seq_printf(seq, "%15s %19s | %20s\n", " ", "read", "write"); - seq_printf(seq, "%13s %14s %4s %4s | %14s %4s %4s\n", - "extents", "calls", "%", "cum%", - "calls", "%", "cum%"); - spin_lock(&sbi->ll_lock); - ll_display_extents_info(io_extents, seq, LL_PROCESS_HIST_MAX); - spin_unlock(&sbi->ll_lock); - - return 0; -} - -static ssize_t ll_rw_extents_stats_seq_write(struct file *file, const char *buf, - size_t len, loff_t *off) -{ - struct seq_file *seq = file->private_data; - struct ll_sb_info *sbi = seq->private; - struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info; - int i; - - sbi->ll_rw_stats_on = 1; - spin_lock(&sbi->ll_pp_extent_lock); - for(i = 0; i <= LL_PROCESS_HIST_MAX; i++) - { - io_extents->pp_extents[i].pid = 0; - lprocfs_oh_clear(&io_extents->pp_extents[i].pp_r_hist); - lprocfs_oh_clear(&io_extents->pp_extents[i].pp_w_hist); - } - spin_unlock(&sbi->ll_pp_extent_lock); - - return len; -} - -LPROC_SEQ_FOPS(ll_rw_extents_stats); - -void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid, struct file - *file, size_t count, int rw) -{ - int i, cur = -1; - struct ll_rw_process_info *process; - struct ll_rw_process_info *offset; - int *off_count = &sbi->ll_rw_offset_entry_count; - int *process_count = &sbi->ll_offset_process_count; - struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info; - - if(!sbi->ll_rw_stats_on) - return; - process = sbi->ll_rw_process_info; - offset = sbi->ll_rw_offset_info; - - spin_lock(&sbi->ll_pp_extent_lock); - /* Extent statistics */ - for(i = 0; i < LL_PROCESS_HIST_MAX; i++) { - if(io_extents->pp_extents[i].pid == pid) { - cur = i; - break; - } - } - - if (cur == -1) { - /* new process */ - sbi->ll_extent_process_count = - (sbi->ll_extent_process_count + 1) % LL_PROCESS_HIST_MAX; - cur = sbi->ll_extent_process_count; - io_extents->pp_extents[cur].pid = pid; - lprocfs_oh_clear(&io_extents->pp_extents[cur].pp_r_hist); - lprocfs_oh_clear(&io_extents->pp_extents[cur].pp_w_hist); - } - - for(i = 0; (count >= (1 << LL_HIST_START << i)) && - (i < (LL_HIST_MAX - 1)); i++); - if (rw == 0) { - io_extents->pp_extents[cur].pp_r_hist.oh_buckets[i]++; - io_extents->pp_extents[LL_PROCESS_HIST_MAX].pp_r_hist.oh_buckets[i]++; - } else { - io_extents->pp_extents[cur].pp_w_hist.oh_buckets[i]++; - io_extents->pp_extents[LL_PROCESS_HIST_MAX].pp_w_hist.oh_buckets[i]++; - } - spin_unlock(&sbi->ll_pp_extent_lock); - - spin_lock(&sbi->ll_process_lock); - /* Offset statistics */ - for (i = 0; i < LL_PROCESS_HIST_MAX; i++) { - if (process[i].rw_pid == pid) { - if (process[i].rw_last_file != file) { - process[i].rw_range_start = file->f_pos; - process[i].rw_last_file_pos = - file->f_pos + count; - process[i].rw_smallest_extent = count; - process[i].rw_largest_extent = count; - process[i].rw_offset = 0; - process[i].rw_last_file = file; - spin_unlock(&sbi->ll_process_lock); - return; - } - if (process[i].rw_last_file_pos != file->f_pos) { - *off_count = - (*off_count + 1) % LL_OFFSET_HIST_MAX; - offset[*off_count].rw_op = process[i].rw_op; - offset[*off_count].rw_pid = pid; - offset[*off_count].rw_range_start = - process[i].rw_range_start; - offset[*off_count].rw_range_end = - process[i].rw_last_file_pos; - offset[*off_count].rw_smallest_extent = - process[i].rw_smallest_extent; - offset[*off_count].rw_largest_extent = - process[i].rw_largest_extent; - offset[*off_count].rw_offset = - process[i].rw_offset; - process[i].rw_op = rw; - process[i].rw_range_start = file->f_pos; - process[i].rw_smallest_extent = count; - process[i].rw_largest_extent = count; - process[i].rw_offset = file->f_pos - - process[i].rw_last_file_pos; - } - if(process[i].rw_smallest_extent > count) - process[i].rw_smallest_extent = count; - if(process[i].rw_largest_extent < count) - process[i].rw_largest_extent = count; - process[i].rw_last_file_pos = file->f_pos + count; - spin_unlock(&sbi->ll_process_lock); - return; - } - } - *process_count = (*process_count + 1) % LL_PROCESS_HIST_MAX; - process[*process_count].rw_pid = pid; - process[*process_count].rw_op = rw; - process[*process_count].rw_range_start = file->f_pos; - process[*process_count].rw_last_file_pos = file->f_pos + count; - process[*process_count].rw_smallest_extent = count; - process[*process_count].rw_largest_extent = count; - process[*process_count].rw_offset = 0; - process[*process_count].rw_last_file = file; - spin_unlock(&sbi->ll_process_lock); -} - -char lpszt[] = LPSZ; - -static int ll_rw_offset_stats_seq_show(struct seq_file *seq, void *v) -{ - struct timeval now; - struct ll_sb_info *sbi = seq->private; - struct ll_rw_process_info *offset = sbi->ll_rw_offset_info; - struct ll_rw_process_info *process = sbi->ll_rw_process_info; - char format[50]; - int i; - - do_gettimeofday(&now); - - if (!sbi->ll_rw_stats_on) { - seq_printf(seq, "Disabled\n" - "Write anything in this file to activate\n"); - return 0; - } - spin_lock(&sbi->ll_process_lock); - - seq_printf(seq, "snapshot_time: %lu.%lu (secs.usecs)\n", - now.tv_sec, now.tv_usec); - seq_printf(seq, "%3s %10s %14s %14s %17s %17s %14s\n", - "R/W", "PID", "RANGE START", "RANGE END", - "SMALLEST EXTENT", "LARGEST EXTENT", "OFFSET"); - sprintf(format, "%s%s%s%s%s\n", - "%3c %10d %14Lu %14Lu %17", lpszt+1, " %17", lpszt+1, " %14Ld"); - /* We stored the discontiguous offsets here; print them first */ - for(i = 0; i < LL_OFFSET_HIST_MAX; i++) { - if (offset[i].rw_pid != 0) - /* Is there a way to snip the '%' off of LPSZ? */ - seq_printf(seq, format, - offset[i].rw_op ? 'W' : 'R', - offset[i].rw_pid, - offset[i].rw_range_start, - offset[i].rw_range_end, - offset[i].rw_smallest_extent, - offset[i].rw_largest_extent, - offset[i].rw_offset); - } - /* Then print the current offsets for each process */ - for(i = 0; i < LL_PROCESS_HIST_MAX; i++) { - if (process[i].rw_pid != 0) - seq_printf(seq, format, - process[i].rw_op ? 'W' : 'R', - process[i].rw_pid, - process[i].rw_range_start, - process[i].rw_last_file_pos, - process[i].rw_smallest_extent, - process[i].rw_largest_extent, - process[i].rw_offset); - } - spin_unlock(&sbi->ll_process_lock); - - return 0; -} - -static ssize_t ll_rw_offset_stats_seq_write(struct file *file, const char *buf, - size_t len, loff_t *off) -{ - struct seq_file *seq = file->private_data; - struct ll_sb_info *sbi = seq->private; - struct ll_rw_process_info *process_info = sbi->ll_rw_process_info; - struct ll_rw_process_info *offset_info = sbi->ll_rw_offset_info; - - sbi->ll_rw_stats_on = 1; - - spin_lock(&sbi->ll_process_lock); - sbi->ll_offset_process_count = 0; - sbi->ll_rw_offset_entry_count = 0; - memset(process_info, 0, sizeof(struct ll_rw_process_info) * - LL_PROCESS_HIST_MAX); - memset(offset_info, 0, sizeof(struct ll_rw_process_info) * - LL_OFFSET_HIST_MAX); - spin_unlock(&sbi->ll_process_lock); - - return len; -} - -LPROC_SEQ_FOPS(ll_rw_offset_stats); - -void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars) -{ - lvars->module_vars = NULL; - lvars->obd_vars = lprocfs_llite_obd_vars; -} -#endif /* LPROCFS */ diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c deleted file mode 100644 index 2a0733fdd8..0000000000 --- a/lustre/llite/namei.c +++ /dev/null @@ -1,1371 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <linux/fs.h> -#include <linux/sched.h> -#include <linux/mm.h> -#include <linux/smp_lock.h> -#include <linux/quotaops.h> -#include <linux/highmem.h> -#include <linux/pagemap.h> - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <obd_support.h> -#include <lustre_lite.h> -#include <lustre_dlm.h> -#include <linux/lustre_version.h> -#include "llite_internal.h" - -/* methods */ - -/* called from iget{4,5_locked}->find_inode() under inode_lock spinlock */ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -static int ll_test_inode(struct inode *inode, unsigned long ino, void *opaque) -#else -static int ll_test_inode(struct inode *inode, void *opaque) -#endif -{ - static int last_ino, last_gen, last_count; - struct lustre_md *md = opaque; - - if (!(md->body->valid & (OBD_MD_FLGENER | OBD_MD_FLID))) { - CERROR("MDS body missing inum or generation\n"); - return 0; - } - - if (last_ino == md->body->ino && last_gen == md->body->generation && - last_count < 500) { - last_count++; - } else { - if (last_count > 1) - CDEBUG(D_VFSTRACE, "compared %u/%u %u times\n", - last_ino, last_gen, last_count); - last_count = 0; - last_ino = md->body->ino; - last_gen = md->body->generation; - CDEBUG(D_VFSTRACE, - "comparing inode %p ino %lu/%u to body "LPU64"/%u\n", - inode, inode->i_ino, inode->i_generation, - md->body->ino, md->body->generation); - } - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - if (inode->i_ino != md->body->ino) - return 0; -#endif - if (inode->i_generation != md->body->generation) { -#ifdef HAVE_EXPORT___IGET - if (inode->i_state & (I_FREEING | I_CLEAR)) - return 0; - if (inode->i_nlink == 0) - return 0; - - /* add "duplicate" inode into deathrow for destroy */ - spin_lock(&ll_i2sbi(inode)->ll_deathrow_lock); - if (list_empty(&ll_i2info(inode)->lli_dead_list)) { - __iget(inode); - list_add(&ll_i2info(inode)->lli_dead_list, - &ll_i2sbi(inode)->ll_deathrow); - } - spin_unlock(&ll_i2sbi(inode)->ll_deathrow_lock); -#endif - - return 0; - } - - /* Apply the attributes in 'opaque' to this inode */ - if (!(inode->i_state & (I_FREEING | I_CLEAR))) - ll_update_inode(inode, md); - return 1; -} - -int ll_unlock(__u32 mode, struct lustre_handle *lockh) -{ - ENTRY; - - ldlm_lock_decref(lockh, mode); - - RETURN(0); -} - -/* Get an inode by inode number (already instantiated by the intent lookup). - * Returns inode or NULL - */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -int ll_set_inode(struct inode *inode, void *opaque) -{ - ll_read_inode2(inode, opaque); - return 0; -} - -struct inode *ll_iget(struct super_block *sb, ino_t hash, - struct lustre_md *md) -{ - struct inode *inode; - - LASSERT(hash != 0); - inode = iget5_locked(sb, hash, ll_test_inode, ll_set_inode, md); - - if (inode) { - if (inode->i_state & I_NEW) - unlock_new_inode(inode); - CDEBUG(D_VFSTRACE, "inode: %lu/%u(%p)\n", inode->i_ino, - inode->i_generation, inode); - } - - return inode; -} -#else -struct inode *ll_iget(struct super_block *sb, ino_t hash, - struct lustre_md *md) -{ - struct inode *inode; - LASSERT(hash != 0); - inode = iget4(sb, hash, ll_test_inode, md); - if (inode) - CDEBUG(D_VFSTRACE, "inode: %lu/%u(%p)\n", inode->i_ino, - inode->i_generation, inode); - return inode; -} -#endif - -static void ll_drop_negative_dentry(struct inode *dir) -{ - struct dentry *dentry, *tmp_alias, *tmp_subdir; - - spin_lock(&dcache_lock); -restart: - list_for_each_entry_safe(dentry, tmp_alias, - &dir->i_dentry,d_alias) { - if (!list_empty(&dentry->d_subdirs)) { - struct dentry *child; - list_for_each_entry_safe(child, tmp_subdir, - &dentry->d_subdirs, - d_child) { - /* XXX Print some debug here? */ - if (!child->d_inode) - /* Negative dentry. If we were - dropping dcache lock, go - throught the list again */ - if (ll_drop_dentry(child)) - goto restart; - } - } - } - spin_unlock(&dcache_lock); -} - -int ll_mdc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, - void *data, int flag) -{ - int rc; - struct lustre_handle lockh; - ENTRY; - - switch (flag) { - case LDLM_CB_BLOCKING: - ldlm_lock2handle(lock, &lockh); - rc = ldlm_cli_cancel(&lockh); - if (rc < 0) { - CDEBUG(D_INODE, "ldlm_cli_cancel: %d\n", rc); - RETURN(rc); - } - break; - case LDLM_CB_CANCELING: { - struct inode *inode = ll_inode_from_lock(lock); - __u64 bits = lock->l_policy_data.l_inodebits.bits; - - /* Invalidate all dentries associated with this inode */ - if (inode == NULL) - break; - - LASSERT(lock->l_flags & LDLM_FL_CANCELING); - if ((bits & MDS_INODELOCK_LOOKUP) && - ll_have_md_lock(inode, MDS_INODELOCK_LOOKUP)) - bits &= ~MDS_INODELOCK_LOOKUP; - if ((bits & MDS_INODELOCK_UPDATE) && - ll_have_md_lock(inode, MDS_INODELOCK_UPDATE)) - bits &= ~MDS_INODELOCK_UPDATE; - if ((bits & MDS_INODELOCK_OPEN) && - ll_have_md_lock(inode, MDS_INODELOCK_OPEN)) - bits &= ~MDS_INODELOCK_OPEN; - - if (lock->l_resource->lr_name.name[0] != inode->i_ino || - lock->l_resource->lr_name.name[1] != inode->i_generation) { - LDLM_ERROR(lock, "data mismatch with ino %lu/%u (%p)", - inode->i_ino, inode->i_generation, inode); - } - - if (bits & MDS_INODELOCK_OPEN) { - int flags = 0; - switch (lock->l_req_mode) { - case LCK_CW: - flags = FMODE_WRITE; - break; - case LCK_PR: - flags = FMODE_EXEC; - if (!FMODE_EXEC) - CERROR("open PR lock without FMODE_EXEC\n"); - break; - case LCK_CR: - flags = FMODE_READ; - break; - default: - CERROR("Unexpected lock mode for OPEN lock " - "%d, inode %ld\n", lock->l_req_mode, - inode->i_ino); - } - ll_mdc_real_close(inode, flags); - } - - if (bits & MDS_INODELOCK_UPDATE) - clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, - &(ll_i2info(inode)->lli_flags)); - - if (S_ISDIR(inode->i_mode) && - (bits & MDS_INODELOCK_UPDATE)) { - CDEBUG(D_INODE, "invalidating inode %lu\n", - inode->i_ino); - truncate_inode_pages(inode->i_mapping, 0); - ll_drop_negative_dentry(inode); - inode->i_version++; /* XXX: remove with inode version*/ - } - - if (inode->i_sb->s_root && - inode != inode->i_sb->s_root->d_inode && - (bits & MDS_INODELOCK_LOOKUP)) - ll_unhash_aliases(inode); - iput(inode); - break; - } - default: - LBUG(); - } - - RETURN(0); -} - -int ll_mdc_cancel_unused(struct lustre_handle *conn, struct inode *inode, - int flags, void *opaque) -{ - struct ldlm_res_id res_id = - { .name = {inode->i_ino, inode->i_generation} }; - struct obd_device *obddev = class_conn2obd(conn); - ENTRY; - - RETURN(ldlm_cli_cancel_unused(obddev->obd_namespace, &res_id, flags, - opaque)); -} - -/* Pack the required supplementary groups into the supplied groups array. - * If we don't need to use the groups from the target inode(s) then we - * instead pack one or more groups from the user's supplementary group - * array in case it might be useful. Not needed if doing an MDS-side upcall. */ -void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2) -{ - int i; - - LASSERT(i1 != NULL); - LASSERT(suppgids != NULL); - - if (in_group_p(i1->i_gid)) - suppgids[0] = i1->i_gid; - else - suppgids[0] = -1; - - if (i2) { - if (in_group_p(i2->i_gid)) - suppgids[1] = i2->i_gid; - else - suppgids[1] = -1; - } else { - suppgids[1] = -1; - } - - for (i = 0; i < current_ngroups; i++) { - if (suppgids[0] == -1) { - if (current_groups[i] != suppgids[1]) - suppgids[0] = current_groups[i]; - continue; - } - if (suppgids[1] == -1) { - if (current_groups[i] != suppgids[0]) - suppgids[1] = current_groups[i]; - continue; - } - break; - } -} - -int ll_prepare_mdc_op_data(struct mdc_op_data *op_data, struct inode *i1, - struct inode *i2, const char *name, int namelen, - int mode, void *data) -{ - LASSERT(i1); - - if (namelen > ll_i2sbi(i1)->ll_namelen) - return -ENAMETOOLONG; - ll_i2gids(op_data->suppgids, i1, i2); - ll_inode2fid(&op_data->fid1, i1); - - if (i2) - ll_inode2fid(&op_data->fid2, i2); - else - memset(&op_data->fid2, 0, sizeof(op_data->fid2)); - - op_data->name = name; - op_data->namelen = namelen; - op_data->create_mode = mode; - op_data->mod_time = CURRENT_SECONDS; - op_data->data = data; - - return 0; -} - -static void ll_d_add(struct dentry *de, struct inode *inode) -{ - CDEBUG(D_DENTRY, "adding inode %p to dentry %p\n", inode, de); - /* d_instantiate */ - if (!list_empty(&de->d_alias)) { - spin_unlock(&dcache_lock); - CERROR("dentry %.*s %p alias next %p, prev %p\n", - de->d_name.len, de->d_name.name, de, - de->d_alias.next, de->d_alias.prev); - LBUG(); - } - if (inode) - list_add(&de->d_alias, &inode->i_dentry); - de->d_inode = inode; - - /* d_rehash */ - if (!d_unhashed(de)) { - spin_unlock(&dcache_lock); - CERROR("dentry %.*s %p hash next %p\n", - de->d_name.len, de->d_name.name, de, de->d_hash.next); - LBUG(); - } - d_rehash_cond(de, 0); -} - -/* Search "inode"'s alias list for a dentry that has the same name and parent - * as de. If found, return it. If not found, return de. - * Lustre can't use d_add_unique because don't unhash aliases for directory - * in ll_revalidate_it. After revaliadate inode will be have hashed aliases - * and it triggers BUG_ON in d_instantiate_unique (bug #10954). - */ -static struct dentry *ll_find_alias(struct inode *inode, struct dentry *de) -{ - struct list_head *tmp; - struct dentry *dentry; - struct dentry *last_discon = NULL; - - spin_lock(&dcache_lock); - list_for_each(tmp, &inode->i_dentry) { - dentry = list_entry(tmp, struct dentry, d_alias); - - /* We are called here with 'de' already on the aliases list. */ - if (unlikely(dentry == de)) { - CERROR("whoops\n"); - continue; - } - - if (dentry->d_flags & DCACHE_DISCONNECTED) { - LASSERT(last_discon == NULL); - last_discon = dentry; - continue; - } - - if (dentry->d_parent != de->d_parent) - continue; - - if (dentry->d_name.hash != de->d_name.hash) - continue; - - if (dentry->d_name.len != de->d_name.len) - continue; - - if (memcmp(dentry->d_name.name, de->d_name.name, - de->d_name.len) != 0) - continue; - - dget_locked(dentry); - lock_dentry(dentry); - __d_drop(dentry); -#ifdef DCACHE_LUSTRE_INVALID - dentry->d_flags &= ~DCACHE_LUSTRE_INVALID; -#endif - unlock_dentry(dentry); - d_rehash_cond(dentry, 0); /* avoid taking dcache_lock inside */ - spin_unlock(&dcache_lock); - iput(inode); - CDEBUG(D_DENTRY, "alias dentry %.*s (%p) parent %p inode %p " - "refc %d\n", de->d_name.len, de->d_name.name, de, - de->d_parent, de->d_inode, atomic_read(&de->d_count)); - return dentry; - } - if (last_discon) { - CDEBUG(D_DENTRY, "Reuse disconnected dentry %p inode %p " - "refc %d\n", last_discon, last_discon->d_inode, - atomic_read(&last_discon->d_count)); - dget_locked(last_discon); - spin_unlock(&dcache_lock); - d_rehash(de); - d_move(last_discon, de); - iput(inode); - return last_discon; - } - - ll_d_add(de, inode); - - spin_unlock(&dcache_lock); - - return de; -} - -int lookup_it_finish(struct ptlrpc_request *request, int offset, - struct lookup_intent *it, void *data) -{ - struct it_cb_data *icbd = data; - struct dentry **de = icbd->icbd_childp; - struct inode *parent = icbd->icbd_parent; - struct ll_sb_info *sbi = ll_i2sbi(parent); - struct inode *inode = NULL; - int set = 0, rc; - ENTRY; - - lock_dentry(*de); - if (likely((*de)->d_op != &ll_d_ops)) { - (*de)->d_op = &ll_init_d_ops; - set = 1; - } - unlock_dentry(*de); - - /* NB 1 request reference will be taken away by ll_intent_lock() - * when I return */ - if (!it_disposition(it, DISP_LOOKUP_NEG)) { - struct dentry *save = *de; - - rc = ll_prep_inode(sbi->ll_osc_exp, &inode, request, offset, - (*de)->d_sb); - if (rc) { - if (set) { - lock_dentry(*de); - if (likely((*de)->d_op == &ll_init_d_ops)) { - (*de)->d_op = &ll_fini_d_ops; - unlock_dentry(*de); - smp_wmb(); - ll_d_wakeup(*de); - } else { - unlock_dentry(*de); - } - } - RETURN(rc); - } - - CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n", - inode, inode->i_ino, inode->i_generation); - mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode); - - /* We used to query real size from OSTs here, but actually - this is not needed. For stat() calls size would be updated - from subsequent do_revalidate()->ll_inode_revalidate_it() in - 2.4 and - vfs_getattr_it->ll_getattr()->ll_inode_revalidate_it() in 2.6 - Everybody else who needs correct file size would call - ll_glimpse_size or some equivalent themselves anyway. - Also see bug 7198. */ - *de = ll_find_alias(inode, *de); - if (set && *de != save) { - lock_dentry(save); - if (likely(save->d_op == &ll_init_d_ops)) { - save->d_op = &ll_fini_d_ops; - unlock_dentry(save); - smp_wmb(); - ll_d_wakeup(save); - } else { - unlock_dentry(save); - } - } - } else { - /* Check that parent has UPDATE lock. If there is none, we - cannot afford to hash this dentry (done by ll_d_add) as it - might get picked up later when UPDATE lock will appear */ - if (ll_have_md_lock(parent, MDS_INODELOCK_UPDATE)) { - spin_lock(&dcache_lock); - ll_d_add(*de, inode); - spin_unlock(&dcache_lock); - } else { - /* We do not want to hash the dentry if don`t have a - * lock, but if this dentry is later used in d_move, - * we'd hit uninitialised list head d_hash, so we just - * do this to init d_hash field but leave dentry - * unhashed. (bug 10796). */ - d_rehash(*de); - d_drop(*de); - } - } - - ll_set_dd(*de); - - lock_dentry(*de); - if (likely((*de)->d_op == &ll_init_d_ops)) { - (*de)->d_op = &ll_d_ops; - unlock_dentry(*de); - smp_wmb(); - ll_d_wakeup(*de); - } else { - (*de)->d_op = &ll_d_ops; - unlock_dentry(*de); - } - - RETURN(0); -} - -static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, - struct lookup_intent *it, int lookup_flags) -{ - struct dentry *save = dentry, *retval; - struct mdc_op_data op_data; - struct it_cb_data icbd; - struct ptlrpc_request *req = NULL; - struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; - int rc; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),intent=%s\n", - dentry->d_name.len, dentry->d_name.name, parent->i_ino, - parent->i_generation, parent, LL_IT2STR(it)); - - if (d_mountpoint(dentry)) - CERROR("Tell Peter, lookup on mtpt, it %s\n", LL_IT2STR(it)); - - ll_frob_intent(&it, &lookup_it); - - /* As do_lookup is called before follow_mount, root dentry may be left - * not valid, revalidate it here. */ - if (parent->i_sb->s_root && (parent->i_sb->s_root->d_inode == parent) && - (it->it_op & (IT_OPEN | IT_CREAT))) { - rc = ll_inode_revalidate_it(parent->i_sb->s_root, it); - if (rc) - RETURN(ERR_PTR(rc)); - } - - if (it->it_op == IT_GETATTR) { - rc = ll_statahead_enter(parent, &dentry, 1); - if (rc >= 0) { - ll_statahead_exit(dentry, rc); - if (rc == 1) - RETURN(retval = dentry); - } - } - - icbd.icbd_parent = parent; - icbd.icbd_childp = &dentry; - - rc = ll_prepare_mdc_op_data(&op_data, parent, NULL, dentry->d_name.name, - dentry->d_name.len, lookup_flags, NULL); - if (rc) - RETURN(ERR_PTR(rc)); - - it->it_create_mode &= ~current->fs->umask; - - rc = mdc_intent_lock(ll_i2mdcexp(parent), &op_data, NULL, 0, it, - lookup_flags, &req, ll_mdc_blocking_ast, 0); - - if (rc < 0) - GOTO(out, retval = ERR_PTR(rc)); - - rc = lookup_it_finish(req, DLM_REPLY_REC_OFF, it, &icbd); - if (rc != 0) { - ll_intent_release(it); - GOTO(out, retval = ERR_PTR(rc)); - } - - if ((it->it_op & IT_OPEN) && dentry->d_inode && - !S_ISREG(dentry->d_inode->i_mode) && - !S_ISDIR(dentry->d_inode->i_mode)) { - ll_release_openhandle(dentry, it); - } - ll_lookup_finish_locks(it, dentry); - - if (dentry == save) - GOTO(out, retval = NULL); - else - GOTO(out, retval = dentry); - out: - if (req) - ptlrpc_req_finished(req); - return retval; -} - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -#ifdef HAVE_VFS_INTENT_PATCHES -static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry, - struct nameidata *nd) -{ - struct dentry *de; - ENTRY; - - if (nd && nd->flags & LOOKUP_LAST && !(nd->flags & LOOKUP_LINK_NOTLAST)) - de = ll_lookup_it(parent, dentry, &nd->intent, nd->flags); - else - de = ll_lookup_it(parent, dentry, NULL, 0); - - RETURN(de); -} -#else -struct lookup_intent *ll_convert_intent(struct open_intent *oit, - int lookup_flags) -{ - struct lookup_intent *it; - - OBD_ALLOC(it, sizeof(*it)); - if (!it) - return ERR_PTR(-ENOMEM); - - if (lookup_flags & LOOKUP_OPEN) { - it->it_op = IT_OPEN; - if (lookup_flags & LOOKUP_CREATE) - it->it_op |= IT_CREAT; - it->it_create_mode = oit->create_mode; - it->it_flags = oit->flags; - } else { - it->it_op = IT_GETATTR; - } - -#ifndef HAVE_FILE_IN_STRUCT_INTENT - /* Since there is no way to pass our intent to ll_file_open, - * just check the file is there. Actual open will be done - * in ll_file_open */ - if (it->it_op & IT_OPEN) - it->it_op = IT_LOOKUP; -#endif - - return it; -} - -static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry, - struct nameidata *nd) -{ - struct dentry *de; - ENTRY; - - if (nd && !(nd->flags & (LOOKUP_CONTINUE|LOOKUP_PARENT))) { - struct lookup_intent *it; - -#if defined(HAVE_FILE_IN_STRUCT_INTENT) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) - /* Did we came here from failed revalidate just to propagate - * its error? */ - if (nd->flags & LOOKUP_OPEN) - if (IS_ERR(nd->intent.open.file)) - RETURN((struct dentry *)nd->intent.open.file); -#endif - - if (ll_d2d(dentry) && ll_d2d(dentry)->lld_it) { - it = ll_d2d(dentry)->lld_it; - ll_d2d(dentry)->lld_it = NULL; - } else { - it = ll_convert_intent(&nd->intent.open, nd->flags); - if (IS_ERR(it)) - RETURN((struct dentry *)it); - } - - de = ll_lookup_it(parent, dentry, it, nd->flags); - if (de) - dentry = de; - if ((nd->flags & LOOKUP_OPEN) && !IS_ERR(dentry)) { /* Open */ - if (dentry->d_inode && - it_disposition(it, DISP_OPEN_OPEN)) { /* nocreate */ -#ifdef HAVE_FILE_IN_STRUCT_INTENT - if (S_ISFIFO(dentry->d_inode->i_mode)) { - // We cannot call open here as it would - // deadlock. - ptlrpc_req_finished( - (struct ptlrpc_request *) - it->d.lustre.it_data); - } else { - struct file *filp; - nd->intent.open.file->private_data = it; - filp =lookup_instantiate_filp(nd,dentry, - NULL); -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) -/* 2.6.1[456] have a bug in open_namei() that forgets to check - * nd->intent.open.file for error, so we need to return it as lookup's result - * instead */ - if (IS_ERR(filp)) { - if (de) - dput(de); - de = (struct dentry *) filp; - } -#endif - - } -#else /* HAVE_FILE_IN_STRUCT_INTENT */ - /* Release open handle as we have no way to - * pass it to ll_file_open */ - ll_release_openhandle(dentry, it); -#endif /* HAVE_FILE_IN_STRUCT_INTENT */ - } else if (it_disposition(it, DISP_OPEN_CREATE)) { - // XXX This can only reliably work on assumption - // that there are NO hashed negative dentries. - ll_d2d(dentry)->lld_it = it; - it = NULL; /* Will be freed in ll_create_nd */ - /* We absolutely depend on ll_create_nd to be - * called to not leak this intent and possible - * data attached to it */ - } - } - - if (it) { - ll_intent_release(it); - OBD_FREE(it, sizeof(*it)); - } - } else { - de = ll_lookup_it(parent, dentry, NULL, 0); - } - - RETURN(de); -} -#endif -#endif - -/* We depend on "mode" being set with the proper file type/umask by now */ -static struct inode *ll_create_node(struct inode *dir, const char *name, - int namelen, const void *data, int datalen, - int mode, __u64 extra, - struct lookup_intent *it) -{ - struct inode *inode = NULL; - struct ptlrpc_request *request = NULL; - struct ll_sb_info *sbi = ll_i2sbi(dir); - int rc; - ENTRY; - - LASSERT(it && it->d.lustre.it_disposition); - - LASSERT(it_disposition(it, DISP_ENQ_CREATE_REF)); - request = it->d.lustre.it_data; - it_clear_disposition(it, DISP_ENQ_CREATE_REF); - rc = ll_prep_inode(sbi->ll_osc_exp, &inode, request, DLM_REPLY_REC_OFF, - dir->i_sb); - if (rc) - GOTO(out, inode = ERR_PTR(rc)); - - LASSERT(list_empty(&inode->i_dentry)); - - /* We asked for a lock on the directory, but were granted a - * lock on the inode. Since we finally have an inode pointer, - * stuff it in the lock. */ - CDEBUG(D_DLMTRACE, "setting l_ast_data to inode %p (%lu/%u)\n", - inode, inode->i_ino, inode->i_generation); - mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode); - EXIT; - out: - ptlrpc_req_finished(request); - return inode; -} - -/* - * By the time this is called, we already have created the directory cache - * entry for the new file, but it is so far negative - it has no inode. - * - * We defer creating the OBD object(s) until open, to keep the intent and - * non-intent code paths similar, and also because we do not have the MDS - * inode number before calling ll_create_node() (which is needed for LOV), - * so we would need to do yet another RPC to the MDS to store the LOV EA - * data on the MDS. If needed, we would pass the PACKED lmm as data and - * lmm_size in datalen (the MDS still has code which will handle that). - * - * If the create succeeds, we fill in the inode information - * with d_instantiate(). - */ -static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode, - struct lookup_intent *it) -{ - struct inode *inode; - struct ptlrpc_request *request = it->d.lustre.it_data; - int rc = 0; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),intent=%s\n", - dentry->d_name.len, dentry->d_name.name, dir->i_ino, - dir->i_generation, dir, LL_IT2STR(it)); - - rc = it_open_error(DISP_OPEN_CREATE, it); - if (rc) - RETURN(rc); - - mdc_store_inode_generation(request, DLM_INTENT_REC_OFF, - DLM_REPLY_REC_OFF); - inode = ll_create_node(dir, dentry->d_name.name, dentry->d_name.len, - NULL, 0, mode, 0, it); - if (IS_ERR(inode)) { - RETURN(PTR_ERR(inode)); - } - - d_instantiate(dentry, inode); - /* Negative dentry may be unhashed if parent does not have UPDATE lock, - * but some callers, e.g. do_coredump, expect dentry to be hashed after - * successful create. Hash it here. */ - spin_lock(&dcache_lock); - if (d_unhashed(dentry)) - d_rehash_cond(dentry, 0); - spin_unlock(&dcache_lock); - RETURN(0); -} - -static void ll_update_times(struct ptlrpc_request *request, int offset, - struct inode *inode) -{ - struct mds_body *body = lustre_msg_buf(request->rq_repmsg, offset, - sizeof(*body)); - LASSERT(body); - - /* mtime is always updated with ctime, but can be set in past. - As write and utime(2) may happen within 1 second, and utime's - mtime has a priority over write's one, so take mtime from mds - for the same ctimes. */ - if (body->valid & OBD_MD_FLCTIME && - body->ctime >= LTIME_S(inode->i_ctime)) { - LTIME_S(inode->i_ctime) = body->ctime; - - if (body->valid & OBD_MD_FLMTIME) { - CDEBUG(D_INODE, "setting ino %lu mtime from %lu " - "to "LPU64"\n", inode->i_ino, - LTIME_S(inode->i_mtime), body->mtime); - LTIME_S(inode->i_mtime) = body->mtime; - } - } -} - -static int ll_new_node(struct inode *dir, struct qstr *name, - const char *tgt, int mode, - int rdev, struct dentry *dchild) -{ - struct ptlrpc_request *request = NULL; - struct inode *inode = NULL; - struct ll_sb_info *sbi = ll_i2sbi(dir); - struct mdc_op_data op_data; - int tgt_len = 0; - int err; - - ENTRY; - if (unlikely(tgt != NULL)) - tgt_len = strlen(tgt)+1; - - err = ll_prepare_mdc_op_data(&op_data, dir, NULL, name->name, - name->len, 0, NULL); - if (err) - GOTO(err_exit, err); - - err = mdc_create(sbi->ll_mdc_exp, &op_data, tgt, tgt_len, - mode, current->fsuid, current->fsgid, - current->cap_effective, rdev, &request); - if (err) - GOTO(err_exit, err); - - ll_update_times(request, REPLY_REC_OFF, dir); - - if (dchild) { - err = ll_prep_inode(sbi->ll_osc_exp, &inode, request, - REPLY_REC_OFF, dchild->d_sb); - if (err) - GOTO(err_exit, err); - - d_drop(dchild); - d_instantiate(dchild, inode); - EXIT; - } -err_exit: - ptlrpc_req_finished(request); - - return err; -} - - -static int ll_mknod_generic(struct inode *dir, struct qstr *name, int mode, - unsigned rdev, struct dentry *dchild) -{ - int err; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p) mode %o dev %x\n", - name->len, name->name, dir->i_ino, dir->i_generation, dir, - mode, rdev); - - mode &= ~current->fs->umask; - - switch (mode & S_IFMT) { - case 0: - mode |= S_IFREG; /* for mode = 0 case, fallthrough */ - case S_IFREG: - case S_IFCHR: - case S_IFBLK: - case S_IFIFO: - case S_IFSOCK: - err = ll_new_node(dir, name, NULL, mode, rdev, dchild); - break; - case S_IFDIR: - err = -EPERM; - break; - default: - err = -EINVAL; - } - RETURN(err); -} - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -#ifndef HAVE_VFS_INTENT_PATCHES -static int ll_create_nd(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) -{ - struct lookup_intent *it = ll_d2d(dentry)->lld_it; - int rc; - - if (!it) - return ll_mknod_generic(dir, &dentry->d_name, mode, 0, dentry); - - ll_d2d(dentry)->lld_it = NULL; - - /* Was there an error? Propagate it! */ - if (it->d.lustre.it_status) { - rc = it->d.lustre.it_status; - goto out; - } - - rc = ll_create_it(dir, dentry, mode, it); -#ifdef HAVE_FILE_IN_STRUCT_INTENT - if (nd && (nd->flags & LOOKUP_OPEN) && dentry->d_inode) { /* Open */ - nd->intent.open.file->private_data = it; - lookup_instantiate_filp(nd, dentry, NULL); - } -#else - ll_release_openhandle(dentry,it); -#endif - -out: - ll_intent_release(it); - OBD_FREE(it, sizeof(*it)); - - return rc; -} -#else -static int ll_create_nd(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) -{ - - if (!nd || !nd->intent.d.lustre.it_disposition) - /* No saved request? Just mknod the file */ - return ll_mknod_generic(dir, &dentry->d_name, mode, 0, dentry); - - return ll_create_it(dir, dentry, mode, &nd->intent); -} -#endif -#endif - -static int ll_symlink_generic(struct inode *dir, struct qstr *name, - const char *tgt, struct dentry *dchild) -{ - int err; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),target=%.*s\n", - name->len, name->name, dir->i_ino, dir->i_generation, - dir, 3000, tgt); - - err = ll_new_node(dir, name, (char *)tgt, S_IFLNK | S_IRWXUGO, - 0, dchild); - RETURN(err); -} - -static int ll_link_generic(struct inode *src, struct inode *dir, - struct qstr *name, struct dentry *dchild) -{ - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data; - int err; - struct ll_sb_info *sbi = ll_i2sbi(dir); - - ENTRY; - CDEBUG(D_VFSTRACE, - "VFS Op: inode=%lu/%u(%p), dir=%lu/%u(%p), target=%.*s\n", - src->i_ino, src->i_generation, src, dir->i_ino, - dir->i_generation, dir, name->len, name->name); - - err = ll_prepare_mdc_op_data(&op_data, src, dir, name->name, - name->len, 0, NULL); - if (err) - GOTO(out, err); - err = mdc_link(sbi->ll_mdc_exp, &op_data, &request); - if (err) - GOTO(out, err); - - if (dchild) { - d_drop(dchild); - } - ll_update_times(request, REPLY_REC_OFF, dir); - - EXIT; -out: - ptlrpc_req_finished(request); - RETURN(err); -} - -static int ll_mkdir_generic(struct inode *dir, struct qstr *name, int mode, - struct dentry *dchild) - -{ - int err; - - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n", - name->len, name->name, dir->i_ino, dir->i_generation, dir); - - mode = (mode & (S_IRWXUGO|S_ISVTX) & ~current->fs->umask) | S_IFDIR; - err = ll_new_node(dir, name, NULL, mode, 0, dchild); - - RETURN(err); -} - -/* Try to find the child dentry by its name. - If found, put the result fid into @fid. */ -static void ll_get_child_fid(struct inode * dir, struct qstr *name, - struct ll_fid *fid) -{ - struct dentry *parent, *child; - - parent = list_entry(dir->i_dentry.next, struct dentry, d_alias); - child = d_lookup(parent, name); - if (child) { - if (child->d_inode) - ll_inode2fid(fid, child->d_inode); - dput(child); - } -} - -static int ll_rmdir_generic(struct inode *dir, struct dentry *dparent, - struct qstr *name) -{ - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = {{0}}; - struct dentry *dentry; - int rc; - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n", - name->len, name->name, dir->i_ino, dir->i_generation, dir); - - /* Check if we have something mounted at the dir we are going to delete - * In such a case there would always be dentry present. */ - if (dparent) { - dentry = d_lookup(dparent, name); - if (dentry) { - int mounted = d_mountpoint(dentry); - dput(dentry); - if (mounted) - GOTO(out, rc = -EBUSY); - } - } - - rc = ll_prepare_mdc_op_data(&op_data, dir, NULL, name->name, - name->len, S_IFDIR, NULL); - if (rc) - GOTO(out, rc); - - ll_get_child_fid(dir, name, &op_data.fid3); - rc = mdc_unlink(ll_i2sbi(dir)->ll_mdc_exp, &op_data, &request); - if (rc) - GOTO(out, rc); - ll_update_times(request, REPLY_REC_OFF, dir); - - EXIT; -out: - ptlrpc_req_finished(request); - return(rc); -} - -int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) -{ - struct mds_body *body; - struct lov_mds_md *eadata; - struct lov_stripe_md *lsm = NULL; - struct obd_trans_info oti = { 0 }; - struct obdo *oa; - int rc; - ENTRY; - - /* req is swabbed so this is safe */ - body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF, sizeof(*body)); - - if (!(body->valid & OBD_MD_FLEASIZE)) - RETURN(0); - - if (body->eadatasize == 0) { - CERROR("OBD_MD_FLEASIZE set but eadatasize zero\n"); - GOTO(out, rc = -EPROTO); - } - - /* The MDS sent back the EA because we unlinked the last reference - * to this file. Use this EA to unlink the objects on the OST. - * It's opaque so we don't swab here; we leave it to obd_unpackmd() to - * check it is complete and sensible. */ - eadata = lustre_swab_repbuf(request, REPLY_REC_OFF + 1, - body->eadatasize, NULL); - LASSERT(eadata != NULL); - if (eadata == NULL) { - CERROR("Can't unpack MDS EA data\n"); - GOTO(out, rc = -EPROTO); - } - - rc = obd_unpackmd(ll_i2obdexp(dir), &lsm, eadata, body->eadatasize); - if (rc < 0) { - CERROR("obd_unpackmd: %d\n", rc); - GOTO(out, rc); - } - LASSERT(rc >= sizeof(*lsm)); - - rc = obd_checkmd(ll_i2obdexp(dir), ll_i2mdcexp(dir), lsm); - if (rc) - GOTO(out_free_memmd, rc); - - OBDO_ALLOC(oa); - if (oa == NULL) - GOTO(out_free_memmd, rc = -ENOMEM); - - oa->o_id = lsm->lsm_object_id; - oa->o_mode = body->mode & S_IFMT; - oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE; - - if (body->valid & OBD_MD_FLCOOKIE) { - oa->o_valid |= OBD_MD_FLCOOKIE; - oti.oti_logcookies = - lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF + 2, - sizeof(struct llog_cookie) * - lsm->lsm_stripe_count); - if (oti.oti_logcookies == NULL) { - oa->o_valid &= ~OBD_MD_FLCOOKIE; - body->valid &= ~OBD_MD_FLCOOKIE; - } - } - - rc = obd_destroy(ll_i2obdexp(dir), oa, lsm, &oti, ll_i2mdcexp(dir)); - OBDO_FREE(oa); - if (rc) - CERROR("obd destroy objid "LPX64" error %d\n", - lsm->lsm_object_id, rc); - out_free_memmd: - obd_free_memmd(ll_i2obdexp(dir), &lsm); - out: - return rc; -} - -static int ll_unlink_generic(struct inode * dir, struct qstr *name) -{ - struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = {{0}}; - int rc; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n", - name->len, name->name, dir->i_ino, dir->i_generation, dir); - - rc = ll_prepare_mdc_op_data(&op_data, dir, NULL, name->name, - name->len, 0, NULL); - if (rc) - GOTO(out, rc); - - ll_get_child_fid(dir, name, &op_data.fid3); - rc = mdc_unlink(ll_i2sbi(dir)->ll_mdc_exp, &op_data, &request); - if (rc) - GOTO(out, rc); - - ll_update_times(request, REPLY_REC_OFF, dir); - - rc = ll_objects_destroy(request, dir); - if (rc) - GOTO(out, rc); - EXIT; - out: - ptlrpc_req_finished(request); - return(rc); -} - -static int ll_rename_generic(struct inode *src, struct qstr *src_name, - struct inode *tgt, struct qstr *tgt_name) -{ - struct ptlrpc_request *request = NULL; - struct ll_sb_info *sbi = ll_i2sbi(src); - struct mdc_op_data op_data = {{0}}; - int err; - - ENTRY; - CDEBUG(D_VFSTRACE,"VFS Op:oldname=%.*s,src_dir=%lu/%u(%p),newname=%.*s," - "tgt_dir=%lu/%u(%p)\n", src_name->len, src_name->name, - src->i_ino, src->i_generation, src, tgt_name->len, - tgt_name->name, tgt->i_ino, tgt->i_generation, tgt); - - err = ll_prepare_mdc_op_data(&op_data, src, tgt, NULL, 0, 0, NULL); - if (err) - GOTO(out, err); - - ll_get_child_fid(src, src_name, &op_data.fid3); - ll_get_child_fid(tgt, tgt_name, &op_data.fid4); - err = mdc_rename(sbi->ll_mdc_exp, &op_data, - src_name->name, src_name->len, - tgt_name->name, tgt_name->len, &request); - if (err) - GOTO(out, err); - ll_update_times(request, REPLY_REC_OFF, src); - ll_update_times(request, REPLY_REC_OFF, tgt); - err = ll_objects_destroy(request, src); - if (err) - GOTO(out, err); - - EXIT; -out: - ptlrpc_req_finished(request); - - return(err); -} - -#ifdef HAVE_VFS_INTENT_PATCHES -static int ll_mknod_raw(struct nameidata *nd, int mode, dev_t rdev) -{ - return ll_mknod_generic(nd->dentry->d_inode, &nd->last, mode,rdev,NULL); -} -static int ll_rename_raw(struct nameidata *srcnd, struct nameidata *tgtnd) -{ - return ll_rename_generic(srcnd->dentry->d_inode, &srcnd->last, - tgtnd->dentry->d_inode, &tgtnd->last); -} -static int ll_link_raw(struct nameidata *srcnd, struct nameidata *tgtnd) -{ - return ll_link_generic(srcnd->dentry->d_inode, tgtnd->dentry->d_inode, - &tgtnd->last, NULL); -} -static int ll_symlink_raw(struct nameidata *nd, const char *tgt) -{ - return ll_symlink_generic(nd->dentry->d_inode, &nd->last, tgt, NULL); -} -static int ll_rmdir_raw(struct nameidata *nd) -{ - return ll_rmdir_generic(nd->dentry->d_inode, nd->dentry, &nd->last); -} -static int ll_mkdir_raw(struct nameidata *nd, int mode) -{ - return ll_mkdir_generic(nd->dentry->d_inode, &nd->last, mode, NULL); -} -static int ll_unlink_raw(struct nameidata *nd) -{ - return ll_unlink_generic(nd->dentry->d_inode, &nd->last); -} -#endif - -static int ll_mknod(struct inode *dir, struct dentry *dchild, int mode, - ll_dev_t rdev) -{ - return ll_mknod_generic(dir, &dchild->d_name, mode, - old_encode_dev(rdev), dchild); -} - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -static int ll_unlink(struct inode * dir, struct dentry *dentry) -{ - return ll_unlink_generic(dir, &dentry->d_name); -} -static int ll_mkdir(struct inode *dir, struct dentry *dentry, int mode) -{ - return ll_mkdir_generic(dir, &dentry->d_name, mode, dentry); -} -static int ll_rmdir(struct inode *dir, struct dentry *dentry) -{ - return ll_rmdir_generic(dir, NULL, &dentry->d_name); -} -static int ll_symlink(struct inode *dir, struct dentry *dentry, - const char *oldname) -{ - return ll_symlink_generic(dir, &dentry->d_name, oldname, dentry); -} -static int ll_link(struct dentry *old_dentry, struct inode *dir, - struct dentry *new_dentry) -{ - return ll_link_generic(old_dentry->d_inode, dir, - &new_dentry->d_name, new_dentry); -} -static int ll_rename(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, struct dentry *new_dentry) -{ - return ll_rename_generic(old_dir, &old_dentry->d_name, new_dir, - &new_dentry->d_name); -} -#endif - -struct inode_operations ll_dir_inode_operations = { -#ifdef HAVE_VFS_INTENT_PATCHES - .link_raw = ll_link_raw, - .unlink_raw = ll_unlink_raw, - .symlink_raw = ll_symlink_raw, - .mkdir_raw = ll_mkdir_raw, - .rmdir_raw = ll_rmdir_raw, - .mknod_raw = ll_mknod_raw, - .rename_raw = ll_rename_raw, - .setattr = ll_setattr, - .setattr_raw = ll_setattr_raw, -#endif - .mknod = ll_mknod, -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - .create_it = ll_create_it, - .lookup_it = ll_lookup_it, - .revalidate_it = ll_inode_revalidate_it, -#else - .lookup = ll_lookup_nd, - .create = ll_create_nd, - /* We need all these non-raw things for NFSD, to not patch it. */ - .unlink = ll_unlink, - .mkdir = ll_mkdir, - .rmdir = ll_rmdir, - .symlink = ll_symlink, - .link = ll_link, - .rename = ll_rename, - .setattr = ll_setattr, - .getattr = ll_getattr, -#endif - .permission = ll_inode_permission, - .setxattr = ll_setxattr, - .getxattr = ll_getxattr, - .listxattr = ll_listxattr, - .removexattr = ll_removexattr, -}; - -struct inode_operations ll_special_inode_operations = { -#ifdef HAVE_VFS_INTENT_PATCHES - .setattr_raw = ll_setattr_raw, -#endif - .setattr = ll_setattr, -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - .getattr = ll_getattr, -#else - .revalidate_it = ll_inode_revalidate_it, -#endif - .permission = ll_inode_permission, - .setxattr = ll_setxattr, - .getxattr = ll_getxattr, - .listxattr = ll_listxattr, - .removexattr = ll_removexattr, -}; diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c deleted file mode 100644 index c48c39e23e..0000000000 --- a/lustre/llite/rw.c +++ /dev/null @@ -1,2185 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Lite I/O page cache routines shared by different kernel revs - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/string.h> -#include <linux/stat.h> -#include <linux/errno.h> -#include <linux/smp_lock.h> -#include <linux/unistd.h> -#include <linux/version.h> -#include <asm/system.h> -#include <asm/uaccess.h> - -#include <linux/fs.h> -#include <linux/stat.h> -#include <asm/uaccess.h> -#include <linux/mm.h> -#include <linux/pagemap.h> -#include <linux/smp_lock.h> - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <lustre_lite.h> -#include "llite_internal.h" -#include <linux/lustre_compat25.h> - -#ifndef list_for_each_prev_safe -#define list_for_each_prev_safe(pos, n, head) \ - for (pos = (head)->prev, n = pos->prev; pos != (head); \ - pos = n, n = pos->prev ) -#endif - -cfs_mem_cache_t *ll_async_page_slab = NULL; -size_t ll_async_page_slab_size = 0; - -/* SYNCHRONOUS I/O to object storage for an inode */ -static int ll_brw(int cmd, struct inode *inode, struct obdo *oa, - struct page *page, int flags) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct obd_info oinfo = { { { 0 } } }; - struct brw_page pg; - int rc; - ENTRY; - - pg.pg = page; - pg.off = ((obd_off)page->index) << CFS_PAGE_SHIFT; - - if ((cmd & OBD_BRW_WRITE) && (pg.off+CFS_PAGE_SIZE>i_size_read(inode))) - pg.count = i_size_read(inode) % CFS_PAGE_SIZE; - else - pg.count = CFS_PAGE_SIZE; - - LL_CDEBUG_PAGE(D_PAGE, page, "%s %d bytes ino %lu at "LPU64"/"LPX64"\n", - cmd & OBD_BRW_WRITE ? "write" : "read", pg.count, - inode->i_ino, pg.off, pg.off); - if (pg.count == 0) { - CERROR("ZERO COUNT: ino %lu: size %p:%Lu(%p:%Lu) idx %lu off " - LPU64"\n", inode->i_ino, inode, i_size_read(inode), - page->mapping->host, i_size_read(page->mapping->host), - page->index, pg.off); - } - - pg.flag = flags; - - if (cmd & OBD_BRW_WRITE) - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_BRW_WRITE, - pg.count); - else - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_BRW_READ, - pg.count); - oinfo.oi_oa = oa; - oinfo.oi_md = lsm; - rc = obd_brw(cmd, ll_i2obdexp(inode), &oinfo, 1, &pg, NULL); - if (rc == 0) - obdo_to_inode(inode, oa, OBD_MD_FLBLOCKS); - else if (rc != -EIO) - CERROR("error from obd_brw: rc = %d\n", rc); - RETURN(rc); -} - -int ll_file_punch(struct inode * inode, loff_t new_size, int srvlock) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct obd_info oinfo = { { { 0 } } }; - struct obdo oa; - int rc; - - ENTRY; - CDEBUG(D_INFO, "calling punch for "LPX64" (new size %Lu=%#Lx)\n", - lli->lli_smd->lsm_object_id, new_size, new_size); - - oinfo.oi_md = lli->lli_smd; - oinfo.oi_policy.l_extent.start = new_size; - oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF; - oinfo.oi_oa = &oa; - oa.o_id = lli->lli_smd->lsm_object_id; - oa.o_valid = OBD_MD_FLID; - oa.o_flags = srvlock ? OBD_FL_TRUNCLOCK : 0; - obdo_from_inode(&oa, inode, OBD_MD_FLTYPE | OBD_MD_FLMODE |OBD_MD_FLFID| - OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME | - OBD_MD_FLUID | OBD_MD_FLGID | OBD_MD_FLGENER | - OBD_MD_FLBLOCKS); - rc = obd_punch_rqset(ll_i2obdexp(inode), &oinfo, NULL); - if (rc) { - CERROR("obd_truncate fails (%d) ino %lu\n", rc, inode->i_ino); - RETURN(rc); - } - obdo_to_inode(inode, &oa, OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME); - RETURN(0); -} -/* this isn't where truncate starts. roughly: - * sys_truncate->ll_setattr_raw->vmtruncate->ll_truncate. setattr_raw grabs - * DLM lock on [size, EOF], i_mutex, ->lli_size_sem, and WRITE_I_ALLOC_SEM to - * avoid races. - * - * must be called under ->lli_size_sem */ -void ll_truncate(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - int srvlock = test_bit(LLI_F_SRVLOCK, &lli->lli_flags); - loff_t new_size; - ENTRY; - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) to %Lu=%#Lx\n",inode->i_ino, - inode->i_generation, inode, i_size_read(inode), i_size_read(inode)); - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_TRUNC, 1); - if (lli->lli_size_sem_owner != current) { - EXIT; - return; - } - - if (!lli->lli_smd) { - CDEBUG(D_INODE, "truncate on inode %lu with no objects\n", - inode->i_ino); - GOTO(out_unlock, 0); - } - - LASSERT(atomic_read(&lli->lli_size_sem.count) <= 0); - - if (!srvlock) { - struct ost_lvb lvb; - int rc; - - /* XXX I'm pretty sure this is a hack to paper over a more fundamental - * race condition. */ - lov_stripe_lock(lli->lli_smd); - inode_init_lvb(inode, &lvb); - rc = obd_merge_lvb(ll_i2obdexp(inode), lli->lli_smd, &lvb, 0); - inode->i_blocks = lvb.lvb_blocks; - if (lvb.lvb_size == i_size_read(inode) && rc == 0) { - CDEBUG(D_VFSTRACE, "skipping punch for obj "LPX64", %Lu=%#Lx\n", - lli->lli_smd->lsm_object_id, i_size_read(inode), - i_size_read(inode)); - lov_stripe_unlock(lli->lli_smd); - GOTO(out_unlock, 0); - } - - obd_adjust_kms(ll_i2obdexp(inode), lli->lli_smd, - i_size_read(inode), 1); - lov_stripe_unlock(lli->lli_smd); - } - - if (unlikely((ll_i2sbi(inode)->ll_flags & LL_SBI_LLITE_CHECKSUM) && - (i_size_read(inode) & ~CFS_PAGE_MASK))) { - /* If the truncate leaves a partial page, update its checksum */ - struct page *page = find_get_page(inode->i_mapping, - i_size_read(inode) >> - CFS_PAGE_SHIFT); - if (page != NULL) { - struct ll_async_page *llap = llap_cast_private(page); - if (llap != NULL) { - char *kaddr = kmap_atomic(page, KM_USER0); - llap->llap_checksum = - init_checksum(OSC_DEFAULT_CKSUM); - llap->llap_checksum = - compute_checksum(llap->llap_checksum, - kaddr, CFS_PAGE_SIZE, - OSC_DEFAULT_CKSUM); - kunmap_atomic(kaddr, KM_USER0); - } - page_cache_release(page); - } - } - - new_size = i_size_read(inode); - ll_inode_size_unlock(inode, 0); - if (!srvlock) - ll_file_punch(inode, new_size, 0); - - EXIT; - return; - - out_unlock: - ll_inode_size_unlock(inode, 0); -} /* ll_truncate */ - -int ll_prepare_write(struct file *file, struct page *page, unsigned from, - unsigned to) -{ - struct inode *inode = page->mapping->host; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - obd_off offset = ((obd_off)page->index) << CFS_PAGE_SHIFT; - struct obd_info oinfo = { { { 0 } } }; - struct brw_page pga; - struct obdo oa; - struct ost_lvb lvb; - int rc = 0; - ENTRY; - - LASSERT(PageLocked(page)); - (void)llap_cast_private(page); /* assertion */ - - /* Check to see if we should return -EIO right away */ - pga.pg = page; - pga.off = offset; - pga.count = CFS_PAGE_SIZE; - pga.flag = 0; - - oa.o_mode = inode->i_mode; - oa.o_id = lsm->lsm_object_id; - oa.o_valid = OBD_MD_FLID | OBD_MD_FLMODE | OBD_MD_FLTYPE; - obdo_from_inode(&oa, inode, OBD_MD_FLFID | OBD_MD_FLGENER); - - oinfo.oi_oa = &oa; - oinfo.oi_md = lsm; - rc = obd_brw(OBD_BRW_CHECK, ll_i2obdexp(inode), &oinfo, 1, &pga, NULL); - if (rc) - RETURN(rc); - - if (PageUptodate(page)) { - LL_CDEBUG_PAGE(D_PAGE, page, "uptodate\n"); - RETURN(0); - } - - /* We're completely overwriting an existing page, so _don't_ set it up - * to date until commit_write */ - if (from == 0 && to == CFS_PAGE_SIZE) { - LL_CDEBUG_PAGE(D_PAGE, page, "full page write\n"); - POISON_PAGE(page, 0x11); - RETURN(0); - } - - /* If are writing to a new page, no need to read old data. The extent - * locking will have updated the KMS, and for our purposes here we can - * treat it like i_size. */ - lov_stripe_lock(lsm); - inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1); - lov_stripe_unlock(lsm); - if (lvb.lvb_size <= offset) { - char *kaddr = kmap_atomic(page, KM_USER0); - LL_CDEBUG_PAGE(D_PAGE, page, "kms "LPU64" <= offset "LPU64"\n", - lvb.lvb_size, offset); - memset(kaddr, 0, CFS_PAGE_SIZE); - kunmap_atomic(kaddr, KM_USER0); - GOTO(prepare_done, rc = 0); - } - - /* XXX could be an async ocp read.. read-ahead? */ - rc = ll_brw(OBD_BRW_READ, inode, &oa, page, 0); - if (rc == 0) { - /* bug 1598: don't clobber blksize */ - oa.o_valid &= ~(OBD_MD_FLSIZE | OBD_MD_FLBLKSZ); - obdo_refresh_inode(inode, &oa, oa.o_valid); - } - - EXIT; - prepare_done: - if (rc == 0) - SetPageUptodate(page); - - return rc; -} - -static int ll_ap_make_ready(void *data, int cmd) -{ - struct ll_async_page *llap; - struct page *page; - ENTRY; - - llap = LLAP_FROM_COOKIE(data); - page = llap->llap_page; - - LASSERTF(!(cmd & OBD_BRW_READ), "cmd %x page %p ino %lu index %lu\n", cmd, page, - page->mapping->host->i_ino, page->index); - - /* we're trying to write, but the page is locked.. come back later */ - if (TryLockPage(page)) - RETURN(-EAGAIN); - - LASSERT(!PageWriteback(page)); - - /* if we left PageDirty we might get another writepage call - * in the future. list walkers are bright enough - * to check page dirty so we can leave it on whatever list - * its on. XXX also, we're called with the cli list so if - * we got the page cache list we'd create a lock inversion - * with the removepage path which gets the page lock then the - * cli lock */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - clear_page_dirty(page); -#else - LASSERTF(!PageWriteback(page),"cmd %x page %p ino %lu index %lu\n", cmd, page, - page->mapping->host->i_ino, page->index); - clear_page_dirty_for_io(page); - - /* This actually clears the dirty bit in the radix tree.*/ - set_page_writeback(page); -#endif - - LL_CDEBUG_PAGE(D_PAGE, page, "made ready\n"); - page_cache_get(page); - - RETURN(0); -} - -/* We have two reasons for giving llite the opportunity to change the - * write length of a given queued page as it builds the RPC containing - * the page: - * - * 1) Further extending writes may have landed in the page cache - * since a partial write first queued this page requiring us - * to write more from the page cache. (No further races are possible, since - * by the time this is called, the page is locked.) - * 2) We might have raced with truncate and want to avoid performing - * write RPCs that are just going to be thrown away by the - * truncate's punch on the storage targets. - * - * The kms serves these purposes as it is set at both truncate and extending - * writes. - */ -static int ll_ap_refresh_count(void *data, int cmd) -{ - struct ll_inode_info *lli; - struct ll_async_page *llap; - struct lov_stripe_md *lsm; - struct page *page; - struct inode *inode; - struct ost_lvb lvb; - __u64 kms; - ENTRY; - - /* readpage queues with _COUNT_STABLE, shouldn't get here. */ - LASSERT(cmd != OBD_BRW_READ); - - llap = LLAP_FROM_COOKIE(data); - page = llap->llap_page; - inode = page->mapping->host; - lli = ll_i2info(inode); - lsm = lli->lli_smd; - - lov_stripe_lock(lsm); - inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1); - kms = lvb.lvb_size; - lov_stripe_unlock(lsm); - - /* catch race with truncate */ - if (((__u64)page->index << CFS_PAGE_SHIFT) >= kms) - return 0; - - /* catch sub-page write at end of file */ - if (((__u64)page->index << CFS_PAGE_SHIFT) + CFS_PAGE_SIZE > kms) - return kms % CFS_PAGE_SIZE; - - return CFS_PAGE_SIZE; -} - -void ll_inode_fill_obdo(struct inode *inode, int cmd, struct obdo *oa) -{ - struct lov_stripe_md *lsm; - obd_flag valid_flags; - - lsm = ll_i2info(inode)->lli_smd; - - oa->o_id = lsm->lsm_object_id; - oa->o_valid = OBD_MD_FLID; - valid_flags = OBD_MD_FLTYPE | OBD_MD_FLATIME; - if (cmd & OBD_BRW_WRITE) { - oa->o_valid |= OBD_MD_FLEPOCH; - oa->o_easize = ll_i2info(inode)->lli_io_epoch; - - valid_flags |= OBD_MD_FLMTIME | OBD_MD_FLCTIME | - OBD_MD_FLUID | OBD_MD_FLGID | - OBD_MD_FLFID | OBD_MD_FLGENER; - } - - obdo_from_inode(oa, inode, valid_flags); -} - -static void ll_ap_fill_obdo(void *data, int cmd, struct obdo *oa) -{ - struct ll_async_page *llap; - ENTRY; - - llap = LLAP_FROM_COOKIE(data); - ll_inode_fill_obdo(llap->llap_page->mapping->host, cmd, oa); - - EXIT; -} - -static void ll_ap_update_obdo(void *data, int cmd, struct obdo *oa, - obd_valid valid) -{ - struct ll_async_page *llap; - ENTRY; - - llap = LLAP_FROM_COOKIE(data); - obdo_from_inode(oa, llap->llap_page->mapping->host, valid); - - EXIT; -} - -static struct obd_async_page_ops ll_async_page_ops = { - .ap_make_ready = ll_ap_make_ready, - .ap_refresh_count = ll_ap_refresh_count, - .ap_fill_obdo = ll_ap_fill_obdo, - .ap_update_obdo = ll_ap_update_obdo, - .ap_completion = ll_ap_completion, -}; - -struct ll_async_page *llap_cast_private(struct page *page) -{ - struct ll_async_page *llap = (struct ll_async_page *)page_private(page); - - LASSERTF(llap == NULL || llap->llap_magic == LLAP_MAGIC, - "page %p private %lu gave magic %d which != %d\n", - page, page_private(page), llap->llap_magic, LLAP_MAGIC); - - return llap; -} - -/* Try to shrink the page cache for the @sbi filesystem by 1/@shrink_fraction. - * - * There is an llap attached onto every page in lustre, linked off @sbi. - * We add an llap to the list so we don't lose our place during list walking. - * If llaps in the list are being moved they will only move to the end - * of the LRU, and we aren't terribly interested in those pages here (we - * start at the beginning of the list where the least-used llaps are. - */ -int llap_shrink_cache(struct ll_sb_info *sbi, int shrink_fraction) -{ - struct ll_async_page *llap, dummy_llap = { .llap_magic = 0xd11ad11a }; - unsigned long total, want, count = 0; - - total = sbi->ll_async_page_count; - - /* There can be a large number of llaps (600k or more in a large - * memory machine) so the VM 1/6 shrink ratio is likely too much. - * Since we are freeing pages also, we don't necessarily want to - * shrink so much. Limit to 40MB of pages + llaps per call. */ - if (shrink_fraction == 0) - want = sbi->ll_async_page_count - sbi->ll_async_page_max + 32; - else - want = (total + shrink_fraction - 1) / shrink_fraction; - - if (want > 40 << (20 - CFS_PAGE_SHIFT)) - want = 40 << (20 - CFS_PAGE_SHIFT); - - CDEBUG(D_CACHE, "shrinking %lu of %lu pages (1/%d)\n", - want, total, shrink_fraction); - - spin_lock(&sbi->ll_lock); - list_add(&dummy_llap.llap_pglist_item, &sbi->ll_pglist); - - while (--total >= 0 && count < want) { - struct page *page; - int keep; - - if (unlikely(need_resched())) { - spin_unlock(&sbi->ll_lock); - cond_resched(); - spin_lock(&sbi->ll_lock); - } - - llap = llite_pglist_next_llap(sbi,&dummy_llap.llap_pglist_item); - list_del_init(&dummy_llap.llap_pglist_item); - if (llap == NULL) - break; - - page = llap->llap_page; - LASSERT(page != NULL); - - list_add(&dummy_llap.llap_pglist_item, &llap->llap_pglist_item); - - /* Page needs/undergoing IO */ - if (TryLockPage(page)) { - LL_CDEBUG_PAGE(D_PAGE, page, "can't lock\n"); - continue; - } - - keep = (llap->llap_write_queued || PageDirty(page) || - PageWriteback(page) || (!PageUptodate(page) && - llap->llap_origin != LLAP_ORIGIN_READAHEAD)); - - LL_CDEBUG_PAGE(D_PAGE, page,"%s LRU page: %s%s%s%s%s origin %s\n", - keep ? "keep" : "drop", - llap->llap_write_queued ? "wq " : "", - PageDirty(page) ? "pd " : "", - PageUptodate(page) ? "" : "!pu ", - PageWriteback(page) ? "wb" : "", - llap->llap_defer_uptodate ? "" : "!du", - llap_origins[llap->llap_origin]); - - /* If page is dirty or undergoing IO don't discard it */ - if (keep) { - unlock_page(page); - continue; - } - - page_cache_get(page); - spin_unlock(&sbi->ll_lock); - - if (page->mapping != NULL) { - ll_teardown_mmaps(page->mapping, - (__u64)page->index << CFS_PAGE_SHIFT, - ((__u64)page->index << CFS_PAGE_SHIFT)| - ~CFS_PAGE_MASK); - if (!PageDirty(page) && !page_mapped(page)) { - ll_ra_accounting(llap, page->mapping); - ll_truncate_complete_page(page); - ++count; - } else { - LL_CDEBUG_PAGE(D_PAGE, page, "Not dropping page" - " because it is " - "%s\n", - PageDirty(page)? - "dirty":"mapped"); - } - } - unlock_page(page); - page_cache_release(page); - - spin_lock(&sbi->ll_lock); - } - list_del(&dummy_llap.llap_pglist_item); - spin_unlock(&sbi->ll_lock); - - CDEBUG(D_CACHE, "shrank %lu/%lu and left %lu unscanned\n", - count, want, total); - - return count; -} - -static struct ll_async_page *llap_from_page_with_lockh(struct page *page, - unsigned origin, - struct lustre_handle *lockh) -{ - struct ll_async_page *llap; - struct obd_export *exp; - struct inode *inode = page->mapping->host; - struct ll_sb_info *sbi; - int rc; - ENTRY; - - if (!inode) { - static int triggered; - - if (!triggered) { - LL_CDEBUG_PAGE(D_ERROR, page, "Bug 10047. Wrong anon " - "page received\n"); - libcfs_debug_dumpstack(NULL); - triggered = 1; - } - RETURN(ERR_PTR(-EINVAL)); - } - sbi = ll_i2sbi(inode); - LASSERT(ll_async_page_slab); - LASSERTF(origin < LLAP__ORIGIN_MAX, "%u\n", origin); - - llap = llap_cast_private(page); - if (llap != NULL) { - /* move to end of LRU list, except when page is just about to - * die */ - if (origin != LLAP_ORIGIN_REMOVEPAGE) { - spin_lock(&sbi->ll_lock); - sbi->ll_pglist_gen++; - list_del_init(&llap->llap_pglist_item); - list_add_tail(&llap->llap_pglist_item, &sbi->ll_pglist); - spin_unlock(&sbi->ll_lock); - } - GOTO(out, llap); - } - - exp = ll_i2obdexp(page->mapping->host); - if (exp == NULL) - RETURN(ERR_PTR(-EINVAL)); - - /* limit the number of lustre-cached pages */ - if (sbi->ll_async_page_count >= sbi->ll_async_page_max) - llap_shrink_cache(sbi, 0); - - OBD_SLAB_ALLOC(llap, ll_async_page_slab, CFS_ALLOC_STD, - ll_async_page_slab_size); - if (llap == NULL) - RETURN(ERR_PTR(-ENOMEM)); - llap->llap_magic = LLAP_MAGIC; - llap->llap_cookie = (void *)llap + size_round(sizeof(*llap)); - - /* XXX: for bug 11270 - check for lockless origin here! */ - if (origin == LLAP_ORIGIN_LOCKLESS_IO) - llap->llap_nocache = 1; - - rc = obd_prep_async_page(exp, ll_i2info(inode)->lli_smd, NULL, page, - (obd_off)page->index << CFS_PAGE_SHIFT, - &ll_async_page_ops, llap, &llap->llap_cookie, - llap->llap_nocache, lockh); - if (rc) { - OBD_SLAB_FREE(llap, ll_async_page_slab, - ll_async_page_slab_size); - RETURN(ERR_PTR(rc)); - } - - CDEBUG(D_CACHE, "llap %p page %p cookie %p obj off "LPU64"\n", llap, - page, llap->llap_cookie, (obd_off)page->index << CFS_PAGE_SHIFT); - /* also zeroing the PRIVBITS low order bitflags */ - __set_page_ll_data(page, llap); - llap->llap_page = page; - - spin_lock(&sbi->ll_lock); - sbi->ll_pglist_gen++; - sbi->ll_async_page_count++; - list_add_tail(&llap->llap_pglist_item, &sbi->ll_pglist); - spin_unlock(&sbi->ll_lock); - - out: - if (unlikely(sbi->ll_flags & LL_SBI_LLITE_CHECKSUM)) { - __u32 csum; - char *kaddr = kmap_atomic(page, KM_USER0); - csum = init_checksum(OSC_DEFAULT_CKSUM); - csum = compute_checksum(csum, kaddr, CFS_PAGE_SIZE, - OSC_DEFAULT_CKSUM); - kunmap_atomic(kaddr, KM_USER0); - if (origin == LLAP_ORIGIN_READAHEAD || - origin == LLAP_ORIGIN_READPAGE || - origin == LLAP_ORIGIN_LOCKLESS_IO) { - llap->llap_checksum = 0; - } else if (origin == LLAP_ORIGIN_COMMIT_WRITE || - llap->llap_checksum == 0) { - llap->llap_checksum = csum; - CDEBUG(D_PAGE, "page %p cksum %x\n", page, csum); - } else if (llap->llap_checksum == csum) { - /* origin == LLAP_ORIGIN_WRITEPAGE */ - CDEBUG(D_PAGE, "page %p cksum %x confirmed\n", - page, csum); - } else { - /* origin == LLAP_ORIGIN_WRITEPAGE */ - LL_CDEBUG_PAGE(D_ERROR, page, "old cksum %x != new " - "%x!\n", llap->llap_checksum, csum); - } - } - - llap->llap_origin = origin; - RETURN(llap); -} - -static inline struct ll_async_page *llap_from_page(struct page *page, - unsigned origin) -{ - return llap_from_page_with_lockh(page, origin, NULL); -} - -static int queue_or_sync_write(struct obd_export *exp, struct inode *inode, - struct ll_async_page *llap, - unsigned to, obd_flag async_flags) -{ - unsigned long size_index = i_size_read(inode) >> CFS_PAGE_SHIFT; - struct obd_io_group *oig; - struct ll_sb_info *sbi = ll_i2sbi(inode); - int rc, noquot = llap->llap_ignore_quota ? OBD_BRW_NOQUOTA : 0; - ENTRY; - - /* _make_ready only sees llap once we've unlocked the page */ - llap->llap_write_queued = 1; - rc = obd_queue_async_io(exp, ll_i2info(inode)->lli_smd, NULL, - llap->llap_cookie, OBD_BRW_WRITE | noquot, - 0, 0, 0, async_flags); - if (rc == 0) { - LL_CDEBUG_PAGE(D_PAGE, llap->llap_page, "write queued\n"); - llap_write_pending(inode, llap); - GOTO(out, 0); - } - - llap->llap_write_queued = 0; - - rc = oig_init(&oig); - if (rc) - GOTO(out, rc); - - /* make full-page requests if we are not at EOF (bug 4410) */ - if (to != CFS_PAGE_SIZE && llap->llap_page->index < size_index) { - LL_CDEBUG_PAGE(D_PAGE, llap->llap_page, - "sync write before EOF: size_index %lu, to %d\n", - size_index, to); - to = CFS_PAGE_SIZE; - } else if (to != CFS_PAGE_SIZE && llap->llap_page->index == size_index){ - int size_to = i_size_read(inode) & ~CFS_PAGE_MASK; - LL_CDEBUG_PAGE(D_PAGE, llap->llap_page, - "sync write at EOF: size_index %lu, to %d/%d\n", - size_index, to, size_to); - if (to < size_to) - to = size_to; - } - - /* compare the checksum once before the page leaves llite */ - if (unlikely((sbi->ll_flags & LL_SBI_LLITE_CHECKSUM) && - llap->llap_checksum != 0)) { - __u32 csum; - struct page *page = llap->llap_page; - char *kaddr = kmap_atomic(page, KM_USER0); - csum = init_checksum(OSC_DEFAULT_CKSUM); - csum = compute_checksum(csum, kaddr, CFS_PAGE_SIZE, - OSC_DEFAULT_CKSUM); - kunmap_atomic(kaddr, KM_USER0); - if (llap->llap_checksum == csum) { - CDEBUG(D_PAGE, "page %p cksum %x confirmed\n", - page, csum); - } else { - CERROR("page %p old cksum %x != new cksum %x!\n", - page, llap->llap_checksum, csum); - } - } - - rc = obd_queue_group_io(exp, ll_i2info(inode)->lli_smd, NULL, oig, - llap->llap_cookie, OBD_BRW_WRITE | noquot, - 0, to, 0, ASYNC_READY | ASYNC_URGENT | - ASYNC_COUNT_STABLE | ASYNC_GROUP_SYNC); - if (rc) - GOTO(free_oig, rc); - - rc = obd_trigger_group_io(exp, ll_i2info(inode)->lli_smd, NULL, oig); - if (rc) - GOTO(free_oig, rc); - - rc = oig_wait(oig); - - if (!rc && async_flags & ASYNC_READY) { - unlock_page(llap->llap_page); - if (PageWriteback(llap->llap_page)) { - end_page_writeback(llap->llap_page); - } - } - - LL_CDEBUG_PAGE(D_PAGE, llap->llap_page, "sync write returned %d\n", rc); - -free_oig: - oig_release(oig); -out: - RETURN(rc); -} - -/* update our write count to account for i_size increases that may have - * happened since we've queued the page for io. */ - -/* be careful not to return success without setting the page Uptodate or - * the next pass through prepare_write will read in stale data from disk. */ -int ll_commit_write(struct file *file, struct page *page, unsigned from, - unsigned to) -{ - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); - struct inode *inode = page->mapping->host; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct obd_export *exp; - struct ll_async_page *llap; - loff_t size; - struct lustre_handle *lockh = NULL; - int rc = 0; - ENTRY; - - SIGNAL_MASK_ASSERT(); /* XXX BUG 1511 */ - LASSERT(inode == file->f_dentry->d_inode); - LASSERT(PageLocked(page)); - - CDEBUG(D_INODE, "inode %p is writing page %p from %d to %d at %lu\n", - inode, page, from, to, page->index); - - if (fd->fd_flags & LL_FILE_GROUP_LOCKED) - lockh = &fd->fd_cwlockh; - - llap = llap_from_page_with_lockh(page, LLAP_ORIGIN_COMMIT_WRITE, lockh); - if (IS_ERR(llap)) - RETURN(PTR_ERR(llap)); - - exp = ll_i2obdexp(inode); - if (exp == NULL) - RETURN(-EINVAL); - - llap->llap_ignore_quota = capable(CAP_SYS_RESOURCE); - - /* queue a write for some time in the future the first time we - * dirty the page */ - if (!PageDirty(page)) { - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRTY_MISSES, 1); - - rc = queue_or_sync_write(exp, inode, llap, to, 0); - if (rc) - GOTO(out, rc); - } else { - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRTY_HITS, 1); - } - - /* put the page in the page cache, from now on ll_removepage is - * responsible for cleaning up the llap. - * only set page dirty when it's queued to be write out */ - if (llap->llap_write_queued) - set_page_dirty(page); - -out: - size = (((obd_off)page->index) << CFS_PAGE_SHIFT) + to; - ll_inode_size_lock(inode, 0); - if (rc == 0) { - lov_stripe_lock(lsm); - obd_adjust_kms(exp, lsm, size, 0); - lov_stripe_unlock(lsm); - if (size > i_size_read(inode)) - i_size_write(inode, size); - SetPageUptodate(page); - } else if (size > i_size_read(inode)) { - /* this page beyond the pales of i_size, so it can't be - * truncated in ll_p_r_e during lock revoking. we must - * teardown our book-keeping here. */ - ll_removepage(page); - } - ll_inode_size_unlock(inode, 0); - RETURN(rc); -} - -static unsigned long ll_ra_count_get(struct ll_sb_info *sbi, unsigned long len) -{ - struct ll_ra_info *ra = &sbi->ll_ra_info; - unsigned long ret; - ENTRY; - - spin_lock(&sbi->ll_lock); - ret = min(ra->ra_max_pages - ra->ra_cur_pages, len); - ra->ra_cur_pages += ret; - spin_unlock(&sbi->ll_lock); - - RETURN(ret); -} - -static void ll_ra_count_put(struct ll_sb_info *sbi, unsigned long len) -{ - struct ll_ra_info *ra = &sbi->ll_ra_info; - spin_lock(&sbi->ll_lock); - LASSERTF(ra->ra_cur_pages >= len, "r_c_p %lu len %lu\n", - ra->ra_cur_pages, len); - ra->ra_cur_pages -= len; - spin_unlock(&sbi->ll_lock); -} - -/* called for each page in a completed rpc.*/ -int ll_ap_completion(void *data, int cmd, struct obdo *oa, int rc) -{ - struct ll_async_page *llap; - struct page *page; - int ret = 0; - ENTRY; - - llap = LLAP_FROM_COOKIE(data); - page = llap->llap_page; - LASSERT(PageLocked(page)); - LASSERT(CheckWriteback(page,cmd)); - - LL_CDEBUG_PAGE(D_PAGE, page, "completing cmd %d with %d\n", cmd, rc); - - if (cmd & OBD_BRW_READ && llap->llap_defer_uptodate) - ll_ra_count_put(ll_i2sbi(page->mapping->host), 1); - - if (rc == 0) { - if (cmd & OBD_BRW_READ) { - if (!llap->llap_defer_uptodate) - SetPageUptodate(page); - } else { - llap->llap_write_queued = 0; - } - ClearPageError(page); - } else { - if (cmd & OBD_BRW_READ) { - llap->llap_defer_uptodate = 0; - } - SetPageError(page); -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) - if (rc == -ENOSPC) - set_bit(AS_ENOSPC, &page->mapping->flags); - else - set_bit(AS_EIO, &page->mapping->flags); -#else - page->mapping->gfp_mask |= AS_EIO_MASK; -#endif - } - - unlock_page(page); - - if (cmd & OBD_BRW_WRITE) { - llap_write_complete(page->mapping->host, llap); - ll_try_done_writing(page->mapping->host); - } - - if (PageWriteback(page)) { - end_page_writeback(page); - } - page_cache_release(page); - - RETURN(ret); -} - -static void __ll_put_llap(struct page *page) -{ - struct inode *inode = page->mapping->host; - struct obd_export *exp; - struct ll_async_page *llap; - struct ll_sb_info *sbi = ll_i2sbi(inode); - int rc; - ENTRY; - - exp = ll_i2obdexp(inode); - if (exp == NULL) { - CERROR("page %p ind %lu gave null export\n", page, page->index); - EXIT; - return; - } - - llap = llap_from_page(page, LLAP_ORIGIN_REMOVEPAGE); - if (IS_ERR(llap)) { - CERROR("page %p ind %lu couldn't find llap: %ld\n", page, - page->index, PTR_ERR(llap)); - EXIT; - return; - } - - //llap_write_complete(inode, llap); - rc = obd_teardown_async_page(exp, ll_i2info(inode)->lli_smd, NULL, - llap->llap_cookie); - if (rc != 0) - CERROR("page %p ind %lu failed: %d\n", page, page->index, rc); - - /* this unconditional free is only safe because the page lock - * is providing exclusivity to memory pressure/truncate/writeback..*/ - __clear_page_ll_data(page); - - spin_lock(&sbi->ll_lock); - if (!list_empty(&llap->llap_pglist_item)) - list_del_init(&llap->llap_pglist_item); - sbi->ll_pglist_gen++; - sbi->ll_async_page_count--; - spin_unlock(&sbi->ll_lock); - OBD_SLAB_FREE(llap, ll_async_page_slab, ll_async_page_slab_size); - - EXIT; -} - -/* the kernel calls us here when a page is unhashed from the page cache. - * the page will be locked and the kernel is holding a spinlock, so - * we need to be careful. we're just tearing down our book-keeping - * here. */ -void ll_removepage(struct page *page) -{ - struct ll_async_page *llap = llap_cast_private(page); - ENTRY; - - LASSERT(!in_interrupt()); - - /* sync pages or failed read pages can leave pages in the page - * cache that don't have our data associated with them anymore */ - if (page_private(page) == 0) { - EXIT; - return; - } - - LASSERT(!llap->llap_lockless_io_page); - LASSERT(!llap->llap_nocache); - - LL_CDEBUG_PAGE(D_PAGE, page, "being evicted\n"); - __ll_put_llap(page); - - EXIT; -} - -static int ll_issue_page_read(struct obd_export *exp, - struct ll_async_page *llap, - struct obd_io_group *oig, int defer) -{ - struct page *page = llap->llap_page; - int rc; - - page_cache_get(page); - llap->llap_defer_uptodate = defer; - llap->llap_ra_used = 0; - rc = obd_queue_group_io(exp, ll_i2info(page->mapping->host)->lli_smd, - NULL, oig, llap->llap_cookie, OBD_BRW_READ, 0, - CFS_PAGE_SIZE, 0, ASYNC_COUNT_STABLE | ASYNC_READY | - ASYNC_URGENT); - if (rc) { - LL_CDEBUG_PAGE(D_ERROR, page, "read queue failed: rc %d\n", rc); - page_cache_release(page); - } - RETURN(rc); -} - -static void ll_ra_stats_inc_unlocked(struct ll_ra_info *ra, enum ra_stat which) -{ - LASSERTF(which >= 0 && which < _NR_RA_STAT, "which: %u\n", which); - ra->ra_stats[which]++; -} - -static void ll_ra_stats_inc(struct address_space *mapping, enum ra_stat which) -{ - struct ll_sb_info *sbi = ll_i2sbi(mapping->host); - struct ll_ra_info *ra = &ll_i2sbi(mapping->host)->ll_ra_info; - - spin_lock(&sbi->ll_lock); - ll_ra_stats_inc_unlocked(ra, which); - spin_unlock(&sbi->ll_lock); -} - -void ll_ra_accounting(struct ll_async_page *llap, struct address_space *mapping) -{ - if (!llap->llap_defer_uptodate || llap->llap_ra_used) - return; - - ll_ra_stats_inc(mapping, RA_STAT_DISCARDED); -} - -#define RAS_CDEBUG(ras) \ - CDEBUG(D_READA, \ - "lrp %lu cr %lu cp %lu ws %lu wl %lu nra %lu r %lu ri %lu" \ - "csr %lu sf %lu sp %lu sl %lu \n", \ - ras->ras_last_readpage, ras->ras_consecutive_requests, \ - ras->ras_consecutive_pages, ras->ras_window_start, \ - ras->ras_window_len, ras->ras_next_readahead, \ - ras->ras_requests, ras->ras_request_index, \ - ras->ras_consecutive_stride_requests, ras->ras_stride_offset, \ - ras->ras_stride_pages, ras->ras_stride_length) - -static int index_in_window(unsigned long index, unsigned long point, - unsigned long before, unsigned long after) -{ - unsigned long start = point - before, end = point + after; - - if (start > point) - start = 0; - if (end < point) - end = ~0; - - return start <= index && index <= end; -} - -static struct ll_readahead_state *ll_ras_get(struct file *f) -{ - struct ll_file_data *fd; - - fd = LUSTRE_FPRIVATE(f); - return &fd->fd_ras; -} - -void ll_ra_read_in(struct file *f, struct ll_ra_read *rar) -{ - struct ll_readahead_state *ras; - - ras = ll_ras_get(f); - - spin_lock(&ras->ras_lock); - ras->ras_requests++; - ras->ras_request_index = 0; - ras->ras_consecutive_requests++; - rar->lrr_reader = current; - - list_add(&rar->lrr_linkage, &ras->ras_read_beads); - spin_unlock(&ras->ras_lock); -} - -void ll_ra_read_ex(struct file *f, struct ll_ra_read *rar) -{ - struct ll_readahead_state *ras; - - ras = ll_ras_get(f); - - spin_lock(&ras->ras_lock); - list_del_init(&rar->lrr_linkage); - spin_unlock(&ras->ras_lock); -} - -static struct ll_ra_read *ll_ra_read_get_locked(struct ll_readahead_state *ras) -{ - struct ll_ra_read *scan; - - list_for_each_entry(scan, &ras->ras_read_beads, lrr_linkage) { - if (scan->lrr_reader == current) - return scan; - } - return NULL; -} - -struct ll_ra_read *ll_ra_read_get(struct file *f) -{ - struct ll_readahead_state *ras; - struct ll_ra_read *bead; - - ras = ll_ras_get(f); - - spin_lock(&ras->ras_lock); - bead = ll_ra_read_get_locked(ras); - spin_unlock(&ras->ras_lock); - return bead; -} - -static int ll_read_ahead_page(struct obd_export *exp, struct obd_io_group *oig, - int index, struct address_space *mapping) -{ - struct ll_async_page *llap; - struct page *page; - unsigned int gfp_mask = 0; - int rc = 0; - - gfp_mask = GFP_HIGHUSER & ~__GFP_WAIT; -#ifdef __GFP_NOWARN - gfp_mask |= __GFP_NOWARN; -#endif - page = grab_cache_page_nowait_gfp(mapping, index, gfp_mask); - if (page == NULL) { - ll_ra_stats_inc(mapping, RA_STAT_FAILED_GRAB_PAGE); - CDEBUG(D_READA, "g_c_p_n failed\n"); - return 0; - } - - /* Check if page was truncated or reclaimed */ - if (page->mapping != mapping) { - ll_ra_stats_inc(mapping, RA_STAT_WRONG_GRAB_PAGE); - CDEBUG(D_READA, "g_c_p_n returned invalid page\n"); - GOTO(unlock_page, rc = 0); - } - - /* we do this first so that we can see the page in the /proc - * accounting */ - llap = llap_from_page(page, LLAP_ORIGIN_READAHEAD); - if (IS_ERR(llap) || llap->llap_defer_uptodate) { - if (PTR_ERR(llap) == -ENOLCK) { - ll_ra_stats_inc(mapping, RA_STAT_FAILED_MATCH); - CDEBUG(D_READA | D_PAGE, - "Adding page to cache failed index " - "%d\n", index); - CDEBUG(D_READA, "nolock page\n"); - GOTO(unlock_page, rc = -ENOLCK); - } - CDEBUG(D_READA, "read-ahead page\n"); - GOTO(unlock_page, rc = 0); - } - - /* skip completed pages */ - if (Page_Uptodate(page)) - GOTO(unlock_page, rc = 0); - - /* bail out when we hit the end of the lock. */ - rc = ll_issue_page_read(exp, llap, oig, 1); - if (rc == 0) { - LL_CDEBUG_PAGE(D_READA | D_PAGE, page, "started read-ahead\n"); - rc = 1; - } else { -unlock_page: - unlock_page(page); - LL_CDEBUG_PAGE(D_READA | D_PAGE, page, "skipping read-ahead\n"); - } - page_cache_release(page); - return rc; -} - -/* ra_io_arg will be filled in the beginning of ll_readahead with - * ras_lock, then the following ll_read_ahead_pages will read RA - * pages according to this arg, all the items in this structure are - * counted by page index. - */ -struct ra_io_arg { - unsigned long ria_start; /* start offset of read-ahead*/ - unsigned long ria_end; /* end offset of read-ahead*/ - /* If stride read pattern is detected, ria_stoff means where - * stride read is started. Note: for normal read-ahead, the - * value here is meaningless, and also it will not be accessed*/ - pgoff_t ria_stoff; - /* ria_length and ria_pages are the length and pages length in the - * stride I/O mode. And they will also be used to check whether - * it is stride I/O read-ahead in the read-ahead pages*/ - unsigned long ria_length; - unsigned long ria_pages; -}; - -#define RIA_DEBUG(ria) \ - CDEBUG(D_READA, "rs %lu re %lu ro %lu rl %lu rp %lu\n", \ - ria->ria_start, ria->ria_end, ria->ria_stoff, ria->ria_length,\ - ria->ria_pages) - -#define RAS_INCREASE_STEP (1024 * 1024 >> CFS_PAGE_SHIFT) - -static inline int stride_io_mode(struct ll_readahead_state *ras) -{ - return ras->ras_consecutive_stride_requests > 1; -} - -/* The function calculates how much pages will be read in - * [off, off + length], which will be read by stride I/O mode, - * stride_offset = st_off, stride_lengh = st_len, - * stride_pages = st_pgs - */ -static unsigned long -stride_pg_count(pgoff_t st_off, unsigned long st_len, unsigned long st_pgs, - unsigned long off, unsigned length) -{ - unsigned long cont_len = st_off > off ? st_off - off : 0; - unsigned long stride_len = length + off > st_off ? - length + off + 1 - st_off : 0; - unsigned long left, pg_count; - - if (st_len == 0 || length == 0) - return length; - - left = do_div(stride_len, st_len); - left = min(left, st_pgs); - - pg_count = left + stride_len * st_pgs + cont_len; - - LASSERT(pg_count >= left); - - CDEBUG(D_READA, "st_off %lu, st_len %lu st_pgs %lu off %lu length %u" - "pgcount %lu\n", st_off, st_len, st_pgs, off, length, pg_count); - - return pg_count; -} - -static int ria_page_count(struct ra_io_arg *ria) -{ - __u64 length = ria->ria_end >= ria->ria_start ? - ria->ria_end - ria->ria_start + 1 : 0; - - return stride_pg_count(ria->ria_stoff, ria->ria_length, - ria->ria_pages, ria->ria_start, - length); -} - -/*Check whether the index is in the defined ra-window */ -static int ras_inside_ra_window(unsigned long idx, struct ra_io_arg *ria) -{ - /* If ria_length == ria_pages, it means non-stride I/O mode, - * idx should always inside read-ahead window in this case - * For stride I/O mode, just check whether the idx is inside - * the ria_pages. */ - return ria->ria_length == 0 || ria->ria_length == ria->ria_pages || - (idx - ria->ria_stoff) % ria->ria_length < ria->ria_pages; -} - -static int ll_read_ahead_pages(struct obd_export *exp, - struct obd_io_group *oig, - struct ra_io_arg *ria, - unsigned long *reserved_pages, - struct address_space *mapping, - unsigned long *ra_end) -{ - int rc, count = 0, stride_ria; - unsigned long page_idx; - - LASSERT(ria != NULL); - RIA_DEBUG(ria); - - stride_ria = ria->ria_length > ria->ria_pages && ria->ria_pages > 0; - for (page_idx = ria->ria_start; page_idx <= ria->ria_end && - *reserved_pages > 0; page_idx++) { - if (ras_inside_ra_window(page_idx, ria)) { - /* If the page is inside the read-ahead window*/ - rc = ll_read_ahead_page(exp, oig, page_idx, mapping); - if (rc == 1) { - (*reserved_pages)--; - count ++; - } else if (rc == -ENOLCK) - break; - } else if (stride_ria) { - /* If it is not in the read-ahead window, and it is - * read-ahead mode, then check whether it should skip - * the stride gap */ - pgoff_t offset; - /* FIXME: This assertion only is valid when it is for - * forward read-ahead, it will be fixed when backward - * read-ahead is implemented */ - LASSERTF(page_idx > ria->ria_stoff, "since %lu in the" - " gap of ra window,it should bigger than stride" - " offset %lu \n", page_idx, ria->ria_stoff); - - offset = page_idx - ria->ria_stoff; - offset = offset % (ria->ria_length); - if (offset > ria->ria_pages) { - page_idx += ria->ria_length - offset; - CDEBUG(D_READA, "i %lu skip %lu \n", page_idx, - ria->ria_length - offset); - continue; - } - } - } - *ra_end = page_idx; - return count; -} - -static int ll_readahead(struct ll_readahead_state *ras, - struct obd_export *exp, struct address_space *mapping, - struct obd_io_group *oig, int flags) -{ - unsigned long start = 0, end = 0, reserved; - unsigned long ra_end, len; - struct inode *inode; - struct lov_stripe_md *lsm; - struct ll_ra_read *bead; - struct ost_lvb lvb; - struct ra_io_arg ria = { 0 }; - int ret = 0; - __u64 kms; - ENTRY; - - inode = mapping->host; - lsm = ll_i2info(inode)->lli_smd; - - lov_stripe_lock(lsm); - inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1); - kms = lvb.lvb_size; - lov_stripe_unlock(lsm); - if (kms == 0) { - ll_ra_stats_inc(mapping, RA_STAT_ZERO_LEN); - RETURN(0); - } - - spin_lock(&ras->ras_lock); - bead = ll_ra_read_get_locked(ras); - /* Enlarge the RA window to encompass the full read */ - if (bead != NULL && ras->ras_window_start + ras->ras_window_len < - bead->lrr_start + bead->lrr_count) { - ras->ras_window_len = bead->lrr_start + bead->lrr_count - - ras->ras_window_start; - } - /* Reserve a part of the read-ahead window that we'll be issuing */ - if (ras->ras_window_len) { - start = ras->ras_next_readahead; - end = ras->ras_window_start + ras->ras_window_len - 1; - } - if (end != 0) { - /* Truncate RA window to end of file */ - end = min(end, (unsigned long)((kms - 1) >> CFS_PAGE_SHIFT)); - ras->ras_next_readahead = max(end, end + 1); - RAS_CDEBUG(ras); - } - ria.ria_start = start; - ria.ria_end = end; - /* If stride I/O mode is detected, get stride window*/ - if (stride_io_mode(ras)) { - ria.ria_length = ras->ras_stride_length; - ria.ria_pages = ras->ras_stride_pages; - } - spin_unlock(&ras->ras_lock); - - if (end == 0) { - ll_ra_stats_inc(mapping, RA_STAT_ZERO_WINDOW); - RETURN(0); - } - - len = ria_page_count(&ria); - if (len == 0) - RETURN(0); - - reserved = ll_ra_count_get(ll_i2sbi(inode), len); - if (reserved < end - start + 1) - ll_ra_stats_inc(mapping, RA_STAT_MAX_IN_FLIGHT); - - CDEBUG(D_READA, "reserved page %lu \n", reserved); - - ret = ll_read_ahead_pages(exp, oig, &ria, &reserved, mapping, &ra_end); - - LASSERTF(reserved >= 0, "reserved %lu\n", reserved); - if (reserved != 0) - ll_ra_count_put(ll_i2sbi(inode), reserved); - - if (ra_end == end + 1 && ra_end == (kms >> CFS_PAGE_SHIFT)) - ll_ra_stats_inc(mapping, RA_STAT_EOF); - - /* if we didn't get to the end of the region we reserved from - * the ras we need to go back and update the ras so that the - * next read-ahead tries from where we left off. we only do so - * if the region we failed to issue read-ahead on is still ahead - * of the app and behind the next index to start read-ahead from */ - CDEBUG(D_READA, "ra_end %lu end %lu stride end %lu \n", - ra_end, end, ria.ria_end); - - if (ra_end != (end + 1)) { - spin_lock(&ras->ras_lock); - if (ra_end < ras->ras_next_readahead && - index_in_window(ra_end, ras->ras_window_start, 0, - ras->ras_window_len)) { - ras->ras_next_readahead = ra_end; - RAS_CDEBUG(ras); - } - spin_unlock(&ras->ras_lock); - } - - RETURN(ret); -} - -static void ras_set_start(struct ll_readahead_state *ras, unsigned long index) -{ - ras->ras_window_start = index & (~(RAS_INCREASE_STEP - 1)); -} - -/* called with the ras_lock held or from places where it doesn't matter */ -static void ras_reset(struct ll_readahead_state *ras, unsigned long index) -{ - ras->ras_last_readpage = index; - ras->ras_consecutive_requests = 0; - ras->ras_consecutive_pages = 0; - ras->ras_window_len = 0; - ras_set_start(ras, index); - ras->ras_next_readahead = max(ras->ras_window_start, index); - - RAS_CDEBUG(ras); -} - -/* called with the ras_lock held or from places where it doesn't matter */ -static void ras_stride_reset(struct ll_readahead_state *ras) -{ - ras->ras_consecutive_stride_requests = 0; - RAS_CDEBUG(ras); -} - -void ll_readahead_init(struct inode *inode, struct ll_readahead_state *ras) -{ - spin_lock_init(&ras->ras_lock); - ras_reset(ras, 0); - ras->ras_requests = 0; - INIT_LIST_HEAD(&ras->ras_read_beads); -} - -/* Check whether the read request is in the stride window. - * If it is in the stride window, return 1, otherwise return 0. - * and also update stride_gap and stride_pages. - */ -static int index_in_stride_window(unsigned long index, - struct ll_readahead_state *ras, - struct inode *inode) -{ - int stride_gap = index - ras->ras_last_readpage - 1; - - LASSERT(stride_gap != 0); - - if (ras->ras_consecutive_pages == 0) - return 0; - - /*Otherwise check the stride by itself */ - if ((ras->ras_stride_length - ras->ras_stride_pages) == stride_gap && - ras->ras_consecutive_pages == ras->ras_stride_pages) - return 1; - - if (stride_gap >= 0) { - /* - * only set stride_pages, stride_length if - * it is forward reading ( stride_gap > 0) - */ - ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap + ras->ras_consecutive_pages; - } else { - /* - * If stride_gap < 0,(back_forward reading), - * reset the stride_pages/length. - * FIXME:back_ward stride I/O read. - * - */ - ras->ras_stride_pages = 0; - ras->ras_stride_length = 0; - } - RAS_CDEBUG(ras); - - return 0; -} - -static unsigned long -stride_page_count(struct ll_readahead_state *ras, unsigned long len) -{ - return stride_pg_count(ras->ras_stride_offset, ras->ras_stride_length, - ras->ras_stride_pages, ras->ras_stride_offset, - len); -} - -/* Stride Read-ahead window will be increased inc_len according to - * stride I/O pattern */ -static void ras_stride_increase_window(struct ll_readahead_state *ras, - struct ll_ra_info *ra, - unsigned long inc_len) -{ - unsigned long left, step, window_len; - unsigned long stride_len; - - LASSERT(ras->ras_stride_length > 0); - - stride_len = ras->ras_window_start + ras->ras_window_len - - ras->ras_stride_offset; - - LASSERTF(stride_len >= 0, "window_start %lu, window_len %lu" - " stride_offset %lu\n", ras->ras_window_start, - ras->ras_window_len, ras->ras_stride_offset); - - left = stride_len % ras->ras_stride_length; - - window_len = ras->ras_window_len - left; - - if (left < ras->ras_stride_pages) - left += inc_len; - else - left = ras->ras_stride_pages + inc_len; - - LASSERT(ras->ras_stride_pages != 0); - - step = left / ras->ras_stride_pages; - left %= ras->ras_stride_pages; - - window_len += step * ras->ras_stride_length + left; - - if (stride_page_count(ras, window_len) <= ra->ra_max_pages) - ras->ras_window_len = window_len; - - RAS_CDEBUG(ras); -} - -/* Set stride I/O read-ahead window start offset */ -static void ras_set_stride_offset(struct ll_readahead_state *ras) -{ - unsigned long window_len = ras->ras_next_readahead - - ras->ras_window_start; - unsigned long left; - - LASSERT(ras->ras_stride_length != 0); - - left = window_len % ras->ras_stride_length; - - ras->ras_stride_offset = ras->ras_next_readahead - left; - - RAS_CDEBUG(ras); -} - -static void ras_update(struct ll_sb_info *sbi, struct inode *inode, - struct ll_readahead_state *ras, unsigned long index, - unsigned hit) -{ - struct ll_ra_info *ra = &sbi->ll_ra_info; - int zero = 0, stride_zero = 0, stride_detect = 0, ra_miss = 0; - ENTRY; - - spin_lock(&sbi->ll_lock); - spin_lock(&ras->ras_lock); - - ll_ra_stats_inc_unlocked(ra, hit ? RA_STAT_HIT : RA_STAT_MISS); - - /* reset the read-ahead window in two cases. First when the app seeks - * or reads to some other part of the file. Secondly if we get a - * read-ahead miss that we think we've previously issued. This can - * be a symptom of there being so many read-ahead pages that the VM is - * reclaiming it before we get to it. */ - if (!index_in_window(index, ras->ras_last_readpage, 8, 8)) { - zero = 1; - ll_ra_stats_inc_unlocked(ra, RA_STAT_DISTANT_READPAGE); - /* check whether it is in stride I/O mode*/ - if (!index_in_stride_window(index, ras, inode)) - stride_zero = 1; - } else if (!hit && ras->ras_window_len && - index < ras->ras_next_readahead && - index_in_window(index, ras->ras_window_start, 0, - ras->ras_window_len)) { - zero = 1; - ra_miss = 1; - /* If it hits read-ahead miss and the stride I/O is still - * not detected, reset stride stuff to re-detect the whole - * stride I/O mode to avoid complication */ - if (!stride_io_mode(ras)) - stride_zero = 1; - ll_ra_stats_inc_unlocked(ra, RA_STAT_MISS_IN_WINDOW); - } - - /* On the second access to a file smaller than the tunable - * ra_max_read_ahead_whole_pages trigger RA on all pages in the - * file up to ra_max_pages. This is simply a best effort and - * only occurs once per open file. Normal RA behavior is reverted - * to for subsequent IO. The mmap case does not increment - * ras_requests and thus can never trigger this behavior. */ - if (ras->ras_requests == 2 && !ras->ras_request_index) { - __u64 kms_pages; - - kms_pages = (i_size_read(inode) + CFS_PAGE_SIZE - 1) >> - CFS_PAGE_SHIFT; - - CDEBUG(D_READA, "kmsp "LPU64" mwp %lu mp %lu\n", kms_pages, - ra->ra_max_read_ahead_whole_pages, ra->ra_max_pages); - - if (kms_pages && - kms_pages <= ra->ra_max_read_ahead_whole_pages) { - ras->ras_window_start = 0; - ras->ras_last_readpage = 0; - ras->ras_next_readahead = 0; - ras->ras_window_len = min(ra->ra_max_pages, - ra->ra_max_read_ahead_whole_pages); - GOTO(out_unlock, 0); - } - } - - if (zero) { - /* If it is discontinuous read, check - * whether it is stride I/O mode*/ - if (stride_zero) { - ras_reset(ras, index); - ras->ras_consecutive_pages++; - ras_stride_reset(ras); - RAS_CDEBUG(ras); - GOTO(out_unlock, 0); - } else { - /* The read is still in stride window or - * it hits read-ahead miss */ - - /* If ra-window miss is hitted, which probably means VM - * pressure, and some read-ahead pages were reclaimed.So - * the length of ra-window will not increased, but also - * not reset to avoid redetecting the stride I/O mode.*/ - ras->ras_consecutive_requests = 0; - if (!ra_miss) { - ras->ras_consecutive_pages = 0; - if (++ras->ras_consecutive_stride_requests > 1) - stride_detect = 1; - } - RAS_CDEBUG(ras); - } - } else if (ras->ras_consecutive_stride_requests > 1) { - /* If this is contiguous read but in stride I/O mode - * currently, check whether stride step still is valid, - * if invalid, it will reset the stride ra window*/ - if (ras->ras_consecutive_pages + 1 > ras->ras_stride_pages) - ras_stride_reset(ras); - } - - ras->ras_last_readpage = index; - ras->ras_consecutive_pages++; - ras_set_start(ras, index); - ras->ras_next_readahead = max(ras->ras_window_start, - ras->ras_next_readahead); - RAS_CDEBUG(ras); - - /* Trigger RA in the mmap case where ras_consecutive_requests - * is not incremented and thus can't be used to trigger RA */ - if (!ras->ras_window_len && ras->ras_consecutive_pages == 4) { - ras->ras_window_len = RAS_INCREASE_STEP; - GOTO(out_unlock, 0); - } - - /* Initially reset the stride window offset to next_readahead*/ - if (ras->ras_consecutive_stride_requests == 2 && stride_detect) - ras_set_stride_offset(ras); - - /* The initial ras_window_len is set to the request size. To avoid - * uselessly reading and discarding pages for random IO the window is - * only increased once per consecutive request received. */ - if ((ras->ras_consecutive_requests > 1 && - !ras->ras_request_index) || stride_detect) { - if (stride_io_mode(ras)) - ras_stride_increase_window(ras, ra, RAS_INCREASE_STEP); - else - ras->ras_window_len = min(ras->ras_window_len + - RAS_INCREASE_STEP, - ra->ra_max_pages); - } - EXIT; -out_unlock: - RAS_CDEBUG(ras); - ras->ras_request_index++; - spin_unlock(&ras->ras_lock); - spin_unlock(&sbi->ll_lock); - return; -} - -int ll_writepage(struct page *page) -{ - struct inode *inode = page->mapping->host; - struct ll_inode_info *lli = ll_i2info(inode); - struct obd_export *exp; - struct ll_async_page *llap; - int rc = 0; - ENTRY; - - LASSERT(PageLocked(page)); - - exp = ll_i2obdexp(inode); - if (exp == NULL) - GOTO(out, rc = -EINVAL); - - llap = llap_from_page(page, LLAP_ORIGIN_WRITEPAGE); - if (IS_ERR(llap)) - GOTO(out, rc = PTR_ERR(llap)); - - LASSERT(!llap->llap_nocache); - LASSERT(!PageWriteback(page)); - set_page_writeback(page); - - page_cache_get(page); - if (llap->llap_write_queued) { - LL_CDEBUG_PAGE(D_PAGE, page, "marking urgent\n"); - rc = obd_set_async_flags(exp, lli->lli_smd, NULL, - llap->llap_cookie, - ASYNC_READY | ASYNC_URGENT); - } else { - rc = queue_or_sync_write(exp, inode, llap, CFS_PAGE_SIZE, - ASYNC_READY | ASYNC_URGENT); - } - if (rc) - page_cache_release(page); -out: - if (rc) { - if (!lli->lli_async_rc) - lli->lli_async_rc = rc; - /* re-dirty page on error so it retries write */ - if (PageWriteback(page)) { - end_page_writeback(page); - } - /* resend page only for not started IO*/ - if (!PageError(page)) - ll_redirty_page(page); - unlock_page(page); - } - RETURN(rc); -} - -/* - * for now we do our readpage the same on both 2.4 and 2.5. The kernel's - * read-ahead assumes it is valid to issue readpage all the way up to - * i_size, but our dlm locks make that not the case. We disable the - * kernel's read-ahead and do our own by walking ahead in the page cache - * checking for dlm lock coverage. the main difference between 2.4 and - * 2.6 is how read-ahead gets batched and issued, but we're using our own, - * so they look the same. - */ -int ll_readpage(struct file *filp, struct page *page) -{ - struct ll_file_data *fd = LUSTRE_FPRIVATE(filp); - struct inode *inode = page->mapping->host; - struct obd_export *exp; - struct ll_async_page *llap; - struct obd_io_group *oig = NULL; - struct lustre_handle *lockh = NULL; - int rc; - ENTRY; - - LASSERT(PageLocked(page)); - LASSERT(!PageUptodate(page)); - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),offset=%Lu=%#Lx\n", - inode->i_ino, inode->i_generation, inode, - (((loff_t)page->index) << CFS_PAGE_SHIFT), - (((loff_t)page->index) << CFS_PAGE_SHIFT)); - LASSERT(atomic_read(&filp->f_dentry->d_inode->i_count) > 0); - - if (!ll_i2info(inode)->lli_smd) { - /* File with no objects - one big hole */ - /* We use this just for remove_from_page_cache that is not - * exported, we'd make page back up to date. */ - ll_truncate_complete_page(page); - clear_page(kmap(page)); - kunmap(page); - SetPageUptodate(page); - unlock_page(page); - RETURN(0); - } - - rc = oig_init(&oig); - if (rc < 0) - GOTO(out, rc); - - exp = ll_i2obdexp(inode); - if (exp == NULL) - GOTO(out, rc = -EINVAL); - - if (fd->fd_flags & LL_FILE_GROUP_LOCKED) - lockh = &fd->fd_cwlockh; - - llap = llap_from_page_with_lockh(page, LLAP_ORIGIN_READPAGE, lockh); - if (IS_ERR(llap)) { - if (PTR_ERR(llap) == -ENOLCK) { - CWARN("ino %lu page %lu (%llu) not covered by " - "a lock (mmap?). check debug logs.\n", - inode->i_ino, page->index, - (long long)page->index << PAGE_CACHE_SHIFT); - } - GOTO(out, rc = PTR_ERR(llap)); - } - - if (ll_i2sbi(inode)->ll_ra_info.ra_max_pages) - ras_update(ll_i2sbi(inode), inode, &fd->fd_ras, page->index, - llap->llap_defer_uptodate); - - - if (llap->llap_defer_uptodate) { - /* This is the callpath if we got the page from a readahead */ - llap->llap_ra_used = 1; - rc = ll_readahead(&fd->fd_ras, exp, page->mapping, oig, - fd->fd_flags); - if (rc > 0) - obd_trigger_group_io(exp, ll_i2info(inode)->lli_smd, - NULL, oig); - LL_CDEBUG_PAGE(D_PAGE, page, "marking uptodate from defer\n"); - SetPageUptodate(page); - unlock_page(page); - GOTO(out_oig, rc = 0); - } - - rc = ll_issue_page_read(exp, llap, oig, 0); - if (rc) - GOTO(out, rc); - - LL_CDEBUG_PAGE(D_PAGE, page, "queued readpage\n"); - /* We have just requested the actual page we want, see if we can tack - * on some readahead to that page's RPC before it is sent. */ - if (ll_i2sbi(inode)->ll_ra_info.ra_max_pages) - ll_readahead(&fd->fd_ras, exp, page->mapping, oig, - fd->fd_flags); - - rc = obd_trigger_group_io(exp, ll_i2info(inode)->lli_smd, NULL, oig); - -out: - if (rc) - unlock_page(page); -out_oig: - if (oig != NULL) - oig_release(oig); - RETURN(rc); -} - -static void ll_file_put_pages(struct page **pages, int numpages) -{ - int i; - struct page **pp; - ENTRY; - - for (i = 0, pp = pages; i < numpages; i++, pp++) { - if (*pp) { - LL_CDEBUG_PAGE(D_PAGE, (*pp), "free\n"); - __ll_put_llap(*pp); - if (page_private(*pp)) - CERROR("the llap wasn't freed\n"); - (*pp)->mapping = NULL; - if (page_count(*pp) != 1) - CERROR("page %p, flags %#lx, count %i, private %p\n", - (*pp), (unsigned long)(*pp)->flags, page_count(*pp), - (void*)page_private(*pp)); - __free_pages(*pp, 0); - } - } - OBD_FREE(pages, numpages * sizeof(struct page*)); - EXIT; -} - -static struct page **ll_file_prepare_pages(int numpages, struct inode *inode, - unsigned long first) -{ - struct page **pages; - int i; - int rc = 0; - ENTRY; - - OBD_ALLOC(pages, sizeof(struct page *) * numpages); - if (pages == NULL) - RETURN(ERR_PTR(-ENOMEM)); - for (i = 0; i < numpages; i++) { - struct page *page; - struct ll_async_page *llap; - - page = alloc_pages(GFP_HIGHUSER, 0); - if (page == NULL) - GOTO(err, rc = -ENOMEM); - pages[i] = page; - /* llap_from_page needs page index and mapping to be set */ - page->index = first++; - page->mapping = inode->i_mapping; - llap = llap_from_page(page, LLAP_ORIGIN_LOCKLESS_IO); - if (IS_ERR(llap)) - GOTO(err, rc = PTR_ERR(llap)); - llap->llap_lockless_io_page = 1; - } - RETURN(pages); -err: - ll_file_put_pages(pages, numpages); - RETURN(ERR_PTR(rc)); - } - -static ssize_t ll_file_copy_pages(struct page **pages, int numpages, - const struct iovec *iov, unsigned long nsegs, - ssize_t iov_offset, loff_t pos, size_t count, - int rw) -{ - ssize_t amount = 0; - int i; - int updatechecksum = ll_i2sbi(pages[0]->mapping->host)->ll_flags & - LL_SBI_LLITE_CHECKSUM; - ENTRY; - - for (i = 0; i < numpages; i++) { - unsigned offset, bytes, left = 0; - char *vaddr; - - vaddr = kmap(pages[i]); - offset = pos & (CFS_PAGE_SIZE - 1); - bytes = min_t(unsigned, CFS_PAGE_SIZE - offset, count); - LL_CDEBUG_PAGE(D_PAGE, pages[i], "op = %s, addr = %p, " - "bytes = %u\n", - (rw == WRITE) ? "CFU" : "CTU", - vaddr + offset, bytes); - while (bytes > 0 && !left && nsegs) { - unsigned copy = min_t(ssize_t, bytes, - iov->iov_len - iov_offset); - if (rw == WRITE) { - left = copy_from_user(vaddr + offset, - iov->iov_base +iov_offset, - copy); - if (updatechecksum) { - struct ll_async_page *llap; - - llap = llap_cast_private(pages[i]); - llap->llap_checksum = - init_checksum(OSC_DEFAULT_CKSUM); - llap->llap_checksum = - compute_checksum(llap->llap_checksum, - vaddr,CFS_PAGE_SIZE, - OSC_DEFAULT_CKSUM); - } - } else { - left = copy_to_user(iov->iov_base + iov_offset, - vaddr + offset, copy); - } - - amount += copy; - count -= copy; - pos += copy; - iov_offset += copy; - bytes -= copy; - if (iov_offset == iov->iov_len) { - iov_offset = 0; - iov++; - nsegs--; - } - } - kunmap(pages[i]); - if (left) { - amount -= left; - break; - } - } - if (amount == 0) - RETURN(-EFAULT); - RETURN(amount); -} - -static int ll_file_oig_pages(struct inode * inode, struct page **pages, - int numpages, loff_t pos, size_t count, int rw) -{ - struct obd_io_group *oig; - struct ll_inode_info *lli = ll_i2info(inode); - struct obd_export *exp; - loff_t org_pos = pos; - obd_flag brw_flags; - int rc; - int i; - ENTRY; - - exp = ll_i2obdexp(inode); - if (exp == NULL) - RETURN(-EINVAL); - rc = oig_init(&oig); - if (rc) - RETURN(rc); - brw_flags = OBD_BRW_SRVLOCK; - if (capable(CAP_SYS_RESOURCE)) - brw_flags |= OBD_BRW_NOQUOTA; - - for (i = 0; i < numpages; i++) { - struct ll_async_page *llap; - unsigned from, bytes; - - from = pos & (CFS_PAGE_SIZE - 1); - bytes = min_t(unsigned, CFS_PAGE_SIZE - from, - count - pos + org_pos); - llap = llap_cast_private(pages[i]); - LASSERT(llap); - - lock_page(pages[i]); - - LL_CDEBUG_PAGE(D_PAGE, pages[i], "offset "LPU64"," - " from %u, bytes = %u\n", - pos, from, bytes); - LASSERTF(pos >> CFS_PAGE_SHIFT == pages[i]->index, - "wrong page index %lu (%lu)\n", - pages[i]->index, - (unsigned long)(pos >> CFS_PAGE_SHIFT)); - rc = obd_queue_group_io(exp, lli->lli_smd, NULL, oig, - llap->llap_cookie, - (rw == WRITE) ? - OBD_BRW_WRITE:OBD_BRW_READ, - from, bytes, brw_flags, - ASYNC_READY | ASYNC_URGENT | - ASYNC_COUNT_STABLE | ASYNC_GROUP_SYNC); - if (rc) { - i++; - GOTO(out, rc); - } - pos += bytes; - } - rc = obd_trigger_group_io(exp, lli->lli_smd, NULL, oig); - if (rc) - GOTO(out, rc); - rc = oig_wait(oig); -out: - while(--i >= 0) - unlock_page(pages[i]); - oig_release(oig); - RETURN(rc); -} - -/* Advance through passed iov, adjust iov pointer as necessary and return - * starting offset in individual entry we are pointing at. Also reduce - * nr_segs as needed */ -static ssize_t ll_iov_advance(const struct iovec **iov, unsigned long *nr_segs, - ssize_t offset) -{ - while (*nr_segs > 0) { - if ((*iov)->iov_len > offset) - return ((*iov)->iov_len - offset); - offset -= (*iov)->iov_len; - (*iov)++; - (*nr_segs)--; - } - return 0; -} - -ssize_t ll_file_lockless_io(struct file *file, const struct iovec *iov, - unsigned long nr_segs, - loff_t *ppos, int rw, ssize_t count) -{ - loff_t pos; - struct inode *inode = file->f_dentry->d_inode; - ssize_t rc = 0; - int max_pages; - size_t amount = 0; - unsigned long first, last; - const struct iovec *iv = &iov[0]; - unsigned long nsegs = nr_segs; - unsigned long offset = 0; - ENTRY; - - if (rw == READ) { - loff_t isize; - - ll_inode_size_lock(inode, 0); - isize = i_size_read(inode); - ll_inode_size_unlock(inode, 0); - if (*ppos >= isize) - GOTO(out, rc = 0); - if (*ppos + count >= isize) - count -= *ppos + count - isize; - if (count == 0) - GOTO(out, rc); - } else { - rc = generic_write_checks(file, ppos, &count, 0); - if (rc) - GOTO(out, rc); - rc = remove_suid(file->f_dentry); - if (rc) - GOTO(out, rc); - } - - pos = *ppos; - first = pos >> CFS_PAGE_SHIFT; - last = (pos + count - 1) >> CFS_PAGE_SHIFT; - max_pages = PTLRPC_MAX_BRW_PAGES * - ll_i2info(inode)->lli_smd->lsm_stripe_count; - CDEBUG(D_INFO, "%u, stripe_count = %u\n", - PTLRPC_MAX_BRW_PAGES /* max_pages_per_rpc */, - ll_i2info(inode)->lli_smd->lsm_stripe_count); - - while (first <= last && rc >= 0) { - int pages_for_io; - struct page **pages; - size_t bytes = count - amount; - - pages_for_io = min_t(int, last - first + 1, max_pages); - pages = ll_file_prepare_pages(pages_for_io, inode, first); - if (IS_ERR(pages)) { - rc = PTR_ERR(pages); - break; - } - if (rw == WRITE) { - rc = ll_file_copy_pages(pages, pages_for_io, iv, nsegs, - offset, pos + amount, bytes, - rw); - if (rc < 0) - GOTO(put_pages, rc); - offset = ll_iov_advance(&iv, &nsegs, offset + rc); - bytes = rc; - } - rc = ll_file_oig_pages(inode, pages, pages_for_io, - pos + amount, bytes, rw); - if (rc) - GOTO(put_pages, rc); - if (rw == READ) { - rc = ll_file_copy_pages(pages, pages_for_io, iv, nsegs, - offset, pos + amount, bytes, rw); - if (rc < 0) - GOTO(put_pages, rc); - offset = ll_iov_advance(&iv, &nsegs, offset + rc); - bytes = rc; - } - amount += bytes; -put_pages: - ll_file_put_pages(pages, pages_for_io); - first += pages_for_io; - /* a short read/write check */ - if (pos + amount < ((loff_t)first << CFS_PAGE_SHIFT)) - break; - /* Check if we are out of userspace buffers. (how that could - happen?) */ - if (nsegs == 0) - break; - } - /* NOTE: don't update i_size and KMS in absence of LDLM locks even - * write makes the file large */ - file_accessed(file); - if (rw == READ && amount < count && rc == 0) { - unsigned long not_cleared; - - while (nsegs > 0) { - ssize_t to_clear = min_t(ssize_t, count - amount, - iv->iov_len - offset); - not_cleared = clear_user(iv->iov_base + offset, - to_clear); - amount += to_clear - not_cleared; - if (not_cleared) { - rc = -EFAULT; - break; - } - offset = 0; - iv++; - nsegs--; - } - } - if (amount > 0) { - lprocfs_counter_add(ll_i2sbi(inode)->ll_stats, - (rw == WRITE) ? - LPROC_LL_LOCKLESS_WRITE : - LPROC_LL_LOCKLESS_READ, - (long)amount); - *ppos += amount; - RETURN(amount); - } -out: - RETURN(rc); -} diff --git a/lustre/llite/rw24.c b/lustre/llite/rw24.c deleted file mode 100644 index ab83f8f58a..0000000000 --- a/lustre/llite/rw24.c +++ /dev/null @@ -1,144 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Lite I/O page cache for the 2.4 kernel version - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/string.h> -#include <linux/stat.h> -#include <linux/errno.h> -#include <linux/smp_lock.h> -#include <linux/unistd.h> -#include <linux/version.h> -#include <asm/system.h> -#include <asm/uaccess.h> - -#include <linux/fs.h> -#include <linux/iobuf.h> -#include <linux/stat.h> -#include <asm/uaccess.h> -#include <linux/mm.h> -#include <linux/pagemap.h> -#include <linux/smp_lock.h> - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <lustre_lite.h> -#include "llite_internal.h" -#include <linux/lustre_compat25.h> - -static int ll_direct_IO_24(int rw, -#ifdef HAVE_DIO_FILE - struct file *file, -#else - struct inode *inode, -#endif - struct kiobuf *iobuf, unsigned long blocknr, - int blocksize) -{ -#ifdef HAVE_DIO_FILE - struct inode *inode = file->f_dentry->d_inode; -#endif - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct brw_page *pga; - struct obdo oa; - int length, i, flags, rc = 0; - loff_t offset, offset_orig; - ENTRY; - - if (!lsm || !lsm->lsm_object_id) - RETURN(-EBADF); - - offset = ((obd_off)blocknr << inode->i_blkbits); - offset_orig = offset; - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), size="LPSZ - ", offset=%lld=%llx, pages %u\n", - inode->i_ino, inode->i_generation, inode, iobuf->length, - offset, offset, iobuf->nr_pages); - - /* FIXME: io smaller than CFS_PAGE_SIZE is broken on ia64 */ - if ((iobuf->offset & (~CFS_PAGE_MASK)) || - (iobuf->length & (~CFS_PAGE_MASK))) - RETURN(-EINVAL); - - OBD_ALLOC(pga, sizeof(*pga) * iobuf->nr_pages); - if (!pga) - RETURN(-ENOMEM); - - flags = 0 /* | OBD_BRW_DIRECTIO */; - length = iobuf->length; - rw = rw ? OBD_BRW_WRITE : OBD_BRW_READ; - - for (i = 0, length = iobuf->length; length > 0; - length -= pga[i].count, offset += pga[i].count, i++) { /*i last!*/ - pga[i].pg = iobuf->maplist[i]; - pga[i].off = offset; - /* To the end of the page, or the length, whatever is less */ - pga[i].count = min_t(int, CFS_PAGE_SIZE - (offset & ~CFS_PAGE_MASK), - length); - pga[i].flag = flags; - if (rw == OBD_BRW_READ) - POISON_PAGE(iobuf->maplist[i], 0x0d); - } - - ll_inode_fill_obdo(inode, rw, &oa); - - if (rw == OBD_BRW_WRITE) - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRECT_WRITE, iobuf->length); - else - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRECT_READ, iobuf->length); - rc = obd_brw_rqset(rw, ll_i2obdexp(inode), &oa, lsm, iobuf->nr_pages, - pga, NULL); - if ((rc > 0) && (rw == OBD_BRW_WRITE)) { - lov_stripe_lock(lsm); - obd_adjust_kms(ll_i2obdexp(inode), lsm, offset_orig + rc, 0); - lov_stripe_unlock(lsm); - } - - OBD_FREE(pga, sizeof(*pga) * iobuf->nr_pages); - RETURN(rc); -} - -#ifdef KERNEL_HAS_AS_MAX_READAHEAD -static int ll_max_readahead(struct inode *inode) -{ - return 0; -} -#endif - -struct address_space_operations ll_aops = { - .readpage = ll_readpage, - .direct_IO = ll_direct_IO_24, - .writepage = ll_writepage, - .prepare_write = ll_prepare_write, - .commit_write = ll_commit_write, - .removepage = ll_removepage, - .sync_page = NULL, - .bmap = NULL, -#ifdef KERNEL_HAS_AS_MAX_READAHEAD - .max_readahead = ll_max_readahead, -#endif -}; - diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c deleted file mode 100644 index 82efcd3bf7..0000000000 --- a/lustre/llite/rw26.c +++ /dev/null @@ -1,329 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Lite I/O page cache routines for the 2.5/2.6 kernel version - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/string.h> -#include <linux/stat.h> -#include <linux/errno.h> -#include <linux/smp_lock.h> -#include <linux/unistd.h> -#include <linux/version.h> -#include <asm/system.h> -#include <asm/uaccess.h> - -#include <linux/fs.h> -#include <linux/buffer_head.h> -#include <linux/mpage.h> -#include <linux/writeback.h> -#include <linux/stat.h> -#include <asm/uaccess.h> -#ifdef HAVE_SEGMENT_H -# include <asm/segment.h> -#endif -#include <linux/mm.h> -#include <linux/pagemap.h> -#include <linux/smp_lock.h> - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <lustre_lite.h> -#include "llite_internal.h" -#include <linux/lustre_compat25.h> - -static int ll_writepage_26(struct page *page, struct writeback_control *wbc) -{ - return ll_writepage(page); -} - -/* It is safe to not check anything in invalidatepage/releasepage below - because they are run with page locked and all our io is happening with - locked page too */ -#ifdef HAVE_INVALIDATEPAGE_RETURN_INT -static int ll_invalidatepage(struct page *page, unsigned long offset) -{ - if (offset) - return 0; - if (PagePrivate(page)) - ll_removepage(page); - return 1; -} -#else -static void ll_invalidatepage(struct page *page, unsigned long offset) -{ - if (offset) - return; - if (PagePrivate(page)) - ll_removepage(page); -} -#endif - -static int ll_releasepage(struct page *page, gfp_t gfp_mask) -{ - if (PagePrivate(page)) - ll_removepage(page); - return 1; -} - -#define MAX_DIRECTIO_SIZE 2*1024*1024*1024UL - -static inline int ll_get_user_pages(int rw, unsigned long user_addr, - size_t size, struct page ***pages) -{ - int result = -ENOMEM; - int page_count; - - /* set an arbitrary limit to prevent arithmetic overflow */ - if (size > MAX_DIRECTIO_SIZE) { - *pages = NULL; - return -EFBIG; - } - - page_count = ((user_addr + size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT)- - (user_addr >> CFS_PAGE_SHIFT); - - OBD_ALLOC_WAIT(*pages, page_count * sizeof(**pages)); - if (*pages) { - down_read(¤t->mm->mmap_sem); - result = get_user_pages(current, current->mm, user_addr, - page_count, (rw == READ), 0, *pages, - NULL); - up_read(¤t->mm->mmap_sem); - if (result < 0) - OBD_FREE(*pages, page_count * sizeof(**pages)); - } - - return result; -} - -/* ll_free_user_pages - tear down page struct array - * @pages: array of page struct pointers underlying target buffer */ -static void ll_free_user_pages(struct page **pages, int npages, int do_dirty) -{ - int i; - - for (i = 0; i < npages; i++) { - if (do_dirty) - set_page_dirty_lock(pages[i]); - page_cache_release(pages[i]); - } - - OBD_FREE(pages, npages * sizeof(*pages)); -} - -static ssize_t ll_direct_IO_26_seg(int rw, struct inode *inode, - struct address_space *mapping, - struct obd_info *oinfo, - struct ptlrpc_request_set *set, - size_t size, loff_t file_offset, - struct page **pages, int page_count) -{ - struct brw_page *pga; - int i, rc = 0; - size_t length; - ENTRY; - - OBD_ALLOC(pga, sizeof(*pga) * page_count); - if (!pga) { - CDEBUG(D_VFSTRACE, "sizeof(*pga) = %u page_count = %u\n", - (int)sizeof(*pga), page_count); - RETURN(-ENOMEM); - } - - for (i = 0, length = size; length > 0; - length -=pga[i].count, file_offset +=pga[i].count,i++) {/*i last!*/ - pga[i].pg = pages[i]; - pga[i].off = file_offset; - /* To the end of the page, or the length, whatever is less */ - pga[i].count = min_t(int, CFS_PAGE_SIZE -(file_offset & ~CFS_PAGE_MASK), - length); - pga[i].flag = 0; - if (rw == READ) - POISON_PAGE(pages[i], 0x0d); - } - - rc = obd_brw_async(rw == WRITE ? OBD_BRW_WRITE : OBD_BRW_READ, - ll_i2obdexp(inode), oinfo, page_count, - pga, NULL, set); - if (rc == 0) - rc = size; - - OBD_FREE(pga, sizeof(*pga) * page_count); - RETURN(rc); -} - -/* This is the maximum size of a single O_DIRECT request, based on a 128kB - * kmalloc limit. We need to fit all of the brw_page structs, each one - * representing PAGE_SIZE worth of user data, into a single buffer, and - * then truncate this to be a full-sized RPC. This is 22MB for 4kB pages. */ -#define MAX_DIO_SIZE ((128 * 1024 / sizeof(struct brw_page) * CFS_PAGE_SIZE) & \ - ~(PTLRPC_MAX_BRW_SIZE - 1)) -static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb, - const struct iovec *iov, loff_t file_offset, - unsigned long nr_segs) -{ - struct file *file = iocb->ki_filp; - struct inode *inode = file->f_mapping->host; - ssize_t count = iov_length(iov, nr_segs), tot_bytes = 0; - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = lli->lli_smd; - struct ptlrpc_request_set *set; - struct obd_info oinfo; - struct obdo oa; - unsigned long seg; - size_t size = MAX_DIO_SIZE; - ENTRY; - - if (!lli->lli_smd || !lli->lli_smd->lsm_object_id) - RETURN(-EBADF); - - /* FIXME: io smaller than CFS_PAGE_SIZE is broken on ia64 ??? */ - if ((file_offset & (~CFS_PAGE_MASK)) || (count & ~CFS_PAGE_MASK)) - RETURN(-EINVAL); - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), size="LPSZ" (max %lu), " - "offset=%lld=%llx, pages "LPSZ" (max %lu)\n", - inode->i_ino, inode->i_generation, inode, count, MAX_DIO_SIZE, - file_offset, file_offset, count >> CFS_PAGE_SHIFT, - MAX_DIO_SIZE >> CFS_PAGE_SHIFT); - - if (rw == WRITE) - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRECT_WRITE, count); - else - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRECT_READ, count); - - /* Check that all user buffers are aligned as well */ - for (seg = 0; seg < nr_segs; seg++) { - if (((unsigned long)iov[seg].iov_base & ~CFS_PAGE_MASK) || - (iov[seg].iov_len & ~CFS_PAGE_MASK)) - RETURN(-EINVAL); - } - - set = ptlrpc_prep_set(); - if (set == NULL) - RETURN(-ENOMEM); - - ll_inode_fill_obdo(inode, rw == WRITE ? OBD_BRW_WRITE : OBD_BRW_READ, &oa); - oinfo.oi_oa = &oa; - oinfo.oi_md = lsm; - - /* need locking between buffered and direct access. and race with - *size changing by concurrent truncates and writes. */ - if (rw == READ) - LOCK_INODE_MUTEX(inode); - - for (seg = 0; seg < nr_segs; seg++) { - size_t iov_left = iov[seg].iov_len; - unsigned long user_addr = (unsigned long)iov[seg].iov_base; - - if (rw == READ) { - if (file_offset >= inode->i_size) - break; - if (file_offset + iov_left > inode->i_size) - iov_left = inode->i_size - file_offset; - } - - while (iov_left > 0) { - struct page **pages; - int page_count; - ssize_t result; - - page_count = ll_get_user_pages(rw, user_addr, - min(size, iov_left), - &pages); - LASSERT(page_count != 0); - if (page_count > 0) { - result = ll_direct_IO_26_seg(rw, inode, - file->f_mapping, - &oinfo, set, - min(size,iov_left), - file_offset, pages, - page_count); - ll_free_user_pages(pages, page_count, rw==READ); - } else { - result = 0; - } - if (page_count < 0 || result <= 0) { - /* If we can't allocate a large enough buffer - * for the request, shrink it to a smaller - * PAGE_SIZE multiple and try again. - * We should always be able to kmalloc for a - * page worth of page pointers = 4MB on i386. */ - if ((page_count == -ENOMEM||result == -ENOMEM)&& - size > (CFS_PAGE_SIZE / sizeof(*pages)) * - CFS_PAGE_SIZE) { - size = ((((size / 2) - 1) | - ~CFS_PAGE_MASK) + 1) & - CFS_PAGE_MASK; - CDEBUG(D_VFSTRACE, "DIO size now %u\n", - (int)size); - continue; - } - if (tot_bytes > 0) - GOTO(wait_io, tot_bytes); - GOTO(out, tot_bytes = page_count < 0 ? page_count : result); - } - - tot_bytes += result; - file_offset += result; - iov_left -= result; - user_addr += result; - } - } - - if (tot_bytes > 0) { - int rc; - wait_io: - rc = ptlrpc_set_wait(set); - if (rc) - GOTO(out, tot_bytes = rc); - if (rw == WRITE) { - lov_stripe_lock(lsm); - obd_adjust_kms(ll_i2obdexp(inode), lsm, file_offset, 0); - lov_stripe_unlock(lsm); - } - } -out: - if (rw == READ) - UNLOCK_INODE_MUTEX(inode); - - ptlrpc_set_destroy(set); - RETURN(tot_bytes); -} - -struct address_space_operations ll_aops = { - .readpage = ll_readpage, -// .readpages = ll_readpages, - .direct_IO = ll_direct_IO_26, - .writepage = ll_writepage_26, - .writepages = generic_writepages, - .set_page_dirty = __set_page_dirty_nobuffers, - .sync_page = NULL, - .prepare_write = ll_prepare_write, - .commit_write = ll_commit_write, - .invalidatepage = ll_invalidatepage, - .releasepage = ll_releasepage, - .bmap = NULL -}; diff --git a/lustre/llite/statahead.c b/lustre/llite/statahead.c deleted file mode 100644 index 24b245d865..0000000000 --- a/lustre/llite/statahead.c +++ /dev/null @@ -1,927 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2007 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <linux/fs.h> -#include <linux/sched.h> -#include <linux/mm.h> -#include <linux/smp_lock.h> -#include <linux/highmem.h> -#include <linux/pagemap.h> - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <obd_support.h> -#include <lustre_lite.h> -#include <lustre_dlm.h> -#include <linux/lustre_version.h> -#include "llite_internal.h" - -struct ll_sai_entry { - struct list_head se_list; - unsigned int se_index; - int se_stat; -}; - -enum { - SA_ENTRY_UNSTATED = 0, - SA_ENTRY_STATED -}; - -static unsigned int sai_generation = 0; -static spinlock_t sai_generation_lock = SPIN_LOCK_UNLOCKED; - -static struct ll_statahead_info *ll_sai_alloc(void) -{ - struct ll_statahead_info *sai; - - OBD_ALLOC_PTR(sai); - if (!sai) - return NULL; - - spin_lock(&sai_generation_lock); - sai->sai_generation = ++sai_generation; - spin_unlock(&sai_generation_lock); - atomic_set(&sai->sai_refcount, 1); - sai->sai_max = LL_SA_RPC_MIN; - cfs_waitq_init(&sai->sai_waitq); - cfs_waitq_init(&sai->sai_thread.t_ctl_waitq); - CFS_INIT_LIST_HEAD(&sai->sai_entries); - return sai; -} - -static inline -struct ll_statahead_info *ll_sai_get(struct ll_statahead_info *sai) -{ - LASSERT(sai); - atomic_inc(&sai->sai_refcount); - return sai; -} - -static void ll_sai_put(struct ll_statahead_info *sai) -{ - struct inode *inode = sai->sai_inode; - struct ll_inode_info *lli = ll_i2info(inode); - ENTRY; - - if (atomic_dec_and_lock(&sai->sai_refcount, &lli->lli_lock)) { - struct ll_sai_entry *entry, *next; - - lli->lli_sai = NULL; - spin_unlock(&lli->lli_lock); - - LASSERT(sai->sai_thread.t_flags & SVC_STOPPED); - - if (sai->sai_sent > sai->sai_replied) - CWARN("statahead for dir %lu/%u does not finish: " - "[sent:%u] [replied:%u]\n", - inode->i_ino, inode->i_generation, - sai->sai_sent, sai->sai_replied); - - list_for_each_entry_safe(entry, next, &sai->sai_entries, - se_list) { - list_del(&entry->se_list); - OBD_FREE_PTR(entry); - } - OBD_FREE_PTR(sai); - iput(inode); - } - EXIT; -} - -static struct ll_sai_entry * -ll_sai_entry_get(struct ll_statahead_info *sai, unsigned int index, int stat) -{ - struct ll_inode_info *lli = ll_i2info(sai->sai_inode); - struct ll_sai_entry *entry; - ENTRY; - - OBD_ALLOC_PTR(entry); - if (entry == NULL) - RETURN(ERR_PTR(-ENOMEM)); - - CDEBUG(D_READA, "alloc sai entry %p index %u, stat %d\n", - entry, index, stat); - entry->se_index = index; - entry->se_stat = stat; - - spin_lock(&lli->lli_lock); - list_add_tail(&entry->se_list, &sai->sai_entries); - spin_unlock(&lli->lli_lock); - - RETURN(entry); -} - -/* - * inside lli_lock - * return value: - * 0: can not find the entry with the index - * 1: it is the first entry - * 2: it is not the first entry - */ -static int -ll_sai_entry_set(struct ll_statahead_info *sai, unsigned int index, int stat) -{ - struct ll_sai_entry *entry; - int rc = 0; - ENTRY; - - if (list_empty(&sai->sai_entries)) - RETURN(0); - - entry = list_entry(sai->sai_entries.next, struct ll_sai_entry, se_list); - if (entry->se_index == index) - GOTO(out, rc = 1); - - while (entry->se_list.next != &sai->sai_entries && - entry->se_index < index) { - entry = list_entry(entry->se_list.next, struct ll_sai_entry, - se_list); - if (entry->se_index == index) - GOTO(out, rc = 2); - } - - EXIT; - -out: - if (rc) { - LASSERT(entry->se_stat == SA_ENTRY_UNSTATED); - entry->se_stat = stat; - } - - return rc; -} - -/* - * Check whether first entry was stated already or not. - * No need to hold lli_lock, for: - * (1) it is me that remove entry from the list - * (2) the statahead thread only add new entry to the list tail - */ -static int ll_sai_entry_stated(struct ll_statahead_info *sai) -{ - struct ll_sai_entry *entry; - int rc = 0; - ENTRY; - - if (!list_empty(&sai->sai_entries)) { - entry = list_entry(sai->sai_entries.next, struct ll_sai_entry, - se_list); - rc = (entry->se_stat != SA_ENTRY_UNSTATED); - } - - RETURN(rc); -} - -static void ll_sai_entry_put(struct ll_statahead_info *sai) -{ - struct ll_inode_info *lli = ll_i2info(sai->sai_inode); - struct ll_sai_entry *entry; - ENTRY; - - spin_lock(&lli->lli_lock); - if (!list_empty(&sai->sai_entries)) { - entry = list_entry(sai->sai_entries.next, - struct ll_sai_entry, se_list); - list_del(&entry->se_list); - OBD_FREE_PTR(entry); - } - spin_unlock(&lli->lli_lock); - - EXIT; -} - -/* finish lookup/revalidate */ -static int ll_statahead_interpret(struct obd_export *exp, - struct ptlrpc_request *req, - struct md_enqueue_info *minfo, - int rc) -{ - struct lookup_intent *it = &minfo->mi_it; - struct dentry *dentry = minfo->mi_dentry; - struct inode *dir = dentry->d_parent->d_inode; - struct ll_inode_info *lli = ll_i2info(dir); - struct ll_statahead_info *sai = NULL; - ENTRY; - - CDEBUG(D_READA, "interpret statahead %.*s rc %d\n", - dentry->d_name.len, dentry->d_name.name, rc); - - spin_lock(&lli->lli_lock); - if (unlikely(lli->lli_sai == NULL || - lli->lli_sai->sai_generation != minfo->mi_generation)) { - spin_unlock(&lli->lli_lock); - GOTO(out_free, rc = -ESTALE); - } else { - sai = ll_sai_get(lli->lli_sai); - spin_unlock(&lli->lli_lock); - } - - if (rc || dir == NULL) - GOTO(out, rc); - - if (dentry->d_inode == NULL) { - /* lookup */ - struct dentry *save = dentry; - struct it_cb_data icbd = { - .icbd_parent = dir, - .icbd_childp = &dentry - }; - - rc = lookup_it_finish(req, DLM_REPLY_REC_OFF, it, &icbd); - if (!rc) - /* - * Here dentry->d_inode might be NULL, - * because the entry may have been removed before - * we start doing stat ahead. - */ - ll_lookup_finish_locks(it, dentry); - - if (dentry != save) - dput(save); - } else { - /* revalidate */ - struct mds_body *body; - - body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, - sizeof(*body)); - if (memcmp(&minfo->mi_data.fid2, &body->fid1, - sizeof(body->fid1))) { - ll_unhash_aliases(dentry->d_inode); - GOTO(out, rc = -EAGAIN); - } - - rc = revalidate_it_finish(req, DLM_REPLY_REC_OFF, it, dentry); - if (rc) { - ll_unhash_aliases(dentry->d_inode); - GOTO(out, rc); - } - - spin_lock(&dcache_lock); - lock_dentry(dentry); - __d_drop(dentry); -#ifdef DCACHE_LUSTRE_INVALID - dentry->d_flags &= ~DCACHE_LUSTRE_INVALID; -#endif - unlock_dentry(dentry); - d_rehash_cond(dentry, 0); - spin_unlock(&dcache_lock); - - ll_lookup_finish_locks(it, dentry); - } - EXIT; - -out: - if (sai != NULL) { - int first; - - sai->sai_replied++; - spin_lock(&lli->lli_lock); - first = ll_sai_entry_set(sai, - (unsigned int)(long)minfo->mi_cbdata, - SA_ENTRY_STATED); - /* - * wake up the "ls -l" process only when the first entry - * returned. - */ - spin_unlock(&lli->lli_lock); - if (first == 1) - cfs_waitq_signal(&sai->sai_waitq); - else if (first == 0) - CDEBUG(D_READA, "can't find sai entry for dir " - "%lu/%u generation %u index %d\n", - dir->i_ino, dir->i_generation, - minfo->mi_generation, - (unsigned int)(long)minfo->mi_cbdata); - - ll_sai_put(sai); - } -out_free: - ll_intent_release(it); - OBD_FREE_PTR(minfo); - - dput(dentry); - return rc; -} - -static void sa_args_fini(struct md_enqueue_info *minfo, - struct ldlm_enqueue_info *einfo) -{ - LASSERT(minfo && einfo); - OBD_FREE_PTR(minfo); - OBD_FREE_PTR(einfo); -} - -static int sa_args_prep(struct inode *dir, struct dentry *dentry, - struct md_enqueue_info **pmi, - struct ldlm_enqueue_info **pei) -{ - struct ll_inode_info *lli = ll_i2info(dir); - struct md_enqueue_info *minfo; - struct ldlm_enqueue_info *einfo; - - OBD_ALLOC_PTR(einfo); - if (einfo == NULL) - return -ENOMEM; - - OBD_ALLOC_PTR(minfo); - if (minfo == NULL) { - OBD_FREE_PTR(einfo); - return -ENOMEM; - } - - minfo->mi_exp = ll_i2mdcexp(dir); - minfo->mi_it.it_op = IT_GETATTR; - minfo->mi_dentry = dentry; - minfo->mi_cb = ll_statahead_interpret; - minfo->mi_generation = lli->lli_sai->sai_generation; - minfo->mi_cbdata = (void *)(long)lli->lli_sai->sai_index; - - einfo->ei_type = LDLM_IBITS; - einfo->ei_mode = it_to_lock_mode(&minfo->mi_it); - einfo->ei_cb_bl = ll_mdc_blocking_ast; - einfo->ei_cb_cp = ldlm_completion_ast; - einfo->ei_cb_gl = NULL; - einfo->ei_cbdata = NULL; - - *pmi = minfo; - *pei = einfo; - - return 0; -} - -/* similar to ll_lookup_it(). */ -static int do_sa_lookup(struct inode *dir, struct dentry *dentry) -{ - struct md_enqueue_info *minfo; - struct ldlm_enqueue_info *einfo; - int rc; - ENTRY; - - rc = sa_args_prep(dir, dentry, &minfo, &einfo); - if (rc) - RETURN(rc); - - rc = ll_prepare_mdc_op_data(&minfo->mi_data, dir, NULL, - dentry->d_name.name, dentry->d_name.len, 0, - NULL); - if (rc == 0) - rc = mdc_intent_getattr_async(minfo->mi_exp, minfo, einfo); - - if (rc) - sa_args_fini(minfo, einfo); - - RETURN(rc); -} - -/* - * similar to ll_revalidate_it(). - * return value: - * 1 -- dentry valid - * 0 -- will send stat-ahead request - * others -- prepare stat-ahead request failed - */ -static int do_sa_revalidate(struct dentry *dentry) -{ - struct inode *inode = dentry->d_inode; - struct ll_fid fid; - struct lookup_intent it = { .it_op = IT_GETATTR }; - struct md_enqueue_info *minfo; - struct ldlm_enqueue_info *einfo; - int rc; - ENTRY; - - if (inode == NULL) - RETURN(1); - - if (d_mountpoint(dentry)) - RETURN(1); - - if (dentry == dentry->d_sb->s_root) - RETURN(1); - - ll_inode2fid(&fid, inode); - - rc = mdc_revalidate_lock(ll_i2mdcexp(inode), &it, &fid); - if (rc == 1) { - ll_intent_release(&it); - RETURN(1); - } - - rc = sa_args_prep(dentry->d_parent->d_inode, dentry, &minfo, &einfo); - if (rc) - RETURN(rc); - - rc = ll_prepare_mdc_op_data(&minfo->mi_data, dentry->d_parent->d_inode, - inode, dentry->d_name.name, - dentry->d_name.len, 0, NULL); - if (rc == 0) - rc = mdc_intent_getattr_async(minfo->mi_exp, minfo, einfo); - - if (rc) - sa_args_fini(minfo, einfo); - - RETURN(rc); -} - -static inline void ll_name2qstr(struct qstr *this, const char *name, int namelen) -{ - unsigned long hash = init_name_hash(); - unsigned int c; - - this->name = name; - this->len = namelen; - for (; namelen > 0; namelen--, name++) { - c = *(const unsigned char *)name; - hash = partial_name_hash(c, hash); - } - this->hash = end_name_hash(hash); -} - -static int ll_statahead_one(struct dentry *parent, ext2_dirent *de) -{ - struct inode *dir = parent->d_inode; - struct ll_inode_info *lli = ll_i2info(dir); - struct qstr name; - struct dentry *dentry; - struct ll_sai_entry *se; - int rc; - ENTRY; - -#ifdef DCACHE_LUSTRE_INVALID - if (parent->d_flags & DCACHE_LUSTRE_INVALID) { -#else - if (d_unhashed(parent)) { -#endif - CDEBUG(D_READA, "parent dentry@%p %.*s is " - "invalid, skip statahead\n", - parent, parent->d_name.len, parent->d_name.name); - RETURN(-EINVAL); - } - - se = ll_sai_entry_get(lli->lli_sai, lli->lli_sai->sai_index, - SA_ENTRY_UNSTATED); - if (IS_ERR(se)) - RETURN(PTR_ERR(se)); - - ll_name2qstr(&name, de->name, de->name_len); - dentry = d_lookup(parent, &name); - if (!dentry) { - dentry = d_alloc(parent, &name); - if (dentry) { - rc = do_sa_lookup(dir, dentry); - if (rc) - dput(dentry); - } else { - GOTO(out, rc = -ENOMEM); - } - } else { - rc = do_sa_revalidate(dentry); - if (rc) - dput(dentry); - } - - EXIT; - -out: - if (rc) { - CDEBUG(D_READA, "set sai entry %p index %u stat %d rc %d\n", - se, se->se_index, se->se_stat, rc); - se->se_stat = rc; - cfs_waitq_signal(&lli->lli_sai->sai_waitq); - } else { - lli->lli_sai->sai_sent++; - } - - lli->lli_sai->sai_index++; - return rc; -} - -static inline int sa_check_stop(struct ll_statahead_info *sai) -{ - return !!(sai->sai_thread.t_flags & SVC_STOPPING); -} - -static inline int sa_not_full(struct ll_statahead_info *sai) -{ - return sai->sai_index < sai->sai_hit + sai->sai_miss + sai->sai_max; -} - -/* (1) hit ratio less than 80% - * or - * (2) consecutive miss more than 8 - */ -static inline int sa_low_hit(struct ll_statahead_info *sai) -{ - return ((sai->sai_hit < 4 * sai->sai_miss && sai->sai_hit > 7) || - (sai->sai_consecutive_miss > 8)); -} - -struct ll_sa_thread_args { - struct dentry *sta_parent; - pid_t sta_pid; -}; - -static int ll_statahead_thread(void *arg) -{ - struct ll_sa_thread_args *sta = arg; - struct dentry *parent = dget(sta->sta_parent); - struct inode *dir = parent->d_inode; - struct ll_inode_info *lli = ll_i2info(dir); - struct ll_sb_info *sbi = ll_i2sbi(dir); - struct ll_statahead_info *sai = ll_sai_get(lli->lli_sai); - struct ptlrpc_thread *thread = &sai->sai_thread; - unsigned long index = 0; - int first = 0; - int rc = 0; - char name[16] = ""; - ENTRY; - - sbi->ll_sa_total++; - snprintf(name, 15, "ll_sa_%u", sta->sta_pid); - cfs_daemonize(name); - spin_lock(&lli->lli_lock); - thread->t_flags = SVC_RUNNING; - spin_unlock(&lli->lli_lock); - cfs_waitq_signal(&thread->t_ctl_waitq); - CDEBUG(D_READA, "start doing statahead for %s\n", parent->d_name.name); - - while (1) { - struct l_wait_info lwi = { 0 }; - unsigned long npages; - char *kaddr, *limit; - ext2_dirent *de; - struct page *page; - - npages = dir_pages(dir); - /* reach the end of dir */ - if (index >= npages) { - CDEBUG(D_READA, "reach end, index/npages %lu/%lu\n", - index, npages); - break; - } - - page = ll_get_dir_page(dir, index); - if (IS_ERR(page)) { - rc = PTR_ERR(page); - CERROR("error reading dir %lu/%u page %lu/%u: rc %d\n", - dir->i_ino, dir->i_generation, index, - sai->sai_index, rc); - break; - } - - kaddr = page_address(page); - limit = kaddr + CFS_PAGE_SIZE - EXT2_DIR_REC_LEN(1); - de = (ext2_dirent *)kaddr; - if (!index) { - de = ext2_next_entry(de); /* skip "." */ - de = ext2_next_entry(de); /* skip ".." */ - } - - for (; (char*)de <= limit; de = ext2_next_entry(de)) { - if (!de->inode) - continue; - - if (de->name[0] == '.' && !sai->sai_ls_all) { - /* skip hidden files */ - sai->sai_skip_hidden++; - continue; - } - - /* don't stat-ahead first entry */ - if (unlikely(!first)) { - first++; - continue; - } - - l_wait_event(thread->t_ctl_waitq, - sa_check_stop(sai) || sa_not_full(sai), - &lwi); - - if (unlikely(sa_check_stop(sai))) { - ext2_put_page(page); - GOTO(out, rc); - } - - rc = ll_statahead_one(parent, de); - if (rc < 0) { - ext2_put_page(page); - GOTO(out, rc); - } - } - ext2_put_page(page); - index++; - } - EXIT; -out: - spin_lock(&lli->lli_lock); - thread->t_flags = SVC_STOPPED; - spin_unlock(&lli->lli_lock); - cfs_waitq_signal(&sai->sai_waitq); - cfs_waitq_signal(&thread->t_ctl_waitq); - ll_sai_put(sai); - dput(parent); - CDEBUG(D_READA, "statahead thread stopped, pid %d\n", - cfs_curproc_pid()); - return rc; -} - -/* called in ll_file_release() */ -void ll_stop_statahead(struct inode *inode, void *key) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct ptlrpc_thread *thread; - - spin_lock(&lli->lli_lock); - if (lli->lli_opendir_pid == 0 || - unlikely(lli->lli_opendir_key != key)) { - spin_unlock(&lli->lli_lock); - return; - } - - lli->lli_opendir_key = NULL; - lli->lli_opendir_pid = 0; - - if (lli->lli_sai) { - struct l_wait_info lwi = { 0 }; - - thread = &lli->lli_sai->sai_thread; - if (!(thread->t_flags & SVC_STOPPED)) { - thread->t_flags = SVC_STOPPING; - spin_unlock(&lli->lli_lock); - cfs_waitq_signal(&thread->t_ctl_waitq); - - CDEBUG(D_READA, "stopping statahead thread, pid %d\n", - cfs_curproc_pid()); - l_wait_event(thread->t_ctl_waitq, - thread->t_flags & SVC_STOPPED, - &lwi); - } else { - spin_unlock(&lli->lli_lock); - } - - /* - * Put the ref which was held when first statahead_enter. - * It maybe not the last ref for some statahead requests - * maybe inflight. - */ - ll_sai_put(lli->lli_sai); - return; - } - spin_unlock(&lli->lli_lock); -} - -enum { - LS_NONE_FIRST_DE = 0, /* not first dirent, or is "." */ - LS_FIRST_DE, /* the first non-hidden dirent */ - LS_FIRST_DOT_DE /* the first hidden dirent, that is ".xxx" */ -}; - -static int is_first_dirent(struct inode *dir, struct dentry *dentry) -{ - struct qstr *d_name = &dentry->d_name; - unsigned long npages, index = 0; - struct page *page; - ext2_dirent *de; - char *kaddr, *limit; - int rc = LS_NONE_FIRST_DE, dot_de; - ENTRY; - - while (1) { - npages = dir_pages(dir); - /* reach the end of dir */ - if (index >= npages) { - CDEBUG(D_READA, "reach end, index/npages %lu/%lu\n", - index, npages); - break; - } - - page = ll_get_dir_page(dir, index); - if (IS_ERR(page)) { - rc = PTR_ERR(page); - CERROR("error reading dir %lu/%u page %lu: rc %d\n", - dir->i_ino, dir->i_generation, index, rc); - break; - } - - kaddr = page_address(page); - limit = kaddr + CFS_PAGE_SIZE - EXT2_DIR_REC_LEN(1); - de = (ext2_dirent *)kaddr; - if (!index) { - de = ext2_next_entry(de); /* skip "." */ - de = ext2_next_entry(de); /* skip ".." */ - } - - for (; (char*)de <= limit; de = ext2_next_entry(de)) { - if (!de->inode) - continue; - - if (de->name[0] == '.') - dot_de = 1; - else - dot_de = 0; - - if (dot_de && d_name->name[0] != '.') { - CDEBUG(D_READA, "%.*s skip hidden file %.*s\n", - d_name->len, d_name->name, - de->name_len, de->name); - continue; - } - - if (d_name->len == de->name_len && - !strncmp(d_name->name, de->name, d_name->len)) - rc = LS_FIRST_DE + dot_de; - else - rc = LS_NONE_FIRST_DE; - ext2_put_page(page); - RETURN(rc); - } - ext2_put_page(page); - index++; - } - RETURN(rc); -} - -/* Start statahead thread if this is the first dir entry. - * Otherwise if a thread is started already, wait it until it is ahead of me. - * Return value: - * 0 -- miss - * 1 -- hit - * -EEXIST -- stat ahead thread started, and this is the first dentry - * -EBADFD -- statahead thread exit and not dentry available - * others -- error - */ -int do_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup) -{ - struct ll_sb_info *sbi = ll_i2sbi(dir); - struct ll_inode_info *lli = ll_i2info(dir); - struct ll_statahead_info *sai = lli->lli_sai; - struct ll_sa_thread_args sta; - struct l_wait_info lwi = { 0 }; - int rc; - ENTRY; - - LASSERT(lli->lli_opendir_pid == cfs_curproc_pid()); - - if (sai) { - if (unlikely(sai->sai_thread.t_flags & SVC_STOPPED && - list_empty(&sai->sai_entries))) - RETURN(-EBADFD); - - if ((*dentryp)->d_name.name[0] == '.') { - if (likely(sai->sai_ls_all || - sai->sai_miss_hidden >= sai->sai_skip_hidden)) { - /* - * Hidden dentry is the first one, or statahead - * thread does not skip so many hidden dentries - * before "sai_ls_all" enabled as below. - */ - } else { - if (!sai->sai_ls_all) - /* - * It maybe because hidden dentry is not - * the first one, "sai_ls_all" was not - * set, then "ls -al" missed. Enable - * "sai_ls_all" for such case. - */ - sai->sai_ls_all = 1; - - /* - * Such "getattr" has been skipped before - * "sai_ls_all" enabled as above. - */ - sai->sai_miss_hidden++; - RETURN(-ENOENT); - } - } - - if (ll_sai_entry_stated(sai)) { - sbi->ll_sa_cached++; - } else { - sbi->ll_sa_blocked++; - /* thread started already, avoid double-stat */ - l_wait_event(sai->sai_waitq, - ll_sai_entry_stated(sai) || - sai->sai_thread.t_flags & SVC_STOPPED, - &lwi); - } - - if (lookup) { - struct dentry *result; - - result = d_lookup((*dentryp)->d_parent, - &(*dentryp)->d_name); - if (result) { - LASSERT(result != *dentryp); - dput(*dentryp); - *dentryp = result; - RETURN(1); - } - } - /* do nothing for revalidate */ - RETURN(0); - } - - /* I am the "lli_opendir_pid" owner, only me can set "lli_sai". */ - LASSERT(lli->lli_sai == NULL); - - rc = is_first_dirent(dir, *dentryp); - if (rc == LS_NONE_FIRST_DE) { - /* It is not "ls -{a}l" operation, no need statahead for it */ - spin_lock(&lli->lli_lock); - lli->lli_opendir_key = NULL; - lli->lli_opendir_pid = 0; - spin_unlock(&lli->lli_lock); - RETURN(-EBADF); - } - - sai = ll_sai_alloc(); - if (sai == NULL) - RETURN(-ENOMEM); - - sai->sai_inode = igrab(dir); - sai->sai_ls_all = (rc == LS_FIRST_DOT_DE); - - sta.sta_parent = (*dentryp)->d_parent; - sta.sta_pid = cfs_curproc_pid(); - - lli->lli_sai = sai; - rc = cfs_kernel_thread(ll_statahead_thread, &sta, 0); - if (rc < 0) { - CERROR("can't start ll_sa thread, rc: %d\n", rc); - sai->sai_thread.t_flags = SVC_STOPPED; - ll_sai_put(sai); - LASSERT(lli->lli_sai == NULL); - RETURN(rc); - } - - l_wait_event(sai->sai_thread.t_ctl_waitq, - sai->sai_thread.t_flags & (SVC_RUNNING | SVC_STOPPED), - &lwi); - - /* - * We don't stat-ahead for the first dirent since we are already in - * lookup, and -EEXIST also indicates that this is the first dirent. - */ - RETURN(-EEXIST); -} - -/* update hit/miss count */ -void ll_statahead_exit(struct dentry *dentry, int result) -{ - struct dentry *parent = dentry->d_parent; - struct ll_inode_info *lli = ll_i2info(parent->d_inode); - struct ll_sb_info *sbi = ll_i2sbi(parent->d_inode); - - if (lli->lli_opendir_pid != cfs_curproc_pid()) - return; - - if (lli->lli_sai) { - struct ll_statahead_info *sai = lli->lli_sai; - - if (result == 1) { - sbi->ll_sa_hit++; - sai->sai_hit++; - sai->sai_consecutive_miss = 0; - sai->sai_max = min(2 * sai->sai_max, sbi->ll_sa_max); - } else { - sbi->ll_sa_miss++; - sai->sai_miss++; - sai->sai_consecutive_miss++; - if (sa_low_hit(sai)) { - sbi->ll_sa_wrong++; - CDEBUG(D_READA, "statahead for dir %.*s hit " - "ratio too low: hit/miss %u/%u, " - "sent/replied %u/%u. stopping statahead " - "thread: pid %d\n", - parent->d_name.len, parent->d_name.name, - sai->sai_hit, sai->sai_miss, - sai->sai_sent, sai->sai_replied, - cfs_curproc_pid()); - spin_lock(&lli->lli_lock); - if (!(sai->sai_thread.t_flags & SVC_STOPPED)) - sai->sai_thread.t_flags = SVC_STOPPING; - spin_unlock(&lli->lli_lock); - } - } - cfs_waitq_signal(&sai->sai_thread.t_ctl_waitq); - ll_sai_entry_put(sai); - } -} diff --git a/lustre/llite/super.c b/lustre/llite/super.c deleted file mode 100644 index 3bb93581c2..0000000000 --- a/lustre/llite/super.c +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Client Super operations - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <linux/module.h> -#include <linux/types.h> -#include <linux/random.h> -#include <linux/version.h> -#include <lustre_lite.h> -#include <lustre_ha.h> -#include <lustre_dlm.h> -#include <linux/init.h> -#include <linux/fs.h> -#include <linux/random.h> -#include <linux/cache_def.h> -#include <lprocfs_status.h> -#include "llite_internal.h" -#include <lustre/lustre_user.h> - -extern struct address_space_operations ll_aops; -extern struct address_space_operations ll_dir_aops; - - -/* exported operations */ -struct super_operations lustre_super_operations = -{ - .read_inode2 = ll_read_inode2, - .clear_inode = ll_clear_inode, - .put_super = ll_put_super, - .statfs = ll_statfs, - .umount_begin = ll_umount_begin, - .fh_to_dentry = ll_fh_to_dentry, - .dentry_to_fh = ll_dentry_to_fh, - .remount_fs = ll_remount_fs, -}; - - -void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg *lcfg)); - -static int __init init_lustre_lite(void) -{ - int i, seed[2]; - struct timeval tv; - lnet_process_id_t lnet_id; - - printk(KERN_INFO "Lustre: Lustre Client File System; " - "info@clusterfs.com\n"); - ll_file_data_slab = cfs_mem_cache_create("ll_file_data", - sizeof(struct ll_file_data), 0, - SLAB_HWCACHE_ALIGN); - if (ll_file_data_slab == NULL) - return -ENOMEM; - - if (proc_lustre_root) - proc_lustre_fs_root = proc_mkdir("llite", proc_lustre_root); - - ll_register_cache(&ll_cache_definition); - - lustre_register_client_fill_super(ll_fill_super); - lustre_register_client_process_config(ll_process_config); - - get_random_bytes(seed, sizeof(seed)); - - /* Nodes with small feet have little entropy - * the NID for this node gives the most entropy in the low bits */ - for (i = 0; ; i++) { - if (LNetGetId(i, &lnet_id) == -ENOENT) { - break; - } - if (LNET_NETTYP(LNET_NIDNET(lnet_id.nid)) != LOLND) { - seed[0] ^= LNET_NIDADDR(lnet_id.nid); - } - } - - do_gettimeofday(&tv); - ll_srand(tv.tv_sec ^ seed[0], tv.tv_usec ^ seed[1]); - - return 0; -} - -static void __exit exit_lustre_lite(void) -{ - int rc; - - lustre_register_client_fill_super(NULL); - lustre_register_client_process_config(NULL); - - ll_unregister_cache(&ll_cache_definition); - - rc = cfs_mem_cache_destroy(ll_file_data_slab); - LASSERTF(rc == 0, "couldn't destroy ll_file_data slab\n"); - if (ll_async_page_slab) { - rc = cfs_mem_cache_destroy(ll_async_page_slab); - LASSERTF(rc == 0, "couldn't destroy ll_async_page slab\n"); - } - - if (proc_lustre_fs_root) - lprocfs_remove(&proc_lustre_fs_root); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre Lite Client File System"); -MODULE_LICENSE("GPL"); - -module_init(init_lustre_lite); -module_exit(exit_lustre_lite); diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c deleted file mode 100644 index d7fc8356f3..0000000000 --- a/lustre/llite/super25.c +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre Light Super operations - * - * Copyright (c) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <linux/module.h> -#include <linux/types.h> -#include <linux/random.h> -#include <linux/version.h> -#include <lustre_lite.h> -#include <lustre_ha.h> -#include <lustre_dlm.h> -#include <linux/init.h> -#include <linux/fs.h> -#include <lprocfs_status.h> -#include "llite_internal.h" - -static cfs_mem_cache_t *ll_inode_cachep; - -static struct inode *ll_alloc_inode(struct super_block *sb) -{ - struct ll_inode_info *lli; - ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_ALLOC_INODE, 1); - OBD_SLAB_ALLOC_PTR(lli, ll_inode_cachep); - if (lli == NULL) - return NULL; - - inode_init_once(&lli->lli_vfs_inode); - ll_lli_init(lli); - - return &lli->lli_vfs_inode; -} - -static void ll_destroy_inode(struct inode *inode) -{ - struct ll_inode_info *ptr = ll_i2info(inode); - OBD_SLAB_FREE_PTR(ptr, ll_inode_cachep); -} - -int ll_init_inodecache(void) -{ - ll_inode_cachep = cfs_mem_cache_create("lustre_inode_cache", - sizeof(struct ll_inode_info), - 0, SLAB_HWCACHE_ALIGN); - if (ll_inode_cachep == NULL) - return -ENOMEM; - return 0; -} - -void ll_destroy_inodecache(void) -{ - int rc; - - rc = cfs_mem_cache_destroy(ll_inode_cachep); - LASSERTF(rc == 0, "ll_inode_cache: not all structures were freed\n"); -} - -/* exported operations */ -struct super_operations lustre_super_operations = -{ - .alloc_inode = ll_alloc_inode, - .destroy_inode = ll_destroy_inode, - .clear_inode = ll_clear_inode, - .put_super = ll_put_super, - .statfs = ll_statfs, - .umount_begin = ll_umount_begin, - .remount_fs = ll_remount_fs, -}; - - -void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg *lcfg)); - -static int __init init_lustre_lite(void) -{ - int i, rc, seed[2]; - struct timeval tv; - lnet_process_id_t lnet_id; - - printk(KERN_INFO "Lustre: Lustre Client File System; " - "info@clusterfs.com\n"); - rc = ll_init_inodecache(); - if (rc) - return -ENOMEM; - ll_file_data_slab = cfs_mem_cache_create("ll_file_data", - sizeof(struct ll_file_data), 0, - SLAB_HWCACHE_ALIGN); - if (ll_file_data_slab == NULL) { - ll_destroy_inodecache(); - return -ENOMEM; - } - - proc_lustre_fs_root = proc_lustre_root ? - proc_mkdir("llite", proc_lustre_root) : NULL; - - ll_register_cache(&ll_cache_definition); - - lustre_register_client_fill_super(ll_fill_super); - lustre_register_kill_super_cb(ll_kill_super); - - lustre_register_client_process_config(ll_process_config); - - ll_get_random_bytes(seed, sizeof(seed)); - - /* Nodes with small feet have little entropy - * the NID for this node gives the most entropy in the low bits */ - for (i=0; ; i++) { - if (LNetGetId(i, &lnet_id) == -ENOENT) { - break; - } - if (LNET_NETTYP(LNET_NIDNET(lnet_id.nid)) != LOLND) { - seed[0] ^= LNET_NIDADDR(lnet_id.nid); - } - } - - do_gettimeofday(&tv); - ll_srand(tv.tv_sec ^ seed[0], tv.tv_usec ^ seed[1]); - - return rc; -} - -static void __exit exit_lustre_lite(void) -{ - int rc; - - lustre_register_client_fill_super(NULL); - lustre_register_kill_super_cb(NULL); - - lustre_register_client_process_config(NULL); - - ll_unregister_cache(&ll_cache_definition); - - ll_destroy_inodecache(); - rc = cfs_mem_cache_destroy(ll_file_data_slab); - LASSERTF(rc == 0, "couldn't destroy ll_file_data slab\n"); - - if (ll_async_page_slab) { - rc = cfs_mem_cache_destroy(ll_async_page_slab); - LASSERTF(rc == 0, "couldn't destroy ll_async_page slab\n"); - } - - if (proc_lustre_fs_root) - lprocfs_remove(&proc_lustre_fs_root); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre Lite Client File System"); -MODULE_LICENSE("GPL"); - -module_init(init_lustre_lite); -module_exit(exit_lustre_lite); diff --git a/lustre/llite/symlink.c b/lustre/llite/symlink.c deleted file mode 100644 index 21de06bd07..0000000000 --- a/lustre/llite/symlink.c +++ /dev/null @@ -1,219 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2002 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <linux/fs.h> -#include <linux/mm.h> -#include <linux/stat.h> -#include <linux/smp_lock.h> -#include <linux/version.h> -#define DEBUG_SUBSYSTEM S_LLITE - -#include <lustre_lite.h> -#include "llite_internal.h" - -static int ll_readlink_internal(struct inode *inode, - struct ptlrpc_request **request, char **symname) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ll_fid fid; - struct mds_body *body; - int rc, symlen = i_size_read(inode) + 1; - ENTRY; - - *request = NULL; - - if (lli->lli_symlink_name) { - *symname = lli->lli_symlink_name; - CDEBUG(D_INODE, "using cached symlink %s\n", *symname); - RETURN(0); - } - - ll_inode2fid(&fid, inode); - rc = mdc_getattr(sbi->ll_mdc_exp, &fid, - OBD_MD_LINKNAME, symlen, request); - if (rc) { - if (rc != -ENOENT) - CERROR("inode %lu: rc = %d\n", inode->i_ino, rc); - GOTO (failed, rc); - } - - body = lustre_msg_buf((*request)->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); - LASSERT(lustre_rep_swabbed(*request, REPLY_REC_OFF)); - - if ((body->valid & OBD_MD_LINKNAME) == 0) { - CERROR("OBD_MD_LINKNAME not set on reply\n"); - GOTO(failed, rc = -EPROTO); - } - - LASSERT(symlen != 0); - if (body->eadatasize != symlen) { - CERROR("inode %lu: symlink length %d not expected %d\n", - inode->i_ino, body->eadatasize - 1, symlen - 1); - GOTO(failed, rc = -EPROTO); - } - - *symname = lustre_msg_buf((*request)->rq_repmsg, REPLY_REC_OFF + 1, - symlen); - if (*symname == NULL || - strnlen (*symname, symlen) != symlen - 1) { - /* not full/NULL terminated */ - CERROR("inode %lu: symlink not NULL terminated string" - "of length %d\n", inode->i_ino, symlen - 1); - GOTO(failed, rc = -EPROTO); - } - - OBD_ALLOC(lli->lli_symlink_name, symlen); - /* do not return an error if we cannot cache the symlink locally */ - if (lli->lli_symlink_name) { - memcpy(lli->lli_symlink_name, *symname, symlen); - ptlrpc_req_finished (*request); - *request = NULL; - *symname = lli->lli_symlink_name; - } - - RETURN(0); - - failed: - ptlrpc_req_finished (*request); - RETURN (rc); -} - -static int ll_readlink(struct dentry *dentry, char *buffer, int buflen) -{ - struct inode *inode = dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); - struct ptlrpc_request *request; - char *symname; - int rc; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op\n"); - /* on symlinks lli_open_sem protects lli_symlink_name allocation/data */ - down(&lli->lli_size_sem); - rc = ll_readlink_internal(inode, &request, &symname); - if (rc) - GOTO(out, rc); - - rc = vfs_readlink(dentry, buffer, buflen, symname); - ptlrpc_req_finished(request); - out: - up(&lli->lli_size_sem); - RETURN(rc); -} - -#ifdef HAVE_COOKIE_FOLLOW_LINK -# define LL_FOLLOW_LINK_RETURN_TYPE void * -#else -# define LL_FOLLOW_LINK_RETURN_TYPE int -#endif - -static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, struct nameidata *nd) -{ - struct inode *inode = dentry->d_inode; - struct ll_inode_info *lli = ll_i2info(inode); -#ifdef HAVE_VFS_INTENT_PATCHES - struct lookup_intent *it = ll_nd2it(nd); -#endif - struct ptlrpc_request *request; - int rc; - char *symname; - ENTRY; - -#ifdef HAVE_VFS_INTENT_PATCHES - if (it != NULL) { - int op = it->it_op; - int mode = it->it_create_mode; - - ll_intent_release(it); - it->it_op = op; - it->it_create_mode = mode; - } -#endif - - CDEBUG(D_VFSTRACE, "VFS Op\n"); - down(&lli->lli_size_sem); - rc = ll_readlink_internal(inode, &request, &symname); - up(&lli->lli_size_sem); - if (rc) { - path_release(nd); /* Kernel assumes that ->follow_link() - releases nameidata on error */ - GOTO(out, rc); - } - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)) - rc = vfs_follow_link(nd, symname); -#else -# ifdef HAVE_COOKIE_FOLLOW_LINK - nd_set_link(nd, symname); - /* @symname may contain a pointer to the request message buffer, - we delay request releasing until ll_put_link then. */ - RETURN(request); -# else - if (request != NULL) { - /* falling back to recursive follow link if the request - * needs to be cleaned up still. */ - rc = vfs_follow_link(nd, symname); - GOTO(out, rc); - } - nd_set_link(nd, symname); - RETURN(0); -# endif -#endif -out: - ptlrpc_req_finished(request); -#ifdef HAVE_COOKIE_FOLLOW_LINK - RETURN(ERR_PTR(rc)); -#else - RETURN(rc); -#endif -} - -#ifdef HAVE_COOKIE_FOLLOW_LINK -static void ll_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) -{ - ptlrpc_req_finished(cookie); -} -#endif - -struct inode_operations ll_fast_symlink_inode_operations = { - .readlink = ll_readlink, - .setattr = ll_setattr, -#ifdef HAVE_VFS_INTENT_PATCHES - .setattr_raw = ll_setattr_raw, -#endif - .follow_link = ll_follow_link, -#ifdef HAVE_COOKIE_FOLLOW_LINK - .put_link = ll_put_link, -#endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - .revalidate_it = ll_inode_revalidate_it, -#else - .getattr = ll_getattr, -#endif - .permission = ll_inode_permission, - .setxattr = ll_setxattr, - .getxattr = ll_getxattr, - .listxattr = ll_listxattr, - .removexattr = ll_removexattr, -}; diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c deleted file mode 100644 index 2565fed619..0000000000 --- a/lustre/llite/xattr.c +++ /dev/null @@ -1,411 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2004 - 2005 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <linux/fs.h> -#include <linux/sched.h> -#include <linux/mm.h> -#include <linux/smp_lock.h> - -#define DEBUG_SUBSYSTEM S_LLITE - -#include <obd_support.h> -#include <lustre_lite.h> -#include <lustre_dlm.h> -#include <linux/lustre_version.h> - -#ifndef POSIX_ACL_XATTR_ACCESS -#ifndef XATTR_NAME_ACL_ACCESS -#define XATTR_NAME_ACL_ACCESS "system.posix_acl_access" -#endif -#define POSIX_ACL_XATTR_ACCESS XATTR_NAME_ACL_ACCESS -#endif -#ifndef POSIX_ACL_XATTR_DEFAULT -#ifndef XATTR_NAME_ACL_DEFAULT -#define XATTR_NAME_ACL_DEFAULT "system.posix_acl_default" -#endif -#define POSIX_ACL_XATTR_DEFAULT XATTR_NAME_ACL_DEFAULT -#endif - -#include "llite_internal.h" - -#define XATTR_USER_PREFIX "user." -#define XATTR_TRUSTED_PREFIX "trusted." -#define XATTR_SECURITY_PREFIX "security." -#define XATTR_LUSTRE_PREFIX "lustre." - -#define XATTR_USER_T (1) -#define XATTR_TRUSTED_T (2) -#define XATTR_SECURITY_T (3) -#define XATTR_ACL_ACCESS_T (4) -#define XATTR_ACL_DEFAULT_T (5) -#define XATTR_LUSTRE_T (6) -#define XATTR_OTHER_T (7) - -static -int get_xattr_type(const char *name) -{ - if (!strcmp(name, POSIX_ACL_XATTR_ACCESS)) - return XATTR_ACL_ACCESS_T; - - if (!strcmp(name, POSIX_ACL_XATTR_DEFAULT)) - return XATTR_ACL_DEFAULT_T; - - if (!strncmp(name, XATTR_USER_PREFIX, - sizeof(XATTR_USER_PREFIX) - 1)) - return XATTR_USER_T; - - if (!strncmp(name, XATTR_TRUSTED_PREFIX, - sizeof(XATTR_TRUSTED_PREFIX) - 1)) - return XATTR_TRUSTED_T; - - if (!strncmp(name, XATTR_SECURITY_PREFIX, - sizeof(XATTR_SECURITY_PREFIX) - 1)) - return XATTR_SECURITY_T; - - if (!strncmp(name, XATTR_LUSTRE_PREFIX, - sizeof(XATTR_LUSTRE_PREFIX) - 1)) - return XATTR_LUSTRE_T; - - return XATTR_OTHER_T; -} - -static -int xattr_type_filter(struct ll_sb_info *sbi, int xattr_type) -{ - if ((xattr_type == XATTR_ACL_ACCESS_T || - xattr_type == XATTR_ACL_DEFAULT_T) && - !(sbi->ll_flags & LL_SBI_ACL)) - return -EOPNOTSUPP; - - if (xattr_type == XATTR_USER_T && !(sbi->ll_flags & LL_SBI_USER_XATTR)) - return -EOPNOTSUPP; - if (xattr_type == XATTR_TRUSTED_T && !capable(CAP_SYS_ADMIN)) - return -EPERM; - if (xattr_type == XATTR_OTHER_T) - return -EOPNOTSUPP; - - return 0; -} - -static -int ll_setxattr_common(struct inode *inode, const char *name, - const void *value, size_t size, - int flags, __u64 valid) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ptlrpc_request *req; - struct ll_fid fid; - int xattr_type, rc; - ENTRY; - - - xattr_type = get_xattr_type(name); - rc = xattr_type_filter(sbi, xattr_type); - if (rc) - RETURN(rc); - - /* b10667: ignore lustre special xattr for now */ - if ((xattr_type == XATTR_TRUSTED_T && strcmp(name, "trusted.lov") == 0) || - (xattr_type == XATTR_LUSTRE_T && strcmp(name, "lustre.lov") == 0)) - RETURN(0); - - ll_inode2fid(&fid, inode); - rc = mdc_setxattr(sbi->ll_mdc_exp, &fid, valid, - name, value, size, 0, flags, &req); - if (rc) { - if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { - LCONSOLE_INFO("Disabling user_xattr feature because " - "it is not supported on the server\n"); - sbi->ll_flags &= ~LL_SBI_USER_XATTR; - } - RETURN(rc); - } - - ptlrpc_req_finished(req); - RETURN(0); -} - -int ll_setxattr(struct dentry *dentry, const char *name, - const void *value, size_t size, int flags) -{ - struct inode *inode = dentry->d_inode; - - LASSERT(inode); - LASSERT(name); - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", - inode->i_ino, inode->i_generation, inode, name); - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETXATTR, 1); - - if ((strncmp(name, XATTR_TRUSTED_PREFIX, - sizeof(XATTR_TRUSTED_PREFIX) - 1) == 0 && - strcmp(name + sizeof(XATTR_TRUSTED_PREFIX) - 1, "lov") == 0) || - (strncmp(name, XATTR_LUSTRE_PREFIX, - sizeof(XATTR_LUSTRE_PREFIX) - 1) == 0 && - strcmp(name + sizeof(XATTR_LUSTRE_PREFIX) - 1, "lov") == 0)) { - struct lov_user_md *lump = (struct lov_user_md *)value; - int rc = 0; - - if (S_ISREG(inode->i_mode)) { - struct file f; - int flags = FMODE_WRITE; - - f.f_dentry = dentry; - rc = ll_lov_setstripe_ea_info(inode, &f, flags, - lump, sizeof(*lump)); - /* b10667: rc always be 0 here for now */ - rc = 0; - } else if (S_ISDIR(inode->i_mode)) { - rc = ll_dir_setstripe(inode, lump, 0); - } - - return rc; - } - - return ll_setxattr_common(inode, name, value, size, flags, - OBD_MD_FLXATTR); -} - -int ll_removexattr(struct dentry *dentry, const char *name) -{ - struct inode *inode = dentry->d_inode; - - LASSERT(inode); - LASSERT(name); - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", - inode->i_ino, inode->i_generation, inode, name); - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REMOVEXATTR, 1); - return ll_setxattr_common(inode, name, NULL, 0, 0, - OBD_MD_FLXATTRRM); -} - -static -int ll_getxattr_common(struct inode *inode, const char *name, - void *buffer, size_t size, __u64 valid) -{ - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ptlrpc_request *req = NULL; - struct mds_body *body; - struct ll_fid fid; - void *xdata; - int xattr_type, rc; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", - inode->i_ino, inode->i_generation, inode); - - - /* listxattr have slightly different behavior from of ext3: - * without 'user_xattr' ext3 will list all xattr names but - * filtered out "^user..*"; we list them all for simplicity. - */ - if (!name) { - xattr_type = XATTR_OTHER_T; - goto do_getxattr; - } - - xattr_type = get_xattr_type(name); - rc = xattr_type_filter(sbi, xattr_type); - if (rc) - RETURN(rc); - - /* posix acl is under protection of LOOKUP lock. when calling to this, - * we just have path resolution to the target inode, so we have great - * chance that cached ACL is uptodate. - */ -#ifdef CONFIG_FS_POSIX_ACL - if (xattr_type == XATTR_ACL_ACCESS_T) { - struct ll_inode_info *lli = ll_i2info(inode); - struct posix_acl *acl; - - spin_lock(&lli->lli_lock); - acl = posix_acl_dup(lli->lli_posix_acl); - spin_unlock(&lli->lli_lock); - - if (!acl) - RETURN(-ENODATA); - - rc = posix_acl_to_xattr(acl, buffer, size); - posix_acl_release(acl); - RETURN(rc); - } - if (xattr_type == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode)) - RETURN(-ENODATA); -#endif - -do_getxattr: - ll_inode2fid(&fid, inode); - rc = mdc_getxattr(sbi->ll_mdc_exp, &fid, valid, name, NULL, 0, size, - &req); - if (rc) { - if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { - LCONSOLE_INFO("Disabling user_xattr feature because " - "it is not supported on the server\n"); - sbi->ll_flags &= ~LL_SBI_USER_XATTR; - } - RETURN(rc); - } - - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*body)); - LASSERT(body); - LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF)); - - /* only detect the xattr size */ - if (size == 0) - GOTO(out, rc = body->eadatasize); - - if (size < body->eadatasize) { - CERROR("server bug: replied size %u > %u\n", - body->eadatasize, (int)size); - GOTO(out, rc = -ERANGE); - } - - if (lustre_msg_bufcount(req->rq_repmsg) < 3) { - CERROR("reply bufcount %u\n", - lustre_msg_bufcount(req->rq_repmsg)); - GOTO(out, rc = -EFAULT); - } - - /* do not need swab xattr data */ - lustre_set_rep_swabbed(req, REPLY_REC_OFF + 1); - xdata = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, - body->eadatasize); - if (!xdata) { - CERROR("can't extract: %u : %u\n", body->eadatasize, - lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 1)); - GOTO(out, rc = -EFAULT); - } - - LASSERT(buffer); - memcpy(buffer, xdata, body->eadatasize); - rc = body->eadatasize; -out: - ptlrpc_req_finished(req); - RETURN(rc); -} - -ssize_t ll_getxattr(struct dentry *dentry, const char *name, - void *buffer, size_t size) -{ - struct inode *inode = dentry->d_inode; - - LASSERT(inode); - LASSERT(name); - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", - inode->i_ino, inode->i_generation, inode, name); - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR, 1); - - if ((strncmp(name, XATTR_TRUSTED_PREFIX, - sizeof(XATTR_TRUSTED_PREFIX) - 1) == 0 && - strcmp(name + sizeof(XATTR_TRUSTED_PREFIX) - 1, "lov") == 0) || - (strncmp(name, XATTR_LUSTRE_PREFIX, - sizeof(XATTR_LUSTRE_PREFIX) - 1) == 0 && - strcmp(name + sizeof(XATTR_LUSTRE_PREFIX) - 1, "lov") == 0)) { - struct lov_user_md *lump; - struct lov_mds_md *lmm = NULL; - struct ptlrpc_request *request = NULL; - int rc = 0, lmmsize; - - if (S_ISREG(inode->i_mode)) { - rc = ll_lov_getstripe_ea_info(dentry->d_parent->d_inode, - dentry->d_name.name, &lmm, - &lmmsize, &request); - } else if (S_ISDIR(inode->i_mode)) { - rc = ll_dir_getstripe(inode, &lmm, &lmmsize, &request); - } - - if (rc < 0) - GOTO(out, rc); - if (size == 0) - GOTO(out, rc = lmmsize); - - if (size < lmmsize) { - CERROR("server bug: replied size %u > %u\n", - lmmsize, (int)size); - GOTO(out, rc = -ERANGE); - } - - lump = (struct lov_user_md *)buffer; - memcpy(lump, lmm, lmmsize); - - rc = lmmsize; -out: - ptlrpc_req_finished(request); - return(rc); - } - - return ll_getxattr_common(inode, name, buffer, size, OBD_MD_FLXATTR); -} - -ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) -{ - struct inode *inode = dentry->d_inode; - int rc = 0, rc2 = 0; - struct lov_mds_md *lmm = NULL; - struct ptlrpc_request *request = NULL; - int lmmsize; - - LASSERT(inode); - - CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", - inode->i_ino, inode->i_generation, inode); - - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR, 1); - - rc = ll_getxattr_common(inode, NULL, buffer, size, OBD_MD_FLXATTRLS); - - if (S_ISREG(inode->i_mode)) { - struct ll_inode_info *lli = ll_i2info(inode); - struct lov_stripe_md *lsm = NULL; - lsm = lli->lli_smd; - if (lsm == NULL) - rc2 = -1; - } else if (S_ISDIR(inode->i_mode)) { - rc2 = ll_dir_getstripe(inode, &lmm, &lmmsize, &request); - } - - if (rc2 < 0) { - GOTO(out, rc2 = 0); - } else { - const int prefix_len = sizeof(XATTR_LUSTRE_PREFIX) - 1; - const size_t name_len = sizeof("lov") - 1; - const size_t total_len = prefix_len + name_len + 1; - - if (buffer && (rc + total_len) <= size) { - buffer += rc; - memcpy(buffer,XATTR_LUSTRE_PREFIX, prefix_len); - memcpy(buffer+prefix_len, "lov", name_len); - buffer[prefix_len + name_len] = '\0'; - } - rc2 = total_len; - } -out: - ptlrpc_req_finished(request); - rc = rc + rc2; - - return rc; -} - diff --git a/lustre/lov/.cvsignore b/lustre/lov/.cvsignore deleted file mode 100644 index b4ba3ac1ed..0000000000 --- a/lustre/lov/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -.deps -Makefile -.*.cmd -autoMakefile.in -autoMakefile -*.ko -*.mod.c -.*.flags -.*.o.d -.tmp_versions -.depend diff --git a/lustre/lov/Info.plist b/lustre/lov/Info.plist deleted file mode 100644 index 006f79441b..0000000000 --- a/lustre/lov/Info.plist +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>lov</string> - <key>CFBundleIconFile</key> - <string></string> - <key>CFBundleIdentifier</key> - <string>com.clusterfs.lustre.lov</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundlePackageType</key> - <string>KEXT</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1.0.1</string> - <key>OSBundleCompatibleVersion</key> - <string>1.0.0</string> - <key>OSBundleLibraries</key> - <dict> - <key>com.apple.kpi.bsd</key> - <string>8.0.0b1</string> - <key>com.apple.kpi.libkern</key> - <string>8.0.0b1</string> - <key>com.apple.kpi.mach</key> - <string>8.0.0b1</string> - <key>com.clusterfs.lustre.libcfs</key> - <string>1.0.0</string> - <key>com.clusterfs.lustre.lvfs</key> - <string>1.0.0</string> - <key>com.clusterfs.lustre.obdclass</key> - <string>1.0.0</string> - <key>com.clusterfs.lustre.ptlrpc</key> - <string>1.0.0</string> - </dict> -</dict> -</plist> diff --git a/lustre/lov/Makefile.in b/lustre/lov/Makefile.in deleted file mode 100644 index f714192216..0000000000 --- a/lustre/lov/Makefile.in +++ /dev/null @@ -1,4 +0,0 @@ -MODULES := lov -lov-objs := lov_log.o lov_obd.o lov_pack.o lproc_lov.o lov_offset.o lov_merge.o lov_request.o lov_qos.o lov_ea.o - -@INCLUDE_RULES@ diff --git a/lustre/lov/autoMakefile.am b/lustre/lov/autoMakefile.am deleted file mode 100644 index 583a42512e..0000000000 --- a/lustre/lov/autoMakefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2002 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -if LIBLUSTRE -noinst_LIBRARIES = liblov.a -liblov_a_SOURCES = lov_log.c lov_obd.c lov_pack.c lov_request.c lov_offset.c lov_qos.c lov_merge.c lov_ea.c lov_internal.h -liblov_a_CPPFLAGS = $(LLCPPFLAGS) -liblov_a_CFLAGS = $(LLCFLAGS) -endif - -if MODULES -if LINUX -modulefs_DATA = lov$(KMODEXT) -endif - -if DARWIN -macos_PROGRAMS := lov - -lov_SOURCES := \ - lov_log.c \ - lov_obd.c \ - lov_pack.c \ - lov_request.c \ - lov_merge.c \ - lov_qos.c \ - lov_offset.c \ - lov_internal.h - -lov_CFLAGS := $(EXTRA_KCFLAGS) -lov_LDFLAGS := $(EXTRA_KLDFLAGS) -lov_LDADD := $(EXTRA_KLIBS) - -plist_DATA := Info.plist - -install_data_hook := fix-kext-ownership - -endif # DARWIN - -endif # MODULES - -install-data-hook: $(install_data_hook) - -DIST_SOURCES = $(lov-objs:.o=.c) lov_internal.h -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c deleted file mode 100755 index d5d60d6a91..0000000000 --- a/lustre/lov/lov_ea.c +++ /dev/null @@ -1,611 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2001-2005 Cluster File Systems, Inc. - * Author: Wang Di <wangdi@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LOV - -#ifdef __KERNEL__ -#include <asm/div64.h> -#include <libcfs/libcfs.h> -#else -#include <liblustre.h> -#endif - -#include <obd_class.h> -#include <obd_lov.h> -#include <lustre/lustre_idl.h> -#include <lustre_log.h> - -#include "lov_internal.h" - -struct lovea_unpack_args { - struct lov_stripe_md *lsm; - int cursor; -}; - -static int lsm_lmm_verify_common(struct lov_mds_md *lmm, int lmm_bytes, - int stripe_count) -{ - - if (stripe_count == 0 || stripe_count > LOV_V1_INSANE_STRIPE_COUNT) { - CERROR("bad stripe count %d\n", stripe_count); - lov_dump_lmm_v1(D_WARNING, lmm); - return -EINVAL; - } - - if (lmm->lmm_object_id == 0) { - CERROR("zero object id\n"); - lov_dump_lmm_v1(D_WARNING, lmm); - return -EINVAL; - } - - if (lmm->lmm_pattern != cpu_to_le32(LOV_PATTERN_RAID0)) { - CERROR("bad striping pattern\n"); - lov_dump_lmm_v1(D_WARNING, lmm); - return -EINVAL; - } - - if (lmm->lmm_stripe_size == 0 || - (stripe_count != -1 && - (__u64)le32_to_cpu(lmm->lmm_stripe_size)*stripe_count > - 0xffffffff)) { - CERROR("bad stripe size %u\n", - le32_to_cpu(lmm->lmm_stripe_size)); - lov_dump_lmm_v1(D_WARNING, lmm); - return -EINVAL; - } - return 0; -} - -struct lov_stripe_md *lsm_alloc_plain(int stripe_count, int *size) -{ - struct lov_stripe_md *lsm; - int i, oinfo_ptrs_size; - struct lov_oinfo *loi; - - LASSERT(stripe_count > 0); - - oinfo_ptrs_size = sizeof(struct lov_oinfo *) * stripe_count; - *size = sizeof(struct lov_stripe_md) + oinfo_ptrs_size; - - OBD_ALLOC(lsm, *size); - if (!lsm) - return NULL;; - - for (i = 0; i < stripe_count; i++) { - OBD_SLAB_ALLOC(loi, lov_oinfo_slab, CFS_ALLOC_IO, sizeof(*loi)); - if (loi == NULL) - goto err; - lsm->lsm_oinfo[i] = loi; - } - lsm->lsm_stripe_count = stripe_count; - return lsm; - -err: - while (--i >= 0) - OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab, sizeof(*loi)); - OBD_FREE(lsm, *size); - return NULL; -} - -void lsm_free_plain(struct lov_stripe_md *lsm) -{ - int stripe_count = lsm->lsm_stripe_count; - int i; - - for (i = 0; i < stripe_count; i++) - OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab, - sizeof(struct lov_oinfo)); - OBD_FREE(lsm, sizeof(struct lov_stripe_md) + - stripe_count * sizeof(struct lov_oinfo *)); -} - -static void lsm_unpackmd_common(struct lov_stripe_md *lsm, - struct lov_mds_md *lmm) -{ - lsm->lsm_object_id = le64_to_cpu(lmm->lmm_object_id); - lsm->lsm_object_gr = le64_to_cpu(lmm->lmm_object_gr); - lsm->lsm_stripe_size = le32_to_cpu(lmm->lmm_stripe_size); - lsm->lsm_pattern = le32_to_cpu(lmm->lmm_pattern); -} - -static void -lsm_stripe_by_index_plain(struct lov_stripe_md *lsm, int *stripeno, - obd_off *lov_off, unsigned long *swidth) -{ - if (swidth) - *swidth = (ulong)lsm->lsm_stripe_size * lsm->lsm_stripe_count; -} - -static void -lsm_stripe_by_offset_plain(struct lov_stripe_md *lsm, int *stripeno, - obd_off *lov_off, unsigned long *swidth) -{ - if (swidth) - *swidth = (ulong)lsm->lsm_stripe_size * lsm->lsm_stripe_count; -} - -static obd_off -lsm_stripe_offset_by_index_plain(struct lov_stripe_md *lsm, - int stripe_index) -{ - return 0; -} - -static obd_off -lsm_stripe_offset_by_offset_plain(struct lov_stripe_md *lsm, - obd_off lov_off) -{ - return 0; -} - -static int -lsm_stripe_index_by_offset_plain(struct lov_stripe_md *lsm, - obd_off lov_off) -{ - return 0; -} - -static int lsm_revalidate_plain(struct lov_stripe_md *lsm, - struct obd_device *obd) -{ - return 0; -} - -static int lsm_destroy_plain(struct lov_stripe_md *lsm, struct obdo *oa, - struct obd_export *md_exp) -{ - return 0; -} - -static int lsm_lmm_verify_plain(struct lov_mds_md *lmm, int lmm_bytes, - int *stripe_count) -{ - if (lmm_bytes < sizeof(*lmm)) { - CERROR("lov_mds_md too small: %d, need at least %d\n", - lmm_bytes, (int)sizeof(*lmm)); - return -EINVAL; - } - - *stripe_count = le32_to_cpu(lmm->lmm_stripe_count); - - if (lmm_bytes < lov_mds_md_v1_size(*stripe_count)) { - CERROR("LOV EA too small: %d, need %d\n", - lmm_bytes, lov_mds_md_v1_size(*stripe_count)); - lov_dump_lmm_v1(D_WARNING, lmm); - return -EINVAL; - } - - return lsm_lmm_verify_common(lmm, lmm_bytes, *stripe_count); -} - -int lsm_unpackmd_plain(struct lov_obd *lov, struct lov_stripe_md *lsm, - struct lov_mds_md_v1 *lmm) -{ - struct lov_oinfo *loi; - int i; - - lsm_unpackmd_common(lsm, lmm); - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - /* XXX LOV STACKING call down to osc_unpackmd() */ - loi = lsm->lsm_oinfo[i]; - loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id); - loi->loi_gr = le64_to_cpu(lmm->lmm_objects[i].l_object_gr); - loi->loi_ost_idx = le32_to_cpu(lmm->lmm_objects[i].l_ost_idx); - loi->loi_ost_gen = le32_to_cpu(lmm->lmm_objects[i].l_ost_gen); - if (loi->loi_ost_idx >= lov->desc.ld_tgt_count) { - CERROR("OST index %d more than OST count %d\n", - loi->loi_ost_idx, lov->desc.ld_tgt_count); - lov_dump_lmm_v1(D_WARNING, lmm); - return -EINVAL; - } - if (!lov->lov_tgts[loi->loi_ost_idx]) { - CERROR("OST index %d missing\n", loi->loi_ost_idx); - lov_dump_lmm_v1(D_WARNING, lmm); - return -EINVAL; - } - } - - return 0; -} - -struct lsm_operations lsm_plain_ops = { - .lsm_free = lsm_free_plain, - .lsm_destroy = lsm_destroy_plain, - .lsm_stripe_by_index = lsm_stripe_by_index_plain, - .lsm_stripe_by_offset = lsm_stripe_by_offset_plain, - .lsm_revalidate = lsm_revalidate_plain, - .lsm_stripe_offset_by_index = lsm_stripe_offset_by_index_plain, - .lsm_stripe_offset_by_offset = lsm_stripe_offset_by_offset_plain, - .lsm_stripe_index_by_offset = lsm_stripe_index_by_offset_plain, - .lsm_lmm_verify = lsm_lmm_verify_plain, - .lsm_unpackmd = lsm_unpackmd_plain, -}; - -struct lov_extent *lovea_off2le(struct lov_stripe_md *lsm, obd_off lov_off) -{ - struct lov_array_info *lai; - struct lov_extent *le; - int i = 0; - - LASSERT(lsm->lsm_array != NULL); - lai = lsm->lsm_array; - LASSERT(lai->lai_ext_count > 1); - - for (le = lai->lai_ext_array, i = 0; - i < lai->lai_ext_count && le->le_start + le->le_len <= lov_off - && le->le_len != -1; - i ++, le ++) { - ; /* empty loop */ - } - - CDEBUG(D_INFO, "off "LPU64" idx %d, ext "LPU64":"LPU64" idx %d sc %d\n", - lov_off, i, le->le_start, le->le_len, le->le_loi_idx, - le->le_stripe_count); - - RETURN(le); -} - -struct lov_extent *lovea_idx2le(struct lov_stripe_md *lsm, int stripe_no) -{ - struct lov_extent *le; - struct lov_array_info *lai; - int i, stripe_index; - - LASSERT(lsm->lsm_array != NULL); - LASSERT(stripe_no >= 0 && stripe_no <= lsm->lsm_stripe_count); - lai = lsm->lsm_array; - LASSERT(lai->lai_ext_count > 1); - - for (le = lai->lai_ext_array, i = 0, stripe_index = le->le_stripe_count; - i < lai->lai_ext_count && stripe_index <= stripe_no && - le->le_len != -1; i ++, le ++, - stripe_index += le->le_stripe_count) { - ; /* empty loop */ - } - - CDEBUG(D_INFO, "stripe %d idx %d, ext "LPU64":"LPU64" idx %d sc %d\n", - stripe_no, i, le->le_start, le->le_len, le->le_loi_idx, - le->le_stripe_count); - RETURN(le); -} - -static void lovea_free_array_info(struct lov_stripe_md *lsm) -{ - if (!lsm || !lsm->lsm_array) - return; - - if (lsm->lsm_array->lai_ext_array) - OBD_FREE(lsm->lsm_array->lai_ext_array, - lsm->lsm_array->lai_ext_count * - sizeof(struct lov_extent)); - - OBD_FREE_PTR(lsm->lsm_array); -} - -static void lsm_free_join(struct lov_stripe_md *lsm) -{ - lovea_free_array_info(lsm); - lsm_free_plain(lsm); -} - -static void -lsm_stripe_by_index_join(struct lov_stripe_md *lsm, int *stripeno, - obd_off *lov_off, unsigned long *swidth) -{ - struct lov_extent *le; - - LASSERT(stripeno != NULL); - - le = lovea_idx2le(lsm, *stripeno); - - LASSERT(le != NULL && le->le_stripe_count != 0); - - *stripeno -= le->le_loi_idx; - - if (swidth) - *swidth = (ulong)lsm->lsm_stripe_size * le->le_stripe_count; - - if (lov_off) { - struct lov_extent *lov_le = lovea_off2le(lsm, *lov_off); - if (lov_le == le) { - *lov_off = (*lov_off > le->le_start) ? - (*lov_off - le->le_start) : 0; - } else { - *lov_off = (*lov_off > le->le_start) ? - le->le_len : 0; - LASSERT(*lov_off != -1); - } - } -} - -static void -lsm_stripe_by_offset_join(struct lov_stripe_md *lsm, int *stripeno, - obd_off *lov_off, unsigned long *swidth) -{ - struct lov_extent *le; - - LASSERT(lov_off != NULL); - - le = lovea_off2le(lsm, *lov_off); - - LASSERT(le != NULL && le->le_stripe_count != 0); - - *lov_off = (*lov_off > le->le_start) ? (*lov_off - le->le_start) : 0; - - if (stripeno) - *stripeno -= le->le_loi_idx; - - if (swidth) - *swidth = (ulong)lsm->lsm_stripe_size * le->le_stripe_count; -} - -static obd_off -lsm_stripe_offset_by_index_join(struct lov_stripe_md *lsm, - int stripe_index) -{ - struct lov_extent *le; - - le = lovea_idx2le(lsm, stripe_index); - - return le ? le->le_start : 0; -} - -static obd_off -lsm_stripe_offset_by_offset_join(struct lov_stripe_md *lsm, - obd_off lov_off) -{ - struct lov_extent *le; - - le = lovea_off2le(lsm, lov_off); - - return le ? le->le_start : 0; -} - -static int -lsm_stripe_index_by_offset_join(struct lov_stripe_md *lsm, - obd_off lov_off) -{ - struct lov_extent *le = NULL; - - le = lovea_off2le(lsm, lov_off); - - return le ? le->le_loi_idx : 0; -} - -static int lovea_unpack_array(struct llog_handle *handle, - struct llog_rec_hdr *rec, void *data) -{ - struct lovea_unpack_args *args = (struct lovea_unpack_args *)data; - struct llog_array_rec *la_rec = (struct llog_array_rec*)rec; - struct mds_extent_desc *med = &la_rec->lmr_med; - struct lov_stripe_md *lsm = args->lsm; - int cursor = args->cursor++; - struct lov_mds_md *lmm; - struct lov_array_info *lai; - struct lov_oinfo * loi; - int i, loi_index; - ENTRY; - - /* sanity check */ - LASSERT(lsm->lsm_stripe_count != 0); - lmm = &med->med_lmm; - LASSERT(lsm->lsm_array != NULL); - - lai = lsm->lsm_array; - - if (cursor == 0) { - lai->lai_ext_array[cursor].le_loi_idx = 0; - } else { - int next_loi_index = lai->lai_ext_array[cursor - 1].le_loi_idx + - lai->lai_ext_array[cursor - 1].le_stripe_count; - lai->lai_ext_array[cursor].le_loi_idx = next_loi_index; - } - /* insert extent desc into lsm extent array */ - lai->lai_ext_array[cursor].le_start = le64_to_cpu(med->med_start); - lai->lai_ext_array[cursor].le_len = le64_to_cpu(med->med_len); - lai->lai_ext_array[cursor].le_stripe_count = lmm->lmm_stripe_count; - - /* unpack extent's lmm to lov_oinfo array */ - loi_index = lai->lai_ext_array[cursor].le_loi_idx; - CDEBUG(D_INFO, "lovea upackmd cursor %d, loi_index %d extent " - LPU64":"LPU64"\n", cursor, loi_index, med->med_start, - med->med_len); - - for (i = 0; i < le32_to_cpu(lmm->lmm_stripe_count); i ++, loi_index++) { - /* XXX LOV STACKING call down to osc_unpackmd() */ - loi = lsm->lsm_oinfo[loi_index]; - loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id); - loi->loi_gr = le64_to_cpu(lmm->lmm_objects[i].l_object_gr); - loi->loi_ost_idx = le32_to_cpu(lmm->lmm_objects[i].l_ost_idx); - loi->loi_ost_gen = le32_to_cpu(lmm->lmm_objects[i].l_ost_gen); - } - - RETURN(0); -} - -static int lsm_revalidate_join(struct lov_stripe_md *lsm, - struct obd_device *obd) -{ - struct llog_handle *llh; - struct llog_ctxt *ctxt; - struct lovea_unpack_args args; - int rc, rc2; - ENTRY; - - LASSERT(lsm->lsm_array != NULL); - - /*Revalidate lsm might be called from client or MDS server. - *So the ctxt might be in different position - */ - ctxt = llog_get_context(obd, LLOG_LOVEA_REPL_CTXT); - if (!ctxt) - ctxt = llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT); - - LASSERT(ctxt); - - if (lsm->lsm_array && lsm->lsm_array->lai_ext_array) - GOTO(release_ctxt, rc = 0); - - CDEBUG(D_INFO, "get lsm logid: "LPU64":"LPU64"\n", - lsm->lsm_array->lai_array_id.lgl_oid, - lsm->lsm_array->lai_array_id.lgl_ogr); - OBD_ALLOC(lsm->lsm_array->lai_ext_array,lsm->lsm_array->lai_ext_count * - sizeof (struct lov_extent)); - if (!lsm->lsm_array->lai_ext_array) - GOTO(release_ctxt, rc = -ENOMEM); - - CDEBUG(D_INFO, "get lsm logid: "LPU64":"LPU64"\n", - lsm->lsm_array->lai_array_id.lgl_oid, - lsm->lsm_array->lai_array_id.lgl_ogr); - - rc = llog_create(ctxt, &llh, &lsm->lsm_array->lai_array_id, NULL); - if (rc) - GOTO(out, rc); - - args.lsm = lsm; - args.cursor = 0; - rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL); - if (rc == 0) - rc = llog_process(llh, lovea_unpack_array, &args, NULL); - rc2 = llog_close(llh); - if (rc == 0) - rc = rc2; -out: - if (rc) - lovea_free_array_info(lsm); -release_ctxt: - llog_ctxt_put(ctxt); - RETURN(rc); -} - -int lsm_destroy_join(struct lov_stripe_md *lsm, struct obdo *oa, - struct obd_export *md_exp) -{ - struct llog_ctxt *ctxt; - struct llog_handle *llh; - int rc = 0; - ENTRY; - - LASSERT(md_exp != NULL); - /*for those orphan inode, we should keep array id*/ - if (!(oa->o_valid & OBD_MD_FLCOOKIE)) - RETURN(rc); - - ctxt = llog_get_context(md_exp->exp_obd, LLOG_LOVEA_REPL_CTXT); - if (!ctxt) - RETURN(-EINVAL); - - LASSERT(lsm->lsm_array != NULL); - rc = llog_create(ctxt, &llh, &lsm->lsm_array->lai_array_id, - NULL); - if (rc) - GOTO(out, rc); - - rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL); - if (rc == 0) { - rc = llog_destroy(llh); - } - llog_free_handle(llh); -out: - llog_ctxt_put(ctxt); - RETURN(rc); -} - -static int lsm_lmm_verify_join(struct lov_mds_md *lmm, int lmm_bytes, - int *stripe_count) -{ - struct lov_mds_md_join *lmmj = (struct lov_mds_md_join *)lmm; - - if (lmm_bytes < sizeof(*lmmj)) { - CERROR("lov_mds_md too small: %d, need at least %d\n", - lmm_bytes, (int)sizeof(*lmmj)); - return -EINVAL; - } - - if (lmmj->lmmj_array_id.lgl_oid == 0) { - CERROR("zero array object id\n"); - return -EINVAL; - } - - *stripe_count = le32_to_cpu(lmmj->lmmj_md.lmm_stripe_count); - - return lsm_lmm_verify_common(&lmmj->lmmj_md, lmm_bytes, *stripe_count); -} - -static int lovea_init_array_info(struct lov_stripe_md *lsm, - struct llog_logid *logid, - __u32 extent_count) -{ - struct lov_array_info *lai; - ENTRY; - - OBD_ALLOC_PTR(lai); - if (!lai) - RETURN(-ENOMEM); - - lai->lai_array_id = *logid; - lai->lai_ext_count = extent_count; - lsm->lsm_array = lai; - RETURN(0); -} - -static int lsm_unpackmd_join(struct lov_obd *lov, struct lov_stripe_md *lsm, - struct lov_mds_md *lmm) -{ - struct lov_mds_md_join *lmmj = (struct lov_mds_md_join*)lmm; - int rc; - ENTRY; - - lsm_unpackmd_common(lsm, &lmmj->lmmj_md); - - rc = lovea_init_array_info(lsm, &lmmj->lmmj_array_id, - lmmj->lmmj_extent_count); - if (rc) { - CERROR("Init joined lsm id"LPU64" arrary error %d", - lsm->lsm_object_id, rc); - GOTO(out, rc); - } -out: - RETURN(rc); -} - -struct lsm_operations lsm_join_ops = { - .lsm_free = lsm_free_join, - .lsm_destroy = lsm_destroy_join, - .lsm_stripe_by_index = lsm_stripe_by_index_join, - .lsm_stripe_by_offset = lsm_stripe_by_offset_join, - .lsm_revalidate = lsm_revalidate_join, - .lsm_stripe_offset_by_index = lsm_stripe_offset_by_index_join, - .lsm_stripe_offset_by_offset = lsm_stripe_offset_by_offset_join, - .lsm_stripe_index_by_offset = lsm_stripe_index_by_offset_join, - .lsm_lmm_verify = lsm_lmm_verify_join, - .lsm_unpackmd = lsm_unpackmd_join, -}; - - diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h deleted file mode 100644 index 164ff8d24f..0000000000 --- a/lustre/lov/lov_internal.h +++ /dev/null @@ -1,274 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2003 Cluster File Systems, Inc. - * - * This code is issued under the GNU General Public License. - * See the file COPYING in this distribution - */ - -#ifndef LOV_INTERNAL_H -#define LOV_INTERNAL_H - -#include <lustre/lustre_user.h> - -struct lov_lock_handles { - struct portals_handle llh_handle; - atomic_t llh_refcount; - int llh_stripe_count; - struct lustre_handle llh_handles[0]; -}; - -struct lov_request { - struct obd_info rq_oi; - struct lov_request_set *rq_rqset; - - struct list_head rq_link; - - int rq_idx; /* index in lov->tgts array */ - int rq_stripe; /* stripe number */ - int rq_complete; - int rq_rc; - int rq_buflen; /* length of sub_md */ - - obd_count rq_oabufs; - obd_count rq_pgaidx; -}; - -struct lov_request_set { - struct ldlm_enqueue_info*set_ei; - struct obd_info *set_oi; - atomic_t set_refcount; - struct obd_export *set_exp; - /* XXX: There is @set_exp already, however obd_statfs gets obd_device - only. */ - struct obd_device *set_obd; - int set_count; - int set_completes; - int set_success; - struct llog_cookie *set_cookies; - int set_cookie_sent; - struct obd_trans_info *set_oti; - obd_count set_oabufs; - struct brw_page *set_pga; - struct lov_lock_handles *set_lockh; - struct list_head set_list; -}; - -#define LOV_AP_MAGIC 8200 - -struct lov_async_page { - int lap_magic; - int lap_stripe; - obd_off lap_sub_offset; - obd_id lap_loi_id; - void *lap_sub_cookie; - struct obd_async_page_ops *lap_caller_ops; - void *lap_caller_data; -}; - -#define LAP_FROM_COOKIE(c) \ - (LASSERT(((struct lov_async_page *)(c))->lap_magic == LOV_AP_MAGIC), \ - (struct lov_async_page *)(c)) - -extern cfs_mem_cache_t *lov_oinfo_slab; - -static inline void lov_llh_addref(void *llhp) -{ - struct lov_lock_handles *llh = llhp; - atomic_inc(&llh->llh_refcount); - CDEBUG(D_INFO, "GETting llh %p : new refcount %d\n", llh, - atomic_read(&llh->llh_refcount)); -} - -static inline struct lov_lock_handles *lov_llh_new(struct lov_stripe_md *lsm) -{ - struct lov_lock_handles *llh; - - OBD_ALLOC(llh, sizeof *llh + - sizeof(*llh->llh_handles) * lsm->lsm_stripe_count); - if (llh == NULL) - return NULL; - atomic_set(&llh->llh_refcount, 2); - llh->llh_stripe_count = lsm->lsm_stripe_count; - CFS_INIT_LIST_HEAD(&llh->llh_handle.h_link); - class_handle_hash(&llh->llh_handle, lov_llh_addref); - return llh; -} - -static inline struct lov_lock_handles * -lov_handle2llh(struct lustre_handle *handle) -{ - LASSERT(handle != NULL); - return(class_handle2object(handle->cookie)); -} - -static inline void lov_llh_put(struct lov_lock_handles *llh) -{ - CDEBUG(D_INFO, "PUTting llh %p : new refcount %d\n", llh, - atomic_read(&llh->llh_refcount) - 1); - LASSERT(atomic_read(&llh->llh_refcount) > 0 && - atomic_read(&llh->llh_refcount) < 0x5a5a); - if (atomic_dec_and_test(&llh->llh_refcount)) { - class_handle_unhash(&llh->llh_handle); - /* The structure may be held by other threads because RCU. -jxiong */ - if (atomic_read(&llh->llh_refcount)) - return; - - OBD_FREE_RCU(llh, sizeof *llh + - sizeof(*llh->llh_handles) * llh->llh_stripe_count, &llh->llh_handle); - } -} - -#define lov_uuid2str(lv, index) \ - (char *)((lv)->lov_tgts[index]->ltd_uuid.uuid) - -/* lov_merge.c */ -void lov_merge_attrs(struct obdo *tgt, struct obdo *src, obd_flag valid, - struct lov_stripe_md *lsm, int stripeno, int *set); -int lov_merge_lvb(struct obd_export *exp, struct lov_stripe_md *lsm, - struct ost_lvb *lvb, int kms_only); -int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm, - obd_off size, int shrink); - -/* lov_offset.c */ -obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size, - int stripeno); -int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off, - int stripeno, obd_off *obd_off); -obd_off lov_size_to_stripe(struct lov_stripe_md *lsm, obd_off file_size, - int stripeno); -int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno, - obd_off start, obd_off end, - obd_off *obd_start, obd_off *obd_end); -int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off); - -/* lov_qos.c */ -#define LOV_USES_ASSIGNED_STRIPE 0 -#define LOV_USES_DEFAULT_STRIPE 1 -int qos_add_tgt(struct obd_device *obd, __u32 index); -int qos_del_tgt(struct obd_device *obd, __u32 index); -void qos_shrink_lsm(struct lov_request_set *set); -int qos_prep_create(struct obd_export *exp, struct lov_request_set *set); -void qos_update(struct lov_obd *lov); -int qos_remedy_create(struct lov_request_set *set, struct lov_request *req); - -/* lov_request.c */ -void lov_set_add_req(struct lov_request *req, struct lov_request_set *set); -void lov_update_set(struct lov_request_set *set, - struct lov_request *req, int rc); -int lov_update_common_set(struct lov_request_set *set, - struct lov_request *req, int rc); -int lov_prep_create_set(struct obd_export *exp, struct obd_info *oifo, - struct lov_stripe_md **ea, struct obdo *src_oa, - struct obd_trans_info *oti, - struct lov_request_set **reqset); -int lov_update_create_set(struct lov_request_set *set, - struct lov_request *req, int rc); -int lov_fini_create_set(struct lov_request_set *set, struct lov_stripe_md **ea); -int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo, - obd_count oa_bufs, struct brw_page *pga, - struct obd_trans_info *oti, - struct lov_request_set **reqset); -int lov_fini_brw_set(struct lov_request_set *set); -int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo, - struct lov_request_set **reqset); -int lov_fini_getattr_set(struct lov_request_set *set); -int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo, - struct obdo *src_oa, struct lov_stripe_md *lsm, - struct obd_trans_info *oti, - struct lov_request_set **reqset); -int lov_update_destroy_set(struct lov_request_set *set, - struct lov_request *req, int rc); -int lov_fini_destroy_set(struct lov_request_set *set); -int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct lov_request_set **reqset); -int lov_update_setattr_set(struct lov_request_set *set, - struct lov_request *req, int rc); -int lov_fini_setattr_set(struct lov_request_set *set); -int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct lov_request_set **reqset); -int lov_fini_punch_set(struct lov_request_set *set); -int lov_prep_sync_set(struct obd_export *exp, struct obd_info *obd_info, - struct obdo *src_oa, - struct lov_stripe_md *lsm, obd_off start, - obd_off end, struct lov_request_set **reqset); -int lov_fini_sync_set(struct lov_request_set *set); -int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo, - struct ldlm_enqueue_info *einfo, - struct lov_request_set **reqset); -int lov_fini_enqueue_set(struct lov_request_set *set, __u32 mode, int rc, - struct ptlrpc_request_set *rqset); -int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo, - struct lov_stripe_md *lsm, - ldlm_policy_data_t *policy, __u32 mode, - struct lustre_handle *lockh, - struct lov_request_set **reqset); -int lov_update_match_set(struct lov_request_set *set, struct lov_request *req, - int rc); -int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags); -int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo, - struct lov_stripe_md *lsm, - __u32 mode, struct lustre_handle *lockh, - struct lov_request_set **reqset); -int lov_fini_cancel_set(struct lov_request_set *set); -int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo, - struct lov_request_set **reqset); -void lov_update_statfs(struct obd_device *obd, struct obd_statfs *osfs, - struct obd_statfs *lov_sfs, int success); -int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs, - int success); -int lov_fini_statfs_set(struct lov_request_set *set); - -/* lov_obd.c */ -void lov_fix_desc(struct lov_desc *desc); -int lov_get_stripecnt(struct lov_obd *lov, __u32 stripe_count); -void lov_getref(struct obd_device *obd); -void lov_putref(struct obd_device *obd); - -/* lov_log.c */ -int lov_llog_init(struct obd_device *obd, struct obd_device *tgt, - int count, struct llog_catid *logid, struct obd_uuid *uuid); -int lov_llog_finish(struct obd_device *obd, int count); - -/* lov_pack.c */ -int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmm, - struct lov_stripe_md *lsm); -int lov_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp, - struct lov_mds_md *lmm, int lmm_bytes); -int lov_setstripe(struct obd_export *exp, - struct lov_stripe_md **lsmp, struct lov_user_md *lump); -int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp, - struct lov_user_md *lump); -int lov_getstripe(struct obd_export *exp, - struct lov_stripe_md *lsm, struct lov_user_md *lump); -int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count, - int pattern, int magic); -void lov_free_memmd(struct lov_stripe_md **lsmp); - -void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm); -void lov_dump_lmm_join(int level, struct lov_mds_md_join *lmmj); -/* lov_ea.c */ -int lov_unpackmd_join(struct lov_obd *lov, struct lov_stripe_md *lsm, - struct lov_mds_md *lmm); -struct lov_stripe_md *lsm_alloc_plain(int stripe_count, int *size); -void lsm_free_plain(struct lov_stripe_md *lsm); - -struct lov_extent *lovea_idx2le(struct lov_stripe_md *lsm, int stripe_no); -struct lov_extent *lovea_off2le(struct lov_stripe_md *lsm, obd_off lov_off); -int lovea_destroy_object(struct lov_obd *lov, struct lov_stripe_md *lsm, - struct obdo *oa, void *data); -/* lproc_lov.c */ -extern struct file_operations lov_proc_target_fops; -#ifdef LPROCFS -void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars); -#else -static inline void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars) -{ - memset(lvars, 0, sizeof(*lvars)); -} -#endif - -#endif diff --git a/lustre/lov/lov_log.c b/lustre/lov/lov_log.c deleted file mode 100644 index 6e59ecfd23..0000000000 --- a/lustre/lov/lov_log.c +++ /dev/null @@ -1,243 +0,0 @@ - /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * Author: Phil Schwan <phil@clusterfs.com> - * Peter Braam <braam@clusterfs.com> - * Mike Shaver <shaver@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LOV -#ifdef __KERNEL__ -#include <libcfs/libcfs.h> -#else -#include <liblustre.h> -#endif - -#include <obd_support.h> -#include <lustre_lib.h> -#include <lustre_net.h> -#include <lustre/lustre_idl.h> -#include <lustre_dlm.h> -#include <lustre_mds.h> -#include <obd_class.h> -#include <obd_lov.h> -#include <obd_ost.h> -#include <lprocfs_status.h> - -#include "lov_internal.h" - -/* Add log records for each OSC that this object is striped over, and return - * cookies for each one. We _would_ have nice abstraction here, except that - * we need to keep cookies in stripe order, even if some are NULL, so that - * the right cookies are passed back to the right OSTs at the client side. - * Unset cookies should be all-zero (which will never occur naturally). */ -static int lov_llog_origin_add(struct llog_ctxt *ctxt, - struct llog_rec_hdr *rec, struct lov_stripe_md *lsm, - struct llog_cookie *logcookies, int numcookies) -{ - struct obd_device *obd = ctxt->loc_obd; - struct lov_obd *lov = &obd->u.lov; - int i, rc = 0; - ENTRY; - - LASSERTF(logcookies && numcookies >= lsm->lsm_stripe_count, - "logcookies %p, numcookies %d lsm->lsm_stripe_count %d \n", - logcookies, numcookies, lsm->lsm_stripe_count); - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - struct lov_oinfo *loi = lsm->lsm_oinfo[i]; - struct obd_device *child = - lov->lov_tgts[loi->loi_ost_idx]->ltd_exp->exp_obd; - struct llog_ctxt *cctxt = llog_get_context(child, ctxt->loc_idx); - - /* fill mds unlink/setattr log record */ - switch (rec->lrh_type) { - case MDS_UNLINK_REC: { - struct llog_unlink_rec *lur = (struct llog_unlink_rec *)rec; - lur->lur_oid = loi->loi_id; - lur->lur_ogen = loi->loi_gr; - break; - } - case MDS_SETATTR_REC: { - struct llog_setattr_rec *lsr = (struct llog_setattr_rec *)rec; - lsr->lsr_oid = loi->loi_id; - lsr->lsr_ogen = loi->loi_gr; - break; - } - default: - break; - } - - rc += llog_add(cctxt, rec, NULL, logcookies + rc, - numcookies - rc); - llog_ctxt_put(cctxt); - } - - RETURN(rc); -} - -static int lov_llog_origin_connect(struct llog_ctxt *ctxt, int count, - struct llog_logid *logid, - struct llog_gen *gen, - struct obd_uuid *uuid) -{ - struct obd_device *obd = ctxt->loc_obd; - struct lov_obd *lov = &obd->u.lov; - int i, rc = 0, err = 0; - ENTRY; - - lov_getref(obd); - for (i = 0; i < count; i++) { - struct obd_device *child; - struct llog_ctxt *cctxt; - - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) - continue; - if (uuid && !obd_uuid_equals(uuid, &lov->lov_tgts[i]->ltd_uuid)) - continue; - CDEBUG(D_CONFIG, "connect %d/%d\n", i, count); - child = lov->lov_tgts[i]->ltd_exp->exp_obd; - cctxt = llog_get_context(child, ctxt->loc_idx); - rc = llog_connect(cctxt, 1, logid, gen, uuid); - llog_ctxt_put(cctxt); - - if (rc) { - CERROR("error osc_llog_connect tgt %d (%d)\n", i, rc); - if (!err) - err = rc; - } - } - lov_putref(obd); - - RETURN(err); -} - -/* the replicators commit callback */ -static int lov_llog_repl_cancel(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm, - int count, struct llog_cookie *cookies, int flags) -{ - struct lov_obd *lov; - struct obd_device *obd = ctxt->loc_obd; - int rc = 0, i; - ENTRY; - - LASSERT(lsm != NULL); - LASSERT(count == lsm->lsm_stripe_count); - - lov = &obd->u.lov; - lov_getref(obd); - for (i = 0; i < count; i++, cookies++) { - struct lov_oinfo *loi = lsm->lsm_oinfo[i]; - struct obd_device *child = - lov->lov_tgts[loi->loi_ost_idx]->ltd_exp->exp_obd; - struct llog_ctxt *cctxt = - llog_get_context(child, ctxt->loc_idx); - int err; - - err = llog_cancel(cctxt, NULL, 1, cookies, flags); - llog_ctxt_put(cctxt); - if (err && lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CERROR("error: objid "LPX64" subobj "LPX64 - " on OST idx %d: rc = %d\n", lsm->lsm_object_id, - loi->loi_id, loi->loi_ost_idx, err); - if (!rc) - rc = err; - } - } - lov_putref(obd); - RETURN(rc); -} - -static struct llog_operations lov_mds_ost_orig_logops = { - lop_add: lov_llog_origin_add, - lop_connect: lov_llog_origin_connect -}; - -static struct llog_operations lov_size_repl_logops = { - lop_cancel: lov_llog_repl_cancel -}; - -int lov_llog_init(struct obd_device *obd, struct obd_device *tgt, - int count, struct llog_catid *logid, struct obd_uuid *uuid) -{ - struct lov_obd *lov = &obd->u.lov; - struct obd_device *child; - int i, rc = 0, err = 0; - ENTRY; - - rc = llog_setup(obd, LLOG_MDS_OST_ORIG_CTXT, tgt, 0, NULL, - &lov_mds_ost_orig_logops); - if (rc) - RETURN(rc); - - rc = llog_setup(obd, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL, - &lov_size_repl_logops); - if (rc) - RETURN(rc); - - lov_getref(obd); - /* count may not match lov->desc.ld_tgt_count during dynamic ost add */ - for (i = 0; i < count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) - continue; - if (uuid && !obd_uuid_equals(uuid, &lov->lov_tgts[i]->ltd_uuid)) - continue; - CDEBUG(D_CONFIG, "init %d/%d\n", i, count); - LASSERT(lov->lov_tgts[i]->ltd_exp); - child = lov->lov_tgts[i]->ltd_exp->exp_obd; - rc = obd_llog_init(child, tgt, 1, logid + i, uuid); - if (rc) { - CERROR("error osc_llog_init idx %d osc '%s' tgt '%s' " - "(rc=%d)\n", i, child->obd_name, tgt->obd_name, - rc); - if (!err) - err = rc; - } - } - lov_putref(obd); - RETURN(err); -} - -int lov_llog_finish(struct obd_device *obd, int count) -{ - struct llog_ctxt *ctxt; - int rc = 0, rc2 = 0; - ENTRY; - - /* cleanup our llogs only if the ctxts have been setup - * (client lov doesn't setup, mds lov does). */ - ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT); - if (ctxt) - rc = llog_cleanup(ctxt); - - ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT); - if (ctxt) - rc2 = llog_cleanup(ctxt); - if (!rc) - rc = rc2; - - /* lov->tgt llogs are cleaned during osc_cleanup. */ - RETURN(rc); -} diff --git a/lustre/lov/lov_merge.c b/lustre/lov/lov_merge.c deleted file mode 100644 index 45544c94f9..0000000000 --- a/lustre/lov/lov_merge.c +++ /dev/null @@ -1,179 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LOV - -#ifdef __KERNEL__ -#include <libcfs/libcfs.h> -#else -#include <liblustre.h> -#endif - -#include <obd_class.h> -#include <obd_lov.h> - -#include "lov_internal.h" - -/* Merge the lock value block(&lvb) attributes from each of the stripes in a - * file into a single lvb. It is expected that the caller initializes the - * current atime, mtime, ctime to avoid regressing a more uptodate time on - * the local client. - * - * If @kms_only is set then we do not consider the recently seen size (rss) - * when updating the known minimum size (kms). Even when merging RSS, we will - * take the KMS value if it's larger. This prevents getattr from stomping on - * dirty cached pages which extend the file size. */ -int lov_merge_lvb(struct obd_export *exp, struct lov_stripe_md *lsm, - struct ost_lvb *lvb, int kms_only) -{ - struct lov_oinfo *loi; - __u64 size = 0; - __u64 blocks = 0; - __u64 current_mtime = lvb->lvb_mtime; - __u64 current_atime = lvb->lvb_atime; - __u64 current_ctime = lvb->lvb_ctime; - int i; - int rc = 0; - - LASSERT_SPIN_LOCKED(&lsm->lsm_lock); -#ifdef __KERNEL__ - LASSERT(lsm->lsm_lock_owner == cfs_current()); -#endif - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - obd_size lov_size, tmpsize; - - loi = lsm->lsm_oinfo[i]; - if (OST_LVB_IS_ERR(loi->loi_lvb.lvb_blocks)) { - rc = OST_LVB_GET_ERR(loi->loi_lvb.lvb_blocks); - continue; - } - - tmpsize = loi->loi_kms; - if (kms_only == 0 && loi->loi_lvb.lvb_size > tmpsize) - tmpsize = loi->loi_lvb.lvb_size; - - lov_size = lov_stripe_size(lsm, tmpsize, i); - if (lov_size > size) - size = lov_size; - /* merge blocks, mtime, atime */ - blocks += loi->loi_lvb.lvb_blocks; - if (loi->loi_lvb.lvb_atime > current_atime) - current_atime = loi->loi_lvb.lvb_atime; - - /* mtime is always updated with ctime, but can be set in past. - As write and utime(2) may happen within 1 second, and utime's - mtime has a priority over write's one, leave mtime from mds - for the same ctimes. */ - if (loi->loi_lvb.lvb_ctime > current_ctime) { - current_ctime = loi->loi_lvb.lvb_ctime; - current_mtime = loi->loi_lvb.lvb_mtime; - } - } - - lvb->lvb_size = size; - lvb->lvb_blocks = blocks; - lvb->lvb_mtime = current_mtime; - lvb->lvb_atime = current_atime; - lvb->lvb_ctime = current_ctime; - RETURN(rc); -} - -/* Must be called under the lov_stripe_lock() */ -int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm, - obd_off size, int shrink) -{ - struct lov_oinfo *loi; - int stripe = 0; - __u64 kms; - ENTRY; - - LASSERT_SPIN_LOCKED(&lsm->lsm_lock); -#ifdef __KERNEL__ - LASSERT(lsm->lsm_lock_owner == cfs_current()); -#endif - - if (shrink) { - struct lov_oinfo *loi; - for (; stripe < lsm->lsm_stripe_count; stripe++) { - loi = lsm->lsm_oinfo[stripe]; - kms = lov_size_to_stripe(lsm, size, stripe); - CDEBUG(D_INODE, - "stripe %d KMS %sing "LPU64"->"LPU64"\n", - stripe, kms > loi->loi_kms ? "increas" : - kms < loi->loi_kms ? "shrink" : "leav", - loi->loi_kms, kms); - loi->loi_kms = loi->loi_lvb.lvb_size = kms; - } - RETURN(0); - } - - if (size > 0) - stripe = lov_stripe_number(lsm, size - 1); - kms = lov_size_to_stripe(lsm, size, stripe); - loi = lsm->lsm_oinfo[stripe]; - - CDEBUG(D_INODE, "stripe %d KMS %sincreasing "LPU64"->"LPU64"\n", - stripe, kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms); - if (kms > loi->loi_kms) - loi->loi_kms = kms; - - RETURN(0); -} - -void lov_merge_attrs(struct obdo *tgt, struct obdo *src, obd_flag valid, - struct lov_stripe_md *lsm, int stripeno, int *set) -{ - valid &= src->o_valid; - - if (*set) { - if (valid & OBD_MD_FLSIZE) { - /* this handles sparse files properly */ - obd_size lov_size; - - lov_size = lov_stripe_size(lsm, src->o_size, stripeno); - if (lov_size > tgt->o_size) - tgt->o_size = lov_size; - } - if (valid & OBD_MD_FLBLOCKS) - tgt->o_blocks += src->o_blocks; - if (valid & OBD_MD_FLBLKSZ) - tgt->o_blksize += src->o_blksize; - if (valid & OBD_MD_FLCTIME && tgt->o_ctime < src->o_ctime) - tgt->o_ctime = src->o_ctime; - /* Only mtime from OSTs are merged here, as they cannot be set - in past (only MDS's mtime can) do not look at ctime. */ - if (valid & OBD_MD_FLMTIME && tgt->o_mtime < src->o_mtime) - tgt->o_mtime = src->o_mtime; - } else { - memcpy(tgt, src, sizeof(*tgt)); - tgt->o_id = lsm->lsm_object_id; - if (valid & OBD_MD_FLSIZE) - tgt->o_size = lov_stripe_size(lsm,src->o_size,stripeno); - *set = 1; - } -} diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c deleted file mode 100644 index 93787c4a72..0000000000 --- a/lustre/lov/lov_obd.c +++ /dev/null @@ -1,2859 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002-2006 Cluster File Systems, Inc. - * Author: Phil Schwan <phil@clusterfs.com> - * Peter Braam <braam@clusterfs.com> - * Mike Shaver <shaver@clusterfs.com> - * Nathan Rutman <nathan@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LOV -#ifdef __KERNEL__ -#include <libcfs/libcfs.h> -#else -#include <liblustre.h> -#endif - -#include <obd_support.h> -#include <lustre_lib.h> -#include <lustre_net.h> -#include <lustre/lustre_idl.h> -#include <lustre_dlm.h> -#include <lustre_mds.h> -#include <lustre_debug.h> -#include <obd_class.h> -#include <obd_lov.h> -#include <obd_ost.h> -#include <lprocfs_status.h> -#include <lustre_param.h> -#include <lustre_cache.h> - -#include "lov_internal.h" - - -/* Keep a refcount of lov->tgt usage to prevent racing with addition/deletion. - Any function that expects lov_tgts to remain stationary must take a ref. */ -void lov_getref(struct obd_device *obd) -{ - struct lov_obd *lov = &obd->u.lov; - - /* nobody gets through here until lov_putref is done */ - mutex_down(&lov->lov_lock); - atomic_inc(&lov->lov_refcount); - mutex_up(&lov->lov_lock); - return; -} - -static void __lov_del_obd(struct obd_device *obd, __u32 index); - -void lov_putref(struct obd_device *obd) -{ - struct lov_obd *lov = &obd->u.lov; - mutex_down(&lov->lov_lock); - /* ok to dec to 0 more than once -- ltd_exp's will be null */ - if (atomic_dec_and_test(&lov->lov_refcount) && lov->lov_death_row) { - int i; - CDEBUG(D_CONFIG, "destroying %d lov targets\n", - lov->lov_death_row); - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_reap) - continue; - /* Disconnect and delete from list */ - __lov_del_obd(obd, i); - lov->lov_death_row--; - } - } - mutex_up(&lov->lov_lock); -} - -static int lov_register_page_removal_cb(struct obd_export *exp, - obd_page_removal_cb_t func, - obd_pin_extent_cb pin_cb) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - int i, rc = 0; - - if (lov->lov_page_removal_cb && lov->lov_page_removal_cb != func) - return -EBUSY; - - if (lov->lov_page_pin_cb && lov->lov_page_pin_cb != pin_cb) - return -EBUSY; - - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp) - continue; - rc |= obd_register_page_removal_cb(lov->lov_tgts[i]->ltd_exp, - func, pin_cb); - } - - lov->lov_page_removal_cb = func; - lov->lov_page_pin_cb = pin_cb; - - return rc; -} - -static int lov_unregister_page_removal_cb(struct obd_export *exp, - obd_page_removal_cb_t func) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - int i, rc = 0; - - if (lov->lov_page_removal_cb && lov->lov_page_removal_cb != func) - return -EINVAL; - - lov->lov_page_removal_cb = NULL; - lov->lov_page_pin_cb = NULL; - - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp) - continue; - rc |= obd_unregister_page_removal_cb(lov->lov_tgts[i]->ltd_exp, - func); - } - - return rc; -} - -static int lov_register_lock_cancel_cb(struct obd_export *exp, - obd_lock_cancel_cb func) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - int i, rc = 0; - - if (lov->lov_lock_cancel_cb && lov->lov_lock_cancel_cb != func) - return -EBUSY; - - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp) - continue; - rc |= obd_register_lock_cancel_cb(lov->lov_tgts[i]->ltd_exp, - func); - } - - lov->lov_lock_cancel_cb = func; - - return rc; -} - -static int lov_unregister_lock_cancel_cb(struct obd_export *exp, - obd_lock_cancel_cb func) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - int i, rc = 0; - - if (lov->lov_lock_cancel_cb && lov->lov_lock_cancel_cb != func) - return -EINVAL; - - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp) - continue; - rc |= obd_unregister_lock_cancel_cb(lov->lov_tgts[i]->ltd_exp, - func); - } - lov->lov_lock_cancel_cb = NULL; - return rc; -} - -#define MAX_STRING_SIZE 128 -static int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, - struct obd_connect_data *data) -{ - struct lov_obd *lov = &obd->u.lov; - struct obd_uuid tgt_uuid; - struct obd_device *tgt_obd; - struct obd_uuid lov_osc_uuid = { "LOV_OSC_UUID" }; - struct lustre_handle conn = {0, }; - struct obd_import *imp; - -#ifdef __KERNEL__ - cfs_proc_dir_entry_t *lov_proc_dir; -#endif - int rc; - ENTRY; - - if (!lov->lov_tgts[index]) - RETURN(-EINVAL); - - tgt_uuid = lov->lov_tgts[index]->ltd_uuid; - tgt_obd = class_find_client_obd(&tgt_uuid, LUSTRE_OSC_NAME, - &obd->obd_uuid); - - if (!tgt_obd) { - CERROR("Target %s not attached\n", obd_uuid2str(&tgt_uuid)); - RETURN(-EINVAL); - } - - if (!tgt_obd->obd_set_up) { - CERROR("Target %s not set up\n", obd_uuid2str(&tgt_uuid)); - RETURN(-EINVAL); - } - - if (data && (data->ocd_connect_flags & OBD_CONNECT_INDEX)) - data->ocd_index = index; - - /* - * Divine LOV knows that OBDs under it are OSCs. - */ - imp = tgt_obd->u.cli.cl_import; - - if (activate) { - tgt_obd->obd_no_recov = 0; - /* FIXME this is probably supposed to be - ptlrpc_set_import_active. Horrible naming. */ - ptlrpc_activate_import(imp); - } - - if (imp->imp_invalid) { - CERROR("not connecting OSC %s; administratively " - "disabled\n", obd_uuid2str(&tgt_uuid)); - rc = obd_register_observer(tgt_obd, obd); - if (rc) { - CERROR("Target %s register_observer error %d; " - "will not be able to reactivate\n", - obd_uuid2str(&tgt_uuid), rc); - } - RETURN(0); - } - - rc = obd_connect(&conn, tgt_obd, &lov_osc_uuid, data, NULL); - if (rc) { - CERROR("Target %s connect error %d\n", - obd_uuid2str(&tgt_uuid), rc); - RETURN(rc); - } - lov->lov_tgts[index]->ltd_exp = class_conn2export(&conn); - if (!lov->lov_tgts[index]->ltd_exp) { - CERROR("Target %s: null export!\n", obd_uuid2str(&tgt_uuid)); - RETURN(-ENODEV); - } - - rc = obd_register_page_removal_cb(lov->lov_tgts[index]->ltd_exp, - lov->lov_page_removal_cb, - lov->lov_page_pin_cb); - if (rc) { - obd_disconnect(lov->lov_tgts[index]->ltd_exp); - lov->lov_tgts[index]->ltd_exp = NULL; - RETURN(rc); - } - - rc = obd_register_lock_cancel_cb(lov->lov_tgts[index]->ltd_exp, - lov->lov_lock_cancel_cb); - if (rc) { - obd_unregister_page_removal_cb(lov->lov_tgts[index]->ltd_exp, - lov->lov_page_removal_cb); - obd_disconnect(lov->lov_tgts[index]->ltd_exp); - lov->lov_tgts[index]->ltd_exp = NULL; - RETURN(rc); - } - - rc = obd_register_observer(tgt_obd, obd); - if (rc) { - CERROR("Target %s register_observer error %d\n", - obd_uuid2str(&tgt_uuid), rc); - obd_unregister_lock_cancel_cb(lov->lov_tgts[index]->ltd_exp, - lov->lov_lock_cancel_cb); - obd_unregister_page_removal_cb(lov->lov_tgts[index]->ltd_exp, - lov->lov_page_removal_cb); - obd_disconnect(lov->lov_tgts[index]->ltd_exp); - lov->lov_tgts[index]->ltd_exp = NULL; - RETURN(rc); - } - - lov->lov_tgts[index]->ltd_reap = 0; - if (activate) { - lov->lov_tgts[index]->ltd_active = 1; - lov->desc.ld_active_tgt_count++; - lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 0; - } - CDEBUG(D_CONFIG, "Connected tgt idx %d %s (%s) %sactive\n", index, - obd_uuid2str(&tgt_uuid), tgt_obd->obd_name, activate ? "":"in"); - -#ifdef __KERNEL__ - lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds"); - if (lov_proc_dir) { - struct obd_device *osc_obd = class_conn2obd(&conn); - cfs_proc_dir_entry_t *osc_symlink; - char name[MAX_STRING_SIZE]; - - LASSERT(osc_obd != NULL); - LASSERT(osc_obd->obd_magic == OBD_DEVICE_MAGIC); - LASSERT(osc_obd->obd_type->typ_name != NULL); - snprintf(name, MAX_STRING_SIZE, "../../../%s/%s", - osc_obd->obd_type->typ_name, - osc_obd->obd_name); - osc_symlink = proc_symlink(osc_obd->obd_name, lov_proc_dir, - name); - if (osc_symlink == NULL) { - CERROR("could not register LOV target " - "/proc/fs/lustre/%s/%s/target_obds/%s.", - obd->obd_type->typ_name, obd->obd_name, - osc_obd->obd_name); - lprocfs_remove(&lov_proc_dir); - } - } -#endif - - rc = qos_add_tgt(obd, index); - if (rc) - CERROR("qos_add_tgt failed %d\n", rc); - - RETURN(0); -} - -static int lov_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid, struct obd_connect_data *data, - void *localdata) -{ - struct lov_obd *lov = &obd->u.lov; - struct lov_tgt_desc *tgt; - int i, rc; - ENTRY; - - CDEBUG(D_CONFIG, "connect #%d\n", lov->lov_connects); - - rc = class_connect(conn, obd, cluuid); - if (rc) - RETURN(rc); - - /* Why should there ever be more than 1 connect? */ - lov->lov_connects++; - LASSERT(lov->lov_connects == 1); - - memset(&lov->lov_ocd, 0, sizeof(lov->lov_ocd)); - if (data) - lov->lov_ocd = *data; - - lov_getref(obd); - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - tgt = lov->lov_tgts[i]; - if (!tgt || obd_uuid_empty(&tgt->ltd_uuid)) - continue; - /* Flags will be lowest common denominator */ - rc = lov_connect_obd(obd, i, lov->lov_tgts[i]->ltd_activate, - &lov->lov_ocd); - if (rc) { - CERROR("%s: lov connect tgt %d failed: %d\n", - obd->obd_name, i, rc); - continue; - } - } - lov_putref(obd); - - RETURN(0); -} - -static int lov_disconnect_obd(struct obd_device *obd, __u32 index) -{ - cfs_proc_dir_entry_t *lov_proc_dir; - struct lov_obd *lov = &obd->u.lov; - struct obd_device *osc_obd = - class_exp2obd(lov->lov_tgts[index]->ltd_exp); - int rc; - - ENTRY; - - CDEBUG(D_CONFIG, "%s: disconnecting target %s\n", - obd->obd_name, osc_obd->obd_name); - - obd_unregister_lock_cancel_cb(lov->lov_tgts[index]->ltd_exp, - lov->lov_lock_cancel_cb); - obd_unregister_page_removal_cb(lov->lov_tgts[index]->ltd_exp, - lov->lov_page_removal_cb); - if (lov->lov_tgts[index]->ltd_active) { - lov->lov_tgts[index]->ltd_active = 0; - lov->desc.ld_active_tgt_count--; - lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 1; - } - - lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds"); - if (lov_proc_dir) { - cfs_proc_dir_entry_t *osc_symlink; - - osc_symlink = lprocfs_srch(lov_proc_dir, osc_obd->obd_name); - if (osc_symlink) { - lprocfs_remove(&osc_symlink); - } else { - CERROR("/proc/fs/lustre/%s/%s/target_obds/%s missing.", - obd->obd_type->typ_name, obd->obd_name, - osc_obd->obd_name); - } - } - - if (obd->obd_no_recov) { - /* Pass it on to our clients. - * XXX This should be an argument to disconnect, - * XXX not a back-door flag on the OBD. Ah well. - */ - if (osc_obd) - osc_obd->obd_no_recov = 1; - } - - obd_register_observer(osc_obd, NULL); - - rc = obd_disconnect(lov->lov_tgts[index]->ltd_exp); - if (rc) { - CERROR("Target %s disconnect error %d\n", - lov_uuid2str(lov, index), rc); - rc = 0; - } - - qos_del_tgt(obd, index); - - lov->lov_tgts[index]->ltd_exp = NULL; - RETURN(0); -} - -static int lov_del_target(struct obd_device *obd, __u32 index, - struct obd_uuid *uuidp, int gen); - -static int lov_disconnect(struct obd_export *exp) -{ - struct obd_device *obd = class_exp2obd(exp); - struct lov_obd *lov = &obd->u.lov; - int i, rc; - ENTRY; - - if (!lov->lov_tgts) - goto out; - - /* Only disconnect the underlying layers on the final disconnect. */ - lov->lov_connects--; - if (lov->lov_connects != 0) { - /* why should there be more than 1 connect? */ - CERROR("disconnect #%d\n", lov->lov_connects); - goto out; - } - - /* Let's hold another reference so lov_del_obd doesn't spin through - putref every time */ - lov_getref(obd); - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (lov->lov_tgts[i] && lov->lov_tgts[i]->ltd_exp) { - /* Disconnection is the last we know about an obd */ - lov_del_target(obd, i, 0, lov->lov_tgts[i]->ltd_gen); - } - } - lov_putref(obd); - -out: - rc = class_disconnect(exp); /* bz 9811 */ - RETURN(rc); -} - -/* Error codes: - * - * -EINVAL : UUID can't be found in the LOV's target list - * -ENOTCONN: The UUID is found, but the target connection is bad (!) - * -EBADF : The UUID is found, but the OBD is the wrong type (!) - */ -static int lov_set_osc_active(struct obd_device *obd, struct obd_uuid *uuid, - int activate) -{ - struct lov_obd *lov = &obd->u.lov; - struct lov_tgt_desc *tgt; - int i, rc = 0; - ENTRY; - - CDEBUG(D_INFO, "Searching in lov %p for uuid %s (activate=%d)\n", - lov, uuid->uuid, activate); - - lov_getref(obd); - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - tgt = lov->lov_tgts[i]; - if (!tgt || !tgt->ltd_exp) - continue; - - CDEBUG(D_INFO, "lov idx %d is %s conn "LPX64"\n", - i, obd_uuid2str(&tgt->ltd_uuid), - tgt->ltd_exp->exp_handle.h_cookie); - if (obd_uuid_equals(uuid, &tgt->ltd_uuid)) - break; - } - - if (i == lov->desc.ld_tgt_count) - GOTO(out, rc = -EINVAL); - - if (lov->lov_tgts[i]->ltd_active == activate) { - CDEBUG(D_INFO, "OSC %s already %sactive!\n", uuid->uuid, - activate ? "" : "in"); - GOTO(out, rc); - } - - CDEBUG(D_CONFIG, "Marking OSC %s %sactive\n", obd_uuid2str(uuid), - activate ? "" : "in"); - - lov->lov_tgts[i]->ltd_active = activate; - - if (activate) { - lov->desc.ld_active_tgt_count++; - lov->lov_tgts[i]->ltd_exp->exp_obd->obd_inactive = 0; - } else { - lov->desc.ld_active_tgt_count--; - lov->lov_tgts[i]->ltd_exp->exp_obd->obd_inactive = 1; - } - /* remove any old qos penalty */ - lov->lov_tgts[i]->ltd_qos.ltq_penalty = 0; - - out: - lov_putref(obd); - RETURN(rc); -} - -static int lov_notify(struct obd_device *obd, struct obd_device *watched, - enum obd_notify_event ev, void *data) -{ - int rc = 0; - ENTRY; - - if (ev == OBD_NOTIFY_ACTIVE || ev == OBD_NOTIFY_INACTIVE) { - struct obd_uuid *uuid; - - LASSERT(watched); - - if (strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) { - CERROR("unexpected notification of %s %s!\n", - watched->obd_type->typ_name, - watched->obd_name); - RETURN(-EINVAL); - } - uuid = &watched->u.cli.cl_target_uuid; - - /* Set OSC as active before notifying the observer, so the - * observer can use the OSC normally. - */ - rc = lov_set_osc_active(obd, uuid, ev == OBD_NOTIFY_ACTIVE); - if (rc) { - CERROR("%sactivation of %s failed: %d\n", - (ev == OBD_NOTIFY_ACTIVE) ? "" : "de", - obd_uuid2str(uuid), rc); - RETURN(rc); - } - } - - /* Pass the notification up the chain. */ - if (watched) { - rc = obd_notify_observer(obd, watched, ev, data); - } else { - /* NULL watched means all osc's in the lov (only for syncs) */ - struct lov_obd *lov = &obd->u.lov; - struct obd_device *tgt_obd; - int i; - lov_getref(obd); - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i]) - continue; - tgt_obd = class_exp2obd(lov->lov_tgts[i]->ltd_exp); - rc = obd_notify_observer(obd, tgt_obd, ev, data); - if (rc) { - CERROR("%s: notify %s of %s failed %d\n", - obd->obd_name, - obd->obd_observer->obd_name, - tgt_obd->obd_name, rc); - break; - } - } - lov_putref(obd); - } - - RETURN(rc); -} - -static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp, - __u32 index, int gen, int active) -{ - struct lov_obd *lov = &obd->u.lov; - struct lov_tgt_desc *tgt; - int rc; - ENTRY; - - CDEBUG(D_CONFIG, "uuid:%s idx:%d gen:%d active:%d\n", - uuidp->uuid, index, gen, active); - - if (gen <= 0) { - CERROR("request to add OBD %s with invalid generation: %d\n", - uuidp->uuid, gen); - RETURN(-EINVAL); - } - - mutex_down(&lov->lov_lock); - - if ((index < lov->lov_tgt_size) && (lov->lov_tgts[index] != NULL)) { - tgt = lov->lov_tgts[index]; - CERROR("UUID %s already assigned at LOV target index %d\n", - obd_uuid2str(&tgt->ltd_uuid), index); - mutex_up(&lov->lov_lock); - RETURN(-EEXIST); - } - - if (index >= lov->lov_tgt_size) { - /* We need to reallocate the lov target array. */ - struct lov_tgt_desc **newtgts, **old = NULL; - __u32 newsize, oldsize = 0; - - newsize = max(lov->lov_tgt_size, (__u32)2); - while (newsize < index + 1) - newsize = newsize << 1; - OBD_ALLOC(newtgts, sizeof(*newtgts) * newsize); - if (newtgts == NULL) { - mutex_up(&lov->lov_lock); - RETURN(-ENOMEM); - } - - if (lov->lov_tgt_size) { - memcpy(newtgts, lov->lov_tgts, sizeof(*newtgts) * - lov->lov_tgt_size); - old = lov->lov_tgts; - oldsize = lov->lov_tgt_size; - } - - lov->lov_tgts = newtgts; - lov->lov_tgt_size = newsize; -#ifdef __KERNEL__ - smp_rmb(); -#endif - if (old) - OBD_FREE(old, sizeof(*old) * oldsize); - - CDEBUG(D_CONFIG, "tgts: %p size: %d\n", - lov->lov_tgts, lov->lov_tgt_size); - } - - - OBD_ALLOC_PTR(tgt); - if (!tgt) { - mutex_up(&lov->lov_lock); - RETURN(-ENOMEM); - } - - memset(tgt, 0, sizeof(*tgt)); - tgt->ltd_uuid = *uuidp; - /* XXX - add a sanity check on the generation number. */ - tgt->ltd_gen = gen; - tgt->ltd_index = index; - tgt->ltd_activate = active; - lov->lov_tgts[index] = tgt; - if (index >= lov->desc.ld_tgt_count) - lov->desc.ld_tgt_count = index + 1; - mutex_up(&lov->lov_lock); - - CDEBUG(D_CONFIG, "idx=%d ltd_gen=%d ld_tgt_count=%d\n", - index, tgt->ltd_gen, lov->desc.ld_tgt_count); - - if (lov->lov_connects == 0) { - /* lov_connect hasn't been called yet. We'll do the - lov_connect_obd on this target when that fn first runs, - because we don't know the connect flags yet. */ - RETURN(0); - } - - lov_getref(obd); - - rc = lov_connect_obd(obd, index, active, &lov->lov_ocd); - if (rc) - GOTO(out, rc); - - rc = lov_notify(obd, tgt->ltd_exp->exp_obd, - active ? OBD_NOTIFY_ACTIVE : OBD_NOTIFY_INACTIVE, - (void *)&index); - -out: - if (rc) { - CERROR("add failed (%d), deleting %s\n", rc, - obd_uuid2str(&tgt->ltd_uuid)); - lov_del_target(obd, index, 0, 0); - } - lov_putref(obd); - RETURN(rc); -} - -/* Schedule a target for deletion */ -static int lov_del_target(struct obd_device *obd, __u32 index, - struct obd_uuid *uuidp, int gen) -{ - struct lov_obd *lov = &obd->u.lov; - int count = lov->desc.ld_tgt_count; - int rc = 0; - ENTRY; - - if (index >= count) { - CERROR("LOV target index %d >= number of LOV OBDs %d.\n", - index, count); - RETURN(-EINVAL); - } - - lov_getref(obd); - - if (!lov->lov_tgts[index]) { - CERROR("LOV target at index %d is not setup.\n", index); - GOTO(out, rc = -EINVAL); - } - - if (uuidp && !obd_uuid_equals(uuidp, &lov->lov_tgts[index]->ltd_uuid)) { - CERROR("LOV target UUID %s at index %d doesn't match %s.\n", - lov_uuid2str(lov, index), index, - obd_uuid2str(uuidp)); - GOTO(out, rc = -EINVAL); - } - - CDEBUG(D_CONFIG, "uuid: %s idx: %d gen: %d exp: %p active: %d\n", - lov_uuid2str(lov, index), index, - lov->lov_tgts[index]->ltd_gen, lov->lov_tgts[index]->ltd_exp, - lov->lov_tgts[index]->ltd_active); - - lov->lov_tgts[index]->ltd_reap = 1; - lov->lov_death_row++; - /* we really delete it from lov_putref */ -out: - lov_putref(obd); - - RETURN(rc); -} - -/* We are holding lov_lock */ -static void __lov_del_obd(struct obd_device *obd, __u32 index) -{ - struct lov_obd *lov = &obd->u.lov; - struct obd_device *osc_obd; - struct lov_tgt_desc *tgt = lov->lov_tgts[index]; - - LASSERT(tgt); - LASSERT(tgt->ltd_reap); - - osc_obd = class_exp2obd(tgt->ltd_exp); - - CDEBUG(D_CONFIG, "Removing tgt %s : %s\n", - lov_uuid2str(lov, index), - osc_obd ? osc_obd->obd_name : "<no obd>"); - - if (tgt->ltd_exp) - lov_disconnect_obd(obd, index); - - /* XXX - right now there is a dependency on ld_tgt_count being the - * maximum tgt index for computing the mds_max_easize. So we can't - * shrink it. */ - - lov->lov_tgts[index] = NULL; - OBD_FREE_PTR(tgt); - - /* Manual cleanup - no cleanup logs to clean up the osc's. We must - do it ourselves. And we can't do it from lov_cleanup, - because we just lost our only reference to it. */ - if (osc_obd) { - /* Use lov's force/fail flags. */ - osc_obd->obd_force = obd->obd_force; - osc_obd->obd_fail = obd->obd_fail; - class_manual_cleanup(osc_obd); - } -} - -void lov_fix_desc(struct lov_desc *desc) -{ - if (desc->ld_default_stripe_size < PTLRPC_MAX_BRW_SIZE) { - LCONSOLE_WARN("Increasing default stripe size to min %u\n", - PTLRPC_MAX_BRW_SIZE); - desc->ld_default_stripe_size = PTLRPC_MAX_BRW_SIZE; - } else if (desc->ld_default_stripe_size & (LOV_MIN_STRIPE_SIZE - 1)) { - desc->ld_default_stripe_size &= ~(LOV_MIN_STRIPE_SIZE - 1); - LCONSOLE_WARN("Changing default stripe size to "LPU64" (a " - "multiple of %u)\n", - desc->ld_default_stripe_size,LOV_MIN_STRIPE_SIZE); - } - - if (desc->ld_default_stripe_count == 0) - desc->ld_default_stripe_count = 1; - - /* from lov_setstripe */ - if ((desc->ld_pattern != 0) && - (desc->ld_pattern != LOV_PATTERN_RAID0)) { - LCONSOLE_WARN("Unknown stripe pattern: %#x\n",desc->ld_pattern); - desc->ld_pattern = 0; - } - /* fix qos_maxage */ - if (desc->ld_qos_maxage == 0) - desc->ld_qos_maxage = QOS_DEFAULT_MAXAGE; -} - -static int lov_setup(struct obd_device *obd, obd_count len, void *buf) -{ - struct lprocfs_static_vars lvars = { 0 }; - struct lustre_cfg *lcfg = buf; - struct lov_desc *desc; - struct lov_obd *lov = &obd->u.lov; - int count; - ENTRY; - - if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) { - CERROR("LOV setup requires a descriptor\n"); - RETURN(-EINVAL); - } - - desc = (struct lov_desc *)lustre_cfg_buf(lcfg, 1); - - if (sizeof(*desc) > LUSTRE_CFG_BUFLEN(lcfg, 1)) { - CERROR("descriptor size wrong: %d > %d\n", - (int)sizeof(*desc), LUSTRE_CFG_BUFLEN(lcfg, 1)); - RETURN(-EINVAL); - } - - if (desc->ld_magic != LOV_DESC_MAGIC) { - if (desc->ld_magic == __swab32(LOV_DESC_MAGIC)) { - CDEBUG(D_OTHER, "%s: Swabbing lov desc %p\n", - obd->obd_name, desc); - lustre_swab_lov_desc(desc); - } else { - CERROR("%s: Bad lov desc magic: %#x\n", - obd->obd_name, desc->ld_magic); - RETURN(-EINVAL); - } - } - - lov_fix_desc(desc); - - /* Because of 64-bit divide/mod operations only work with a 32-bit - * divisor in a 32-bit kernel, we cannot support a stripe width - * of 4GB or larger on 32-bit CPUs. */ - count = desc->ld_default_stripe_count; - if ((count > 0 ? count : desc->ld_tgt_count) * - desc->ld_default_stripe_size > 0xffffffff) { - CERROR("LOV: stripe width "LPU64"x%u > 4294967295 bytes\n", - desc->ld_default_stripe_size, count); - RETURN(-EINVAL); - } - - desc->ld_active_tgt_count = 0; - lov->desc = *desc; - lov->lov_tgt_size = 0; - sema_init(&lov->lov_lock, 1); - atomic_set(&lov->lov_refcount, 0); - CFS_INIT_LIST_HEAD(&lov->lov_qos.lq_oss_list); - init_rwsem(&lov->lov_qos.lq_rw_sem); - lov->lov_qos.lq_dirty = 1; - lov->lov_qos.lq_dirty_rr = 1; - lov->lov_qos.lq_reset = 1; - /* Default priority is toward free space balance */ - lov->lov_qos.lq_prio_free = 232; - - lprocfs_lov_init_vars(&lvars); - lprocfs_obd_setup(obd, lvars.obd_vars); -#ifdef LPROCFS - { - cfs_proc_dir_entry_t *entry; - - entry = create_proc_entry("target_obd", 0444, - obd->obd_proc_entry); - if (entry != NULL) { - entry->proc_fops = &lov_proc_target_fops; - entry->data = obd; - } - } -#endif - - RETURN(0); -} - -static int lov_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) -{ - int rc = 0; - ENTRY; - - switch (stage) { - case OBD_CLEANUP_EARLY: { - struct lov_obd *lov = &obd->u.lov; - int i; - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) - continue; - obd_precleanup(class_exp2obd(lov->lov_tgts[i]->ltd_exp), - OBD_CLEANUP_EARLY); - } - break; - } - case OBD_CLEANUP_EXPORTS: - break; - case OBD_CLEANUP_SELF_EXP: - rc = obd_llog_finish(obd, 0); - if (rc != 0) - CERROR("failed to cleanup llogging subsystems\n"); - break; - case OBD_CLEANUP_OBD: - break; - } - RETURN(rc); -} - -static int lov_cleanup(struct obd_device *obd) -{ - struct lov_obd *lov = &obd->u.lov; - - lprocfs_obd_cleanup(obd); - if (lov->lov_tgts) { - int i; - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (lov->lov_tgts[i]) { - /* Inactive targets may never have connected */ - if (lov->lov_tgts[i]->ltd_active || - atomic_read(&lov->lov_refcount)) - /* We should never get here - these - should have been removed in the - disconnect. */ - CERROR("lov tgt %d not cleaned!" - " deathrow=%d, lovrc=%d\n", - i, lov->lov_death_row, - atomic_read(&lov->lov_refcount)); - lov_del_target(obd, i, 0, 0); - } - } - OBD_FREE(lov->lov_tgts, sizeof(*lov->lov_tgts) * - lov->lov_tgt_size); - lov->lov_tgt_size = 0; - } - - if (lov->lov_qos.lq_rr_size) - OBD_FREE(lov->lov_qos.lq_rr_array, lov->lov_qos.lq_rr_size); - - RETURN(0); -} - -static int lov_process_config(struct obd_device *obd, obd_count len, void *buf) -{ - struct lustre_cfg *lcfg = buf; - struct obd_uuid obd_uuid; - int cmd; - int rc = 0; - ENTRY; - - switch(cmd = lcfg->lcfg_command) { - case LCFG_LOV_ADD_OBD: - case LCFG_LOV_ADD_INA: - case LCFG_LOV_DEL_OBD: { - __u32 index; - int gen; - /* lov_modify_tgts add 0:lov_mdsA 1:ost1_UUID 2:0 3:1 */ - if (LUSTRE_CFG_BUFLEN(lcfg, 1) > sizeof(obd_uuid.uuid)) - GOTO(out, rc = -EINVAL); - - obd_str2uuid(&obd_uuid, lustre_cfg_buf(lcfg, 1)); - - if (sscanf(lustre_cfg_buf(lcfg, 2), "%d", &index) != 1) - GOTO(out, rc = -EINVAL); - if (sscanf(lustre_cfg_buf(lcfg, 3), "%d", &gen) != 1) - GOTO(out, rc = -EINVAL); - if (cmd == LCFG_LOV_ADD_OBD) - rc = lov_add_target(obd, &obd_uuid, index, gen, 1); - else if (cmd == LCFG_LOV_ADD_INA) - rc = lov_add_target(obd, &obd_uuid, index, gen, 0); - else - rc = lov_del_target(obd, index, &obd_uuid, gen); - GOTO(out, rc); - } - case LCFG_PARAM: { - struct lprocfs_static_vars lvars = { 0 }; - struct lov_desc *desc = &(obd->u.lov.desc); - - if (!desc) - GOTO(out, rc = -EINVAL); - - lprocfs_lov_init_vars(&lvars); - - rc = class_process_proc_param(PARAM_LOV, lvars.obd_vars, - lcfg, obd); - GOTO(out, rc); - } - default: { - CERROR("Unknown command: %d\n", lcfg->lcfg_command); - GOTO(out, rc = -EINVAL); - - } - } -out: - RETURN(rc); -} - -#ifndef log2 -#define log2(n) ffz(~(n)) -#endif - -static int lov_clear_orphans(struct obd_export *export, struct obdo *src_oa, - struct lov_stripe_md **ea, - struct obd_trans_info *oti) -{ - struct lov_obd *lov; - struct obdo *tmp_oa; - struct obd_uuid *ost_uuid = NULL; - int rc = 0, i; - ENTRY; - - LASSERT(src_oa->o_valid & OBD_MD_FLFLAGS && - src_oa->o_flags == OBD_FL_DELORPHAN); - - lov = &export->exp_obd->u.lov; - - OBDO_ALLOC(tmp_oa); - if (tmp_oa == NULL) - RETURN(-ENOMEM); - - if (src_oa->o_valid & OBD_MD_FLINLINE) { - ost_uuid = (struct obd_uuid *)src_oa->o_inline; - CDEBUG(D_HA, "clearing orphans only for %s\n", - ost_uuid->uuid); - } - - lov_getref(export->exp_obd); - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - struct lov_stripe_md obj_md; - struct lov_stripe_md *obj_mdp = &obj_md; - struct lov_tgt_desc *tgt; - int err; - - tgt = lov->lov_tgts[i]; - if (!tgt) - continue; - - /* if called for a specific target, we don't - care if it is not active. */ - if (!lov->lov_tgts[i]->ltd_active && ost_uuid == NULL) { - CDEBUG(D_HA, "lov idx %d inactive\n", i); - continue; - } - - if (ost_uuid && !obd_uuid_equals(ost_uuid, &tgt->ltd_uuid)) - continue; - - CDEBUG(D_CONFIG,"Clear orphans for %d:%s\n", i, - obd_uuid2str(ost_uuid)); - - memcpy(tmp_oa, src_oa, sizeof(*tmp_oa)); - - LASSERT(lov->lov_tgts[i]->ltd_exp); - /* XXX: LOV STACKING: use real "obj_mdp" sub-data */ - err = obd_create(lov->lov_tgts[i]->ltd_exp, - tmp_oa, &obj_mdp, oti); - if (err) - /* This export will be disabled until it is recovered, - and then orphan recovery will be completed. */ - CERROR("error in orphan recovery on OST idx %d/%d: " - "rc = %d\n", i, lov->desc.ld_tgt_count, err); - - if (ost_uuid) - break; - } - lov_putref(export->exp_obd); - - OBDO_FREE(tmp_oa); - RETURN(rc); -} - -static int lov_recreate(struct obd_export *exp, struct obdo *src_oa, - struct lov_stripe_md **ea, struct obd_trans_info *oti) -{ - struct lov_stripe_md *obj_mdp, *lsm; - struct lov_obd *lov = &exp->exp_obd->u.lov; - unsigned ost_idx; - int rc, i; - ENTRY; - - LASSERT(src_oa->o_valid & OBD_MD_FLFLAGS && - src_oa->o_flags & OBD_FL_RECREATE_OBJS); - - OBD_ALLOC(obj_mdp, sizeof(*obj_mdp)); - if (obj_mdp == NULL) - RETURN(-ENOMEM); - - ost_idx = src_oa->o_nlink; - lsm = *ea; - if (lsm == NULL) - GOTO(out, rc = -EINVAL); - if (ost_idx >= lov->desc.ld_tgt_count || - !lov->lov_tgts[ost_idx]) - GOTO(out, rc = -EINVAL); - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - if (lsm->lsm_oinfo[i]->loi_ost_idx == ost_idx) { - if (lsm->lsm_oinfo[i]->loi_id != src_oa->o_id) - GOTO(out, rc = -EINVAL); - break; - } - } - if (i == lsm->lsm_stripe_count) - GOTO(out, rc = -EINVAL); - - rc = obd_create(lov->lov_tgts[ost_idx]->ltd_exp, src_oa, &obj_mdp, oti); -out: - OBD_FREE(obj_mdp, sizeof(*obj_mdp)); - RETURN(rc); -} - -/* the LOV expects oa->o_id to be set to the LOV object id */ -static int lov_create(struct obd_export *exp, struct obdo *src_oa, - struct lov_stripe_md **ea, struct obd_trans_info *oti) -{ - struct lov_obd *lov; - struct obd_info oinfo; - struct lov_request_set *set = NULL; - struct lov_request *req; - struct obd_statfs osfs; - __u64 maxage; - int rc = 0; - ENTRY; - - LASSERT(ea != NULL); - if (exp == NULL) - RETURN(-EINVAL); - - if ((src_oa->o_valid & OBD_MD_FLFLAGS) && - src_oa->o_flags == OBD_FL_DELORPHAN) { - rc = lov_clear_orphans(exp, src_oa, ea, oti); - RETURN(rc); - } - - lov = &exp->exp_obd->u.lov; - if (!lov->desc.ld_active_tgt_count) - RETURN(-EIO); - - /* Recreate a specific object id at the given OST index */ - if ((src_oa->o_valid & OBD_MD_FLFLAGS) && - (src_oa->o_flags & OBD_FL_RECREATE_OBJS)) { - rc = lov_recreate(exp, src_oa, ea, oti); - RETURN(rc); - } - - maxage = cfs_time_shift_64(-lov->desc.ld_qos_maxage); - obd_statfs_rqset(exp->exp_obd, &osfs, maxage, OBD_STATFS_NODELAY); - - rc = lov_prep_create_set(exp, &oinfo, ea, src_oa, oti, &set); - if (rc) - RETURN(rc); - - list_for_each_entry(req, &set->set_list, rq_link) { - /* XXX: LOV STACKING: use real "obj_mdp" sub-data */ - rc = obd_create(lov->lov_tgts[req->rq_idx]->ltd_exp, - req->rq_oi.oi_oa, &req->rq_oi.oi_md, oti); - lov_update_create_set(set, req, rc); - } - rc = lov_fini_create_set(set, ea); - RETURN(rc); -} - -#define ASSERT_LSM_MAGIC(lsmp) \ -do { \ - LASSERT((lsmp) != NULL); \ - LASSERTF(((lsmp)->lsm_magic == LOV_MAGIC || \ - (lsmp)->lsm_magic == LOV_MAGIC_JOIN), "%p->lsm_magic=%x\n", \ - (lsmp), (lsmp)->lsm_magic); \ -} while (0) - -static int lov_destroy(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md *lsm, struct obd_trans_info *oti, - struct obd_export *md_exp) -{ - struct lov_request_set *set; - struct obd_info oinfo; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov; - int rc = 0, err; - ENTRY; - - ASSERT_LSM_MAGIC(lsm); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - if (oa->o_valid & OBD_MD_FLCOOKIE) { - LASSERT(oti); - LASSERT(oti->oti_logcookies); - } - - lov = &exp->exp_obd->u.lov; - rc = lov_prep_destroy_set(exp, &oinfo, oa, lsm, oti, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - int err; - req = list_entry(pos, struct lov_request, rq_link); - - if (oa->o_valid & OBD_MD_FLCOOKIE) - oti->oti_logcookies = set->set_cookies + req->rq_stripe; - - err = obd_destroy(lov->lov_tgts[req->rq_idx]->ltd_exp, - req->rq_oi.oi_oa, NULL, oti, NULL); - err = lov_update_common_set(set, req, err); - if (err) { - CERROR("error: destroying objid "LPX64" subobj " - LPX64" on OST idx %d: rc = %d\n", - oa->o_id, req->rq_oi.oi_oa->o_id, - req->rq_idx, err); - if (!rc) - rc = err; - } - } - - if (rc == 0) { - LASSERT(lsm_op_find(lsm->lsm_magic) != NULL); - rc = lsm_op_find(lsm->lsm_magic)->lsm_destroy(lsm, oa, md_exp); - } - err = lov_fini_destroy_set(set); - RETURN(rc ? rc : err); -} - -static int lov_getattr(struct obd_export *exp, struct obd_info *oinfo) -{ - struct lov_request_set *set; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov; - int err = 0, rc = 0; - ENTRY; - - LASSERT(oinfo); - ASSERT_LSM_MAGIC(oinfo->oi_md); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - - rc = lov_prep_getattr_set(exp, oinfo, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx " - "%u\n", oinfo->oi_oa->o_id, req->rq_stripe, - req->rq_oi.oi_oa->o_id, req->rq_idx); - - rc = obd_getattr(lov->lov_tgts[req->rq_idx]->ltd_exp, - &req->rq_oi); - err = lov_update_common_set(set, req, rc); - if (err) { - CERROR("error: getattr objid "LPX64" subobj " - LPX64" on OST idx %d: rc = %d\n", - oinfo->oi_oa->o_id, req->rq_oi.oi_oa->o_id, - req->rq_idx, err); - break; - } - } - - rc = lov_fini_getattr_set(set); - if (err) - rc = err; - RETURN(rc); -} - -static int lov_getattr_interpret(struct ptlrpc_request_set *rqset, - void *data, int rc) -{ - struct lov_request_set *lovset = (struct lov_request_set *)data; - int err; - ENTRY; - - /* don't do attribute merge if this aysnc op failed */ - if (rc) - lovset->set_completes = 0; - err = lov_fini_getattr_set(lovset); - RETURN(rc ? rc : err); -} - -static int lov_getattr_async(struct obd_export *exp, struct obd_info *oinfo, - struct ptlrpc_request_set *rqset) -{ - struct lov_request_set *lovset; - struct lov_obd *lov; - struct list_head *pos; - struct lov_request *req; - int rc = 0, err; - ENTRY; - - LASSERT(oinfo); - ASSERT_LSM_MAGIC(oinfo->oi_md); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - - rc = lov_prep_getattr_set(exp, oinfo, &lovset); - if (rc) - RETURN(rc); - - CDEBUG(D_INFO, "objid "LPX64": %ux%u byte stripes\n", - oinfo->oi_md->lsm_object_id, oinfo->oi_md->lsm_stripe_count, - oinfo->oi_md->lsm_stripe_size); - - list_for_each (pos, &lovset->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx " - "%u\n", oinfo->oi_oa->o_id, req->rq_stripe, - req->rq_oi.oi_oa->o_id, req->rq_idx); - rc = obd_getattr_async(lov->lov_tgts[req->rq_idx]->ltd_exp, - &req->rq_oi, rqset); - if (rc) { - CERROR("error: getattr objid "LPX64" subobj " - LPX64" on OST idx %d: rc = %d\n", - oinfo->oi_oa->o_id, req->rq_oi.oi_oa->o_id, - req->rq_idx, rc); - GOTO(out, rc); - } - } - - if (!list_empty(&rqset->set_requests)) { - LASSERT(rc == 0); - LASSERT (rqset->set_interpret == NULL); - rqset->set_interpret = lov_getattr_interpret; - rqset->set_arg = (void *)lovset; - RETURN(rc); - } -out: - if (rc) - lovset->set_completes = 0; - err = lov_fini_getattr_set(lovset); - RETURN(rc ? rc : err); -} - -static int lov_setattr(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti) -{ - struct lov_request_set *set; - struct lov_obd *lov; - struct list_head *pos; - struct lov_request *req; - int err = 0, rc = 0; - ENTRY; - - LASSERT(oinfo); - ASSERT_LSM_MAGIC(oinfo->oi_md); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - /* for now, we only expect the following updates here */ - LASSERT(!(oinfo->oi_oa->o_valid & ~(OBD_MD_FLID | OBD_MD_FLTYPE | - OBD_MD_FLMODE | OBD_MD_FLATIME | - OBD_MD_FLMTIME | OBD_MD_FLCTIME | - OBD_MD_FLFLAGS | OBD_MD_FLSIZE | - OBD_MD_FLGROUP | OBD_MD_FLUID | - OBD_MD_FLGID | OBD_MD_FLINLINE | - OBD_MD_FLFID | OBD_MD_FLGENER))); - lov = &exp->exp_obd->u.lov; - rc = lov_prep_setattr_set(exp, oinfo, oti, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - rc = obd_setattr(lov->lov_tgts[req->rq_idx]->ltd_exp, - &req->rq_oi, NULL); - err = lov_update_setattr_set(set, req, rc); - if (err) { - CERROR("error: setattr objid "LPX64" subobj " - LPX64" on OST idx %d: rc = %d\n", - set->set_oi->oi_oa->o_id, - req->rq_oi.oi_oa->o_id, req->rq_idx, err); - if (!rc) - rc = err; - } - } - err = lov_fini_setattr_set(set); - if (!rc) - rc = err; - RETURN(rc); -} - -static int lov_setattr_interpret(struct ptlrpc_request_set *rqset, - void *data, int rc) -{ - struct lov_request_set *lovset = (struct lov_request_set *)data; - int err; - ENTRY; - - if (rc) - lovset->set_completes = 0; - err = lov_fini_setattr_set(lovset); - RETURN(rc ? rc : err); -} - -/* If @oti is given, the request goes from MDS and responses from OSTs are not - needed. Otherwise, a client is waiting for responses. */ -static int lov_setattr_async(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct ptlrpc_request_set *rqset) -{ - struct lov_request_set *set; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov; - int rc = 0; - ENTRY; - - LASSERT(oinfo); - ASSERT_LSM_MAGIC(oinfo->oi_md); - if (oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE) { - LASSERT(oti); - LASSERT(oti->oti_logcookies); - } - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - rc = lov_prep_setattr_set(exp, oinfo, oti, &set); - if (rc) - RETURN(rc); - - CDEBUG(D_INFO, "objid "LPX64": %ux%u byte stripes\n", - oinfo->oi_md->lsm_object_id, oinfo->oi_md->lsm_stripe_count, - oinfo->oi_md->lsm_stripe_size); - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - if (oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE) - oti->oti_logcookies = set->set_cookies + req->rq_stripe; - - CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx " - "%u\n", oinfo->oi_oa->o_id, req->rq_stripe, - req->rq_oi.oi_oa->o_id, req->rq_idx); - - rc = obd_setattr_async(lov->lov_tgts[req->rq_idx]->ltd_exp, - &req->rq_oi, oti, rqset); - if (rc) { - CERROR("error: setattr objid "LPX64" subobj " - LPX64" on OST idx %d: rc = %d\n", - set->set_oi->oi_oa->o_id, - req->rq_oi.oi_oa->o_id, - req->rq_idx, rc); - break; - } - } - - /* If we are not waiting for responses on async requests, return. */ - if (rc || !rqset || list_empty(&rqset->set_requests)) { - int err; - if (rc) - set->set_completes = 0; - err = lov_fini_setattr_set(set); - RETURN(rc ? rc : err); - } - - LASSERT(rqset->set_interpret == NULL); - rqset->set_interpret = lov_setattr_interpret; - rqset->set_arg = (void *)set; - - RETURN(0); -} - -static int lov_punch_interpret(struct ptlrpc_request_set *rqset, - void *data, int rc) -{ - struct lov_request_set *lovset = (struct lov_request_set *)data; - int err; - ENTRY; - - if (rc) - lovset->set_completes = 0; - err = lov_fini_punch_set(lovset); - RETURN(rc ? rc : err); -} - -/* FIXME: maybe we'll just make one node the authoritative attribute node, then - * we can send this 'punch' to just the authoritative node and the nodes - * that the punch will affect. */ -static int lov_punch(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct ptlrpc_request_set *rqset) -{ - struct lov_request_set *set; - struct lov_obd *lov; - struct list_head *pos; - struct lov_request *req; - int rc = 0; - ENTRY; - - LASSERT(oinfo); - ASSERT_LSM_MAGIC(oinfo->oi_md); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - rc = lov_prep_punch_set(exp, oinfo, oti, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - rc = obd_punch(lov->lov_tgts[req->rq_idx]->ltd_exp, - &req->rq_oi, NULL, rqset); - if (rc) { - CERROR("error: punch objid "LPX64" subobj "LPX64 - " on OST idx %d: rc = %d\n", - set->set_oi->oi_oa->o_id, - req->rq_oi.oi_oa->o_id, req->rq_idx, rc); - break; - } - } - - if (rc || list_empty(&rqset->set_requests)) { - int err; - err = lov_fini_punch_set(set); - RETURN(rc ? rc : err); - } - - LASSERT(rqset->set_interpret == NULL); - rqset->set_interpret = lov_punch_interpret; - rqset->set_arg = (void *)set; - - RETURN(0); -} - -static int lov_sync(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md *lsm, obd_off start, obd_off end) -{ - struct lov_request_set *set; - struct obd_info oinfo; - struct lov_obd *lov; - struct list_head *pos; - struct lov_request *req; - int err = 0, rc = 0; - ENTRY; - - ASSERT_LSM_MAGIC(lsm); - - if (!exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - rc = lov_prep_sync_set(exp, &oinfo, oa, lsm, start, end, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - rc = obd_sync(lov->lov_tgts[req->rq_idx]->ltd_exp, - req->rq_oi.oi_oa, NULL, - req->rq_oi.oi_policy.l_extent.start, - req->rq_oi.oi_policy.l_extent.end); - err = lov_update_common_set(set, req, rc); - if (err) { - CERROR("error: fsync objid "LPX64" subobj "LPX64 - " on OST idx %d: rc = %d\n", - set->set_oi->oi_oa->o_id, - req->rq_oi.oi_oa->o_id, req->rq_idx, rc); - if (!rc) - rc = err; - } - } - err = lov_fini_sync_set(set); - if (!rc) - rc = err; - RETURN(rc); -} - -static int lov_brw_check(struct lov_obd *lov, struct obd_info *lov_oinfo, - obd_count oa_bufs, struct brw_page *pga) -{ - struct obd_info oinfo = { { { 0 } } }; - int i, rc = 0; - - oinfo.oi_oa = lov_oinfo->oi_oa; - - /* The caller just wants to know if there's a chance that this - * I/O can succeed */ - for (i = 0; i < oa_bufs; i++) { - int stripe = lov_stripe_number(lov_oinfo->oi_md, pga[i].off); - int ost = lov_oinfo->oi_md->lsm_oinfo[stripe]->loi_ost_idx; - obd_off start, end; - - if (!lov_stripe_intersects(lov_oinfo->oi_md, i, pga[i].off, - pga[i].off + pga[i].count, - &start, &end)) - continue; - - if (!lov->lov_tgts[ost] || !lov->lov_tgts[ost]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", ost); - return -EIO; - } - - rc = obd_brw(OBD_BRW_CHECK, lov->lov_tgts[ost]->ltd_exp, &oinfo, - 1, &pga[i], NULL); - if (rc) - break; - } - return rc; -} - -static int lov_brw(int cmd, struct obd_export *exp, struct obd_info *oinfo, - obd_count oa_bufs, struct brw_page *pga, - struct obd_trans_info *oti) -{ - struct lov_request_set *set; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov = &exp->exp_obd->u.lov; - int err, rc = 0; - ENTRY; - - ASSERT_LSM_MAGIC(oinfo->oi_md); - - if (cmd == OBD_BRW_CHECK) { - rc = lov_brw_check(lov, oinfo, oa_bufs, pga); - RETURN(rc); - } - - rc = lov_prep_brw_set(exp, oinfo, oa_bufs, pga, oti, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - struct obd_export *sub_exp; - struct brw_page *sub_pga; - req = list_entry(pos, struct lov_request, rq_link); - - sub_exp = lov->lov_tgts[req->rq_idx]->ltd_exp; - sub_pga = set->set_pga + req->rq_pgaidx; - rc = obd_brw(cmd, sub_exp, &req->rq_oi, req->rq_oabufs, - sub_pga, oti); - if (rc) - break; - lov_update_common_set(set, req, rc); - } - - err = lov_fini_brw_set(set); - if (!rc) - rc = err; - RETURN(rc); -} - -static int lov_brw_interpret(struct ptlrpc_request_set *reqset, void *data, - int rc) -{ - struct lov_request_set *lovset = (struct lov_request_set *)data; - ENTRY; - - if (rc) { - lovset->set_completes = 0; - lov_fini_brw_set(lovset); - } else { - rc = lov_fini_brw_set(lovset); - } - - RETURN(rc); -} - -static int lov_brw_async(int cmd, struct obd_export *exp, - struct obd_info *oinfo, obd_count oa_bufs, - struct brw_page *pga, struct obd_trans_info *oti, - struct ptlrpc_request_set *set) -{ - struct lov_request_set *lovset; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov = &exp->exp_obd->u.lov; - int rc = 0; - ENTRY; - - LASSERT(oinfo); - ASSERT_LSM_MAGIC(oinfo->oi_md); - - if (cmd == OBD_BRW_CHECK) { - rc = lov_brw_check(lov, oinfo, oa_bufs, pga); - RETURN(rc); - } - - rc = lov_prep_brw_set(exp, oinfo, oa_bufs, pga, oti, &lovset); - if (rc) - RETURN(rc); - - list_for_each (pos, &lovset->set_list) { - struct obd_export *sub_exp; - struct brw_page *sub_pga; - req = list_entry(pos, struct lov_request, rq_link); - - sub_exp = lov->lov_tgts[req->rq_idx]->ltd_exp; - sub_pga = lovset->set_pga + req->rq_pgaidx; - rc = obd_brw_async(cmd, sub_exp, &req->rq_oi, req->rq_oabufs, - sub_pga, oti, set); - if (rc) - GOTO(out, rc); - lov_update_common_set(lovset, req, rc); - } - LASSERT(rc == 0); - LASSERT(set->set_interpret == NULL); - LASSERT(set->set_arg == NULL); - rc = ptlrpc_set_add_cb(set, lov_brw_interpret, lovset); - if (rc) - GOTO(out, rc); - - RETURN(rc); -out: - lov_fini_brw_set(lovset); - RETURN(rc); -} - -static int lov_ap_make_ready(void *data, int cmd) -{ - struct lov_async_page *lap = LAP_FROM_COOKIE(data); - - return lap->lap_caller_ops->ap_make_ready(lap->lap_caller_data, cmd); -} - -static int lov_ap_refresh_count(void *data, int cmd) -{ - struct lov_async_page *lap = LAP_FROM_COOKIE(data); - - return lap->lap_caller_ops->ap_refresh_count(lap->lap_caller_data, - cmd); -} - -static void lov_ap_fill_obdo(void *data, int cmd, struct obdo *oa) -{ - struct lov_async_page *lap = LAP_FROM_COOKIE(data); - - lap->lap_caller_ops->ap_fill_obdo(lap->lap_caller_data, cmd, oa); - /* XXX woah, shouldn't we be altering more here? size? */ - oa->o_id = lap->lap_loi_id; - oa->o_stripe_idx = lap->lap_stripe; -} - -static void lov_ap_update_obdo(void *data, int cmd, struct obdo *oa, - obd_valid valid) -{ - struct lov_async_page *lap = LAP_FROM_COOKIE(data); - - lap->lap_caller_ops->ap_update_obdo(lap->lap_caller_data, cmd,oa,valid); -} - -static int lov_ap_completion(void *data, int cmd, struct obdo *oa, int rc) -{ - struct lov_async_page *lap = LAP_FROM_COOKIE(data); - - /* in a raid1 regime this would down a count of many ios - * in flight, onl calling the caller_ops completion when all - * the raid1 ios are complete */ - rc = lap->lap_caller_ops->ap_completion(lap->lap_caller_data,cmd,oa,rc); - return rc; -} - -static struct obd_async_page_ops lov_async_page_ops = { - .ap_make_ready = lov_ap_make_ready, - .ap_refresh_count = lov_ap_refresh_count, - .ap_fill_obdo = lov_ap_fill_obdo, - .ap_update_obdo = lov_ap_update_obdo, - .ap_completion = lov_ap_completion, -}; - -int lov_prep_async_page(struct obd_export *exp, struct lov_stripe_md *lsm, - struct lov_oinfo *loi, cfs_page_t *page, - obd_off offset, struct obd_async_page_ops *ops, - void *data, void **res, int nocache, - struct lustre_handle *lockh) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lov_async_page *lap; - struct lov_lock_handles *lov_lockh = NULL; - int rc = 0; - ENTRY; - - if (!page) { - int i = 0; - /* Find an existing osc so we can get it's stupid sizeof(*oap). - Only because of this layering limitation will a client - mount with no osts fail */ - while (!lov->lov_tgts || !lov->lov_tgts[i] || - !lov->lov_tgts[i]->ltd_exp) { - i++; - if (i >= lov->desc.ld_tgt_count) - RETURN(-ENOMEDIUM); - } - rc = size_round(sizeof(*lap)) + - obd_prep_async_page(lov->lov_tgts[i]->ltd_exp, NULL, - NULL, NULL, 0, NULL, NULL, NULL, 0, - NULL); - RETURN(rc); - } - ASSERT_LSM_MAGIC(lsm); - LASSERT(loi == NULL); - - lap = *res; - lap->lap_magic = LOV_AP_MAGIC; - lap->lap_caller_ops = ops; - lap->lap_caller_data = data; - - /* for now only raid 0 which passes through */ - lap->lap_stripe = lov_stripe_number(lsm, offset); - lov_stripe_offset(lsm, offset, lap->lap_stripe, &lap->lap_sub_offset); - loi = lsm->lsm_oinfo[lap->lap_stripe]; - - /* so the callback doesn't need the lsm */ - lap->lap_loi_id = loi->loi_id; - - lap->lap_sub_cookie = (void *)lap + size_round(sizeof(*lap)); - - if (lockh) { - lov_lockh = lov_handle2llh(lockh); - if (lov_lockh) { - lockh = lov_lockh->llh_handles + lap->lap_stripe; - } - } - - rc = obd_prep_async_page(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, - lsm, loi, page, lap->lap_sub_offset, - &lov_async_page_ops, lap, - &lap->lap_sub_cookie, nocache, lockh); - if (lov_lockh) - lov_llh_put(lov_lockh); - if (rc) - RETURN(rc); - CDEBUG(D_CACHE, "lap %p page %p cookie %p off "LPU64"\n", lap, page, - lap->lap_sub_cookie, offset); - RETURN(0); -} - -static int lov_queue_async_io(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie, - int cmd, obd_off off, int count, - obd_flag brw_flags, obd_flag async_flags) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lov_async_page *lap; - int rc; - - LASSERT(loi == NULL); - - ASSERT_LSM_MAGIC(lsm); - - lap = LAP_FROM_COOKIE(cookie); - - loi = lsm->lsm_oinfo[lap->lap_stripe]; - - rc = obd_queue_async_io(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, lsm, - loi, lap->lap_sub_cookie, cmd, off, count, - brw_flags, async_flags); - RETURN(rc); -} - -static int lov_set_async_flags(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie, - obd_flag async_flags) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lov_async_page *lap; - int rc; - - LASSERT(loi == NULL); - - ASSERT_LSM_MAGIC(lsm); - - lap = LAP_FROM_COOKIE(cookie); - - loi = lsm->lsm_oinfo[lap->lap_stripe]; - - rc = obd_set_async_flags(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, - lsm, loi, lap->lap_sub_cookie, async_flags); - RETURN(rc); -} - -static int lov_queue_group_io(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, - struct obd_io_group *oig, void *cookie, - int cmd, obd_off off, int count, - obd_flag brw_flags, obd_flag async_flags) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lov_async_page *lap; - int rc; - - LASSERT(loi == NULL); - - ASSERT_LSM_MAGIC(lsm); - - lap = LAP_FROM_COOKIE(cookie); - - loi = lsm->lsm_oinfo[lap->lap_stripe]; - - rc = obd_queue_group_io(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, lsm, - loi, oig, lap->lap_sub_cookie, cmd, off, count, - brw_flags, async_flags); - RETURN(rc); -} - -/* this isn't exactly optimal. we may have queued sync io in oscs on - * all stripes, but we don't record that fact at queue time. so we - * trigger sync io on all stripes. */ -static int lov_trigger_group_io(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, - struct obd_io_group *oig) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - int rc = 0, i, err; - - LASSERT(loi == NULL); - - ASSERT_LSM_MAGIC(lsm); - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - loi = lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - - err = obd_trigger_group_io(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, - lsm, loi, oig); - if (rc == 0 && err != 0) - rc = err; - }; - RETURN(rc); -} - -static int lov_teardown_async_page(struct obd_export *exp, - struct lov_stripe_md *lsm, - struct lov_oinfo *loi, void *cookie) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lov_async_page *lap; - int rc; - - LASSERT(loi == NULL); - - ASSERT_LSM_MAGIC(lsm); - - lap = LAP_FROM_COOKIE(cookie); - - loi = lsm->lsm_oinfo[lap->lap_stripe]; - - rc = obd_teardown_async_page(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, - lsm, loi, lap->lap_sub_cookie); - if (rc) { - CERROR("unable to teardown sub cookie %p: %d\n", - lap->lap_sub_cookie, rc); - RETURN(rc); - } - RETURN(rc); -} - -static int lov_enqueue_interpret(struct ptlrpc_request_set *rqset, - void *data, int rc) -{ - struct lov_request_set *lovset = (struct lov_request_set *)data; - ENTRY; - rc = lov_fini_enqueue_set(lovset, lovset->set_ei->ei_mode, rc, rqset); - RETURN(rc); -} - -static int lov_enqueue(struct obd_export *exp, struct obd_info *oinfo, - struct ldlm_enqueue_info *einfo, - struct ptlrpc_request_set *rqset) -{ - ldlm_mode_t mode = einfo->ei_mode; - struct lov_request_set *set; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov; - ldlm_error_t rc; - ENTRY; - - LASSERT(oinfo); - ASSERT_LSM_MAGIC(oinfo->oi_md); - LASSERT(mode == (mode & -mode)); - - /* we should never be asked to replay a lock this way. */ - LASSERT((oinfo->oi_flags & LDLM_FL_REPLAY) == 0); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - rc = lov_prep_enqueue_set(exp, oinfo, einfo, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - rc = obd_enqueue(lov->lov_tgts[req->rq_idx]->ltd_exp, - &req->rq_oi, einfo, rqset); - if (rc != ELDLM_OK) - GOTO(out, rc); - } - - if (rqset && !list_empty(&rqset->set_requests)) { - LASSERT(rc == 0); - LASSERT(rqset->set_interpret == NULL); - rqset->set_interpret = lov_enqueue_interpret; - rqset->set_arg = (void *)set; - RETURN(rc); - } -out: - rc = lov_fini_enqueue_set(set, mode, rc, rqset); - RETURN(rc); -} - -static int lov_match(struct obd_export *exp, struct lov_stripe_md *lsm, - __u32 type, ldlm_policy_data_t *policy, __u32 mode, - int *flags, void *data, struct lustre_handle *lockh) -{ - struct lov_request_set *set; - struct obd_info oinfo; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lustre_handle *lov_lockhp; - int lov_flags, rc = 0; - ENTRY; - - ASSERT_LSM_MAGIC(lsm); - LASSERT((*flags & LDLM_FL_TEST_LOCK) || mode == (mode & -mode)); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - rc = lov_prep_match_set(exp, &oinfo, lsm, policy, mode, lockh, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - ldlm_policy_data_t sub_policy; - req = list_entry(pos, struct lov_request, rq_link); - lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe; - LASSERT(lov_lockhp); - - lov_flags = *flags; - sub_policy.l_extent = req->rq_oi.oi_policy.l_extent; - - rc = obd_match(lov->lov_tgts[req->rq_idx]->ltd_exp, - req->rq_oi.oi_md, type, &sub_policy, - mode, &lov_flags, data, lov_lockhp); - rc = lov_update_match_set(set, req, rc); - if (rc <= 0) - break; - } - lov_fini_match_set(set, mode, *flags); - RETURN(rc); -} - -static int lov_change_cbdata(struct obd_export *exp, - struct lov_stripe_md *lsm, ldlm_iterator_t it, - void *data) -{ - struct lov_obd *lov; - struct lov_oinfo *loi; - int rc = 0, i; - ENTRY; - - ASSERT_LSM_MAGIC(lsm); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - for (i = 0; i < lsm->lsm_stripe_count; i++) { - struct lov_stripe_md submd; - - loi = lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx]) { - CDEBUG(D_HA, "lov idx %d NULL \n", loi->loi_ost_idx); - continue; - } - submd.lsm_object_id = loi->loi_id; - submd.lsm_stripe_count = 0; - rc = obd_change_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, - &submd, it, data); - } - RETURN(rc); -} - -static int lov_cancel(struct obd_export *exp, struct lov_stripe_md *lsm, - __u32 mode, struct lustre_handle *lockh) -{ - struct lov_request_set *set; - struct obd_info oinfo; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lustre_handle *lov_lockhp; - ldlm_mode_t this_mode; - int err = 0, rc = 0; - ENTRY; - - ASSERT_LSM_MAGIC(lsm); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - LASSERT(lockh); - lov = &exp->exp_obd->u.lov; - rc = lov_prep_cancel_set(exp, &oinfo, lsm, mode, lockh, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe; - - /* If this lock was used for a write or truncate, the object - * will have been recreated by the OST, cancel the lock - * (setting LCK_GROUP incidentally causes immediate cancel). */ - if (OST_LVB_IS_ERR(lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_blocks) && - (mode == LCK_PW || mode == LCK_CW)) - this_mode = LCK_GROUP; - else - this_mode = mode; - - rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp, - req->rq_oi.oi_md, this_mode, lov_lockhp); - rc = lov_update_common_set(set, req, rc); - if (rc) { - CERROR("error: cancel objid "LPX64" subobj " - LPX64" on OST idx %d: rc = %d\n", - lsm->lsm_object_id, - req->rq_oi.oi_md->lsm_object_id, - req->rq_idx, rc); - err = rc; - } - - } - lov_fini_cancel_set(set); - RETURN(err); -} - -static int lov_cancel_unused(struct obd_export *exp, - struct lov_stripe_md *lsm, int flags, void *opaque) -{ - struct lov_obd *lov; - struct lov_oinfo *loi; - int rc = 0, i; - ENTRY; - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - if (lsm == NULL) { - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - int err; - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp) - continue; - - err = obd_cancel_unused(lov->lov_tgts[i]->ltd_exp, NULL, - flags, opaque); - if (!rc) - rc = err; - } - RETURN(rc); - } - - ASSERT_LSM_MAGIC(lsm); - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - struct lov_stripe_md submd; - int err; - - loi = lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx]) { - CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx); - continue; - } - - if (!lov->lov_tgts[loi->loi_ost_idx]->ltd_active) - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - - submd.lsm_object_id = loi->loi_id; - submd.lsm_stripe_count = 0; - err = obd_cancel_unused(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, - &submd, flags, opaque); - if (err && lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CERROR("error: cancel unused objid "LPX64" subobj "LPX64 - " on OST idx %d: rc = %d\n", lsm->lsm_object_id, - loi->loi_id, loi->loi_ost_idx, err); - if (!rc) - rc = err; - } - } - RETURN(rc); -} - -static int lov_join_lru(struct obd_export *exp, - struct lov_stripe_md *lsm, int join) -{ - struct lov_obd *lov; - struct lov_oinfo *loi; - int i, count = 0; - ENTRY; - - ASSERT_LSM_MAGIC(lsm); - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - lov = &exp->exp_obd->u.lov; - for (i = 0; i < lsm->lsm_stripe_count; i++) { - struct lov_stripe_md submd; - int rc = 0; - - loi = lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx]) { - CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx); - continue; - } - - if (!lov->lov_tgts[loi->loi_ost_idx]->ltd_active) - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - - submd.lsm_object_id = loi->loi_id; - submd.lsm_stripe_count = 0; - rc = obd_join_lru(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, - &submd, join); - if (rc < 0) { - CERROR("join lru failed. objid: "LPX64" subobj: "LPX64 - " ostidx: %d rc: %d\n", lsm->lsm_object_id, - loi->loi_id, loi->loi_ost_idx, rc); - return rc; - } else { - count += rc; - } - } - RETURN(count); -} - -static int lov_statfs_interpret(struct ptlrpc_request_set *rqset, - void *data, int rc) -{ - struct lov_request_set *lovset = (struct lov_request_set *)data; - int err; - ENTRY; - - if (rc) - lovset->set_completes = 0; - - err = lov_fini_statfs_set(lovset); - RETURN(rc ? rc : err); -} - -static int lov_statfs_async(struct obd_device *obd, struct obd_info *oinfo, - __u64 max_age, struct ptlrpc_request_set *rqset) -{ - struct lov_request_set *set; - struct lov_request *req; - struct list_head *pos; - struct lov_obd *lov; - int rc = 0; - ENTRY; - - LASSERT(oinfo != NULL); - LASSERT(oinfo->oi_osfs != NULL); - - lov = &obd->u.lov; - rc = lov_prep_statfs_set(obd, oinfo, &set); - if (rc) - RETURN(rc); - - list_for_each (pos, &set->set_list) { - struct obd_device *osc_obd; - - req = list_entry(pos, struct lov_request, rq_link); - - osc_obd = class_exp2obd(lov->lov_tgts[req->rq_idx]->ltd_exp); - rc = obd_statfs_async(osc_obd, &req->rq_oi, max_age, rqset); - if (rc) - break; - } - - if (rc || list_empty(&rqset->set_requests)) { - int err; - if (rc) - set->set_completes = 0; - err = lov_fini_statfs_set(set); - RETURN(rc ? rc : err); - } - - LASSERT(rqset->set_interpret == NULL); - rqset->set_interpret = lov_statfs_interpret; - rqset->set_arg = (void *)set; - RETURN(0); -} - -static int lov_statfs(struct obd_device *obd, struct obd_statfs *osfs, - __u64 max_age, __u32 flags) -{ - struct ptlrpc_request_set *set = NULL; - struct obd_info oinfo = { { { 0 } } }; - int rc = 0; - ENTRY; - - /* for obdclass we forbid using obd_statfs_rqset, but prefer using async - * statfs requests */ - set = ptlrpc_prep_set(); - if (set == NULL) - RETURN(-ENOMEM); - - oinfo.oi_osfs = osfs; - oinfo.oi_flags = flags; - rc = lov_statfs_async(obd, &oinfo, max_age, set); - if (rc == 0) - rc = ptlrpc_set_wait(set); - ptlrpc_set_destroy(set); - - RETURN(rc); -} - -static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, - void *karg, void *uarg) -{ - struct obd_device *obddev = class_exp2obd(exp); - struct lov_obd *lov = &obddev->u.lov; - int i, rc, count = lov->desc.ld_tgt_count; - struct obd_uuid *uuidp; - ENTRY; - - switch (cmd) { - case OBD_IOC_LOV_GET_CONFIG: { - struct obd_ioctl_data *data; - struct lov_desc *desc; - char *buf = NULL; - __u32 *genp; - - len = 0; - if (obd_ioctl_getdata(&buf, &len, (void *)uarg)) - RETURN(-EINVAL); - - data = (struct obd_ioctl_data *)buf; - - if (sizeof(*desc) > data->ioc_inllen1) { - obd_ioctl_freedata(buf, len); - RETURN(-EINVAL); - } - - if (sizeof(uuidp->uuid) * count > data->ioc_inllen2) { - obd_ioctl_freedata(buf, len); - RETURN(-EINVAL); - } - - if (sizeof(__u32) * count > data->ioc_inllen3) { - obd_ioctl_freedata(buf, len); - RETURN(-EINVAL); - } - - desc = (struct lov_desc *)data->ioc_inlbuf1; - memcpy(desc, &(lov->desc), sizeof(*desc)); - - uuidp = (struct obd_uuid *)data->ioc_inlbuf2; - genp = (__u32 *)data->ioc_inlbuf3; - /* the uuid will be empty for deleted OSTs */ - for (i = 0; i < count; i++, uuidp++, genp++) { - if (!lov->lov_tgts[i]) - continue; - *uuidp = lov->lov_tgts[i]->ltd_uuid; - *genp = lov->lov_tgts[i]->ltd_gen; - } - - rc = copy_to_user((void *)uarg, buf, len); - if (rc) - rc = -EFAULT; - obd_ioctl_freedata(buf, len); - break; - } - case LL_IOC_LOV_SETSTRIPE: - rc = lov_setstripe(exp, karg, uarg); - break; - case LL_IOC_LOV_GETSTRIPE: - rc = lov_getstripe(exp, karg, uarg); - break; - case LL_IOC_LOV_SETEA: - rc = lov_setea(exp, karg, uarg); - break; - default: { - int set = 0; - - if (count == 0) - RETURN(-ENOTTY); - - rc = 0; - for (i = 0; i < count; i++) { - int err; - - /* OST was disconnected */ - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp) - continue; - - err = obd_iocontrol(cmd, lov->lov_tgts[i]->ltd_exp, - len, karg, uarg); - if (err == -ENODATA && cmd == OBD_IOC_POLL_QUOTACHECK) { - RETURN(err); - } else if (err) { - if (lov->lov_tgts[i]->ltd_active) { - CDEBUG(err == -ENOTTY ? - D_IOCTL : D_WARNING, - "iocontrol OSC %s on OST " - "idx %d cmd %x: err = %d\n", - lov_uuid2str(lov, i), - i, cmd, err); - if (!rc) - rc = err; - } - } else { - set = 1; - } - } - if (!set && !rc) - rc = -EIO; - } - } - - RETURN(rc); -} - -static int lov_get_info(struct obd_export *exp, __u32 keylen, - void *key, __u32 *vallen, void *val) -{ - struct obd_device *obddev = class_exp2obd(exp); - struct lov_obd *lov = &obddev->u.lov; - int i, rc; - ENTRY; - - if (!vallen || !val) - RETURN(-EFAULT); - - lov_getref(obddev); - - if (KEY_IS("lock_to_stripe")) { - struct { - char name[16]; - struct ldlm_lock *lock; - struct lov_stripe_md *lsm; - } *data = key; - struct ldlm_res_id *res_id = &data->lock->l_resource->lr_name; - struct lov_oinfo *loi; - __u32 *stripe = val; - - if (*vallen < sizeof(*stripe)) - GOTO(out, rc = -EFAULT); - *vallen = sizeof(*stripe); - - /* XXX This is another one of those bits that will need to - * change if we ever actually support nested LOVs. It uses - * the lock's export to find out which stripe it is. */ - /* XXX - it's assumed all the locks for deleted OSTs have - * been cancelled. Also, the export for deleted OSTs will - * be NULL and won't match the lock's export. */ - for (i = 0; i < data->lsm->lsm_stripe_count; i++) { - loi = data->lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx]) - continue; - if (lov->lov_tgts[loi->loi_ost_idx]->ltd_exp == - data->lock->l_conn_export && - loi->loi_id == res_id->name[0] && - loi->loi_gr == res_id->name[1]) { - *stripe = i; - GOTO(out, rc = 0); - } - } - LDLM_ERROR(data->lock, "lock on inode without such object"); - dump_lsm(D_ERROR, data->lsm); - GOTO(out, rc = -ENXIO); - } else if (KEY_IS(KEY_LAST_ID)) { - struct obd_id_info *info = val; - __u32 size = sizeof(obd_id); - struct lov_tgt_desc *tgt; - - LASSERT(*vallen == sizeof(struct obd_id_info)); - tgt = lov->lov_tgts[info->idx]; - - if (!tgt || !tgt->ltd_active) - GOTO(out, rc = -ESRCH); - - rc = obd_get_info(tgt->ltd_exp, keylen, key, &size, info->data); - GOTO(out, rc = 0); - } else if (KEY_IS(KEY_LOVDESC)) { - struct lov_desc *desc_ret = val; - *desc_ret = lov->desc; - - GOTO(out, rc = 0); - } else if (KEY_IS(KEY_LOV_IDX)) { - struct lov_tgt_desc *tgt; - - for(i = 0; i < lov->desc.ld_tgt_count; i++) { - tgt = lov->lov_tgts[i]; - if (obd_uuid_equals(val, &tgt->ltd_uuid)) - GOTO(out, rc = i); - } - } - - rc = -EINVAL; -out: - lov_putref(obddev); - RETURN(rc); -} - -static int lov_set_info_async(struct obd_export *exp, obd_count keylen, - void *key, obd_count vallen, void *val, - struct ptlrpc_request_set *set) -{ - struct obd_device *obddev = class_exp2obd(exp); - struct lov_obd *lov = &obddev->u.lov; - obd_count count; - int i, rc = 0, err, incr = 0, check_uuid = 0, do_inactive = 0; - int no_set = !set; - unsigned next_id = 0; - struct lov_tgt_desc *tgt; - void *data; - ENTRY; - - if (no_set) { - set = ptlrpc_prep_set(); - if (!set) - RETURN(-ENOMEM); - } - - lov_getref(obddev); - count = lov->desc.ld_tgt_count; - - if (KEY_IS(KEY_NEXT_ID)) { - count = vallen / sizeof(struct obd_id_info); - vallen = sizeof(obd_id); - incr = sizeof(struct obd_id_info); - do_inactive = 1; - next_id = 1; - } else if (KEY_IS("checksum")) { - do_inactive = 1; - } else if (KEY_IS(KEY_MDS_CONN) || KEY_IS("unlinked")) { - check_uuid = val ? 1 : 0; - } else if (KEY_IS("evict_by_nid")) { - /* use defaults: - do_inactive = incr = 0; - */ - } - - for (i = 0; i < count; i++, val = (char *)val + incr) { - if (next_id) { - tgt = lov->lov_tgts[((struct obd_id_info*)val)->idx]; - data = ((struct obd_id_info*)val)->data; - } else { - tgt = lov->lov_tgts[i]; - data = val; - } - /* OST was disconnected */ - if (!tgt || !tgt->ltd_exp) - continue; - - /* OST is inactive and we don't want inactive OSCs */ - if (!tgt->ltd_active && !do_inactive) - continue; - - /* Only want a specific OSC */ - if (check_uuid && - !obd_uuid_equals(val, &tgt->ltd_uuid)) - continue; - - err = obd_set_info_async(tgt->ltd_exp, - keylen, key, vallen, data, set); - if (!rc) - rc = err; - } - lov_putref(obddev); - if (no_set) { - err = ptlrpc_set_wait(set); - if (!rc) - rc = err; - ptlrpc_set_destroy(set); - } - RETURN(rc); -} - -static int lov_checkmd(struct obd_export *exp, struct obd_export *md_exp, - struct lov_stripe_md *lsm) -{ - int rc; - ENTRY; - - if (!lsm) - RETURN(0); - LASSERT(md_exp); - LASSERT(lsm_op_find(lsm->lsm_magic) != NULL); - rc = lsm_op_find(lsm->lsm_magic)->lsm_revalidate(lsm, md_exp->exp_obd); - - RETURN(rc); -} - -int lov_test_and_clear_async_rc(struct lov_stripe_md *lsm) -{ - struct lov_oinfo *loi; - int i, rc = 0; - ENTRY; - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - loi = lsm->lsm_oinfo[i]; - if (loi->loi_ar.ar_rc && !rc) - rc = loi->loi_ar.ar_rc; - loi->loi_ar.ar_rc = 0; - } - RETURN(rc); -} -EXPORT_SYMBOL(lov_test_and_clear_async_rc); - - -static int lov_extent_calc(struct obd_export *exp, struct lov_stripe_md *lsm, - int cmd, __u64 *offset) -{ - __u64 start; - __u32 ssize = lsm->lsm_stripe_size; - - start = *offset; - do_div(start, ssize); - start = start * ssize; - - CDEBUG(D_DLMTRACE, "offset "LPU64", stripe %u, start "LPU64 - ", end "LPU64"\n", *offset, ssize, start, start + ssize - 1); - if (cmd == OBD_CALC_STRIPE_END) { - *offset = start + ssize - 1; - } else if (cmd == OBD_CALC_STRIPE_START) { - *offset = start; - } else { - LBUG(); - } - - RETURN(0); -} - -#if 0 -struct lov_multi_wait { - struct ldlm_lock *lock; - wait_queue_t wait; - int completed; - int generation; -}; - -int lov_complete_many(struct obd_export *exp, struct lov_stripe_md *lsm, - struct lustre_handle *lockh) -{ - struct lov_lock_handles *lov_lockh = NULL; - struct lustre_handle *lov_lockhp; - struct lov_obd *lov; - struct lov_oinfo *loi; - struct lov_multi_wait *queues; - int rc = 0, i; - ENTRY; - - ASSERT_LSM_MAGIC(lsm); - - if (!exp || !exp->exp_obd) - RETURN(-ENODEV); - - LASSERT(lockh != NULL); - if (lsm->lsm_stripe_count > 1) { - lov_lockh = lov_handle2llh(lockh); - if (lov_lockh == NULL) { - CERROR("LOV: invalid lov lock handle %p\n", lockh); - RETURN(-EINVAL); - } - - lov_lockhp = lov_lockh->llh_handles; - } else { - lov_lockhp = lockh; - } - - OBD_ALLOC(queues, lsm->lsm_stripe_count * sizeof(*queues)); - if (queues == NULL) - GOTO(out, rc = -ENOMEM); - - lov = &exp->exp_obd->u.lov; - for (i = 0, loi = lsm->lsm_oinfo; i < lsm->lsm_stripe_count; - i++, loi++, lov_lockhp++) { - struct ldlm_lock *lock; - struct obd_device *obd; - - lock = ldlm_handle2lock(lov_lockhp); - if (lock == NULL) { - CDEBUG(D_HA, "lov idx %d subobj "LPX64" no lock?\n", - loi->loi_ost_idx, loi->loi_id); - queues[i].completed = 1; - continue; - } - - queues[i].lock = lock; - init_waitqueue_entry(&(queues[i].wait), current); - add_wait_queue(lock->l_waitq, &(queues[i].wait)); - - obd = class_exp2obd(lock->l_conn_export); - if (obd != NULL) - imp = obd->u.cli.cl_import; - if (imp != NULL) { - spin_lock(&imp->imp_lock); - queues[i].generation = imp->imp_generation; - spin_unlock(&imp->imp_lock); - } - } - - lwi = LWI_TIMEOUT_INTR(obd_timeout * HZ, ldlm_expired_completion_wait, - interrupted_completion_wait, &lwd); - rc = l_wait_event_added(check_multi_complete(queues, lsm), &lwi); - - for (i = 0; i < lsm->lsm_stripe_count; i++) - remove_wait_queue(lock->l_waitq, &(queues[i].wait)); - - if (rc == -EINTR || rc == -ETIMEDOUT) { - - - } - - out: - if (lov_lockh != NULL) - lov_llh_put(lov_lockh); - RETURN(rc); -} -#endif - -void lov_stripe_lock(struct lov_stripe_md *md) -{ - LASSERT(md->lsm_lock_owner != cfs_current()); - spin_lock(&md->lsm_lock); - LASSERT(md->lsm_lock_owner == NULL); - md->lsm_lock_owner = cfs_current(); -} -EXPORT_SYMBOL(lov_stripe_lock); - -void lov_stripe_unlock(struct lov_stripe_md *md) -{ - LASSERT(md->lsm_lock_owner == cfs_current()); - md->lsm_lock_owner = NULL; - spin_unlock(&md->lsm_lock); -} -EXPORT_SYMBOL(lov_stripe_unlock); - -struct obd_ops lov_obd_ops = { - .o_owner = THIS_MODULE, - .o_setup = lov_setup, - .o_precleanup = lov_precleanup, - .o_cleanup = lov_cleanup, - .o_process_config = lov_process_config, - .o_connect = lov_connect, - .o_disconnect = lov_disconnect, - .o_statfs = lov_statfs, - .o_statfs_async = lov_statfs_async, - .o_packmd = lov_packmd, - .o_unpackmd = lov_unpackmd, - .o_checkmd = lov_checkmd, - .o_create = lov_create, - .o_destroy = lov_destroy, - .o_getattr = lov_getattr, - .o_getattr_async = lov_getattr_async, - .o_setattr = lov_setattr, - .o_setattr_async = lov_setattr_async, - .o_brw = lov_brw, - .o_brw_async = lov_brw_async, - .o_prep_async_page = lov_prep_async_page, - .o_queue_async_io = lov_queue_async_io, - .o_set_async_flags = lov_set_async_flags, - .o_queue_group_io = lov_queue_group_io, - .o_trigger_group_io = lov_trigger_group_io, - .o_teardown_async_page = lov_teardown_async_page, - .o_merge_lvb = lov_merge_lvb, - .o_adjust_kms = lov_adjust_kms, - .o_punch = lov_punch, - .o_sync = lov_sync, - .o_enqueue = lov_enqueue, - .o_match = lov_match, - .o_change_cbdata = lov_change_cbdata, - .o_cancel = lov_cancel, - .o_cancel_unused = lov_cancel_unused, - .o_join_lru = lov_join_lru, - .o_iocontrol = lov_iocontrol, - .o_get_info = lov_get_info, - .o_set_info_async = lov_set_info_async, - .o_extent_calc = lov_extent_calc, - .o_llog_init = lov_llog_init, - .o_llog_finish = lov_llog_finish, - .o_notify = lov_notify, - .o_register_page_removal_cb = lov_register_page_removal_cb, - .o_unregister_page_removal_cb = lov_unregister_page_removal_cb, - .o_register_lock_cancel_cb = lov_register_lock_cancel_cb, - .o_unregister_lock_cancel_cb = lov_unregister_lock_cancel_cb, -}; - -static quota_interface_t *quota_interface; -extern quota_interface_t lov_quota_interface; - -cfs_mem_cache_t *lov_oinfo_slab; - -int __init lov_init(void) -{ - struct lprocfs_static_vars lvars = { 0 }; - int rc, rc2; - ENTRY; - - lov_oinfo_slab = cfs_mem_cache_create("lov_oinfo", - sizeof(struct lov_oinfo), - 0, SLAB_HWCACHE_ALIGN); - if (lov_oinfo_slab == NULL) - return -ENOMEM; - lprocfs_lov_init_vars(&lvars); - - request_module("lquota"); - quota_interface = PORTAL_SYMBOL_GET(lov_quota_interface); - init_obd_quota_ops(quota_interface, &lov_obd_ops); - - rc = class_register_type(&lov_obd_ops, lvars.module_vars, - LUSTRE_LOV_NAME); - if (rc) { - if (quota_interface) - PORTAL_SYMBOL_PUT(lov_quota_interface); - rc2 = cfs_mem_cache_destroy(lov_oinfo_slab); - LASSERT(rc2 == 0); - } - - RETURN(rc); -} - -#ifdef __KERNEL__ -static void /*__exit*/ lov_exit(void) -{ - int rc; - - if (quota_interface) - PORTAL_SYMBOL_PUT(lov_quota_interface); - - class_unregister_type(LUSTRE_LOV_NAME); - rc = cfs_mem_cache_destroy(lov_oinfo_slab); - LASSERT(rc == 0); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre Logical Object Volume OBD driver"); -MODULE_LICENSE("GPL"); - -cfs_module(lov, LUSTRE_VERSION_STRING, lov_init, lov_exit); -#endif diff --git a/lustre/lov/lov_offset.c b/lustre/lov/lov_offset.c deleted file mode 100644 index 471788239f..0000000000 --- a/lustre/lov/lov_offset.c +++ /dev/null @@ -1,279 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LOV - -#ifdef __KERNEL__ -#include <libcfs/libcfs.h> -#else -#include <liblustre.h> -#endif - -#include <obd_class.h> -#include <obd_lov.h> - -#include "lov_internal.h" - -/* compute object size given "stripeno" and the ost size */ -obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size, - int stripeno) -{ - unsigned long ssize = lsm->lsm_stripe_size; - unsigned long swidth, stripe_size; - int sindex = stripeno; - obd_size lov_size; - int magic = lsm->lsm_magic; - ENTRY; - - if (ost_size == 0) - RETURN(0); - - LASSERT(lsm_op_find(magic) != NULL); - lsm_op_find(magic)->lsm_stripe_by_index(lsm, &stripeno, NULL, &swidth); - - /* do_div(a, b) returns a % b, and a = a / b */ - stripe_size = do_div(ost_size, ssize); - if (stripe_size) - lov_size = ost_size * swidth + stripeno * ssize + stripe_size; - else - lov_size = (ost_size - 1) * swidth + (stripeno + 1) * ssize; - - lov_size += lsm_op_find(magic)->lsm_stripe_offset_by_index(lsm, sindex); - RETURN(lov_size); -} - -/* we have an offset in file backed by an lov and want to find out where - * that offset lands in our given stripe of the file. for the easy - * case where the offset is within the stripe, we just have to scale the - * offset down to make it relative to the stripe instead of the lov. - * - * the harder case is what to do when the offset doesn't intersect the - * stripe. callers will want start offsets clamped ahead to the start - * of the nearest stripe in the file. end offsets similarly clamped to the - * nearest ending byte of a stripe in the file: - * - * all this function does is move offsets to the nearest region of the - * stripe, and it does its work "mod" the full length of all the stripes. - * consider a file with 3 stripes: - * - * S E - * --------------------------------------------------------------------- - * | 0 | 1 | 2 | 0 | 1 | 2 | - * --------------------------------------------------------------------- - * - * to find stripe 1's offsets for S and E, it divides by the full stripe - * width and does its math in the context of a single set of stripes: - * - * S E - * ----------------------------------- - * | 0 | 1 | 2 | - * ----------------------------------- - * - * it'll notice that E is outside stripe 1 and clamp it to the end of the - * stripe, then multiply it back out by lov_off to give the real offsets in - * the stripe: - * - * S E - * --------------------------------------------------------------------- - * | 1 | 1 | 1 | 1 | 1 | 1 | - * --------------------------------------------------------------------- - * - * it would have done similarly and pulled S forward to the start of a 1 - * stripe if, say, S had landed in a 0 stripe. - * - * this rounding isn't always correct. consider an E lov offset that lands - * on a 0 stripe, the "mod stripe width" math will pull it forward to the - * start of a 1 stripe, when in fact it wanted to be rounded back to the end - * of a previous 1 stripe. this logic is handled by callers and this is why: - * - * this function returns < 0 when the offset was "before" the stripe and - * was moved forward to the start of the stripe in question; 0 when it - * falls in the stripe and no shifting was done; > 0 when the offset - * was outside the stripe and was pulled back to its final byte. */ -int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off, - int stripeno, obd_off *obd_off) -{ - unsigned long ssize = lsm->lsm_stripe_size; - unsigned long swidth, stripe_off, this_stripe; - __u64 l_off, s_off; - int magic = lsm->lsm_magic; - int ret = 0; - - if (lov_off == OBD_OBJECT_EOF) { - *obd_off = OBD_OBJECT_EOF; - return 0; - } - - LASSERT(lsm_op_find(magic) != NULL); - /*It will check whether the lov_off and stripeno - *are in the same extent. - *1) lov_off extent < stripeno extent, ret = -1, obd_off = 0 - *2) lov_off extent > stripeno extent, ret = 1, - * obd_off = lov_off extent offset*/ - l_off = lsm_op_find(magic)->lsm_stripe_offset_by_index(lsm, stripeno); - s_off = lsm_op_find(magic)->lsm_stripe_offset_by_offset(lsm, lov_off); - if (s_off < l_off) { - ret = -1; - *obd_off = 0; - return ret; - } else if (s_off > l_off) { - ret = 1; - *obd_off = s_off; - return ret; - } - /*If they are in the same extent, original logic*/ - lsm_op_find(magic)->lsm_stripe_by_index(lsm, &stripeno, &lov_off, - &swidth); - - /* do_div(a, b) returns a % b, and a = a / b */ - stripe_off = do_div(lov_off, swidth); - - this_stripe = stripeno * ssize; - if (stripe_off < this_stripe) { - stripe_off = 0; - ret = -1; - } else { - stripe_off -= this_stripe; - - if (stripe_off >= ssize) { - stripe_off = ssize; - ret = 1; - } - } - - *obd_off = lov_off * ssize + stripe_off; - return ret; -} - -/* Given a whole-file size and a stripe number, give the file size which - * corresponds to the individual object of that stripe. - * - * This behaves basically in the same was as lov_stripe_offset, except that - * file sizes falling before the beginning of a stripe are clamped to the end - * of the previous stripe, not the beginning of the next: - * - * S - * --------------------------------------------------------------------- - * | 0 | 1 | 2 | 0 | 1 | 2 | - * --------------------------------------------------------------------- - * - * if clamped to stripe 2 becomes: - * - * S - * --------------------------------------------------------------------- - * | 0 | 1 | 2 | 0 | 1 | 2 | - * --------------------------------------------------------------------- - */ -obd_off lov_size_to_stripe(struct lov_stripe_md *lsm, obd_off file_size, - int stripeno) -{ - unsigned long ssize = lsm->lsm_stripe_size; - unsigned long swidth, stripe_off, this_stripe; - int magic = lsm->lsm_magic; - - if (file_size == OBD_OBJECT_EOF) - return OBD_OBJECT_EOF; - - LASSERT(lsm_op_find(magic) != NULL); - lsm_op_find(magic)->lsm_stripe_by_index(lsm, &stripeno, &file_size, - &swidth); - - /* do_div(a, b) returns a % b, and a = a / b */ - stripe_off = do_div(file_size, swidth); - - this_stripe = stripeno * ssize; - if (stripe_off < this_stripe) { - /* Move to end of previous stripe, or zero */ - if (file_size > 0) { - file_size--; - stripe_off = ssize; - } else { - stripe_off = 0; - } - } else { - stripe_off -= this_stripe; - - if (stripe_off >= ssize) { - /* Clamp to end of this stripe */ - stripe_off = ssize; - } - } - - return (file_size * ssize + stripe_off); -} - -/* given an extent in an lov and a stripe, calculate the extent of the stripe - * that is contained within the lov extent. this returns true if the given - * stripe does intersect with the lov extent. */ -int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno, - obd_off start, obd_off end, - obd_off *obd_start, obd_off *obd_end) -{ - int start_side, end_side; - - start_side = lov_stripe_offset(lsm, start, stripeno, obd_start); - end_side = lov_stripe_offset(lsm, end, stripeno, obd_end); - - CDEBUG(D_INODE, "["LPU64"->"LPU64"] -> [(%d) "LPU64"->"LPU64" (%d)]\n", - start, end, start_side, *obd_start, *obd_end, end_side); - - /* this stripe doesn't intersect the file extent when neither - * start or the end intersected the stripe and obd_start and - * obd_end got rounded up to the save value. */ - if (start_side != 0 && end_side != 0 && *obd_start == *obd_end) - return 0; - - /* as mentioned in the lov_stripe_offset commentary, end - * might have been shifted in the wrong direction. This - * happens when an end offset is before the stripe when viewed - * through the "mod stripe size" math. we detect it being shifted - * in the wrong direction and touch it up. - * interestingly, this can't underflow since end must be > start - * if we passed through the previous check. - * (should we assert for that somewhere?) */ - if (end_side != 0) - (*obd_end)--; - - return 1; -} - -/* compute which stripe number "lov_off" will be written into */ -int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off) -{ - unsigned long ssize = lsm->lsm_stripe_size; - unsigned long swidth, stripe_off; - obd_off offset = lov_off; - int magic = lsm->lsm_magic; - - LASSERT(lsm_op_find(magic) != NULL); - lsm_op_find(magic)->lsm_stripe_by_offset(lsm, NULL, &lov_off, &swidth); - - stripe_off = do_div(lov_off, swidth); - - return (stripe_off/ssize + - lsm_op_find(magic)->lsm_stripe_index_by_offset(lsm, offset)); -} diff --git a/lustre/lov/lov_pack.c b/lustre/lov/lov_pack.c deleted file mode 100644 index ba8663b72f..0000000000 --- a/lustre/lov/lov_pack.c +++ /dev/null @@ -1,455 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * (Un)packing of OST/MDS requests - * - */ - -#define DEBUG_SUBSYSTEM S_LOV -#ifndef __KERNEL__ -#include <liblustre.h> -#endif - -#include <lustre_net.h> -#include <obd.h> -#include <obd_lov.h> -#include <obd_class.h> -#include <obd_support.h> -#include <lustre/lustre_user.h> - -#include "lov_internal.h" - -void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm) -{ - struct lov_ost_data_v1 *lod; - int i; - - CDEBUG(level, "objid "LPX64", magic 0x%08x, pattern %#x\n", - le64_to_cpu(lmm->lmm_object_id), le32_to_cpu(lmm->lmm_magic), - le32_to_cpu(lmm->lmm_pattern)); - CDEBUG(level,"stripe_size %u, stripe_count %u\n", - le32_to_cpu(lmm->lmm_stripe_size), - le32_to_cpu(lmm->lmm_stripe_count)); - - if (le32_to_cpu(lmm->lmm_stripe_count) <= LOV_V1_INSANE_STRIPE_COUNT) { - for (i = 0, lod = lmm->lmm_objects; - i < (int)le32_to_cpu(lmm->lmm_stripe_count); i++, lod++) - CDEBUG(level, - "stripe %u idx %u subobj "LPX64"/"LPX64"\n", - i, le32_to_cpu(lod->l_ost_idx), - le64_to_cpu(lod->l_object_gr), - le64_to_cpu(lod->l_object_id)); - } else { - CDEBUG(level, "bad stripe_count %u > max_stripe_count %u\n", - le32_to_cpu(lmm->lmm_stripe_count), - LOV_V1_INSANE_STRIPE_COUNT); - } -} - -void lov_dump_lmm_join(int level, struct lov_mds_md_join *lmmj) -{ - - CDEBUG(level, "objid "LPX64", magic 0x%08X, pattern %#X\n", - le64_to_cpu(lmmj->lmmj_md.lmm_object_id), - le32_to_cpu(lmmj->lmmj_md.lmm_magic), - le32_to_cpu(lmmj->lmmj_md.lmm_pattern)); - CDEBUG(level,"stripe_size %u, stripe_count %u extent_count %u \n", - le32_to_cpu(lmmj->lmmj_md.lmm_stripe_size), - le32_to_cpu(lmmj->lmmj_md.lmm_stripe_count), - le32_to_cpu(lmmj->lmmj_extent_count)); -} - -#define LMM_ASSERT(test) \ -do { \ - if (!(test)) lov_dump_lmm(D_ERROR, lmm); \ - LASSERT(test); /* so we know what assertion failed */ \ -} while(0) - -/* Pack LOV object metadata for disk storage. It is packed in LE byte - * order and is opaque to the networking layer. - * - * XXX In the future, this will be enhanced to get the EA size from the - * underlying OSC device(s) to get their EA sizes so we can stack - * LOVs properly. For now lov_mds_md_size() just assumes one obd_id - * per stripe. - */ -int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmmp, - struct lov_stripe_md *lsm) -{ - struct obd_device *obd = class_exp2obd(exp); - struct lov_obd *lov = &obd->u.lov; - struct lov_oinfo *loi; - struct lov_mds_md *lmm; - int stripe_count = lov->desc.ld_tgt_count; - int lmm_size; - int i; - ENTRY; - - if (lsm) { - if (lsm->lsm_magic != LOV_MAGIC) { - CERROR("bad mem LOV MAGIC: 0x%08X != 0x%08X\n", - lsm->lsm_magic, LOV_MAGIC); - RETURN(-EINVAL); - } - if (!lmmp) { - stripe_count = lov_get_stripecnt(lov, lsm->lsm_stripe_count); - lsm->lsm_stripe_count = stripe_count; - } else { - stripe_count = lsm->lsm_stripe_count; - } - } - - /* XXX LOV STACKING call into osc for sizes */ - lmm_size = lov_mds_md_size(stripe_count); - - if (!lmmp) - RETURN(lmm_size); - - if (*lmmp && !lsm) { - stripe_count = le32_to_cpu((*lmmp)->lmm_stripe_count); - OBD_FREE(*lmmp, lov_mds_md_size(stripe_count)); - *lmmp = NULL; - RETURN(0); - } - - if (!*lmmp) { - OBD_ALLOC(*lmmp, lmm_size); - if (!*lmmp) - RETURN(-ENOMEM); - } - - lmm = *lmmp; - lmm->lmm_magic = cpu_to_le32(LOV_MAGIC); /* only write new format */ - - if (!lsm) - RETURN(lmm_size); - - lmm->lmm_object_id = cpu_to_le64(lsm->lsm_object_id); - lmm->lmm_object_gr = cpu_to_le64(lsm->lsm_object_gr); - lmm->lmm_stripe_size = cpu_to_le32(lsm->lsm_stripe_size); - lmm->lmm_stripe_count = cpu_to_le32(stripe_count); - lmm->lmm_pattern = cpu_to_le32(lsm->lsm_pattern); - - for (i = 0; i < stripe_count; i++) { - loi = lsm->lsm_oinfo[i]; - /* XXX LOV STACKING call down to osc_packmd() to do packing */ - LASSERTF(loi->loi_id, "lmm_oid "LPU64" stripe %u/%u idx %u\n", - lmm->lmm_object_id, i, stripe_count, loi->loi_ost_idx); - lmm->lmm_objects[i].l_object_id = cpu_to_le64(loi->loi_id); - lmm->lmm_objects[i].l_object_gr = cpu_to_le64(loi->loi_gr); - lmm->lmm_objects[i].l_ost_gen = cpu_to_le32(loi->loi_ost_gen); - lmm->lmm_objects[i].l_ost_idx = cpu_to_le32(loi->loi_ost_idx); - } - - RETURN(lmm_size); -} - -/* Find the max stripecount we should use */ -int lov_get_stripecnt(struct lov_obd *lov, __u32 stripe_count) -{ - if (!stripe_count) - stripe_count = lov->desc.ld_default_stripe_count; - if (stripe_count > lov->desc.ld_active_tgt_count) - stripe_count = lov->desc.ld_active_tgt_count; - if (!stripe_count) - stripe_count = 1; - /* for now, we limit the stripe count directly, when bug 4424 is - * fixed this needs to be somewhat dynamic based on whether ext3 - * can handle larger EA sizes. */ - if (stripe_count > LOV_MAX_STRIPE_COUNT) - stripe_count = LOV_MAX_STRIPE_COUNT; - - return stripe_count; -} - - -static int lov_verify_lmm(void *lmm, int lmm_bytes, int *stripe_count) -{ - int rc; - - if (lsm_op_find(le32_to_cpu(*(__u32 *)lmm)) == NULL) { - CERROR("bad disk LOV MAGIC: 0x%08X; dumping V1 LMM:\n", - le32_to_cpu(*(__u32 *)lmm)); - lov_dump_lmm_v1(D_WARNING, lmm); - return -EINVAL; - } - rc = lsm_op_find(le32_to_cpu(*(__u32 *)lmm))->lsm_lmm_verify(lmm, - lmm_bytes, stripe_count); - return rc; -} - -int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count, - int pattern, int magic) -{ - int i, lsm_size; - ENTRY; - - CDEBUG(D_INFO, "alloc lsm, stripe_count %d\n", stripe_count); - - *lsmp = lsm_alloc_plain(stripe_count, &lsm_size); - if (!*lsmp) { - CERROR("can't allocate lsmp, stripe_count %d\n", stripe_count); - RETURN(-ENOMEM); - } - - spin_lock_init(&(*lsmp)->lsm_lock); - (*lsmp)->lsm_magic = magic; - (*lsmp)->lsm_stripe_count = stripe_count; - (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES * stripe_count; - (*lsmp)->lsm_pattern = pattern; - (*lsmp)->lsm_oinfo[0]->loi_ost_idx = ~0; - - for (i = 0; i < stripe_count; i++) - loi_init((*lsmp)->lsm_oinfo[i]); - - RETURN(lsm_size); -} - -void lov_free_memmd(struct lov_stripe_md **lsmp) -{ - struct lov_stripe_md *lsm = *lsmp; - - LASSERT(lsm_op_find(lsm->lsm_magic) != NULL); - lsm_op_find(lsm->lsm_magic)->lsm_free(lsm); - - *lsmp = NULL; -} - - -/* Unpack LOV object metadata from disk storage. It is packed in LE byte - * order and is opaque to the networking layer. - */ -int lov_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp, - struct lov_mds_md *lmm, int lmm_bytes) -{ - struct obd_device *obd = class_exp2obd(exp); - struct lov_obd *lov = &obd->u.lov; - int rc = 0, stripe_count, lsm_size; - __u32 magic; - ENTRY; - - /* If passed an MDS struct use values from there, otherwise defaults */ - if (lmm) { - rc = lov_verify_lmm(lmm, lmm_bytes, &stripe_count); - if (rc) - RETURN(rc); - magic = le32_to_cpu(lmm->lmm_magic); - } else { - stripe_count = lov_get_stripecnt(lov, 0); - magic = LOV_MAGIC; - } - - /* If we aren't passed an lsmp struct, we just want the size */ - if (!lsmp) { - /* XXX LOV STACKING call into osc for sizes */ - LBUG(); - RETURN(lov_stripe_md_size(stripe_count)); - } - - /* If we are passed an allocated struct but nothing to unpack, free */ - if (*lsmp && !lmm) { - lov_free_memmd(lsmp); - RETURN(0); - } - - lsm_size = lov_alloc_memmd(lsmp, stripe_count, LOV_PATTERN_RAID0, - magic); - if (lsm_size < 0) - RETURN(lsm_size); - - /* If we are passed a pointer but nothing to unpack, we only alloc */ - if (!lmm) - RETURN(lsm_size); - - LASSERT(lsm_op_find(magic) != NULL); - rc = lsm_op_find(magic)->lsm_unpackmd(lov, *lsmp, lmm); - if (rc) { - lov_free_memmd(lsmp); - RETURN(rc); - } - - RETURN(lsm_size); -} - -/* Configure object striping information on a new file. - * - * @lmmu is a pointer to a user struct with one or more of the fields set to - * indicate the application preference: lmm_stripe_count, lmm_stripe_size, - * lmm_stripe_offset, and lmm_stripe_pattern. lmm_magic must be LOV_MAGIC. - * @lsmp is a pointer to an in-core stripe MD that needs to be filled in. - */ -int lov_setstripe(struct obd_export *exp, struct lov_stripe_md **lsmp, - struct lov_user_md *lump) -{ - struct obd_device *obd = class_exp2obd(exp); - struct lov_obd *lov = &obd->u.lov; - struct lov_user_md lum; - int stripe_count; - int rc; - ENTRY; - - rc = copy_from_user(&lum, lump, sizeof(lum)); - if (rc) - RETURN(-EFAULT); - - if (lum.lmm_magic != LOV_USER_MAGIC) { - if (lum.lmm_magic == __swab32(LOV_USER_MAGIC)) { - lustre_swab_lov_user_md(&lum); - } else { - CDEBUG(D_IOCTL, "bad userland LOV MAGIC:" - " %#08x != %#08x\n", - lum.lmm_magic, LOV_USER_MAGIC); - RETURN(-EINVAL); - } - } - - if (lum.lmm_pattern == 0) { - lum.lmm_pattern = lov->desc.ld_pattern ? - lov->desc.ld_pattern : LOV_PATTERN_RAID0; - } - - if (lum.lmm_pattern != LOV_PATTERN_RAID0) { - CDEBUG(D_IOCTL, "bad userland stripe pattern: %#x\n", - lum.lmm_pattern); - RETURN(-EINVAL); - } - - /* 64kB is the largest common page size we see (ia64), and matches the - * check in lfs */ - if (lum.lmm_stripe_size & (LOV_MIN_STRIPE_SIZE - 1)) { - CDEBUG(D_IOCTL, "stripe size %u not multiple of %u, fixing\n", - lum.lmm_stripe_size, LOV_MIN_STRIPE_SIZE); - lum.lmm_stripe_size = LOV_MIN_STRIPE_SIZE; - } - - if ((lum.lmm_stripe_offset >= lov->desc.ld_tgt_count) && - (lum.lmm_stripe_offset != (typeof(lum.lmm_stripe_offset))(-1))) { - CDEBUG(D_IOCTL, "stripe offset %u > number of OSTs %u\n", - lum.lmm_stripe_offset, lov->desc.ld_tgt_count); - RETURN(-EINVAL); - } - stripe_count = lov_get_stripecnt(lov, lum.lmm_stripe_count); - - if ((__u64)lum.lmm_stripe_size * stripe_count > ~0U) { - CDEBUG(D_IOCTL, "stripe width %ux%u exceeds %u bytes\n", - lum.lmm_stripe_size, (int)lum.lmm_stripe_count, ~0U); - RETURN(-EINVAL); - } - - rc = lov_alloc_memmd(lsmp, stripe_count, lum.lmm_pattern, LOV_MAGIC); - - if (rc < 0) - RETURN(rc); - - (*lsmp)->lsm_oinfo[0]->loi_ost_idx = lum.lmm_stripe_offset; - (*lsmp)->lsm_stripe_size = lum.lmm_stripe_size; - - RETURN(0); -} - -int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp, - struct lov_user_md *lump) -{ - int i; - int rc; - struct obd_export *oexp; - struct lov_obd *lov = &exp->exp_obd->u.lov; - obd_id last_id = 0; - - ENTRY; - for (i = 0; i < lump->lmm_stripe_count; i++) { - __u32 len = sizeof(last_id); - oexp = lov->lov_tgts[lump->lmm_objects[i].l_ost_idx]->ltd_exp; - rc = obd_get_info(oexp, strlen("last_id"), "last_id", - &len, &last_id); - if (rc) - RETURN(rc); - if (lump->lmm_objects[i].l_object_id > last_id) { - CERROR("Setting EA for object > than last id on " - "ost idx %d "LPD64" > "LPD64" \n", - lump->lmm_objects[i].l_ost_idx, - lump->lmm_objects[i].l_object_id, last_id); - RETURN(-EINVAL); - } - } - - rc = lov_setstripe(exp, lsmp, lump); - if (rc) - RETURN(rc); - - for (i = 0; i < lump->lmm_stripe_count; i++) { - (*lsmp)->lsm_oinfo[i]->loi_ost_idx = - lump->lmm_objects[i].l_ost_idx; - (*lsmp)->lsm_oinfo[i]->loi_id = lump->lmm_objects[i].l_object_id; - (*lsmp)->lsm_oinfo[i]->loi_gr = lump->lmm_objects[i].l_object_gr; - } - RETURN(0); -} - - -/* Retrieve object striping information. - * - * @lump is a pointer to an in-core struct with lmm_ost_count indicating - * the maximum number of OST indices which will fit in the user buffer. - * lmm_magic must be LOV_USER_MAGIC. - */ -int lov_getstripe(struct obd_export *exp, struct lov_stripe_md *lsm, - struct lov_user_md *lump) -{ - struct lov_user_md lum; - struct lov_mds_md *lmmk = NULL; - int rc, lmm_size; - ENTRY; - - if (!lsm) - RETURN(-ENODATA); - - rc = copy_from_user(&lum, lump, sizeof(lum)); - if (rc) - RETURN(-EFAULT); - - if (lum.lmm_magic != LOV_USER_MAGIC) - RETURN(-EINVAL); - - rc = lov_packmd(exp, &lmmk, lsm); - if (rc < 0) - RETURN(rc); - lmm_size = rc; - rc = 0; - - /* FIXME: Bug 1185 - copy fields properly when structs change */ - LASSERT(sizeof(lum) == sizeof(*lmmk)); - LASSERT(sizeof(lum.lmm_objects[0]) == sizeof(lmmk->lmm_objects[0])); - - /* User wasn't expecting this many OST entries */ - if (lum.lmm_stripe_count == 0) { - if (copy_to_user(lump, lmmk, sizeof(lum))) - rc = -EFAULT; - } else if (lum.lmm_stripe_count < lmmk->lmm_stripe_count) { - rc = -EOVERFLOW; - } else if (copy_to_user(lump, lmmk, lmm_size)) { - rc = -EFAULT; - } - - obd_free_diskmd(exp, &lmmk); - - RETURN(rc); -} diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c deleted file mode 100644 index 19d06888ec..0000000000 --- a/lustre/lov/lov_qos.c +++ /dev/null @@ -1,956 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LOV - -#ifdef __KERNEL__ -#include <libcfs/libcfs.h> -#else -#include <liblustre.h> -#endif - -#include <obd_class.h> -#include <obd_lov.h> -#include "lov_internal.h" - -/* #define QOS_DEBUG 1 */ -#define D_QOS D_OTHER - -#define TGT_BAVAIL(i) (lov->lov_tgts[i]->ltd_exp->exp_obd->obd_osfs.os_bavail*\ - lov->lov_tgts[i]->ltd_exp->exp_obd->obd_osfs.os_bsize) -#define TGT_FFREE(i) (lov->lov_tgts[i]->ltd_exp->exp_obd->obd_osfs.os_ffree) - - -int qos_add_tgt(struct obd_device *obd, __u32 index) -{ - struct lov_obd *lov = &obd->u.lov; - struct lov_qos_oss *oss, *temposs; - struct obd_export *exp = lov->lov_tgts[index]->ltd_exp; - int rc = 0, found = 0; - ENTRY; - - /* We only need this QOS struct on MDT, not clients - but we may not - * have registered the LOV's observer yet, so there's no way to know */ - if (!exp || !exp->exp_connection) { - CERROR("Missing connection\n"); - RETURN(-ENOTCONN); - } - - down_write(&lov->lov_qos.lq_rw_sem); - mutex_down(&lov->lov_lock); - list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) { - if (obd_uuid_equals(&oss->lqo_uuid, - &exp->exp_connection->c_remote_uuid)) { - found++; - break; - } - } - - if (!found) { - OBD_ALLOC_PTR(oss); - if (!oss) - GOTO(out, rc = -ENOMEM); - memcpy(&oss->lqo_uuid, - &exp->exp_connection->c_remote_uuid, - sizeof(oss->lqo_uuid)); - } else { - /* Assume we have to move this one */ - list_del(&oss->lqo_oss_list); - } - - oss->lqo_ost_count++; - lov->lov_tgts[index]->ltd_qos.ltq_oss = oss; - - /* Add sorted by # of OSTs. Find the first entry that we're - bigger than... */ - list_for_each_entry(temposs, &lov->lov_qos.lq_oss_list, lqo_oss_list) { - if (oss->lqo_ost_count > temposs->lqo_ost_count) - break; - } - /* ...and add before it. If we're the first or smallest, temposs - points to the list head, and we add to the end. */ - list_add_tail(&oss->lqo_oss_list, &temposs->lqo_oss_list); - - lov->lov_qos.lq_dirty = 1; - lov->lov_qos.lq_dirty_rr = 1; - - CDEBUG(D_QOS, "add tgt %s to OSS %s (%d OSTs)\n", - obd_uuid2str(&lov->lov_tgts[index]->ltd_uuid), - obd_uuid2str(&oss->lqo_uuid), - oss->lqo_ost_count); - -out: - mutex_up(&lov->lov_lock); - up_write(&lov->lov_qos.lq_rw_sem); - RETURN(rc); -} - -int qos_del_tgt(struct obd_device *obd, __u32 index) -{ - struct lov_obd *lov = &obd->u.lov; - struct lov_qos_oss *oss; - int rc = 0; - ENTRY; - - if (!lov->lov_tgts[index]) - RETURN(0); - - down_write(&lov->lov_qos.lq_rw_sem); - - oss = lov->lov_tgts[index]->ltd_qos.ltq_oss; - if (!oss) - GOTO(out, rc = -ENOENT); - - oss->lqo_ost_count--; - if (oss->lqo_ost_count == 0) { - CDEBUG(D_QOS, "removing OSS %s\n", - obd_uuid2str(&oss->lqo_uuid)); - list_del(&oss->lqo_oss_list); - OBD_FREE_PTR(oss); - } - - lov->lov_qos.lq_dirty = 1; - lov->lov_qos.lq_dirty_rr = 1; -out: - up_write(&lov->lov_qos.lq_rw_sem); - RETURN(rc); -} - -/* Recalculate per-object penalties for OSSs and OSTs, - depends on size of each ost in an oss */ -static int qos_calc_ppo(struct obd_device *obd) -{ - struct lov_obd *lov = &obd->u.lov; - struct lov_qos_oss *oss; - __u64 ba_max, ba_min, temp; - __u32 num_active; - int rc, i, prio_wide; - ENTRY; - - if (!lov->lov_qos.lq_dirty) - GOTO(out, rc = 0); - - num_active = lov->desc.ld_active_tgt_count - 1; - if (num_active < 1) - GOTO(out, rc = -EAGAIN); - - /* find bavail on each OSS */ - list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) { - oss->lqo_bavail = 0; - } - lov->lov_qos.lq_active_oss_count = 0; - - /* How badly user wants to select osts "widely" (not recently chosen - and not on recent oss's). As opposed to "freely" (free space - avail.) 0-256. */ - prio_wide = 256 - lov->lov_qos.lq_prio_free; - - ba_min = (__u64)(-1); - ba_max = 0; - /* Calculate OST penalty per object */ - /* (lov ref taken in alloc_qos) */ - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) - continue; - temp = TGT_BAVAIL(i); - if (!temp) - continue; - ba_min = min(temp, ba_min); - ba_max = max(temp, ba_max); - - /* Count the number of usable OSS's */ - if (lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_bavail == 0) - lov->lov_qos.lq_active_oss_count++; - lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_bavail += temp; - - /* per-OST penalty is prio * TGT_bavail / (num_ost - 1) / 2 */ - temp >>= 1; - do_div(temp, num_active); - lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj = - (temp * prio_wide) >> 8; - - if (lov->lov_qos.lq_reset == 0) - lov->lov_tgts[i]->ltd_qos.ltq_penalty = 0; - } - - num_active = lov->lov_qos.lq_active_oss_count - 1; - if (num_active < 1) { - /* If there's only 1 OSS, we can't penalize it, so instead - we have to double the OST penalty */ - num_active = 1; - for (i = 0; i < lov->desc.ld_tgt_count; i++) - if (lov->lov_tgts[i]) - lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj <<= 1; - } - - /* Per-OSS penalty is prio * oss_avail / oss_osts / (num_oss - 1) / 2 */ - list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) { - temp = oss->lqo_bavail >> 1; - do_div(temp, oss->lqo_ost_count * num_active); - oss->lqo_penalty_per_obj = (temp * prio_wide) >> 8; - if (lov->lov_qos.lq_reset == 0) - oss->lqo_penalty = 0; - } - - lov->lov_qos.lq_dirty = 0; - lov->lov_qos.lq_reset = 0; - - /* If each ost has almost same free space, - * do rr allocation for better creation performance */ - lov->lov_qos.lq_same_space = 0; - temp = ba_max - ba_min; - ba_min = (ba_min * 51) >> 8; /* 51/256 = .20 */ - if (temp < ba_min) { - /* Difference is less than 20% */ - lov->lov_qos.lq_same_space = 1; - /* Reset weights for the next time we enter qos mode */ - lov->lov_qos.lq_reset = 0; - } - rc = 0; - -out: - if (!rc && lov->lov_qos.lq_same_space) - RETURN(-EAGAIN); - RETURN(rc); -} - -static int qos_calc_weight(struct lov_obd *lov, int i) -{ - __u64 temp, temp2; - - /* Final ost weight = TGT_BAVAIL - ost_penalty - oss_penalty */ - temp = TGT_BAVAIL(i); - temp2 = lov->lov_tgts[i]->ltd_qos.ltq_penalty + - lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_penalty; - if (temp < temp2) - lov->lov_tgts[i]->ltd_qos.ltq_weight = 0; - else - lov->lov_tgts[i]->ltd_qos.ltq_weight = temp - temp2; - return 0; -} - -/* We just used this index for a stripe; adjust everyone's weights */ -static int qos_used(struct lov_obd *lov, __u32 index, __u64 *total_wt) -{ - struct lov_qos_oss *oss; - int i; - ENTRY; - - /* Don't allocate from this stripe anymore, until the next alloc_qos */ - lov->lov_tgts[index]->ltd_qos.ltq_usable = 0; - - oss = lov->lov_tgts[index]->ltd_qos.ltq_oss; - - /* Decay old penalty by half (we're adding max penalty, and don't - want it to run away.) */ - lov->lov_tgts[index]->ltd_qos.ltq_penalty >>= 1; - oss->lqo_penalty >>= 1; - - /* Set max penalties for this OST and OSS */ - lov->lov_tgts[index]->ltd_qos.ltq_penalty += - lov->lov_tgts[index]->ltd_qos.ltq_penalty_per_obj * - lov->desc.ld_active_tgt_count; - oss->lqo_penalty += oss->lqo_penalty_per_obj * - lov->lov_qos.lq_active_oss_count; - - /* Decrease all OSS penalties */ - list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) { - if (oss->lqo_penalty < oss->lqo_penalty_per_obj) - oss->lqo_penalty = 0; - else - oss->lqo_penalty -= oss->lqo_penalty_per_obj; - } - - *total_wt = 0; - /* Decrease all OST penalties */ - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) - continue; - if (lov->lov_tgts[i]->ltd_qos.ltq_penalty < - lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj) - lov->lov_tgts[i]->ltd_qos.ltq_penalty = 0; - else - lov->lov_tgts[i]->ltd_qos.ltq_penalty -= - lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj; - - qos_calc_weight(lov, i); - - /* Recalc the total weight of usable osts */ - if (lov->lov_tgts[i]->ltd_qos.ltq_usable) - *total_wt += lov->lov_tgts[i]->ltd_qos.ltq_weight; - -#ifdef QOS_DEBUG - CDEBUG(D_QOS, "recalc tgt %d avail="LPU64 - " ostppo="LPU64" ostp="LPU64" ossppo="LPU64 - " ossp="LPU64" wt="LPU64"\n", - i, TGT_BAVAIL(i) >> 10, - lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj >> 10, - lov->lov_tgts[i]->ltd_qos.ltq_penalty >> 10, - lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_penalty_per_obj>>10, - lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_penalty>>10, - lov->lov_tgts[i]->ltd_qos.ltq_weight>>10); -#endif - } - - RETURN(0); -} - -#define LOV_QOS_EMPTY ((__u32)-1) -/* compute optimal round-robin order, based on OSTs per OSS */ -static int qos_calc_rr(struct lov_obd *lov) -{ - struct lov_qos_oss *oss; - unsigned ost_count, placed, real_count; - int i; - ENTRY; - - if (!lov->lov_qos.lq_dirty_rr) { - LASSERT(lov->lov_qos.lq_rr_size); - RETURN(0); - } - - down_write(&lov->lov_qos.lq_rw_sem); - ost_count = lov->desc.ld_tgt_count; - - if (lov->lov_qos.lq_rr_size) - OBD_FREE(lov->lov_qos.lq_rr_array, lov->lov_qos.lq_rr_size); - lov->lov_qos.lq_rr_size = ost_count * - sizeof(lov->lov_qos.lq_rr_array[0]); - OBD_ALLOC(lov->lov_qos.lq_rr_array, lov->lov_qos.lq_rr_size); - if (!lov->lov_qos.lq_rr_array) { - lov->lov_qos.lq_rr_size = 0; - up_write(&lov->lov_qos.lq_rw_sem); - RETURN(-ENOMEM); - } - - real_count = 0; - for (i = 0; i < ost_count; i++) { - lov->lov_qos.lq_rr_array[i] = LOV_QOS_EMPTY; - if (lov->lov_tgts[i]) - real_count++; - } - - /* Place all the OSTs from 1 OSS at the same time. */ - placed = 0; - list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) { - int j = 0; - for (i = 0; i < ost_count; i++) { - if (lov->lov_tgts[i] && - (lov->lov_tgts[i]->ltd_qos.ltq_oss == oss)) { - /* Evenly space these OSTs across arrayspace */ - int next = j * ost_count / oss->lqo_ost_count; - while (lov->lov_qos.lq_rr_array[next] != - LOV_QOS_EMPTY) - next = (next + 1) % ost_count; - lov->lov_qos.lq_rr_array[next] = i; - j++; - placed++; - } - } - LASSERT(j == oss->lqo_ost_count); - } - - lov->lov_qos.lq_dirty_rr = 0; - up_write(&lov->lov_qos.lq_rw_sem); - - if (placed != real_count) { - /* This should never happen */ - LCONSOLE_ERROR_MSG(0x14e, "Failed to place all OSTs in the " - "round-robin list (%d of %d).\n", - placed, real_count); - for (i = 0; i < ost_count; i++) { - LCONSOLE(D_WARNING, "rr #%d ost idx=%d\n", i, - lov->lov_qos.lq_rr_array[i]); - } - lov->lov_qos.lq_dirty_rr = 1; - RETURN(-EAGAIN); - } - -#ifdef QOS_DEBUG - for (i = 0; i < ost_count; i++) { - LCONSOLE(D_QOS, "rr #%d ost idx=%d\n", i, - lov->lov_qos.lq_rr_array[i]); - } -#endif - - RETURN(0); -} - - -void qos_shrink_lsm(struct lov_request_set *set) -{ - struct lov_stripe_md *lsm = set->set_oi->oi_md, *lsm_new; - /* XXX LOV STACKING call into osc for sizes */ - unsigned oldsize, newsize; - - if (set->set_oti && set->set_cookies && set->set_cookie_sent) { - struct llog_cookie *cookies; - oldsize = lsm->lsm_stripe_count * sizeof(*cookies); - newsize = set->set_count * sizeof(*cookies); - - cookies = set->set_cookies; - oti_alloc_cookies(set->set_oti, set->set_count); - if (set->set_oti->oti_logcookies) { - memcpy(set->set_oti->oti_logcookies, cookies, newsize); - OBD_FREE(cookies, oldsize); - set->set_cookies = set->set_oti->oti_logcookies; - } else { - CWARN("'leaking' %d bytes\n", oldsize - newsize); - } - } - - CWARN("using fewer stripes for object "LPU64": old %u new %u\n", - lsm->lsm_object_id, lsm->lsm_stripe_count, set->set_count); - LASSERT(lsm->lsm_stripe_count >= set->set_count); - - newsize = lov_stripe_md_size(set->set_count); - OBD_ALLOC(lsm_new, newsize); - if (lsm_new != NULL) { - int i; - memcpy(lsm_new, lsm, sizeof(*lsm)); - for (i = 0; i < lsm->lsm_stripe_count; i++) { - if (i < set->set_count) { - lsm_new->lsm_oinfo[i] = lsm->lsm_oinfo[i]; - continue; - } - OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab, - sizeof(struct lov_oinfo)); - } - lsm_new->lsm_stripe_count = set->set_count; - OBD_FREE(lsm, sizeof(struct lov_stripe_md) + - lsm->lsm_stripe_count * sizeof(struct lov_oinfo *)); - set->set_oi->oi_md = lsm_new; - } else { - CWARN("'leaking' few bytes\n"); - } -} - -int qos_remedy_create(struct lov_request_set *set, struct lov_request *req) -{ - struct lov_stripe_md *lsm = set->set_oi->oi_md; - struct lov_obd *lov = &set->set_exp->exp_obd->u.lov; - unsigned ost_idx, ost_count = lov->desc.ld_tgt_count; - int stripe, i, rc = -EIO; - ENTRY; - - ost_idx = (req->rq_idx + lsm->lsm_stripe_count) % ost_count; - for (i = 0; i < ost_count; i++, ost_idx = (ost_idx + 1) % ost_count) { - if (!lov->lov_tgts[ost_idx] || - !lov->lov_tgts[ost_idx]->ltd_active) - continue; - /* check if objects has been created on this ost */ - for (stripe = 0; stripe < lsm->lsm_stripe_count; stripe++) { - if (stripe == req->rq_stripe) - continue; - if (ost_idx == lsm->lsm_oinfo[stripe]->loi_ost_idx) - break; - } - - if (stripe >= lsm->lsm_stripe_count) { - req->rq_idx = ost_idx; - rc = obd_create(lov->lov_tgts[ost_idx]->ltd_exp, - req->rq_oi.oi_oa, &req->rq_oi.oi_md, - set->set_oti); - if (!rc) - break; - } - } - RETURN(rc); -} - -static int min_stripe_count(int stripe_cnt, int flags) -{ - return (flags & LOV_USES_DEFAULT_STRIPE ? - stripe_cnt - (stripe_cnt / 4) : stripe_cnt); -} - -#define LOV_CREATE_RESEED_MULT 4 -#define LOV_CREATE_RESEED_MIN 1000 -/* Allocate objects on osts with round-robin algorithm */ -static int alloc_rr(struct lov_obd *lov, int *idx_arr, int *stripe_cnt, - int flags) -{ - unsigned array_idx, ost_count = lov->desc.ld_tgt_count; - unsigned ost_active_count = lov->desc.ld_active_tgt_count; - int i, *idx_pos; - __u32 ost_idx; - int ost_start_idx_temp; - int speed = 0; - int stripe_cnt_min = min_stripe_count(*stripe_cnt, flags); - ENTRY; - - i = qos_calc_rr(lov); - if (i) - RETURN(i); - - if (--lov->lov_start_count <= 0) { - lov->lov_start_idx = ll_rand() % ost_count; - lov->lov_start_count = - (LOV_CREATE_RESEED_MIN / max(ost_active_count, 1U) + - LOV_CREATE_RESEED_MULT) * max(ost_active_count, 1U); - } else if (stripe_cnt_min >= ost_active_count || - lov->lov_start_idx > ost_count) { - /* If we have allocated from all of the OSTs, slowly - * precess the next start if the OST/stripe count isn't - * already doing this for us. */ - lov->lov_start_idx %= ost_count; - if (*stripe_cnt > 1 && (ost_active_count % (*stripe_cnt)) != 1) - ++lov->lov_offset_idx; - } - down_read(&lov->lov_qos.lq_rw_sem); - ost_start_idx_temp = lov->lov_start_idx; - -repeat_find : - array_idx = (lov->lov_start_idx + lov->lov_offset_idx) % ost_count; - idx_pos = idx_arr; -#ifdef QOS_DEBUG - CDEBUG(D_QOS, "want %d startidx %d startcnt %d offset %d active %d " - "count %d arrayidx %d\n", - stripe_cnt, lov->lov_start_idx, lov->lov_start_count, - lov->lov_offset_idx, ost_active_count, ost_count, array_idx); -#endif - - for (i = 0; i < ost_count; i++, array_idx=(array_idx + 1) % ost_count) { - ++lov->lov_start_idx; - ost_idx = lov->lov_qos.lq_rr_array[array_idx]; -#ifdef QOS_DEBUG - CDEBUG(D_QOS, "#%d strt %d act %d strp %d ary %d idx %d\n", - i, lov->lov_start_idx, - ((ost_idx != LOV_QOS_EMPTY) && lov->lov_tgts[ost_idx]) ? - lov->lov_tgts[ost_idx]->ltd_active : 0, - idx_pos - idx_arr, array_idx, ost_idx); -#endif - if ((ost_idx == LOV_QOS_EMPTY) || !lov->lov_tgts[ost_idx] || - !lov->lov_tgts[ost_idx]->ltd_active) - continue; - - /* Fail Check before osc_precreate() is called - so we can only 'fail' single OSC. */ - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && ost_idx == 0) - continue; - - /* Drop slow OSCs if we can */ - if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp) > speed) - continue; - - *idx_pos = ost_idx; - idx_pos++; - /* We have enough stripes */ - if (idx_pos - idx_arr == *stripe_cnt) - break; - } - if ((speed < 2) && (idx_pos - idx_arr < stripe_cnt_min)) { - /* Try again, allowing slower OSCs */ - speed++; - lov->lov_start_idx = ost_start_idx_temp; - goto repeat_find; - } - - up_read(&lov->lov_qos.lq_rw_sem); - - *stripe_cnt = idx_pos - idx_arr; - RETURN(0); -} - -/* alloc objects on osts with specific stripe offset */ -static int alloc_specific(struct lov_obd *lov, struct lov_stripe_md *lsm, - int *idx_arr) -{ - unsigned ost_idx, ost_count = lov->desc.ld_tgt_count; - int i, *idx_pos; - int speed = 0; - ENTRY; - -repeat_find: - ost_idx = lsm->lsm_oinfo[0]->loi_ost_idx; - idx_pos = idx_arr; - for (i = 0; i < ost_count; i++, ost_idx = (ost_idx + 1) % ost_count) { - if (!lov->lov_tgts[ost_idx] || - !lov->lov_tgts[ost_idx]->ltd_active) { - continue; - } - - /* Fail Check before osc_precreate() is called - so we can only 'fail' single OSC. */ - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && ost_idx == 0) - continue; - - /* Drop slow OSCs if we can, but not for requested start idx */ - if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp) > speed && - (i != 0 || speed < 2)) - continue; - - *idx_pos = ost_idx; - idx_pos++; - /* We have enough stripes */ - if (idx_pos - idx_arr == lsm->lsm_stripe_count) - RETURN(0); - } - if (speed < 2) { - /* Try again, allowing slower OSCs */ - speed++; - goto repeat_find; - } - - /* If we were passed specific striping params, then a failure to - * meet those requirements is an error, since we can't reallocate - * that memory (it might be part of a larger array or something). - * - * We can only get here if lsm_stripe_count was originally > 1. - */ - CERROR("can't lstripe objid "LPX64": have "LPSZ" want %u\n", - lsm->lsm_object_id, idx_pos - idx_arr, lsm->lsm_stripe_count); - RETURN(-EFBIG); -} - -/* Alloc objects on osts with optimization based on: - - free space - - network resources (shared OSS's) -*/ -static int alloc_qos(struct obd_export *exp, int *idx_arr, int *stripe_cnt, - int flags) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - static time_t last_warn = 0; - time_t now = cfs_time_current_sec(); - __u64 total_bavail, total_weight = 0; - __u32 ost_count; - int nfound, good_osts, i, warn = 0, rc = 0; - int stripe_cnt_min = min_stripe_count(*stripe_cnt, flags); - ENTRY; - - if (stripe_cnt_min < 1) - GOTO(out, rc = -EINVAL); - - lov_getref(exp->exp_obd); - down_write(&lov->lov_qos.lq_rw_sem); - - ost_count = lov->desc.ld_tgt_count; - - if (lov->desc.ld_active_tgt_count < 2) - GOTO(out, rc = -EAGAIN); - - rc = qos_calc_ppo(exp->exp_obd); - if (rc) - GOTO(out, rc); - - total_bavail = 0; - good_osts = 0; - /* Warn users about zero available space/inode every 30 min */ - if (cfs_time_sub(now, last_warn) > 60 * 30) - warn = 1; - /* Find all the OSTs that are valid stripe candidates */ - for (i = 0; i < ost_count; i++) { - __u64 bavail; - - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) - continue; - bavail = TGT_BAVAIL(i); - if (!bavail) { - if (warn) { - CDEBUG(D_QOS, "no free space on %s\n", - obd_uuid2str(&lov->lov_tgts[i]->ltd_uuid)); - last_warn = now; - } - continue; - } - if (!TGT_FFREE(i)) { - if (warn) { - CDEBUG(D_QOS, "no free inodes on %s\n", - obd_uuid2str(&lov->lov_tgts[i]->ltd_uuid)); - last_warn = now; - } - continue; - } - - /* Fail Check before osc_precreate() is called - so we can only 'fail' single OSC. */ - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && i == 0) - continue; - - if (obd_precreate(lov->lov_tgts[i]->ltd_exp) > 2) - continue; - - lov->lov_tgts[i]->ltd_qos.ltq_usable = 1; - qos_calc_weight(lov, i); - total_bavail += bavail; - total_weight += lov->lov_tgts[i]->ltd_qos.ltq_weight; - - good_osts++; - } - - if (good_osts < stripe_cnt_min) - GOTO(out, rc = -EAGAIN); - - if (!total_bavail) - GOTO(out, rc = -ENOSPC); - - /* We have enough osts */ - if (good_osts < *stripe_cnt) - *stripe_cnt = good_osts; - - /* Find enough OSTs with weighted random allocation. */ - nfound = 0; - while (nfound < *stripe_cnt) { - __u64 rand, cur_weight; - - cur_weight = 0; - rc = -ENODEV; - - if (total_weight) { -#if BITS_PER_LONG == 32 - rand = ll_rand() % (unsigned)total_weight; - /* If total_weight > 32-bit, first generate the high - * 32 bits of the random number, then add in the low - * 32 bits (truncated to the upper limit, if needed) */ - if (total_weight > 0xffffffffULL) - rand = (__u64)(ll_rand() % - (unsigned)(total_weight >> 32)) << 32; - else - rand = 0; - - if (rand == (total_weight & 0xffffffff00000000ULL)) - rand |= ll_rand() % (unsigned)total_weight; - else - rand |= ll_rand(); - -#else - rand = ((__u64)ll_rand() << 32 | ll_rand()) % - total_weight; -#endif - } else { - rand = 0; - } - - /* On average, this will hit larger-weighted osts more often. - 0-weight osts will always get used last (only when rand=0).*/ - for (i = 0; i < ost_count; i++) { - if (!lov->lov_tgts[i] || - !lov->lov_tgts[i]->ltd_qos.ltq_usable) - continue; - - cur_weight += lov->lov_tgts[i]->ltd_qos.ltq_weight; - if (cur_weight >= rand) { -#ifdef QOS_DEBUG - CDEBUG(D_QOS, "assigned stripe=%d to idx=%d\n", - nfound, i); -#endif - idx_arr[nfound++] = i; - qos_used(lov, i, &total_weight); - rc = 0; - break; - } - } - /* should never satisfy below condition */ - if (rc) { - CERROR("Didn't find any OSTs?\n"); - break; - } - } - LASSERT(nfound == *stripe_cnt); - -out: - up_write(&lov->lov_qos.lq_rw_sem); - - if (rc == -EAGAIN) - rc = alloc_rr(lov, idx_arr, stripe_cnt, flags); - - lov_putref(exp->exp_obd); - RETURN(rc); -} - -/* return new alloced stripe count on success */ -static int alloc_idx_array(struct obd_export *exp, struct lov_stripe_md *lsm, - int newea, int **idx_arr, int *arr_cnt, int flags) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - int stripe_cnt = lsm->lsm_stripe_count; - int i, rc = 0; - int *tmp_arr = NULL; - ENTRY; - - *arr_cnt = stripe_cnt; - OBD_ALLOC(tmp_arr, *arr_cnt * sizeof(int)); - if (tmp_arr == NULL) - RETURN(-ENOMEM); - for (i = 0; i < *arr_cnt; i++) - tmp_arr[i] = -1; - - if (newea || - lsm->lsm_oinfo[0]->loi_ost_idx >= lov->desc.ld_tgt_count) - rc = alloc_qos(exp, tmp_arr, &stripe_cnt, flags); - else - rc = alloc_specific(lov, lsm, tmp_arr); - - if (rc) - GOTO(out_arr, rc); - - *idx_arr = tmp_arr; - RETURN(stripe_cnt); -out_arr: - OBD_FREE(tmp_arr, *arr_cnt * sizeof(int)); - *arr_cnt = 0; - RETURN(rc); -} - -static void free_idx_array(int *idx_arr, int arr_cnt) -{ - if (arr_cnt) - OBD_FREE(idx_arr, arr_cnt * sizeof(int)); -} - -int qos_prep_create(struct obd_export *exp, struct lov_request_set *set) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lov_stripe_md *lsm; - struct obdo *src_oa = set->set_oi->oi_oa; - struct obd_trans_info *oti = set->set_oti; - int i, stripes, rc = 0, newea = 0; - int flag = LOV_USES_ASSIGNED_STRIPE; - int *idx_arr = NULL, idx_cnt = 0; - ENTRY; - - LASSERT(src_oa->o_valid & OBD_MD_FLID); - - if (set->set_oi->oi_md == NULL) { - int stripes_def = lov_get_stripecnt(lov, 0); - - /* If the MDS file was truncated up to some size, stripe over - * enough OSTs to allow the file to be created at that size. - * This may mean we use more than the default # of stripes. */ - if (src_oa->o_valid & OBD_MD_FLSIZE) { - obd_size min_bavail = LUSTRE_STRIPE_MAXBYTES; - - /* Find a small number of stripes we can use - (up to # of active osts). */ - stripes = 1; - lov_getref(exp->exp_obd); - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || - !lov->lov_tgts[i]->ltd_active) - continue; - min_bavail = min(min_bavail, TGT_BAVAIL(i)); - if (min_bavail * stripes > src_oa->o_size) - break; - stripes++; - } - lov_putref(exp->exp_obd); - - if (stripes < stripes_def) - stripes = stripes_def; - } else { - flag = LOV_USES_DEFAULT_STRIPE; - stripes = stripes_def; - } - - rc = lov_alloc_memmd(&set->set_oi->oi_md, stripes, - lov->desc.ld_pattern ? - lov->desc.ld_pattern : LOV_PATTERN_RAID0, - LOV_MAGIC); - if (rc < 0) - GOTO(out_err, rc); - newea = 1; - rc = 0; - } - - lsm = set->set_oi->oi_md; - lsm->lsm_object_id = src_oa->o_id; - if (!lsm->lsm_stripe_size) - lsm->lsm_stripe_size = lov->desc.ld_default_stripe_size; - if (!lsm->lsm_pattern) { - LASSERT(lov->desc.ld_pattern); - lsm->lsm_pattern = lov->desc.ld_pattern; - } - - stripes = alloc_idx_array(exp, lsm, newea, &idx_arr, &idx_cnt, flag); - if (stripes <= 0) - GOTO(out_err, rc = stripes ? stripes : -EIO); - LASSERTF(stripes <= lsm->lsm_stripe_count,"requested %d allocated %d\n", - lsm->lsm_stripe_count, stripes); - - for (i = 0; i < stripes; i++) { - struct lov_request *req; - int ost_idx = idx_arr[i]; - LASSERT(ost_idx >= 0); - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_err, rc = -ENOMEM); - lov_set_add_req(req, set); - - req->rq_buflen = sizeof(*req->rq_oi.oi_md); - OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen); - if (req->rq_oi.oi_md == NULL) - GOTO(out_err, rc = -ENOMEM); - - OBDO_ALLOC(req->rq_oi.oi_oa); - if (req->rq_oi.oi_oa == NULL) - GOTO(out_err, rc = -ENOMEM); - - req->rq_idx = ost_idx; - req->rq_stripe = i; - /* create data objects with "parent" OA */ - memcpy(req->rq_oi.oi_oa, src_oa, sizeof(*req->rq_oi.oi_oa)); - - /* XXX When we start creating objects on demand, we need to - * make sure that we always create the object on the - * stripe which holds the existing file size. - */ - if (src_oa->o_valid & OBD_MD_FLSIZE) { - req->rq_oi.oi_oa->o_size = - lov_size_to_stripe(lsm, src_oa->o_size, i); - - CDEBUG(D_INODE, "stripe %d has size "LPU64"/"LPU64"\n", - i, req->rq_oi.oi_oa->o_size, src_oa->o_size); - } - - } - LASSERT(set->set_count == stripes); - - if (stripes < lsm->lsm_stripe_count) - qos_shrink_lsm(set); - - if (oti && (src_oa->o_valid & OBD_MD_FLCOOKIE)) { - oti_alloc_cookies(oti, set->set_count); - if (!oti->oti_logcookies) - GOTO(out_err, rc = -ENOMEM); - set->set_cookies = oti->oti_logcookies; - } -out_err: - if (newea && rc) - obd_free_memmd(exp, &set->set_oi->oi_md); - free_idx_array(idx_arr, idx_cnt); - EXIT; - return rc; -} - -void qos_update(struct lov_obd *lov) -{ - ENTRY; - lov->lov_qos.lq_dirty = 1; -} - diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c deleted file mode 100644 index 82153b7a46..0000000000 --- a/lustre/lov/lov_request.c +++ /dev/null @@ -1,1639 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_LOV - -#ifdef __KERNEL__ -#include <libcfs/libcfs.h> -#else -#include <liblustre.h> -#endif - -#include <obd_class.h> -#include <obd_lov.h> -#include <lustre/lustre_idl.h> - -#include "lov_internal.h" - -static void lov_init_set(struct lov_request_set *set) -{ - set->set_count = 0; - set->set_completes = 0; - set->set_success = 0; - set->set_cookies = 0; - CFS_INIT_LIST_HEAD(&set->set_list); - atomic_set(&set->set_refcount, 1); -} - -static void lov_finish_set(struct lov_request_set *set) -{ - struct list_head *pos, *n; - ENTRY; - - LASSERT(set); - list_for_each_safe(pos, n, &set->set_list) { - struct lov_request *req = list_entry(pos, struct lov_request, - rq_link); - list_del_init(&req->rq_link); - - if (req->rq_oi.oi_oa) - OBDO_FREE(req->rq_oi.oi_oa); - if (req->rq_oi.oi_md) - OBD_FREE(req->rq_oi.oi_md, req->rq_buflen); - if (req->rq_oi.oi_osfs) - OBD_FREE(req->rq_oi.oi_osfs, - sizeof(*req->rq_oi.oi_osfs)); - OBD_FREE(req, sizeof(*req)); - } - - if (set->set_pga) { - int len = set->set_oabufs * sizeof(*set->set_pga); - OBD_FREE(set->set_pga, len); - } - if (set->set_lockh) - lov_llh_put(set->set_lockh); - - OBD_FREE(set, sizeof(*set)); - EXIT; -} - -void lov_update_set(struct lov_request_set *set, - struct lov_request *req, int rc) -{ - req->rq_complete = 1; - req->rq_rc = rc; - - set->set_completes++; - if (rc == 0) - set->set_success++; -} - -int lov_update_common_set(struct lov_request_set *set, - struct lov_request *req, int rc) -{ - struct lov_obd *lov = &set->set_exp->exp_obd->u.lov; - ENTRY; - - lov_update_set(set, req, rc); - - /* grace error on inactive ost */ - if (rc && !(lov->lov_tgts[req->rq_idx] && - lov->lov_tgts[req->rq_idx]->ltd_active)) - rc = 0; - - /* FIXME in raid1 regime, should return 0 */ - RETURN(rc); -} - -void lov_set_add_req(struct lov_request *req, struct lov_request_set *set) -{ - list_add_tail(&req->rq_link, &set->set_list); - set->set_count++; -} - -int lov_update_enqueue_set(struct lov_request *req, __u32 mode, int rc) -{ - struct lov_request_set *set = req->rq_rqset; - struct lustre_handle *lov_lockhp; - struct lov_oinfo *loi; - ENTRY; - - LASSERT(set != NULL); - LASSERT(set->set_oi != NULL); - - lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe; - loi = set->set_oi->oi_md->lsm_oinfo[req->rq_stripe]; - - /* XXX LOV STACKING: OSC gets a copy, created in lov_prep_enqueue_set - * and that copy can be arbitrarily out of date. - * - * The LOV API is due for a serious rewriting anyways, and this - * can be addressed then. */ - - if (rc == ELDLM_OK) { - struct ldlm_lock *lock = ldlm_handle2lock(lov_lockhp); - __u64 tmp; - - LASSERT(lock != NULL); - lov_stripe_lock(set->set_oi->oi_md); - loi->loi_lvb = req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb; - tmp = loi->loi_lvb.lvb_size; - /* Extend KMS up to the end of this lock and no further - * A lock on [x,y] means a KMS of up to y + 1 bytes! */ - if (tmp > lock->l_policy_data.l_extent.end) - tmp = lock->l_policy_data.l_extent.end + 1; - if (tmp >= loi->loi_kms) { - LDLM_DEBUG(lock, "lock acquired, setting rss="LPU64 - ", kms="LPU64, loi->loi_lvb.lvb_size, tmp); - loi->loi_kms = tmp; - loi->loi_kms_valid = 1; - } else { - LDLM_DEBUG(lock, "lock acquired, setting rss=" - LPU64"; leaving kms="LPU64", end="LPU64, - loi->loi_lvb.lvb_size, loi->loi_kms, - lock->l_policy_data.l_extent.end); - } - lov_stripe_unlock(set->set_oi->oi_md); - ldlm_lock_allow_match(lock); - LDLM_LOCK_PUT(lock); - } else if ((rc == ELDLM_LOCK_ABORTED) && - (set->set_oi->oi_flags & LDLM_FL_HAS_INTENT)) { - memset(lov_lockhp, 0, sizeof(*lov_lockhp)); - lov_stripe_lock(set->set_oi->oi_md); - loi->loi_lvb = req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb; - lov_stripe_unlock(set->set_oi->oi_md); - CDEBUG(D_INODE, "glimpsed, setting rss="LPU64"; leaving" - " kms="LPU64"\n", loi->loi_lvb.lvb_size, loi->loi_kms); - rc = ELDLM_OK; - } else { - struct obd_export *exp = set->set_exp; - struct lov_obd *lov = &exp->exp_obd->u.lov; - - memset(lov_lockhp, 0, sizeof(*lov_lockhp)); - if (lov->lov_tgts[req->rq_idx] && - lov->lov_tgts[req->rq_idx]->ltd_active) { - /* -EUSERS used by OST to report file contention */ - if (rc != -EINTR && rc != -EUSERS) - CERROR("enqueue objid "LPX64" subobj " - LPX64" on OST idx %d: rc %d\n", - set->set_oi->oi_md->lsm_object_id, - loi->loi_id, loi->loi_ost_idx, rc); - } else { - rc = ELDLM_OK; - } - } - lov_update_set(set, req, rc); - RETURN(rc); -} - -/* The callback for osc_enqueue that updates lov info for every OSC request. */ -static int cb_update_enqueue(struct obd_info *oinfo, int rc) -{ - struct ldlm_enqueue_info *einfo; - struct lov_request *lovreq; - - lovreq = container_of(oinfo, struct lov_request, rq_oi); - einfo = lovreq->rq_rqset->set_ei; - return lov_update_enqueue_set(lovreq, einfo->ei_mode, rc); -} - -static int enqueue_done(struct lov_request_set *set, __u32 mode) -{ - struct lov_request *req; - struct lov_obd *lov = &set->set_exp->exp_obd->u.lov; - int rc = 0; - ENTRY; - - /* enqueue/match success, just return */ - if (set->set_completes && set->set_completes == set->set_success) - RETURN(0); - - /* cancel enqueued/matched locks */ - list_for_each_entry(req, &set->set_list, rq_link) { - struct lustre_handle *lov_lockhp; - - if (!req->rq_complete || req->rq_rc) - continue; - - lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe; - LASSERT(lov_lockhp); - if (!lustre_handle_is_used(lov_lockhp)) - continue; - - rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp, - req->rq_oi.oi_md, mode, lov_lockhp); - if (rc && lov->lov_tgts[req->rq_idx] && - lov->lov_tgts[req->rq_idx]->ltd_active) - CERROR("cancelling obdjid "LPX64" on OST " - "idx %d error: rc = %d\n", - req->rq_oi.oi_md->lsm_object_id, - req->rq_idx, rc); - } - if (set->set_lockh) - lov_llh_put(set->set_lockh); - RETURN(rc); -} - -int lov_fini_enqueue_set(struct lov_request_set *set, __u32 mode, int rc, - struct ptlrpc_request_set *rqset) -{ - int ret = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - /* Do enqueue_done only for sync requests and if any request - * succeeded. */ - if (!rqset) { - if (rc) - set->set_completes = 0; - ret = enqueue_done(set, mode); - } else if (set->set_lockh) - lov_llh_put(set->set_lockh); - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc ? rc : ret); -} - -int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo, - struct ldlm_enqueue_info *einfo, - struct lov_request_set **reqset) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lov_request_set *set; - int i, rc = 0; - struct lov_oinfo *loi; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oi = oinfo; - set->set_ei = einfo; - set->set_lockh = lov_llh_new(oinfo->oi_md); - if (set->set_lockh == NULL) - GOTO(out_set, rc = -ENOMEM); - oinfo->oi_lockh->cookie = set->set_lockh->llh_handle.h_cookie; - - for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { - struct lov_request *req; - obd_off start, end; - - loi = oinfo->oi_md->lsm_oinfo[i]; - if (!lov_stripe_intersects(oinfo->oi_md, i, - oinfo->oi_policy.l_extent.start, - oinfo->oi_policy.l_extent.end, - &start, &end)) - continue; - - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - - req->rq_buflen = sizeof(*req->rq_oi.oi_md) + - sizeof(struct lov_oinfo *) + - sizeof(struct lov_oinfo); - OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen); - if (req->rq_oi.oi_md == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - req->rq_oi.oi_md->lsm_oinfo[0] = - ((void *)req->rq_oi.oi_md) + sizeof(*req->rq_oi.oi_md) + - sizeof(struct lov_oinfo *); - - - req->rq_rqset = set; - /* Set lov request specific parameters. */ - req->rq_oi.oi_lockh = set->set_lockh->llh_handles + i; - req->rq_oi.oi_cb_up = cb_update_enqueue; - req->rq_oi.oi_flags = oinfo->oi_flags; - - LASSERT(req->rq_oi.oi_lockh); - - req->rq_oi.oi_policy.l_extent.gid = - oinfo->oi_policy.l_extent.gid; - req->rq_oi.oi_policy.l_extent.start = start; - req->rq_oi.oi_policy.l_extent.end = end; - - req->rq_idx = loi->loi_ost_idx; - req->rq_stripe = i; - - /* XXX LOV STACKING: submd should be from the subobj */ - req->rq_oi.oi_md->lsm_object_id = loi->loi_id; - req->rq_oi.oi_md->lsm_stripe_count = 0; - req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms_valid = - loi->loi_kms_valid; - req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms = loi->loi_kms; - req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb = loi->loi_lvb; - - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(0); -out_set: - lov_fini_enqueue_set(set, einfo->ei_mode, rc, NULL); - RETURN(rc); -} - -int lov_update_match_set(struct lov_request_set *set, struct lov_request *req, - int rc) -{ - int ret = rc; - ENTRY; - - if (rc > 0) - ret = 0; - else if (rc == 0) - ret = 1; - lov_update_set(set, req, ret); - RETURN(rc); -} - -int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - rc = enqueue_done(set, mode); - if ((set->set_count == set->set_success) && - (flags & LDLM_FL_TEST_LOCK)) - lov_llh_put(set->set_lockh); - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc); -} - -int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo, - struct lov_stripe_md *lsm, ldlm_policy_data_t *policy, - __u32 mode, struct lustre_handle *lockh, - struct lov_request_set **reqset) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct lov_request_set *set; - int i, rc = 0; - struct lov_oinfo *loi; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oi = oinfo; - set->set_oi->oi_md = lsm; - set->set_lockh = lov_llh_new(lsm); - if (set->set_lockh == NULL) - GOTO(out_set, rc = -ENOMEM); - lockh->cookie = set->set_lockh->llh_handle.h_cookie; - - for (i = 0; i < lsm->lsm_stripe_count; i++){ - struct lov_request *req; - obd_off start, end; - - loi = lsm->lsm_oinfo[i]; - if (!lov_stripe_intersects(lsm, i, policy->l_extent.start, - policy->l_extent.end, &start, &end)) - continue; - - /* FIXME raid1 should grace this error */ - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - GOTO(out_set, rc = -EIO); - } - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - - req->rq_buflen = sizeof(*req->rq_oi.oi_md); - OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen); - if (req->rq_oi.oi_md == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - - req->rq_oi.oi_policy.l_extent.start = start; - req->rq_oi.oi_policy.l_extent.end = end; - req->rq_oi.oi_policy.l_extent.gid = policy->l_extent.gid; - - req->rq_idx = loi->loi_ost_idx; - req->rq_stripe = i; - - /* XXX LOV STACKING: submd should be from the subobj */ - req->rq_oi.oi_md->lsm_object_id = loi->loi_id; - req->rq_oi.oi_md->lsm_stripe_count = 0; - - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(rc); -out_set: - lov_fini_match_set(set, mode, 0); - RETURN(rc); -} - -int lov_fini_cancel_set(struct lov_request_set *set) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - - LASSERT(set->set_exp); - if (set->set_lockh) - lov_llh_put(set->set_lockh); - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc); -} - -int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo, - struct lov_stripe_md *lsm, __u32 mode, - struct lustre_handle *lockh, - struct lov_request_set **reqset) -{ - struct lov_request_set *set; - int i, rc = 0; - struct lov_oinfo *loi; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oi = oinfo; - set->set_oi->oi_md = lsm; - set->set_lockh = lov_handle2llh(lockh); - if (set->set_lockh == NULL) { - CERROR("LOV: invalid lov lock handle %p\n", lockh); - GOTO(out_set, rc = -EINVAL); - } - lockh->cookie = set->set_lockh->llh_handle.h_cookie; - - for (i = 0; i < lsm->lsm_stripe_count; i++){ - struct lov_request *req; - struct lustre_handle *lov_lockhp; - - loi = lsm->lsm_oinfo[i]; - lov_lockhp = set->set_lockh->llh_handles + i; - if (!lustre_handle_is_used(lov_lockhp)) { - CDEBUG(D_RPCTRACE,"lov idx %d subobj "LPX64" no lock\n", - loi->loi_ost_idx, loi->loi_id); - continue; - } - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - - req->rq_buflen = sizeof(*req->rq_oi.oi_md); - OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen); - if (req->rq_oi.oi_md == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - - req->rq_idx = loi->loi_ost_idx; - req->rq_stripe = i; - - /* XXX LOV STACKING: submd should be from the subobj */ - req->rq_oi.oi_md->lsm_object_id = loi->loi_id; - req->rq_oi.oi_md->lsm_stripe_count = 0; - - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(rc); -out_set: - lov_fini_cancel_set(set); - RETURN(rc); -} - -static int create_done(struct obd_export *exp, struct lov_request_set *set, - struct lov_stripe_md **lsmp) -{ - struct lov_obd *lov = &exp->exp_obd->u.lov; - struct obd_trans_info *oti = set->set_oti; - struct obdo *src_oa = set->set_oi->oi_oa; - struct lov_request *req; - struct obdo *ret_oa = NULL; - int attrset = 0, rc = 0; - ENTRY; - - LASSERT(set->set_completes); - - /* try alloc objects on other osts if osc_create fails for - * exceptions: RPC failure, ENOSPC, etc */ - if (set->set_count != set->set_success) { - list_for_each_entry (req, &set->set_list, rq_link) { - if (req->rq_rc == 0) - continue; - - set->set_completes--; - req->rq_complete = 0; - - rc = qos_remedy_create(set, req); - lov_update_create_set(set, req, rc); - - if (rc) - break; - } - } - - /* no successful creates */ - if (set->set_success == 0) - GOTO(cleanup, rc); - - /* If there was an explicit stripe set, fail. Otherwise, we - * got some objects and that's not bad. */ - if (set->set_count != set->set_success) { - if (*lsmp) - GOTO(cleanup, rc); - set->set_count = set->set_success; - qos_shrink_lsm(set); - } - - OBDO_ALLOC(ret_oa); - if (ret_oa == NULL) - GOTO(cleanup, rc = -ENOMEM); - - list_for_each_entry(req, &set->set_list, rq_link) { - if (!req->rq_complete || req->rq_rc) - continue; - lov_merge_attrs(ret_oa, req->rq_oi.oi_oa, - req->rq_oi.oi_oa->o_valid, set->set_oi->oi_md, - req->rq_stripe, &attrset); - } - if (src_oa->o_valid & OBD_MD_FLSIZE && - ret_oa->o_size != src_oa->o_size) { - CERROR("original size "LPU64" isn't new object size "LPU64"\n", - src_oa->o_size, ret_oa->o_size); - LBUG(); - } - ret_oa->o_id = src_oa->o_id; - memcpy(src_oa, ret_oa, sizeof(*src_oa)); - OBDO_FREE(ret_oa); - - *lsmp = set->set_oi->oi_md; - GOTO(done, rc = 0); - -cleanup: - list_for_each_entry(req, &set->set_list, rq_link) { - struct obd_export *sub_exp; - int err = 0; - - if (!req->rq_complete || req->rq_rc) - continue; - - sub_exp = lov->lov_tgts[req->rq_idx]->ltd_exp; - err = obd_destroy(sub_exp, req->rq_oi.oi_oa, NULL, oti, NULL); - if (err) - CERROR("Failed to uncreate objid "LPX64" subobj " - LPX64" on OST idx %d: rc = %d\n", - src_oa->o_id, req->rq_oi.oi_oa->o_id, - req->rq_idx, rc); - } - if (*lsmp == NULL) - obd_free_memmd(exp, &set->set_oi->oi_md); -done: - if (oti && set->set_cookies) { - oti->oti_logcookies = set->set_cookies; - if (!set->set_cookie_sent) { - oti_free_cookies(oti); - src_oa->o_valid &= ~OBD_MD_FLCOOKIE; - } else { - src_oa->o_valid |= OBD_MD_FLCOOKIE; - } - } - RETURN(rc); -} - -int lov_fini_create_set(struct lov_request_set *set,struct lov_stripe_md **lsmp) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - if (set->set_completes) - rc = create_done(set->set_exp, set, lsmp); - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc); -} - -int lov_update_create_set(struct lov_request_set *set, - struct lov_request *req, int rc) -{ - struct obd_trans_info *oti = set->set_oti; - struct lov_stripe_md *lsm = set->set_oi->oi_md; - struct lov_oinfo *loi; - struct lov_obd *lov = &set->set_exp->exp_obd->u.lov; - ENTRY; - - req->rq_stripe = set->set_success; - loi = lsm->lsm_oinfo[req->rq_stripe]; - - if (rc && lov->lov_tgts[req->rq_idx] && - lov->lov_tgts[req->rq_idx]->ltd_active) { - CERROR("error creating fid "LPX64" sub-object" - " on OST idx %d/%d: rc = %d\n", - set->set_oi->oi_oa->o_id, req->rq_idx, - lsm->lsm_stripe_count, rc); - if (rc > 0) { - CERROR("obd_create returned invalid err %d\n", rc); - rc = -EIO; - } - } - lov_update_set(set, req, rc); - if (rc) - RETURN(rc); - - loi->loi_id = req->rq_oi.oi_oa->o_id; - loi->loi_ost_idx = req->rq_idx; - CDEBUG(D_INODE, "objid "LPX64" has subobj "LPX64"/"LPU64" at idx %d\n", - lsm->lsm_object_id, loi->loi_id, loi->loi_id, req->rq_idx); - loi_init(loi); - - if (oti && set->set_cookies) - ++oti->oti_logcookies; - if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLCOOKIE) - set->set_cookie_sent++; - - RETURN(0); -} - -int lov_prep_create_set(struct obd_export *exp, struct obd_info *oinfo, - struct lov_stripe_md **lsmp, struct obdo *src_oa, - struct obd_trans_info *oti, - struct lov_request_set **reqset) -{ - struct lov_request_set *set; - int rc = 0; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oi = oinfo; - set->set_oi->oi_md = *lsmp; - set->set_oi->oi_oa = src_oa; - set->set_oti = oti; - - rc = qos_prep_create(exp, set); - if (rc) - lov_fini_create_set(set, lsmp); - else - *reqset = set; - RETURN(rc); -} - -static int common_attr_done(struct lov_request_set *set) -{ - struct list_head *pos; - struct lov_request *req; - struct obdo *tmp_oa; - int rc = 0, attrset = 0; - ENTRY; - - LASSERT(set->set_oi != NULL); - - if (set->set_oi->oi_oa == NULL) - RETURN(0); - - if (!set->set_success) - RETURN(-EIO); - - OBDO_ALLOC(tmp_oa); - if (tmp_oa == NULL) - GOTO(out, rc = -ENOMEM); - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - if (!req->rq_complete || req->rq_rc) - continue; - if (req->rq_oi.oi_oa->o_valid == 0) /* inactive stripe */ - continue; - lov_merge_attrs(tmp_oa, req->rq_oi.oi_oa, - req->rq_oi.oi_oa->o_valid, - set->set_oi->oi_md, req->rq_stripe, &attrset); - } - if (!attrset) { - CERROR("No stripes had valid attrs\n"); - rc = -EIO; - } - tmp_oa->o_id = set->set_oi->oi_oa->o_id; - memcpy(set->set_oi->oi_oa, tmp_oa, sizeof(*set->set_oi->oi_oa)); -out: - if (tmp_oa) - OBDO_FREE(tmp_oa); - RETURN(rc); - -} - -static int brw_done(struct lov_request_set *set) -{ - struct lov_stripe_md *lsm = set->set_oi->oi_md; - struct lov_oinfo *loi = NULL; - struct list_head *pos; - struct lov_request *req; - ENTRY; - - list_for_each (pos, &set->set_list) { - req = list_entry(pos, struct lov_request, rq_link); - - if (!req->rq_complete || req->rq_rc) - continue; - - loi = lsm->lsm_oinfo[req->rq_stripe]; - - if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLBLOCKS) - loi->loi_lvb.lvb_blocks = req->rq_oi.oi_oa->o_blocks; - } - - RETURN(0); -} - -int lov_fini_brw_set(struct lov_request_set *set) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - if (set->set_completes) { - rc = brw_done(set); - /* FIXME update qos data here */ - } - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc); -} - -int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo, - obd_count oa_bufs, struct brw_page *pga, - struct obd_trans_info *oti, - struct lov_request_set **reqset) -{ - struct { - obd_count index; - obd_count count; - obd_count off; - } *info = NULL; - struct lov_request_set *set; - struct lov_oinfo *loi = NULL; - struct lov_obd *lov = &exp->exp_obd->u.lov; - int rc = 0, i, shift; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oti = oti; - set->set_oi = oinfo; - set->set_oabufs = oa_bufs; - OBD_ALLOC(set->set_pga, oa_bufs * sizeof(*set->set_pga)); - if (!set->set_pga) - GOTO(out, rc = -ENOMEM); - - OBD_ALLOC(info, sizeof(*info) * oinfo->oi_md->lsm_stripe_count); - if (!info) - GOTO(out, rc = -ENOMEM); - - /* calculate the page count for each stripe */ - for (i = 0; i < oa_bufs; i++) { - int stripe = lov_stripe_number(oinfo->oi_md, pga[i].off); - info[stripe].count++; - } - - /* alloc and initialize lov request */ - shift = 0; - for (i = 0 ; i < oinfo->oi_md->lsm_stripe_count; i++){ - struct lov_request *req; - - if (info[i].count == 0) - continue; - - loi = oinfo->oi_md->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - GOTO(out, rc = -EIO); - } - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out, rc = -ENOMEM); - - OBDO_ALLOC(req->rq_oi.oi_oa); - if (req->rq_oi.oi_oa == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out, rc = -ENOMEM); - } - - if (oinfo->oi_oa) { - memcpy(req->rq_oi.oi_oa, oinfo->oi_oa, - sizeof(*req->rq_oi.oi_oa)); - } - req->rq_oi.oi_oa->o_id = loi->loi_id; - req->rq_oi.oi_oa->o_stripe_idx = i; - - req->rq_buflen = sizeof(*req->rq_oi.oi_md); - OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen); - if (req->rq_oi.oi_md == NULL) { - OBDO_FREE(req->rq_oi.oi_oa); - OBD_FREE(req, sizeof(*req)); - GOTO(out, rc = -ENOMEM); - } - - req->rq_idx = loi->loi_ost_idx; - req->rq_stripe = i; - - /* XXX LOV STACKING */ - req->rq_oi.oi_md->lsm_object_id = loi->loi_id; - req->rq_oi.oi_md->lsm_object_gr = oinfo->oi_md->lsm_object_gr; - req->rq_oabufs = info[i].count; - req->rq_pgaidx = shift; - shift += req->rq_oabufs; - - /* remember the index for sort brw_page array */ - info[i].index = req->rq_pgaidx; - - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out, rc = -EIO); - - /* rotate & sort the brw_page array */ - for (i = 0; i < oa_bufs; i++) { - int stripe = lov_stripe_number(oinfo->oi_md, pga[i].off); - - shift = info[stripe].index + info[stripe].off; - LASSERT(shift < oa_bufs); - set->set_pga[shift] = pga[i]; - lov_stripe_offset(oinfo->oi_md, pga[i].off, stripe, - &set->set_pga[shift].off); - info[stripe].off++; - } -out: - if (info) - OBD_FREE(info, sizeof(*info) * oinfo->oi_md->lsm_stripe_count); - - if (rc == 0) - *reqset = set; - else - lov_fini_brw_set(set); - - RETURN(rc); -} - -int lov_fini_getattr_set(struct lov_request_set *set) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - if (set->set_completes) - rc = common_attr_done(set); - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc); -} - -/* The callback for osc_getattr_async that finilizes a request info when a - * response is recieved. */ -static int cb_getattr_update(struct obd_info *oinfo, int rc) -{ - struct lov_request *lovreq; - lovreq = container_of(oinfo, struct lov_request, rq_oi); - return lov_update_common_set(lovreq->rq_rqset, lovreq, rc); -} - -int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo, - struct lov_request_set **reqset) -{ - struct lov_request_set *set; - struct lov_oinfo *loi = NULL; - struct lov_obd *lov = &exp->exp_obd->u.lov; - int rc = 0, i; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oi = oinfo; - - for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { - struct lov_request *req; - - loi = oinfo->oi_md->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - - req->rq_stripe = i; - req->rq_idx = loi->loi_ost_idx; - - OBDO_ALLOC(req->rq_oi.oi_oa); - if (req->rq_oi.oi_oa == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - memcpy(req->rq_oi.oi_oa, oinfo->oi_oa, - sizeof(*req->rq_oi.oi_oa)); - req->rq_oi.oi_oa->o_id = loi->loi_id; - req->rq_oi.oi_cb_up = cb_getattr_update; - - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(rc); -out_set: - lov_fini_getattr_set(set); - RETURN(rc); -} - -int lov_fini_destroy_set(struct lov_request_set *set) -{ - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - if (set->set_completes) { - /* FIXME update qos data here */ - } - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(0); -} - -int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo, - struct obdo *src_oa, struct lov_stripe_md *lsm, - struct obd_trans_info *oti, - struct lov_request_set **reqset) -{ - struct lov_request_set *set; - struct lov_oinfo *loi = NULL; - struct lov_obd *lov = &exp->exp_obd->u.lov; - int rc = 0, i; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oi = oinfo; - set->set_oi->oi_md = lsm; - set->set_oi->oi_oa = src_oa; - set->set_oti = oti; - if (oti != NULL && src_oa->o_valid & OBD_MD_FLCOOKIE) - set->set_cookies = oti->oti_logcookies; - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - struct lov_request *req; - - loi = lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - - req->rq_stripe = i; - req->rq_idx = loi->loi_ost_idx; - - OBDO_ALLOC(req->rq_oi.oi_oa); - if (req->rq_oi.oi_oa == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - memcpy(req->rq_oi.oi_oa, src_oa, sizeof(*req->rq_oi.oi_oa)); - req->rq_oi.oi_oa->o_id = loi->loi_id; - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(rc); -out_set: - lov_fini_destroy_set(set); - RETURN(rc); -} - -int lov_fini_setattr_set(struct lov_request_set *set) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - if (set->set_completes) { - rc = common_attr_done(set); - /* FIXME update qos data here */ - } - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - RETURN(rc); -} - -int lov_update_setattr_set(struct lov_request_set *set, - struct lov_request *req, int rc) -{ - struct lov_obd *lov = &req->rq_rqset->set_exp->exp_obd->u.lov; - struct lov_stripe_md *lsm = req->rq_rqset->set_oi->oi_md; - ENTRY; - - lov_update_set(set, req, rc); - - /* grace error on inactive ost */ - if (rc && !(lov->lov_tgts[req->rq_idx] && - lov->lov_tgts[req->rq_idx]->ltd_active)) - rc = 0; - - if (rc == 0) { - if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLCTIME) - lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_ctime = - req->rq_oi.oi_oa->o_ctime; - if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLMTIME) - lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_mtime = - req->rq_oi.oi_oa->o_mtime; - if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLATIME) - lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_atime = - req->rq_oi.oi_oa->o_atime; - } - - RETURN(rc); -} - -/* The callback for osc_setattr_async that finilizes a request info when a - * response is recieved. */ -static int cb_setattr_update(struct obd_info *oinfo, int rc) -{ - struct lov_request *lovreq; - lovreq = container_of(oinfo, struct lov_request, rq_oi); - return lov_update_setattr_set(lovreq->rq_rqset, lovreq, rc); -} - -int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct lov_request_set **reqset) -{ - struct lov_request_set *set; - struct lov_oinfo *loi = NULL; - struct lov_obd *lov = &exp->exp_obd->u.lov; - int rc = 0, i; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oti = oti; - set->set_oi = oinfo; - if (oti != NULL && oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE) - set->set_cookies = oti->oti_logcookies; - - for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { - struct lov_request *req; - - loi = oinfo->oi_md->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - req->rq_stripe = i; - req->rq_idx = loi->loi_ost_idx; - - OBDO_ALLOC(req->rq_oi.oi_oa); - if (req->rq_oi.oi_oa == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - memcpy(req->rq_oi.oi_oa, oinfo->oi_oa, - sizeof(*req->rq_oi.oi_oa)); - req->rq_oi.oi_oa->o_id = loi->loi_id; - req->rq_oi.oi_oa->o_stripe_idx = i; - req->rq_oi.oi_cb_up = cb_setattr_update; - req->rq_rqset = set; - - if (oinfo->oi_oa->o_valid & OBD_MD_FLSIZE) { - int off = lov_stripe_offset(oinfo->oi_md, - oinfo->oi_oa->o_size, i, - &req->rq_oi.oi_oa->o_size); - - if (off < 0 && req->rq_oi.oi_oa->o_size) - req->rq_oi.oi_oa->o_size--; - - CDEBUG(D_INODE, "stripe %d has size "LPU64"/"LPU64"\n", - i, req->rq_oi.oi_oa->o_size, - oinfo->oi_oa->o_size); - } - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(rc); -out_set: - lov_fini_setattr_set(set); - RETURN(rc); -} - -int lov_fini_punch_set(struct lov_request_set *set) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - if (set->set_completes) { - rc = -EIO; - /* FIXME update qos data here */ - if (set->set_success) - rc = common_attr_done(set); - } - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc); -} - -int lov_update_punch_set(struct lov_request_set *set, - struct lov_request *req, int rc) -{ - struct lov_obd *lov = &req->rq_rqset->set_exp->exp_obd->u.lov; - struct lov_stripe_md *lsm = req->rq_rqset->set_oi->oi_md; - ENTRY; - - lov_update_set(set, req, rc); - - /* grace error on inactive ost */ - if (rc && !lov->lov_tgts[req->rq_idx]->ltd_active) - rc = 0; - - if (rc == 0) { - lov_stripe_lock(lsm); - if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLBLOCKS) { - lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_blocks = - req->rq_oi.oi_oa->o_blocks; - } - - /* Do we need to update lvb_size here? It needn't because - * it have been done in ll_truncate(). -jay */ - lov_stripe_unlock(lsm); - } - - RETURN(rc); -} - -/* The callback for osc_punch that finilizes a request info when a response - * is recieved. */ -static int cb_update_punch(struct obd_info *oinfo, int rc) -{ - struct lov_request *lovreq; - lovreq = container_of(oinfo, struct lov_request, rq_oi); - return lov_update_punch_set(lovreq->rq_rqset, lovreq, rc); -} - -int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo, - struct obd_trans_info *oti, - struct lov_request_set **reqset) -{ - struct lov_request_set *set; - struct lov_oinfo *loi = NULL; - struct lov_obd *lov = &exp->exp_obd->u.lov; - int rc = 0, i; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_oi = oinfo; - set->set_exp = exp; - - for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { - struct lov_request *req; - obd_off rs, re; - - loi = oinfo->oi_md->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - - if (!lov_stripe_intersects(oinfo->oi_md, i, - oinfo->oi_policy.l_extent.start, - oinfo->oi_policy.l_extent.end, - &rs, &re)) - continue; - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - req->rq_stripe = i; - req->rq_idx = loi->loi_ost_idx; - - OBDO_ALLOC(req->rq_oi.oi_oa); - if (req->rq_oi.oi_oa == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - memcpy(req->rq_oi.oi_oa, oinfo->oi_oa, - sizeof(*req->rq_oi.oi_oa)); - req->rq_oi.oi_oa->o_id = loi->loi_id; - req->rq_oi.oi_oa->o_stripe_idx = i; - req->rq_oi.oi_cb_up = cb_update_punch; - req->rq_rqset = set; - - req->rq_oi.oi_policy.l_extent.start = rs; - req->rq_oi.oi_policy.l_extent.end = re; - req->rq_oi.oi_policy.l_extent.gid = -1; - - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(rc); -out_set: - lov_fini_punch_set(set); - RETURN(rc); -} - -int lov_fini_sync_set(struct lov_request_set *set) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - LASSERT(set->set_exp); - if (set->set_completes) { - if (!set->set_success) - rc = -EIO; - /* FIXME update qos data here */ - } - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc); -} - -int lov_prep_sync_set(struct obd_export *exp, struct obd_info *oinfo, - struct obdo *src_oa, struct lov_stripe_md *lsm, - obd_off start, obd_off end, - struct lov_request_set **reqset) -{ - struct lov_request_set *set; - struct lov_oinfo *loi = NULL; - struct lov_obd *lov = &exp->exp_obd->u.lov; - int rc = 0, i; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_exp = exp; - set->set_oi = oinfo; - set->set_oi->oi_md = lsm; - set->set_oi->oi_oa = src_oa; - - for (i = 0; i < lsm->lsm_stripe_count; i++) { - struct lov_request *req; - obd_off rs, re; - - loi = lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - - if (!lov_stripe_intersects(lsm, i, start, end, &rs, &re)) - continue; - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - req->rq_stripe = i; - req->rq_idx = loi->loi_ost_idx; - - OBDO_ALLOC(req->rq_oi.oi_oa); - if (req->rq_oi.oi_oa == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - memcpy(req->rq_oi.oi_oa, src_oa, sizeof(*req->rq_oi.oi_oa)); - req->rq_oi.oi_oa->o_id = loi->loi_id; - req->rq_oi.oi_oa->o_stripe_idx = i; - - req->rq_oi.oi_policy.l_extent.start = rs; - req->rq_oi.oi_policy.l_extent.end = re; - req->rq_oi.oi_policy.l_extent.gid = -1; - - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(rc); -out_set: - lov_fini_sync_set(set); - RETURN(rc); -} - -#define LOV_U64_MAX ((__u64)~0ULL) -#define LOV_SUM_MAX(tot, add) \ - do { \ - if ((tot) + (add) < (tot)) \ - (tot) = LOV_U64_MAX; \ - else \ - (tot) += (add); \ - } while(0) - -int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs,int success) -{ - ENTRY; - - if (success) { - __u32 expected_stripes = lov_get_stripecnt(&obd->u.lov, 0); - - if (osfs->os_files != LOV_U64_MAX) - do_div(osfs->os_files, expected_stripes); - if (osfs->os_ffree != LOV_U64_MAX) - do_div(osfs->os_ffree, expected_stripes); - - spin_lock(&obd->obd_osfs_lock); - memcpy(&obd->obd_osfs, osfs, sizeof(*osfs)); - obd->obd_osfs_age = get_jiffies_64(); - spin_unlock(&obd->obd_osfs_lock); - RETURN(0); - } - - RETURN(-EIO); -} - -int lov_fini_statfs_set(struct lov_request_set *set) -{ - int rc = 0; - ENTRY; - - if (set == NULL) - RETURN(0); - - if (set->set_completes) { - rc = lov_fini_statfs(set->set_obd, set->set_oi->oi_osfs, - set->set_success); - } - - if (atomic_dec_and_test(&set->set_refcount)) - lov_finish_set(set); - - RETURN(rc); -} - -void lov_update_statfs(struct obd_device *obd, struct obd_statfs *osfs, - struct obd_statfs *lov_sfs, int success) -{ - int shift = 0, quit = 0; - __u64 tmp; - spin_lock(&obd->obd_osfs_lock); - memcpy(&obd->obd_osfs, lov_sfs, sizeof(*lov_sfs)); - obd->obd_osfs_age = get_jiffies_64(); - spin_unlock(&obd->obd_osfs_lock); - - if (success == 0) { - memcpy(osfs, lov_sfs, sizeof(*lov_sfs)); - } else { - if (osfs->os_bsize != lov_sfs->os_bsize) { - /* assume all block sizes are always powers of 2 */ - /* get the bits difference */ - tmp = osfs->os_bsize | lov_sfs->os_bsize; - for (shift = 0; shift <= 64; ++shift) { - if (tmp & 1) { - if (quit) - break; - else - quit = 1; - shift = 0; - } - tmp >>= 1; - } - } - - if (osfs->os_bsize < lov_sfs->os_bsize) { - osfs->os_bsize = lov_sfs->os_bsize; - - osfs->os_bfree >>= shift; - osfs->os_bavail >>= shift; - osfs->os_blocks >>= shift; - } else if (shift != 0) { - lov_sfs->os_bfree >>= shift; - lov_sfs->os_bavail >>= shift; - lov_sfs->os_blocks >>= shift; - } -#ifdef MIN_DF - /* Sandia requested that df (and so, statfs) only - returned minimal available space on - a single OST, so people would be able to - write this much data guaranteed. */ - if (osfs->os_bavail > lov_sfs->os_bavail) { - /* Presumably if new bavail is smaller, - new bfree is bigger as well */ - osfs->os_bfree = lov_sfs->os_bfree; - osfs->os_bavail = lov_sfs->os_bavail; - } -#else - osfs->os_bfree += lov_sfs->os_bfree; - osfs->os_bavail += lov_sfs->os_bavail; -#endif - osfs->os_blocks += lov_sfs->os_blocks; - /* XXX not sure about this one - depends on policy. - * - could be minimum if we always stripe on all OBDs - * (but that would be wrong for any other policy, - * if one of the OBDs has no more objects left) - * - could be sum if we stripe whole objects - * - could be average, just to give a nice number - * - * To give a "reasonable" (if not wholly accurate) - * number, we divide the total number of free objects - * by expected stripe count (watch out for overflow). - */ - LOV_SUM_MAX(osfs->os_files, lov_sfs->os_files); - LOV_SUM_MAX(osfs->os_ffree, lov_sfs->os_ffree); - } -} - -/* The callback for osc_statfs_async that finilizes a request info when a - * response is recieved. */ -static int cb_statfs_update(struct obd_info *oinfo, int rc) -{ - struct lov_request *lovreq; - struct obd_statfs *osfs, *lov_sfs; - struct obd_device *obd; - struct lov_obd *lov; - int success; - ENTRY; - - lovreq = container_of(oinfo, struct lov_request, rq_oi); - lov = &lovreq->rq_rqset->set_obd->u.lov; - obd = class_exp2obd(lov->lov_tgts[lovreq->rq_idx]->ltd_exp); - - osfs = lovreq->rq_rqset->set_oi->oi_osfs; - lov_sfs = oinfo->oi_osfs; - - success = lovreq->rq_rqset->set_success; - - /* XXX: the same is done in lov_update_common_set, however - lovset->set_exp is not initialized. */ - lov_update_set(lovreq->rq_rqset, lovreq, rc); - if (rc) { - if (rc && !(lov->lov_tgts[lovreq->rq_idx] && - lov->lov_tgts[lovreq->rq_idx]->ltd_active)) - rc = 0; - RETURN(rc); - } - - lov_update_statfs(obd, osfs, lov_sfs, success); - qos_update(lov); - - RETURN(0); -} - -int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo, - struct lov_request_set **reqset) -{ - struct lov_request_set *set; - struct lov_obd *lov = &obd->u.lov; - int rc = 0, i; - ENTRY; - - OBD_ALLOC(set, sizeof(*set)); - if (set == NULL) - RETURN(-ENOMEM); - lov_init_set(set); - - set->set_obd = obd; - set->set_oi = oinfo; - - /* We only get block data from the OBD */ - for (i = 0; i < lov->desc.ld_tgt_count; i++) { - struct lov_request *req; - - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", i); - continue; - } - - OBD_ALLOC(req, sizeof(*req)); - if (req == NULL) - GOTO(out_set, rc = -ENOMEM); - - OBD_ALLOC(req->rq_oi.oi_osfs, sizeof(*req->rq_oi.oi_osfs)); - if (req->rq_oi.oi_osfs == NULL) { - OBD_FREE(req, sizeof(*req)); - GOTO(out_set, rc = -ENOMEM); - } - - req->rq_idx = i; - req->rq_oi.oi_cb_up = cb_statfs_update; - req->rq_rqset = set; - - lov_set_add_req(req, set); - } - if (!set->set_count) - GOTO(out_set, rc = -EIO); - *reqset = set; - RETURN(rc); -out_set: - lov_fini_statfs_set(set); - RETURN(rc); -} diff --git a/lustre/lov/lproc_lov.c b/lustre/lov/lproc_lov.c deleted file mode 100644 index c585feaf96..0000000000 --- a/lustre/lov/lproc_lov.c +++ /dev/null @@ -1,365 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - */ -#define DEBUG_SUBSYSTEM S_CLASS - -#include <linux/version.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -#include <asm/statfs.h> -#endif -#include <lprocfs_status.h> -#include <obd_class.h> -#include <linux/seq_file.h> -#include "lov_internal.h" - -#ifdef LPROCFS -static int lov_rd_stripesize(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_desc *desc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - *eof = 1; - return snprintf(page, count, LPU64"\n", desc->ld_default_stripe_size); -} - -static int lov_wr_stripesize(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_desc *desc; - __u64 val; - int rc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - rc = lprocfs_write_u64_helper(buffer, count, &val); - if (rc) - return rc; - - desc->ld_default_stripe_size = val; - lov_fix_desc(desc); - return count; -} - -static int lov_rd_stripeoffset(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_desc *desc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - *eof = 1; - return snprintf(page, count, LPU64"\n", desc->ld_default_stripe_offset); -} - -static int lov_wr_stripeoffset(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_desc *desc; - __u64 val; - int rc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - rc = lprocfs_write_u64_helper(buffer, count, &val); - if (rc) - return rc; - - desc->ld_default_stripe_offset = val; - lov_fix_desc(desc); - return count; -} - -static int lov_rd_stripetype(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device* dev = (struct obd_device*)data; - struct lov_desc *desc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - *eof = 1; - return snprintf(page, count, "%u\n", desc->ld_pattern); -} - -static int lov_wr_stripetype(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_desc *desc; - int val, rc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - desc->ld_pattern = val; - lov_fix_desc(desc); - return count; -} - -static int lov_rd_stripecount(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_desc *desc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - *eof = 1; - return snprintf(page, count, "%ld\n", - (long)(desc->ld_default_stripe_count + 1) - 1); -} - -static int lov_wr_stripecount(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_desc *desc; - int val, rc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - desc->ld_default_stripe_count = val; - lov_fix_desc(desc); - return count; -} - -static int lov_rd_numobd(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device *dev = (struct obd_device*)data; - struct lov_desc *desc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - *eof = 1; - return snprintf(page, count, "%u\n", desc->ld_tgt_count); - -} - -static int lov_rd_activeobd(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device* dev = (struct obd_device*)data; - struct lov_desc *desc; - - LASSERT(dev != NULL); - desc = &dev->u.lov.desc; - *eof = 1; - return snprintf(page, count, "%u\n", desc->ld_active_tgt_count); -} - -static int lov_rd_desc_uuid(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device *dev = (struct obd_device*) data; - struct lov_obd *lov; - - LASSERT(dev != NULL); - lov = &dev->u.lov; - *eof = 1; - return snprintf(page, count, "%s\n", lov->desc.ld_uuid.uuid); -} - -/* free priority (0-255): how badly user wants to choose empty osts */ -static int lov_rd_qos_priofree(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device *dev = (struct obd_device*) data; - struct lov_obd *lov; - - LASSERT(dev != NULL); - lov = &dev->u.lov; - *eof = 1; - return snprintf(page, count, "%d%%\n", - (lov->lov_qos.lq_prio_free * 100) >> 8); -} - -static int lov_wr_qos_priofree(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_obd *lov; - int val, rc; - LASSERT(dev != NULL); - - lov = &dev->u.lov; - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val > 100) - return -EINVAL; - lov->lov_qos.lq_prio_free = (val << 8) / 100; - lov->lov_qos.lq_dirty = 1; - lov->lov_qos.lq_reset = 1; - return count; -} - -static int lov_rd_qos_maxage(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device *dev = (struct obd_device*) data; - struct lov_obd *lov; - - LASSERT(dev != NULL); - lov = &dev->u.lov; - *eof = 1; - return snprintf(page, count, "%u Sec\n", lov->desc.ld_qos_maxage); -} - -static int lov_wr_qos_maxage(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *dev = (struct obd_device *)data; - struct lov_obd *lov; - int val, rc; - LASSERT(dev != NULL); - - lov = &dev->u.lov; - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val <= 0) - return -EINVAL; - lov->desc.ld_qos_maxage = val; - return count; -} - -static void *lov_tgt_seq_start(struct seq_file *p, loff_t *pos) -{ - struct obd_device *dev = p->private; - struct lov_obd *lov = &dev->u.lov; - - while (*pos < lov->desc.ld_tgt_count) { - if (lov->lov_tgts[*pos]) - return lov->lov_tgts[*pos]; - ++*pos; - } - return NULL; -} - -static void lov_tgt_seq_stop(struct seq_file *p, void *v) -{ -} - -static void *lov_tgt_seq_next(struct seq_file *p, void *v, loff_t *pos) -{ - struct obd_device *dev = p->private; - struct lov_obd *lov = &dev->u.lov; - - while (++*pos < lov->desc.ld_tgt_count) { - if (lov->lov_tgts[*pos]) - return lov->lov_tgts[*pos]; - } - return NULL; -} - -static int lov_tgt_seq_show(struct seq_file *p, void *v) -{ - struct lov_tgt_desc *tgt = v; - return seq_printf(p, "%d: %s %sACTIVE\n", tgt->ltd_index, - obd_uuid2str(&tgt->ltd_uuid), - tgt->ltd_active ? "" : "IN"); -} - -struct seq_operations lov_tgt_sops = { - .start = lov_tgt_seq_start, - .stop = lov_tgt_seq_stop, - .next = lov_tgt_seq_next, - .show = lov_tgt_seq_show, -}; - -static int lov_target_seq_open(struct inode *inode, struct file *file) -{ - struct proc_dir_entry *dp = PDE(inode); - struct seq_file *seq; - int rc; - - LPROCFS_ENTRY_AND_CHECK(dp); - rc = seq_open(file, &lov_tgt_sops); - if (rc) { - LPROCFS_EXIT(); - return rc; - } - - seq = file->private_data; - seq->private = dp->data; - return 0; -} - -struct lprocfs_vars lprocfs_lov_obd_vars[] = { - { "uuid", lprocfs_rd_uuid, 0, 0 }, - { "stripesize", lov_rd_stripesize, lov_wr_stripesize, 0 }, - { "stripeoffset", lov_rd_stripeoffset, lov_wr_stripeoffset, 0 }, - { "stripecount", lov_rd_stripecount, lov_wr_stripecount, 0 }, - { "stripetype", lov_rd_stripetype, lov_wr_stripetype, 0 }, - { "numobd", lov_rd_numobd, 0, 0 }, - { "activeobd", lov_rd_activeobd, 0, 0 }, - { "filestotal", lprocfs_rd_filestotal, 0, 0 }, - { "filesfree", lprocfs_rd_filesfree, 0, 0 }, - /*{ "filegroups", lprocfs_rd_filegroups, 0, 0 },*/ - { "blocksize", lprocfs_rd_blksize, 0, 0 }, - { "kbytestotal", lprocfs_rd_kbytestotal, 0, 0 }, - { "kbytesfree", lprocfs_rd_kbytesfree, 0, 0 }, - { "kbytesavail", lprocfs_rd_kbytesavail, 0, 0 }, - { "desc_uuid", lov_rd_desc_uuid, 0, 0 }, - { "qos_prio_free",lov_rd_qos_priofree, lov_wr_qos_priofree, 0 }, - { "qos_maxage", lov_rd_qos_maxage, lov_wr_qos_maxage, 0 }, - { 0 } -}; - -static struct lprocfs_vars lprocfs_lov_module_vars[] = { - { "num_refs", lprocfs_rd_numrefs, 0, 0 }, - { 0 } -}; - -void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars) -{ - lvars->module_vars = lprocfs_lov_module_vars; - lvars->obd_vars = lprocfs_lov_obd_vars; -} - -struct file_operations lov_proc_target_fops = { - .owner = THIS_MODULE, - .open = lov_target_seq_open, - .read = seq_read, - .llseek = seq_lseek, - .release = lprocfs_seq_release, -}; -#endif /* LPROCFS */ - diff --git a/lustre/lvfs/.cvsignore b/lustre/lvfs/.cvsignore deleted file mode 100644 index fe3989f935..0000000000 --- a/lustre/lvfs/.cvsignore +++ /dev/null @@ -1,19 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -.deps -TAGS -.*.cmd -fsfilt-*.c -autoMakefile.in -autoMakefile -*.ko -*.mod.c -.*.flags -.tmp_versions -.depend -sources -fsfilt_ldiskfs* -fsfilt-ldiskfs* diff --git a/lustre/lvfs/Info.plist b/lustre/lvfs/Info.plist deleted file mode 100644 index 44439e2a89..0000000000 --- a/lustre/lvfs/Info.plist +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>lvfs</string> - <key>CFBundleIconFile</key> - <string></string> - <key>CFBundleIdentifier</key> - <string>com.clusterfs.lustre.lvfs</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundlePackageType</key> - <string>KEXT</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1.0.1</string> - <key>OSBundleCompatibleVersion</key> - <string>1.0.0</string> - <key>OSBundleLibraries</key> - <dict> - <key>com.apple.kpi.bsd</key> - <string>8.0.0b1</string> - <key>com.apple.kpi.libkern</key> - <string>8.0.0b1</string> - <key>com.apple.kpi.mach</key> - <string>8.0.0b1</string> - <key>com.apple.kpi.unsupported</key> - <string>8.0.0b1</string> - <key>com.clusterfs.lustre.libcfs</key> - <string>1.0.0</string> - </dict> -</dict> -</plist> diff --git a/lustre/lvfs/Makefile.in b/lustre/lvfs/Makefile.in deleted file mode 100644 index de72dbdf10..0000000000 --- a/lustre/lvfs/Makefile.in +++ /dev/null @@ -1,20 +0,0 @@ -MODULES := lvfs -@SERVER_TRUE@MODULES += fsfilt_@BACKINGFS@ -@QUOTA_TRUE@MODULES += quotafmt_test - -lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o prng.o lvfs_lib.o -@QUOTA_TRUE@lvfs-objs += lustre_quota_fmt.o lustre_quota_fmt_convert.o - -@QUOTA_TRUE@quotafmt-objs := quotafmt_test.o - -ifeq ($(PATCHLEVEL),6) -fsfilt_@BACKINGFS@-objs := fsfilt-@BACKINGFS@.o - -$(obj)/fsfilt-%.c: $(obj)/fsfilt_%.c - ln -s $< $@ -endif - -# for <ext3/xattr.h> on 2.6 -EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LDISKFS_DIR@ -I@LDISKFS_DIR@/ldiskfs - -@INCLUDE_RULES@ diff --git a/lustre/lvfs/autoMakefile.am b/lustre/lvfs/autoMakefile.am deleted file mode 100644 index b7b3a484e2..0000000000 --- a/lustre/lvfs/autoMakefile.am +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution -if LIBLUSTRE -noinst_LIBRARIES = liblvfs.a -liblvfs_a_SOURCES = lvfs_userfs.c prng.c lvfs_lib.c -liblvfs_a_CFLAGS = $(LLCFLAGS) -liblvfs_a_CPPFLAGS = $(LLCPPFLAGS) - -#if MYSQL -#liblvfs_a_SOURCES += lvfs_user_mysql.c -#endif -endif - -if MODULES - -if LINUX - -modulefs_DATA := lvfs$(KMODEXT) - -if SERVER -modulefs_DATA += fsfilt_$(BACKINGFS)$(KMODEXT) - -sources: fsfilt_$(BACKINGFS).c - touch sources - -else #SERVER -sources: - -endif #SERVER - -fsfilt_extN.c: fsfilt_ext3.c - sed -e "s/EXT3/EXTN/g" -e "s/ext3/extN/g" $< > $@ - -ldiskfs_sed_flags = \ - -e "s/dx_hash_info/ext3_dx_hash_info/g" \ - -e "s/dir_private_info/ext3_dir_private_info/g" \ - -e "s/DX_HASH/EXT3_DX_HASH/g" \ - -e "s/reserve_window/ext3_reserve_window/g" \ - -e "s/rsv_window_add/ext3_rsv_window_add/g" \ - -e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g" - -fsfilt_ldiskfs.c: fsfilt_ext3.c - sed $(strip $(ldiskfs_sed_flags)) $< > $@ -fsfilt_ldiskfs_quota.h: fsfilt_ext3_quota.h - sed $(strip $(ldiskfs_sed_flags)) $< > $@ - -endif # LINUX - -if DARWIN - -macos_PROGRAMS := lvfs - -lvfs_SOURCES := lvfs_darwin.c - -lvfs_CFLAGS := $(EXTRA_KCFLAGS) -lvfs_LDFLAGS := $(EXTRA_KLDFLAGS) -lvfs_LDADD := $(EXTRA_KLIBS) - -plist_DATA := Info.plist - -install_data_hook := fix-kext-ownership - -endif # DARWIN - -else # MODULES - -sources: - -endif # MODULES - -install-data-hook: $(install_data_hook) - -DIST_SOURCES = fsfilt.c fsfilt_ext3.c fsfilt_reiserfs.c lvfs_common.c \ - lvfs_internal.h lvfs_linux.c lvfs_userfs.c \ - upcall_cache.c prng.c lvfs_lib.c\ - lustre_quota_fmt.c lustre_quota_fmt.h quotafmt_test.c \ - lustre_quota_fmt_convert.c \ - # quotacheck_test.c quotactl_test.c fsfilt_ext3_quota.h - -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ -CLEANFILES = fsfilt-*.c fsfilt_ldiskfs*.c fsfilt_extN.c sources - diff --git a/lustre/lvfs/fsfilt.c b/lustre/lvfs/fsfilt.c deleted file mode 100644 index 6f88917f3d..0000000000 --- a/lustre/lvfs/fsfilt.c +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_FILTER - -#include <linux/fs.h> -#include <linux/jbd.h> -#include <linux/module.h> -#include <linux/kmod.h> -#include <linux/slab.h> -#include <libcfs/kp30.h> -#include <lustre_fsfilt.h> - -LIST_HEAD(fsfilt_types); - -static struct fsfilt_operations *fsfilt_search_type(const char *type) -{ - struct fsfilt_operations *found; - struct list_head *p; - - list_for_each(p, &fsfilt_types) { - found = list_entry(p, struct fsfilt_operations, fs_list); - if (!strcmp(found->fs_type, type)) { - return found; - } - } - return NULL; -} - -int fsfilt_register_ops(struct fsfilt_operations *fs_ops) -{ - struct fsfilt_operations *found; - - /* lock fsfilt_types list */ - if ((found = fsfilt_search_type(fs_ops->fs_type))) { - if (found != fs_ops) { - CERROR("different operations for type %s\n", - fs_ops->fs_type); - /* unlock fsfilt_types list */ - RETURN(-EEXIST); - } - } else { - PORTAL_MODULE_USE; - list_add(&fs_ops->fs_list, &fsfilt_types); - } - - /* unlock fsfilt_types list */ - return 0; -} - -void fsfilt_unregister_ops(struct fsfilt_operations *fs_ops) -{ - struct list_head *p; - - /* lock fsfilt_types list */ - list_for_each(p, &fsfilt_types) { - struct fsfilt_operations *found; - - found = list_entry(p, typeof(*found), fs_list); - if (found == fs_ops) { - list_del(p); - PORTAL_MODULE_UNUSE; - break; - } - } - /* unlock fsfilt_types list */ -} - -struct fsfilt_operations *fsfilt_get_ops(const char *type) -{ - struct fsfilt_operations *fs_ops; - - /* lock fsfilt_types list */ - if (!(fs_ops = fsfilt_search_type(type))) { - char name[32]; - int rc; - - snprintf(name, sizeof(name) - 1, "fsfilt_%s", type); - name[sizeof(name) - 1] = '\0'; - - if (!(rc = request_module(name))) { - fs_ops = fsfilt_search_type(type); - CDEBUG(D_INFO, "Loaded module '%s'\n", name); - if (!fs_ops) - rc = -ENOENT; - } - - if (rc) { - CERROR("Can't find %s interface\n", name); - RETURN(ERR_PTR(rc < 0 ? rc : -rc)); - /* unlock fsfilt_types list */ - } - } - try_module_get(fs_ops->fs_owner); - /* unlock fsfilt_types list */ - - return fs_ops; -} - -void fsfilt_put_ops(struct fsfilt_operations *fs_ops) -{ - module_put(fs_ops->fs_owner); -} - - -EXPORT_SYMBOL(fsfilt_register_ops); -EXPORT_SYMBOL(fsfilt_unregister_ops); -EXPORT_SYMBOL(fsfilt_get_ops); -EXPORT_SYMBOL(fsfilt_put_ops); diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c deleted file mode 100644 index 88f31b8059..0000000000 --- a/lustre/lvfs/fsfilt_ext3.c +++ /dev/null @@ -1,2219 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/lib/fsfilt_ext3.c - * Lustre filesystem abstraction routines - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_FILTER - -#include <linux/init.h> -#include <linux/module.h> -#include <linux/fs.h> -#include <linux/jbd.h> -#include <linux/slab.h> -#include <linux/pagemap.h> -#include <linux/quotaops.h> -#include <linux/ext3_fs.h> -#include <linux/ext3_jbd.h> -#include <linux/version.h> -#include <linux/bitops.h> -#include <linux/quota.h> -#include <linux/quotaio_v1.h> -#include <linux/quotaio_v2.h> -#include <linux/parser.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include <linux/ext3_xattr.h> -#else -#include <ext3/xattr.h> -#endif - -#include <libcfs/kp30.h> -#include <lustre_fsfilt.h> -#include <obd.h> -#include <lustre_quota.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include <linux/iobuf.h> -#endif -#include <linux/lustre_compat25.h> -#include <linux/lprocfs_status.h> - -#ifdef EXT3_MULTIBLOCK_ALLOCATOR -#include <linux/ext3_extents.h> -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) -#define FSFILT_DATA_TRANS_BLOCKS(sb) EXT3_DATA_TRANS_BLOCKS -#define FSFILT_DELETE_TRANS_BLOCKS(sb) EXT3_DELETE_TRANS_BLOCKS -#else -#define FSFILT_DATA_TRANS_BLOCKS(sb) EXT3_DATA_TRANS_BLOCKS(sb) -#define FSFILT_DELETE_TRANS_BLOCKS(sb) EXT3_DELETE_TRANS_BLOCKS(sb) -#endif - -#ifdef EXT3_SINGLEDATA_TRANS_BLOCKS_HAS_SB -/* for kernels 2.6.18 and later */ -#define FSFILT_SINGLEDATA_TRANS_BLOCKS(sb) EXT3_SINGLEDATA_TRANS_BLOCKS(sb) -#else -#define FSFILT_SINGLEDATA_TRANS_BLOCKS(sb) EXT3_SINGLEDATA_TRANS_BLOCKS -#endif - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#define fsfilt_ext3_journal_start(inode, nblocks) \ - journal_start(EXT3_JOURNAL(inode),nblocks) -#define fsfilt_ext3_journal_stop(handle) journal_stop(handle) -#else -#define fsfilt_ext3_journal_start(inode, nblocks) ext3_journal_start(inode, nblocks) -#define fsfilt_ext3_journal_stop(handle) ext3_journal_stop(handle) -#endif - -static cfs_mem_cache_t *fcb_cache; - -struct fsfilt_cb_data { - struct journal_callback cb_jcb; /* jbd private data - MUST BE FIRST */ - fsfilt_cb_t cb_func; /* MDS/OBD completion function */ - struct obd_device *cb_obd; /* MDS/OBD completion device */ - __u64 cb_last_rcvd; /* MDS/OST last committed operation */ - void *cb_data; /* MDS/OST completion function data */ -}; - -#ifndef EXT3_XATTR_INDEX_TRUSTED /* temporary until we hit l28 kernel */ -#define EXT3_XATTR_INDEX_TRUSTED 4 -#endif - -static char *fsfilt_ext3_get_label(struct super_block *sb) -{ - return EXT3_SB(sb)->s_es->s_volume_name; -} - -static int fsfilt_ext3_set_label(struct super_block *sb, char *label) -{ - /* see e.g. fsfilt_ext3_write_record() */ - journal_t *journal; - handle_t *handle; - int err; - - journal = EXT3_SB(sb)->s_journal; - lock_24kernel(); - handle = journal_start(journal, 1); - unlock_24kernel(); - if (IS_ERR(handle)) { - CERROR("can't start transaction\n"); - return(PTR_ERR(handle)); - } - - err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh); - if (err) - goto out; - - memcpy(EXT3_SB(sb)->s_es->s_volume_name, label, - sizeof(EXT3_SB(sb)->s_es->s_volume_name)); - - err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); - -out: - lock_24kernel(); - journal_stop(handle); - unlock_24kernel(); - - return(err); -} - -static char *fsfilt_ext3_uuid(struct super_block *sb) -{ - return EXT3_SB(sb)->s_es->s_uuid; -} - -#ifdef HAVE_DISK_INODE_VERSION -/* - * Get the 64-bit version for an inode. - */ -static __u64 fsfilt_ext3_get_version(struct inode *inode) -{ - return EXT3_I(inode)->i_fs_version; -} - -/* - * Set the 64-bit version and return the old version. - */ -static __u64 fsfilt_ext3_set_version(struct inode *inode, __u64 new_version) -{ - __u64 old_version = EXT3_I(inode)->i_fs_version; - - (EXT3_I(inode))->i_fs_version = new_version; - return old_version; -} - -#endif - -/* - * We don't currently need any additional blocks for rmdir and - * unlink transactions because we are storing the OST oa_id inside - * the inode (which we will be changing anyways as part of this - * transaction). - */ -static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private, - int logs) -{ - /* For updates to the last received file */ - int nblocks = FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb); - journal_t *journal; - void *handle; - - if (current->journal_info) { - CDEBUG(D_INODE, "increasing refcount on %p\n", - current->journal_info); - goto journal_start; - } - - switch(op) { - case FSFILT_OP_RMDIR: - case FSFILT_OP_UNLINK: - /* delete one file + create/update logs for each stripe */ - nblocks += FSFILT_DELETE_TRANS_BLOCKS(inode->i_sb); - nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb)) * logs; - break; - case FSFILT_OP_RENAME: - /* modify additional directory */ - nblocks += FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb); - /* no break */ - case FSFILT_OP_SYMLINK: - /* additional block + block bitmap + GDT for long symlink */ - nblocks += 3; - /* no break */ - case FSFILT_OP_CREATE: { -#if defined(EXT3_EXTENTS_FL) && defined(EXT3_INDEX_FL) - static int warned; - if (!warned) { - if (!test_opt(inode->i_sb, EXTENTS)) { - warned = 1; - } else if (((EXT3_I(inode)->i_flags & - cpu_to_le32(EXT3_EXTENTS_FL | EXT3_INDEX_FL)) == - cpu_to_le32(EXT3_EXTENTS_FL | EXT3_INDEX_FL))) { - CWARN("extent-mapped directory found - contact " - "CFS: support@clusterfs.com\n"); - warned = 1; - } - } -#endif - /* no break */ - } - case FSFILT_OP_MKDIR: - case FSFILT_OP_MKNOD: - /* modify one inode + block bitmap + GDT */ - nblocks += 3; - /* no break */ - case FSFILT_OP_LINK: - /* modify parent directory */ - nblocks += EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_DATA_TRANS_BLOCKS(inode->i_sb); - /* create/update logs for each stripe */ - nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb)) * logs; - break; - case FSFILT_OP_SETATTR: - /* Setattr on inode */ - nblocks += 1; - nblocks += EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_DATA_TRANS_BLOCKS(inode->i_sb); - /* quota chown log for each stripe */ - nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb)) * logs; - break; - case FSFILT_OP_CANCEL_UNLINK: - /* blocks for log header bitmap update OR - * blocks for catalog header bitmap update + unlink of logs */ - nblocks = (LLOG_CHUNK_SIZE >> inode->i_blkbits) + - FSFILT_DELETE_TRANS_BLOCKS(inode->i_sb) * logs; - break; - case FSFILT_OP_JOIN: - /* delete 2 file(file + array id) + create 1 file (array id) - * create/update logs for each stripe */ - nblocks += 2 * FSFILT_DELETE_TRANS_BLOCKS(inode->i_sb); - - /*create array log for head file*/ - nblocks += 3; - nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb)); - /*update head file array */ - nblocks += EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_DATA_TRANS_BLOCKS(inode->i_sb); - break; - default: CERROR("unknown transaction start op %d\n", op); - LBUG(); - } - - LASSERT(current->journal_info == desc_private); - journal = EXT3_SB(inode->i_sb)->s_journal; - if (nblocks > journal->j_max_transaction_buffers) { - CWARN("too many credits %d for op %ux%u using %d instead\n", - nblocks, op, logs, journal->j_max_transaction_buffers); - nblocks = journal->j_max_transaction_buffers; - } - - journal_start: - LASSERTF(nblocks > 0, "can't start %d credit transaction\n", nblocks); - lock_24kernel(); - handle = fsfilt_ext3_journal_start(inode, nblocks); - unlock_24kernel(); - - if (!IS_ERR(handle)) - LASSERT(current->journal_info == handle); - else - CERROR("error starting handle for op %u (%u credits): rc %ld\n", - op, nblocks, PTR_ERR(handle)); - return handle; -} - -/* - * Calculate the number of buffer credits needed to write multiple pages in - * a single ext3 transaction. No, this shouldn't be here, but as yet ext3 - * doesn't have a nice API for calculating this sort of thing in advance. - * - * See comment above ext3_writepage_trans_blocks for details. We assume - * no data journaling is being done, but it does allow for all of the pages - * being non-contiguous. If we are guaranteed contiguous pages we could - * reduce the number of (d)indirect blocks a lot. - * - * With N blocks per page and P pages, for each inode we have at most: - * N*P indirect - * min(N*P, blocksize/4 + 1) dindirect blocks - * niocount tindirect - * - * For the entire filesystem, we have at most: - * min(sum(nindir + P), ngroups) bitmap blocks (from the above) - * min(sum(nindir + P), gdblocks) group descriptor blocks (from the above) - * objcount inode blocks - * 1 superblock - * 2 * EXT3_SINGLEDATA_TRANS_BLOCKS for the quota files - * - * 1 EXT3_DATA_TRANS_BLOCKS for the last_rcvd update. - */ -static int fsfilt_ext3_credits_needed(int objcount, struct fsfilt_objinfo *fso, - int niocount, struct niobuf_local *nb) -{ - struct super_block *sb = fso->fso_dentry->d_inode->i_sb; - __u64 next_indir; - const int blockpp = 1 << (CFS_PAGE_SHIFT - sb->s_blocksize_bits); - int nbitmaps = 0, ngdblocks; - int needed = objcount + 1; /* inodes + superblock */ - int i, j; - - for (i = 0, j = 0; i < objcount; i++, fso++) { - /* two or more dindirect blocks in case we cross boundary */ - int ndind = (long)((nb[j + fso->fso_bufcnt - 1].offset - - nb[j].offset) >> - sb->s_blocksize_bits) / - (EXT3_ADDR_PER_BLOCK(sb) * EXT3_ADDR_PER_BLOCK(sb)); - nbitmaps += min(fso->fso_bufcnt, ndind > 0 ? ndind : 2); - - /* leaf, indirect, tindirect blocks for first block */ - nbitmaps += blockpp + 2; - - j += fso->fso_bufcnt; - } - - next_indir = nb[0].offset + - (EXT3_ADDR_PER_BLOCK(sb) << sb->s_blocksize_bits); - for (i = 1; i < niocount; i++) { - if (nb[i].offset >= next_indir) { - nbitmaps++; /* additional indirect */ - next_indir = nb[i].offset + - (EXT3_ADDR_PER_BLOCK(sb)<<sb->s_blocksize_bits); - } else if (nb[i].offset != nb[i - 1].offset + sb->s_blocksize) { - nbitmaps++; /* additional indirect */ - } - nbitmaps += blockpp; /* each leaf in different group? */ - } - - ngdblocks = nbitmaps; - if (nbitmaps > EXT3_SB(sb)->s_groups_count) - nbitmaps = EXT3_SB(sb)->s_groups_count; - if (ngdblocks > EXT3_SB(sb)->s_gdb_count) - ngdblocks = EXT3_SB(sb)->s_gdb_count; - - needed += nbitmaps + ngdblocks; - - /* last_rcvd update */ - needed += FSFILT_DATA_TRANS_BLOCKS(sb); - -#if defined(CONFIG_QUOTA) - /* We assume that there will be 1 bit set in s_dquot.flags for each - * quota file that is active. This is at least true for now. - */ - needed += hweight32(sb_any_quota_enabled(sb)) * - FSFILT_SINGLEDATA_TRANS_BLOCKS(sb); -#endif - - return needed; -} - -/* We have to start a huge journal transaction here to hold all of the - * metadata for the pages being written here. This is necessitated by - * the fact that we do lots of prepare_write operations before we do - * any of the matching commit_write operations, so even if we split - * up to use "smaller" transactions none of them could complete until - * all of them were opened. By having a single journal transaction, - * we eliminate duplicate reservations for common blocks like the - * superblock and group descriptors or bitmaps. - * - * We will start the transaction here, but each prepare_write will - * add a refcount to the transaction, and each commit_write will - * remove a refcount. The transaction will be closed when all of - * the pages have been written. - */ -static void *fsfilt_ext3_brw_start(int objcount, struct fsfilt_objinfo *fso, - int niocount, struct niobuf_local *nb, - void *desc_private, int logs) -{ - journal_t *journal; - handle_t *handle; - int needed; - ENTRY; - - LASSERT(current->journal_info == desc_private); - journal = EXT3_SB(fso->fso_dentry->d_inode->i_sb)->s_journal; - needed = fsfilt_ext3_credits_needed(objcount, fso, niocount, nb); - - /* The number of blocks we could _possibly_ dirty can very large. - * We reduce our request if it is absurd (and we couldn't get that - * many credits for a single handle anyways). - * - * At some point we have to limit the size of I/Os sent at one time, - * increase the size of the journal, or we have to calculate the - * actual journal requirements more carefully by checking all of - * the blocks instead of being maximally pessimistic. It remains to - * be seen if this is a real problem or not. - */ - if (needed > journal->j_max_transaction_buffers) { - CERROR("want too many journal credits (%d) using %d instead\n", - needed, journal->j_max_transaction_buffers); - needed = journal->j_max_transaction_buffers; - } - - LASSERTF(needed > 0, "can't start %d credit transaction\n", needed); - lock_24kernel(); - handle = fsfilt_ext3_journal_start(fso->fso_dentry->d_inode, needed); - unlock_24kernel(); - if (IS_ERR(handle)) { - CERROR("can't get handle for %d credits: rc = %ld\n", needed, - PTR_ERR(handle)); - } else { - LASSERT(handle->h_buffer_credits >= needed); - LASSERT(current->journal_info == handle); - } - - RETURN(handle); -} - -static int fsfilt_ext3_extend(struct inode *inode, unsigned int nblocks,void *h) -{ - handle_t *handle = h; - - /* fsfilt_extend called with nblocks = 0 for testing in special cases */ - if (nblocks == 0) { - handle->h_buffer_credits = 0; - CWARN("setting credits of handle %p to zero by request\n", h); - } - - if (handle->h_buffer_credits > nblocks) - return 0; - if (journal_extend(handle, nblocks) == 0) - return 0; - - ext3_mark_inode_dirty(handle, inode); - return journal_restart(handle, nblocks); -} - -static int fsfilt_ext3_commit(struct inode *inode, void *h, int force_sync) -{ - int rc; - handle_t *handle = h; - - LASSERT(current->journal_info == handle); - if (force_sync) - handle->h_sync = 1; /* recovery likes this */ - - lock_24kernel(); - rc = fsfilt_ext3_journal_stop(handle); - unlock_24kernel(); - - return rc; -} - -static int fsfilt_ext3_commit_async(struct inode *inode, void *h, - void **wait_handle) -{ - unsigned long tid; - transaction_t *transaction; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - unsigned long rtid; -#endif - handle_t *handle = h; - journal_t *journal; - int rc; - - LASSERT(current->journal_info == handle); - - lock_24kernel(); - transaction = handle->h_transaction; - journal = transaction->t_journal; - tid = transaction->t_tid; - /* we don't want to be blocked */ - handle->h_sync = 0; - rc = fsfilt_ext3_journal_stop(handle); - if (rc) { - CERROR("error while stopping transaction: %d\n", rc); - unlock_24kernel(); - return rc; - } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - rtid = log_start_commit(journal, transaction); - if (rtid != tid) - CERROR("strange race: %lu != %lu\n", - (unsigned long) tid, (unsigned long) rtid); -#else - log_start_commit(journal, tid); -#endif - unlock_24kernel(); - - *wait_handle = (void *) tid; - CDEBUG(D_INODE, "commit async: %lu\n", (unsigned long) tid); - return 0; -} - -static int fsfilt_ext3_commit_wait(struct inode *inode, void *h) -{ - journal_t *journal = EXT3_JOURNAL(inode); - tid_t tid = (tid_t)(long)h; - - CDEBUG(D_INODE, "commit wait: %lu\n", (unsigned long) tid); - if (unlikely(is_journal_aborted(journal))) - return -EIO; - - log_wait_commit(EXT3_JOURNAL(inode), tid); - - if (unlikely(is_journal_aborted(journal))) - return -EIO; - return 0; -} - -static int fsfilt_ext3_setattr(struct dentry *dentry, void *handle, - struct iattr *iattr, int do_trunc) -{ - struct inode *inode = dentry->d_inode; - int rc = 0; - - lock_24kernel(); - - /* Avoid marking the inode dirty on the superblock list unnecessarily. - * We are already writing the inode to disk as part of this - * transaction and want to avoid a lot of extra inode writeout - * later on. b=9828 */ - if (iattr->ia_valid & ATTR_SIZE && !do_trunc) { - /* ATTR_SIZE would invoke truncate: clear it */ - iattr->ia_valid &= ~ATTR_SIZE; - EXT3_I(inode)->i_disksize = iattr->ia_size; - i_size_write(inode, iattr->ia_size); - - if (iattr->ia_valid & ATTR_UID) - inode->i_uid = iattr->ia_uid; - if (iattr->ia_valid & ATTR_GID) - inode->i_gid = iattr->ia_gid; - if (iattr->ia_valid & ATTR_ATIME) - inode->i_atime = iattr->ia_atime; - if (iattr->ia_valid & ATTR_MTIME) - inode->i_mtime = iattr->ia_mtime; - if (iattr->ia_valid & ATTR_CTIME) - inode->i_ctime = iattr->ia_ctime; - if (iattr->ia_valid & ATTR_MODE) { - inode->i_mode = iattr->ia_mode; - - if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID)) - inode->i_mode &= ~S_ISGID; - } - - inode->i_sb->s_op->dirty_inode(inode); - - goto out; - } - - /* Don't allow setattr to change file type */ - if (iattr->ia_valid & ATTR_MODE) - iattr->ia_mode = (inode->i_mode & S_IFMT) | - (iattr->ia_mode & ~S_IFMT); - - /* We set these flags on the client, but have already checked perms - * so don't confuse inode_change_ok. */ - iattr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET); - - if (inode->i_op->setattr) { - rc = inode->i_op->setattr(dentry, iattr); - } else { - rc = inode_change_ok(inode, iattr); - if (!rc) - rc = inode_setattr(inode, iattr); - } - - out: - unlock_24kernel(); - RETURN(rc); -} - -static int fsfilt_ext3_iocontrol(struct inode * inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - int rc = 0; - ENTRY; - - /* FIXME: Can't do this because of nested transaction deadlock */ - if (cmd == EXT3_IOC_SETFLAGS && (*(int *)arg) & EXT3_JOURNAL_DATA_FL) { - CERROR("can't set data journal flag on file\n"); - RETURN(-EPERM); - } - - if (inode->i_fop->ioctl) - rc = inode->i_fop->ioctl(inode, file, cmd, arg); - else - RETURN(-ENOTTY); - - RETURN(rc); -} - -static int fsfilt_ext3_set_md(struct inode *inode, void *handle, - void *lmm, int lmm_size, const char *name) -{ - int rc; - - LASSERT(TRYLOCK_INODE_MUTEX(inode) == 0); - - lock_24kernel(); - rc = ext3_xattr_set_handle(handle, inode, EXT3_XATTR_INDEX_TRUSTED, - name, lmm, lmm_size, 0); - - unlock_24kernel(); - - if (rc && rc != -EROFS) - CERROR("error adding MD data to inode %lu: rc = %d\n", - inode->i_ino, rc); - return rc; -} - -/* Must be called with i_mutex held */ -static int fsfilt_ext3_get_md(struct inode *inode, void *lmm, int lmm_size, - const char *name) -{ - int rc; - - LASSERT(TRYLOCK_INODE_MUTEX(inode) == 0); - lock_24kernel(); - - rc = ext3_xattr_get(inode, EXT3_XATTR_INDEX_TRUSTED, - name, lmm, lmm_size); - unlock_24kernel(); - - /* This gives us the MD size */ - if (lmm == NULL) - return (rc == -ENODATA) ? 0 : rc; - - if (rc < 0) { - CDEBUG(D_INFO, "error getting EA %d/%s from inode %lu: rc %d\n", - EXT3_XATTR_INDEX_TRUSTED, name, - inode->i_ino, rc); - memset(lmm, 0, lmm_size); - return (rc == -ENODATA) ? 0 : rc; - } - - return rc; -} - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -static int fsfilt_ext3_send_bio(int rw, struct inode *inode, struct bio *bio) -{ - submit_bio(rw, bio); - return 0; -} -#else -static int fsfilt_ext3_send_bio(int rw, struct inode *inode, struct kiobuf *bio) -{ - int rc, blk_per_page; - - rc = brw_kiovec(rw, 1, &bio, inode->i_dev, - KIOBUF_GET_BLOCKS(bio), 1 << inode->i_blkbits); - /* - * brw_kiovec() returns number of bytes actually written. If error - * occurred after something was written, error code is returned though - * kiobuf->errno. (See bug 6854.) - */ - - blk_per_page = CFS_PAGE_SIZE >> inode->i_blkbits; - - if (rc != (1 << inode->i_blkbits) * bio->nr_pages * blk_per_page) { - CERROR("short write? expected %d, wrote %d (%d)\n", - (1 << inode->i_blkbits) * bio->nr_pages * blk_per_page, - rc, bio->errno); - } - if (bio->errno != 0) { - CERROR("IO error. Wrote %d of %d (%d)\n", - rc, - (1 << inode->i_blkbits) * bio->nr_pages * blk_per_page, - bio->errno); - rc = bio->errno; - } - - return rc; -} -#endif - -static ssize_t fsfilt_ext3_readpage(struct file *file, char *buf, size_t count, - loff_t *off) -{ - struct inode *inode = file->f_dentry->d_inode; - int rc = 0; - - if (S_ISREG(inode->i_mode)) - rc = file->f_op->read(file, buf, count, off); - else { - const int blkbits = inode->i_sb->s_blocksize_bits; - const int blksize = inode->i_sb->s_blocksize; - - CDEBUG(D_EXT2, "reading "LPSZ" at dir %lu+%llu\n", - count, inode->i_ino, *off); - while (count > 0) { - struct buffer_head *bh; - - bh = NULL; - if (*off < i_size_read(inode)) { - int err = 0; - - bh = ext3_bread(NULL, inode, *off >> blkbits, - 0, &err); - - CDEBUG(D_EXT2, "read %u@%llu\n", blksize, *off); - - if (bh) { - memcpy(buf, bh->b_data, blksize); - brelse(bh); - } else if (err) { - /* XXX in theory we should just fake - * this buffer and continue like ext3, - * especially if this is a partial read - */ - CERROR("error read dir %lu+%llu: %d\n", - inode->i_ino, *off, err); - RETURN(err); - } - } - if (!bh) { - struct ext3_dir_entry_2 *fake = (void *)buf; - - CDEBUG(D_EXT2, "fake %u@%llu\n", blksize, *off); - memset(fake, 0, sizeof(*fake)); - fake->rec_len = cpu_to_le16(blksize); - } - count -= blksize; - buf += blksize; - *off += blksize; - rc += blksize; - } - } - - return rc; -} - -static void fsfilt_ext3_cb_func(struct journal_callback *jcb, int error) -{ - struct fsfilt_cb_data *fcb = (struct fsfilt_cb_data *)jcb; - - fcb->cb_func(fcb->cb_obd, fcb->cb_last_rcvd, fcb->cb_data, error); - - OBD_SLAB_FREE(fcb, fcb_cache, sizeof *fcb); -} - -static int fsfilt_ext3_add_journal_cb(struct obd_device *obd, __u64 last_rcvd, - void *handle, fsfilt_cb_t cb_func, - void *cb_data) -{ - struct fsfilt_cb_data *fcb; - - OBD_SLAB_ALLOC(fcb, fcb_cache, CFS_ALLOC_IO, sizeof *fcb); - if (fcb == NULL) - RETURN(-ENOMEM); - - fcb->cb_func = cb_func; - fcb->cb_obd = obd; - fcb->cb_last_rcvd = last_rcvd; - fcb->cb_data = cb_data; - - CDEBUG(D_EXT2, "set callback for last_rcvd: "LPD64"\n", last_rcvd); - lock_24kernel(); - journal_callback_set(handle, fsfilt_ext3_cb_func, - (struct journal_callback *)fcb); - unlock_24kernel(); - - return 0; -} - -/* - * We need to hack the return value for the free inode counts because - * the current EA code requires one filesystem block per inode with EAs, - * so it is possible to run out of blocks before we run out of inodes. - * - * This can be removed when the ext3 EA code is fixed. - */ -static int fsfilt_ext3_statfs(struct super_block *sb, struct obd_statfs *osfs) -{ - struct kstatfs sfs; - int rc; - - memset(&sfs, 0, sizeof(sfs)); - rc = ll_do_statfs(sb,&sfs); - - if (!rc && sfs.f_bfree < sfs.f_ffree) { - sfs.f_files = (sfs.f_files - sfs.f_ffree) + sfs.f_bfree; - sfs.f_ffree = sfs.f_bfree; - } - - statfs_pack(osfs, &sfs); - return rc; -} - -static int fsfilt_ext3_sync(struct super_block *sb) -{ - return ext3_force_commit(sb); -} - -#if defined(EXT3_MULTIBLOCK_ALLOCATOR) && (!defined(EXT3_EXT_CACHE_NO) || defined(EXT_CACHE_MARK)) -#warning "kernel code has old extents/mballoc patch, disabling" -#undef EXT3_MULTIBLOCK_ALLOCATOR -#endif -#ifndef EXT3_EXTENTS_FL -#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ -#endif - -#ifdef EXT3_MULTIBLOCK_ALLOCATOR -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#define ext3_up_truncate_sem(inode) up_write(&EXT3_I(inode)->truncate_sem); -#define ext3_down_truncate_sem(inode) down_write(&EXT3_I(inode)->truncate_sem); -#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) -#define ext3_up_truncate_sem(inode) up(&EXT3_I(inode)->truncate_sem); -#define ext3_down_truncate_sem(inode) down(&EXT3_I(inode)->truncate_sem); -#else -#define ext3_up_truncate_sem(inode) mutex_unlock(&EXT3_I(inode)->truncate_mutex); -#define ext3_down_truncate_sem(inode) mutex_lock(&EXT3_I(inode)->truncate_mutex); -#endif - -#ifndef EXT_ASSERT -#define EXT_ASSERT(cond) BUG_ON(!(cond)) -#endif - -#ifdef EXT3_EXT_HAS_NO_TREE -/* for kernels 2.6.18 and later */ -#define ext3_ext_base inode -#define ext3_ext_base2inode(inode) (inode) -#define EXT_DEPTH(inode) ext_depth(inode) -#define EXT_GENERATION(inode) ext_generation(inode) -#define fsfilt_ext3_ext_walk_space(inode, block, num, cb, cbdata) \ - ext3_ext_walk_space(inode, block, num, cb, cbdata); -#else -#define ext3_ext_base ext3_extents_tree -#define ext3_ext_base2inode(tree) (tree->inode) -#define fsfilt_ext3_ext_walk_space(tree, block, num, cb, cbdata) \ - ext3_ext_walk_space(tree, block, num, cb); -#endif - -#include <linux/lustre_version.h> -#if EXT3_EXT_MAGIC == 0xf301 -#define ee_start e_start -#define ee_block e_block -#define ee_len e_num -#endif -#ifndef EXT3_BB_MAX_BLOCKS -#define ext3_mb_new_blocks(handle, inode, goal, count, aflags, err) \ - ext3_new_blocks(handle, inode, count, goal, err) -#endif - -struct bpointers { - unsigned long *blocks; - int *created; - unsigned long start; - int num; - int init_num; - int create; -}; - -static int ext3_ext_find_goal(struct inode *inode, struct ext3_ext_path *path, - unsigned long block, int *aflags) -{ - struct ext3_inode_info *ei = EXT3_I(inode); - unsigned long bg_start; - unsigned long colour; - int depth; - - if (path) { - struct ext3_extent *ex; - depth = path->p_depth; - - /* try to predict block placement */ - if ((ex = path[depth].p_ext)) { -#if 0 - /* This prefers to eat into a contiguous extent - * rather than find an extent that the whole - * request will fit into. This can fragment data - * block allocation and prevents our lovely 1M I/Os - * from reaching the disk intact. */ - if (ex->ee_block + ex->ee_len == block) - *aflags |= 1; -#endif - return ex->ee_start + (block - ex->ee_block); - } - - /* it looks index is empty - * try to find starting from index itself */ - if (path[depth].p_bh) - return path[depth].p_bh->b_blocknr; - } - - /* OK. use inode's group */ - bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + - le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); - colour = (current->pid % 16) * - (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); - return bg_start + colour + block; -} - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include <linux/locks.h> -static void ll_unmap_underlying_metadata(struct super_block *sb, - unsigned long blocknr) -{ - struct buffer_head *old_bh; - - old_bh = get_hash_table(sb->s_dev, blocknr, sb->s_blocksize); - if (old_bh) { - mark_buffer_clean(old_bh); - wait_on_buffer(old_bh); - clear_bit(BH_Req, &old_bh->b_state); - __brelse(old_bh); - } -} -#else -#define ll_unmap_underlying_metadata(sb, blocknr) \ - unmap_underlying_metadata((sb)->s_bdev, blocknr) -#endif - -#ifndef EXT3_MB_HINT_GROUP_ALLOC -static unsigned long new_blocks(handle_t *handle, struct ext3_ext_base *base, - struct ext3_ext_path *path, unsigned long block, - unsigned long *count, int *err) -{ - unsigned long pblock, goal; - int aflags = 0; - struct inode *inode = ext3_ext_base2inode(base); - - goal = ext3_ext_find_goal(inode, path, block, &aflags); - aflags |= 2; /* block have been already reserved */ - lock_24kernel(); - pblock = ext3_mb_new_blocks(handle, inode, goal, count, aflags, err); - unlock_24kernel(); - return pblock; - -} -#else -static unsigned long new_blocks(handle_t *handle, struct ext3_ext_base *base, - struct ext3_ext_path *path, unsigned long block, - unsigned long *count, int *err) -{ - struct inode *inode = ext3_ext_base2inode(base); - struct ext3_allocation_request ar; - unsigned long pblock; - int aflags; - - /* find neighbour allocated blocks */ - ar.lleft = block; - *err = ext3_ext_search_left(base, path, &ar.lleft, &ar.pleft); - if (*err) - return 0; - ar.lright = block; - *err = ext3_ext_search_right(base, path, &ar.lright, &ar.pright); - if (*err) - return 0; - - /* allocate new block */ - ar.goal = ext3_ext_find_goal(inode, path, block, &aflags); - ar.inode = inode; - ar.logical = block; - ar.len = *count; - ar.flags = EXT3_MB_HINT_DATA; - pblock = ext3_mb_new_blocks(handle, &ar, err); - *count = ar.len; - return pblock; -} -#endif - -#ifdef EXT3_EXT_HAS_NO_TREE -static int ext3_ext_new_extent_cb(struct ext3_ext_base *base, - struct ext3_ext_path *path, - struct ext3_ext_cache *cex, -#ifdef HAVE_EXT_PREPARE_CB_EXTENT - struct ext3_extent *ex, -#endif - void *cbdata) -{ - struct bpointers *bp = cbdata; -#else -static int ext3_ext_new_extent_cb(struct ext3_ext_base *base, - struct ext3_ext_path *path, - struct ext3_ext_cache *cex -#ifdef HAVE_EXT_PREPARE_CB_EXTENT - , struct ext3_extent *ex -#endif - ) -{ - struct bpointers *bp = base->private; -#endif - struct inode *inode = ext3_ext_base2inode(base); - struct ext3_extent nex; - unsigned long pblock; - unsigned long tgen; - int err, i; - unsigned long count; - handle_t *handle; - - i = EXT_DEPTH(base); - EXT_ASSERT(i == path->p_depth); - EXT_ASSERT(path[i].p_hdr); - - if (cex->ec_type == EXT3_EXT_CACHE_EXTENT) { - err = EXT_CONTINUE; - goto map; - } - - if (bp->create == 0) { - i = 0; - if (cex->ec_block < bp->start) - i = bp->start - cex->ec_block; - if (i >= cex->ec_len) - CERROR("nothing to do?! i = %d, e_num = %u\n", - i, cex->ec_len); - for (; i < cex->ec_len && bp->num; i++) { - *(bp->created) = 0; - bp->created++; - *(bp->blocks) = 0; - bp->blocks++; - bp->num--; - bp->start++; - } - - return EXT_CONTINUE; - } - - tgen = EXT_GENERATION(base); - count = ext3_ext_calc_credits_for_insert(base, path); - ext3_up_truncate_sem(inode); - - lock_24kernel(); - handle = fsfilt_ext3_journal_start(inode, count+EXT3_ALLOC_NEEDED+1); - unlock_24kernel(); - if (IS_ERR(handle)) { - ext3_down_truncate_sem(inode); - return PTR_ERR(handle); - } - - ext3_down_truncate_sem(inode); - if (tgen != EXT_GENERATION(base)) { - /* the tree has changed. so path can be invalid at moment */ - lock_24kernel(); - fsfilt_ext3_journal_stop(handle); - unlock_24kernel(); - return EXT_REPEAT; - } - - count = cex->ec_len; - pblock = new_blocks(handle, base, path, cex->ec_block, &count, &err); - if (!pblock) - goto out; - EXT_ASSERT(count <= cex->ec_len); - - /* insert new extent */ - nex.ee_block = cex->ec_block; - nex.ee_start = pblock; - nex.ee_len = count; - err = ext3_ext_insert_extent(handle, base, path, &nex); - if (err) { - CERROR("can't insert extent: %d\n", err); - /* XXX: export ext3_free_blocks() */ - /*ext3_free_blocks(handle, inode, nex.ee_start, nex.ee_len, 0);*/ - goto out; - } - - /* - * Putting len of the actual extent we just inserted, - * we are asking ext3_ext_walk_space() to continue - * scaning after that block - */ - cex->ec_len = nex.ee_len; - cex->ec_start = nex.ee_start; - BUG_ON(nex.ee_len == 0); - BUG_ON(nex.ee_block != cex->ec_block); - -out: - lock_24kernel(); - fsfilt_ext3_journal_stop(handle); - unlock_24kernel(); -map: - if (err >= 0) { - /* map blocks */ - if (bp->num == 0) { - CERROR("hmm. why do we find this extent?\n"); - CERROR("initial space: %lu:%u\n", - bp->start, bp->init_num); - CERROR("current extent: %u/%u/%u %d\n", - cex->ec_block, cex->ec_len, - cex->ec_start, cex->ec_type); - } - i = 0; - if (cex->ec_block < bp->start) - i = bp->start - cex->ec_block; - if (i >= cex->ec_len) - CERROR("nothing to do?! i = %d, e_num = %u\n", - i, cex->ec_len); - for (; i < cex->ec_len && bp->num; i++) { - *(bp->blocks) = cex->ec_start + i; - if (cex->ec_type == EXT3_EXT_CACHE_EXTENT) { - *(bp->created) = 0; - } else { - *(bp->created) = 1; - /* unmap any possible underlying metadata from - * the block device mapping. bug 6998. */ - ll_unmap_underlying_metadata(inode->i_sb, - *(bp->blocks)); - } - bp->created++; - bp->blocks++; - bp->num--; - bp->start++; - } - } - return err; -} - -int fsfilt_map_nblocks(struct inode *inode, unsigned long block, - unsigned long num, unsigned long *blocks, - int *created, int create) -{ -#ifdef EXT3_EXT_HAS_NO_TREE - struct ext3_ext_base *base = inode; -#else - struct ext3_extents_tree tree; - struct ext3_ext_base *base = &tree; -#endif - struct bpointers bp; - int err; - - CDEBUG(D_OTHER, "blocks %lu-%lu requested for inode %u\n", - block, block + num - 1, (unsigned) inode->i_ino); - -#ifndef EXT3_EXT_HAS_NO_TREE - ext3_init_tree_desc(base, inode); - tree.private = &bp; -#endif - bp.blocks = blocks; - bp.created = created; - bp.start = block; - bp.init_num = bp.num = num; - bp.create = create; - - ext3_down_truncate_sem(inode); - err = fsfilt_ext3_ext_walk_space(base, block, num, ext3_ext_new_extent_cb, &bp); - ext3_ext_invalidate_cache(base); - ext3_up_truncate_sem(inode); - - return err; -} - -int fsfilt_ext3_map_ext_inode_pages(struct inode *inode, struct page **page, - int pages, unsigned long *blocks, - int *created, int create) -{ - int blocks_per_page = CFS_PAGE_SIZE >> inode->i_blkbits; - int rc = 0, i = 0; - struct page *fp = NULL; - int clen = 0; - - CDEBUG(D_OTHER, "inode %lu: map %d pages from %lu\n", - inode->i_ino, pages, (*page)->index); - - /* pages are sorted already. so, we just have to find - * contig. space and process them properly */ - while (i < pages) { - if (fp == NULL) { - /* start new extent */ - fp = *page++; - clen = 1; - i++; - continue; - } else if (fp->index + clen == (*page)->index) { - /* continue the extent */ - page++; - clen++; - i++; - continue; - } - - /* process found extent */ - rc = fsfilt_map_nblocks(inode, fp->index * blocks_per_page, - clen * blocks_per_page, blocks, - created, create); - if (rc) - GOTO(cleanup, rc); - - /* look for next extent */ - fp = NULL; - blocks += blocks_per_page * clen; - created += blocks_per_page * clen; - } - - if (fp) - rc = fsfilt_map_nblocks(inode, fp->index * blocks_per_page, - clen * blocks_per_page, blocks, - created, create); -cleanup: - return rc; -} -#endif /* EXT3_MULTIBLOCK_ALLOCATOR */ - -extern int ext3_map_inode_page(struct inode *inode, struct page *page, - unsigned long *blocks, int *created, int create); -int fsfilt_ext3_map_bm_inode_pages(struct inode *inode, struct page **page, - int pages, unsigned long *blocks, - int *created, int create) -{ - int blocks_per_page = CFS_PAGE_SIZE >> inode->i_blkbits; - unsigned long *b; - int rc = 0, i, *cr; - - for (i = 0, cr = created, b = blocks; i < pages; i++, page++) { - rc = ext3_map_inode_page(inode, *page, b, cr, create); - if (rc) { - CERROR("ino %lu, blk %lu cr %u create %d: rc %d\n", - inode->i_ino, *b, *cr, create, rc); - break; - } - - b += blocks_per_page; - cr += blocks_per_page; - } - return rc; -} - -int fsfilt_ext3_map_inode_pages(struct inode *inode, struct page **page, - int pages, unsigned long *blocks, - int *created, int create, - struct semaphore *optional_sem) -{ - int rc; -#ifdef EXT3_MULTIBLOCK_ALLOCATOR - if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) { - rc = fsfilt_ext3_map_ext_inode_pages(inode, page, pages, - blocks, created, create); - return rc; - } -#endif - if (optional_sem != NULL) - down(optional_sem); - rc = fsfilt_ext3_map_bm_inode_pages(inode, page, pages, blocks, - created, create); - if (optional_sem != NULL) - up(optional_sem); - - return rc; -} - -static int fsfilt_ext3_read_record(struct file * file, void *buf, - int size, loff_t *offs) -{ - struct inode *inode = file->f_dentry->d_inode; - unsigned long block; - struct buffer_head *bh; - int err, blocksize, csize, boffs; - - /* prevent reading after eof */ - lock_kernel(); - if (i_size_read(inode) < *offs + size) { - size = i_size_read(inode) - *offs; - unlock_kernel(); - if (size < 0) { - CERROR("size %llu is too short for read %u@%llu\n", - i_size_read(inode), size, *offs); - return -EIO; - } else if (size == 0) { - return 0; - } - } else { - unlock_kernel(); - } - - blocksize = 1 << inode->i_blkbits; - - while (size > 0) { - block = *offs >> inode->i_blkbits; - boffs = *offs & (blocksize - 1); - csize = min(blocksize - boffs, size); - bh = ext3_bread(NULL, inode, block, 0, &err); - if (!bh) { - CERROR("can't read block: %d\n", err); - return err; - } - - memcpy(buf, bh->b_data + boffs, csize); - brelse(bh); - - *offs += csize; - buf += csize; - size -= csize; - } - return 0; -} - -static int fsfilt_ext3_write_record(struct file *file, void *buf, int bufsize, - loff_t *offs, int force_sync) -{ - struct buffer_head *bh = NULL; - unsigned long block; - struct inode *inode = file->f_dentry->d_inode; - loff_t old_size = i_size_read(inode), offset = *offs; - loff_t new_size = i_size_read(inode); - handle_t *handle; - int err = 0, block_count = 0, blocksize, size, boffs; - - /* Determine how many transaction credits are needed */ - blocksize = 1 << inode->i_blkbits; - block_count = (*offs & (blocksize - 1)) + bufsize; - block_count = (block_count + blocksize - 1) >> inode->i_blkbits; - - lock_24kernel(); - handle = fsfilt_ext3_journal_start(inode, - block_count * FSFILT_DATA_TRANS_BLOCKS(inode->i_sb) + 2); - unlock_24kernel(); - if (IS_ERR(handle)) { - CERROR("can't start transaction for %d blocks (%d bytes)\n", - block_count * FSFILT_DATA_TRANS_BLOCKS(inode->i_sb) + 2, bufsize); - return PTR_ERR(handle); - } - - while (bufsize > 0) { - if (bh != NULL) - brelse(bh); - - block = offset >> inode->i_blkbits; - boffs = offset & (blocksize - 1); - size = min(blocksize - boffs, bufsize); - bh = ext3_bread(handle, inode, block, 1, &err); - if (!bh) { - CERROR("can't read/create block: %d\n", err); - goto out; - } - - err = ext3_journal_get_write_access(handle, bh); - if (err) { - CERROR("journal_get_write_access() returned error %d\n", - err); - goto out; - } - LASSERT(bh->b_data + boffs + size <= bh->b_data + bh->b_size); - memcpy(bh->b_data + boffs, buf, size); - err = ext3_journal_dirty_metadata(handle, bh); - if (err) { - CERROR("journal_dirty_metadata() returned error %d\n", - err); - goto out; - } - if (offset + size > new_size) - new_size = offset + size; - offset += size; - bufsize -= size; - buf += size; - } - - if (force_sync) - handle->h_sync = 1; /* recovery likes this */ -out: - if (bh) - brelse(bh); - - /* correct in-core and on-disk sizes */ - if (new_size > i_size_read(inode)) { - lock_kernel(); - if (new_size > i_size_read(inode)) - i_size_write(inode, new_size); - if (i_size_read(inode) > EXT3_I(inode)->i_disksize) - EXT3_I(inode)->i_disksize = i_size_read(inode); - if (i_size_read(inode) > old_size) - mark_inode_dirty(inode); - unlock_kernel(); - } - - lock_24kernel(); - fsfilt_ext3_journal_stop(handle); - unlock_24kernel(); - - if (err == 0) - *offs = offset; - return err; -} - -static int fsfilt_ext3_setup(struct super_block *sb) -{ - struct ext3_sb_info *sbi = EXT3_SB(sb); -#if 0 - sbi->dx_lock = fsfilt_ext3_dx_lock; - sbi->dx_unlock = fsfilt_ext3_dx_unlock; -#endif -#ifdef S_PDIROPS - CWARN("Enabling PDIROPS\n"); - set_opt(sbi->s_mount_opt, PDIROPS); - sb->s_flags |= S_PDIROPS; -#endif - if (!EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_DIR_INDEX)) - CWARN("filesystem doesn't have dir_index feature enabled\n"); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6)) && HAVE_QUOTA_SUPPORT - /* enable journaled quota support */ - /* kfreed in ext3_put_super() */ - sbi->s_qf_names[USRQUOTA] = kstrdup("lquota.user", GFP_KERNEL); - if (!sbi->s_qf_names[USRQUOTA]) - return -ENOMEM; - sbi->s_qf_names[GRPQUOTA] = kstrdup("lquota.group", GFP_KERNEL); - if (!sbi->s_qf_names[GRPQUOTA]) { - kfree(sbi->s_qf_names[USRQUOTA]); - sbi->s_qf_names[USRQUOTA] = NULL; - return -ENOMEM; - } - sbi->s_jquota_fmt = QFMT_VFS_V0; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)) - set_opt(sbi->s_mount_opt, QUOTA); -#endif -#endif - return 0; -} - -/* If fso is NULL, op is FSFILT operation, otherwise op is number of fso - objects. Logs is number of logfiles to update */ -static int fsfilt_ext3_get_op_len(int op, struct fsfilt_objinfo *fso, int logs) -{ - if ( !fso ) { - switch(op) { - case FSFILT_OP_CREATE: - /* directory leaf, index & indirect & EA*/ - return 4 + 3 * logs; - case FSFILT_OP_UNLINK: - return 3 * logs; - } - } else { - int i; - int needed = 0; - struct super_block *sb = fso->fso_dentry->d_inode->i_sb; - int blockpp = 1 << (CFS_PAGE_SHIFT - sb->s_blocksize_bits); - int addrpp = EXT3_ADDR_PER_BLOCK(sb) * blockpp; - for (i = 0; i < op; i++, fso++) { - int nblocks = fso->fso_bufcnt * blockpp; - int ndindirect = min(nblocks, addrpp + 1); - int nindir = nblocks + ndindirect + 1; - - needed += nindir; - } - return needed + 3 * logs; - } - - return 0; -} - -static const char *op_quotafile[] = { "lquota.user", "lquota.group" }; - -#define DQINFO_COPY(out, in) \ -do { \ - Q_COPY(out, in, dqi_bgrace); \ - Q_COPY(out, in, dqi_igrace); \ - Q_COPY(out, in, dqi_flags); \ - Q_COPY(out, in, dqi_valid); \ -} while (0) - -#define DQBLK_COPY(out, in) \ -do { \ - Q_COPY(out, in, dqb_bhardlimit); \ - Q_COPY(out, in, dqb_bsoftlimit); \ - Q_COPY(out, in, dqb_curspace); \ - Q_COPY(out, in, dqb_ihardlimit); \ - Q_COPY(out, in, dqb_isoftlimit); \ - Q_COPY(out, in, dqb_curinodes); \ - Q_COPY(out, in, dqb_btime); \ - Q_COPY(out, in, dqb_itime); \ - Q_COPY(out, in, dqb_valid); \ -} while (0) - - - -static int fsfilt_ext3_quotactl(struct super_block *sb, - struct obd_quotactl *oqc) -{ - int i, rc = 0, error = 0; - struct quotactl_ops *qcop; - struct if_dqinfo *info; - struct if_dqblk *dqblk; - ENTRY; - - if (!sb->s_qcop) - RETURN(-ENOSYS); - - OBD_ALLOC_PTR(info); - if (!info) - RETURN(-ENOMEM); - OBD_ALLOC_PTR(dqblk); - if (!dqblk) { - OBD_FREE_PTR(info); - RETURN(-ENOMEM); - } - - DQINFO_COPY(info, &oqc->qc_dqinfo); - DQBLK_COPY(dqblk, &oqc->qc_dqblk); - - qcop = sb->s_qcop; - if (oqc->qc_cmd == Q_QUOTAON || oqc->qc_cmd == Q_QUOTAOFF) { - for (i = 0; i < MAXQUOTAS; i++) { - if (!Q_TYPESET(oqc, i)) - continue; - - if (oqc->qc_cmd == Q_QUOTAON) { - if (!qcop->quota_on) - GOTO(out, rc = -ENOSYS); - rc = qcop->quota_on(sb, i, oqc->qc_id, - (char *)op_quotafile[i]); - } else if (oqc->qc_cmd == Q_QUOTAOFF) { - if (!qcop->quota_off) - GOTO(out, rc = -ENOSYS); - rc = qcop->quota_off(sb, i); - } - - if (rc == -EBUSY) - error = rc; - else if (rc) - GOTO(out, rc); - } - GOTO(out, rc ?: error); - } - - switch (oqc->qc_cmd) { - case Q_GETOINFO: - case Q_GETINFO: - if (!qcop->get_info) - GOTO(out, rc = -ENOSYS); - rc = qcop->get_info(sb, oqc->qc_type, info); - break; - case Q_SETQUOTA: - case Q_INITQUOTA: - if (!qcop->set_dqblk) - GOTO(out, rc = -ENOSYS); - rc = qcop->set_dqblk(sb, oqc->qc_type, oqc->qc_id, dqblk); - break; - case Q_GETOQUOTA: - case Q_GETQUOTA: - if (!qcop->get_dqblk) - GOTO(out, rc = -ENOSYS); - rc = qcop->get_dqblk(sb, oqc->qc_type, oqc->qc_id, dqblk); - if (!rc) - dqblk->dqb_valid = QIF_LIMITS | QIF_USAGE; - break; - case Q_SYNC: - if (!sb->s_qcop->quota_sync) - GOTO(out, rc = -ENOSYS); - qcop->quota_sync(sb, oqc->qc_type); - break; - default: - CERROR("unsupported quotactl command: %d", oqc->qc_cmd); - LBUG(); - } -out: - DQINFO_COPY(&oqc->qc_dqinfo, info); - DQBLK_COPY(&oqc->qc_dqblk, dqblk); - - OBD_FREE_PTR(info); - OBD_FREE_PTR(dqblk); - - if (rc) - CDEBUG(D_QUOTA, "quotactl command %#x, id %u, type %d " - "failed: %d\n", - oqc->qc_cmd, oqc->qc_id, oqc->qc_type, rc); - RETURN(rc); -} - -struct chk_dqblk{ - struct hlist_node dqb_hash; /* quotacheck hash */ - struct list_head dqb_list; /* in list also */ - qid_t dqb_id; /* uid/gid */ - short dqb_type; /* USRQUOTA/GRPQUOTA */ - qsize_t dqb_bhardlimit; /* block hard limit */ - qsize_t dqb_bsoftlimit; /* block soft limit */ - qsize_t dqb_curspace; /* current space */ - qsize_t dqb_ihardlimit; /* inode hard limit */ - qsize_t dqb_isoftlimit; /* inode soft limit */ - qsize_t dqb_curinodes; /* current inodes */ - __u64 dqb_btime; /* block grace time */ - __u64 dqb_itime; /* inode grace time */ - __u32 dqb_valid; /* flag for above fields */ -}; - -static inline unsigned int chkquot_hash(qid_t id, int type) - __attribute__((__const__)); - -static inline unsigned int chkquot_hash(qid_t id, int type) -{ - return (id * (MAXQUOTAS - type)) % NR_DQHASH; -} - -static inline struct chk_dqblk * -find_chkquot(struct hlist_head *head, qid_t id, int type) -{ - struct hlist_node *node; - struct chk_dqblk *cdqb; - - hlist_for_each(node, head) { - cdqb = hlist_entry(node, struct chk_dqblk, dqb_hash); - if (cdqb->dqb_id == id && cdqb->dqb_type == type) - return cdqb; - } - - return NULL; -} - -static struct chk_dqblk *alloc_chkquot(qid_t id, int type) -{ - struct chk_dqblk *cdqb; - - OBD_ALLOC_PTR(cdqb); - if (cdqb) { - INIT_HLIST_NODE(&cdqb->dqb_hash); - INIT_LIST_HEAD(&cdqb->dqb_list); - cdqb->dqb_id = id; - cdqb->dqb_type = type; - } - - return cdqb; -} - -static struct chk_dqblk * -cqget(struct super_block *sb, struct hlist_head *hash, struct list_head *list, - qid_t id, int type, int first_check) -{ - struct hlist_head *head = hash + chkquot_hash(id, type); - struct if_dqblk dqb; - struct chk_dqblk *cdqb; - int rc; - - cdqb = find_chkquot(head, id, type); - if (cdqb) - return cdqb; - - cdqb = alloc_chkquot(id, type); - if (!cdqb) - return NULL; - - if (!first_check) { - rc = sb->s_qcop->get_dqblk(sb, type, id, &dqb); - if (rc) { - CERROR("get_dqblk of id %u, type %d failed: %d\n", - id, type, rc); - } else { - DQBLK_COPY(cdqb, &dqb); - cdqb->dqb_curspace = 0; - cdqb->dqb_curinodes = 0; - } - } - - hlist_add_head(&cdqb->dqb_hash, head); - list_add_tail(&cdqb->dqb_list, list); - - return cdqb; -} - -static inline int quota_onoff(struct super_block *sb, int cmd, int type) -{ - struct obd_quotactl *oqctl; - int rc; - - OBD_ALLOC_PTR(oqctl); - if (!oqctl) - RETURN(-ENOMEM); - - oqctl->qc_cmd = cmd; - oqctl->qc_id = QFMT_LDISKFS; - oqctl->qc_type = type; - rc = fsfilt_ext3_quotactl(sb, oqctl); - - OBD_FREE_PTR(oqctl); - return rc; -} - -static inline int read_old_dqinfo(struct super_block *sb, int type, - struct if_dqinfo *dqinfo) -{ - struct obd_quotactl *oqctl; - int rc; - ENTRY; - - OBD_ALLOC_PTR(oqctl); - if (!oqctl) - RETURN(-ENOMEM); - - oqctl->qc_cmd = Q_GETINFO; - oqctl->qc_type = type; - rc = fsfilt_ext3_quotactl(sb, oqctl); - if (!rc) - ((struct obd_dqinfo *)dqinfo)[type] = oqctl->qc_dqinfo; - - OBD_FREE_PTR(oqctl); - RETURN(rc); -} - -static inline struct ext3_group_desc * -get_group_desc(struct super_block *sb, int group) -{ - unsigned long desc_block, desc; - struct ext3_group_desc *gdp; - - desc_block = group / EXT3_DESC_PER_BLOCK(sb); - desc = group % EXT3_DESC_PER_BLOCK(sb); - gdp = (struct ext3_group_desc *) - EXT3_SB(sb)->s_group_desc[desc_block]->b_data; - - return gdp + desc; -} - -static inline struct buffer_head * -read_inode_bitmap(struct super_block *sb, unsigned long group) -{ - struct ext3_group_desc *desc; - struct buffer_head *bh; - - desc = get_group_desc(sb, group); - bh = sb_bread(sb, le32_to_cpu(desc->bg_inode_bitmap)); - - return bh; -} - -static inline struct inode *ext3_iget_inuse(struct super_block *sb, - struct buffer_head *bitmap_bh, - int index, unsigned long ino) -{ - struct inode *inode = NULL; - - if (ext3_test_bit(index, bitmap_bh->b_data)) - inode = iget(sb, ino); - - return inode; -} - -struct qchk_ctxt { - struct hlist_head qckt_hash[NR_DQHASH]; /* quotacheck hash */ - struct list_head qckt_list; /* quotacheck list */ - int qckt_first_check[MAXQUOTAS]; /* 1 if no old quotafile */ - struct if_dqinfo qckt_dqinfo[MAXQUOTAS]; /* old dqinfo */ -}; - -static int add_inode_quota(struct inode *inode, struct qchk_ctxt *qctxt, - struct obd_quotactl *oqc) -{ - struct chk_dqblk *cdqb[MAXQUOTAS] = { NULL, }; - loff_t size = 0; - qid_t qid[MAXQUOTAS]; - int cnt, i, rc = 0; - - if (!inode) - return 0; - - qid[USRQUOTA] = inode->i_uid; - qid[GRPQUOTA] = inode->i_gid; - - if (S_ISDIR(inode->i_mode) || - S_ISREG(inode->i_mode) || - S_ISLNK(inode->i_mode)) - size = inode_get_bytes(inode); - - for (cnt = 0; cnt < MAXQUOTAS; cnt++) { - if (!Q_TYPESET(oqc, cnt)) - continue; - - cdqb[cnt] = cqget(inode->i_sb, qctxt->qckt_hash, - &qctxt->qckt_list, qid[cnt], cnt, - qctxt->qckt_first_check[cnt]); - if (!cdqb[cnt]) { - rc = -ENOMEM; - break; - } - - cdqb[cnt]->dqb_curspace += size; - cdqb[cnt]->dqb_curinodes++; - } - - if (rc) { - for (i = 0; i < cnt; i++) { - if (!Q_TYPESET(oqc, i)) - continue; - LASSERT(cdqb[i]); - cdqb[i]->dqb_curspace -= size; - cdqb[i]->dqb_curinodes--; - } - } - - return rc; -} - -static int v2_write_dqheader(struct file *f, int type) -{ - static const __u32 quota_magics[] = V2_INITQMAGICS; - static const __u32 quota_versions[] = V2_INITQVERSIONS; - struct v2_disk_dqheader dqhead; - loff_t offset = 0; - - CLASSERT(ARRAY_SIZE(quota_magics) == ARRAY_SIZE(quota_versions)); - LASSERT(0 <= type && type < ARRAY_SIZE(quota_magics)); - - dqhead.dqh_magic = cpu_to_le32(quota_magics[type]); - dqhead.dqh_version = cpu_to_le32(quota_versions[type]); - - return cfs_user_write(f, (char *)&dqhead, sizeof(dqhead), &offset); -} - -/* write dqinfo struct in a new quota file */ -static int v2_write_dqinfo(struct file *f, int type, struct if_dqinfo *info) -{ - struct v2_disk_dqinfo dqinfo; - __u32 blocks = V2_DQTREEOFF + 1; - loff_t offset = V2_DQINFOOFF; - - if (info) { - dqinfo.dqi_bgrace = cpu_to_le32(info->dqi_bgrace); - dqinfo.dqi_igrace = cpu_to_le32(info->dqi_igrace); - dqinfo.dqi_flags = cpu_to_le32(info->dqi_flags & DQF_MASK & - ~DQF_INFO_DIRTY); - } else { - dqinfo.dqi_bgrace = cpu_to_le32(MAX_DQ_TIME); - dqinfo.dqi_igrace = cpu_to_le32(MAX_IQ_TIME); - dqinfo.dqi_flags = 0; - } - - dqinfo.dqi_blocks = cpu_to_le32(blocks); - dqinfo.dqi_free_blk = 0; - dqinfo.dqi_free_entry = 0; - - return cfs_user_write(f, (char *)&dqinfo, sizeof(dqinfo), &offset); -} - -static int create_new_quota_files(struct qchk_ctxt *qctxt, - struct obd_quotactl *oqc) -{ - int i, rc = 0; - ENTRY; - - for (i = 0; i < MAXQUOTAS; i++) { - struct if_dqinfo *info = qctxt->qckt_first_check[i]? - NULL : &qctxt->qckt_dqinfo[i]; - struct file *file; - - if (!Q_TYPESET(oqc, i)) - continue; - - file = filp_open(op_quotafile[i], O_RDWR | O_CREAT | O_TRUNC, - 0644); - if (IS_ERR(file)) { - rc = PTR_ERR(file); - CERROR("can't create %s file: rc = %d\n", - op_quotafile[i], rc); - GOTO(out, rc); - } - - if (!S_ISREG(file->f_dentry->d_inode->i_mode)) { - CERROR("file %s is not regular", op_quotafile[i]); - filp_close(file, 0); - GOTO(out, rc = -EINVAL); - } - - rc = v2_write_dqheader(file, i); - if (rc) { - filp_close(file, 0); - GOTO(out, rc); - } - - rc = v2_write_dqinfo(file, i, info); - filp_close(file, 0); - if (rc) - GOTO(out, rc); - } - -out: - RETURN(rc); -} - - -static int commit_chkquot(struct super_block *sb, struct qchk_ctxt *qctxt, - struct chk_dqblk *cdqb) -{ - struct obd_quotactl *oqc; - long now; - int rc; - ENTRY; - - OBD_ALLOC_PTR(oqc); - if (!oqc) - RETURN(-ENOMEM); - - now = CURRENT_SECONDS; - - if (cdqb->dqb_bsoftlimit && - toqb(cdqb->dqb_curspace) >= cdqb->dqb_bsoftlimit && - !cdqb->dqb_btime) - cdqb->dqb_btime = - now + qctxt->qckt_dqinfo[cdqb->dqb_type].dqi_bgrace; - - if (cdqb->dqb_isoftlimit && - cdqb->dqb_curinodes >= cdqb->dqb_isoftlimit && - !cdqb->dqb_itime) - cdqb->dqb_itime = - now + qctxt->qckt_dqinfo[cdqb->dqb_type].dqi_igrace; - - cdqb->dqb_valid = QIF_ALL; - - oqc->qc_cmd = Q_SETQUOTA; - oqc->qc_type = cdqb->dqb_type; - oqc->qc_id = cdqb->dqb_id; - DQBLK_COPY(&oqc->qc_dqblk, cdqb); - - rc = fsfilt_ext3_quotactl(sb, oqc); - OBD_FREE_PTR(oqc); - RETURN(rc); -} - -static int prune_chkquots(struct super_block *sb, - struct qchk_ctxt *qctxt, int error) -{ - struct chk_dqblk *cdqb, *tmp; - int rc; - - list_for_each_entry_safe(cdqb, tmp, &qctxt->qckt_list, dqb_list) { - if (!error) { - rc = commit_chkquot(sb, qctxt, cdqb); - if (rc) - error = rc; - } - hlist_del_init(&cdqb->dqb_hash); - list_del(&cdqb->dqb_list); - OBD_FREE_PTR(cdqb); - } - - return error; -} - -static int fsfilt_ext3_quotacheck(struct super_block *sb, - struct obd_quotactl *oqc) -{ - struct ext3_sb_info *sbi = EXT3_SB(sb); - int i, group; - struct qchk_ctxt *qctxt; - struct buffer_head *bitmap_bh = NULL; - unsigned long ino; - struct inode *inode; - int rc = 0; - ENTRY; - - /* turn on quota and read dqinfo if existed */ - OBD_ALLOC_PTR(qctxt); - if (!qctxt) { - oqc->qc_stat = -ENOMEM; - RETURN(-ENOMEM); - } - - for (i = 0; i < NR_DQHASH; i++) - INIT_HLIST_HEAD(&qctxt->qckt_hash[i]); - INIT_LIST_HEAD(&qctxt->qckt_list); - - for (i = 0; i < MAXQUOTAS; i++) { - if (!Q_TYPESET(oqc, i)) - continue; - - rc = quota_onoff(sb, Q_QUOTAON, i); - if (!rc || rc == -EBUSY) { - rc = read_old_dqinfo(sb, i, qctxt->qckt_dqinfo); - if (rc) - GOTO(out, rc); - } else if (rc == -ENOENT) { - qctxt->qckt_first_check[i] = 1; - } else if (rc) { - GOTO(out, rc); - } - } - - /* check quota and update in hash */ - for (group = 0; group < sbi->s_groups_count; group++) { - ino = group * sbi->s_inodes_per_group + 1; - bitmap_bh = read_inode_bitmap(sb, group); - if (!bitmap_bh) { - CERROR("read_inode_bitmap group %d failed", group); - GOTO(out, -EIO); - } - - for (i = 0; i < sbi->s_inodes_per_group; i++, ino++) { - if (ino < sbi->s_first_ino) - continue; - - inode = ext3_iget_inuse(sb, bitmap_bh, i, ino); - rc = add_inode_quota(inode, qctxt, oqc); - iput(inode); - if (rc) { - brelse(bitmap_bh); - GOTO(out, rc); - } - } - - brelse(bitmap_bh); - } - - /* read old quota limits from old quota file. (only for the user - * has limits but hasn't file) */ -#ifdef HAVE_QUOTA_SUPPORT - for (i = 0; i < MAXQUOTAS; i++) { - struct list_head id_list; - struct dquot_id *dqid, *tmp; - - if (!Q_TYPESET(oqc, i)) - continue; - - if (qctxt->qckt_first_check[i]) - continue; - - - LASSERT(sb_dqopt(sb)->files[i] != NULL); - INIT_LIST_HEAD(&id_list); -#ifndef KERNEL_SUPPORTS_QUOTA_READ - rc = lustre_get_qids(sb_dqopt(sb)->files[i], NULL, i, &id_list); -#else - rc = lustre_get_qids(NULL, sb_dqopt(sb)->files[i], i, &id_list); -#endif - if (rc) - CERROR("read old limits failed. (rc:%d)\n", rc); - - list_for_each_entry_safe(dqid, tmp, &id_list, di_link) { - list_del_init(&dqid->di_link); - - if (!rc) - cqget(sb, qctxt->qckt_hash, &qctxt->qckt_list, - dqid->di_id, i, - qctxt->qckt_first_check[i]); - kfree(dqid); - } - } -#endif - /* turn off quota cause we are to dump chk_dqblk to files */ - quota_onoff(sb, Q_QUOTAOFF, oqc->qc_type); - - rc = create_new_quota_files(qctxt, oqc); - if (rc) - GOTO(out, rc); - - /* we use vfs functions to set dqblk, so turn quota on */ - rc = quota_onoff(sb, Q_QUOTAON, oqc->qc_type); -out: - /* dump and free chk_dqblk */ - rc = prune_chkquots(sb, qctxt, rc); - OBD_FREE_PTR(qctxt); - - /* turn off quota, `lfs quotacheck` will turn on when all - * nodes quotacheck finish. */ - quota_onoff(sb, Q_QUOTAOFF, oqc->qc_type); - - oqc->qc_stat = rc; - if (rc) - CERROR("quotacheck failed: rc = %d\n", rc); - - RETURN(rc); -} - -#ifdef HAVE_QUOTA_SUPPORT -static int fsfilt_ext3_quotainfo(struct lustre_quota_info *lqi, int type, - int cmd) -{ - int rc = 0; - ENTRY; - - if (lqi->qi_files[type] == NULL) { - CERROR("operate qinfo before it's enabled!\n"); - RETURN(-EIO); - } - - switch (cmd) { - case QFILE_CHK: - rc = lustre_check_quota_file(lqi, type); - break; - case QFILE_RD_INFO: - rc = lustre_read_quota_info(lqi, type); - break; - case QFILE_WR_INFO: - rc = lustre_write_quota_info(lqi, type); - break; - case QFILE_INIT_INFO: - rc = lustre_init_quota_info(lqi, type); - break; - case QFILE_CONVERT: - rc = lustre_quota_convert(lqi, type); - break; - default: - CERROR("Unsupported admin quota file cmd %d\n", cmd); - LBUG(); - break; - } - RETURN(rc); -} - -static int fsfilt_ext3_qids(struct file *file, struct inode *inode, int type, - struct list_head *list) -{ - return lustre_get_qids(file, inode, type, list); -} - -static int fsfilt_ext3_dquot(struct lustre_dquot *dquot, int cmd) -{ - int rc = 0; - ENTRY; - - if (dquot->dq_info->qi_files[dquot->dq_type] == NULL) { - CERROR("operate dquot before it's enabled!\n"); - RETURN(-EIO); - } - - switch (cmd) { - case QFILE_RD_DQUOT: - rc = lustre_read_dquot(dquot); - break; - case QFILE_WR_DQUOT: - if (dquot->dq_dqb.dqb_ihardlimit || - dquot->dq_dqb.dqb_isoftlimit || - dquot->dq_dqb.dqb_bhardlimit || - dquot->dq_dqb.dqb_bsoftlimit) - clear_bit(DQ_FAKE_B, &dquot->dq_flags); - else - set_bit(DQ_FAKE_B, &dquot->dq_flags); - - rc = lustre_commit_dquot(dquot); - if (rc >= 0) - rc = 0; - break; - default: - CERROR("Unsupported admin quota file cmd %d\n", cmd); - LBUG(); - break; - } - RETURN(rc); -} -#endif - -static lvfs_sbdev_type fsfilt_ext3_journal_sbdev(struct super_block *sb) -{ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - return (EXT3_SB(sb)->journal_bdev); -#else - return kdev_t_to_nr(EXT3_SB(sb)->s_journal->j_dev); -#endif -} - -static struct fsfilt_operations fsfilt_ext3_ops = { - .fs_type = "ext3", - .fs_owner = THIS_MODULE, - .fs_getlabel = fsfilt_ext3_get_label, - .fs_setlabel = fsfilt_ext3_set_label, - .fs_uuid = fsfilt_ext3_uuid, - .fs_start = fsfilt_ext3_start, - .fs_brw_start = fsfilt_ext3_brw_start, - .fs_extend = fsfilt_ext3_extend, - .fs_commit = fsfilt_ext3_commit, - .fs_commit_async = fsfilt_ext3_commit_async, - .fs_commit_wait = fsfilt_ext3_commit_wait, - .fs_setattr = fsfilt_ext3_setattr, - .fs_iocontrol = fsfilt_ext3_iocontrol, - .fs_set_md = fsfilt_ext3_set_md, - .fs_get_md = fsfilt_ext3_get_md, - .fs_readpage = fsfilt_ext3_readpage, - .fs_add_journal_cb = fsfilt_ext3_add_journal_cb, - .fs_statfs = fsfilt_ext3_statfs, - .fs_sync = fsfilt_ext3_sync, - .fs_map_inode_pages = fsfilt_ext3_map_inode_pages, - .fs_write_record = fsfilt_ext3_write_record, - .fs_read_record = fsfilt_ext3_read_record, - .fs_setup = fsfilt_ext3_setup, - .fs_send_bio = fsfilt_ext3_send_bio, - .fs_get_op_len = fsfilt_ext3_get_op_len, - .fs_quotactl = fsfilt_ext3_quotactl, - .fs_quotacheck = fsfilt_ext3_quotacheck, -#ifdef HAVE_DISK_INODE_VERSION - .fs_get_version = fsfilt_ext3_get_version, - .fs_set_version = fsfilt_ext3_set_version, -#endif -#ifdef HAVE_QUOTA_SUPPORT - .fs_quotainfo = fsfilt_ext3_quotainfo, - .fs_qids = fsfilt_ext3_qids, - .fs_dquot = fsfilt_ext3_dquot, -#endif - .fs_journal_sbdev = fsfilt_ext3_journal_sbdev, -}; - -static int __init fsfilt_ext3_init(void) -{ - int rc; - - fcb_cache = cfs_mem_cache_create("fsfilt_ext3_fcb", - sizeof(struct fsfilt_cb_data), 0, 0); - if (!fcb_cache) { - CERROR("error allocating fsfilt journal callback cache\n"); - GOTO(out, rc = -ENOMEM); - } - - rc = fsfilt_register_ops(&fsfilt_ext3_ops); - - if (rc) { - int err = cfs_mem_cache_destroy(fcb_cache); - LASSERTF(err == 0, "error destroying new cache: rc %d\n", err); - } -out: - return rc; -} - -static void __exit fsfilt_ext3_exit(void) -{ - int rc; - - fsfilt_unregister_ops(&fsfilt_ext3_ops); - rc = cfs_mem_cache_destroy(fcb_cache); - LASSERTF(rc == 0, "couldn't destroy fcb_cache slab\n"); -} - -module_init(fsfilt_ext3_init); -module_exit(fsfilt_ext3_exit); - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre ext3 Filesystem Helper v0.1"); -MODULE_LICENSE("GPL"); diff --git a/lustre/lvfs/fsfilt_reiserfs.c b/lustre/lvfs/fsfilt_reiserfs.c deleted file mode 100644 index 00a0433ff3..0000000000 --- a/lustre/lvfs/fsfilt_reiserfs.c +++ /dev/null @@ -1,244 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/lib/fsfilt_reiserfs.c - * Lustre filesystem abstraction routines - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * NOTE - According to Hans Reiser, this could actually be implemented more - * efficiently than creating a directory and putting ASCII objids in it. - * Instead, we should return the reiserfs object ID as the lustre objid - * (although I'm not sure what impact that would have on backup/restore). - */ - -#define DEBUG_SUBSYSTEM S_FILTER - -#include <linux/fs.h> -#include <linux/slab.h> -#include <linux/pagemap.h> -#include <linux/quotaops.h> -#include <linux/version.h> -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -#include <linux/init.h> -#include <asm/statfs.h> -#endif -#include <libcfs/kp30.h> -#include <lustre_fsfilt.h> -#include <obd.h> -#include <linux/module.h> -#include <linux/init.h> - -/* XXX We cannot include linux/reiserfs_fs.h here, because of symbols clash, - but we need MAX_HEIGHT definition for proper reserve calculations -#include <linux/reiserfs_fs.h> -*/ -#define MAX_HEIGHT 5 /* maximal height of a tree. don't change this without - changing JOURNAL_PER_BALANCE_CNT */ - -static void *fsfilt_reiserfs_start(struct inode *inode, int op, - void *desc_private, int logs) -{ - return (void *)0xf00f00be; -} - -static void *fsfilt_reiserfs_brw_start(int objcount, struct fsfilt_objinfo *fso, - int niocount, struct niobuf_local *nb, - void *desc_private, int logs) -{ - return (void *)0xf00f00be; -} - -static int fsfilt_reiserfs_commit(struct inode *inode, void *handle, - int force_sync) -{ - if (handle != (void *)0xf00f00be) { - CERROR("bad handle %p", handle); - return -EINVAL; - } - - return 0; -} - -static int fsfilt_reiserfs_setattr(struct dentry *dentry, void *handle, - struct iattr *iattr, int do_trunc) -{ - struct inode *inode = dentry->d_inode; - int rc; - - lock_kernel(); - - /* A _really_ horrible hack to avoid removing the data stored - * in the block pointers; this is really the "small" stripe MD data. - * We can avoid further hackery by virtue of the MDS file size being - * zero all the time (which doesn't invoke block truncate at unlink - * time), so we assert we never change the MDS file size from zero. - */ - if (iattr->ia_valid & ATTR_SIZE && !do_trunc) { - /* ATTR_SIZE would invoke truncate: clear it */ - iattr->ia_valid &= ~ATTR_SIZE; - i_size_write(inode, iattr->ia_size); - - /* make sure _something_ gets set - so new inode - * goes to disk (probably won't work over XFS - */ - if (!iattr->ia_valid & ATTR_MODE) { - iattr->ia_valid |= ATTR_MODE; - iattr->ia_mode = inode->i_mode; - } - } - - /* We set these flags on the client, but have already checked perms - * so don't confuse inode_change_ok. */ - iattr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET); - - if (inode->i_op->setattr) { - rc = inode->i_op->setattr(dentry, iattr); - } else { - rc = inode_change_ok(inode, iattr); - if (!rc) - rc = inode_setattr(inode, iattr); - } - - unlock_kernel(); - - return rc; -} - -static int fsfilt_reiserfs_set_md(struct inode *inode, void *handle, - void *lmm, int lmm_size, const char *name) -{ - /* XXX write stripe data into MDS file itself */ - CERROR("not implemented yet\n"); - - return -ENOSYS; -} - -static int fsfilt_reiserfs_get_md(struct inode *inode, void *lmm, int lmm_size, - const char *name) -{ - if (lmm == NULL) - return i_size_read(inode); - - CERROR("not implemented yet\n"); - return -ENOSYS; -} - -static ssize_t fsfilt_reiserfs_readpage(struct file *file, char *buf, size_t count, - loff_t *offset) -{ - return file->f_op->read(file, buf, count, offset); -} - -static int fsfilt_reiserfs_add_journal_cb(struct obd_device *obd, - __u64 last_rcvd, void *handle, - fsfilt_cb_t cb_func, void *cb_data) -{ - static unsigned long next = 0; - - if (time_after(jiffies, next)) { - CERROR("no journal callback kernel patch, faking it...\n"); - next = jiffies + 300 * HZ; - } - - cb_func(obd, last_rcvd, cb_data, 0); - - return 0; -} - -static int fsfilt_reiserfs_statfs(struct super_block *sb, - struct obd_statfs *osfs) -{ - struct kstatfs sfs; - int rc; - - memset(&sfs, 0, sizeof(sfs)); - rc = ll_do_statfs(sb, &sfs); - statfs_pack(osfs, &sfs); - return rc; -} - -static int fsfilt_reiserfs_sync(struct super_block *sb) -{ - return fsync_dev(sb->s_dev); -} - -/* If fso is NULL, op is FSFILT operation, otherwise op is number of fso - objects. Logs is number of logfiles to update */ -static int fsfilt_reiserfs_get_op_len(int op, struct fsfilt_objinfo *fso, - int logs) -{ - if ( !fso ) { - switch(op) { - case FSFILT_OP_CREATE: - /* directory leaf, index & indirect & EA*/ - return MAX_HEIGHT + logs; - case FSFILT_OP_UNLINK: - return MAX_HEIGHT + logs; - } - - } else { - int i; - int needed = MAX_HEIGHT; - struct super_block *sb = fso->fso_dentry->d_inode->i_sb; - int blockpp = 1 << (CFS_PAGE_SHIFT - sb->s_blocksize_bits); - for (i = 0; i < op; i++, fso++) { - int nblocks = fso->fso_bufcnt * blockpp; - - needed += nblocks; - } - return needed + logs; - } - - return 0; -} -static struct fsfilt_operations fsfilt_reiserfs_ops = { - .fs_type = "reiserfs", - .fs_owner = THIS_MODULE, - .fs_start = fsfilt_reiserfs_start, - .fs_brw_start = fsfilt_reiserfs_brw_start, - .fs_commit = fsfilt_reiserfs_commit, - .fs_setattr = fsfilt_reiserfs_setattr, - .fs_set_md = fsfilt_reiserfs_set_md, - .fs_get_md = fsfilt_reiserfs_get_md, - .fs_readpage = fsfilt_reiserfs_readpage, - .fs_add_journal_cb = fsfilt_reiserfs_add_journal_cb, - .fs_statfs = fsfilt_reiserfs_statfs, - .fs_sync = fsfilt_reiserfs_sync, - .fs_get_op_len = fsfilt_reiserfs_get_op_len, -}; - -static int __init fsfilt_reiserfs_init(void) -{ - return fsfilt_register_ops(&fsfilt_reiserfs_ops); -} - -static void __exit fsfilt_reiserfs_exit(void) -{ - fsfilt_unregister_ops(&fsfilt_reiserfs_ops); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre reiserfs Filesystem Helper v0.1"); -MODULE_LICENSE("GPL"); - -module_init(fsfilt_reiserfs_init); -module_exit(fsfilt_reiserfs_exit); diff --git a/lustre/lvfs/lustre_quota_fmt.c b/lustre/lvfs/lustre_quota_fmt.c deleted file mode 100644 index e910a0c40b..0000000000 --- a/lustre/lvfs/lustre_quota_fmt.c +++ /dev/null @@ -1,1079 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre administrative quota format. - * - * from - * linux/fs/quota_v2.c - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#include <linux/errno.h> -#include <linux/fs.h> -#include <linux/mount.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/slab.h> -#include <linux/quotaio_v1.h> - -#include <asm/byteorder.h> -#include <asm/uaccess.h> - -#include <lustre_quota.h> -#include <obd_support.h> -#include "lustre_quota_fmt.h" - -static const uint lustre_initqversions[][MAXQUOTAS] = { - [LUSTRE_QUOTA_V1] = LUSTRE_INITQVERSIONS, - [LUSTRE_QUOTA_V2] = LUSTRE_INITQVERSIONS_V2 -}; - -static const int lustre_dqstrinblk[] = { - [LUSTRE_QUOTA_V1] = LUSTRE_DQSTRINBLK, - [LUSTRE_QUOTA_V2] = LUSTRE_DQSTRINBLK_V2 -}; - -static const int lustre_disk_dqblk_sz[] = { - [LUSTRE_QUOTA_V1] = sizeof(struct lustre_disk_dqblk), - [LUSTRE_QUOTA_V2] = sizeof(struct lustre_disk_dqblk_v2) -}; - -int check_quota_file(struct file *f, struct inode *inode, int type, - lustre_quota_version_t version) -{ - struct lustre_disk_dqheader dqhead; - mm_segment_t fs; - ssize_t size; - loff_t offset = 0; - static const uint quota_magics[] = LUSTRE_INITQMAGICS; - const uint *quota_versions = lustre_initqversions[version]; - - if (f) { - fs = get_fs(); - set_fs(KERNEL_DS); - size = f->f_op->read(f, (char *)&dqhead, - sizeof(struct lustre_disk_dqheader), - &offset); - set_fs(fs); - } else { -#ifndef KERNEL_SUPPORTS_QUOTA_READ - size = 0; -#else - struct super_block *sb = inode->i_sb; - size = sb->s_op->quota_read(sb, type, (char *)&dqhead, - sizeof(struct lustre_disk_dqheader), 0); -#endif - } - if (size != sizeof(struct lustre_disk_dqheader)) - return -EINVAL; - if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || - le32_to_cpu(dqhead.dqh_version) != quota_versions[type]) - return -EINVAL; - return 0; -} - -/* Check whether given file is really lustre admin quotafile */ -int lustre_check_quota_file(struct lustre_quota_info *lqi, int type) -{ - struct file *f = lqi->qi_files[type]; - return check_quota_file(f, NULL, type, lqi->qi_version); -} - -int lustre_read_quota_file_info(struct file* f, struct lustre_mem_dqinfo* info) -{ - mm_segment_t fs; - struct lustre_disk_dqinfo dinfo; - ssize_t size; - loff_t offset = LUSTRE_DQINFOOFF; - - fs = get_fs(); - set_fs(KERNEL_DS); - size = f->f_op->read(f, (char *)&dinfo, - sizeof(struct lustre_disk_dqinfo), &offset); - set_fs(fs); - if (size != sizeof(struct lustre_disk_dqinfo)) { - CERROR("Can't read info structure on device %s.\n", - f->f_vfsmnt->mnt_sb->s_id); - return -EINVAL; - } - info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace); - info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace); - info->dqi_flags = le32_to_cpu(dinfo.dqi_flags); - info->dqi_blocks = le32_to_cpu(dinfo.dqi_blocks); - info->dqi_free_blk = le32_to_cpu(dinfo.dqi_free_blk); - info->dqi_free_entry = le32_to_cpu(dinfo.dqi_free_entry); - return 0; -} - -/* Read information header from quota file */ -int lustre_read_quota_info(struct lustre_quota_info *lqi, int type) -{ - return lustre_read_quota_file_info(lqi->qi_files[type], &lqi->qi_info[type]); -} - -/* Write information header to quota file */ -int lustre_write_quota_info(struct lustre_quota_info *lqi, int type) -{ - mm_segment_t fs; - struct lustre_disk_dqinfo dinfo; - struct lustre_mem_dqinfo *info = &lqi->qi_info[type]; - struct file *f = lqi->qi_files[type]; - ssize_t size; - loff_t offset = LUSTRE_DQINFOOFF; - - info->dqi_flags &= ~DQF_INFO_DIRTY; - dinfo.dqi_bgrace = cpu_to_le32(info->dqi_bgrace); - dinfo.dqi_igrace = cpu_to_le32(info->dqi_igrace); - dinfo.dqi_flags = cpu_to_le32(info->dqi_flags & DQF_MASK); - dinfo.dqi_blocks = cpu_to_le32(info->dqi_blocks); - dinfo.dqi_free_blk = cpu_to_le32(info->dqi_free_blk); - dinfo.dqi_free_entry = cpu_to_le32(info->dqi_free_entry); - fs = get_fs(); - set_fs(KERNEL_DS); - size = f->f_op->write(f, (char *)&dinfo, - sizeof(struct lustre_disk_dqinfo), &offset); - set_fs(fs); - if (size != sizeof(struct lustre_disk_dqinfo)) { - printk(KERN_WARNING - "Can't write info structure on device %s.\n", - f->f_vfsmnt->mnt_sb->s_id); - return -1; - } - return 0; -} - -#define DQ2MQ(v) ((sizeof(v) == sizeof(__u64)) ? \ - le64_to_cpu(v) : le32_to_cpu(v)) - -#define MQ2DQ(v,newv) ((sizeof(v) == sizeof(__u64)) ? \ - (v = cpu_to_le64((__u64)newv)) : (v = cpu_to_le32((__u32)newv))) - -#define DQF_GET(var,ver,field) ((ver == LUSTRE_QUOTA_V1)?\ - DQ2MQ(((struct lustre_disk_dqblk*)(var))->field):\ - DQ2MQ(((struct lustre_disk_dqblk_v2*)(var))->field)) - -#define DQF_PUT(var,ver,field,val) ((ver == LUSTRE_QUOTA_V1)?\ - MQ2DQ(((struct lustre_disk_dqblk*)(var))->field, val):\ - MQ2DQ(((struct lustre_disk_dqblk_v2*)(var))->field, val)) - -void disk2memdqb(struct lustre_mem_dqblk *m, void *d, - lustre_quota_version_t version) -{ - m->dqb_ihardlimit = DQF_GET(d, version, dqb_ihardlimit); - m->dqb_isoftlimit = DQF_GET(d, version, dqb_isoftlimit); - m->dqb_curinodes = DQF_GET(d, version, dqb_curinodes); - m->dqb_itime = DQF_GET(d, version, dqb_itime); - m->dqb_bhardlimit = DQF_GET(d, version, dqb_bhardlimit); - m->dqb_bsoftlimit = DQF_GET(d, version, dqb_bsoftlimit); - m->dqb_curspace = DQF_GET(d, version, dqb_curspace); - m->dqb_btime = DQF_GET(d, version, dqb_btime); -} - -static int check_quota_bounds(struct lustre_mem_dqblk *m, - lustre_quota_version_t version) -{ - return (version == LUSTRE_QUOTA_V1 && - m->dqb_ihardlimit <= MAX_UL && - m->dqb_isoftlimit <= MAX_UL && - m->dqb_curinodes <= MAX_UL && - m->dqb_bhardlimit <= MAX_UL && - m->dqb_bsoftlimit <= MAX_UL) || - version != LUSTRE_QUOTA_V1; -} - -static int mem2diskdqb(void *d, struct lustre_mem_dqblk *m, - qid_t id, lustre_quota_version_t version) -{ - if (!check_quota_bounds(m, version)) - return -EINVAL; - - DQF_PUT(d, version, dqb_ihardlimit, m->dqb_ihardlimit); - DQF_PUT(d, version, dqb_isoftlimit, m->dqb_isoftlimit); - DQF_PUT(d, version, dqb_curinodes, m->dqb_curinodes); - DQF_PUT(d, version, dqb_itime, m->dqb_itime); - DQF_PUT(d, version, dqb_bhardlimit, m->dqb_bhardlimit); - DQF_PUT(d, version, dqb_bsoftlimit, m->dqb_bsoftlimit); - DQF_PUT(d, version, dqb_curspace, m->dqb_curspace); - DQF_PUT(d, version, dqb_btime, m->dqb_btime); - DQF_PUT(d, version, dqb_id, id); - - return 0; -} - -dqbuf_t getdqbuf(void) -{ - dqbuf_t buf = kmalloc(LUSTRE_DQBLKSIZE, GFP_NOFS); - if (!buf) - printk(KERN_WARNING - "VFS: Not enough memory for quota buffers.\n"); - return buf; -} - -void freedqbuf(dqbuf_t buf) -{ - kfree(buf); -} - -ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf) -{ - mm_segment_t fs; - ssize_t ret; - loff_t offset = blk << LUSTRE_DQBLKSIZE_BITS; - - memset(buf, 0, LUSTRE_DQBLKSIZE); - fs = get_fs(); - set_fs(KERNEL_DS); - ret = filp->f_op->read(filp, (char *)buf, LUSTRE_DQBLKSIZE, &offset); - set_fs(fs); - return ret; -} - -ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf) -{ - mm_segment_t fs; - ssize_t ret; - loff_t offset = blk << LUSTRE_DQBLKSIZE_BITS; - - fs = get_fs(); - set_fs(KERNEL_DS); - ret = filp->f_op->write(filp, (char *)buf, LUSTRE_DQBLKSIZE, &offset); - set_fs(fs); - return ret; -} - -void lustre_mark_info_dirty(struct lustre_mem_dqinfo *info) -{ - set_bit(DQF_INFO_DIRTY_B, &info->dqi_flags); -} - -/* Remove empty block from list and return it */ -int get_free_dqblk(struct file *filp, struct lustre_mem_dqinfo *info) -{ - dqbuf_t buf = getdqbuf(); - struct lustre_disk_dqdbheader *dh = - (struct lustre_disk_dqdbheader *)buf; - int ret, blk; - - if (!buf) - return -ENOMEM; - if (info->dqi_free_blk) { - blk = info->dqi_free_blk; - if ((ret = read_blk(filp, blk, buf)) < 0) - goto out_buf; - info->dqi_free_blk = le32_to_cpu(dh->dqdh_next_free); - } else { - memset(buf, 0, LUSTRE_DQBLKSIZE); - /* Assure block allocation... */ - if ((ret = write_blk(filp, info->dqi_blocks, buf)) < 0) - goto out_buf; - blk = info->dqi_blocks++; - } - lustre_mark_info_dirty(info); - ret = blk; -out_buf: - freedqbuf(buf); - return ret; -} - -/* Insert empty block to the list */ -int put_free_dqblk(struct file *filp, struct lustre_mem_dqinfo *info, - dqbuf_t buf, uint blk) -{ - struct lustre_disk_dqdbheader *dh = - (struct lustre_disk_dqdbheader *)buf; - int err; - - dh->dqdh_next_free = cpu_to_le32(info->dqi_free_blk); - dh->dqdh_prev_free = cpu_to_le32(0); - dh->dqdh_entries = cpu_to_le16(0); - info->dqi_free_blk = blk; - lustre_mark_info_dirty(info); - if ((err = write_blk(filp, blk, buf)) < 0) - /* Some strange block. We had better leave it... */ - return err; - return 0; -} - -/* Remove given block from the list of blocks with free entries */ -int remove_free_dqentry(struct file *filp, - struct lustre_mem_dqinfo *info, dqbuf_t buf, - uint blk) -{ - dqbuf_t tmpbuf = getdqbuf(); - struct lustre_disk_dqdbheader *dh = - (struct lustre_disk_dqdbheader *)buf; - uint nextblk = le32_to_cpu(dh->dqdh_next_free), prevblk = - le32_to_cpu(dh->dqdh_prev_free); - int err; - - if (!tmpbuf) - return -ENOMEM; - if (nextblk) { - if ((err = read_blk(filp, nextblk, tmpbuf)) < 0) - goto out_buf; - ((struct lustre_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = - dh->dqdh_prev_free; - if ((err = write_blk(filp, nextblk, tmpbuf)) < 0) - goto out_buf; - } - if (prevblk) { - if ((err = read_blk(filp, prevblk, tmpbuf)) < 0) - goto out_buf; - ((struct lustre_disk_dqdbheader *)tmpbuf)->dqdh_next_free = - dh->dqdh_next_free; - if ((err = write_blk(filp, prevblk, tmpbuf)) < 0) - goto out_buf; - } else { - info->dqi_free_entry = nextblk; - lustre_mark_info_dirty(info); - } - freedqbuf(tmpbuf); - dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0); - err = write_blk(filp, blk, buf); - if (err < 0) /* No matter whether write succeeds block is out of list */ - CERROR("VFS: Can't write block (%u) with " - "free entries (rc=%d).\n", blk, err); - return 0; -out_buf: - freedqbuf(tmpbuf); - return err; -} - -/* Insert given block to the beginning of list with free entries */ -int insert_free_dqentry(struct file *filp, - struct lustre_mem_dqinfo *info, dqbuf_t buf, - uint blk) -{ - dqbuf_t tmpbuf = getdqbuf(); - struct lustre_disk_dqdbheader *dh = - (struct lustre_disk_dqdbheader *)buf; - int err; - - if (!tmpbuf) - return -ENOMEM; - dh->dqdh_next_free = cpu_to_le32(info->dqi_free_entry); - dh->dqdh_prev_free = cpu_to_le32(0); - if ((err = write_blk(filp, blk, buf)) < 0) - goto out_buf; - if (info->dqi_free_entry) { - if ((err = read_blk(filp, info->dqi_free_entry, tmpbuf)) < 0) - goto out_buf; - ((struct lustre_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = - cpu_to_le32(blk); - if ((err = write_blk(filp, info->dqi_free_entry, tmpbuf)) < 0) - goto out_buf; - } - freedqbuf(tmpbuf); - info->dqi_free_entry = blk; - lustre_mark_info_dirty(info); - return 0; -out_buf: - freedqbuf(tmpbuf); - return err; -} - - - -/* Find space for dquot */ -static uint find_free_dqentry(struct lustre_dquot *dquot, int *err, - lustre_quota_version_t version) -{ - struct lustre_quota_info *lqi = dquot->dq_info; - struct file *filp = lqi->qi_files[dquot->dq_type]; - struct lustre_mem_dqinfo *info = &lqi->qi_info[dquot->dq_type]; - uint blk, i; - struct lustre_disk_dqdbheader *dh; - void *ddquot; - int dqblk_sz = lustre_disk_dqblk_sz[version]; - int dqstrinblk = lustre_dqstrinblk[version]; - char fakedquot[dqblk_sz]; - dqbuf_t buf; - - *err = 0; - if (!(buf = getdqbuf())) { - *err = -ENOMEM; - return 0; - } - dh = (struct lustre_disk_dqdbheader *)buf; - ddquot = GETENTRIES(buf, version); - if (info->dqi_free_entry) { - blk = info->dqi_free_entry; - if ((*err = read_blk(filp, blk, buf)) < 0) - goto out_buf; - } else { - blk = get_free_dqblk(filp, info); - if ((int)blk < 0) { - *err = blk; - freedqbuf(buf); - return 0; - } - memset(buf, 0, LUSTRE_DQBLKSIZE); - info->dqi_free_entry = blk; /* This is enough as block is - already zeroed and entry list - is empty... */ - lustre_mark_info_dirty(info); - } - - /* Will block be full */ - if (le16_to_cpu(dh->dqdh_entries) + 1 >= dqstrinblk) - if ((*err = remove_free_dqentry(filp, info, buf, blk)) < 0) { - CERROR("VFS: Can't remove block %u" - " from entry free list.\n", blk); - goto out_buf; - } - dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries) + 1); - memset(fakedquot, 0, dqblk_sz); - /* Find free structure in block */ - for (i = 0; i < dqstrinblk && - memcmp(fakedquot, (char*)ddquot + i * dqblk_sz, - sizeof(fakedquot)); i++); - - if (i == dqstrinblk) { - CERROR("VFS: Data block full but it shouldn't.\n"); - *err = -EIO; - goto out_buf; - } - - if ((*err = write_blk(filp, blk, buf)) < 0) { - CERROR("VFS: Can't write quota data block %u.\n", blk); - goto out_buf; - } - dquot->dq_off = - (blk << LUSTRE_DQBLKSIZE_BITS) + - sizeof(struct lustre_disk_dqdbheader) + - i * dqblk_sz; - freedqbuf(buf); - return blk; -out_buf: - freedqbuf(buf); - return 0; -} - -/* Insert reference to structure into the trie */ -static int do_insert_tree(struct lustre_dquot *dquot, uint * treeblk, int depth, - lustre_quota_version_t version) -{ - struct lustre_quota_info *lqi = dquot->dq_info; - struct file *filp = lqi->qi_files[dquot->dq_type]; - struct lustre_mem_dqinfo *info = &lqi->qi_info[dquot->dq_type]; - dqbuf_t buf; - int ret = 0, newson = 0, newact = 0; - u32 *ref; - uint newblk; - - if (!(buf = getdqbuf())) - return -ENOMEM; - if (!*treeblk) { - ret = get_free_dqblk(filp, info); - if (ret < 0) - goto out_buf; - *treeblk = ret; - memset(buf, 0, LUSTRE_DQBLKSIZE); - newact = 1; - } else { - if ((ret = read_blk(filp, *treeblk, buf)) < 0) { - CERROR("VFS: Can't read tree quota block %u.\n", - *treeblk); - goto out_buf; - } - } - ref = (u32 *) buf; - newblk = le32_to_cpu(ref[GETIDINDEX(dquot->dq_id, depth)]); - if (!newblk) - newson = 1; - if (depth == LUSTRE_DQTREEDEPTH - 1) { - - if (newblk) { - CERROR("VFS: Inserting already present quota entry " - "(block %u).\n", - ref[GETIDINDEX(dquot->dq_id, depth)]); - ret = -EIO; - goto out_buf; - } - - newblk = find_free_dqentry(dquot, &ret, version); - } else - ret = do_insert_tree(dquot, &newblk, depth + 1, version); - if (newson && ret >= 0) { - ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(newblk); - ret = write_blk(filp, *treeblk, buf); - } else if (newact && ret < 0) - put_free_dqblk(filp, info, buf, *treeblk); -out_buf: - freedqbuf(buf); - return ret; -} - -/* Wrapper for inserting quota structure into tree */ -static inline int dq_insert_tree(struct lustre_dquot *dquot, - lustre_quota_version_t version) -{ - int tmp = LUSTRE_DQTREEOFF; - return do_insert_tree(dquot, &tmp, 0, version); -} - -/* - * We don't have to be afraid of deadlocks as we never have quotas on quota files... - */ -static int lustre_write_dquot(struct lustre_dquot *dquot, - lustre_quota_version_t version) -{ - int type = dquot->dq_type; - struct file *filp; - mm_segment_t fs; - loff_t offset; - ssize_t ret; - int dqblk_sz = lustre_disk_dqblk_sz[version]; - char ddquot[dqblk_sz], empty[dqblk_sz]; - - ret = mem2diskdqb(ddquot, &dquot->dq_dqb, dquot->dq_id, version); - if (ret < 0) - return ret; - - if (!dquot->dq_off) - if ((ret = dq_insert_tree(dquot, version)) < 0) { - CERROR("VFS: Error %Zd occurred while creating quota.\n", - ret); - return ret; - } - filp = dquot->dq_info->qi_files[type]; - offset = dquot->dq_off; - /* Argh... We may need to write structure full of zeroes but that would be - * treated as an empty place by the rest of the code. Format change would - * be definitely cleaner but the problems probably are not worth it */ - memset(empty, 0, dqblk_sz); - if (!memcmp(empty, ddquot, dqblk_sz)) - DQF_PUT(ddquot, version, dqb_itime, 1); - fs = get_fs(); - set_fs(KERNEL_DS); - ret = filp->f_op->write(filp, ddquot, - dqblk_sz, &offset); - set_fs(fs); - if (ret != dqblk_sz) { - printk(KERN_WARNING "VFS: dquota write failed on dev %s\n", - filp->f_dentry->d_sb->s_id); - if (ret >= 0) - ret = -ENOSPC; - } else - ret = 0; - - return ret; -} - -/* Free dquot entry in data block */ -static int free_dqentry(struct lustre_dquot *dquot, uint blk, - lustre_quota_version_t version) -{ - struct file *filp = dquot->dq_info->qi_files[dquot->dq_type]; - struct lustre_mem_dqinfo *info = - &dquot->dq_info->qi_info[dquot->dq_type]; - struct lustre_disk_dqdbheader *dh; - dqbuf_t buf = getdqbuf(); - int dqstrinblk = lustre_dqstrinblk[version]; - int ret = 0; - - if (!buf) - return -ENOMEM; - if (dquot->dq_off >> LUSTRE_DQBLKSIZE_BITS != blk) { - CERROR("VFS: Quota structure has offset to other block (%u) " - "than it should (%u).\n", blk, - (uint)(dquot->dq_off >> LUSTRE_DQBLKSIZE_BITS)); - goto out_buf; - } - if ((ret = read_blk(filp, blk, buf)) < 0) { - CERROR("VFS: Can't read quota data block %u\n", blk); - goto out_buf; - } - dh = (struct lustre_disk_dqdbheader *)buf; - dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries) - 1); - if (!le16_to_cpu(dh->dqdh_entries)) { /* Block got free? */ - if ((ret = remove_free_dqentry(filp, info, buf, blk)) < 0 || - (ret = put_free_dqblk(filp, info, buf, blk)) < 0) { - CERROR("VFS: Can't move quota data block (%u) " - "to free list.\n", blk); - goto out_buf; - } - } else { - memset(buf + (dquot->dq_off & ((1<<LUSTRE_DQBLKSIZE_BITS) - 1)), - 0, lustre_disk_dqblk_sz[version]); - if (le16_to_cpu(dh->dqdh_entries) == dqstrinblk - 1) { - /* Insert will write block itself */ - if ((ret = - insert_free_dqentry(filp, info, buf, blk)) < 0) { - CERROR("VFS: Can't insert quota data block (%u) " - "to free entry list.\n", blk); - goto out_buf; - } - } else if ((ret = write_blk(filp, blk, buf)) < 0) { - CERROR("VFS: Can't write quota data block %u\n", blk); - goto out_buf; - } - } - dquot->dq_off = 0; /* Quota is now unattached */ -out_buf: - freedqbuf(buf); - return ret; -} - -/* Remove reference to dquot from tree */ -static int remove_tree(struct lustre_dquot *dquot, uint * blk, int depth, - lustre_quota_version_t version) -{ - struct file *filp = dquot->dq_info->qi_files[dquot->dq_type]; - struct lustre_mem_dqinfo *info = - &dquot->dq_info->qi_info[dquot->dq_type]; - dqbuf_t buf = getdqbuf(); - int ret = 0; - uint newblk; - u32 *ref = (u32 *) buf; - - if (!buf) - return -ENOMEM; - if ((ret = read_blk(filp, *blk, buf)) < 0) { - CERROR("VFS: Can't read quota data block %u\n", *blk); - goto out_buf; - } - newblk = le32_to_cpu(ref[GETIDINDEX(dquot->dq_id, depth)]); - if (depth == LUSTRE_DQTREEDEPTH - 1) { - ret = free_dqentry(dquot, newblk, version); - newblk = 0; - } else - ret = remove_tree(dquot, &newblk, depth + 1, version); - if (ret >= 0 && !newblk) { - int i; - ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(0); - for (i = 0; i < LUSTRE_DQBLKSIZE && !buf[i]; i++) - /* Block got empty? */ ; - /* don't put the root block into free blk list! */ - if (i == LUSTRE_DQBLKSIZE && *blk != LUSTRE_DQTREEOFF) { - put_free_dqblk(filp, info, buf, *blk); - *blk = 0; - } else if ((ret = write_blk(filp, *blk, buf)) < 0) - CERROR("VFS: Can't write quota tree block %u.\n", *blk); - } -out_buf: - freedqbuf(buf); - return ret; -} - -/* Delete dquot from tree */ -static int lustre_delete_dquot(struct lustre_dquot *dquot, - lustre_quota_version_t version) -{ - uint tmp = LUSTRE_DQTREEOFF; - - if (!dquot->dq_off) /* Even not allocated? */ - return 0; - return remove_tree(dquot, &tmp, 0, version); -} - -/* Find entry in block */ -static loff_t find_block_dqentry(struct lustre_dquot *dquot, uint blk, - lustre_quota_version_t version) -{ - struct file *filp = dquot->dq_info->qi_files[dquot->dq_type]; - dqbuf_t buf = getdqbuf(); - loff_t ret = 0; - int i; - char *ddquot = GETENTRIES(buf, version); - int dqblk_sz = lustre_disk_dqblk_sz[version]; - int dqstrinblk = lustre_dqstrinblk[version]; - - if (!buf) - return -ENOMEM; - if ((ret = read_blk(filp, blk, buf)) < 0) { - CERROR("VFS: Can't read quota tree block %u.\n", blk); - goto out_buf; - } - if (dquot->dq_id) - for (i = 0; i < dqstrinblk && - DQF_GET(ddquot+i*dqblk_sz, version, dqb_id) != dquot->dq_id; - i++) ; - else { /* ID 0 as a bit more complicated searching... */ - char fakedquot[dqblk_sz]; - - memset(fakedquot, 0, sizeof(fakedquot)); - for (i = 0; i < dqstrinblk; i++) - if (!DQF_GET(ddquot + i*dqblk_sz, version, dqb_id) - && memcmp(fakedquot, ddquot + i*dqblk_sz, - dqblk_sz)) - break; - } - if (i == dqstrinblk) { - CERROR("VFS: Quota for id %u referenced but not present.\n", - dquot->dq_id); - ret = -EIO; - goto out_buf; - } else - ret = - (blk << LUSTRE_DQBLKSIZE_BITS) + - sizeof(struct lustre_disk_dqdbheader) + - i * dqblk_sz; -out_buf: - freedqbuf(buf); - return ret; -} - -/* Find entry for given id in the tree */ -static loff_t find_tree_dqentry(struct lustre_dquot *dquot, uint blk, int depth, - lustre_quota_version_t version) -{ - struct file *filp = dquot->dq_info->qi_files[dquot->dq_type]; - dqbuf_t buf = getdqbuf(); - loff_t ret = 0; - u32 *ref = (u32 *) buf; - - if (!buf) - return -ENOMEM; - if ((ret = read_blk(filp, blk, buf)) < 0) { - CERROR("VFS: Can't read quota tree block %u.\n", blk); - goto out_buf; - } - ret = 0; - blk = le32_to_cpu(ref[GETIDINDEX(dquot->dq_id, depth)]); - if (!blk) /* No reference? */ - goto out_buf; - if (depth < LUSTRE_DQTREEDEPTH - 1) - ret = find_tree_dqentry(dquot, blk, depth + 1, version); - else - ret = find_block_dqentry(dquot, blk, version); -out_buf: - freedqbuf(buf); - return ret; -} - -/* Find entry for given id in the tree - wrapper function */ -static inline loff_t find_dqentry(struct lustre_dquot *dquot, - lustre_quota_version_t version) -{ - return find_tree_dqentry(dquot, LUSTRE_DQTREEOFF, 0, version); -} - -int lustre_read_dquot(struct lustre_dquot *dquot) -{ - int type = dquot->dq_type; - struct file *filp; - mm_segment_t fs; - loff_t offset; - int ret = 0, dqblk_sz; - lustre_quota_version_t version; - - /* Invalidated quota? */ - if (!dquot->dq_info || !(filp = dquot->dq_info->qi_files[type])) { - CERROR("VFS: Quota invalidated while reading!\n"); - return -EIO; - } - - version = dquot->dq_info->qi_version; - dqblk_sz = lustre_disk_dqblk_sz[version]; - - offset = find_dqentry(dquot, version); - if (offset <= 0) { /* Entry not present? */ - if (offset < 0) - CERROR("VFS: Can't read quota structure for id %u.\n", - dquot->dq_id); - dquot->dq_off = 0; - set_bit(DQ_FAKE_B, &dquot->dq_flags); - memset(&dquot->dq_dqb, 0, sizeof(struct lustre_mem_dqblk)); - ret = offset; - } else { - char ddquot[dqblk_sz], empty[dqblk_sz]; - - dquot->dq_off = offset; - fs = get_fs(); - set_fs(KERNEL_DS); - if ((ret = filp->f_op->read(filp, ddquot, dqblk_sz, &offset)) != - dqblk_sz) { - if (ret >= 0) - ret = -EIO; - CERROR("VFS: Error while reading quota structure " - "for id %u.\n", dquot->dq_id); - memset(ddquot, 0, dqblk_sz); - } else { - ret = 0; - /* We need to escape back all-zero structure */ - memset(empty, 0, dqblk_sz); - DQF_PUT(empty, version, dqb_itime, 1); - if (!memcmp(empty, ddquot, dqblk_sz)) - DQF_PUT(ddquot, version, dqb_itime, 0); - } - set_fs(fs); - disk2memdqb(&dquot->dq_dqb, ddquot, version); - } - - return ret; -} - -/* Commit changes of dquot to disk - it might also mean deleting it when quota became fake */ -int lustre_commit_dquot(struct lustre_dquot *dquot) -{ - int rc = 0; - lustre_quota_version_t version = dquot->dq_info->qi_version; - - /* always clear the flag so we don't loop on an IO error... */ - clear_bit(DQ_MOD_B, &dquot->dq_flags); - - /* The block/inode usage in admin quotafile isn't the real usage - * over all cluster, so keep the fake dquot entry on disk is - * meaningless, just remove it */ - if (test_bit(DQ_FAKE_B, &dquot->dq_flags)) - rc = lustre_delete_dquot(dquot, version); - else - rc = lustre_write_dquot(dquot, version); - - if (rc < 0) - return rc; - - if (lustre_info_dirty(&dquot->dq_info->qi_info[dquot->dq_type])) - rc = lustre_write_quota_info(dquot->dq_info, dquot->dq_type); - - return rc; -} - -int lustre_init_quota_header(struct lustre_quota_info *lqi, int type, int fakemagics) -{ - static const uint quota_magics[] = LUSTRE_INITQMAGICS; - static const uint fake_magics[] = LUSTRE_BADQMAGICS; - const uint* quota_versions = lustre_initqversions[lqi->qi_version]; - struct lustre_disk_dqheader dqhead; - ssize_t size; - loff_t offset = 0; - struct file *fp = lqi->qi_files[type]; - int rc = 0; - - /* write quotafile header */ - dqhead.dqh_magic = cpu_to_le32(fakemagics ? - fake_magics[type] : quota_magics[type]); - dqhead.dqh_version = cpu_to_le32(quota_versions[type]); - size = fp->f_op->write(fp, (char *)&dqhead, - sizeof(struct lustre_disk_dqheader), &offset); - - if (size != sizeof(struct lustre_disk_dqheader)) { - CERROR("error writing quotafile header (rc:%d)\n", rc); - rc = size; - } - - return rc; -} - -/* We need to export this function to initialize quotafile, because we haven't - * user level check utility */ -int lustre_init_quota_info_generic(struct lustre_quota_info *lqi, int type, - int fakemagics) -{ - struct lustre_mem_dqinfo *dqinfo = &lqi->qi_info[type]; - int rc; - - rc = lustre_init_quota_header(lqi, type, fakemagics); - if (rc) - return rc; - - /* write init quota info */ - memset(dqinfo, 0, sizeof(*dqinfo)); - dqinfo->dqi_bgrace = MAX_DQ_TIME; - dqinfo->dqi_igrace = MAX_IQ_TIME; - dqinfo->dqi_blocks = LUSTRE_DQTREEOFF + 1; - - return lustre_write_quota_info(lqi, type); -} - -int lustre_init_quota_info(struct lustre_quota_info *lqi, int type) -{ - return lustre_init_quota_info_generic(lqi, type, 0); -} - -ssize_t quota_read(struct file *file, struct inode *inode, int type, - uint blk, dqbuf_t buf) -{ - if (file) { - return read_blk(file, blk, buf); - } else { -#ifndef KERNEL_SUPPORTS_QUOTA_READ - return -ENOTSUPP; -#else - struct super_block *sb = inode->i_sb; - memset(buf, 0, LUSTRE_DQBLKSIZE); - return sb->s_op->quota_read(sb, type, (char *)buf, - LUSTRE_DQBLKSIZE, - blk << LUSTRE_DQBLKSIZE_BITS); -#endif - } -} - -static int walk_block_dqentry(struct file *filp, struct inode *inode, int type, - uint blk, struct list_head *list) -{ - dqbuf_t buf = getdqbuf(); - loff_t ret = 0; - struct lustre_disk_dqdbheader *dqhead = - (struct lustre_disk_dqdbheader *)buf; - struct dqblk *blk_item; - struct dqblk *pos; - struct list_head *tmp; - - if (!buf) - return -ENOMEM; - if ((ret = quota_read(filp, inode, type, blk, buf)) < 0) { - CERROR("VFS: Can't read quota tree block %u.\n", blk); - goto out_buf; - } - ret = 0; - - if (!le32_to_cpu(dqhead->dqdh_entries)) - goto out_buf; - - if (list_empty(list)) { - tmp = list; - goto done; - } - - list_for_each_entry(pos, list, link) { - if (blk == pos->blk) /* we got this blk already */ - goto out_buf; - if (blk > pos->blk) - continue; - break; - } - tmp = &pos->link; -done: - blk_item = kmalloc(sizeof(*blk_item), GFP_NOFS); - if (!blk_item) { - ret = -ENOMEM; - goto out_buf; - } - blk_item->blk = blk; - INIT_LIST_HEAD(&blk_item->link); - - list_add_tail(&blk_item->link, tmp); - -out_buf: - freedqbuf(buf); - return ret; -} - -int walk_tree_dqentry(struct file *filp, struct inode *inode, int type, - uint blk, int depth, struct list_head *list) -{ - dqbuf_t buf = getdqbuf(); - loff_t ret = 0; - int index; - u32 *ref = (u32 *) buf; - - if (!buf) - return -ENOMEM; - if ((ret = quota_read(filp, inode, type, blk, buf)) < 0) { - CERROR("VFS: Can't read quota tree block %u.\n", blk); - goto out_buf; - } - ret = 0; - - for (index = 0; index <= 0xff && !ret; index++) { - blk = le32_to_cpu(ref[index]); - if (!blk) /* No reference */ - continue; - - if (depth < LUSTRE_DQTREEDEPTH - 1) - ret = walk_tree_dqentry(filp, inode, type, blk, - depth + 1, list); - else - ret = walk_block_dqentry(filp, inode, type, blk, list); - } -out_buf: - freedqbuf(buf); - return ret; -} - -/* Walk through the quota file (v2 format) to get all ids with quota limit */ -int lustre_get_qids(struct file *fp, struct inode *inode, int type, - struct list_head *list) -{ - struct list_head blk_list; - struct dqblk *blk_item, *tmp; - dqbuf_t buf = NULL; - char *ddquot; - int rc; - lustre_quota_version_t version; - - ENTRY; - - if (check_quota_file(fp, inode, type, LUSTRE_QUOTA_V1) == 0) - version = LUSTRE_QUOTA_V1; - else if (check_quota_file(fp, inode, type, LUSTRE_QUOTA_V2) == 0) - version = LUSTRE_QUOTA_V2; - else { - CERROR("unknown quota file format!\n"); - RETURN(-EINVAL); - } - - if (!list_empty(list)) { - CERROR("not empty list\n"); - RETURN(-EINVAL); - } - - INIT_LIST_HEAD(&blk_list); - rc = walk_tree_dqentry(fp, inode, type, LUSTRE_DQTREEOFF, 0, &blk_list); - if (rc) { - CERROR("walk through quota file failed!(%d)\n", rc); - GOTO(out_free, rc); - } - if (list_empty(&blk_list)) - RETURN(0); - - buf = getdqbuf(); - if (!buf) - RETURN(-ENOMEM); - ddquot = GETENTRIES(buf, version); - - list_for_each_entry(blk_item, &blk_list, link) { - loff_t ret = 0; - int i, dqblk_sz = lustre_disk_dqblk_sz[version]; - char fakedquot[dqblk_sz]; - - memset(buf, 0, LUSTRE_DQBLKSIZE); - if ((ret = quota_read(fp, inode, type, blk_item->blk, buf))<0) { - CERROR("VFS: Can't read quota tree block %u.\n", - blk_item->blk); - GOTO(out_free, rc = ret); - } - - memset(fakedquot, 0, dqblk_sz); - for (i = 0; i < lustre_dqstrinblk[version]; i++) { - struct dquot_id *dqid; - /* skip empty entry */ - if (!memcmp(fakedquot, ddquot + i*dqblk_sz, dqblk_sz)) - continue; - - dqid = kmalloc(sizeof(*dqid), GFP_NOFS); - if (!dqid) - GOTO(out_free, rc = -ENOMEM); - - dqid->di_id = DQF_GET(ddquot + i * dqblk_sz, - version, dqb_id); - INIT_LIST_HEAD(&dqid->di_link); - list_add(&dqid->di_link, list); - } - } - -out_free: - list_for_each_entry_safe(blk_item, tmp, &blk_list, link) { - list_del_init(&blk_item->link); - kfree(blk_item); - } - if (buf) - freedqbuf(buf); - - RETURN(rc); -} - - -EXPORT_SYMBOL(lustre_read_quota_info); -EXPORT_SYMBOL(lustre_write_quota_info); -EXPORT_SYMBOL(lustre_check_quota_file); -EXPORT_SYMBOL(lustre_read_dquot); -EXPORT_SYMBOL(lustre_commit_dquot); -EXPORT_SYMBOL(lustre_init_quota_info); -EXPORT_SYMBOL(lustre_get_qids); diff --git a/lustre/lvfs/lustre_quota_fmt.h b/lustre/lvfs/lustre_quota_fmt.h deleted file mode 100644 index b0638f59a8..0000000000 --- a/lustre/lvfs/lustre_quota_fmt.h +++ /dev/null @@ -1,189 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Lustre administrative quota format - * - * from - * include/linux/quotaio_v2.h - */ -#ifndef _LUSTRE_QUOTA_FMT_H -#define _LUSTRE_QUOTA_FMT_H - -#include <linux/types.h> -#include <linux/quota.h> - -/* - * Definitions of magics and versions of current quota files - * Same with quota v2's magic - */ -#define LUSTRE_INITQMAGICS {\ - 0xd9c01f11, /* USRQUOTA */\ - 0xd9c01927 /* GRPQUOTA */\ -} - -/* Invalid magics that mark quota file as inconsistent */ -#define LUSTRE_BADQMAGICS {\ - 0xbadbadba, /* USRQUOTA */\ - 0xbadbadba /* GRPQUOTA */\ -} - -/* for the verson 1 of lustre_disk_dqblk*/ -#define LUSTRE_INITQVERSIONS {\ - 0, /* USRQUOTA */\ - 0 /* GRPQUOTA */\ -} - -/* - * The following structure defines the format of the disk quota file - * (as it appears on disk) - the file is a radix tree whose leaves point - * to blocks of these structures. for the version 1. - */ -struct lustre_disk_dqblk { - __u32 dqb_id; /* id this quota applies to */ - __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ - __u32 dqb_isoftlimit; /* preferred inode limit */ - __u32 dqb_curinodes; /* current # allocated inodes */ - __u32 dqb_bhardlimit; /* absolute limit on disk space (in QUOTABLOCK_SIZE) */ - __u32 dqb_bsoftlimit; /* preferred limit on disk space (in QUOTABLOCK_SIZE) */ - __u64 dqb_curspace; /* current space occupied (in bytes) */ - __u64 dqb_btime; /* time limit for excessive disk use */ - __u64 dqb_itime; /* time limit for excessive inode use */ -}; - -/* Number of entries in one blocks(21 entries) */ -#define LUSTRE_DQSTRINBLK \ - ((LUSTRE_DQBLKSIZE - sizeof(struct lustre_disk_dqdbheader)) \ - / sizeof(struct lustre_disk_dqblk)) -#define GETENTRIES_V1(buf) (((char *)buf)+sizeof(struct lustre_disk_dqdbheader)) - -/* for the verson 2 of lustre_disk_dqblk*/ -#define LUSTRE_INITQVERSIONS_V2 {\ - 1, /* USRQUOTA */\ - 1 /* GRPQUOTA */\ -} - -/* - * The following structure defines the format of the disk quota file - * (as it appears on disk) - the file is a radix tree whose leaves point - * to blocks of these structures. for the version 2. - */ -struct lustre_disk_dqblk_v2 { - __u32 dqb_id; /* id this quota applies to */ - __u32 padding; - __u64 dqb_ihardlimit; /* absolute limit on allocated inodes */ - __u64 dqb_isoftlimit; /* preferred inode limit */ - __u64 dqb_curinodes; /* current # allocated inodes */ - __u64 dqb_bhardlimit; /* absolute limit on disk space (in QUOTABLOCK_SIZE) */ - __u64 dqb_bsoftlimit; /* preferred limit on disk space (in QUOTABLOCK_SIZE) */ - __u64 dqb_curspace; /* current space occupied (in bytes) */ - __u64 dqb_btime; /* time limit for excessive disk use */ - __u64 dqb_itime; /* time limit for excessive inode use */ -}; - -/* Number of entries in one blocks(14 entries) */ -#define LUSTRE_DQSTRINBLK_V2 \ - ((LUSTRE_DQBLKSIZE - sizeof(struct lustre_disk_dqdbheader)) \ - / sizeof(struct lustre_disk_dqblk_v2)) -#define GETENTRIES_V2(buf) (((char *)buf)+sizeof(struct lustre_disk_dqdbheader)) - -#define GETENTRIES(buf,version) ((version == LUSTRE_QUOTA_V1) ? \ - GETENTRIES_V1(buf) : GETENTRIES_V2(buf)) - -/* - * Here are header structures as written on disk and their in-memory copies - */ -/* First generic header */ -struct lustre_disk_dqheader { - __u32 dqh_magic; /* Magic number identifying file */ - __u32 dqh_version; /* File version */ -}; - -/* Header with type and version specific information */ -struct lustre_disk_dqinfo { - __u32 dqi_bgrace; /* Time before block soft limit becomes hard limit */ - __u32 dqi_igrace; /* Time before inode soft limit becomes hard limit */ - __u32 dqi_flags; /* Flags for quotafile (DQF_*) */ - __u32 dqi_blocks; /* Number of blocks in file */ - __u32 dqi_free_blk; /* Number of first free block in the list */ - __u32 dqi_free_entry; /* Number of block with at least one free entry */ -}; - -/* - * Structure of header of block with quota structures. It is padded to 16 bytes so - * there will be space for exactly 21 quota-entries in a block - */ -struct lustre_disk_dqdbheader { - __u32 dqdh_next_free; /* Number of next block with free entry */ - __u32 dqdh_prev_free; /* Number of previous block with free entry */ - __u16 dqdh_entries; /* Number of valid entries in block */ - __u16 dqdh_pad1; - __u32 dqdh_pad2; -}; - -#ifdef LPROCFS -void lprocfs_quotfmt_test_init_vars(struct lprocfs_static_vars *lvars); -#else -static void lprocfs_quotfmt_test_init_vars(struct lprocfs_static_vars *lvars) {} -#endif - -#define LUSTRE_DQINFOOFF sizeof(struct lustre_disk_dqheader) /* Offset of info header in file */ -#define LUSTRE_DQBLKSIZE_BITS 10 -#define LUSTRE_DQBLKSIZE (1 << LUSTRE_DQBLKSIZE_BITS) /* Size of block with quota structures */ -#define LUSTRE_DQTREEOFF 1 /* Offset of tree in file in blocks */ -#define LUSTRE_DQTREEDEPTH 4 /* Depth of quota tree */ - -typedef char *dqbuf_t; - -#define GETIDINDEX(id, depth) (((id) >> ((LUSTRE_DQTREEDEPTH-(depth)-1)*8)) & 0xff) - -#define MAX_UL (0xffffffffUL) - -#define lustre_info_dirty(info) test_bit(DQF_INFO_DIRTY_B, &(info)->dqi_flags) - -struct dqblk { - struct list_head link; - uint blk; -}; - -/* come from lustre_fmt_common.c */ -dqbuf_t getdqbuf(void); -void freedqbuf(dqbuf_t buf); -void disk2memdqb(struct lustre_mem_dqblk *m, void *d, - enum lustre_quota_version version); -void lustre_mark_info_dirty(struct lustre_mem_dqinfo *info); -int lustre_init_quota_header(struct lustre_quota_info *lqi, int type, - int fakemagics); -int lustre_init_quota_info_generic(struct lustre_quota_info *lqi, int type, - int fakemagics); -int lustre_read_quota_info(struct lustre_quota_info *lqi, int type); -int lustre_read_quota_file_info(struct file* f, struct lustre_mem_dqinfo* info); -int lustre_write_quota_info(struct lustre_quota_info *lqi, int type); -ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf); -ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf); -int get_free_dqblk(struct file *filp, struct lustre_mem_dqinfo *info); -int put_free_dqblk(struct file *filp, struct lustre_mem_dqinfo *info, - dqbuf_t buf, uint blk); -int remove_free_dqentry(struct file *filp, - struct lustre_mem_dqinfo *info, dqbuf_t buf, - uint blk); -int insert_free_dqentry(struct file *filp, - struct lustre_mem_dqinfo *info, dqbuf_t buf, - uint blk); -ssize_t quota_read(struct file *file, struct inode *inode, int type, - uint blk, dqbuf_t buf); -int walk_tree_dqentry(struct file *filp, struct inode *inode, int type, - uint blk, int depth, struct list_head *list); -int check_quota_file(struct file *f, struct inode *inode, int type, - lustre_quota_version_t version); -int lustre_check_quota_file(struct lustre_quota_info *lqi, int type); -int lustre_read_dquot(struct lustre_dquot *dquot); -int lustre_commit_dquot(struct lustre_dquot *dquot); -int lustre_init_quota_info(struct lustre_quota_info *lqi, int type); -int lustre_get_qids(struct file *fp, struct inode *inode, int type, - struct list_head *list); - - -/* come from lustre_quota_fmt_conver.c */ -int lustre_quota_convert(struct lustre_quota_info *lqi, int type); - -#endif /* lustre_quota_fmt.h */ diff --git a/lustre/lvfs/lustre_quota_fmt_convert.c b/lustre/lvfs/lustre_quota_fmt_convert.c deleted file mode 100644 index 70350ed8f2..0000000000 --- a/lustre/lvfs/lustre_quota_fmt_convert.c +++ /dev/null @@ -1,185 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * convert quota format. - * - * from - * linux/fs/quota_v2.c - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#include <linux/errno.h> -#include <linux/fs.h> -#include <linux/mount.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/slab.h> -#include <linux/quotaio_v1.h> - -#include <asm/byteorder.h> -#include <asm/uaccess.h> - -#include <lustre_quota.h> -#include <obd_support.h> -#include "lustre_quota_fmt.h" - -static int admin_convert_dqinfo(struct file *fp_v1, struct file *fp_v2, - struct lustre_quota_info *lqi, int type) -{ - struct lustre_mem_dqinfo *info_old, *info_new = &lqi->qi_info[type]; - int rc; - - OBD_ALLOC_PTR(info_old); - if (info_old == NULL) - return -ENOMEM; - - rc = lustre_read_quota_file_info(fp_v1, info_old); - if (!rc) { - /* save essential fields: bgrace, igrace, flags */ - info_new->dqi_bgrace = info_old->dqi_bgrace; - info_new->dqi_igrace = info_old->dqi_igrace; - info_new->dqi_flags = info_old->dqi_flags; - rc = lustre_write_quota_info(lqi, type); - } - - OBD_FREE_PTR(info_old); - - return rc; -} - -static int admin_convert_v1_to_v2(struct file *fp_v1, struct file *fp_v2, - struct lustre_quota_info *lqi, int type) -{ - struct list_head blk_list; - struct dqblk *blk_item, *tmp; - dqbuf_t buf = NULL; - struct lustre_disk_dqblk *ddquot; - struct lustre_dquot *dquot = NULL; - int rc; - - ENTRY; - - INIT_LIST_HEAD(&blk_list); - - rc = admin_convert_dqinfo(fp_v1, fp_v2, lqi, type); - if (rc) { - CERROR("could not copy dqinfo!(%d)\n", rc); - GOTO(out_free, rc); - } - - rc = walk_tree_dqentry(fp_v1, NULL, type, LUSTRE_DQTREEOFF, 0, &blk_list); - if (rc) { - CERROR("walk through quota file failed!(%d)\n", rc); - GOTO(out_free, rc); - } - if (list_empty(&blk_list)) - RETURN(0); - - buf = getdqbuf(); - if (!buf) - GOTO(out_free, rc = -ENOMEM); - - ddquot = (struct lustre_disk_dqblk*)GETENTRIES(buf, LUSTRE_QUOTA_V1); - - OBD_ALLOC_PTR(dquot); - if (dquot == NULL) - GOTO(out_free, rc = -ENOMEM); - - list_for_each_entry(blk_item, &blk_list, link) { - loff_t ret = 0; - int i; - struct lustre_disk_dqblk fakedquot; - - memset(buf, 0, LUSTRE_DQBLKSIZE); - if ((ret = quota_read(fp_v1, NULL, type, blk_item->blk, buf))<0) { - CERROR("VFS: Can't read quota tree block %u.\n", - blk_item->blk); - GOTO(out_free, rc = ret); - } - - memset(&fakedquot, 0, sizeof(struct lustre_disk_dqblk)); - for (i = 0; i < LUSTRE_DQSTRINBLK; i++) { - /* skip empty entry */ - if (!memcmp - (&fakedquot, ddquot + i, - sizeof(struct lustre_disk_dqblk))) - continue; - - memset(dquot, 0, sizeof(*dquot)); - - dquot->dq_id = le32_to_cpu(ddquot[i].dqb_id); - dquot->dq_type = type; - dquot->dq_info = lqi; - - disk2memdqb(&dquot->dq_dqb, &ddquot[i], LUSTRE_QUOTA_V1); - rc = lustre_commit_dquot(dquot); - if (rc < 0) - GOTO(out_free, rc); - } - } - - EXIT; - -out_free: - list_for_each_entry_safe(blk_item, tmp, &blk_list, link) { - list_del_init(&blk_item->link); - kfree(blk_item); - } - if (buf) - freedqbuf(buf); - if (dquot) - OBD_FREE_PTR(dquot); - return rc; -} - -int lustre_quota_convert(struct lustre_quota_info *lqi, int type) -{ - struct file *f_v2 = lqi->qi_files[type]; - const char *qf_v1[] = LUSTRE_ADMIN_QUOTAFILES_V1; - char name[64]; - struct file *f_v1; - int rc = 0; - ENTRY; - - LASSERT(f_v2); - - rc = lustre_init_quota_info_generic(lqi, type, 1); - if (rc) { - CERROR("could not initialize new quota file(%d)\n", rc); - RETURN(rc); - } - - /* Open old quota file and copy to the new one */ - sprintf(name, "OBJECTS/%s", qf_v1[type]); - f_v1 = filp_open(name, O_RDONLY, 0); - if (!IS_ERR(f_v1)) { - if (!check_quota_file(f_v1, NULL, type, LUSTRE_QUOTA_V1)) { - rc = admin_convert_v1_to_v2(f_v1, f_v2, lqi, type); - if (rc) - CERROR("failed to convert v1 quota file" - " to v2 quota file.\n"); - else - CDEBUG(D_INFO, "Found v1 quota file, " - "successfully converted to v2.\n"); - } - else - CERROR("old quota file is broken, " - "new quota file will be empty\n"); - - filp_close(f_v1, 0); - } else if (PTR_ERR(f_v1) != -ENOENT) /* No quota file is ok */ - CERROR("old quota file can not be open, " - "new quota file will be empty (%ld)\n", PTR_ERR(f_v1)); - - /* mark corresponding quota file as correct */ - if (!rc) - lustre_init_quota_header(lqi, type, 0); - - RETURN(rc); -} - -EXPORT_SYMBOL(lustre_quota_convert); diff --git a/lustre/lvfs/lvfs_common.c b/lustre/lvfs/lvfs_common.c deleted file mode 100644 index 1834616505..0000000000 --- a/lustre/lvfs/lvfs_common.c +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org/ - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#define DEBUG_SUBSYSTEM S_FILTER - -#include <lvfs.h> - -struct dentry *lvfs_fid2dentry(struct lvfs_run_ctxt *ctxt, __u64 id, - __u32 gen, __u64 gr, void *data) -{ - return ctxt->cb_ops.l_fid2dentry(id, gen, gr, data); -} -EXPORT_SYMBOL(lvfs_fid2dentry); diff --git a/lustre/lvfs/lvfs_darwin.c b/lustre/lvfs/lvfs_darwin.c deleted file mode 100644 index 1feb31ced5..0000000000 --- a/lustre/lvfs/lvfs_darwin.c +++ /dev/null @@ -1,45 +0,0 @@ -#define DEBUG_SUBSYSTEM S_FILTER - -#include <libcfs/libcfs.h> -#include <obd.h> -#include <lvfs.h> -#include <lustre_lib.h> - -atomic_t obd_memory; -int obd_memmax; - -/* XXX currently ctxt functions should not be used ?? */ -void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, - struct lvfs_ucred *cred) -{ - LBUG(); -} - -void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx, - struct lvfs_ucred *cred) -{ - LBUG(); -} - -static int __init lvfs_init(void) -{ - int ret = 0; - ENTRY; - - RETURN(ret); -} - -static void __exit lvfs_exit(void) -{ - int leaked; - ENTRY; - - leaked = atomic_read(&obd_memory); - CDEBUG(leaked ? D_ERROR : D_INFO, - "obd mem max: %d leaked: %d\n", obd_memmax, leaked); - - return; -} - -cfs_module(lvfs, "1.0.0", lvfs_init, lvfs_exit); - diff --git a/lustre/lvfs/lvfs_internal.h b/lustre/lvfs/lvfs_internal.h deleted file mode 100644 index 091fd99c6a..0000000000 --- a/lustre/lvfs/lvfs_internal.h +++ /dev/null @@ -1,5 +0,0 @@ -int fsfilt_ext3_init(void); -void fsfilt_ext3_exit(void); - -int fsfilt_reiser_init(void); -void fsfilt_reiser_exit(void); diff --git a/lustre/lvfs/lvfs_lib.c b/lustre/lvfs/lvfs_lib.c deleted file mode 100644 index 1a7bd013ff..0000000000 --- a/lustre/lvfs/lvfs_lib.c +++ /dev/null @@ -1,264 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/lvfs/lvfs_lib.c - * Lustre filesystem abstraction routines - * - * Copyright (C) 2007 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifdef __KERNEL__ -#include <linux/module.h> -#include <linux/random.h> -#else -#include <liblustre.h> -#endif -#include <lustre_lib.h> -#include <lprocfs_status.h> - -__u64 obd_max_pages = 0; -__u64 obd_max_alloc = 0; - -#ifdef __KERNEL__ -struct lprocfs_stats *obd_memory = NULL; -spinlock_t obd_updatemax_lock = SPIN_LOCK_UNLOCKED; -/* refine later and change to seqlock or simlar from libcfs */ -#else -__u64 obd_alloc; -__u64 obd_pages; -#endif - -unsigned int obd_fail_val = 0; -unsigned int obd_fail_loc = 0; -unsigned int obd_alloc_fail_rate = 0; - -int obd_alloc_fail(const void *ptr, const char *name, const char *type, - size_t size, const char *file, int line) -{ - if (ptr == NULL || - (ll_rand() & OBD_ALLOC_FAIL_MASK) < obd_alloc_fail_rate) { - CERROR("%s%salloc of %s ("LPU64" bytes) failed at %s:%d\n", - ptr ? "force " :"", type, name, (__u64)size, file, - line); - CERROR(LPU64" total bytes and "LPU64" total pages " - "("LPU64" bytes) allocated by Lustre, " - "%d total bytes by LNET\n", - obd_memory_sum(), - obd_pages_sum() << CFS_PAGE_SHIFT, - obd_pages_sum(), - atomic_read(&libcfs_kmemory)); - return 1; - } - return 0; -} -EXPORT_SYMBOL(obd_alloc_fail); - -#ifdef __KERNEL__ -void obd_update_maxusage() -{ - __u64 max1, max2; - - max1 = obd_pages_sum(); - max2 = obd_memory_sum(); - - spin_lock(&obd_updatemax_lock); - if (max1 > obd_max_pages) - obd_max_pages = max1; - if (max2 > obd_max_alloc) - obd_max_alloc = max2; - spin_unlock(&obd_updatemax_lock); - -} - -__u64 obd_memory_max(void) -{ - __u64 ret; - - spin_lock(&obd_updatemax_lock); - ret = obd_max_alloc; - spin_unlock(&obd_updatemax_lock); - - return ret; -} - -__u64 obd_pages_max(void) -{ - __u64 ret; - - spin_lock(&obd_updatemax_lock); - ret = obd_max_pages; - spin_unlock(&obd_updatemax_lock); - - return ret; -} - -EXPORT_SYMBOL(obd_update_maxusage); -EXPORT_SYMBOL(obd_pages_max); -EXPORT_SYMBOL(obd_memory_max); -EXPORT_SYMBOL(obd_memory); - -#endif - -#ifdef LPROCFS -__s64 lprocfs_read_helper(struct lprocfs_counter *lc, - enum lprocfs_fields_flags field) -{ - __s64 ret = 0; - int centry; - - if (!lc) - RETURN(0); - do { - centry = atomic_read(&lc->lc_cntl.la_entry); - - switch (field) { - case LPROCFS_FIELDS_FLAGS_CONFIG: - ret = lc->lc_config; - break; - case LPROCFS_FIELDS_FLAGS_SUM: - ret = lc->lc_sum; - break; - case LPROCFS_FIELDS_FLAGS_MIN: - ret = lc->lc_min; - break; - case LPROCFS_FIELDS_FLAGS_MAX: - ret = lc->lc_max; - break; - case LPROCFS_FIELDS_FLAGS_AVG: - ret = (lc->lc_max - lc->lc_min)/2; - break; - case LPROCFS_FIELDS_FLAGS_SUMSQUARE: - ret = lc->lc_sumsquare; - break; - case LPROCFS_FIELDS_FLAGS_COUNT: - ret = lc->lc_count; - break; - default: - break; - }; - } while (centry != atomic_read(&lc->lc_cntl.la_entry) && - centry != atomic_read(&lc->lc_cntl.la_exit)); - - RETURN(ret); -} -EXPORT_SYMBOL(lprocfs_read_helper); - -void lprocfs_counter_add(struct lprocfs_stats *stats, int idx, - long amount) -{ - struct lprocfs_counter *percpu_cntr; - int smp_id; - - if (stats == NULL) - return; - - /* With per-client stats, statistics are allocated only for - * single CPU area, so the smp_id should be 0 always. */ - smp_id = lprocfs_stats_lock(stats, LPROCFS_GET_SMP_ID); - - percpu_cntr = &(stats->ls_percpu[smp_id]->lp_cntr[idx]); - atomic_inc(&percpu_cntr->lc_cntl.la_entry); - percpu_cntr->lc_count++; - - if (percpu_cntr->lc_config & LPROCFS_CNTR_AVGMINMAX) { - percpu_cntr->lc_sum += amount; - if (percpu_cntr->lc_config & LPROCFS_CNTR_STDDEV) - percpu_cntr->lc_sumsquare += (__u64)amount * amount; - if (amount < percpu_cntr->lc_min) - percpu_cntr->lc_min = amount; - if (amount > percpu_cntr->lc_max) - percpu_cntr->lc_max = amount; - } - atomic_inc(&percpu_cntr->lc_cntl.la_exit); - lprocfs_stats_unlock(stats); -} -EXPORT_SYMBOL(lprocfs_counter_add); - -void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx, - long amount) -{ - struct lprocfs_counter *percpu_cntr; - int smp_id; - - if (stats == NULL) - return; - - /* With per-client stats, statistics are allocated only for - * single CPU area, so the smp_id should be 0 always. */ - smp_id = lprocfs_stats_lock(stats, LPROCFS_GET_SMP_ID); - - percpu_cntr = &(stats->ls_percpu[smp_id]->lp_cntr[idx]); - atomic_inc(&percpu_cntr->lc_cntl.la_entry); - if (percpu_cntr->lc_config & LPROCFS_CNTR_AVGMINMAX) - percpu_cntr->lc_sum -= amount; - atomic_inc(&percpu_cntr->lc_cntl.la_exit); - lprocfs_stats_unlock(stats); -} -EXPORT_SYMBOL(lprocfs_counter_sub); -#endif /* LPROCFS */ - -EXPORT_SYMBOL(obd_fail_loc); -EXPORT_SYMBOL(obd_alloc_fail_rate); -EXPORT_SYMBOL(obd_fail_val); - -int obd_fail_check(__u32 id) -{ - static int count = 0; - if (likely((obd_fail_loc & OBD_FAIL_MASK_LOC) != - (id & OBD_FAIL_MASK_LOC))) - return 0; - - if ((obd_fail_loc & (OBD_FAILED | OBD_FAIL_ONCE)) == - (OBD_FAILED | OBD_FAIL_ONCE)) { - count = 0; /* paranoia */ - return 0; - } - - if (obd_fail_loc & OBD_FAIL_RAND) { - unsigned int ll_rand(void); - if (obd_fail_val < 2) - return 0; - if (ll_rand() % obd_fail_val > 0) - return 0; - } - - if (obd_fail_loc & OBD_FAIL_SKIP) { - count++; - if (count < obd_fail_val) - return 0; - count = 0; - } - - /* Overridden by FAIL_ONCE */ - if (obd_fail_loc & OBD_FAIL_SOME) { - count++; - if (count >= obd_fail_val) { - count = 0; - /* Don't fail anymore */ - obd_fail_loc |= OBD_FAIL_ONCE; - } - } - - obd_fail_loc |= OBD_FAILED; - /* Handle old checks that OR in this */ - if (id & OBD_FAIL_ONCE) - obd_fail_loc |= OBD_FAIL_ONCE; - - return 1; -} -EXPORT_SYMBOL(obd_fail_check); diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c deleted file mode 100644 index beea8baa91..0000000000 --- a/lustre/lvfs/lvfs_linux.c +++ /dev/null @@ -1,510 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/lib/lvfs_linux.c - * Lustre filesystem abstraction routines - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#define DEBUG_SUBSYSTEM S_FILTER - -#include <linux/version.h> -#include <linux/fs.h> -#include <asm/unistd.h> -#include <linux/slab.h> -#include <linux/pagemap.h> -#include <linux/quotaops.h> -#include <linux/version.h> -#include <libcfs/kp30.h> -#include <lustre_fsfilt.h> -#include <obd.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/lustre_compat25.h> -#include <lvfs.h> -#include "lvfs_internal.h" - -#include <obd.h> -#include <lustre_lib.h> -#include <lustre_quota.h> - -/* Debugging check only needed during development */ -#ifdef OBD_CTXT_DEBUG -# define ASSERT_CTXT_MAGIC(magic) LASSERT((magic) == OBD_RUN_CTXT_MAGIC) -# define ASSERT_NOT_KERNEL_CTXT(msg) LASSERTF(!segment_eq(get_fs(), get_ds()),\ - msg) -# define ASSERT_KERNEL_CTXT(msg) LASSERTF(segment_eq(get_fs(), get_ds()), msg) -#else -# define ASSERT_CTXT_MAGIC(magic) do {} while(0) -# define ASSERT_NOT_KERNEL_CTXT(msg) do {} while(0) -# define ASSERT_KERNEL_CTXT(msg) do {} while(0) -#endif - -static void push_group_info(struct lvfs_run_ctxt *save, - struct upcall_cache_entry *uce) -{ - struct group_info *ginfo = uce ? uce->ue_group_info : NULL; - - if (!ginfo) { - save->ngroups = current_ngroups; - current_ngroups = 0; - } else { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) - task_lock(current); - save->group_info = current->group_info; - current->group_info = ginfo; - task_unlock(current); -#else - LASSERT(ginfo->ngroups <= NGROUPS); - LASSERT(current->ngroups <= NGROUPS_SMALL); - /* save old */ - save->group_info.ngroups = current->ngroups; - if (current->ngroups) - memcpy(save->group_info.small_block, current->groups, - current->ngroups * sizeof(gid_t)); - /* push new */ - current->ngroups = ginfo->ngroups; - if (ginfo->ngroups) - memcpy(current->groups, ginfo->small_block, - current->ngroups * sizeof(gid_t)); -#endif - } -} - -static void pop_group_info(struct lvfs_run_ctxt *save, - struct upcall_cache_entry *uce) -{ - struct group_info *ginfo = uce ? uce->ue_group_info : NULL; - - if (!ginfo) { - current_ngroups = save->ngroups; - } else { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) - task_lock(current); - current->group_info = save->group_info; - task_unlock(current); -#else - current->ngroups = save->group_info.ngroups; - if (current->ngroups) - memcpy(current->groups, save->group_info.small_block, - current->ngroups * sizeof(gid_t)); -#endif - } -} - -/* push / pop to root of obd store */ -void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, - struct lvfs_ucred *uc) -{ - //ASSERT_NOT_KERNEL_CTXT("already in kernel context!\n"); - ASSERT_CTXT_MAGIC(new_ctx->magic); - OBD_SET_CTXT_MAGIC(save); - - /* - CDEBUG(D_INFO, - "= push %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n", - save, current, current->fs, current->fs->pwd, - atomic_read(¤t->fs->pwd->d_count), - atomic_read(¤t->fs->pwd->d_inode->i_count), - current->fs->pwd->d_name.len, current->fs->pwd->d_name.name, - current->fs->pwdmnt, - atomic_read(¤t->fs->pwdmnt->mnt_count)); - */ - - save->fs = get_fs(); - LASSERT(atomic_read(¤t->fs->pwd->d_count)); - LASSERT(atomic_read(&new_ctx->pwd->d_count)); - save->pwd = dget(current->fs->pwd); - save->pwdmnt = mntget(current->fs->pwdmnt); - save->luc.luc_umask = current->fs->umask; - - LASSERT(save->pwd); - LASSERT(save->pwdmnt); - LASSERT(new_ctx->pwd); - LASSERT(new_ctx->pwdmnt); - - if (uc) { - save->luc.luc_fsuid = current->fsuid; - save->luc.luc_fsgid = current->fsgid; - save->luc.luc_cap = current->cap_effective; - - current->fsuid = uc->luc_fsuid; - current->fsgid = uc->luc_fsgid; - current->cap_effective = uc->luc_cap; - push_group_info(save, uc->luc_uce); - } - current->fs->umask = 0; /* umask already applied on client */ - set_fs(new_ctx->fs); - ll_set_fs_pwd(current->fs, new_ctx->pwdmnt, new_ctx->pwd); - - /* - CDEBUG(D_INFO, - "= push %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n", - new_ctx, current, current->fs, current->fs->pwd, - atomic_read(¤t->fs->pwd->d_count), - atomic_read(¤t->fs->pwd->d_inode->i_count), - current->fs->pwd->d_name.len, current->fs->pwd->d_name.name, - current->fs->pwdmnt, - atomic_read(¤t->fs->pwdmnt->mnt_count)); - */ -} -EXPORT_SYMBOL(push_ctxt); - -void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx, - struct lvfs_ucred *uc) -{ - //printk("pc0"); - ASSERT_CTXT_MAGIC(saved->magic); - //printk("pc1"); - ASSERT_KERNEL_CTXT("popping non-kernel context!\n"); - - /* - CDEBUG(D_INFO, - " = pop %p==%p = cur %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n", - new_ctx, current, current->fs, current->fs->pwd, - atomic_read(¤t->fs->pwd->d_count), - atomic_read(¤t->fs->pwd->d_inode->i_count), - current->fs->pwd->d_name.len, current->fs->pwd->d_name.name, - current->fs->pwdmnt, - atomic_read(¤t->fs->pwdmnt->mnt_count)); - */ - - LASSERTF(current->fs->pwd == new_ctx->pwd, "%p != %p\n", - current->fs->pwd, new_ctx->pwd); - LASSERTF(current->fs->pwdmnt == new_ctx->pwdmnt, "%p != %p\n", - current->fs->pwdmnt, new_ctx->pwdmnt); - - set_fs(saved->fs); - ll_set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd); - - dput(saved->pwd); - mntput(saved->pwdmnt); - current->fs->umask = saved->luc.luc_umask; - if (uc) { - current->fsuid = saved->luc.luc_fsuid; - current->fsgid = saved->luc.luc_fsgid; - current->cap_effective = saved->luc.luc_cap; - pop_group_info(saved, uc->luc_uce); - } - - /* - CDEBUG(D_INFO, - "= pop %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n", - saved, current, current->fs, current->fs->pwd, - atomic_read(¤t->fs->pwd->d_count), - atomic_read(¤t->fs->pwd->d_inode->i_count), - current->fs->pwd->d_name.len, current->fs->pwd->d_name.name, - current->fs->pwdmnt, - atomic_read(¤t->fs->pwdmnt->mnt_count)); - */ -} -EXPORT_SYMBOL(pop_ctxt); - -/* utility to make a file */ -struct dentry *simple_mknod(struct dentry *dir, char *name, int mode, int fix) -{ - struct dentry *dchild; - int err = 0; - ENTRY; - - ASSERT_KERNEL_CTXT("kernel doing mknod outside kernel context\n"); - CDEBUG(D_INODE, "creating file %.*s\n", (int)strlen(name), name); - - dchild = ll_lookup_one_len(name, dir, strlen(name)); - if (IS_ERR(dchild)) - GOTO(out_up, dchild); - - if (dchild->d_inode) { - int old_mode = dchild->d_inode->i_mode; - if (!S_ISREG(old_mode)) - GOTO(out_err, err = -EEXIST); - - /* Fixup file permissions if necessary */ - if (fix && (old_mode & S_IALLUGO) != (mode & S_IALLUGO)) { - CWARN("fixing permissions on %s from %o to %o\n", - name, old_mode, mode); - dchild->d_inode->i_mode = (mode & S_IALLUGO) | - (old_mode & ~S_IALLUGO); - mark_inode_dirty(dchild->d_inode); - } - GOTO(out_up, dchild); - } - - err = ll_vfs_create(dir->d_inode, dchild, (mode & ~S_IFMT) | S_IFREG, - NULL); - if (err) - GOTO(out_err, err); - - RETURN(dchild); - -out_err: - dput(dchild); - dchild = ERR_PTR(err); -out_up: - return dchild; -} -EXPORT_SYMBOL(simple_mknod); - -/* utility to make a directory */ -struct dentry *simple_mkdir(struct dentry *dir, char *name, int mode, int fix) -{ - struct dentry *dchild; - int err = 0; - ENTRY; - - ASSERT_KERNEL_CTXT("kernel doing mkdir outside kernel context\n"); - CDEBUG(D_INODE, "creating directory %.*s\n", (int)strlen(name), name); - dchild = ll_lookup_one_len(name, dir, strlen(name)); - if (IS_ERR(dchild)) - GOTO(out_up, dchild); - - if (dchild->d_inode) { - int old_mode = dchild->d_inode->i_mode; - if (!S_ISDIR(old_mode)) { - CERROR("found %s (%lu/%u) is mode %o\n", name, - dchild->d_inode->i_ino, - dchild->d_inode->i_generation, old_mode); - GOTO(out_err, err = -ENOTDIR); - } - - /* Fixup directory permissions if necessary */ - if (fix && (old_mode & S_IALLUGO) != (mode & S_IALLUGO)) { - CDEBUG(D_CONFIG, - "fixing permissions on %s from %o to %o\n", - name, old_mode, mode); - dchild->d_inode->i_mode = (mode & S_IALLUGO) | - (old_mode & ~S_IALLUGO); - mark_inode_dirty(dchild->d_inode); - } - GOTO(out_up, dchild); - } - - err = vfs_mkdir(dir->d_inode, dchild, mode); - if (err) - GOTO(out_err, err); - - RETURN(dchild); - -out_err: - dput(dchild); - dchild = ERR_PTR(err); -out_up: - return dchild; -} -EXPORT_SYMBOL(simple_mkdir); - -/* utility to rename a file */ -int lustre_rename(struct dentry *dir, char *oldname, char *newname) -{ - struct dentry *dchild_old, *dchild_new; - int err = 0; - ENTRY; - - ASSERT_KERNEL_CTXT("kernel doing rename outside kernel context\n"); - CDEBUG(D_INODE, "renaming file %.*s to %.*s\n", - (int)strlen(oldname), oldname, (int)strlen(newname), newname); - - dchild_old = ll_lookup_one_len(oldname, dir, strlen(oldname)); - if (IS_ERR(dchild_old)) - RETURN(PTR_ERR(dchild_old)); - - if (!dchild_old->d_inode) - GOTO(put_old, err = -ENOENT); - - dchild_new = ll_lookup_one_len(newname, dir, strlen(newname)); - if (IS_ERR(dchild_new)) - GOTO(put_old, err = PTR_ERR(dchild_new)); - - err = vfs_rename(dir->d_inode, dchild_old, dir->d_inode, dchild_new); - - dput(dchild_new); -put_old: - dput(dchild_old); - RETURN(err); -} -EXPORT_SYMBOL(lustre_rename); - -/* - * Read a file from within kernel context. Prior to calling this - * function we should already have done a push_ctxt(). - */ -int lustre_fread(struct file *file, void *buf, int len, loff_t *off) -{ - ASSERT_KERNEL_CTXT("kernel doing read outside kernel context\n"); - if (!file || !file->f_op || !file->f_op->read || !off) - RETURN(-ENOSYS); - - return file->f_op->read(file, buf, len, off); -} -EXPORT_SYMBOL(lustre_fread); - -/* - * Write a file from within kernel context. Prior to calling this - * function we should already have done a push_ctxt(). - */ -int lustre_fwrite(struct file *file, const void *buf, int len, loff_t *off) -{ - ENTRY; - ASSERT_KERNEL_CTXT("kernel doing write outside kernel context\n"); - if (!file) - RETURN(-ENOENT); - if (!file->f_op) - RETURN(-ENOSYS); - if (!off) - RETURN(-EINVAL); - - if (!file->f_op->write) - RETURN(-EROFS); - - RETURN(file->f_op->write(file, buf, len, off)); -} -EXPORT_SYMBOL(lustre_fwrite); - -/* - * Sync a file from within kernel context. Prior to calling this - * function we should already have done a push_ctxt(). - */ -int lustre_fsync(struct file *file) -{ - ENTRY; - ASSERT_KERNEL_CTXT("kernel doing sync outside kernel context\n"); - if (!file || !file->f_op || !file->f_op->fsync) - RETURN(-ENOSYS); - - RETURN(file->f_op->fsync(file, file->f_dentry, 0)); -} -EXPORT_SYMBOL(lustre_fsync); - -struct l_file *l_dentry_open(struct lvfs_run_ctxt *ctxt, struct l_dentry *de, - int flags) -{ - mntget(ctxt->pwdmnt); - return dentry_open(de, ctxt->pwdmnt, flags); -} -EXPORT_SYMBOL(l_dentry_open); - -#ifdef HAVE_VFS_READDIR_U64_INO -static int l_filldir(void *__buf, const char *name, int namlen, loff_t offset, - u64 ino, unsigned int d_type) -#else -static int l_filldir(void *__buf, const char *name, int namlen, loff_t offset, - ino_t ino, unsigned int d_type) -#endif -{ - struct l_linux_dirent *dirent; - struct l_readdir_callback *buf = (struct l_readdir_callback *)__buf; - - dirent = buf->lrc_dirent; - if (dirent) - dirent->lld_off = offset; - - OBD_ALLOC(dirent, sizeof(*dirent)); - - if (!dirent) - return -ENOMEM; - - list_add_tail(&dirent->lld_list, buf->lrc_list); - - buf->lrc_dirent = dirent; - dirent->lld_ino = ino; - LASSERT(sizeof(dirent->lld_name) >= namlen + 1); - memcpy(dirent->lld_name, name, namlen); - - return 0; -} - -long l_readdir(struct file *file, struct list_head *dentry_list) -{ - struct l_linux_dirent *lastdirent; - struct l_readdir_callback buf; - int error; - - buf.lrc_dirent = NULL; - buf.lrc_list = dentry_list; - - error = vfs_readdir(file, l_filldir, &buf); - if (error < 0) - return error; - - lastdirent = buf.lrc_dirent; - if (lastdirent) - lastdirent->lld_off = file->f_pos; - - return 0; -} -EXPORT_SYMBOL(l_readdir); - - -#ifdef LUSTRE_KERNEL_VERSION -#ifndef HAVE_CLEAR_RDONLY_ON_PUT -#error rdonly patchset must be updated [cfs bz11248] -#endif - -void dev_set_rdonly(lvfs_sbdev_type dev); -int dev_check_rdonly(lvfs_sbdev_type dev); - -void __lvfs_set_rdonly(lvfs_sbdev_type dev, lvfs_sbdev_type jdev) -{ - lvfs_sbdev_sync(dev); - if (jdev && (jdev != dev)) { - CDEBUG(D_IOCTL | D_HA, "set journal dev %lx rdonly\n", - (long)jdev); - dev_set_rdonly(jdev); - } - CDEBUG(D_IOCTL | D_HA, "set dev %lx rdonly\n", (long)dev); - dev_set_rdonly(dev); -} - -int lvfs_check_rdonly(lvfs_sbdev_type dev) -{ - return dev_check_rdonly(dev); -} - -EXPORT_SYMBOL(__lvfs_set_rdonly); -EXPORT_SYMBOL(lvfs_check_rdonly); -#endif /* LUSTRE_KERNEL_VERSION */ - -int lvfs_check_io_health(struct obd_device *obd, struct file *file) -{ - char *write_page = NULL; - loff_t offset = 0; - int rc = 0; - ENTRY; - - OBD_ALLOC(write_page, CFS_PAGE_SIZE); - if (!write_page) - RETURN(-ENOMEM); - - rc = fsfilt_write_record(obd, file, write_page, CFS_PAGE_SIZE, &offset, 1); - - OBD_FREE(write_page, CFS_PAGE_SIZE); - - CDEBUG(D_INFO, "write 1 page synchronously for checking io rc %d\n",rc); - RETURN(rc); -} -EXPORT_SYMBOL(lvfs_check_io_health); - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre VFS Filesystem Helper v0.1"); -MODULE_LICENSE("GPL"); diff --git a/lustre/lvfs/lvfs_userfs.c b/lustre/lvfs/lvfs_userfs.c deleted file mode 100644 index 28afe5fea9..0000000000 --- a/lustre/lvfs/lvfs_userfs.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/lib/lvfs_userfs.c - * Lustre filesystem abstraction routines - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <liblustre.h> -#include <lvfs.h> -#include "lvfs_internal.h" - -#include <obd.h> -#include <lustre_lib.h> - -/* XXX currently ctxt functions should not be used ?? */ -void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, - struct lvfs_ucred *uc) -{ - LBUG(); -} - -void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx, - struct lvfs_ucred *uc) -{ - LBUG(); -} diff --git a/lustre/lvfs/prng.c b/lustre/lvfs/prng.c deleted file mode 100644 index 4922c04c45..0000000000 --- a/lustre/lvfs/prng.c +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * concatenation of following two 16-bit multiply with carry generators - * x(n)=a*x(n-1)+carry mod 2^16 and y(n)=b*y(n-1)+carry mod 2^16, - * number and carry packed within the same 32 bit integer. - * algorithm recommended by Marsaglia - ******************************************************************/ -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#ifndef __KERNEL__ -#include <liblustre.h> -#define get_random_bytes(val, size) (*val) = 0 -#endif -#include <obd_class.h> -#include <linux/random.h> - -/* -From: George Marsaglia <geo@stat.fsu.edu> -Newsgroups: sci.math -Subject: Re: A RANDOM NUMBER GENERATOR FOR C -Date: Tue, 30 Sep 1997 05:29:35 -0700 - - * You may replace the two constants 36969 and 18000 by any - * pair of distinct constants from this list: - * 18000 18030 18273 18513 18879 19074 19098 19164 19215 19584 - * 19599 19950 20088 20508 20544 20664 20814 20970 21153 21243 - * 21423 21723 21954 22125 22188 22293 22860 22938 22965 22974 - * 23109 23124 23163 23208 23508 23520 23553 23658 23865 24114 - * 24219 24660 24699 24864 24948 25023 25308 25443 26004 26088 - * 26154 26550 26679 26838 27183 27258 27753 27795 27810 27834 - * 27960 28320 28380 28689 28710 28794 28854 28959 28980 29013 - * 29379 29889 30135 30345 30459 30714 30903 30963 31059 31083 - * (or any other 16-bit constants k for which both k*2^16-1 - * and k*2^15-1 are prime) */ - -#define RANDOM_CONST_A 18030 -#define RANDOM_CONST_B 29013 - -static unsigned int seed_x = 521288629; -static unsigned int seed_y = 362436069; -unsigned int ll_rand(void) -{ - - seed_x = RANDOM_CONST_A * (seed_x & 65535) + (seed_x >> 16); - seed_y = RANDOM_CONST_B * (seed_y & 65535) + (seed_y >> 16); - - return ((seed_x << 16) + (seed_y & 65535)); -} -EXPORT_SYMBOL(ll_rand); - -/* Note that if the input seeds are not completely random, then there is - * a preferred location for the entropy in the two seeds, in order to avoid - * the initial values from the PRNG to be the same each time. - * - * seed1 (seed_x) should have the most entropy in the low bits of the word - * seed2 (seed_y) should have the most entropy in the high bits of the word */ -void ll_srand(unsigned int seed1, unsigned int seed2) -{ - if (seed1) - seed_x = seed1; /* use default seeds if parameter is 0 */ - if (seed2) - seed_y = seed2; -} -EXPORT_SYMBOL(ll_srand); - -void ll_get_random_bytes(void *buf, int size) -{ - int *p = buf; - int rem, tmp; - - LASSERT(size >= 0); - - rem = min((int)((unsigned long)buf & (sizeof(int) - 1)), size); - if (rem) { - get_random_bytes(&tmp, sizeof(tmp)); - tmp ^= ll_rand(); - memcpy(buf, &tmp, rem); - p = buf + rem; - size -= rem; - } - - while (size >= sizeof(int)) { - get_random_bytes(&tmp, sizeof(tmp)); - *p = ll_rand() ^ tmp; - size -= sizeof(int); - p++; - } - buf = p; - if (size) { - get_random_bytes(&tmp, sizeof(tmp)); - tmp ^= ll_rand(); - memcpy(buf, &tmp, size); - } -} -EXPORT_SYMBOL(ll_get_random_bytes); - -void ll_generate_random_uuid(class_uuid_t uuid_out) -{ - ll_get_random_bytes(uuid_out, sizeof(class_uuid_t)); -} -EXPORT_SYMBOL(ll_generate_random_uuid); diff --git a/lustre/lvfs/quotafmt_test.c b/lustre/lvfs/quotafmt_test.c deleted file mode 100644 index 3e7f592426..0000000000 --- a/lustre/lvfs/quotafmt_test.c +++ /dev/null @@ -1,508 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * No redistribution or use is permitted outside of Cluster File Systems, Inc. - * - * Kernel module to test lustre administrative quotafile format APIs - * from the OBD setup function */ -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#include <linux/module.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/fs.h> -#include <linux/kernel.h> -#include <linux/random.h> - -#include <lustre_quota.h> -#include <obd_class.h> - -#include "lustre_quota_fmt.h" - -char *test_quotafile[2] = { "usrquota_test", "grpquota_test" }; - -static int quotfmt_initialize(struct lustre_quota_info *lqi, - struct obd_device *tgt, - struct lvfs_run_ctxt *saved) -{ - struct lustre_disk_dqheader dqhead; - static const uint quota_magics[] = LUSTRE_INITQMAGICS; - static const uint quota_versions[] = LUSTRE_INITQVERSIONS; - struct file *fp; - struct inode *parent_inode = tgt->obd_lvfs_ctxt.pwd->d_inode; - size_t size; - struct dentry *de; - int i, rc = 0; - ENTRY; - - push_ctxt(saved, &tgt->obd_lvfs_ctxt, NULL); - - for (i = 0; i < MAXQUOTAS; i++) { - loff_t offset = 0; - char *name = test_quotafile[i]; - int namelen = strlen(name); - - /* remove the stale test quotafile */ - LOCK_INODE_MUTEX(parent_inode); - de = lookup_one_len(name, tgt->obd_lvfs_ctxt.pwd, namelen); - if (!IS_ERR(de) && de->d_inode) - vfs_unlink(parent_inode, de); - if (!IS_ERR(de)) - dput(de); - UNLOCK_INODE_MUTEX(parent_inode); - - /* create quota file */ - fp = filp_open(name, O_CREAT | O_EXCL, 0644); - if (IS_ERR(fp)) { - rc = PTR_ERR(fp); - CERROR("error creating test quotafile %s (rc = %d)\n", - name, rc); - break; - } - lqi->qi_files[i] = fp; - - /* write quotafile header */ - dqhead.dqh_magic = cpu_to_le32(quota_magics[i]); - dqhead.dqh_version = cpu_to_le32(quota_versions[i]); - size = fp->f_op->write(fp, (char *)&dqhead, - sizeof(struct lustre_disk_dqheader), - &offset); - if (size != sizeof(struct lustre_disk_dqheader)) { - CERROR("error writing quotafile header %s (rc = %d)\n", - name, rc); - rc = size; - break; - } - } - - RETURN(rc); -} - -static int quotfmt_finalize(struct lustre_quota_info *lqi, - struct obd_device *tgt, struct lvfs_run_ctxt *saved) -{ - struct dentry *de; - struct inode *parent_inode = tgt->obd_lvfs_ctxt.pwd->d_inode; - int i, rc = 0; - ENTRY; - - for (i = 0; i < MAXQUOTAS; i++) { - char *name = test_quotafile[i]; - int namelen = strlen(name); - - if (lqi->qi_files[i] == NULL) - continue; - - /* close quota file */ - filp_close(lqi->qi_files[i], 0); - - /* unlink quota file */ - LOCK_INODE_MUTEX(parent_inode); - - de = lookup_one_len(name, tgt->obd_lvfs_ctxt.pwd, namelen); - if (IS_ERR(de) || de->d_inode == NULL) { - rc = IS_ERR(de) ? PTR_ERR(de) : -ENOENT; - CERROR("error lookup quotafile %s (rc = %d)\n", - name, rc); - goto dput; - } - - rc = vfs_unlink(parent_inode, de); - if (rc) - CERROR("error unlink quotafile %s (rc = %d)\n", - name, rc); - dput: - if (!IS_ERR(de)) - dput(de); - UNLOCK_INODE_MUTEX(parent_inode); - } - - pop_ctxt(saved, &tgt->obd_lvfs_ctxt, NULL); - RETURN(rc); -} - -static int quotfmt_test_1(struct lustre_quota_info *lqi) -{ - int i; - ENTRY; - - for (i = 0; i < MAXQUOTAS; i++) { - if (lustre_check_quota_file(lqi, i)) - RETURN(-EINVAL); - } - RETURN(0); -} - -static void print_quota_info(struct lustre_quota_info *lqi) -{ -#if 0 - struct lustre_mem_dqinfo *dqinfo; - int i; - - for (i = 0; i < MAXQUOTAS; i++) { - dqinfo = &lqi->qi_info[i]; - printk("%s quota info:\n", i == USRQUOTA ? "user " : "group"); - printk - ("dqi_bgrace(%u) dqi_igrace(%u) dqi_flags(%lu) dqi_blocks(%u) " - "dqi_free_blk(%u) dqi_free_entry(%u)\n", - dqinfo->dqi_bgrace, dqinfo->dqi_igrace, dqinfo->dqi_flags, - dqinfo->dqi_blocks, dqinfo->dqi_free_blk, - dqinfo->dqi_free_entry); - } -#endif -} - -static int quotfmt_test_2(struct lustre_quota_info *lqi) -{ - int i, rc = 0; - ENTRY; - - for (i = 0; i < MAXQUOTAS; i++) { - struct lustre_mem_dqinfo dqinfo; - - rc = lustre_init_quota_info(lqi, i); - if (rc) { - CERROR("init quotainfo(%d) failed! (rc:%d)\n", i, rc); - break; - } - memcpy(&dqinfo, &lqi->qi_info[i], sizeof(dqinfo)); - - rc = lustre_read_quota_info(lqi, i); - if (rc) { - CERROR("read quotainfo(%d) failed! (rc:%d)\n", i, rc); - break; - } - - if (memcmp(&dqinfo, &lqi->qi_info[i], sizeof(dqinfo))) { - rc = -EINVAL; - break; - } - } - RETURN(rc); -} - -static struct lustre_dquot *get_rand_dquot(struct lustre_quota_info *lqi) -{ - struct lustre_dquot *dquot; - unsigned int rand; - - OBD_ALLOC(dquot, sizeof(*dquot)); - if (dquot == NULL) - return NULL; - - get_random_bytes(&rand, sizeof(rand)); - if (!rand) - rand = 1000; - - dquot->dq_info = lqi; - dquot->dq_id = rand % 1000 + 1; - dquot->dq_type = rand % MAXQUOTAS; - - dquot->dq_dqb.dqb_bhardlimit = rand; - dquot->dq_dqb.dqb_bsoftlimit = rand / 2; - dquot->dq_dqb.dqb_curspace = rand / 3; - dquot->dq_dqb.dqb_ihardlimit = rand; - dquot->dq_dqb.dqb_isoftlimit = rand / 2; - dquot->dq_dqb.dqb_curinodes = rand / 3; - dquot->dq_dqb.dqb_btime = jiffies; - dquot->dq_dqb.dqb_itime = jiffies; - - return dquot; -} - -static void put_rand_dquot(struct lustre_dquot *dquot) -{ - OBD_FREE(dquot, sizeof(*dquot)); -} - -static int write_check_dquot(struct lustre_quota_info *lqi) -{ - struct lustre_dquot *dquot; - struct lustre_mem_dqblk dqblk; - int rc = 0; - ENTRY; - - dquot = get_rand_dquot(lqi); - if (dquot == NULL) - RETURN(-ENOMEM); - - /* for already exists entry, we set the dq_off by read_dquot */ - rc = lustre_read_dquot(dquot); - if (rc) { - CERROR("read dquot failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - - clear_bit(DQ_FAKE_B, &dquot->dq_flags); - /* for already exists entry, we rewrite it */ - rc = lustre_commit_dquot(dquot); - if (rc) { - CERROR("commit dquot failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - memcpy(&dqblk, &dquot->dq_dqb, sizeof(dqblk)); - memset(&dquot->dq_dqb, 0, sizeof(dqblk)); - - rc = lustre_read_dquot(dquot); - if (rc) { - CERROR("read dquot failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - - if (memcmp(&dqblk, &dquot->dq_dqb, sizeof(dqblk))) { - rc = -EINVAL; - GOTO(out, rc); - } - out: - put_rand_dquot(dquot); - RETURN(rc); -} - -static int quotfmt_test_3(struct lustre_quota_info *lqi) -{ - struct lustre_dquot *dquot; - int i = 0, rc = 0; - ENTRY; - - dquot = get_rand_dquot(lqi); - if (dquot == NULL) - RETURN(-ENOMEM); - repeat: - clear_bit(DQ_FAKE_B, &dquot->dq_flags); - /* write a new dquot */ - rc = lustre_commit_dquot(dquot); - if (rc) { - CERROR("commit dquot failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - dquot->dq_off = 0; - memset(&dquot->dq_dqb, 0, sizeof(dquot->dq_dqb)); - - /* check if this dquot is on disk now */ - rc = lustre_read_dquot(dquot); - if (rc) { - CERROR("read dquot failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - if (!dquot->dq_off || test_bit(DQ_FAKE_B, &dquot->dq_flags)) { - CERROR("the dquot isn't committed\n"); - GOTO(out, rc = -EINVAL); - } - - /* remove this dquot */ - set_bit(DQ_FAKE_B, &dquot->dq_flags); - dquot->dq_dqb.dqb_curspace = 0; - dquot->dq_dqb.dqb_curinodes = 0; - rc = lustre_commit_dquot(dquot); - if (rc) { - CERROR("remove dquot failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - - /* check if the dquot is really removed */ - clear_bit(DQ_FAKE_B, &dquot->dq_flags); - dquot->dq_off = 0; - rc = lustre_read_dquot(dquot); - if (rc) { - CERROR("read dquot failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - if (!test_bit(DQ_FAKE_B, &dquot->dq_flags) || dquot->dq_off) { - CERROR("the dquot isn't removed!\n"); - GOTO(out, rc = -EINVAL); - } - - /* check if this dquot can be write again */ - if (++i < 2) - goto repeat; - - print_quota_info(lqi); - - out: - put_rand_dquot(dquot); - RETURN(rc); -} - -static int quotfmt_test_4(struct lustre_quota_info *lqi) -{ - int i, rc = 0; - ENTRY; - - for (i = 0; i < 30000; i++) { - rc = write_check_dquot(lqi); - if (rc) { - CERROR("write/check dquot failed at %d! (rc:%d)\n", - i, rc); - break; - } - } - print_quota_info(lqi); - RETURN(rc); -} - -static int quotfmt_test_5(struct lustre_quota_info *lqi) -{ -#ifndef KERNEL_SUPPORTS_QUOTA_READ - int i, rc = 0; - - for (i = USRQUOTA; i < MAXQUOTAS && !rc; i++) { - struct list_head list; - struct dquot_id *dqid, *tmp; - - INIT_LIST_HEAD(&list); - rc = lustre_get_qids(lqi->qi_files[i], NULL, i, &list); - if (rc) { - CERROR("%s get all %ss (rc:%d):\n", - rc ? "error" : "success", - i == USRQUOTA ? "uid" : "gid", rc); - } - list_for_each_entry_safe(dqid, tmp, &list, di_link) { - list_del_init(&dqid->di_link); - if (rc == 0) - printk("%d ", dqid->di_id); - kfree(dqid); - } - printk("\n"); - } - return rc; -#else - CWARN("kernel supports quota_read OR kernel version >= 2.6.12, test skipped\n"); - return 0; -#endif -} - -static int quotfmt_run_tests(struct obd_device *obd, struct obd_device *tgt) -{ - struct lvfs_run_ctxt saved; - struct lustre_quota_info *lqi = NULL; - int rc = 0; - ENTRY; - - OBD_ALLOC(lqi, sizeof(*lqi)); - if (lqi == NULL) { - CERROR("not enough memory\n"); - RETURN(-ENOMEM); - } - - CWARN("=== Initialize quotafile test\n"); - rc = quotfmt_initialize(lqi, tgt, &saved); - if (rc) - GOTO(out, rc); - - CWARN("=== test 1: check quota header\n"); - rc = quotfmt_test_1(lqi); - if (rc) { - CERROR("check quota header failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - - CWARN("=== test 2: write/read quota info\n"); - rc = quotfmt_test_2(lqi); - if (rc) { - CERROR("write/read quota info failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - - CWARN("=== test 3: write/remove dquot\n"); - rc = quotfmt_test_3(lqi); - if (rc) { - CERROR("write/remove dquot failed! (rc:%d)\n", rc); - GOTO(out, rc); - } - - CWARN("=== test 4: write/read 30000 dquot\n"); - rc = quotfmt_test_4(lqi); - if (rc) { - CERROR("write/read 30000 dquot failed\n"); - GOTO(out, rc); - } - - CWARN("=== test 5: walk through quota file to get all ids\n"); - rc = quotfmt_test_5(lqi); - if (rc) { - CERROR("walk through quota file failed\n"); - GOTO(out, rc); - } - - out: - CWARN("=== Finalize quotafile test\n"); - rc = quotfmt_finalize(lqi, tgt, &saved); - OBD_FREE(lqi, sizeof(*lqi)); - RETURN(rc); -} - -static int quotfmt_test_cleanup(struct obd_device *obd) -{ - ENTRY; - lprocfs_obd_cleanup(obd); - RETURN(0); -} - -static int quotfmt_test_setup(struct obd_device *obd, obd_count len, void *buf) -{ - struct lprocfs_static_vars lvars; - struct lustre_cfg *lcfg = buf; - struct obd_device *tgt; - int rc; - ENTRY; - - if (lcfg->lcfg_bufcount < 1) { - CERROR("requires a mds OBD name\n"); - RETURN(-EINVAL); - } - - tgt = class_name2obd(lustre_cfg_string(lcfg, 1)); - if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) { - CERROR("target device not attached or not set up (%s)\n", - lustre_cfg_string(lcfg, 1)); - RETURN(-EINVAL); - } - - rc = quotfmt_run_tests(obd, tgt); - if (rc) - quotfmt_test_cleanup(obd); - - lprocfs_quotfmt_test_init_vars(&lvars); - lprocfs_obd_setup(obd, lvars.obd_vars); - - RETURN(rc); -} - -static struct obd_ops quotfmt_obd_ops = { - .o_owner = THIS_MODULE, - .o_setup = quotfmt_test_setup, - .o_cleanup = quotfmt_test_cleanup, -}; - -#ifdef LPROCFS -static struct lprocfs_vars lprocfs_quotfmt_test_obd_vars[] = { {0} }; -static struct lprocfs_vars lprocfs_quotfmt_test_module_vars[] = { {0} }; - -void lprocfs_quotfmt_test_init_vars(struct lprocfs_static_vars *lvars) -{ - lvars->module_vars = lprocfs_quotfmt_test_module_vars; - lvars->obd_vars = lprocfs_quotfmt_test_obd_vars; -} -#endif -static int __init quotfmt_test_init(void) -{ - struct lprocfs_static_vars lvars; - - lprocfs_quotfmt_test_init_vars(&lvars); - return class_register_type("fmt_obd_ops, lvars.module_vars, - "quotfmt_test"); -} - -static void __exit quotfmt_test_exit(void) -{ - class_unregister_type("quotfmt_test"); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("administrative quotafile test module"); -MODULE_LICENSE("GPL"); - -module_init(quotfmt_test_init); -module_exit(quotfmt_test_exit); diff --git a/lustre/lvfs/upcall_cache.c b/lustre/lvfs/upcall_cache.c deleted file mode 100644 index 61e1e85e1f..0000000000 --- a/lustre/lvfs/upcall_cache.c +++ /dev/null @@ -1,518 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Supplementary groups cache. - * - * Copyright (c) 2004 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define DEBUG_SUBSYSTEM S_SEC - -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/kmod.h> -#include <linux/string.h> -#include <linux/stat.h> -#include <linux/errno.h> -#include <linux/version.h> -#include <linux/unistd.h> - -#include <asm/system.h> -#include <asm/uaccess.h> - -#include <linux/fs.h> -#include <linux/stat.h> -#include <asm/uaccess.h> -#include <linux/slab.h> - -#include <obd_support.h> -#include <lustre_lib.h> - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4) -struct group_info *groups_alloc(int ngroups) -{ - struct group_info *ginfo; - - LASSERT(ngroups <= NGROUPS_SMALL); - - OBD_ALLOC(ginfo, sizeof(*ginfo) + 1 * sizeof(gid_t *)); - if (!ginfo) - return NULL; - ginfo->ngroups = ngroups; - ginfo->nblocks = 1; - ginfo->blocks[0] = ginfo->small_block; - atomic_set(&ginfo->usage, 1); - - return ginfo; -} - -void groups_free(struct group_info *ginfo) -{ - LASSERT(ginfo->ngroups <= NGROUPS_SMALL); - LASSERT(ginfo->nblocks == 1); - LASSERT(ginfo->blocks[0] == ginfo->small_block); - - OBD_FREE(ginfo, sizeof(*ginfo) + 1 * sizeof(gid_t *)); -} -#endif - -static struct upcall_cache_entry *alloc_entry(__u64 key) -{ - struct upcall_cache_entry *entry; - - OBD_ALLOC(entry, sizeof(*entry)); - if (!entry) - return NULL; - - UC_CACHE_SET_NEW(entry); - INIT_LIST_HEAD(&entry->ue_hash); - entry->ue_key = key; - atomic_set(&entry->ue_refcount, 0); - init_waitqueue_head(&entry->ue_waitq); - return entry; -} - -/* protected by hash lock */ -static void free_entry(struct upcall_cache_entry *entry) -{ - if (entry->ue_group_info) - groups_free(entry->ue_group_info); - list_del(&entry->ue_hash); - CDEBUG(D_OTHER, "destroy cache entry %p for key "LPU64"\n", - entry, entry->ue_key); - OBD_FREE(entry, sizeof(*entry)); -} - -static void get_entry(struct upcall_cache_entry *entry) -{ - atomic_inc(&entry->ue_refcount); -} - -static void put_entry(struct upcall_cache_entry *entry) -{ - if (atomic_dec_and_test(&entry->ue_refcount) && - (UC_CACHE_IS_INVALID(entry) || UC_CACHE_IS_EXPIRED(entry))) { - free_entry(entry); - } -} - -static int check_unlink_entry(struct upcall_cache_entry *entry) -{ - if (UC_CACHE_IS_VALID(entry) && - time_before(jiffies, entry->ue_expire)) - return 0; - - if (UC_CACHE_IS_ACQUIRING(entry)) { - if (time_before(jiffies, entry->ue_acquire_expire)) - return 0; - - UC_CACHE_SET_EXPIRED(entry); - wake_up_all(&entry->ue_waitq); - } else if (!UC_CACHE_IS_INVALID(entry)) { - UC_CACHE_SET_EXPIRED(entry); - } - - list_del_init(&entry->ue_hash); - if (!atomic_read(&entry->ue_refcount)) - free_entry(entry); - return 1; -} - -static int refresh_entry(struct upcall_cache *hash, - struct upcall_cache_entry *entry) -{ - char *argv[4]; - char *envp[3]; - char keystr[16]; - int rc; - ENTRY; - - snprintf(keystr, 16, LPU64, entry->ue_key); - - CDEBUG(D_INFO, "The groups upcall is: %s \n", hash->uc_upcall); - argv[0] = hash->uc_upcall; - argv[1] = hash->uc_name; - argv[2] = keystr; - argv[3] = NULL; - - envp[0] = "HOME=/"; - envp[1] = "PATH=/sbin:/usr/sbin"; - envp[2] = NULL; - - rc = USERMODEHELPER(argv[0], argv, envp); - if (rc < 0) { - CERROR("%s: error invoking getgroups upcall %s %s %s: rc %d; " - "check /proc/fs/lustre/mds/%s/group_upcall\n", - hash->uc_name, argv[0], argv[1], argv[2], rc, argv[1]); - } else { - CDEBUG(D_HA, "%s: invoked upcall %s %s %s\n", hash->uc_name, - argv[0], argv[1], argv[2]); - rc = 0; - } - RETURN(rc); -} - -static int entry_set_group_info(struct upcall_cache_entry *entry, __u32 primary, - __u32 ngroups, __u32 *groups) -{ - struct group_info *ginfo; - int i, j; - ENTRY; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4) - if (ngroups > NGROUPS) - ngroups = NGROUPS; -#endif - - if (ngroups > NGROUPS_MAX) { - CERROR("using first %d supplementary groups for uid "LPU64"\n", - NGROUPS_MAX, entry->ue_key); - ngroups = NGROUPS_MAX; - } - - ginfo = groups_alloc(ngroups); - if (!ginfo) { - CERROR("uid "LPU64" update can't alloc ginfo for %d groups\n", - entry->ue_key, ngroups); - RETURN(-ENOMEM); - } - entry->ue_group_info = ginfo; - entry->ue_primary = primary; - - for (i = 0; i < ginfo->nblocks; i++) { - int cp_count = min(NGROUPS_PER_BLOCK, (int)ngroups); - int off = i * NGROUPS_PER_BLOCK; - - for (j = 0; j < cp_count; j++) - ginfo->blocks[i][j] = groups[off + j]; - - ngroups -= cp_count; - } - RETURN(0); -} - -struct upcall_cache_entry *upcall_cache_get_entry(struct upcall_cache *hash, - __u64 key, __u32 primary, - __u32 ngroups, __u32 *groups) -{ - struct upcall_cache_entry *entry = NULL, *new = NULL, *next; - struct list_head *head; - wait_queue_t wait; - int rc, found; - ENTRY; - - LASSERT(hash); - - if (strcmp(hash->uc_upcall, "NONE") == 0) { - new = alloc_entry(key); - if (!new) { - CERROR("fail to alloc entry\n"); - RETURN(NULL); - } - get_entry(new); - - /* We have to sort the groups for 2.6 kernels */ - LASSERT(ngroups <= 2); - if (ngroups == 2 && groups[1] == -1) - ngroups--; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) - /* 2.6 needs groups array sorted */ - if (ngroups == 2 && groups[0] > groups[1]) { - __u32 tmp = groups[1]; - groups[1] = groups[0]; - groups[0] = tmp; - } -#endif - if (ngroups > 0 && groups[0] == -1) { - groups[0] = groups[1]; - ngroups--; - } - - rc = entry_set_group_info(new, primary, ngroups, groups); - - /* We can't cache this entry as it only has a subset of - * the user's groups, as sent in suppgid1, suppgid2. */ - UC_CACHE_SET_EXPIRED(new); - RETURN(new); - } - head = &hash->uc_hashtable[UC_CACHE_HASH_INDEX(key)]; -find_again: - found = 0; - spin_lock(&hash->uc_lock); - list_for_each_entry_safe(entry, next, head, ue_hash) { - /* check invalid & expired items */ - if (check_unlink_entry(entry)) - continue; - if (entry->ue_key == key) { - found = 1; - break; - } - } - - if (!found) { /* didn't find it */ - if (!new) { - spin_unlock(&hash->uc_lock); - new = alloc_entry(key); - if (!new) { - CERROR("fail to alloc entry\n"); - RETURN(ERR_PTR(-ENOMEM)); - } - goto find_again; - } else { - list_add(&new->ue_hash, head); - entry = new; - } - } else { - if (new) { - free_entry(new); - new = NULL; - } - list_move(&entry->ue_hash, head); - } - get_entry(entry); - - /* acquire for new one */ - if (UC_CACHE_IS_NEW(entry)) { - UC_CACHE_SET_ACQUIRING(entry); - UC_CACHE_CLEAR_NEW(entry); - entry->ue_acquire_expire = jiffies + hash->uc_acquire_expire; - spin_unlock(&hash->uc_lock); - rc = refresh_entry(hash, entry); - spin_lock(&hash->uc_lock); - if (rc < 0) { - UC_CACHE_CLEAR_ACQUIRING(entry); - UC_CACHE_SET_INVALID(entry); - } - /* fall through */ - } - /* someone (and only one) is doing upcall upon - * this item, just wait it complete - */ - if (UC_CACHE_IS_ACQUIRING(entry)) { - init_waitqueue_entry(&wait, current); - add_wait_queue(&entry->ue_waitq, &wait); - set_current_state(TASK_INTERRUPTIBLE); - spin_unlock(&hash->uc_lock); - - schedule_timeout(hash->uc_acquire_expire); - - spin_lock(&hash->uc_lock); - remove_wait_queue(&entry->ue_waitq, &wait); - if (UC_CACHE_IS_ACQUIRING(entry)) { - static unsigned long next; - /* we're interrupted or upcall failed in the middle */ - if (time_after(jiffies, next)) { - CERROR("acquire timeout exceeded for key "LPU64 - "\n", entry->ue_key); - next = jiffies + 1800; - } - put_entry(entry); - GOTO(out, entry = ERR_PTR(-EIDRM)); - } - /* fall through */ - } - - /* invalid means error, don't need to try again */ - if (UC_CACHE_IS_INVALID(entry)) { - put_entry(entry); - GOTO(out, entry = ERR_PTR(-EIDRM)); - } - - /* check expired - * We can't refresh the existing one because some - * memory might be shared by multiple processes. - */ - if (check_unlink_entry(entry)) { - /* if expired, try again. but if this entry is - * created by me but too quickly turn to expired - * without any error, should at least give a - * chance to use it once. - */ - if (entry != new) { - put_entry(entry); - spin_unlock(&hash->uc_lock); - new = NULL; - goto find_again; - } - } - - /* Now we know it's good */ -out: - spin_unlock(&hash->uc_lock); - RETURN(entry); -} -EXPORT_SYMBOL(upcall_cache_get_entry); - -void upcall_cache_put_entry(struct upcall_cache *hash, - struct upcall_cache_entry *entry) -{ - ENTRY; - - if (!entry) { - EXIT; - return; - } - - LASSERT(atomic_read(&entry->ue_refcount) > 0); - spin_lock(&hash->uc_lock); - put_entry(entry); - spin_unlock(&hash->uc_lock); - EXIT; -} -EXPORT_SYMBOL(upcall_cache_put_entry); - -int upcall_cache_downcall(struct upcall_cache *hash, __u32 err, __u64 key, - __u32 primary, __u32 ngroups, __u32 *groups) -{ - struct upcall_cache_entry *entry = NULL; - struct list_head *head; - int found = 0, rc = 0; - ENTRY; - - LASSERT(hash); - - head = &hash->uc_hashtable[UC_CACHE_HASH_INDEX(key)]; - - spin_lock(&hash->uc_lock); - list_for_each_entry(entry, head, ue_hash) { - if (entry->ue_key == key) { - found = 1; - get_entry(entry); - break; - } - } - - if (!found) { - CDEBUG(D_OTHER, "%s: upcall for key "LPU64" not expected\n", - hash->uc_name, entry->ue_key); - /* haven't found, it's possible */ - spin_unlock(&hash->uc_lock); - RETURN(-EINVAL); - } - - if (err) { - CDEBUG(D_OTHER, "%s: upcall for key "LPU64" returned %d\n", - hash->uc_name, entry->ue_key, err); - GOTO(out, rc = -EINVAL); - } - - if (!UC_CACHE_IS_ACQUIRING(entry)) { - CDEBUG(D_RPCTRACE,"%s: found uptodate entry %p (key "LPU64")\n", - hash->uc_name, entry, entry->ue_key); - GOTO(out, rc = 0); - } - - if (UC_CACHE_IS_INVALID(entry) || UC_CACHE_IS_EXPIRED(entry)) { - CERROR("%s: found a stale entry %p (key "LPU64") in ioctl\n", - hash->uc_name, entry, entry->ue_key); - GOTO(out, rc = -EINVAL); - } - - spin_unlock(&hash->uc_lock); - rc = entry_set_group_info(entry, primary, ngroups, groups); - spin_lock(&hash->uc_lock); - if (rc) - GOTO(out, rc); - - entry->ue_expire = jiffies + hash->uc_entry_expire; - UC_CACHE_SET_VALID(entry); - CDEBUG(D_OTHER, "%s: created upcall cache entry %p for key "LPU64"\n", - hash->uc_name, entry, entry->ue_key); -out: - if (rc) { - UC_CACHE_SET_INVALID(entry); - list_del_init(&entry->ue_hash); - } - UC_CACHE_CLEAR_ACQUIRING(entry); - spin_unlock(&hash->uc_lock); - wake_up_all(&entry->ue_waitq); - put_entry(entry); - - RETURN(rc); -} -EXPORT_SYMBOL(upcall_cache_downcall); - -static void cache_flush(struct upcall_cache *hash, int force) -{ - struct upcall_cache_entry *entry, *next; - int i; - ENTRY; - - spin_lock(&hash->uc_lock); - for (i = 0; i < UC_CACHE_HASH_SIZE; i++) { - list_for_each_entry_safe(entry, next, - &hash->uc_hashtable[i], ue_hash) { - if (!force && atomic_read(&entry->ue_refcount)) { - UC_CACHE_SET_EXPIRED(entry); - continue; - } - LASSERT(!atomic_read(&entry->ue_refcount)); - free_entry(entry); - } - } - spin_unlock(&hash->uc_lock); - EXIT; -} - -void upcall_cache_flush_idle(struct upcall_cache *cache) -{ - cache_flush(cache, 0); -} -EXPORT_SYMBOL(upcall_cache_flush_idle); - -void upcall_cache_flush_all(struct upcall_cache *cache) -{ - cache_flush(cache, 1); -} -EXPORT_SYMBOL(upcall_cache_flush_all); - -struct upcall_cache *upcall_cache_init(const char *name) -{ - struct upcall_cache *hash; - int i; - ENTRY; - - OBD_ALLOC(hash, sizeof(*hash)); - if (!hash) - RETURN(ERR_PTR(-ENOMEM)); - - spin_lock_init(&hash->uc_lock); - for (i = 0; i < UC_CACHE_HASH_SIZE; i++) - INIT_LIST_HEAD(&hash->uc_hashtable[i]); - strncpy(hash->uc_name, name, sizeof(hash->uc_name) - 1); - /* set default value, proc tunable */ - strcpy(hash->uc_upcall, "NONE"); - hash->uc_entry_expire = 10 * 60 * HZ; - hash->uc_acquire_expire = 15 * HZ; - - RETURN(hash); -} -EXPORT_SYMBOL(upcall_cache_init); - -void upcall_cache_cleanup(struct upcall_cache *hash) -{ - if (!hash) - return; - upcall_cache_flush_all(hash); - OBD_FREE(hash, sizeof(*hash)); -} -EXPORT_SYMBOL(upcall_cache_cleanup); diff --git a/lustre/mdc/.cvsignore b/lustre/mdc/.cvsignore deleted file mode 100644 index 5d26f004c3..0000000000 --- a/lustre/mdc/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -.deps -TAGS -.*.cmd -autoMakefile.in -autoMakefile -*.ko -*.mod.c -.*.flags -.tmp_versions -.depend diff --git a/lustre/mdc/Makefile.in b/lustre/mdc/Makefile.in deleted file mode 100644 index b9b97935fa..0000000000 --- a/lustre/mdc/Makefile.in +++ /dev/null @@ -1,4 +0,0 @@ -MODULES := mdc -mdc-objs := mdc_request.o mdc_reint.o lproc_mdc.o mdc_lib.o mdc_locks.o - -@INCLUDE_RULES@ diff --git a/lustre/mdc/autoMakefile.am b/lustre/mdc/autoMakefile.am deleted file mode 100644 index e39cc9f463..0000000000 --- a/lustre/mdc/autoMakefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -if LIBLUSTRE -noinst_LIBRARIES = libmdc.a -libmdc_a_SOURCES = mdc_request.c mdc_reint.c mdc_lib.c mdc_internal.h mdc_locks.c -libmdc_a_CPPFLAGS = $(LLCPPFLAGS) -libmdc_a_CFLAGS = $(LLCFLAGS) -endif - -if MODULES -modulefs_DATA = mdc$(KMODEXT) -endif - -DIST_SOURCES = $(mdc-objs:.o=.c) mdc_internal.h -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ diff --git a/lustre/mdc/lproc_mdc.c b/lustre/mdc/lproc_mdc.c deleted file mode 100644 index dafe84edbd..0000000000 --- a/lustre/mdc/lproc_mdc.c +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - */ -#define DEBUG_SUBSYSTEM S_CLASS - -#include <linux/version.h> -#include <linux/vfs.h> -#include <obd_class.h> -#include <lprocfs_status.h> - -#ifdef LPROCFS - -static int mdc_rd_max_rpcs_in_flight(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *dev = data; - struct client_obd *cli = &dev->u.cli; - int rc; - - spin_lock(&cli->cl_loi_list_lock); - rc = snprintf(page, count, "%u\n", cli->cl_max_rpcs_in_flight); - spin_unlock(&cli->cl_loi_list_lock); - return rc; -} - -static int mdc_wr_max_rpcs_in_flight(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *dev = data; - struct client_obd *cli = &dev->u.cli; - int val, rc; - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val < 1 || val > MDC_MAX_RIF_MAX) - return -ERANGE; - - spin_lock(&cli->cl_loi_list_lock); - cli->cl_max_rpcs_in_flight = val; - spin_unlock(&cli->cl_loi_list_lock); - - return count; -} -static struct lprocfs_vars lprocfs_mdc_obd_vars[] = { - { "uuid", lprocfs_rd_uuid, 0, 0 }, - { "ping", 0, lprocfs_wr_ping, 0 }, - { "connect_flags", lprocfs_rd_connect_flags, 0, 0 }, - { "blocksize", lprocfs_rd_blksize, 0, 0 }, - { "kbytestotal", lprocfs_rd_kbytestotal, 0, 0 }, - { "kbytesfree", lprocfs_rd_kbytesfree, 0, 0 }, - { "kbytesavail", lprocfs_rd_kbytesavail, 0, 0 }, - { "filestotal", lprocfs_rd_filestotal, 0, 0 }, - { "filesfree", lprocfs_rd_filesfree, 0, 0 }, - /*{ "filegroups", lprocfs_rd_filegroups, 0, 0 },*/ - { "mds_server_uuid", lprocfs_rd_server_uuid, 0, 0 }, - { "mds_conn_uuid", lprocfs_rd_conn_uuid, 0, 0 }, - { "max_rpcs_in_flight", mdc_rd_max_rpcs_in_flight, - mdc_wr_max_rpcs_in_flight, 0 }, - { "timeouts", lprocfs_rd_timeouts, 0, 0 }, - { 0 } -}; - -static struct lprocfs_vars lprocfs_mdc_module_vars[] = { - { "num_refs", lprocfs_rd_numrefs, 0, 0 }, - { 0 } -}; - -void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars) -{ - lvars->module_vars = lprocfs_mdc_module_vars; - lvars->obd_vars = lprocfs_mdc_obd_vars; -} -#endif /* LPROCFS */ - diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h deleted file mode 100644 index 843bcbe6a1..0000000000 --- a/lustre/mdc/mdc_internal.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * This file is part of Lustre, http://www.lustre.org - * - * MDC internal definitions. - */ - -#include <lustre_mds.h> -#ifdef LPROCFS -void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars); -#else -static inline void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars) -{ - memset(lvars, 0, sizeof(*lvars)); -} -#endif -void mdc_pack_req_body(struct ptlrpc_request *req, int offset, - __u64 valid, struct ll_fid *fid, int ea_size, int flags); -void mdc_pack_rep_body(struct ptlrpc_request *); -void mdc_readdir_pack(struct ptlrpc_request *req, int offset, __u64 pg_off, - __u32 size, struct ll_fid *mdc_fid); -void mdc_getattr_pack(struct ptlrpc_request *req, int offset, __u64 valid, - int flags, struct mdc_op_data *data); -void mdc_setattr_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data, - struct iattr *iattr, void *ea, int ealen, - void *ea2, int ea2len); -void mdc_create_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, const void *data, int datalen, - __u32 mode, __u32 uid, __u32 gid, __u32 cap_effective, - __u64 rdev); -void mdc_open_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, __u32 mode, __u64 rdev, - __u32 flags, const void *data, int datalen); -void mdc_join_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, __u64 head_size); -void mdc_unlink_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data); -void mdc_link_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data); -void mdc_rename_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data, - const char *old, int oldlen, const char *new, int newlen); -void mdc_close_pack(struct ptlrpc_request *req, int offset, struct obdo *oa, - __u64 valid, struct obd_client_handle *och); -void mdc_exit_request(struct client_obd *cli); -void mdc_enter_request(struct client_obd *cli); - -struct mdc_open_data { - struct obd_client_handle *mod_och; - struct ptlrpc_request *mod_open_req; - struct ptlrpc_request *mod_close_req; -}; - -struct mdc_rpc_lock { - struct semaphore rpcl_sem; - struct lookup_intent *rpcl_it; -}; - -static inline void mdc_init_rpc_lock(struct mdc_rpc_lock *lck) -{ - sema_init(&lck->rpcl_sem, 1); - lck->rpcl_it = NULL; -} - -static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck, - struct lookup_intent *it) -{ - ENTRY; - if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) { - down(&lck->rpcl_sem); - LASSERT(lck->rpcl_it == NULL); - lck->rpcl_it = it; - } -} - -static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck, - struct lookup_intent *it) -{ - if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) { - LASSERT(it == lck->rpcl_it); - lck->rpcl_it = NULL; - up(&lck->rpcl_sem); - } - EXIT; -} diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c deleted file mode 100644 index bb02005ca6..0000000000 --- a/lustre/mdc/mdc_lib.c +++ /dev/null @@ -1,461 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_MDC -#ifndef __KERNEL__ -# include <fcntl.h> -# include <liblustre.h> -#endif -#include <lustre/lustre_idl.h> -#include <lustre_net.h> -#include "mdc_internal.h" - -#ifndef __KERNEL__ -/* some liblustre hackings here */ -#ifndef O_DIRECTORY -#define O_DIRECTORY 0 -#endif -#endif - -void mdc_readdir_pack(struct ptlrpc_request *req, int offset, __u64 pg_off, - __u32 size, struct ll_fid *fid) -{ - struct mds_body *b; - - b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*b)); - b->fsuid = current->fsuid; - b->fsgid = current->fsgid; - b->capability = current->cap_effective; - b->fid1 = *fid; - b->size = pg_off; /* !! */ - b->suppgid = -1; - b->nlink = size; /* !! */ -} - -static void mdc_pack_body(struct mds_body *b) -{ - LASSERT (b != NULL); - - b->fsuid = current->fsuid; - b->fsgid = current->fsgid; - b->capability = current->cap_effective; -} - -void mdc_pack_req_body(struct ptlrpc_request *req, int offset, - __u64 valid, struct ll_fid *fid, int ea_size, int flags) -{ - struct mds_body *b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*b)); - - if (fid) - b->fid1 = *fid; - b->valid = valid; - b->eadatasize = ea_size; - b->flags = flags; - mdc_pack_body(b); -} - -/* packing of MDS records */ -void mdc_create_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, const void *data, int datalen, - __u32 mode, __u32 uid, __u32 gid, __u32 cap_effective, - __u64 rdev) -{ - struct mds_rec_create *rec; - char *tmp; - rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec)); - - rec->cr_opcode = REINT_CREATE; - rec->cr_fsuid = uid; - rec->cr_fsgid = gid; - rec->cr_cap = cap_effective; - rec->cr_fid = op_data->fid1; - memset(&rec->cr_replayfid, 0, sizeof(rec->cr_replayfid)); - rec->cr_mode = mode; - rec->cr_rdev = rdev; - rec->cr_time = op_data->mod_time; - rec->cr_suppgid = op_data->suppgids[0]; - - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, op_data->namelen + 1); - LOGL0(op_data->name, op_data->namelen, tmp); - - if (data) { - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, datalen); - memcpy (tmp, data, datalen); - } -} - -static __u32 mds_pack_open_flags(__u32 flags) -{ - __u32 cr_flags = (flags & (FMODE_READ | FMODE_WRITE | - MDS_OPEN_DELAY_CREATE | MDS_OPEN_HAS_EA | - MDS_OPEN_HAS_OBJS | MDS_OPEN_OWNEROVERRIDE | - MDS_OPEN_LOCK)); - if (flags & O_CREAT) - cr_flags |= MDS_OPEN_CREAT; - if (flags & O_EXCL) - cr_flags |= MDS_OPEN_EXCL; - if (flags & O_TRUNC) - cr_flags |= MDS_OPEN_TRUNC; - if (flags & O_APPEND) - cr_flags |= MDS_OPEN_APPEND; - if (flags & O_SYNC) - cr_flags |= MDS_OPEN_SYNC; - if (flags & O_DIRECTORY) - cr_flags |= MDS_OPEN_DIRECTORY; - if (flags & O_JOIN_FILE) - cr_flags |= MDS_OPEN_JOIN_FILE; -#ifdef FMODE_EXEC - if (flags & FMODE_EXEC) - cr_flags |= MDS_FMODE_EXEC; -#endif - return cr_flags; -} - -/* packing of MDS records */ -void mdc_join_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, __u64 head_size) -{ - struct mds_rec_join *rec; - - rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*rec)); - LASSERT(rec != NULL); - rec->jr_fid = op_data->fid2; - rec->jr_headsize = head_size; -} - -void mdc_open_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, __u32 mode, __u64 rdev, - __u32 flags, const void *lmm, int lmmlen) -{ - struct mds_rec_create *rec; - char *tmp; - rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec)); - - /* XXX do something about time, uid, gid */ - rec->cr_opcode = REINT_OPEN; - rec->cr_fsuid = current->fsuid; - rec->cr_fsgid = current->fsgid; - rec->cr_cap = current->cap_effective; - rec->cr_fid = op_data->fid1; - memset(&rec->cr_replayfid, 0, sizeof(rec->cr_replayfid)); - rec->cr_mode = mode; - rec->cr_flags = mds_pack_open_flags(flags); - rec->cr_rdev = rdev; - rec->cr_time = op_data->mod_time; - rec->cr_suppgid = op_data->suppgids[0]; - - if (op_data->name) { - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, - op_data->namelen + 1); - LOGL0(op_data->name, op_data->namelen, tmp); - } - - if (lmm) { - rec->cr_flags |= MDS_OPEN_HAS_EA; -#ifndef __KERNEL__ - /*XXX a hack for liblustre to set EA (LL_IOC_LOV_SETSTRIPE) */ - rec->cr_replayfid = op_data->fid2; -#endif - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, lmmlen); - memcpy (tmp, lmm, lmmlen); - } -} - -static inline __u64 attr_pack(unsigned int ia_valid) { - __u64 sa_valid = 0; - - if (ia_valid & ATTR_MODE) - sa_valid |= MDS_ATTR_MODE; - if (ia_valid & ATTR_UID) - sa_valid |= MDS_ATTR_UID; - if (ia_valid & ATTR_GID) - sa_valid |= MDS_ATTR_GID; - if (ia_valid & ATTR_SIZE) - sa_valid |= MDS_ATTR_SIZE; - if (ia_valid & ATTR_ATIME) - sa_valid |= MDS_ATTR_ATIME; - if (ia_valid & ATTR_MTIME) - sa_valid |= MDS_ATTR_MTIME; - if (ia_valid & ATTR_CTIME) - sa_valid |= MDS_ATTR_CTIME; - if (ia_valid & ATTR_ATIME_SET) - sa_valid |= MDS_ATTR_ATIME_SET; - if (ia_valid & ATTR_MTIME_SET) - sa_valid |= MDS_ATTR_MTIME_SET; - if (ia_valid & ATTR_FORCE) - sa_valid |= MDS_ATTR_FORCE; - if (ia_valid & ATTR_ATTR_FLAG) - sa_valid |= MDS_ATTR_ATTR_FLAG; - if (ia_valid & ATTR_KILL_SUID) - sa_valid |= MDS_ATTR_KILL_SUID; - if (ia_valid & ATTR_KILL_SGID) - sa_valid |= MDS_ATTR_KILL_SGID; - if (ia_valid & ATTR_CTIME_SET) - sa_valid |= MDS_ATTR_CTIME_SET; - if (ia_valid & ATTR_FROM_OPEN) - sa_valid |= MDS_ATTR_FROM_OPEN; - if (ia_valid & MDS_OPEN_OWNEROVERRIDE) - /* NFSD hack (see bug 5781) */ - sa_valid |= MDS_OPEN_OWNEROVERRIDE; - return sa_valid; -} - -void mdc_setattr_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data, struct iattr *iattr, void *ea, - int ealen, void *ea2, int ea2len) -{ - struct mds_rec_setattr *rec = lustre_msg_buf(req->rq_reqmsg, offset, - sizeof(*rec)); - rec->sa_opcode = REINT_SETATTR; - rec->sa_fsuid = current->fsuid; - rec->sa_fsgid = current->fsgid; - rec->sa_cap = current->cap_effective; - rec->sa_fid = data->fid1; - rec->sa_suppgid = -1; - - if (iattr) { - rec->sa_valid = attr_pack(iattr->ia_valid); - rec->sa_mode = iattr->ia_mode; - rec->sa_uid = iattr->ia_uid; - rec->sa_gid = iattr->ia_gid; - rec->sa_size = iattr->ia_size; - rec->sa_atime = LTIME_S(iattr->ia_atime); - rec->sa_mtime = LTIME_S(iattr->ia_mtime); - rec->sa_ctime = LTIME_S(iattr->ia_ctime); - rec->sa_attr_flags = - ((struct ll_iattr_struct *)iattr)->ia_attr_flags; - if ((iattr->ia_valid & ATTR_GID) && in_group_p(iattr->ia_gid)) - rec->sa_suppgid = iattr->ia_gid; - else - rec->sa_suppgid = data->suppgids[0]; - } - - if (ealen == 0) - return; - - memcpy(lustre_msg_buf(req->rq_reqmsg, offset + 1, ealen), ea, ealen); - - if (ea2len == 0) - return; - - memcpy(lustre_msg_buf(req->rq_reqmsg, offset + 2, ea2len), ea2, ea2len); -} - -void mdc_unlink_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data) -{ - struct mds_rec_unlink *rec; - char *tmp; - - rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec)); - LASSERT (rec != NULL); - - rec->ul_opcode = REINT_UNLINK; - rec->ul_fsuid = current->fsuid; - rec->ul_fsgid = current->fsgid; - rec->ul_cap = current->cap_effective; - rec->ul_mode = data->create_mode; - rec->ul_suppgid = data->suppgids[0]; - rec->ul_fid1 = data->fid1; - rec->ul_fid2 = data->fid2; - rec->ul_time = data->mod_time; - - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, data->namelen + 1); - LASSERT (tmp != NULL); - LOGL0(data->name, data->namelen, tmp); -} - -void mdc_link_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data) -{ - struct mds_rec_link *rec; - char *tmp; - - rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec)); - - rec->lk_opcode = REINT_LINK; - rec->lk_fsuid = current->fsuid; - rec->lk_fsgid = current->fsgid; - rec->lk_cap = current->cap_effective; - rec->lk_suppgid1 = data->suppgids[0]; - rec->lk_suppgid2 = data->suppgids[1]; - rec->lk_fid1 = data->fid1; - rec->lk_fid2 = data->fid2; - rec->lk_time = data->mod_time; - - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, data->namelen + 1); - LOGL0(data->name, data->namelen, tmp); -} - -void mdc_rename_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data, - const char *old, int oldlen, const char *new, int newlen) -{ - struct mds_rec_rename *rec; - char *tmp; - - rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec)); - - /* XXX do something about time, uid, gid */ - rec->rn_opcode = REINT_RENAME; - rec->rn_fsuid = current->fsuid; - rec->rn_fsgid = current->fsgid; - rec->rn_cap = current->cap_effective; - rec->rn_suppgid1 = data->suppgids[0]; - rec->rn_suppgid2 = data->suppgids[1]; - rec->rn_fid1 = data->fid1; - rec->rn_fid2 = data->fid2; - rec->rn_time = data->mod_time; - - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, oldlen + 1); - LOGL0(old, oldlen, tmp); - - if (new) { - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, newlen + 1); - LOGL0(new, newlen, tmp); - } -} - -void mdc_getattr_pack(struct ptlrpc_request *req, int offset, __u64 valid, - int flags, struct mdc_op_data *data) -{ - struct mds_body *b; - b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*b)); - - b->fsuid = current->fsuid; - b->fsgid = current->fsgid; - b->capability = current->cap_effective; - b->valid = valid; - b->flags = flags | MDS_BFLAG_EXT_FLAGS; - /* skip MDS_BFLAG_EXT_FLAGS to verify the "client < 1.4.7" case - * refer to bug 12848. - */ - if (OBD_FAIL_CHECK(OBD_FAIL_MDC_OLD_EXT_FLAGS)) - b->flags &= ~MDS_BFLAG_EXT_FLAGS; - b->suppgid = data->suppgids[0]; - - b->fid1 = data->fid1; - b->fid2 = data->fid2; - if (data->name) { - char *tmp; - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, - data->namelen + 1); - memcpy(tmp, data->name, data->namelen); - data->name = tmp; - } -} - -void mdc_close_pack(struct ptlrpc_request *req, int offset, struct obdo *oa, - __u64 valid, struct obd_client_handle *och) -{ - struct mds_body *body; - - body = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*body)); - - mdc_pack_fid(&body->fid1, oa->o_id, 0, oa->o_mode); - memcpy(&body->handle, &och->och_fh, sizeof(body->handle)); - if (oa->o_valid & OBD_MD_FLATIME) { - body->atime = oa->o_atime; - body->valid |= OBD_MD_FLATIME; - } - if (oa->o_valid & OBD_MD_FLMTIME) { - body->mtime = oa->o_mtime; - body->valid |= OBD_MD_FLMTIME; - } - if (oa->o_valid & OBD_MD_FLCTIME) { - body->ctime = oa->o_ctime; - body->valid |= OBD_MD_FLCTIME; - } - if (oa->o_valid & OBD_MD_FLSIZE) { - body->size = oa->o_size; - body->valid |= OBD_MD_FLSIZE; - } - if (oa->o_valid & OBD_MD_FLBLOCKS) { - body->blocks = oa->o_blocks; - body->valid |= OBD_MD_FLBLOCKS; - } - if (oa->o_valid & OBD_MD_FLFLAGS) { - body->flags = oa->o_flags; - body->valid |= OBD_MD_FLFLAGS; - } -} - -struct mdc_cache_waiter { - struct list_head mcw_entry; - wait_queue_head_t mcw_waitq; -}; - -static int mdc_req_avail(struct client_obd *cli, struct mdc_cache_waiter *mcw) -{ - int rc; - ENTRY; - spin_lock(&cli->cl_loi_list_lock); - rc = list_empty(&mcw->mcw_entry); - spin_unlock(&cli->cl_loi_list_lock); - RETURN(rc); -}; - -/* We record requests in flight in cli->cl_r_in_flight here. - * There is only one write rpc possible in mdc anyway. If this to change - * in the future - the code may need to be revisited. */ -void mdc_enter_request(struct client_obd *cli) -{ - struct mdc_cache_waiter mcw; - struct l_wait_info lwi = { 0 }; - - spin_lock(&cli->cl_loi_list_lock); - if (cli->cl_r_in_flight >= cli->cl_max_rpcs_in_flight) { - list_add_tail(&mcw.mcw_entry, &cli->cl_cache_waiters); - init_waitqueue_head(&mcw.mcw_waitq); - spin_unlock(&cli->cl_loi_list_lock); - l_wait_event(mcw.mcw_waitq, mdc_req_avail(cli, &mcw), &lwi); - } else { - cli->cl_r_in_flight++; - spin_unlock(&cli->cl_loi_list_lock); - } -} - -void mdc_exit_request(struct client_obd *cli) -{ - struct list_head *l, *tmp; - struct mdc_cache_waiter *mcw; - - spin_lock(&cli->cl_loi_list_lock); - cli->cl_r_in_flight--; - - list_for_each_safe(l, tmp, &cli->cl_cache_waiters) { - if (cli->cl_r_in_flight >= cli->cl_max_rpcs_in_flight) { - /* No free request slots anymore */ - break; - } - - mcw = list_entry(l, struct mdc_cache_waiter, mcw_entry); - list_del_init(&mcw->mcw_entry); - cli->cl_r_in_flight++; - wake_up(&mcw->mcw_waitq); - } - /* Empty waiting list? Decrease reqs in-flight number */ - - spin_unlock(&cli->cl_loi_list_lock); -} diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c deleted file mode 100644 index 91d923d9e8..0000000000 --- a/lustre/mdc/mdc_locks.c +++ /dev/null @@ -1,906 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDC - -#ifdef __KERNEL__ -# include <linux/module.h> -# include <linux/pagemap.h> -# include <linux/miscdevice.h> -# include <linux/init.h> -#else -# include <liblustre.h> -#endif - -#include <obd_class.h> -#include <lustre_dlm.h> -#include <lprocfs_status.h> -#include "mdc_internal.h" - -int it_disposition(struct lookup_intent *it, int flag) -{ - return it->d.lustre.it_disposition & flag; -} -EXPORT_SYMBOL(it_disposition); - -void it_set_disposition(struct lookup_intent *it, int flag) -{ - it->d.lustre.it_disposition |= flag; -} -EXPORT_SYMBOL(it_set_disposition); - -void it_clear_disposition(struct lookup_intent *it, int flag) -{ - it->d.lustre.it_disposition &= ~flag; -} -EXPORT_SYMBOL(it_clear_disposition); - -int it_open_error(int phase, struct lookup_intent *it) -{ - if (it_disposition(it, DISP_OPEN_OPEN)) { - if (phase >= DISP_OPEN_OPEN) - return it->d.lustre.it_status; - else - return 0; - } - - if (it_disposition(it, DISP_OPEN_CREATE)) { - if (phase >= DISP_OPEN_CREATE) - return it->d.lustre.it_status; - else - return 0; - } - - if (it_disposition(it, DISP_LOOKUP_EXECD)) { - if (phase >= DISP_LOOKUP_EXECD) - return it->d.lustre.it_status; - else - return 0; - } - - if (it_disposition(it, DISP_IT_EXECD)) { - if (phase >= DISP_IT_EXECD) - return it->d.lustre.it_status; - else - return 0; - } - CERROR("it disp: %X, status: %d\n", it->d.lustre.it_disposition, - it->d.lustre.it_status); - LBUG(); - return 0; -} -EXPORT_SYMBOL(it_open_error); - -/* this must be called on a lockh that is known to have a referenced lock */ -void mdc_set_lock_data(__u64 *l, void *data) -{ - struct ldlm_lock *lock; - struct lustre_handle *lockh = (struct lustre_handle *)l; - ENTRY; - - if (!*l) { - EXIT; - return; - } - - lock = ldlm_handle2lock(lockh); - - LASSERT(lock != NULL); - lock_res_and_lock(lock); -#ifdef __KERNEL__ - if (lock->l_ast_data && lock->l_ast_data != data) { - struct inode *new_inode = data; - struct inode *old_inode = lock->l_ast_data; - LASSERTF(old_inode->i_state & I_FREEING, - "Found existing inode %p/%lu/%u state %lu in lock: " - "setting data to %p/%lu/%u\n", old_inode, - old_inode->i_ino, old_inode->i_generation, - old_inode->i_state, - new_inode, new_inode->i_ino, new_inode->i_generation); - } -#endif - lock->l_ast_data = data; - unlock_res_and_lock(lock); - LDLM_LOCK_PUT(lock); - - EXIT; -} -EXPORT_SYMBOL(mdc_set_lock_data); - -int mdc_change_cbdata(struct obd_export *exp, struct ll_fid *fid, - ldlm_iterator_t it, void *data) -{ - struct ldlm_res_id res_id = { .name = {0} }; - ENTRY; - - res_id.name[0] = fid->id; - res_id.name[1] = fid->generation; - - ldlm_resource_iterate(class_exp2obd(exp)->obd_namespace, &res_id, - it, data); - - EXIT; - return 0; -} - -static inline void mdc_clear_replay_flag(struct ptlrpc_request *req, int rc) -{ - /* Don't hold error requests for replay. */ - if (req->rq_replay) { - spin_lock(&req->rq_lock); - req->rq_replay = 0; - spin_unlock(&req->rq_lock); - } - if (rc && req->rq_transno != 0) { - DEBUG_REQ(D_ERROR, req, "transno returned on error rc %d", rc); - LBUG(); - } -} - -static int round_up(int val) -{ - int ret = 1; - while (val) { - val >>= 1; - ret <<= 1; - } - return ret; -} - -/* Save a large LOV EA into the request buffer so that it is available - * for replay. We don't do this in the initial request because the - * original request doesn't need this buffer (at most it sends just the - * lov_mds_md) and it is a waste of RAM/bandwidth to send the empty - * buffer and may also be difficult to allocate and save a very large - * request buffer for each open. (bug 5707) - * - * OOM here may cause recovery failure if lmm is needed (only for the - * original open if the MDS crashed just when this client also OOM'd) - * but this is incredibly unlikely, and questionable whether the client - * could do MDS recovery under OOM anyways... */ -static void mdc_realloc_openmsg(struct ptlrpc_request *req, - struct mds_body *body) -{ - int old_len, new_size, old_size; - struct lustre_msg *old_msg = req->rq_reqmsg; - struct lustre_msg *new_msg; - - old_len = lustre_msg_buflen(old_msg, DLM_INTENT_REC_OFF + 2); - old_size = lustre_packed_msg_size(old_msg); - lustre_msg_set_buflen(old_msg, DLM_INTENT_REC_OFF + 2, - body->eadatasize); - new_size = lustre_packed_msg_size(old_msg); - - OBD_ALLOC(new_msg, new_size); - if (new_msg != NULL) { - DEBUG_REQ(D_INFO, req, "replace reqmsg for larger EA %u\n", - body->eadatasize); - memcpy(new_msg, old_msg, old_size); - - spin_lock(&req->rq_lock); - req->rq_reqmsg = new_msg; - req->rq_reqlen = new_size; - spin_unlock(&req->rq_lock); - - OBD_FREE(old_msg, old_size); - } else { - lustre_msg_set_buflen(old_msg, DLM_INTENT_REC_OFF + 2, old_len); - body->valid &= ~OBD_MD_FLEASIZE; - body->eadatasize = 0; - } -} - -static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp, - struct lookup_intent *it, - struct mdc_op_data *data, - void *lmm, int lmmsize) -{ - struct ptlrpc_request *req; - struct ldlm_intent *lit; - struct obd_device *obddev = class_exp2obd(exp); - int size[7] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(struct ldlm_request), - [DLM_INTENT_IT_OFF] = sizeof(*lit), - [DLM_INTENT_REC_OFF] = sizeof(struct mds_rec_create), - [DLM_INTENT_REC_OFF+1]= data->namelen + 1, - /* As an optimization, we allocate an RPC request buffer - * for at least a default-sized LOV EA even if we aren't - * sending one. We grow the whole request to the next - * power-of-two size since we get that much from a slab - * allocation anyways. This avoids an allocation below - * in the common case where we need to save a - * default-sized LOV EA for open replay. */ - [DLM_INTENT_REC_OFF+2]= max(lmmsize, - obddev->u.cli.cl_default_mds_easize) }; - int repsize[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREPLY_OFF] = sizeof(struct ldlm_reply), - [DLM_REPLY_REC_OFF] = sizeof(struct mds_body), - [DLM_REPLY_REC_OFF+1] = obddev->u.cli. - cl_max_mds_easize, - [DLM_REPLY_REC_OFF+2] = LUSTRE_POSIX_ACL_MAX_SIZE }; - CFS_LIST_HEAD(cancels); - int do_join = (it->it_flags & O_JOIN_FILE) && data->data; - int count = 0; - int mode; - int rc; - - it->it_create_mode |= S_IFREG; - - rc = lustre_msg_size(class_exp2cliimp(exp)->imp_msg_magic, 6, size); - if (rc & (rc - 1)) - size[DLM_INTENT_REC_OFF + 2] = - min(size[DLM_INTENT_REC_OFF + 2] + round_up(rc) - rc, - obddev->u.cli.cl_max_mds_easize); - - /* If inode is known, cancel conflicting OPEN locks. */ - if (data->fid2.id) { - if (it->it_flags & (FMODE_WRITE|MDS_OPEN_TRUNC)) - mode = LCK_CW; -#ifdef FMODE_EXEC - else if (it->it_flags & FMODE_EXEC) - mode = LCK_PR; -#endif - else - mode = LCK_CR; - count = mdc_resource_get_unused(exp, &data->fid2, &cancels, - mode, MDS_INODELOCK_OPEN); - } - - /* If CREATE or JOIN_FILE, cancel parent's UPDATE lock. */ - if (it->it_op & IT_CREAT || do_join) - mode = LCK_EX; - else - mode = LCK_CR; - count += mdc_resource_get_unused(exp, &data->fid1, &cancels, mode, - MDS_INODELOCK_UPDATE); - if (do_join) { - __u64 head_size = (*(__u64 *)data->data); - /* join is like an unlink of the tail */ - size[DLM_INTENT_REC_OFF + 3] = sizeof(struct mds_rec_join); - req = ldlm_prep_enqueue_req(exp, 7, size, &cancels, count); - if (req) - mdc_join_pack(req, DLM_INTENT_REC_OFF + 3, data, - head_size); - } else { - req = ldlm_prep_enqueue_req(exp, 6, size, &cancels, count); - it->it_flags &= ~O_JOIN_FILE; - } - - if (req) { - spin_lock(&req->rq_lock); - req->rq_replay = 1; - spin_unlock(&req->rq_lock); - - /* pack the intent */ - lit = lustre_msg_buf(req->rq_reqmsg, DLM_INTENT_IT_OFF, - sizeof(*lit)); - lit->opc = (__u64)it->it_op; - - /* pack the intended request */ - mdc_open_pack(req, DLM_INTENT_REC_OFF, data, - it->it_create_mode, 0, it->it_flags, - lmm, lmmsize); - - ptlrpc_req_set_repsize(req, 5, repsize); - } - return req; -} - -static struct ptlrpc_request *mdc_intent_unlink_pack(struct obd_export *exp, - struct lookup_intent *it, - struct mdc_op_data *data) -{ - struct ptlrpc_request *req; - struct ldlm_intent *lit; - struct obd_device *obddev = class_exp2obd(exp); - int size[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(struct ldlm_request), - [DLM_INTENT_IT_OFF] = sizeof(*lit), - [DLM_INTENT_REC_OFF] = sizeof(struct mds_rec_unlink), - [DLM_INTENT_REC_OFF+1]= data->namelen + 1 }; - int repsize[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREPLY_OFF] = sizeof(struct ldlm_reply), - [DLM_REPLY_REC_OFF] = sizeof(struct mds_body), - [DLM_REPLY_REC_OFF+1] = obddev->u.cli. - cl_max_mds_easize, - [DLM_REPLY_REC_OFF+2] = obddev->u.cli. - cl_max_mds_cookiesize }; - - req = ldlm_prep_enqueue_req(exp, 5, size, NULL, 0); - if (req) { - /* pack the intent */ - lit = lustre_msg_buf(req->rq_reqmsg, DLM_INTENT_IT_OFF, - sizeof(*lit)); - lit->opc = (__u64)it->it_op; - - /* pack the intended request */ - mdc_unlink_pack(req, DLM_INTENT_REC_OFF, data); - - ptlrpc_req_set_repsize(req, 5, repsize); - } - return req; -} - -static struct ptlrpc_request *mdc_intent_lookup_pack(struct obd_export *exp, - struct lookup_intent *it, - struct mdc_op_data *data) -{ - struct ptlrpc_request *req; - struct ldlm_intent *lit; - struct obd_device *obddev = class_exp2obd(exp); - int size[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(struct ldlm_request), - [DLM_INTENT_IT_OFF] = sizeof(*lit), - [DLM_INTENT_REC_OFF] = sizeof(struct mds_body), - [DLM_INTENT_REC_OFF+1]= data->namelen + 1 }; - int repsize[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREPLY_OFF] = sizeof(struct ldlm_reply), - [DLM_REPLY_REC_OFF] = sizeof(struct mds_body), - [DLM_REPLY_REC_OFF+1] = obddev->u.cli. - cl_max_mds_easize, - [DLM_REPLY_REC_OFF+2] = LUSTRE_POSIX_ACL_MAX_SIZE }; - obd_valid valid = OBD_MD_FLGETATTR | OBD_MD_FLEASIZE | OBD_MD_FLACL | - OBD_MD_FLMODEASIZE | OBD_MD_FLDIREA; - - req = ldlm_prep_enqueue_req(exp, 5, size, NULL, 0); - if (req) { - /* pack the intent */ - lit = lustre_msg_buf(req->rq_reqmsg, DLM_INTENT_IT_OFF, - sizeof(*lit)); - lit->opc = (__u64)it->it_op; - - /* pack the intended request */ - mdc_getattr_pack(req, DLM_INTENT_REC_OFF, valid, it->it_flags, - data); - ptlrpc_req_set_repsize(req, 5, repsize); - } - return req; -} - -static struct ptlrpc_request *mdc_intent_readdir_pack(struct obd_export *exp) -{ - struct ptlrpc_request *req; - int size[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREQ_OFF] = sizeof(struct ldlm_request) }; - int repsize[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREPLY_OFF] = sizeof(struct ldlm_reply) }; - - req = ldlm_prep_enqueue_req(exp, 2, size, NULL, 0); - if (req) - ptlrpc_req_set_repsize(req, 2, repsize); - return req; -} - -static int mdc_finish_enqueue(struct obd_export *exp, - struct ptlrpc_request *req, - struct ldlm_enqueue_info *einfo, - struct lookup_intent *it, - struct lustre_handle *lockh, - int rc) -{ - struct ldlm_request *lockreq; - struct ldlm_reply *lockrep; - ENTRY; - - LASSERT(rc >= 0); - /* Similarly, if we're going to replay this request, we don't want to - * actually get a lock, just perform the intent. */ - if (req->rq_transno || req->rq_replay) { - lockreq = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, - sizeof(*lockreq)); - lockreq->lock_flags |= LDLM_FL_INTENT_ONLY; - } - - if (rc == ELDLM_LOCK_ABORTED) { - einfo->ei_mode = 0; - memset(lockh, 0, sizeof(*lockh)); - rc = 0; - } else { /* rc = 0 */ - struct ldlm_lock *lock = ldlm_handle2lock(lockh); - LASSERT(lock); - - /* If the server gave us back a different lock mode, we should - * fix up our variables. */ - if (lock->l_req_mode != einfo->ei_mode) { - ldlm_lock_addref(lockh, lock->l_req_mode); - ldlm_lock_decref(lockh, einfo->ei_mode); - einfo->ei_mode = lock->l_req_mode; - } - LDLM_LOCK_PUT(lock); - } - - lockrep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, - sizeof(*lockrep)); - LASSERT(lockrep != NULL); /* checked by ldlm_cli_enqueue() */ - /* swabbed by ldlm_cli_enqueue() */ - LASSERT(lustre_rep_swabbed(req, DLM_LOCKREPLY_OFF)); - - it->d.lustre.it_disposition = (int)lockrep->lock_policy_res1; - it->d.lustre.it_status = (int)lockrep->lock_policy_res2; - it->d.lustre.it_lock_mode = einfo->ei_mode; - it->d.lustre.it_data = req; - - if (it->d.lustre.it_status < 0 && req->rq_replay) - mdc_clear_replay_flag(req, it->d.lustre.it_status); - - /* If we're doing an IT_OPEN which did not result in an actual - * successful open, then we need to remove the bit which saves - * this request for unconditional replay. - * - * It's important that we do this first! Otherwise we might exit the - * function without doing so, and try to replay a failed create - * (bug 3440) */ - if ((it->it_op & IT_OPEN) && - req->rq_replay && - (!it_disposition(it, DISP_OPEN_OPEN) || - it->d.lustre.it_status != 0)) - mdc_clear_replay_flag(req, it->d.lustre.it_status); - - DEBUG_REQ(D_RPCTRACE, req, "op: %d disposition: %x, status: %d", - it->it_op,it->d.lustre.it_disposition,it->d.lustre.it_status); - - /* We know what to expect, so we do any byte flipping required here */ - if (it->it_op & (IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR)) { - struct mds_body *body; - - body = lustre_swab_repbuf(req, DLM_REPLY_REC_OFF, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR ("Can't swab mds_body\n"); - RETURN (-EPROTO); - } - - /* If this is a successful OPEN request, we need to set - replay handler and data early, so that if replay happens - immediately after swabbing below, new reply is swabbed - by that handler correctly */ - if (it_disposition(it, DISP_OPEN_OPEN) && - !it_open_error(DISP_OPEN_OPEN, it)) - mdc_set_open_replay_data(NULL, req); - - if ((body->valid & OBD_MD_FLEASIZE) != 0) { - void *eadata; - - /* The eadata is opaque; just check that it is there. - * Eventually, obd_unpackmd() will check the contents */ - eadata = lustre_swab_repbuf(req, DLM_REPLY_REC_OFF + 1, - body->eadatasize, NULL); - if (eadata == NULL) { - CERROR ("Missing/short eadata\n"); - RETURN (-EPROTO); - } - if (body->valid & OBD_MD_FLMODEASIZE) { - struct obd_device *obddev = class_exp2obd(exp); - - if (obddev->u.cli.cl_max_mds_easize < - body->max_mdsize) { - obddev->u.cli.cl_max_mds_easize = - body->max_mdsize; - CDEBUG(D_INFO, "maxeasize become %d\n", - body->max_mdsize); - } - if (obddev->u.cli.cl_max_mds_cookiesize < - body->max_cookiesize) { - obddev->u.cli.cl_max_mds_cookiesize = - body->max_cookiesize; - CDEBUG(D_INFO, "cookiesize become %d\n", - body->max_cookiesize); - } - } - /* We save the reply LOV EA in case we have to replay - * a create for recovery. If we didn't allocate a - * large enough request buffer above we need to - * reallocate it here to hold the actual LOV EA. */ - if (it->it_op & IT_OPEN) { - int offset = DLM_INTENT_REC_OFF + 2; - void *lmm; - - if (lustre_msg_buflen(req->rq_reqmsg, offset) < - body->eadatasize) - mdc_realloc_openmsg(req, body); - - lmm = lustre_msg_buf(req->rq_reqmsg, offset, - body->eadatasize); - if (lmm) - memcpy(lmm, eadata, body->eadatasize); - } - } - } - - RETURN(rc); -} - -/* We always reserve enough space in the reply packet for a stripe MD, because - * we don't know in advance the file type. */ -int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, - struct lookup_intent *it, struct mdc_op_data *data, - struct lustre_handle *lockh, void *lmm, int lmmsize, - int extra_lock_flags) -{ - struct ptlrpc_request *req; - struct obd_device *obddev = class_exp2obd(exp); - struct ldlm_res_id res_id = - { .name = {data->fid1.id, data->fid1.generation} }; - ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_LOOKUP } }; - int flags = extra_lock_flags | LDLM_FL_HAS_INTENT; - int rc; - ENTRY; - - LASSERTF(einfo->ei_type == LDLM_IBITS,"lock type %d\n", einfo->ei_type); - if (it->it_op & (IT_UNLINK | IT_GETATTR | IT_READDIR)) - policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; - - if (it->it_op & IT_OPEN) { - req = mdc_intent_open_pack(exp, it, data, lmm, lmmsize); - if (it->it_flags & O_JOIN_FILE) { - policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; - } - } else if (it->it_op & IT_UNLINK) { - req = mdc_intent_unlink_pack(exp, it, data); - } else if (it->it_op & (IT_GETATTR | IT_LOOKUP)) { - req = mdc_intent_lookup_pack(exp, it, data); - } else if (it->it_op == IT_READDIR) { - req = mdc_intent_readdir_pack(exp); - } else { - CERROR("bad it_op %x\n", it->it_op); - RETURN(-EINVAL); - } - - if (!req) - RETURN(-ENOMEM); - - /* It is important to obtain rpc_lock first (if applicable), so that - * threads that are serialised with rpc_lock are not polluting our - * rpcs in flight counter */ - mdc_get_rpc_lock(obddev->u.cli.cl_rpc_lock, it); - mdc_enter_request(&obddev->u.cli); - rc = ldlm_cli_enqueue(exp, &req, einfo, res_id, &policy, &flags, NULL, - 0, NULL, lockh, 0); - mdc_exit_request(&obddev->u.cli); - mdc_put_rpc_lock(obddev->u.cli.cl_rpc_lock, it); - if (rc < 0) { - CERROR("ldlm_cli_enqueue: %d\n", rc); - mdc_clear_replay_flag(req, rc); - ptlrpc_req_finished(req); - RETURN(rc); - } - rc = mdc_finish_enqueue(exp, req, einfo, it, lockh, rc); - - RETURN(rc); -} -EXPORT_SYMBOL(mdc_enqueue); - -int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, - struct ll_fid *fid) -{ - /* We could just return 1 immediately, but since we should only - * be called in revalidate_it if we already have a lock, let's - * verify that. */ - struct ldlm_res_id res_id = {.name ={fid->id, fid->generation}}; - struct lustre_handle lockh; - ldlm_policy_data_t policy; - ldlm_mode_t mode; - - /* As not all attributes are kept under update lock, e.g. - owner/group/acls are under lookup lock, we need both - ibits for GETATTR. */ - policy.l_inodebits.bits = (it->it_op == IT_GETATTR) ? - MDS_INODELOCK_UPDATE | MDS_INODELOCK_LOOKUP : - MDS_INODELOCK_LOOKUP; - - mode = ldlm_lock_match(exp->exp_obd->obd_namespace, - LDLM_FL_BLOCK_GRANTED, &res_id, LDLM_IBITS, - &policy, LCK_CR|LCK_CW|LCK_PR|LCK_PW, &lockh); - if (mode) { - memcpy(&it->d.lustre.it_lock_handle, &lockh, sizeof(lockh)); - it->d.lustre.it_lock_mode = mode; - } - - return !!mode; -} -EXPORT_SYMBOL(mdc_revalidate_lock); - -static int mdc_finish_intent_lock(struct obd_export *exp, - struct ptlrpc_request *req, - struct mdc_op_data *data, - struct lookup_intent *it, - struct lustre_handle *lockh) -{ - struct mds_body *mds_body; - struct lustre_handle old_lock; - struct ldlm_lock *lock; - int rc; - ENTRY; - - LASSERT(req != NULL); - LASSERT(req != LP_POISON); - LASSERT(req->rq_repmsg != LP_POISON); - - if (!it_disposition(it, DISP_IT_EXECD)) { - /* The server failed before it even started executing the - * intent, i.e. because it couldn't unpack the request. */ - LASSERT(it->d.lustre.it_status != 0); - RETURN(it->d.lustre.it_status); - } - rc = it_open_error(DISP_IT_EXECD, it); - if (rc) - RETURN(rc); - - mds_body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, - sizeof(*mds_body)); - /* mdc_enqueue checked */ - LASSERT(mds_body != NULL); - /* mdc_enqueue swabbed */ - LASSERT(lustre_rep_swabbed(req, DLM_REPLY_REC_OFF)); - - /* If we were revalidating a fid/name pair, mark the intent in - * case we fail and get called again from lookup */ - if (data->fid2.id && (it->it_op != IT_GETATTR)) { - it_set_disposition(it, DISP_ENQ_COMPLETE); - /* Also: did we find the same inode? */ - if (memcmp(&data->fid2, &mds_body->fid1, sizeof(data->fid2))) - RETURN(-ESTALE); - } - - rc = it_open_error(DISP_LOOKUP_EXECD, it); - if (rc) - RETURN(rc); - - /* keep requests around for the multiple phases of the call - * this shows the DISP_XX must guarantee we make it into the call - */ - if (!it_disposition(it, DISP_ENQ_CREATE_REF) && - it_disposition(it, DISP_OPEN_CREATE) && - !it_open_error(DISP_OPEN_CREATE, it)) { - it_set_disposition(it, DISP_ENQ_CREATE_REF); - ptlrpc_request_addref(req); /* balanced in ll_create_node */ - } - if (!it_disposition(it, DISP_ENQ_OPEN_REF) && - it_disposition(it, DISP_OPEN_OPEN) && - !it_open_error(DISP_OPEN_OPEN, it)) { - it_set_disposition(it, DISP_ENQ_OPEN_REF); - ptlrpc_request_addref(req); /* balanced in ll_file_open */ - /* BUG 11546 - eviction in the middle of open rpc processing */ - OBD_FAIL_TIMEOUT(OBD_FAIL_MDC_ENQUEUE_PAUSE, obd_timeout); - } - - if (it->it_op & IT_CREAT) { - /* XXX this belongs in ll_create_it */ - } else if (it->it_op == IT_OPEN) { - LASSERT(!it_disposition(it, DISP_OPEN_CREATE)); - } else { - LASSERT(it->it_op & (IT_GETATTR | IT_LOOKUP)); - } - - /* If we already have a matching lock, then cancel the new - * one. We have to set the data here instead of in - * mdc_enqueue, because we need to use the child's inode as - * the l_ast_data to match, and that's not available until - * intent_finish has performed the iget().) */ - lock = ldlm_handle2lock(lockh); - if (lock) { - ldlm_policy_data_t policy = lock->l_policy_data; - - LDLM_DEBUG(lock, "matching against this"); - LDLM_LOCK_PUT(lock); - memcpy(&old_lock, lockh, sizeof(*lockh)); - if (ldlm_lock_match(NULL, LDLM_FL_BLOCK_GRANTED, NULL, - LDLM_IBITS, &policy, LCK_NL, &old_lock)) { - ldlm_lock_decref_and_cancel(lockh, - it->d.lustre.it_lock_mode); - memcpy(lockh, &old_lock, sizeof(old_lock)); - memcpy(&it->d.lustre.it_lock_handle, lockh, - sizeof(*lockh)); - } - } - - CDEBUG(D_DENTRY,"D_IT dentry %.*s intent: %s status %d disp %x rc %d\n", - data->namelen, data->name, ldlm_it2str(it->it_op), - it->d.lustre.it_status, it->d.lustre.it_disposition, rc); - RETURN(rc); -} - -/* - * This long block is all about fixing up the lock and request state - * so that it is correct as of the moment _before_ the operation was - * applied; that way, the VFS will think that everything is normal and - * call Lustre's regular VFS methods. - * - * If we're performing a creation, that means that unless the creation - * failed with EEXIST, we should fake up a negative dentry. - * - * For everything else, we want to lookup to succeed. - * - * One additional note: if CREATE or OPEN succeeded, we add an extra - * reference to the request because we need to keep it around until - * ll_create/ll_open gets called. - * - * The server will return to us, in it_disposition, an indication of - * exactly what d.lustre.it_status refers to. - * - * If DISP_OPEN_OPEN is set, then d.lustre.it_status refers to the open() call, - * otherwise if DISP_OPEN_CREATE is set, then it status is the - * creation failure mode. In either case, one of DISP_LOOKUP_NEG or - * DISP_LOOKUP_POS will be set, indicating whether the child lookup - * was successful. - * - * Else, if DISP_LOOKUP_EXECD then d.lustre.it_status is the rc of the - * child lookup. - */ -int mdc_intent_lock(struct obd_export *exp, struct mdc_op_data *op_data, - void *lmm, int lmmsize, struct lookup_intent *it, - int lookup_flags, struct ptlrpc_request **reqp, - ldlm_blocking_callback cb_blocking, int extra_lock_flags) -{ - struct lustre_handle lockh; - int rc; - ENTRY; - - LASSERT(it); - - CDEBUG(D_DLMTRACE,"name: %.*s in inode "LPU64", intent: %s flags %#o\n", - op_data->namelen, op_data->name, op_data->fid1.id, - ldlm_it2str(it->it_op), it->it_flags); - - if (op_data->fid2.id && - (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR)) { - rc = mdc_revalidate_lock(exp, it, &op_data->fid2); - /* Only return failure if it was not GETATTR by cfid - (from inode_revalidate) */ - if (rc || op_data->namelen != 0) - RETURN(rc); - } - - /* lookup_it may be called only after revalidate_it has run, because - * revalidate_it cannot return errors, only zero. Returning zero causes - * this call to lookup, which *can* return an error. - * - * We only want to execute the request associated with the intent one - * time, however, so don't send the request again. Instead, skip past - * this and use the request from revalidate. In this case, revalidate - * never dropped its reference, so the refcounts are all OK */ - if (!it_disposition(it, DISP_ENQ_COMPLETE)) { - struct ldlm_enqueue_info einfo = - { LDLM_IBITS, it_to_lock_mode(it), cb_blocking, - ldlm_completion_ast, NULL, NULL }; - - rc = mdc_enqueue(exp, &einfo, it, op_data, &lockh, - lmm, lmmsize, extra_lock_flags); - if (rc < 0) - RETURN(rc); - memcpy(&it->d.lustre.it_lock_handle, &lockh, sizeof(lockh)); - } else if (!op_data->fid2.id) { - /* DISP_ENQ_COMPLETE set means there is extra reference on - * request referenced from this intent, saved for subsequent - * lookup. This path is executed when we proceed to this - * lookup, so we clear DISP_ENQ_COMPLETE */ - it_clear_disposition(it, DISP_ENQ_COMPLETE); - } - - *reqp = it->d.lustre.it_data; - rc = mdc_finish_intent_lock(exp, *reqp, op_data, it, &lockh); - - RETURN(rc); -} -EXPORT_SYMBOL(mdc_intent_lock); - -static int mdc_intent_getattr_async_interpret(struct ptlrpc_request *req, - void *unused, int rc) -{ - struct mdc_enqueue_args *ma; - struct md_enqueue_info *minfo; - struct ldlm_enqueue_info *einfo; - struct obd_export *exp; - struct lookup_intent *it; - struct lustre_handle *lockh; - struct obd_device *obddev; - int flags = LDLM_FL_HAS_INTENT; - ENTRY; - - ma = (struct mdc_enqueue_args *)&req->rq_async_args; - minfo = ma->ma_mi; - einfo = ma->ma_ei; - - exp = minfo->mi_exp; - it = &minfo->mi_it; - lockh = &minfo->mi_lockh; - - obddev = class_exp2obd(exp); - - mdc_exit_request(&obddev->u.cli); - if (OBD_FAIL_CHECK(OBD_FAIL_MDC_GETATTR_ENQUEUE)) - rc = -ETIMEDOUT; - - rc = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, 1, einfo->ei_mode, - &flags, NULL, 0, NULL, lockh, rc); - if (rc < 0) { - CERROR("ldlm_cli_enqueue_fini: %d\n", rc); - mdc_clear_replay_flag(req, rc); - GOTO(out, rc); - } - - rc = mdc_finish_enqueue(exp, req, einfo, it, lockh, rc); - if (rc) - GOTO(out, rc); - - memcpy(&it->d.lustre.it_lock_handle, lockh, sizeof(*lockh)); - - rc = mdc_finish_intent_lock(exp, req, &minfo->mi_data, it, lockh); - GOTO(out, rc); -out: - OBD_FREE_PTR(einfo); - minfo->mi_cb(exp, req, minfo, rc); - - return 0; -} - -int mdc_intent_getattr_async(struct obd_export *exp, - struct md_enqueue_info *minfo, - struct ldlm_enqueue_info *einfo) -{ - struct mdc_op_data *op_data = &minfo->mi_data; - struct lookup_intent *it = &minfo->mi_it; - struct ptlrpc_request *req; - struct obd_device *obddev = class_exp2obd(exp); - struct ldlm_res_id res_id = { - .name = {op_data->fid1.id, - op_data->fid1.generation} - }; - ldlm_policy_data_t policy = { - .l_inodebits = { MDS_INODELOCK_LOOKUP } - }; - struct mdc_enqueue_args *aa; - int rc; - int flags = LDLM_FL_HAS_INTENT; - ENTRY; - - CDEBUG(D_DLMTRACE,"name: %.*s in inode "LPU64", intent: %s flags %#o\n", - op_data->namelen, op_data->name, op_data->fid1.id, - ldlm_it2str(it->it_op), it->it_flags); - - req = mdc_intent_lookup_pack(exp, it, op_data); - if (!req) - RETURN(-ENOMEM); - - mdc_enter_request(&obddev->u.cli); - rc = ldlm_cli_enqueue(exp, &req, einfo, res_id, &policy, &flags, NULL, - 0, NULL, &minfo->mi_lockh, 1); - if (rc < 0) { - mdc_exit_request(&obddev->u.cli); - RETURN(rc); - } - - CLASSERT(sizeof(*aa) < sizeof(req->rq_async_args)); - aa = (struct mdc_enqueue_args *)&req->rq_async_args; - aa->ma_mi = minfo; - aa->ma_ei = einfo; - req->rq_interpret_reply = mdc_intent_getattr_async_interpret; - ptlrpcd_add_req(req); - - RETURN(0); -} -EXPORT_SYMBOL(mdc_intent_getattr_async); diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c deleted file mode 100644 index 2e663f90de..0000000000 --- a/lustre/mdc/mdc_reint.c +++ /dev/null @@ -1,335 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDC - -#ifdef __KERNEL__ -#ifndef AUTOCONF_INCLUDED -# include <linux/config.h> -#endif -# include <linux/module.h> -# include <linux/kernel.h> -#else -# include <liblustre.h> -#endif - -#include <obd_class.h> -#include "mdc_internal.h" - -/* mdc_setattr does its own semaphore handling */ -static int mdc_reint(struct ptlrpc_request *request, - struct mdc_rpc_lock *rpc_lock, int level) -{ - int rc; - - request->rq_send_state = level; - - mdc_get_rpc_lock(rpc_lock, NULL); - rc = ptlrpc_queue_wait(request); - mdc_put_rpc_lock(rpc_lock, NULL); - if (rc) - CDEBUG(D_INFO, "error in handling %d\n", rc); - else if (!lustre_swab_repbuf(request, REPLY_REC_OFF, - sizeof(struct mds_body), - lustre_swab_mds_body)) { - CERROR ("Can't unpack mds_body\n"); - rc = -EPROTO; - } - return rc; -} - -/* Find and cancel locally locks matched by inode @bits & @mode in the resource - * found by @fid. Found locks are added into @cancel list. Returns the amount of - * locks added to @cancels list. */ -int mdc_resource_get_unused(struct obd_export *exp, struct ll_fid *fid, - struct list_head *cancels, ldlm_mode_t mode, - __u64 bits) -{ - struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; - struct ldlm_res_id res_id = { .name = {fid->id, fid->generation} }; - struct ldlm_resource *res = ldlm_resource_get(ns, NULL, res_id, 0, 0); - ldlm_policy_data_t policy = {{0}}; - int count; - ENTRY; - - if (res == NULL) - RETURN(0); - - /* Initialize ibits lock policy. */ - policy.l_inodebits.bits = bits; - count = ldlm_cancel_resource_local(res, cancels, &policy, - mode, 0, 0, NULL); - ldlm_resource_putref(res); - RETURN(count); -} - -struct ptlrpc_request *mdc_prep_elc_req(struct obd_export *exp, - int bufcount, int *size, int off, - struct list_head *cancels, int count) -{ - return ldlm_prep_elc_req(exp, LUSTRE_MDS_VERSION, MDS_REINT, - bufcount, size, off, 0, cancels, count); -} - -/* If mdc_setattr is called with an 'iattr', then it is a normal RPC that - * should take the normal semaphore and go to the normal portal. - * - * If it is called with iattr->ia_valid & ATTR_FROM_OPEN, then it is a - * magic open-path setattr that should take the setattr semaphore and - * go to the setattr portal. */ -int mdc_setattr(struct obd_export *exp, struct mdc_op_data *op_data, - struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len, - struct ptlrpc_request **request) -{ - CFS_LIST_HEAD(cancels); - struct ptlrpc_request *req; - struct mds_rec_setattr *rec; - struct mdc_rpc_lock *rpc_lock; - struct obd_device *obd = exp->exp_obd; - int size[5] = { sizeof(struct ptlrpc_body), - sizeof(*rec), ealen, ea2len, - sizeof(struct ldlm_request) }; - int count, bufcount = 2, rc; - __u64 bits; - ENTRY; - - LASSERT(iattr != NULL); - - if (ealen > 0) { - bufcount++; - if (ea2len > 0) - bufcount++; - } - - bits = MDS_INODELOCK_UPDATE; - if (iattr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) - bits |= MDS_INODELOCK_LOOKUP; - count = mdc_resource_get_unused(exp, &op_data->fid1, - &cancels, LCK_EX, bits); - if (exp_connect_cancelset(exp)) - bufcount = 5; - req = mdc_prep_elc_req(exp, bufcount, size, - REQ_REC_OFF + 3, &cancels, count); - if (req == NULL) - RETURN(-ENOMEM); - - if (iattr->ia_valid & ATTR_FROM_OPEN) { - req->rq_request_portal = MDS_SETATTR_PORTAL; - ptlrpc_at_set_req_timeout(req); - rpc_lock = obd->u.cli.cl_setattr_lock; - } else { - rpc_lock = obd->u.cli.cl_rpc_lock; - } - - if (iattr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu\n", - LTIME_S(iattr->ia_mtime), LTIME_S(iattr->ia_ctime)); - mdc_setattr_pack(req, REQ_REC_OFF, op_data, iattr, - ea, ealen, ea2, ea2len); - - size[REPLY_REC_OFF] = sizeof(struct mds_body); - ptlrpc_req_set_repsize(req, 2, size); - - rc = mdc_reint(req, rpc_lock, LUSTRE_IMP_FULL); - *request = req; - if (rc == -ERESTARTSYS) - rc = 0; - - RETURN(rc); -} - -int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data, - const void *data, int datalen, int mode, __u32 uid, __u32 gid, - __u32 cap_effective, __u64 rdev, struct ptlrpc_request **request) -{ - CFS_LIST_HEAD(cancels); - struct obd_device *obd = exp->exp_obd; - struct ptlrpc_request *req; - int level, bufcount = 3, rc; - int size[5] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_rec_create), - op_data->namelen + 1, 0, sizeof(struct ldlm_request) }; - int count; - ENTRY; - - if (data && datalen) { - size[bufcount] = datalen; - bufcount++; - } - - count = mdc_resource_get_unused(exp, &op_data->fid1, &cancels, - LCK_EX, MDS_INODELOCK_UPDATE); - if (exp_connect_cancelset(exp)) - bufcount = 5; - req = mdc_prep_elc_req(exp, bufcount, size, - REQ_REC_OFF + 3, &cancels, count); - if (req == NULL) - RETURN(-ENOMEM); - - /* mdc_create_pack fills msg->bufs[1] with name - * and msg->bufs[2] with tgt, for symlinks or lov MD data */ - mdc_create_pack(req, REQ_REC_OFF, op_data, data, datalen, mode, uid, - gid, cap_effective, rdev); - - size[REPLY_REC_OFF] = sizeof(struct mds_body); - ptlrpc_req_set_repsize(req, 2, size); - - level = LUSTRE_IMP_FULL; - resend: - rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, level); - /* Resend if we were told to. */ - if (rc == -ERESTARTSYS) { - level = LUSTRE_IMP_RECOVER; - goto resend; - } - - if (!rc) - mdc_store_inode_generation(req, REQ_REC_OFF, REPLY_REC_OFF); - - *request = req; - RETURN(rc); -} - -int mdc_unlink(struct obd_export *exp, struct mdc_op_data *op_data, - struct ptlrpc_request **request) -{ - CFS_LIST_HEAD(cancels); - struct obd_device *obd = class_exp2obd(exp); - struct ptlrpc_request *req = *request; - int size[4] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_rec_unlink), - op_data->namelen + 1, sizeof(struct ldlm_request) }; - int count, rc, bufcount = 3; - ENTRY; - - LASSERT(req == NULL); - count = mdc_resource_get_unused(exp, &op_data->fid1, &cancels, - LCK_EX, MDS_INODELOCK_UPDATE); - if (op_data->fid3.id) - count += mdc_resource_get_unused(exp, &op_data->fid3, &cancels, - LCK_EX, MDS_INODELOCK_FULL); - if (exp_connect_cancelset(exp)) - bufcount = 4; - req = mdc_prep_elc_req(exp, bufcount, size, - REQ_REC_OFF + 2, &cancels, count); - if (req == NULL) - RETURN(-ENOMEM); - *request = req; - - size[REPLY_REC_OFF] = sizeof(struct mds_body); - size[REPLY_REC_OFF + 1] = obd->u.cli.cl_max_mds_easize; - size[REPLY_REC_OFF + 2] = obd->u.cli.cl_max_mds_cookiesize; - ptlrpc_req_set_repsize(req, 4, size); - - mdc_unlink_pack(req, REQ_REC_OFF, op_data); - - rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL); - if (rc == -ERESTARTSYS) - rc = 0; - RETURN(rc); -} - -int mdc_link(struct obd_export *exp, struct mdc_op_data *op_data, - struct ptlrpc_request **request) -{ - CFS_LIST_HEAD(cancels); - struct obd_device *obd = exp->exp_obd; - struct ptlrpc_request *req; - int size[4] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_rec_link), - op_data->namelen + 1, sizeof(struct ldlm_request) }; - int count, rc, bufcount = 3; - ENTRY; - - count = mdc_resource_get_unused(exp, &op_data->fid1, &cancels, - LCK_EX, MDS_INODELOCK_UPDATE); - count += mdc_resource_get_unused(exp, &op_data->fid2, &cancels, - LCK_EX, MDS_INODELOCK_UPDATE); - if (exp_connect_cancelset(exp)) - bufcount = 4; - req = mdc_prep_elc_req(exp, bufcount, size, - REQ_REC_OFF + 2, &cancels, count); - if (req == NULL) - RETURN(-ENOMEM); - - mdc_link_pack(req, REQ_REC_OFF, op_data); - - size[REPLY_REC_OFF] = sizeof(struct mds_body); - ptlrpc_req_set_repsize(req, 2, size); - - rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL); - *request = req; - if (rc == -ERESTARTSYS) - rc = 0; - - RETURN(rc); -} - -int mdc_rename(struct obd_export *exp, struct mdc_op_data *op_data, - const char *old, int oldlen, const char *new, int newlen, - struct ptlrpc_request **request) -{ - CFS_LIST_HEAD(cancels); - struct obd_device *obd = exp->exp_obd; - struct ptlrpc_request *req; - int size[5] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_rec_rename), - oldlen + 1, newlen + 1, sizeof(struct ldlm_request) }; - int count, rc, bufcount = 4; - ENTRY; - - count = mdc_resource_get_unused(exp, &op_data->fid1, &cancels, - LCK_EX, MDS_INODELOCK_UPDATE); - count += mdc_resource_get_unused(exp, &op_data->fid2, &cancels, - LCK_EX, MDS_INODELOCK_UPDATE); - if (op_data->fid3.id) - count += mdc_resource_get_unused(exp, &op_data->fid3, &cancels, - LCK_EX, MDS_INODELOCK_LOOKUP); - if (op_data->fid4.id) - count += mdc_resource_get_unused(exp, &op_data->fid4, &cancels, - LCK_EX, MDS_INODELOCK_FULL); - if (exp_connect_cancelset(exp)) - bufcount = 5; - req = mdc_prep_elc_req(exp, bufcount, size, - REQ_REC_OFF + 3, &cancels, count); - if (req == NULL) - RETURN(-ENOMEM); - - mdc_rename_pack(req, REQ_REC_OFF, op_data, old, oldlen, new, newlen); - - size[REPLY_REC_OFF] = sizeof(struct mds_body); - size[REPLY_REC_OFF + 1] = obd->u.cli.cl_max_mds_easize; - size[REPLY_REC_OFF + 2] = obd->u.cli.cl_max_mds_cookiesize; - ptlrpc_req_set_repsize(req, 4, size); - - rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL); - *request = req; - if (rc == -ERESTARTSYS) - rc = 0; - - RETURN(rc); -} diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c deleted file mode 100644 index 0d40904db9..0000000000 --- a/lustre/mdc/mdc_request.c +++ /dev/null @@ -1,1438 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDC - -#ifdef __KERNEL__ -# include <linux/module.h> -# include <linux/pagemap.h> -# include <linux/miscdevice.h> -# include <linux/init.h> -#else -# include <liblustre.h> -#endif - -#include <obd_class.h> -#include <lustre_dlm.h> -#include <lprocfs_status.h> -#include <lustre_param.h> -#include "mdc_internal.h" - -static quota_interface_t *quota_interface; - -#define REQUEST_MINOR 244 - -static quota_interface_t *quota_interface; -extern quota_interface_t mdc_quota_interface; - -static int mdc_cleanup(struct obd_device *obd); - -extern int mds_queue_req(struct ptlrpc_request *); -/* Helper that implements most of mdc_getstatus and signal_completed_replay. */ -/* XXX this should become mdc_get_info("key"), sending MDS_GET_INFO RPC */ -static int send_getstatus(struct obd_import *imp, struct ll_fid *rootfid, - int level, int msg_flags) -{ - struct ptlrpc_request *req; - struct mds_body *body; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - ENTRY; - - req = ptlrpc_prep_req(imp, LUSTRE_MDS_VERSION, MDS_GETSTATUS, 2, size, - NULL); - if (!req) - GOTO(out, rc = -ENOMEM); - - req->rq_send_state = level; - ptlrpc_req_set_repsize(req, 2, size); - - mdc_pack_req_body(req, REQ_REC_OFF, 0, NULL, 0, 0); - lustre_msg_add_flags(req->rq_reqmsg, msg_flags); - rc = ptlrpc_queue_wait(req); - - if (!rc) { - body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR ("Can't extract mds_body\n"); - GOTO (out, rc = -EPROTO); - } - - memcpy(rootfid, &body->fid1, sizeof(*rootfid)); - - CDEBUG(D_NET, "root ino="LPU64", last_committed="LPU64 - ", last_xid="LPU64"\n", - rootfid->id, - lustre_msg_get_last_committed(req->rq_repmsg), - lustre_msg_get_last_xid(req->rq_repmsg)); - } - - EXIT; - out: - ptlrpc_req_finished(req); - return rc; -} - -/* This should be mdc_get_info("rootfid") */ -int mdc_getstatus(struct obd_export *exp, struct ll_fid *rootfid) -{ - return send_getstatus(class_exp2cliimp(exp), rootfid, LUSTRE_IMP_FULL, - 0); -} - -static -int mdc_getattr_common(struct obd_export *exp, unsigned int ea_size, - unsigned int acl_size, struct ptlrpc_request *req) -{ - struct obd_device *obddev = class_exp2obd(exp); - struct mds_body *body; - void *eadata; - int size[4] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - int bufcount = 2, rc; - ENTRY; - - /* request message already built */ - - if (ea_size != 0) { - size[bufcount++] = ea_size; - CDEBUG(D_INODE, "reserved %u bytes for MD/symlink in packet\n", - ea_size); - } - if (acl_size) { - size[bufcount++] = acl_size; - CDEBUG(D_INODE, "reserved %u bytes for ACL\n", acl_size); - } - - ptlrpc_req_set_repsize(req, bufcount, size); - - mdc_enter_request(&obddev->u.cli); - rc = ptlrpc_queue_wait(req); - mdc_exit_request(&obddev->u.cli); - if (rc != 0) - RETURN (rc); - - body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR ("Can't unpack mds_body\n"); - RETURN (-EPROTO); - } - - CDEBUG(D_NET, "mode: %o\n", body->mode); - - lustre_set_rep_swabbed(req, REPLY_REC_OFF + 1); - if (body->eadatasize != 0) { - /* reply indicates presence of eadata; check it's there... */ - eadata = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, - body->eadatasize); - if (eadata == NULL) { - CERROR ("Missing/short eadata\n"); - RETURN (-EPROTO); - } - } - - if (body->valid & OBD_MD_FLMODEASIZE) { - if (exp->exp_obd->u.cli.cl_max_mds_easize < body->max_mdsize) - exp->exp_obd->u.cli.cl_max_mds_easize = - body->max_mdsize; - if (exp->exp_obd->u.cli.cl_max_mds_cookiesize < - body->max_cookiesize) - exp->exp_obd->u.cli.cl_max_mds_cookiesize = - body->max_cookiesize; - } - - RETURN (0); -} - -int mdc_getattr(struct obd_export *exp, struct ll_fid *fid, - obd_valid valid, unsigned int ea_size, - struct ptlrpc_request **request) -{ - struct ptlrpc_request *req; - int size[2] = { sizeof(struct ptlrpc_body), sizeof(struct mds_body) }; - int acl_size = 0, rc; - ENTRY; - - /* XXX do we need to make another request here? We just did a getattr - * to do the lookup in the first place. - */ - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - MDS_GETATTR, 2, size, NULL); - if (!req) - GOTO(out, rc = -ENOMEM); - - mdc_pack_req_body(req, REQ_REC_OFF, valid, fid, ea_size, - MDS_BFLAG_EXT_FLAGS/*request "new" flags(bug 9486)*/); - - /* currently only root inode will call us with FLACL */ - if (valid & OBD_MD_FLACL) - acl_size = LUSTRE_POSIX_ACL_MAX_SIZE; - - rc = mdc_getattr_common(exp, ea_size, acl_size, req); - if (rc != 0) { - ptlrpc_req_finished (req); - req = NULL; - } - out: - *request = req; - RETURN (rc); -} - -int mdc_getattr_name(struct obd_export *exp, struct ll_fid *fid, - const char *filename, int namelen, unsigned long valid, - unsigned int ea_size, struct ptlrpc_request **request) -{ - struct ptlrpc_request *req; - struct mds_body *body; - int rc, size[3] = { sizeof(struct ptlrpc_body), sizeof(*body), namelen}; - ENTRY; - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - MDS_GETATTR_NAME, 3, size, NULL); - if (!req) - GOTO(out, rc = -ENOMEM); - - mdc_pack_req_body(req, REQ_REC_OFF, valid, fid, ea_size, - MDS_BFLAG_EXT_FLAGS/*request "new" flags(bug 9486)*/); - - LASSERT(strnlen(filename, namelen) == namelen - 1); - memcpy(lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1, namelen), - filename, namelen); - - rc = mdc_getattr_common(exp, ea_size, 0, req); - if (rc != 0) { - ptlrpc_req_finished (req); - req = NULL; - } - out: - *request = req; - RETURN(rc); -} - -static -int mdc_xattr_common(struct obd_export *exp, struct ll_fid *fid, - int opcode, obd_valid valid, const char *xattr_name, - const char *input, int input_size, int output_size, - int flags, struct ptlrpc_request **request) -{ - struct obd_device *obddev = class_exp2obd(exp); - struct ptlrpc_request *req; - int size[4] = { sizeof(struct ptlrpc_body), sizeof(struct mds_body) }; - // int size[3] = {sizeof(struct mds_body)}, bufcnt = 1; - int rc, xattr_namelen = 0, bufcnt = 2, offset; - void *tmp; - ENTRY; - - if (xattr_name) { - xattr_namelen = strlen(xattr_name) + 1; - size[bufcnt++] = xattr_namelen; - } - if (input_size) { - LASSERT(input); - size[bufcnt++] = input_size; - } - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - opcode, bufcnt, size, NULL); - if (!req) - GOTO(out, rc = -ENOMEM); - - /* request data */ - mdc_pack_req_body(req, REQ_REC_OFF, valid, fid, output_size, flags); - - offset = REQ_REC_OFF + 1; - - if (xattr_name) { - tmp = lustre_msg_buf(req->rq_reqmsg, offset++, xattr_namelen); - memcpy(tmp, xattr_name, xattr_namelen); - } - if (input_size) { - tmp = lustre_msg_buf(req->rq_reqmsg, offset++, input_size); - memcpy(tmp, input, input_size); - } - - /* reply buffers */ - if (opcode == MDS_GETXATTR) { - size[REPLY_REC_OFF] = sizeof(struct mds_body); - bufcnt = 2; - } else { - bufcnt = 1; - } - - /* we do this even output_size is 0, because server is doing that */ - size[bufcnt++] = output_size; - - ptlrpc_req_set_repsize(req, bufcnt, size); - - /* make rpc */ - if (opcode == MDS_SETXATTR) - mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL); - else - mdc_enter_request(&obddev->u.cli); - - rc = ptlrpc_queue_wait(req); - - if (opcode == MDS_SETXATTR) - mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL); - else - mdc_exit_request(&obddev->u.cli); - - if (rc != 0) - GOTO(err_out, rc); - - if (opcode == MDS_GETXATTR) { - struct mds_body * body = lustre_swab_repbuf(req, REPLY_REC_OFF, - sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR ("Can't unpack mds_body\n"); - GOTO(err_out, rc = -EPROTO); - } - } -out: - *request = req; - RETURN (rc); -err_out: - ptlrpc_req_finished(req); - req = NULL; - goto out; -} - -int mdc_setxattr(struct obd_export *exp, struct ll_fid *fid, - obd_valid valid, const char *xattr_name, - const char *input, int input_size, - int output_size, int flags, - struct ptlrpc_request **request) -{ - return mdc_xattr_common(exp, fid, MDS_SETXATTR, valid, xattr_name, - input, input_size, output_size, flags, request); -} - -int mdc_getxattr(struct obd_export *exp, struct ll_fid *fid, - obd_valid valid, const char *xattr_name, - const char *input, int input_size, - int output_size, struct ptlrpc_request **request) -{ - return mdc_xattr_common(exp, fid, MDS_GETXATTR, valid, xattr_name, - input, input_size, output_size, 0, request); -} - -/* This should be called with both the request and the reply still packed. */ -void mdc_store_inode_generation(struct ptlrpc_request *req, int reqoff, - int repoff) -{ - struct mds_rec_create *rec = lustre_msg_buf(req->rq_reqmsg, reqoff, - sizeof(*rec)); - struct mds_body *body = lustre_msg_buf(req->rq_repmsg, repoff, - sizeof(*body)); - - LASSERT (rec != NULL); - LASSERT (body != NULL); - - memcpy(&rec->cr_replayfid, &body->fid1, sizeof rec->cr_replayfid); - if (body->fid1.id == 0) { - DEBUG_REQ(D_ERROR, req, "saving replay request with id = 0 " - "gen = %u", body->fid1.generation); - LBUG(); - } - - DEBUG_REQ(D_INODE, req, "storing generation %u for ino "LPU64, - rec->cr_replayfid.generation, rec->cr_replayfid.id); -} - -#ifdef CONFIG_FS_POSIX_ACL -static -int mdc_unpack_acl(struct obd_export *exp, struct ptlrpc_request *req, - struct lustre_md *md, unsigned int offset) -{ - struct mds_body *body = md->body; - struct posix_acl *acl; - void *buf; - int rc; - - if (!body->aclsize) - return 0; - - buf = lustre_msg_buf(req->rq_repmsg, offset, body->aclsize); - if (!buf) { - CERROR("aclsize %u, bufcount %u, bufsize %u\n", - body->aclsize, lustre_msg_bufcount(req->rq_repmsg), - (lustre_msg_bufcount(req->rq_repmsg) <= offset) ? - -1 : lustre_msg_buflen(req->rq_repmsg, offset)); - return -EPROTO; - } - - acl = posix_acl_from_xattr(buf, body->aclsize); - if (IS_ERR(acl)) { - rc = PTR_ERR(acl); - CERROR("convert xattr to acl: %d\n", rc); - return rc; - } - - rc = posix_acl_valid(acl); - if (rc) { - CERROR("validate acl: %d\n", rc); - posix_acl_release(acl); - return rc; - } - - md->posix_acl = acl; - return 0; -} -#else -#define mdc_unpack_acl(exp, req, md, offset) 0 -#endif - -int mdc_req2lustre_md(struct ptlrpc_request *req, int offset, - struct obd_export *exp, - struct lustre_md *md) -{ - int rc = 0; - ENTRY; - - LASSERT(md); - memset(md, 0, sizeof(*md)); - - md->body = lustre_msg_buf(req->rq_repmsg, offset, sizeof (*md->body)); - LASSERT (md->body != NULL); - LASSERT(lustre_rep_swabbed(req, offset)); - offset++; - - if (md->body->valid & OBD_MD_FLEASIZE) { - int lmmsize; - struct lov_mds_md *lmm; - - if (!S_ISREG(md->body->mode)) { - CERROR("OBD_MD_FLEASIZE set, should be a regular file, " - "but is not\n"); - GOTO(err_out, rc = -EPROTO); - } - - if (md->body->eadatasize == 0) { - CERROR ("OBD_MD_FLEASIZE set, but eadatasize 0\n"); - GOTO(err_out, rc = -EPROTO); - } - lmmsize = md->body->eadatasize; - lmm = lustre_msg_buf(req->rq_repmsg, offset, lmmsize); - if (!lmm) { - CERROR ("incorrect message: lmm == 0\n"); - GOTO(err_out, rc = -EPROTO); - } - LASSERT(lustre_rep_swabbed(req, offset)); - - rc = obd_unpackmd(exp, &md->lsm, lmm, lmmsize); - if (rc < 0) - GOTO(err_out, rc); - - if (rc < sizeof(*md->lsm)) { - CERROR ("lsm size too small: rc < sizeof (*md->lsm) " - "(%d < "LPSZ")\n", rc, sizeof(*md->lsm)); - GOTO(err_out, rc = -EPROTO); - } - rc = 0; - - offset++; - } - - if (md->body->valid & OBD_MD_FLDIREA) { - if(!S_ISDIR(md->body->mode)) { - CERROR("OBD_MD_FLDIREA set, should be a directory, but " - "is not\n"); - GOTO(err_out, rc = -EPROTO); - } - offset++; - } - - /* for ACL, it's possible that FLACL is set but aclsize is zero. - * only when aclsize != 0 there's an actual segment for ACL in - * reply buffer. - */ - if ((md->body->valid & OBD_MD_FLACL) && md->body->aclsize) { - rc = mdc_unpack_acl(exp, req, md, offset); - if (rc) - GOTO(err_out, rc); - offset++; - } -out: - RETURN(rc); - -err_out: - if (md->lsm) - obd_free_memmd(exp, &md->lsm); - goto out; -} - -void mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md) -{ - if (md->lsm) - obd_free_memmd(exp, &md->lsm); - -#ifdef CONFIG_FS_POSIX_ACL - if (md->posix_acl) { - posix_acl_release(md->posix_acl); - md->posix_acl = NULL; - } -#endif -} - -static void mdc_commit_open(struct ptlrpc_request *req) -{ - struct mdc_open_data *mod = req->rq_cb_data; - if (mod == NULL) - return; - - if (mod->mod_close_req != NULL) - mod->mod_close_req->rq_cb_data = NULL; - - if (mod->mod_och != NULL) - mod->mod_och->och_mod = NULL; - - OBD_FREE(mod, sizeof(*mod)); - req->rq_cb_data = NULL; -} - -static void mdc_replay_open(struct ptlrpc_request *req) -{ - struct mdc_open_data *mod = req->rq_cb_data; - struct obd_client_handle *och; - struct ptlrpc_request *close_req; - struct lustre_handle old; - struct mds_body *body; - ENTRY; - - body = lustre_swab_repbuf(req, DLM_REPLY_REC_OFF, sizeof(*body), - lustre_swab_mds_body); - LASSERT (body != NULL); - - if (mod == NULL) { - DEBUG_REQ(D_ERROR, req, - "can't properly replay without open data"); - EXIT; - return; - } - - och = mod->mod_och; - if (och != NULL) { - struct lustre_handle *file_fh; - LASSERT(och->och_magic == OBD_CLIENT_HANDLE_MAGIC); - file_fh = &och->och_fh; - CDEBUG(D_RPCTRACE, "updating handle from "LPX64" to "LPX64"\n", - file_fh->cookie, body->handle.cookie); - memcpy(&old, file_fh, sizeof(old)); - memcpy(file_fh, &body->handle, sizeof(*file_fh)); - } - - close_req = mod->mod_close_req; - if (close_req != NULL) { - struct mds_body *close_body; - LASSERT(lustre_msg_get_opc(close_req->rq_reqmsg) == MDS_CLOSE); - close_body = lustre_msg_buf(close_req->rq_reqmsg, REQ_REC_OFF, - sizeof(*close_body)); - if (och != NULL) - LASSERT(!memcmp(&old, &close_body->handle, sizeof old)); - DEBUG_REQ(D_RPCTRACE, close_req, "updating close with new fh"); - memcpy(&close_body->handle, &body->handle, - sizeof(close_body->handle)); - } - - EXIT; -} - -void mdc_set_open_replay_data(struct obd_client_handle *och, - struct ptlrpc_request *open_req) -{ - struct mdc_open_data *mod; - struct mds_rec_create *rec = lustre_msg_buf(open_req->rq_reqmsg, - DLM_INTENT_REC_OFF, - sizeof(*rec)); - struct mds_body *body = lustre_msg_buf(open_req->rq_repmsg, - DLM_REPLY_REC_OFF, - sizeof(*body)); - - /* If request is not eligible for replay, just bail out */ - if (!open_req->rq_replay) - return; - - /* incoming message in my byte order (it's been swabbed) */ - LASSERT(rec != NULL); - LASSERT(lustre_rep_swabbed(open_req, DLM_REPLY_REC_OFF)); - /* outgoing messages always in my byte order */ - LASSERT(body != NULL); - - if (och) { - OBD_ALLOC(mod, sizeof(*mod)); - if (mod == NULL) { - DEBUG_REQ(D_ERROR, open_req, "can't allocate mdc_open_data"); - return; - } - - spin_lock(&open_req->rq_lock); - och->och_mod = mod; - mod->mod_och = och; - mod->mod_open_req = open_req; - open_req->rq_cb_data = mod; - open_req->rq_commit_cb = mdc_commit_open; - spin_unlock(&open_req->rq_lock); - } - - memcpy(&rec->cr_replayfid, &body->fid1, sizeof rec->cr_replayfid); - open_req->rq_replay_cb = mdc_replay_open; - if (body->fid1.id == 0) { - DEBUG_REQ(D_ERROR, open_req, "saving replay request with " - "id = 0 gen = %u", body->fid1.generation); - LBUG(); - } - - DEBUG_REQ(D_RPCTRACE, open_req, "set up replay data"); -} - -void mdc_clear_open_replay_data(struct obd_client_handle *och) -{ - struct mdc_open_data *mod = och->och_mod; - - /* Don't free the structure now (it happens in mdc_commit_open, after - * we're sure we won't need to fix up the close request in the future), - * but make sure that replay doesn't poke at the och, which is about to - * be freed. */ - LASSERT(mod != LP_POISON); - if (mod != NULL) - mod->mod_och = NULL; - och->och_mod = NULL; -} - -static void mdc_commit_close(struct ptlrpc_request *req) -{ - struct mdc_open_data *mod = req->rq_cb_data; - struct ptlrpc_request *open_req; - struct obd_import *imp = req->rq_import; - - DEBUG_REQ(D_RPCTRACE, req, "close req committed"); - if (mod == NULL) - return; - - mod->mod_close_req = NULL; - req->rq_cb_data = NULL; - req->rq_commit_cb = NULL; - - open_req = mod->mod_open_req; - LASSERT(open_req != NULL); - LASSERT(open_req != LP_POISON); - LASSERT(open_req->rq_type != LI_POISON); - - DEBUG_REQ(D_RPCTRACE, open_req, "open req balanced"); - LASSERT(open_req->rq_transno != 0); - LASSERT(open_req->rq_import == imp); - - /* We no longer want to preserve this for transno-unconditional - * replay. */ - spin_lock(&open_req->rq_lock); - open_req->rq_replay = 0; - spin_unlock(&open_req->rq_lock); -} - -int mdc_close(struct obd_export *exp, struct obdo *oa, - struct obd_client_handle *och, struct ptlrpc_request **request) -{ - struct obd_device *obd = class_exp2obd(exp); - int reqsize[2] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_body) }; - int rc, repsize[4] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_body), - obd->u.cli.cl_max_mds_easize, - obd->u.cli.cl_max_mds_cookiesize }; - struct ptlrpc_request *req; - struct mdc_open_data *mod; - ENTRY; - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - MDS_CLOSE, 2, reqsize, NULL); - if (req == NULL) - GOTO(out, rc = -ENOMEM); - - /* To avoid a livelock (bug 7034), we need to send CLOSE RPCs to a - * portal whose threads are not taking any DLM locks and are therefore - * always progressing */ - req->rq_request_portal = MDS_READPAGE_PORTAL; - ptlrpc_at_set_req_timeout(req); - - /* Ensure that this close's handle is fixed up during replay. */ - LASSERT(och != NULL); - LASSERT(och->och_magic == OBD_CLIENT_HANDLE_MAGIC); - mod = och->och_mod; - if (likely(mod != NULL)) { - if (mod->mod_open_req->rq_type == LI_POISON) { - CERROR("LBUG POISONED open %p!\n", mod->mod_open_req); - LBUG(); - ptlrpc_req_finished(req); - req = NULL; - GOTO(out, rc = -EIO); - } - mod->mod_close_req = req; - DEBUG_REQ(D_RPCTRACE, mod->mod_open_req, "matched open"); - } else { - CDEBUG(D_RPCTRACE, "couldn't find open req; expecting error\n"); - } - - mdc_close_pack(req, REQ_REC_OFF, oa, oa->o_valid, och); - - ptlrpc_req_set_repsize(req, 4, repsize); - req->rq_commit_cb = mdc_commit_close; - LASSERT(req->rq_cb_data == NULL); - req->rq_cb_data = mod; - - mdc_get_rpc_lock(obd->u.cli.cl_close_lock, NULL); - rc = ptlrpc_queue_wait(req); - mdc_put_rpc_lock(obd->u.cli.cl_close_lock, NULL); - - if (req->rq_repmsg == NULL) { - CDEBUG(D_RPCTRACE, "request failed to send: %p, %d\n", req, - req->rq_status); - if (rc == 0) - rc = req->rq_status ? req->rq_status : -EIO; - } else if (rc == 0) { - rc = lustre_msg_get_status(req->rq_repmsg); - if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR) { - DEBUG_REQ(D_ERROR, req, "type == PTL_RPC_MSG_ERR, err " - "= %d", rc); - if (rc > 0) - rc = -rc; - } else if (mod == NULL) { - CERROR("Unexpected: can't find mdc_open_data, but the " - "close succeeded. Please tell CFS.\n"); - } - if (!lustre_swab_repbuf(req, REPLY_REC_OFF, - sizeof(struct mds_body), - lustre_swab_mds_body)) { - CERROR("Error unpacking mds_body\n"); - rc = -EPROTO; - } - } - - EXIT; - *request = req; - out: - if (rc != 0 && req && req->rq_commit_cb) - req->rq_commit_cb(req); - - return rc; -} - -int mdc_done_writing(struct obd_export *exp, struct obdo *obdo) -{ - struct ptlrpc_request *req; - struct mds_body *body; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - ENTRY; - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - MDS_DONE_WRITING, 2, size, NULL); - if (req == NULL) - RETURN(-ENOMEM); - - body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body)); - mdc_pack_fid(&body->fid1, obdo->o_id, 0, obdo->o_mode); - body->size = obdo->o_size; - body->blocks = obdo->o_blocks; - body->flags = obdo->o_flags; - body->valid = obdo->o_valid; -// memcpy(&body->handle, &och->och_fh, sizeof(body->handle)); - - ptlrpc_req_set_repsize(req, 2, size); - - rc = ptlrpc_queue_wait(req); - ptlrpc_req_finished(req); - RETURN(rc); -} - -int mdc_readpage(struct obd_export *exp, struct ll_fid *fid, __u64 offset, - struct page *page, struct ptlrpc_request **request) -{ - struct obd_import *imp = class_exp2cliimp(exp); - struct ptlrpc_request *req = NULL; - struct ptlrpc_bulk_desc *desc = NULL; - struct mds_body *body; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - ENTRY; - - CDEBUG(D_INODE, "inode: "LPU64"\n", fid->id); - - req = ptlrpc_prep_req(imp, LUSTRE_MDS_VERSION, MDS_READPAGE, 2, size, - NULL); - if (req == NULL) - GOTO(out, rc = -ENOMEM); - - req->rq_request_portal = MDS_READPAGE_PORTAL; - ptlrpc_at_set_req_timeout(req); - - desc = ptlrpc_prep_bulk_imp(req, 1, BULK_PUT_SINK, MDS_BULK_PORTAL); - if (desc == NULL) - GOTO(out, rc = -ENOMEM); - /* NB req now owns desc and will free it when it gets freed */ - - ptlrpc_prep_bulk_page(desc, page, 0, CFS_PAGE_SIZE); - - mdc_readdir_pack(req, REQ_REC_OFF, offset, CFS_PAGE_SIZE, fid); - - ptlrpc_req_set_repsize(req, 2, size); - rc = ptlrpc_queue_wait(req); - - if (rc == 0) { - body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR("Can't unpack mds_body\n"); - GOTO(out, rc = -EPROTO); - } - - if (req->rq_bulk->bd_nob_transferred != CFS_PAGE_SIZE) { - CERROR ("Unexpected # bytes transferred: %d" - " (%lu expected)\n", - req->rq_bulk->bd_nob_transferred, - CFS_PAGE_SIZE); - GOTO (out, rc = -EPROTO); - } - } - - EXIT; - out: - *request = req; - return rc; -} - - -static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len, - void *karg, void *uarg) -{ - struct obd_device *obd = exp->exp_obd; - struct obd_ioctl_data *data = karg; - struct obd_import *imp = obd->u.cli.cl_import; - struct llog_ctxt *ctxt; - int rc; - ENTRY; - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - MOD_INC_USE_COUNT; -#else - if (!try_module_get(THIS_MODULE)) { - CERROR("Can't get module. Is it alive?"); - return -EINVAL; - } -#endif - switch (cmd) { - case OBD_IOC_CLIENT_RECOVER: - rc = ptlrpc_recover_import(imp, data->ioc_inlbuf1); - if (rc < 0) - GOTO(out, rc); - GOTO(out, rc = 0); - case IOC_OSC_SET_ACTIVE: - rc = ptlrpc_set_import_active(imp, data->ioc_offset); - GOTO(out, rc); - case OBD_IOC_PARSE: { - ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT); - rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL); - llog_ctxt_put(ctxt); - GOTO(out, rc); - } -#ifdef __KERNEL__ - case OBD_IOC_LLOG_INFO: - case OBD_IOC_LLOG_PRINT: { - ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT); - rc = llog_ioctl(ctxt, cmd, data); - llog_ctxt_put(ctxt); - GOTO(out, rc); - } -#endif - case OBD_IOC_POLL_QUOTACHECK: - rc = lquota_poll_check(quota_interface, exp, - (struct if_quotacheck *)karg); - GOTO(out, rc); - default: - CERROR("mdc_ioctl(): unrecognised ioctl %#x\n", cmd); - GOTO(out, rc = -ENOTTY); - } -out: -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - MOD_DEC_USE_COUNT; -#else - module_put(THIS_MODULE); -#endif - - return rc; -} - -int mdc_set_info_async(struct obd_export *exp, obd_count keylen, - void *key, obd_count vallen, void *val, - struct ptlrpc_request_set *set) -{ - struct obd_import *imp = class_exp2cliimp(exp); - int rc = -EINVAL; - - if (KEY_IS(KEY_INIT_RECOV)) { - if (vallen != sizeof(int)) - RETURN(-EINVAL); - spin_lock(&imp->imp_lock); - imp->imp_initial_recov = *(int *)val; - spin_unlock(&imp->imp_lock); - - CDEBUG(D_HA, "%s: set imp_initial_recov = %d\n", - exp->exp_obd->obd_name, imp->imp_initial_recov); - RETURN(0); - } - /* Turn off initial_recov after we try all backup servers once */ - if (KEY_IS(KEY_INIT_RECOV_BACKUP)) { - if (vallen != sizeof(int)) - RETURN(-EINVAL); - - spin_lock(&imp->imp_lock); - imp->imp_initial_recov_bk = *(int *)val; - if (imp->imp_initial_recov_bk) - imp->imp_initial_recov = 1; - spin_unlock(&imp->imp_lock); - - CDEBUG(D_HA, "%s: set imp_initial_recov_bk = %d\n", - exp->exp_obd->obd_name, imp->imp_initial_recov_bk); - RETURN(0); - } - if (KEY_IS("read-only")) { - struct ptlrpc_request *req; - int size[3] = { sizeof(struct ptlrpc_body), keylen, vallen }; - char *bufs[3] = { NULL, key, val }; - - if (vallen != sizeof(int)) - RETURN(-EINVAL); - - if (*((int *)val)) { - imp->imp_connect_flags_orig |= OBD_CONNECT_RDONLY; - imp->imp_connect_data.ocd_connect_flags |= - OBD_CONNECT_RDONLY; - } else { - imp->imp_connect_flags_orig &= ~OBD_CONNECT_RDONLY; - imp->imp_connect_data.ocd_connect_flags &= - ~OBD_CONNECT_RDONLY; - } - - req = ptlrpc_prep_req(imp, LUSTRE_MDS_VERSION, MDS_SET_INFO, - 3, size, bufs); - if (req == NULL) - RETURN(-ENOMEM); - - ptlrpc_req_set_repsize(req, 1, NULL); - if (set) { - rc = 0; - ptlrpc_set_add_req(set, req); - ptlrpc_check_set(set); - } else { - rc = ptlrpc_queue_wait(req); - ptlrpc_req_finished(req); - } - - RETURN(rc); - } - - RETURN(rc); -} - -int mdc_get_info(struct obd_export *exp, __u32 keylen, void *key, - __u32 *vallen, void *val) -{ - int rc = -EINVAL; - - if (keylen == strlen("max_easize") && - memcmp(key, "max_easize", strlen("max_easize")) == 0) { - int mdsize, *max_easize; - - if (*vallen != sizeof(int)) - RETURN(-EINVAL); - mdsize = *(int*)val; - if (mdsize > exp->exp_obd->u.cli.cl_max_mds_easize) - exp->exp_obd->u.cli.cl_max_mds_easize = mdsize; - max_easize = val; - *max_easize = exp->exp_obd->u.cli.cl_max_mds_easize; - RETURN(0); - } - RETURN(rc); -} - -static int mdc_statfs(struct obd_device *obd, struct obd_statfs *osfs, - __u64 max_age, __u32 flags) -{ - struct ptlrpc_request *req; - struct obd_statfs *msfs; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*msfs) }; - ENTRY; - - /* We could possibly pass max_age in the request (as an absolute - * timestamp or a "seconds.usec ago") so the target can avoid doing - * extra calls into the filesystem if that isn't necessary (e.g. - * during mount that would help a bit). Having relative timestamps - * is not so great if request processing is slow, while absolute - * timestamps are not ideal because they need time synchronization. */ - req = ptlrpc_prep_req(obd->u.cli.cl_import, LUSTRE_MDS_VERSION, - MDS_STATFS, 1, NULL, NULL); - if (!req) - RETURN(-ENOMEM); - - ptlrpc_req_set_repsize(req, 2, size); - - if (flags & OBD_STATFS_NODELAY) { - /* procfs requests not want stay in wait for avoid deadlock */ - req->rq_no_resend = 1; - req->rq_no_delay = 1; - } - - rc = ptlrpc_queue_wait(req); - - if (rc) - GOTO(out, rc); - - msfs = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*msfs), - lustre_swab_obd_statfs); - if (msfs == NULL) { - CERROR("Can't unpack obd_statfs\n"); - GOTO(out, rc = -EPROTO); - } - - memcpy(osfs, msfs, sizeof(*msfs)); - EXIT; -out: - ptlrpc_req_finished(req); - - return rc; -} - -static int mdc_pin(struct obd_export *exp, obd_id ino, __u32 gen, int type, - struct obd_client_handle *handle, int flag) -{ - struct ptlrpc_request *req; - struct mds_body *body; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - ENTRY; - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - MDS_PIN, 2, size, NULL); - if (req == NULL) - RETURN(-ENOMEM); - - body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body)); - mdc_pack_fid(&body->fid1, ino, gen, type); - body->flags = flag; - - ptlrpc_req_set_repsize(req, 2, size); - - mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL); - rc = ptlrpc_queue_wait(req); - mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL); - if (rc) { - CERROR("pin failed: %d\n", rc); - ptlrpc_req_finished(req); - RETURN(rc); - } - - body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - ptlrpc_req_finished(req); - RETURN(rc); - } - - memcpy(&handle->och_fh, &body->handle, sizeof(body->handle)); - handle->och_magic = OBD_CLIENT_HANDLE_MAGIC; - - OBD_ALLOC(handle->och_mod, sizeof(*handle->och_mod)); - if (handle->och_mod == NULL) { - DEBUG_REQ(D_ERROR, req, "can't allocate mdc_open_data"); - RETURN(-ENOMEM); - } - handle->och_mod->mod_open_req = req; /* will be dropped by unpin */ - - RETURN(rc); -} - -static int mdc_unpin(struct obd_export *exp, - struct obd_client_handle *handle, int flag) -{ - struct ptlrpc_request *req; - struct mds_body *body; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - ENTRY; - - if (handle->och_magic != OBD_CLIENT_HANDLE_MAGIC) - RETURN(0); - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - MDS_CLOSE, 2, size, NULL); - if (req == NULL) - RETURN(-ENOMEM); - - body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body)); - memcpy(&body->handle, &handle->och_fh, sizeof(body->handle)); - body->flags = flag; - - ptlrpc_req_set_repsize(req, 1, NULL); - mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL); - rc = ptlrpc_queue_wait(req); - mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL); - - if (rc != 0) - CERROR("unpin failed: %d\n", rc); - - ptlrpc_req_finished(req); - ptlrpc_req_finished(handle->och_mod->mod_open_req); - OBD_FREE(handle->och_mod, sizeof(*handle->och_mod)); - RETURN(rc); -} - -int mdc_sync(struct obd_export *exp, struct ll_fid *fid, - struct ptlrpc_request **request) -{ - struct ptlrpc_request *req; - int size[2] = { sizeof(struct ptlrpc_body), sizeof(struct mds_body) }; - int rc; - ENTRY; - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - MDS_SYNC, 2, size, NULL); - if (!req) - RETURN(rc = -ENOMEM); - - mdc_pack_req_body(req, REQ_REC_OFF, 0, fid, 0, 0); - - ptlrpc_req_set_repsize(req, 2, size); - - rc = ptlrpc_queue_wait(req); - if (rc || request == NULL) - ptlrpc_req_finished(req); - else - *request = req; - - RETURN(rc); -} - -static int mdc_import_event(struct obd_device *obd, struct obd_import *imp, - enum obd_import_event event) -{ - int rc = 0; - - LASSERT(imp->imp_obd == obd); - - switch (event) { - case IMP_EVENT_DISCON: { - ptlrpc_import_setasync(imp, -obd->obd_namespace->ns_max_unused); - break; - } - case IMP_EVENT_INACTIVE: { - rc = obd_notify_observer(obd, obd, OBD_NOTIFY_INACTIVE, NULL); - break; - } - case IMP_EVENT_INVALIDATE: { - struct ldlm_namespace *ns = obd->obd_namespace; - - ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY); - - break; - } - case IMP_EVENT_ACTIVE: { - rc = obd_notify_observer(obd, obd, OBD_NOTIFY_ACTIVE, NULL); - break; - } - case IMP_EVENT_OCD: - ptlrpc_import_setasync(imp, obd->obd_namespace->ns_max_unused); - break; - - default: - CERROR("Unknown import event %x\n", event); - LBUG(); - } - RETURN(rc); -} - -static int mdc_setup(struct obd_device *obd, obd_count len, void *buf) -{ - struct client_obd *cli = &obd->u.cli; - struct lprocfs_static_vars lvars = { 0 }; - int rc; - ENTRY; - - OBD_ALLOC(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock)); - if (!cli->cl_rpc_lock) - RETURN(-ENOMEM); - mdc_init_rpc_lock(cli->cl_rpc_lock); - - ptlrpcd_addref(); - - OBD_ALLOC(cli->cl_setattr_lock, sizeof (*cli->cl_setattr_lock)); - if (!cli->cl_setattr_lock) - GOTO(err_rpc_lock, rc = -ENOMEM); - mdc_init_rpc_lock(cli->cl_setattr_lock); - - OBD_ALLOC(cli->cl_close_lock, sizeof (*cli->cl_close_lock)); - if (!cli->cl_close_lock) - GOTO(err_setattr_lock, rc = -ENOMEM); - mdc_init_rpc_lock(cli->cl_close_lock); - - rc = client_obd_setup(obd, len, buf); - if (rc) - GOTO(err_close_lock, rc); - lprocfs_mdc_init_vars(&lvars); - if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0) - ptlrpc_lprocfs_register_obd(obd); - - rc = obd_llog_init(obd, obd, 0, NULL, NULL); - if (rc) { - mdc_cleanup(obd); - CERROR("failed to setup llogging subsystems\n"); - } - - RETURN(rc); - -err_close_lock: - OBD_FREE(cli->cl_close_lock, sizeof (*cli->cl_close_lock)); -err_setattr_lock: - OBD_FREE(cli->cl_setattr_lock, sizeof (*cli->cl_setattr_lock)); -err_rpc_lock: - OBD_FREE(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock)); - ptlrpcd_decref(); - RETURN(rc); -} - -/* Initialize the default and maximum LOV EA and cookie sizes. This allows - * us to make MDS RPCs with large enough reply buffers to hold the - * maximum-sized (= maximum striped) EA and cookie without having to - * calculate this (via a call into the LOV + OSCs) each time we make an RPC. */ -int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp) -{ - struct obd_device *obd = mdc_exp->exp_obd; - struct client_obd *cli = &obd->u.cli; - struct lov_stripe_md lsm = { .lsm_magic = LOV_MAGIC }; - struct lov_desc desc; - __u32 valsize = sizeof(desc); - __u32 stripes; - int rc, size; - ENTRY; - - rc = obd_get_info(lov_exp, strlen(KEY_LOVDESC) + 1, KEY_LOVDESC, - &valsize, &desc); - if (rc) - RETURN(rc); - - stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); - lsm.lsm_stripe_count = stripes; - size = obd_size_diskmd(lov_exp, &lsm); - - if (cli->cl_max_mds_easize < size) - cli->cl_max_mds_easize = size; - - lsm.lsm_stripe_count = desc.ld_default_stripe_count; - size = obd_size_diskmd(lov_exp, &lsm); - - if (cli->cl_default_mds_easize < size) - cli->cl_default_mds_easize = size; - - size = stripes * sizeof(struct llog_cookie); - if (cli->cl_max_mds_cookiesize < size) - cli->cl_max_mds_cookiesize = size; - - CDEBUG(D_HA, "updating max_mdsize/max_cookiesize: %d/%d\n", - cli->cl_max_mds_easize, cli->cl_max_mds_cookiesize); - - RETURN(0); -} - -static int mdc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) -{ - int rc = 0; - ENTRY; - - switch (stage) { - case OBD_CLEANUP_EARLY: - case OBD_CLEANUP_EXPORTS: - /* If we set up but never connected, the - client import will not have been cleaned. */ - if (obd->u.cli.cl_import) { - struct obd_import *imp; - imp = obd->u.cli.cl_import; - CERROR("client import never connected\n"); - ptlrpc_invalidate_import(imp); - ptlrpc_free_rq_pool(imp->imp_rq_pool); - class_destroy_import(imp); - obd->u.cli.cl_import = NULL; - } - break; - case OBD_CLEANUP_SELF_EXP: - rc = obd_llog_finish(obd, 0); - if (rc != 0) - CERROR("failed to cleanup llogging subsystems\n"); - case OBD_CLEANUP_OBD: - break; - } - RETURN(rc); -} - -static int mdc_cleanup(struct obd_device *obd) -{ - struct client_obd *cli = &obd->u.cli; - - OBD_FREE(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock)); - OBD_FREE(cli->cl_setattr_lock, sizeof (*cli->cl_setattr_lock)); - OBD_FREE(cli->cl_close_lock, sizeof (*cli->cl_close_lock)); - - ptlrpc_lprocfs_unregister_obd(obd); - lprocfs_obd_cleanup(obd); - ptlrpcd_decref(); - - return client_obd_cleanup(obd); -} - - -static int mdc_llog_init(struct obd_device *obd, struct obd_device *tgt, - int count, struct llog_catid *logid, - struct obd_uuid *uuid) -{ - struct llog_ctxt *ctxt; - int rc; - ENTRY; - - rc = llog_setup(obd, LLOG_CONFIG_REPL_CTXT, tgt, 0, NULL, - &llog_client_ops); - if (rc == 0) { - ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT); - ctxt->loc_imp = obd->u.cli.cl_import; - llog_ctxt_put(ctxt); - } - - rc = llog_setup(obd, LLOG_LOVEA_REPL_CTXT, tgt, 0, NULL, - &llog_client_ops); - if (rc == 0) { - ctxt = llog_get_context(obd, LLOG_LOVEA_REPL_CTXT); - ctxt->loc_imp = obd->u.cli.cl_import; - llog_ctxt_put(ctxt); - } - - RETURN(rc); -} - -static int mdc_llog_finish(struct obd_device *obd, int count) -{ - int rc; - ENTRY; - - rc = llog_cleanup(llog_get_context(obd, LLOG_LOVEA_REPL_CTXT)); - if (rc) { - CERROR("can not cleanup LLOG_CONFIG_REPL_CTXT rc %d\n", rc); - } - rc = llog_cleanup(llog_get_context(obd, LLOG_CONFIG_REPL_CTXT)); - RETURN(rc); -} - -static int mdc_process_config(struct obd_device *obd, obd_count len, void *buf) -{ - struct lustre_cfg *lcfg = buf; - struct lprocfs_static_vars lvars = { 0 }; - int rc = 0; - - lprocfs_mdc_init_vars(&lvars); - - rc = class_process_proc_param(PARAM_MDC, lvars.obd_vars, lcfg, obd); - return(rc); -} - -struct obd_ops mdc_obd_ops = { - .o_owner = THIS_MODULE, - .o_setup = mdc_setup, - .o_precleanup = mdc_precleanup, - .o_cleanup = mdc_cleanup, - .o_add_conn = client_import_add_conn, - .o_del_conn = client_import_del_conn, - .o_connect = client_connect_import, - .o_disconnect = client_disconnect_export, - .o_iocontrol = mdc_iocontrol, - .o_set_info_async = mdc_set_info_async, - .o_get_info = mdc_get_info, - .o_statfs = mdc_statfs, - .o_pin = mdc_pin, - .o_unpin = mdc_unpin, - .o_import_event = mdc_import_event, - .o_llog_init = mdc_llog_init, - .o_llog_finish = mdc_llog_finish, - .o_process_config = mdc_process_config, -}; - -int __init mdc_init(void) -{ - int rc; - struct lprocfs_static_vars lvars = { 0 }; - lprocfs_mdc_init_vars(&lvars); - request_module("lquota"); - quota_interface = PORTAL_SYMBOL_GET(mdc_quota_interface); - init_obd_quota_ops(quota_interface, &mdc_obd_ops); - - rc = class_register_type(&mdc_obd_ops, lvars.module_vars, - LUSTRE_MDC_NAME); - if (rc && quota_interface) - PORTAL_SYMBOL_PUT(mdc_quota_interface); - - RETURN(rc); -} - -#ifdef __KERNEL__ -static void /*__exit*/ mdc_exit(void) -{ - if (quota_interface) - PORTAL_SYMBOL_PUT(mdc_quota_interface); - - class_unregister_type(LUSTRE_MDC_NAME); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre Metadata Client"); -MODULE_LICENSE("GPL"); - -EXPORT_SYMBOL(mdc_req2lustre_md); -EXPORT_SYMBOL(mdc_free_lustre_md); -EXPORT_SYMBOL(mdc_change_cbdata); -EXPORT_SYMBOL(mdc_getstatus); -EXPORT_SYMBOL(mdc_getattr); -EXPORT_SYMBOL(mdc_getattr_name); -EXPORT_SYMBOL(mdc_create); -EXPORT_SYMBOL(mdc_unlink); -EXPORT_SYMBOL(mdc_rename); -EXPORT_SYMBOL(mdc_link); -EXPORT_SYMBOL(mdc_readpage); -EXPORT_SYMBOL(mdc_setattr); -EXPORT_SYMBOL(mdc_close); -EXPORT_SYMBOL(mdc_done_writing); -EXPORT_SYMBOL(mdc_sync); -EXPORT_SYMBOL(mdc_set_open_replay_data); -EXPORT_SYMBOL(mdc_clear_open_replay_data); -EXPORT_SYMBOL(mdc_store_inode_generation); -EXPORT_SYMBOL(mdc_init_ea_size); -EXPORT_SYMBOL(mdc_getxattr); -EXPORT_SYMBOL(mdc_setxattr); - -module_init(mdc_init); -module_exit(mdc_exit); -#endif diff --git a/lustre/mds/.cvsignore b/lustre/mds/.cvsignore deleted file mode 100644 index d5103fafd7..0000000000 --- a/lustre/mds/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -.deps -TAGS -.*.cmd -autoMakefile.in -autoMakefile -*.ko -*.mod.c -.*.o.flags -.tmp_versions -.depend diff --git a/lustre/mds/Makefile.in b/lustre/mds/Makefile.in deleted file mode 100644 index 96d7ec7f7c..0000000000 --- a/lustre/mds/Makefile.in +++ /dev/null @@ -1,5 +0,0 @@ -MODULES := mds -mds-objs := mds_log.o mds_unlink_open.o mds_lov.o handler.o mds_reint.o -mds-objs += mds_fs.o lproc_mds.o mds_open.o mds_lib.o mds_xattr.o mds_join.o - -@INCLUDE_RULES@ diff --git a/lustre/mds/autoMakefile.am b/lustre/mds/autoMakefile.am deleted file mode 100644 index e5bdbcfba4..0000000000 --- a/lustre/mds/autoMakefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -if MODULES -modulefs_DATA = mds$(KMODEXT) -endif - -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ -DIST_SOURCES := $(mds-objs:%.o=%.c) mds_internal.h diff --git a/lustre/mds/commit_confd.c b/lustre/mds/commit_confd.c deleted file mode 100644 index 8dd2fcdcb3..0000000000 --- a/lustre/mds/commit_confd.c +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2005 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -void commit_add(struct ) -{ - struct obd_import *import = commit_uuid2import(rec-> uuid); - - if (!import) { - CERROR("unaware of OST UUID %s - dorpping\n", rec-> uuid); - EXIT; - return; - } - - spin_lock(&import->llcconf_lock); - list_add(&rec-> &import); - spin_unlock(&import->llcconf_lock); - EXIT; - return; -} - -void commit_confd_conf_import(struct obd_import *import, - struct llog_commit_confirm_daemon *lccd) -{ - struct list_head *tmp, *save; - - - list_for_each_safe(&import->import_cc_list, tmp, save) { - struct llog_canceld_ctxt *cd; - - if (atomic_read(import->import_cc_count) <= - lccd->llcconf_lowwater) - break; - - cd = list_entry(tmp, struct llog_canceld_ctxt *, llcconf_entry); - atomic_dec(&import->import_cc_count); - commit_confd_add_and_fire(cd); - } - EXIT; - return; -} - - -int commit_confd_main(void *data) -{ - struct llog_commit_confirm_daemon *lccd = data; - - while (1) { - /* something has happened */ - event_wait(); - - if (lccd->flags & LCCD_STOP) - break; - - - /* lock llccd imporlist */ - spin_lock(&lccd->llcconf_lock); - list_for_each_safe(&lccd->llcconf_list, ) { - struct obd_import *import; - import = list_entry(&lccd->llcconf_list, - struct obd_import, - import_entry); - get_import(import); - spin_unlock(&lccd->llcconf_lock); - if (atomic_read(import->import_cc_count) > - lccd->llcconf_highwater) - commit_confd_conf_import(import); - put_import(import); - spin_lock(&lccd->llcconf_lock); - - } - spin_unlock(&lccd->llcconf_lock); - - } - - lccd->flags = LCCD_STOPPED; - RETURN(0); -} diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c deleted file mode 100644 index 072591a125..0000000000 --- a/lustre/mds/handler.c +++ /dev/null @@ -1,2822 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/mds/handler.c - * Lustre Metadata Server (mds) request handler - * - * Copyright (c) 2001-2005 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Andreas Dilger <adilger@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * Author: Mike Shaver <shaver@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDS - -#include <lustre_mds.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/random.h> -#include <linux/fs.h> -#include <linux/jbd.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# include <linux/smp_lock.h> -# include <linux/buffer_head.h> -# include <linux/workqueue.h> -# include <linux/mount.h> -#else -# include <linux/locks.h> -#endif - -#include <obd_class.h> -#include <lustre_dlm.h> -#include <obd_lov.h> -#include <lustre_fsfilt.h> -#include <lprocfs_status.h> -#include <lustre_commit_confd.h> -#include <lustre_quota.h> -#include <lustre_disk.h> -#include <lustre_param.h> - -#include "mds_internal.h" - -int mds_num_threads; -CFS_MODULE_PARM(mds_num_threads, "i", int, 0444, - "number of MDS service threads to start"); - -static int mds_intent_policy(struct ldlm_namespace *ns, - struct ldlm_lock **lockp, void *req_cookie, - ldlm_mode_t mode, int flags, void *data); -static int mds_postsetup(struct obd_device *obd); -static int mds_cleanup(struct obd_device *obd); - -/* Assumes caller has already pushed into the kernel filesystem context */ -static int mds_sendpage(struct ptlrpc_request *req, struct file *file, - loff_t offset, int count) -{ - struct ptlrpc_bulk_desc *desc; - struct l_wait_info lwi; - struct page **pages; - int timeout; - int rc = 0, npages, i, tmpcount, tmpsize = 0; - ENTRY; - - LASSERT((offset & ~CFS_PAGE_MASK) == 0); /* I'm dubious about this */ - - npages = (count + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT; - OBD_ALLOC(pages, sizeof(*pages) * npages); - if (!pages) - GOTO(out, rc = -ENOMEM); - - desc = ptlrpc_prep_bulk_exp(req, npages, BULK_PUT_SOURCE, - MDS_BULK_PORTAL); - if (desc == NULL) - GOTO(out_free, rc = -ENOMEM); - - for (i = 0, tmpcount = count; i < npages; i++, tmpcount -= tmpsize) { - tmpsize = tmpcount > CFS_PAGE_SIZE ? CFS_PAGE_SIZE : tmpcount; - - OBD_PAGE_ALLOC(pages[i], CFS_ALLOC_STD); - if (pages[i] == NULL) - GOTO(cleanup_buf, rc = -ENOMEM); - - ptlrpc_prep_bulk_page(desc, pages[i], 0, tmpsize); - } - - for (i = 0, tmpcount = count; i < npages; i++, tmpcount -= tmpsize) { - tmpsize = tmpcount > CFS_PAGE_SIZE ? CFS_PAGE_SIZE : tmpcount; - CDEBUG(D_EXT2, "reading %u@%llu from dir %lu (size %llu)\n", - tmpsize, offset, file->f_dentry->d_inode->i_ino, - i_size_read(file->f_dentry->d_inode)); - - rc = fsfilt_readpage(req->rq_export->exp_obd, file, - kmap(pages[i]), tmpsize, &offset); - kunmap(pages[i]); - - if (rc != tmpsize) - GOTO(cleanup_buf, rc = -EIO); - } - - LASSERT(desc->bd_nob == count); - - rc = ptlrpc_start_bulk_transfer(desc); - if (rc) - GOTO(cleanup_buf, rc); - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_SENDPAGE)) { - CERROR("obd_fail_loc=%x, fail operation rc=%d\n", - OBD_FAIL_MDS_SENDPAGE, rc); - GOTO(abort_bulk, rc); - } - - timeout = (int)req->rq_deadline - (int)cfs_time_current_sec(); - if (timeout < 0) { - CERROR("Req deadline already passed %lu (now: %lu)\n", - req->rq_deadline, cfs_time_current_sec()); - } - lwi = LWI_TIMEOUT(max(timeout, 1) * HZ, NULL, NULL); - rc = l_wait_event(desc->bd_waitq, !ptlrpc_bulk_active(desc), &lwi); - LASSERT (rc == 0 || rc == -ETIMEDOUT); - - if (rc == 0) { - if (desc->bd_success && - desc->bd_nob_transferred == count) - GOTO(cleanup_buf, rc); - - rc = -ETIMEDOUT; /* XXX should this be a different errno? */ - } - - DEBUG_REQ(D_ERROR, req, "bulk failed: %s %d(%d), evicting %s@%s\n", - (rc == -ETIMEDOUT) ? "timeout" : "network error", - desc->bd_nob_transferred, count, - req->rq_export->exp_client_uuid.uuid, - req->rq_export->exp_connection->c_remote_uuid.uuid); - - class_fail_export(req->rq_export); - - EXIT; - abort_bulk: - ptlrpc_abort_bulk (desc); - cleanup_buf: - for (i = 0; i < npages; i++) - if (pages[i]) - OBD_PAGE_FREE(pages[i]); - - ptlrpc_free_bulk(desc); - out_free: - OBD_FREE(pages, sizeof(*pages) * npages); - out: - return rc; -} - -/* only valid locked dentries or errors should be returned */ -struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid, - struct vfsmount **mnt, int lock_mode, - struct lustre_handle *lockh, - char *name, int namelen, __u64 lockpart) -{ - struct mds_obd *mds = &obd->u.mds; - struct dentry *de = mds_fid2dentry(mds, fid, mnt), *retval = de; - struct ldlm_res_id res_id = { .name = {0} }; - int flags = LDLM_FL_ATOMIC_CB, rc; - ldlm_policy_data_t policy = { .l_inodebits = { lockpart} }; - ENTRY; - - if (IS_ERR(de)) - RETURN(de); - - res_id.name[0] = de->d_inode->i_ino; - res_id.name[1] = de->d_inode->i_generation; - rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id, - LDLM_IBITS, &policy, lock_mode, &flags, - ldlm_blocking_ast, ldlm_completion_ast, - NULL, NULL, 0, NULL, lockh); - if (rc != ELDLM_OK) { - l_dput(de); - retval = ERR_PTR(-EIO); /* XXX translate ldlm code */ - } - - RETURN(retval); -} - -/* Look up an entry by inode number. */ -/* this function ONLY returns valid dget'd dentries with an initialized inode - or errors */ -struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid, - struct vfsmount **mnt) -{ - char fid_name[32]; - unsigned long ino = fid->id; - __u32 generation = fid->generation; - struct inode *inode; - struct dentry *result; - - if (ino == 0) - RETURN(ERR_PTR(-ESTALE)); - - snprintf(fid_name, sizeof(fid_name), "0x%lx", ino); - - CDEBUG(D_DENTRY, "--> mds_fid2dentry: ino/gen %lu/%u, sb %p\n", - ino, generation, mds->mds_obt.obt_sb); - - /* under ext3 this is neither supposed to return bad inodes - nor NULL inodes. */ - result = ll_lookup_one_len(fid_name, mds->mds_fid_de, strlen(fid_name)); - if (IS_ERR(result)) - RETURN(result); - - inode = result->d_inode; - if (!inode) - RETURN(ERR_PTR(-ENOENT)); - - if (inode->i_nlink == 0) { - if (inode->i_mode == 0 && - LTIME_S(inode->i_ctime) == 0 ) { - struct obd_device *obd = container_of(mds, struct - obd_device, u.mds); - LCONSOLE_WARN("Found inode with zero nlink, mode and " - "ctime -- this may indicate disk" - "corruption (device %s, inode %lu, link:" - " %lu, count: %d)\n", obd->obd_name, inode->i_ino, - (unsigned long)inode->i_nlink, - atomic_read(&inode->i_count)); - } - dput(result); - RETURN(ERR_PTR(-ENOENT)); - } - - if (generation && inode->i_generation != generation) { - /* we didn't find the right inode.. */ - CDEBUG(D_INODE, "found wrong generation: inode %lu, link: %lu, " - "count: %d, generation %u/%u\n", inode->i_ino, - (unsigned long)inode->i_nlink, - atomic_read(&inode->i_count), inode->i_generation, - generation); - dput(result); - RETURN(ERR_PTR(-ENOENT)); - } - - if (mnt) { - *mnt = mds->mds_vfsmnt; - mntget(*mnt); - } - - RETURN(result); -} - -static int mds_connect_internal(struct obd_export *exp, - struct obd_connect_data *data) -{ - struct obd_device *obd = exp->exp_obd; - if (data != NULL) { - data->ocd_connect_flags &= MDS_CONNECT_SUPPORTED; - data->ocd_ibits_known &= MDS_INODELOCK_FULL; - - /* If no known bits (which should not happen, probably, - as everybody should support LOOKUP and UPDATE bits at least) - revert to compat mode with plain locks. */ - if (!data->ocd_ibits_known && - data->ocd_connect_flags & OBD_CONNECT_IBITS) - data->ocd_connect_flags &= ~OBD_CONNECT_IBITS; - - if (!obd->u.mds.mds_fl_acl) - data->ocd_connect_flags &= ~OBD_CONNECT_ACL; - - if (!obd->u.mds.mds_fl_user_xattr) - data->ocd_connect_flags &= ~OBD_CONNECT_XATTR; - - exp->exp_connect_flags = data->ocd_connect_flags; - data->ocd_version = LUSTRE_VERSION_CODE; - exp->exp_mds_data.med_ibits_known = data->ocd_ibits_known; - } - - if (obd->u.mds.mds_fl_acl && - ((exp->exp_connect_flags & OBD_CONNECT_ACL) == 0)) { - CWARN("%s: MDS requires ACL support but client does not\n", - obd->obd_name); - return -EBADE; - } - return 0; -} - -static int mds_reconnect(struct obd_export *exp, struct obd_device *obd, - struct obd_uuid *cluuid, - struct obd_connect_data *data) -{ - int rc; - ENTRY; - - if (exp == NULL || obd == NULL || cluuid == NULL) - RETURN(-EINVAL); - - rc = mds_connect_internal(exp, data); - - RETURN(rc); -} - -/* Establish a connection to the MDS. - * - * This will set up an export structure for the client to hold state data - * about that client, like open files, the last operation number it did - * on the server, etc. - */ -static int mds_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid, struct obd_connect_data *data, - void *localdata) -{ - struct obd_export *exp; - struct mds_export_data *med; - struct mds_client_data *mcd = NULL; - lnet_nid_t *client_nid = (lnet_nid_t *)localdata; - int rc, abort_recovery; - ENTRY; - - if (!conn || !obd || !cluuid) - RETURN(-EINVAL); - - /* Check for aborted recovery. */ - spin_lock_bh(&obd->obd_processing_task_lock); - abort_recovery = obd->obd_abort_recovery; - spin_unlock_bh(&obd->obd_processing_task_lock); - if (abort_recovery) - target_abort_recovery(obd); - - /* XXX There is a small race between checking the list and adding a - * new connection for the same UUID, but the real threat (list - * corruption when multiple different clients connect) is solved. - * - * There is a second race between adding the export to the list, - * and filling in the client data below. Hence skipping the case - * of NULL mcd above. We should already be controlling multiple - * connects at the client, and we can't hold the spinlock over - * memory allocations without risk of deadlocking. - */ - rc = class_connect(conn, obd, cluuid); - if (rc) - RETURN(rc); - exp = class_conn2export(conn); - LASSERT(exp); - med = &exp->exp_mds_data; - - rc = mds_connect_internal(exp, data); - if (rc) - GOTO(out, rc); - - OBD_ALLOC(mcd, sizeof(*mcd)); - if (!mcd) - GOTO(out, rc = -ENOMEM); - - memcpy(mcd->mcd_uuid, cluuid, sizeof(mcd->mcd_uuid)); - med->med_mcd = mcd; - - rc = mds_client_add(obd, exp, -1, *client_nid); - GOTO(out, rc); - -out: - if (rc) { - if (mcd) { - OBD_FREE(mcd, sizeof(*mcd)); - med->med_mcd = NULL; - } - class_disconnect(exp); - } else { - class_export_put(exp); - } - - RETURN(rc); -} - -int mds_init_export(struct obd_export *exp) -{ - struct mds_export_data *med = &exp->exp_mds_data; - - INIT_LIST_HEAD(&med->med_open_head); - spin_lock_init(&med->med_open_lock); - - spin_lock(&exp->exp_lock); - exp->exp_connecting = 1; - spin_unlock(&exp->exp_lock); - - RETURN(0); -} - -static int mds_destroy_export(struct obd_export *export) -{ - struct mds_export_data *med; - struct obd_device *obd = export->exp_obd; - struct mds_obd *mds = &obd->u.mds; - struct lvfs_run_ctxt saved; - struct lov_mds_md *lmm; - struct llog_cookie *logcookies; - int rc = 0; - ENTRY; - - med = &export->exp_mds_data; - target_destroy_export(export); - - if (obd_uuid_equals(&export->exp_client_uuid, &obd->obd_uuid)) - RETURN(0); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - /* Close any open files (which may also cause orphan unlinking). */ - - OBD_ALLOC(lmm, mds->mds_max_mdsize); - if (lmm == NULL) { - CWARN("%s: allocation failure during cleanup; can not force " - "close file handles on this service.\n", obd->obd_name); - GOTO(out, rc = -ENOMEM); - } - - OBD_ALLOC(logcookies, mds->mds_max_cookiesize); - if (logcookies == NULL) { - CWARN("%s: allocation failure during cleanup; can not force " - "close file handles on this service.\n", obd->obd_name); - OBD_FREE(lmm, mds->mds_max_mdsize); - GOTO(out, rc = -ENOMEM); - } - - spin_lock(&med->med_open_lock); - while (!list_empty(&med->med_open_head)) { - struct list_head *tmp = med->med_open_head.next; - struct mds_file_data *mfd = - list_entry(tmp, struct mds_file_data, mfd_list); - int lmm_size = mds->mds_max_mdsize; - umode_t mode = mfd->mfd_dentry->d_inode->i_mode; - __u64 valid = 0; - - /* Remove mfd handle so it can't be found again. - * We are consuming the mfd_list reference here. */ - mds_mfd_unlink(mfd, 0); - spin_unlock(&med->med_open_lock); - - /* If you change this message, be sure to update - * replay_single:test_46 */ - CDEBUG(D_INODE|D_IOCTL, "%s: force closing file handle for " - "%.*s (ino %lu)\n", obd->obd_name, - mfd->mfd_dentry->d_name.len,mfd->mfd_dentry->d_name.name, - mfd->mfd_dentry->d_inode->i_ino); - - rc = mds_get_md(obd, mfd->mfd_dentry->d_inode, lmm, - &lmm_size, 1, 0); - if (rc < 0) - CWARN("mds_get_md failure, rc=%d\n", rc); - else - valid |= OBD_MD_FLEASIZE; - - /* child orphan sem protects orphan_dec_test and - * is_orphan race, mds_mfd_close drops it */ - MDS_DOWN_WRITE_ORPHAN_SEM(mfd->mfd_dentry->d_inode); - - rc = mds_mfd_close(NULL, REQ_REC_OFF, obd, mfd, - !(export->exp_flags & OBD_OPT_FAILOVER), - lmm, lmm_size, logcookies, - mds->mds_max_cookiesize, - &valid); - - if (rc) - CDEBUG(D_INODE|D_IOCTL, "Error closing file: %d\n", rc); - - if (valid & OBD_MD_FLCOOKIE) { - rc = mds_osc_destroy_orphan(obd, mode, lmm, - lmm_size, logcookies, 1); - if (rc < 0) { - CDEBUG(D_INODE, "%s: destroy of orphan failed," - " rc = %d\n", obd->obd_name, rc); - rc = 0; - } - valid &= ~OBD_MD_FLCOOKIE; - } - - spin_lock(&med->med_open_lock); - } - - OBD_FREE(logcookies, mds->mds_max_cookiesize); - OBD_FREE(lmm, mds->mds_max_mdsize); - - spin_unlock(&med->med_open_lock); - - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - mds_client_free(export); - - out: - RETURN(rc); -} - -static int mds_disconnect(struct obd_export *exp) -{ - int rc = 0; - ENTRY; - - LASSERT(exp); - class_export_get(exp); - - /* Disconnect early so that clients can't keep using export */ - rc = class_disconnect(exp); - if (exp->exp_obd->obd_namespace != NULL) - ldlm_cancel_locks_for_export(exp); - - /* complete all outstanding replies */ - spin_lock(&exp->exp_lock); - while (!list_empty(&exp->exp_outstanding_replies)) { - struct ptlrpc_reply_state *rs = - list_entry(exp->exp_outstanding_replies.next, - struct ptlrpc_reply_state, rs_exp_list); - struct ptlrpc_service *svc = rs->rs_service; - - spin_lock(&svc->srv_lock); - list_del_init(&rs->rs_exp_list); - ptlrpc_schedule_difficult_reply(rs); - spin_unlock(&svc->srv_lock); - } - spin_unlock(&exp->exp_lock); - - class_export_put(exp); - RETURN(rc); -} - -static int mds_getstatus(struct ptlrpc_request *req) -{ - struct mds_obd *mds = mds_req2mds(req); - struct mds_body *body; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - ENTRY; - - OBD_FAIL_RETURN(OBD_FAIL_MDS_GETSTATUS_PACK, req->rq_status = -ENOMEM); - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - RETURN(req->rq_status = rc); - - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*body)); - memcpy(&body->fid1, &mds->mds_rootfid, sizeof(body->fid1)); - - /* the last_committed and last_xid fields are filled in for all - * replies already - no need to do so here also. - */ - RETURN(0); -} - -/* get the LOV EA from @inode and store it into @md. It can be at most - * @size bytes, and @size is updated with the actual EA size. - * The EA size is also returned on success, and -ve errno on failure. - * If there is no EA then 0 is returned. */ -int mds_get_md(struct obd_device *obd, struct inode *inode, void *md, - int *size, int lock, int flags) -{ - int rc = 0; - int lmm_size = 0; - - if (lock) - LOCK_INODE_MUTEX(inode); - rc = fsfilt_get_md(obd, inode, md, *size, "lov"); - - if (rc == 0 && flags == MDS_GETATTR) - rc = mds_get_default_md(obd, md, &lmm_size); - - if (rc < 0) { - CERROR("Error %d reading eadata for ino %lu\n", - rc, inode->i_ino); - } else if (rc > 0) { - lmm_size = rc; - rc = mds_convert_lov_ea(obd, inode, md, lmm_size); - - if (rc == 0) { - *size = lmm_size; - rc = lmm_size; - } else if (rc > 0) { - *size = rc; - } - } else { - *size = 0; - } - if (lock) - UNLOCK_INODE_MUTEX(inode); - - RETURN (rc); -} - - -/* Call with lock=1 if you want mds_pack_md to take the i_mutex. - * Call with lock=0 if the caller has already taken the i_mutex. */ -int mds_pack_md(struct obd_device *obd, struct lustre_msg *msg, int offset, - struct mds_body *body, struct inode *inode, int lock, int flags) -{ - struct mds_obd *mds = &obd->u.mds; - void *lmm; - int lmm_size; - int rc; - ENTRY; - - lmm = lustre_msg_buf(msg, offset, 0); - if (lmm == NULL) { - /* Some problem with getting eadata when I sized the reply - * buffer... */ - CDEBUG(D_INFO, "no space reserved for inode %lu MD\n", - inode->i_ino); - RETURN(0); - } - lmm_size = lustre_msg_buflen(msg, offset); - - /* I don't really like this, but it is a sanity check on the client - * MD request. However, if the client doesn't know how much space - * to reserve for the MD, it shouldn't be bad to have too much space. - */ - if (lmm_size > mds->mds_max_mdsize) { - CWARN("Reading MD for inode %lu of %d bytes > max %d\n", - inode->i_ino, lmm_size, mds->mds_max_mdsize); - // RETURN(-EINVAL); - } - - rc = mds_get_md(obd, inode, lmm, &lmm_size, lock, flags); - if (rc > 0) { - if (S_ISDIR(inode->i_mode)) - body->valid |= OBD_MD_FLDIREA; - else - body->valid |= OBD_MD_FLEASIZE; - body->eadatasize = lmm_size; - rc = 0; - } - - RETURN(rc); -} - -#ifdef CONFIG_FS_POSIX_ACL -static -int mds_pack_posix_acl(struct inode *inode, struct lustre_msg *repmsg, - struct mds_body *repbody, int repoff) -{ - struct dentry de = { .d_inode = inode }; - int buflen, rc; - ENTRY; - - LASSERT(repbody->aclsize == 0); - LASSERT(lustre_msg_bufcount(repmsg) > repoff); - - buflen = lustre_msg_buflen(repmsg, repoff); - if (!buflen) - GOTO(out, 0); - - if (!inode->i_op || !inode->i_op->getxattr) - GOTO(out, 0); - - lock_24kernel(); - rc = inode->i_op->getxattr(&de, MDS_XATTR_NAME_ACL_ACCESS, - lustre_msg_buf(repmsg, repoff, buflen), - buflen); - unlock_24kernel(); - - if (rc >= 0) - repbody->aclsize = rc; - else if (rc != -ENODATA) { - CERROR("buflen %d, get acl: %d\n", buflen, rc); - RETURN(rc); - } - EXIT; -out: - repbody->valid |= OBD_MD_FLACL; - return 0; -} -#else -#define mds_pack_posix_acl(inode, repmsg, repbody, repoff) 0 -#endif - -int mds_pack_acl(struct mds_export_data *med, struct inode *inode, - struct lustre_msg *repmsg, struct mds_body *repbody, - int repoff) -{ - return mds_pack_posix_acl(inode, repmsg, repbody, repoff); -} - -static int mds_getattr_internal(struct obd_device *obd, struct dentry *dentry, - struct ptlrpc_request *req, - struct mds_body *reqbody, int reply_off) -{ - struct mds_body *body; - struct inode *inode = dentry->d_inode; - int rc = 0; - int flags = 0; - ENTRY; - - if (inode == NULL) - RETURN(-ENOENT); - - body = lustre_msg_buf(req->rq_repmsg, reply_off, sizeof(*body)); - LASSERT(body != NULL); /* caller prepped reply */ - - mds_pack_inode2fid(&body->fid1, inode); - body->flags = reqbody->flags; /* copy MDS_BFLAG_EXT_FLAGS if present */ - mds_pack_inode2body(body, inode); - reply_off++; - - if ((S_ISREG(inode->i_mode) && (reqbody->valid & OBD_MD_FLEASIZE)) || - (S_ISDIR(inode->i_mode) && (reqbody->valid & OBD_MD_FLDIREA))) { - if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_GETATTR && - ((S_ISDIR(inode->i_mode) && (reqbody->valid & OBD_MD_FLDIREA)))) - flags = MDS_GETATTR; - - rc = mds_pack_md(obd, req->rq_repmsg, reply_off, body, - inode, 1, flags); - - /* If we have LOV EA data, the OST holds size, atime, mtime */ - if (!(body->valid & OBD_MD_FLEASIZE) && - !(body->valid & OBD_MD_FLDIREA)) - body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME); - - lustre_shrink_reply(req, reply_off, body->eadatasize, 0); - if (body->eadatasize) - reply_off++; - } else if (S_ISLNK(inode->i_mode) && - (reqbody->valid & OBD_MD_LINKNAME) != 0) { - char *symname = lustre_msg_buf(req->rq_repmsg, reply_off, 0); - int len; - - LASSERT (symname != NULL); /* caller prepped reply */ - len = lustre_msg_buflen(req->rq_repmsg, reply_off); - - rc = inode->i_op->readlink(dentry, symname, len); - if (rc < 0) { - CERROR("readlink failed: %d\n", rc); - } else if (rc != len - 1) { - CERROR ("Unexpected readlink rc %d: expecting %d\n", - rc, len - 1); - rc = -EINVAL; - } else { - CDEBUG(D_INODE, "read symlink dest %s\n", symname); - body->valid |= OBD_MD_LINKNAME; - body->eadatasize = rc + 1; - symname[rc] = 0; /* NULL terminate */ - rc = 0; - } - reply_off++; - } else if (reqbody->valid == OBD_MD_FLFLAGS && - reqbody->flags & MDS_BFLAG_EXT_FLAGS) { - int flags; - - /* We only return the full set of flags on ioctl, otherwise we - * get enough flags from the inode in mds_pack_inode2body(). */ - rc = fsfilt_iocontrol(obd, inode, NULL, EXT3_IOC_GETFLAGS, - (long)&flags); - if (rc == 0) - body->flags = flags | MDS_BFLAG_EXT_FLAGS; - } - - if (reqbody->valid & OBD_MD_FLMODEASIZE) { - struct mds_obd *mds = mds_req2mds(req); - body->max_cookiesize = mds->mds_max_cookiesize; - body->max_mdsize = mds->mds_max_mdsize; - body->valid |= OBD_MD_FLMODEASIZE; - } - - if (rc) - RETURN(rc); - -#ifdef CONFIG_FS_POSIX_ACL - if ((req->rq_export->exp_connect_flags & OBD_CONNECT_ACL) && - (reqbody->valid & OBD_MD_FLACL)) { - rc = mds_pack_acl(&req->rq_export->exp_mds_data, - inode, req->rq_repmsg, - body, reply_off); - - lustre_shrink_reply(req, reply_off, body->aclsize, 0); - if (body->aclsize) - reply_off++; - } -#endif - - RETURN(rc); -} - -static int mds_getattr_pack_msg(struct ptlrpc_request *req, struct inode *inode, - int offset) -{ - struct mds_obd *mds = mds_req2mds(req); - struct mds_body *body; - int rc, bufcount = 2; - int size[4] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - ENTRY; - - LASSERT(offset == REQ_REC_OFF); /* non-intent */ - - body = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*body)); - LASSERT(body != NULL); /* checked by caller */ - LASSERT(lustre_req_swabbed(req, offset)); /* swabbed by caller */ - - if ((S_ISREG(inode->i_mode) && (body->valid & OBD_MD_FLEASIZE)) || - (S_ISDIR(inode->i_mode) && (body->valid & OBD_MD_FLDIREA))) { - LOCK_INODE_MUTEX(inode); - rc = fsfilt_get_md(req->rq_export->exp_obd, inode, NULL, 0, - "lov"); - UNLOCK_INODE_MUTEX(inode); - CDEBUG(D_INODE, "got %d bytes MD data for inode %lu\n", - rc, inode->i_ino); - if ((rc == 0) && (lustre_msg_get_opc(req->rq_reqmsg) == MDS_GETATTR) && - ((S_ISDIR(inode->i_mode) && (body->valid & OBD_MD_FLDIREA)))) - rc = sizeof(struct lov_mds_md); - if (rc < 0) { - if (rc != -ENODATA) { - CERROR("error getting inode %lu MD: rc = %d\n", - inode->i_ino, rc); - RETURN(rc); - } - size[bufcount] = 0; - } else if (rc > mds->mds_max_mdsize) { - size[bufcount] = 0; - CERROR("MD size %d larger than maximum possible %u\n", - rc, mds->mds_max_mdsize); - } else { - size[bufcount] = rc; - } - bufcount++; - } else if (S_ISLNK(inode->i_mode) && (body->valid & OBD_MD_LINKNAME)) { - if (i_size_read(inode) + 1 != body->eadatasize) - CERROR("symlink size: %Lu, reply space: %d\n", - i_size_read(inode) + 1, body->eadatasize); - size[bufcount] = min_t(int, i_size_read(inode) + 1, - body->eadatasize); - bufcount++; - CDEBUG(D_INODE, "symlink size: %Lu, reply space: %d\n", - i_size_read(inode) + 1, body->eadatasize); - } - -#ifdef CONFIG_FS_POSIX_ACL - if ((req->rq_export->exp_connect_flags & OBD_CONNECT_ACL) && - (body->valid & OBD_MD_FLACL)) { - struct dentry de = { .d_inode = inode }; - - size[bufcount] = 0; - if (inode->i_op && inode->i_op->getxattr) { - lock_24kernel(); - rc = inode->i_op->getxattr(&de, MDS_XATTR_NAME_ACL_ACCESS, - NULL, 0); - unlock_24kernel(); - - if (rc < 0) { - if (rc != -ENODATA) { - CERROR("got acl size: %d\n", rc); - RETURN(rc); - } - } else - size[bufcount] = rc; - } - bufcount++; - } -#endif - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_GETATTR_PACK)) { - CERROR("failed MDS_GETATTR_PACK test\n"); - req->rq_status = -ENOMEM; - RETURN(-ENOMEM); - } - - rc = lustre_pack_reply(req, bufcount, size, NULL); - if (rc) { - req->rq_status = rc; - RETURN(rc); - } - - RETURN(0); -} - -static int mds_getattr_lock(struct ptlrpc_request *req, int offset, - int child_part, struct lustre_handle *child_lockh) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_obd *mds = &obd->u.mds; - struct ldlm_reply *rep = NULL; - struct lvfs_run_ctxt saved; - struct mds_body *body; - struct dentry *dparent = NULL, *dchild = NULL; - struct lvfs_ucred uc = {NULL,}; - struct lustre_handle parent_lockh; - int namesize; - int rc = 0, cleanup_phase = 0, resent_req = 0; - char *name; - ENTRY; - - LASSERT(!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME)); - - /* Swab now, before anyone looks inside the request */ - body = lustre_swab_reqbuf(req, offset, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR("Can't swab mds_body\n"); - RETURN(-EFAULT); - } - - lustre_set_req_swabbed(req, offset + 1); - name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0); - if (name == NULL) { - CERROR("Can't unpack name\n"); - RETURN(-EFAULT); - } - namesize = lustre_msg_buflen(req->rq_reqmsg, offset + 1); - /* namesize less than 2 means we have empty name, probably came from - revalidate by cfid, so no point in having name to be set */ - if (namesize <= 1) - name = NULL; - - rc = mds_init_ucred(&uc, req, offset); - if (rc) - GOTO(cleanup, rc); - - LASSERT(offset == REQ_REC_OFF || offset == DLM_INTENT_REC_OFF); - /* if requests were at offset 2, the getattr reply goes back at 1 */ - if (offset == DLM_INTENT_REC_OFF) { - rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, - sizeof(*rep)); - offset = DLM_REPLY_REC_OFF; - } - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); - cleanup_phase = 1; /* kernel context */ - intent_set_disposition(rep, DISP_LOOKUP_EXECD); - - /* FIXME: handle raw lookup */ -#if 0 - if (body->valid == OBD_MD_FLID) { - struct mds_body *mds_reply; - int size = sizeof(*mds_reply); - ino_t inum; - // The user requested ONLY the inode number, so do a raw lookup - rc = lustre_pack_reply(req, 1, &size, NULL); - if (rc) { - CERROR("out of memory\n"); - GOTO(cleanup, rc); - } - - rc = dir->i_op->lookup_raw(dir, name, namesize - 1, &inum); - - mds_reply = lustre_msg_buf(req->rq_repmsg, offset, - sizeof(*mds_reply)); - mds_reply->fid1.id = inum; - mds_reply->valid = OBD_MD_FLID; - GOTO(cleanup, rc); - } -#endif - - if (lustre_handle_is_used(child_lockh)) { - LASSERT(lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT); - resent_req = 1; - } - - if (resent_req == 0) { - if (name) { - OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_RESEND, obd_timeout*2); - rc = mds_get_parent_child_locked(obd, &obd->u.mds, - &body->fid1, - &parent_lockh, - &dparent, LCK_CR, - MDS_INODELOCK_UPDATE, - name, namesize, - child_lockh, &dchild, - LCK_CR, child_part); - } else { - /* For revalidate by fid we always take UPDATE lock */ - dchild = mds_fid2locked_dentry(obd, &body->fid2, NULL, - LCK_CR, child_lockh, - NULL, 0, child_part); - LASSERT(dchild); - if (IS_ERR(dchild)) - rc = PTR_ERR(dchild); - } - if (rc) - GOTO(cleanup, rc); - } else { - struct ldlm_lock *granted_lock; - struct ll_fid child_fid; - struct ldlm_resource *res; - DEBUG_REQ(D_DLMTRACE, req, "resent, not enqueuing new locks"); - granted_lock = ldlm_handle2lock(child_lockh); - LASSERTF(granted_lock != NULL, LPU64"/%u lockh "LPX64"\n", - body->fid1.id, body->fid1.generation, - child_lockh->cookie); - - - res = granted_lock->l_resource; - child_fid.id = res->lr_name.name[0]; - child_fid.generation = res->lr_name.name[1]; - dchild = mds_fid2dentry(&obd->u.mds, &child_fid, NULL); - LASSERT(!IS_ERR(dchild)); - LDLM_LOCK_PUT(granted_lock); - } - - cleanup_phase = 2; /* dchild, dparent, locks */ - - if (dchild->d_inode == NULL) { - intent_set_disposition(rep, DISP_LOOKUP_NEG); - /* in the intent case, the policy clears this error: - the disposition is enough */ - GOTO(cleanup, rc = -ENOENT); - } else { - intent_set_disposition(rep, DISP_LOOKUP_POS); - } - - if (req->rq_repmsg == NULL) { - rc = mds_getattr_pack_msg(req, dchild->d_inode, offset); - if (rc != 0) { - CERROR ("mds_getattr_pack_msg: %d\n", rc); - GOTO (cleanup, rc); - } - } - - rc = mds_getattr_internal(obd, dchild, req, body, offset); - GOTO(cleanup, rc); /* returns the lock to the client */ - - cleanup: - switch (cleanup_phase) { - case 2: - if (resent_req == 0) { - if (rc && dchild->d_inode) - ldlm_lock_decref(child_lockh, LCK_CR); - if (name) { - ldlm_lock_decref(&parent_lockh, LCK_CR); - l_dput(dparent); - } - } - l_dput(dchild); - case 1: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); - default: - mds_exit_ucred(&uc, mds); - if (!req->rq_packed_final) { - int rc2 = lustre_pack_reply(req, 1, NULL, NULL); - if (rc == 0) - rc = rc2; - req->rq_status = rc; - } - } - return rc; -} - -static int mds_getattr(struct ptlrpc_request *req, int offset) -{ - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct lvfs_run_ctxt saved; - struct dentry *de; - struct mds_body *body; - struct lvfs_ucred uc = { NULL, }; - int rc = 0; - ENTRY; - - OBD_COUNTER_INCREMENT(obd, getattr); - - body = lustre_swab_reqbuf(req, offset, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) - RETURN(-EFAULT); - - rc = mds_init_ucred(&uc, req, offset); - if (rc) - GOTO(out_ucred, rc); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); - de = mds_fid2dentry(mds, &body->fid1, NULL); - if (IS_ERR(de)) { - rc = req->rq_status = PTR_ERR(de); - GOTO(out_pop, rc); - } - - rc = mds_getattr_pack_msg(req, de->d_inode, offset); - if (rc != 0) { - CERROR("mds_getattr_pack_msg: %d\n", rc); - GOTO(out_pop, rc); - } - - req->rq_status = mds_getattr_internal(obd, de, req, body,REPLY_REC_OFF); - - l_dput(de); - GOTO(out_pop, rc); -out_pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); -out_ucred: - if (!req->rq_packed_final) { - int rc2 = lustre_pack_reply(req, 1, NULL, NULL); - if (rc == 0) - rc = rc2; - req->rq_status = rc; - } - mds_exit_ucred(&uc, mds); - return rc; -} - -static int mds_obd_statfs(struct obd_device *obd, struct obd_statfs *osfs, - __u64 max_age, __u32 flags) -{ - int rc; - - spin_lock(&obd->obd_osfs_lock); - rc = fsfilt_statfs(obd, obd->u.obt.obt_sb, max_age); - if (rc == 0) - memcpy(osfs, &obd->obd_osfs, sizeof(*osfs)); - spin_unlock(&obd->obd_osfs_lock); - - return rc; -} - -static int mds_statfs(struct ptlrpc_request *req) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct ptlrpc_service *svc = req->rq_rqbd->rqbd_service; - int rc, size[2] = { sizeof(struct ptlrpc_body), - sizeof(struct obd_statfs) }; - ENTRY; - - /* This will trigger a watchdog timeout */ - OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_STATFS_LCW_SLEEP, - (MDS_SERVICE_WATCHDOG_FACTOR * - at_get(&svc->srv_at_estimate) / 1000) + 1); - OBD_COUNTER_INCREMENT(obd, statfs); - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_STATFS_PACK)) - GOTO(out, rc = -ENOMEM); - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - GOTO(out, rc); - - /* We call this so that we can cache a bit - 1 jiffie worth */ - rc = mds_obd_statfs(obd, lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - size[REPLY_REC_OFF]), - cfs_time_current_64() - HZ, 0); - if (rc) { - CERROR("mds_obd_statfs failed: rc %d\n", rc); - GOTO(out, rc); - } - - EXIT; -out: - req->rq_status = rc; - return 0; -} - -static int mds_sync(struct ptlrpc_request *req, int offset) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_obd *mds = &obd->u.mds; - struct mds_body *body; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - ENTRY; - - body = lustre_swab_reqbuf(req, offset, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) - GOTO(out, rc = -EFAULT); - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_SYNC_PACK)) - GOTO(out, rc = -ENOMEM); - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - GOTO(out, rc); - - rc = fsfilt_sync(obd, obd->u.obt.obt_sb); - if (rc == 0 && body->fid1.id != 0) { - struct dentry *de; - - de = mds_fid2dentry(mds, &body->fid1, NULL); - if (IS_ERR(de)) - GOTO(out, rc = PTR_ERR(de)); - - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - mds_pack_inode2fid(&body->fid1, de->d_inode); - mds_pack_inode2body(body, de->d_inode); - - l_dput(de); - } - GOTO(out, rc); -out: - req->rq_status = rc; - return 0; -} - -/* mds_readpage does not take a DLM lock on the inode, because the client must - * already have a PR lock. - * - * If we were to take another one here, a deadlock will result, if another - * thread is already waiting for a PW lock. */ -static int mds_readpage(struct ptlrpc_request *req, int offset) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_obd *mds = &obd->u.mds; - struct vfsmount *mnt; - struct dentry *de; - struct file *file; - struct mds_body *body, *repbody; - struct lvfs_run_ctxt saved; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) }; - struct lvfs_ucred uc = {NULL,}; - ENTRY; - - OBD_FAIL_RETURN(OBD_FAIL_MDS_READPAGE_PACK, -ENOMEM); - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - GOTO(out, rc); - - body = lustre_swab_reqbuf(req, offset, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) - GOTO (out, rc = -EFAULT); - - rc = mds_init_ucred(&uc, req, offset); - if (rc) - GOTO(out, rc); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); - de = mds_fid2dentry(&obd->u.mds, &body->fid1, &mnt); - if (IS_ERR(de)) - GOTO(out_pop, rc = PTR_ERR(de)); - - CDEBUG(D_INODE, "ino %lu\n", de->d_inode->i_ino); - - file = dentry_open(de, mnt, O_RDONLY | O_LARGEFILE); - /* note: in case of an error, dentry_open puts dentry */ - if (IS_ERR(file)) - GOTO(out_pop, rc = PTR_ERR(file)); - - /* body->size is actually the offset -eeb */ - if ((body->size & (de->d_inode->i_sb->s_blocksize - 1)) != 0) { - CERROR("offset "LPU64" not on a block boundary of %lu\n", - body->size, de->d_inode->i_sb->s_blocksize); - GOTO(out_file, rc = -EFAULT); - } - - /* body->nlink is actually the #bytes to read -eeb */ - if (body->nlink & (de->d_inode->i_sb->s_blocksize - 1)) { - CERROR("size %u is not multiple of blocksize %lu\n", - body->nlink, de->d_inode->i_sb->s_blocksize); - GOTO(out_file, rc = -EFAULT); - } - - repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*repbody)); - repbody->size = i_size_read(file->f_dentry->d_inode); - repbody->valid = OBD_MD_FLSIZE; - - /* to make this asynchronous make sure that the handling function - doesn't send a reply when this function completes. Instead a - callback function would send the reply */ - /* body->size is actually the offset -eeb */ - rc = mds_sendpage(req, file, body->size, body->nlink); - -out_file: - filp_close(file, 0); -out_pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); -out: - mds_exit_ucred(&uc, mds); - req->rq_status = rc; - RETURN(0); -} - -int mds_reint(struct ptlrpc_request *req, int offset, - struct lustre_handle *lockh) -{ - struct mds_update_record *rec; /* 116 bytes on the stack? no sir! */ - int rc; - - OBD_ALLOC(rec, sizeof(*rec)); - if (rec == NULL) - RETURN(-ENOMEM); - - rc = mds_update_unpack(req, offset, rec); - if (rc || OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_UNPACK)) { - CERROR("invalid record\n"); - GOTO(out, req->rq_status = -EINVAL); - } - - mds_root_squash(&req->rq_export->exp_obd->u.mds, &req->rq_peer.nid, - &rec->ur_uc.luc_fsuid, &rec->ur_uc.luc_fsgid, - &rec->ur_uc.luc_cap, &rec->ur_uc.luc_suppgid1, - &rec->ur_uc.luc_suppgid2); - - /* rc will be used to interrupt a for loop over multiple records */ - rc = mds_reint_rec(rec, offset, req, lockh); - out: - OBD_FREE(rec, sizeof(*rec)); - return rc; -} - -static int mds_filter_recovery_request(struct ptlrpc_request *req, - struct obd_device *obd, int *process) -{ - switch (lustre_msg_get_opc(req->rq_reqmsg)) { - case MDS_CONNECT: /* This will never get here, but for completeness. */ - case OST_CONNECT: /* This will never get here, but for completeness. */ - case MDS_DISCONNECT: - case OST_DISCONNECT: - *process = 1; - RETURN(0); - - case MDS_CLOSE: - case MDS_SYNC: /* used in unmounting */ - case OBD_PING: - case MDS_REINT: - case LDLM_ENQUEUE: - *process = target_queue_recovery_request(req, obd); - RETURN(0); - - default: - DEBUG_REQ(D_ERROR, req, "not permitted during recovery"); - *process = 0; - /* XXX what should we set rq_status to here? */ - req->rq_status = -EAGAIN; - RETURN(ptlrpc_error(req)); - } -} - -static char *reint_names[] = { - [REINT_SETATTR] "setattr", - [REINT_CREATE] "create", - [REINT_LINK] "link", - [REINT_UNLINK] "unlink", - [REINT_RENAME] "rename", - [REINT_OPEN] "open", -}; - -static int mds_set_info_rpc(struct obd_export *exp, struct ptlrpc_request *req) -{ - void *key, *val; - int keylen, vallen, rc = 0; - ENTRY; - - key = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, 1); - if (key == NULL) { - DEBUG_REQ(D_HA, req, "no set_info key"); - RETURN(-EFAULT); - } - keylen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF); - - val = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1, 0); - vallen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1); - - rc = lustre_pack_reply(req, 1, NULL, NULL); - if (rc) - RETURN(rc); - - lustre_msg_set_status(req->rq_repmsg, 0); - - if (KEY_IS("read-only")) { - if (val == NULL || vallen < sizeof(__u32)) { - DEBUG_REQ(D_HA, req, "no set_info val"); - RETURN(-EFAULT); - } - - if (*(__u32 *)val) - exp->exp_connect_flags |= OBD_CONNECT_RDONLY; - else - exp->exp_connect_flags &= ~OBD_CONNECT_RDONLY; - } else { - RETURN(-EINVAL); - } - - RETURN(0); -} - -static int mds_handle_quotacheck(struct ptlrpc_request *req) -{ - struct obd_quotactl *oqctl; - int rc; - ENTRY; - - oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl), - lustre_swab_obd_quotactl); - if (oqctl == NULL) - RETURN(-EPROTO); - - rc = lustre_pack_reply(req, 1, NULL, NULL); - if (rc) - RETURN(rc); - - req->rq_status = obd_quotacheck(req->rq_export, oqctl); - RETURN(0); -} - -static int mds_handle_quotactl(struct ptlrpc_request *req) -{ - struct obd_quotactl *oqctl, *repoqc; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repoqc) }; - ENTRY; - - oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl), - lustre_swab_obd_quotactl); - if (oqctl == NULL) - RETURN(-EPROTO); - - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - RETURN(rc); - - repoqc = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*repoqc)); - - req->rq_status = obd_quotactl(req->rq_export, oqctl); - *repoqc = *oqctl; - RETURN(0); -} - -static int mds_msg_check_version(struct lustre_msg *msg) -{ - int rc; - - switch (lustre_msg_get_opc(msg)) { - case MDS_CONNECT: - case MDS_DISCONNECT: - case OBD_PING: - rc = lustre_msg_check_version(msg, LUSTRE_OBD_VERSION); - if (rc) - CERROR("bad opc %u version %08x, expecting %08x\n", - lustre_msg_get_opc(msg), - lustre_msg_get_version(msg), - LUSTRE_OBD_VERSION); - break; - case MDS_GETSTATUS: - case MDS_GETATTR: - case MDS_GETATTR_NAME: - case MDS_STATFS: - case MDS_READPAGE: - case MDS_REINT: - case MDS_CLOSE: - case MDS_DONE_WRITING: - case MDS_PIN: - case MDS_SYNC: - case MDS_GETXATTR: - case MDS_SETXATTR: - case MDS_SET_INFO: - case MDS_QUOTACHECK: - case MDS_QUOTACTL: - case QUOTA_DQACQ: - case QUOTA_DQREL: - rc = lustre_msg_check_version(msg, LUSTRE_MDS_VERSION); - if (rc) - CERROR("bad opc %u version %08x, expecting %08x\n", - lustre_msg_get_opc(msg), - lustre_msg_get_version(msg), - LUSTRE_MDS_VERSION); - break; - case LDLM_ENQUEUE: - case LDLM_CONVERT: - case LDLM_BL_CALLBACK: - case LDLM_CP_CALLBACK: - rc = lustre_msg_check_version(msg, LUSTRE_DLM_VERSION); - if (rc) - CERROR("bad opc %u version %08x, expecting %08x\n", - lustre_msg_get_opc(msg), - lustre_msg_get_version(msg), - LUSTRE_DLM_VERSION); - break; - case OBD_LOG_CANCEL: - case LLOG_ORIGIN_HANDLE_CREATE: - case LLOG_ORIGIN_HANDLE_NEXT_BLOCK: - case LLOG_ORIGIN_HANDLE_READ_HEADER: - case LLOG_ORIGIN_HANDLE_CLOSE: - case LLOG_ORIGIN_HANDLE_DESTROY: - case LLOG_ORIGIN_HANDLE_PREV_BLOCK: - case LLOG_CATINFO: - rc = lustre_msg_check_version(msg, LUSTRE_LOG_VERSION); - if (rc) - CERROR("bad opc %u version %08x, expecting %08x\n", - lustre_msg_get_opc(msg), - lustre_msg_get_version(msg), - LUSTRE_LOG_VERSION); - break; - default: - CERROR("MDS unknown opcode %d\n", lustre_msg_get_opc(msg)); - rc = -ENOTSUPP; - } - return rc; -} - -int mds_handle(struct ptlrpc_request *req) -{ - int should_process, fail = OBD_FAIL_MDS_ALL_REPLY_NET; - int rc = 0; - struct mds_obd *mds = NULL; /* quell gcc overwarning */ - struct obd_device *obd = NULL; - ENTRY; - - OBD_FAIL_RETURN(OBD_FAIL_MDS_ALL_REQUEST_NET | OBD_FAIL_ONCE, 0); - - LASSERT(current->journal_info == NULL); - - rc = mds_msg_check_version(req->rq_reqmsg); - if (rc) { - CERROR("MDS drop mal-formed request\n"); - RETURN(rc); - } - - /* XXX identical to OST */ - if (lustre_msg_get_opc(req->rq_reqmsg) != MDS_CONNECT) { - struct mds_export_data *med; - int recovering, abort_recovery; - - if (req->rq_export == NULL) { - CERROR("operation %d on unconnected MDS from %s\n", - lustre_msg_get_opc(req->rq_reqmsg), - libcfs_id2str(req->rq_peer)); - req->rq_status = -ENOTCONN; - GOTO(out, rc = -ENOTCONN); - } - - med = &req->rq_export->exp_mds_data; - obd = req->rq_export->exp_obd; - mds = &obd->u.mds; - - /* sanity check: if the xid matches, the request must - * be marked as a resent or replayed */ - if (req->rq_xid == le64_to_cpu(med->med_mcd->mcd_last_xid) || - req->rq_xid == le64_to_cpu(med->med_mcd->mcd_last_close_xid)) - if (!(lustre_msg_get_flags(req->rq_reqmsg) & - (MSG_RESENT | MSG_REPLAY))) { - CERROR("rq_xid "LPU64" matches last_xid, " - "expected RESENT flag\n", - req->rq_xid); - req->rq_status = -ENOTCONN; - GOTO(out, rc = -EFAULT); - } - /* else: note the opposite is not always true; a - * RESENT req after a failover will usually not match - * the last_xid, since it was likely never - * committed. A REPLAYed request will almost never - * match the last xid, however it could for a - * committed, but still retained, open. */ - - /* Check for aborted recovery. */ - spin_lock_bh(&obd->obd_processing_task_lock); - abort_recovery = obd->obd_abort_recovery; - recovering = obd->obd_recovering; - spin_unlock_bh(&obd->obd_processing_task_lock); - if (abort_recovery) { - target_abort_recovery(obd); - } else if (recovering) { - rc = mds_filter_recovery_request(req, obd, - &should_process); - if (rc || !should_process) - RETURN(rc); - } - } - - switch (lustre_msg_get_opc(req->rq_reqmsg)) { - case MDS_CONNECT: - DEBUG_REQ(D_INODE, req, "connect"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_CONNECT_NET, 0); - rc = target_handle_connect(req, mds_handle); - if (!rc) { - /* Now that we have an export, set mds. */ - obd = req->rq_export->exp_obd; - mds = mds_req2mds(req); - } - break; - - case MDS_DISCONNECT: - DEBUG_REQ(D_INODE, req, "disconnect"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_DISCONNECT_NET, 0); - rc = target_handle_disconnect(req); - req->rq_status = rc; /* superfluous? */ - break; - - case MDS_GETSTATUS: - DEBUG_REQ(D_INODE, req, "getstatus"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_GETSTATUS_NET, 0); - rc = mds_getstatus(req); - break; - - case MDS_GETATTR: - DEBUG_REQ(D_INODE, req, "getattr"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_GETATTR_NET, 0); - rc = mds_getattr(req, REQ_REC_OFF); - break; - - case MDS_SETXATTR: - DEBUG_REQ(D_INODE, req, "setxattr"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_SETXATTR_NET, 0); - rc = mds_setxattr(req); - break; - - case MDS_GETXATTR: - DEBUG_REQ(D_INODE, req, "getxattr"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_GETXATTR_NET, 0); - rc = mds_getxattr(req); - break; - - case MDS_GETATTR_NAME: { - struct lustre_handle lockh = { 0 }; - DEBUG_REQ(D_INODE, req, "getattr_name"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_GETATTR_NAME_NET, 0); - - /* If this request gets a reconstructed reply, we won't be - * acquiring any new locks in mds_getattr_lock, so we don't - * want to cancel. - */ - rc = mds_getattr_lock(req, REQ_REC_OFF, MDS_INODELOCK_UPDATE, - &lockh); - /* this non-intent call (from an ioctl) is special */ - req->rq_status = rc; - if (rc == 0 && lustre_handle_is_used(&lockh)) - ldlm_lock_decref(&lockh, LCK_CR); - break; - } - case MDS_STATFS: - DEBUG_REQ(D_INODE, req, "statfs"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_STATFS_NET, 0); - rc = mds_statfs(req); - break; - - case MDS_READPAGE: - DEBUG_REQ(D_INODE, req, "readpage"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_READPAGE_NET, 0); - rc = mds_readpage(req, REQ_REC_OFF); - - if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_SENDPAGE)) { - RETURN(0); - } - - break; - - case MDS_REINT: { - __u32 *opcp = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, - sizeof(*opcp)); - __u32 opc; - int op = 0; - int size[4] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_body), - mds->mds_max_mdsize, - mds->mds_max_cookiesize }; - int bufcount; - - /* NB only peek inside req now; mds_reint() will swab it */ - if (opcp == NULL) { - CERROR ("Can't inspect opcode\n"); - rc = -EINVAL; - break; - } - opc = *opcp; - if (lustre_msg_swabbed(req->rq_reqmsg)) - __swab32s(&opc); - - DEBUG_REQ(D_INODE, req, "reint %d (%s)", opc, - (opc < sizeof(reint_names) / sizeof(reint_names[0]) || - reint_names[opc] == NULL) ? reint_names[opc] : - "unknown opcode"); - - switch (opc) { - case REINT_CREATE: - op = PTLRPC_LAST_CNTR + MDS_REINT_CREATE; - break; - case REINT_LINK: - op = PTLRPC_LAST_CNTR + MDS_REINT_LINK; - break; - case REINT_OPEN: - op = PTLRPC_LAST_CNTR + MDS_REINT_OPEN; - break; - case REINT_SETATTR: - op = PTLRPC_LAST_CNTR + MDS_REINT_SETATTR; - break; - case REINT_RENAME: - op = PTLRPC_LAST_CNTR + MDS_REINT_RENAME; - break; - case REINT_UNLINK: - op = PTLRPC_LAST_CNTR + MDS_REINT_UNLINK; - break; - default: - op = 0; - break; - } - - if (op && req->rq_rqbd->rqbd_service->srv_stats) - lprocfs_counter_incr( - req->rq_rqbd->rqbd_service->srv_stats, op); - - OBD_FAIL_RETURN(OBD_FAIL_MDS_REINT_NET, 0); - - if (opc == REINT_UNLINK || opc == REINT_RENAME) - bufcount = 4; - else if (opc == REINT_OPEN) - bufcount = 3; - else - bufcount = 2; - - rc = lustre_pack_reply(req, bufcount, size, NULL); - if (rc) - break; - - rc = mds_reint(req, REQ_REC_OFF, NULL); - fail = OBD_FAIL_MDS_REINT_NET_REP; - break; - } - - case MDS_CLOSE: - DEBUG_REQ(D_INODE, req, "close"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_CLOSE_NET, 0); - rc = mds_close(req, REQ_REC_OFF); - fail = OBD_FAIL_MDS_CLOSE_NET_REP; - break; - - case MDS_DONE_WRITING: - DEBUG_REQ(D_INODE, req, "done_writing"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_DONE_WRITING_NET, 0); - rc = mds_done_writing(req, REQ_REC_OFF); - break; - - case MDS_PIN: - DEBUG_REQ(D_INODE, req, "pin"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_PIN_NET, 0); - rc = mds_pin(req, REQ_REC_OFF); - break; - - case MDS_SYNC: - DEBUG_REQ(D_INODE, req, "sync"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_SYNC_NET, 0); - rc = mds_sync(req, REQ_REC_OFF); - break; - - case MDS_SET_INFO: - DEBUG_REQ(D_INODE, req, "set_info"); - rc = mds_set_info_rpc(req->rq_export, req); - break; - - case MDS_QUOTACHECK: - DEBUG_REQ(D_INODE, req, "quotacheck"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_QUOTACHECK_NET, 0); - rc = mds_handle_quotacheck(req); - break; - - case MDS_QUOTACTL: - DEBUG_REQ(D_INODE, req, "quotactl"); - OBD_FAIL_RETURN(OBD_FAIL_MDS_QUOTACTL_NET, 0); - rc = mds_handle_quotactl(req); - break; - - case OBD_PING: - DEBUG_REQ(D_INODE, req, "ping"); - rc = target_handle_ping(req); - break; - - case OBD_LOG_CANCEL: - CDEBUG(D_INODE, "log cancel\n"); - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOG_CANCEL_NET, 0); - rc = -ENOTSUPP; /* la la la */ - break; - - case LDLM_ENQUEUE: - DEBUG_REQ(D_INODE, req, "enqueue"); - OBD_FAIL_RETURN(OBD_FAIL_LDLM_ENQUEUE, 0); - rc = ldlm_handle_enqueue(req, ldlm_server_completion_ast, - ldlm_server_blocking_ast, NULL); - fail = OBD_FAIL_LDLM_REPLY; - break; - case LDLM_CONVERT: - DEBUG_REQ(D_INODE, req, "convert"); - OBD_FAIL_RETURN(OBD_FAIL_LDLM_CONVERT, 0); - rc = ldlm_handle_convert(req); - break; - case LDLM_BL_CALLBACK: - case LDLM_CP_CALLBACK: - DEBUG_REQ(D_INODE, req, "callback"); - CERROR("callbacks should not happen on MDS\n"); - LBUG(); - OBD_FAIL_RETURN(OBD_FAIL_LDLM_BL_CALLBACK, 0); - break; - case LLOG_ORIGIN_HANDLE_CREATE: - DEBUG_REQ(D_INODE, req, "llog_init"); - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_create(req); - break; - case LLOG_ORIGIN_HANDLE_DESTROY: - DEBUG_REQ(D_INODE, req, "llog_init"); - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_destroy(req); - break; - case LLOG_ORIGIN_HANDLE_NEXT_BLOCK: - DEBUG_REQ(D_INODE, req, "llog next block"); - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_next_block(req); - break; - case LLOG_ORIGIN_HANDLE_PREV_BLOCK: - DEBUG_REQ(D_INODE, req, "llog prev block"); - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_prev_block(req); - break; - case LLOG_ORIGIN_HANDLE_READ_HEADER: - DEBUG_REQ(D_INODE, req, "llog read header"); - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_read_header(req); - break; - case LLOG_ORIGIN_HANDLE_CLOSE: - DEBUG_REQ(D_INODE, req, "llog close"); - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_origin_handle_close(req); - break; - case LLOG_CATINFO: - DEBUG_REQ(D_INODE, req, "llog catinfo"); - OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0); - rc = llog_catinfo(req); - break; - default: - req->rq_status = -ENOTSUPP; - rc = ptlrpc_error(req); - RETURN(rc); - } - - LASSERT(current->journal_info == NULL); - - /* If we're DISCONNECTing, the mds_export_data is already freed */ - if (!rc && lustre_msg_get_opc(req->rq_reqmsg) != MDS_DISCONNECT) { - struct mds_export_data *med = &req->rq_export->exp_mds_data; - - /* I don't think last_xid is used for anyway, so I'm not sure - if we need to care about last_close_xid here.*/ - lustre_msg_set_last_xid(req->rq_repmsg, - le64_to_cpu(med->med_mcd->mcd_last_xid)); - - target_committed_to_req(req); - } - - EXIT; - out: - - if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_LAST_REPLAY) { - if (obd && obd->obd_recovering) { - DEBUG_REQ(D_HA, req, "LAST_REPLAY, queuing reply"); - return target_queue_last_replay_reply(req, rc); - } - /* Lost a race with recovery; let the error path DTRT. */ - rc = req->rq_status = -ENOTCONN; - } - - target_send_reply(req, rc, fail); - return 0; -} - -/* Update the server data on disk. This stores the new mount_count and - * also the last_rcvd value to disk. If we don't have a clean shutdown, - * then the server last_rcvd value may be less than that of the clients. - * This will alert us that we may need to do client recovery. - * - * Also assumes for mds_last_transno that we are not modifying it (no locking). - */ -int mds_update_server_data(struct obd_device *obd, int force_sync) -{ - struct mds_obd *mds = &obd->u.mds; - struct lr_server_data *lsd = mds->mds_server_data; - struct file *filp = mds->mds_rcvd_filp; - struct lvfs_run_ctxt saved; - loff_t off = 0; - int rc; - ENTRY; - - CDEBUG(D_SUPER, "MDS mount_count is "LPU64", last_transno is "LPU64"\n", - mds->mds_mount_count, mds->mds_last_transno); - - spin_lock(&mds->mds_transno_lock); - lsd->lsd_last_transno = cpu_to_le64(mds->mds_last_transno); - spin_unlock(&mds->mds_transno_lock); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = fsfilt_write_record(obd, filp, lsd, sizeof(*lsd), &off,force_sync); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - if (rc) - CERROR("error writing MDS server data: rc = %d\n", rc); - - RETURN(rc); -} - -static void fsoptions_to_mds_flags(struct mds_obd *mds, char *options) -{ - char *p = options; - - if (!options) - return; - - while (*options) { - int len; - - while (*p && *p != ',') - p++; - - len = p - options; - if (len == sizeof("user_xattr") - 1 && - memcmp(options, "user_xattr", len) == 0) { - mds->mds_fl_user_xattr = 1; - LCONSOLE_INFO("Enabling user_xattr\n"); - } else if (len == sizeof("nouser_xattr") - 1 && - memcmp(options, "nouser_xattr", len) == 0) { - mds->mds_fl_user_xattr = 0; - LCONSOLE_INFO("Disabling user_xattr\n"); - } else if (len == sizeof("acl") - 1 && - memcmp(options, "acl", len) == 0) { -#ifdef CONFIG_FS_POSIX_ACL - mds->mds_fl_acl = 1; - LCONSOLE_INFO("Enabling ACL\n"); -#else - CWARN("ignoring unsupported acl mount option\n"); -#endif - } else if (len == sizeof("noacl") - 1 && - memcmp(options, "noacl", len) == 0) { -#ifdef CONFIG_FS_POSIX_ACL - mds->mds_fl_acl = 0; - LCONSOLE_INFO("Disabling ACL\n"); -#endif - } - - options = ++p; - } -} - -/* mount the file system (secretly). lustre_cfg parameters are: - * 1 = device - * 2 = fstype - * 3 = config name - * 4 = mount options - */ -static int mds_setup(struct obd_device *obd, obd_count len, void *buf) -{ - struct lprocfs_static_vars lvars; - struct lustre_cfg* lcfg = buf; - struct mds_obd *mds = &obd->u.mds; - struct lustre_sb_info *lsi; - struct lustre_mount_info *lmi; - struct vfsmount *mnt; - struct obd_uuid uuid; - __u8 *uuid_ptr; - char *str, *label; - char ns_name[48]; - int rc = 0; - ENTRY; - - /* setup 1:/dev/loop/0 2:ext3 3:mdsA 4:errors=remount-ro,iopen_nopriv */ - - CLASSERT(offsetof(struct obd_device, u.obt) == - offsetof(struct obd_device, u.mds.mds_obt)); - - if (lcfg->lcfg_bufcount < 3) - RETURN(-EINVAL); - - if (LUSTRE_CFG_BUFLEN(lcfg, 1) == 0 || LUSTRE_CFG_BUFLEN(lcfg, 2) == 0) - RETURN(-EINVAL); - - lmi = server_get_mount(obd->obd_name); - if (!lmi) { - CERROR("Not mounted in lustre_fill_super?\n"); - RETURN(-EINVAL); - } - - /* We mounted in lustre_fill_super. - lcfg bufs 1, 2, 4 (device, fstype, mount opts) are ignored.*/ - lsi = s2lsi(lmi->lmi_sb); - fsoptions_to_mds_flags(mds, lsi->lsi_ldd->ldd_mount_opts); - fsoptions_to_mds_flags(mds, lsi->lsi_lmd->lmd_opts); - mnt = lmi->lmi_mnt; - obd->obd_fsops = fsfilt_get_ops(MT_STR(lsi->lsi_ldd)); - if (IS_ERR(obd->obd_fsops)) - GOTO(err_put, rc = PTR_ERR(obd->obd_fsops)); - - CDEBUG(D_SUPER, "%s: mnt = %p\n", lustre_cfg_string(lcfg, 1), mnt); - - LASSERT(!lvfs_check_rdonly(lvfs_sbdev(mnt->mnt_sb))); - - sema_init(&mds->mds_epoch_sem, 1); - spin_lock_init(&mds->mds_transno_lock); - mds->mds_max_mdsize = sizeof(struct lov_mds_md); - mds->mds_max_cookiesize = sizeof(struct llog_cookie); - mds->mds_atime_diff = MAX_ATIME_DIFF; - mds->mds_evict_ost_nids = 1; - - sprintf(ns_name, "mds-%s", obd->obd_uuid.uuid); - obd->obd_namespace = ldlm_namespace_new(ns_name, LDLM_NAMESPACE_SERVER, - LDLM_NAMESPACE_GREEDY); - if (obd->obd_namespace == NULL) { - mds_cleanup(obd); - GOTO(err_ops, rc = -ENOMEM); - } - ldlm_register_intent(obd->obd_namespace, mds_intent_policy); - - lprocfs_mds_init_vars(&lvars); - if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0 && - lprocfs_alloc_obd_stats(obd, LPROC_MDS_LAST) == 0) { - /* Init private stats here */ - mds_stats_counter_init(obd->obd_stats); - obd->obd_proc_exports_entry = proc_mkdir("exports", - obd->obd_proc_entry); - } - - rc = mds_fs_setup(obd, mnt); - if (rc) { - CERROR("%s: MDS filesystem method init failed: rc = %d\n", - obd->obd_name, rc); - GOTO(err_ns, rc); - } - - if (obd->obd_proc_exports_entry) - lprocfs_add_simple(obd->obd_proc_exports_entry, - "clear", lprocfs_nid_stats_clear_read, - lprocfs_nid_stats_clear_write, obd); - - if (lcfg->lcfg_bufcount >= 4 && LUSTRE_CFG_BUFLEN(lcfg, 3) > 0) { - class_uuid_t uuid; - - ll_generate_random_uuid(uuid); - class_uuid_unparse(uuid, &mds->mds_lov_uuid); - - OBD_ALLOC(mds->mds_profile, LUSTRE_CFG_BUFLEN(lcfg, 3)); - if (mds->mds_profile == NULL) - GOTO(err_fs, rc = -ENOMEM); - - strncpy(mds->mds_profile, lustre_cfg_string(lcfg, 3), - LUSTRE_CFG_BUFLEN(lcfg, 3)); - } - - ptlrpc_init_client(LDLM_CB_REQUEST_PORTAL, LDLM_CB_REPLY_PORTAL, - "mds_ldlm_client", &obd->obd_ldlm_client); - obd->obd_replayable = 1; - - rc = lquota_setup(mds_quota_interface_ref, obd); - if (rc) - GOTO(err_fs, rc); - - mds->mds_group_hash = upcall_cache_init(obd->obd_name); - if (IS_ERR(mds->mds_group_hash)) { - rc = PTR_ERR(mds->mds_group_hash); - mds->mds_group_hash = NULL; - GOTO(err_qctxt, rc); - } - - /* Don't wait for mds_postrecov trying to clear orphans */ - obd->obd_async_recov = 1; - rc = mds_postsetup(obd); - /* Bug 11557 - allow async abort_recov start - FIXME can remove most of this obd_async_recov plumbing - obd->obd_async_recov = 0; - */ - if (rc) - GOTO(err_qctxt, rc); - - uuid_ptr = fsfilt_uuid(obd, obd->u.obt.obt_sb); - if (uuid_ptr != NULL) { - class_uuid_unparse(uuid_ptr, &uuid); - str = uuid.uuid; - } else { - str = "no UUID"; - } - - label = fsfilt_get_label(obd, obd->u.obt.obt_sb); - if (obd->obd_recovering) { - LCONSOLE_WARN("MDT %s now serving %s (%s%s%s), but will be in " - "recovery for at least %d:%.02d, or until %d " - "client%s reconnect. During this time new clients" - " will not be allowed to connect. " - "Recovery progress can be monitored by watching " - "/proc/fs/lustre/mds/%s/recovery_status.\n", - obd->obd_name, lustre_cfg_string(lcfg, 1), - label ?: "", label ? "/" : "", str, - obd->obd_recovery_timeout / 60, - obd->obd_recovery_timeout % 60, - obd->obd_max_recoverable_clients, - (obd->obd_max_recoverable_clients == 1) ? "":"s", - obd->obd_name); - } else { - LCONSOLE_INFO("MDT %s now serving %s (%s%s%s) with recovery " - "%s\n", obd->obd_name, lustre_cfg_string(lcfg, 1), - label ?: "", label ? "/" : "", str, - obd->obd_replayable ? "enabled" : "disabled"); - } - - if (ldlm_timeout == LDLM_TIMEOUT_DEFAULT) - ldlm_timeout = 6; - - RETURN(0); - -err_qctxt: - lquota_cleanup(mds_quota_interface_ref, obd); -err_fs: - /* No extra cleanup needed for llog_init_commit_thread() */ - mds_fs_cleanup(obd); - upcall_cache_cleanup(mds->mds_group_hash); - mds->mds_group_hash = NULL; -err_ns: - lprocfs_free_obd_stats(obd); - lprocfs_obd_cleanup(obd); - ldlm_namespace_free(obd->obd_namespace, 0); - obd->obd_namespace = NULL; -err_ops: - fsfilt_put_ops(obd->obd_fsops); -err_put: - server_put_mount(obd->obd_name, mnt); - obd->u.obt.obt_sb = NULL; - return rc; -} - -static int mds_lov_clean(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - struct obd_device *osc = mds->mds_osc_obd; - ENTRY; - - if (mds->mds_profile) { - class_del_profile(mds->mds_profile); - OBD_FREE(mds->mds_profile, strlen(mds->mds_profile) + 1); - mds->mds_profile = NULL; - } - - /* There better be a lov */ - if (!osc) - RETURN(0); - if (IS_ERR(osc)) - RETURN(PTR_ERR(osc)); - - obd_register_observer(osc, NULL); - - /* Give lov our same shutdown flags */ - osc->obd_force = obd->obd_force; - osc->obd_fail = obd->obd_fail; - - /* Cleanup the lov */ - obd_disconnect(mds->mds_osc_exp); - class_manual_cleanup(osc); - mds->mds_osc_exp = NULL; - - RETURN(0); -} - -static int mds_postsetup(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - int rc = 0; - ENTRY; - - rc = llog_setup(obd, LLOG_CONFIG_ORIG_CTXT, obd, 0, NULL, - &llog_lvfs_ops); - if (rc) - RETURN(rc); - - rc = llog_setup(obd, LLOG_LOVEA_ORIG_CTXT, obd, 0, NULL, - &llog_lvfs_ops); - if (rc) - RETURN(rc); - - if (mds->mds_profile) { - struct lustre_profile *lprof; - /* The profile defines which osc and mdc to connect to, for a - client. We reuse that here to figure out the name of the - lov to use (and ignore lprof->lp_mdc). - The profile was set in the config log with - LCFG_MOUNTOPT profilenm oscnm mdcnm */ - lprof = class_get_profile(mds->mds_profile); - if (lprof == NULL) { - CERROR("No profile found: %s\n", mds->mds_profile); - GOTO(err_cleanup, rc = -ENOENT); - } - rc = mds_lov_connect(obd, lprof->lp_osc); - if (rc) - GOTO(err_cleanup, rc); - } - - RETURN(rc); - -err_cleanup: - mds_lov_clean(obd); - llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT)); - llog_cleanup(llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT)); - RETURN(rc); -} - -int mds_postrecov(struct obd_device *obd) -{ - struct llog_ctxt *ctxt; - int rc; - ENTRY; - - if (obd->obd_fail) - RETURN(0); - - LASSERT(!obd->obd_recovering); - ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT); - LASSERT(ctxt != NULL); - llog_ctxt_put(ctxt); - - /* clean PENDING dir */ - rc = mds_cleanup_pending(obd); - if (rc < 0) - GOTO(out, rc); - - /* FIXME Does target_finish_recovery really need this to block? */ - /* Notify the LOV, which will in turn call mds_notify for each tgt */ - /* This means that we have to hack obd_notify to think we're obd_set_up - during mds_lov_connect. */ - obd_notify(obd->u.mds.mds_osc_obd, NULL, - obd->obd_async_recov ? OBD_NOTIFY_SYNC_NONBLOCK : - OBD_NOTIFY_SYNC, NULL); - - /* quota recovery */ - lquota_recovery(mds_quota_interface_ref, obd); - -out: - RETURN(rc); -} - -/* We need to be able to stop an mds_lov_synchronize */ -static int mds_lov_early_clean(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - struct obd_device *osc = mds->mds_osc_obd; - - if (!osc || (!obd->obd_force && !obd->obd_fail)) - return(0); - - CDEBUG(D_HA, "abort inflight\n"); - return (obd_precleanup(osc, OBD_CLEANUP_EARLY)); -} - -static int mds_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) -{ - int rc = 0; - ENTRY; - - switch (stage) { - case OBD_CLEANUP_EARLY: - break; - case OBD_CLEANUP_EXPORTS: - target_cleanup_recovery(obd); - mds_lov_early_clean(obd); - break; - case OBD_CLEANUP_SELF_EXP: - mds_lov_disconnect(obd); - mds_lov_clean(obd); - llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT)); - llog_cleanup(llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT)); - rc = obd_llog_finish(obd, 0); - break; - case OBD_CLEANUP_OBD: - break; - } - RETURN(rc); -} - -static int mds_cleanup(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - lvfs_sbdev_type save_dev; - ENTRY; - - if (obd->u.obt.obt_sb == NULL) - RETURN(0); - save_dev = lvfs_sbdev(obd->u.obt.obt_sb); - - if (mds->mds_osc_exp) - /* lov export was disconnected by mds_lov_clean; - we just need to drop our ref */ - class_export_put(mds->mds_osc_exp); - - remove_proc_entry("clear", obd->obd_proc_exports_entry); - lprocfs_free_per_client_stats(obd); - lprocfs_free_obd_stats(obd); - lprocfs_obd_cleanup(obd); - - lquota_cleanup(mds_quota_interface_ref, obd); - - mds_update_server_data(obd, 1); - mds_fs_cleanup(obd); - - upcall_cache_cleanup(mds->mds_group_hash); - mds->mds_group_hash = NULL; - - server_put_mount(obd->obd_name, mds->mds_vfsmnt); - obd->u.obt.obt_sb = NULL; - - ldlm_namespace_free(obd->obd_namespace, obd->obd_force); - - spin_lock_bh(&obd->obd_processing_task_lock); - if (obd->obd_recovering) { - target_cancel_recovery_timer(obd); - obd->obd_recovering = 0; - } - spin_unlock_bh(&obd->obd_processing_task_lock); - - fsfilt_put_ops(obd->obd_fsops); - - LCONSOLE_INFO("MDT %s has stopped.\n", obd->obd_name); - - RETURN(0); -} - -static void fixup_handle_for_resent_req(struct ptlrpc_request *req, int offset, - struct ldlm_lock *new_lock, - struct ldlm_lock **old_lock, - struct lustre_handle *lockh) -{ - struct obd_export *exp = req->rq_export; - struct ldlm_request *dlmreq = - lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*dlmreq)); - struct lustre_handle remote_hdl = dlmreq->lock_handle[0]; - struct list_head *iter; - - if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT)) - return; - - spin_lock(&exp->exp_ldlm_data.led_lock); - list_for_each(iter, &exp->exp_ldlm_data.led_held_locks) { - struct ldlm_lock *lock; - lock = list_entry(iter, struct ldlm_lock, l_export_chain); - if (lock == new_lock) - continue; - if (lock->l_remote_handle.cookie == remote_hdl.cookie) { - lockh->cookie = lock->l_handle.h_cookie; - LDLM_DEBUG(lock, "restoring lock cookie"); - DEBUG_REQ(D_DLMTRACE, req,"restoring lock cookie "LPX64, - lockh->cookie); - if (old_lock) - *old_lock = LDLM_LOCK_GET(lock); - spin_unlock(&exp->exp_ldlm_data.led_lock); - return; - } - } - spin_unlock(&exp->exp_ldlm_data.led_lock); - - /* If the xid matches, then we know this is a resent request, - * and allow it. (It's probably an OPEN, for which we don't - * send a lock */ - if (req->rq_xid == - le64_to_cpu(exp->exp_mds_data.med_mcd->mcd_last_xid)) - return; - - if (req->rq_xid == - le64_to_cpu(exp->exp_mds_data.med_mcd->mcd_last_close_xid)) - return; - - /* This remote handle isn't enqueued, so we never received or - * processed this request. Clear MSG_RESENT, because it can - * be handled like any normal request now. */ - - lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT); - - DEBUG_REQ(D_DLMTRACE, req, "no existing lock with rhandle "LPX64, - remote_hdl.cookie); -} - -int intent_disposition(struct ldlm_reply *rep, int flag) -{ - if (!rep) - return 0; - return (rep->lock_policy_res1 & flag); -} - -void intent_set_disposition(struct ldlm_reply *rep, int flag) -{ - if (!rep) - return; - rep->lock_policy_res1 |= flag; -} - -#define IS_CLIENT_DISCONNECT_ERROR(error) \ - (error == -ENOTCONN || error == -ENODEV) - -static int mds_intent_policy(struct ldlm_namespace *ns, - struct ldlm_lock **lockp, void *req_cookie, - ldlm_mode_t mode, int flags, void *data) -{ - struct ptlrpc_request *req = req_cookie; - struct ldlm_lock *lock = *lockp; - struct ldlm_intent *it; - struct mds_obd *mds = &req->rq_export->exp_obd->u.mds; - struct ldlm_reply *rep; - struct lustre_handle lockh = { 0 }; - struct ldlm_lock *new_lock = NULL; - int getattr_part = MDS_INODELOCK_UPDATE; - int repsize[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), - [DLM_LOCKREPLY_OFF] = sizeof(struct ldlm_reply), - [DLM_REPLY_REC_OFF] = sizeof(struct mds_body), - [DLM_REPLY_REC_OFF+1] = mds->mds_max_mdsize }; - int repbufcnt = 4, rc; - ENTRY; - - LASSERT(req != NULL); - - if (lustre_msg_bufcount(req->rq_reqmsg) <= DLM_INTENT_IT_OFF) { - /* No intent was provided */ - rc = lustre_pack_reply(req, 2, repsize, NULL); - if (rc) - RETURN(rc); - RETURN(0); - } - - it = lustre_swab_reqbuf(req, DLM_INTENT_IT_OFF, sizeof(*it), - lustre_swab_ldlm_intent); - if (it == NULL) { - CERROR("Intent missing\n"); - RETURN(req->rq_status = -EFAULT); - } - - LDLM_DEBUG(lock, "intent policy, opc: %s", ldlm_it2str(it->opc)); - - if ((req->rq_export->exp_connect_flags & OBD_CONNECT_ACL) && - (it->opc & (IT_OPEN | IT_GETATTR | IT_LOOKUP))) - /* we should never allow OBD_CONNECT_ACL if not configured */ - repsize[repbufcnt++] = LUSTRE_POSIX_ACL_MAX_SIZE; - else if (it->opc & IT_UNLINK) - repsize[repbufcnt++] = mds->mds_max_cookiesize; - - rc = lustre_pack_reply(req, repbufcnt, repsize, NULL); - if (rc) - RETURN(req->rq_status = rc); - - rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, sizeof(*rep)); - intent_set_disposition(rep, DISP_IT_EXECD); - - - /* execute policy */ - switch ((long)it->opc) { - case IT_OPEN: - case IT_CREAT|IT_OPEN: - mds_counter_incr(req->rq_export, LPROC_MDS_OPEN); - fixup_handle_for_resent_req(req, DLM_LOCKREQ_OFF, lock, NULL, - &lockh); - /* XXX swab here to assert that an mds_open reint - * packet is following */ - rep->lock_policy_res2 = mds_reint(req, DLM_INTENT_REC_OFF, - &lockh); -#if 0 - /* We abort the lock if the lookup was negative and - * we did not make it to the OPEN portion */ - if (!intent_disposition(rep, DISP_LOOKUP_EXECD)) - RETURN(ELDLM_LOCK_ABORTED); - if (intent_disposition(rep, DISP_LOOKUP_NEG) && - !intent_disposition(rep, DISP_OPEN_OPEN)) -#endif - - /* If there was an error of some sort or if we are not - * returning any locks */ - if (rep->lock_policy_res2 || - !intent_disposition(rep, DISP_OPEN_LOCK)) { - /* If it is the disconnect error (ENODEV & ENOCONN) - * ptlrpc layer should know this imediately, it should - * be replied by rq_stats, otherwise, return it by - * intent here - */ - if (IS_CLIENT_DISCONNECT_ERROR(rep->lock_policy_res2)) - RETURN(rep->lock_policy_res2); - else - RETURN(ELDLM_LOCK_ABORTED); - } - break; - case IT_LOOKUP: - getattr_part = MDS_INODELOCK_LOOKUP; - case IT_GETATTR: - getattr_part |= MDS_INODELOCK_LOOKUP; - OBD_COUNTER_INCREMENT(req->rq_export->exp_obd, getattr); - case IT_READDIR: - fixup_handle_for_resent_req(req, DLM_LOCKREQ_OFF, lock, - &new_lock, &lockh); - - /* INODEBITS_INTEROP: if this lock was converted from a - * plain lock (client does not support inodebits), then - * child lock must be taken with both lookup and update - * bits set for all operations. - */ - if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS)) - getattr_part = MDS_INODELOCK_LOOKUP | - MDS_INODELOCK_UPDATE; - - rep->lock_policy_res2 = mds_getattr_lock(req,DLM_INTENT_REC_OFF, - getattr_part, &lockh); - /* FIXME: LDLM can set req->rq_status. MDS sets - policy_res{1,2} with disposition and status. - - replay: returns 0 & req->status is old status - - otherwise: returns req->status */ - if (intent_disposition(rep, DISP_LOOKUP_NEG)) - rep->lock_policy_res2 = 0; - if (!intent_disposition(rep, DISP_LOOKUP_POS) || - rep->lock_policy_res2) - RETURN(ELDLM_LOCK_ABORTED); - if (req->rq_status != 0) { - LBUG(); - rep->lock_policy_res2 = req->rq_status; - RETURN(ELDLM_LOCK_ABORTED); - } - break; - default: - CERROR("Unhandled intent "LPD64"\n", it->opc); - RETURN(-EFAULT); - } - - /* By this point, whatever function we called above must have either - * filled in 'lockh', been an intent replay, or returned an error. We - * want to allow replayed RPCs to not get a lock, since we would just - * drop it below anyways because lock replay is done separately by the - * client afterwards. For regular RPCs we want to give the new lock to - * the client instead of whatever lock it was about to get. */ - if (new_lock == NULL) - new_lock = ldlm_handle2lock(&lockh); - if (new_lock == NULL && (flags & LDLM_FL_INTENT_ONLY)) - RETURN(0); - - LASSERTF(new_lock != NULL, "op "LPX64" lockh "LPX64"\n", - it->opc, lockh.cookie); - - /* If we've already given this lock to a client once, then we should - * have no readers or writers. Otherwise, we should have one reader - * _or_ writer ref (which will be zeroed below) before returning the - * lock to a client. */ - if (new_lock->l_export == req->rq_export) { - LASSERT(new_lock->l_readers + new_lock->l_writers == 0); - } else { - LASSERT(new_lock->l_export == NULL); - LASSERT(new_lock->l_readers + new_lock->l_writers == 1); - } - - *lockp = new_lock; - - if (new_lock->l_export == req->rq_export) { - /* Already gave this to the client, which means that we - * reconstructed a reply. */ - LASSERT(lustre_msg_get_flags(req->rq_reqmsg) & - MSG_RESENT); - RETURN(ELDLM_LOCK_REPLACED); - } - - /* Fixup the lock to be given to the client */ - lock_res_and_lock(new_lock); - new_lock->l_readers = 0; - new_lock->l_writers = 0; - - new_lock->l_export = class_export_get(req->rq_export); - spin_lock(&req->rq_export->exp_ldlm_data.led_lock); - list_add(&new_lock->l_export_chain, - &new_lock->l_export->exp_ldlm_data.led_held_locks); - spin_unlock(&req->rq_export->exp_ldlm_data.led_lock); - - new_lock->l_blocking_ast = lock->l_blocking_ast; - new_lock->l_completion_ast = lock->l_completion_ast; - - memcpy(&new_lock->l_remote_handle, &lock->l_remote_handle, - sizeof(lock->l_remote_handle)); - - new_lock->l_flags &= ~LDLM_FL_LOCAL; - - unlock_res_and_lock(new_lock); - LDLM_LOCK_PUT(new_lock); - - RETURN(ELDLM_LOCK_REPLACED); -} - -static int mdt_setup(struct obd_device *obd, obd_count len, void *buf) -{ - struct mds_obd *mds = &obd->u.mds; - struct lprocfs_static_vars lvars; - int mds_min_threads; - int mds_max_threads; - int rc = 0; - ENTRY; - - lprocfs_mdt_init_vars(&lvars); - lprocfs_obd_setup(obd, lvars.obd_vars); - - sema_init(&mds->mds_health_sem, 1); - - if (mds_num_threads) { - /* If mds_num_threads is set, it is the min and the max. */ - if (mds_num_threads > MDS_THREADS_MAX) - mds_num_threads = MDS_THREADS_MAX; - if (mds_num_threads < MDS_THREADS_MIN) - mds_num_threads = MDS_THREADS_MIN; - mds_max_threads = mds_min_threads = mds_num_threads; - } else { - /* Base min threads on memory and cpus */ - mds_min_threads = num_possible_cpus() * num_physpages >> - (27 - CFS_PAGE_SHIFT); - if (mds_min_threads < MDS_THREADS_MIN) - mds_min_threads = MDS_THREADS_MIN; - /* Largest auto threads start value */ - if (mds_min_threads > 32) - mds_min_threads = 32; - mds_max_threads = min(MDS_THREADS_MAX, mds_min_threads * 4); - } - - mds->mds_service = - ptlrpc_init_svc(MDS_NBUFS, MDS_BUFSIZE, MDS_MAXREQSIZE, - MDS_MAXREPSIZE, MDS_REQUEST_PORTAL, - MDC_REPLY_PORTAL, MDS_SERVICE_WATCHDOG_FACTOR, - mds_handle, LUSTRE_MDS_NAME, - obd->obd_proc_entry, target_print_req, - mds_min_threads, mds_max_threads, "ll_mdt"); - - if (!mds->mds_service) { - CERROR("failed to start service\n"); - GOTO(err_lprocfs, rc = -ENOMEM); - } - - rc = ptlrpc_start_threads(obd, mds->mds_service); - if (rc) - GOTO(err_thread, rc); - - mds->mds_setattr_service = - ptlrpc_init_svc(MDS_NBUFS, MDS_BUFSIZE, MDS_MAXREQSIZE, - MDS_MAXREPSIZE, MDS_SETATTR_PORTAL, - MDC_REPLY_PORTAL, MDS_SERVICE_WATCHDOG_FACTOR, - mds_handle, "mds_setattr", - obd->obd_proc_entry, target_print_req, - mds_min_threads, mds_max_threads, - "ll_mdt_attr"); - if (!mds->mds_setattr_service) { - CERROR("failed to start getattr service\n"); - GOTO(err_thread, rc = -ENOMEM); - } - - rc = ptlrpc_start_threads(obd, mds->mds_setattr_service); - if (rc) - GOTO(err_thread2, rc); - - mds->mds_readpage_service = - ptlrpc_init_svc(MDS_NBUFS, MDS_BUFSIZE, MDS_MAXREQSIZE, - MDS_MAXREPSIZE, MDS_READPAGE_PORTAL, - MDC_REPLY_PORTAL, MDS_SERVICE_WATCHDOG_FACTOR, - mds_handle, "mds_readpage", - obd->obd_proc_entry, target_print_req, - MDS_THREADS_MIN_READPAGE, mds_max_threads, - "ll_mdt_rdpg"); - if (!mds->mds_readpage_service) { - CERROR("failed to start readpage service\n"); - GOTO(err_thread2, rc = -ENOMEM); - } - - rc = ptlrpc_start_threads(obd, mds->mds_readpage_service); - - if (rc) - GOTO(err_thread3, rc); - - ping_evictor_start(); - - RETURN(0); - -err_thread3: - ptlrpc_unregister_service(mds->mds_readpage_service); - mds->mds_readpage_service = NULL; -err_thread2: - ptlrpc_unregister_service(mds->mds_setattr_service); - mds->mds_setattr_service = NULL; -err_thread: - ptlrpc_unregister_service(mds->mds_service); - mds->mds_service = NULL; -err_lprocfs: - lprocfs_obd_cleanup(obd); - return rc; -} - -static int mdt_cleanup(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - ENTRY; - - ping_evictor_stop(); - - down(&mds->mds_health_sem); - ptlrpc_unregister_service(mds->mds_readpage_service); - ptlrpc_unregister_service(mds->mds_setattr_service); - ptlrpc_unregister_service(mds->mds_service); - mds->mds_readpage_service = NULL; - mds->mds_setattr_service = NULL; - mds->mds_service = NULL; - up(&mds->mds_health_sem); - - lprocfs_obd_cleanup(obd); - - RETURN(0); -} - -static int mdt_health_check(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - int rc = 0; - - down(&mds->mds_health_sem); - rc |= ptlrpc_service_health_check(mds->mds_readpage_service); - rc |= ptlrpc_service_health_check(mds->mds_setattr_service); - rc |= ptlrpc_service_health_check(mds->mds_service); - up(&mds->mds_health_sem); - - /* - * health_check to return 0 on healthy - * and 1 on unhealthy. - */ - if(rc != 0) - rc = 1; - - return rc; -} - -static struct dentry *mds_lvfs_fid2dentry(__u64 id, __u32 gen, __u64 gr, - void *data) -{ - struct obd_device *obd = data; - struct ll_fid fid; - fid.id = id; - fid.generation = gen; - return mds_fid2dentry(&obd->u.mds, &fid, NULL); -} - -static int mds_health_check(struct obd_device *obd) -{ - struct obd_device_target *odt = &obd->u.obt; -#ifdef USE_HEALTH_CHECK_WRITE - struct mds_obd *mds = &obd->u.mds; -#endif - int rc = 0; - - if (odt->obt_sb->s_flags & MS_RDONLY) - rc = 1; - -#ifdef USE_HEALTH_CHECK_WRITE - LASSERT(mds->mds_health_check_filp != NULL); - rc |= !!lvfs_check_io_health(obd, mds->mds_health_check_filp); -#endif - - return rc; -} - -static int mds_process_config(struct obd_device *obd, obd_count len, void *buf) -{ - struct lustre_cfg *lcfg = buf; - struct lprocfs_static_vars lvars; - int rc; - - lprocfs_mds_init_vars(&lvars); - - rc = class_process_proc_param(PARAM_MDT, lvars.obd_vars, lcfg, obd); - - return(rc); -} - -struct lvfs_callback_ops mds_lvfs_ops = { - l_fid2dentry: mds_lvfs_fid2dentry, -}; - -/* use obd ops to offer management infrastructure */ -static struct obd_ops mds_obd_ops = { - .o_owner = THIS_MODULE, - .o_connect = mds_connect, - .o_reconnect = mds_reconnect, - .o_init_export = mds_init_export, - .o_destroy_export = mds_destroy_export, - .o_disconnect = mds_disconnect, - .o_setup = mds_setup, - .o_precleanup = mds_precleanup, - .o_cleanup = mds_cleanup, - .o_postrecov = mds_postrecov, - .o_statfs = mds_obd_statfs, - .o_iocontrol = mds_iocontrol, - .o_create = mds_obd_create, - .o_destroy = mds_obd_destroy, - .o_llog_init = mds_llog_init, - .o_llog_finish = mds_llog_finish, - .o_notify = mds_notify, - .o_health_check = mds_health_check, - .o_process_config = mds_process_config, -}; - -static struct obd_ops mdt_obd_ops = { - .o_owner = THIS_MODULE, - .o_setup = mdt_setup, - .o_cleanup = mdt_cleanup, - .o_health_check = mdt_health_check, -}; - -quota_interface_t *mds_quota_interface_ref; -extern quota_interface_t mds_quota_interface; - -static int __init mds_init(void) -{ - int rc; - struct lprocfs_static_vars lvars; - - request_module("lquota"); - mds_quota_interface_ref = PORTAL_SYMBOL_GET(mds_quota_interface); - rc = lquota_init(mds_quota_interface_ref); - if (rc) { - if (mds_quota_interface_ref) - PORTAL_SYMBOL_PUT(mds_quota_interface); - return rc; - } - init_obd_quota_ops(mds_quota_interface_ref, &mds_obd_ops); - - lprocfs_mds_init_vars(&lvars); - class_register_type(&mds_obd_ops, lvars.module_vars, LUSTRE_MDS_NAME); - lprocfs_mdt_init_vars(&lvars); - class_register_type(&mdt_obd_ops, lvars.module_vars, LUSTRE_MDT_NAME); - - return 0; -} - -static void /*__exit*/ mds_exit(void) -{ - lquota_exit(mds_quota_interface_ref); - if (mds_quota_interface_ref) - PORTAL_SYMBOL_PUT(mds_quota_interface); - - class_unregister_type(LUSTRE_MDS_NAME); - class_unregister_type(LUSTRE_MDT_NAME); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre Metadata Server (MDS)"); -MODULE_LICENSE("GPL"); - -module_init(mds_init); -module_exit(mds_exit); diff --git a/lustre/mds/lproc_mds.c b/lustre/mds/lproc_mds.c deleted file mode 100644 index ba1562f43c..0000000000 --- a/lustre/mds/lproc_mds.c +++ /dev/null @@ -1,645 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - */ -#define DEBUG_SUBSYSTEM S_CLASS - -#include <linux/version.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -#include <asm/statfs.h> -#endif -#include <obd.h> -#include <obd_class.h> -#include <lprocfs_status.h> -#include "mds_internal.h" - -#ifdef LPROCFS -static int lprocfs_mds_rd_mntdev(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device* obd = (struct obd_device *)data; - - LASSERT(obd != NULL); - LASSERT(obd->u.mds.mds_vfsmnt->mnt_devname); - *eof = 1; - - return snprintf(page, count, "%s\n",obd->u.mds.mds_vfsmnt->mnt_devname); -} - -static int lprocfs_mds_rd_evictostnids(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device* obd = (struct obd_device *)data; - - LASSERT(obd != NULL); - - return snprintf(page, count, "%d\n", obd->u.mds.mds_evict_ost_nids); -} - -static int lprocfs_mds_wr_evictostnids(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - int val, rc; - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - obd->u.mds.mds_evict_ost_nids = !!val; - - return count; -} - -static int lprocfs_mds_wr_evict_client(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - struct mds_obd *mds = &obd->u.mds; - char tmpbuf[sizeof(struct obd_uuid)]; - struct ptlrpc_request_set *set; - int rc; - - sscanf(buffer, "%40s", tmpbuf); - - if (strncmp(tmpbuf, "nid:", 4) != 0) - return lprocfs_wr_evict_client(file, buffer, count, data); - - set = ptlrpc_prep_set(); - if (!set) - return -ENOMEM; - - if (obd->u.mds.mds_evict_ost_nids) { - rc = obd_set_info_async(mds->mds_osc_exp,strlen("evict_by_nid"), - "evict_by_nid", strlen(tmpbuf + 4) + 1, - tmpbuf + 4, set); - if (rc) - CERROR("Failed to evict nid %s from OSTs: rc %d\n", - tmpbuf + 4, rc); - ptlrpc_check_set(set); - } - - /* See the comments in function lprocfs_wr_evict_client() - * in ptlrpc/lproc_ptlrpc.c for details. - jay */ - class_incref(obd); - LPROCFS_EXIT(); - - obd_export_evict_by_nid(obd, tmpbuf+4); - - - rc = ptlrpc_set_wait(set); - if (rc) - CERROR("Failed to evict nid %s from OSTs: rc %d\n", tmpbuf + 4, - rc); - - LPROCFS_ENTRY(); - class_decref(obd); - - ptlrpc_set_destroy(set); - return count; -} - -static int lprocfs_wr_group_info(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - struct mds_obd *mds = &obd->u.mds; - struct mds_grp_downcall_data sparam, *param = &sparam; - int size = 0, rc = count; - - if (count < sizeof(param)) { - CERROR("%s: invalid data size %lu\n", obd->obd_name, count); - return count; - } - - if (copy_from_user(param, buffer, sizeof(*param)) || - param->mgd_magic != MDS_GRP_DOWNCALL_MAGIC) { - CERROR("%s: MDS group downcall bad params\n", obd->obd_name); - return count; - } - - if (param->mgd_ngroups > NGROUPS_MAX) { - CWARN("%s: uid %u groups %d more than maximum %d\n", - obd->obd_name, param->mgd_uid, param->mgd_ngroups, - NGROUPS_MAX); - param->mgd_ngroups = NGROUPS_MAX; - } - - if (param->mgd_ngroups > 0) { - size = offsetof(struct mds_grp_downcall_data, - mgd_groups[param->mgd_ngroups]); - OBD_ALLOC(param, size); - if (!param) { - CERROR("%s: fail to alloc %d bytes for uid %u" - " with %d groups\n", obd->obd_name, size, - sparam.mgd_uid, sparam.mgd_ngroups); - param = &sparam; - param->mgd_ngroups = 0; - } else if (copy_from_user(param, buffer, size)) { - CERROR("%s: uid %u bad supplementary group data\n", - obd->obd_name, sparam.mgd_uid); - OBD_FREE(param, size); - param = &sparam; - param->mgd_ngroups = 0; - } - } - rc = upcall_cache_downcall(mds->mds_group_hash, param->mgd_err, - param->mgd_uid, param->mgd_gid, - param->mgd_ngroups, param->mgd_groups); - - if (param && param != &sparam) - OBD_FREE(param, size); - - return rc; -} - -static int lprocfs_rd_group_expire(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = data; - - *eof = 1; - return snprintf(page, count, "%lu\n", - obd->u.mds.mds_group_hash->uc_entry_expire / HZ); -} - -static int lprocfs_wr_group_expire(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - int val, rc; - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val > 5) - obd->u.mds.mds_group_hash->uc_entry_expire = val * HZ; - else - CERROR("invalid expire time %u for group cache\n", val); - - return count; -} - -static int lprocfs_rd_group_acquire_expire(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = data; - - *eof = 1; - return snprintf(page, count, "%lu\n", - obd->u.mds.mds_group_hash->uc_acquire_expire / HZ); -} - -static int lprocfs_wr_group_acquire_expire(struct file *file,const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - int val, rc = 0; - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val > 2) - obd->u.mds.mds_group_hash->uc_acquire_expire = val * HZ; - - return count; -} - -static int lprocfs_rd_group_upcall(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = data; - - *eof = 1; - return snprintf(page, count, "%s\n", - obd->u.mds.mds_group_hash->uc_upcall); -} - -static int lprocfs_wr_group_upcall(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - struct upcall_cache *hash = obd->u.mds.mds_group_hash; - char kernbuf[UC_CACHE_UPCALL_MAXPATH] = { '\0' }; - - if (count >= UC_CACHE_UPCALL_MAXPATH) { - CERROR("%s: group upcall too long\n", obd->obd_name); - return -EINVAL; - } - - if (copy_from_user(kernbuf, buffer, - min(count, UC_CACHE_UPCALL_MAXPATH - 1))) - return -EFAULT; - - /* Remove any extraneous bits from the upcall (e.g. linefeeds) */ - sscanf(kernbuf, "%s", hash->uc_upcall); - - if (strcmp(hash->uc_name, obd->obd_name) != 0) - CWARN("%s: write to upcall name %s for MDS %s\n", - obd->obd_name, hash->uc_upcall, obd->obd_name); - CWARN("%s: group upcall set to %s\n", obd->obd_name, hash->uc_upcall); - - return count; -} - -static int lprocfs_wr_group_flush(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - - upcall_cache_flush_idle(obd->u.mds.mds_group_hash); - return count; -} - -static int lprocfs_wr_atime_diff(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - struct mds_obd *mds = &obd->u.mds; - char kernbuf[20], *end; - unsigned long diff = 0; - - if (count > (sizeof(kernbuf) - 1)) - return -EINVAL; - - if (copy_from_user(kernbuf, buffer, count)) - return -EFAULT; - - kernbuf[count] = '\0'; - - diff = simple_strtoul(kernbuf, &end, 0); - if (kernbuf == end) - return -EINVAL; - - mds->mds_atime_diff = diff; - return count; -} - -static int lprocfs_rd_atime_diff(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = data; - struct mds_obd *mds = &obd->u.mds; - - *eof = 1; - return snprintf(page, count, "%lu\n", mds->mds_atime_diff); -} - -static int lprocfs_wr_rootsquash(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - struct mds_obd *mds = &obd->u.mds; - char kernbuf[50], *tmp, *end; - unsigned long uid, gid; - - if (count > (sizeof(kernbuf) - 1)) - return -EINVAL; - - if (copy_from_user(kernbuf, buffer, count)) - return -EFAULT; - - kernbuf[count] = '\0'; - - uid = simple_strtoul(kernbuf, &tmp, 0); - if (kernbuf == tmp) { - if (tmp[0] != ':') - return -EINVAL; - uid = mds->mds_squash_uid; - } - /* skip ':' */ - tmp++; - gid = simple_strtoul(tmp, &end, 0); - if (tmp == end) - gid = mds->mds_squash_gid; - - mds->mds_squash_uid = uid; - mds->mds_squash_gid = gid; - return count; -} - -static int lprocfs_rd_rootsquash(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = data; - struct mds_obd *mds = &obd->u.mds; - - *eof = 1; - return snprintf(page, count, "%lu:%lu\n", - (unsigned long)mds->mds_squash_uid, - (unsigned long)mds->mds_squash_gid); -} - -static int lprocfs_wr_nosquash_nid(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = data; - struct mds_obd *mds = &obd->u.mds; - char kernbuf[30], *start, *end; - - if (count > (sizeof(kernbuf) - 1)) - return -EINVAL; - - if (copy_from_user(kernbuf, buffer, count)) - return -EFAULT; - kernbuf[count] = '\0'; - - /* strip frontal whitespaces */ - start = kernbuf; - while (*start && isspace(*start)) - start++; - /* EOL - string doesn't contain NID */ - if (*start == '\0') - return -EINVAL; - /* strip backward whitespaces */ - end = kernbuf + count - 1; - while (*end && isspace(*end)) - end--; - *(end + 1) = '\0'; - - mds->mds_nosquash_nid = libcfs_str2nid(start); - return count; -} - -static int lprocfs_rd_nosquash_nid(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = data; - struct mds_obd *mds = &obd->u.mds; - - *eof = 1; - return snprintf(page, count, "%s\n", - libcfs_nid2str(mds->mds_nosquash_nid)); -} - -#ifdef HAVE_QUOTA_SUPPORT -static int lprocfs_mds_rd_switch_qs(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - LASSERT(obd != NULL); - - return snprintf(page, count, "changing qunit size is %s\n", - obd->u.obt.obt_qctxt.lqc_switch_qs ? - "enabled" : "disabled"); -} - -static int lprocfs_mds_rd_boundary_factor(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - LASSERT(obd != NULL); - - - return snprintf(page, count, "%lu\n", - obd->u.obt.obt_qctxt.lqc_cqs_boundary_factor); -} - -static int lprocfs_mds_rd_least_bunit(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - LASSERT(obd != NULL); - - - return snprintf(page, count, "%lu\n", - obd->u.obt.obt_qctxt.lqc_cqs_least_bunit); -} - -static int lprocfs_mds_rd_least_iunit(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - LASSERT(obd != NULL); - - - return snprintf(page, count, "%lu\n", - obd->u.obt.obt_qctxt.lqc_cqs_least_iunit); -} - -static int lprocfs_mds_rd_qs_factor(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - LASSERT(obd != NULL); - - - return snprintf(page, count, "%lu\n", - obd->u.obt.obt_qctxt.lqc_cqs_qs_factor); -} - -static int lprocfs_mds_wr_switch_qs(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - int val, rc; - LASSERT(obd != NULL); - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val) - obd->u.obt.obt_qctxt.lqc_switch_qs = 1; - else - obd->u.obt.obt_qctxt.lqc_switch_qs = 0; - - return count; -} - -static int lprocfs_mds_wr_boundary_factor(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - int val, rc; - LASSERT(obd != NULL); - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val < 2) - return -EINVAL; - - obd->u.obt.obt_qctxt.lqc_cqs_boundary_factor = val; - return count; -} - -static int lprocfs_mds_wr_least_bunit(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - int val, rc; - LASSERT(obd != NULL); - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val < PTLRPC_MAX_BRW_SIZE || - val >= obd->u.obt.obt_qctxt.lqc_bunit_sz) - return -EINVAL; - - obd->u.obt.obt_qctxt.lqc_cqs_least_bunit = val; - return count; -} - -static int lprocfs_mds_wr_least_iunit(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - int val, rc; - LASSERT(obd != NULL); - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val < 1 || val >= obd->u.obt.obt_qctxt.lqc_iunit_sz) - return -EINVAL; - - obd->u.obt.obt_qctxt.lqc_cqs_least_iunit = val; - return count; -} - -static int lprocfs_mds_wr_qs_factor(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - struct obd_device *obd = (struct obd_device *)data; - int val, rc; - LASSERT(obd != NULL); - - rc = lprocfs_write_helper(buffer, count, &val); - if (rc) - return rc; - - if (val < 2) - return -EINVAL; - - obd->u.obt.obt_qctxt.lqc_cqs_qs_factor = val; - return count; -} -#endif - -struct lprocfs_vars lprocfs_mds_obd_vars[] = { - { "uuid", lprocfs_rd_uuid, 0, 0 }, - { "blocksize", lprocfs_rd_blksize, 0, 0 }, - { "kbytestotal", lprocfs_rd_kbytestotal, 0, 0 }, - { "kbytesfree", lprocfs_rd_kbytesfree, 0, 0 }, - { "kbytesavail", lprocfs_rd_kbytesavail, 0, 0 }, - { "filestotal", lprocfs_rd_filestotal, 0, 0 }, - { "filesfree", lprocfs_rd_filesfree, 0, 0 }, - { "fstype", lprocfs_rd_fstype, 0, 0 }, - { "mntdev", lprocfs_mds_rd_mntdev, 0, 0 }, - { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 }, - { "evict_client", 0, lprocfs_mds_wr_evict_client, 0 }, - { "evict_ost_nids", lprocfs_mds_rd_evictostnids, - lprocfs_mds_wr_evictostnids, 0 }, - { "num_exports", lprocfs_rd_num_exports, 0, 0 }, -#ifdef HAVE_QUOTA_SUPPORT - { "quota_bunit_sz", lprocfs_quota_rd_bunit, lprocfs_quota_wr_bunit, 0 }, - { "quota_btune_sz", lprocfs_quota_rd_btune, lprocfs_quota_wr_btune, 0 }, - { "quota_iunit_sz", lprocfs_quota_rd_iunit, lprocfs_quota_wr_iunit, 0 }, - { "quota_itune_sz", lprocfs_quota_rd_itune, lprocfs_quota_wr_itune, 0 }, - { "quota_type", lprocfs_quota_rd_type, lprocfs_quota_wr_type, 0 }, - { "quota_switch_qs", lprocfs_mds_rd_switch_qs, - lprocfs_mds_wr_switch_qs, 0 }, - { "quota_boundary_factor", lprocfs_mds_rd_boundary_factor, - lprocfs_mds_wr_boundary_factor, 0 }, - { "quota_least_bunit", lprocfs_mds_rd_least_bunit, - lprocfs_mds_wr_least_bunit, 0 }, - { "quota_least_iunit", lprocfs_mds_rd_least_iunit, - lprocfs_mds_wr_least_iunit, 0 }, - { "quota_qs_factor", lprocfs_mds_rd_qs_factor, - lprocfs_mds_wr_qs_factor, 0 }, - { "quota_switch_seconds", lprocfs_quota_rd_switch_seconds, - lprocfs_quota_wr_switch_seconds, 0 }, -#endif - { "group_expire_interval", lprocfs_rd_group_expire, - lprocfs_wr_group_expire, 0}, - { "group_acquire_expire", lprocfs_rd_group_acquire_expire, - lprocfs_wr_group_acquire_expire, 0}, - { "group_upcall", lprocfs_rd_group_upcall, - lprocfs_wr_group_upcall, 0}, - { "group_flush", 0, lprocfs_wr_group_flush, 0}, - { "group_info", 0, lprocfs_wr_group_info, 0 }, - { "atime_diff", lprocfs_rd_atime_diff, lprocfs_wr_atime_diff, 0 }, - { "rootsquash", lprocfs_rd_rootsquash, - lprocfs_wr_rootsquash, 0 }, - { "nosquash_nid", lprocfs_rd_nosquash_nid, - lprocfs_wr_nosquash_nid, 0 }, - { 0 } -}; - -struct lprocfs_vars lprocfs_mds_module_vars[] = { - { "num_refs", lprocfs_rd_numrefs, 0, 0 }, - { 0 } -}; - -struct lprocfs_vars lprocfs_mdt_obd_vars[] = { - { "uuid", lprocfs_rd_uuid, 0, 0 }, - { 0 } -}; - -struct lprocfs_vars lprocfs_mdt_module_vars[] = { - { "num_refs", lprocfs_rd_numrefs, 0, 0 }, - { 0 } -}; - -void mds_counter_incr(struct obd_export *exp, int opcode) -{ - if (exp->exp_obd && exp->exp_obd->obd_stats) - lprocfs_counter_incr(exp->exp_obd->obd_stats, opcode); - if (exp->exp_nid_stats && exp->exp_nid_stats->nid_stats != NULL) - lprocfs_counter_incr(exp->exp_nid_stats->nid_stats, opcode); - -} - -void mds_stats_counter_init(struct lprocfs_stats *stats) -{ - lprocfs_counter_init(stats, LPROC_MDS_OPEN, 0, "open", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_CLOSE, 0, "close", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_MKNOD, 0, "mknod", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_LINK, 0, "link", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_UNLINK, 0, "unlink", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_MKDIR, 0, "mkdir", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_RMDIR, 0, "rmdir", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_RENAME, 0, "rename", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_GETXATTR, 0, "getxattr", "reqs"); - lprocfs_counter_init(stats, LPROC_MDS_SETXATTR, 0, "setxattr", "reqs"); -} - -void lprocfs_mds_init_vars(struct lprocfs_static_vars *lvars) -{ - lvars->module_vars = lprocfs_mds_module_vars; - lvars->obd_vars = lprocfs_mds_obd_vars; -} - -void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars) -{ - lvars->module_vars = lprocfs_mdt_module_vars; - lvars->obd_vars = lprocfs_mdt_obd_vars; -} -#endif diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c deleted file mode 100644 index ce27d6acc1..0000000000 --- a/lustre/mds/mds_fs.c +++ /dev/null @@ -1,852 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * mds/mds_fs.c - * Lustre Metadata Server (MDS) filesystem interface code - * - * Copyright (C) 2002, 2003 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDS - -#include <linux/module.h> -#include <linux/kmod.h> -#include <linux/version.h> -#include <linux/sched.h> -#include <lustre_quota.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -#include <linux/mount.h> -#endif -#include <lustre_mds.h> -#include <obd_class.h> -#include <obd_support.h> -#include <lustre_lib.h> -#include <lustre_fsfilt.h> -#include <lustre_disk.h> -#include <libcfs/list.h> - -#include "mds_internal.h" - - -static int mds_export_stats_init(struct obd_device *obd, - struct obd_export *exp, - lnet_nid_t client_nid) - { - int rc, num_stats, newnid; - - rc = lprocfs_exp_setup(exp, client_nid, &newnid); - if (rc) - return rc; - - if (client_nid && newnid) { - struct nid_stat *tmp = exp->exp_nid_stats; - LASSERT(tmp != NULL); - - num_stats = (sizeof(*obd->obd_type->typ_ops) / sizeof(void *)) + - LPROC_MDS_LAST - 1; - tmp->nid_stats = lprocfs_alloc_stats(num_stats, - LPROCFS_STATS_FLAG_NOPERCPU); - if (tmp->nid_stats == NULL) - return -ENOMEM; - - lprocfs_init_ops_stats(LPROC_MDS_LAST, tmp->nid_stats); - rc = lprocfs_register_stats(tmp->nid_proc, "stats", - tmp->nid_stats); - if (rc) - return rc; - - mds_stats_counter_init(tmp->nid_stats); - } - - return 0; -} - -/* Add client data to the MDS. We use a bitmap to locate a free space - * in the last_rcvd file if cl_off is -1 (i.e. a new client). - * Otherwise, we have just read the data from the last_rcvd file and - * we know its offset. - * - * It should not be possible to fail adding an existing client - otherwise - * mds_init_server_data() callsite needs to be fixed. - */ -int mds_client_add(struct obd_device *obd, struct obd_export *exp, - int cl_idx, lnet_nid_t client_nid) -{ - struct mds_obd *mds = &obd->u.mds; - struct mds_export_data *med = &exp->exp_mds_data; - unsigned long *bitmap = mds->mds_client_bitmap; - int new_client = (cl_idx == -1); - int rc; - ENTRY; - - LASSERT(bitmap != NULL); - LASSERTF(cl_idx > -2, "%d\n", cl_idx); - - /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */ - if (!strcmp(med->med_mcd->mcd_uuid, obd->obd_uuid.uuid)) - RETURN(0); - - /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so - * there's no need for extra complication here - */ - if (new_client) { - cl_idx = find_first_zero_bit(bitmap, LR_MAX_CLIENTS); - repeat: - if (cl_idx >= LR_MAX_CLIENTS || - OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_CLIENT_ADD)) { - CERROR("no room for %u clients - fix LR_MAX_CLIENTS\n", - cl_idx); - return -EOVERFLOW; - } - if (test_and_set_bit(cl_idx, bitmap)) { - cl_idx = find_next_zero_bit(bitmap, LR_MAX_CLIENTS, - cl_idx); - goto repeat; - } - } else { - if (test_and_set_bit(cl_idx, bitmap)) { - CERROR("MDS client %d: bit already set in bitmap!!\n", - cl_idx); - LBUG(); - } - } - - CDEBUG(D_INFO, "client at idx %d with UUID '%s' added\n", - cl_idx, med->med_mcd->mcd_uuid); - - med->med_lr_idx = cl_idx; - med->med_lr_off = le32_to_cpu(mds->mds_server_data->lsd_client_start) + - (cl_idx * le16_to_cpu(mds->mds_server_data->lsd_client_size)); - LASSERTF(med->med_lr_off > 0, "med_lr_off = %llu\n", med->med_lr_off); - mds_export_stats_init(obd, exp, client_nid); - - if (new_client) { - struct lvfs_run_ctxt saved; - loff_t off = med->med_lr_off; - struct file *file = mds->mds_rcvd_filp; - void *handle; - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - handle = fsfilt_start(obd, file->f_dentry->d_inode, - FSFILT_OP_SETATTR, NULL); - if (IS_ERR(handle)) { - rc = PTR_ERR(handle); - CERROR("unable to start transaction: rc %d\n", rc); - } else { - rc = fsfilt_add_journal_cb(obd, 0, handle, - target_client_add_cb, exp); - if (rc == 0) { - spin_lock(&exp->exp_lock); - exp->exp_need_sync = 1; - spin_unlock(&exp->exp_lock); - } - rc = fsfilt_write_record(obd, file, med->med_mcd, - sizeof(*med->med_mcd), - &off, rc /* sync if no cb */); - fsfilt_commit(obd, file->f_dentry->d_inode, handle, 0); - } - - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - if (rc) - return rc; - CDEBUG(D_INFO, "wrote client mcd at idx %u off %llu (len %u)\n", - med->med_lr_idx, med->med_lr_off, - (unsigned int)sizeof(*med->med_mcd)); - } - return 0; -} - -int mds_client_free(struct obd_export *exp) -{ - struct mds_export_data *med = &exp->exp_mds_data; - struct mds_obd *mds = &exp->exp_obd->u.mds; - struct obd_device *obd = exp->exp_obd; - struct mds_client_data zero_mcd; - struct lvfs_run_ctxt saved; - int rc; - loff_t off; - ENTRY; - - if (!med->med_mcd) - RETURN(0); - - /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */ - if (!strcmp(med->med_mcd->mcd_uuid, obd->obd_uuid.uuid)) - GOTO(free, 0); - - CDEBUG(D_INFO, "freeing client at idx %u, offset %lld with UUID '%s'\n", - med->med_lr_idx, med->med_lr_off, med->med_mcd->mcd_uuid); - - LASSERT(mds->mds_client_bitmap != NULL); - - lprocfs_exp_cleanup(exp); - - off = med->med_lr_off; - - /* Don't clear med_lr_idx here as it is likely also unset. At worst - * we leak a client slot that will be cleaned on the next recovery. */ - if (off <= 0) { - CERROR("%s: client idx %d has offset %lld\n", - obd->obd_name, med->med_lr_idx, off); - GOTO(free, rc = -EINVAL); - } - - /* Clear the bit _after_ zeroing out the client so we don't - race with mds_client_add and zero out new clients.*/ - if (!test_bit(med->med_lr_idx, mds->mds_client_bitmap)) { - CERROR("MDS client %u: bit already clear in bitmap!!\n", - med->med_lr_idx); - LBUG(); - } - - if (!(exp->exp_flags & OBD_OPT_FAILOVER)) { - memset(&zero_mcd, 0, sizeof zero_mcd); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = fsfilt_write_record(obd, mds->mds_rcvd_filp, &zero_mcd, - sizeof(zero_mcd), &off, - (!exp->exp_libclient || - exp->exp_need_sync)); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - CDEBUG(rc == 0 ? D_INFO : D_ERROR, - "zeroing out client %s idx %u in %s rc %d\n", - med->med_mcd->mcd_uuid, med->med_lr_idx, LAST_RCVD, rc); - } - - if (!test_and_clear_bit(med->med_lr_idx, mds->mds_client_bitmap)) { - CERROR("MDS client %u: bit already clear in bitmap!!\n", - med->med_lr_idx); - LBUG(); - } - - - /* Make sure the server's last_transno is up to date. Do this - * after the client is freed so we know all the client's - * transactions have been committed. */ - mds_update_server_data(exp->exp_obd, 0); - - EXIT; - free: - OBD_FREE(med->med_mcd, sizeof(*med->med_mcd)); - med->med_mcd = NULL; - - return 0; -} - -static int mds_server_free_data(struct mds_obd *mds) -{ - OBD_FREE(mds->mds_client_bitmap, LR_MAX_CLIENTS / 8); - OBD_FREE(mds->mds_server_data, sizeof(*mds->mds_server_data)); - mds->mds_server_data = NULL; - - return 0; -} - -static int mds_init_server_data(struct obd_device *obd, struct file *file) -{ - struct mds_obd *mds = &obd->u.mds; - struct lr_server_data *lsd; - struct mds_client_data *mcd = NULL; - loff_t off = 0; - unsigned long last_rcvd_size = i_size_read(file->f_dentry->d_inode); - __u64 mount_count; - int cl_idx, rc = 0; - ENTRY; - - /* ensure padding in the struct is the correct size */ - LASSERT(offsetof(struct lr_server_data, lsd_padding) + - sizeof(lsd->lsd_padding) == LR_SERVER_SIZE); - LASSERT(offsetof(struct mds_client_data, mcd_padding) + - sizeof(mcd->mcd_padding) == LR_CLIENT_SIZE); - - OBD_ALLOC_WAIT(lsd, sizeof(*lsd)); - if (!lsd) - RETURN(-ENOMEM); - - OBD_ALLOC_WAIT(mds->mds_client_bitmap, LR_MAX_CLIENTS / 8); - if (!mds->mds_client_bitmap) { - OBD_FREE(lsd, sizeof(*lsd)); - RETURN(-ENOMEM); - } - - mds->mds_server_data = lsd; - - if (last_rcvd_size == 0) { - LCONSOLE_WARN("%s: new disk, initializing\n", obd->obd_name); - - memcpy(lsd->lsd_uuid, obd->obd_uuid.uuid,sizeof(lsd->lsd_uuid)); - lsd->lsd_last_transno = 0; - mount_count = lsd->lsd_mount_count = 0; - lsd->lsd_server_size = cpu_to_le32(LR_SERVER_SIZE); - lsd->lsd_client_start = cpu_to_le32(LR_CLIENT_START); - lsd->lsd_client_size = cpu_to_le16(LR_CLIENT_SIZE); - lsd->lsd_feature_rocompat = cpu_to_le32(OBD_ROCOMPAT_LOVOBJID); - lsd->lsd_feature_incompat = cpu_to_le32(OBD_INCOMPAT_MDT); - } else { - rc = fsfilt_read_record(obd, file, lsd, sizeof(*lsd), &off); - if (rc) { - CERROR("error reading MDS %s: rc %d\n", LAST_RCVD, rc); - GOTO(err_msd, rc); - } - if (strcmp(lsd->lsd_uuid, obd->obd_uuid.uuid) != 0) { - LCONSOLE_ERROR_MSG(0x157, "Trying to start OBD %s using" - " the wrong disk %s. Were the /dev/ " - "assignments rearranged?\n", - obd->obd_uuid.uuid, lsd->lsd_uuid); - GOTO(err_msd, rc = -EINVAL); - } - /* COMPAT_146 */ - /* Assume old last_rcvd format unless I_C_LR is set */ - if (!(lsd->lsd_feature_incompat & - cpu_to_le32(OBD_INCOMPAT_COMMON_LR))) - lsd->lsd_mount_count = lsd->lsd_compat14; - /* end COMPAT_146 */ - mount_count = le64_to_cpu(lsd->lsd_mount_count); - } - - if (lsd->lsd_feature_incompat & ~cpu_to_le32(MDT_INCOMPAT_SUPP)) { - CERROR("%s: unsupported incompat filesystem feature(s) %x\n", - obd->obd_name, le32_to_cpu(lsd->lsd_feature_incompat) & - ~MDT_INCOMPAT_SUPP); - GOTO(err_msd, rc = -EINVAL); - } - if (lsd->lsd_feature_rocompat & ~cpu_to_le32(MDT_ROCOMPAT_SUPP)) { - CERROR("%s: unsupported read-only filesystem feature(s) %x\n", - obd->obd_name, le32_to_cpu(lsd->lsd_feature_rocompat) & - ~MDT_ROCOMPAT_SUPP); - /* Do something like remount filesystem read-only */ - GOTO(err_msd, rc = -EINVAL); - } - - lsd->lsd_feature_compat = cpu_to_le32(OBD_COMPAT_MDT); - - mds->mds_last_transno = le64_to_cpu(lsd->lsd_last_transno); - - CDEBUG(D_INODE, "%s: server last_transno: "LPU64"\n", - obd->obd_name, mds->mds_last_transno); - CDEBUG(D_INODE, "%s: server mount_count: "LPU64"\n", - obd->obd_name, mount_count + 1); - CDEBUG(D_INODE, "%s: server data size: %u\n", - obd->obd_name, le32_to_cpu(lsd->lsd_server_size)); - CDEBUG(D_INODE, "%s: per-client data start: %u\n", - obd->obd_name, le32_to_cpu(lsd->lsd_client_start)); - CDEBUG(D_INODE, "%s: per-client data size: %u\n", - obd->obd_name, le32_to_cpu(lsd->lsd_client_size)); - CDEBUG(D_INODE, "%s: last_rcvd size: %lu\n", - obd->obd_name, last_rcvd_size); - CDEBUG(D_INODE, "%s: last_rcvd clients: %lu\n", obd->obd_name, - last_rcvd_size <= le32_to_cpu(lsd->lsd_client_start) ? 0 : - (last_rcvd_size - le32_to_cpu(lsd->lsd_client_start)) / - le16_to_cpu(lsd->lsd_client_size)); - - if (!lsd->lsd_server_size || !lsd->lsd_client_start || - !lsd->lsd_client_size) { - CERROR("Bad last_rcvd contents!\n"); - GOTO(err_msd, rc = -EINVAL); - } - - /* When we do a clean MDS shutdown, we save the last_transno into - * the header. If we find clients with higher last_transno values - * then those clients may need recovery done. */ - for (cl_idx = 0, off = le32_to_cpu(lsd->lsd_client_start); - off < last_rcvd_size; cl_idx++) { - __u64 last_transno; - struct obd_export *exp; - struct mds_export_data *med; - - if (!mcd) { - OBD_ALLOC_WAIT(mcd, sizeof(*mcd)); - if (!mcd) - GOTO(err_client, rc = -ENOMEM); - } - - /* Don't assume off is incremented properly by - * fsfilt_read_record(), in case sizeof(*mcd) - * isn't the same as lsd->lsd_client_size. */ - off = le32_to_cpu(lsd->lsd_client_start) + - cl_idx * le16_to_cpu(lsd->lsd_client_size); - rc = fsfilt_read_record(obd, file, mcd, sizeof(*mcd), &off); - if (rc) { - CERROR("error reading MDS %s idx %d, off %llu: rc %d\n", - LAST_RCVD, cl_idx, off, rc); - break; /* read error shouldn't cause startup to fail */ - } - - if (mcd->mcd_uuid[0] == '\0') { - CDEBUG(D_INFO, "skipping zeroed client at offset %d\n", - cl_idx); - continue; - } - - last_transno = le64_to_cpu(mcd->mcd_last_transno) > - le64_to_cpu(mcd->mcd_last_close_transno) ? - le64_to_cpu(mcd->mcd_last_transno) : - le64_to_cpu(mcd->mcd_last_close_transno); - - /* These exports are cleaned up by mds_disconnect(), so they - * need to be set up like real exports as mds_connect() does. - */ - CDEBUG(D_HA, "RCVRNG CLIENT uuid: %s idx: %d lr: "LPU64 - " srv lr: "LPU64" lx: "LPU64"\n", mcd->mcd_uuid, cl_idx, - last_transno, le64_to_cpu(lsd->lsd_last_transno), - le64_to_cpu(mcd->mcd_last_xid)); - - exp = class_new_export(obd, (struct obd_uuid *)mcd->mcd_uuid); - if (IS_ERR(exp)) { - if (PTR_ERR(exp) == -EALREADY) { - /* export already exists, zero out this one */ - mcd->mcd_uuid[0] = '\0'; - } else { - GOTO(err_client, rc = PTR_ERR(exp)); - } - } else { - med = &exp->exp_mds_data; - med->med_mcd = mcd; - rc = mds_client_add(obd, exp, cl_idx, 0); - /* can't fail for existing client */ - LASSERTF(rc == 0, "rc = %d\n", rc); - - mcd = NULL; - - spin_lock(&exp->exp_lock); - exp->exp_replay_needed = 1; - exp->exp_connecting = 0; - spin_unlock(&exp->exp_lock); - - obd->obd_recoverable_clients++; - obd->obd_max_recoverable_clients++; - class_export_put(exp); - } - - /* Need to check last_rcvd even for duplicated exports. */ - CDEBUG(D_OTHER, "client at idx %d has last_transno = "LPU64"\n", - cl_idx, last_transno); - - if (last_transno > mds->mds_last_transno) - mds->mds_last_transno = last_transno; - } - - if (mcd) - OBD_FREE(mcd, sizeof(*mcd)); - - obd->obd_last_committed = mds->mds_last_transno; - - if (obd->obd_recoverable_clients) { - CWARN("RECOVERY: service %s, %d recoverable clients, " - "last_transno "LPU64"\n", obd->obd_name, - obd->obd_recoverable_clients, mds->mds_last_transno); - obd->obd_next_recovery_transno = obd->obd_last_committed + 1; - obd->obd_recovering = 1; - obd->obd_recovery_start = 0; - obd->obd_recovery_end = 0; - obd->obd_recovery_timeout = OBD_RECOVERY_FACTOR * obd_timeout; -#ifdef CRAY_XT3 - /* bz13079: this won't be changed for mds */ - obd->obd_recovery_max_time = OBD_RECOVERY_MAX_TIME; -#endif - } - - mds->mds_mount_count = mount_count + 1; - lsd->lsd_mount_count = lsd->lsd_compat14 = - cpu_to_le64(mds->mds_mount_count); - - /* save it, so mount count and last_transno is current */ - rc = mds_update_server_data(obd, 1); - if (rc) - GOTO(err_client, rc); - - RETURN(0); - -err_client: - class_disconnect_exports(obd); -err_msd: - mds_server_free_data(mds); - RETURN(rc); -} - -int mds_fs_setup(struct obd_device *obd, struct vfsmount *mnt) -{ - struct mds_obd *mds = &obd->u.mds; - struct lvfs_run_ctxt saved; - struct dentry *dentry; - struct file *file; - int rc; - ENTRY; - - OBD_FAIL_RETURN(OBD_FAIL_MDS_FS_SETUP, -ENOENT); - - rc = cleanup_group_info(); - if (rc) - RETURN(rc); - - mds->mds_vfsmnt = mnt; - /* why not mnt->mnt_sb instead of mnt->mnt_root->d_inode->i_sb? */ - obd->u.obt.obt_sb = mnt->mnt_root->d_inode->i_sb; - - rc = fsfilt_setup(obd, obd->u.obt.obt_sb); - if (rc) - RETURN(rc); - - OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt); - obd->obd_lvfs_ctxt.pwdmnt = mnt; - obd->obd_lvfs_ctxt.pwd = mnt->mnt_root; - obd->obd_lvfs_ctxt.fs = get_ds(); - obd->obd_lvfs_ctxt.cb_ops = mds_lvfs_ops; - - /* setup the directory tree */ - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - dentry = simple_mkdir(current->fs->pwd, "ROOT", 0755, 0); - if (IS_ERR(dentry)) { - rc = PTR_ERR(dentry); - CERROR("cannot create ROOT directory: rc = %d\n", rc); - GOTO(err_pop, rc); - } - - mds->mds_rootfid.id = dentry->d_inode->i_ino; - mds->mds_rootfid.generation = dentry->d_inode->i_generation; - mds->mds_rootfid.f_type = S_IFDIR; - - dput(dentry); - - dentry = lookup_one_len("__iopen__", current->fs->pwd, - strlen("__iopen__")); - if (IS_ERR(dentry)) { - rc = PTR_ERR(dentry); - CERROR("cannot lookup __iopen__ directory: rc = %d\n", rc); - GOTO(err_pop, rc); - } - - mds->mds_fid_de = dentry; - if (!dentry->d_inode || is_bad_inode(dentry->d_inode)) { - rc = -ENOENT; - CERROR("__iopen__ directory has no inode? rc = %d\n", rc); - GOTO(err_fid, rc); - } - - dentry = simple_mkdir(current->fs->pwd, "PENDING", 0777, 1); - if (IS_ERR(dentry)) { - rc = PTR_ERR(dentry); - CERROR("cannot create PENDING directory: rc = %d\n", rc); - GOTO(err_fid, rc); - } - mds->mds_pending_dir = dentry; - - /* COMPAT_146 */ - dentry = simple_mkdir(current->fs->pwd, MDT_LOGS_DIR, 0777, 1); - if (IS_ERR(dentry)) { - rc = PTR_ERR(dentry); - CERROR("cannot create %s directory: rc = %d\n", - MDT_LOGS_DIR, rc); - GOTO(err_pending, rc); - } - mds->mds_logs_dir = dentry; - /* end COMPAT_146 */ - - dentry = simple_mkdir(current->fs->pwd, "OBJECTS", 0777, 1); - if (IS_ERR(dentry)) { - rc = PTR_ERR(dentry); - CERROR("cannot create OBJECTS directory: rc = %d\n", rc); - GOTO(err_logs, rc); - } - mds->mds_objects_dir = dentry; - - /* open and test the last rcvd file */ - file = filp_open(LAST_RCVD, O_RDWR | O_CREAT, 0644); - if (IS_ERR(file)) { - rc = PTR_ERR(file); - CERROR("cannot open/create %s file: rc = %d\n", LAST_RCVD, rc); - GOTO(err_objects, rc = PTR_ERR(file)); - } - mds->mds_rcvd_filp = file; - if (!S_ISREG(file->f_dentry->d_inode->i_mode)) { - CERROR("%s is not a regular file!: mode = %o\n", LAST_RCVD, - file->f_dentry->d_inode->i_mode); - GOTO(err_last_rcvd, rc = -ENOENT); - } - - rc = mds_init_server_data(obd, file); - if (rc) { - CERROR("cannot read %s: rc = %d\n", LAST_RCVD, rc); - GOTO(err_last_rcvd, rc); - } - - rc = mds_lov_init_objids(obd); - if (rc != 0) { - CERROR("cannot init lov objid rc = %d\n", rc); - GOTO(err_client, rc ); - } - - /* open and test the check io file junk */ - file = filp_open(HEALTH_CHECK, O_RDWR | O_CREAT, 0644); - if (IS_ERR(file)) { - rc = PTR_ERR(file); - CERROR("cannot open/create %s file: rc = %d\n",HEALTH_CHECK,rc); - GOTO(err_lov_objid, rc = PTR_ERR(file)); - } - mds->mds_health_check_filp = file; - if (!S_ISREG(file->f_dentry->d_inode->i_mode)) { - CERROR("%s is not a regular file!: mode = %o\n", HEALTH_CHECK, - file->f_dentry->d_inode->i_mode); - GOTO(err_health_check, rc = -ENOENT); - } - rc = lvfs_check_io_health(obd, file); - if (rc) - GOTO(err_health_check, rc); -err_pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - return rc; - -err_health_check: - if (mds->mds_health_check_filp && - filp_close(mds->mds_health_check_filp, 0)) - CERROR("can't close %s after error\n", HEALTH_CHECK); -err_lov_objid: - mds_lov_destroy_objids(obd); -err_client: - class_disconnect_exports(obd); -err_last_rcvd: - if (mds->mds_rcvd_filp && filp_close(mds->mds_rcvd_filp, 0)) - CERROR("can't close %s after error\n", LAST_RCVD); -err_objects: - dput(mds->mds_objects_dir); -err_logs: - dput(mds->mds_logs_dir); -err_pending: - dput(mds->mds_pending_dir); -err_fid: - dput(mds->mds_fid_de); - goto err_pop; -} - -int mds_fs_cleanup(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - struct lvfs_run_ctxt saved; - int rc = 0; - - if (obd->obd_fail) - LCONSOLE_WARN("%s: shutting down for failover; client state " - "will be preserved.\n", obd->obd_name); - - class_disconnect_exports(obd); /* cleans up client info too */ - mds_server_free_data(mds); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - if (mds->mds_rcvd_filp) { - rc = filp_close(mds->mds_rcvd_filp, 0); - mds->mds_rcvd_filp = NULL; - if (rc) - CERROR("%s file won't close, rc=%d\n", LAST_RCVD, rc); - } - - mds_lov_destroy_objids(obd); - - if (mds->mds_health_check_filp) { - rc = filp_close(mds->mds_health_check_filp, 0); - mds->mds_health_check_filp = NULL; - if (rc) - CERROR("%s file won't close, rc=%d\n", HEALTH_CHECK,rc); - } - if (mds->mds_objects_dir != NULL) { - l_dput(mds->mds_objects_dir); - mds->mds_objects_dir = NULL; - } - if (mds->mds_logs_dir) { - l_dput(mds->mds_logs_dir); - mds->mds_logs_dir = NULL; - } - if (mds->mds_pending_dir) { - l_dput(mds->mds_pending_dir); - mds->mds_pending_dir = NULL; - } - - lquota_fs_cleanup(mds_quota_interface_ref, obd); - - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - shrink_dcache_parent(mds->mds_fid_de); - dput(mds->mds_fid_de); - LL_DQUOT_OFF(obd->u.obt.obt_sb); - - return rc; -} - -/* Creates an object with the same name as its fid. Because this is not at all - * performance sensitive, it is accomplished by creating a file, checking the - * fid, and renaming it. */ -int mds_obd_create(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md **ea, struct obd_trans_info *oti) -{ - struct mds_obd *mds = &exp->exp_obd->u.mds; - struct inode *parent_inode = mds->mds_objects_dir->d_inode; - unsigned int tmpname = ll_rand(); - struct file *filp; - struct dentry *new_child; - struct lvfs_run_ctxt saved; - char fidname[LL_FID_NAMELEN]; - void *handle; - struct lvfs_ucred ucred = { 0 }; - int rc = 0, err, namelen; - ENTRY; - - /* the owner of object file should always be root */ - cap_raise(ucred.luc_cap, CAP_SYS_RESOURCE); - - push_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, &ucred); - - sprintf(fidname, "OBJECTS/%u.%u", tmpname, current->pid); - filp = filp_open(fidname, O_CREAT | O_EXCL, 0666); - if (IS_ERR(filp)) { - rc = PTR_ERR(filp); - if (rc == -EEXIST) { - CERROR("impossible object name collision %u\n", - tmpname); - LBUG(); - } - CERROR("error creating tmp object %u: rc %d\n", tmpname, rc); - GOTO(out_pop, rc); - } - - LASSERT(mds->mds_objects_dir == filp->f_dentry->d_parent); - - oa->o_id = filp->f_dentry->d_inode->i_ino; - oa->o_generation = filp->f_dentry->d_inode->i_generation; - namelen = ll_fid2str(fidname, oa->o_id, oa->o_generation); - - LOCK_INODE_MUTEX(parent_inode); - new_child = lookup_one_len(fidname, mds->mds_objects_dir, namelen); - - if (IS_ERR(new_child)) { - CERROR("getting neg dentry for obj rename: %d\n", rc); - GOTO(out_close, rc = PTR_ERR(new_child)); - } - if (new_child->d_inode != NULL) { - CERROR("impossible non-negative obj dentry " LPU64":%u!\n", - oa->o_id, oa->o_generation); - LBUG(); - } - - handle = fsfilt_start(exp->exp_obd, mds->mds_objects_dir->d_inode, - FSFILT_OP_RENAME, NULL); - if (IS_ERR(handle)) - GOTO(out_dput, rc = PTR_ERR(handle)); - - lock_kernel(); - rc = vfs_rename(mds->mds_objects_dir->d_inode, filp->f_dentry, - mds->mds_objects_dir->d_inode, new_child); - unlock_kernel(); - if (rc) - CERROR("error renaming new object "LPU64":%u: rc %d\n", - oa->o_id, oa->o_generation, rc); - - err = fsfilt_commit(exp->exp_obd, mds->mds_objects_dir->d_inode, - handle, 0); - if (!err) - oa->o_valid |= OBD_MD_FLID | OBD_MD_FLGENER; - else if (!rc) - rc = err; -out_dput: - dput(new_child); -out_close: - UNLOCK_INODE_MUTEX(parent_inode); - err = filp_close(filp, 0); - if (err) { - CERROR("closing tmpfile %u: rc %d\n", tmpname, rc); - if (!rc) - rc = err; - } -out_pop: - pop_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, &ucred); - RETURN(rc); -} - -int mds_obd_destroy(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md *ea, struct obd_trans_info *oti, - struct obd_export *md_exp) -{ - struct mds_obd *mds = &exp->exp_obd->u.mds; - struct inode *parent_inode = mds->mds_objects_dir->d_inode; - struct obd_device *obd = exp->exp_obd; - struct lvfs_run_ctxt saved; - struct lvfs_ucred ucred = { 0 }; - char fidname[LL_FID_NAMELEN]; - struct inode *inode = NULL; - struct dentry *de; - void *handle; - int err, namelen, rc = 0; - ENTRY; - - cap_raise(ucred.luc_cap, CAP_SYS_RESOURCE); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, &ucred); - - namelen = ll_fid2str(fidname, oa->o_id, oa->o_generation); - - LOCK_INODE_MUTEX(parent_inode); - de = lookup_one_len(fidname, mds->mds_objects_dir, namelen); - if (IS_ERR(de)) { - rc = IS_ERR(de); - de = NULL; - CERROR("error looking up object "LPU64" %s: rc %d\n", - oa->o_id, fidname, rc); - GOTO(out_dput, rc); - } - if (de->d_inode == NULL) { - CERROR("destroying non-existent object "LPU64" %s: rc %d\n", - oa->o_id, fidname, rc); - GOTO(out_dput, rc = -ENOENT); - } - - /* Stripe count is 1 here since this is some MDS specific stuff - that is unlinked, not spanned across multiple OSTs */ - handle = fsfilt_start_log(obd, mds->mds_objects_dir->d_inode, - FSFILT_OP_UNLINK, oti, 1); - - if (IS_ERR(handle)) - GOTO(out_dput, rc = PTR_ERR(handle)); - - /* take a reference to protect inode from truncation within - vfs_unlink() context. bug 10409 */ - inode = de->d_inode; - atomic_inc(&inode->i_count); - rc = vfs_unlink(mds->mds_objects_dir->d_inode, de); - if (rc) - CERROR("error destroying object "LPU64":%u: rc %d\n", - oa->o_id, oa->o_generation, rc); - - err = fsfilt_commit(obd, mds->mds_objects_dir->d_inode, handle, 0); - if (err && !rc) - rc = err; -out_dput: - if (de != NULL) - l_dput(de); - UNLOCK_INODE_MUTEX(parent_inode); - - if (inode) - iput(inode); - - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &ucred); - RETURN(rc); -} diff --git a/lustre/mds/mds_internal.h b/lustre/mds/mds_internal.h deleted file mode 100644 index 6041da6980..0000000000 --- a/lustre/mds/mds_internal.h +++ /dev/null @@ -1,289 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _MDS_INTERNAL_H -#define _MDS_INTERNAL_H - -#include <lustre_disk.h> -#include <lustre_mds.h> - -#define MDT_ROCOMPAT_SUPP (OBD_ROCOMPAT_LOVOBJID) -#define MDT_INCOMPAT_SUPP (OBD_INCOMPAT_MDT | OBD_INCOMPAT_COMMON_LR) - -/* Data stored per client in the last_rcvd file. In le32 order. */ -struct mds_client_data { - __u8 mcd_uuid[40]; /* client UUID */ - __u64 mcd_last_transno; /* last completed transaction ID */ - __u64 mcd_last_xid; /* xid for the last transaction */ - __u32 mcd_last_result; /* result from last RPC */ - __u32 mcd_last_data; /* per-op data (disposition for open &c.) */ - /* for MDS_CLOSE requests */ - __u64 mcd_last_close_transno; /* last completed transaction ID */ - __u64 mcd_last_close_xid; /* xid for the last transaction */ - __u32 mcd_last_close_result; /* result from last RPC */ - __u32 mcd_last_close_data; /* per-op data (disposition for open &c.) */ - __u8 mcd_padding[LR_CLIENT_SIZE - 88]; -}; - -#define MDS_SERVICE_WATCHDOG_FACTOR 2000 - -#define MAX_ATIME_DIFF 60 - -struct mds_filter_data { - __u64 io_epoch; -}; - -#define MDS_FILTERDATA(inode) ((struct mds_filter_data *)(inode)->i_filterdata) - -static inline struct mds_obd *mds_req2mds(struct ptlrpc_request *req) -{ - return &req->rq_export->exp_obd->u.mds; -} - -#ifdef __KERNEL__ -/* Open counts for files. No longer atomic, must hold inode->i_sem */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# define mds_inode_oatomic(inode) ((inode)->i_cindex) -#else -# define mds_inode_oatomic(inode) ((inode)->i_attr_flags) -#endif - -#ifdef HAVE_I_ALLOC_SEM -#define MDS_UP_READ_ORPHAN_SEM(i) UP_READ_I_ALLOC_SEM(i) -#define MDS_DOWN_READ_ORPHAN_SEM(i) DOWN_READ_I_ALLOC_SEM(i) -#define LASSERT_MDS_ORPHAN_READ_LOCKED(i) LASSERT_I_ALLOC_SEM_READ_LOCKED(i) - -#define MDS_UP_WRITE_ORPHAN_SEM(i) UP_WRITE_I_ALLOC_SEM(i) -#define MDS_DOWN_WRITE_ORPHAN_SEM(i) DOWN_WRITE_I_ALLOC_SEM(i) -#define LASSERT_MDS_ORPHAN_WRITE_LOCKED(i) LASSERT_I_ALLOC_SEM_WRITE_LOCKED(i) -#define MDS_PACK_MD_LOCK 1 -#else -#define MDS_UP_READ_ORPHAN_SEM(i) do { up(&(i)->i_sem); } while (0) -#define MDS_DOWN_READ_ORPHAN_SEM(i) do { down(&(i)->i_sem); } while (0) -#define LASSERT_MDS_ORPHAN_READ_LOCKED(i) LASSERT(down_trylock(&(i)->i_sem)!=0) - -#define MDS_UP_WRITE_ORPHAN_SEM(i) do { up(&(i)->i_sem); } while (0) -#define MDS_DOWN_WRITE_ORPHAN_SEM(i) do { down(&(i)->i_sem); } while (0) -#define LASSERT_MDS_ORPHAN_WRITE_LOCKED(i) LASSERT(down_trylock(&(i)->i_sem)!=0) -#define MDS_PACK_MD_LOCK 0 -#endif - -static inline int mds_orphan_open_count(struct inode *inode) -{ - LASSERT_MDS_ORPHAN_READ_LOCKED(inode); - return mds_inode_oatomic(inode); -} - -static inline int mds_orphan_open_inc(struct inode *inode) -{ - LASSERT_MDS_ORPHAN_WRITE_LOCKED(inode); - return ++mds_inode_oatomic(inode); -} - -static inline int mds_orphan_open_dec_test(struct inode *inode) -{ - LASSERT_MDS_ORPHAN_WRITE_LOCKED(inode); - return --mds_inode_oatomic(inode) == 0; -} - -#define mds_inode_is_orphan(inode) ((inode)->i_flags & 0x4000000) - -static inline void mds_inode_set_orphan(struct inode *inode) -{ - inode->i_flags |= 0x4000000; - CDEBUG(D_VFSTRACE, "setting orphan flag on inode %p\n", inode); -} - -static inline void mds_inode_unset_orphan(struct inode *inode) -{ - inode->i_flags &= ~(0x4000000); - CDEBUG(D_VFSTRACE, "removing orphan flag from inode %p\n", inode); -} - -#endif /* __KERNEL__ */ - -#define MDS_CHECK_RESENT(req, reconstruct) \ -{ \ - if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT) { \ - struct mds_client_data *mcd = \ - req->rq_export->exp_mds_data.med_mcd; \ - if (le64_to_cpu(mcd->mcd_last_xid) == req->rq_xid) { \ - reconstruct; \ - RETURN(le32_to_cpu(mcd->mcd_last_result)); \ - } \ - if (le64_to_cpu(mcd->mcd_last_close_xid) == req->rq_xid) { \ - reconstruct; \ - RETURN(le32_to_cpu(mcd->mcd_last_close_result)); \ - } \ - DEBUG_REQ(D_HA, req, "no reply for RESENT req (have "LPD64")",\ - mcd->mcd_last_xid); \ - } \ -} - -/* mds/mds_reint.c */ -int res_gt(struct ldlm_res_id *res1, struct ldlm_res_id *res2, - ldlm_policy_data_t *p1, ldlm_policy_data_t *p2); -int enqueue_ordered_locks(struct obd_device *obd, struct ldlm_res_id *p1_res_id, - struct lustre_handle *p1_lockh, int p1_lock_mode, - ldlm_policy_data_t *p1_policy, - struct ldlm_res_id *p2_res_id, - struct lustre_handle *p2_lockh, int p2_lock_mode, - ldlm_policy_data_t *p2_policy); -void mds_commit_cb(struct obd_device *, __u64 last_rcvd, void *data, int error); -int mds_finish_transno(struct mds_obd *mds, struct inode *inode, void *handle, - struct ptlrpc_request *req, int rc, __u32 op_data, - int force_sync); -void mds_reconstruct_generic(struct ptlrpc_request *req); -void mds_req_from_mcd(struct ptlrpc_request *req, struct mds_client_data *mcd); -int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds, - struct ll_fid *fid, - struct lustre_handle *parent_lockh, - struct dentry **dparentp, int parent_mode, - __u64 parent_lockpart, - char *name, int namelen, - struct lustre_handle *child_lockh, - struct dentry **dchildp, int child_mode, - __u64 child_lockpart); -int mds_lock_new_child(struct obd_device *obd, struct inode *inode, - struct lustre_handle *child_lockh); -int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode, - struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, struct ll_fid *fid); - -int mds_get_parents_children_locked(struct obd_device *obd, - struct mds_obd *mds, - struct ll_fid *p1_fid, - struct dentry **de_srcdirp, - struct ll_fid *p2_fid, - struct dentry **de_tgtdirp, - int parent_mode, - const char *old_name, int old_len, - struct dentry **de_oldp, - const char *new_name, int new_len, - struct dentry **de_newp, - struct lustre_handle *dlm_handles, - int child_mode); - -void mds_shrink_reply(struct obd_device *obd, struct ptlrpc_request *req, - struct mds_body *body, int md_off); -int mds_get_cookie_size(struct obd_device *obd, struct lov_mds_md *lmm); -/* mds/mds_lib.c */ -int mds_update_unpack(struct ptlrpc_request *, int offset, - struct mds_update_record *); -int mds_init_ucred(struct lvfs_ucred *ucred, struct ptlrpc_request *req, - int offset); -void mds_exit_ucred(struct lvfs_ucred *ucred, struct mds_obd *obd); -void mds_root_squash(struct mds_obd *mds, lnet_nid_t *peernid, - __u32 *fsuid, __u32 *fsgid, __u32 *cap, - __u32 *suppgid, __u32 *suppgid2); - -/* mds/mds_unlink_open.c */ -int mds_osc_destroy_orphan(struct obd_device *obd, umode_t mode, - struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, int log_unlink); -int mds_cleanup_pending(struct obd_device *obd); - -/* mds/mds_log.c */ -int mds_log_op_unlink(struct obd_device *obd, - struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, int cookies_size); -int mds_log_op_setattr(struct obd_device *obd, struct inode *inode, - struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, int cookies_size); -int mds_llog_init(struct obd_device *obd, struct obd_device *tgt, int count, - struct llog_catid *logid, struct obd_uuid *uuid); -int mds_llog_finish(struct obd_device *obd, int count); - -/* mds/mds_lov.c */ -int mds_lov_connect(struct obd_device *obd, char * lov_name); -int mds_lov_disconnect(struct obd_device *obd); - -int mds_lov_write_objids(struct obd_device *obd); -void mds_lov_update_objids(struct obd_device *obd, struct lov_mds_md *lmm); -int mds_lov_clear_orphans(struct mds_obd *mds, struct obd_uuid *ost_uuid); - -int mds_lov_start_synchronize(struct obd_device *obd, - struct obd_device *watched, - void *data, int nonblock); -int mds_post_mds_lovconf(struct obd_device *obd); -int mds_notify(struct obd_device *obd, struct obd_device *watched, - enum obd_notify_event ev, void *data); -int mds_get_default_md(struct obd_device *obd, struct lov_mds_md *lmm, - int *lmmsize); -int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode, - struct lov_mds_md *lmm, int lmm_size); -int mds_init_lov_desc(struct obd_device *obd, struct obd_export *osc_exp); - -/* mds/mds_open.c */ -int mds_query_write_access(struct inode *inode); -int mds_open(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, struct lustre_handle *); -int mds_pin(struct ptlrpc_request *req, int offset); -void mds_mfd_unlink(struct mds_file_data *mfd, int decref); -int mds_mfd_close(struct ptlrpc_request *req, int offset,struct obd_device *obd, - struct mds_file_data *mfd, int unlink_orphan, - struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, int cookies_size, - __u64 *valid); -int mds_close(struct ptlrpc_request *req, int offset); -int mds_done_writing(struct ptlrpc_request *req, int offset); - -/*mds/mds_join.c*/ -int mds_join_file(struct mds_update_record *rec, struct ptlrpc_request *req, - struct dentry *dchild, struct lustre_handle *lockh); - -/* mds/mds_fs.c */ -int mds_client_add(struct obd_device *obd, struct obd_export *exp, - int cl_off, lnet_nid_t client_nid); -int mds_client_free(struct obd_export *exp); -int mds_obd_create(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md **ea, struct obd_trans_info *oti); -int mds_obd_destroy(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md *ea, struct obd_trans_info *oti, - struct obd_export *md_exp); - -/* mds/handler.c */ -extern struct lvfs_callback_ops mds_lvfs_ops; -extern int mds_iocontrol(unsigned int cmd, struct obd_export *exp, - int len, void *karg, void *uarg); -int mds_postrecov(struct obd_device *obd); -int mds_init_export(struct obd_export *exp); -#ifdef __KERNEL__ -int mds_get_md(struct obd_device *, struct inode *, void *md, int *size, - int lock, int flags); -int mds_pack_md(struct obd_device *, struct lustre_msg *, int offset, - struct mds_body *, struct inode *, int lock, int flags); -void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode); -void mds_pack_inode2body(struct mds_body *body, struct inode *inode); -#endif -int mds_pack_acl(struct mds_export_data *med, struct inode *inode, - struct lustre_msg *repmsg, struct mds_body *repbody, - int repoff); - -/* quota stuff */ -extern quota_interface_t *mds_quota_interface_ref; - -/* mds/mds_xattr.c */ -int mds_setxattr(struct ptlrpc_request *req); -int mds_getxattr(struct ptlrpc_request *req); - -/* mds/lproc_mds.c */ -enum { - LPROC_MDS_OPEN = 0, - LPROC_MDS_CLOSE, - LPROC_MDS_MKNOD, - LPROC_MDS_LINK, - LPROC_MDS_UNLINK, - LPROC_MDS_MKDIR, - LPROC_MDS_RMDIR, - LPROC_MDS_RENAME, - LPROC_MDS_GETXATTR, - LPROC_MDS_SETXATTR, - LPROC_MDS_LAST, -}; -void mds_counter_incr(struct obd_export *exp, int opcode); -void mds_stats_counter_init(struct lprocfs_stats *stats); -void lprocfs_mds_init_vars(struct lprocfs_static_vars *lvars); -void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars); -#endif /* _MDS_INTERNAL_H */ diff --git a/lustre/mds/mds_join.c b/lustre/mds/mds_join.c deleted file mode 100644 index af5ab2651c..0000000000 --- a/lustre/mds/mds_join.c +++ /dev/null @@ -1,506 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * linux/mds/mds_join.c - * Lustre Metadata join handler file - * - * Copyright (c) 2001-2005 Cluster File Systems, Inc. - * Author: Wang Di <wangdi@clusterfs.com> - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDS - -#include <linux/fs.h> -#include <linux/jbd.h> -#include <linux/ext3_fs.h> -#include <obd_support.h> -#include <obd_class.h> -#include <obd.h> -#include <lustre_lib.h> -#include <lustre/lustre_idl.h> -#include <lustre_mds.h> -#include <lustre_dlm.h> -#include <lustre_log.h> -#include <lustre_fsfilt.h> -#include <lustre_lite.h> -#include <obd_lov.h> -#include "mds_internal.h" - -struct mdsea_cb_data { - struct llog_handle *mc_llh; - struct lov_mds_md *mc_lmm; - struct lov_mds_md_join *mc_lmm_join; - __u64 mc_offset; - __u64 mc_headfile_sz; -}; - -static int mdsea_iterate(struct llog_handle *llh_tail, llog_cb_t cb, - void *cbdata) -{ - return llog_process(llh_tail, cb, cbdata, NULL); -} - -static int mds_insert_join_lmm(struct llog_handle *llh, - struct lov_mds_md *lmm, - __u64 start, __u64 len, - struct lov_mds_md_join *lmmj) -{ - struct llog_rec_hdr rec; - struct mds_extent_desc *med; - int sz_med, rc; - ENTRY; - - - sz_med = lov_mds_md_size(le32_to_cpu(lmm->lmm_stripe_count)); - sz_med += 2 * sizeof(__u64); - sz_med = size_round(sz_med); - - rec.lrh_len = cpu_to_le32(sz_med); - rec.lrh_type = cpu_to_le32(LLOG_JOIN_REC); - - CDEBUG(D_INFO, "insert extent "LPU64":"LPU64" lmm \n", start, len); - - OBD_ALLOC(med, sz_med); - if (med == NULL) - RETURN(-ENOMEM); - - med->med_start = start; - med->med_len = len; - memcpy(&med->med_lmm, lmm, - lov_mds_md_size(le32_to_cpu(lmm->lmm_stripe_count))); - - rc = llog_write_rec(llh, &rec, NULL, 0, med, -1); - OBD_FREE(med, sz_med); - - if (lmmj) { - /*modify lmmj for join stripe info*/ - lmmj->lmmj_md.lmm_stripe_count += lmm->lmm_stripe_count; - lmmj->lmmj_extent_count ++; - } - - RETURN(rc); -} - -static int mdsea_append_extent(struct llog_handle *llh_tail, - struct llog_rec_hdr *rec_in_tail, - struct mdsea_cb_data *cbdata) -{ - struct mds_extent_desc *med = - &((struct llog_array_rec *)rec_in_tail)->lmr_med; - int rc; - ENTRY; - - CDEBUG(D_INODE, "insert lmm extent: "LPU64":"LPU64" \n", - med->med_start, med->med_len); - rc = mds_insert_join_lmm(cbdata->mc_llh, &med->med_lmm, - med->med_start + cbdata->mc_headfile_sz, - med->med_len, cbdata->mc_lmm_join); - if (rc) { - CERROR("error %d insert the lmm \n", rc); - RETURN(rc); - } - RETURN(LLOG_DEL_RECORD); -} - -static void mds_init_stripe_join(struct lov_mds_md_join *lmmj, - struct lov_mds_md *lmm, - struct llog_logid *logid) -{ - lmmj->lmmj_md.lmm_magic = cpu_to_le32(LOV_MAGIC_JOIN); - lmmj->lmmj_md.lmm_object_id = lmm->lmm_object_id; - lmmj->lmmj_md.lmm_object_gr = lmm->lmm_object_gr; - lmmj->lmmj_md.lmm_pattern = lmm->lmm_pattern; - lmmj->lmmj_md.lmm_stripe_size = lmm->lmm_stripe_size; - lmmj->lmmj_md.lmm_stripe_count = 0; - lmmj->lmmj_extent_count = 0; - lmmj->lmmj_array_id = *logid; -} - -static int mdsea_cancel_last_extent(struct llog_handle *llh_tail, - struct llog_rec_hdr *rec_in_tail, - struct mdsea_cb_data *cbdata) -{ - struct mds_extent_desc *med = - &((struct llog_array_rec *)rec_in_tail)->lmr_med; - - CDEBUG(D_INODE, "extent: "LPU64":"LPU64" \n", med->med_start, - med->med_len); - - LASSERTF(cbdata->mc_offset == med->med_start, - "A hole in the extent "LPU64"--"LPU64"\n", - cbdata->mc_offset, med->med_start); - - if (med->med_len != -1) - cbdata->mc_offset = med->med_start + med->med_len; - - if (med->med_start > cbdata->mc_headfile_sz || (med->med_len == -1)) { - CDEBUG(D_INFO, "del rec offset"LPU64", head size "LPU64" \n", - med->med_start, cbdata->mc_headfile_sz); - if (!cbdata->mc_lmm) { - int stripe = le32_to_cpu(med->med_lmm.lmm_stripe_count); - OBD_ALLOC(cbdata->mc_lmm, lov_mds_md_size(stripe)); - if (!cbdata->mc_lmm) - RETURN(-ENOMEM); - memcpy(cbdata->mc_lmm, &med->med_lmm, - lov_mds_md_size(stripe)); - } - RETURN(LLOG_DEL_RECORD); - } - RETURN(0); -} - -static int mds_adjust_last_extent(struct llog_handle *llh_head, - __u64 head_size) -{ - struct mdsea_cb_data *cbdata; - int rc; - ENTRY; - - OBD_ALLOC_PTR(cbdata); - - if (!cbdata) - RETURN(-ENOMEM); - - cbdata->mc_headfile_sz = head_size; - /*Find the last extent and cancel the record in the lmm*/ - rc = mdsea_iterate(llh_head, (llog_cb_t)mdsea_cancel_last_extent, - cbdata); - - if (rc) { - CERROR("can not find the last extent rc=%d\n", rc); - GOTO(exit, rc); - } - - LASSERT(cbdata->mc_lmm); - - CDEBUG(D_INODE, "insert lmm extent: "LPU64":"LPU64" \n", - cbdata->mc_offset, (head_size - cbdata->mc_offset)); - - rc = mds_insert_join_lmm(llh_head, cbdata->mc_lmm, - cbdata->mc_offset, - (head_size - cbdata->mc_offset), - NULL); - if (rc) - CERROR("error insert the lmm rc %d \n", rc); -exit: - if (cbdata && cbdata->mc_lmm) - OBD_FREE(cbdata->mc_lmm, - lov_mds_md_size(cbdata->mc_lmm->lmm_stripe_count)); - if (cbdata) - OBD_FREE_PTR(cbdata); - - RETURN(rc); -} - -static void mds_finish_join(struct mds_obd *mds, struct ptlrpc_request *req, - struct inode *inode, struct lov_mds_md_join *lmmj) -{ - struct mds_body *body = (struct mds_body *) - lustre_msg_buf(req->rq_repmsg, 1, 0); - int max_cookiesize = lmmj->lmmj_md.lmm_stripe_count * - sizeof(struct llog_cookie); - int max_easize = sizeof(*lmmj); - - CDEBUG(D_INFO, "change the max md size from %d to "LPSZ"\n", - mds->mds_max_mdsize, sizeof(*lmmj)); - - if (mds->mds_max_mdsize < max_easize || - mds->mds_max_cookiesize < max_cookiesize) { - body->max_mdsize = mds->mds_max_mdsize > max_easize ? - mds->mds_max_mdsize : max_easize; - mds->mds_max_mdsize = body->max_mdsize; - body->max_cookiesize = mds->mds_max_cookiesize > max_cookiesize? - mds->mds_max_cookiesize : max_cookiesize; - mds->mds_max_cookiesize = body->max_cookiesize; - body->valid |= OBD_MD_FLMODEASIZE; - } - - if (body->valid & OBD_MD_FLMODEASIZE) - CDEBUG(D_INODE, "updating max_mdsize/max_cookiesize: %d/%d\n", - mds->mds_max_mdsize, mds->mds_max_cookiesize); - - mds_pack_inode2fid(&body->fid1, inode); - mds_pack_inode2body(body, inode); -} - -static int mds_join_unlink_tail_inode(struct mds_update_record *rec, - struct ptlrpc_request *req, - struct mds_rec_join *join_rec, - struct lov_mds_md *tail_lmm, - int lmm_size, struct dentry *dchild, - void **handle,struct lustre_handle *lockh) -{ - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct inode *tail_inode, *head_inode; - struct dentry *de_tailparent = NULL, *de_tail = NULL, *de_head = NULL; - struct lustre_handle dlm_handles[4] = {{0}, {0}, {0}, {0}}; - struct ll_fid head_fid; - int rc; - ENTRY; - - if (lockh) - ldlm_lock_decref(lockh, LCK_EX); - - head_inode = dchild->d_inode; - mdc_pack_fid(&head_fid, head_inode->i_ino, head_inode->i_generation, - head_inode->i_mode & S_IFMT); - - rc = mds_get_parents_children_locked(obd, mds, &join_rec->jr_fid, - &de_tailparent, &head_fid, - &de_head, LCK_EX, rec->ur_name, - rec->ur_namelen, &de_tail, - NULL, 0, NULL, dlm_handles, - LCK_EX); - if (rc) - GOTO(cleanup, rc); - - *lockh = dlm_handles[1]; - LASSERT(de_tailparent); - tail_inode = de_tail->d_inode; - if (tail_inode == NULL) { - CERROR("tail inode doesn't exist(dir %lu,name %s)!\n", - de_tailparent? de_tailparent->d_inode->i_ino : 0, - rec->ur_name); - GOTO(cleanup, rc = -ENOENT); - } - - if (!S_ISREG(tail_inode->i_mode)) { - CERROR("tail file is not a regular file (dir %lu, name %s)!\n", - de_tailparent? de_tailparent->d_inode->i_ino : 0, - rec->ur_name); - GOTO(cleanup, rc = -EINVAL); - } - - *handle = fsfilt_start(obd, head_inode, FSFILT_OP_JOIN, NULL); - if (IS_ERR(*handle)) { - rc = PTR_ERR(*handle); - GOTO(cleanup, rc); - } - - rc = mds_get_md(obd, tail_inode, tail_lmm, &lmm_size, 1, 0); - if (rc < 0) /* get md fails */ - GOTO(cleanup, rc); - - LASSERT(le32_to_cpu(tail_lmm->lmm_magic) == LOV_MAGIC_JOIN || - le32_to_cpu(tail_lmm->lmm_magic) == LOV_MAGIC); - - LASSERT(de_tailparent); - rc = vfs_unlink(de_tailparent->d_inode, de_tail); - - if (rc == 0) { - CDEBUG(D_INODE, "delete the tail inode %lu/%u \n", - tail_inode->i_ino, tail_inode->i_generation); - } -cleanup: - if (dlm_handles[2].cookie != 0) - ldlm_lock_decref(&dlm_handles[2], LCK_EX); - - if (dlm_handles[0].cookie != 0) { - if (rc) - ldlm_lock_decref(&dlm_handles[0], LCK_EX); - else - ptlrpc_save_lock(req, &dlm_handles[0], LCK_EX); - } - if (de_tail) - l_dput(de_tail); - - if (de_tailparent) - l_dput(de_tailparent); - - if (de_head) - l_dput(de_head); - - RETURN(rc); -} - -int mds_join_file(struct mds_update_record *rec, struct ptlrpc_request *req, - struct dentry *de_head, struct lustre_handle *lockh) -{ - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct inode *head_inode = NULL; - struct lvfs_run_ctxt saved; - void *handle = NULL; - struct lov_mds_md *head_lmm, *tail_lmm; - struct lov_mds_md_join *head_lmmj = NULL, *tail_lmmj = NULL; - int lmm_size, rc = 0, cleanup_phase = 0, size; - struct llog_handle *llh_head = NULL, *llh_tail = NULL; - struct llog_ctxt *ctxt = NULL; - struct mds_rec_join *join_rec; - ENTRY; - - join_rec = lustre_swab_reqbuf(req, DLM_INTENT_REC_OFF + 3, - sizeof(*join_rec), - lustre_swab_mds_rec_join); - if (join_rec == NULL) - RETURN (-EFAULT); - - DEBUG_REQ(D_INODE, req,"head "LPU64"/%u, ptail ino "LPU64"/%u, tail %s", - rec->ur_fid1->id, rec->ur_fid1->generation, - join_rec->jr_fid.id, join_rec->jr_fid.generation, - rec->ur_name); - - size = mds->mds_max_mdsize; - lmm_size = mds->mds_max_mdsize; - OBD_ALLOC(head_lmm, lmm_size); - OBD_ALLOC(tail_lmm, lmm_size); - if (!head_lmm || !tail_lmm) - GOTO(cleanup, rc = -ENOMEM); - - /* acquire head's dentry */ - LASSERT(de_head); - head_inode = de_head->d_inode; - if (head_inode == NULL) { - CERROR("head inode doesn't exist!\n"); - GOTO(cleanup, rc = -ENOENT); - } - - /*Unlink tail inode and get the lmm back*/ - rc = mds_join_unlink_tail_inode(rec, req, join_rec, tail_lmm, lmm_size, - de_head, &handle, lockh); - if (rc) { - CERROR("unlink tail_inode error %d\n", rc); - GOTO(cleanup, rc); - } - - LOCK_INODE_MUTEX(head_inode); - cleanup_phase = 1; - rc = mds_get_md(obd, head_inode, head_lmm, &size, 0, 0); - if (rc < 0) - GOTO(cleanup, rc); - - LASSERT(le32_to_cpu(head_lmm->lmm_magic) == LOV_MAGIC_JOIN || - le32_to_cpu(head_lmm->lmm_magic) == LOV_MAGIC); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - ctxt = llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT); - LASSERT(ctxt != NULL); - cleanup_phase = 2; - if (le32_to_cpu(head_lmm->lmm_magic) == LOV_MAGIC) { /*simple file */ - struct llog_logid *llog_array; - - rc = llog_create(ctxt, &llh_head, NULL, NULL); - if (rc) { - CERROR("cannot create new log, error = %d\n", rc); - GOTO(cleanup, rc); - } - cleanup_phase = 3; - llog_array = &llh_head->lgh_id; - CDEBUG(D_INFO,"create arrary for %lu with id "LPU64":"LPU64"\n", - head_inode->i_ino, llog_array->lgl_oid, - llog_array->lgl_ogr); - rc = llog_init_handle(llh_head, LLOG_F_IS_PLAIN, NULL); - if (rc) - GOTO(cleanup, rc); - OBD_ALLOC_PTR(head_lmmj); - if (head_lmmj == NULL) - GOTO(cleanup, rc = -ENOMEM); - mds_init_stripe_join(head_lmmj, head_lmm, llog_array); - mds_insert_join_lmm(llh_head, head_lmm, 0,join_rec->jr_headsize, - head_lmmj); - } else { /*head lmm is join file */ - head_lmmj = (struct lov_mds_md_join *)head_lmm; - /* construct and fill extent llog object */ - rc = llog_create(ctxt, &llh_head, - &head_lmmj->lmmj_array_id, NULL); - if (rc) { - CERROR("cannot open existing log, error = %d\n", rc); - GOTO(cleanup, rc); - } - cleanup_phase = 3; - rc = llog_init_handle(llh_head, LLOG_F_IS_PLAIN, NULL); - if (rc) - GOTO(cleanup, rc); - rc = mds_adjust_last_extent(llh_head, join_rec->jr_headsize); - if (rc) { - CERROR("can't adjust last extent of obj rc=%d\n", rc); - GOTO(cleanup, rc); - } - } - - if (le32_to_cpu(tail_lmm->lmm_magic) != LOV_MAGIC_JOIN) { - mds_insert_join_lmm(llh_head, tail_lmm, join_rec->jr_headsize, - -1, head_lmmj); - } else { - struct mdsea_cb_data cbdata; - tail_lmmj = (struct lov_mds_md_join *)tail_lmm; - - rc = llog_create(ctxt,&llh_tail,&tail_lmmj->lmmj_array_id,NULL); - if (rc) { - CERROR("cannot open existing log, error = %d\n", rc); - GOTO(cleanup, rc); - } - rc = llog_init_handle(llh_tail, LLOG_F_IS_PLAIN, NULL); - if (rc) { - llog_close(llh_tail); - GOTO(cleanup, rc); - } - cbdata.mc_llh = llh_head; - cbdata.mc_headfile_sz = join_rec->jr_headsize; - cbdata.mc_lmm_join = head_lmmj; - rc = mdsea_iterate(llh_tail, (llog_cb_t)mdsea_append_extent, - &cbdata); - if (rc) { - llog_close(llh_tail); - CERROR("can not append extent log error %d \n", rc); - GOTO(cleanup, rc); - } - rc = llog_destroy(llh_tail); - if (rc) { - llog_close(llh_tail); - CERROR("can not destroy log error %d \n", rc); - GOTO(cleanup, rc); - } - llog_free_handle(llh_tail); - } - LASSERT(head_inode); - CDEBUG(D_INODE, "join finish, set lmm V2 to inode %lu \n", - head_inode->i_ino); - fsfilt_set_md(obd, head_inode, handle, head_lmmj, - sizeof(struct lov_mds_md_join), "lov"); - mds_finish_join(mds, req, head_inode, head_lmmj); -cleanup: - rc = mds_finish_transno(mds, head_inode, handle, req, rc, 0, 0); - switch(cleanup_phase){ - case 3: - llog_close(llh_head); - case 2: - llog_ctxt_put(ctxt); - if (head_lmmj && ((void*)head_lmmj != (void*)head_lmm)) - OBD_FREE_PTR(head_lmmj); - - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - case 1: - UNLOCK_INODE_MUTEX(head_inode); - case 0: - if (tail_lmm != NULL) - OBD_FREE(tail_lmm, lmm_size); - if (head_lmm != NULL) - OBD_FREE(head_lmm, lmm_size); - break; - default: - CERROR("invalid cleanup_phase %d\n", cleanup_phase); - LBUG(); - } - req->rq_status = rc; - RETURN(rc); -} - diff --git a/lustre/mds/mds_lib.c b/lustre/mds/mds_lib.c deleted file mode 100644 index 9a144a6a75..0000000000 --- a/lustre/mds/mds_lib.c +++ /dev/null @@ -1,500 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_MDS - -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/string.h> -#include <linux/stat.h> -#include <linux/errno.h> -#include <linux/version.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -# include <linux/locks.h> // for wait_on_buffer -#else -# include <linux/buffer_head.h> // for wait_on_buffer -#endif -#include <linux/unistd.h> - -#include <asm/system.h> -#include <asm/uaccess.h> - -#include <linux/fs.h> -#include <linux/stat.h> -#include <asm/uaccess.h> -#include <linux/slab.h> - -#include <obd_support.h> -#include <lustre_lib.h> -#include "mds_internal.h" - -void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode) -{ - fid->id = inode->i_ino; - fid->generation = inode->i_generation; - fid->f_type = (S_IFMT & inode->i_mode); -} - -/* Note that we can copy all of the fields, just some will not be "valid" */ -void mds_pack_inode2body(struct mds_body *b, struct inode *inode) -{ - b->valid |= OBD_MD_FLID | OBD_MD_FLCTIME | OBD_MD_FLUID | - OBD_MD_FLGID | OBD_MD_FLFLAGS | OBD_MD_FLTYPE | - OBD_MD_FLMODE | OBD_MD_FLNLINK | OBD_MD_FLGENER | - OBD_MD_FLATIME | OBD_MD_FLMTIME; /* bug 2020 */ - - if (!S_ISREG(inode->i_mode)) - b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | OBD_MD_FLATIME | - OBD_MD_FLMTIME | OBD_MD_FLRDEV; - - b->ino = inode->i_ino; - b->atime = LTIME_S(inode->i_atime); - b->mtime = LTIME_S(inode->i_mtime); - b->ctime = LTIME_S(inode->i_ctime); - b->mode = inode->i_mode; - b->size = i_size_read(inode); - b->blocks = inode->i_blocks; - b->uid = inode->i_uid; - b->gid = inode->i_gid; - b->flags = (b->flags & MDS_BFLAG_EXT_FLAGS) | - ll_inode_to_ext_flags(inode->i_flags, - !(b->flags & MDS_BFLAG_EXT_FLAGS)); - b->rdev = inode->i_rdev; - /* Return the correct link count for orphan inodes */ - b->nlink = mds_inode_is_orphan(inode) ? 0 : inode->i_nlink; - b->generation = inode->i_generation; - b->suppgid = -1; -} - -static inline unsigned int attr_unpack(__u64 sa_valid) { - unsigned int ia_valid = 0; - - if (sa_valid & MDS_ATTR_MODE) - ia_valid |= ATTR_MODE; - if (sa_valid & MDS_ATTR_UID) - ia_valid |= ATTR_UID; - if (sa_valid & MDS_ATTR_GID) - ia_valid |= ATTR_GID; - if (sa_valid & MDS_ATTR_SIZE) - ia_valid |= ATTR_SIZE; - if (sa_valid & MDS_ATTR_ATIME) - ia_valid |= ATTR_ATIME; - if (sa_valid & MDS_ATTR_MTIME) - ia_valid |= ATTR_MTIME; - if (sa_valid & MDS_ATTR_CTIME) - ia_valid |= ATTR_CTIME; - if (sa_valid & MDS_ATTR_ATIME_SET) - ia_valid |= ATTR_ATIME_SET; - if (sa_valid & MDS_ATTR_MTIME_SET) - ia_valid |= ATTR_MTIME_SET; - if (sa_valid & MDS_ATTR_FORCE) - ia_valid |= ATTR_FORCE; - if (sa_valid & MDS_ATTR_ATTR_FLAG) - ia_valid |= ATTR_ATTR_FLAG; - if (sa_valid & MDS_ATTR_KILL_SUID) - ia_valid |= ATTR_KILL_SUID; - if (sa_valid & MDS_ATTR_KILL_SGID) - ia_valid |= ATTR_KILL_SGID; - if (sa_valid & MDS_ATTR_CTIME_SET) - ia_valid |= ATTR_CTIME_SET; - if (sa_valid & MDS_ATTR_FROM_OPEN) - ia_valid |= ATTR_FROM_OPEN; - if (sa_valid & MDS_OPEN_OWNEROVERRIDE) - ia_valid |= MDS_OPEN_OWNEROVERRIDE; - return ia_valid; -} - -/* unpacking */ -static int mds_setattr_unpack(struct ptlrpc_request *req, int offset, - struct mds_update_record *r) -{ - struct iattr *attr = &r->ur_iattr; - struct mds_rec_setattr *rec; - ENTRY; - - rec = lustre_swab_reqbuf(req, offset, sizeof(*rec), - lustre_swab_mds_rec_setattr); - if (rec == NULL) - RETURN (-EFAULT); - - r->ur_uc.luc_fsuid = rec->sa_fsuid; - r->ur_uc.luc_fsgid = rec->sa_fsgid; - r->ur_uc.luc_cap = rec->sa_cap; - r->ur_uc.luc_suppgid1 = rec->sa_suppgid; - r->ur_uc.luc_suppgid2 = -1; - r->ur_fid1 = &rec->sa_fid; - attr->ia_valid = attr_unpack(rec->sa_valid); - attr->ia_mode = rec->sa_mode; - attr->ia_uid = rec->sa_uid; - attr->ia_gid = rec->sa_gid; - attr->ia_size = rec->sa_size; - LTIME_S(attr->ia_atime) = rec->sa_atime; - LTIME_S(attr->ia_mtime) = rec->sa_mtime; - LTIME_S(attr->ia_ctime) = rec->sa_ctime; - r->ur_flags = rec->sa_attr_flags; - - lustre_set_req_swabbed(req, offset + 1); - r->ur_eadatalen = lustre_msg_buflen(req->rq_reqmsg, offset + 1); - if (r->ur_eadatalen) { - r->ur_eadata = lustre_msg_buf(req->rq_reqmsg, offset + 1, 0); - if (r->ur_eadata == NULL) - RETURN(-EFAULT); - } - r->ur_cookielen = lustre_msg_buflen(req->rq_reqmsg, offset + 2); - if (r->ur_cookielen) { - r->ur_logcookies = lustre_msg_buf(req->rq_reqmsg, offset + 2,0); - if (r->ur_eadata == NULL) - RETURN (-EFAULT); - } - if (lustre_msg_buflen(req->rq_reqmsg, offset + 3)) { - r->ur_dlm = lustre_swab_reqbuf(req, offset + 3, - sizeof(*r->ur_dlm), - lustre_swab_ldlm_request); - if (r->ur_dlm == NULL) - RETURN (-EFAULT); - } - RETURN(0); -} - -static int mds_create_unpack(struct ptlrpc_request *req, int offset, - struct mds_update_record *r) -{ - struct mds_rec_create *rec; - ENTRY; - - rec = lustre_swab_reqbuf(req, offset, sizeof (*rec), - lustre_swab_mds_rec_create); - if (rec == NULL) - RETURN (-EFAULT); - - r->ur_uc.luc_fsuid = rec->cr_fsuid; - r->ur_uc.luc_fsgid = rec->cr_fsgid; - r->ur_uc.luc_cap = rec->cr_cap; - r->ur_uc.luc_suppgid1 = rec->cr_suppgid; - r->ur_uc.luc_suppgid2 = -1; - r->ur_fid1 = &rec->cr_fid; - r->ur_fid2 = &rec->cr_replayfid; - r->ur_mode = rec->cr_mode; - r->ur_rdev = rec->cr_rdev; - r->ur_time = rec->cr_time; - r->ur_flags = rec->cr_flags; - - lustre_set_req_swabbed(req, offset + 1); - r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0); - if (r->ur_name == NULL) - RETURN (-EFAULT); - r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1); - - lustre_set_req_swabbed(req, offset + 2); - r->ur_tgtlen = lustre_msg_buflen(req->rq_reqmsg, offset + 2); - if (r->ur_tgtlen) { - /* NB for now, we only seem to pass NULL terminated symlink - * target strings here. If this ever changes, we'll have - * to stop checking for a buffer filled completely with a - * NULL terminated string here, and make the callers check - * depending on what they expect. We should probably stash - * it in r->ur_eadata in that case, so it's obvious... -eeb - */ - r->ur_tgt = lustre_msg_string(req->rq_reqmsg, offset + 2, 0); - if (r->ur_tgt == NULL) - RETURN (-EFAULT); - } - if (lustre_msg_buflen(req->rq_reqmsg, offset + 3)) { - r->ur_dlm = lustre_swab_reqbuf(req, offset + 3, - sizeof(*r->ur_dlm), - lustre_swab_ldlm_request); - if (r->ur_dlm == NULL) - RETURN (-EFAULT); - } - RETURN(0); -} - -static int mds_link_unpack(struct ptlrpc_request *req, int offset, - struct mds_update_record *r) -{ - struct mds_rec_link *rec; - ENTRY; - - rec = lustre_swab_reqbuf(req, offset, sizeof (*rec), - lustre_swab_mds_rec_link); - if (rec == NULL) - RETURN (-EFAULT); - - r->ur_uc.luc_fsuid = rec->lk_fsuid; - r->ur_uc.luc_fsgid = rec->lk_fsgid; - r->ur_uc.luc_cap = rec->lk_cap; - r->ur_uc.luc_suppgid1 = rec->lk_suppgid1; - r->ur_uc.luc_suppgid2 = rec->lk_suppgid2; - r->ur_fid1 = &rec->lk_fid1; - r->ur_fid2 = &rec->lk_fid2; - r->ur_time = rec->lk_time; - - lustre_set_req_swabbed(req, offset + 1); - r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0); - if (r->ur_name == NULL) - RETURN (-EFAULT); - r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1); - if (lustre_msg_buflen(req->rq_reqmsg, offset + 2)) { - r->ur_dlm = lustre_swab_reqbuf(req, offset + 2, - sizeof(*r->ur_dlm), - lustre_swab_ldlm_request); - if (r->ur_dlm == NULL) - RETURN (-EFAULT); - } - RETURN(0); -} - -static int mds_unlink_unpack(struct ptlrpc_request *req, int offset, - struct mds_update_record *r) -{ - struct mds_rec_unlink *rec; - ENTRY; - - rec = lustre_swab_reqbuf(req, offset, sizeof (*rec), - lustre_swab_mds_rec_unlink); - if (rec == NULL) - RETURN(-EFAULT); - - r->ur_uc.luc_fsuid = rec->ul_fsuid; - r->ur_uc.luc_fsgid = rec->ul_fsgid; - r->ur_uc.luc_cap = rec->ul_cap; - r->ur_uc.luc_suppgid1 = rec->ul_suppgid; - r->ur_uc.luc_suppgid2 = -1; - r->ur_mode = rec->ul_mode; - r->ur_fid1 = &rec->ul_fid1; - r->ur_fid2 = &rec->ul_fid2; - r->ur_time = rec->ul_time; - - lustre_set_req_swabbed(req, offset + 1); - r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0); - if (r->ur_name == NULL) - RETURN(-EFAULT); - r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1); - - if (lustre_msg_buflen(req->rq_reqmsg, offset + 2)) { - r->ur_dlm = lustre_swab_reqbuf(req, offset + 2, - sizeof(*r->ur_dlm), - lustre_swab_ldlm_request); - if (r->ur_dlm == NULL) - RETURN (-EFAULT); - } - RETURN(0); -} - -static int mds_rename_unpack(struct ptlrpc_request *req, int offset, - struct mds_update_record *r) -{ - struct mds_rec_rename *rec; - ENTRY; - - rec = lustre_swab_reqbuf(req, offset, sizeof (*rec), - lustre_swab_mds_rec_rename); - if (rec == NULL) - RETURN(-EFAULT); - - r->ur_uc.luc_fsuid = rec->rn_fsuid; - r->ur_uc.luc_fsgid = rec->rn_fsgid; - r->ur_uc.luc_cap = rec->rn_cap; - r->ur_uc.luc_suppgid1 = rec->rn_suppgid1; - r->ur_uc.luc_suppgid2 = rec->rn_suppgid2; - r->ur_fid1 = &rec->rn_fid1; - r->ur_fid2 = &rec->rn_fid2; - r->ur_time = rec->rn_time; - - lustre_set_req_swabbed(req, offset + 1); - r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0); - if (r->ur_name == NULL) - RETURN(-EFAULT); - r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1); - - lustre_set_req_swabbed(req, offset + 2); - r->ur_tgt = lustre_msg_string(req->rq_reqmsg, offset + 2, 0); - if (r->ur_tgt == NULL) - RETURN(-EFAULT); - r->ur_tgtlen = lustre_msg_buflen(req->rq_reqmsg, offset + 2); - if (lustre_msg_buflen(req->rq_reqmsg, offset + 3)) { - r->ur_dlm = lustre_swab_reqbuf(req, offset + 3, - sizeof(*r->ur_dlm), - lustre_swab_ldlm_request); - if (r->ur_dlm == NULL) - RETURN (-EFAULT); - } - RETURN(0); -} - -static int mds_open_unpack(struct ptlrpc_request *req, int offset, - struct mds_update_record *r) -{ - struct mds_rec_create *rec; - ENTRY; - - rec = lustre_swab_reqbuf(req, offset, sizeof(*rec), - lustre_swab_mds_rec_create); - if (rec == NULL) - RETURN(-EFAULT); - - r->ur_uc.luc_fsuid = rec->cr_fsuid; - r->ur_uc.luc_fsgid = rec->cr_fsgid; - r->ur_uc.luc_cap = rec->cr_cap; - r->ur_uc.luc_suppgid1 = rec->cr_suppgid; - r->ur_uc.luc_suppgid2 = -1; - r->ur_fid1 = &rec->cr_fid; - r->ur_fid2 = &rec->cr_replayfid; - r->ur_mode = rec->cr_mode; - r->ur_rdev = rec->cr_rdev; - r->ur_time = rec->cr_time; - r->ur_flags = rec->cr_flags; - - lustre_set_req_swabbed(req, offset + 1); - r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0); - if (r->ur_name == NULL) - RETURN(-EFAULT); - r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1); - - lustre_set_req_swabbed(req, offset + 2); - r->ur_eadatalen = lustre_msg_buflen(req->rq_reqmsg, offset + 2); - if (r->ur_eadatalen) { - r->ur_eadata = lustre_msg_buf(req->rq_reqmsg, offset + 2, 0); - if (r->ur_eadata == NULL) - RETURN (-EFAULT); - } - RETURN(0); -} - -typedef int (*update_unpacker)(struct ptlrpc_request *req, int offset, - struct mds_update_record *r); - -static update_unpacker mds_unpackers[REINT_MAX] = { - [REINT_SETATTR] mds_setattr_unpack, - [REINT_CREATE] mds_create_unpack, - [REINT_LINK] mds_link_unpack, - [REINT_UNLINK] mds_unlink_unpack, - [REINT_RENAME] mds_rename_unpack, - [REINT_OPEN] mds_open_unpack, -}; - -int mds_update_unpack(struct ptlrpc_request *req, int offset, - struct mds_update_record *rec) -{ - mds_reint_t opcode, *opcodep; - int rc; - ENTRY; - - /* NB don't lustre_swab_reqbuf() here. We're just taking a peek - * and we want to leave it to the specific unpacker once we've - * identified the message type */ - opcodep = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*opcodep)); - if (opcodep == NULL) - RETURN(-EFAULT); - - opcode = *opcodep; - if (lustre_msg_swabbed(req->rq_reqmsg)) - __swab32s(&opcode); - - if (opcode >= REINT_MAX || mds_unpackers[opcode] == NULL) { - CERROR("Unexpected opcode %d\n", opcode); - RETURN(-EFAULT); - } - - rec->ur_opcode = opcode; - rc = mds_unpackers[opcode](req, offset, rec); - - RETURN(rc); -} - -void mds_root_squash(struct mds_obd *mds, lnet_nid_t *peernid, - __u32 *fsuid, __u32 *fsgid, __u32 *cap, - __u32 *suppgid, __u32 *suppgid2) -{ - if (!mds->mds_squash_uid || *fsuid) - return; - - if (*peernid == mds->mds_nosquash_nid) - return; - - CDEBUG(D_OTHER, "squash req from %s, (%d:%d/%x)=>(%d:%d/%x)\n", - libcfs_nid2str(*peernid), *fsuid, *fsgid, *cap, - mds->mds_squash_uid, mds->mds_squash_gid, 0); - - *fsuid = mds->mds_squash_uid; - *fsgid = mds->mds_squash_gid; - *cap = 0; - *suppgid = -1; - if (suppgid2) - *suppgid2 = -1; -} - -int mds_init_ucred(struct lvfs_ucred *ucred, struct ptlrpc_request *req, - int offset) -{ - struct mds_body *body = lustre_msg_buf(req->rq_reqmsg, offset, - sizeof(*body)); - struct mds_obd *mds = mds_req2mds(req); - int rc; - - LASSERT(body != NULL); /* previously verified & swabbed by caller */ - -#ifdef CRAY_XT3 - if (req->rq_uid != LNET_UID_ANY) { - /* Non-root local cluster client */ - LASSERT (req->rq_uid != 0); - ucred->luc_fsuid = req->rq_uid; - } else -#endif - { - mds_root_squash(mds, &req->rq_peer.nid, &body->fsuid, - &body->fsgid, &body->capability, - &body->suppgid, NULL); - - ucred->luc_fsuid = body->fsuid; - ucred->luc_fsgid = body->fsgid; - ucred->luc_cap = body->capability; - } - - ucred->luc_uce = upcall_cache_get_entry(mds->mds_group_hash, - ucred->luc_fsuid, - ucred->luc_fsgid, 1, - &body->suppgid); - if (IS_ERR(ucred->luc_uce)) { - rc = PTR_ERR(ucred->luc_uce); - ucred->luc_uce = NULL; - return rc; - } - -#ifdef CRAY_XT3 - if (ucred->luc_uce) - ucred->luc_fsgid = ucred->luc_uce->ue_primary; -#endif - - return 0; -} - -void mds_exit_ucred(struct lvfs_ucred *ucred, struct mds_obd *mds) -{ - upcall_cache_put_entry(mds->mds_group_hash, ucred->luc_uce); -} diff --git a/lustre/mds/mds_log.c b/lustre/mds/mds_log.c deleted file mode 100644 index 189707f3c0..0000000000 --- a/lustre/mds/mds_log.c +++ /dev/null @@ -1,229 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/mds/mds_log.c - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Andreas Dilger <adilger@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_MDS - -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/module.h> -#include <linux/version.h> - -#include <libcfs/list.h> -#include <obd_class.h> -#include <lustre_fsfilt.h> -#include <lustre_mds.h> -#include <lustre_commit_confd.h> -#include <lustre_log.h> - -#include "mds_internal.h" - -static int mds_llog_origin_add(struct llog_ctxt *ctxt, - struct llog_rec_hdr *rec, struct lov_stripe_md *lsm, - struct llog_cookie *logcookies, int numcookies) -{ - struct obd_device *obd = ctxt->loc_obd; - struct obd_device *lov_obd = obd->u.mds.mds_osc_obd; - struct llog_ctxt *lctxt; - int rc; - ENTRY; - - lctxt = llog_get_context(lov_obd, ctxt->loc_idx); - rc = llog_add(lctxt, rec, lsm, logcookies, numcookies); - llog_ctxt_put(lctxt); - - RETURN(rc); -} - -static int mds_llog_origin_connect(struct llog_ctxt *ctxt, int count, - struct llog_logid *logid, - struct llog_gen *gen, - struct obd_uuid *uuid) -{ - struct obd_device *obd = ctxt->loc_obd; - struct obd_device *lov_obd = obd->u.mds.mds_osc_obd; - struct llog_ctxt *lctxt; - int rc; - ENTRY; - - lctxt = llog_get_context(lov_obd, ctxt->loc_idx); - rc = llog_connect(lctxt, count, logid, gen, uuid); - llog_ctxt_put(lctxt); - RETURN(rc); -} - -static int mds_llog_repl_cancel(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm, - int count, struct llog_cookie *cookies, int flags) -{ - struct obd_device *obd = ctxt->loc_obd; - struct obd_device *lov_obd = obd->u.mds.mds_osc_obd; - struct llog_ctxt *lctxt; - int rc; - ENTRY; - - lctxt = llog_get_context(lov_obd, ctxt->loc_idx); - rc = llog_cancel(lctxt, lsm, count, cookies, flags); - llog_ctxt_put(lctxt); - RETURN(rc); -} - -int mds_log_op_unlink(struct obd_device *obd, - struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, int cookies_size) -{ - struct mds_obd *mds = &obd->u.mds; - struct lov_stripe_md *lsm = NULL; - struct llog_unlink_rec *lur; - struct llog_ctxt *ctxt; - int rc; - ENTRY; - - if (IS_ERR(mds->mds_osc_obd)) - RETURN(PTR_ERR(mds->mds_osc_obd)); - - rc = obd_unpackmd(mds->mds_osc_exp, &lsm, lmm, lmm_size); - if (rc < 0) - RETURN(rc); - rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm); - if (rc) - GOTO(out, rc); - /* first prepare unlink log record */ - OBD_ALLOC(lur, sizeof(*lur)); - if (!lur) - GOTO(out, rc = -ENOMEM); - lur->lur_hdr.lrh_len = lur->lur_tail.lrt_len = sizeof(*lur); - lur->lur_hdr.lrh_type = MDS_UNLINK_REC; - - ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT); - rc = llog_add(ctxt, &lur->lur_hdr, lsm, logcookies, - cookies_size / sizeof(struct llog_cookie)); - llog_ctxt_put(ctxt); - - OBD_FREE(lur, sizeof(*lur)); -out: - obd_free_memmd(mds->mds_osc_exp, &lsm); - RETURN(rc); -} - -int mds_log_op_setattr(struct obd_device *obd, struct inode *inode, - struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, int cookies_size) -{ - struct mds_obd *mds = &obd->u.mds; - struct lov_stripe_md *lsm = NULL; - struct llog_setattr_rec *lsr; - struct llog_ctxt *ctxt; - int rc; - ENTRY; - - if (IS_ERR(mds->mds_osc_obd)) - RETURN(PTR_ERR(mds->mds_osc_obd)); - - rc = obd_unpackmd(mds->mds_osc_exp, &lsm, lmm, lmm_size); - if (rc < 0) - RETURN(rc); - - rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm); - if (rc) - GOTO(out, rc); - - OBD_ALLOC(lsr, sizeof(*lsr)); - if (!lsr) - GOTO(out, rc = -ENOMEM); - - /* prepare setattr log record */ - lsr->lsr_hdr.lrh_len = lsr->lsr_tail.lrt_len = sizeof(*lsr); - lsr->lsr_hdr.lrh_type = MDS_SETATTR_REC; - lsr->lsr_uid = inode->i_uid; - lsr->lsr_gid = inode->i_gid; - - /* write setattr log */ - ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT); - rc = llog_add(ctxt, &lsr->lsr_hdr, lsm, logcookies, - cookies_size / sizeof(struct llog_cookie)); - - llog_ctxt_put(ctxt); - - OBD_FREE(lsr, sizeof(*lsr)); - out: - obd_free_memmd(mds->mds_osc_exp, &lsm); - RETURN(rc); -} - -static struct llog_operations mds_ost_orig_logops = { - lop_add: mds_llog_origin_add, - lop_connect: mds_llog_origin_connect, -}; - -static struct llog_operations mds_size_repl_logops = { - lop_cancel: mds_llog_repl_cancel, -}; - -int mds_llog_init(struct obd_device *obd, struct obd_device *tgt, - int count, struct llog_catid *logid, struct obd_uuid *uuid) -{ - struct obd_device *lov_obd = obd->u.mds.mds_osc_obd; - int rc; - ENTRY; - - rc = llog_setup(obd, LLOG_MDS_OST_ORIG_CTXT, tgt, 0, NULL, - &mds_ost_orig_logops); - if (rc) - RETURN(rc); - - rc = llog_setup(obd, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL, - &mds_size_repl_logops); - if (rc) - RETURN(rc); - - rc = obd_llog_init(lov_obd, tgt, count, logid, uuid); - if (rc) - CERROR("lov_llog_init err %d\n", rc); - - RETURN(rc); -} - -int mds_llog_finish(struct obd_device *obd, int count) -{ - struct llog_ctxt *ctxt; - int rc = 0, rc2 = 0; - ENTRY; - - ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT); - if (ctxt) - rc = llog_cleanup(ctxt); - - ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT); - if (ctxt) - rc2 = llog_cleanup(ctxt); - if (!rc) - rc = rc2; - - RETURN(rc); -} diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c deleted file mode 100644 index d6bbdcb1f8..0000000000 --- a/lustre/mds/mds_lov.c +++ /dev/null @@ -1,1104 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * linux/mds/mds_lov.c - * Lustre Metadata Server (mds) handling of striped file data - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDS - -#include <linux/module.h> -#include <lustre_mds.h> -#include <lustre/lustre_idl.h> -#include <obd_class.h> -#include <obd_lov.h> -#include <lustre_lib.h> -#include <lustre_fsfilt.h> - -#include "mds_internal.h" - -static void mds_lov_dump_objids(const char *label, struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - unsigned int i=0, j; - - CDEBUG(D_INFO, "dump from %s\n", label); - if (mds->mds_lov_page_dirty == NULL) { - CERROR("NULL bitmap!\n"); - GOTO(skip_bitmap, i); - } - - for(i=0; i < ((mds->mds_lov_page_dirty->size/BITS_PER_LONG)+1) ;i++) - CDEBUG(D_INFO, "%u - %lx\n", i, mds->mds_lov_page_dirty->data[i]); -skip_bitmap: - if (mds->mds_lov_page_array == NULL) { - CERROR("not init page array!\n"); - GOTO(skip_array, i); - - } - for(i=0; i < MDS_LOV_OBJID_PAGES_COUNT ;i++) { - obd_id *data = mds->mds_lov_page_array[i]; - - if (data == NULL) - continue; - - for(j=0; j < OBJID_PER_PAGE(); j++) { - if (data[j] == 0) - continue; - CDEBUG(D_INFO,"objid page %u idx %u - "LPU64" \n", - i,j,data[j]); - } - } -skip_array: - EXIT; -} - -int mds_lov_init_objids(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - int size = MDS_LOV_OBJID_PAGES_COUNT*sizeof(void *); - struct file *file; - int rc; - ENTRY; - - CLASSERT(((MDS_LOV_ALLOC_SIZE % sizeof(obd_id)) == 0)); - - mds->mds_lov_page_dirty = ALLOCATE_BITMAP(MDS_LOV_OBJID_PAGES_COUNT); - if (mds->mds_lov_page_dirty == NULL) - RETURN(-ENOMEM); - - - OBD_ALLOC(mds->mds_lov_page_array, size); - if (mds->mds_lov_page_array == NULL) - GOTO(err_free_bitmap, rc = -ENOMEM); - - /* open and test the lov objd file */ - file = filp_open(LOV_OBJID, O_RDWR | O_CREAT, 0644); - if (IS_ERR(file)) { - rc = PTR_ERR(file); - CERROR("cannot open/create %s file: rc = %d\n", LOV_OBJID, rc); - GOTO(err_free, rc = PTR_ERR(file)); - } - if (!S_ISREG(file->f_dentry->d_inode->i_mode)) { - CERROR("%s is not a regular file!: mode = %o\n", LOV_OBJID, - file->f_dentry->d_inode->i_mode); - GOTO(err_open, rc = -ENOENT); - } - mds->mds_lov_objid_filp = file; - - RETURN (0); -err_open: - if (filp_close((struct file *)file, 0)) - CERROR("can't close %s after error\n", LOV_OBJID); -err_free: - OBD_FREE(mds->mds_lov_page_array, size); -err_free_bitmap: - FREE_BITMAP(mds->mds_lov_page_dirty); - - RETURN(rc); -} -EXPORT_SYMBOL(mds_lov_init_objids); - -void mds_lov_destroy_objids(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - int i, rc; - ENTRY; - - if (mds->mds_lov_page_array != NULL) { - for(i=0;i<MDS_LOV_OBJID_PAGES_COUNT;i++) { - obd_id *data = mds->mds_lov_page_array[i]; - if (data != NULL) - OBD_FREE(data, MDS_LOV_ALLOC_SIZE); - } - OBD_FREE(mds->mds_lov_page_array, - MDS_LOV_OBJID_PAGES_COUNT*sizeof(void *)); - } - - if (mds->mds_lov_objid_filp) { - rc = filp_close((struct file *)mds->mds_lov_objid_filp, 0); - mds->mds_lov_objid_filp = NULL; - if (rc) - CERROR("%s file won't close, rc=%d\n", LOV_OBJID, rc); - } - - FREE_BITMAP(mds->mds_lov_page_dirty); - EXIT; -} -EXPORT_SYMBOL(mds_lov_destroy_objids); - -void mds_lov_update_objids(struct obd_device *obd, struct lov_mds_md *lmm) -{ - struct mds_obd *mds = &obd->u.mds; - int j; - ENTRY; - - /* if we create file without objects - lmm is NULL */ - if (lmm == NULL) - return; - - for (j = 0; j < le32_to_cpu(lmm->lmm_stripe_count); j++) { - int i = le32_to_cpu(lmm->lmm_objects[j].l_ost_idx); - obd_id id = le64_to_cpu(lmm->lmm_objects[j].l_object_id); - int page = i / OBJID_PER_PAGE(); - int idx = i % OBJID_PER_PAGE(); - obd_id *data = mds->mds_lov_page_array[page]; - - CDEBUG(D_INODE,"update last object for ost %d" - " - new "LPU64" old "LPU64"\n", i, id, data[idx]); - if (id > data[idx]) { - data[idx] = id; - cfs_bitmap_set(mds->mds_lov_page_dirty, page); - } - } - EXIT; -} -EXPORT_SYMBOL(mds_lov_update_objids); - -static int mds_lov_read_objids(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - loff_t off = 0; - int i, rc = 0, count = 0, page = 0; - size_t size; - ENTRY; - - /* Read everything in the file, even if our current lov desc - has fewer targets. Old targets not in the lov descriptor - during mds setup may still have valid objids. */ - size = i_size_read(mds->mds_lov_objid_filp->f_dentry->d_inode); - if (size == 0) - RETURN(0); - - page = (size/(OBJID_PER_PAGE()*sizeof(obd_id)))+1; - CDEBUG(D_INFO, "file size %d pages %d\n", size, page); - for(i=0; i < page; i++) { - obd_id *data = mds->mds_lov_page_array[i]; - loff_t off_old = off; - - LASSERT(data == NULL); - OBD_ALLOC(data, MDS_LOV_ALLOC_SIZE); - if (data == NULL) - GOTO(out, rc = -ENOMEM); - - mds->mds_lov_page_array[i] = data; - - rc = fsfilt_read_record(obd, mds->mds_lov_objid_filp, data, - OBJID_PER_PAGE()*sizeof(obd_id), &off); - if (rc < 0) { - CERROR("Error reading objids %d\n", rc); - GOTO(out, rc); - } - if (off == off_old) - break; /* eof */ - - count += (off-off_old)/sizeof(obd_id); - } - mds->mds_lov_objid_count = count; - if (count) { - count --; - mds->mds_lov_objid_lastpage = count / OBJID_PER_PAGE(); - mds->mds_lov_objid_lastidx = count % OBJID_PER_PAGE(); - } - CDEBUG(D_INFO, "Read %u - %u %u objid\n", count, - mds->mds_lov_objid_lastpage, mds->mds_lov_objid_lastidx); -out: - mds_lov_dump_objids("read",obd); - - RETURN(rc); -} - -int mds_lov_write_objids(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - int i, rc = 0; - ENTRY; - - if (cfs_bitmap_check_empty(mds->mds_lov_page_dirty)) - RETURN(0); - - mds_lov_dump_objids("write", obd); - - cfs_foreach_bit(mds->mds_lov_page_dirty, i) { - obd_id *data = mds->mds_lov_page_array[i]; - unsigned int size = OBJID_PER_PAGE()*sizeof(obd_id); - loff_t off = i * size; - - LASSERT(data != NULL); - - /* check for particaly filled last page */ - if (i == mds->mds_lov_objid_lastpage) - size = (mds->mds_lov_objid_lastidx + 1) * sizeof(obd_id); - - rc = fsfilt_write_record(obd, mds->mds_lov_objid_filp, data, - size, &off, 0); - if (rc < 0) - break; - cfs_bitmap_clear(mds->mds_lov_page_dirty, i); - } - if (rc >= 0) - rc = 0; - - RETURN(rc); -} -EXPORT_SYMBOL(mds_lov_write_objids); - -static int mds_lov_get_objid(struct obd_device * obd, - __u32 idx) -{ - struct mds_obd *mds = &obd->u.mds; - unsigned int page; - unsigned int off; - obd_id *data; - int rc = 0; - ENTRY; - - page = idx / OBJID_PER_PAGE(); - off = idx % OBJID_PER_PAGE(); - data = mds->mds_lov_page_array[page]; - if (data == NULL) { - OBD_ALLOC(data, MDS_LOV_ALLOC_SIZE); - if (data == NULL) - GOTO(out, rc = -ENOMEM); - - mds->mds_lov_page_array[page] = data; - } - - if (data[off] == 0) { - /* We never read this lastid; ask the osc */ - struct obd_id_info lastid; - __u32 size = sizeof(lastid); - - lastid.idx = idx; - lastid.data = &data[off]; - rc = obd_get_info(mds->mds_osc_exp, sizeof(KEY_LAST_ID), - KEY_LAST_ID, &size, &lastid); - if (rc) - GOTO(out, rc); - - if (idx > mds->mds_lov_objid_count) { - mds->mds_lov_objid_count = idx; - mds->mds_lov_objid_lastpage = page; - mds->mds_lov_objid_lastidx = off; - } - cfs_bitmap_set(mds->mds_lov_page_dirty, page); - } - CDEBUG(D_INFO, "idx %d - %p - %d/%d - "LPU64"\n", - idx, data, page, off, data[off]); -out: - RETURN(rc); -} - -int mds_lov_clear_orphans(struct mds_obd *mds, struct obd_uuid *ost_uuid) -{ - int rc; - struct obdo oa; - struct obd_trans_info oti = {0}; - struct lov_stripe_md *empty_ea = NULL; - ENTRY; - - LASSERT(mds->mds_lov_page_array != NULL); - - /* This create will in fact either create or destroy: If the OST is - * missing objects below this ID, they will be created. If it finds - * objects above this ID, they will be removed. */ - memset(&oa, 0, sizeof(oa)); - oa.o_flags = OBD_FL_DELORPHAN; - oa.o_valid = OBD_MD_FLFLAGS | OBD_MD_FLGROUP; - if (ost_uuid != NULL) { - memcpy(&oa.o_inline, ost_uuid, sizeof(*ost_uuid)); - oa.o_valid |= OBD_MD_FLINLINE; - } - rc = obd_create(mds->mds_osc_exp, &oa, &empty_ea, &oti); - - RETURN(rc); -} - -/* for one target */ -static int mds_lov_set_one_nextid(struct obd_device * obd, __u32 idx, obd_id *id) -{ - struct mds_obd *mds = &obd->u.mds; - int rc; - struct obd_id_info info; - ENTRY; - - LASSERT(!obd->obd_recovering); - - /* obd->obd_dev_sem must be held so mds_lov_objids doesn't change */ - LASSERT_SEM_LOCKED(&obd->obd_dev_sem); - - info.idx = idx; - info.data = id; - - rc = obd_set_info_async(mds->mds_osc_exp, sizeof(KEY_NEXT_ID), - KEY_NEXT_ID, sizeof(info), &info, NULL); - if (rc) - CERROR ("%s: mds_lov_set_nextid failed (%d)\n", - obd->obd_name, rc); - - RETURN(rc); -} - -static __u32 mds_lov_get_idx(struct obd_export *lov, - struct obd_uuid *ost_uuid) -{ - int rc; - int valsize = sizeof(ost_uuid); - - rc = obd_get_info(lov, sizeof(KEY_LOV_IDX), KEY_LOV_IDX, - &valsize, ost_uuid); - LASSERT(rc >= 0); - - RETURN(rc); -} - -/* Update the lov desc for a new size lov. */ -static int mds_lov_update_desc(struct obd_device *obd, struct obd_export *lov) -{ - struct mds_obd *mds = &obd->u.mds; - struct lov_desc *ld; - __u32 stripes, valsize = sizeof(mds->mds_lov_desc); - int rc = 0; - ENTRY; - - OBD_ALLOC(ld, sizeof(*ld)); - if (!ld) - RETURN(-ENOMEM); - - rc = obd_get_info(lov, sizeof(KEY_LOVDESC), KEY_LOVDESC, - &valsize, ld); - if (rc) - GOTO(out, rc); - - /* Don't change the mds_lov_desc until the objids size matches the - count (paranoia) */ - mds->mds_lov_desc = *ld; - CDEBUG(D_CONFIG, "updated lov_desc, tgt_count: %d\n", - mds->mds_lov_desc.ld_tgt_count); - - stripes = min_t(__u32, LOV_MAX_STRIPE_COUNT, - mds->mds_lov_desc.ld_tgt_count); - - mds->mds_max_mdsize = lov_mds_md_size(stripes); - mds->mds_max_cookiesize = stripes * sizeof(struct llog_cookie); - CDEBUG(D_CONFIG, "updated max_mdsize/max_cookiesize for %d stripes: " - "%d/%d\n", mds->mds_max_mdsize, mds->mds_max_cookiesize, - stripes); - - /* If we added a target we have to reconnect the llogs */ - /* We only _need_ to do this at first add (idx), or the first time - after recovery. However, it should now be safe to call anytime. */ - rc = llog_cat_initialize(obd, mds->mds_lov_desc.ld_tgt_count, NULL); - -out: - OBD_FREE(ld, sizeof(*ld)); - RETURN(rc); -} - - -/* Inform MDS about new/updated target */ -static int mds_lov_update_mds(struct obd_device *obd, - struct obd_device *watched, - __u32 idx) -{ - struct mds_obd *mds = &obd->u.mds; - __u32 old_count; - int rc = 0; - int page; - int off; - obd_id *data; - - ENTRY; - - /* Don't let anyone else mess with mds_lov_objids now */ - mutex_down(&obd->obd_dev_sem); - - old_count = mds->mds_lov_desc.ld_tgt_count; - rc = mds_lov_update_desc(obd, mds->mds_osc_exp); - if (rc) - GOTO(out, rc); - - CDEBUG(D_CONFIG, "idx=%d, recov=%d/%d, cnt=%d/%d\n", - idx, obd->obd_recovering, obd->obd_async_recov, old_count, - mds->mds_lov_desc.ld_tgt_count); - - /* idx is set as data from lov_notify. */ - if (obd->obd_recovering) - GOTO(out, rc); - - if (idx >= mds->mds_lov_desc.ld_tgt_count) { - CERROR("index %d > count %d!\n", idx, - mds->mds_lov_desc.ld_tgt_count); - GOTO(out, rc = -EINVAL); - } - - rc = mds_lov_get_objid(obd, idx); - if (rc) { - CERROR("Failed to get objid - %d\n", rc); - GOTO(out, rc); - } - - page = idx / OBJID_PER_PAGE(); - off = idx % OBJID_PER_PAGE(); - data = mds->mds_lov_page_array[page]; - /* We have read this lastid from disk; tell the osc. - Don't call this during recovery. */ - rc = mds_lov_set_one_nextid(obd, idx, &data[off]); - if (rc) { - CERROR("Failed to set next id, idx=%d rc=%d\n", idx,rc); - /* Don't abort the rest of the sync */ - rc = 0; - } - - CDEBUG(D_CONFIG, "last object "LPU64" from OST %d rc=%d\n", - data[off], idx, rc); -out: - mutex_up(&obd->obd_dev_sem); - RETURN(rc); -} - -/* update the LOV-OSC knowledge of the last used object id's */ -int mds_lov_connect(struct obd_device *obd, char * lov_name) -{ - struct mds_obd *mds = &obd->u.mds; - struct lustre_handle conn = {0,}; - struct obd_connect_data *data; - int rc; - ENTRY; - - if (IS_ERR(mds->mds_osc_obd)) - RETURN(PTR_ERR(mds->mds_osc_obd)); - - if (mds->mds_osc_obd) - RETURN(0); - - mds->mds_osc_obd = class_name2obd(lov_name); - if (!mds->mds_osc_obd) { - CERROR("MDS cannot locate LOV %s\n", lov_name); - mds->mds_osc_obd = ERR_PTR(-ENOTCONN); - RETURN(-ENOTCONN); - } - - OBD_ALLOC(data, sizeof(*data)); - if (data == NULL) - RETURN(-ENOMEM); - data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_INDEX | - OBD_CONNECT_REQPORTAL | OBD_CONNECT_QUOTA64 | OBD_CONNECT_AT | - OBD_CONNECT_CHANGE_QS; -#ifdef HAVE_LRU_RESIZE_SUPPORT - data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE; -#endif - data->ocd_version = LUSTRE_VERSION_CODE; - /* NB: lov_connect() needs to fill in .ocd_index for each OST */ - rc = obd_connect(&conn, mds->mds_osc_obd, &obd->obd_uuid, data, NULL); - OBD_FREE(data, sizeof(*data)); - if (rc) { - CERROR("MDS cannot connect to LOV %s (%d)\n", lov_name, rc); - mds->mds_osc_obd = ERR_PTR(rc); - RETURN(rc); - } - mds->mds_osc_exp = class_conn2export(&conn); - - rc = obd_register_observer(mds->mds_osc_obd, obd); - if (rc) { - CERROR("MDS cannot register as observer of LOV %s (%d)\n", - lov_name, rc); - GOTO(err_discon, rc); - } - - /* Deny new client connections until we are sure we have some OSTs */ - obd->obd_no_conn = 1; - - mutex_down(&obd->obd_dev_sem); - rc = mds_lov_read_objids(obd); - if (rc) { - CERROR("cannot read %s: rc = %d\n", "lov_objids", rc); - GOTO(err_reg, rc); - } - - rc = mds_lov_update_desc(obd, mds->mds_osc_exp); - if (rc) - GOTO(err_reg, rc); - - /* If we're mounting this code for the first time on an existing FS, - * we need to populate the objids array from the real OST values */ - if (mds->mds_lov_desc.ld_tgt_count > mds->mds_lov_objid_count) { - __u32 i = mds->mds_lov_objid_count; - for(; i <= mds->mds_lov_desc.ld_tgt_count; i++) { - rc = mds_lov_get_objid(obd, i); - if (rc != 0) - break; - } - if (rc == 0) - rc = mds_lov_write_objids(obd); - if (rc) - CERROR("got last objids from OSTs, but error " - "in update objids file: %d\n", rc); - } - - mutex_up(&obd->obd_dev_sem); - - /* I want to see a callback happen when the OBD moves to a - * "For General Use" state, and that's when we'll call - * set_nextid(). The class driver can help us here, because - * it can use the obd_recovering flag to determine when the - * the OBD is full available. */ - if (!obd->obd_recovering) - rc = mds_postrecov(obd); - RETURN(rc); - -err_reg: - mutex_up(&obd->obd_dev_sem); - obd_register_observer(mds->mds_osc_obd, NULL); -err_discon: - obd_disconnect(mds->mds_osc_exp); - mds->mds_osc_exp = NULL; - mds->mds_osc_obd = ERR_PTR(rc); - RETURN(rc); -} - -int mds_lov_disconnect(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - int rc = 0; - ENTRY; - - if (!IS_ERR(mds->mds_osc_obd) && mds->mds_osc_exp != NULL) { - obd_register_observer(mds->mds_osc_obd, NULL); - - /* The actual disconnect of the mds_lov will be called from - * class_disconnect_exports from mds_lov_clean. So we have to - * ensure that class_cleanup doesn't fail due to the extra ref - * we're holding now. The mechanism to do that already exists - - * the obd_force flag. We'll drop the final ref to the - * mds_osc_exp in mds_cleanup. */ - mds->mds_osc_obd->obd_force = 1; - } - - RETURN(rc); -} - -int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len, - void *karg, void *uarg) -{ - static struct obd_uuid cfg_uuid = { .uuid = "config_uuid" }; - struct obd_device *obd = exp->exp_obd; - struct mds_obd *mds = &obd->u.mds; - struct obd_ioctl_data *data = karg; - struct lvfs_run_ctxt saved; - int rc = 0; - - ENTRY; - CDEBUG(D_IOCTL, "handling ioctl cmd %#x\n", cmd); - - switch (cmd) { - case OBD_IOC_RECORD: { - char *name = data->ioc_inlbuf1; - struct llog_ctxt *ctxt; - - if (mds->mds_cfg_llh) - RETURN(-EBUSY); - - ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_create(ctxt, &mds->mds_cfg_llh, NULL, name); - llog_ctxt_put(ctxt); - if (rc == 0) - llog_init_handle(mds->mds_cfg_llh, LLOG_F_IS_PLAIN, - &cfg_uuid); - else - mds->mds_cfg_llh = NULL; - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - RETURN(rc); - } - - case OBD_IOC_ENDRECORD: { - if (!mds->mds_cfg_llh) - RETURN(-EBADF); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_close(mds->mds_cfg_llh); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - mds->mds_cfg_llh = NULL; - RETURN(rc); - } - - case OBD_IOC_CLEAR_LOG: { - char *name = data->ioc_inlbuf1; - struct llog_ctxt *ctxt; - if (mds->mds_cfg_llh) - RETURN(-EBUSY); - - ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_create(ctxt, &mds->mds_cfg_llh, NULL, name); - llog_ctxt_put(ctxt); - if (rc == 0) { - llog_init_handle(mds->mds_cfg_llh, LLOG_F_IS_PLAIN, - NULL); - - rc = llog_destroy(mds->mds_cfg_llh); - llog_free_handle(mds->mds_cfg_llh); - } - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - mds->mds_cfg_llh = NULL; - RETURN(rc); - } - - case OBD_IOC_DORECORD: { - char *cfg_buf; - struct llog_rec_hdr rec; - if (!mds->mds_cfg_llh) - RETURN(-EBADF); - - rec.lrh_len = llog_data_len(data->ioc_plen1); - - if (data->ioc_type == LUSTRE_CFG_TYPE) { - rec.lrh_type = OBD_CFG_REC; - } else { - CERROR("unknown cfg record type:%d \n", data->ioc_type); - RETURN(-EINVAL); - } - - OBD_ALLOC(cfg_buf, data->ioc_plen1); - if (cfg_buf == NULL) - RETURN(-EINVAL); - rc = copy_from_user(cfg_buf, data->ioc_pbuf1, data->ioc_plen1); - if (rc) { - OBD_FREE(cfg_buf, data->ioc_plen1); - RETURN(rc); - } - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_write_rec(mds->mds_cfg_llh, &rec, NULL, 0, - cfg_buf, -1); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - OBD_FREE(cfg_buf, data->ioc_plen1); - RETURN(rc); - } - - case OBD_IOC_PARSE: { - struct llog_ctxt *ctxt = - llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - llog_ctxt_put(ctxt); - if (rc) - RETURN(rc); - - RETURN(rc); - } - - case OBD_IOC_DUMP_LOG: { - struct llog_ctxt *ctxt = - llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - llog_ctxt_put(ctxt); - if (rc) - RETURN(rc); - - RETURN(rc); - } - - case OBD_IOC_SYNC: { - CDEBUG(D_INFO, "syncing mds %s\n", obd->obd_name); - rc = fsfilt_sync(obd, obd->u.obt.obt_sb); - RETURN(rc); - } - - case OBD_IOC_SET_READONLY: { - void *handle; - struct inode *inode = obd->u.obt.obt_sb->s_root->d_inode; - BDEVNAME_DECLARE_STORAGE(tmp); - LCONSOLE_WARN("*** setting obd %s device '%s' read-only ***\n", - obd->obd_name, ll_bdevname(obd->u.obt.obt_sb, tmp)); - - handle = fsfilt_start(obd, inode, FSFILT_OP_MKNOD, NULL); - if (!IS_ERR(handle)) - rc = fsfilt_commit(obd, inode, handle, 1); - - CDEBUG(D_HA, "syncing mds %s\n", obd->obd_name); - rc = fsfilt_sync(obd, obd->u.obt.obt_sb); - - lvfs_set_rdonly(obd, obd->u.obt.obt_sb); - RETURN(0); - } - - case OBD_IOC_CATLOGLIST: { - int count = mds->mds_lov_desc.ld_tgt_count; - rc = llog_catalog_list(obd, count, data); - RETURN(rc); - - } - case OBD_IOC_LLOG_CHECK: - case OBD_IOC_LLOG_CANCEL: - case OBD_IOC_LLOG_REMOVE: { - struct llog_ctxt *ctxt = - llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - int rc2; - - obd_llog_finish(obd, mds->mds_lov_desc.ld_tgt_count); - push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL); - rc = llog_ioctl(ctxt, cmd, data); - pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL); - llog_cat_initialize(obd, mds->mds_lov_desc.ld_tgt_count, NULL); - llog_ctxt_put(ctxt); - rc2 = obd_set_info_async(mds->mds_osc_exp, - sizeof(KEY_MDS_CONN), KEY_MDS_CONN, - 0, NULL, NULL); - if (!rc) - rc = rc2; - RETURN(rc); - } - case OBD_IOC_LLOG_INFO: - case OBD_IOC_LLOG_PRINT: { - struct llog_ctxt *ctxt = - llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - - push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL); - rc = llog_ioctl(ctxt, cmd, data); - pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL); - llog_ctxt_put(ctxt); - - RETURN(rc); - } - - case OBD_IOC_ABORT_RECOVERY: - CERROR("aborting recovery for device %s\n", obd->obd_name); - target_abort_recovery(obd); - RETURN(0); - - default: - CDEBUG(D_INFO, "unknown command %x\n", cmd); - RETURN(-EINVAL); - } - RETURN(0); - -} - -/* Collect the preconditions we need to allow client connects */ -static void mds_allow_cli(struct obd_device *obd, unsigned long flag) -{ - if (flag & CONFIG_LOG) - obd->u.mds.mds_fl_cfglog = 1; - if (flag & CONFIG_SYNC) - obd->u.mds.mds_fl_synced = 1; - if (obd->u.mds.mds_fl_cfglog /* bz11778: && obd->u.mds.mds_fl_synced */) - /* Open for clients */ - obd->obd_no_conn = 0; -} - -struct mds_lov_sync_info { - struct obd_device *mlsi_obd; /* the lov device to sync */ - struct obd_device *mlsi_watched; /* target osc */ - __u32 mlsi_index; /* index of target */ -}; - -/* We only sync one osc at a time, so that we don't have to hold - any kind of lock on the whole mds_lov_desc, which may change - (grow) as a result of mds_lov_add_ost. This also avoids any - kind of mismatch between the lov_desc and the mds_lov_desc, - which are not in lock-step during lov_add_obd */ -static int __mds_lov_synchronize(void *data) -{ - struct mds_lov_sync_info *mlsi = data; - struct obd_device *obd = mlsi->mlsi_obd; - struct obd_device *watched = mlsi->mlsi_watched; - struct mds_obd *mds = &obd->u.mds; - struct obd_uuid *uuid; - __u32 idx = mlsi->mlsi_index; - struct llog_ctxt *ctxt; - int rc = 0; - ENTRY; - - OBD_FREE(mlsi, sizeof(*mlsi)); - - LASSERT(obd); - LASSERT(watched); - uuid = &watched->u.cli.cl_target_uuid; - LASSERT(uuid); - - OBD_RACE(OBD_FAIL_MDS_LOV_SYNC_RACE); - - rc = mds_lov_update_mds(obd, watched, idx); - if (rc != 0) { - CERROR("%s failed at update_mds: %d\n", obd_uuid2str(uuid), rc); - GOTO(out, rc); - } - - rc = obd_set_info_async(mds->mds_osc_exp, sizeof(KEY_MDS_CONN), - KEY_MDS_CONN, 0, uuid, NULL); - if (rc != 0) - GOTO(out, rc); - - ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT); - if (!ctxt) - RETURN(-ENODEV); - - OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_LLOG_SYNC_TIMEOUT, 60); - - rc = llog_connect(ctxt, obd->u.mds.mds_lov_desc.ld_tgt_count, - NULL, NULL, uuid); - llog_ctxt_put(ctxt); - - if (rc != 0) { - CERROR("%s failed at llog_origin_connect: %d\n", - obd_uuid2str(uuid), rc); - GOTO(out, rc); - } - - LCONSOLE_INFO("MDS %s: %s now active, resetting orphans\n", - obd->obd_name, obd_uuid2str(uuid)); - - if (obd->obd_stopping) - GOTO(out, rc = -ENODEV); - - rc = mds_lov_clear_orphans(mds, uuid); - if (rc != 0) { - CERROR("%s failed at mds_lov_clear_orphans: %d\n", - obd_uuid2str(uuid), rc); - GOTO(out, rc); - } - - EXIT; -out: - if (rc) { - /* Deactivate it for safety */ - CERROR("%s sync failed %d, deactivating\n", obd_uuid2str(uuid), - rc); - if (!obd->obd_stopping && mds->mds_osc_obd && - !mds->mds_osc_obd->obd_stopping && !watched->obd_stopping) - obd_notify(mds->mds_osc_obd, watched, - OBD_NOTIFY_INACTIVE, NULL); - } else { - /* We've successfully synced at least 1 OST and are ready - to handle client requests */ - mds_allow_cli(obd, CONFIG_SYNC); - } - - class_decref(obd); - return rc; -} - -int mds_lov_synchronize(void *data) -{ - struct mds_lov_sync_info *mlsi = data; - char name[20]; - - snprintf(name, sizeof(name), "ll_sync_%02u", mlsi->mlsi_index); - ptlrpc_daemonize(name); - - RETURN(__mds_lov_synchronize(data)); -} - -int mds_lov_start_synchronize(struct obd_device *obd, - struct obd_device *watched, - void *data, int nonblock) -{ - struct mds_lov_sync_info *mlsi; - struct mds_obd *mds = &obd->u.mds; - int rc; - struct obd_uuid *uuid; - ENTRY; - - LASSERT(watched); - uuid = &watched->u.cli.cl_target_uuid; - - OBD_ALLOC(mlsi, sizeof(*mlsi)); - if (mlsi == NULL) - RETURN(-ENOMEM); - - mlsi->mlsi_obd = obd; - mlsi->mlsi_watched = watched; - if (data) - mlsi->mlsi_index = *(__u32 *)data; - else - mlsi->mlsi_index = mds_lov_get_idx(mds->mds_osc_exp, uuid); - - /* Although class_export_get(obd->obd_self_export) would lock - the MDS in place, since it's only a self-export - it doesn't lock the LOV in place. The LOV can be disconnected - during MDS precleanup, leaving nothing for __mds_lov_synchronize. - Simply taking an export ref on the LOV doesn't help, because it's - still disconnected. Taking an obd reference insures that we don't - disconnect the LOV. This of course means a cleanup won't - finish for as long as the sync is blocking. */ - class_incref(obd); - - if (nonblock) { - /* Synchronize in the background */ - rc = cfs_kernel_thread(mds_lov_synchronize, mlsi, - CLONE_VM | CLONE_FILES); - if (rc < 0) { - CERROR("%s: error starting mds_lov_synchronize: %d\n", - obd->obd_name, rc); - class_decref(obd); - } else { - CDEBUG(D_HA, "%s: mds_lov_synchronize idx=%d " - "thread=%d\n", obd->obd_name, - mlsi->mlsi_index, rc); - rc = 0; - } - } else { - rc = __mds_lov_synchronize((void *)mlsi); - } - - RETURN(rc); -} - -int mds_notify(struct obd_device *obd, struct obd_device *watched, - enum obd_notify_event ev, void *data) -{ - int rc = 0; - ENTRY; - - switch (ev) { - /* We only handle these: */ - case OBD_NOTIFY_ACTIVE: - case OBD_NOTIFY_SYNC: - case OBD_NOTIFY_SYNC_NONBLOCK: - break; - case OBD_NOTIFY_CONFIG: - mds_allow_cli(obd, (unsigned long)data); - default: - RETURN(0); - } - - CDEBUG(D_CONFIG, "notify %s ev=%d\n", watched->obd_name, ev); - - if (strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME) != 0) { - CERROR("unexpected notification of %s %s!\n", - watched->obd_type->typ_name, watched->obd_name); - RETURN(-EINVAL); - } - - if (obd->obd_recovering) { - CWARN("MDS %s: in recovery, not resetting orphans on %s\n", - obd->obd_name, - obd_uuid2str(&watched->u.cli.cl_target_uuid)); - /* We still have to fix the lov descriptor for ost's added - after the mdt in the config log. They didn't make it into - mds_lov_connect. */ - mutex_down(&obd->obd_dev_sem); - rc = mds_lov_update_desc(obd, obd->u.mds.mds_osc_exp); - mutex_up(&obd->obd_dev_sem); - mds_allow_cli(obd, CONFIG_SYNC); - RETURN(rc); - } - - LASSERT(!llog_ctxt_null(obd, LLOG_MDS_OST_ORIG_CTXT)); - rc = mds_lov_start_synchronize(obd, watched, data, - !(ev == OBD_NOTIFY_SYNC)); - - lquota_recovery(mds_quota_interface_ref, obd); - - RETURN(rc); -} - -int mds_get_default_md(struct obd_device *obd, struct lov_mds_md *lmm, - int *size) -{ - struct lov_desc *ldesc; - ENTRY; - - ldesc = &obd->u.mds.mds_lov_desc; - LASSERT(ldesc != NULL); - - if (!lmm) - RETURN(0); - - lmm->lmm_magic = LOV_MAGIC_V1; - lmm->lmm_object_gr = LOV_OBJECT_GROUP_DEFAULT; - lmm->lmm_pattern = ldesc->ld_pattern; - lmm->lmm_stripe_size = ldesc->ld_default_stripe_size; - lmm->lmm_stripe_count = ldesc->ld_default_stripe_count; - *size = sizeof(struct lov_mds_md); - - RETURN(sizeof(struct lov_mds_md)); -} - -/* Convert the on-disk LOV EA structre. - * We always try to convert from an old LOV EA format to the common in-memory - * (lsm) format (obd_unpackmd() understands the old on-disk (lmm) format) and - * then convert back to the new on-disk format and save it back to disk - * (obd_packmd() only ever saves to the new on-disk format) so we don't have - * to convert it each time this inode is accessed. - * - * This function is a bit interesting in the error handling. We can safely - * ship the old lmm to the client in case of failure, since it uses the same - * obd_unpackmd() code and can do the conversion if the MDS fails for some - * reason. We will not delete the old lmm data until we have written the - * new format lmm data in fsfilt_set_md(). */ -int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode, - struct lov_mds_md *lmm, int lmm_size) -{ - struct lov_stripe_md *lsm = NULL; - void *handle; - int rc, err; - ENTRY; - - if (le32_to_cpu(lmm->lmm_magic) == LOV_MAGIC || - le32_to_cpu(lmm->lmm_magic == LOV_MAGIC_JOIN)) - RETURN(0); - - CDEBUG(D_INODE, "converting LOV EA on %lu/%u from %#08x to %#08x\n", - inode->i_ino, inode->i_generation, le32_to_cpu(lmm->lmm_magic), - LOV_MAGIC); - - rc = obd_unpackmd(obd->u.mds.mds_osc_exp, &lsm, lmm, lmm_size); - if (rc < 0) - GOTO(conv_end, rc); - - rc = obd_packmd(obd->u.mds.mds_osc_exp, &lmm, lsm); - if (rc < 0) - GOTO(conv_free, rc); - lmm_size = rc; - - handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL); - if (IS_ERR(handle)) { - rc = PTR_ERR(handle); - GOTO(conv_free, rc); - } - - rc = fsfilt_set_md(obd, inode, handle, lmm, lmm_size, "lov"); - - err = fsfilt_commit(obd, inode, handle, 0); - if (!rc) - rc = err ? err : lmm_size; - GOTO(conv_free, rc); -conv_free: - obd_free_memmd(obd->u.mds.mds_osc_exp, &lsm); -conv_end: - return rc; -} diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c deleted file mode 100644 index e879d0e848..0000000000 --- a/lustre/mds/mds_open.c +++ /dev/null @@ -1,1544 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2003 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Andreas Dilger <adilger@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * Author: Mike Shaver <shaver@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDS - -#include <linux/version.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/version.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# include <linux/buffer_head.h> -# include <linux/workqueue.h> -#else -# include <linux/locks.h> -#endif - -#include <obd_class.h> -#include <obd_lov.h> -#include <lustre_fsfilt.h> -#include <lprocfs_status.h> - -#include "mds_internal.h" - -/* Exported function from this file are: - * - * mds_open - called by the intent handler - * mds_close - an rpc handling function - * mds_pin - an rpc handling function - which will go away - * mds_mfd_close - for force closing files when a client dies - */ - -/* - * MDS file data handling: file data holds a handle for a file opened - * by a client. - */ - -static void mds_mfd_addref(void *mfdp) -{ - struct mds_file_data *mfd = mfdp; - - atomic_inc(&mfd->mfd_refcount); - CDEBUG(D_INFO, "GETting mfd %p : new refcount %d\n", mfd, - atomic_read(&mfd->mfd_refcount)); -} - -/* Create a new mds_file_data struct. - * One reference for handle+med_open_head list and dropped by mds_mfd_unlink(), - * one reference for the caller of this function. */ -struct mds_file_data *mds_mfd_new(void) -{ - struct mds_file_data *mfd; - - OBD_ALLOC(mfd, sizeof *mfd); - if (mfd == NULL) { - CERROR("mds: out of memory\n"); - return NULL; - } - - atomic_set(&mfd->mfd_refcount, 2); - - INIT_LIST_HEAD(&mfd->mfd_handle.h_link); - INIT_LIST_HEAD(&mfd->mfd_list); - class_handle_hash(&mfd->mfd_handle, mds_mfd_addref); - - return mfd; -} - -/* Get a new reference on the mfd pointed to by handle, if handle is still - * valid. Caller must drop reference with mds_mfd_put(). */ -static struct mds_file_data *mds_handle2mfd(struct lustre_handle *handle) -{ - ENTRY; - LASSERT(handle != NULL); - RETURN(class_handle2object(handle->cookie)); -} - -/* Drop mfd reference, freeing struct if this is the last one. */ -static void mds_mfd_put(struct mds_file_data *mfd) -{ - CDEBUG(D_INFO, "PUTting mfd %p : new refcount %d\n", mfd, - atomic_read(&mfd->mfd_refcount) - 1); - LASSERT(atomic_read(&mfd->mfd_refcount) > 0 && - atomic_read(&mfd->mfd_refcount) < 0x5a5a); - if (atomic_dec_and_test(&mfd->mfd_refcount)) { - OBD_FREE_RCU(mfd, sizeof *mfd, &mfd->mfd_handle); - } -} - -/* Remove the mfd handle so that it cannot be found by open/close again. - * Caller must hold med_open_lock for mfd_list manipulation. */ -void mds_mfd_unlink(struct mds_file_data *mfd, int decref) -{ - class_handle_unhash(&mfd->mfd_handle); - list_del_init(&mfd->mfd_list); - if (decref) - mds_mfd_put(mfd); -} - -/* Caller must hold mds->mds_epoch_sem */ -static int mds_alloc_filterdata(struct inode *inode) -{ - LASSERT(inode->i_filterdata == NULL); - OBD_ALLOC(inode->i_filterdata, sizeof(struct mds_filter_data)); - if (inode->i_filterdata == NULL) - return -ENOMEM; - LASSERT(igrab(inode) == inode); - return 0; -} - -/* Caller must hold mds->mds_epoch_sem */ -static void mds_free_filterdata(struct inode *inode) -{ - LASSERT(inode->i_filterdata != NULL); - OBD_FREE(inode->i_filterdata, sizeof(struct mds_filter_data)); - inode->i_filterdata = NULL; - iput(inode); -} - -/* Write access to a file: executors cause a negative count, - * writers a positive count. The semaphore is needed to perform - * a check for the sign and then increment or decrement atomically. - * - * This code is closely tied to the allocation of the d_fsdata and the - * MDS epoch, so we use the same semaphore for the whole lot. - * - * We could use a different semaphore for each file, if it ever shows - * up in a profile, which it won't. - * - * epoch argument is nonzero during recovery */ -static int mds_get_write_access(struct mds_obd *mds, struct inode *inode, - __u64 epoch) -{ - int rc = 0; - - down(&mds->mds_epoch_sem); - - if (atomic_read(&inode->i_writecount) < 0) { - up(&mds->mds_epoch_sem); - RETURN(-ETXTBSY); - } - - - if (MDS_FILTERDATA(inode) && MDS_FILTERDATA(inode)->io_epoch != 0) { - CDEBUG(D_INODE, "continuing MDS epoch "LPU64" for ino %lu/%u\n", - MDS_FILTERDATA(inode)->io_epoch, inode->i_ino, - inode->i_generation); - goto out; - } - - if (inode->i_filterdata == NULL) - mds_alloc_filterdata(inode); - if (inode->i_filterdata == NULL) { - rc = -ENOMEM; - goto out; - } - if (epoch > mds->mds_io_epoch) - mds->mds_io_epoch = epoch; - else - mds->mds_io_epoch++; - MDS_FILTERDATA(inode)->io_epoch = mds->mds_io_epoch; - CDEBUG(D_INODE, "starting MDS epoch "LPU64" for ino %lu/%u\n", - mds->mds_io_epoch, inode->i_ino, inode->i_generation); - out: - if (rc == 0) - atomic_inc(&inode->i_writecount); - up(&mds->mds_epoch_sem); - return rc; -} - -/* Returns EAGAIN if the client needs to get size and/or cookies and close - * again -- which is never true if the file is about to be unlinked. Otherwise - * returns the number of remaining writers. */ -static int mds_put_write_access(struct mds_obd *mds, struct inode *inode, - struct mds_body *body, int unlinking) -{ - int rc = 0; - ENTRY; - - down(&mds->mds_epoch_sem); - atomic_dec(&inode->i_writecount); - rc = atomic_read(&inode->i_writecount); - if (rc > 0) - GOTO(out, rc); -#if 0 - if (!unlinking && !(body->valid & OBD_MD_FLSIZE)) - GOTO(out, rc = EAGAIN); -#endif - mds_free_filterdata(inode); - out: - up(&mds->mds_epoch_sem); - return rc; -} - -static int mds_deny_write_access(struct mds_obd *mds, struct inode *inode) -{ - ENTRY; - down(&mds->mds_epoch_sem); - if (atomic_read(&inode->i_writecount) > 0) { - up(&mds->mds_epoch_sem); - RETURN(-ETXTBSY); - } - atomic_dec(&inode->i_writecount); - up(&mds->mds_epoch_sem); - RETURN(0); -} - -static void mds_allow_write_access(struct inode *inode) -{ - ENTRY; - atomic_inc(&inode->i_writecount); -} - -int mds_query_write_access(struct inode *inode) -{ - ENTRY; - RETURN(atomic_read(&inode->i_writecount)); -} - -/* This replaces the VFS dentry_open, it manages mfd and writecount */ -static struct mds_file_data *mds_dentry_open(struct dentry *dentry, - struct vfsmount *mnt, int flags, - struct ptlrpc_request *req) -{ - struct mds_export_data *med = &req->rq_export->exp_mds_data; - struct mds_obd *mds = mds_req2mds(req); - struct mds_file_data *mfd; - struct mds_body *body; - int error; - ENTRY; - - mfd = mds_mfd_new(); - if (mfd == NULL) { - CERROR("mds: out of memory\n"); - GOTO(cleanup_dentry, error = -ENOMEM); - } - - body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body)); - - if (flags & FMODE_WRITE) { - /* FIXME: in recovery, need to pass old epoch here */ - error = mds_get_write_access(mds, dentry->d_inode, 0); - if (error) - GOTO(cleanup_mfd, error); - body->io_epoch = MDS_FILTERDATA(dentry->d_inode)->io_epoch; - } else if (flags & MDS_FMODE_EXEC) { - error = mds_deny_write_access(mds, dentry->d_inode); - if (error) - GOTO(cleanup_mfd, error); - } - - dget(dentry); - - /* Mark the file as open to handle open-unlink. */ - MDS_DOWN_WRITE_ORPHAN_SEM(dentry->d_inode); - mds_orphan_open_inc(dentry->d_inode); - MDS_UP_WRITE_ORPHAN_SEM(dentry->d_inode); - - mfd->mfd_mode = flags; - mfd->mfd_dentry = dentry; - mfd->mfd_xid = req->rq_xid; - - spin_lock(&med->med_open_lock); - list_add(&mfd->mfd_list, &med->med_open_head); - spin_unlock(&med->med_open_lock); - - body->handle.cookie = mfd->mfd_handle.h_cookie; - - RETURN(mfd); - -cleanup_mfd: - mds_mfd_put(mfd); - mds_mfd_unlink(mfd, 1); -cleanup_dentry: - return ERR_PTR(error); -} - -/* Must be called with i_mutex held */ -static int mds_create_objects(struct ptlrpc_request *req, int offset, - struct mds_update_record *rec, - struct mds_obd *mds, struct obd_device *obd, - struct dentry *dchild, void **handle, - struct lov_mds_md **objid) -{ - struct inode *inode = dchild->d_inode; - struct obd_trans_info oti = { 0 }; - struct lov_mds_md *lmm = NULL; - int rc, lmm_size; - struct mds_body *body; - struct obd_info oinfo = { { { 0 } } }; - void *lmm_buf; - ENTRY; - - *objid = NULL; - - if (!S_ISREG(inode->i_mode)) - RETURN(0); - if (rec->ur_flags & MDS_OPEN_DELAY_CREATE || - !(rec->ur_flags & FMODE_WRITE)) - RETURN(0); - - body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body)); - - if (body->valid & OBD_MD_FLEASIZE) - RETURN(0); - - oti_init(&oti, req); - - /* replay case */ - if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) { - if (rec->ur_fid2->id == 0) { - DEBUG_REQ(D_ERROR, req, "fid2 not set on open replay"); - RETURN(-EFAULT); - } - - body->valid |= OBD_MD_FLBLKSZ | OBD_MD_FLEASIZE; - lmm_size = rec->ur_eadatalen; - lmm = rec->ur_eadata; - LASSERT(lmm); - - if (*handle == NULL) - *handle = fsfilt_start(obd,inode,FSFILT_OP_CREATE,NULL); - if (IS_ERR(*handle)) { - rc = PTR_ERR(*handle); - *handle = NULL; - GOTO(out_ids, rc); - } - - rc = fsfilt_set_md(obd, inode, *handle, lmm, lmm_size, "lov"); - if (rc) - CERROR("open replay failed to set md:%d\n", rc); - lmm_buf = lustre_msg_buf(req->rq_repmsg, offset, lmm_size); - LASSERT(lmm_buf); - memcpy(lmm_buf, lmm, lmm_size); - - *objid = lmm_buf; - RETURN(rc); - } - - if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_ALLOC_OBDO)) - GOTO(out_ids, rc = -ENOMEM); - - OBDO_ALLOC(oinfo.oi_oa); - if (oinfo.oi_oa == NULL) - GOTO(out_ids, rc = -ENOMEM); - oinfo.oi_oa->o_uid = 0; /* must have 0 uid / gid on OST */ - oinfo.oi_oa->o_gid = 0; - oinfo.oi_oa->o_mode = S_IFREG | 0600; - oinfo.oi_oa->o_id = inode->i_ino; - oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLFLAGS | - OBD_MD_FLMODE | OBD_MD_FLUID | OBD_MD_FLGID; - oinfo.oi_oa->o_size = 0; - - obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME | - OBD_MD_FLMTIME | OBD_MD_FLCTIME); - - if (!(rec->ur_flags & MDS_OPEN_HAS_OBJS)) { - /* check if things like lfs setstripe are sending us the ea */ - if (rec->ur_flags & MDS_OPEN_HAS_EA) { - rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE, - mds->mds_osc_exp, - 0, &oinfo.oi_md, rec->ur_eadata); - if (rc) - GOTO(out_oa, rc); - } else { - OBD_ALLOC(lmm, mds->mds_max_mdsize); - if (lmm == NULL) - GOTO(out_oa, rc = -ENOMEM); - - lmm_size = mds->mds_max_mdsize; - rc = mds_get_md(obd, dchild->d_parent->d_inode, - lmm, &lmm_size, 1, 0); - if (rc > 0) - rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE, - mds->mds_osc_exp, - 0, &oinfo.oi_md, lmm); - OBD_FREE(lmm, mds->mds_max_mdsize); - if (rc) - GOTO(out_oa, rc); - } - rc = obd_create(mds->mds_osc_exp, oinfo.oi_oa, - &oinfo.oi_md, &oti); - if (rc) { - int level = D_ERROR; - if (rc == -ENOSPC) - level = D_INODE; - CDEBUG(level, "error creating objects for " - "inode %lu: rc = %d\n", - inode->i_ino, rc); - if (rc > 0) { - CERROR("obd_create returned invalid " - "rc %d\n", rc); - rc = -EIO; - } - GOTO(out_oa, rc); - } - } else { - rc = obd_iocontrol(OBD_IOC_LOV_SETEA, mds->mds_osc_exp, - 0, &oinfo.oi_md, rec->ur_eadata); - if (rc) { - GOTO(out_oa, rc); - } - oinfo.oi_md->lsm_object_id = oinfo.oi_oa->o_id; - } - if (i_size_read(inode)) { - oinfo.oi_oa->o_size = i_size_read(inode); - obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLTYPE | - OBD_MD_FLATIME | OBD_MD_FLMTIME | - OBD_MD_FLCTIME | OBD_MD_FLSIZE); - - /* pack lustre id to OST */ - oinfo.oi_oa->o_fid = body->fid1.id; - oinfo.oi_oa->o_generation = body->fid1.generation; - oinfo.oi_oa->o_valid |= OBD_MD_FLFID | OBD_MD_FLGENER; - - rc = obd_setattr_rqset(mds->mds_osc_exp, &oinfo, &oti); - if (rc) { - CERROR("error setting attrs for inode %lu: rc %d\n", - inode->i_ino, rc); - if (rc > 0) { - CERROR("obd_setattr_async returned bad rc %d\n", - rc); - rc = -EIO; - } - GOTO(out_oa, rc); - } - } - - body->valid |= OBD_MD_FLBLKSZ | OBD_MD_FLEASIZE; - obdo_refresh_inode(inode, oinfo.oi_oa, OBD_MD_FLBLKSZ); - - LASSERT(oinfo.oi_md && oinfo.oi_md->lsm_object_id); - lmm = NULL; - rc = obd_packmd(mds->mds_osc_exp, &lmm, oinfo.oi_md); - if (rc < 0) { - CERROR("cannot pack lsm, err = %d\n", rc); - GOTO(out_oa, rc); - } - lmm_size = rc; - body->eadatasize = rc; - - if (*handle == NULL) - *handle = fsfilt_start(obd, inode, FSFILT_OP_CREATE, NULL); - if (IS_ERR(*handle)) { - rc = PTR_ERR(*handle); - *handle = NULL; - GOTO(free_diskmd, rc); - } - - rc = fsfilt_set_md(obd, inode, *handle, lmm, lmm_size, "lov"); - lmm_buf = lustre_msg_buf(req->rq_repmsg, offset, lmm_size); - LASSERT(lmm_buf); - memcpy(lmm_buf, lmm, lmm_size); - *objid = lmm_buf; /* save for mds_lov_update_objid */ - - free_diskmd: - obd_free_diskmd(mds->mds_osc_exp, &lmm); - out_oa: - oti_free_cookies(&oti); - OBDO_FREE(oinfo.oi_oa); - out_ids: - if (oinfo.oi_md) - obd_free_memmd(mds->mds_osc_exp, &oinfo.oi_md); - RETURN(rc); -} - -static void reconstruct_open(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, - struct lustre_handle *child_lockh) -{ - struct mds_export_data *med = &req->rq_export->exp_mds_data; - struct mds_client_data *mcd = med->med_mcd; - struct mds_obd *mds = mds_req2mds(req); - struct mds_file_data *mfd; - struct obd_device *obd = req->rq_export->exp_obd; - struct dentry *parent, *dchild; - struct ldlm_reply *rep; - struct mds_body *body; - int rc; - struct list_head *t; - int put_child = 1; - ENTRY; - - LASSERT(offset == DLM_INTENT_REC_OFF); /* only called via intent */ - rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, sizeof(*rep)); - body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body)); - - /* copy rc, transno and disp; steal locks */ - mds_req_from_mcd(req, mcd); - intent_set_disposition(rep, le32_to_cpu(mcd->mcd_last_data)); - - /* Only replay if create or open actually happened. */ - if (!intent_disposition(rep, DISP_OPEN_CREATE | DISP_OPEN_OPEN) ) { - EXIT; - return; /* error looking up parent or child */ - } - - parent = mds_fid2dentry(mds, rec->ur_fid1, NULL); - LASSERT(!IS_ERR(parent)); - - dchild = ll_lookup_one_len(rec->ur_name, parent, rec->ur_namelen - 1); - LASSERT(!IS_ERR(dchild)); - - if (!dchild->d_inode) - GOTO(out_dput, 0); /* child not present to open */ - - /* At this point, we know we have a child. We'll send - * it back _unless_ it not created and open failed. - */ - if (intent_disposition(rep, DISP_OPEN_OPEN) && - !intent_disposition(rep, DISP_OPEN_CREATE) && - req->rq_status) { - GOTO(out_dput, 0); - } - - mds_pack_inode2fid(&body->fid1, dchild->d_inode); - mds_pack_inode2body(body, dchild->d_inode); - if (S_ISREG(dchild->d_inode->i_mode)) { - rc = mds_pack_md(obd, req->rq_repmsg, DLM_REPLY_REC_OFF + 1, - body, dchild->d_inode, 1, 0); - - if (rc) - LASSERT(rc == req->rq_status); - - /* If we have LOV EA data, the OST holds size, mtime */ - if (!(body->valid & OBD_MD_FLEASIZE)) - body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME); - } - - if (!(rec->ur_flags & MDS_OPEN_JOIN_FILE)) - lustre_shrink_reply(req, DLM_REPLY_REC_OFF + 1, - body->eadatasize, 0); - - if (req->rq_export->exp_connect_flags & OBD_CONNECT_ACL && - !(rec->ur_flags & MDS_OPEN_JOIN_FILE)) { - int acl_off = DLM_REPLY_REC_OFF + (body->eadatasize ? 2 : 1); - - rc = mds_pack_acl(med, dchild->d_inode, req->rq_repmsg, - body, acl_off); - lustre_shrink_reply(req, acl_off, body->aclsize, 0); - if (!req->rq_status && rc) - req->rq_status = rc; - } - - /* If we have -EEXIST as the status, and we were asked to create - * exclusively, we can tell we failed because the file already existed. - */ - if (req->rq_status == -EEXIST && - ((rec->ur_flags & (MDS_OPEN_CREAT | MDS_OPEN_EXCL)) == - (MDS_OPEN_CREAT | MDS_OPEN_EXCL))) { - GOTO(out_dput, 0); - } - - /* If we didn't get as far as trying to open, then some locking thing - * probably went wrong, and we'll just bail here. - */ - if (!intent_disposition(rep, DISP_OPEN_OPEN)) - GOTO(out_dput, 0); - - /* If we failed, then we must have failed opening, so don't look for - * file descriptor or anything, just give the client the bad news. - */ - if (req->rq_status) - GOTO(out_dput, 0); - - mfd = NULL; - spin_lock(&med->med_open_lock); - list_for_each(t, &med->med_open_head) { - mfd = list_entry(t, struct mds_file_data, mfd_list); - if (mfd->mfd_xid == req->rq_xid) { - mds_mfd_addref(mfd); - break; - } - mfd = NULL; - } - spin_unlock(&med->med_open_lock); - - /* #warning "XXX fixme" bug 2991 */ - /* Here it used to LASSERT(mfd) if exp_outstanding_reply != NULL. - * Now that exp_outstanding_reply is a list, it's just using mfd != NULL - * to detect a re-open */ - if (mfd == NULL) { - if (rec->ur_flags & MDS_OPEN_JOIN_FILE) { - rc = mds_join_file(rec, req, dchild, NULL); - if (rc) - GOTO(out_dput, rc); - } - mntget(mds->mds_vfsmnt); - CERROR("Re-opened file \n"); - mfd = mds_dentry_open(dchild, mds->mds_vfsmnt, - rec->ur_flags & ~MDS_OPEN_TRUNC, req); - if (!mfd) { - CERROR("mds: out of memory\n"); - GOTO(out_dput, req->rq_status = -ENOMEM); - } - put_child = 0; - } else { - body->handle.cookie = mfd->mfd_handle.h_cookie; - CDEBUG(D_INODE, "resend mfd %p, cookie "LPX64"\n", mfd, - mfd->mfd_handle.h_cookie); - } - - mds_mfd_put(mfd); - - out_dput: - if (put_child) - l_dput(dchild); - l_dput(parent); - EXIT; -} - -/* do NOT or the MAY_*'s, you'll get the weakest */ -static int accmode(struct inode *inode, int flags) -{ - int res = 0; - - /* Sadly, NFSD reopens a file repeatedly during operation, so the - * "acc_mode = 0" allowance for newly-created files isn't honoured. - * NFSD uses the MDS_OPEN_OWNEROVERRIDE flag to say that a file - * owner can write to a file even if it is marked readonly to hide - * its brokenness. (bug 5781) */ - if (flags & MDS_OPEN_OWNEROVERRIDE && inode->i_uid == current->fsuid) - return 0; - - if (flags & FMODE_READ) - res = MAY_READ; - if (flags & (FMODE_WRITE|MDS_OPEN_TRUNC)) - res |= MAY_WRITE; - if (flags & MDS_FMODE_EXEC) - res = MAY_EXEC; - return res; -} - -/* Handles object creation, actual opening, and I/O epoch */ -static int mds_finish_open(struct ptlrpc_request *req, struct dentry *dchild, - struct mds_body *body, int flags, void **handle, - struct mds_update_record *rec,struct ldlm_reply *rep, - struct lustre_handle *lockh) -{ - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_file_data *mfd = NULL; - struct lov_mds_md *lmm = NULL; /* object IDs created */ - int rc = 0; - ENTRY; - - /* atomically create objects if necessary */ - LOCK_INODE_MUTEX(dchild->d_inode); - - if (S_ISREG(dchild->d_inode->i_mode) && - !(body->valid & OBD_MD_FLEASIZE)) { - rc = mds_pack_md(obd, req->rq_repmsg, DLM_REPLY_REC_OFF + 1, - body, dchild->d_inode, 0, 0); - if (rc) { - UNLOCK_INODE_MUTEX(dchild->d_inode); - RETURN(rc); - } - } - if (rec != NULL) { - if ((body->valid & OBD_MD_FLEASIZE) && - (rec->ur_flags & MDS_OPEN_HAS_EA)) { - UNLOCK_INODE_MUTEX(dchild->d_inode); - RETURN(-EEXIST); - } - if (rec->ur_flags & MDS_OPEN_JOIN_FILE) { - UNLOCK_INODE_MUTEX(dchild->d_inode); - rc = mds_join_file(rec, req, dchild, lockh); - if (rc) - RETURN(rc); - LOCK_INODE_MUTEX(dchild->d_inode); - } - if (!(body->valid & OBD_MD_FLEASIZE) && - !(body->valid & OBD_MD_FLMODEASIZE)) { - /* no EA: create objects */ - rc = mds_create_objects(req, DLM_REPLY_REC_OFF + 1, rec, - mds, obd, dchild, handle, &lmm); - if (rc) { - CERROR("mds_create_objects: rc = %d\n", rc); - UNLOCK_INODE_MUTEX(dchild->d_inode); - RETURN(rc); - } - } - } - /* If the inode has no EA data, then MDS holds size, mtime */ - if (S_ISREG(dchild->d_inode->i_mode) && - !(body->valid & OBD_MD_FLEASIZE)) { - body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME); - } - UNLOCK_INODE_MUTEX(dchild->d_inode); - - if (rec && !(rec->ur_flags & MDS_OPEN_JOIN_FILE)) - lustre_shrink_reply(req, DLM_REPLY_REC_OFF + 1, - body->eadatasize, 0); - - if (req->rq_export->exp_connect_flags & OBD_CONNECT_ACL && - rec && !(rec->ur_flags & MDS_OPEN_JOIN_FILE)) { - int acl_off = DLM_REPLY_REC_OFF + (body->eadatasize ? 2 : 1); - - rc = mds_pack_acl(&req->rq_export->exp_mds_data, - dchild->d_inode, req->rq_repmsg, - body, acl_off); - lustre_shrink_reply(req, acl_off, body->aclsize, 0); - if (rc) - RETURN(rc); - } - - intent_set_disposition(rep, DISP_OPEN_OPEN); - mfd = mds_dentry_open(dchild, mds->mds_vfsmnt, flags, req); - if (IS_ERR(mfd)) - RETURN(PTR_ERR(mfd)); - - CDEBUG(D_INODE, "mfd %p, cookie "LPX64"\n", mfd, - mfd->mfd_handle.h_cookie); - - mds_lov_update_objids(obd, lmm); - - if (rc) /* coverity[deadcode] */ - mds_mfd_unlink(mfd, 1); - - mds_mfd_put(mfd); - RETURN(rc); -} - -static int mds_open_by_fid(struct ptlrpc_request *req, struct ll_fid *fid, - struct mds_body *body, int flags, - struct mds_update_record *rec,struct ldlm_reply *rep) -{ - struct mds_obd *mds = mds_req2mds(req); - struct dentry *dchild; - char fidname[LL_FID_NAMELEN]; - int fidlen = 0, rc; - void *handle = NULL; - ENTRY; - - fidlen = ll_fid2str(fidname, fid->id, fid->generation); - dchild = ll_lookup_one_len(fidname, mds->mds_pending_dir, fidlen); - if (IS_ERR(dchild)) { - rc = PTR_ERR(dchild); - CERROR("error looking up %s in PENDING: rc = %d\n",fidname, rc); - RETURN(rc); - } - - if (dchild->d_inode != NULL) { - mds_inode_set_orphan(dchild->d_inode); - CWARN("Orphan %s found and opened in PENDING directory\n", - fidname); - } else { - l_dput(dchild); - - /* We didn't find it in PENDING so it isn't an orphan. See - * if it was a regular inode that was previously created. */ - dchild = mds_fid2dentry(mds, fid, NULL); - if (IS_ERR(dchild)) - RETURN(PTR_ERR(dchild)); - } - - mds_pack_inode2fid(&body->fid1, dchild->d_inode); - mds_pack_inode2body(body, dchild->d_inode); - intent_set_disposition(rep, DISP_LOOKUP_EXECD); - intent_set_disposition(rep, DISP_LOOKUP_POS); - - rc = mds_finish_open(req, dchild, body, flags, &handle, rec, rep, NULL); - rc = mds_finish_transno(mds, dchild->d_inode, handle, - req, rc, rep ? rep->lock_policy_res1 : 0, 0); - /* XXX what do we do here if mds_finish_transno itself failed? */ - - l_dput(dchild); - RETURN(rc); -} - -int mds_pin(struct ptlrpc_request *req, int offset) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_body *reqbody, *repbody; - struct lvfs_run_ctxt saved; - int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) }; - ENTRY; - - reqbody = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*reqbody)); - - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - RETURN(rc); - - repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*repbody)); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = mds_open_by_fid(req, &reqbody->fid1, repbody, reqbody->flags, NULL, - NULL); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - RETURN(rc); -} - -/* Get an internal lock on the inode number (but not generation) to sync - * new inode creation with inode unlink (bug 2029). If child_lockh is NULL - * we just get the lock as a barrier to wait for other holders of this lock, - * and drop it right away again. */ -int mds_lock_new_child(struct obd_device *obd, struct inode *inode, - struct lustre_handle *child_lockh) -{ - struct ldlm_res_id child_res_id = { .name = { inode->i_ino, 0, 1, 0 } }; - struct lustre_handle lockh; - int lock_flags = LDLM_FL_ATOMIC_CB; - int rc; - - if (child_lockh == NULL) - child_lockh = &lockh; - - rc = ldlm_cli_enqueue_local(obd->obd_namespace, &child_res_id, - LDLM_PLAIN, NULL, LCK_EX, &lock_flags, - ldlm_blocking_ast, ldlm_completion_ast, - NULL, NULL, 0, NULL, child_lockh); - if (rc != ELDLM_OK) - CERROR("ldlm_cli_enqueue_local: %d\n", rc); - else if (child_lockh == &lockh) - ldlm_lock_decref(child_lockh, LCK_EX); - - RETURN(rc); -} - -int mds_open(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, struct lustre_handle *child_lockh) -{ - /* XXX ALLOCATE _something_ - 464 bytes on stack here */ - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_obd *mds = mds_req2mds(req); - struct ldlm_reply *rep = NULL; - struct mds_body *body = NULL; - struct dentry *dchild = NULL, *dparent = NULL; - struct mds_export_data *med; - struct lustre_handle parent_lockh; - int rc = 0, cleanup_phase = 0, acc_mode, created = 0; - int parent_mode = LCK_CR; - void *handle = NULL; - struct lvfs_dentry_params dp = LVFS_DENTRY_PARAMS_INIT; - unsigned int qcids[MAXQUOTAS] = { current->fsuid, current->fsgid }; - unsigned int qpids[MAXQUOTAS] = { 0, 0 }; - int child_mode = LCK_CR; - /* Always returning LOOKUP lock if open succesful to guard - dentry on client. */ - ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_LOOKUP}}; - struct ldlm_res_id child_res_id = { .name = {0}}; - int lock_flags = 0; - int rec_pending = 0; - unsigned int gid = current->fsgid; - ENTRY; - - mds_counter_incr(req->rq_export, LPROC_MDS_OPEN); - - OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_PAUSE_OPEN | OBD_FAIL_ONCE, - (obd_timeout + 1) / 4); - - CLASSERT(MAXQUOTAS < 4); - if (offset == DLM_INTENT_REC_OFF) { /* intent */ - rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, - sizeof(*rep)); - body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, - sizeof(*body)); - } else if (offset == REQ_REC_OFF) { /* non-intent reint */ - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LBUG(); /* XXX: not supported yet? */ - } else { - body = NULL; - LBUG(); - } - - MDS_CHECK_RESENT(req, reconstruct_open(rec, offset, req, child_lockh)); - - /* Step 0: If we are passed a fid, then we assume the client already - * opened this file and is only replaying the RPC, so we open the - * inode by fid (at some large expense in security). */ - /*XXX liblustre use mds_open_by_fid to implement LL_IOC_LOV_SETSTRIPE */ - if (((lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) || - (req->rq_export->exp_libclient && rec->ur_flags&MDS_OPEN_HAS_EA))&& - !(rec->ur_flags & MDS_OPEN_JOIN_FILE)) { - if (rec->ur_fid2->id == 0) { - struct ldlm_lock *lock = ldlm_handle2lock(child_lockh); - if (lock) { - LDLM_ERROR(lock, "fid2 not set on open replay"); - LDLM_LOCK_PUT(lock); - } - DEBUG_REQ(D_ERROR, req, "fid2 not set on open replay"); - RETURN(-EFAULT); - } - - rc = mds_open_by_fid(req, rec->ur_fid2, body, rec->ur_flags, - rec, rep); - if (rc != -ENOENT) { - if (req->rq_export->exp_libclient && - rec->ur_flags & MDS_OPEN_HAS_EA) - RETURN(0); - - RETURN(rc); - } - - /* We didn't find the correct inode on disk either, so we - * need to re-create it via a regular replay. */ - if (!(rec->ur_flags & MDS_OPEN_CREAT)) { - DEBUG_REQ(D_ERROR, req,"OPEN_CREAT not in open replay"); - RETURN(-EFAULT); - } - } else if (rec->ur_fid2->id) { - DEBUG_REQ(D_ERROR, req, "fid2 "LPU64"/%u on open non-replay", - rec->ur_fid2->id, rec->ur_fid2->generation); - RETURN(-EFAULT); - } - - /* If we got here, we must be called via intent */ - LASSERT(offset == DLM_INTENT_REC_OFF); - - med = &req->rq_export->exp_mds_data; - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OPEN_PACK)) { - CERROR("test case OBD_FAIL_MDS_OPEN_PACK\n"); - RETURN(-ENOMEM); - } - - /* Step 1: Find and lock the parent */ - if (rec->ur_flags & (MDS_OPEN_CREAT | MDS_OPEN_JOIN_FILE)) - parent_mode = LCK_EX; - dparent = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, parent_mode, - &parent_lockh, rec->ur_name, - rec->ur_namelen - 1, - MDS_INODELOCK_UPDATE); - if (IS_ERR(dparent)) { - rc = PTR_ERR(dparent); - if (rc != -ENOENT) { - CERROR("parent "LPU64"/%u lookup error %d\n", - rec->ur_fid1->id, rec->ur_fid1->generation, rc); - } else { - /* Just cannot find parent - make it look like - * usual negative lookup to avoid extra MDS RPC */ - intent_set_disposition(rep, DISP_LOOKUP_EXECD); - intent_set_disposition(rep, DISP_LOOKUP_NEG); - } - GOTO(cleanup, rc); - } - LASSERT(dparent->d_inode != NULL); - - cleanup_phase = 1; /* parent dentry and lock */ - - if (rec->ur_flags & MDS_OPEN_JOIN_FILE) { - dchild = dget(dparent); - cleanup_phase = 2; /* child dentry */ - acc_mode = accmode(dchild->d_inode, rec->ur_flags); - GOTO(found_child, rc); - } - - /* Step 2: Lookup the child */ - - if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) && - (rec->ur_flags & MDS_OPEN_LOCK) && (rec->ur_namelen == 1)) { - /* hack for nfsd with no_subtree_check, it will use anon - * dentry w/o filename to open the file. the anon dentry's - * parent was set to itself, so rec->ur_fid1 is the file. - * And in MDC it cannot derive the dentry's parent dentry, - * hence the file's name, so we hack here in MDS, - * refer to bug 13030. */ - dchild = mds_fid2dentry(mds, rec->ur_fid1, NULL); - } else { - dchild = ll_lookup_one_len(rec->ur_name, dparent, - rec->ur_namelen - 1); - } - if (IS_ERR(dchild)) { - rc = PTR_ERR(dchild); - dchild = NULL; /* don't confuse mds_finish_transno() below */ - GOTO(cleanup, rc); - } - - cleanup_phase = 2; /* child dentry */ - - intent_set_disposition(rep, DISP_LOOKUP_EXECD); - if (dchild->d_inode) - intent_set_disposition(rep, DISP_LOOKUP_POS); - else - intent_set_disposition(rep, DISP_LOOKUP_NEG); - - /*Step 3: If the child was negative, and we're supposed to, create it.*/ - if (dchild->d_inode == NULL) { - unsigned long ino = rec->ur_fid2->id; - struct iattr iattr; - struct inode *inode; - - if (!(rec->ur_flags & MDS_OPEN_CREAT)) { - /* It's negative and we weren't supposed to create it */ - GOTO(cleanup, rc = -ENOENT); - } - - if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) - GOTO(cleanup, rc = -EROFS); - - if (dparent->d_inode->i_mode & S_ISGID) - gid = dparent->d_inode->i_gid; - else - gid = current->fsgid; - - /* we try to get enough quota to write here, and let ldiskfs - * decide if it is out of quota or not b=14783 */ - lquota_chkquota(mds_quota_interface_ref, obd, - current->fsuid, gid, 1, &rec_pending); - - intent_set_disposition(rep, DISP_OPEN_CREATE); - handle = fsfilt_start(obd, dparent->d_inode, FSFILT_OP_CREATE, - NULL); - if (IS_ERR(handle)) { - rc = PTR_ERR(handle); - handle = NULL; - GOTO(cleanup, rc); - } - dchild->d_fsdata = (void *) &dp; - dp.ldp_ptr = req; - dp.ldp_inum = ino; - - rc = ll_vfs_create(dparent->d_inode, dchild, rec->ur_mode,NULL); - if (dchild->d_fsdata == (void *)(unsigned long)ino) - dchild->d_fsdata = NULL; - - if (rc) { - CDEBUG(D_INODE, "error during create: %d\n", rc); - GOTO(cleanup, rc); - } - inode = dchild->d_inode; - if (ino) { - LASSERT(ino == inode->i_ino); - /* Written as part of setattr */ - inode->i_generation = rec->ur_fid2->generation; - CDEBUG(D_HA, "recreated ino %lu with gen %u\n", - inode->i_ino, inode->i_generation); - } - - created = 1; - LTIME_S(iattr.ia_atime) = rec->ur_time; - LTIME_S(iattr.ia_ctime) = rec->ur_time; - LTIME_S(iattr.ia_mtime) = rec->ur_time; - - iattr.ia_uid = current->fsuid; /* set by push_ctxt already */ - iattr.ia_gid = gid; - - iattr.ia_valid = ATTR_UID | ATTR_GID | ATTR_ATIME | - ATTR_MTIME | ATTR_CTIME; - - rc = fsfilt_setattr(obd, dchild, handle, &iattr, 0); - if (rc) - CERROR("error on child setattr: rc = %d\n", rc); - - iattr.ia_valid = ATTR_MTIME | ATTR_CTIME; - - rc = fsfilt_setattr(obd, dparent, handle, &iattr, 0); - if (rc) - CERROR("error on parent setattr: rc = %d\n", rc); - - rc = fsfilt_commit(obd, dchild->d_inode, handle, 0); - handle = NULL; - acc_mode = 0; /* Don't check for permissions */ - } else { - acc_mode = accmode(dchild->d_inode, rec->ur_flags); - } - - LASSERTF(!mds_inode_is_orphan(dchild->d_inode), - "dchild %.*s (%p) inode %p/%lu/%u\n", dchild->d_name.len, - dchild->d_name.name, dchild, dchild->d_inode, - dchild->d_inode->i_ino, dchild->d_inode->i_generation); - -found_child: - mds_pack_inode2fid(&body->fid1, dchild->d_inode); - mds_pack_inode2body(body, dchild->d_inode); - - if (S_ISREG(dchild->d_inode->i_mode)) { - /* Check permissions etc */ - rc = ll_permission(dchild->d_inode, acc_mode, NULL); - if (rc != 0) - GOTO(cleanup, rc); - - if ((req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) && - (acc_mode & MAY_WRITE)) - GOTO(cleanup, rc = -EROFS); - - /* An append-only file must be opened in append mode for - * writing */ - if (IS_APPEND(dchild->d_inode) && (acc_mode & MAY_WRITE) != 0 && - ((rec->ur_flags & MDS_OPEN_APPEND) == 0 || - (rec->ur_flags & MDS_OPEN_TRUNC) != 0)) - GOTO(cleanup, rc = -EPERM); - } - - if (!created && (rec->ur_flags & MDS_OPEN_CREAT) && - (rec->ur_flags & MDS_OPEN_EXCL)) { - /* File already exists, we didn't just create it, and we - * were passed O_EXCL; err-or. */ - GOTO(cleanup, rc = -EEXIST); // returns a lock to the client - } - - /* if we are following a symlink, don't open */ - if (S_ISLNK(dchild->d_inode->i_mode)) - GOTO(cleanup_no_trans, rc = 0); - - if (S_ISDIR(dchild->d_inode->i_mode)) { - if (rec->ur_flags & MDS_OPEN_CREAT || - rec->ur_flags & FMODE_WRITE) { - /* we are trying to create or write a exist dir */ - GOTO(cleanup, rc = -EISDIR); - } - if (rec->ur_flags & MDS_FMODE_EXEC) { - /* we are trying to exec a directory */ - GOTO(cleanup, rc = -EACCES); - } - if (ll_permission(dchild->d_inode, acc_mode, NULL)) { - intent_set_disposition(rep, DISP_OPEN_OPEN); - GOTO(cleanup, rc = -EACCES); - } - } else if (rec->ur_flags & MDS_OPEN_DIRECTORY) { - GOTO(cleanup, rc = -ENOTDIR); - } - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OPEN_CREATE)) { - obd_fail_loc = OBD_FAIL_LDLM_REPLY | OBD_FAIL_ONCE; - GOTO(cleanup, rc = -EAGAIN); - } - - /* Obtain OPEN lock as well */ - policy.l_inodebits.bits |= MDS_INODELOCK_OPEN; - - /* We cannot use acc_mode here, because it is zeroed in case of - creating a file, so we get wrong lockmode */ - if (rec->ur_flags & FMODE_WRITE) - child_mode = LCK_CW; - else if (rec->ur_flags & MDS_FMODE_EXEC) - child_mode = LCK_PR; - else - child_mode = LCK_CR; - - if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) && - (rec->ur_flags & MDS_OPEN_LOCK)) { - /* In case of replay we do not get a lock assuming that the - caller has it already */ - child_res_id.name[0] = dchild->d_inode->i_ino; - child_res_id.name[1] = dchild->d_inode->i_generation; - - rc = ldlm_cli_enqueue_local(obd->obd_namespace, &child_res_id, - LDLM_IBITS, &policy, child_mode, - &lock_flags, ldlm_blocking_ast, - ldlm_completion_ast, NULL, NULL, - 0, NULL, child_lockh); - if (rc != ELDLM_OK) - GOTO(cleanup, rc); - - /* Let mds_intent_policy know that we have a lock to return */ - intent_set_disposition(rep, DISP_OPEN_LOCK); - cleanup_phase = 3; - } - - if (!S_ISREG(dchild->d_inode->i_mode) && - !S_ISDIR(dchild->d_inode->i_mode) && - (req->rq_export->exp_connect_flags & OBD_CONNECT_NODEVOH)) { - /* If client supports this, do not return open handle for - * special device nodes */ - GOTO(cleanup_no_trans, rc = 0); - } - - /* Step 5: mds_open it */ - rc = mds_finish_open(req, dchild, body, rec->ur_flags, &handle, rec, - rep, &parent_lockh); - GOTO(cleanup, rc); - - cleanup: - rc = mds_finish_transno(mds, dchild ? dchild->d_inode : NULL, handle, - req, rc, rep ? rep->lock_policy_res1 : 0, 0); - - cleanup_no_trans: - if (rec_pending) - lquota_pending_commit(mds_quota_interface_ref, obd, - current->fsuid, gid, 1); - switch (cleanup_phase) { - case 3: - if (rc) - /* It is safe to leave IT_OPEN_LOCK set, if rc is not 0, - * mds_intent_policy won't try to return any locks */ - ldlm_lock_decref(child_lockh, child_mode); - case 2: - if (rc && created) { - int err = vfs_unlink(dparent->d_inode, dchild); - if (err) { - CERROR("unlink(%.*s) in error path: %d\n", - dchild->d_name.len, dchild->d_name.name, - err); - } - } else if (created) { - mds_lock_new_child(obd, dchild->d_inode, NULL); - /* save uid/gid for quota acquire/release */ - qpids[USRQUOTA] = dparent->d_inode->i_uid; - qpids[GRPQUOTA] = dparent->d_inode->i_gid; - } - l_dput(dchild); - case 1: - if (dparent == NULL) - break; - - l_dput(dparent); - if (rc) - ldlm_lock_decref(&parent_lockh, parent_mode); - else - ptlrpc_save_lock(req, &parent_lockh, parent_mode); - } - /* trigger dqacq on the owner of child and parent */ - lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc, - FSFILT_OP_CREATE); - RETURN(rc); -} - -/* Close a "file descriptor" and possibly unlink an orphan from the - * PENDING directory. Caller must hold child->i_mutex, this drops it. - * - * If we are being called from mds_disconnect() because the client has - * disappeared, then req == NULL and we do not update last_rcvd because - * there is nothing that could be recovered by the client at this stage - * (it will not even _have_ an entry in last_rcvd anymore). - * - * Returns EAGAIN if the client needs to get more data and re-close. */ -int mds_mfd_close(struct ptlrpc_request *req, int offset, - struct obd_device *obd, struct mds_file_data *mfd, - int unlink_orphan, struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, int cookies_size, - __u64 *valid) -{ - struct inode *inode = mfd->mfd_dentry->d_inode; - char fidname[LL_FID_NAMELEN]; - int last_orphan, fidlen, rc = 0, cleanup_phase = 0; - struct dentry *pending_child = NULL; - struct mds_obd *mds = &obd->u.mds; - struct inode *pending_dir = mds->mds_pending_dir->d_inode; - void *handle = NULL; - struct mds_body *request_body = NULL, *reply_body = NULL; - struct lvfs_dentry_params dp = LVFS_DENTRY_PARAMS_INIT; - struct iattr iattr = { 0 }; - ENTRY; - - if (req && req->rq_reqmsg != NULL) - request_body = lustre_msg_buf(req->rq_reqmsg, offset, - sizeof(*request_body)); - if (req && req->rq_repmsg != NULL) - reply_body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*reply_body)); - - fidlen = ll_fid2str(fidname, inode->i_ino, inode->i_generation); - - CDEBUG(D_INODE, "inode %p ino %s nlink %d orphan %d\n", inode, fidname, - inode->i_nlink, mds_orphan_open_count(inode)); - - last_orphan = mds_orphan_open_dec_test(inode) && - mds_inode_is_orphan(inode); - MDS_UP_WRITE_ORPHAN_SEM(inode); - - /* this is half of the actual "close" */ - if (mfd->mfd_mode & FMODE_WRITE) { - rc = mds_put_write_access(mds, inode, request_body, - last_orphan && unlink_orphan); - } else if (mfd->mfd_mode & MDS_FMODE_EXEC) { - mds_allow_write_access(inode); - } - - if (last_orphan && unlink_orphan) { - int stripe_count = 0; - LASSERT(rc == 0); /* mds_put_write_access must have succeeded */ - - CDEBUG(D_INODE, "destroying orphan object %s\n", fidname); - - if ((S_ISREG(inode->i_mode) && inode->i_nlink != 1) || - (S_ISDIR(inode->i_mode) && inode->i_nlink != 2)) - CERROR("found \"orphan\" %s %s with link count %d\n", - S_ISREG(inode->i_mode) ? "file" : "dir", - fidname, inode->i_nlink); - - /* Sadly, there is no easy way to save pending_child from - * mds_reint_unlink() into mfd, so we need to re-lookup, - * but normally it will still be in the dcache. */ - LOCK_INODE_MUTEX(pending_dir); - cleanup_phase = 1; /* UNLOCK_INODE_MUTEX(pending_dir) when finished */ - pending_child = lookup_one_len(fidname, mds->mds_pending_dir, - fidlen); - if (IS_ERR(pending_child)) - GOTO(cleanup, rc = PTR_ERR(pending_child)); - LASSERT(pending_child->d_inode != NULL); - - cleanup_phase = 2; /* dput(pending_child) when finished */ - if (S_ISDIR(pending_child->d_inode->i_mode)) { - rc = vfs_rmdir(pending_dir, pending_child); - if (rc) - CERROR("error unlinking orphan dir %s: rc %d\n", - fidname,rc); - goto out; - } - - if (lmm != NULL) { - stripe_count = le32_to_cpu(lmm->lmm_stripe_count); - } - - handle = fsfilt_start_log(obd, pending_dir, FSFILT_OP_UNLINK, - NULL, stripe_count); - if (IS_ERR(handle)) { - rc = PTR_ERR(handle); - handle = NULL; - GOTO(cleanup, rc); - } - if (lmm != NULL && (*valid & OBD_MD_FLEASIZE) && - mds_log_op_unlink(obd, lmm, lmm_size, - logcookies, cookies_size) > 0) { - *valid |= OBD_MD_FLCOOKIE; - } - - dp.ldp_inum = 0; - dp.ldp_ptr = req; - pending_child->d_fsdata = (void *) &dp; - rc = vfs_unlink(pending_dir, pending_child); - if (rc) - CERROR("error unlinking orphan %s: rc %d\n",fidname,rc); - - goto out; /* Don't bother updating attrs on unlinked inode */ - } - -#if 0 - if (request_body != NULL && mfd->mfd_mode & FMODE_WRITE && rc == 0) { - /* Update the on-disk attributes if this was the last write - * close, and all information was provided (i.e., rc == 0) - * - * XXX this should probably be abstracted with mds_reint_setattr - */ - - if (request_body->valid & OBD_MD_FLMTIME && - LTIME_S(iattr.ia_mtime) > LTIME_S(inode->i_mtime)) { - LTIME_S(iattr.ia_mtime) = request_body->mtime; - iattr.ia_valid |= ATTR_MTIME; - } - if (request_body->valid & OBD_MD_FLCTIME && - LTIME_S(iattr.ia_ctime) > LTIME_S(inode->i_ctime)) { - LTIME_S(iattr.ia_ctime) = request_body->ctime; - iattr.ia_valid |= ATTR_CTIME; - } - - /* XXX can't set block count with fsfilt_setattr (!) */ - if (request_body->valid & OBD_MD_FLSIZE) { - iattr.ia_valid |= ATTR_SIZE; - iattr.ia_size = request_body->size; - } - /* iattr.ia_blocks = request_body->blocks */ - - } -#endif - if (request_body != NULL && request_body->valid & OBD_MD_FLATIME) { - /* Only start a transaction to write out only the atime if - * it is more out-of-date than the specified limit. If we - * are already going to write out the atime then do it anyway. - * */ - LTIME_S(iattr.ia_atime) = request_body->atime; - if ((LTIME_S(iattr.ia_atime) > - LTIME_S(inode->i_atime) + mds->mds_atime_diff) || - (iattr.ia_valid != 0 && - LTIME_S(iattr.ia_atime) > LTIME_S(inode->i_atime))) - iattr.ia_valid |= ATTR_ATIME; - } - - if (iattr.ia_valid != 0) { - handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL); - if (IS_ERR(handle)) { - rc = PTR_ERR(handle); - handle = NULL; - GOTO(cleanup, rc); - } - rc = fsfilt_setattr(obd, mfd->mfd_dentry, handle, &iattr, 0); - if (rc) - CERROR("error in setattr(%s): rc %d\n", fidname, rc); - } -out: - /* If other clients have this file open for write, rc will be > 0 */ - if (rc > 0) - rc = 0; - l_dput(mfd->mfd_dentry); - mds_mfd_put(mfd); - - cleanup: - if (req != NULL && reply_body != NULL) { - rc = mds_finish_transno(mds, pending_dir, handle, req, rc, 0, 0); - } else if (handle) { - int err = fsfilt_commit(obd, pending_dir, handle, 0); - if (err) { - CERROR("error committing close: %d\n", err); - if (!rc) - rc = err; - } - } - - switch (cleanup_phase) { - case 2: - dput(pending_child); - case 1: - UNLOCK_INODE_MUTEX(pending_dir); - } - RETURN(rc); -} - -int mds_close(struct ptlrpc_request *req, int offset) -{ - struct mds_export_data *med = &req->rq_export->exp_mds_data; - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_body *body; - struct mds_file_data *mfd; - struct lvfs_run_ctxt saved; - struct inode *inode; - int rc, repsize[4] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_body), - obd->u.mds.mds_max_mdsize, - obd->u.mds.mds_max_cookiesize }; - struct mds_body *reply_body; - struct lov_mds_md *lmm; - int lmm_size; - struct llog_cookie *logcookies; - int cookies_size; - ENTRY; - - rc = lustre_pack_reply(req, 4, repsize, NULL); - if (rc) - req->rq_status = rc; - /* continue on to drop local open even if we can't send reply */ - else - MDS_CHECK_RESENT(req, mds_reconstruct_generic(req)); - - CDEBUG(D_INODE, "close req->rep_len %d mdsize %d cookiesize %d\n", - req->rq_replen, - obd->u.mds.mds_max_mdsize, obd->u.mds.mds_max_cookiesize); - mds_counter_incr(req->rq_export, LPROC_MDS_CLOSE); - - body = lustre_swab_reqbuf(req, offset, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR("Can't unpack body\n"); - req->rq_status = -EFAULT; - RETURN(-EFAULT); - } - - if (body->flags & MDS_BFLAG_UNCOMMITTED_WRITES) - /* do some stuff */ ; - - spin_lock(&med->med_open_lock); - mfd = mds_handle2mfd(&body->handle); - if (mfd == NULL) { - spin_unlock(&med->med_open_lock); - DEBUG_REQ(D_ERROR, req, "no handle for file close ino "LPD64 - ": cookie "LPX64, body->fid1.id, body->handle.cookie); - req->rq_status = -ESTALE; - RETURN(-ESTALE); - } - /* Remove mfd handle so it can't be found again. We consume mfd_list - * reference here, but still have mds_handle2mfd ref until mfd_close. */ - mds_mfd_unlink(mfd, 1); - spin_unlock(&med->med_open_lock); - - inode = mfd->mfd_dentry->d_inode; - /* child orphan sem protects orphan_dec_test && is_orphan race */ - MDS_DOWN_WRITE_ORPHAN_SEM(inode); /* mds_mfd_close drops this */ - if (mds_inode_is_orphan(inode) && mds_orphan_open_count(inode) == 1) { - body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); - - mds_pack_inode2fid(&body->fid1, inode); - mds_pack_inode2body(body, inode); - mds_pack_md(obd, req->rq_repmsg, REPLY_REC_OFF + 1, body, inode, - MDS_PACK_MD_LOCK, 0); - } - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - reply_body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*reply_body)); - lmm = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, 0); - lmm_size = lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 1), - logcookies = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 2, 0); - cookies_size = lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 2); - req->rq_status = mds_mfd_close(req, offset, obd, mfd, 1, - lmm, lmm_size, logcookies, cookies_size, - &reply_body->valid); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - mds_shrink_reply(obd, req, body, REPLY_REC_OFF + 1); - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_CLOSE_PACK)) { - CERROR("test case OBD_FAIL_MDS_CLOSE_PACK\n"); - req->rq_status = -ENOMEM; - RETURN(-ENOMEM); - } - - RETURN(rc); -} - -int mds_done_writing(struct ptlrpc_request *req, int offset) -{ - struct mds_body *body; - int rc, size[2] = { sizeof(struct ptlrpc_body), - sizeof(struct mds_body) }; - ENTRY; - - MDS_CHECK_RESENT(req, mds_reconstruct_generic(req)); - - body = lustre_swab_reqbuf(req, offset, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR("Can't unpack body\n"); - req->rq_status = -EFAULT; - RETURN(-EFAULT); - } - - rc = lustre_pack_reply(req, 2, size, NULL); - if (rc) - req->rq_status = rc; - - RETURN(0); -} diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c deleted file mode 100644 index f366f1282d..0000000000 --- a/lustre/mds/mds_reint.c +++ /dev/null @@ -1,2417 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * linux/mds/mds_reint.c - * Lustre Metadata Server (mds) reintegration routines - * - * Copyright (C) 2002-2005 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Andreas Dilger <adilger@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDS - -#include <linux/fs.h> -#include <obd_support.h> -#include <obd_class.h> -#include <obd.h> -#include <lustre_lib.h> -#include <lustre/lustre_idl.h> -#include <lustre_mds.h> -#include <lustre_dlm.h> -#include <lustre_fsfilt.h> -#include <lustre_ucache.h> - -#include "mds_internal.h" - -void mds_commit_cb(struct obd_device *obd, __u64 transno, void *data, - int error) -{ - obd_transno_commit_cb(obd, transno, error); -} - -struct mds_logcancel_data { - struct lov_mds_md *mlcd_lmm; - int mlcd_size; - int mlcd_cookielen; - int mlcd_eadatalen; - struct llog_cookie mlcd_cookies[0]; -}; - - -static void mds_cancel_cookies_cb(struct obd_device *obd, __u64 transno, - void *cb_data, int error) -{ - struct mds_logcancel_data *mlcd = cb_data; - struct lov_stripe_md *lsm = NULL; - struct llog_ctxt *ctxt; - int rc; - - obd_transno_commit_cb(obd, transno, error); - - CDEBUG(D_RPCTRACE, "cancelling %d cookies\n", - (int)(mlcd->mlcd_cookielen / sizeof(*mlcd->mlcd_cookies))); - - rc = obd_unpackmd(obd->u.mds.mds_osc_exp, &lsm, mlcd->mlcd_lmm, - mlcd->mlcd_eadatalen); - if (rc < 0) { - CERROR("bad LSM cancelling %d log cookies: rc %d\n", - (int)(mlcd->mlcd_cookielen/sizeof(*mlcd->mlcd_cookies)), - rc); - } else { - ///* XXX 0 normally, SENDNOW for debug */); - rc = obd_checkmd(obd->u.mds.mds_osc_exp, obd->obd_self_export, - lsm); - if (rc) - CERROR("Can not revalidate lsm %p \n", lsm); - - ctxt = llog_get_context(obd,mlcd->mlcd_cookies[0].lgc_subsys+1); - rc = llog_cancel(ctxt, lsm, mlcd->mlcd_cookielen / - sizeof(*mlcd->mlcd_cookies), - mlcd->mlcd_cookies, OBD_LLOG_FL_SENDNOW); - llog_ctxt_put(ctxt); - - if (rc) - CERROR("error cancelling %d log cookies: rc %d\n", - (int)(mlcd->mlcd_cookielen / - sizeof(*mlcd->mlcd_cookies)), rc); - } - - OBD_FREE(mlcd, mlcd->mlcd_size); -} - -/* Assumes caller has already pushed us into the kernel context. */ -int mds_finish_transno(struct mds_obd *mds, struct inode *inode, void *handle, - struct ptlrpc_request *req, int rc, __u32 op_data, - int force_sync) -{ - struct mds_export_data *med = &req->rq_export->exp_mds_data; - struct mds_client_data *mcd = med->med_mcd; - struct obd_device *obd = req->rq_export->exp_obd; - __u64 transno, prev_transno; - int err; - loff_t off; - int log_pri = D_RPCTRACE; - ENTRY; - - if (IS_ERR(handle)) { - LASSERT(rc != 0); - RETURN(rc); - } - - /* if the export has already been failed, we have no last_rcvd slot */ - if (req->rq_export->exp_failed || obd->obd_fail) { - CWARN("commit transaction for disconnected client %s: rc %d\n", - req->rq_export->exp_client_uuid.uuid, rc); - if (rc == 0) - rc = -ENOTCONN; - if (handle) - GOTO(commit, rc); - RETURN(rc); - } - - if (handle == NULL) { - /* if we're starting our own xaction, use our own inode */ - inode = mds->mds_rcvd_filp->f_dentry->d_inode; - handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL); - if (IS_ERR(handle)) { - CERROR("fsfilt_start: %ld\n", PTR_ERR(handle)); - RETURN(PTR_ERR(handle)); - } - } - - off = med->med_lr_off; - - transno = lustre_msg_get_transno(req->rq_reqmsg); - if (rc != 0) { - if (transno != 0) { - CERROR("%s: replay %s transno "LPU64" failed: rc %d\n", - obd->obd_name, - libcfs_nid2str(req->rq_export->exp_connection->c_peer.nid), - transno, rc); - transno = 0; - } - } else if (transno == 0) { - spin_lock(&mds->mds_transno_lock); - transno = ++mds->mds_last_transno; - spin_unlock(&mds->mds_transno_lock); - } else { - spin_lock(&mds->mds_transno_lock); - if (transno > mds->mds_last_transno) - mds->mds_last_transno = transno; - spin_unlock(&mds->mds_transno_lock); - } - - req->rq_transno = transno; - lustre_msg_set_transno(req->rq_repmsg, transno); - if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_CLOSE) { - prev_transno = le64_to_cpu(mcd->mcd_last_close_transno); - mcd->mcd_last_close_transno = cpu_to_le64(transno); - mcd->mcd_last_close_xid = cpu_to_le64(req->rq_xid); - mcd->mcd_last_close_result = cpu_to_le32(rc); - mcd->mcd_last_close_data = cpu_to_le32(op_data); - } else { - prev_transno = le64_to_cpu(mcd->mcd_last_transno); - if (((lustre_msg_get_flags(req->rq_reqmsg) & - (MSG_RESENT | MSG_REPLAY)) == 0) || - (transno > prev_transno)) { - mcd->mcd_last_transno = cpu_to_le64(transno); - mcd->mcd_last_xid = cpu_to_le64(req->rq_xid); - mcd->mcd_last_result = cpu_to_le32(rc); - mcd->mcd_last_data = cpu_to_le32(op_data); - } - } - /* update the server data to not lose the greatest transno. Bug 11125 */ - if ((transno == 0) && (prev_transno == mds->mds_last_transno)) - mds_update_server_data(obd, 0); - - if (off <= 0) { - CERROR("client idx %d has offset %lld\n", med->med_lr_idx, off); - err = -EINVAL; - } else { - struct obd_export *exp = req->rq_export; - - if (!force_sync) - force_sync = fsfilt_add_journal_cb(exp->exp_obd,transno, - handle, mds_commit_cb, - NULL); - - err = fsfilt_write_record(obd, mds->mds_rcvd_filp, mcd, - sizeof(*mcd), &off, - force_sync | exp->exp_need_sync); - if (force_sync) - mds_commit_cb(obd, transno, NULL, err); - } - - if (err) { - log_pri = D_ERROR; - if (rc == 0) - rc = err; - } - - DEBUG_REQ(log_pri, req, - "wrote trans #"LPU64" rc %d client %s at idx %u: err = %d", - transno, rc, mcd->mcd_uuid, med->med_lr_idx, err); - - err = mds_lov_write_objids(obd); - if (err) { - log_pri = D_ERROR; - if (rc == 0) - rc = err; - } - CDEBUG(log_pri, "wrote objids: err = %d\n", err); - -commit: - err = fsfilt_commit(obd, inode, handle, 0); - if (err) { - CERROR("error committing transaction: %d\n", err); - if (!rc) - rc = err; - } - - RETURN(rc); -} - -/* this gives the same functionality as the code between - * sys_chmod and inode_setattr - * chown_common and inode_setattr - * utimes and inode_setattr - */ -int mds_fix_attr(struct inode *inode, struct mds_update_record *rec) -{ - time_t now = CURRENT_SECONDS; - struct iattr *attr = &rec->ur_iattr; - unsigned int ia_valid = attr->ia_valid; - int error; - ENTRY; - - if (ia_valid & ATTR_RAW) - attr->ia_valid &= ~ATTR_RAW; - - if (!(ia_valid & ATTR_CTIME_SET)) - LTIME_S(attr->ia_ctime) = now; - else - attr->ia_valid &= ~ATTR_CTIME_SET; - if (!(ia_valid & ATTR_ATIME_SET)) - LTIME_S(attr->ia_atime) = now; - if (!(ia_valid & ATTR_MTIME_SET)) - LTIME_S(attr->ia_mtime) = now; - - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - RETURN((attr->ia_valid & ~ATTR_ATTR_FLAG) ? -EPERM : 0); - - /* times */ - if ((ia_valid & (ATTR_MTIME|ATTR_ATIME)) == (ATTR_MTIME|ATTR_ATIME)) { - if (current->fsuid != inode->i_uid && - (error = ll_permission(inode, MAY_WRITE, NULL)) != 0) - RETURN(error); - } - - if (ia_valid & ATTR_SIZE && - /* NFSD hack for open(O_CREAT|O_TRUNC)=mknod+truncate (bug 5781) */ - !(rec->ur_uc.luc_fsuid == inode->i_uid && - ia_valid & MDS_OPEN_OWNEROVERRIDE)) { - if ((error = ll_permission(inode, MAY_WRITE, NULL)) != 0) - RETURN(error); - } - - if (ia_valid & (ATTR_UID | ATTR_GID)) { - /* chown */ - error = -EPERM; - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - RETURN(-EPERM); - if (attr->ia_uid == (uid_t) -1) - attr->ia_uid = inode->i_uid; - if (attr->ia_gid == (gid_t) -1) - attr->ia_gid = inode->i_gid; - if (!(ia_valid & ATTR_MODE)) - attr->ia_mode = inode->i_mode; - /* - * If the user or group of a non-directory has been - * changed by a non-root user, remove the setuid bit. - * 19981026 David C Niemi <niemi@tux.org> - * - * Changed this to apply to all users, including root, - * to avoid some races. This is the behavior we had in - * 2.0. The check for non-root was definitely wrong - * for 2.2 anyway, as it should have been using - * CAP_FSETID rather than fsuid -- 19990830 SD. - */ - if ((inode->i_mode & S_ISUID) == S_ISUID && - !S_ISDIR(inode->i_mode)) { - attr->ia_mode &= ~S_ISUID; - attr->ia_valid |= ATTR_MODE; - } - /* - * Likewise, if the user or group of a non-directory - * has been changed by a non-root user, remove the - * setgid bit UNLESS there is no group execute bit - * (this would be a file marked for mandatory - * locking). 19981026 David C Niemi <niemi@tux.org> - * - * Removed the fsuid check (see the comment above) -- - * 19990830 SD. - */ - if (((inode->i_mode & (S_ISGID | S_IXGRP)) == - (S_ISGID | S_IXGRP)) && !S_ISDIR(inode->i_mode)) { - attr->ia_mode &= ~S_ISGID; - attr->ia_valid |= ATTR_MODE; - } - } else if (ia_valid & ATTR_MODE) { - int mode = attr->ia_mode; - /* chmod */ - if (attr->ia_mode == (umode_t)-1) - mode = inode->i_mode; - attr->ia_mode = - (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); - } - RETURN(0); -} - -void mds_steal_ack_locks(struct ptlrpc_request *req) -{ - struct obd_export *exp = req->rq_export; - struct list_head *tmp; - struct ptlrpc_reply_state *oldrep; - struct ptlrpc_service *svc; - int i; - - /* CAVEAT EMPTOR: spinlock order */ - spin_lock(&exp->exp_lock); - list_for_each (tmp, &exp->exp_outstanding_replies) { - oldrep = list_entry(tmp, struct ptlrpc_reply_state,rs_exp_list); - - if (oldrep->rs_xid != req->rq_xid) - continue; - - if (lustre_msg_get_opc(oldrep->rs_msg) != - lustre_msg_get_opc(req->rq_reqmsg)) - CERROR ("Resent req xid "LPX64" has mismatched opc: " - "new %d old %d\n", req->rq_xid, - lustre_msg_get_opc(req->rq_reqmsg), - lustre_msg_get_opc(oldrep->rs_msg)); - - svc = oldrep->rs_service; - spin_lock (&svc->srv_lock); - - list_del_init (&oldrep->rs_exp_list); - - CWARN("Stealing %d locks from rs %p x"LPD64".t"LPD64 - " o%d NID %s\n", - oldrep->rs_nlocks, oldrep, - oldrep->rs_xid, oldrep->rs_transno, - lustre_msg_get_opc(oldrep->rs_msg), - libcfs_nid2str(exp->exp_connection->c_peer.nid)); - - for (i = 0; i < oldrep->rs_nlocks; i++) - ptlrpc_save_lock(req, - &oldrep->rs_locks[i], - oldrep->rs_modes[i]); - oldrep->rs_nlocks = 0; - - DEBUG_REQ(D_DLMTRACE, req, "stole locks for"); - ptlrpc_schedule_difficult_reply (oldrep); - - spin_unlock (&svc->srv_lock); - break; - } - spin_unlock(&exp->exp_lock); -} - -void mds_req_from_mcd(struct ptlrpc_request *req, struct mds_client_data *mcd) -{ - if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_CLOSE) { - req->rq_transno = le64_to_cpu(mcd->mcd_last_close_transno); - lustre_msg_set_transno(req->rq_repmsg, req->rq_transno); - req->rq_status = le32_to_cpu(mcd->mcd_last_close_result); - lustre_msg_set_status(req->rq_repmsg, req->rq_status); - } else { - req->rq_transno = le64_to_cpu(mcd->mcd_last_transno); - lustre_msg_set_transno(req->rq_repmsg, req->rq_transno); - req->rq_status = le32_to_cpu(mcd->mcd_last_result); - lustre_msg_set_status(req->rq_repmsg, req->rq_status); - } - DEBUG_REQ(D_RPCTRACE, req, "restoring transno "LPD64"/status %d", - req->rq_transno, req->rq_status); - - mds_steal_ack_locks(req); -} - -static void reconstruct_reint_setattr(struct mds_update_record *rec, - int offset, struct ptlrpc_request *req) -{ - struct mds_export_data *med = &req->rq_export->exp_mds_data; - struct mds_obd *obd = &req->rq_export->exp_obd->u.mds; - struct dentry *de; - struct mds_body *body; - - mds_req_from_mcd(req, med->med_mcd); - - de = mds_fid2dentry(obd, rec->ur_fid1, NULL); - if (IS_ERR(de)) { - LASSERT(PTR_ERR(de) == req->rq_status); - return; - } - - body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body)); - mds_pack_inode2fid(&body->fid1, de->d_inode); - mds_pack_inode2body(body, de->d_inode); - - /* Don't return OST-specific attributes if we didn't just set them */ - if (rec->ur_iattr.ia_valid & ATTR_SIZE) - body->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS; - if (rec->ur_iattr.ia_valid & (ATTR_MTIME | ATTR_MTIME_SET)) - body->valid |= OBD_MD_FLMTIME; - if (rec->ur_iattr.ia_valid & (ATTR_ATIME | ATTR_ATIME_SET)) - body->valid |= OBD_MD_FLATIME; - - l_dput(de); -} - -int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode, - struct lov_mds_md *lmm, int lmm_size, - struct llog_cookie *logcookies, struct ll_fid *fid) -{ - struct mds_obd *mds = &obd->u.mds; - struct obd_trans_info oti = { 0 }; - struct obd_info oinfo = { { { 0 } } }; - int rc; - ENTRY; - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OST_SETATTR)) - RETURN(0); - - /* first get memory EA */ - OBDO_ALLOC(oinfo.oi_oa); - if (!oinfo.oi_oa) - RETURN(-ENOMEM); - - LASSERT(lmm); - - rc = obd_unpackmd(mds->mds_osc_exp, &oinfo.oi_md, lmm, lmm_size); - if (rc < 0) { - CERROR("Error unpack md %p for inode %lu\n", lmm, inode->i_ino); - GOTO(out, rc); - } - - rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, oinfo.oi_md); - if (rc) { - CERROR("Error revalidate lsm %p \n", oinfo.oi_md); - GOTO(out, rc); - } - - /* then fill oa */ - obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLUID | OBD_MD_FLGID); - oinfo.oi_oa->o_valid |= OBD_MD_FLID; - oinfo.oi_oa->o_id = oinfo.oi_md->lsm_object_id; - if (logcookies) { - oinfo.oi_oa->o_valid |= OBD_MD_FLCOOKIE; - oti.oti_logcookies = logcookies; - } - - LASSERT(fid != NULL); - oinfo.oi_oa->o_fid = fid->id; - oinfo.oi_oa->o_generation = fid->generation; - oinfo.oi_oa->o_valid |= OBD_MD_FLFID | OBD_MD_FLGENER; - - /* do async setattr from mds to ost not waiting for responses. */ - rc = obd_setattr_async(mds->mds_osc_exp, &oinfo, &oti, NULL); - if (rc) - CDEBUG(D_INODE, "mds to ost setattr objid 0x"LPX64 - " on ost error %d\n", oinfo.oi_md->lsm_object_id, rc); -out: - if (oinfo.oi_md) - obd_free_memmd(mds->mds_osc_exp, &oinfo.oi_md); - OBDO_FREE(oinfo.oi_oa); - RETURN(rc); -} - -/* In the raw-setattr case, we lock the child inode. - * In the write-back case or if being called from open, the client holds a lock - * already. - * - * We use the ATTR_FROM_OPEN flag to tell these cases apart. */ -static int mds_reint_setattr(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, - struct lustre_handle *lh) -{ - unsigned int ia_valid = rec->ur_iattr.ia_valid; - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_body *body; - struct dentry *de; - struct inode *inode = NULL; - struct lustre_handle lockh; - void *handle = NULL; - struct mds_logcancel_data *mlcd = NULL; - struct lov_mds_md *lmm = NULL; - struct llog_cookie *logcookies = NULL; - int lmm_size = 0, need_lock = 1, cookie_size = 0; - int rc = 0, cleanup_phase = 0, err, locked = 0, sync = 0; - unsigned int qcids[MAXQUOTAS] = { 0, 0 }; - unsigned int qpids[MAXQUOTAS] = { rec->ur_iattr.ia_uid, - rec->ur_iattr.ia_gid }; - ENTRY; - - LASSERT(offset == REQ_REC_OFF); - offset = REPLY_REC_OFF; - - DEBUG_REQ(D_INODE, req, "setattr "LPU64"/%u %x", rec->ur_fid1->id, - rec->ur_fid1->generation, rec->ur_iattr.ia_valid); - OBD_COUNTER_INCREMENT(obd, setattr); - - MDS_CHECK_RESENT(req, reconstruct_reint_setattr(rec, offset, req)); - - if (rec->ur_dlm) - ldlm_request_cancel(req, rec->ur_dlm, 0); - - if (rec->ur_iattr.ia_valid & ATTR_FROM_OPEN || - (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY)) { - de = mds_fid2dentry(mds, rec->ur_fid1, NULL); - if (IS_ERR(de)) - GOTO(cleanup, rc = PTR_ERR(de)); - if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) - GOTO(cleanup, rc = -EROFS); - } else { - __u64 lockpart = MDS_INODELOCK_UPDATE; - if (rec->ur_iattr.ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) - lockpart |= MDS_INODELOCK_LOOKUP; - - de = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_EX, - &lockh, NULL, 0, lockpart); - if (IS_ERR(de)) - GOTO(cleanup, rc = PTR_ERR(de)); - locked = 1; - } - - cleanup_phase = 1; - inode = de->d_inode; - LASSERT(inode); - - if ((rec->ur_iattr.ia_valid & ATTR_FROM_OPEN) || - (rec->ur_iattr.ia_valid & ATTR_SIZE)) { - /* Check write access for the O_TRUNC case */ - if (mds_query_write_access(inode) < 0) - GOTO(cleanup, rc = -ETXTBSY); - } - - /* save uid/gid for quota acq/rel */ - qcids[USRQUOTA] = inode->i_uid; - qcids[GRPQUOTA] = inode->i_gid; - - if ((S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) && - rec->ur_eadata != NULL) { - LOCK_INODE_MUTEX(inode); - need_lock = 0; - } - - OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_SETATTR_WRITE, inode->i_sb); - - /* start a log jounal handle if needed */ - if (S_ISREG(inode->i_mode) && - rec->ur_iattr.ia_valid & (ATTR_UID | ATTR_GID)) { - lmm_size = mds->mds_max_mdsize; - OBD_ALLOC(lmm, lmm_size); - if (lmm == NULL) - GOTO(cleanup, rc = -ENOMEM); - - cleanup_phase = 2; - rc = mds_get_md(obd, inode, lmm, &lmm_size, need_lock, 0); - if (rc < 0) - GOTO(cleanup, rc); - rc = 0; - - handle = fsfilt_start_log(obd, inode, FSFILT_OP_SETATTR, NULL, - le32_to_cpu(lmm->lmm_stripe_count)); - } else { - handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL); - } - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - - if (rec->ur_iattr.ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu\n", - LTIME_S(rec->ur_iattr.ia_mtime), - LTIME_S(rec->ur_iattr.ia_ctime)); - rc = mds_fix_attr(inode, rec); - if (rc) - GOTO(cleanup, rc); - - if (rec->ur_iattr.ia_valid & ATTR_ATTR_FLAG) { /* ioctl */ - rc = fsfilt_iocontrol(obd, inode, NULL, EXT3_IOC_SETFLAGS, - (long)&rec->ur_flags); - } else if (rec->ur_iattr.ia_valid) { /* setattr */ - rc = fsfilt_setattr(obd, de, handle, &rec->ur_iattr, 0); - /* journal chown/chgrp in llog, just like unlink */ - if (rc == 0 && lmm_size){ - cookie_size = mds_get_cookie_size(obd, lmm); - OBD_ALLOC(logcookies, cookie_size); - if (logcookies == NULL) - GOTO(cleanup, rc = -ENOMEM); - - if (mds_log_op_setattr(obd, inode, lmm, lmm_size, - logcookies, cookie_size) <= 0) { - OBD_FREE(logcookies, cookie_size); - logcookies = NULL; - } - } - } - - if (rc == 0 && (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) && - rec->ur_eadata != NULL) { - struct lov_stripe_md *lsm = NULL; - struct lov_user_md *lum = NULL; - - rc = ll_permission(inode, MAY_WRITE, NULL); - if (rc < 0) - GOTO(cleanup, rc); - - lum = rec->ur_eadata; - /* if { size, offset, count } = { 0, -1, 0 } (i.e. all default - * values specified) then delete default striping from dir. */ - if (S_ISDIR(inode->i_mode) && - ((lum->lmm_stripe_size == 0 && - lum->lmm_stripe_offset == - (typeof(lum->lmm_stripe_offset))(-1) && - lum->lmm_stripe_count == 0) || - /* lmm_stripe_size == -1 is deprecated in 1.4.6 */ - lum->lmm_stripe_size == - (typeof(lum->lmm_stripe_size))(-1))){ - rc = fsfilt_set_md(obd, inode, handle, NULL, 0, "lov"); - if (rc) - GOTO(cleanup, rc); - } else { - rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE, - mds->mds_osc_exp, 0, - &lsm, rec->ur_eadata); - if (rc) - GOTO(cleanup, rc); - - obd_free_memmd(mds->mds_osc_exp, &lsm); - - rc = fsfilt_set_md(obd, inode, handle, rec->ur_eadata, - rec->ur_eadatalen, "lov"); - if (rc) - GOTO(cleanup, rc); - } - } - - body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body)); - mds_pack_inode2fid(&body->fid1, inode); - mds_pack_inode2body(body, inode); - - /* don't return OST-specific attributes if we didn't just set them. */ - if (ia_valid & ATTR_SIZE) - body->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS; - if (ia_valid & (ATTR_MTIME | ATTR_MTIME_SET)) - body->valid |= OBD_MD_FLMTIME; - if (ia_valid & (ATTR_ATIME | ATTR_ATIME_SET)) - body->valid |= OBD_MD_FLATIME; - - if (rc == 0 && rec->ur_cookielen && !IS_ERR(mds->mds_osc_obd)) { - OBD_ALLOC(mlcd, sizeof(*mlcd) + rec->ur_cookielen + - rec->ur_eadatalen); - if (mlcd) { - mlcd->mlcd_size = sizeof(*mlcd) + rec->ur_cookielen + - rec->ur_eadatalen; - mlcd->mlcd_eadatalen = rec->ur_eadatalen; - mlcd->mlcd_cookielen = rec->ur_cookielen; - mlcd->mlcd_lmm = (void *)&mlcd->mlcd_cookies + - mlcd->mlcd_cookielen; - memcpy(&mlcd->mlcd_cookies, rec->ur_logcookies, - mlcd->mlcd_cookielen); - memcpy(mlcd->mlcd_lmm, rec->ur_eadata, - mlcd->mlcd_eadatalen); - } else { - CERROR("unable to allocate log cancel data\n"); - } - } - EXIT; - cleanup: - if (mlcd != NULL) - sync = fsfilt_add_journal_cb(req->rq_export->exp_obd, 0, handle, - mds_cancel_cookies_cb, mlcd); - err = mds_finish_transno(mds, inode, handle, req, rc, 0, sync); - /* do mds to ost setattr if needed */ - if (!rc && !err && lmm_size) - mds_osc_setattr_async(obd, inode, lmm, lmm_size, - logcookies, rec->ur_fid1); - - switch (cleanup_phase) { - case 2: - OBD_FREE(lmm, mds->mds_max_mdsize); - if (logcookies) - OBD_FREE(logcookies, cookie_size); - case 1: - if ((S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) && - rec->ur_eadata != NULL) - UNLOCK_INODE_MUTEX(inode); - l_dput(de); - if (locked) { - if (rc) { - ldlm_lock_decref(&lockh, LCK_EX); - } else { - ptlrpc_save_lock (req, &lockh, LCK_EX); - } - } - case 0: - break; - default: - LBUG(); - } - if (err && !rc) - rc = err; - - req->rq_status = rc; - - /* trigger dqrel/dqacq for original owner and new owner */ - if (ia_valid & (ATTR_UID | ATTR_GID)) - lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc, - FSFILT_OP_SETATTR); - - return 0; -} - -static void reconstruct_reint_create(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req) -{ - struct mds_export_data *med = &req->rq_export->exp_mds_data; - struct mds_obd *obd = &req->rq_export->exp_obd->u.mds; - struct dentry *parent, *child; - struct mds_body *body; - - mds_req_from_mcd(req, med->med_mcd); - - if (req->rq_status) - return; - - parent = mds_fid2dentry(obd, rec->ur_fid1, NULL); - LASSERT(!IS_ERR(parent)); - child = ll_lookup_one_len(rec->ur_name, parent, rec->ur_namelen - 1); - LASSERT(!IS_ERR(child)); - - body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body)); - mds_pack_inode2fid(&body->fid1, child->d_inode); - mds_pack_inode2body(body, child->d_inode); - - l_dput(parent); - l_dput(child); -} - -static int mds_reint_create(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, - struct lustre_handle *lh) -{ - struct dentry *dparent = NULL; - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct dentry *dchild = NULL; - struct inode *dir = NULL; - void *handle = NULL; - struct lustre_handle lockh; - int rc = 0, err, type = rec->ur_mode & S_IFMT, cleanup_phase = 0; - int created = 0; - unsigned int qcids[MAXQUOTAS] = { current->fsuid, current->fsgid }; - unsigned int qpids[MAXQUOTAS] = { 0, 0 }; - struct lvfs_dentry_params dp = LVFS_DENTRY_PARAMS_INIT; - int rec_pending = 0; - unsigned int gid = current->fsgid; - ENTRY; - - LASSERT(offset == REQ_REC_OFF); - offset = REPLY_REC_OFF; - - LASSERT(!strcmp(req->rq_export->exp_obd->obd_type->typ_name, - LUSTRE_MDS_NAME)); - - DEBUG_REQ(D_INODE, req, "parent "LPU64"/%u name %s mode %o", - rec->ur_fid1->id, rec->ur_fid1->generation, - rec->ur_name, rec->ur_mode); - - MDS_CHECK_RESENT(req, reconstruct_reint_create(rec, offset, req)); - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_CREATE)) - GOTO(cleanup, rc = -ESTALE); - - if (rec->ur_dlm) - ldlm_request_cancel(req, rec->ur_dlm, 0); - - dparent = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_EX, &lockh, - rec->ur_name, rec->ur_namelen - 1, - MDS_INODELOCK_UPDATE); - if (IS_ERR(dparent)) { - rc = PTR_ERR(dparent); - CDEBUG(D_DENTRY, "parent "LPU64"/%u lookup error %d\n", - rec->ur_fid1->id, rec->ur_fid1->generation, rc); - GOTO(cleanup, rc); - } - cleanup_phase = 1; /* locked parent dentry */ - dir = dparent->d_inode; - LASSERT(dir); - - ldlm_lock_dump_handle(D_OTHER, &lockh); - - dchild = ll_lookup_one_len(rec->ur_name, dparent, rec->ur_namelen - 1); - if (IS_ERR(dchild)) { - rc = PTR_ERR(dchild); - CDEBUG(D_DENTRY, "child lookup error %d\n", rc); - GOTO(cleanup, rc); - } - - cleanup_phase = 2; /* child dentry */ - - OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_CREATE_WRITE, dir->i_sb); - - if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) { - if (dchild->d_inode) - GOTO(cleanup, rc = -EEXIST); - GOTO(cleanup, rc = -EROFS); - } - - if (dir->i_mode & S_ISGID && S_ISDIR(rec->ur_mode)) - rec->ur_mode |= S_ISGID; - - dchild->d_fsdata = (void *)&dp; - dp.ldp_inum = (unsigned long)rec->ur_fid2->id; - dp.ldp_ptr = req; - - if (dir->i_mode & S_ISGID) - gid = dir->i_gid; - else - gid = current->fsgid; - - /* we try to get enough quota to write here, and let ldiskfs - * decide if it is out of quota or not b=14783 */ - lquota_chkquota(mds_quota_interface_ref, obd, - current->fsuid, gid, 1, &rec_pending); - - switch (type) { - case S_IFREG:{ - handle = fsfilt_start(obd, dir, FSFILT_OP_CREATE, NULL); - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - rc = ll_vfs_create(dir, dchild, rec->ur_mode, NULL); - mds_counter_incr(req->rq_export, LPROC_MDS_MKNOD); - EXIT; - break; - } - case S_IFDIR:{ - handle = fsfilt_start(obd, dir, FSFILT_OP_MKDIR, NULL); - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - rc = vfs_mkdir(dir, dchild, rec->ur_mode); - mds_counter_incr(req->rq_export, LPROC_MDS_MKDIR); - EXIT; - break; - } - case S_IFLNK:{ - handle = fsfilt_start(obd, dir, FSFILT_OP_SYMLINK, NULL); - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - if (rec->ur_tgt == NULL) /* no target supplied */ - rc = -EINVAL; /* -EPROTO? */ - else - rc = ll_vfs_symlink(dir, dchild, rec->ur_tgt, S_IALLUGO); - mds_counter_incr(req->rq_export, LPROC_MDS_MKNOD); - EXIT; - break; - } - case S_IFCHR: - case S_IFBLK: - case S_IFIFO: - case S_IFSOCK:{ - int rdev = rec->ur_rdev; - handle = fsfilt_start(obd, dir, FSFILT_OP_MKNOD, NULL); - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - rc = vfs_mknod(dir, dchild, rec->ur_mode, rdev); - mds_counter_incr(req->rq_export, LPROC_MDS_MKNOD); - EXIT; - break; - } - default: - CERROR("bad file type %o creating %s\n", type, rec->ur_name); - dchild->d_fsdata = NULL; - GOTO(cleanup, rc = -EINVAL); - } - - /* In case we stored the desired inum in here, we want to clean up. */ - if (dchild->d_fsdata == (void *)(unsigned long)rec->ur_fid2->id) - dchild->d_fsdata = NULL; - - if (rc) { - CDEBUG(D_INODE, "error during create: %d\n", rc); - GOTO(cleanup, rc); - } else { - struct iattr iattr; - struct inode *inode = dchild->d_inode; - struct mds_body *body; - - created = 1; - LTIME_S(iattr.ia_atime) = rec->ur_time; - LTIME_S(iattr.ia_ctime) = rec->ur_time; - LTIME_S(iattr.ia_mtime) = rec->ur_time; - iattr.ia_uid = current->fsuid; /* set by push_ctxt already */ - iattr.ia_gid = gid; - iattr.ia_valid = ATTR_UID | ATTR_GID | ATTR_ATIME | - ATTR_MTIME | ATTR_CTIME; - - if (rec->ur_fid2->id) { - LASSERT(rec->ur_fid2->id == inode->i_ino); - inode->i_generation = rec->ur_fid2->generation; - /* Dirtied and committed by the upcoming setattr. */ - CDEBUG(D_INODE, "recreated ino %lu with gen %u\n", - inode->i_ino, inode->i_generation); - } else { - CDEBUG(D_INODE, "created ino %lu with gen %x\n", - inode->i_ino, inode->i_generation); - } - - rc = fsfilt_setattr(obd, dchild, handle, &iattr, 0); - if (rc) - CERROR("error on child setattr: rc = %d\n", rc); - - iattr.ia_valid = ATTR_MTIME | ATTR_CTIME; - rc = fsfilt_setattr(obd, dparent, handle, &iattr, 0); - if (rc) - CERROR("error on parent setattr: rc = %d\n", rc); - - if (S_ISDIR(inode->i_mode)) { - struct lov_mds_md lmm; - int lmm_size = sizeof(lmm); - rc = mds_get_md(obd, dir, &lmm, &lmm_size, 1, 0); - if (rc > 0) { - LOCK_INODE_MUTEX(inode); - rc = fsfilt_set_md(obd, inode, handle, - &lmm, lmm_size, "lov"); - UNLOCK_INODE_MUTEX(inode); - } - if (rc) - CERROR("error on copy stripe info: rc = %d\n", - rc); - } - - body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body)); - mds_pack_inode2fid(&body->fid1, inode); - mds_pack_inode2body(body, inode); - } - EXIT; - -cleanup: - err = mds_finish_transno(mds, dir, handle, req, rc, 0, 0); - if (rec_pending) - lquota_pending_commit(mds_quota_interface_ref, obd, - current->fsuid, gid, 1); - - if (rc && created) { - /* Destroy the file we just created. This should not need - * extra journal credits, as we have already modified all of - * the blocks needed in order to create the file in the first - * place. - */ - switch (type) { - case S_IFDIR: - err = vfs_rmdir(dir, dchild); - if (err) - CERROR("rmdir in error path: %d\n", err); - break; - default: - err = vfs_unlink(dir, dchild); - if (err) - CERROR("unlink in error path: %d\n", err); - break; - } - } else if (created) { - /* The inode we were allocated may have just been freed - * by an unlink operation. We take this lock to - * synchronize against the matching reply-ack-lock taken - * in unlink, to avoid replay problems if this reply - * makes it out to the client but the unlink's does not. - * See bug 2029 for more detail.*/ - mds_lock_new_child(obd, dchild->d_inode, NULL); - /* save uid/gid of create inode and parent */ - qpids[USRQUOTA] = dir->i_uid; - qpids[GRPQUOTA] = dir->i_gid; - } else { - rc = err; - } - - switch (cleanup_phase) { - case 2: /* child dentry */ - l_dput(dchild); - case 1: /* locked parent dentry */ - if (rc) { - ldlm_lock_decref(&lockh, LCK_EX); - } else { - ptlrpc_save_lock (req, &lockh, LCK_EX); - } - l_dput(dparent); - case 0: - break; - default: - CERROR("invalid cleanup_phase %d\n", cleanup_phase); - LBUG(); - } - req->rq_status = rc; - - /* trigger dqacq on the owner of child and parent */ - lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc, - FSFILT_OP_CREATE); - return 0; -} - -int res_gt(struct ldlm_res_id *res1, struct ldlm_res_id *res2, - ldlm_policy_data_t *p1, ldlm_policy_data_t *p2) -{ - int i; - - for (i = 0; i < RES_NAME_SIZE; i++) { - /* return 1 here, because enqueue_ordered will skip resources - * of all zeroes if they're sorted to the end of the list. */ - if (res1->name[i] == 0 && res2->name[i] != 0) - return 1; - if (res2->name[i] == 0 && res1->name[i] != 0) - return 0; - - if (res1->name[i] > res2->name[i]) - return 1; - if (res1->name[i] < res2->name[i]) - return 0; - } - if (!p1 || !p2) - return 0; - if (memcmp(p1, p2, sizeof(*p1)) < 0) - return 1; - return 0; -} - -/* This function doesn't use ldlm_match_or_enqueue because we're always called - * with EX or PW locks, and the MDS is no longer allowed to match write locks, - * because they take the place of local semaphores. - * - * One or two locks are taken in numerical order. A res_id->name[0] of 0 means - * no lock is taken for that res_id. Must be at least one non-zero res_id. */ -int enqueue_ordered_locks(struct obd_device *obd, struct ldlm_res_id *p1_res_id, - struct lustre_handle *p1_lockh, int p1_lock_mode, - ldlm_policy_data_t *p1_policy, - struct ldlm_res_id *p2_res_id, - struct lustre_handle *p2_lockh, int p2_lock_mode, - ldlm_policy_data_t *p2_policy) -{ - struct ldlm_res_id *res_id[2] = { p1_res_id, p2_res_id }; - struct lustre_handle *handles[2] = { p1_lockh, p2_lockh }; - int lock_modes[2] = { p1_lock_mode, p2_lock_mode }; - ldlm_policy_data_t *policies[2] = {p1_policy, p2_policy}; - int rc, flags; - ENTRY; - - LASSERT(p1_res_id != NULL && p2_res_id != NULL); - - CDEBUG(D_INFO, "locks before: "LPU64"/"LPU64"\n", - res_id[0]->name[0], res_id[1]->name[0]); - - if (res_gt(p1_res_id, p2_res_id, p1_policy, p2_policy)) { - handles[1] = p1_lockh; - handles[0] = p2_lockh; - res_id[1] = p1_res_id; - res_id[0] = p2_res_id; - lock_modes[1] = p1_lock_mode; - lock_modes[0] = p2_lock_mode; - policies[1] = p1_policy; - policies[0] = p2_policy; - } - - CDEBUG(D_DLMTRACE, "lock order: "LPU64"/"LPU64"\n", - res_id[0]->name[0], res_id[1]->name[0]); - - flags = LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB; - rc = ldlm_cli_enqueue_local(obd->obd_namespace, res_id[0], - LDLM_IBITS, policies[0], lock_modes[0], - &flags, ldlm_blocking_ast, - ldlm_completion_ast, NULL, NULL, 0, - NULL, handles[0]); - if (rc != ELDLM_OK) - RETURN(-EIO); - ldlm_lock_dump_handle(D_OTHER, handles[0]); - - if (memcmp(res_id[0], res_id[1], sizeof(*res_id[0])) == 0 && - (policies[0]->l_inodebits.bits & policies[1]->l_inodebits.bits)) { - memcpy(handles[1], handles[0], sizeof(*(handles[1]))); - ldlm_lock_addref(handles[1], lock_modes[1]); - } else if (res_id[1]->name[0] != 0) { - flags = LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB; - rc = ldlm_cli_enqueue_local(obd->obd_namespace, res_id[1], - LDLM_IBITS, policies[1], - lock_modes[1], &flags, - ldlm_blocking_ast, - ldlm_completion_ast, NULL, NULL, - 0, NULL, handles[1]); - if (rc != ELDLM_OK) { - ldlm_lock_decref(handles[0], lock_modes[0]); - RETURN(-EIO); - } - ldlm_lock_dump_handle(D_OTHER, handles[1]); - } - - RETURN(0); -} - -static inline int res_eq(struct ldlm_res_id *res1, struct ldlm_res_id *res2) -{ - return !memcmp(res1, res2, sizeof(*res1)); -} - -static inline void -try_to_aggregate_locks(struct ldlm_res_id *res1, ldlm_policy_data_t *p1, - struct ldlm_res_id *res2, ldlm_policy_data_t *p2) -{ - if (!res_eq(res1, res2)) - return; - /* XXX: any additional inodebits (to current LOOKUP and UPDATE) - * should be taken with great care here */ - p1->l_inodebits.bits |= p2->l_inodebits.bits; -} - -int enqueue_4ordered_locks(struct obd_device *obd,struct ldlm_res_id *p1_res_id, - struct lustre_handle *p1_lockh, int p1_lock_mode, - ldlm_policy_data_t *p1_policy, - struct ldlm_res_id *p2_res_id, - struct lustre_handle *p2_lockh, int p2_lock_mode, - ldlm_policy_data_t *p2_policy, - struct ldlm_res_id *c1_res_id, - struct lustre_handle *c1_lockh, int c1_lock_mode, - ldlm_policy_data_t *c1_policy, - struct ldlm_res_id *c2_res_id, - struct lustre_handle *c2_lockh, int c2_lock_mode, - ldlm_policy_data_t *c2_policy) -{ - struct ldlm_res_id *res_id[5] = { p1_res_id, p2_res_id, - c1_res_id, c2_res_id }; - struct lustre_handle *dlm_handles[5] = { p1_lockh, p2_lockh, - c1_lockh, c2_lockh }; - int lock_modes[5] = { p1_lock_mode, p2_lock_mode, - c1_lock_mode, c2_lock_mode }; - ldlm_policy_data_t *policies[5] = {p1_policy, p2_policy, - c1_policy, c2_policy}; - int rc, i, j, sorted, flags; - ENTRY; - - CDEBUG(D_DLMTRACE, "locks before: "LPU64"/"LPU64"/"LPU64"/"LPU64"\n", - res_id[0]->name[0], res_id[1]->name[0], res_id[2]->name[0], - res_id[3]->name[0]); - - /* simple insertion sort - we have at most 4 elements */ - for (i = 1; i < 4; i++) { - j = i - 1; - dlm_handles[4] = dlm_handles[i]; - res_id[4] = res_id[i]; - lock_modes[4] = lock_modes[i]; - policies[4] = policies[i]; - - sorted = 0; - do { - if (res_gt(res_id[j], res_id[4], policies[j], - policies[4])) { - dlm_handles[j + 1] = dlm_handles[j]; - res_id[j + 1] = res_id[j]; - lock_modes[j + 1] = lock_modes[j]; - policies[j + 1] = policies[j]; - j--; - } else { - sorted = 1; - } - } while (j >= 0 && !sorted); - - dlm_handles[j + 1] = dlm_handles[4]; - res_id[j + 1] = res_id[4]; - lock_modes[j + 1] = lock_modes[4]; - policies[j + 1] = policies[4]; - } - - CDEBUG(D_DLMTRACE, "lock order: "LPU64"/"LPU64"/"LPU64"/"LPU64"\n", - res_id[0]->name[0], res_id[1]->name[0], res_id[2]->name[0], - res_id[3]->name[0]); - - /* XXX we could send ASTs on all these locks first before blocking? */ - for (i = 0; i < 4; i++) { - flags = LDLM_FL_ATOMIC_CB; - if (res_id[i]->name[0] == 0) - break; - if (i && res_eq(res_id[i], res_id[i-1])) { - memcpy(dlm_handles[i], dlm_handles[i-1], - sizeof(*(dlm_handles[i]))); - ldlm_lock_addref(dlm_handles[i], lock_modes[i]); - } else { - /* we need to enqueue locks with different inodebits - * at once, because otherwise concurrent thread can - * hit the windown between these two locks and we'll - * get to deadlock. see bug 10360. note also, that it - * is impossible to have >2 equal res. */ - if (i < 3) - try_to_aggregate_locks(res_id[i], policies[i], - res_id[i+1], policies[i+1]); - rc = ldlm_cli_enqueue_local(obd->obd_namespace, - res_id[i], LDLM_IBITS, - policies[i], lock_modes[i], - &flags, ldlm_blocking_ast, - ldlm_completion_ast, NULL, - NULL, 0, NULL, - dlm_handles[i]); - if (rc != ELDLM_OK) - GOTO(out_err, rc = -EIO); - ldlm_lock_dump_handle(D_OTHER, dlm_handles[i]); - } - } - - RETURN(0); -out_err: - while (i-- > 0) - ldlm_lock_decref(dlm_handles[i], lock_modes[i]); - - return rc; -} - -/* In the unlikely case that the child changed while we were waiting - * on the lock, we need to drop the lock on the old child and either: - * - if the child has a lower resource name, then we have to also - * drop the parent lock and regain the locks in the right order - * - in the rename case, if the child has a lower resource name than one of - * the other parent/child resources (maxres) we also need to reget the locks - * - if the child has a higher resource name (this is the common case) - * we can just get the lock on the new child (still in lock order) - * - * Returns 0 if the child did not change or if it changed but could be locked. - * Returns 1 if the child changed and we need to re-lock (no locks held). - * Returns -ve error with a valid dchild (no locks held). */ -static int mds_verify_child(struct obd_device *obd, - struct ldlm_res_id *parent_res_id, - struct lustre_handle *parent_lockh, - struct dentry *dparent, int parent_mode, - struct ldlm_res_id *child_res_id, - struct lustre_handle *child_lockh, - struct dentry **dchildp, int child_mode, - ldlm_policy_data_t *child_policy, - const char *name, int namelen, - struct ldlm_res_id *maxres) -{ - struct dentry *vchild, *dchild = *dchildp; - int rc = 0, cleanup_phase = 2; /* parent, child locks */ - ENTRY; - - vchild = ll_lookup_one_len(name, dparent, namelen - 1); - if (IS_ERR(vchild)) - GOTO(cleanup, rc = PTR_ERR(vchild)); - - if (likely((vchild->d_inode == NULL && child_res_id->name[0] == 0) || - (vchild->d_inode != NULL && - child_res_id->name[0] == vchild->d_inode->i_ino && - child_res_id->name[1] == vchild->d_inode->i_generation))) { - if (dchild != NULL) - l_dput(dchild); - *dchildp = vchild; - - RETURN(0); - } - - CDEBUG(D_DLMTRACE, "child inode changed: %p != %p (%lu != "LPU64")\n", - vchild->d_inode, dchild ? dchild->d_inode : 0, - vchild->d_inode ? vchild->d_inode->i_ino : 0, - child_res_id->name[0]); - if (child_res_id->name[0] != 0) - ldlm_lock_decref(child_lockh, child_mode); - if (dchild) - l_dput(dchild); - - cleanup_phase = 1; /* parent lock only */ - *dchildp = dchild = vchild; - - if (dchild->d_inode) { - int flags = LDLM_FL_ATOMIC_CB; - child_res_id->name[0] = dchild->d_inode->i_ino; - child_res_id->name[1] = dchild->d_inode->i_generation; - - /* Make sure that we don't try to re-enqueue a lock on the - * same resource if it happens that the source is renamed to - * the target by another thread (bug 9974, thanks racer :-) */ - if (!res_gt(child_res_id, parent_res_id, NULL, NULL) || - !res_gt(child_res_id, maxres, NULL, NULL)) { - CDEBUG(D_DLMTRACE, "relock "LPU64"<("LPU64"|"LPU64")\n", - child_res_id->name[0], parent_res_id->name[0], - maxres->name[0]); - GOTO(cleanup, rc = 1); - } - - rc = ldlm_cli_enqueue_local(obd->obd_namespace, child_res_id, - LDLM_IBITS, child_policy, - child_mode, &flags, - ldlm_blocking_ast, - ldlm_completion_ast, NULL, - NULL, 0, NULL, child_lockh); - if (rc != ELDLM_OK) - GOTO(cleanup, rc = -EIO); - } else { - memset(child_res_id, 0, sizeof(*child_res_id)); - } - - EXIT; -cleanup: - if (rc) { - switch(cleanup_phase) { - case 2: - if (child_res_id->name[0] != 0) - ldlm_lock_decref(child_lockh, child_mode); - case 1: - ldlm_lock_decref(parent_lockh, parent_mode); - } - } - return rc; -} - -#define INODE_CTIME_AGE (10) -#define INODE_CTIME_OLD(inode) (LTIME_S(inode->i_ctime) + \ - INODE_CTIME_AGE < CURRENT_SECONDS) - -int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds, - struct ll_fid *fid, - struct lustre_handle *parent_lockh, - struct dentry **dparentp, int parent_mode, - __u64 parent_lockpart, - char *name, int namelen, - struct lustre_handle *child_lockh, - struct dentry **dchildp, int child_mode, - __u64 child_lockpart) -{ - struct ldlm_res_id child_res_id = { .name = {0} }; - struct ldlm_res_id parent_res_id = { .name = {0} }; - ldlm_policy_data_t parent_policy = {.l_inodebits = { parent_lockpart }}; - ldlm_policy_data_t child_policy = {.l_inodebits = { child_lockpart }}; - struct inode *inode; - int rc = 0, cleanup_phase = 0; - ENTRY; - - /* Step 1: Lookup parent */ - *dparentp = mds_fid2dentry(mds, fid, NULL); - if (IS_ERR(*dparentp)) { - rc = PTR_ERR(*dparentp); - *dparentp = NULL; - RETURN(rc); - } - - CDEBUG(D_INODE, "parent ino %lu, name %s\n", - (*dparentp)->d_inode->i_ino, name); - - parent_res_id.name[0] = (*dparentp)->d_inode->i_ino; - parent_res_id.name[1] = (*dparentp)->d_inode->i_generation; - - cleanup_phase = 1; /* parent dentry */ - - /* Step 2: Lookup child (without DLM lock, to get resource name) */ - *dchildp = ll_lookup_one_len(name, *dparentp, namelen - 1); - if (IS_ERR(*dchildp)) { - rc = PTR_ERR(*dchildp); - CDEBUG(D_INODE, "child lookup error %d\n", rc); - GOTO(cleanup, rc); - } - - cleanup_phase = 2; /* child dentry */ - inode = (*dchildp)->d_inode; - if (inode != NULL) { - if (is_bad_inode(inode)) { - CERROR("bad inode returned %lu/%u\n", - inode->i_ino, inode->i_generation); - GOTO(cleanup, rc = -ENOENT); - } - inode = igrab(inode); - } - if (inode == NULL) - goto retry_locks; - - child_res_id.name[0] = inode->i_ino; - child_res_id.name[1] = inode->i_generation; - - /* If we want a LCK_CR for a directory, and this directory has not been - changed for some time, we return not only a LOOKUP lock, but also an - UPDATE lock to have negative dentry starts working for this dir. - Also we apply same logic to non-directories. If the file is rarely - changed - we return both locks and this might save us RPC on - later STAT. */ - if ((child_mode & (LCK_CR|LCK_PR|LCK_CW)) && INODE_CTIME_OLD(inode)) - child_policy.l_inodebits.bits |= MDS_INODELOCK_UPDATE; - - iput(inode); - -retry_locks: - cleanup_phase = 2; /* child dentry */ - - /* Step 3: Lock parent and child in resource order. If child doesn't - * exist, we still have to lock the parent and re-lookup. */ - rc = enqueue_ordered_locks(obd,&parent_res_id,parent_lockh,parent_mode, - &parent_policy, - &child_res_id, child_lockh, child_mode, - &child_policy); - if (rc) - GOTO(cleanup, rc); - - if (!(*dchildp)->d_inode) - cleanup_phase = 3; /* parent lock */ - else - cleanup_phase = 4; /* child lock */ - - /* Step 4: Re-lookup child to verify it hasn't changed since locking */ - rc = mds_verify_child(obd, &parent_res_id, parent_lockh, *dparentp, - parent_mode, &child_res_id, child_lockh, dchildp, - child_mode,&child_policy, name, namelen, &parent_res_id); - if (rc > 0) - goto retry_locks; - if (rc < 0) { - cleanup_phase = 2; - GOTO(cleanup, rc); - } - -cleanup: - if (rc) { - switch (cleanup_phase) { - case 4: - ldlm_lock_decref(child_lockh, child_mode); - case 3: - ldlm_lock_decref(parent_lockh, parent_mode); - case 2: - l_dput(*dchildp); - case 1: - l_dput(*dparentp); - default: ; - } - } - return rc; -} - -void mds_reconstruct_generic(struct ptlrpc_request *req) -{ - struct mds_export_data *med = &req->rq_export->exp_mds_data; - - mds_req_from_mcd(req, med->med_mcd); -} - -/* If we are unlinking an open file/dir (i.e. creating an orphan) then - * we instead link the inode into the PENDING directory until it is - * finally released. We can't simply call mds_reint_rename() or some - * part thereof, because we don't have the inode to check for link - * count/open status until after it is locked. - * - * For lock ordering, caller must get child->i_mutex first, then - * pending->i_mutex before starting journal transaction. - * - * returns 1 on success - * returns 0 if we lost a race and didn't make a new link - * returns negative on error - */ -static int mds_orphan_add_link(struct mds_update_record *rec, - struct obd_device *obd, struct dentry *dentry) -{ - struct mds_obd *mds = &obd->u.mds; - struct inode *pending_dir = mds->mds_pending_dir->d_inode; - struct inode *inode = dentry->d_inode; - struct dentry *pending_child; - char fidname[LL_FID_NAMELEN]; - int fidlen = 0, rc, mode; - ENTRY; - - LASSERT(inode != NULL); - LASSERT(!mds_inode_is_orphan(inode)); -#ifndef HAVE_I_ALLOC_SEM - LASSERT(TRYLOCK_INODE_MUTEX(inode) == 0); -#endif - LASSERT(TRYLOCK_INODE_MUTEX(pending_dir) == 0); - - fidlen = ll_fid2str(fidname, inode->i_ino, inode->i_generation); - - CDEBUG(D_INODE, "pending destroy of %dx open %d linked %s %s = %s\n", - mds_orphan_open_count(inode), inode->i_nlink, - S_ISDIR(inode->i_mode) ? "dir" : - S_ISREG(inode->i_mode) ? "file" : "other",rec->ur_name,fidname); - - if (mds_orphan_open_count(inode) == 0 || inode->i_nlink != 0) - RETURN(0); - - pending_child = lookup_one_len(fidname, mds->mds_pending_dir, fidlen); - if (IS_ERR(pending_child)) - RETURN(PTR_ERR(pending_child)); - - if (pending_child->d_inode != NULL) { - CERROR("re-destroying orphan file %s?\n", rec->ur_name); - LASSERT(pending_child->d_inode == inode); - GOTO(out_dput, rc = 0); - } - - /* link() is semanticaly-wrong for S_IFDIR, so we set S_IFREG - * for linking and return real mode back then -bzzz */ - mode = inode->i_mode; - inode->i_mode = S_IFREG; - rc = vfs_link(dentry, pending_dir, pending_child); - if (rc) - CERROR("error linking orphan %s to PENDING: rc = %d\n", - rec->ur_name, rc); - else - mds_inode_set_orphan(inode); - - /* return mode and correct i_nlink if inode is directory */ - inode->i_mode = mode; - LASSERTF(inode->i_nlink == 1, "%s nlink == %d\n", - S_ISDIR(mode) ? "dir" : S_ISREG(mode) ? "file" : "other", - inode->i_nlink); - if (S_ISDIR(mode)) { - inode->i_nlink++; - pending_dir->i_nlink++; - mark_inode_dirty(inode); - mark_inode_dirty(pending_dir); - } - - GOTO(out_dput, rc = 1); -out_dput: - l_dput(pending_child); - RETURN(rc); -} - -int mds_get_cookie_size(struct obd_device *obd, struct lov_mds_md *lmm) -{ - int count = le32_to_cpu(lmm->lmm_stripe_count); - int real_csize = count * sizeof(struct llog_cookie); - return real_csize; -} - -void mds_shrink_reply(struct obd_device *obd, struct ptlrpc_request *req, - struct mds_body *body, int md_off) -{ - int cookie_size = 0, md_size = 0; - - if (body && body->valid & OBD_MD_FLEASIZE) { - md_size = body->eadatasize; - } - if (body && body->valid & OBD_MD_FLCOOKIE) { - LASSERT(body->valid & OBD_MD_FLEASIZE); - cookie_size = mds_get_cookie_size(obd, lustre_msg_buf( - req->rq_repmsg, md_off, 0)); - } - - CDEBUG(D_INFO, "Shrink to md_size %d cookie_size %d \n", md_size, - cookie_size); - - lustre_shrink_reply(req, md_off, md_size, 1); - - lustre_shrink_reply(req, md_off + (md_size > 0), cookie_size, 0); -} - -static int mds_reint_unlink(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, - struct lustre_handle *lh) -{ - struct dentry *dparent = NULL, *dchild; - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_body *body = NULL; - struct inode *child_inode = NULL; - struct lustre_handle parent_lockh, child_lockh, child_reuse_lockh; - void *handle = NULL; - int rc = 0, cleanup_phase = 0; - unsigned int qcids[MAXQUOTAS] = { 0, 0 }; - unsigned int qpids[MAXQUOTAS] = { 0, 0 }; - ENTRY; - - LASSERT(offset == REQ_REC_OFF); /* || offset == DLM_INTENT_REC_OFF); */ - offset = REPLY_REC_OFF; - - DEBUG_REQ(D_INODE, req, "parent ino "LPU64"/%u, child %s", - rec->ur_fid1->id, rec->ur_fid1->generation, rec->ur_name); - - MDS_CHECK_RESENT(req, mds_reconstruct_generic(req)); - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_UNLINK)) - GOTO(cleanup, rc = -ENOENT); - - if (rec->ur_dlm) - ldlm_request_cancel(req, rec->ur_dlm, 0); - - rc = mds_get_parent_child_locked(obd, mds, rec->ur_fid1, - &parent_lockh, &dparent, LCK_EX, - MDS_INODELOCK_UPDATE, - rec->ur_name, rec->ur_namelen, - &child_lockh, &dchild, LCK_EX, - MDS_INODELOCK_FULL); - if (rc) - GOTO(cleanup, rc); - - cleanup_phase = 1; /* dchild, dparent, locks */ - - dget(dchild); - child_inode = dchild->d_inode; - if (child_inode == NULL) { - CDEBUG(D_INODE, "child doesn't exist (dir %lu, name %s)\n", - dparent->d_inode->i_ino, rec->ur_name); - GOTO(cleanup, rc = -ENOENT); - } - - /* save uid/gid for quota acquire/release */ - qcids[USRQUOTA] = child_inode->i_uid; - qcids[GRPQUOTA] = child_inode->i_gid; - qpids[USRQUOTA] = dparent->d_inode->i_uid; - qpids[GRPQUOTA] = dparent->d_inode->i_gid; - - cleanup_phase = 2; /* dchild has a lock */ - - /* We have to do these checks ourselves, in case we are making an - * orphan. The client tells us whether rmdir() or unlink() was called, - * so we need to return appropriate errors (bug 72). */ - if ((rec->ur_mode & S_IFMT) == S_IFDIR) { - if (!S_ISDIR(child_inode->i_mode)) - GOTO(cleanup, rc = -ENOTDIR); - } else { - if (S_ISDIR(child_inode->i_mode)) - GOTO(cleanup, rc = -EISDIR); - } - - /* Check for EROFS after we check ENODENT, ENOTDIR, and EISDIR */ - if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) - GOTO(cleanup, rc = -EROFS); - - /* Step 3: Get a lock on the ino to sync with creation WRT inode - * reuse (see bug 2029). */ - rc = mds_lock_new_child(obd, child_inode, &child_reuse_lockh); - if (rc != ELDLM_OK) - GOTO(cleanup, rc); - - cleanup_phase = 3; /* child inum lock */ - - OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_UNLINK_WRITE, dparent->d_inode->i_sb); - - /* ldlm_reply in buf[0] if called via intent */ - if (offset == DLM_INTENT_REC_OFF) - offset = DLM_REPLY_REC_OFF; - - body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body)); - LASSERT(body != NULL); - - /* child orphan sem protects orphan_dec_test && is_orphan race */ - MDS_DOWN_READ_ORPHAN_SEM(child_inode); - cleanup_phase = 4; /* MDS_UP_READ_ORPHAN_SEM(new_inode) when finished */ - - /* If this is potentially the last reference to this inode, get the - * OBD EA data first so the client can destroy OST objects. We - * only do the object removal later if no open files/links remain. */ - if ((S_ISDIR(child_inode->i_mode) && child_inode->i_nlink == 2) || - child_inode->i_nlink == 1) { - if (mds_orphan_open_count(child_inode) > 0) { - /* need to lock pending_dir before transaction */ - LOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode); - cleanup_phase = 5; /* UNLOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode); */ - } else if (S_ISREG(child_inode->i_mode)) { - mds_pack_inode2fid(&body->fid1, child_inode); - mds_pack_inode2body(body, child_inode); - mds_pack_md(obd, req->rq_repmsg, offset + 1, body, - child_inode, MDS_PACK_MD_LOCK, 0); - } - } - - /* Step 4: Do the unlink: we already verified ur_mode above (bug 72) */ - switch (child_inode->i_mode & S_IFMT) { - case S_IFDIR: - /* Drop any lingering child directories before we start our - * transaction, to avoid doing multiple inode dirty/delete - * in our compound transaction (bug 1321). */ - shrink_dcache_parent(dchild); - handle = fsfilt_start(obd, dparent->d_inode, FSFILT_OP_RMDIR, - NULL); - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - rc = vfs_rmdir(dparent->d_inode, dchild); - mds_counter_incr(req->rq_export, LPROC_MDS_RMDIR); - break; - case S_IFREG: { - struct lov_mds_md *lmm = lustre_msg_buf(req->rq_repmsg, - offset + 1, 0); - handle = fsfilt_start_log(obd, dparent->d_inode, - FSFILT_OP_UNLINK, NULL, - le32_to_cpu(lmm->lmm_stripe_count)); - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - rc = vfs_unlink(dparent->d_inode, dchild); - mds_counter_incr(req->rq_export, LPROC_MDS_UNLINK); - break; - } - case S_IFLNK: - case S_IFCHR: - case S_IFBLK: - case S_IFIFO: - case S_IFSOCK: - handle = fsfilt_start(obd, dparent->d_inode, FSFILT_OP_UNLINK, - NULL); - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - rc = vfs_unlink(dparent->d_inode, dchild); - mds_counter_incr(req->rq_export, LPROC_MDS_UNLINK); - break; - default: - CERROR("bad file type %o unlinking %s\n", rec->ur_mode, - rec->ur_name); - LBUG(); - GOTO(cleanup, rc = -EINVAL); - } - - if (rc == 0 && child_inode->i_nlink == 0) { - if (mds_orphan_open_count(child_inode) > 0) - rc = mds_orphan_add_link(rec, obd, dchild); - - if (rc == 1) - GOTO(cleanup, rc = 0); - - if (!S_ISREG(child_inode->i_mode)) - GOTO(cleanup, rc); - - if (!(body->valid & OBD_MD_FLEASIZE)) { - body->valid |=(OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME); - } else if (mds_log_op_unlink(obd, - lustre_msg_buf(req->rq_repmsg, offset + 1, 0), - lustre_msg_buflen(req->rq_repmsg, offset + 1), - lustre_msg_buf(req->rq_repmsg, offset + 2, 0), - lustre_msg_buflen(req->rq_repmsg, offset+2)) > - 0) { - body->valid |= OBD_MD_FLCOOKIE; - } - } - - GOTO(cleanup, rc); -cleanup: - if (rc == 0) { - struct iattr iattr; - int err; - - iattr.ia_valid = ATTR_MTIME | ATTR_CTIME; - LTIME_S(iattr.ia_mtime) = rec->ur_time; - LTIME_S(iattr.ia_ctime) = rec->ur_time; - - err = fsfilt_setattr(obd, dparent, handle, &iattr, 0); - if (err) - CERROR("error on parent setattr: rc = %d\n", err); - } - - rc = mds_finish_transno(mds, dparent ? dparent->d_inode : NULL, - handle, req, rc, 0, 0); - if (!rc) - (void)obd_set_info_async(mds->mds_osc_exp, strlen("unlinked"), - "unlinked", 0, NULL, NULL); - switch(cleanup_phase) { - case 5: /* pending_dir semaphore */ - UNLOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode); - case 4: /* child inode semaphore */ - MDS_UP_READ_ORPHAN_SEM(child_inode); - case 3: /* child ino-reuse lock */ - if (rc && body != NULL) { - // Don't unlink the OST objects if the MDS unlink failed - body->valid = 0; - } - if (rc) - ldlm_lock_decref(&child_reuse_lockh, LCK_EX); - else - ptlrpc_save_lock(req, &child_reuse_lockh, LCK_EX); - case 2: /* child lock */ - ldlm_lock_decref(&child_lockh, LCK_EX); - case 1: /* child and parent dentry, parent lock */ - if (rc) - ldlm_lock_decref(&parent_lockh, LCK_EX); - else - ptlrpc_save_lock(req, &parent_lockh, LCK_EX); - l_dput(dchild); - l_dput(dchild); - l_dput(dparent); - case 0: - break; - default: - CERROR("invalid cleanup_phase %d\n", cleanup_phase); - LBUG(); - } - req->rq_status = rc; - - mds_shrink_reply(obd, req, body, REPLY_REC_OFF + 1); - - /* trigger dqrel on the owner of child and parent */ - lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc, - FSFILT_OP_UNLINK); - return 0; -} - -static int mds_reint_link(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, - struct lustre_handle *lh) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct dentry *de_src = NULL; - struct dentry *de_tgt_dir = NULL; - struct dentry *dchild = NULL; - struct mds_obd *mds = mds_req2mds(req); - struct lustre_handle *handle = NULL, tgt_dir_lockh, src_lockh; - struct ldlm_res_id src_res_id = { .name = {0} }; - struct ldlm_res_id tgt_dir_res_id = { .name = {0} }; - ldlm_policy_data_t src_policy ={.l_inodebits = {MDS_INODELOCK_UPDATE}}; - ldlm_policy_data_t tgt_dir_policy = - {.l_inodebits = {MDS_INODELOCK_UPDATE}}; - int rc = 0, cleanup_phase = 0; - ENTRY; - - LASSERT(offset == REQ_REC_OFF); - - DEBUG_REQ(D_INODE, req, "original "LPU64"/%u to "LPU64"/%u %s", - rec->ur_fid1->id, rec->ur_fid1->generation, - rec->ur_fid2->id, rec->ur_fid2->generation, rec->ur_name); - - mds_counter_incr(req->rq_export, LPROC_MDS_LINK); - - MDS_CHECK_RESENT(req, mds_reconstruct_generic(req)); - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_LINK)) - GOTO(cleanup, rc = -ENOENT); - - if (rec->ur_dlm) - ldlm_request_cancel(req, rec->ur_dlm, 0); - - /* Step 1: Lookup the source inode and target directory by FID */ - de_src = mds_fid2dentry(mds, rec->ur_fid1, NULL); - if (IS_ERR(de_src)) - GOTO(cleanup, rc = PTR_ERR(de_src)); - - cleanup_phase = 1; /* source dentry */ - - de_tgt_dir = mds_fid2dentry(mds, rec->ur_fid2, NULL); - if (IS_ERR(de_tgt_dir)) { - rc = PTR_ERR(de_tgt_dir); - de_tgt_dir = NULL; - GOTO(cleanup, rc); - } - - cleanup_phase = 2; /* target directory dentry */ - - CDEBUG(D_INODE, "linking %.*s/%s to inode %lu\n", - de_tgt_dir->d_name.len, de_tgt_dir->d_name.name, rec->ur_name, - de_src->d_inode->i_ino); - - /* Step 2: Take the two locks */ - src_res_id.name[0] = de_src->d_inode->i_ino; - src_res_id.name[1] = de_src->d_inode->i_generation; - tgt_dir_res_id.name[0] = de_tgt_dir->d_inode->i_ino; - tgt_dir_res_id.name[1] = de_tgt_dir->d_inode->i_generation; - - rc = enqueue_ordered_locks(obd, &src_res_id, &src_lockh, LCK_EX, - &src_policy, - &tgt_dir_res_id, &tgt_dir_lockh, LCK_EX, - &tgt_dir_policy); - if (rc) - GOTO(cleanup, rc); - - cleanup_phase = 3; /* locks */ - - if (mds_inode_is_orphan(de_src->d_inode)) { - CDEBUG(D_INODE, "an attempt to link an orphan inode %lu/%u\n", - de_src->d_inode->i_ino, - de_src->d_inode->i_generation); - GOTO(cleanup, rc = -ENOENT); - } - - /* Step 3: Lookup the child */ - dchild = ll_lookup_one_len(rec->ur_name, de_tgt_dir, rec->ur_namelen-1); - if (IS_ERR(dchild)) { - rc = PTR_ERR(dchild); - if (rc != -EPERM && rc != -EACCES && rc != -ENAMETOOLONG) - CERROR("child lookup error %d\n", rc); - GOTO(cleanup, rc); - } - - cleanup_phase = 4; /* child dentry */ - - if (dchild->d_inode) { - CDEBUG(D_INODE, "child exists (dir %lu, name %s)\n", - de_tgt_dir->d_inode->i_ino, rec->ur_name); - rc = -EEXIST; - GOTO(cleanup, rc); - } - - /* Step 4: Do it. */ - OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_LINK_WRITE, de_src->d_inode->i_sb); - - if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) - GOTO(cleanup, rc = -EROFS); - - handle = fsfilt_start(obd, de_tgt_dir->d_inode, FSFILT_OP_LINK, NULL); - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - - rc = vfs_link(de_src, de_tgt_dir->d_inode, dchild); - if (rc && rc != -EPERM && rc != -EACCES) - CERROR("vfs_link error %d\n", rc); -cleanup: - rc = mds_finish_transno(mds, de_tgt_dir ? de_tgt_dir->d_inode : NULL, - handle, req, rc, 0, 0); - EXIT; - - switch (cleanup_phase) { - case 4: /* child dentry */ - l_dput(dchild); - case 3: /* locks */ - if (rc) { - ldlm_lock_decref(&src_lockh, LCK_EX); - ldlm_lock_decref(&tgt_dir_lockh, LCK_EX); - } else { - ptlrpc_save_lock(req, &src_lockh, LCK_EX); - ptlrpc_save_lock(req, &tgt_dir_lockh, LCK_EX); - } - case 2: /* target dentry */ - l_dput(de_tgt_dir); - case 1: /* source dentry */ - l_dput(de_src); - case 0: - break; - default: - CERROR("invalid cleanup_phase %d\n", cleanup_phase); - LBUG(); - } - req->rq_status = rc; - return 0; -} - -/* The idea here is that we need to get four locks in the end: - * one on each parent directory, one on each child. We need to take - * these locks in some kind of order (to avoid deadlocks), and the order - * I selected is "increasing resource number" order. We need to look up - * the children, however, before we know what the resource number(s) are. - * Thus the following plan: - * - * 1,2. Look up the parents - * 3,4. Look up the children - * 5. Take locks on the parents and children, in order - * 6. Verify that the children haven't changed since they were looked up - * - * If there was a race and the children changed since they were first looked - * up, it is possible that mds_verify_child() will be able to just grab the - * lock on the new child resource (if it has a higher resource than any other) - * but we need to compare against not only its parent, but also against the - * parent and child of the "other half" of the rename, hence maxres_{src,tgt}. - * - * We need the fancy igrab() on the child inodes because we aren't holding a - * lock on the parent after the lookup is done, so dentry->d_inode may change - * at any time, and igrab() itself doesn't like getting passed a NULL argument. - */ -int mds_get_parents_children_locked(struct obd_device *obd, - struct mds_obd *mds, - struct ll_fid *p1_fid, - struct dentry **de_srcdirp, - struct ll_fid *p2_fid, - struct dentry **de_tgtdirp, - int parent_mode, - const char *old_name, int old_len, - struct dentry **de_oldp, - const char *new_name, int new_len, - struct dentry **de_newp, - struct lustre_handle *dlm_handles, - int child_mode) -{ - struct ldlm_res_id p1_res_id = { .name = {0} }; - struct ldlm_res_id p2_res_id = { .name = {0} }; - struct ldlm_res_id c1_res_id = { .name = {0} }; - struct ldlm_res_id c2_res_id = { .name = {0} }; - ldlm_policy_data_t p_policy = {.l_inodebits = {MDS_INODELOCK_UPDATE}}; - /* Only dentry should disappear, but the inode itself would be - intact otherwise. */ - ldlm_policy_data_t c1_policy = {.l_inodebits = {MDS_INODELOCK_LOOKUP}}; - /* If something is going to be replaced, both dentry and inode locks are needed */ - ldlm_policy_data_t c2_policy = {.l_inodebits = {MDS_INODELOCK_FULL}}; - struct ldlm_res_id *maxres_src, *maxres_tgt; - struct inode *inode; - int rc = 0, cleanup_phase = 0; - ENTRY; - - /* Step 1: Lookup the source directory */ - *de_srcdirp = mds_fid2dentry(mds, p1_fid, NULL); - if (IS_ERR(*de_srcdirp)) - GOTO(cleanup, rc = PTR_ERR(*de_srcdirp)); - - cleanup_phase = 1; /* source directory dentry */ - - p1_res_id.name[0] = (*de_srcdirp)->d_inode->i_ino; - p1_res_id.name[1] = (*de_srcdirp)->d_inode->i_generation; - - /* Step 2: Lookup the target directory */ - if (memcmp(p1_fid, p2_fid, sizeof(*p1_fid)) == 0) { - *de_tgtdirp = dget(*de_srcdirp); - } else { - *de_tgtdirp = mds_fid2dentry(mds, p2_fid, NULL); - if (IS_ERR(*de_tgtdirp)) { - rc = PTR_ERR(*de_tgtdirp); - *de_tgtdirp = NULL; - GOTO(cleanup, rc); - } - } - - cleanup_phase = 2; /* target directory dentry */ - - p2_res_id.name[0] = (*de_tgtdirp)->d_inode->i_ino; - p2_res_id.name[1] = (*de_tgtdirp)->d_inode->i_generation; - - /* Step 3: Lookup the source child entry */ - *de_oldp = ll_lookup_one_len(old_name, *de_srcdirp, old_len - 1); - if (IS_ERR(*de_oldp)) { - rc = PTR_ERR(*de_oldp); - CDEBUG(D_INODE, "old child lookup error (%.*s): rc %d\n", - old_len - 1, old_name, rc); - GOTO(cleanup, rc); - } - - cleanup_phase = 3; /* original name dentry */ - - inode = (*de_oldp)->d_inode; - if (inode != NULL) - inode = igrab(inode); - if (inode == NULL) - GOTO(cleanup, rc = -ENOENT); - - c1_res_id.name[0] = inode->i_ino; - c1_res_id.name[1] = inode->i_generation; - - iput(inode); - - /* Step 4: Lookup the target child entry */ - if (!new_name) - GOTO(retry_locks, rc); - *de_newp = ll_lookup_one_len(new_name, *de_tgtdirp, new_len - 1); - if (IS_ERR(*de_newp)) { - rc = PTR_ERR(*de_newp); - CDEBUG(D_DENTRY, "new child lookup error (%.*s): rc %d\n", - old_len - 1, old_name, rc); - GOTO(cleanup, rc); - } - - cleanup_phase = 4; /* target dentry */ - - inode = (*de_newp)->d_inode; - if (inode != NULL) - inode = igrab(inode); - if (inode == NULL) - goto retry_locks; - - c2_res_id.name[0] = inode->i_ino; - c2_res_id.name[1] = inode->i_generation; - iput(inode); - -retry_locks: - /* Step 5: Take locks on the parents and child(ren) */ - maxres_src = &p1_res_id; - maxres_tgt = &p2_res_id; - cleanup_phase = 4; /* target dentry */ - - if (c1_res_id.name[0] != 0 && res_gt(&c1_res_id, &p1_res_id,NULL,NULL)) - maxres_src = &c1_res_id; - if (c2_res_id.name[0] != 0 && res_gt(&c2_res_id, &p2_res_id,NULL,NULL)) - maxres_tgt = &c2_res_id; - - rc = enqueue_4ordered_locks(obd, &p1_res_id,&dlm_handles[0],parent_mode, - &p_policy, - &p2_res_id, &dlm_handles[1], parent_mode, - &p_policy, - &c1_res_id, &dlm_handles[2], child_mode, - &c1_policy, - &c2_res_id, &dlm_handles[3], child_mode, - &c2_policy); - if (rc) - GOTO(cleanup, rc); - - cleanup_phase = 6; /* parent and child(ren) locks */ - - /* Step 6a: Re-lookup source child to verify it hasn't changed */ - rc = mds_verify_child(obd, &p1_res_id, &dlm_handles[0], *de_srcdirp, - parent_mode, &c1_res_id, &dlm_handles[2], de_oldp, - child_mode, &c1_policy, old_name, old_len, - maxres_tgt); - if (rc) { - if (c2_res_id.name[0] != 0) - ldlm_lock_decref(&dlm_handles[3], child_mode); - ldlm_lock_decref(&dlm_handles[1], parent_mode); - cleanup_phase = 4; - if (rc > 0) - goto retry_locks; - GOTO(cleanup, rc); - } - - if ((*de_oldp)->d_inode == NULL) - GOTO(cleanup, rc = -ENOENT); - - if (!new_name) - GOTO(cleanup, rc); - /* Step 6b: Re-lookup target child to verify it hasn't changed */ - rc = mds_verify_child(obd, &p2_res_id, &dlm_handles[1], *de_tgtdirp, - parent_mode, &c2_res_id, &dlm_handles[3], de_newp, - child_mode, &c2_policy, new_name, new_len, - maxres_src); - if (rc) { - ldlm_lock_decref(&dlm_handles[2], child_mode); - ldlm_lock_decref(&dlm_handles[0], parent_mode); - cleanup_phase = 4; - if (rc > 0) - goto retry_locks; - GOTO(cleanup, rc); - } - - EXIT; -cleanup: - if (rc) { - switch (cleanup_phase) { - case 6: /* child lock(s) */ - if (c2_res_id.name[0] != 0) - ldlm_lock_decref(&dlm_handles[3], child_mode); - if (c1_res_id.name[0] != 0) - ldlm_lock_decref(&dlm_handles[2], child_mode); - case 5: /* parent locks */ - ldlm_lock_decref(&dlm_handles[1], parent_mode); - ldlm_lock_decref(&dlm_handles[0], parent_mode); - case 4: /* target dentry */ - l_dput(*de_newp); - case 3: /* source dentry */ - l_dput(*de_oldp); - case 2: /* target directory dentry */ - l_dput(*de_tgtdirp); - case 1: /* source directry dentry */ - l_dput(*de_srcdirp); - } - } - - return rc; -} - -static int mds_reint_rename(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, - struct lustre_handle *lockh) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct dentry *de_srcdir = NULL; - struct dentry *de_tgtdir = NULL; - struct dentry *de_old = NULL; - struct dentry *de_new = NULL; - struct inode *old_inode = NULL, *new_inode = NULL; - struct mds_obd *mds = mds_req2mds(req); - struct lustre_handle dlm_handles[4]; - struct mds_body *body = NULL; - struct lov_mds_md *lmm = NULL; - int rc = 0, lock_count = 3, cleanup_phase = 0; - void *handle = NULL; - unsigned int qcids[MAXQUOTAS] = { 0, 0 }; - unsigned int qpids[4] = { 0, 0, 0, 0 }; - ENTRY; - - LASSERT(offset == REQ_REC_OFF); - offset = REPLY_REC_OFF; - - DEBUG_REQ(D_INODE, req, "parent "LPU64"/%u %s to "LPU64"/%u %s", - rec->ur_fid1->id, rec->ur_fid1->generation, rec->ur_name, - rec->ur_fid2->id, rec->ur_fid2->generation, rec->ur_tgt); - - mds_counter_incr(req->rq_export, LPROC_MDS_RENAME); - - MDS_CHECK_RESENT(req, mds_reconstruct_generic(req)); - - if (rec->ur_dlm) - ldlm_request_cancel(req, rec->ur_dlm, 0); - - rc = mds_get_parents_children_locked(obd, mds, rec->ur_fid1, &de_srcdir, - rec->ur_fid2, &de_tgtdir, LCK_EX, - rec->ur_name, rec->ur_namelen, - &de_old, rec->ur_tgt, - rec->ur_tgtlen, &de_new, - dlm_handles, LCK_EX); - if (rc) - GOTO(cleanup, rc); - - cleanup_phase = 1; /* parent(s), children, locks */ - - old_inode = de_old->d_inode; - new_inode = de_new->d_inode; - - if (new_inode != NULL) - lock_count = 4; - - /* sanity check for src inode */ - if (old_inode->i_ino == de_srcdir->d_inode->i_ino || - old_inode->i_ino == de_tgtdir->d_inode->i_ino) - GOTO(cleanup, rc = -EINVAL); - - if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) - GOTO(cleanup, rc = -EROFS); - - if (new_inode == NULL) - goto no_unlink; - - igrab(new_inode); - cleanup_phase = 2; /* iput(new_inode) when finished */ - - /* sanity check for dest inode */ - if (new_inode->i_ino == de_srcdir->d_inode->i_ino || - new_inode->i_ino == de_tgtdir->d_inode->i_ino) - GOTO(cleanup, rc = -EINVAL); - - if (old_inode == new_inode) - GOTO(cleanup, rc = 0); - - /* save uids/gids for qunit acquire/release */ - qcids[USRQUOTA] = old_inode->i_uid; - qcids[GRPQUOTA] = old_inode->i_gid; - qpids[USRQUOTA] = de_tgtdir->d_inode->i_uid; - qpids[GRPQUOTA] = de_tgtdir->d_inode->i_gid; - qpids[2] = de_srcdir->d_inode->i_uid; - qpids[3] = de_srcdir->d_inode->i_gid; - - /* if we are about to remove the target at first, pass the EA of - * that inode to client to perform and cleanup on OST */ - body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body)); - LASSERT(body != NULL); - - /* child orphan sem protects orphan_dec_test && is_orphan race */ - MDS_DOWN_READ_ORPHAN_SEM(new_inode); - cleanup_phase = 3; /* MDS_UP_READ_ORPHAN_SEM(new_inode) when finished */ - - if ((S_ISDIR(new_inode->i_mode) && new_inode->i_nlink == 2) || - new_inode->i_nlink == 1) { - if (mds_orphan_open_count(new_inode) > 0) { - /* need to lock pending_dir before transaction */ - LOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode); - cleanup_phase = 4; /* UNLOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode); */ - } else if (S_ISREG(new_inode->i_mode)) { - mds_pack_inode2fid(&body->fid1, new_inode); - mds_pack_inode2body(body, new_inode); - mds_pack_md(obd, req->rq_repmsg, offset + 1, body, - new_inode, MDS_PACK_MD_LOCK, 0); - } - } - -no_unlink: - OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_RENAME_WRITE, - de_srcdir->d_inode->i_sb); - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) - /* Check if we are moving old entry into its child. 2.6 does not - check for this in vfs_rename() anymore */ - if (is_subdir(de_new, de_old)) - GOTO(cleanup, rc = -EINVAL); -#endif - - lmm = lustre_msg_buf(req->rq_repmsg, offset + 1, 0); - handle = fsfilt_start_log(obd, de_tgtdir->d_inode, FSFILT_OP_RENAME, - NULL, le32_to_cpu(lmm->lmm_stripe_count)); - - if (IS_ERR(handle)) - GOTO(cleanup, rc = PTR_ERR(handle)); - - lock_kernel(); - de_old->d_fsdata = req; - de_new->d_fsdata = req; - - rc = vfs_rename(de_srcdir->d_inode, de_old, de_tgtdir->d_inode, de_new); - unlock_kernel(); - - if (rc == 0 && new_inode != NULL && new_inode->i_nlink == 0) { - if (mds_orphan_open_count(new_inode) > 0) - rc = mds_orphan_add_link(rec, obd, de_new); - - if (rc == 1) - GOTO(cleanup, rc = 0); - - if (!S_ISREG(new_inode->i_mode)) - GOTO(cleanup, rc); - - if (!(body->valid & OBD_MD_FLEASIZE)) { - body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | - OBD_MD_FLATIME | OBD_MD_FLMTIME); - } else if (mds_log_op_unlink(obd, - lustre_msg_buf(req->rq_repmsg, - offset + 1, 0), - lustre_msg_buflen(req->rq_repmsg, - offset + 1), - lustre_msg_buf(req->rq_repmsg, - offset + 2, 0), - lustre_msg_buflen(req->rq_repmsg, - offset + 2)) - > 0) { - body->valid |= OBD_MD_FLCOOKIE; - } - } - - GOTO(cleanup, rc); -cleanup: - rc = mds_finish_transno(mds, de_tgtdir ? de_tgtdir->d_inode : NULL, - handle, req, rc, 0, 0); - - switch (cleanup_phase) { - case 4: - UNLOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode); - case 3: - MDS_UP_READ_ORPHAN_SEM(new_inode); - case 2: - iput(new_inode); - case 1: - if (rc) { - if (lock_count == 4) - ldlm_lock_decref(&(dlm_handles[3]), LCK_EX); - ldlm_lock_decref(&(dlm_handles[2]), LCK_EX); - ldlm_lock_decref(&(dlm_handles[1]), LCK_EX); - ldlm_lock_decref(&(dlm_handles[0]), LCK_EX); - } else { - if (lock_count == 4) - ptlrpc_save_lock(req,&(dlm_handles[3]), LCK_EX); - ptlrpc_save_lock(req, &(dlm_handles[2]), LCK_EX); - ptlrpc_save_lock(req, &(dlm_handles[1]), LCK_EX); - ptlrpc_save_lock(req, &(dlm_handles[0]), LCK_EX); - } - l_dput(de_new); - l_dput(de_old); - l_dput(de_tgtdir); - l_dput(de_srcdir); - case 0: - break; - default: - CERROR("invalid cleanup_phase %d\n", cleanup_phase); - LBUG(); - } - req->rq_status = rc; - - /* acquire/release qunit */ - lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc, - FSFILT_OP_RENAME); - return 0; -} - -typedef int (*mds_reinter)(struct mds_update_record *, int offset, - struct ptlrpc_request *, struct lustre_handle *); - -static mds_reinter reinters[REINT_MAX] = { - [REINT_SETATTR] mds_reint_setattr, - [REINT_CREATE] mds_reint_create, - [REINT_LINK] mds_reint_link, - [REINT_UNLINK] mds_reint_unlink, - [REINT_RENAME] mds_reint_rename, - [REINT_OPEN] mds_open -}; - -int mds_reint_rec(struct mds_update_record *rec, int offset, - struct ptlrpc_request *req, struct lustre_handle *lockh) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct mds_obd *mds = &obd->u.mds; - struct lvfs_run_ctxt saved; - int rc; -#ifdef CRAY_XT3 - gid_t fsgid = rec->ur_uc.luc_fsgid; -#endif - ENTRY; - -#ifdef CRAY_XT3 - if (req->rq_uid != LNET_UID_ANY) { - /* non-root local cluster client - * NB root's creds are believed... */ - LASSERT (req->rq_uid != 0); - rec->ur_uc.luc_fsuid = req->rq_uid; - rec->ur_uc.luc_cap = 0; - } -#endif - - /* get group info of this user */ - rec->ur_uc.luc_uce = upcall_cache_get_entry(mds->mds_group_hash, - rec->ur_uc.luc_fsuid, - rec->ur_uc.luc_fsgid, 2, - &rec->ur_uc.luc_suppgid1); - - if (IS_ERR(rec->ur_uc.luc_uce)) { - rc = PTR_ERR(rec->ur_uc.luc_uce); - rec->ur_uc.luc_uce = NULL; - RETURN(rc); - } - - /* checked by unpacker */ - LASSERT(rec->ur_opcode < REINT_MAX && reinters[rec->ur_opcode] != NULL); - -#ifdef CRAY_XT3 - if (rec->ur_uc.luc_uce) - rec->ur_uc.luc_fsgid = rec->ur_uc.luc_uce->ue_primary; -#endif - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, &rec->ur_uc); - -#ifdef CRAY_XT3 - if (rec->ur_uc.luc_uce && fsgid != rec->ur_uc.luc_fsgid && - in_group_p(fsgid)) { - rec->ur_uc.luc_fsgid = fsgid; - current->fsgid = saved.luc.luc_fsgid = fsgid; - } -#endif - - rc = reinters[rec->ur_opcode] (rec, offset, req, lockh); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &rec->ur_uc); - - upcall_cache_put_entry(mds->mds_group_hash, rec->ur_uc.luc_uce); - RETURN(rc); -} diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c deleted file mode 100644 index 053c549152..0000000000 --- a/lustre/mds/mds_unlink_open.c +++ /dev/null @@ -1,286 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/mds/mds_orphan.c - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * Author: Peter Braam <braam@clusterfs.com> - * Author: Andreas Dilger <adilger@clusterfs.com> - * Author: Phil Schwan <phil@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -/* code for handling open unlinked files */ - -#define DEBUG_SUBSYSTEM S_MDS - -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> -#endif -#include <linux/module.h> -#include <linux/version.h> - -#include <libcfs/list.h> -#include <obd_class.h> -#include <lustre_fsfilt.h> -#include <lustre_mds.h> -#include <lustre_commit_confd.h> -#include <lvfs.h> - -#include "mds_internal.h" - -int mds_osc_destroy_orphan(struct obd_device *obd, - umode_t mode, - struct lov_mds_md *lmm, - int lmm_size, - struct llog_cookie *logcookies, - int log_unlink) -{ - struct mds_obd *mds = &obd->u.mds; - struct lov_stripe_md *lsm = NULL; - struct obd_trans_info oti = { 0 }; - struct obdo *oa; - int rc; - ENTRY; - - if (lmm_size == 0) - RETURN(0); - - rc = obd_unpackmd(mds->mds_osc_exp, &lsm, lmm, lmm_size); - if (rc < 0) { - CERROR("Error unpack md %p\n", lmm); - RETURN(rc); - } else { - LASSERT(rc >= sizeof(*lsm)); - rc = 0; - } - - rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm); - if (rc) - GOTO(out_free_memmd, rc); - - OBDO_ALLOC(oa); - if (oa == NULL) - GOTO(out_free_memmd, rc = -ENOMEM); - oa->o_id = lsm->lsm_object_id; - oa->o_mode = mode & S_IFMT; - oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE; - - if (log_unlink && logcookies) { - oa->o_valid |= OBD_MD_FLCOOKIE; - oti.oti_logcookies = logcookies; - } - rc = obd_destroy(mds->mds_osc_exp, oa, lsm, &oti, obd->obd_self_export); - OBDO_FREE(oa); - if (rc) - CDEBUG(D_INODE, "destroy orphan objid 0x"LPX64" on ost error " - "%d\n", lsm->lsm_object_id, rc); -out_free_memmd: - obd_free_memmd(mds->mds_osc_exp, &lsm); - RETURN(rc); -} - -static int mds_unlink_orphan(struct obd_device *obd, struct dentry *dchild, - struct inode *inode, struct inode *pending_dir) -{ - struct mds_obd *mds = &obd->u.mds; - struct lov_mds_md *lmm = NULL; - struct llog_cookie *logcookies = NULL; - int lmm_size, log_unlink = 0, cookie_size = 0; - void *handle = NULL; - umode_t mode; - int rc, err; - ENTRY; - - LASSERT(mds->mds_osc_obd != NULL); - - /* We don't need to do any of these other things for orhpan dirs, - * especially not mds_get_md (may get a default LOV EA, bug 4554) */ - mode = inode->i_mode; - if (S_ISDIR(mode)) { - rc = vfs_rmdir(pending_dir, dchild); - if (rc) - CERROR("error %d unlinking dir %*s from PENDING\n", - rc, dchild->d_name.len, dchild->d_name.name); - RETURN(rc); - } - - lmm_size = mds->mds_max_mdsize; - OBD_ALLOC(lmm, lmm_size); - if (lmm == NULL) - RETURN(-ENOMEM); - - rc = mds_get_md(obd, inode, lmm, &lmm_size, 1, 0); - if (rc < 0) - GOTO(out_free_lmm, rc); - - handle = fsfilt_start_log(obd, pending_dir, FSFILT_OP_UNLINK, NULL, - le32_to_cpu(lmm->lmm_stripe_count)); - if (IS_ERR(handle)) { - rc = PTR_ERR(handle); - CERROR("error fsfilt_start: %d\n", rc); - handle = NULL; - GOTO(out_free_lmm, rc); - } - - rc = vfs_unlink(pending_dir, dchild); - if (rc) { - CERROR("error %d unlinking orphan %.*s from PENDING\n", - rc, dchild->d_name.len, dchild->d_name.name); - } else if (lmm_size) { - cookie_size = mds_get_cookie_size(obd, lmm); - OBD_ALLOC(logcookies, cookie_size); - if (logcookies == NULL) - rc = -ENOMEM; - else if (mds_log_op_unlink(obd, lmm,lmm_size,logcookies, - cookie_size) > 0) - log_unlink = 1; - } - - err = fsfilt_commit(obd, pending_dir, handle, 0); - if (err) { - CERROR("error committing orphan unlink: %d\n", err); - if (!rc) - rc = err; - } else if (!rc) { - rc = mds_osc_destroy_orphan(obd, mode, lmm, lmm_size, - logcookies, log_unlink); - } - - if (logcookies != NULL) - OBD_FREE(logcookies, cookie_size); -out_free_lmm: - OBD_FREE(lmm, mds->mds_max_mdsize); - RETURN(rc); -} - -/* Delete inodes which were previously open-unlinked but were not reopened - * during MDS recovery for whatever reason (e.g. client also failed, recovery - * aborted, etc). */ -int mds_cleanup_pending(struct obd_device *obd) -{ - struct mds_obd *mds = &obd->u.mds; - struct lvfs_run_ctxt saved; - struct file *file; - struct dentry *dchild, *dentry; - struct vfsmount *mnt; - struct inode *child_inode, *pending_dir = mds->mds_pending_dir->d_inode; - struct l_linux_dirent *dirent, *n; - struct list_head dentry_list; - char d_name[LL_FID_NAMELEN]; - unsigned long inum; - int i = 0, rc = 0, item = 0, namlen; - ENTRY; - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - /* dentry and mnt ref dropped in dentry_open() on error, or - * in filp_close() if dentry_open() succeeds */ - dentry = dget(mds->mds_pending_dir); - if (IS_ERR(dentry)) - GOTO(err_pop, rc = PTR_ERR(dentry)); - mnt = mntget(mds->mds_vfsmnt); - if (IS_ERR(mnt)) - GOTO(err_mntget, rc = PTR_ERR(mnt)); - - file = dentry_open(mds->mds_pending_dir, mds->mds_vfsmnt, - O_RDONLY | O_LARGEFILE); - if (IS_ERR(file)) - GOTO(err_pop, rc = PTR_ERR(file)); - - INIT_LIST_HEAD(&dentry_list); - rc = l_readdir(file, &dentry_list); - filp_close(file, 0); - if (rc < 0) - GOTO(err_out, rc); - - list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) { - i++; - list_del(&dirent->lld_list); - - namlen = strlen(dirent->lld_name); - LASSERT(sizeof(d_name) >= namlen + 1); - strcpy(d_name, dirent->lld_name); - inum = dirent->lld_ino; - OBD_FREE(dirent, sizeof(*dirent)); - - CDEBUG(D_INODE, "entry %d of PENDING DIR: %s\n", i, d_name); - - if (((namlen == 1) && !strcmp(d_name, ".")) || - ((namlen == 2) && !strcmp(d_name, "..")) || inum == 0) - continue; - - LOCK_INODE_MUTEX(pending_dir); - dchild = lookup_one_len(d_name, mds->mds_pending_dir, namlen); - if (IS_ERR(dchild)) { - UNLOCK_INODE_MUTEX(pending_dir); - GOTO(err_out, rc = PTR_ERR(dchild)); - } - if (!dchild->d_inode) { - CWARN("%s: orphan %s has already been removed\n", - obd->obd_name, d_name); - GOTO(next, rc = 0); - } - - if (is_bad_inode(dchild->d_inode)) { - CERROR("%s: bad orphan inode found %lu/%u\n", - obd->obd_name, dchild->d_inode->i_ino, - dchild->d_inode->i_generation); - GOTO(next, rc = -ENOENT); - } - - child_inode = dchild->d_inode; - MDS_DOWN_READ_ORPHAN_SEM(child_inode); - if (mds_inode_is_orphan(child_inode) && - mds_orphan_open_count(child_inode)) { - MDS_UP_READ_ORPHAN_SEM(child_inode); - CWARN("%s: orphan %s re-opened during recovery\n", - obd->obd_name, d_name); - GOTO(next, rc = 0); - } - MDS_UP_READ_ORPHAN_SEM(child_inode); - - rc = mds_unlink_orphan(obd, dchild, child_inode, pending_dir); - CDEBUG(D_INODE, "%s: removed orphan %s: rc %d\n", - obd->obd_name, d_name, rc); - if (rc == 0) - item++; - else - rc = 0; -next: - l_dput(dchild); - UNLOCK_INODE_MUTEX(pending_dir); - } - rc = 0; -err_out: - list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) { - list_del(&dirent->lld_list); - OBD_FREE(dirent, sizeof(*dirent)); - } -err_pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - if (item > 0) - CWARN("%s: removed %d pending open-unlinked files\n", - obd->obd_name, item); - RETURN(rc); - -err_mntget: - l_dput(mds->mds_pending_dir); - goto err_pop; -} diff --git a/lustre/mds/mds_xattr.c b/lustre/mds/mds_xattr.c deleted file mode 100644 index 6f663edc00..0000000000 --- a/lustre/mds/mds_xattr.c +++ /dev/null @@ -1,366 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * linux/mds/mds_xattr.c - * Lustre Metadata Server (mds) extended attributes handling - * - * Copyright (C) 2004-2005 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MDS - -#include <linux/fs.h> -#include <obd_support.h> -#include <obd_class.h> -#include <obd.h> -#include <lustre_lib.h> -#include <lustre/lustre_idl.h> -#include <lustre_mds.h> -#include <lustre_dlm.h> -#include <lustre_fsfilt.h> -#include <lustre_ucache.h> - -#include "mds_internal.h" - -#ifndef XATTR_NAME_ACL_ACCESS -#define XATTR_NAME_ACL_ACCESS "system.posix_acl_access" -#endif - -static int mds_getxattr_pack_msg(struct ptlrpc_request *req, - struct dentry *de, - struct mds_body *body) -{ - struct inode *inode = de->d_inode; - char *xattr_name; - int size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) }; - int bufcnt = 2, rc = -EOPNOTSUPP, rc2; - - if (inode == NULL) - return -ENOENT; - - if (body->valid & OBD_MD_FLXATTR) { - xattr_name = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF+1,0); - if (!xattr_name) { - CERROR("can't extract xattr name\n"); - return -EFAULT; - } - - if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_XATTR) && - (strncmp(xattr_name, "user.", 5) == 0)) - return -EOPNOTSUPP; - - if (inode->i_op && inode->i_op->getxattr) - rc = inode->i_op->getxattr(de, xattr_name, NULL, 0); - } else if (body->valid & OBD_MD_FLXATTRLS) { - if (inode->i_op && inode->i_op->listxattr) - rc = inode->i_op->listxattr(de, NULL, 0); - } else { - CERROR("valid bits: "LPX64"\n", body->valid); - return -EINVAL; - } - - if (rc < 0) { - if (rc != -ENODATA && rc != -EOPNOTSUPP) - CWARN("get inode %lu EA size error: %d\n", - inode->i_ino, rc); - bufcnt = 1; - } else { - size[bufcnt++] = min_t(int, body->eadatasize, rc); - } - - if (OBD_FAIL_CHECK(OBD_FAIL_MDS_GETXATTR_PACK)) { - CERROR("failed MDS_GETXATTR_PACK test\n"); - req->rq_status = -ENOMEM; - return -ENOMEM; - } - - rc2 = lustre_pack_reply(req, bufcnt, size, NULL); - if (rc2) - return rc2; - - if (rc < 0) - req->rq_status = rc; - return 0; -} - -static int mds_getxattr_internal(struct obd_device *obd, - struct dentry *dentry, - struct ptlrpc_request *req, - struct mds_body *reqbody) -{ - struct mds_body *repbody; - struct inode *inode = dentry->d_inode; - char *xattr_name; - void *buf = NULL; - int buflen, rc = -EOPNOTSUPP; - ENTRY; - - if (inode == NULL) - GOTO(out, rc = -ENOENT); - - repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*repbody)); - LASSERT(repbody != NULL); - - buflen = lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 1); - if (buflen) - buf = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, buflen); - - if (reqbody->valid & OBD_MD_FLXATTR) { - xattr_name = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF+1,0); - DEBUG_REQ(D_INODE, req, "getxattr %s", xattr_name); - - if (inode->i_op && inode->i_op->getxattr) { - lock_24kernel(); - rc = inode->i_op->getxattr(dentry, xattr_name, - buf, buflen); - unlock_24kernel(); - } - - if (rc < 0 && rc != -ENODATA && rc != -EOPNOTSUPP && - rc != -ERANGE) - CDEBUG(D_OTHER, "getxattr failed: %d\n", rc); - } else if (reqbody->valid & OBD_MD_FLXATTRLS) { - DEBUG_REQ(D_INODE, req, "listxattr"); - - if (inode->i_op && inode->i_op->listxattr) { - lock_24kernel(); - rc = inode->i_op->listxattr(dentry, buf, buflen); - unlock_24kernel(); - } - if (rc < 0) - CDEBUG(D_OTHER, "listxattr failed: %d\n", rc); - } else - LBUG(); - - if (rc >= 0) { - repbody->eadatasize = rc; - rc = 0; - } -out: - req->rq_status = rc; - RETURN(0); -} - -int mds_getxattr(struct ptlrpc_request *req) -{ - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct lvfs_run_ctxt saved; - struct dentry *de; - struct mds_body *body; - struct lvfs_ucred uc = { NULL, }; - int rc = 0; - ENTRY; - - mds_counter_incr(req->rq_export, LPROC_MDS_GETXATTR); - - body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) - RETURN(-EFAULT); - - rc = mds_init_ucred(&uc, req, REQ_REC_OFF); - if (rc) - GOTO(out_ucred, rc); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); - de = mds_fid2dentry(mds, &body->fid1, NULL); - if (IS_ERR(de)) { - rc = req->rq_status = PTR_ERR(de); - GOTO(out_pop, rc); - } - - rc = mds_getxattr_pack_msg(req, de, body); - if (rc != 0 || req->rq_status) - GOTO(out_dput, rc); - - rc = mds_getxattr_internal(obd, de, req, body); - -out_dput: - l_dput(de); -out_pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); -out_ucred: - mds_exit_ucred(&uc, mds); - return rc; -} - -/* - * alwasy return 0, and set req->rq_status as error number in case - * of failures. - */ -static -int mds_setxattr_internal(struct ptlrpc_request *req, struct mds_body *body) -{ - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct dentry *de; - struct inode *inode = NULL; - struct lustre_handle lockh; - void *handle = NULL; - char *xattr_name; - char *xattr = NULL; - int xattrlen; - int rc = -EOPNOTSUPP, err = 0; - __u64 lockpart; - ENTRY; - - LASSERT(body); - - DEBUG_REQ(D_INODE, req, "setxattr "LPU64"/%u", - body->fid1.id, body->fid1.generation); - - MDS_CHECK_RESENT(req, mds_reconstruct_generic(req)); - - lockpart = MDS_INODELOCK_UPDATE; - - /* various sanity check for xattr name */ - xattr_name = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF + 1, 0); - if (!xattr_name) { - CERROR("can't extract xattr name\n"); - GOTO(out, rc = -EPROTO); - } - - DEBUG_REQ(D_INODE, req, "%sxattr %s", - body->valid & OBD_MD_FLXATTR ? "set" : "remove", - xattr_name); - - if (strncmp(xattr_name, "trusted.", 8) == 0) { - if (strcmp(xattr_name + 8, XATTR_LUSTRE_MDS_LOV_EA) == 0) - GOTO(out, rc = -EACCES); - } - - if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_XATTR) && - (strncmp(xattr_name, "user.", 5) == 0)) { - GOTO(out, rc = -EOPNOTSUPP); - } - - if (!strcmp(xattr_name, XATTR_NAME_ACL_ACCESS)) - lockpart |= MDS_INODELOCK_LOOKUP; - - de = mds_fid2locked_dentry(obd, &body->fid1, NULL, LCK_EX, - &lockh, NULL, 0, lockpart); - if (IS_ERR(de)) - GOTO(out, rc = PTR_ERR(de)); - - inode = de->d_inode; - LASSERT(inode); - - OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_SETXATTR_WRITE, inode->i_sb); - - /* filter_op simply use setattr one */ - handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL); - if (IS_ERR(handle)) - GOTO(out_dput, rc = PTR_ERR(handle)); - - if (body->valid & OBD_MD_FLXATTR) { - if (inode->i_op && inode->i_op->setxattr) { - if (lustre_msg_bufcount(req->rq_reqmsg) < 4) { - CERROR("no xattr data supplied\n"); - GOTO(out_trans, rc = -EFAULT); - } - - xattrlen = lustre_msg_buflen(req->rq_reqmsg, - REQ_REC_OFF + 2); - if (xattrlen) - xattr = lustre_msg_buf(req->rq_reqmsg, - REQ_REC_OFF+2, xattrlen); - - LOCK_INODE_MUTEX(inode); - lock_24kernel(); - rc = inode->i_op->setxattr(de, xattr_name, xattr, - xattrlen, body->flags); - unlock_24kernel(); - UNLOCK_INODE_MUTEX(inode); - } - } else if (body->valid & OBD_MD_FLXATTRRM) { - if (inode->i_op && inode->i_op->removexattr) { - LOCK_INODE_MUTEX(inode); - lock_24kernel(); - rc = inode->i_op->removexattr(de, xattr_name); - unlock_24kernel(); - UNLOCK_INODE_MUTEX(inode); - } - } else { - CERROR("valid bits: "LPX64"\n", body->valid); - rc = -EINVAL; - } - - LASSERT(rc <= 0); -out_trans: - err = mds_finish_transno(mds, inode, handle, req, rc, 0, 0); - -out_dput: - l_dput(de); - if (rc) - ldlm_lock_decref(&lockh, LCK_EX); - else - ptlrpc_save_lock (req, &lockh, LCK_EX); - - if (err && !rc) - rc = err; -out: - req->rq_status = rc; - return 0; -} - -int mds_setxattr(struct ptlrpc_request *req) -{ - struct mds_obd *mds = mds_req2mds(req); - struct obd_device *obd = req->rq_export->exp_obd; - struct lvfs_run_ctxt saved; - struct mds_body *body; - struct lvfs_ucred uc = { NULL, }; - int rc; - ENTRY; - - mds_counter_incr(req->rq_export, LPROC_MDS_SETXATTR); - - body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) - RETURN(-EFAULT); - - if (lustre_msg_bufcount(req->rq_reqmsg) < 3) - RETURN(-EFAULT); - - rc = mds_init_ucred(&uc, req, REQ_REC_OFF); - if (rc) - GOTO(out_ucred, rc); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); - - rc = lustre_pack_reply(req, 1, NULL, NULL); - if (rc) - GOTO(out_pop, rc); - - rc = mds_setxattr_internal(req, body); - -out_pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); -out_ucred: - mds_exit_ucred(&uc, mds); - return rc; -} diff --git a/lustre/mgc/.cvsignore b/lustre/mgc/.cvsignore deleted file mode 100644 index d5103fafd7..0000000000 --- a/lustre/mgc/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -.deps -TAGS -.*.cmd -autoMakefile.in -autoMakefile -*.ko -*.mod.c -.*.o.flags -.tmp_versions -.depend diff --git a/lustre/mgc/Makefile.in b/lustre/mgc/Makefile.in deleted file mode 100644 index 8adca32e59..0000000000 --- a/lustre/mgc/Makefile.in +++ /dev/null @@ -1,4 +0,0 @@ -MODULES := mgc -mgc-objs := mgc_request.o lproc_mgc.o - -@INCLUDE_RULES@ diff --git a/lustre/mgc/autoMakefile.am b/lustre/mgc/autoMakefile.am deleted file mode 100644 index 8b88691483..0000000000 --- a/lustre/mgc/autoMakefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2006 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -if LIBLUSTRE -noinst_LIBRARIES = libmgc.a -libmgc_a_SOURCES = libmgc.c -libmgc_a_CPPFLAGS = $(LLCPPFLAGS) -libmgc_a_CFLAGS = $(LLCFLAGS) -endif - -if MODULES -modulefs_DATA = mgc$(KMODEXT) -endif - -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ -DIST_SOURCES := $(mgc-objs:%.o=%.c) libmgc.c mgc_internal.h diff --git a/lustre/mgc/libmgc.c b/lustre/mgc/libmgc.c deleted file mode 100644 index b72e8bbc62..0000000000 --- a/lustre/mgc/libmgc.c +++ /dev/null @@ -1,148 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/mgc/mgc_request.c - * Lustre Management Client - * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nathan Rutman <nathan@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ -/* Minimal MGC for liblustre: only used to read the config log from the MGS - at setup time, no updates. */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MGC - -#include <liblustre.h> - -#include <obd_class.h> -#include <lustre_dlm.h> -#include <lustre_log.h> -#include <lustre_fsfilt.h> -#include <lustre_disk.h> - -static int mgc_setup(struct obd_device *obd, obd_count len, void *buf) -{ - int rc; - ENTRY; - - ptlrpcd_addref(); - - rc = client_obd_setup(obd, len, buf); - if (rc) - GOTO(err_decref, rc); - - rc = obd_llog_init(obd, obd, 0, NULL, NULL); - if (rc) { - CERROR("failed to setup llogging subsystems\n"); - GOTO(err_cleanup, rc); - } - - RETURN(rc); - -err_cleanup: - client_obd_cleanup(obd); -err_decref: - ptlrpcd_decref(); - RETURN(rc); -} - -static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) -{ - int rc = 0; - ENTRY; - - switch (stage) { - case OBD_CLEANUP_EARLY: - case OBD_CLEANUP_EXPORTS: - break; - case OBD_CLEANUP_SELF_EXP: - rc = obd_llog_finish(obd, 0); - if (rc != 0) - CERROR("failed to cleanup llogging subsystems\n"); - break; - case OBD_CLEANUP_OBD: - break; - } - RETURN(rc); -} - -static int mgc_cleanup(struct obd_device *obd) -{ - struct client_obd *cli = &obd->u.cli; - int rc; - ENTRY; - - LASSERT(cli->cl_mgc_vfsmnt == NULL); - - ptlrpcd_decref(); - - rc = client_obd_cleanup(obd); - RETURN(rc); -} - -static int mgc_llog_init(struct obd_device *obd, struct obd_device *tgt, - int count, struct llog_catid *logid, - struct obd_uuid *uuid) -{ - struct llog_ctxt *ctxt; - int rc; - ENTRY; - - rc = llog_setup(obd, LLOG_CONFIG_REPL_CTXT, tgt, 0, NULL, - &llog_client_ops); - if (rc == 0) { - ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT); - ctxt->loc_imp = obd->u.cli.cl_import; - llog_ctxt_put(ctxt); - } - - RETURN(rc); -} - -static int mgc_llog_finish(struct obd_device *obd, int count) -{ - int rc; - ENTRY; - - rc = llog_cleanup(llog_get_context(obd, LLOG_CONFIG_REPL_CTXT)); - - RETURN(rc); -} - -struct obd_ops mgc_obd_ops = { - .o_owner = THIS_MODULE, - .o_setup = mgc_setup, - .o_precleanup = mgc_precleanup, - .o_cleanup = mgc_cleanup, - .o_add_conn = client_import_add_conn, - .o_del_conn = client_import_del_conn, - .o_connect = client_connect_import, - .o_disconnect = client_disconnect_export, - .o_llog_init = mgc_llog_init, - .o_llog_finish = mgc_llog_finish, -}; - -int __init mgc_init(void) -{ - return class_register_type(&mgc_obd_ops, NULL, LUSTRE_MGC_NAME); -} - diff --git a/lustre/mgc/lproc_mgc.c b/lustre/mgc/lproc_mgc.c deleted file mode 100644 index 1b1fd1289d..0000000000 --- a/lustre/mgc/lproc_mgc.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - */ -#define DEBUG_SUBSYSTEM S_CLASS - -#include <linux/version.h> -#include <linux/vfs.h> -#include <obd_class.h> -#include <lprocfs_status.h> - -#ifdef LPROCFS - -static struct lprocfs_vars lprocfs_mgc_obd_vars[] = { - { "uuid", lprocfs_rd_uuid, 0, 0 }, - { "ping", 0, lprocfs_wr_ping, 0 }, - { "connect_flags", lprocfs_rd_connect_flags, 0, 0 }, - { "mgs_server_uuid", lprocfs_rd_server_uuid, 0, 0 }, - { "mgs_conn_uuid", lprocfs_rd_conn_uuid, 0, 0 }, - { 0 } -}; - -static struct lprocfs_vars lprocfs_mgc_module_vars[] = { - { "num_refs", lprocfs_rd_numrefs, 0, 0 }, - { 0 } -}; - -void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars) -{ - lvars->module_vars = lprocfs_mgc_module_vars; - lvars->obd_vars = lprocfs_mgc_obd_vars; -} -#endif /* LPROCFS */ diff --git a/lustre/mgc/mgc_internal.h b/lustre/mgc/mgc_internal.h deleted file mode 100644 index 1edf122e3e..0000000000 --- a/lustre/mgc/mgc_internal.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _MGC_INTERNAL_H -#define _MGC_INTERNAL_H - -#include <libcfs/kp30.h> -#include <lustre/lustre_idl.h> -#include <lustre_lib.h> -#include <lustre_dlm.h> -#include <lustre_log.h> -#include <lustre_export.h> - -#ifdef LPROCFS -void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars); -#else -static void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars) -{ - memset(lvars, 0, sizeof(*lvars)); -} -#endif /* LPROCFS */ - -#endif /* _MGC_INTERNAL_H */ diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c deleted file mode 100644 index e1ab586eb1..0000000000 --- a/lustre/mgc/mgc_request.c +++ /dev/null @@ -1,1285 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/mgc/mgc_request.c - * Lustre Management Client - * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nathan Rutman <nathan@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MGC -#define D_MGC D_CONFIG /*|D_WARNING*/ - -#ifdef __KERNEL__ -# include <linux/module.h> -# include <linux/pagemap.h> -# include <linux/miscdevice.h> -# include <linux/init.h> -#else -# include <liblustre.h> -#endif - -#include <obd_class.h> -#include <lustre_dlm.h> -#include <lprocfs_status.h> -#include <lustre_log.h> -#include <lustre_fsfilt.h> -#include <lustre_disk.h> -#include "mgc_internal.h" - -static int mgc_name2resid(char *name, int len, struct ldlm_res_id *res_id) -{ - __u64 resname = 0; - - if (len > 8) { - CERROR("name too long: %s\n", name); - return -EINVAL; - } - if (len <= 0) { - CERROR("missing name: %s\n", name); - return -EINVAL; - } - memcpy(&resname, name, len); - - memset(res_id, 0, sizeof(*res_id)); - - /* Always use the same endianness for the resid */ - res_id->name[0] = cpu_to_le64(resname); - CDEBUG(D_MGC, "log %s to resid "LPX64"/"LPX64" (%.8s)\n", name, - res_id->name[0], res_id->name[1], (char *)&res_id->name[0]); - return 0; -} - -int mgc_fsname2resid(char *fsname, struct ldlm_res_id *res_id) -{ - /* fsname is at most 8 chars long, maybe contain "-". - * e.g. "lustre", "CFS-000" */ - return mgc_name2resid(fsname, strlen(fsname), res_id); -} -EXPORT_SYMBOL(mgc_fsname2resid); - -int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id) -{ - char *name_end; - int len; - - /* logname consists of "fsname-nodetype". - * e.g. "lustre-MDT0001", "CFS-000-client" */ - name_end = strrchr(logname, '-'); - LASSERT(name_end); - len = name_end - logname; - return mgc_name2resid(logname, len, res_id); -} - - -/********************** config llog list **********************/ -static struct list_head config_llog_list = LIST_HEAD_INIT(config_llog_list); -static spinlock_t config_list_lock = SPIN_LOCK_UNLOCKED; - -/* Take a reference to a config log */ -static int config_log_get(struct config_llog_data *cld) -{ - ENTRY; - if (cld->cld_stopping) - RETURN(1); - atomic_inc(&cld->cld_refcount); - CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname, - atomic_read(&cld->cld_refcount)); - RETURN(0); -} - -/* Drop a reference to a config log. When no longer referenced, - we can free the config log data */ -static void config_log_put(struct config_llog_data *cld) -{ - ENTRY; - CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname, - atomic_read(&cld->cld_refcount)); - if (atomic_dec_and_test(&cld->cld_refcount)) { - CDEBUG(D_MGC, "dropping config log %s\n", cld->cld_logname); - class_export_put(cld->cld_mgcexp); - spin_lock(&config_list_lock); - list_del(&cld->cld_list_chain); - spin_unlock(&config_list_lock); - OBD_FREE(cld->cld_logname, strlen(cld->cld_logname) + 1); - if (cld->cld_cfg.cfg_instance != NULL) - OBD_FREE(cld->cld_cfg.cfg_instance, - strlen(cld->cld_cfg.cfg_instance) + 1); - OBD_FREE(cld, sizeof(*cld)); - } - EXIT; -} - -/* Find a config log by name */ -static struct config_llog_data *config_log_find(char *logname, - struct config_llog_instance *cfg) -{ - struct list_head *tmp; - struct config_llog_data *cld; - char *logid = logname; - int match_instance = 0; - ENTRY; - - if (cfg && cfg->cfg_instance) { - match_instance++; - logid = cfg->cfg_instance; - } - if (!logid) { - CERROR("No log specified\n"); - RETURN(ERR_PTR(-EINVAL)); - } - - spin_lock(&config_list_lock); - list_for_each(tmp, &config_llog_list) { - cld = list_entry(tmp, struct config_llog_data, cld_list_chain); - if (match_instance && cld->cld_cfg.cfg_instance && - strcmp(logid, cld->cld_cfg.cfg_instance) == 0) - goto out_found; - if (!match_instance && - strcmp(logid, cld->cld_logname) == 0) - goto out_found; - } - spin_unlock(&config_list_lock); - - CDEBUG(D_CONFIG, "can't get log %s\n", logid); - RETURN(ERR_PTR(-ENOENT)); -out_found: - atomic_inc(&cld->cld_refcount); - spin_unlock(&config_list_lock); - RETURN(cld); -} - -/* Add this log to our list of active logs. - We have one active log per "mount" - client instance or servername. - Each instance may be at a different point in the log. */ -static int config_log_add(char *logname, struct config_llog_instance *cfg, - struct super_block *sb) -{ - struct config_llog_data *cld; - struct lustre_sb_info *lsi = s2lsi(sb); - int rc; - ENTRY; - - CDEBUG(D_MGC, "adding config log %s:%s\n", logname, cfg->cfg_instance); - - OBD_ALLOC(cld, sizeof(*cld)); - if (!cld) - RETURN(-ENOMEM); - OBD_ALLOC(cld->cld_logname, strlen(logname) + 1); - if (!cld->cld_logname) { - OBD_FREE(cld, sizeof(*cld)); - RETURN(-ENOMEM); - } - strcpy(cld->cld_logname, logname); - cld->cld_cfg = *cfg; - cld->cld_cfg.cfg_last_idx = 0; - cld->cld_cfg.cfg_flags = 0; - cld->cld_cfg.cfg_sb = sb; - atomic_set(&cld->cld_refcount, 1); - - /* Keep the mgc around until we are done */ - cld->cld_mgcexp = class_export_get(lsi->lsi_mgc->obd_self_export); - - if (cfg->cfg_instance != NULL) { - OBD_ALLOC(cld->cld_cfg.cfg_instance, - strlen(cfg->cfg_instance) + 1); - strcpy(cld->cld_cfg.cfg_instance, cfg->cfg_instance); - } - rc = mgc_logname2resid(logname, &cld->cld_resid); - spin_lock(&config_list_lock); - list_add(&cld->cld_list_chain, &config_llog_list); - spin_unlock(&config_list_lock); - - if (rc) { - config_log_put(cld); - RETURN(rc); - } - - RETURN(rc); -} - -/* Stop watching for updates on this log. */ -static int config_log_end(char *logname, struct config_llog_instance *cfg) -{ - struct config_llog_data *cld; - int rc = 0; - ENTRY; - - cld = config_log_find(logname, cfg); - if (IS_ERR(cld)) - RETURN(PTR_ERR(cld)); - /* drop the ref from the find */ - config_log_put(cld); - - cld->cld_stopping = 1; - /* drop the start ref */ - config_log_put(cld); - CDEBUG(D_MGC, "end config log %s (%d)\n", logname ? logname : "client", - rc); - RETURN(rc); -} - -/* reenqueue any lost locks */ -#define RQ_RUNNING 0x1 -#define RQ_NOW 0x2 -#define RQ_LATER 0x4 -#define RQ_STOP 0x8 -static int rq_state = 0; -static cfs_waitq_t rq_waitq; - -static int mgc_process_log(struct obd_device *mgc, - struct config_llog_data *cld); - -static int mgc_requeue_thread(void *data) -{ - struct l_wait_info lwi_now, lwi_later; - struct config_llog_data *cld, *n; - char name[] = "ll_cfg_requeue"; - int rc = 0; - ENTRY; - - ptlrpc_daemonize(name); - - CDEBUG(D_MGC, "Starting requeue thread\n"); - - lwi_later = LWI_TIMEOUT(60 * HZ, NULL, NULL); - l_wait_event(rq_waitq, rq_state & (RQ_NOW | RQ_STOP), &lwi_later); - - /* Keep trying failed locks periodically */ - spin_lock(&config_list_lock); - while (rq_state & (RQ_NOW | RQ_LATER)) { - /* Any new or requeued lostlocks will change the state */ - rq_state &= ~(RQ_NOW | RQ_LATER); - spin_unlock(&config_list_lock); - - /* Always wait a few seconds to allow the server who - caused the lock revocation to finish its setup, plus some - random so everyone doesn't try to reconnect at once. */ - lwi_now = LWI_TIMEOUT(3 * HZ + (ll_rand() & 0xff) * (HZ / 100), - NULL, NULL); - l_wait_event(rq_waitq, rq_state & RQ_STOP, &lwi_now); - - spin_lock(&config_list_lock); - list_for_each_entry_safe(cld, n, &config_llog_list, - cld_list_chain) { - spin_unlock(&config_list_lock); - - if (cld->cld_lostlock) { - CDEBUG(D_MGC, "updating log %s\n", - cld->cld_logname); - cld->cld_lostlock = 0; - rc = mgc_process_log(cld->cld_mgcexp->exp_obd, - cld); - /* Whether we enqueued again or not in - mgc_process_log, we're done with the ref - from the old enqueue */ - config_log_put(cld); - } - - spin_lock(&config_list_lock); - } - spin_unlock(&config_list_lock); - - /* Wait a bit to see if anyone else needs a requeue */ - l_wait_event(rq_waitq, rq_state & (RQ_NOW | RQ_STOP), - &lwi_later); - spin_lock(&config_list_lock); - } - /* spinlock and while guarantee RQ_NOW and RQ_LATER are not set */ - rq_state &= ~RQ_RUNNING; - spin_unlock(&config_list_lock); - - CDEBUG(D_MGC, "Ending requeue thread\n"); - RETURN(rc); -} - -/* Add a cld to the list to requeue. Start the requeue thread if needed. - We are responsible for dropping the config log reference from here on out. */ -static int mgc_requeue_add(struct config_llog_data *cld, int later) -{ - int rc = 0; - - CDEBUG(D_INFO, "log %s: requeue (l=%d r=%d sp=%d st=%x)\n", - cld->cld_logname, later, atomic_read(&cld->cld_refcount), - cld->cld_stopping, rq_state); - - /* Hold lock for rq_state */ - spin_lock(&config_list_lock); - cld->cld_lostlock = 1; - - if (cld->cld_stopping || (rq_state & RQ_STOP)) { - spin_unlock(&config_list_lock); - config_log_put(cld); - RETURN(0); - } - - if (!(rq_state & RQ_RUNNING)) { - LASSERT(rq_state == 0); - rq_state = RQ_RUNNING | (later ? RQ_LATER : RQ_NOW); - spin_unlock(&config_list_lock); - rc = cfs_kernel_thread(mgc_requeue_thread, 0, - CLONE_VM | CLONE_FILES); - if (rc < 0) { - CERROR("log %s: cannot start requeue thread (%d)," - "no more log updates!\n", cld->cld_logname, rc); - /* Drop the ref, since the rq thread won't */ - cld->cld_lostlock = 0; - config_log_put(cld); - rq_state = 0; - RETURN(rc); - } - } else { - rq_state |= later ? RQ_LATER : RQ_NOW; - spin_unlock(&config_list_lock); - cfs_waitq_signal(&rq_waitq); - } - - RETURN(0); -} - -/********************** class fns **********************/ - -static int mgc_fs_setup(struct obd_device *obd, struct super_block *sb, - struct vfsmount *mnt) -{ - struct lvfs_run_ctxt saved; - struct lustre_sb_info *lsi = s2lsi(sb); - struct client_obd *cli = &obd->u.cli; - struct dentry *dentry; - char *label; - int err = 0; - ENTRY; - - LASSERT(lsi); - LASSERT(lsi->lsi_srv_mnt == mnt); - - /* The mgc fs exclusion sem. Only one fs can be setup at a time. */ - down(&cli->cl_mgc_sem); - - cleanup_group_info(); - - obd->obd_fsops = fsfilt_get_ops(MT_STR(lsi->lsi_ldd)); - if (IS_ERR(obd->obd_fsops)) { - up(&cli->cl_mgc_sem); - CERROR("No fstype %s rc=%ld\n", MT_STR(lsi->lsi_ldd), - PTR_ERR(obd->obd_fsops)); - RETURN(PTR_ERR(obd->obd_fsops)); - } - - cli->cl_mgc_vfsmnt = mnt; - fsfilt_setup(obd, mnt->mnt_sb); - - OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt); - obd->obd_lvfs_ctxt.pwdmnt = mnt; - obd->obd_lvfs_ctxt.pwd = mnt->mnt_root; - obd->obd_lvfs_ctxt.fs = get_ds(); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - dentry = lookup_one_len(MOUNT_CONFIGS_DIR, current->fs->pwd, - strlen(MOUNT_CONFIGS_DIR)); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - if (IS_ERR(dentry)) { - err = PTR_ERR(dentry); - CERROR("cannot lookup %s directory: rc = %d\n", - MOUNT_CONFIGS_DIR, err); - GOTO(err_ops, err); - } - cli->cl_mgc_configs_dir = dentry; - - /* We take an obd ref to insure that we can't get to mgc_cleanup - without calling mgc_fs_cleanup first. */ - class_incref(obd); - - label = fsfilt_get_label(obd, mnt->mnt_sb); - if (label) - CDEBUG(D_MGC, "MGC using disk labelled=%s\n", label); - - /* We keep the cl_mgc_sem until mgc_fs_cleanup */ - RETURN(0); - -err_ops: - fsfilt_put_ops(obd->obd_fsops); - obd->obd_fsops = NULL; - cli->cl_mgc_vfsmnt = NULL; - up(&cli->cl_mgc_sem); - RETURN(err); -} - -static int mgc_fs_cleanup(struct obd_device *obd) -{ - struct client_obd *cli = &obd->u.cli; - int rc = 0; - ENTRY; - - LASSERT(cli->cl_mgc_vfsmnt != NULL); - - if (cli->cl_mgc_configs_dir != NULL) { - struct lvfs_run_ctxt saved; - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - l_dput(cli->cl_mgc_configs_dir); - cli->cl_mgc_configs_dir = NULL; - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - class_decref(obd); - } - - cli->cl_mgc_vfsmnt = NULL; - if (obd->obd_fsops) - fsfilt_put_ops(obd->obd_fsops); - - up(&cli->cl_mgc_sem); - - RETURN(rc); -} - -static atomic_t mgc_count = ATOMIC_INIT(0); -static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) -{ - int rc = 0; - ENTRY; - - switch (stage) { - case OBD_CLEANUP_EARLY: - break; - case OBD_CLEANUP_EXPORTS: - if (atomic_dec_and_test(&mgc_count)) { - /* Kick the requeue waitq - cld's should all be - stopping */ - spin_lock(&config_list_lock); - rq_state |= RQ_STOP; - spin_unlock(&config_list_lock); - cfs_waitq_signal(&rq_waitq); - } - break; - case OBD_CLEANUP_SELF_EXP: - rc = obd_llog_finish(obd, 0); - if (rc != 0) - CERROR("failed to cleanup llogging subsystems\n"); - break; - case OBD_CLEANUP_OBD: - break; - } - RETURN(rc); -} - -static int mgc_cleanup(struct obd_device *obd) -{ - struct client_obd *cli = &obd->u.cli; - int rc; - ENTRY; - - LASSERT(cli->cl_mgc_vfsmnt == NULL); - - /* COMPAT_146 - old config logs may have added profiles we don't - know about */ - if (obd->obd_type->typ_refcnt <= 1) - /* Only for the last mgc */ - class_del_profiles(); - - lprocfs_obd_cleanup(obd); - ptlrpcd_decref(); - - rc = client_obd_cleanup(obd); - RETURN(rc); -} - -static int mgc_setup(struct obd_device *obd, obd_count len, void *buf) -{ - struct lprocfs_static_vars lvars; - int rc; - ENTRY; - - ptlrpcd_addref(); - - rc = client_obd_setup(obd, len, buf); - if (rc) - GOTO(err_decref, rc); - - rc = obd_llog_init(obd, obd, 0, NULL, NULL); - if (rc) { - CERROR("failed to setup llogging subsystems\n"); - GOTO(err_cleanup, rc); - } - - lprocfs_mgc_init_vars(&lvars); - lprocfs_obd_setup(obd, lvars.obd_vars); - - spin_lock(&config_list_lock); - atomic_inc(&mgc_count); - if (atomic_read(&mgc_count) == 1) { - rq_state &= ~RQ_STOP; - cfs_waitq_init(&rq_waitq); - } - spin_unlock(&config_list_lock); - - RETURN(rc); - -err_cleanup: - client_obd_cleanup(obd); -err_decref: - ptlrpcd_decref(); - RETURN(rc); -} - -/* based on ll_mdc_blocking_ast */ -static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, - void *data, int flag) -{ - struct lustre_handle lockh; - struct config_llog_data *cld = (struct config_llog_data *)data; - int rc = 0; - ENTRY; - - switch (flag) { - case LDLM_CB_BLOCKING: - /* mgs wants the lock, give it up... */ - LDLM_DEBUG(lock, "MGC blocking CB"); - ldlm_lock2handle(lock, &lockh); - rc = ldlm_cli_cancel(&lockh); - break; - case LDLM_CB_CANCELING: { - /* We've given up the lock, prepare ourselves to update. */ - LDLM_DEBUG(lock, "MGC cancel CB"); - - CDEBUG(D_MGC, "Lock res "LPX64" (%.8s)\n", - lock->l_resource->lr_name.name[0], - (char *)&lock->l_resource->lr_name.name[0]); - - if (!cld) { - CERROR("missing data, won't requeue\n"); - break; - } - /* Are we done with this log? */ - if (cld->cld_stopping) { - CDEBUG(D_MGC, "log %s: stopping, won't requeue\n", - cld->cld_logname); - config_log_put(cld); - break; - } - /* Make sure not to re-enqueue when the mgc is stopping - (we get called from client_disconnect_export) */ - if (!lock->l_conn_export || - !lock->l_conn_export->exp_obd->u.cli.cl_conn_count) { - CDEBUG(D_MGC, "log %s: disconnecting, won't requeue\n", - cld->cld_logname); - config_log_put(cld); - break; - } - /* Did we fail to get the lock? */ - if (lock->l_req_mode != lock->l_granted_mode) { - CDEBUG(D_MGC, "log %s: original grant failed, will " - "requeue later\n", cld->cld_logname); - /* Try to re-enqueue later */ - rc = mgc_requeue_add(cld, 1); - break; - } - /* Re-enqueue now */ - rc = mgc_requeue_add(cld, 0); - break; - } - default: - LBUG(); - } - - - if (rc) { - CERROR("%s CB failed %d:\n", flag == LDLM_CB_BLOCKING ? - "blocking" : "cancel", rc); - LDLM_ERROR(lock, "MGC ast"); - } - RETURN(rc); -} - -/* Take a config lock so we can get cancel notifications */ -static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm, - __u32 type, ldlm_policy_data_t *policy, __u32 mode, - int *flags, void *bl_cb, void *cp_cb, void *gl_cb, - void *data, __u32 lvb_len, void *lvb_swabber, - struct lustre_handle *lockh) -{ - struct config_llog_data *cld = (struct config_llog_data *)data; - struct ldlm_enqueue_info einfo = { type, mode, mgc_blocking_ast, - ldlm_completion_ast, NULL, data}; - - int rc; - ENTRY; - - CDEBUG(D_MGC, "Enqueue for %s (res "LPX64")\n", cld->cld_logname, - cld->cld_resid.name[0]); - - /* We can only drop this config log ref when we drop the lock */ - if (config_log_get(cld)) - RETURN(ELDLM_LOCK_ABORTED); - - /* We need a callback for every lockholder, so don't try to - ldlm_lock_match (see rev 1.1.2.11.2.47) */ - - rc = ldlm_cli_enqueue(exp, NULL, &einfo, cld->cld_resid, - NULL, flags, NULL, 0, NULL, lockh, 0); - /* A failed enqueue should still call the mgc_blocking_ast, - where it will be requeued if needed ("grant failed"). */ - - RETURN(rc); -} - -static int mgc_cancel(struct obd_export *exp, struct lov_stripe_md *md, - __u32 mode, struct lustre_handle *lockh) -{ - ENTRY; - - ldlm_lock_decref(lockh, mode); - - RETURN(0); -} - -#if 0 -static int mgc_iocontrol(unsigned int cmd, struct obd_export *exp, int len, - void *karg, void *uarg) -{ - struct obd_device *obd = exp->exp_obd; - struct obd_ioctl_data *data = karg; - struct llog_ctxt *ctxt; - struct lvfs_run_ctxt saved; - int rc; - ENTRY; - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - MOD_INC_USE_COUNT; -#else - if (!try_module_get(THIS_MODULE)) { - CERROR("Can't get module. Is it alive?"); - return -EINVAL; - } -#endif - switch (cmd) { - /* REPLicator context */ - case OBD_IOC_PARSE: { - CERROR("MGC parsing llog %s\n", data->ioc_inlbuf1); - ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT); - rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL); - GOTO(out, rc); - } -#ifdef __KERNEL__ - case OBD_IOC_LLOG_INFO: - case OBD_IOC_LLOG_PRINT: { - ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT); - rc = llog_ioctl(ctxt, cmd, data); - - GOTO(out, rc); - } -#endif - /* ORIGinator context */ - case OBD_IOC_DUMP_LOG: { - ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - if (rc) - RETURN(rc); - - GOTO(out, rc); - } - default: - CERROR("mgc_ioctl(): unrecognised ioctl %#x\n", cmd); - GOTO(out, rc = -ENOTTY); - } -out: -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - MOD_DEC_USE_COUNT; -#else - module_put(THIS_MODULE); -#endif - - return rc; -} -#endif - -/* Send target_reg message to MGS */ -static int mgc_target_register(struct obd_export *exp, - struct mgs_target_info *mti) -{ - struct ptlrpc_request *req; - struct mgs_target_info *req_mti, *rep_mti; - int size[] = { sizeof(struct ptlrpc_body), sizeof(*req_mti) }; - int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*mti) }; - int rc; - ENTRY; - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MGS_VERSION, - MGS_TARGET_REG, 2, size, NULL); - if (!req) - RETURN(-ENOMEM); - - req_mti = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*req_mti)); - if (!req_mti) - RETURN(-ENOMEM); - memcpy(req_mti, mti, sizeof(*req_mti)); - - ptlrpc_req_set_repsize(req, 2, rep_size); - - CDEBUG(D_MGC, "register %s\n", mti->mti_svname); - - rc = ptlrpc_queue_wait(req); - if (!rc) { - rep_mti = lustre_swab_repbuf(req, REPLY_REC_OFF, - sizeof(*rep_mti), - lustre_swab_mgs_target_info); - memcpy(mti, rep_mti, sizeof(*rep_mti)); - CDEBUG(D_MGC, "register %s got index = %d\n", - mti->mti_svname, mti->mti_stripe_index); - } - ptlrpc_req_finished(req); - - RETURN(rc); -} - -/* Send parameter to MGS*/ -static int mgc_set_mgs_param(struct obd_export *exp, - struct mgs_send_param *msp) -{ - struct ptlrpc_request *req; - struct mgs_send_param *req_msp, *rep_msp; - int size[] = { sizeof(struct ptlrpc_body), sizeof(*req_msp) }; - int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*msp) }; - int rc; - ENTRY; - - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MGS_VERSION, - MGS_SET_INFO, 2, size, NULL); - if (!req) - RETURN(-ENOMEM); - - req_msp = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*req_msp)); - if (!req_msp) - RETURN(-ENOMEM); - - memcpy(req_msp, msp, sizeof(*req_msp)); - ptlrpc_req_set_repsize(req, 2, rep_size); - rc = ptlrpc_queue_wait(req); - if (!rc) { - rep_msp = lustre_swab_repbuf(req, REPLY_REC_OFF, - sizeof(*rep_msp), NULL); - memcpy(msp, rep_msp, sizeof(*rep_msp)); - } - - ptlrpc_req_finished(req); - - RETURN(rc); -} - -int mgc_set_info_async(struct obd_export *exp, obd_count keylen, - void *key, obd_count vallen, void *val, - struct ptlrpc_request_set *set) -{ - struct obd_import *imp = class_exp2cliimp(exp); - int rc = -EINVAL; - ENTRY; - - /* Try to "recover" the initial connection; i.e. retry */ - if (KEY_IS(KEY_INIT_RECOV)) { - if (vallen != sizeof(int)) - RETURN(-EINVAL); - spin_lock(&imp->imp_lock); - imp->imp_initial_recov = *(int *)val; - spin_unlock(&imp->imp_lock); - CDEBUG(D_HA, "%s: set imp_initial_recov = %d\n", - exp->exp_obd->obd_name, imp->imp_initial_recov); - RETURN(0); - } - /* Turn off initial_recov after we try all backup servers once */ - if (KEY_IS(KEY_INIT_RECOV_BACKUP)) { - int value; - if (vallen != sizeof(int)) - RETURN(-EINVAL); - value = *(int *)val; - spin_lock(&imp->imp_lock); - imp->imp_initial_recov_bk = value > 0; - /* Even after the initial connection, give up all comms if - nobody answers the first time. */ - imp->imp_recon_bk = 1; - spin_unlock(&imp->imp_lock); - CDEBUG(D_MGC, "InitRecov %s %d/%d:d%d:i%d:r%d:or%d:%s\n", - imp->imp_obd->obd_name, value, imp->imp_initial_recov, - imp->imp_deactive, imp->imp_invalid, - imp->imp_replayable, imp->imp_obd->obd_replayable, - ptlrpc_import_state_name(imp->imp_state)); - /* Resurrect if we previously died */ - if (imp->imp_invalid || value > 1) - ptlrpc_reconnect_import(imp); - RETURN(0); - } - /* FIXME move this to mgc_process_config */ - if (KEY_IS("register_target")) { - struct mgs_target_info *mti; - if (vallen != sizeof(struct mgs_target_info)) - RETURN(-EINVAL); - mti = (struct mgs_target_info *)val; - CDEBUG(D_MGC, "register_target %s %#x\n", - mti->mti_svname, mti->mti_flags); - rc = mgc_target_register(exp, mti); - RETURN(rc); - } - if (KEY_IS("set_fs")) { - struct super_block *sb = (struct super_block *)val; - struct lustre_sb_info *lsi; - if (vallen != sizeof(struct super_block)) - RETURN(-EINVAL); - lsi = s2lsi(sb); - rc = mgc_fs_setup(exp->exp_obd, sb, lsi->lsi_srv_mnt); - if (rc) { - CERROR("set_fs got %d\n", rc); - } - RETURN(rc); - } - if (KEY_IS("clear_fs")) { - if (vallen != 0) - RETURN(-EINVAL); - rc = mgc_fs_cleanup(exp->exp_obd); - if (rc) { - CERROR("clear_fs got %d\n", rc); - } - RETURN(rc); - } - if (KEY_IS(KEY_SET_INFO)) { - struct mgs_send_param *msp; - - msp = (struct mgs_send_param *)val; - rc = mgc_set_mgs_param(exp, msp); - RETURN(rc); - } - - RETURN(rc); -} - -static int mgc_import_event(struct obd_device *obd, - struct obd_import *imp, - enum obd_import_event event) -{ - int rc = 0; - - LASSERT(imp->imp_obd == obd); - CDEBUG(D_MGC, "import event %#x\n", event); - - switch (event) { - case IMP_EVENT_DISCON: - /* MGC imports should not wait for recovery */ - break; - case IMP_EVENT_INACTIVE: - break; - case IMP_EVENT_INVALIDATE: { - struct ldlm_namespace *ns = obd->obd_namespace; - ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY); - break; - } - case IMP_EVENT_ACTIVE: - LCONSOLE_WARN("%s: Reactivating import\n", obd->obd_name); - /* Clearing obd_no_recov allows us to continue pinging */ - obd->obd_no_recov = 0; - break; - case IMP_EVENT_OCD: - break; - default: - CERROR("Unknown import event %#x\n", event); - LBUG(); - } - RETURN(rc); -} - -static int mgc_llog_init(struct obd_device *obd, struct obd_device *tgt, - int count, struct llog_catid *logid, - struct obd_uuid *uuid) -{ - struct llog_ctxt *ctxt; - int rc; - ENTRY; - - rc = llog_setup(obd, LLOG_CONFIG_ORIG_CTXT, tgt, 0, NULL, - &llog_lvfs_ops); - if (rc) - RETURN(rc); - - rc = llog_setup(obd, LLOG_CONFIG_REPL_CTXT, tgt, 0, NULL, - &llog_client_ops); - if (rc == 0) { - ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT); - ctxt->loc_imp = obd->u.cli.cl_import; - llog_ctxt_put(ctxt); - } - - RETURN(rc); -} - -static int mgc_llog_finish(struct obd_device *obd, int count) -{ - int rc; - ENTRY; - - rc = llog_cleanup(llog_get_context(obd, LLOG_CONFIG_REPL_CTXT)); - rc = llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT)); - - RETURN(rc); -} - -/* identical to mgs_log_is_empty */ -static int mgc_llog_is_empty(struct obd_device *obd, struct llog_ctxt *ctxt, - char *name) -{ - struct lvfs_run_ctxt saved; - struct llog_handle *llh; - int rc = 0; - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_create(ctxt, &llh, NULL, name); - if (rc == 0) { - llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL); - rc = llog_get_size(llh); - llog_close(llh); - } - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - /* header is record 1 */ - return(rc <= 1); -} - -static int mgc_copy_handler(struct llog_handle *llh, struct llog_rec_hdr *rec, - void *data) -{ - struct llog_rec_hdr local_rec = *rec; - struct llog_handle *local_llh = (struct llog_handle *)data; - char *cfg_buf = (char*) (rec + 1); - struct lustre_cfg *lcfg; - int rc = 0; - ENTRY; - - /* Append all records */ - local_rec.lrh_len -= sizeof(*rec) + sizeof(struct llog_rec_tail); - rc = llog_write_rec(local_llh, &local_rec, NULL, 0, - (void *)cfg_buf, -1); - - lcfg = (struct lustre_cfg *)cfg_buf; - CDEBUG(D_INFO, "idx=%d, rc=%d, len=%d, cmd %x %s %s\n", - rec->lrh_index, rc, rec->lrh_len, lcfg->lcfg_command, - lustre_cfg_string(lcfg, 0), lustre_cfg_string(lcfg, 1)); - - RETURN(rc); -} - -/* Copy a remote log locally */ -static int mgc_copy_llog(struct obd_device *obd, struct llog_ctxt *rctxt, - struct llog_ctxt *lctxt, char *logname) -{ - struct llog_handle *local_llh, *remote_llh; - struct obd_uuid *uuid; - char *temp_log; - int rc, rc2; - ENTRY; - - /* Write new log to a temp name, then vfs_rename over logname - upon successful completion. */ - - OBD_ALLOC(temp_log, strlen(logname) + 1); - if (!temp_log) - RETURN(-ENOMEM); - sprintf(temp_log, "%sT", logname); - - /* Make sure there's no old temp log */ - rc = llog_create(lctxt, &local_llh, NULL, temp_log); - if (rc) - GOTO(out, rc); - rc = llog_init_handle(local_llh, LLOG_F_IS_PLAIN, NULL); - if (rc) - GOTO(out, rc); - rc = llog_destroy(local_llh); - llog_free_handle(local_llh); - if (rc) - GOTO(out, rc); - - /* open local log */ - rc = llog_create(lctxt, &local_llh, NULL, temp_log); - if (rc) - GOTO(out, rc); - - /* set the log header uuid for fun */ - OBD_ALLOC_PTR(uuid); - obd_str2uuid(uuid, logname); - rc = llog_init_handle(local_llh, LLOG_F_IS_PLAIN, uuid); - OBD_FREE_PTR(uuid); - if (rc) - GOTO(out_closel, rc); - - /* open remote log */ - rc = llog_create(rctxt, &remote_llh, NULL, logname); - if (rc) - GOTO(out_closel, rc); - rc = llog_init_handle(remote_llh, LLOG_F_IS_PLAIN, NULL); - if (rc) - GOTO(out_closer, rc); - - /* Copy remote log */ - rc = llog_process(remote_llh, mgc_copy_handler,(void *)local_llh, NULL); - -out_closer: - rc2 = llog_close(remote_llh); - if (!rc) - rc = rc2; -out_closel: - rc2 = llog_close(local_llh); - if (!rc) - rc = rc2; - - /* We've copied the remote log to the local temp log, now - replace the old local log with the temp log. */ - if (!rc) { - struct client_obd *cli = &obd->u.cli; - LASSERT(cli); - LASSERT(cli->cl_mgc_configs_dir); - rc = lustre_rename(cli->cl_mgc_configs_dir, temp_log, logname); - } - CDEBUG(D_MGC, "Copied remote log %s (%d)\n", logname, rc); -out: - if (rc) - CERROR("Failed to copy remote log %s (%d)\n", logname, rc); - OBD_FREE(temp_log, strlen(logname) + 1); - RETURN(rc); -} - -DECLARE_MUTEX(llog_process_lock); - -/* Get a config log from the MGS and process it. - This func is called for both clients and servers. */ -static int mgc_process_log(struct obd_device *mgc, - struct config_llog_data *cld) -{ - struct llog_ctxt *ctxt, *lctxt; - struct lustre_handle lockh; - struct client_obd *cli = &mgc->u.cli; - struct lvfs_run_ctxt saved; - struct lustre_sb_info *lsi; - int rc = 0, rcl, flags = 0, must_pop = 0; - ENTRY; - - if (!cld || !cld->cld_cfg.cfg_sb) { - /* This should never happen */ - CERROR("Missing cld, aborting log update\n"); - RETURN(-EINVAL); - } - if (cld->cld_stopping) - RETURN(0); - - OBD_FAIL_TIMEOUT(OBD_FAIL_MGC_PAUSE_PROCESS_LOG, 20); - - lsi = s2lsi(cld->cld_cfg.cfg_sb); - - CDEBUG(D_MGC, "Process log %s:%s from %d\n", cld->cld_logname, - cld->cld_cfg.cfg_instance, cld->cld_cfg.cfg_last_idx + 1); - - ctxt = llog_get_context(mgc, LLOG_CONFIG_REPL_CTXT); - if (!ctxt) { - CERROR("missing llog context\n"); - RETURN(-EINVAL); - } - - /* I don't want mutliple processes running process_log at once -- - sounds like badness. It actually might be fine, as long as - we're not trying to update from the same log - simultaneously (in which case we should use a per-log sem.) */ - down(&llog_process_lock); - - /* Get the cfg lock on the llog */ - rcl = mgc_enqueue(mgc->u.cli.cl_mgc_mgsexp, NULL, LDLM_PLAIN, NULL, - LCK_CR, &flags, NULL, NULL, NULL, - cld, 0, NULL, &lockh); - if (rcl) - CDEBUG(D_MGC, "Can't get cfg lock: %d\n", rcl); - - lctxt = llog_get_context(mgc, LLOG_CONFIG_ORIG_CTXT); - - /* Copy the setup log locally if we can. Don't mess around if we're - running an MGS though (logs are already local). */ - if (lctxt && lsi && (lsi->lsi_flags & LSI_SERVER) && - (lsi->lsi_srv_mnt == cli->cl_mgc_vfsmnt) && - !IS_MGS(lsi->lsi_ldd)) { - push_ctxt(&saved, &mgc->obd_lvfs_ctxt, NULL); - must_pop++; - if (rcl == 0) - /* Only try to copy log if we have the lock. */ - rc = mgc_copy_llog(mgc, ctxt, lctxt, cld->cld_logname); - if (rcl || rc) { - if (mgc_llog_is_empty(mgc, lctxt, cld->cld_logname)) { - LCONSOLE_ERROR_MSG(0x13a, "Failed to get MGS " - "log %s and no local copy." - "\n", cld->cld_logname); - GOTO(out_pop, rc = -ENOTCONN); - } - CDEBUG(D_MGC, "Failed to get MGS log %s, using local " - "copy for now, will try to update later.\n", - cld->cld_logname); - } - /* Now, whether we copied or not, start using the local llog. - If we failed to copy, we'll start using whatever the old - log has. */ - llog_ctxt_put(ctxt); - ctxt = lctxt; - } - - /* logname and instance info should be the same, so use our - copy of the instance for the update. The cfg_last_idx will - be updated here. */ - rc = class_config_parse_llog(ctxt, cld->cld_logname, &cld->cld_cfg); - -out_pop: - llog_ctxt_put(ctxt); - if (ctxt != lctxt) - llog_ctxt_put(lctxt); - if (must_pop) - pop_ctxt(&saved, &mgc->obd_lvfs_ctxt, NULL); - - /* Now drop the lock so MGS can revoke it */ - if (!rcl) { - rcl = mgc_cancel(mgc->u.cli.cl_mgc_mgsexp, NULL, - LCK_CR, &lockh); - if (rcl) - CERROR("Can't drop cfg lock: %d\n", rcl); - } - - CDEBUG(D_MGC, "%s: configuration from log '%s' %sed (%d).\n", - mgc->obd_name, cld->cld_logname, rc ? "fail" : "succeed", rc); - - up(&llog_process_lock); - - RETURN(rc); -} - -static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf) -{ - struct lustre_cfg *lcfg = buf; - int cmd; - int rc = 0; - ENTRY; - - switch(cmd = lcfg->lcfg_command) { - case LCFG_LOV_ADD_OBD: { - /* Add any new target, not just osts */ - struct mgs_target_info *mti; - - if (LUSTRE_CFG_BUFLEN(lcfg, 1) != - sizeof(struct mgs_target_info)) - GOTO(out, rc = -EINVAL); - - mti = (struct mgs_target_info *)lustre_cfg_buf(lcfg, 1); - CDEBUG(D_MGC, "add_target %s %#x\n", - mti->mti_svname, mti->mti_flags); - rc = mgc_target_register(obd->u.cli.cl_mgc_mgsexp, mti); - break; - } - case LCFG_LOV_DEL_OBD: - /* Remove target from the fs? */ - /* FIXME */ - CERROR("lov_del_obd unimplemented\n"); - rc = -ENOSYS; - break; - case LCFG_LOG_START: { - struct config_llog_data *cld; - struct config_llog_instance *cfg; - struct super_block *sb; - char *logname = lustre_cfg_string(lcfg, 1); - cfg = (struct config_llog_instance *)lustre_cfg_buf(lcfg, 2); - sb = *(struct super_block **)lustre_cfg_buf(lcfg, 3); - - CDEBUG(D_MGC, "parse_log %s from %d\n", logname, - cfg->cfg_last_idx); - - /* We're only called through here on the initial mount */ - rc = config_log_add(logname, cfg, sb); - if (rc) - break; - cld = config_log_find(logname, cfg); - if (IS_ERR(cld)) { - rc = PTR_ERR(cld); - break; - } - - /* COMPAT_146 */ - /* FIXME only set this for old logs! Right now this forces - us to always skip the "inside markers" check */ - cld->cld_cfg.cfg_flags |= CFG_F_COMPAT146; - - rc = mgc_process_log(obd, cld); - config_log_put(cld); - - break; - } - case LCFG_LOG_END: { - struct config_llog_instance *cfg = NULL; - char *logname = lustre_cfg_string(lcfg, 1); - if (lcfg->lcfg_bufcount >= 2) - cfg = (struct config_llog_instance *)lustre_cfg_buf( - lcfg, 2); - rc = config_log_end(logname, cfg); - break; - } - default: { - CERROR("Unknown command: %d\n", lcfg->lcfg_command); - GOTO(out, rc = -EINVAL); - - } - } -out: - RETURN(rc); -} - -struct obd_ops mgc_obd_ops = { - .o_owner = THIS_MODULE, - .o_setup = mgc_setup, - .o_precleanup = mgc_precleanup, - .o_cleanup = mgc_cleanup, - .o_add_conn = client_import_add_conn, - .o_del_conn = client_import_del_conn, - .o_connect = client_connect_import, - .o_disconnect = client_disconnect_export, - //.o_enqueue = mgc_enqueue, - .o_cancel = mgc_cancel, - //.o_iocontrol = mgc_iocontrol, - .o_set_info_async = mgc_set_info_async, - .o_import_event = mgc_import_event, - .o_llog_init = mgc_llog_init, - .o_llog_finish = mgc_llog_finish, - .o_process_config = mgc_process_config, -}; - -int __init mgc_init(void) -{ - return class_register_type(&mgc_obd_ops, NULL, LUSTRE_MGC_NAME); -} - -#ifdef __KERNEL__ -static void /*__exit*/ mgc_exit(void) -{ - class_unregister_type(LUSTRE_MGC_NAME); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre Management Client"); -MODULE_LICENSE("GPL"); - -module_init(mgc_init); -module_exit(mgc_exit); -#endif diff --git a/lustre/mgs/.cvsignore b/lustre/mgs/.cvsignore deleted file mode 100644 index d5103fafd7..0000000000 --- a/lustre/mgs/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -.deps -TAGS -.*.cmd -autoMakefile.in -autoMakefile -*.ko -*.mod.c -.*.o.flags -.tmp_versions -.depend diff --git a/lustre/mgs/Makefile.in b/lustre/mgs/Makefile.in deleted file mode 100644 index 8bb6a5fe34..0000000000 --- a/lustre/mgs/Makefile.in +++ /dev/null @@ -1,4 +0,0 @@ -MODULES := mgs -mgs-objs := mgs_handler.o mgs_fs.o mgs_llog.o lproc_mgs.o - -@INCLUDE_RULES@ diff --git a/lustre/mgs/autoMakefile.am b/lustre/mgs/autoMakefile.am deleted file mode 100644 index 53734b07ca..0000000000 --- a/lustre/mgs/autoMakefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -if MODULES -modulefs_DATA = mgs$(KMODEXT) -endif - -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ -DIST_SOURCES := $(mgs-objs:%.o=%.c) mgs_internal.h diff --git a/lustre/mgs/lproc_mgs.c b/lustre/mgs/lproc_mgs.c deleted file mode 100644 index 5a4f329253..0000000000 --- a/lustre/mgs/lproc_mgs.c +++ /dev/null @@ -1,197 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - */ -#define DEBUG_SUBSYSTEM S_CLASS - -#include <linux/version.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -#include <asm/statfs.h> -#endif -#include <obd.h> -#include <obd_class.h> -#include <lprocfs_status.h> -#include "mgs_internal.h" - - -#ifdef LPROCFS - -static int lprocfs_mgs_rd_mntdev(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct obd_device* obd = (struct obd_device *)data; - - LASSERT(obd != NULL); - LASSERT(obd->u.mgs.mgs_vfsmnt->mnt_devname); - *eof = 1; - - return snprintf(page, count, "%s\n",obd->u.mgs.mgs_vfsmnt->mnt_devname); -} - -static int mgs_fs_seq_show(struct seq_file *seq, void *v) -{ - struct obd_device *obd = seq->private; - struct mgs_obd *mgs = &obd->u.mgs; - struct list_head dentry_list; - struct l_linux_dirent *dirent, *n; - int rc, len; - ENTRY; - - LASSERT(obd != NULL); - rc = class_dentry_readdir(obd, mgs->mgs_configs_dir, - mgs->mgs_vfsmnt, &dentry_list); - if (rc) { - CERROR("Can't read config dir\n"); - RETURN(rc); - } - list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) { - list_del(&dirent->lld_list); - len = strlen(dirent->lld_name); - if ((len > 7) && (strncmp(dirent->lld_name + len - 7, "-client", - len) == 0)) { - seq_printf(seq, "%.*s\n", len - 7, dirent->lld_name); - } - OBD_FREE(dirent, sizeof(*dirent)); - } - - RETURN(0); -} - -LPROC_SEQ_FOPS_RO(mgs_fs); - -int lproc_mgs_setup(struct obd_device *obd) -{ - struct mgs_obd *mgs = &obd->u.mgs; - int rc; - - rc = lprocfs_obd_seq_create(obd, "filesystems", 0444, - &mgs_fs_fops, obd); - mgs->mgs_proc_live = proc_mkdir("live", obd->obd_proc_entry); - obd->obd_proc_exports_entry = proc_mkdir("exports", - obd->obd_proc_entry); - - return rc; -} - -int lproc_mgs_cleanup(struct obd_device *obd) -{ - struct mgs_obd *mgs; - - if (!obd) - return -EINVAL; - - mgs = &obd->u.mgs; - if (mgs->mgs_proc_live) { - /* Should be no live entries */ - LASSERT(mgs->mgs_proc_live->subdir == NULL); - lprocfs_remove(&mgs->mgs_proc_live); - mgs->mgs_proc_live = NULL; - } - lprocfs_free_per_client_stats(obd); - lprocfs_free_obd_stats(obd); - - return lprocfs_obd_cleanup(obd); -} - -static int mgs_live_seq_show(struct seq_file *seq, void *v) -{ - struct fs_db *fsdb = seq->private; - int i; - - down(&fsdb->fsdb_sem); - - seq_printf(seq, "fsname: %s\n", fsdb->fsdb_name); - seq_printf(seq, "flags: %#x gen: %d\n", - fsdb->fsdb_flags, fsdb->fsdb_gen); - for (i = 0; i < INDEX_MAP_SIZE * 8; i++) - if (test_bit(i, fsdb->fsdb_mdt_index_map)) - seq_printf(seq, "%s-MDT%04x\n", fsdb->fsdb_name, i); - for (i = 0; i < INDEX_MAP_SIZE * 8; i++) - if (test_bit(i, fsdb->fsdb_ost_index_map)) - seq_printf(seq, "%s-OST%04x\n", fsdb->fsdb_name, i); - - up(&fsdb->fsdb_sem); - return 0; -} - -LPROC_SEQ_FOPS_RO(mgs_live); - -int lproc_mgs_add_live(struct obd_device *obd, struct fs_db *fsdb) -{ - struct mgs_obd *mgs = &obd->u.mgs; - int rc; - - if (!mgs->mgs_proc_live) - return 0; - rc = lprocfs_seq_create(mgs->mgs_proc_live, fsdb->fsdb_name, 0444, - &mgs_live_fops, fsdb); - - return 0; -} - -int lproc_mgs_del_live(struct obd_device *obd, struct fs_db *fsdb) -{ - struct mgs_obd *mgs = &obd->u.mgs; - - if (!mgs->mgs_proc_live) - return 0; - remove_proc_entry(fsdb->fsdb_name, mgs->mgs_proc_live); - return 0; -} - -struct lprocfs_vars lprocfs_mgs_obd_vars[] = { - { "uuid", lprocfs_rd_uuid, 0, 0 }, - { "fstype", lprocfs_rd_fstype, 0, 0 }, - { "mntdev", lprocfs_mgs_rd_mntdev, 0, 0 }, - { "num_exports", lprocfs_rd_num_exports, 0, 0 }, - { "evict_client", 0, lprocfs_wr_evict_client, 0 }, - { 0 } -}; - -struct lprocfs_vars lprocfs_mgs_module_vars[] = { - { 0 } -}; - -void mgs_counter_incr(struct obd_export *exp, int opcode) -{ - lprocfs_counter_incr(exp->exp_obd->obd_stats, opcode); - lprocfs_counter_incr(exp->exp_ops_stats, opcode); -} - -void mgs_stats_counter_init(struct lprocfs_stats *stats) -{ - lprocfs_counter_init(stats, LPROC_MGS_CONNECT, 0, "connect", "reqs"); - lprocfs_counter_init(stats, LPROC_MGS_DISCONNECT, 0, "disconnect", - "reqs"); - lprocfs_counter_init(stats, LPROC_MGS_EXCEPTION, 0, "exception", - "reqs"); - lprocfs_counter_init(stats, LPROC_MGS_TARGET_REG, 0, "tgtreg", "reqs"); - lprocfs_counter_init(stats, LPROC_MGS_TARGET_DEL, 0, "tgtdel", "reqs"); -} - -void lprocfs_mgs_init_vars(struct lprocfs_static_vars *lvars) -{ - lvars->module_vars = lprocfs_mgs_module_vars; - lvars->obd_vars = lprocfs_mgs_obd_vars; -} -#endif diff --git a/lustre/mgs/mgs_fs.c b/lustre/mgs/mgs_fs.c deleted file mode 100644 index 51abb0e03f..0000000000 --- a/lustre/mgs/mgs_fs.c +++ /dev/null @@ -1,240 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/mgs/mgs_fs.c - * Lustre Management Server (MGS) filesystem interface code - * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nathan Rutman <nathan@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MGS - -#include <linux/module.h> -#include <linux/kmod.h> -#include <linux/version.h> -#include <linux/sched.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -#include <linux/mount.h> -#endif -#include <obd_class.h> -#include <obd_support.h> -#include <lustre_disk.h> -#include <lustre_lib.h> -#include <lustre_fsfilt.h> -#include <libcfs/list.h> -#include "mgs_internal.h" - - -static int mgs_export_stats_init(struct obd_device *obd, struct obd_export *exp) -{ - int rc, num_stats, newnid; - - rc = lprocfs_exp_setup(exp, 0, &newnid); - if (rc) - return rc; - - if (newnid) { - num_stats = (sizeof(*obd->obd_type->typ_ops) / sizeof(void *)) + - LPROC_MGS_LAST - 1; - exp->exp_ops_stats = lprocfs_alloc_stats(num_stats, - LPROCFS_STATS_FLAG_NOPERCPU); - if (exp->exp_ops_stats == NULL) - return -ENOMEM; - lprocfs_init_ops_stats(LPROC_MGS_LAST, exp->exp_ops_stats); - mgs_stats_counter_init(exp->exp_ops_stats); - lprocfs_register_stats(exp->exp_nid_stats->nid_proc, "stats", exp->exp_ops_stats); - } - return 0; -} - -/* Add client export data to the MGS. This data is currently NOT stored on - * disk in the last_rcvd file or anywhere else. In the event of a MGS - * crash all connections are treated as new connections. - */ -int mgs_client_add(struct obd_device *obd, struct obd_export *exp) -{ - return mgs_export_stats_init(obd, exp); -} - -/* Remove client export data from the MGS */ -int mgs_client_free(struct obd_export *exp) -{ - return lprocfs_exp_cleanup(exp); -} - -/* Same as mds_fid2dentry */ -/* Look up an entry by inode number. */ -/* this function ONLY returns valid dget'd dentries with an initialized inode - or errors */ -static struct dentry *mgs_fid2dentry(struct mgs_obd *mgs, struct ll_fid *fid) -{ - char fid_name[32]; - unsigned long ino = fid->id; - __u32 generation = fid->generation; - struct inode *inode; - struct dentry *result; - - CDEBUG(D_DENTRY, "--> mgs_fid2dentry: ino/gen %lu/%u, sb %p\n", - ino, generation, mgs->mgs_sb); - - if (ino == 0) - RETURN(ERR_PTR(-ESTALE)); - - snprintf(fid_name, sizeof(fid_name), "0x%lx", ino); - - /* under ext3 this is neither supposed to return bad inodes - nor NULL inodes. */ - result = ll_lookup_one_len(fid_name, mgs->mgs_fid_de, strlen(fid_name)); - if (IS_ERR(result)) - RETURN(result); - - inode = result->d_inode; - if (!inode) - RETURN(ERR_PTR(-ENOENT)); - - if (inode->i_generation == 0 || inode->i_nlink == 0) { - LCONSOLE_WARN("Found inode with zero generation or link -- this" - " may indicate disk corruption (inode: %lu, link:" - " %lu, count: %d)\n", inode->i_ino, - (unsigned long)inode->i_nlink, - atomic_read(&inode->i_count)); - l_dput(result); - RETURN(ERR_PTR(-ENOENT)); - } - - if (generation && inode->i_generation != generation) { - /* we didn't find the right inode.. */ - CDEBUG(D_INODE, "found wrong generation: inode %lu, link: %lu, " - "count: %d, generation %u/%u\n", inode->i_ino, - (unsigned long)inode->i_nlink, - atomic_read(&inode->i_count), inode->i_generation, - generation); - l_dput(result); - RETURN(ERR_PTR(-ENOENT)); - } - - RETURN(result); -} - -static struct dentry *mgs_lvfs_fid2dentry(__u64 id, __u32 gen, __u64 gr, - void *data) -{ - struct obd_device *obd = data; - struct ll_fid fid; - fid.id = id; - fid.generation = gen; - return mgs_fid2dentry(&obd->u.mgs, &fid); -} - -struct lvfs_callback_ops mgs_lvfs_ops = { - l_fid2dentry: mgs_lvfs_fid2dentry, -}; - -int mgs_fs_setup(struct obd_device *obd, struct vfsmount *mnt) -{ - struct mgs_obd *mgs = &obd->u.mgs; - struct lvfs_run_ctxt saved; - struct dentry *dentry; - int rc; - ENTRY; - - /* FIXME what's this? Do I need it? */ - rc = cleanup_group_info(); - if (rc) - RETURN(rc); - - mgs->mgs_vfsmnt = mnt; - mgs->mgs_sb = mnt->mnt_root->d_inode->i_sb; - - rc = fsfilt_setup(obd, mgs->mgs_sb); - if (rc) - CWARN("fail to set fsfilter options\n"); - - OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt); - obd->obd_lvfs_ctxt.pwdmnt = mnt; - obd->obd_lvfs_ctxt.pwd = mnt->mnt_root; - obd->obd_lvfs_ctxt.fs = get_ds(); - obd->obd_lvfs_ctxt.cb_ops = mgs_lvfs_ops; - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - /* Setup the configs dir */ - dentry = simple_mkdir(current->fs->pwd, MOUNT_CONFIGS_DIR, 0777, 1); - if (IS_ERR(dentry)) { - rc = PTR_ERR(dentry); - CERROR("cannot create %s directory: rc = %d\n", - MOUNT_CONFIGS_DIR, rc); - GOTO(err_pop, rc); - } - mgs->mgs_configs_dir = dentry; - - /* Need the iopen dir for fid2dentry, required by - LLOG_ORIGIN_HANDLE_READ_HEADER */ - dentry = lookup_one_len("__iopen__", current->fs->pwd, - strlen("__iopen__")); - if (IS_ERR(dentry)) { - rc = PTR_ERR(dentry); - CERROR("cannot lookup __iopen__ directory: rc = %d\n", rc); - GOTO(err_configs, rc); - } - mgs->mgs_fid_de = dentry; - if (!dentry->d_inode || is_bad_inode(dentry->d_inode)) { - rc = -ENOENT; - CERROR("__iopen__ directory has no inode? rc = %d\n", rc); - GOTO(err_fid, rc); - } - -err_pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - return rc; -err_fid: - dput(mgs->mgs_fid_de); -err_configs: - dput(mgs->mgs_configs_dir); - goto err_pop; -} - -int mgs_fs_cleanup(struct obd_device *obd) -{ - struct mgs_obd *mgs = &obd->u.mgs; - struct lvfs_run_ctxt saved; - int rc = 0; - - class_disconnect_exports(obd); /* cleans up client info too */ - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - if (mgs->mgs_configs_dir) { - /*CERROR("configs dir dcount=%d\n", - atomic_read(&mgs->mgs_configs_dir->d_count));*/ - l_dput(mgs->mgs_configs_dir); - mgs->mgs_configs_dir = NULL; - } - - shrink_dcache_parent(mgs->mgs_fid_de); - /*CERROR("fid dir dcount=%d\n", - atomic_read(&mgs->mgs_fid_de->d_count));*/ - dput(mgs->mgs_fid_de); - - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - return rc; -} diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c deleted file mode 100644 index 6b7ba3ad49..0000000000 --- a/lustre/mgs/mgs_handler.c +++ /dev/null @@ -1,772 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/mgs/mgs_handler.c - * Lustre Management Server (mgs) request handler - * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nathan Rutman <nathan@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MGS -#define D_MGS D_CONFIG/*|D_WARNING*/ - -#ifdef __KERNEL__ -# include <linux/module.h> -# include <linux/pagemap.h> -# include <linux/miscdevice.h> -# include <linux/init.h> -#else -# include <liblustre.h> -#endif - -#include <obd_class.h> -#include <lustre_dlm.h> -#include <lprocfs_status.h> -#include <lustre_fsfilt.h> -#include <lustre_commit_confd.h> -#include <lustre_disk.h> -#include "mgs_internal.h" - - -/* Establish a connection to the MGS.*/ -static int mgs_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid, struct obd_connect_data *data, - void *localdata) -{ - struct obd_export *exp; - int rc; - ENTRY; - - if (!conn || !obd || !cluuid) - RETURN(-EINVAL); - - rc = class_connect(conn, obd, cluuid); - if (rc) - RETURN(rc); - exp = class_conn2export(conn); - LASSERT(exp); - - mgs_counter_incr(exp, LPROC_MGS_CONNECT); - - if (data != NULL) { - data->ocd_connect_flags &= MGS_CONNECT_SUPPORTED; - exp->exp_connect_flags = data->ocd_connect_flags; - data->ocd_version = LUSTRE_VERSION_CODE; - } - - rc = mgs_client_add(obd, exp); - - if (rc) { - class_disconnect(exp); - } else { - class_export_put(exp); - } - - RETURN(rc); -} - -static int mgs_disconnect(struct obd_export *exp) -{ - int rc; - ENTRY; - - LASSERT(exp); - - class_export_get(exp); - mgs_counter_incr(exp, LPROC_MGS_DISCONNECT); - - /* Disconnect early so that clients can't keep using export */ - rc = class_disconnect(exp); - ldlm_cancel_locks_for_export(exp); - - /* complete all outstanding replies */ - spin_lock(&exp->exp_lock); - while (!list_empty(&exp->exp_outstanding_replies)) { - struct ptlrpc_reply_state *rs = - list_entry(exp->exp_outstanding_replies.next, - struct ptlrpc_reply_state, rs_exp_list); - struct ptlrpc_service *svc = rs->rs_service; - - spin_lock(&svc->srv_lock); - list_del_init(&rs->rs_exp_list); - ptlrpc_schedule_difficult_reply(rs); - spin_unlock(&svc->srv_lock); - } - spin_unlock(&exp->exp_lock); - - class_export_put(exp); - RETURN(rc); -} - -static int mgs_cleanup(struct obd_device *obd); -static int mgs_handle(struct ptlrpc_request *req); - -/* Start the MGS obd */ -static int mgs_setup(struct obd_device *obd, obd_count len, void *buf) -{ - struct lprocfs_static_vars lvars; - struct mgs_obd *mgs = &obd->u.mgs; - struct lustre_mount_info *lmi; - struct lustre_sb_info *lsi; - struct vfsmount *mnt; - int rc = 0; - ENTRY; - - CDEBUG(D_CONFIG, "Starting MGS\n"); - - /* Find our disk */ - lmi = server_get_mount(obd->obd_name); - if (!lmi) - RETURN(rc = -EINVAL); - - mnt = lmi->lmi_mnt; - lsi = s2lsi(lmi->lmi_sb); - obd->obd_fsops = fsfilt_get_ops(MT_STR(lsi->lsi_ldd)); - if (IS_ERR(obd->obd_fsops)) - GOTO(err_put, rc = PTR_ERR(obd->obd_fsops)); - - /* namespace for mgs llog */ - obd->obd_namespace = ldlm_namespace_new("MGS", LDLM_NAMESPACE_SERVER, - LDLM_NAMESPACE_MODEST); - if (obd->obd_namespace == NULL) - GOTO(err_ops, rc = -ENOMEM); - - /* ldlm setup */ - ptlrpc_init_client(LDLM_CB_REQUEST_PORTAL, LDLM_CB_REPLY_PORTAL, - "mgs_ldlm_client", &obd->obd_ldlm_client); - - LASSERT(!lvfs_check_rdonly(lvfs_sbdev(mnt->mnt_sb))); - - rc = mgs_fs_setup(obd, mnt); - if (rc) { - CERROR("%s: MGS filesystem method init failed: rc = %d\n", - obd->obd_name, rc); - GOTO(err_ns, rc); - } - - rc = llog_setup(obd, LLOG_CONFIG_ORIG_CTXT, obd, 0, NULL, - &llog_lvfs_ops); - if (rc) - GOTO(err_fs, rc); - - /* No recovery for MGC's */ - obd->obd_replayable = 0; - - /* Internal mgs setup */ - mgs_init_fsdb_list(obd); - sema_init(&mgs->mgs_sem, 1); - - /* Start the service threads */ - mgs->mgs_service = - ptlrpc_init_svc(MGS_NBUFS, MGS_BUFSIZE, MGS_MAXREQSIZE, - MGS_MAXREPSIZE, MGS_REQUEST_PORTAL, - MGC_REPLY_PORTAL, 2000, - mgs_handle, LUSTRE_MGS_NAME, - obd->obd_proc_entry, NULL, - MGS_THREADS_AUTO_MIN, MGS_THREADS_AUTO_MAX, - "ll_mgs"); - - if (!mgs->mgs_service) { - CERROR("failed to start service\n"); - GOTO(err_fs, rc = -ENOMEM); - } - - rc = ptlrpc_start_threads(obd, mgs->mgs_service); - if (rc) - GOTO(err_thread, rc); - - /* Setup proc */ - lprocfs_mgs_init_vars(&lvars); - if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0) { - lproc_mgs_setup(obd); - } - - ping_evictor_start(); - - LCONSOLE_INFO("MGS %s started\n", obd->obd_name); - - RETURN(0); - -err_thread: - ptlrpc_unregister_service(mgs->mgs_service); -err_fs: - /* No extra cleanup needed for llog_init_commit_thread() */ - mgs_fs_cleanup(obd); -err_ns: - ldlm_namespace_free(obd->obd_namespace, 0); - obd->obd_namespace = NULL; -err_ops: - fsfilt_put_ops(obd->obd_fsops); -err_put: - server_put_mount(obd->obd_name, mnt); - mgs->mgs_sb = 0; - return rc; -} - -static int mgs_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) -{ - int rc = 0; - ENTRY; - - switch (stage) { - case OBD_CLEANUP_EARLY: - case OBD_CLEANUP_EXPORTS: - break; - case OBD_CLEANUP_SELF_EXP: - llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT)); - rc = obd_llog_finish(obd, 0); - break; - case OBD_CLEANUP_OBD: - break; - } - RETURN(rc); -} - -static int mgs_ldlm_nsfree(void *data) -{ - struct ldlm_namespace *ns = (struct ldlm_namespace *)data; - int rc; - ENTRY; - - ptlrpc_daemonize("ll_mgs_nsfree"); - rc = ldlm_namespace_free(ns, 1 /* obd_force should always be on */); - RETURN(rc); -} - -static int mgs_cleanup(struct obd_device *obd) -{ - struct mgs_obd *mgs = &obd->u.mgs; - ENTRY; - - if (mgs->mgs_sb == NULL) - RETURN(0); - - ping_evictor_stop(); - - ptlrpc_unregister_service(mgs->mgs_service); - - mgs_cleanup_fsdb_list(obd); - lproc_mgs_cleanup(obd); - mgs_fs_cleanup(obd); - - server_put_mount(obd->obd_name, mgs->mgs_vfsmnt); - mgs->mgs_sb = NULL; - - /* Free the namespace in it's own thread, so that if the - ldlm_cancel_handler put the last mgs obd ref, we won't - deadlock here. */ - cfs_kernel_thread(mgs_ldlm_nsfree, obd->obd_namespace, - CLONE_VM | CLONE_FILES); - - fsfilt_put_ops(obd->obd_fsops); - - LCONSOLE_INFO("%s has stopped.\n", obd->obd_name); - RETURN(0); -} - -/* similar to filter_prepare_destroy */ -static int mgs_get_cfg_lock(struct obd_device *obd, char *fsname, - struct lustre_handle *lockh) -{ - struct ldlm_res_id res_id; - int rc, flags = 0; - ENTRY; - - rc = mgc_fsname2resid(fsname, &res_id); - if (!rc) - rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id, - LDLM_PLAIN, NULL, LCK_EX, - &flags, ldlm_blocking_ast, - ldlm_completion_ast, NULL, - fsname, 0, NULL, lockh); - if (rc) - CERROR("can't take cfg lock for %s (%d)\n", fsname, rc); - - RETURN(rc); -} - -static int mgs_put_cfg_lock(struct lustre_handle *lockh) -{ - ENTRY; - ldlm_lock_decref(lockh, LCK_EX); - RETURN(0); -} - -/* rc=0 means ok - 1 means update - <0 means error */ -static int mgs_check_target(struct obd_device *obd, struct mgs_target_info *mti) -{ - int rc; - ENTRY; - - rc = mgs_check_index(obd, mti); - if (rc == 0) { - LCONSOLE_ERROR_MSG(0x13b, "%s claims to have registered, but " - "this MGS does not know about it. Assuming " - "writeconf.\n", mti->mti_svname); - mti->mti_flags |= LDD_F_WRITECONF; - rc = 1; - } else if (rc == -1) { - LCONSOLE_ERROR_MSG(0x13c, "Client log %s-client has " - "disappeared! Regenerating all logs.\n", - mti->mti_fsname); - mti->mti_flags |= LDD_F_WRITECONF; - rc = 1; - } else { - /* Index is correctly marked as used */ - - /* If the logs don't contain the mti_nids then add - them as failover nids */ - rc = mgs_check_failnid(obd, mti); - } - - RETURN(rc); -} - -/* Called whenever a target starts up. Flags indicate first connect, etc. */ -static int mgs_handle_target_reg(struct ptlrpc_request *req) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct lustre_handle lockh; - struct mgs_target_info *mti, *rep_mti; - int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*mti) }; - int rc = 0, lockrc; - ENTRY; - - mgs_counter_incr(req->rq_export, LPROC_MGS_TARGET_REG); - - mti = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*mti), - lustre_swab_mgs_target_info); - - if (!(mti->mti_flags & (LDD_F_WRITECONF | LDD_F_UPGRADE14 | - LDD_F_UPDATE))) { - /* We're just here as a startup ping. */ - CDEBUG(D_MGS, "Server %s is running on %s\n", - mti->mti_svname, obd_export_nid2str(req->rq_export)); - rc = mgs_check_target(obd, mti); - /* above will set appropriate mti flags */ - if (rc <= 0) - /* Nothing wrong, or fatal error */ - GOTO(out_nolock, rc); - } - - /* Revoke the config lock to make sure nobody is reading. */ - /* Although actually I think it should be alright if - someone was reading while we were updating the logs - if we - revoke at the end they will just update from where they left off. */ - lockrc = mgs_get_cfg_lock(obd, mti->mti_fsname, &lockh); - if (lockrc != ELDLM_OK) { - LCONSOLE_ERROR_MSG(0x13d, "%s: Can't signal other nodes to " - "update their configuration (%d). Updating " - "local logs anyhow; you might have to " - "manually restart other nodes to get the " - "latest configuration.\n", - obd->obd_name, lockrc); - } - - OBD_FAIL_TIMEOUT(OBD_FAIL_MGS_PAUSE_TARGET_REG, 10); - - /* Log writing contention is handled by the fsdb_sem */ - - if (mti->mti_flags & LDD_F_WRITECONF) { - if (mti->mti_flags & LDD_F_SV_TYPE_MDT) { - rc = mgs_erase_logs(obd, mti->mti_fsname); - LCONSOLE_WARN("%s: Logs for fs %s were removed by user " - "request. All servers must be restarted " - "in order to regenerate the logs." - "\n", obd->obd_name, mti->mti_fsname); - } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) { - rc = mgs_erase_log(obd, mti->mti_svname); - LCONSOLE_WARN("%s: Regenerating %s log by user " - "request.\n", - obd->obd_name, mti->mti_svname); - } - mti->mti_flags |= LDD_F_UPDATE; - /* Erased logs means start from scratch. */ - mti->mti_flags &= ~LDD_F_UPGRADE14; - } - - /* COMPAT_146 */ - if (mti->mti_flags & LDD_F_UPGRADE14) { - rc = mgs_upgrade_sv_14(obd, mti); - if (rc) { - CERROR("Can't upgrade from 1.4 (%d)\n", rc); - GOTO(out, rc); - } - - /* We're good to go */ - mti->mti_flags |= LDD_F_UPDATE; - } - /* end COMPAT_146 */ - - if (mti->mti_flags & LDD_F_UPDATE) { - CDEBUG(D_MGS, "updating %s, index=%d\n", mti->mti_svname, - mti->mti_stripe_index); - - /* create or update the target log - and update the client/mdt logs */ - rc = mgs_write_log_target(obd, mti); - if (rc) { - CERROR("Failed to write %s log (%d)\n", - mti->mti_svname, rc); - GOTO(out, rc); - } - - mti->mti_flags &= ~(LDD_F_VIRGIN | LDD_F_UPDATE | - LDD_F_NEED_INDEX | LDD_F_WRITECONF | - LDD_F_UPGRADE14); - mti->mti_flags |= LDD_F_REWRITE_LDD; - } - -out: - /* done with log update */ - if (lockrc == ELDLM_OK) - mgs_put_cfg_lock(&lockh); -out_nolock: - CDEBUG(D_MGS, "replying with %s, index=%d, rc=%d\n", mti->mti_svname, - mti->mti_stripe_index, rc); - lustre_pack_reply(req, 2, rep_size, NULL); - /* send back the whole mti in the reply */ - rep_mti = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*rep_mti)); - memcpy(rep_mti, mti, sizeof(*rep_mti)); - - /* Flush logs to disk */ - fsfilt_sync(obd, obd->u.mgs.mgs_sb); - RETURN(rc); -} - -static int mgs_set_info_rpc(struct ptlrpc_request *req) -{ - struct obd_device *obd = req->rq_export->exp_obd; - struct mgs_send_param *msp, *rep_msp; - struct lustre_handle lockh; - int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*msp) }; - int lockrc, rc; - struct lustre_cfg_bufs bufs; - struct lustre_cfg *lcfg; - char fsname[MTI_NAME_MAXLEN]; - ENTRY; - - msp = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*msp), NULL); - - /* Construct lustre_cfg structure to pass to function mgs_setparam */ - lustre_cfg_bufs_reset(&bufs, NULL); - lustre_cfg_bufs_set_string(&bufs, 1, msp->mgs_param); - lcfg = lustre_cfg_new(LCFG_PARAM, &bufs); - rc = mgs_setparam(obd, lcfg, fsname); - if (rc) { - CERROR("Error %d in setting the parameter %s for fs %s\n", - rc, msp->mgs_param, fsname); - RETURN(rc); - } - - /* Revoke lock so everyone updates. Should be alright if - * someone was already reading while we were updating the logs, - * so we don't really need to hold the lock while we're - * writing. - */ - if (fsname[0]) { - lockrc = mgs_get_cfg_lock(obd, fsname, &lockh); - if (lockrc != ELDLM_OK) - CERROR("lock error %d for fs %s\n", lockrc, - fsname); - else - mgs_put_cfg_lock(&lockh); - } - lustre_cfg_free(lcfg); - - lustre_pack_reply(req, 2, rep_size, NULL); - rep_msp = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, - sizeof(*rep_msp)); - memcpy(rep_msp, msp, sizeof(*rep_msp)); - - RETURN(rc); -} - -/* Called whenever a target cleans up. */ -/* XXX - Currently unused */ -static int mgs_handle_target_del(struct ptlrpc_request *req) -{ - ENTRY; - mgs_counter_incr(req->rq_export, LPROC_MGS_TARGET_DEL); - RETURN(0); -} - -/* XXX - Currently unused */ -static int mgs_handle_exception(struct ptlrpc_request *req) -{ - ENTRY; - mgs_counter_incr(req->rq_export, LPROC_MGS_EXCEPTION); - RETURN(0); -} - -int mgs_handle(struct ptlrpc_request *req) -{ - int fail = OBD_FAIL_MGS_ALL_REPLY_NET; - int opc, rc = 0; - ENTRY; - - OBD_FAIL_TIMEOUT_MS(OBD_FAIL_MGS_PAUSE_REQ, obd_fail_val); - OBD_FAIL_RETURN(OBD_FAIL_MGS_ALL_REQUEST_NET, 0); - - LASSERT(current->journal_info == NULL); - opc = lustre_msg_get_opc(req->rq_reqmsg); - if (opc != MGS_CONNECT) { - if (req->rq_export == NULL) { - CERROR("lustre_mgs: operation %d on unconnected MGS\n", - opc); - req->rq_status = -ENOTCONN; - GOTO(out, rc = -ENOTCONN); - } - } - - switch (opc) { - case MGS_CONNECT: - DEBUG_REQ(D_MGS, req, "connect"); - rc = target_handle_connect(req, mgs_handle); - if (!rc && (lustre_msg_get_conn_cnt(req->rq_reqmsg) > 1)) - /* Make clients trying to reconnect after a MGS restart - happy; also requires obd_replayable */ - lustre_msg_add_op_flags(req->rq_repmsg, - MSG_CONNECT_RECONNECT); - break; - case MGS_DISCONNECT: - DEBUG_REQ(D_MGS, req, "disconnect"); - rc = target_handle_disconnect(req); - req->rq_status = rc; /* superfluous? */ - break; - case MGS_EXCEPTION: - DEBUG_REQ(D_MGS, req, "exception"); - rc = mgs_handle_exception(req); - break; - case MGS_TARGET_REG: - DEBUG_REQ(D_MGS, req, "target add"); - rc = mgs_handle_target_reg(req); - break; - case MGS_TARGET_DEL: - DEBUG_REQ(D_MGS, req, "target del"); - rc = mgs_handle_target_del(req); - break; - case MGS_SET_INFO: - rc = mgs_set_info_rpc(req); - break; - - case LDLM_ENQUEUE: - DEBUG_REQ(D_MGS, req, "enqueue"); - rc = ldlm_handle_enqueue(req, ldlm_server_completion_ast, - ldlm_server_blocking_ast, NULL); - break; - case LDLM_BL_CALLBACK: - case LDLM_CP_CALLBACK: - DEBUG_REQ(D_MGS, req, "callback"); - CERROR("callbacks should not happen on MGS\n"); - LBUG(); - break; - - case OBD_PING: - DEBUG_REQ(D_INFO, req, "ping"); - rc = target_handle_ping(req); - break; - case OBD_LOG_CANCEL: - DEBUG_REQ(D_MGS, req, "log cancel"); - rc = -ENOTSUPP; /* la la la */ - break; - - case LLOG_ORIGIN_HANDLE_CREATE: - DEBUG_REQ(D_MGS, req, "llog_init"); - rc = llog_origin_handle_create(req); - break; - case LLOG_ORIGIN_HANDLE_NEXT_BLOCK: - DEBUG_REQ(D_MGS, req, "llog next block"); - rc = llog_origin_handle_next_block(req); - break; - case LLOG_ORIGIN_HANDLE_READ_HEADER: - DEBUG_REQ(D_MGS, req, "llog read header"); - rc = llog_origin_handle_read_header(req); - break; - case LLOG_ORIGIN_HANDLE_CLOSE: - DEBUG_REQ(D_MGS, req, "llog close"); - rc = llog_origin_handle_close(req); - break; - case LLOG_CATINFO: - DEBUG_REQ(D_MGS, req, "llog catinfo"); - rc = llog_catinfo(req); - break; - default: - req->rq_status = -ENOTSUPP; - rc = ptlrpc_error(req); - RETURN(rc); - } - - LASSERT(current->journal_info == NULL); - - if (rc) - CERROR("MGS handle cmd=%d rc=%d\n", opc, rc); - - out: - target_send_reply(req, rc, fail); - RETURN(0); -} - -static inline int mgs_destroy_export(struct obd_export *exp) -{ - ENTRY; - - target_destroy_export(exp); - mgs_client_free(exp); - - RETURN(0); -} - -/* from mdt_iocontrol */ -int mgs_iocontrol(unsigned int cmd, struct obd_export *exp, int len, - void *karg, void *uarg) -{ - struct obd_device *obd = exp->exp_obd; - struct obd_ioctl_data *data = karg; - struct lvfs_run_ctxt saved; - int rc = 0; - - ENTRY; - CDEBUG(D_IOCTL, "handling ioctl cmd %#x\n", cmd); - - switch (cmd) { - - case OBD_IOC_PARAM: { - struct lustre_handle lockh; - struct lustre_cfg *lcfg; - struct llog_rec_hdr rec; - char fsname[MTI_NAME_MAXLEN]; - int lockrc; - - rec.lrh_len = llog_data_len(data->ioc_plen1); - - if (data->ioc_type == LUSTRE_CFG_TYPE) { - rec.lrh_type = OBD_CFG_REC; - } else { - CERROR("unknown cfg record type:%d \n", data->ioc_type); - RETURN(-EINVAL); - } - - OBD_ALLOC(lcfg, data->ioc_plen1); - if (lcfg == NULL) - RETURN(-ENOMEM); - rc = copy_from_user(lcfg, data->ioc_pbuf1, data->ioc_plen1); - if (rc) - GOTO(out_free, rc); - - if (lcfg->lcfg_bufcount < 1) - GOTO(out_free, rc = -EINVAL); - - rc = mgs_setparam(obd, lcfg, fsname); - if (rc) { - CERROR("setparam err %d\n", rc); - GOTO(out_free, rc); - } - - /* Revoke lock so everyone updates. Should be alright if - someone was already reading while we were updating the logs, - so we don't really need to hold the lock while we're - writing (above). */ - if (fsname[0]) { - lockrc = mgs_get_cfg_lock(obd, fsname, &lockh); - if (lockrc != ELDLM_OK) - CERROR("lock error %d for fs %s\n", lockrc, - fsname); - else - mgs_put_cfg_lock(&lockh); - } - -out_free: - OBD_FREE(lcfg, data->ioc_plen1); - RETURN(rc); - } - - case OBD_IOC_DUMP_LOG: { - struct llog_ctxt *ctxt = - llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - llog_ctxt_put(ctxt); - if (rc) - RETURN(rc); - - RETURN(rc); - } - - case OBD_IOC_LLOG_CHECK: - case OBD_IOC_LLOG_INFO: - case OBD_IOC_LLOG_PRINT: { - struct llog_ctxt *ctxt = - llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - - push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL); - rc = llog_ioctl(ctxt, cmd, data); - pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL); - llog_ctxt_put(ctxt); - - RETURN(rc); - } - - default: - CDEBUG(D_INFO, "unknown command %x\n", cmd); - RETURN(-EINVAL); - } - RETURN(0); -} - -/* use obd ops to offer management infrastructure */ -static struct obd_ops mgs_obd_ops = { - .o_owner = THIS_MODULE, - .o_connect = mgs_connect, - .o_disconnect = mgs_disconnect, - .o_setup = mgs_setup, - .o_precleanup = mgs_precleanup, - .o_cleanup = mgs_cleanup, - .o_destroy_export = mgs_destroy_export, - .o_iocontrol = mgs_iocontrol, -}; - -static int __init mgs_init(void) -{ - struct lprocfs_static_vars lvars; - - lprocfs_mgs_init_vars(&lvars); - class_register_type(&mgs_obd_ops, lvars.module_vars, LUSTRE_MGS_NAME); - - return 0; -} - -static void /*__exit*/ mgs_exit(void) -{ - class_unregister_type(LUSTRE_MGS_NAME); -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre Management Server (MGS)"); -MODULE_LICENSE("GPL"); - -module_init(mgs_init); -module_exit(mgs_exit); diff --git a/lustre/mgs/mgs_internal.h b/lustre/mgs/mgs_internal.h deleted file mode 100644 index 5fbe4488ce..0000000000 --- a/lustre/mgs/mgs_internal.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - */ - -#ifndef _MGS_INTERNAL_H -#define _MGS_INTERNAL_H - -#ifdef __KERNEL__ -# include <linux/fs.h> -#endif -#include <libcfs/kp30.h> -#include <lustre/lustre_idl.h> -#include <lustre_lib.h> -#include <lustre_dlm.h> -#include <lustre_log.h> -#include <lustre_export.h> - - -/* mgs_llog.c */ -int class_dentry_readdir(struct obd_device *obd, struct dentry *dir, - struct vfsmount *inmnt, - struct list_head *dentry_list); - -#define INDEX_MAP_SIZE 8192 /* covers indicies to FFFF */ -#define FSDB_LOG_EMPTY 0x0001 /* missing client log */ -#define FSDB_OLDLOG14 0x0002 /* log starts in old (1.4) style */ - -struct fs_db { - char fsdb_name[9]; - struct list_head fsdb_list; /* list of databases */ - struct semaphore fsdb_sem; - void *fsdb_ost_index_map; /* bitmap of used indicies */ - void *fsdb_mdt_index_map; /* bitmap of used indicies */ - /* COMPAT_146 these items must be recorded out of the old client log */ - char *fsdb_clilov; /* COMPAT_146 client lov name */ - char *fsdb_mdtlov; /* COMPAT_146 mds lov name */ - char *fsdb_mdc; /* COMPAT_146 mdc name */ - /* end COMPAT_146 */ - __u32 fsdb_flags; - __u32 fsdb_gen; -}; - -int mgs_init_fsdb_list(struct obd_device *obd); -int mgs_cleanup_fsdb_list(struct obd_device *obd); -int mgs_check_index(struct obd_device *obd, struct mgs_target_info *mti); -int mgs_check_failnid(struct obd_device *obd, struct mgs_target_info *mti); -int mgs_write_log_target(struct obd_device *obd, struct mgs_target_info *mti); -int mgs_upgrade_sv_14(struct obd_device *obd, struct mgs_target_info *mti); -int mgs_erase_log(struct obd_device *obd, char *name); -int mgs_erase_logs(struct obd_device *obd, char *fsname); -int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname); - -/* mgs_fs.c */ -int mgs_client_add(struct obd_device *obd, struct obd_export *exp); -int mgs_client_free(struct obd_export *exp); -int mgs_fs_setup(struct obd_device *obd, struct vfsmount *mnt); -int mgs_fs_cleanup(struct obd_device *obddev); - -#define strsuf(buf, suffix) (strcmp((buf)+strlen(buf)-strlen(suffix), (suffix))) - -#ifdef LPROCFS -int lproc_mgs_setup(struct obd_device *dev); -int lproc_mgs_cleanup(struct obd_device *obd); -int lproc_mgs_add_live(struct obd_device *obd, struct fs_db *fsdb); -int lproc_mgs_del_live(struct obd_device *obd, struct fs_db *fsdb); -void lprocfs_mgs_init_vars(struct lprocfs_static_vars *lvars); -#else -static inline int lproc_mgs_setup(struct obd_device *dev) -{return 0;} -static inline int lproc_mgs_cleanup(struct obd_device *obd) -{return 0;} -static inline int lproc_mgs_add_live(struct obd_device *obd, struct fs_db *fsdb) -{return 0;} -static inline int lproc_mgs_del_live(struct obd_device *obd, struct fs_db *fsdb) -{return 0;} -static void lprocfs_mgs_init_vars(struct lprocfs_static_vars *lvars) -{ - memset(lvars, 0, sizeof(*lvars)); -} -#endif - -/* mgs/lproc_mgs.c */ -enum { - LPROC_MGS_CONNECT = 0, - LPROC_MGS_DISCONNECT, - LPROC_MGS_EXCEPTION, - LPROC_MGS_TARGET_REG, - LPROC_MGS_TARGET_DEL, - LPROC_MGS_LAST -}; -void mgs_counter_incr(struct obd_export *exp, int opcode); -void mgs_stats_counter_init(struct lprocfs_stats *stats); - -#endif /* _MGS_INTERNAL_H */ - diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c deleted file mode 100644 index 8917d28b92..0000000000 --- a/lustre/mgs/mgs_llog.c +++ /dev/null @@ -1,2053 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * lustre/mgs/mgs_llog.c - * Lustre Management Server (mgs) config llog creation - * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nathan Rutman <nathan@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef EXPORT_SYMTAB -#define EXPORT_SYMTAB -#endif -#define DEBUG_SUBSYSTEM S_MGS -#define D_MGS D_CONFIG /*|D_WARNING*/ - -#ifdef __KERNEL__ -#include <linux/module.h> -#include <linux/pagemap.h> -#include <linux/fs.h> -#endif - -#include <obd.h> -#include <obd_lov.h> -#include <obd_class.h> -#include <lustre_log.h> -#include <obd_ost.h> -#include <libcfs/list.h> -#include <linux/lvfs.h> -#include <lustre_fsfilt.h> -#include <lustre_disk.h> -#include <lustre_param.h> -#include "mgs_internal.h" - -/******************** Class functions *********************/ - -/* Caller must list_del and OBD_FREE each dentry from the list */ -int class_dentry_readdir(struct obd_device *obd, struct dentry *dir, - struct vfsmount *inmnt, - struct list_head *dentry_list){ - /* see mds_cleanup_pending */ - struct lvfs_run_ctxt saved; - struct file *file; - struct dentry *dentry; - struct vfsmount *mnt; - int rc = 0; - ENTRY; - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - dentry = dget(dir); - if (IS_ERR(dentry)) - GOTO(out_pop, rc = PTR_ERR(dentry)); - mnt = mntget(inmnt); - if (IS_ERR(mnt)) { - l_dput(dentry); - GOTO(out_pop, rc = PTR_ERR(mnt)); - } - - file = dentry_open(dentry, mnt, O_RDONLY); - if (IS_ERR(file)) - /* dentry_open_it() drops the dentry, mnt refs */ - GOTO(out_pop, rc = PTR_ERR(file)); - - INIT_LIST_HEAD(dentry_list); - rc = l_readdir(file, dentry_list); - filp_close(file, 0); - /* filp_close->fput() drops the dentry, mnt refs */ - -out_pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - RETURN(rc); -} - -/******************** DB functions *********************/ - -static inline int name_create(char **newname, char *prefix, char *suffix) -{ - LASSERT(newname); - OBD_ALLOC(*newname, strlen(prefix) + strlen(suffix) + 1); - if (!*newname) - return -ENOMEM; - sprintf(*newname, "%s%s", prefix, suffix); - return 0; -} - -static inline void name_destroy(char **name) -{ - if (*name) - OBD_FREE(*name, strlen(*name) + 1); - *name = NULL; -} - -/* from the (client) config log, figure out: - 1. which ost's/mdt's are configured (by index) - 2. what the last config step is - 3. COMPAT_146 lov name - 4. COMPAT_146 mdt lov name - 5. COMPAT_146 mdc name -*/ -/* It might be better to have a separate db file, instead of parsing the info - out of the client log. This is slow and potentially error-prone. */ -static int mgs_fsdb_handler(struct llog_handle *llh, struct llog_rec_hdr *rec, - void *data) -{ - struct fs_db *fsdb = (struct fs_db *)data; - int cfg_len = rec->lrh_len; - char *cfg_buf = (char*) (rec + 1); - struct lustre_cfg *lcfg; - __u32 index; - int rc = 0; - ENTRY; - - if (rec->lrh_type != OBD_CFG_REC) { - CERROR("unhandled lrh_type: %#x\n", rec->lrh_type); - RETURN(-EINVAL); - } - - rc = lustre_cfg_sanity_check(cfg_buf, cfg_len); - if (rc) { - CERROR("Insane cfg\n"); - RETURN(rc); - } - - lcfg = (struct lustre_cfg *)cfg_buf; - - CDEBUG(D_INFO, "cmd %x %s %s\n", lcfg->lcfg_command, - lustre_cfg_string(lcfg, 0), lustre_cfg_string(lcfg, 1)); - - /* Figure out ost indicies */ - /* lov_modify_tgts add 0:lov1 1:ost1_UUID 2(index):0 3(gen):1 */ - if (lcfg->lcfg_command == LCFG_LOV_ADD_OBD || - lcfg->lcfg_command == LCFG_LOV_DEL_OBD) { - index = simple_strtoul(lustre_cfg_string(lcfg, 2), - NULL, 10); - CDEBUG(D_MGS, "OST index for %s is %u (%s)\n", - lustre_cfg_string(lcfg, 1), index, - lustre_cfg_string(lcfg, 2)); - set_bit(index, fsdb->fsdb_ost_index_map); - } - - /* Figure out mdt indicies */ - /* attach 0:MDC_uml1_mdsA_MNT_client 1:mdc 2:1d834_MNT_client_03f */ - if ((lcfg->lcfg_command == LCFG_ATTACH) && - (strcmp(lustre_cfg_string(lcfg, 1), LUSTRE_MDC_NAME) == 0)) { - rc = server_name2index(lustre_cfg_string(lcfg, 0), - &index, NULL); - if (rc != LDD_F_SV_TYPE_MDT) { - CWARN("Unparsable MDC name %s, assuming index 0\n", - lustre_cfg_string(lcfg, 0)); - index = 0; - } - rc = 0; - CDEBUG(D_MGS, "MDT index is %u\n", index); - set_bit(index, fsdb->fsdb_mdt_index_map); - } - - /* COMPAT_146 */ - /* figure out the old LOV name. fsdb_gen = 0 means old log */ - /* #01 L attach 0:lov_mdsA 1:lov 2:cdbe9_lov_mdsA_dc8cf7f3bb */ - if ((fsdb->fsdb_gen == 0) && (lcfg->lcfg_command == LCFG_ATTACH) && - (strcmp(lustre_cfg_string(lcfg, 1), LUSTRE_LOV_NAME) == 0)) { - fsdb->fsdb_flags |= FSDB_OLDLOG14; - name_destroy(&fsdb->fsdb_clilov); - rc = name_create(&fsdb->fsdb_clilov, - lustre_cfg_string(lcfg, 0), ""); - if (rc) - RETURN(rc); - CDEBUG(D_MGS, "client lov name is %s\n", fsdb->fsdb_clilov); - } - - /* figure out the old MDT lov name from the MDT uuid */ - if ((fsdb->fsdb_gen == 0) && (lcfg->lcfg_command == LCFG_SETUP) && - (strncmp(lustre_cfg_string(lcfg, 0), "MDC_", 4) == 0)) { - char *ptr; - fsdb->fsdb_flags |= FSDB_OLDLOG14; - ptr = strstr(lustre_cfg_string(lcfg, 1), "_UUID"); - if (!ptr) { - CERROR("Can't parse MDT uuid %s\n", - lustre_cfg_string(lcfg, 1)); - RETURN(-EINVAL); - } - *ptr = '\0'; - name_destroy(&fsdb->fsdb_mdtlov); - rc = name_create(&fsdb->fsdb_mdtlov, - "lov_", lustre_cfg_string(lcfg, 1)); - if (rc) - RETURN(rc); - name_destroy(&fsdb->fsdb_mdc); - rc = name_create(&fsdb->fsdb_mdc, - lustre_cfg_string(lcfg, 0), ""); - if (rc) - RETURN(rc); - CDEBUG(D_MGS, "MDT lov name is %s\n", fsdb->fsdb_mdtlov); - } - /* end COMPAT_146 */ - - /* Keep track of the latest marker step */ - if (lcfg->lcfg_command == LCFG_MARKER) { - struct cfg_marker *marker; - marker = lustre_cfg_buf(lcfg, 1); - fsdb->fsdb_gen = max(fsdb->fsdb_gen, marker->cm_step); - } - - RETURN(rc); -} - -static int mgs_get_fsdb_from_llog(struct obd_device *obd, struct fs_db *fsdb) -{ - char *logname; - struct llog_handle *loghandle; - struct lvfs_run_ctxt saved; - struct llog_ctxt *ctxt; - int rc, rc2; - ENTRY; - - ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - LASSERT(ctxt != NULL); - name_create(&logname, fsdb->fsdb_name, "-client"); - down(&fsdb->fsdb_sem); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_create(ctxt, &loghandle, NULL, logname); - if (rc) - GOTO(out_pop, rc); - - rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL); - if (rc) - GOTO(out_close, rc); - - if (llog_get_size(loghandle) <= 1) - fsdb->fsdb_flags |= FSDB_LOG_EMPTY; - - rc = llog_process(loghandle, mgs_fsdb_handler, (void *)fsdb, NULL); - CDEBUG(D_INFO, "get_db = %d\n", rc); -out_close: - rc2 = llog_close(loghandle); - if (!rc) - rc = rc2; -out_pop: - llog_ctxt_put(ctxt); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - up(&fsdb->fsdb_sem); - name_destroy(&logname); - - RETURN(rc); -} - -static struct fs_db *mgs_find_fsdb(struct obd_device *obd, char *fsname) -{ - struct mgs_obd *mgs = &obd->u.mgs; - struct fs_db *fsdb; - struct list_head *tmp; - - list_for_each(tmp, &mgs->mgs_fs_db_list) { - fsdb = list_entry(tmp, struct fs_db, fsdb_list); - if (strcmp(fsdb->fsdb_name, fsname) == 0) - return fsdb; - } - return NULL; -} - -/* caller must hold the mgs->mgs_fs_db_lock */ -static struct fs_db *mgs_new_fsdb(struct obd_device *obd, char *fsname) -{ - struct mgs_obd *mgs = &obd->u.mgs; - struct fs_db *fsdb; - int rc; - ENTRY; - - OBD_ALLOC_PTR(fsdb); - if (!fsdb) - RETURN(NULL); - - OBD_ALLOC(fsdb->fsdb_ost_index_map, INDEX_MAP_SIZE); - OBD_ALLOC(fsdb->fsdb_mdt_index_map, INDEX_MAP_SIZE); - if (!fsdb->fsdb_ost_index_map || !fsdb->fsdb_mdt_index_map) { - CERROR("No memory for index maps\n"); - GOTO(err, 0); - } - - strncpy(fsdb->fsdb_name, fsname, sizeof(fsdb->fsdb_name)); - fsdb->fsdb_name[sizeof(fsdb->fsdb_name) - 1] = 0; - rc = name_create(&fsdb->fsdb_mdtlov, fsname, "-mdtlov"); - if (rc) - GOTO(err, rc); - rc = name_create(&fsdb->fsdb_clilov, fsname, "-clilov"); - if (rc) - GOTO(err, rc); - - sema_init(&fsdb->fsdb_sem, 1); - list_add(&fsdb->fsdb_list, &mgs->mgs_fs_db_list); - lproc_mgs_add_live(obd, fsdb); - - RETURN(fsdb); -err: - if (fsdb->fsdb_ost_index_map) - OBD_FREE(fsdb->fsdb_ost_index_map, INDEX_MAP_SIZE); - if (fsdb->fsdb_mdt_index_map) - OBD_FREE(fsdb->fsdb_mdt_index_map, INDEX_MAP_SIZE); - name_destroy(&fsdb->fsdb_clilov); - name_destroy(&fsdb->fsdb_mdtlov); - OBD_FREE_PTR(fsdb); - RETURN(NULL); -} - -static void mgs_free_fsdb(struct obd_device *obd, struct fs_db *fsdb) -{ - /* wait for anyone with the sem */ - down(&fsdb->fsdb_sem); - lproc_mgs_del_live(obd, fsdb); - list_del(&fsdb->fsdb_list); - OBD_FREE(fsdb->fsdb_ost_index_map, INDEX_MAP_SIZE); - OBD_FREE(fsdb->fsdb_mdt_index_map, INDEX_MAP_SIZE); - name_destroy(&fsdb->fsdb_clilov); - name_destroy(&fsdb->fsdb_mdtlov); - name_destroy(&fsdb->fsdb_mdc); - OBD_FREE_PTR(fsdb); -} - -int mgs_init_fsdb_list(struct obd_device *obd) -{ - struct mgs_obd *mgs = &obd->u.mgs; - INIT_LIST_HEAD(&mgs->mgs_fs_db_list); - return 0; -} - -int mgs_cleanup_fsdb_list(struct obd_device *obd) -{ - struct mgs_obd *mgs = &obd->u.mgs; - struct fs_db *fsdb; - struct list_head *tmp, *tmp2; - down(&mgs->mgs_sem); - list_for_each_safe(tmp, tmp2, &mgs->mgs_fs_db_list) { - fsdb = list_entry(tmp, struct fs_db, fsdb_list); - mgs_free_fsdb(obd, fsdb); - } - up(&mgs->mgs_sem); - return 0; -} - -static int mgs_find_or_make_fsdb(struct obd_device *obd, char *name, - struct fs_db **dbh) -{ - struct mgs_obd *mgs = &obd->u.mgs; - struct fs_db *fsdb; - int rc = 0; - - down(&mgs->mgs_sem); - fsdb = mgs_find_fsdb(obd, name); - if (fsdb) { - up(&mgs->mgs_sem); - *dbh = fsdb; - return 0; - } - - CDEBUG(D_MGS, "Creating new db\n"); - fsdb = mgs_new_fsdb(obd, name); - up(&mgs->mgs_sem); - if (!fsdb) - return -ENOMEM; - - /* populate the db from the client llog */ - rc = mgs_get_fsdb_from_llog(obd, fsdb); - if (rc) { - CERROR("Can't get db from client log %d\n", rc); - mgs_free_fsdb(obd, fsdb); - return rc; - } - - *dbh = fsdb; - - return 0; -} - -/* 1 = index in use - 0 = index unused - -1= empty client log */ -int mgs_check_index(struct obd_device *obd, struct mgs_target_info *mti) -{ - struct fs_db *fsdb; - void *imap; - int rc = 0; - ENTRY; - - LASSERT(!(mti->mti_flags & LDD_F_NEED_INDEX)); - - rc = mgs_find_or_make_fsdb(obd, mti->mti_fsname, &fsdb); - if (rc) { - CERROR("Can't get db for %s\n", mti->mti_fsname); - RETURN(rc); - } - - if (fsdb->fsdb_flags & FSDB_LOG_EMPTY) - RETURN(-1); - - if (mti->mti_flags & LDD_F_SV_TYPE_OST) - imap = fsdb->fsdb_ost_index_map; - else if (mti->mti_flags & LDD_F_SV_TYPE_MDT) - imap = fsdb->fsdb_mdt_index_map; - else - RETURN(-EINVAL); - - if (test_bit(mti->mti_stripe_index, imap)) - RETURN(1); - RETURN(0); -} - -static __inline__ int next_index(void *index_map, int map_len) -{ - int i; - for (i = 0; i < map_len * 8; i++) - if (!test_bit(i, index_map)) { - return i; - } - CERROR("max index %d exceeded.\n", i); - return -1; -} - -/* Return codes: - 0 newly marked as in use - <0 err - +EALREADY for update of an old index */ -int mgs_set_index(struct obd_device *obd, struct mgs_target_info *mti) -{ - struct fs_db *fsdb; - void *imap; - int rc = 0; - ENTRY; - - rc = mgs_find_or_make_fsdb(obd, mti->mti_fsname, &fsdb); - if (rc) { - CERROR("Can't get db for %s\n", mti->mti_fsname); - RETURN(rc); - } - - if (mti->mti_flags & LDD_F_SV_TYPE_OST) - imap = fsdb->fsdb_ost_index_map; - else if (mti->mti_flags & LDD_F_SV_TYPE_MDT) - imap = fsdb->fsdb_mdt_index_map; - else - RETURN(-EINVAL); - - if (mti->mti_flags & LDD_F_NEED_INDEX) { - rc = next_index(imap, INDEX_MAP_SIZE); - if (rc == -1) - RETURN(-ERANGE); - mti->mti_stripe_index = rc; - } - - /* Remove after CMD */ - if ((mti->mti_flags & LDD_F_SV_TYPE_MDT) && - (mti->mti_stripe_index > 0)) { - LCONSOLE_ERROR_MSG(0x13e, "MDT index must = 0 (until Clustered " - "MetaData feature is ready.)\n"); - mti->mti_stripe_index = 0; - } - - if (mti->mti_stripe_index >= INDEX_MAP_SIZE * 8) { - LCONSOLE_ERROR_MSG(0x13f, "Server %s requested index %d, but the" - "max index is %d.\n", - mti->mti_svname, mti->mti_stripe_index, - INDEX_MAP_SIZE * 8); - RETURN(-ERANGE); - } - - if (test_bit(mti->mti_stripe_index, imap)) { - if (mti->mti_flags & LDD_F_VIRGIN) { - LCONSOLE_ERROR_MSG(0x140, "Server %s requested index " - "%d, but that index is already in " - "use\n", mti->mti_svname, - mti->mti_stripe_index); - RETURN(-EADDRINUSE); - } else { - CDEBUG(D_MGS, "Server %s updating index %d\n", - mti->mti_svname, mti->mti_stripe_index); - RETURN(EALREADY); - } - } - - set_bit(mti->mti_stripe_index, imap); - fsdb->fsdb_flags &= ~FSDB_LOG_EMPTY; - server_make_name(mti->mti_flags, mti->mti_stripe_index, - mti->mti_fsname, mti->mti_svname); - - CDEBUG(D_MGS, "Set index for %s to %d\n", mti->mti_svname, - mti->mti_stripe_index); - - RETURN(0); -} - -struct mgs_modify_lookup { - struct cfg_marker mml_marker; - int mml_modified; -}; - -static int mgs_modify_handler(struct llog_handle *llh, struct llog_rec_hdr *rec, - void *data) -{ - struct mgs_modify_lookup *mml = (struct mgs_modify_lookup *)data; - struct cfg_marker *marker; - struct lustre_cfg *lcfg = (struct lustre_cfg *)(rec + 1); - int cfg_len = rec->lrh_len - sizeof(struct llog_rec_hdr) - - sizeof(struct llog_rec_tail); - int rc; - ENTRY; - - if (rec->lrh_type != OBD_CFG_REC) { - CERROR("unhandled lrh_type: %#x\n", rec->lrh_type); - RETURN(-EINVAL); - } - - rc = lustre_cfg_sanity_check(lcfg, cfg_len); - if (rc) { - CERROR("Insane cfg\n"); - RETURN(rc); - } - - /* We only care about markers */ - if (lcfg->lcfg_command != LCFG_MARKER) - RETURN(0); - - marker = lustre_cfg_buf(lcfg, 1); - if ((strcmp(mml->mml_marker.cm_comment, marker->cm_comment) == 0) && - (strcmp(mml->mml_marker.cm_tgtname, marker->cm_tgtname) == 0) && - !(marker->cm_flags & CM_SKIP)) { - /* Found a non-skipped marker match */ - CDEBUG(D_MGS, "Changing rec %u marker %d %x->%x: %s %s\n", - rec->lrh_index, marker->cm_step, - marker->cm_flags, mml->mml_marker.cm_flags, - marker->cm_tgtname, marker->cm_comment); - /* Overwrite the old marker llog entry */ - marker->cm_flags &= ~CM_EXCLUDE; /* in case we're unexcluding */ - marker->cm_flags |= mml->mml_marker.cm_flags; - marker->cm_canceltime = mml->mml_marker.cm_canceltime; - /* Header and tail are added back to lrh_len in - llog_lvfs_write_rec */ - rec->lrh_len = cfg_len; - rc = llog_write_rec(llh, rec, NULL, 0, (void *)lcfg, - rec->lrh_index); - if (!rc) - mml->mml_modified++; - } - - RETURN(rc); -} - -/* Modify an existing config log record (for CM_SKIP or CM_EXCLUDE) */ -static int mgs_modify(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti, char *logname, - char *devname, char *comment, int flags) -{ - struct llog_handle *loghandle; - struct lvfs_run_ctxt saved; - struct llog_ctxt *ctxt; - struct mgs_modify_lookup *mml; - int rc, rc2; - ENTRY; - - CDEBUG(D_MGS, "modify %s/%s/%s\n", logname, devname, comment); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - LASSERT(ctxt != NULL); - rc = llog_create(ctxt, &loghandle, NULL, logname); - if (rc) - GOTO(out_pop, rc); - - rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL); - if (rc) - GOTO(out_close, rc); - - if (llog_get_size(loghandle) <= 1) - GOTO(out_close, rc = 0); - - OBD_ALLOC_PTR(mml); - if (!mml) - GOTO(out_close, rc = -ENOMEM); - strcpy(mml->mml_marker.cm_comment, comment); - strcpy(mml->mml_marker.cm_tgtname, devname); - /* Modify mostly means cancel */ - mml->mml_marker.cm_flags = flags; - mml->mml_marker.cm_canceltime = flags ? cfs_time_current_sec() : 0; - mml->mml_modified = 0; - rc = llog_process(loghandle, mgs_modify_handler, (void *)mml, NULL); - if (!rc && !mml->mml_modified) - rc = -ENODEV; - OBD_FREE_PTR(mml); - -out_close: - rc2 = llog_close(loghandle); - if (!rc) - rc = rc2; -out_pop: - llog_ctxt_put(ctxt); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - if (rc && rc != -ENODEV) - CERROR("modify %s/%s failed %d\n", - mti->mti_svname, comment, rc); - - RETURN(rc); -} - - -/******************** config log recording functions *********************/ - -static int record_lcfg(struct obd_device *obd, struct llog_handle *llh, - struct lustre_cfg *lcfg) -{ - struct lvfs_run_ctxt saved; - struct llog_rec_hdr rec; - int buflen, rc; - - if (!lcfg || !llh) - return -ENOMEM; - - LASSERT(llh->lgh_ctxt); - - buflen = lustre_cfg_len(lcfg->lcfg_bufcount, - lcfg->lcfg_buflens); - rec.lrh_len = llog_data_len(buflen); - rec.lrh_type = OBD_CFG_REC; - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - /* idx = -1 means append */ - rc = llog_write_rec(llh, &rec, NULL, 0, (void *)lcfg, -1); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - if (rc) - CERROR("failed %d\n", rc); - return rc; -} - -static int record_base(struct obd_device *obd, struct llog_handle *llh, - char *cfgname, lnet_nid_t nid, int cmd, - char *s1, char *s2, char *s3, char *s4) -{ - struct lustre_cfg_bufs bufs; - struct lustre_cfg *lcfg; - int rc; - - CDEBUG(D_MGS, "lcfg %s %#x %s %s %s %s\n", cfgname, - cmd, s1, s2, s3, s4); - - lustre_cfg_bufs_reset(&bufs, cfgname); - if (s1) - lustre_cfg_bufs_set_string(&bufs, 1, s1); - if (s2) - lustre_cfg_bufs_set_string(&bufs, 2, s2); - if (s3) - lustre_cfg_bufs_set_string(&bufs, 3, s3); - if (s4) - lustre_cfg_bufs_set_string(&bufs, 4, s4); - - lcfg = lustre_cfg_new(cmd, &bufs); - if (!lcfg) - return -ENOMEM; - lcfg->lcfg_nid = nid; - - rc = record_lcfg(obd, llh, lcfg); - - lustre_cfg_free(lcfg); - - if (rc) { - CERROR("error %d: lcfg %s %#x %s %s %s %s\n", rc, cfgname, - cmd, s1, s2, s3, s4); - } - return(rc); -} - - -static inline int record_add_uuid(struct obd_device *obd, - struct llog_handle *llh, - __u64 nid, char *uuid) -{ - return record_base(obd,llh,NULL,nid,LCFG_ADD_UUID,uuid,0,0,0); - -} - -static inline int record_add_conn(struct obd_device *obd, - struct llog_handle *llh, - char *devname, - char *uuid) -{ - return record_base(obd,llh,devname,0,LCFG_ADD_CONN,uuid,0,0,0); -} - -static inline int record_attach(struct obd_device *obd, struct llog_handle *llh, - char *devname, char *type, char *uuid) -{ - return record_base(obd,llh,devname,0,LCFG_ATTACH,type,uuid,0,0); -} - -static inline int record_setup(struct obd_device *obd, struct llog_handle *llh, - char *devname, - char *s1, char *s2, char *s3, char *s4) -{ - return record_base(obd,llh,devname,0,LCFG_SETUP,s1,s2,s3,s4); -} - -static int record_lov_setup(struct obd_device *obd, struct llog_handle *llh, - char *devname, struct lov_desc *desc) -{ - struct lustre_cfg_bufs bufs; - struct lustre_cfg *lcfg; - int rc; - - lustre_cfg_bufs_reset(&bufs, devname); - lustre_cfg_bufs_set(&bufs, 1, desc, sizeof(*desc)); - lcfg = lustre_cfg_new(LCFG_SETUP, &bufs); - if (!lcfg) - return -ENOMEM; - rc = record_lcfg(obd, llh, lcfg); - - lustre_cfg_free(lcfg); - return rc; -} - -static inline int record_lov_add(struct obd_device *obd, - struct llog_handle *llh, - char *lov_name, char *ost_uuid, - char *index, char *gen) -{ - return record_base(obd,llh,lov_name,0,LCFG_LOV_ADD_OBD, - ost_uuid,index,gen,0); -} - -static inline int record_mount_opt(struct obd_device *obd, - struct llog_handle *llh, - char *profile, char *lov_name, - char *mdc_name) -{ - return record_base(obd,llh,NULL,0,LCFG_MOUNTOPT, - profile,lov_name,mdc_name,0); -} - -static int record_marker(struct obd_device *obd, struct llog_handle *llh, - struct fs_db *fsdb, __u32 flags, - char *tgtname, char *comment) -{ - struct cfg_marker marker; - struct lustre_cfg_bufs bufs; - struct lustre_cfg *lcfg; - int rc; - - if (flags & CM_START) - fsdb->fsdb_gen++; - marker.cm_step = fsdb->fsdb_gen; - marker.cm_flags = flags; - marker.cm_vers = LUSTRE_VERSION_CODE; - strncpy(marker.cm_tgtname, tgtname, sizeof(marker.cm_tgtname)); - strncpy(marker.cm_comment, comment, sizeof(marker.cm_comment)); - marker.cm_createtime = cfs_time_current_sec(); - marker.cm_canceltime = 0; - lustre_cfg_bufs_reset(&bufs, NULL); - lustre_cfg_bufs_set(&bufs, 1, &marker, sizeof(marker)); - lcfg = lustre_cfg_new(LCFG_MARKER, &bufs); - if (!lcfg) - return -ENOMEM; - rc = record_lcfg(obd, llh, lcfg); - - lustre_cfg_free(lcfg); - return rc; -} - -static int record_start_log(struct obd_device *obd, - struct llog_handle **llh, char *name) -{ - static struct obd_uuid cfg_uuid = { .uuid = "config_uuid" }; - struct lvfs_run_ctxt saved; - struct llog_ctxt *ctxt; - int rc = 0; - - if (*llh) - GOTO(out, rc = -EBUSY); - - ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - if (!ctxt) - GOTO(out, rc = -ENODEV); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_create(ctxt, llh, NULL, name); - if (rc == 0) - llog_init_handle(*llh, LLOG_F_IS_PLAIN, &cfg_uuid); - else - *llh = NULL; - - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - llog_ctxt_put(ctxt); - -out: - if (rc) { - CERROR("Can't start log %s: %d\n", name, rc); - } - RETURN(rc); -} - -static int record_end_log(struct obd_device *obd, struct llog_handle **llh) -{ - struct lvfs_run_ctxt saved; - int rc = 0; - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - rc = llog_close(*llh); - *llh = NULL; - - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - RETURN(rc); -} - -static int mgs_log_is_empty(struct obd_device *obd, char *name) -{ - struct lvfs_run_ctxt saved; - struct llog_handle *llh; - struct llog_ctxt *ctxt; - int rc = 0; - - ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - LASSERT(ctxt != NULL); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_create(ctxt, &llh, NULL, name); - if (rc == 0) { - llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL); - rc = llog_get_size(llh); - llog_close(llh); - } - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - llog_ctxt_put(ctxt); - /* header is record 1 */ - return(rc <= 1); -} - -/******************** config "macros" *********************/ - -/* write an lcfg directly into a log (with markers) */ -static int mgs_write_log_direct(struct obd_device *obd, struct fs_db *fsdb, - char *logname, struct lustre_cfg *lcfg, - char *devname, char *comment) -{ - struct llog_handle *llh = NULL; - int rc; - ENTRY; - - if (!lcfg) - RETURN(-ENOMEM); - - rc = record_start_log(obd, &llh, logname); - if (rc) - RETURN(rc); - - /* FIXME These should be a single journal transaction */ - rc = record_marker(obd, llh, fsdb, CM_START, devname, comment); - - rc = record_lcfg(obd, llh, lcfg); - - rc = record_marker(obd, llh, fsdb, CM_END, devname, comment); - rc = record_end_log(obd, &llh); - - RETURN(rc); -} - -/* write the lcfg in all logs for the given fs */ -int mgs_write_log_direct_all(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti, - struct lustre_cfg *lcfg, - char *devname, char *comment) -{ - struct mgs_obd *mgs = &obd->u.mgs; - struct list_head dentry_list; - struct l_linux_dirent *dirent, *n; - char *fsname = mti->mti_fsname; - char *logname; - int rc = 0, len = strlen(fsname); - ENTRY; - - /* We need to set params for any future logs - as well. FIXME Append this file to every new log. - Actually, we should store as params (text), not llogs. Or - in a database. */ - name_create(&logname, fsname, "-params"); - if (mgs_log_is_empty(obd, logname)) { - struct llog_handle *llh = NULL; - rc = record_start_log(obd, &llh, logname); - record_end_log(obd, &llh); - } - name_destroy(&logname); - if (rc) - RETURN(rc); - - /* Find all the logs in the CONFIGS directory */ - rc = class_dentry_readdir(obd, mgs->mgs_configs_dir, - mgs->mgs_vfsmnt, &dentry_list); - if (rc) { - CERROR("Can't read %s dir\n", MOUNT_CONFIGS_DIR); - RETURN(rc); - } - - /* Could use fsdb index maps instead of directory listing */ - list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) { - list_del(&dirent->lld_list); - if (strncmp(fsname, dirent->lld_name, len) == 0) { - CDEBUG(D_MGS, "Changing log %s\n", dirent->lld_name); - /* Erase any old settings of this same parameter */ - mgs_modify(obd, fsdb, mti, dirent->lld_name, devname, - comment, CM_SKIP); - /* Write the new one */ - rc = mgs_write_log_direct(obd, fsdb, dirent->lld_name, - lcfg, devname, comment); - if (rc) - CERROR("err %d writing log %s\n", rc, - dirent->lld_name); - } - OBD_FREE(dirent, sizeof(*dirent)); - } - - RETURN(rc); -} - -/* lov is the first thing in the mdt and client logs */ -static int mgs_write_log_lov(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti, - char *logname, char *lovname) -{ - struct llog_handle *llh = NULL; - struct lov_desc *lovdesc; - char *uuid; - int rc = 0; - ENTRY; - - CDEBUG(D_MGS, "Writing log %s\n", logname); - - /* - #01 L attach 0:lov_mdsA 1:lov 2:71ccb_lov_mdsA_19f961a9e1 - #02 L lov_setup 0:lov_mdsA 1:(struct lov_desc) - uuid=lov1_UUID, stripe count=1, size=1048576, offset=0, pattern=0 - */ - - /* FIXME just make lov_setup accept empty desc (put uuid in buf 2) */ - OBD_ALLOC(lovdesc, sizeof(*lovdesc)); - if (lovdesc == NULL) - RETURN(-ENOMEM); - lovdesc->ld_magic = LOV_DESC_MAGIC; - lovdesc->ld_tgt_count = 0; - /* Defaults. Can be changed later by lcfg config_param */ - lovdesc->ld_default_stripe_count = 1; - lovdesc->ld_pattern = LOV_PATTERN_RAID0; - lovdesc->ld_default_stripe_size = 1024 * 1024; - lovdesc->ld_default_stripe_offset = 0; - lovdesc->ld_qos_maxage = QOS_DEFAULT_MAXAGE; - sprintf((char*)lovdesc->ld_uuid.uuid, "%s_UUID", lovname); - /* can these be the same? */ - uuid = (char *)lovdesc->ld_uuid.uuid; - - /* This should always be the first entry in a log. - rc = mgs_clear_log(obd, logname); */ - rc = record_start_log(obd, &llh, logname); - if (rc) - GOTO(out, rc); - /* FIXME these should be a single journal transaction */ - rc = record_marker(obd, llh, fsdb, CM_START, lovname, "lov setup"); - rc = record_attach(obd, llh, lovname, "lov", uuid); - rc = record_lov_setup(obd, llh, lovname, lovdesc); - rc = record_marker(obd, llh, fsdb, CM_END, lovname, "lov setup"); - rc = record_end_log(obd, &llh); -out: - OBD_FREE(lovdesc, sizeof(*lovdesc)); - RETURN(rc); -} - -/* add failnids to open log */ -static int mgs_write_log_failnids(struct obd_device *obd, - struct mgs_target_info *mti, - struct llog_handle *llh, - char *cliname) -{ - char *failnodeuuid = NULL; - char *ptr = mti->mti_params; - lnet_nid_t nid; - int rc = 0; - - /* - #03 L add_uuid nid=uml1@tcp(0x20000c0a80201) nal=90 0: 1:uml1_UUID - #04 L add_uuid nid=1@elan(0x1000000000001) nal=90 0: 1:uml1_UUID - #05 L setup 0:OSC_uml1_ost1_mdsA 1:ost1_UUID 2:uml1_UUID - #06 L add_uuid nid=uml2@tcp(0x20000c0a80202) nal=90 0: 1:uml2_UUID - #0x L add_uuid nid=2@elan(0x1000000000002) nal=90 0: 1:uml2_UUID - #07 L add_conn 0:OSC_uml1_ost1_mdsA 1:uml2_UUID - */ - - /* Pull failnid info out of params string */ - while (class_find_param(ptr, PARAM_FAILNODE, &ptr) == 0) { - while (class_parse_nid(ptr, &nid, &ptr) == 0) { - if (failnodeuuid == NULL) { - /* We don't know the failover node name, - so just use the first nid as the uuid */ - rc = name_create(&failnodeuuid, - libcfs_nid2str(nid), ""); - if (rc) - return rc; - } - CDEBUG(D_MGS, "add nid %s for failover uuid %s, " - "client %s\n", libcfs_nid2str(nid), - failnodeuuid, cliname); - rc = record_add_uuid(obd, llh, nid, failnodeuuid); - } - if (failnodeuuid) { - rc = record_add_conn(obd, llh, cliname, failnodeuuid); - name_destroy(&failnodeuuid); - failnodeuuid = NULL; - } - } - - return rc; -} - -static int mgs_write_log_mdt(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti) -{ - struct llog_handle *llh = NULL; - char *cliname, *mdcname, *nodeuuid, *mdcuuid; - int rc, i, first_log = 0; - ENTRY; - - CDEBUG(D_MGS, "writing new mdt %s\n", mti->mti_svname); - - if (mti->mti_uuid[0] == '\0') { - /* Make up our own uuid */ - snprintf(mti->mti_uuid, sizeof(mti->mti_uuid), - "%s_UUID", mti->mti_svname); - } - - /* Append mdt info to mdt log */ - if (mgs_log_is_empty(obd, mti->mti_svname)) { - /* This is the first time for all logs for this fs, - since any ost should have already started the mdt log. */ - first_log++; - rc = mgs_write_log_lov(obd, fsdb, mti, mti->mti_svname, - fsdb->fsdb_mdtlov); - } - /* else there's already some ost entries in the mdt log. */ - - /* We added the lov, maybe some osc's, now for the mdt. - We might add more ost's after this. Note that during the parsing - of this log, this is when the mdt will start. (This was not - formerly part of the old mds log, it was directly executed by - lconf.) */ - /* - mount_option 0: 1:mdsA 2:lov_mdsA - attach mds mdsA mdsA_UUID - setup /dev/loop2 ldiskfs mdsA errors=remount-ro,user_xattr - */ - rc = record_start_log(obd, &llh, mti->mti_svname); - if (rc) - RETURN(rc); - /* FIXME this whole fn should be a single journal transaction */ - rc = record_marker(obd, llh, fsdb, CM_START, mti->mti_svname,"add mdt"); - rc = record_mount_opt(obd, llh, mti->mti_svname, fsdb->fsdb_mdtlov, 0); - rc = record_attach(obd, llh, mti->mti_svname, LUSTRE_MDS_NAME, - mti->mti_uuid); - rc = record_setup(obd, llh, mti->mti_svname, - "dev"/*ignored*/, "type"/*ignored*/, - mti->mti_svname, 0/*options*/); - rc = record_marker(obd, llh, fsdb, CM_END, mti->mti_svname, "add mdt"); - rc = record_end_log(obd, &llh); - - /* Append the mdt info to the client log */ - name_create(&cliname, mti->mti_fsname, "-client"); - if (first_log) { - /* Start client log */ - rc = mgs_write_log_lov(obd, fsdb, mti, cliname, - fsdb->fsdb_clilov); - } - - name_create(&nodeuuid, libcfs_nid2str(mti->mti_nids[0]),/*"_UUID"*/""); - name_create(&mdcname, mti->mti_svname, "-mdc"); - name_create(&mdcuuid, mdcname, "_UUID"); - /* - #09 L add_uuid nid=uml1@tcp(0x20000c0a80201) 0: 1:uml1_UUID - #10 L attach 0:MDC_uml1_mdsA_MNT_client 1:mdc 2:1d834_MNT_client_03f - #11 L setup 0:MDC_uml1_mdsA_MNT_client 1:mdsA_UUID 2:uml1_UUID - #12 L add_uuid nid=uml2@tcp(0x20000c0a80202) 0: 1:uml2_UUID - #13 L add_conn 0:MDC_uml1_mdsA_MNT_client 1:uml2_UUID - #14 L mount_option 0: 1:client 2:lov1 3:MDC_uml1_mdsA_MNT_client - */ - rc = record_start_log(obd, &llh, cliname); - if (rc) - GOTO(out, rc); - rc = record_marker(obd, llh, fsdb, CM_START, mti->mti_svname,"add mdc"); - /* COMPAT_146 */ - if (fsdb->fsdb_flags & FSDB_OLDLOG14) { - /* Old client log already has MDC entry, but needs mount opt - for new client name (lustre-client) */ - /* FIXME Old MDT log already has an old mount opt - which we should remove (currently handled by - class_del_profiles()) */ - rc = record_mount_opt(obd, llh, cliname, fsdb->fsdb_clilov, - fsdb->fsdb_mdc); - /* Only add failnids with --writeconf - rc = mgs_write_log_failnids(obd, mti, llh, fsdb->fsdb_mdc); - */ - /* end COMPAT_146 */ - } else { - for (i = 0; i < mti->mti_nid_count; i++) { - CDEBUG(D_MGS, "add nid %s\n", - libcfs_nid2str(mti->mti_nids[i])); - rc = record_add_uuid(obd, llh, mti->mti_nids[i], - nodeuuid); - } - rc = record_attach(obd, llh, mdcname, LUSTRE_MDC_NAME, mdcuuid); - rc = record_setup(obd, llh, mdcname, mti->mti_uuid,nodeuuid, - 0, 0); - rc = mgs_write_log_failnids(obd, mti, llh, mdcname); - rc = record_mount_opt(obd, llh, cliname, fsdb->fsdb_clilov, - mdcname); - } - rc = record_marker(obd, llh, fsdb, CM_END, mti->mti_svname, "add mdc"); - rc = record_end_log(obd, &llh); -out: - name_destroy(&mdcuuid); - name_destroy(&mdcname); - name_destroy(&nodeuuid); - name_destroy(&cliname); - RETURN(rc); -} - -/* Add the ost info to the client/mdt lov */ -static int mgs_write_log_osc(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti, - char *logname, char *lovname, int flags) -{ - struct llog_handle *llh = NULL; - char *nodeuuid, *oscname, *oscuuid, *lovuuid; - char index[5]; - int i, rc; - - if (mgs_log_is_empty(obd, logname)) { - /* The first item in the log must be the lov, so we have - somewhere to add our osc. */ - rc = mgs_write_log_lov(obd, fsdb, mti, logname, lovname); - } - - CDEBUG(D_MGS, "adding osc for %s to log %s\n", - mti->mti_svname, logname); - - name_create(&nodeuuid, libcfs_nid2str(mti->mti_nids[0]), ""); - name_create(&oscname, mti->mti_svname, "-osc"); - name_create(&oscuuid, oscname, "_UUID"); - name_create(&lovuuid, lovname, "_UUID"); - - /* - #03 L add_uuid nid=uml1@tcp(0x20000c0a80201) 0: 1:uml1_UUID - multihomed (#4) - #04 L add_uuid nid=1@elan(0x1000000000001) nal=90 0: 1:uml1_UUID - #04 L attach 0:OSC_uml1_ost1_MNT_client 1:osc 2:89070_lov1_a41dff51a - #05 L setup 0:OSC_uml1_ost1_MNT_client 1:ost1_UUID 2:uml1_UUID - failover (#6,7) - #06 L add_uuid nid=uml2@tcp(0x20000c0a80202) 0: 1:uml2_UUID - #07 L add_conn 0:OSC_uml1_ost1_MNT_client 1:uml2_UUID - #08 L lov_modify_tgts add 0:lov1 1:ost1_UUID 2(index):0 3(gen):1 - */ - rc = record_start_log(obd, &llh, logname); - if (rc) - GOTO(out, rc); - /* FIXME these should be a single journal transaction */ - rc = record_marker(obd, llh, fsdb, CM_START | flags, mti->mti_svname, - "add osc"); - for (i = 0; i < mti->mti_nid_count; i++) { - CDEBUG(D_MGS, "add nid %s\n", libcfs_nid2str(mti->mti_nids[i])); - rc = record_add_uuid(obd, llh, mti->mti_nids[i], nodeuuid); - } - rc = record_attach(obd, llh, oscname, LUSTRE_OSC_NAME, lovuuid); - rc = record_setup(obd, llh, oscname, mti->mti_uuid, nodeuuid, 0, 0); - rc = mgs_write_log_failnids(obd, mti, llh, oscname); - snprintf(index, sizeof(index), "%d", mti->mti_stripe_index); - rc = record_lov_add(obd, llh, lovname, mti->mti_uuid, index, "1"); - rc = record_marker(obd, llh, fsdb, CM_END | flags, mti->mti_svname, - "add osc"); - rc = record_end_log(obd, &llh); -out: - name_destroy(&lovuuid); - name_destroy(&oscuuid); - name_destroy(&oscname); - name_destroy(&nodeuuid); - return rc; -} - -static int mgs_write_log_ost(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti) -{ - struct llog_handle *llh = NULL; - char *logname; - char *ptr = mti->mti_params; - int rc, flags = 0, failout = 0; - ENTRY; - - CDEBUG(D_MGS, "writing new ost %s\n", mti->mti_svname); - - /* The ost startup log */ - - /* If the ost log already exists, that means that someone reformatted - the ost and it called target_add again. */ - if (!mgs_log_is_empty(obd, mti->mti_svname)) { - LCONSOLE_ERROR_MSG(0x141, "The config log for %s already " - "exists, yet the server claims it never " - "registered. It may have been reformatted, " - "or the index changed. writeconf the MDT to " - "regenerate all logs.\n", mti->mti_svname); - RETURN(-EALREADY); - } - /* - attach obdfilter ost1 ost1_UUID - setup /dev/loop2 ldiskfs f|n errors=remount-ro,user_xattr - */ - if (class_find_param(ptr, PARAM_FAILMODE, &ptr) == 0) - failout = (strncmp(ptr, "failout", 7) == 0); - rc = record_start_log(obd, &llh, mti->mti_svname); - if (rc) - RETURN(rc); - /* FIXME these should be a single journal transaction */ - rc = record_marker(obd, llh, fsdb, CM_START, mti->mti_svname,"add ost"); - if (*mti->mti_uuid == '\0') - snprintf(mti->mti_uuid, sizeof(mti->mti_uuid), - "%s_UUID", mti->mti_svname); - rc = record_attach(obd, llh, mti->mti_svname, - "obdfilter"/*LUSTRE_OST_NAME*/, mti->mti_uuid); - rc = record_setup(obd, llh, mti->mti_svname, - "dev"/*ignored*/, "type"/*ignored*/, - failout ? "n" : "f", 0/*options*/); - rc = record_marker(obd, llh, fsdb, CM_END, mti->mti_svname, "add ost"); - rc = record_end_log(obd, &llh); - - /* We also have to update the other logs where this osc is part of - the lov */ - - if (fsdb->fsdb_flags & FSDB_OLDLOG14) { - /* If we're upgrading, the old mdt log already has our - entry. Let's do a fake one for fun. */ - /* Note that we can't add any new failnids, since we don't - know the old osc names. */ - flags = CM_SKIP | CM_UPGRADE146; - } else if ((mti->mti_flags & LDD_F_UPDATE) != LDD_F_UPDATE) { - /* If the update flag isn't set, don't really update - client/mdt logs. */ - flags |= CM_SKIP; - LCONSOLE_WARN("Client log for %s was not updated; writeconf " - "the MDT first to regenerate it.\n", - mti->mti_svname); - } - - /* Append ost info to mdt log */ - /* FIXME add to all MDT logs for CMD */ - /* FIXME need real MDT name, but MDT may not have registered yet! */ - name_create(&logname, mti->mti_fsname, "-MDT0000"); - rc = mgs_write_log_osc(obd, fsdb, mti, logname, fsdb->fsdb_mdtlov, - flags); - name_destroy(&logname); - - /* Append ost info to the client log */ - name_create(&logname, mti->mti_fsname, "-client"); - rc = mgs_write_log_osc(obd, fsdb, mti, logname, fsdb->fsdb_clilov, - flags); - name_destroy(&logname); - - RETURN(rc); -} - -/* Add additional failnids to an existing log. - The mdc/osc must have been added to logs first */ -/* tcp nids must be in dotted-quad ascii - - we can't resolve hostnames from the kernel. */ -static int mgs_write_log_add_failnid(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti) -{ - char *logname, *cliname; - struct llog_handle *llh = NULL; - int rc; - ENTRY; - - /* FIXME how do we delete a failnid? Currently --writeconf is the - only way. Maybe make --erase-params pass a flag to really - erase all params from logs - except it can't erase the failnids - given when a target first registers, since they aren't processed - as params... */ - - /* Verify that we know about this target */ - if (mgs_log_is_empty(obd, mti->mti_svname)) { - LCONSOLE_ERROR_MSG(0x142, "The target %s has not registered " - "yet. It must be started before failnids can" - " be added.\n", mti->mti_svname); - RETURN(-ENOENT); - } - - /* Create mdc/osc client name (e.g. lustre-OST0001-osc) */ - if (mti->mti_flags & LDD_F_SV_TYPE_MDT) { - /* COMPAT_146 */ - if (fsdb->fsdb_mdc) - name_create(&cliname, fsdb->fsdb_mdc, ""); - else - name_create(&cliname, mti->mti_svname, "-mdc"); - } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) { - /* COMPAT_146 */ - if (fsdb->fsdb_flags & FSDB_OLDLOG14) { - LCONSOLE_ERROR_MSG(0x143, "Failover NIDs cannot be " - "added to upgraded client logs for " - "%s. Consider updating the " - "configuration with --writeconf.\n", - mti->mti_svname); - RETURN(-EINVAL); - } - name_create(&cliname, mti->mti_svname, "-osc"); - } else { - RETURN(-EINVAL); - } - - /* Add failover nids to client log */ - name_create(&logname, mti->mti_fsname, "-client"); - rc = record_start_log(obd, &llh, logname); - if (!rc) { - /* FIXME this fn should be a single journal transaction */ - rc = record_marker(obd, llh, fsdb, CM_START, mti->mti_svname, - "add failnid"); - rc = mgs_write_log_failnids(obd, mti, llh, cliname); - rc = record_marker(obd, llh, fsdb, CM_END, mti->mti_svname, - "add failnid"); - rc = record_end_log(obd, &llh); - } - name_destroy(&logname); - - if (mti->mti_flags & LDD_F_SV_TYPE_OST) { - /* Add OST failover nids to the MDT log as well */ - name_create(&logname, mti->mti_fsname, "-MDT0000"); - rc = record_start_log(obd, &llh, logname); - if (!rc) { - rc = record_marker(obd, llh, fsdb, CM_START, - mti->mti_svname, "add failnid"); - rc = mgs_write_log_failnids(obd, mti, llh, cliname); - rc = record_marker(obd, llh, fsdb, CM_END, - mti->mti_svname, "add failnid"); - rc = record_end_log(obd, &llh); - } - name_destroy(&logname); - } - - name_destroy(&cliname); - RETURN(rc); -} - -static int mgs_wlp_lcfg(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti, - char *logname, struct lustre_cfg_bufs *bufs, - char *tgtname, char *ptr) -{ - char comment[MTI_NAME_MAXLEN]; - char *tmp; - struct lustre_cfg *lcfg; - int rc; - - /* Erase any old settings of this same parameter */ - memcpy(comment, ptr, MTI_NAME_MAXLEN); - comment[MTI_NAME_MAXLEN - 1] = 0; - /* But don't try to match the value. */ - if ((tmp = strchr(comment, '='))) - *tmp = 0; - /* FIXME we should skip settings that are the same as old values */ - rc = mgs_modify(obd, fsdb, mti, logname, tgtname, comment, CM_SKIP); - LCONSOLE_INFO("%sing parameter %s.%s in log %s\n", rc ? - "Sett" : "Modify", tgtname, comment, logname); - - lustre_cfg_bufs_reset(bufs, tgtname); - lustre_cfg_bufs_set_string(bufs, 1, ptr); - lcfg = lustre_cfg_new(LCFG_PARAM, bufs); - if (!lcfg) - return -ENOMEM; - rc = mgs_write_log_direct(obd, fsdb, logname, lcfg, tgtname, comment); - lustre_cfg_free(lcfg); - return rc; -} - -static int mgs_write_log_params(struct obd_device *obd, struct fs_db *fsdb, - struct mgs_target_info *mti) -{ - struct lustre_cfg_bufs bufs; - struct lustre_cfg *lcfg; - char *logname; - char *ptr = mti->mti_params; - char *endptr, *tmp; - int rc = 0; - ENTRY; - - if (!mti->mti_params) - RETURN(0); - - /* For various parameter settings, we have to figure out which logs - care about them (e.g. both mdt and client for lov settings) */ - while (ptr) { - while (*ptr == ' ') - ptr++; - if (*ptr == '\0') - break; - endptr = strchr(ptr, ' '); - if (endptr) - *endptr = '\0'; - CDEBUG(D_MGS, "next param '%s'\n", ptr); - - /* The params are stored in MOUNT_DATA_FILE and modified - via tunefs.lustre */ - - /* Processed in lustre_start_mgc */ - if (class_match_param(ptr, PARAM_MGSNODE, NULL) == 0) - goto end_while; - - /* Processed in mgs_write_log_ost */ - if (class_match_param(ptr, PARAM_FAILMODE, NULL) == 0) { - if (mti->mti_flags & LDD_F_PARAM) { - LCONSOLE_ERROR_MSG(0x169, "%s can only be " - "changed with tunefs.lustre " - "and --writeconf\n", ptr); - rc = -EPERM; - } - goto end_while; - } - - if (class_match_param(ptr, PARAM_FAILNODE, NULL) == 0) { - /* Add a failover nidlist */ - rc = 0; - /* We already processed failovers params for new - targets in mgs_write_log_target */ - if (mti->mti_flags & LDD_F_PARAM) { - CDEBUG(D_MGS, "Adding failnode\n"); - rc = mgs_write_log_add_failnid(obd, fsdb, mti); - } - goto end_while; - } - - if (class_match_param(ptr, PARAM_SYS_TIMEOUT, &tmp) == 0) { - /* Change obd timeout */ - int timeout; - timeout = simple_strtoul(tmp, NULL, 0); - - CDEBUG(D_MGS, "obd timeout %d\n", timeout); - - lustre_cfg_bufs_reset(&bufs, NULL); - lcfg = lustre_cfg_new(LCFG_SET_TIMEOUT, &bufs); - lcfg->lcfg_num = timeout; - /* modify all servers and clients */ - rc = mgs_write_log_direct_all(obd, fsdb, mti, lcfg, - mti->mti_fsname, - "timeout"); - lustre_cfg_free(lcfg); - goto end_while; - } - - if (class_match_param(ptr, PARAM_OSC""PARAM_ACTIVE, &tmp) == 0){ - /* active=0 means off, anything else means on */ - int flag = (*tmp == '0') ? CM_EXCLUDE : 0; - if (!(mti->mti_flags & LDD_F_SV_TYPE_OST)) { - LCONSOLE_ERROR_MSG(0x144, "%s: Only OSCs can be" - " (de)activated.\n", - mti->mti_svname); - rc = -EINVAL; - goto end_while; - } - LCONSOLE_WARN("Permanently %sactivating %s\n", - flag ? "de": "re", mti->mti_svname); - /* Modify clilov */ - name_create(&logname, mti->mti_fsname, "-client"); - rc = mgs_modify(obd, fsdb, mti, logname, - mti->mti_svname, "add osc", flag); - name_destroy(&logname); - if (rc) - goto active_err; - /* Modify mdtlov */ - /* FIXME add to all MDT logs for CMD */ - name_create(&logname, mti->mti_fsname, "-MDT0000"); - rc = mgs_modify(obd, fsdb, mti, logname, - mti->mti_svname, "add osc", flag); - name_destroy(&logname); -active_err: - if (rc) { - LCONSOLE_ERROR_MSG(0x145, "Couldn't find %s in " - "log (%d). No permanent " - "changes were made to the " - "config log.\n", - mti->mti_svname, rc); - if (fsdb->fsdb_flags & FSDB_OLDLOG14) - LCONSOLE_ERROR_MSG(0x146, "This may be " - "because the log is in the old 1.4 " - "style. Consider --writeconf to " - "update the logs.\n"); - goto end_while; - } - /* Fall through to osc proc for deactivating - live OSC on running MDT / clients. */ - } - - /* Below here, let obd's XXX_process_config methods handle it */ - - /* All lov. in proc */ - if (class_match_param(ptr, PARAM_LOV, NULL) == 0) { - CDEBUG(D_MGS, "lov param %s\n", ptr); - if (!(mti->mti_flags & LDD_F_SV_TYPE_MDT)) { - LCONSOLE_ERROR_MSG(0x147, "LOV params must be " - "set on the MDT, not %s. " - "Ignoring.\n", - mti->mti_svname); - rc = 0; - goto end_while; - } - - /* Modify mdtlov */ - if (mgs_log_is_empty(obd, mti->mti_svname)) { - rc = -ENODEV; - goto end_while; - } - rc = mgs_wlp_lcfg(obd, fsdb, mti, mti->mti_svname, - &bufs, fsdb->fsdb_mdtlov, ptr); - if (rc) - goto end_while; - - /* Modify clilov */ - name_create(&logname, mti->mti_fsname, "-client"); - rc = mgs_wlp_lcfg(obd, fsdb, mti, logname, &bufs, - fsdb->fsdb_clilov, ptr); - name_destroy(&logname); - goto end_while; - } - - /* All osc., mdc., llite. params in proc */ - if ((class_match_param(ptr, PARAM_OSC, NULL) == 0) || - (class_match_param(ptr, PARAM_MDC, NULL) == 0) || - (class_match_param(ptr, PARAM_LLITE, NULL) == 0)) { - char *cname; - if (memcmp(ptr, PARAM_LLITE, strlen(PARAM_LLITE)) == 0) { - name_create(&cname, mti->mti_fsname, "-client"); - /* Add the client type to match the obdname - in class_config_llog_handler */ - } else if (mti->mti_flags & LDD_F_SV_TYPE_MDT) { - /* COMPAT_146 */ - if (fsdb->fsdb_mdc) - name_create(&cname, fsdb->fsdb_mdc, ""); - else - name_create(&cname, mti->mti_svname, - "-mdc"); - } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) { - /* COMPAT_146 */ - if (fsdb->fsdb_flags & FSDB_OLDLOG14) { - LCONSOLE_ERROR_MSG(0x148, "Upgraded client" - " logs for %s cannot be modified. " - "Consider updating the " - "configuration with --writeconf\n", - mti->mti_svname); - /* We don't know the names of all the - old oscs*/ - rc = -EINVAL; - goto end_while; - } - name_create(&cname, mti->mti_svname, "-osc"); - } else { - rc = -EINVAL; - goto end_while; - } - - CDEBUG(D_MGS, "%.3s param %s\n", ptr, ptr + 4); - - /* Modify client */ - name_create(&logname, mti->mti_fsname, "-client"); - rc = mgs_wlp_lcfg(obd, fsdb, mti, logname, &bufs, - cname, ptr); - name_destroy(&logname); - - /* osc params affect the MDT as well */ - if (mti->mti_flags & LDD_F_SV_TYPE_OST) { - /* FIXME add to all MDT logs for CMD */ - name_create(&logname, mti->mti_fsname, - "-MDT0000"); - if (!mgs_log_is_empty(obd, logname)) - rc = mgs_wlp_lcfg(obd, fsdb, mti, - logname, &bufs, - cname, ptr); - name_destroy(&logname); - } - name_destroy(&cname); - goto end_while; - } - - /* All mdt., ost. params in proc */ - if ((class_match_param(ptr, PARAM_MDT, NULL) == 0) || - (class_match_param(ptr, PARAM_OST, NULL) == 0)) { - CDEBUG(D_MGS, "%.3s param %s\n", ptr, ptr + 4); - if (mgs_log_is_empty(obd, mti->mti_svname)) { - rc = -ENODEV; - goto end_while; - } - rc = mgs_wlp_lcfg(obd, fsdb, mti, mti->mti_svname, - &bufs, mti->mti_svname, ptr); - goto end_while; - } - - LCONSOLE_WARN("Ignoring unrecognized param '%s'\n", ptr); - -end_while: - if (rc) { - CERROR("err %d on param '%s\n", rc, ptr); - break; - } - - if (!endptr) - /* last param */ - break; - - *endptr = ' '; - ptr = endptr + 1; - } - - RETURN(rc); -} - -int mgs_check_failnid(struct obd_device *obd, struct mgs_target_info *mti) -{ - /* Not implementing automatic failover nid addition at this time. */ - return 0; -#if 0 - struct fs_db *fsdb; - int rc; - ENTRY; - - rc = mgs_find_or_make_fsdb(obd, fsname, &fsdb); - if (rc) - RETURN(rc); - - if (mgs_log_is_empty(obd, mti->mti_svname)) - /* should never happen */ - RETURN(-ENOENT); - - CDEBUG(D_MGS, "Checking for new failnids for %s\n", mti->mti_svname); - - /* FIXME We can just check mti->params to see if we're already in - the failover list. Modify mti->params for rewriting back at - server_register_target(). */ - - down(&fsdb->fsdb_sem); - rc = mgs_write_log_add_failnid(obd, fsdb, mti); - up(&fsdb->fsdb_sem); - - RETURN(rc); -#endif -} - -int mgs_write_log_target(struct obd_device *obd, - struct mgs_target_info *mti) -{ - struct fs_db *fsdb; - int rc = -EINVAL; - ENTRY; - - /* set/check the new target index */ - rc = mgs_set_index(obd, mti); - if (rc < 0) { - CERROR("Can't get index (%d)\n", rc); - RETURN(rc); - } - /* COMPAT_146 */ - if (mti->mti_flags & LDD_F_UPGRADE14) { - if (rc == EALREADY) { - LCONSOLE_INFO("Found index %d for %s 1.4 log, " - "upgrading\n", mti->mti_stripe_index, - mti->mti_svname); - } else { - LCONSOLE_ERROR_MSG(0x149, "Failed to find %s in the old" - " client log. Apparently it is not " - "part of this filesystem, or the old" - " log is wrong.\nUse 'writeconf' on " - "the MDT to force log regeneration." - "\n", mti->mti_svname); - /* Not in client log? Upgrade anyhow...*/ - /* Argument against upgrading: reformat MDT, - upgrade OST, then OST will start but will be SKIPped - in client logs. Maybe error now is better. */ - /* RETURN(-EINVAL); */ - } - /* end COMPAT_146 */ - } else { - if (rc == EALREADY) { - /* This might be a params update, or a - local writeconf. (For "full" writeconf, the client - log won't have an entry for this target, so we - won't get here.) */ - LCONSOLE_WARN("Found index %d for %s, updating log\n", - mti->mti_stripe_index, mti->mti_svname); - /* We would like to mark old log sections as invalid - and add new log sections in the client and mdt logs. - But if we add new sections, then live clients will - get repeat setup instructions for already running - osc's. So don't update the client/mdt logs. */ - mti->mti_flags &= ~LDD_F_UPDATE; - } - } - - rc = mgs_find_or_make_fsdb(obd, mti->mti_fsname, &fsdb); - if (rc) { - CERROR("Can't get db for %s\n", mti->mti_fsname); - RETURN(rc); - } - - down(&fsdb->fsdb_sem); - - if (mti->mti_flags & - (LDD_F_VIRGIN | LDD_F_UPGRADE14 | LDD_F_WRITECONF)) { - /* Generate a log from scratch */ - if (mti->mti_flags & LDD_F_SV_TYPE_MDT) { - rc = mgs_write_log_mdt(obd, fsdb, mti); - } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) { - rc = mgs_write_log_ost(obd, fsdb, mti); - } else { - CERROR("Unknown target type %#x, can't create log for " - "%s\n", mti->mti_flags, mti->mti_svname); - } - if (rc) { - CERROR("Can't write logs for %s (%d)\n", - mti->mti_svname, rc); - GOTO(out_up, rc); - } - } else { - /* Just update the params from tunefs in mgs_write_log_params */ - CDEBUG(D_MGS, "Update params for %s\n", mti->mti_svname); - mti->mti_flags |= LDD_F_PARAM; - } - - rc = mgs_write_log_params(obd, fsdb, mti); - -out_up: - up(&fsdb->fsdb_sem); - RETURN(rc); -} - -/* COMPAT_146 */ -/* verify that we can handle the old config logs */ -int mgs_upgrade_sv_14(struct obd_device *obd, struct mgs_target_info *mti) -{ - struct fs_db *fsdb; - int rc = 0; - ENTRY; - - /* Create ost log normally, as servers register. Servers - register with their old uuids (from last_rcvd), so old - (MDT and client) logs should work. - - new MDT won't know about old OSTs, only the ones that have - registered, so we need the old MDT log to get the LOV right - in order for old clients to work. - - Old clients connect to the MDT, not the MGS, for their logs, and - will therefore receive the old client log from the MDT /LOGS dir. - - Old clients can continue to use and connect to old or new OSTs - - New clients will contact the MGS for their log - */ - - LCONSOLE_INFO("upgrading server %s from pre-1.6\n", mti->mti_svname); - server_mti_print("upgrade", mti); - - rc = mgs_find_or_make_fsdb(obd, mti->mti_fsname, &fsdb); - if (rc) - RETURN(rc); - - if (fsdb->fsdb_flags & FSDB_LOG_EMPTY) { - LCONSOLE_ERROR_MSG(0x14a, "The old client log %s-client is " - "missing. Was tunefs.lustre successful?\n", - mti->mti_fsname); - RETURN(-ENOENT); - } - - if (fsdb->fsdb_gen == 0) { - /* There were no markers in the client log, meaning we have - not updated the logs for this fs */ - CDEBUG(D_MGS, "found old, unupdated client log\n"); - } - - if (mti->mti_flags & LDD_F_SV_TYPE_MDT) { - if (mgs_log_is_empty(obd, mti->mti_svname)) { - LCONSOLE_ERROR_MSG(0x14b, "The old MDT log %s is " - "missing. Was tunefs.lustre " - "successful?\n", - mti->mti_svname); - RETURN(-ENOENT); - } - - /* We're starting with an old uuid. Assume old name for lov - as well since the lov entry already exists in the log. */ - CDEBUG(D_MGS, "old mds uuid %s\n", mti->mti_uuid); - if (strncmp(mti->mti_uuid, fsdb->fsdb_mdtlov + 4, - strlen(fsdb->fsdb_mdtlov) - 4) != 0) { - CERROR("old mds uuid %s doesn't match log %s (%s)\n", - mti->mti_uuid, fsdb->fsdb_mdtlov, - fsdb->fsdb_mdtlov + 4); - RETURN(-EINVAL); - } - } - - if (!(fsdb->fsdb_flags & FSDB_OLDLOG14)) { - LCONSOLE_ERROR_MSG(0x14c, "%s-client is supposedly an old log, " - "but no old LOV or MDT was found. Consider " - "updating the configuration with " - "--writeconf.\n", mti->mti_fsname); - } - - RETURN(rc); -} -/* end COMPAT_146 */ - -int mgs_erase_log(struct obd_device *obd, char *name) -{ - struct lvfs_run_ctxt saved; - struct llog_ctxt *ctxt; - struct llog_handle *llh; - int rc = 0; - - ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); - LASSERT(ctxt != NULL); - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = llog_create(ctxt, &llh, NULL, name); - if (rc == 0) { - llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL); - rc = llog_destroy(llh); - llog_free_handle(llh); - } - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - llog_ctxt_put(ctxt); - - if (rc) - CERROR("failed to clear log %s: %d\n", name, rc); - - return(rc); -} - -/* erase all logs for the given fs */ -int mgs_erase_logs(struct obd_device *obd, char *fsname) -{ - struct mgs_obd *mgs = &obd->u.mgs; - static struct fs_db *fsdb; - struct list_head dentry_list; - struct l_linux_dirent *dirent, *n; - int rc, len = strlen(fsname); - ENTRY; - - /* Find all the logs in the CONFIGS directory */ - rc = class_dentry_readdir(obd, mgs->mgs_configs_dir, - mgs->mgs_vfsmnt, &dentry_list); - if (rc) { - CERROR("Can't read %s dir\n", MOUNT_CONFIGS_DIR); - RETURN(rc); - } - - down(&mgs->mgs_sem); - - /* Delete the fs db */ - fsdb = mgs_find_fsdb(obd, fsname); - if (fsdb) - mgs_free_fsdb(obd, fsdb); - - list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) { - list_del(&dirent->lld_list); - if (strncmp(fsname, dirent->lld_name, len) == 0) { - CDEBUG(D_MGS, "Removing log %s\n", dirent->lld_name); - mgs_erase_log(obd, dirent->lld_name); - } - OBD_FREE(dirent, sizeof(*dirent)); - } - - up(&mgs->mgs_sem); - - RETURN(rc); -} - -/* from llog_swab */ -static void print_lustre_cfg(struct lustre_cfg *lcfg) -{ - int i; - ENTRY; - - CDEBUG(D_MGS, "lustre_cfg: %p\n", lcfg); - CDEBUG(D_MGS, "\tlcfg->lcfg_version: %#x\n", lcfg->lcfg_version); - - CDEBUG(D_MGS, "\tlcfg->lcfg_command: %#x\n", lcfg->lcfg_command); - CDEBUG(D_MGS, "\tlcfg->lcfg_num: %#x\n", lcfg->lcfg_num); - CDEBUG(D_MGS, "\tlcfg->lcfg_flags: %#x\n", lcfg->lcfg_flags); - CDEBUG(D_MGS, "\tlcfg->lcfg_nid: %s\n", libcfs_nid2str(lcfg->lcfg_nid)); - - CDEBUG(D_MGS, "\tlcfg->lcfg_bufcount: %d\n", lcfg->lcfg_bufcount); - if (lcfg->lcfg_bufcount < LUSTRE_CFG_MAX_BUFCOUNT) - for (i = 0; i < lcfg->lcfg_bufcount; i++) { - CDEBUG(D_MGS, "\tlcfg->lcfg_buflens[%d]: %d %s\n", - i, lcfg->lcfg_buflens[i], - lustre_cfg_string(lcfg, i)); - } - EXIT; -} - -/* Set a permanent (config log) param for a target or fs */ -int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname) -{ - struct fs_db *fsdb; - struct mgs_target_info *mti; - char *devname, *param; - char *ptr, *tmp; - __u32 index; - int rc = 0; - ENTRY; - - print_lustre_cfg(lcfg); - - /* lustre, lustre-mdtlov, lustre-client, lustre-MDT0000 */ - devname = lustre_cfg_string(lcfg, 0); - param = lustre_cfg_string(lcfg, 1); - if (!devname) { - /* Assume device name embedded in param: - lustre-OST0000.osc.max_dirty_mb=32 */ - ptr = strchr(param, '.'); - if (ptr) { - devname = param; - *ptr = 0; - param = ptr + 1; - } - } - if (!devname) { - LCONSOLE_ERROR_MSG(0x14d, "No target specified: %s\n", param); - RETURN(-ENOSYS); - } - - /* Extract fsname */ - ptr = strrchr(devname, '-'); - memset(fsname, 0, MTI_NAME_MAXLEN); - if (ptr && (server_name2index(ptr, &index, NULL) >= 0)) { - strncpy(fsname, devname, ptr - devname); - } else { - /* assume devname is the fsname */ - strncpy(fsname, devname, MTI_NAME_MAXLEN); - } - fsname[MTI_NAME_MAXLEN - 1] = 0; - CDEBUG(D_MGS, "setparam on fs %s device %s\n", fsname, devname); - - rc = mgs_find_or_make_fsdb(obd, fsname, &fsdb); - if (rc) - RETURN(rc); - if (fsdb->fsdb_flags & FSDB_LOG_EMPTY) { - CERROR("No filesystem targets for %s. cfg_device from lctl " - "is '%s'\n", fsname, devname); - mgs_free_fsdb(obd, fsdb); - RETURN(-EINVAL); - } - - /* Create a fake mti to hold everything */ - OBD_ALLOC_PTR(mti); - if (!mti) - GOTO(out, rc = -ENOMEM); - strncpy(mti->mti_fsname, fsname, MTI_NAME_MAXLEN); - strncpy(mti->mti_svname, devname, MTI_NAME_MAXLEN); - strncpy(mti->mti_params, param, sizeof(mti->mti_params)); - rc = server_name2index(mti->mti_svname, &mti->mti_stripe_index, &tmp); - if (rc < 0) - /* Not a valid server; may be only fsname */ - rc = 0; - else - /* Strip -osc or -mdc suffix from svname */ - if (server_make_name(rc, mti->mti_stripe_index, mti->mti_fsname, - mti->mti_svname)) - GOTO(out, rc = -EINVAL); - - mti->mti_flags = rc | LDD_F_PARAM; - - down(&fsdb->fsdb_sem); - rc = mgs_write_log_params(obd, fsdb, mti); - up(&fsdb->fsdb_sem); - -out: - OBD_FREE_PTR(mti); - RETURN(rc); -} - - -#if 0 -/******************** unused *********************/ -static int mgs_backup_llog(struct obd_device *obd, char* fsname) -{ - struct file *filp, *bak_filp; - struct lvfs_run_ctxt saved; - char *logname, *buf; - loff_t soff = 0 , doff = 0; - int count = 4096, len; - int rc = 0; - - OBD_ALLOC(logname, PATH_MAX); - if (logname == NULL) - return -ENOMEM; - - OBD_ALLOC(buf, count); - if (!buf) - GOTO(out , rc = -ENOMEM); - - len = snprintf(logname, PATH_MAX, "%s/%s.bak", - MOUNT_CONFIGS_DIR, fsname); - - if (len >= PATH_MAX - 1) { - GOTO(out, -ENAMETOOLONG); - } - - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - - bak_filp = l_filp_open(logname, O_RDWR|O_CREAT|O_TRUNC, 0660); - if (IS_ERR(bak_filp)) { - rc = PTR_ERR(bak_filp); - CERROR("backup logfile open %s: %d\n", logname, rc); - GOTO(pop, rc); - } - sprintf(logname, "%s/%s", MOUNT_CONFIGS_DIR, fsname); - filp = l_filp_open(logname, O_RDONLY, 0); - if (IS_ERR(filp)) { - rc = PTR_ERR(filp); - CERROR("logfile open %s: %d\n", logname, rc); - GOTO(close1f, rc); - } - - while ((rc = lustre_fread(filp, buf, count, &soff)) > 0) { - rc = lustre_fwrite(bak_filp, buf, count, &doff); - break; - } - - filp_close(filp, 0); -close1f: - filp_close(bak_filp, 0); -pop: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); -out: - if (buf) - OBD_FREE(buf, count); - OBD_FREE(logname, PATH_MAX); - return rc; -} - - - -#endif diff --git a/lustre/nodist b/lustre/nodist deleted file mode 100644 index 24f55bb96b..0000000000 --- a/lustre/nodist +++ /dev/null @@ -1,9 +0,0 @@ -obd-*/obd-* -CVS -*~ -make.rules -config.* -*.o -*.orig -*.backup -.depfiles diff --git a/lustre/obdclass/.cvsignore b/lustre/obdclass/.cvsignore deleted file mode 100644 index 829b50de9e..0000000000 --- a/lustre/obdclass/.cvsignore +++ /dev/null @@ -1,17 +0,0 @@ -.Xrefs -config.log -config.status -configure -Makefile -.deps -TAGS -.*.cmd -autoMakefile.in -autoMakefile -*.ko -*.mod.c -.*.flags -.*.d -.*.ver -.tmp_versions -.depend diff --git a/lustre/obdclass/Info.plist b/lustre/obdclass/Info.plist deleted file mode 100644 index 0b7e71876a..0000000000 --- a/lustre/obdclass/Info.plist +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>obdclass</string> - <key>CFBundleIconFile</key> - <string></string> - <key>CFBundleIdentifier</key> - <string>com.clusterfs.lustre.obdclass</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundlePackageType</key> - <string>KEXT</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1.0.1</string> - <key>OSBundleCompatibleVersion</key> - <string>1.0.0</string> - <key>OSBundleLibraries</key> - <dict> - <key>com.apple.kpi.bsd</key> - <string>8.0.0b1</string> - <key>com.apple.kpi.libkern</key> - <string>8.0.0b1</string> - <key>com.apple.kpi.mach</key> - <string>8.0.0b1</string> - <key>com.apple.kpi.unsupported</key> - <string>8.0.0b1</string> - <key>com.clusterfs.lustre.libcfs</key> - <string>1.0.0</string> - <key>com.clusterfs.lustre.lvfs</key> - <string>1.0.0</string> - </dict> -</dict> -</plist> diff --git a/lustre/obdclass/Makefile.in b/lustre/obdclass/Makefile.in deleted file mode 100644 index d81ee84bd8..0000000000 --- a/lustre/obdclass/Makefile.in +++ /dev/null @@ -1,37 +0,0 @@ -MODULES := obdclass llog_test - -obdclass-linux-objs := linux-module.o linux-obdo.o linux-sysctl.o -ifeq ($(PATCHLEVEL),6) -obdclass-linux-objs := $(addprefix linux/,$(obdclass-linux-objs)) -endif - -default: all - -ifeq (@linux25@,no) -sources: - @for i in $(obdclass-linux-objs:%.o=%.c) ; do \ - echo "ln -s @srcdir@/linux/$$i ." ; \ - ln -sf @srcdir@/linux/$$i . || exit 1 ; \ - done - -else -sources: - -endif - -obdclass-all-objs := llog.o llog_cat.o llog_lvfs.o llog_obd.o llog_swab.o -obdclass-all-objs += class_obd.o class_hash.o -obdclass-all-objs += debug.o genops.o uuid.o llog_ioctl.o -obdclass-all-objs += lprocfs_status.o lustre_handles.o lustre_peer.o -obdclass-all-objs += statfs_pack.o obdo.o obd_config.o obd_mount.o - -obdclass-objs := $(obdclass-linux-objs) $(obdclass-all-objs) - -ifeq ($(PATCHLEVEL),6) -llog_test-objs := llog-test.o - -$(obj)/llog-test.c: $(obj)/llog_test.c - ln -sf $< $@ -endif - -@INCLUDE_RULES@ diff --git a/lustre/obdclass/autoMakefile.am b/lustre/obdclass/autoMakefile.am deleted file mode 100644 index 40d964ce23..0000000000 --- a/lustre/obdclass/autoMakefile.am +++ /dev/null @@ -1,54 +0,0 @@ -SUBDIRS := linux -if DARWIN -SUBDIRS += darwin -endif -DIST_SUBDIRS := $(SUBDIRS) - -if LIBLUSTRE - -noinst_LIBRARIES = liblustreclass.a -liblustreclass_a_SOURCES = class_obd.c debug.c genops.c statfs_pack.c uuid.c -liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.c class_hash.c -liblustreclass_a_SOURCES += obdo.c obd_config.c llog.c llog_obd.c llog_cat.c -liblustreclass_a_SOURCES += llog_lvfs.c llog_swab.c -liblustreclass_a_SOURCES += #llog_ioctl.c rbtree.c -liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS) -liblustreclass_a_CFLAGS = $(LLCFLAGS) - -endif - - -if MODULES - -if LINUX -modulefs_DATA = obdclass$(KMODEXT) -noinst_DATA = llog_test$(KMODEXT) -endif # LINUX - -if DARWIN -macos_PROGRAMS := obdclass - -obdclass_SOURCES := \ - darwin/darwin-module.c darwin/darwin-sysctl.c \ - class_obd.c genops.c lprocfs_status.c \ - lustre_handles.c lustre_peer.c obd_config.c \ - obdo.c debug.c llog_ioctl.c uuid.c \ - llog_swab.c llog_obd.c llog.c llog_cat.c llog_lvfs.c - -obdclass_CFLAGS := $(EXTRA_KCFLAGS) -obdclass_LDFLAGS := $(EXTRA_KLDFLAGS) -obdclass_LDADD := $(EXTRA_KLIBS) - -plist_DATA := Info.plist - -install_data_hook := fix-kext-ownership - -endif # DARWIN - -endif # MODULES - -install-data-hook: $(install_data_hook) - -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ llog-test.c -MOSTLYCLEANFILES += linux/*.o darwin/*.o -DIST_SOURCES = $(filter-out llog-test.c,$(obdclass-all-objs:.o=.c)) $(llog-test-objs:.o=.c) llog_test.c llog_internal.h diff --git a/lustre/obdclass/class_hash.c b/lustre/obdclass/class_hash.c deleted file mode 100644 index c578564251..0000000000 --- a/lustre/obdclass/class_hash.c +++ /dev/null @@ -1,756 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2005 Cluster File Systems, Inc. - * Author: YuZhangyong <yzy@clusterfs.com> - * - * This file is part of Lustre, http://www.lustre.org/ - * - * No redistribution or use is permitted outside of Cluster File Systems, Inc. - * - * Implement a hash class for hash process in lustre system. - */ - -#ifndef __KERNEL__ -#include <liblustre.h> -#include <obd.h> -#endif - -#include <obd_class.h> -#include <class_hash.h> -#include <lustre_export.h> -#include <obd_support.h> -#include <lustre_net.h> -#include <lustre_quota.h> - -int lustre_hash_init(struct lustre_class_hash_body **hash_body_new, - char *hashname, __u32 hashsize, - struct lustre_hash_operations *hash_operations) -{ - int i, n = 0; - struct lustre_class_hash_body *hash_body = NULL; - - LASSERT(hashsize > 0); - LASSERT(hash_operations != NULL); - ENTRY; - - i = hashsize; - while (i != 0) { - if (i & 0x1) - n++; - i >>= 1; - } - - LASSERTF(n == 1, "hashsize %u isn't 2^n\n", hashsize); - - /* alloc space for hash_body */ - OBD_ALLOC(hash_body, sizeof(*hash_body)); - - if (hash_body == NULL) { - CERROR("Cannot alloc space for hash body, hashname = %s \n", - hashname); - RETURN(-ENOMEM); - } - - LASSERT(hashname != NULL && - strlen(hashname) <= sizeof(hash_body->hashname)); - strcpy(hash_body->hashname, hashname); - hash_body->lchb_hash_max_size = hashsize; - hash_body->lchb_hash_operations = hash_operations; - - /* alloc space for the hash tables */ - OBD_ALLOC(hash_body->lchb_hash_tables, - sizeof(*hash_body->lchb_hash_tables) * hash_body->lchb_hash_max_size); - - if (hash_body->lchb_hash_tables == NULL) { - OBD_FREE(hash_body, sizeof(*hash_body)); - CERROR("Cannot alloc space for hashtables, hashname = %s \n", - hash_body->hashname); - RETURN(-ENOMEM); - } - - spin_lock_init(&hash_body->lchb_lock); /* initialize the body lock */ - - for(i = 0 ; i < hash_body->lchb_hash_max_size; i++) { - /* initial the bucket lock and list_head */ - INIT_HLIST_HEAD(&hash_body->lchb_hash_tables[i].lhb_head); - spin_lock_init(&hash_body->lchb_hash_tables[i].lhb_lock); - } - *hash_body_new = hash_body; - - RETURN(0); -} -EXPORT_SYMBOL(lustre_hash_init); - -void lustre_hash_exit(struct lustre_class_hash_body **new_hash_body) -{ - int i; - struct lustre_class_hash_body *hash_body = NULL; - ENTRY; - - hash_body = *new_hash_body; - - if (hash_body == NULL) { - CWARN("hash body has been deleted\n"); - goto out_hash; - } - - spin_lock(&hash_body->lchb_lock); /* lock the hash tables */ - - if (hash_body->lchb_hash_tables == NULL ) { - spin_unlock(&hash_body->lchb_lock); - CWARN("hash tables has been deleted\n"); - goto out_hash; - } - - for( i = 0; i < hash_body->lchb_hash_max_size; i++ ) { - struct lustre_hash_bucket * bucket; - struct hlist_node * actual_hnode, *pos; - - bucket = &hash_body->lchb_hash_tables[i]; - spin_lock(&bucket->lhb_lock); /* lock the bucket */ - hlist_for_each_safe(actual_hnode, pos, &(bucket->lhb_head)) { - lustre_hash_delitem_nolock(hash_body, i, actual_hnode); - } - spin_unlock(&bucket->lhb_lock); - } - - /* free the hash_tables's memory space */ - OBD_FREE(hash_body->lchb_hash_tables, - sizeof(*hash_body->lchb_hash_tables) * - hash_body->lchb_hash_max_size); - - hash_body->lchb_hash_tables = NULL; - - spin_unlock(&hash_body->lchb_lock); - -out_hash : - /* free the hash_body's memory space */ - if (hash_body != NULL) { - OBD_FREE(hash_body, sizeof(*hash_body)); - *new_hash_body = NULL; - } - EXIT; -} -EXPORT_SYMBOL(lustre_hash_exit); - -/* - * only allow unique @key in hashtables, if the same @key has existed - * in hashtables, it will return with fails. - */ -int lustre_hash_additem_unique(struct lustre_class_hash_body *hash_body, - void *key, struct hlist_node *actual_hnode) -{ - int hashent; - struct lustre_hash_bucket *bucket = NULL; - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - ENTRY; - - LASSERT(hlist_unhashed(actual_hnode)); - hashent = hop->lustre_hashfn(hash_body, key); - - /* get the hash-bucket and lock it */ - bucket = &hash_body->lchb_hash_tables[hashent]; - spin_lock(&bucket->lhb_lock); - - if ( (lustre_hash_getitem_in_bucket_nolock(hash_body, hashent, key)) != NULL) { - /* the added-item exist in hashtables, so cannot add it again */ - spin_unlock(&bucket->lhb_lock); - - CWARN("Already found the key in hash [%s]\n", - hash_body->hashname); - RETURN(-EALREADY); - } - - hlist_add_head(actual_hnode, &(bucket->lhb_head)); - -#ifdef LUSTRE_HASH_DEBUG - /* hash distribute debug */ - hash_body->lchb_hash_tables[hashent].lhb_item_count++; - CDEBUG(D_INFO, "hashname[%s] bucket[%d] has [%d] hashitem\n", - hash_body->hashname, hashent, - hash_body->lchb_hash_tables[hashent].lhb_item_count); -#endif - hop->lustre_hash_object_refcount_get(actual_hnode); - - spin_unlock(&bucket->lhb_lock); - - RETURN(0); -} -EXPORT_SYMBOL(lustre_hash_additem_unique); - -/* - * only allow unique @key in hashtables, if the same @key has existed - * in hashtables, it will return with fails. - */ -void* lustre_hash_findadd_unique(struct lustre_class_hash_body *hash_body, - void *key, struct hlist_node *actual_hnode) -{ - int hashent; - struct lustre_hash_bucket *bucket = NULL; - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - struct hlist_node * hash_item_hnode = NULL; - void *obj; - ENTRY; - - LASSERT(hlist_unhashed(actual_hnode)); - hashent = hop->lustre_hashfn(hash_body, key); - - /* get the hash-bucket and lock it */ - bucket = &hash_body->lchb_hash_tables[hashent]; - spin_lock(&bucket->lhb_lock); - - hash_item_hnode = lustre_hash_getitem_in_bucket_nolock(hash_body, - hashent, key); - if ( hash_item_hnode != NULL) { - /* the added-item exist in hashtables, so cannot add it again */ - obj = hop->lustre_hash_object_refcount_get(hash_item_hnode); - spin_unlock(&bucket->lhb_lock); - RETURN(obj); - } - - hlist_add_head(actual_hnode, &(bucket->lhb_head)); - -#ifdef LUSTRE_HASH_DEBUG - /* hash distribute debug */ - hash_body->lchb_hash_tables[hashent].lhb_item_count++; - CDEBUG(D_INFO, "hashname[%s] bucket[%d] has [%d] hashitem\n", - hash_body->hashname, hashent, - hash_body->lchb_hash_tables[hashent].lhb_item_count); -#endif - obj = hop->lustre_hash_object_refcount_get(actual_hnode); - - spin_unlock(&bucket->lhb_lock); - - RETURN(obj); -} -EXPORT_SYMBOL(lustre_hash_findadd_unique); - -/* - * this version of additem, it allow multi same @key <key, value> in hashtables. - * in this additem version, we don't need to check if exist same @key in hash - * tables, we only add it to related hashbucket. - * example: maybe same nid will be related to multi difference export - */ -int lustre_hash_additem(struct lustre_class_hash_body *hash_body, void *key, - struct hlist_node *actual_hnode) -{ - int hashent; - struct lustre_hash_bucket *bucket = NULL; - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - ENTRY; - - LASSERT(hlist_unhashed(actual_hnode)); - - hashent = hop->lustre_hashfn(hash_body, key); - - /* get the hashbucket and lock it */ - bucket = &hash_body->lchb_hash_tables[hashent]; - spin_lock(&bucket->lhb_lock); - - hlist_add_head(actual_hnode, &(bucket->lhb_head)); - -#ifdef LUSTRE_HASH_DEBUG - /* hash distribute debug */ - hash_body->lchb_hash_tables[hashent].lhb_item_count++; - CDEBUG(D_INFO, "hashname[%s] bucket[%d] has [%d] hashitem\n", - hash_body->hashname, hashent, - hash_body->lchb_hash_tables[hashent].lhb_item_count); -#endif - hop->lustre_hash_object_refcount_get(actual_hnode); - - spin_unlock(&bucket->lhb_lock); - - RETURN(0); -} -EXPORT_SYMBOL(lustre_hash_additem); - - -/* - * this version of delitem will delete a hashitem with given @key, - * we need to search the <@key, @value> in hashbucket with @key, - * if match, the hashitem will be delete. - * we have a no-search version of delitem, it will directly delete a hashitem, - * doesn't need to search it in hashtables, so it is a O(1) delete. - */ -int lustre_hash_delitem_by_key(struct lustre_class_hash_body *hash_body, - void *key) -{ - int hashent ; - struct hlist_node * hash_item; - struct lustre_hash_bucket *bucket = NULL; - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - int retval = 0; - ENTRY; - - hashent = hop->lustre_hashfn(hash_body, key); - - /* first, lock the hashbucket */ - bucket = &hash_body->lchb_hash_tables[hashent]; - spin_lock(&bucket->lhb_lock); - - /* get the hash_item from hash_bucket */ - hash_item = lustre_hash_getitem_in_bucket_nolock(hash_body, hashent, - key); - - if (hash_item == NULL) { - spin_unlock(&bucket->lhb_lock); - RETURN(-ENOENT); - } - - /* call delitem_nolock() to delete the hash_item */ - retval = lustre_hash_delitem_nolock(hash_body, hashent, hash_item); - - spin_unlock(&bucket->lhb_lock); - - RETURN(retval); -} -EXPORT_SYMBOL(lustre_hash_delitem_by_key); - -/* - * the O(1) version of delete hash item, - * it will directly delete the hashitem with given @hash_item, - * the parameter @key used to get the relation hash bucket and lock it. - */ -int lustre_hash_delitem(struct lustre_class_hash_body *hash_body, - void *key, struct hlist_node * hash_item) -{ - int hashent = 0; - int retval = 0; - struct lustre_hash_bucket *bucket = NULL; - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - ENTRY; - - hashent = hop->lustre_hashfn(hash_body, key); - - bucket = &hash_body->lchb_hash_tables[hashent]; - spin_lock(&bucket->lhb_lock); - - /* call delitem_nolock() to delete the hash_item */ - retval = lustre_hash_delitem_nolock(hash_body, hashent, hash_item); - - spin_unlock(&bucket->lhb_lock); - - RETURN(retval); -} -EXPORT_SYMBOL(lustre_hash_delitem); - -void lustre_hash_bucket_iterate(struct lustre_class_hash_body *hash_body, - void *key, hash_item_iterate_cb func, void *data) -{ - int hashent, find = 0; - struct lustre_hash_bucket *bucket = NULL; - struct hlist_node *hash_item_node = NULL; - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - struct obd_export *tmp = NULL; - - ENTRY; - - hashent = hop->lustre_hashfn(hash_body, key); - bucket = &hash_body->lchb_hash_tables[hashent]; - - spin_lock(&bucket->lhb_lock); - hlist_for_each(hash_item_node, &(bucket->lhb_head)) { - find = hop->lustre_hash_key_compare(key, hash_item_node); - if (find) { - tmp = hop->lustre_hash_object_refcount_get(hash_item_node); - func(tmp, data); - hop->lustre_hash_object_refcount_put(hash_item_node); - } - } - spin_unlock(&bucket->lhb_lock); -} -EXPORT_SYMBOL(lustre_hash_bucket_iterate); - -void lustre_hash_iterate_all(struct lustre_class_hash_body *hash_body, - hash_item_iterate_cb func, void *data) -{ - int i; - struct lustre_hash_operations *hop = hash_body->lchb_hash_operations; - ENTRY; - - for( i = 0; i < hash_body->lchb_hash_max_size; i++ ) { - struct lustre_hash_bucket * bucket; - struct hlist_node * actual_hnode, *pos; - void *obj; - - bucket = &hash_body->lchb_hash_tables[i]; -#ifdef LUSTRE_HASH_DEBUG - CDEBUG(D_INFO, "idx %d - bucket %p\n", i, bucket); -#endif - spin_lock(&bucket->lhb_lock); /* lock the bucket */ - hlist_for_each_safe(actual_hnode, pos, &(bucket->lhb_head)) { - obj = hop->lustre_hash_object_refcount_get(actual_hnode); - func(obj, data); - hop->lustre_hash_object_refcount_put(actual_hnode); - } - spin_unlock(&bucket->lhb_lock); - } - EXIT; -} -EXPORT_SYMBOL(lustre_hash_iterate_all); - - -void * lustre_hash_get_object_by_key(struct lustre_class_hash_body *hash_body, - void *key) -{ - int hashent ; - struct hlist_node * hash_item_hnode = NULL; - void * obj_value = NULL; - struct lustre_hash_bucket *bucket = NULL; - struct lustre_hash_operations * hop = hash_body->lchb_hash_operations; - ENTRY; - - /* get the hash value from the given item */ - hashent = hop->lustre_hashfn(hash_body, key); - - bucket = &hash_body->lchb_hash_tables[hashent]; - spin_lock(&bucket->lhb_lock); /* lock the bucket */ - - hash_item_hnode = lustre_hash_getitem_in_bucket_nolock(hash_body, - hashent, key); - - if (hash_item_hnode == NULL) { - spin_unlock(&bucket->lhb_lock); /* lock the bucket */ - RETURN(NULL); - } - - obj_value = hop->lustre_hash_object_refcount_get(hash_item_hnode); - spin_unlock(&bucket->lhb_lock); /* lock the bucket */ - - RETURN(obj_value); -} -EXPORT_SYMBOL(lustre_hash_get_object_by_key); - -/* string hashing using djb2 hash algorithm */ -__u32 djb2_hashfn(struct lustre_class_hash_body *hash_body, void* key, - size_t size) -{ - __u32 hash = 5381; - int i; - char *ptr = key; - - LASSERT(key != NULL); - - for (i=0; i<size; i++) - hash = hash * 33 + ptr[i]; - - hash &= (hash_body->lchb_hash_max_size - 1); - - RETURN(hash); -} - -/* - * define (uuid <-> export) hash operations and function define - */ - -/* define the uuid hash operations */ -struct lustre_hash_operations uuid_hash_operations = { - .lustre_hashfn = uuid_hashfn, - .lustre_hash_key_compare = uuid_hash_key_compare, - .lustre_hash_object_refcount_get = uuid_export_refcount_get, - .lustre_hash_object_refcount_put = uuid_export_refcount_put, -}; - -__u32 uuid_hashfn(struct lustre_class_hash_body *hash_body, void * key) -{ - struct obd_uuid * uuid_key = key; - - return djb2_hashfn(hash_body, uuid_key->uuid, sizeof(uuid_key->uuid)); -} - -/* Note, it is impossible to find an export that is in failed state with - * this function */ -int uuid_hash_key_compare(void *key, struct hlist_node *compared_hnode) -{ - struct obd_export *export = NULL; - struct obd_uuid *uuid_key = NULL, *compared_uuid = NULL; - - LASSERT( key != NULL); - - uuid_key = (struct obd_uuid*)key; - - export = hlist_entry(compared_hnode, struct obd_export, exp_uuid_hash); - - compared_uuid = &export->exp_client_uuid; - - RETURN(obd_uuid_equals(uuid_key, compared_uuid) && - !export->exp_failed); -} - -void * uuid_export_refcount_get(struct hlist_node * actual_hnode) -{ - struct obd_export *export = NULL; - - LASSERT(actual_hnode != NULL); - - export = hlist_entry(actual_hnode, struct obd_export, exp_uuid_hash); - - LASSERT(export != NULL); - - class_export_get(export); - - RETURN(export); -} - -void uuid_export_refcount_put(struct hlist_node * actual_hnode) -{ - struct obd_export *export = NULL; - - LASSERT(actual_hnode != NULL); - - export = hlist_entry(actual_hnode, struct obd_export, exp_uuid_hash); - - LASSERT(export != NULL); - - class_export_put(export); -} - -/* - * define (nid <-> export) hash operations and function define - */ - -/* define the nid hash operations */ -struct lustre_hash_operations nid_hash_operations = { - .lustre_hashfn = nid_hashfn, - .lustre_hash_key_compare = nid_hash_key_compare, - .lustre_hash_object_refcount_get = nid_export_refcount_get, - .lustre_hash_object_refcount_put = nid_export_refcount_put, -}; - -__u32 nid_hashfn(struct lustre_class_hash_body *hash_body, void * key) -{ - return djb2_hashfn(hash_body, key, sizeof(lnet_nid_t)); -} - -/* Note, it is impossible to find an export that is in failed state with - * this function */ -int nid_hash_key_compare(void *key, struct hlist_node *compared_hnode) -{ - struct obd_export *export = NULL; - lnet_nid_t *nid_key = NULL; - - LASSERT( key != NULL); - - nid_key = (lnet_nid_t*)key; - - export = hlist_entry(compared_hnode, struct obd_export, exp_nid_hash); - - return (export->exp_connection->c_peer.nid == *nid_key && - !export->exp_failed); -} - -void *nid_export_refcount_get(struct hlist_node *actual_hnode) -{ - struct obd_export *export = NULL; - - LASSERT(actual_hnode != NULL); - - export = hlist_entry(actual_hnode, struct obd_export, exp_nid_hash); - - LASSERT(export != NULL); - - class_export_get(export); - - RETURN(export); -} - -void nid_export_refcount_put(struct hlist_node *actual_hnode) -{ - struct obd_export *export = NULL; - - LASSERT(actual_hnode != NULL); - - export = hlist_entry(actual_hnode, struct obd_export, exp_nid_hash); - - LASSERT(export != NULL); - - class_export_put(export); -} - -/* - * define (net_peer <-> connection) hash operations and function define - */ - -/* define the conn hash operations */ -struct lustre_hash_operations conn_hash_operations = { - .lustre_hashfn = conn_hashfn, - .lustre_hash_key_compare = conn_hash_key_compare, - .lustre_hash_object_refcount_get = conn_refcount_get, - .lustre_hash_object_refcount_put = conn_refcount_put, -}; -EXPORT_SYMBOL(conn_hash_operations); - -__u32 conn_hashfn(struct lustre_class_hash_body *hash_body, void * key) -{ - return djb2_hashfn(hash_body, key, sizeof(lnet_process_id_t)); -} - -int conn_hash_key_compare(void *key, struct hlist_node *compared_hnode) -{ - struct ptlrpc_connection *c = NULL; - lnet_process_id_t *conn_key = NULL; - - LASSERT( key != NULL); - - conn_key = (lnet_process_id_t*)key; - - c = hlist_entry(compared_hnode, struct ptlrpc_connection, c_hash); - - return (conn_key->nid == c->c_peer.nid && - conn_key->pid == c->c_peer.pid); -} - -void *conn_refcount_get(struct hlist_node *actual_hnode) -{ - struct ptlrpc_connection *c = NULL; - - LASSERT(actual_hnode != NULL); - - c = hlist_entry(actual_hnode, struct ptlrpc_connection, c_hash); - - LASSERT(c != NULL); - - atomic_inc(&c->c_refcount); - - RETURN(c); -} - -void conn_refcount_put(struct hlist_node *actual_hnode) -{ - struct ptlrpc_connection *c = NULL; - - LASSERT(actual_hnode != NULL); - - c = hlist_entry(actual_hnode, struct ptlrpc_connection, c_hash); - - LASSERT(c != NULL); - - atomic_dec(&c->c_refcount); -} - -/*******************************************************************************/ -/* ( nid<>nidstats ) hash operations define */ - -struct lustre_hash_operations nid_stat_hash_operations = { - .lustre_hashfn = nid_hashfn, - .lustre_hash_key_compare = nidstats_hash_key_compare, - .lustre_hash_object_refcount_get = nidstats_refcount_get, - .lustre_hash_object_refcount_put = nidstats_refcount_put, -}; -EXPORT_SYMBOL(nid_stat_hash_operations); - -int nidstats_hash_key_compare(void *key, struct hlist_node * compared_hnode) -{ - struct nid_stat *data; - lnet_nid_t *nid_key; - - LASSERT( key != NULL); - - nid_key = (lnet_nid_t*)key; - data = hlist_entry(compared_hnode, struct nid_stat, nid_hash); - - return (data->nid == *nid_key); -} - -void* nidstats_refcount_get(struct hlist_node * actual_hnode) -{ - struct nid_stat *data; - - data = hlist_entry(actual_hnode, struct nid_stat, nid_hash); - data->nid_exp_ref_count++; - - RETURN(data); -} - -void nidstats_refcount_put(struct hlist_node * actual_hnode) -{ - struct nid_stat *data; - - data = hlist_entry(actual_hnode, struct nid_stat, nid_hash); - data->nid_exp_ref_count--; - -} - -/*******************************************************************************/ - -#ifdef __KERNEL__ -/* - * define ( lqs <-> qctxt ) hash operations and function define - */ - -/* define the conn hash operations */ -struct lustre_hash_operations lqs_hash_operations = { - .lustre_hashfn = lqs_hashfn, - .lustre_hash_key_compare = lqs_hash_key_compare, - .lustre_hash_object_refcount_get = lqs_refcount_get, - .lustre_hash_object_refcount_put = lqs_refcount_put, -}; -EXPORT_SYMBOL(lqs_hash_operations); - -/* string hashing using djb2 hash algorithm */ -__u32 lqs_hashfn(struct lustre_class_hash_body *hash_body, void * key) -{ - struct quota_adjust_qunit *lqs_key = NULL; - __u32 hash; - - LASSERT(key != NULL); - - lqs_key = (struct quota_adjust_qunit *)key; - - hash = QAQ_IS_GRP(lqs_key) ? 5381 : 5387; - hash *= lqs_key->qaq_id; - - hash &= (hash_body->lchb_hash_max_size - 1); - - RETURN(hash); -} - -int lqs_hash_key_compare(void *key, struct hlist_node *compared_hnode) -{ - struct quota_adjust_qunit *lqs_key = NULL; - struct lustre_qunit_size *q = NULL; - int retval = 0; - - LASSERT( key != NULL); - - lqs_key = (struct quota_adjust_qunit *)key; - - q = hlist_entry(compared_hnode, struct lustre_qunit_size, lqs_hash); - - spin_lock(&q->lqs_lock); - if (lqs_key->qaq_id == q->lqs_id && QAQ_IS_GRP(lqs_key) == LQS_IS_GRP(q)) - retval = 1; - spin_unlock(&q->lqs_lock); - - return retval; -} - -void * lqs_refcount_get(struct hlist_node * actual_hnode) -{ - struct lustre_qunit_size *q = NULL; - - LASSERT(actual_hnode != NULL); - - q = hlist_entry(actual_hnode, struct lustre_qunit_size, lqs_hash); - - LASSERT(q != NULL); - - lqs_getref(q); - - RETURN(q); -} - -void lqs_refcount_put(struct hlist_node * actual_hnode) -{ - struct lustre_qunit_size *q = NULL; - - LASSERT(actual_hnode != NULL); - - q = hlist_entry(actual_hnode, struct lustre_qunit_size, lqs_hash); - - LASSERT(q != NULL); - - lqs_putref(q); -} -#endif diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c deleted file mode 100644 index 0ada5c989d..0000000000 --- a/lustre/obdclass/class_obd.c +++ /dev/null @@ -1,635 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Object Devices Class Driver - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - * These are the only exported functions, they provide some generic - * infrastructure for managing object devices - */ - -#define DEBUG_SUBSYSTEM S_CLASS -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#ifndef __KERNEL__ -# include <liblustre.h> -#endif - -#include <obd_support.h> -#include <obd_class.h> -#include <lustre_debug.h> -#include <lprocfs_status.h> -#include <lustre/lustre_build_version.h> -#include <libcfs/list.h> -#include "llog_internal.h" - -#ifndef __KERNEL__ -/* liblustre workaround */ -atomic_t libcfs_kmemory = {0}; -#endif - -struct obd_device *obd_devs[MAX_OBD_DEVICES]; -struct list_head obd_types; -spinlock_t obd_dev_lock = SPIN_LOCK_UNLOCKED; - -/* The following are visible and mutable through /proc/sys/lustre/. */ -unsigned int obd_debug_peer_on_timeout; -unsigned int obd_dump_on_timeout; -unsigned int obd_dump_on_eviction; -unsigned int obd_timeout = OBD_TIMEOUT_DEFAULT; /* seconds */ -unsigned int ldlm_timeout = LDLM_TIMEOUT_DEFAULT; /* seconds */ -unsigned int obd_max_dirty_pages = 256; -atomic_t obd_dirty_pages; - -cfs_waitq_t obd_race_waitq; -int obd_race_state; - -#ifdef __KERNEL__ -unsigned int obd_print_fail_loc(void) -{ - CWARN("obd_fail_loc = %x\n", obd_fail_loc); - return obd_fail_loc; -} - -void obd_set_fail_loc(unsigned int fl) -{ - obd_fail_loc = fl; -} - -/* opening /dev/obd */ -static int obd_class_open(unsigned long flags, void *args) -{ - ENTRY; - - PORTAL_MODULE_USE; - RETURN(0); -} - -/* closing /dev/obd */ -static int obd_class_release(unsigned long flags, void *args) -{ - ENTRY; - - PORTAL_MODULE_UNUSE; - RETURN(0); -} -#endif - -static inline void obd_data2conn(struct lustre_handle *conn, - struct obd_ioctl_data *data) -{ - memset(conn, 0, sizeof *conn); - conn->cookie = data->ioc_cookie; -} - -static inline void obd_conn2data(struct obd_ioctl_data *data, - struct lustre_handle *conn) -{ - data->ioc_cookie = conn->cookie; -} - -int class_resolve_dev_name(__u32 len, const char *name) -{ - int rc; - int dev; - - ENTRY; - if (!len || !name) { - CERROR("No name passed,!\n"); - GOTO(out, rc = -EINVAL); - } - if (name[len - 1] != 0) { - CERROR("Name not nul terminated!\n"); - GOTO(out, rc = -EINVAL); - } - - CDEBUG(D_IOCTL, "device name %s\n", name); - dev = class_name2dev(name); - if (dev == -1) { - CDEBUG(D_IOCTL, "No device for name %s!\n", name); - GOTO(out, rc = -EINVAL); - } - - CDEBUG(D_IOCTL, "device name %s, dev %d\n", name, dev); - rc = dev; - -out: - RETURN(rc); -} - -int class_handle_ioctl(unsigned int cmd, unsigned long arg) -{ - char *buf = NULL; - struct obd_ioctl_data *data; - struct libcfs_debug_ioctl_data *debug_data; - struct obd_device *obd = NULL; - int err = 0, len = 0; - ENTRY; - - /* only for debugging */ - if (cmd == LIBCFS_IOC_DEBUG_MASK) { - debug_data = (struct libcfs_debug_ioctl_data*)arg; - libcfs_subsystem_debug = debug_data->subs; - libcfs_debug = debug_data->debug; - return 0; - } - - CDEBUG(D_IOCTL, "cmd = %x\n", cmd); - if (obd_ioctl_getdata(&buf, &len, (void *)arg)) { - CERROR("OBD ioctl: data error\n"); - GOTO(out, err = -EINVAL); - } - data = (struct obd_ioctl_data *)buf; - - switch (cmd) { - case OBD_IOC_PROCESS_CFG: { - struct lustre_cfg *lcfg; - - if (!data->ioc_plen1 || !data->ioc_pbuf1) { - CERROR("No config buffer passed!\n"); - GOTO(out, err = -EINVAL); - } - OBD_ALLOC(lcfg, data->ioc_plen1); - if (lcfg == NULL) - GOTO(out, err = -ENOMEM); - err = copy_from_user(lcfg, data->ioc_pbuf1, data->ioc_plen1); - if (!err) - err = lustre_cfg_sanity_check(lcfg, data->ioc_plen1); - if (!err) - err = class_process_config(lcfg); - OBD_FREE(lcfg, data->ioc_plen1); - GOTO(out, err); - } - - case OBD_GET_VERSION: - if (!data->ioc_inlbuf1) { - CERROR("No buffer passed in ioctl\n"); - GOTO(out, err = -EINVAL); - } - - if (strlen(BUILD_VERSION) + 1 > data->ioc_inllen1) { - CERROR("ioctl buffer too small to hold version\n"); - GOTO(out, err = -EINVAL); - } - - memcpy(data->ioc_bulk, BUILD_VERSION, - strlen(BUILD_VERSION) + 1); - - err = obd_ioctl_popdata((void *)arg, data, len); - if (err) - err = -EFAULT; - GOTO(out, err); - - case OBD_IOC_NAME2DEV: { - /* Resolve a device name. This does not change the - * currently selected device. - */ - int dev; - - dev = class_resolve_dev_name(data->ioc_inllen1, - data->ioc_inlbuf1); - data->ioc_dev = dev; - if (dev < 0) - GOTO(out, err = -EINVAL); - - err = obd_ioctl_popdata((void *)arg, data, sizeof(*data)); - if (err) - err = -EFAULT; - GOTO(out, err); - } - - case OBD_IOC_UUID2DEV: { - /* Resolve a device uuid. This does not change the - * currently selected device. - */ - int dev; - struct obd_uuid uuid; - - if (!data->ioc_inllen1 || !data->ioc_inlbuf1) { - CERROR("No UUID passed!\n"); - GOTO(out, err = -EINVAL); - } - if (data->ioc_inlbuf1[data->ioc_inllen1 - 1] != 0) { - CERROR("UUID not NUL terminated!\n"); - GOTO(out, err = -EINVAL); - } - - CDEBUG(D_IOCTL, "device name %s\n", data->ioc_inlbuf1); - obd_str2uuid(&uuid, data->ioc_inlbuf1); - dev = class_uuid2dev(&uuid); - data->ioc_dev = dev; - if (dev == -1) { - CDEBUG(D_IOCTL, "No device for UUID %s!\n", - data->ioc_inlbuf1); - GOTO(out, err = -EINVAL); - } - - CDEBUG(D_IOCTL, "device name %s, dev %d\n", data->ioc_inlbuf1, - dev); - err = obd_ioctl_popdata((void *)arg, data, sizeof(*data)); - if (err) - err = -EFAULT; - GOTO(out, err); - } - - case OBD_IOC_CLOSE_UUID: { - CDEBUG(D_IOCTL, "closing all connections to uuid %s (NOOP)\n", - data->ioc_inlbuf1); - GOTO(out, err = 0); - } - - case OBD_IOC_GETDEVICE: { - int index = data->ioc_count; - char *status, *str; - - if (!data->ioc_inlbuf1) { - CERROR("No buffer passed in ioctl\n"); - GOTO(out, err = -EINVAL); - } - if (data->ioc_inllen1 < 128) { - CERROR("ioctl buffer too small to hold version\n"); - GOTO(out, err = -EINVAL); - } - - obd = class_num2obd(index); - if (!obd) - GOTO(out, err = -ENOENT); - - if (obd->obd_stopping) - status = "ST"; - else if (obd->obd_set_up) - status = "UP"; - else if (obd->obd_attached) - status = "AT"; - else - status = "--"; - str = (char *)data->ioc_bulk; - snprintf(str, len - sizeof(*data), "%3d %s %s %s %s %d", - (int)index, status, obd->obd_type->typ_name, - obd->obd_name, obd->obd_uuid.uuid, - atomic_read(&obd->obd_refcount)); - err = obd_ioctl_popdata((void *)arg, data, len); - - GOTO(out, err = 0); - } - - } - - if (data->ioc_dev >= class_devno_max()) { - CERROR("OBD ioctl: No device\n"); - GOTO(out, err = -EINVAL); - } - - obd = class_num2obd(data->ioc_dev); - if (obd == NULL) { - CERROR("OBD ioctl : No Device %d\n", data->ioc_dev); - GOTO(out, err = -EINVAL); - } - LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); - - if (!obd->obd_set_up || obd->obd_stopping) { - CERROR("OBD ioctl: device not setup %d \n", data->ioc_dev); - GOTO(out, err = -EINVAL); - } - - switch(cmd) { - case OBD_IOC_NO_TRANSNO: { - if (!obd->obd_attached) { - CERROR("Device %d not attached\n", obd->obd_minor); - GOTO(out, err = -ENODEV); - } - CDEBUG(D_HA, "%s: disabling committed-transno notification\n", - obd->obd_name); - obd->obd_no_transno = 1; - GOTO(out, err = 0); - } - - default: { - err = obd_iocontrol(cmd, obd->obd_self_export, len, data, NULL); - if (err) - GOTO(out, err); - - err = obd_ioctl_popdata((void *)arg, data, len); - if (err) - err = -EFAULT; - GOTO(out, err); - } - } - - out: - if (buf) - obd_ioctl_freedata(buf, len); - RETURN(err); -} /* class_handle_ioctl */ - - - -#define OBD_MINOR 241 -#ifdef __KERNEL__ -/* to control /dev/obd */ -static int obd_class_ioctl (struct cfs_psdev_file *pfile, unsigned long cmd, - void *arg) -{ - return class_handle_ioctl(cmd, (unsigned long)arg); -} - -/* declare character device */ -struct cfs_psdev_ops obd_psdev_ops = { - /* .p_open = */ obd_class_open, /* open */ - /* .p_close = */ obd_class_release, /* release */ - /* .p_read = */ NULL, - /* .p_write = */ NULL, - /* .p_ioctl = */ obd_class_ioctl /* ioctl */ -}; - -extern cfs_psdev_t obd_psdev; -#else -void *obd_psdev = NULL; -#endif - -EXPORT_SYMBOL(obd_devs); -EXPORT_SYMBOL(obd_print_fail_loc); -EXPORT_SYMBOL(obd_race_waitq); -EXPORT_SYMBOL(obd_race_state); -EXPORT_SYMBOL(obd_debug_peer_on_timeout); -EXPORT_SYMBOL(obd_dump_on_timeout); -EXPORT_SYMBOL(obd_dump_on_eviction); -EXPORT_SYMBOL(obd_timeout); -EXPORT_SYMBOL(ldlm_timeout); -EXPORT_SYMBOL(obd_max_dirty_pages); -EXPORT_SYMBOL(obd_dirty_pages); -EXPORT_SYMBOL(ptlrpc_put_connection_superhack); - -EXPORT_SYMBOL(proc_lustre_root); - -EXPORT_SYMBOL(class_register_type); -EXPORT_SYMBOL(class_unregister_type); -EXPORT_SYMBOL(class_get_type); -EXPORT_SYMBOL(class_put_type); -EXPORT_SYMBOL(class_name2dev); -EXPORT_SYMBOL(class_name2obd); -EXPORT_SYMBOL(class_uuid2dev); -EXPORT_SYMBOL(class_uuid2obd); -EXPORT_SYMBOL(class_find_client_obd); -EXPORT_SYMBOL(class_find_client_notype); -EXPORT_SYMBOL(class_devices_in_group); -EXPORT_SYMBOL(class_conn2export); -EXPORT_SYMBOL(class_exp2obd); -EXPORT_SYMBOL(class_conn2obd); -EXPORT_SYMBOL(class_exp2cliimp); -EXPORT_SYMBOL(class_conn2cliimp); -EXPORT_SYMBOL(class_disconnect); -EXPORT_SYMBOL(class_num2obd); - -/* uuid.c */ -EXPORT_SYMBOL(class_uuid_unparse); -EXPORT_SYMBOL(lustre_uuid_to_peer); - -EXPORT_SYMBOL(class_handle_hash); -EXPORT_SYMBOL(class_handle_unhash); -EXPORT_SYMBOL(class_handle2object); -EXPORT_SYMBOL(class_handle_free_cb); - -/* obd_config.c */ -EXPORT_SYMBOL(class_incref); -EXPORT_SYMBOL(class_decref); -EXPORT_SYMBOL(class_get_profile); -EXPORT_SYMBOL(class_del_profile); -EXPORT_SYMBOL(class_del_profiles); -EXPORT_SYMBOL(class_process_config); -EXPORT_SYMBOL(class_process_proc_param); -EXPORT_SYMBOL(class_config_parse_llog); -EXPORT_SYMBOL(class_config_dump_llog); -EXPORT_SYMBOL(class_attach); -EXPORT_SYMBOL(class_setup); -EXPORT_SYMBOL(class_cleanup); -EXPORT_SYMBOL(class_detach); -EXPORT_SYMBOL(class_manual_cleanup); - -#define OBD_INIT_CHECK -#ifdef OBD_INIT_CHECK -int obd_init_checks(void) -{ - __u64 u64val, div64val; - char buf[64]; - int len, ret = 0; - - CDEBUG(D_INFO, "LPU64=%s, LPD64=%s, LPX64=%s, LPSZ=%s, LPSSZ=%s\n", - LPU64, LPD64, LPX64, LPSZ, LPSSZ); - - CDEBUG(D_INFO, "OBD_OBJECT_EOF = "LPX64"\n", (__u64)OBD_OBJECT_EOF); - - u64val = OBD_OBJECT_EOF; - CDEBUG(D_INFO, "u64val OBD_OBJECT_EOF = "LPX64"\n", u64val); - if (u64val != OBD_OBJECT_EOF) { - CERROR("__u64 "LPX64"(%d) != 0xffffffffffffffff\n", - u64val, (int)sizeof(u64val)); - ret = -EINVAL; - } - len = snprintf(buf, sizeof(buf), LPX64, u64val); - if (len != 18) { - CWARN("LPX64 wrong length! strlen(%s)=%d != 18\n", buf, len); - ret = -EINVAL; - } - - div64val = OBD_OBJECT_EOF; - CDEBUG(D_INFO, "u64val OBD_OBJECT_EOF = "LPX64"\n", u64val); - if (u64val != OBD_OBJECT_EOF) { - CERROR("__u64 "LPX64"(%d) != 0xffffffffffffffff\n", - u64val, (int)sizeof(u64val)); - ret = -EOVERFLOW; - } - if (u64val >> 8 != OBD_OBJECT_EOF >> 8) { - CERROR("__u64 "LPX64"(%d) != 0xffffffffffffffff\n", - u64val, (int)sizeof(u64val)); - return -EOVERFLOW; - } - if (do_div(div64val, 256) != (u64val & 255)) { - CERROR("do_div("LPX64",256) != "LPU64"\n", u64val, u64val &255); - return -EOVERFLOW; - } - if (u64val >> 8 != div64val) { - CERROR("do_div("LPX64",256) "LPU64" != "LPU64"\n", - u64val, div64val, u64val >> 8); - return -EOVERFLOW; - } - len = snprintf(buf, sizeof(buf), LPX64, u64val); - if (len != 18) { - CWARN("LPX64 wrong length! strlen(%s)=%d != 18\n", buf, len); - ret = -EINVAL; - } - len = snprintf(buf, sizeof(buf), LPU64, u64val); - if (len != 20) { - CWARN("LPU64 wrong length! strlen(%s)=%d != 20\n", buf, len); - ret = -EINVAL; - } - len = snprintf(buf, sizeof(buf), LPD64, u64val); - if (len != 2) { - CWARN("LPD64 wrong length! strlen(%s)=%d != 2\n", buf, len); - ret = -EINVAL; - } - if ((u64val & ~CFS_PAGE_MASK) >= CFS_PAGE_SIZE) { - CWARN("mask failed: u64val "LPU64" >= %lu\n", u64val, - CFS_PAGE_SIZE); - ret = -EINVAL; - } - - return ret; -} -#else -#define obd_init_checks() do {} while(0) -#endif - -extern spinlock_t obd_types_lock; -extern int class_procfs_init(void); -extern int class_procfs_clean(void); - -#ifdef __KERNEL__ -static int __init init_obdclass(void) -#else -int init_obdclass(void) -#endif -{ - int i, err; -#ifdef __KERNEL__ - int lustre_register_fs(void); - - printk(KERN_INFO "Lustre: OBD class driver, info@clusterfs.com\n"); - printk(KERN_INFO " Lustre Version: "LUSTRE_VERSION_STRING"\n"); - printk(KERN_INFO " Build Version: "BUILD_VERSION"\n"); -#else - CDEBUG(D_INFO, "Lustre: OBD class driver, info@clusterfs.com\n"); - CDEBUG(D_INFO, " Lustre Version: "LUSTRE_VERSION_STRING"\n"); - CDEBUG(D_INFO, " Build Version: "BUILD_VERSION"\n"); -#endif - - spin_lock_init(&obd_types_lock); - cfs_waitq_init(&obd_race_waitq); - obd_zombie_impexp_init(); -#ifdef LPROCFS - obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM, - LPROCFS_STATS_FLAG_PERCPU); - if (obd_memory == NULL) { - CERROR("kmalloc of 'obd_memory' failed\n"); - RETURN(-ENOMEM); - } - - lprocfs_counter_init(obd_memory, OBD_MEMORY_STAT, - LPROCFS_CNTR_AVGMINMAX, - "memused", "bytes"); - lprocfs_counter_init(obd_memory, OBD_MEMORY_PAGES_STAT, - LPROCFS_CNTR_AVGMINMAX, - "pagesused", "pages"); -#endif - err = obd_init_checks(); - if (err == -EOVERFLOW) - return err; - - class_init_uuidlist(); - err = class_handle_init(); - if (err) - return err; - - spin_lock_init(&obd_dev_lock); - CFS_INIT_LIST_HEAD(&obd_types); - - err = cfs_psdev_register(&obd_psdev); - if (err) { - CERROR("cannot register %d err %d\n", OBD_MINOR, err); - return err; - } - - /* This struct is already zerod for us (static global) */ - for (i = 0; i < class_devno_max(); i++) - obd_devs[i] = NULL; - - /* Default the dirty page cache cap to 1/2 of system memory */ - obd_max_dirty_pages = num_physpages / 2; - - err = obd_init_caches(); - if (err) - return err; -#ifdef __KERNEL__ - err = class_procfs_init(); - if (err) - return err; - err = lustre_register_fs(); -#endif - - return err; -} - -/* liblustre doesn't call cleanup_obdclass, apparently. we carry on in this - * ifdef to the end of the file to cover module and versioning goo.*/ -#ifdef __KERNEL__ -static void cleanup_obdclass(void) -{ - int i; - __u64 memory_leaked, pages_leaked; - __u64 memory_max, pages_max; - int lustre_unregister_fs(void); - ENTRY; - - lustre_unregister_fs(); - - cfs_psdev_deregister(&obd_psdev); - for (i = 0; i < class_devno_max(); i++) { - struct obd_device *obd = class_num2obd(i); - if (obd && obd->obd_set_up && - OBT(obd) && OBP(obd, detach)) { - /* XXX should this call generic detach otherwise? */ - LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); - OBP(obd, detach)(obd); - } - } - - obd_cleanup_caches(); - obd_sysctl_clean(); - - class_procfs_clean(); - - class_handle_cleanup(); - class_exit_uuidlist(); - - memory_leaked = obd_memory_sum(); - pages_leaked = obd_pages_sum(); - - memory_max = obd_memory_max(); - pages_max = obd_pages_max(); - - lprocfs_free_stats(&obd_memory); - CDEBUG((memory_leaked | pages_leaked) ? D_ERROR : D_INFO, - "obd_memory max: "LPU64", leaked: "LPU64" " - "obd_memory_pages max: "LPU64", leaked: "LPU64"\n", - memory_max, memory_leaked, - pages_max, pages_leaked); - - EXIT; -} - -MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>"); -MODULE_DESCRIPTION("Lustre Class Driver Build Version: " BUILD_VERSION); -MODULE_LICENSE("GPL"); - -cfs_module(obdclass, LUSTRE_VERSION_STRING, init_obdclass, cleanup_obdclass); -#endif diff --git a/lustre/obdclass/darwin/.cvsignore b/lustre/obdclass/darwin/.cvsignore deleted file mode 100644 index 70845e08eb..0000000000 --- a/lustre/obdclass/darwin/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in diff --git a/lustre/obdclass/darwin/Makefile.am b/lustre/obdclass/darwin/Makefile.am deleted file mode 100644 index 75ba623f65..0000000000 --- a/lustre/obdclass/darwin/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -EXTRA_DIST := \ - darwin-module.c \ - darwin-sysctl.c diff --git a/lustre/obdclass/darwin/darwin-module.c b/lustre/obdclass/darwin/darwin-module.c deleted file mode 100644 index 287d942523..0000000000 --- a/lustre/obdclass/darwin/darwin-module.c +++ /dev/null @@ -1,181 +0,0 @@ -#define DEBUG_SUBSYSTEM S_CLASS -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#include <mach/mach_types.h> -#include <string.h> -#include <sys/file.h> -#include <sys/conf.h> -#include <miscfs/devfs/devfs.h> - -#include <libcfs/libcfs.h> -#include <obd_support.h> -#include <obd_class.h> -#include <lprocfs_status.h> - -#ifndef OBD_MAX_IOCTL_BUFFER -#define OBD_MAX_IOCTL_BUFFER 8192 -#endif - -/* buffer MUST be at least the size of obd_ioctl_hdr */ -int obd_ioctl_getdata(char **buf, int *len, void *arg) -{ - struct obd_ioctl_hdr *hdr; - struct obd_ioctl_data *data; - int err = 0; - int offset = 0; - ENTRY; - - hdr = (struct obd_ioctl_hdr *)arg; - if (hdr->ioc_version != OBD_IOCTL_VERSION) { - CERROR("Version mismatch kernel vs application\n"); - RETURN(-EINVAL); - } - - if (hdr->ioc_len > OBD_MAX_IOCTL_BUFFER) { - CERROR("User buffer len %d exceeds %d max buffer\n", - hdr->ioc_len, OBD_MAX_IOCTL_BUFFER); - RETURN(-EINVAL); - } - - if (hdr->ioc_len < sizeof(struct obd_ioctl_data)) { - CERROR("OBD: user buffer too small for ioctl (%d)\n", hdr->ioc_len); - RETURN(-EINVAL); - } - - /* XXX allocate this more intelligently, using kmalloc when - * appropriate */ - OBD_VMALLOC(*buf, hdr->ioc_len); - if (*buf == NULL) { - CERROR("Cannot allocate control buffer of len %d\n", - hdr->ioc_len); - RETURN(-EINVAL); - } - *len = hdr->ioc_len; - data = (struct obd_ioctl_data *)*buf; - - bzero(data, hdr->ioc_len); - memcpy(data, (void *)arg, sizeof(struct obd_ioctl_data)); - if (data->ioc_inlbuf1) - err = copy_from_user(&data->ioc_bulk[0], (void *)data->ioc_inlbuf1, - hdr->ioc_len - ((void *)&data->ioc_bulk[0] - (void *)data)); - - if (obd_ioctl_is_invalid(data)) { - CERROR("ioctl not correctly formatted\n"); - return -EINVAL; - } - - if (data->ioc_inllen1) { - data->ioc_inlbuf1 = &data->ioc_bulk[0]; - offset += size_round(data->ioc_inllen1); - } - - if (data->ioc_inllen2) { - data->ioc_inlbuf2 = &data->ioc_bulk[0] + offset; - offset += size_round(data->ioc_inllen2); - } - - if (data->ioc_inllen3) { - data->ioc_inlbuf3 = &data->ioc_bulk[0] + offset; - offset += size_round(data->ioc_inllen3); - } - - if (data->ioc_inllen4) { - data->ioc_inlbuf4 = &data->ioc_bulk[0] + offset; - } - - EXIT; - return 0; -} - -int obd_ioctl_popdata(void *arg, void *data, int len) -{ - /* - * Xnu ioctl copyout(uaddr, arg, sizeof(struct obd_ioctl_data)), - * we have to copyout data exceed sizeof(struct obd_ioctl_data) - * by ourself. - */ - if (len <= sizeof(struct obd_ioctl_data)) { - memcpy(arg, data, len); - return 0; - } else { - int err; - struct obd_ioctl_data *u = (struct obd_ioctl_data *)arg; - struct obd_ioctl_data *k = (struct obd_ioctl_data *)data; - err = copy_to_user((void *)u->ioc_inlbuf1, &k->ioc_bulk[0], - len -((void *)&k->ioc_bulk[0] -(void *)k)); - memcpy(arg, data, sizeof(struct obd_ioctl_data)); - return err; - } -} -/* - * cfs pseudo device - */ -extern struct cfs_psdev_ops obd_psdev_ops; - -static int -obd_class_open(dev_t dev, int flags, int devtype, struct proc *p) -{ - if (obd_psdev_ops.p_open != NULL) - return -obd_psdev_ops.p_open(0, NULL); - return EPERM; -} - -/* closing /dev/obd */ -static int -obd_class_release(dev_t dev, int flags, int mode, struct proc *p) -{ - if (obd_psdev_ops.p_close != NULL) - return -obd_psdev_ops.p_close(0, NULL); - return EPERM; -} - -static int -obd_class_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p) -{ - int err = 0; - ENTRY; - - if (!is_suser()) - RETURN (EPERM); - if (obd_psdev_ops.p_ioctl != NULL) - err = -obd_psdev_ops.p_ioctl(NULL, cmd, (void *)arg); - else - err = EPERM; - - RETURN(err); -} - -static struct cdevsw obd_psdevsw = { - obd_class_open, - obd_class_release, - NULL, - NULL, - obd_class_ioctl, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, -}; - -cfs_psdev_t obd_psdev = { - -1, - NULL, - "obd", - &obd_psdevsw -}; - -int class_procfs_init(void) -{ - return 0; -} - -int class_procfs_clean(void) -{ - return 0; -} diff --git a/lustre/obdclass/darwin/darwin-sysctl.c b/lustre/obdclass/darwin/darwin-sysctl.c deleted file mode 100644 index f953cf84b6..0000000000 --- a/lustre/obdclass/darwin/darwin-sysctl.c +++ /dev/null @@ -1,154 +0,0 @@ -#include <sys/param.h> -#include <sys/kernel.h> -#include <sys/malloc.h> -#include <sys/systm.h> -#include <sys/sysctl.h> -#include <sys/proc.h> -#include <sys/unistd.h> -#include <mach/mach_types.h> -#include <lustre/lustre_build_version.h> - -#define DEBUG_SUBSYSTEM S_CLASS - -#include <libcfs/libcfs.h> -#ifndef BUILD_VERSION -#define BUILD_VERSION "Unknown" -#endif -#ifndef LUSTRE_KERNEL_VERSION -#define LUSTRE_KERNEL_VERSION "Unknown Darwin version" -#endif - -cfs_sysctl_table_header_t *obd_table_header = NULL; - -int proc_fail_loc SYSCTL_HANDLER_ARGS; -int proc_obd_timeout SYSCTL_HANDLER_ARGS; -extern unsigned int obd_fail_loc; -extern unsigned int obd_dump_on_timeout; -extern unsigned int obd_timeout; -extern unsigned int ldlm_timeout; -extern unsigned int obd_sync_filter; -extern atomic_t obd_memory; - -int read_build_version SYSCTL_HANDLER_ARGS; -int read_lustre_kernel_version SYSCTL_HANDLER_ARGS; - -SYSCTL_NODE (, OID_AUTO, lustre, CTLFLAG_RW, - 0, "lustre sysctl top"); -SYSCTL_PROC(_lustre, OID_AUTO, fail_loc, - CTLTYPE_INT | CTLFLAG_RW , &obd_fail_loc, - 0, &proc_fail_loc, "I", "obd_fail_loc"); -SYSCTL_PROC(_lustre, OID_AUTO, timeout, - CTLTYPE_INT | CTLFLAG_RW , &obd_timeout, - 0, &proc_obd_timeout, "I", "obd_timeout"); -SYSCTL_PROC(_lustre, OID_AUTO, build_version, - CTLTYPE_STRING | CTLFLAG_RD , NULL, - 0, &read_build_version, "A", "lustre_build_version"); -SYSCTL_PROC(_lustre, OID_AUTO, lustre_kernel_version, - CTLTYPE_STRING | CTLFLAG_RD , NULL, - 0, &read_lustre_kernel_version, "A", "lustre_build_version"); -SYSCTL_INT(_lustre, OID_AUTO, dump_on_timeout, - CTLTYPE_INT | CTLFLAG_RW, &obd_dump_on_timeout, - 0, "lustre_dump_on_timeout"); -SYSCTL_INT(_lustre, OID_AUTO, debug_peer_on_timeout, - CTLTYPE_INT | CTLFLAG_RW, &obd_debug_peer_on_timeout, - 0, "lustre_debug_peer_on_timeout"); -SYSCTL_INT(_lustre, OID_AUTO, memused, - CTLTYPE_INT | CTLFLAG_RW, (int *)&obd_memory.counter, - 0, "lustre_memory_used"); -SYSCTL_INT(_lustre, OID_AUTO, ldlm_timeout, - CTLTYPE_INT | CTLFLAG_RW, &ldlm_timeout, - 0, "ldlm_timeout"); - -static cfs_sysctl_table_t parent_table[] = { - &sysctl__lustre, - &sysctl__lustre_fail_loc, - &sysctl__lustre_timeout, - &sysctl__lustre_dump_on_timeout, - &sysctl__lustre_debug_peer_on_timeout, - &sysctl__lustre_upcall, - &sysctl__lustre_memused, - &sysctl__lustre_filter_sync_on_commit, - &sysctl__lustre_ldlm_timeout, -}; - -extern cfs_waitq_t obd_race_waitq; - -int proc_fail_loc SYSCTL_HANDLER_ARGS -{ - int error = 0; - int old_fail_loc = obd_fail_loc; - - error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if (!error && req->newptr != USER_ADDR_NULL) { - if (old_fail_loc != obd_fail_loc) - cfs_waitq_signal(&obd_race_waitq); - } else if (req->newptr != USER_ADDR_NULL) { - /* Something was wrong with the write request */ - printf ("sysctl fail loc fault: %d.\n", error); - } else { - /* Read request */ - error = SYSCTL_OUT(req, &obd_fail_loc, sizeof obd_fail_loc); - } - return error; -} - -int proc_obd_timeout SYSCTL_HANDLER_ARGS -{ - int error = 0; - - error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if (!error && req->newptr != USER_ADDR_NULL) { - if (ldlm_timeout >= obd_timeout) - ldlm_timeout = max(obd_timeout / 3, 1U); - } else if (req->newptr != USER_ADDR_NULL) { - printf ("sysctl fail obd_timeout: %d.\n", error); - } else { - /* Read request */ - error = SYSCTL_OUT(req, &obd_timeout, sizeof obd_timeout); - } - return error; -} - -int read_build_version SYSCTL_HANDLER_ARGS -{ - int error = 0; - - error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if ( req->newptr != USER_ADDR_NULL) { - printf("sysctl read_build_version is read-only!\n"); - } else { - error = SYSCTL_OUT(req, BUILD_VERSION, strlen(BUILD_VERSION)); - } - return error; -} - -int read_lustre_kernel_version SYSCTL_HANDLER_ARGS -{ - int error = 0; - - error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if ( req->newptr != NULL) { - printf("sysctl lustre_kernel_version is read-only!\n"); - } else { - error = SYSCTL_OUT(req, LUSTRE_KERNEL_VERSION, strlen(LUSTRE_KERNEL_VERSION)); - } - return error; -} - -void obd_sysctl_init (void) -{ -#if 1 - if ( !obd_table_header ) - obd_table_header = cfs_register_sysctl_table(parent_table, 0); -#endif -} - -void obd_sysctl_clean (void) -{ -#if 1 - if ( obd_table_header ) - cfs_unregister_sysctl_table(obd_table_header); - obd_table_header = NULL; -#endif -} - diff --git a/lustre/obdclass/debug.c b/lustre/obdclass/debug.c deleted file mode 100644 index 7d3d313648..0000000000 --- a/lustre/obdclass/debug.c +++ /dev/null @@ -1,187 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2002 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - * Helper routines for dumping data structs for debugging. - */ - -#define DEBUG_SUBSYSTEM D_OTHER - -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif -#ifndef __KERNEL__ -# include <liblustre.h> -#endif - -#include <obd_ost.h> -#include <obd_support.h> -#include <lustre_debug.h> -#include <lustre_net.h> - -int dump_ioo(struct obd_ioobj *ioo) -{ - CERROR("obd_ioobj: ioo_id="LPD64", ioo_gr="LPD64", ioo_type=%d, " - "ioo_bufct=%d\n", - ioo->ioo_id, ioo->ioo_gr, ioo->ioo_type, ioo->ioo_bufcnt); - return -EINVAL; -} - -int dump_lniobuf(struct niobuf_local *nb) -{ - CERROR("niobuf_local: offset="LPD64", len=%d, page=%p, rc=%d\n", - nb->offset, nb->len, nb->page, nb->rc); - CERROR("nb->page: index = %ld\n", nb->page ? cfs_page_index(nb->page) : -1); - - return -EINVAL; -} - -int dump_rniobuf(struct niobuf_remote *nb) -{ - CERROR("niobuf_remote: offset="LPU64", len=%d, flags=%x\n", - nb->offset, nb->len, nb->flags); - - return -EINVAL; -} - -int dump_obdo(struct obdo *oa) -{ - __u32 valid = oa->o_valid; - - CERROR("obdo: o_valid = %08x\n", valid); - if (valid & OBD_MD_FLID) - CERROR("obdo: o_id = "LPD64"\n", oa->o_id); - if (valid & OBD_MD_FLATIME) - CERROR("obdo: o_atime = "LPD64"\n", oa->o_atime); - if (valid & OBD_MD_FLMTIME) - CERROR("obdo: o_mtime = "LPD64"\n", oa->o_mtime); - if (valid & OBD_MD_FLCTIME) - CERROR("obdo: o_ctime = "LPD64"\n", oa->o_ctime); - if (valid & OBD_MD_FLSIZE) - CERROR("obdo: o_size = "LPD64"\n", oa->o_size); - if (valid & OBD_MD_FLBLOCKS) /* allocation of space */ - CERROR("obdo: o_blocks = "LPD64"\n", oa->o_blocks); - if (valid & OBD_MD_FLBLKSZ) - CERROR("obdo: o_blksize = %d\n", oa->o_blksize); - if (valid & (OBD_MD_FLTYPE | OBD_MD_FLMODE)) - CERROR("obdo: o_mode = %o\n", - oa->o_mode & ((valid & OBD_MD_FLTYPE ? S_IFMT : 0) | - (valid & OBD_MD_FLMODE ? ~S_IFMT : 0))); - if (valid & OBD_MD_FLUID) - CERROR("obdo: o_uid = %u\n", oa->o_uid); - if (valid & OBD_MD_FLGID) - CERROR("obdo: o_gid = %u\n", oa->o_gid); - if (valid & OBD_MD_FLFLAGS) - CERROR("obdo: o_flags = %x\n", oa->o_flags); - if (valid & OBD_MD_FLNLINK) - CERROR("obdo: o_nlink = %u\n", oa->o_nlink); - if (valid & OBD_MD_FLGENER) - CERROR("obdo: o_generation = %u\n", oa->o_generation); - - return -EINVAL; -} - -void dump_lsm(int level, struct lov_stripe_md *lsm) -{ - CDEBUG(level, "lsm %p, objid "LPX64", maxbytes "LPX64", magic 0x%08X, " - "stripe_size %u, stripe_count %u\n", lsm, - lsm->lsm_object_id, lsm->lsm_maxbytes, lsm->lsm_magic, - lsm->lsm_stripe_size, lsm->lsm_stripe_count); -} - -/* XXX assumes only a single page in request */ -/* -int dump_req(struct ptlrpc_request *req) -{ - struct ost_body *body = lustre_msg_buf(req->rq_reqmsg, 0); - struct obd_ioobj *ioo = lustre_msg_buf(req->rq_reqmsg, 1); - //struct niobuf *nb = lustre_msg_buf(req->rq_reqmsg, 2); - - dump_obdo(&body->oa); - //dump_niobuf(nb); - dump_ioo(ioo); - - return -EINVAL; -} -*/ - -#define LPDS sizeof(__u64) -int block_debug_setup(void *addr, int len, __u64 off, __u64 id) -{ - LASSERT(addr); - - off = cpu_to_le64 (off); - id = cpu_to_le64 (id); - memcpy(addr, (char *)&off, LPDS); - memcpy(addr + LPDS, (char *)&id, LPDS); - - addr += len - LPDS - LPDS; - memcpy(addr, (char *)&off, LPDS); - memcpy(addr + LPDS, (char *)&id, LPDS); - - return 0; -} - -int block_debug_check(char *who, void *addr, int end, __u64 off, __u64 id) -{ - __u64 ne_off; - int err = 0; - - LASSERT(addr); - - ne_off = le64_to_cpu (off); - id = le64_to_cpu (id); - if (memcmp(addr, (char *)&ne_off, LPDS)) { - CDEBUG(D_ERROR, "%s: id "LPX64" offset "LPU64" off: "LPX64" != " - LPX64"\n", who, id, off, *(__u64 *)addr, ne_off); - err = -EINVAL; - } - if (memcmp(addr + LPDS, (char *)&id, LPDS)) { - CDEBUG(D_ERROR, "%s: id "LPX64" offset "LPU64" id: "LPX64" != "LPX64"\n", - who, id, off, *(__u64 *)(addr + LPDS), id); - err = -EINVAL; - } - - addr += end - LPDS - LPDS; - if (memcmp(addr, (char *)&ne_off, LPDS)) { - CDEBUG(D_ERROR, "%s: id "LPX64" offset "LPU64" end off: "LPX64" != " - LPX64"\n", who, id, off, *(__u64 *)addr, ne_off); - err = -EINVAL; - } - if (memcmp(addr + LPDS, (char *)&id, LPDS)) { - CDEBUG(D_ERROR, "%s: id "LPX64" offset "LPU64" end id: "LPX64" != " - LPX64"\n", who, id, off, *(__u64 *)(addr + LPDS), id); - err = -EINVAL; - } - - return err; -} -#undef LPDS - -EXPORT_SYMBOL(dump_lniobuf); -EXPORT_SYMBOL(dump_rniobuf); -EXPORT_SYMBOL(dump_ioo); -//EXPORT_SYMBOL(dump_req); -EXPORT_SYMBOL(dump_obdo); -EXPORT_SYMBOL(dump_lsm); -EXPORT_SYMBOL(block_debug_setup); -EXPORT_SYMBOL(block_debug_check); diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c deleted file mode 100644 index 63d52c26b5..0000000000 --- a/lustre/obdclass/genops.c +++ /dev/null @@ -1,1318 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (c) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - * These are the only exported functions, they provide some generic - * infrastructure for managing object devices - */ - -#define DEBUG_SUBSYSTEM S_CLASS -#ifndef __KERNEL__ -#include <liblustre.h> -#endif -#include <obd_ost.h> -#include <obd_class.h> -#include <lprocfs_status.h> -#include <class_hash.h> - -extern struct list_head obd_types; -spinlock_t obd_types_lock; - -cfs_mem_cache_t *obd_device_cachep; -cfs_mem_cache_t *obdo_cachep; -EXPORT_SYMBOL(obdo_cachep); -cfs_mem_cache_t *import_cachep; - -struct list_head obd_zombie_imports; -struct list_head obd_zombie_exports; -spinlock_t obd_zombie_impexp_lock; -void (*obd_zombie_impexp_notify)(void) = NULL; -EXPORT_SYMBOL(obd_zombie_impexp_notify); - - -int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c); - -/* - * support functions: we could use inter-module communication, but this - * is more portable to other OS's - */ -static struct obd_device *obd_device_alloc(void) -{ - struct obd_device *obd; - - OBD_SLAB_ALLOC_PTR(obd, obd_device_cachep); - if (obd != NULL) { - obd->obd_magic = OBD_DEVICE_MAGIC; - } - return obd; -} -EXPORT_SYMBOL(obd_device_alloc); - -static void obd_device_free(struct obd_device *obd) -{ - LASSERT(obd != NULL); - LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, "obd %p obd_magic %08x != %08x\n", - obd, obd->obd_magic, OBD_DEVICE_MAGIC); - OBD_SLAB_FREE_PTR(obd, obd_device_cachep); -} -EXPORT_SYMBOL(obd_device_free); - -struct obd_type *class_search_type(const char *name) -{ - struct list_head *tmp; - struct obd_type *type; - - spin_lock(&obd_types_lock); - list_for_each(tmp, &obd_types) { - type = list_entry(tmp, struct obd_type, typ_chain); - if (strcmp(type->typ_name, name) == 0) { - spin_unlock(&obd_types_lock); - return type; - } - } - spin_unlock(&obd_types_lock); - return NULL; -} - -struct obd_type *class_get_type(const char *name) -{ - struct obd_type *type = class_search_type(name); - -#ifdef CONFIG_KMOD - if (!type) { - const char *modname = name; - if (strcmp(modname, LUSTRE_MDT_NAME) == 0) - modname = LUSTRE_MDS_NAME; - if (!request_module(modname)) { - CDEBUG(D_INFO, "Loaded module '%s'\n", modname); - type = class_search_type(name); - } else { - LCONSOLE_ERROR_MSG(0x158, "Can't load module '%s'\n", - modname); - } - } -#endif - if (type) { - spin_lock(&type->obd_type_lock); - type->typ_refcnt++; - try_module_get(type->typ_ops->o_owner); - spin_unlock(&type->obd_type_lock); - } - return type; -} - -void class_put_type(struct obd_type *type) -{ - LASSERT(type); - spin_lock(&type->obd_type_lock); - type->typ_refcnt--; - module_put(type->typ_ops->o_owner); - spin_unlock(&type->obd_type_lock); -} - -int class_register_type(struct obd_ops *ops, struct lprocfs_vars *vars, - const char *name) -{ - struct obd_type *type; - int rc = 0; - ENTRY; - - LASSERT(strnlen(name, 1024) < 1024); /* sanity check */ - - if (class_search_type(name)) { - CDEBUG(D_IOCTL, "Type %s already registered\n", name); - RETURN(-EEXIST); - } - - rc = -ENOMEM; - OBD_ALLOC(type, sizeof(*type)); - if (type == NULL) - RETURN(rc); - - OBD_ALLOC(type->typ_ops, sizeof(*type->typ_ops)); - OBD_ALLOC(type->typ_name, strlen(name) + 1); - if (type->typ_ops == NULL || type->typ_name == NULL) - GOTO (failed, rc); - - *(type->typ_ops) = *ops; - strcpy(type->typ_name, name); - spin_lock_init(&type->obd_type_lock); - -#ifdef LPROCFS - type->typ_procroot = lprocfs_register(type->typ_name, proc_lustre_root, - vars, type); - if (IS_ERR(type->typ_procroot)) { - rc = PTR_ERR(type->typ_procroot); - type->typ_procroot = NULL; - GOTO (failed, rc); - } -#endif - - spin_lock(&obd_types_lock); - list_add(&type->typ_chain, &obd_types); - spin_unlock(&obd_types_lock); - - RETURN (0); - - failed: - if (type->typ_name != NULL) - OBD_FREE(type->typ_name, strlen(name) + 1); - if (type->typ_ops != NULL) - OBD_FREE (type->typ_ops, sizeof (*type->typ_ops)); - OBD_FREE(type, sizeof(*type)); - RETURN(rc); -} - -int class_unregister_type(const char *name) -{ - struct obd_type *type = class_search_type(name); - ENTRY; - - if (!type) { - CERROR("unknown obd type\n"); - RETURN(-EINVAL); - } - - if (type->typ_refcnt) { - CERROR("type %s has refcount (%d)\n", name, type->typ_refcnt); - /* This is a bad situation, let's make the best of it */ - /* Remove ops, but leave the name for debugging */ - OBD_FREE(type->typ_ops, sizeof(*type->typ_ops)); - RETURN(-EBUSY); - } - - if (type->typ_procroot) - lprocfs_remove(&type->typ_procroot); - - spin_lock(&obd_types_lock); - list_del(&type->typ_chain); - spin_unlock(&obd_types_lock); - OBD_FREE(type->typ_name, strlen(name) + 1); - if (type->typ_ops != NULL) - OBD_FREE(type->typ_ops, sizeof(*type->typ_ops)); - OBD_FREE(type, sizeof(*type)); - RETURN(0); -} /* class_unregister_type */ - -struct obd_device *class_newdev(const char *type_name, const char *name) -{ - struct obd_device *result = NULL; - struct obd_device *newdev; - struct obd_type *type = NULL; - int i; - int new_obd_minor = 0; - - if (strlen(name) > MAX_OBD_NAME) { - CERROR("name/uuid must be < %u bytes long\n", MAX_OBD_NAME); - RETURN(ERR_PTR(-EINVAL)); - } - - type = class_get_type(type_name); - if (type == NULL){ - CERROR("OBD: unknown type: %s\n", type_name); - RETURN(ERR_PTR(-ENODEV)); - } - - newdev = obd_device_alloc(); - if (newdev == NULL) { - class_put_type(type); - RETURN(ERR_PTR(-ENOMEM)); - } - LASSERT(newdev->obd_magic == OBD_DEVICE_MAGIC); - - spin_lock(&obd_dev_lock); - for (i = 0; i < class_devno_max(); i++) { - struct obd_device *obd = class_num2obd(i); - if (obd && obd->obd_name && (strcmp(name, obd->obd_name) == 0)){ - CERROR("Device %s already exists, won't add\n", name); - if (result) { - LASSERTF(result->obd_magic == OBD_DEVICE_MAGIC, - "%p obd_magic %08x != %08x\n", result, - result->obd_magic, OBD_DEVICE_MAGIC); - LASSERTF(result->obd_minor == new_obd_minor, - "%p obd_minor %d != %d\n", result, - result->obd_minor, new_obd_minor); - - obd_devs[result->obd_minor] = NULL; - result->obd_name[0]='\0'; - } - result = ERR_PTR(-EEXIST); - break; - } - if (!result && !obd) { - result = newdev; - result->obd_minor = i; - new_obd_minor = i; - result->obd_type = type; - memcpy(result->obd_name, name, strlen(name)); - obd_devs[i] = result; - } - } - spin_unlock(&obd_dev_lock); - - if (result == NULL && i >= class_devno_max()) { - CERROR("all %u OBD devices used, increase MAX_OBD_DEVICES\n", - class_devno_max()); - result = ERR_PTR(-EOVERFLOW); - } - - if (IS_ERR(result)) { - obd_device_free(newdev); - class_put_type(type); - } else { - CDEBUG(D_IOCTL, "Adding new device %s (%p)\n", - result->obd_name, result); - } - return result; -} - -void class_release_dev(struct obd_device *obd) -{ - struct obd_type *obd_type = obd->obd_type; - - LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, "%p obd_magic %08x != %08x\n", - obd, obd->obd_magic, OBD_DEVICE_MAGIC); - LASSERTF(obd == obd_devs[obd->obd_minor], "obd %p != obd_devs[%d] %p\n", - obd, obd->obd_minor, obd_devs[obd->obd_minor]); - LASSERT(obd_type != NULL); - - CDEBUG(D_INFO, "Release obd device %s obd_type name =%s\n", - obd->obd_name,obd->obd_type->typ_name); - - spin_lock(&obd_dev_lock); - obd_devs[obd->obd_minor] = NULL; - spin_unlock(&obd_dev_lock); - obd_device_free(obd); - - class_put_type(obd_type); -} - -int class_name2dev(const char *name) -{ - int i; - - if (!name) - return -1; - - spin_lock(&obd_dev_lock); - for (i = 0; i < class_devno_max(); i++) { - struct obd_device *obd = class_num2obd(i); - if (obd && obd->obd_name && strcmp(name, obd->obd_name) == 0) { - /* Make sure we finished attaching before we give - out any references */ - LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); - if (obd->obd_attached) { - spin_unlock(&obd_dev_lock); - return i; - } - break; - } - } - spin_unlock(&obd_dev_lock); - - return -1; -} - -struct obd_device *class_name2obd(const char *name) -{ - int dev = class_name2dev(name); - - if (dev < 0 || dev > class_devno_max()) - return NULL; - return class_num2obd(dev); -} - -int class_uuid2dev(struct obd_uuid *uuid) -{ - int i; - - spin_lock(&obd_dev_lock); - for (i = 0; i < class_devno_max(); i++) { - struct obd_device *obd = class_num2obd(i); - if (obd && obd_uuid_equals(uuid, &obd->obd_uuid)) { - LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); - spin_unlock(&obd_dev_lock); - return i; - } - } - spin_unlock(&obd_dev_lock); - - return -1; -} - -struct obd_device *class_uuid2obd(struct obd_uuid *uuid) -{ - int dev = class_uuid2dev(uuid); - if (dev < 0) - return NULL; - return class_num2obd(dev); -} - -struct obd_device *class_num2obd(int num) -{ - struct obd_device *obd = NULL; - - if (num < class_devno_max()) { - obd = obd_devs[num]; - if (obd == NULL) { - return NULL; - } - - LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, - "%p obd_magic %08x != %08x\n", - obd, obd->obd_magic, OBD_DEVICE_MAGIC); - LASSERTF(obd->obd_minor == num, - "%p obd_minor %0d != %0d\n", - obd, obd->obd_minor, num); - } - - return obd; -} - -void class_obd_list(void) -{ - char *status; - int i; - - spin_lock(&obd_dev_lock); - for (i = 0; i < class_devno_max(); i++) { - struct obd_device *obd = class_num2obd(i); - if (obd == NULL) - continue; - if (obd->obd_stopping) - status = "ST"; - else if (obd->obd_set_up) - status = "UP"; - else if (obd->obd_attached) - status = "AT"; - else - status = "--"; - LCONSOLE(D_CONFIG, "%3d %s %s %s %s %d\n", - i, status, obd->obd_type->typ_name, - obd->obd_name, obd->obd_uuid.uuid, - atomic_read(&obd->obd_refcount)); - } - spin_unlock(&obd_dev_lock); - return; -} - -/* Search for a client OBD connected to tgt_uuid. If grp_uuid is - specified, then only the client with that uuid is returned, - otherwise any client connected to the tgt is returned. */ -struct obd_device * class_find_client_obd(struct obd_uuid *tgt_uuid, - const char * typ_name, - struct obd_uuid *grp_uuid) -{ - int i; - - spin_lock(&obd_dev_lock); - for (i = 0; i < class_devno_max(); i++) { - struct obd_device *obd = class_num2obd(i); - if (obd == NULL) - continue; - if ((strncmp(obd->obd_type->typ_name, typ_name, - strlen(typ_name)) == 0)) { - if (obd_uuid_equals(tgt_uuid, - &obd->u.cli.cl_target_uuid) && - ((grp_uuid)? obd_uuid_equals(grp_uuid, - &obd->obd_uuid) : 1)) { - spin_unlock(&obd_dev_lock); - return obd; - } - } - } - spin_unlock(&obd_dev_lock); - - return NULL; -} - -struct obd_device *class_find_client_notype(struct obd_uuid *tgt_uuid, - struct obd_uuid *grp_uuid) -{ - struct obd_device *obd; - - obd = class_find_client_obd(tgt_uuid, LUSTRE_MDC_NAME, NULL); - if (!obd) - obd = class_find_client_obd(tgt_uuid, LUSTRE_OSC_NAME, - grp_uuid); - return obd; -} - -/* Iterate the obd_device list looking devices have grp_uuid. Start - searching at *next, and if a device is found, the next index to look - at is saved in *next. If next is NULL, then the first matching device - will always be returned. */ -struct obd_device * class_devices_in_group(struct obd_uuid *grp_uuid, int *next) -{ - int i; - - if (next == NULL) - i = 0; - else if (*next >= 0 && *next < class_devno_max()) - i = *next; - else - return NULL; - - spin_lock(&obd_dev_lock); - for (; i < class_devno_max(); i++) { - struct obd_device *obd = class_num2obd(i); - if (obd == NULL) - continue; - if (obd_uuid_equals(grp_uuid, &obd->obd_uuid)) { - if (next != NULL) - *next = i+1; - spin_unlock(&obd_dev_lock); - return obd; - } - } - spin_unlock(&obd_dev_lock); - - return NULL; -} - - -void obd_cleanup_caches(void) -{ - int rc; - - ENTRY; - if (obd_device_cachep) { - rc = cfs_mem_cache_destroy(obd_device_cachep); - LASSERTF(rc == 0, "Cannot destropy ll_obd_device_cache: rc %d\n", rc); - obd_device_cachep = NULL; - } - if (obdo_cachep) { - rc = cfs_mem_cache_destroy(obdo_cachep); - LASSERTF(rc == 0, "Cannot destory ll_obdo_cache\n"); - obdo_cachep = NULL; - } - if (import_cachep) { - rc = cfs_mem_cache_destroy(import_cachep); - LASSERTF(rc == 0, "Cannot destory ll_import_cache\n"); - import_cachep = NULL; - } - EXIT; -} - -int obd_init_caches(void) -{ - ENTRY; - - LASSERT(obd_device_cachep == NULL); - obd_device_cachep = cfs_mem_cache_create("ll_obd_dev_cache", - sizeof(struct obd_device), - 0, 0); - if (!obd_device_cachep) - GOTO(out, -ENOMEM); - - LASSERT(obdo_cachep == NULL); - obdo_cachep = cfs_mem_cache_create("ll_obdo_cache", sizeof(struct obdo), - 0, 0); - if (!obdo_cachep) - GOTO(out, -ENOMEM); - - LASSERT(import_cachep == NULL); - import_cachep = cfs_mem_cache_create("ll_import_cache", - sizeof(struct obd_import), - 0, 0); - if (!import_cachep) - GOTO(out, -ENOMEM); - - RETURN(0); - out: - obd_cleanup_caches(); - RETURN(-ENOMEM); - -} - -/* map connection to client */ -struct obd_export *class_conn2export(struct lustre_handle *conn) -{ - struct obd_export *export; - ENTRY; - - if (!conn) { - CDEBUG(D_CACHE, "looking for null handle\n"); - RETURN(NULL); - } - - if (conn->cookie == -1) { /* this means assign a new connection */ - CDEBUG(D_CACHE, "want a new connection\n"); - RETURN(NULL); - } - - CDEBUG(D_INFO, "looking for export cookie "LPX64"\n", conn->cookie); - export = class_handle2object(conn->cookie); - RETURN(export); -} - -struct obd_device *class_exp2obd(struct obd_export *exp) -{ - if (exp) - return exp->exp_obd; - return NULL; -} - -struct obd_device *class_conn2obd(struct lustre_handle *conn) -{ - struct obd_export *export; - export = class_conn2export(conn); - if (export) { - struct obd_device *obd = export->exp_obd; - class_export_put(export); - return obd; - } - return NULL; -} - -struct obd_import *class_exp2cliimp(struct obd_export *exp) -{ - struct obd_device *obd = exp->exp_obd; - if (obd == NULL) - return NULL; - return obd->u.cli.cl_import; -} - -struct obd_import *class_conn2cliimp(struct lustre_handle *conn) -{ - struct obd_device *obd = class_conn2obd(conn); - if (obd == NULL) - return NULL; - return obd->u.cli.cl_import; -} - -/* Export management functions */ -static void export_handle_addref(void *export) -{ - class_export_get(export); -} - -void __class_export_put(struct obd_export *exp) -{ - if (atomic_dec_and_test(&exp->exp_refcount)) { - LASSERT (list_empty(&exp->exp_obd_chain)); - - CDEBUG(D_IOCTL, "final put %p/%s\n", - exp, exp->exp_client_uuid.uuid); - - spin_lock(&obd_zombie_impexp_lock); - list_add(&exp->exp_obd_chain, &obd_zombie_exports); - spin_unlock(&obd_zombie_impexp_lock); - - if (obd_zombie_impexp_notify != NULL) - obd_zombie_impexp_notify(); - } -} -EXPORT_SYMBOL(__class_export_put); - -void class_export_destroy(struct obd_export *exp) -{ - struct obd_device *obd = exp->exp_obd; - - LASSERT (atomic_read(&exp->exp_refcount) == 0); - - CDEBUG(D_IOCTL, "destroying export %p/%s\n", exp, - exp->exp_client_uuid.uuid); - - LASSERT(obd != NULL); - - /* "Local" exports (lctl, LOV->{mdc,osc}) have no connection. */ - if (exp->exp_connection) - ptlrpc_put_connection_superhack(exp->exp_connection); - - LASSERT(list_empty(&exp->exp_outstanding_replies)); - obd_destroy_export(exp); - - OBD_FREE_RCU(exp, sizeof(*exp), &exp->exp_handle); - class_decref(obd); -} - -/* Creates a new export, adds it to the hash table, and returns a - * pointer to it. The refcount is 2: one for the hash reference, and - * one for the pointer returned by this function. */ -struct obd_export *class_new_export(struct obd_device *obd, - struct obd_uuid *cluuid) -{ - struct obd_export *export; - int rc = 0; - - OBD_ALLOC(export, sizeof(*export)); - if (!export) - return ERR_PTR(-ENOMEM); - - export->exp_conn_cnt = 0; - atomic_set(&export->exp_refcount, 2); - atomic_set(&export->exp_rpc_count, 0); - export->exp_obd = obd; - CFS_INIT_LIST_HEAD(&export->exp_outstanding_replies); - /* XXX this should be in LDLM init */ - CFS_INIT_LIST_HEAD(&export->exp_ldlm_data.led_held_locks); - spin_lock_init(&export->exp_ldlm_data.led_lock); - - CFS_INIT_LIST_HEAD(&export->exp_handle.h_link); - class_handle_hash(&export->exp_handle, export_handle_addref); - export->exp_last_request_time = cfs_time_current_sec(); - spin_lock_init(&export->exp_lock); - INIT_HLIST_NODE(&export->exp_uuid_hash); - INIT_HLIST_NODE(&export->exp_nid_hash); - - export->exp_client_uuid = *cluuid; - obd_init_export(export); - - if (!obd_uuid_equals(cluuid, &obd->obd_uuid)) { - rc = lustre_hash_additem_unique(obd->obd_uuid_hash_body, cluuid, - &export->exp_uuid_hash); - if (rc != 0) { - CWARN("%s: denying duplicate export for %s\n", - obd->obd_name, cluuid->uuid); - class_handle_unhash(&export->exp_handle); - OBD_FREE_PTR(export); - return ERR_PTR(-EALREADY); - } - } - - spin_lock(&obd->obd_dev_lock); - LASSERT(!obd->obd_stopping); /* shouldn't happen, but might race */ - class_incref(obd); - list_add(&export->exp_obd_chain, &export->exp_obd->obd_exports); - list_add_tail(&export->exp_obd_chain_timed, - &export->exp_obd->obd_exports_timed); - export->exp_obd->obd_num_exports++; - spin_unlock(&obd->obd_dev_lock); - - return export; -} -EXPORT_SYMBOL(class_new_export); - -void class_unlink_export(struct obd_export *exp) -{ - class_handle_unhash(&exp->exp_handle); - - spin_lock(&exp->exp_obd->obd_dev_lock); - /* delete an uuid-export hashitem from hashtables */ - if (!hlist_unhashed(&exp->exp_uuid_hash)) { - lustre_hash_delitem(exp->exp_obd->obd_uuid_hash_body, - &exp->exp_client_uuid, &exp->exp_uuid_hash); - } - list_del_init(&exp->exp_obd_chain); - list_del_init(&exp->exp_obd_chain_timed); - exp->exp_obd->obd_num_exports--; - spin_unlock(&exp->exp_obd->obd_dev_lock); - - class_export_put(exp); -} -EXPORT_SYMBOL(class_unlink_export); - -/* Import management functions */ -static void import_handle_addref(void *import) -{ - class_import_get(import); -} - -struct obd_import *class_import_get(struct obd_import *import) -{ - LASSERT(atomic_read(&import->imp_refcount) >= 0); - LASSERT(atomic_read(&import->imp_refcount) < 0x5a5a5a); - atomic_inc(&import->imp_refcount); - CDEBUG(D_INFO, "import %p refcount=%d\n", import, - atomic_read(&import->imp_refcount)); - return import; -} -EXPORT_SYMBOL(class_import_get); - -void class_import_put(struct obd_import *import) -{ - ENTRY; - - CDEBUG(D_INFO, "import %p refcount=%d\n", import, - atomic_read(&import->imp_refcount) - 1); - - LASSERT(atomic_read(&import->imp_refcount) > 0); - LASSERT(atomic_read(&import->imp_refcount) < 0x5a5a5a); - LASSERT(list_empty(&import->imp_zombie_chain)); - - if (atomic_dec_and_test(&import->imp_refcount)) { - - CDEBUG(D_INFO, "final put import %p\n", import); - - spin_lock(&obd_zombie_impexp_lock); - list_add(&import->imp_zombie_chain, &obd_zombie_imports); - spin_unlock(&obd_zombie_impexp_lock); - - if (obd_zombie_impexp_notify != NULL) - obd_zombie_impexp_notify(); - } - - EXIT; -} - -void class_import_destroy(struct obd_import *import) -{ - ENTRY; - - CDEBUG(D_IOCTL, "destroying import %p\n", import); - - LASSERT(atomic_read(&import->imp_refcount) == 0); - - ptlrpc_put_connection_superhack(import->imp_connection); - - while (!list_empty(&import->imp_conn_list)) { - struct obd_import_conn *imp_conn; - - imp_conn = list_entry(import->imp_conn_list.next, - struct obd_import_conn, oic_item); - list_del(&imp_conn->oic_item); - ptlrpc_put_connection_superhack(imp_conn->oic_conn); - OBD_FREE(imp_conn, sizeof(*imp_conn)); - } - - class_decref(import->imp_obd); - OBD_FREE_RCU(import, sizeof(*import), &import->imp_handle); - EXIT; -} -EXPORT_SYMBOL(class_import_put); - -static void init_imp_at(struct imp_at *at) { - int i; - at_init(&at->iat_net_latency, 0, 0); - for (i = 0; i < IMP_AT_MAX_PORTALS; i++) { - /* max service estimates are tracked on the server side, so - don't use the AT history here, just use the last reported - val. (But keep hist for proc histogram, worst_ever) */ - at_init(&at->iat_service_estimate[i], INITIAL_CONNECT_TIMEOUT, - AT_FLG_NOHIST); - } -} - -struct obd_import *class_new_import(struct obd_device *obd) -{ - struct obd_import *imp; - - OBD_ALLOC(imp, sizeof(*imp)); - if (imp == NULL) - return NULL; - - CFS_INIT_LIST_HEAD(&imp->imp_zombie_chain); - CFS_INIT_LIST_HEAD(&imp->imp_replay_list); - CFS_INIT_LIST_HEAD(&imp->imp_sending_list); - CFS_INIT_LIST_HEAD(&imp->imp_delayed_list); - spin_lock_init(&imp->imp_lock); - imp->imp_last_success_conn = 0; - imp->imp_state = LUSTRE_IMP_NEW; - imp->imp_obd = class_incref(obd); - cfs_waitq_init(&imp->imp_recovery_waitq); - - atomic_set(&imp->imp_refcount, 2); - atomic_set(&imp->imp_inflight, 0); - atomic_set(&imp->imp_replay_inflight, 0); - atomic_set(&imp->imp_inval_count, 0); - CFS_INIT_LIST_HEAD(&imp->imp_conn_list); - CFS_INIT_LIST_HEAD(&imp->imp_handle.h_link); - class_handle_hash(&imp->imp_handle, import_handle_addref); - init_imp_at(&imp->imp_at); - -#ifdef HAVE_DEFAULT_V2_CONNECT - /* the default magic is V2, will be used in connect RPC, and - * then adjusted according to the flags in request/reply. */ - imp->imp_msg_magic = LUSTRE_MSG_MAGIC_V2; -#else - /* the default magic is V1, will be used in connect RPC, and - * then adjusted according to the flags in request/reply. */ - imp->imp_msg_magic = LUSTRE_MSG_MAGIC_V1; -#endif - - return imp; -} -EXPORT_SYMBOL(class_new_import); - -void class_destroy_import(struct obd_import *import) -{ - LASSERT(import != NULL); - LASSERT(import != LP_POISON); - - class_handle_unhash(&import->imp_handle); - - spin_lock(&import->imp_lock); - import->imp_generation++; - spin_unlock(&import->imp_lock); - - class_import_put(import); -} -EXPORT_SYMBOL(class_destroy_import); - -/* A connection defines an export context in which preallocation can - be managed. This releases the export pointer reference, and returns - the export handle, so the export refcount is 1 when this function - returns. */ -int class_connect(struct lustre_handle *conn, struct obd_device *obd, - struct obd_uuid *cluuid) -{ - struct obd_export *export; - LASSERT(conn != NULL); - LASSERT(obd != NULL); - LASSERT(cluuid != NULL); - ENTRY; - - export = class_new_export(obd, cluuid); - if (IS_ERR(export)) - RETURN(PTR_ERR(export)); - - conn->cookie = export->exp_handle.h_cookie; - class_export_put(export); - - CDEBUG(D_IOCTL, "connect: client %s, cookie "LPX64"\n", - cluuid->uuid, conn->cookie); - RETURN(0); -} -EXPORT_SYMBOL(class_connect); - -/* This function removes two references from the export: one for the - * hash entry and one for the export pointer passed in. The export - * pointer passed to this function is destroyed should not be used - * again. */ -int class_disconnect(struct obd_export *export) -{ - int already_disconnected; - ENTRY; - - if (export == NULL) { - fixme(); - CDEBUG(D_IOCTL, "attempting to free NULL export %p\n", export); - RETURN(-EINVAL); - } - - spin_lock(&export->exp_lock); - already_disconnected = export->exp_disconnected; - export->exp_disconnected = 1; - - if (!hlist_unhashed(&export->exp_nid_hash)) { - lustre_hash_delitem(export->exp_obd->obd_nid_hash_body, - &export->exp_connection->c_peer.nid, &export->exp_nid_hash); - } - spin_unlock(&export->exp_lock); - - /* class_cleanup(), abort_recovery(), and class_fail_export() - * all end up in here, and if any of them race we shouldn't - * call extra class_export_puts(). */ - if (already_disconnected) - RETURN(0); - - CDEBUG(D_IOCTL, "disconnect: cookie "LPX64"\n", - export->exp_handle.h_cookie); - - class_unlink_export(export); - class_export_put(export); - RETURN(0); -} - -static void class_disconnect_export_list(struct list_head *list, int flags) -{ - int rc; - struct lustre_handle fake_conn; - struct obd_export *fake_exp, *exp; - ENTRY; - - /* It's possible that an export may disconnect itself, but - * nothing else will be added to this list. */ - while (!list_empty(list)) { - exp = list_entry(list->next, struct obd_export, exp_obd_chain); - class_export_get(exp); - - spin_lock(&exp->exp_lock); - exp->exp_flags = flags; - spin_unlock(&exp->exp_lock); - - if (obd_uuid_equals(&exp->exp_client_uuid, - &exp->exp_obd->obd_uuid)) { - CDEBUG(D_HA, - "exp %p export uuid == obd uuid, don't discon\n", - exp); - /* Need to delete this now so we don't end up pointing - * to work_list later when this export is cleaned up. */ - list_del_init(&exp->exp_obd_chain); - class_export_put(exp); - continue; - } - - fake_conn.cookie = exp->exp_handle.h_cookie; - fake_exp = class_conn2export(&fake_conn); - if (!fake_exp) { - class_export_put(exp); - continue; - } - - spin_lock(&fake_exp->exp_lock); - fake_exp->exp_flags = flags; - spin_unlock(&fake_exp->exp_lock); - - CDEBUG(D_HA, "%s: disconnecting export at %s (%p), " - "last request at %ld\n", - exp->exp_obd->obd_name, obd_export_nid2str(exp), - exp, exp->exp_last_request_time); - rc = obd_disconnect(fake_exp); - class_export_put(exp); - } - EXIT; -} - -static inline int get_exp_flags_from_obd(struct obd_device *obd) -{ - return ((obd->obd_fail ? OBD_OPT_FAILOVER : 0) | - (obd->obd_force ? OBD_OPT_FORCE : 0)); -} - -void class_disconnect_exports(struct obd_device *obd) -{ - struct list_head work_list; - ENTRY; - - /* Move all of the exports from obd_exports to a work list, en masse. */ - spin_lock(&obd->obd_dev_lock); - list_add(&work_list, &obd->obd_exports); - list_del_init(&obd->obd_exports); - spin_unlock(&obd->obd_dev_lock); - - CDEBUG(D_HA, "OBD device %d (%p) has exports, " - "disconnecting them\n", obd->obd_minor, obd); - class_disconnect_export_list(&work_list, get_exp_flags_from_obd(obd)); - EXIT; -} -EXPORT_SYMBOL(class_disconnect_exports); - -/* Remove exports that have not completed recovery. - */ -void class_disconnect_stale_exports(struct obd_device *obd) -{ - struct list_head work_list; - struct list_head *pos, *n; - struct obd_export *exp; - int cnt = 0; - ENTRY; - - CFS_INIT_LIST_HEAD(&work_list); - spin_lock(&obd->obd_dev_lock); - list_for_each_safe(pos, n, &obd->obd_exports) { - exp = list_entry(pos, struct obd_export, exp_obd_chain); - if (exp->exp_replay_needed) { - list_del(&exp->exp_obd_chain); - list_add(&exp->exp_obd_chain, &work_list); - cnt++; - } - } - spin_unlock(&obd->obd_dev_lock); - - CDEBUG(D_ERROR, "%s: disconnecting %d stale clients\n", - obd->obd_name, cnt); - class_disconnect_export_list(&work_list, get_exp_flags_from_obd(obd)); - EXIT; -} -EXPORT_SYMBOL(class_disconnect_stale_exports); - -int oig_init(struct obd_io_group **oig_out) -{ - struct obd_io_group *oig; - ENTRY; - - OBD_ALLOC(oig, sizeof(*oig)); - if (oig == NULL) - RETURN(-ENOMEM); - - spin_lock_init(&oig->oig_lock); - oig->oig_rc = 0; - oig->oig_pending = 0; - atomic_set(&oig->oig_refcount, 1); - cfs_waitq_init(&oig->oig_waitq); - CFS_INIT_LIST_HEAD(&oig->oig_occ_list); - - *oig_out = oig; - RETURN(0); -}; -EXPORT_SYMBOL(oig_init); - -static inline void oig_grab(struct obd_io_group *oig) -{ - atomic_inc(&oig->oig_refcount); -} - -void oig_release(struct obd_io_group *oig) -{ - if (atomic_dec_and_test(&oig->oig_refcount)) - OBD_FREE(oig, sizeof(*oig)); -} -EXPORT_SYMBOL(oig_release); - -int oig_add_one(struct obd_io_group *oig, struct oig_callback_context *occ) -{ - int rc = 0; - CDEBUG(D_CACHE, "oig %p ready to roll\n", oig); - spin_lock(&oig->oig_lock); - if (oig->oig_rc) { - rc = oig->oig_rc; - } else { - oig->oig_pending++; - if (occ != NULL) - list_add_tail(&occ->occ_oig_item, &oig->oig_occ_list); - } - spin_unlock(&oig->oig_lock); - oig_grab(oig); - - return rc; -} -EXPORT_SYMBOL(oig_add_one); - -void oig_complete_one(struct obd_io_group *oig, - struct oig_callback_context *occ, int rc) -{ - cfs_waitq_t *wake = NULL; - int old_rc; - - spin_lock(&oig->oig_lock); - - if (occ != NULL) - list_del_init(&occ->occ_oig_item); - - old_rc = oig->oig_rc; - if (oig->oig_rc == 0 && rc != 0) - oig->oig_rc = rc; - - if (--oig->oig_pending <= 0) - wake = &oig->oig_waitq; - - spin_unlock(&oig->oig_lock); - - CDEBUG(D_CACHE, "oig %p completed, rc %d -> %d via %d, %d now " - "pending (racey)\n", oig, old_rc, oig->oig_rc, rc, - oig->oig_pending); - if (wake) - cfs_waitq_signal(wake); - oig_release(oig); -} -EXPORT_SYMBOL(oig_complete_one); - -static int oig_done(struct obd_io_group *oig) -{ - int rc = 0; - spin_lock(&oig->oig_lock); - if (oig->oig_pending <= 0) - rc = 1; - spin_unlock(&oig->oig_lock); - return rc; -} - -static void interrupted_oig(void *data) -{ - struct obd_io_group *oig = data; - struct oig_callback_context *occ; - - spin_lock(&oig->oig_lock); - /* We need to restart the processing each time we drop the lock, as - * it is possible other threads called oig_complete_one() to remove - * an entry elsewhere in the list while we dropped lock. We need to - * drop the lock because osc_ap_completion() calls oig_complete_one() - * which re-gets this lock ;-) as well as a lock ordering issue. */ -restart: - list_for_each_entry(occ, &oig->oig_occ_list, occ_oig_item) { - if (occ->interrupted) - continue; - occ->interrupted = 1; - spin_unlock(&oig->oig_lock); - occ->occ_interrupted(occ); - spin_lock(&oig->oig_lock); - goto restart; - } - spin_unlock(&oig->oig_lock); -} - -int oig_wait(struct obd_io_group *oig) -{ - struct l_wait_info lwi = LWI_INTR(interrupted_oig, oig); - int rc; - - CDEBUG(D_CACHE, "waiting for oig %p\n", oig); - - do { - rc = l_wait_event(oig->oig_waitq, oig_done(oig), &lwi); - LASSERTF(rc == 0 || rc == -EINTR, "rc: %d\n", rc); - /* we can't continue until the oig has emptied and stopped - * referencing state that the caller will free upon return */ - if (rc == -EINTR) - lwi = (struct l_wait_info){ 0, }; - } while (rc == -EINTR); - - LASSERTF(oig->oig_pending == 0, - "exiting oig_wait(oig = %p) with %d pending\n", oig, - oig->oig_pending); - - CDEBUG(D_CACHE, "done waiting on oig %p rc %d\n", oig, oig->oig_rc); - return oig->oig_rc; -} -EXPORT_SYMBOL(oig_wait); - -void class_fail_export(struct obd_export *exp) -{ - int rc, already_failed; - - spin_lock(&exp->exp_lock); - already_failed = exp->exp_failed; - exp->exp_failed = 1; - spin_unlock(&exp->exp_lock); - - if (already_failed) { - CDEBUG(D_HA, "disconnecting dead export %p/%s; skipping\n", - exp, exp->exp_client_uuid.uuid); - return; - } - - CDEBUG(D_HA, "disconnecting export %p/%s\n", - exp, exp->exp_client_uuid.uuid); - - if (obd_dump_on_timeout) - libcfs_debug_dumplog(); - - /* Most callers into obd_disconnect are removing their own reference - * (request, for example) in addition to the one from the hash table. - * We don't have such a reference here, so make one. */ - class_export_get(exp); - rc = obd_disconnect(exp); - if (rc) - CERROR("disconnecting export %p failed: %d\n", exp, rc); - else - CDEBUG(D_HA, "disconnected export %p/%s\n", - exp, exp->exp_client_uuid.uuid); -} -EXPORT_SYMBOL(class_fail_export); - -char *obd_export_nid2str(struct obd_export *exp) -{ - if (exp->exp_connection != NULL) - return libcfs_nid2str(exp->exp_connection->c_peer.nid); - - return "(no nid)"; -} -EXPORT_SYMBOL(obd_export_nid2str); - -int obd_export_evict_by_nid(struct obd_device *obd, char *nid) -{ - struct obd_export *doomed_exp = NULL; - int exports_evicted = 0; - - lnet_nid_t nid_key = libcfs_str2nid(nid); - - do { - doomed_exp = lustre_hash_get_object_by_key(obd->obd_nid_hash_body, - &nid_key); - - if (doomed_exp == NULL) - break; - - LASSERTF(doomed_exp->exp_connection->c_peer.nid == nid_key, - "nid %s found, wanted nid %s, requested nid %s\n", - obd_export_nid2str(doomed_exp), - libcfs_nid2str(nid_key), nid); - - exports_evicted++; - CDEBUG(D_HA, "%s: evict NID '%s' (%s) #%d at adminstrative request\n", - obd->obd_name, nid, doomed_exp->exp_client_uuid.uuid, - exports_evicted); - class_fail_export(doomed_exp); - class_export_put(doomed_exp); - } while (1); - - if (!exports_evicted) - CDEBUG(D_HA,"%s: can't disconnect NID '%s': no exports found\n", - obd->obd_name, nid); - return exports_evicted; -} -EXPORT_SYMBOL(obd_export_evict_by_nid); - -int obd_export_evict_by_uuid(struct obd_device *obd, char *uuid) -{ - struct obd_export *doomed_exp = NULL; - struct obd_uuid doomed; - int exports_evicted = 0; - - obd_str2uuid(&doomed, uuid); - if(obd_uuid_equals(&doomed, &obd->obd_uuid)) { - CERROR("%s: can't evict myself\n", obd->obd_name); - return exports_evicted; - } - - doomed_exp = lustre_hash_get_object_by_key(obd->obd_uuid_hash_body, - &doomed); - - if (doomed_exp == NULL) { - CERROR("%s: can't disconnect %s: no exports found\n", - obd->obd_name, uuid); - } else { - CWARN("%s: evicting %s at adminstrative request\n", - obd->obd_name, doomed_exp->exp_client_uuid.uuid); - class_fail_export(doomed_exp); - class_export_put(doomed_exp); - exports_evicted++; - } - - return exports_evicted; -} -EXPORT_SYMBOL(obd_export_evict_by_uuid); - -void obd_zombie_impexp_cull(void) -{ - struct obd_import *import; - struct obd_export *export; - - do { - spin_lock (&obd_zombie_impexp_lock); - - import = NULL; - if (!list_empty(&obd_zombie_imports)) { - import = list_entry(obd_zombie_imports.next, - struct obd_import, - imp_zombie_chain); - list_del(&import->imp_zombie_chain); - } - - export = NULL; - if (!list_empty(&obd_zombie_exports)) { - export = list_entry(obd_zombie_exports.next, - struct obd_export, - exp_obd_chain); - list_del_init(&export->exp_obd_chain); - } - - spin_unlock(&obd_zombie_impexp_lock); - - if (import != NULL) - class_import_destroy(import); - - if (export != NULL) - class_export_destroy(export); - - } while (import != NULL || export != NULL); -} -EXPORT_SYMBOL(obd_zombie_impexp_cull); - -void obd_zombie_impexp_init(void) -{ - CFS_INIT_LIST_HEAD(&obd_zombie_imports); - CFS_INIT_LIST_HEAD(&obd_zombie_exports); - spin_lock_init(&obd_zombie_impexp_lock); -} diff --git a/lustre/obdclass/linux/.cvsignore b/lustre/obdclass/linux/.cvsignore deleted file mode 100644 index 13e3fc445e..0000000000 --- a/lustre/obdclass/linux/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -.linux-module.o.cmd -.linux-obdo.o.cmd -.linux-sysctl.o.cmd diff --git a/lustre/obdclass/linux/Makefile.am b/lustre/obdclass/linux/Makefile.am deleted file mode 100644 index bf95892761..0000000000 --- a/lustre/obdclass/linux/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_DIST := \ - linux-module.c \ - linux-sysctl.c \ - linux-obdo.c diff --git a/lustre/obdclass/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c deleted file mode 100644 index c9807f521c..0000000000 --- a/lustre/obdclass/linux/linux-module.c +++ /dev/null @@ -1,431 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Object Devices Class Driver - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of Lustre, http://www.lustre.org. - * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * These are the only exported functions, they provide some generic - * infrastructure for managing object devices - */ -#define DEBUG_SUBSYSTEM S_CLASS -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#ifdef __KERNEL__ -#ifndef AUTOCONF_INCLUDED -#include <linux/config.h> /* for CONFIG_PROC_FS */ -#endif -#include <linux/module.h> -#include <linux/errno.h> -#include <linux/kernel.h> -#include <linux/major.h> -#include <linux/sched.h> -#include <linux/lp.h> -#include <linux/slab.h> -#include <linux/ioport.h> -#include <linux/fcntl.h> -#include <linux/delay.h> -#include <linux/skbuff.h> -#include <linux/proc_fs.h> -#include <linux/fs.h> -#include <linux/poll.h> -#include <linux/init.h> -#include <linux/list.h> -#include <linux/highmem.h> -#include <asm/io.h> -#include <asm/ioctls.h> -#include <asm/system.h> -#include <asm/poll.h> -#include <asm/uaccess.h> -#include <linux/miscdevice.h> -#include <linux/smp_lock.h> -#include <linux/seq_file.h> -#else -# include <liblustre.h> -#endif - -#include <libcfs/libcfs.h> -#include <obd_support.h> -#include <obd_class.h> -#include <lprocfs_status.h> -#include <lustre_ver.h> -#include <lustre/lustre_build_version.h> -#ifdef __KERNEL__ -#include <linux/lustre_version.h> - -int proc_version; - -/* buffer MUST be at least the size of obd_ioctl_hdr */ -int obd_ioctl_getdata(char **buf, int *len, void *arg) -{ - struct obd_ioctl_hdr hdr; - struct obd_ioctl_data *data; - int err; - int offset = 0; - ENTRY; - - err = copy_from_user(&hdr, (void *)arg, sizeof(hdr)); - if ( err ) - RETURN(err); - - if (hdr.ioc_version != OBD_IOCTL_VERSION) { - CERROR("Version mismatch kernel (%x) vs application (%x)\n", - OBD_IOCTL_VERSION, hdr.ioc_version); - RETURN(-EINVAL); - } - - if (hdr.ioc_len > OBD_MAX_IOCTL_BUFFER) { - CERROR("User buffer len %d exceeds %d max buffer\n", - hdr.ioc_len, OBD_MAX_IOCTL_BUFFER); - RETURN(-EINVAL); - } - - if (hdr.ioc_len < sizeof(struct obd_ioctl_data)) { - CERROR("User buffer too small for ioctl (%d)\n", hdr.ioc_len); - RETURN(-EINVAL); - } - - /* XXX allocate this more intelligently, using kmalloc when - * appropriate */ - OBD_VMALLOC(*buf, hdr.ioc_len); - if (*buf == NULL) { - CERROR("Cannot allocate control buffer of len %d\n", - hdr.ioc_len); - RETURN(-EINVAL); - } - *len = hdr.ioc_len; - data = (struct obd_ioctl_data *)*buf; - - err = copy_from_user(*buf, (void *)arg, hdr.ioc_len); - if ( err ) { - OBD_VFREE(*buf, hdr.ioc_len); - RETURN(err); - } - - if (obd_ioctl_is_invalid(data)) { - CERROR("ioctl not correctly formatted\n"); - OBD_VFREE(*buf, hdr.ioc_len); - RETURN(-EINVAL); - } - - if (data->ioc_inllen1) { - data->ioc_inlbuf1 = &data->ioc_bulk[0]; - offset += size_round(data->ioc_inllen1); - } - - if (data->ioc_inllen2) { - data->ioc_inlbuf2 = &data->ioc_bulk[0] + offset; - offset += size_round(data->ioc_inllen2); - } - - if (data->ioc_inllen3) { - data->ioc_inlbuf3 = &data->ioc_bulk[0] + offset; - offset += size_round(data->ioc_inllen3); - } - - if (data->ioc_inllen4) { - data->ioc_inlbuf4 = &data->ioc_bulk[0] + offset; - } - - EXIT; - return 0; -} - -int obd_ioctl_popdata(void *arg, void *data, int len) -{ - int err; - - err = copy_to_user(arg, data, len); - if (err) - err = -EFAULT; - return err; -} - -EXPORT_SYMBOL(obd_ioctl_getdata); -EXPORT_SYMBOL(obd_ioctl_popdata); - -#define OBD_MINOR 241 -extern struct cfs_psdev_ops obd_psdev_ops; - -/* opening /dev/obd */ -static int obd_class_open(struct inode * inode, struct file * file) -{ - if (obd_psdev_ops.p_open != NULL) - return obd_psdev_ops.p_open(0, NULL); - return -EPERM; -} - -/* closing /dev/obd */ -static int obd_class_release(struct inode * inode, struct file * file) -{ - if (obd_psdev_ops.p_close != NULL) - return obd_psdev_ops.p_close(0, NULL); - return -EPERM; -} - -/* to control /dev/obd */ -static int obd_class_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg) -{ - int err = 0; - ENTRY; - - if (current->fsuid != 0) - RETURN(err = -EACCES); - if ((cmd & 0xffffff00) == ((int)'T') << 8) /* ignore all tty ioctls */ - RETURN(err = -ENOTTY); - - if (obd_psdev_ops.p_ioctl != NULL) - err = obd_psdev_ops.p_ioctl(NULL, cmd, (void *)arg); - else - err = -EPERM; - - RETURN(err); -} - -/* declare character device */ -static struct file_operations obd_psdev_fops = { - .owner = THIS_MODULE, - .ioctl = obd_class_ioctl, /* ioctl */ - .open = obd_class_open, /* open */ - .release = obd_class_release, /* release */ -}; - -/* modules setup */ -cfs_psdev_t obd_psdev = { - .minor = OBD_MINOR, - .name = "obd_psdev", - .fops = &obd_psdev_fops, -}; - -#endif - -#ifdef LPROCFS -int obd_proc_read_version(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - *eof = 1; -#ifdef HAVE_VFS_INTENT_PATCHES - return snprintf(page, count, "lustre: %s\nkernel: %u\nbuild: %s\n", - LUSTRE_VERSION_STRING, LUSTRE_KERNEL_VERSION, - BUILD_VERSION); -#else - return snprintf(page, count, "lustre: %s\nkernel: %s\nbuild: %s\n", - LUSTRE_VERSION_STRING, "patchless", BUILD_VERSION); -#endif -} - -int obd_proc_read_pinger(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - *eof = 1; - return snprintf(page, count, "%s\n", -#ifdef ENABLE_PINGER - "on" -#else - "off" -#endif - ); -} - -static int obd_proc_read_health(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int rc = 0, i; - *eof = 1; - - if (libcfs_catastrophe) - rc += snprintf(page + rc, count - rc, "LBUG\n"); - - spin_lock(&obd_dev_lock); - for (i = 0; i < class_devno_max(); i++) { - struct obd_device *obd; - - obd = class_num2obd(i); - if (obd == NULL) - continue; - - LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); - if (obd->obd_stopping) - continue; - - class_incref(obd); - spin_unlock(&obd_dev_lock); - - if (obd_health_check(obd)) { - rc += snprintf(page + rc, count - rc, - "device %s reported unhealthy\n", - obd->obd_name); - } - class_decref(obd); - spin_lock(&obd_dev_lock); - } - spin_unlock(&obd_dev_lock); - - if (rc == 0) - return snprintf(page, count, "healthy\n"); - - rc += snprintf(page + rc, count - rc, "NOT HEALTHY\n"); - return rc; -} - -/* Root for /proc/fs/lustre */ -struct proc_dir_entry *proc_lustre_root = NULL; - -struct lprocfs_vars lprocfs_base[] = { - { "version", obd_proc_read_version, NULL, NULL }, - { "pinger", obd_proc_read_pinger, NULL, NULL }, - { "health_check", obd_proc_read_health, NULL, NULL }, - { 0 } -}; -#else -#define lprocfs_base NULL -#endif /* LPROCFS */ - -#ifdef __KERNEL__ -static void *obd_device_list_seq_start(struct seq_file *p, loff_t *pos) -{ - if (*pos >= class_devno_max()) - return NULL; - - return pos; -} - -static void obd_device_list_seq_stop(struct seq_file *p, void *v) -{ -} - -static void *obd_device_list_seq_next(struct seq_file *p, void *v, loff_t *pos) -{ - ++*pos; - if (*pos >= class_devno_max()) - return NULL; - - return pos; -} - -static int obd_device_list_seq_show(struct seq_file *p, void *v) -{ - loff_t index = *(loff_t *)v; - struct obd_device *obd = class_num2obd((int)index); - char *status; - - if (obd == NULL) - return 0; - - LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); - if (obd->obd_stopping) - status = "ST"; - else if (obd->obd_inactive) - status = "IN"; - else if (obd->obd_set_up) - status = "UP"; - else if (obd->obd_attached) - status = "AT"; - else - status = "--"; - - return seq_printf(p, "%3d %s %s %s %s %d\n", - (int)index, status, obd->obd_type->typ_name, - obd->obd_name, obd->obd_uuid.uuid, - atomic_read(&obd->obd_refcount)); -} - -struct seq_operations obd_device_list_sops = { - .start = obd_device_list_seq_start, - .stop = obd_device_list_seq_stop, - .next = obd_device_list_seq_next, - .show = obd_device_list_seq_show, -}; - -static int obd_device_list_open(struct inode *inode, struct file *file) -{ - struct proc_dir_entry *dp = PDE(inode); - struct seq_file *seq; - int rc = seq_open(file, &obd_device_list_sops); - - if (rc) - return rc; - - seq = file->private_data; - seq->private = dp->data; - - return 0; -} - -struct file_operations obd_device_list_fops = { - .owner = THIS_MODULE, - .open = obd_device_list_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; -#endif - -int class_procfs_init(void) -{ -#ifdef __KERNEL__ - struct proc_dir_entry *entry; - ENTRY; - - obd_sysctl_init(); - proc_lustre_root = proc_mkdir("lustre", proc_root_fs); - if (!proc_lustre_root) { - printk(KERN_ERR - "LustreError: error registering /proc/fs/lustre\n"); - RETURN(-ENOMEM); - } - proc_version = lprocfs_add_vars(proc_lustre_root, lprocfs_base, NULL); - entry = create_proc_entry("devices", 0444, proc_lustre_root); - if (entry == NULL) { - CERROR("error registering /proc/fs/lustre/devices\n"); - lprocfs_remove(&proc_lustre_root); - RETURN(-ENOMEM); - } - entry->proc_fops = &obd_device_list_fops; -#else - ENTRY; -#endif - RETURN(0); -} - -#ifdef __KERNEL__ -int class_procfs_clean(void) -{ - ENTRY; - if (proc_lustre_root) - lprocfs_remove(&proc_lustre_root); - RETURN(0); -} - - -/* Check that we're building against the appropriate version of the Lustre - * kernel patch */ -#include <linux/lustre_version.h> -#ifdef LUSTRE_KERNEL_VERSION -#define LUSTRE_MIN_VERSION 45 -#define LUSTRE_MAX_VERSION 47 -#if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION) -# error Cannot continue: Your Lustre kernel patch is older than the sources -#elif (LUSTRE_KERNEL_VERSION > LUSTRE_MAX_VERSION) -# error Cannot continue: Your Lustre sources are older than the kernel patch -#endif -#endif -#endif diff --git a/lustre/obdclass/linux/linux-obdo.c b/lustre/obdclass/linux/linux-obdo.c deleted file mode 100644 index a5bf3b990f..0000000000 --- a/lustre/obdclass/linux/linux-obdo.c +++ /dev/null @@ -1,288 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Object Devices Class Driver - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - * These are the only exported functions, they provide some generic - * infrastructure for managing object devices - */ - -#define DEBUG_SUBSYSTEM S_CLASS -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#ifndef __KERNEL__ -#include <liblustre.h> -#else -#include <linux/module.h> -#include <obd_class.h> -#include <lustre/lustre_idl.h> -#endif - -#ifdef __KERNEL__ -#include <linux/fs.h> -#include <linux/pagemap.h> /* for PAGE_CACHE_SIZE */ - -void obdo_from_iattr(struct obdo *oa, struct iattr *attr, unsigned int ia_valid) -{ - if (ia_valid & ATTR_ATIME) { - oa->o_atime = LTIME_S(attr->ia_atime); - oa->o_valid |= OBD_MD_FLATIME; - } - if (ia_valid & ATTR_MTIME) { - oa->o_mtime = LTIME_S(attr->ia_mtime); - oa->o_valid |= OBD_MD_FLMTIME; - } - if (ia_valid & ATTR_CTIME) { - oa->o_ctime = LTIME_S(attr->ia_ctime); - oa->o_valid |= OBD_MD_FLCTIME; - } - if (ia_valid & ATTR_SIZE) { - oa->o_size = attr->ia_size; - oa->o_valid |= OBD_MD_FLSIZE; - } - if (ia_valid & ATTR_MODE) { - oa->o_mode = attr->ia_mode; - oa->o_valid |= OBD_MD_FLTYPE | OBD_MD_FLMODE; - if (!in_group_p(oa->o_gid) && !capable(CAP_FSETID)) - oa->o_mode &= ~S_ISGID; - } - if (ia_valid & ATTR_UID) { - oa->o_uid = attr->ia_uid; - oa->o_valid |= OBD_MD_FLUID; - } - if (ia_valid & ATTR_GID) { - oa->o_gid = attr->ia_gid; - oa->o_valid |= OBD_MD_FLGID; - } -} -EXPORT_SYMBOL(obdo_from_iattr); - -void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid) -{ - valid &= oa->o_valid; - - if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, "valid "LPX64", new time "LPU64"/"LPU64"\n", - oa->o_valid, oa->o_mtime, oa->o_ctime); - - attr->ia_valid = 0; - if (valid & OBD_MD_FLATIME) { - LTIME_S(attr->ia_atime) = oa->o_atime; - attr->ia_valid |= ATTR_ATIME; - } - if (valid & OBD_MD_FLMTIME) { - LTIME_S(attr->ia_mtime) = oa->o_mtime; - attr->ia_valid |= ATTR_MTIME; - } - if (valid & OBD_MD_FLCTIME) { - LTIME_S(attr->ia_ctime) = oa->o_ctime; - attr->ia_valid |= ATTR_CTIME; - } - if (valid & OBD_MD_FLSIZE) { - attr->ia_size = oa->o_size; - attr->ia_valid |= ATTR_SIZE; - } -#if 0 /* you shouldn't be able to change a file's type with setattr */ - if (valid & OBD_MD_FLTYPE) { - attr->ia_mode = (attr->ia_mode & ~S_IFMT)|(oa->o_mode & S_IFMT); - attr->ia_valid |= ATTR_MODE; - } -#endif - if (valid & OBD_MD_FLMODE) { - attr->ia_mode = (attr->ia_mode & S_IFMT)|(oa->o_mode & ~S_IFMT); - attr->ia_valid |= ATTR_MODE; - if (!in_group_p(oa->o_gid) && !capable(CAP_FSETID)) - attr->ia_mode &= ~S_ISGID; - } - if (valid & OBD_MD_FLUID) { - attr->ia_uid = oa->o_uid; - attr->ia_valid |= ATTR_UID; - } - if (valid & OBD_MD_FLGID) { - attr->ia_gid = oa->o_gid; - attr->ia_valid |= ATTR_GID; - } -} -EXPORT_SYMBOL(iattr_from_obdo); - -/* WARNING: the file systems must take care not to tinker with - attributes they don't manage (such as blocks). */ -void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid) -{ - obd_flag newvalid = 0; - - if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n", - valid, LTIME_S(src->i_mtime), - LTIME_S(src->i_ctime)); - - if (valid & OBD_MD_FLATIME) { - dst->o_atime = LTIME_S(src->i_atime); - newvalid |= OBD_MD_FLATIME; - } - if (valid & OBD_MD_FLMTIME) { - dst->o_mtime = LTIME_S(src->i_mtime); - newvalid |= OBD_MD_FLMTIME; - } - if (valid & OBD_MD_FLCTIME) { - dst->o_ctime = LTIME_S(src->i_ctime); - newvalid |= OBD_MD_FLCTIME; - } - if (valid & OBD_MD_FLSIZE) { - dst->o_size = i_size_read(src); - newvalid |= OBD_MD_FLSIZE; - } - if (valid & OBD_MD_FLBLOCKS) { /* allocation of space (x512 bytes) */ - dst->o_blocks = src->i_blocks; - newvalid |= OBD_MD_FLBLOCKS; - } - if (valid & OBD_MD_FLBLKSZ) { /* optimal block size */ - dst->o_blksize = 1<<src->i_blkbits; - newvalid |= OBD_MD_FLBLKSZ; - } - if (valid & OBD_MD_FLTYPE) { - dst->o_mode = (dst->o_mode & S_IALLUGO)|(src->i_mode & S_IFMT); - newvalid |= OBD_MD_FLTYPE; - } - if (valid & OBD_MD_FLMODE) { - dst->o_mode = (dst->o_mode & S_IFMT)|(src->i_mode & S_IALLUGO); - newvalid |= OBD_MD_FLMODE; - } - if (valid & OBD_MD_FLUID) { - dst->o_uid = src->i_uid; - newvalid |= OBD_MD_FLUID; - } - if (valid & OBD_MD_FLGID) { - dst->o_gid = src->i_gid; - newvalid |= OBD_MD_FLGID; - } - if (valid & OBD_MD_FLFLAGS) { - dst->o_flags = src->i_flags; - newvalid |= OBD_MD_FLFLAGS; - } - if (valid & OBD_MD_FLGENER) { - dst->o_generation = src->i_generation; - newvalid |= OBD_MD_FLGENER; - } - if (valid & OBD_MD_FLFID) { - dst->o_fid = src->i_ino; - newvalid |= OBD_MD_FLFID; - } - - dst->o_valid |= newvalid; -} -EXPORT_SYMBOL(obdo_from_inode); - -void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid) -{ - valid &= src->o_valid; - - if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, - "valid "LPX64", cur time %lu/%lu, new "LPU64"/"LPU64"\n", - src->o_valid, LTIME_S(dst->i_mtime), - LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); - - if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(dst->i_atime)) - LTIME_S(dst->i_atime) = src->o_atime; - - /* mtime is always updated with ctime, but can be set in past. - As write and utime(2) may happen within 1 second, and utime's - mtime has a priority over write's one, leave mtime from mds - for the same ctimes. */ - if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(dst->i_ctime)) { - LTIME_S(dst->i_ctime) = src->o_ctime; - if (valid & OBD_MD_FLMTIME) - LTIME_S(dst->i_mtime) = src->o_mtime; - } - if (valid & OBD_MD_FLSIZE) - i_size_write(dst, src->o_size); - /* optimum IO size */ - if (valid & OBD_MD_FLBLKSZ && src->o_blksize > (1<<dst->i_blkbits)) { - dst->i_blkbits = ffs(src->o_blksize)-1; -#ifdef HAVE_INODE_BLKSIZE - dst->i_blksize = src->o_blksize; -#endif - } - - if (dst->i_blkbits < CFS_PAGE_SHIFT) { -#ifdef HAVE_INODE_BLKSIZE - dst->i_blksize = CFS_PAGE_SIZE; -#endif - dst->i_blkbits = CFS_PAGE_SHIFT; - } - - /* allocation of space */ - if (valid & OBD_MD_FLBLOCKS && src->o_blocks > dst->i_blocks) - dst->i_blocks = src->o_blocks; -} -EXPORT_SYMBOL(obdo_refresh_inode); - -void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid) -{ - valid &= src->o_valid; - - if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, - "valid "LPX64", cur time %lu/%lu, new "LPU64"/"LPU64"\n", - src->o_valid, LTIME_S(dst->i_mtime), - LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); - - if (valid & OBD_MD_FLATIME) - LTIME_S(dst->i_atime) = src->o_atime; - if (valid & OBD_MD_FLMTIME) - LTIME_S(dst->i_mtime) = src->o_mtime; - if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(dst->i_ctime)) - LTIME_S(dst->i_ctime) = src->o_ctime; - if (valid & OBD_MD_FLSIZE) - i_size_write(dst, src->o_size); - if (valid & OBD_MD_FLBLOCKS) { /* allocation of space */ - dst->i_blocks = src->o_blocks; - if (dst->i_blocks < src->o_blocks) /* overflow */ - dst->i_blocks = -1; - - } - if (valid & OBD_MD_FLBLKSZ) { - dst->i_blkbits = ffs(src->o_blksize)-1; -#ifdef HAVE_INODE_BLKSIZE - dst->i_blksize = src->o_blksize; -#endif - } - if (valid & OBD_MD_FLTYPE) - dst->i_mode = (dst->i_mode & ~S_IFMT) | (src->o_mode & S_IFMT); - if (valid & OBD_MD_FLMODE) - dst->i_mode = (dst->i_mode & S_IFMT) | (src->o_mode & ~S_IFMT); - if (valid & OBD_MD_FLUID) - dst->i_uid = src->o_uid; - if (valid & OBD_MD_FLGID) - dst->i_gid = src->o_gid; - if (valid & OBD_MD_FLFLAGS) - dst->i_flags = src->o_flags; - if (valid & OBD_MD_FLGENER) - dst->i_generation = src->o_generation; -} -EXPORT_SYMBOL(obdo_to_inode); -#endif - diff --git a/lustre/obdclass/linux/linux-sysctl.c b/lustre/obdclass/linux/linux-sysctl.c deleted file mode 100644 index 0f860c3c9b..0000000000 --- a/lustre/obdclass/linux/linux-sysctl.c +++ /dev/null @@ -1,348 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001, 2002 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - */ - -#include <linux/module.h> -#include <linux/autoconf.h> -#include <linux/sysctl.h> -#include <linux/sched.h> -#include <linux/mm.h> -#include <linux/sysctl.h> -#include <linux/version.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include <linux/swapctl.h> -#endif -#include <linux/proc_fs.h> -#include <linux/slab.h> -#include <linux/stat.h> -#include <linux/ctype.h> -#include <asm/bitops.h> -#include <asm/uaccess.h> -#include <linux/utsname.h> - -#define DEBUG_SUBSYSTEM S_CLASS - -#include <obd_support.h> -#include <lprocfs_status.h> - -cfs_sysctl_table_header_t *obd_table_header = NULL; - -#define OBD_SYSCTL 300 - -enum { - OBD_FAIL_LOC = 1, /* control test failures instrumentation */ - OBD_FAIL_VAL, /* userdata for fail loc */ - OBD_TIMEOUT, /* RPC timeout before recovery/intr */ - OBD_DUMP_ON_TIMEOUT, /* dump kernel debug log upon eviction */ - OBD_MEMUSED, /* bytes currently OBD_ALLOCated */ - OBD_PAGESUSED, /* pages currently OBD_PAGE_ALLOCated */ - OBD_MAXMEMUSED, /* maximum bytes OBD_ALLOCated concurrently */ - OBD_MAXPAGESUSED, /* maximum pages OBD_PAGE_ALLOCated concurrently */ - OBD_SYNCFILTER, /* XXX temporary, as we play with sync osts.. */ - OBD_LDLM_TIMEOUT, /* LDLM timeout for ASTs before client eviction */ - OBD_DUMP_ON_EVICTION, /* dump kernel debug log upon eviction */ - OBD_DEBUG_PEER_ON_TIMEOUT, /* dump peer debug when RPC times out */ - OBD_ALLOC_FAIL_RATE, /* memory allocation random failure rate */ -}; - -int LL_PROC_PROTO(proc_fail_loc) -{ - int rc; - int old_fail_loc = obd_fail_loc; - - rc = ll_proc_dointvec(table, write, filp, buffer, lenp, ppos); - if (old_fail_loc != obd_fail_loc) - wake_up(&obd_race_waitq); - return rc; -} - -int LL_PROC_PROTO(proc_set_timeout) -{ - int rc; - - rc = ll_proc_dointvec(table, write, filp, buffer, lenp, ppos); - if (ldlm_timeout >= obd_timeout) - ldlm_timeout = max(obd_timeout / 3, 1U); - return rc; -} - -#ifdef RANDOM_FAIL_ALLOC -int LL_PROC_PROTO(proc_alloc_fail_rate) -{ - int rc = 0; - DECLARE_LL_PROC_PPOS_DECL; - - if (!table->data || !table->maxlen || !*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) { - rc = lprocfs_write_frac_helper(buffer, *lenp, - (unsigned int*)table->data, - OBD_ALLOC_FAIL_MULT); - } else { - char buf[21]; - int len; - - len = lprocfs_read_frac_helper(buf, sizeof(buf), - *(unsigned int*)table->data, - OBD_ALLOC_FAIL_MULT); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - } - *ppos += *lenp; - return rc; -} -#endif - -int LL_PROC_PROTO(proc_memory_alloc) -{ - char buf[22]; - int len; - DECLARE_LL_PROC_PPOS_DECL; - - if (!*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) - return -EINVAL; - - len = snprintf(buf, sizeof(buf), LPU64"\n", obd_memory_sum()); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - *ppos += *lenp; - return 0; -} - -int LL_PROC_PROTO(proc_pages_alloc) -{ - char buf[22]; - int len; - DECLARE_LL_PROC_PPOS_DECL; - - if (!*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) - return -EINVAL; - - len = snprintf(buf, sizeof(buf), LPU64"\n", obd_pages_sum()); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - *ppos += *lenp; - return 0; -} - -int LL_PROC_PROTO(proc_mem_max) -{ - char buf[22]; - int len; - DECLARE_LL_PROC_PPOS_DECL; - - if (!*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) - return -EINVAL; - - len = snprintf(buf, sizeof(buf), LPU64"\n", obd_memory_max()); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - *ppos += *lenp; - return 0; -} - -int LL_PROC_PROTO(proc_pages_max) -{ - char buf[22]; - int len; - DECLARE_LL_PROC_PPOS_DECL; - - if (!*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) - return -EINVAL; - - len = snprintf(buf, sizeof(buf), LPU64"\n", obd_pages_max()); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - *ppos += *lenp; - return 0; -} - -static cfs_sysctl_table_t obd_table[] = { - { - .ctl_name = OBD_FAIL_LOC, - .procname = "fail_loc", - .data = &obd_fail_loc, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_fail_loc - }, - { - .ctl_name = OBD_FAIL_VAL, - .procname = "fail_val", - .data = &obd_fail_val, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, - { - .ctl_name = OBD_TIMEOUT, - .procname = "timeout", - .data = &obd_timeout, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_set_timeout - }, - { - .ctl_name = OBD_DEBUG_PEER_ON_TIMEOUT, - .procname = "debug_peer_on_timeout", - .data = &obd_debug_peer_on_timeout, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, - { - .ctl_name = OBD_DUMP_ON_TIMEOUT, - .procname = "dump_on_timeout", - .data = &obd_dump_on_timeout, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, - { - .ctl_name = OBD_DUMP_ON_EVICTION, - .procname = "dump_on_eviction", - .data = &obd_dump_on_eviction, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, - { - .ctl_name = OBD_MEMUSED, - .procname = "memused", - .data = NULL, - .maxlen = 0, - .mode = 0444, - .proc_handler = &proc_memory_alloc - }, - { - .ctl_name = OBD_PAGESUSED, - .procname = "pagesused", - .data = NULL, - .maxlen = 0, - .mode = 0444, - .proc_handler = &proc_pages_alloc - }, - { - .ctl_name = OBD_MAXMEMUSED, - .procname = "memused_max", - .data = NULL, - .maxlen = 0, - .mode = 0444, - .proc_handler = &proc_mem_max - }, - { - .ctl_name = OBD_MAXPAGESUSED, - .procname = "pagesused_max", - .data = NULL, - .maxlen = 0, - .mode = 0444, - .proc_handler = &proc_pages_max - }, - { - .ctl_name = OBD_LDLM_TIMEOUT, - .procname = "ldlm_timeout", - .data = &ldlm_timeout, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_set_timeout - }, -#ifdef RANDOM_FAIL_ALLOC - { - .ctl_name = OBD_ALLOC_FAIL_RATE, - .procname = "alloc_fail_rate", - .data = &obd_alloc_fail_rate, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_alloc_fail_rate - }, -#endif - { 0 } -}; - -static cfs_sysctl_table_t parent_table[] = { - { - .ctl_name = OBD_SYSCTL, - .procname = "lustre", - .data = NULL, - .maxlen = 0, - .mode = 0555, - .child = obd_table - }, - {0} -}; - -void obd_sysctl_init (void) -{ -#ifdef CONFIG_SYSCTL - if ( !obd_table_header ) - obd_table_header = cfs_register_sysctl_table(parent_table, 0); -#endif -} - -void obd_sysctl_clean (void) -{ -#ifdef CONFIG_SYSCTL - if ( obd_table_header ) - cfs_unregister_sysctl_table(obd_table_header); - obd_table_header = NULL; -#endif -} diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c deleted file mode 100644 index 977b489367..0000000000 --- a/lustre/obdclass/llog.c +++ /dev/null @@ -1,424 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - * OST<->MDS recovery logging infrastructure. - * - * Invariants in implementation: - * - we do not share logs among different OST<->MDS connections, so that - * if an OST or MDS fails it need only look at log(s) relevant to itself - */ - -#define DEBUG_SUBSYSTEM S_LOG - -#ifndef EXPORT_SYMTAB -#define EXPORT_SYMTAB -#endif - -#ifndef __KERNEL__ -#include <liblustre.h> -#endif - -#include <obd_class.h> -#include <lustre_log.h> -#include <libcfs/list.h> - -/* Allocate a new log or catalog handle */ -struct llog_handle *llog_alloc_handle(void) -{ - struct llog_handle *loghandle; - ENTRY; - - OBD_ALLOC(loghandle, sizeof(*loghandle)); - if (loghandle == NULL) - RETURN(ERR_PTR(-ENOMEM)); - - init_rwsem(&loghandle->lgh_lock); - - RETURN(loghandle); -} -EXPORT_SYMBOL(llog_alloc_handle); - - -void llog_free_handle(struct llog_handle *loghandle) -{ - if (!loghandle) - return; - - if (!loghandle->lgh_hdr) - goto out; - if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN) - list_del_init(&loghandle->u.phd.phd_entry); - if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) - LASSERT(list_empty(&loghandle->u.chd.chd_head)); - OBD_FREE(loghandle->lgh_hdr, LLOG_CHUNK_SIZE); - - out: - OBD_FREE(loghandle, sizeof(*loghandle)); -} -EXPORT_SYMBOL(llog_free_handle); - -/* returns negative on error; 0 if success; 1 if success & log destroyed */ -int llog_cancel_rec(struct llog_handle *loghandle, int index) -{ - struct llog_log_hdr *llh = loghandle->lgh_hdr; - int rc = 0; - ENTRY; - - CDEBUG(D_RPCTRACE, "canceling %d in log "LPX64"\n", - index, loghandle->lgh_id.lgl_oid); - - if (index == 0) { - CERROR("cannot cancel index 0 (which is header)\n"); - RETURN(-EINVAL); - } - - if (!ext2_clear_bit(index, llh->llh_bitmap)) { - CDEBUG(D_RPCTRACE, "catalog index %u already clear?\n", index); - RETURN(-EINVAL); - } - - llh->llh_count--; - - if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY) && - (llh->llh_count == 1) && - (loghandle->lgh_last_idx == (LLOG_BITMAP_BYTES * 8) - 1)) { - rc = llog_destroy(loghandle); - if (rc) { - CERROR("failure destroying log after last cancel: %d\n", - rc); - ext2_set_bit(index, llh->llh_bitmap); - llh->llh_count++; - } else { - rc = 1; - } - RETURN(rc); - } - - rc = llog_write_rec(loghandle, &llh->llh_hdr, NULL, 0, NULL, 0); - if (rc) { - CERROR("failure re-writing header %d\n", rc); - ext2_set_bit(index, llh->llh_bitmap); - llh->llh_count++; - } - RETURN(rc); -} -EXPORT_SYMBOL(llog_cancel_rec); - -int llog_init_handle(struct llog_handle *handle, int flags, - struct obd_uuid *uuid) -{ - int rc; - struct llog_log_hdr *llh; - ENTRY; - LASSERT(handle->lgh_hdr == NULL); - - OBD_ALLOC(llh, sizeof(*llh)); - if (llh == NULL) - RETURN(-ENOMEM); - handle->lgh_hdr = llh; - /* first assign flags to use llog_client_ops */ - llh->llh_flags = flags; - rc = llog_read_header(handle); - if (rc == 0) { - flags = llh->llh_flags; - if (uuid && !obd_uuid_equals(uuid, &llh->llh_tgtuuid)) { - CERROR("uuid mismatch: %s/%s\n", (char *)uuid->uuid, - (char *)llh->llh_tgtuuid.uuid); - rc = -EEXIST; - } - GOTO(out, rc); - } else if (rc != LLOG_EEMPTY || !flags) { - /* set a pesudo flag for initialization */ - flags = LLOG_F_IS_CAT; - GOTO(out, rc); - } - rc = 0; - - handle->lgh_last_idx = 0; /* header is record with index 0 */ - llh->llh_count = 1; /* for the header record */ - llh->llh_hdr.lrh_type = LLOG_HDR_MAGIC; - llh->llh_hdr.lrh_len = llh->llh_tail.lrt_len = LLOG_CHUNK_SIZE; - llh->llh_hdr.lrh_index = llh->llh_tail.lrt_index = 0; - llh->llh_timestamp = CURRENT_SECONDS; - if (uuid) - memcpy(&llh->llh_tgtuuid, uuid, sizeof(llh->llh_tgtuuid)); - llh->llh_bitmap_offset = offsetof(typeof(*llh),llh_bitmap); - ext2_set_bit(0, llh->llh_bitmap); - -out: - if (flags & LLOG_F_IS_CAT) { - CFS_INIT_LIST_HEAD(&handle->u.chd.chd_head); - llh->llh_size = sizeof(struct llog_logid_rec); - } else if (flags & LLOG_F_IS_PLAIN) { - CFS_INIT_LIST_HEAD(&handle->u.phd.phd_entry); - } else { - CERROR("Unknown flags: %#x (Expected %#x or %#x\n", - flags, LLOG_F_IS_CAT, LLOG_F_IS_PLAIN); - LBUG(); - } - - if (rc) { - OBD_FREE(llh, sizeof(*llh)); - handle->lgh_hdr = NULL; - } - RETURN(rc); -} -EXPORT_SYMBOL(llog_init_handle); - -int llog_close(struct llog_handle *loghandle) -{ - struct llog_operations *lop; - int rc; - ENTRY; - - rc = llog_handle2ops(loghandle, &lop); - if (rc) - GOTO(out, rc); - if (lop->lop_close == NULL) - GOTO(out, -EOPNOTSUPP); - rc = lop->lop_close(loghandle); - out: - llog_free_handle(loghandle); - RETURN(rc); -} -EXPORT_SYMBOL(llog_close); - -int llog_process(struct llog_handle *loghandle, llog_cb_t cb, - void *data, void *catdata) -{ - struct llog_log_hdr *llh = loghandle->lgh_hdr; - struct llog_process_cat_data *cd = catdata; - char *buf; - __u64 cur_offset = LLOG_CHUNK_SIZE, last_offset; - int rc = 0, index = 1, last_index; - int saved_index = 0, last_called_index = 0; - ENTRY; - - LASSERT(llh); - - OBD_ALLOC(buf, LLOG_CHUNK_SIZE); - if (!buf) - RETURN(-ENOMEM); - - if (cd != NULL) { - last_called_index = cd->first_idx; - index = cd->first_idx + 1; - } - if (cd != NULL && cd->last_idx) - last_index = cd->last_idx; - else - last_index = LLOG_BITMAP_BYTES * 8 - 1; - - while (rc == 0) { - struct llog_rec_hdr *rec; - - /* skip records not set in bitmap */ - while (index <= last_index && - !ext2_test_bit(index, llh->llh_bitmap)) - ++index; - - LASSERT(index <= last_index + 1); - if (index == last_index + 1) - break; - - CDEBUG(D_OTHER, "index: %d last_index %d\n", - index, last_index); - - /* get the buf with our target record; avoid old garbage */ - last_offset = cur_offset; - rc = llog_next_block(loghandle, &saved_index, index, - &cur_offset, buf, LLOG_CHUNK_SIZE); - if (rc) - GOTO(out, rc); - - /* NB: when rec->lrh_len is accessed it is already swabbed - * since it is used at the "end" of the loop and the rec - * swabbing is done at the beginning of the loop. */ - for (rec = (struct llog_rec_hdr *)buf; - (char *)rec < buf + LLOG_CHUNK_SIZE; - rec = (struct llog_rec_hdr *)((char *)rec + rec->lrh_len)){ - - CDEBUG(D_OTHER, "processing rec 0x%p type %#x\n", - rec, rec->lrh_type); - - if (LLOG_REC_HDR_NEEDS_SWABBING(rec)) - lustre_swab_llog_rec(rec, NULL); - - CDEBUG(D_OTHER, "after swabbing, type=%#x idx=%d\n", - rec->lrh_type, rec->lrh_index); - - if (rec->lrh_index == 0) - GOTO(out, 0); /* no more records */ - - if (rec->lrh_len == 0 || rec->lrh_len >LLOG_CHUNK_SIZE){ - CWARN("invalid length %d in llog record for " - "index %d/%d\n", rec->lrh_len, - rec->lrh_index, index); - GOTO(out, rc = -EINVAL); - } - - if (rec->lrh_index < index) { - CDEBUG(D_OTHER, "skipping lrh_index %d\n", - rec->lrh_index); - continue; - } - - CDEBUG(D_OTHER, - "lrh_index: %d lrh_len: %d (%d remains)\n", - rec->lrh_index, rec->lrh_len, - (int)(buf + LLOG_CHUNK_SIZE - (char *)rec)); - - loghandle->lgh_cur_idx = rec->lrh_index; - loghandle->lgh_cur_offset = (char *)rec - (char *)buf + - last_offset; - - /* if set, process the callback on this record */ - if (ext2_test_bit(index, llh->llh_bitmap)) { - rc = cb(loghandle, rec, data); - last_called_index = index; - if (rc == LLOG_PROC_BREAK) { - CDEBUG(D_HA, "recovery from log: "LPX64 - ":%x stopped\n", - loghandle->lgh_id.lgl_oid, - loghandle->lgh_id.lgl_ogen); - GOTO(out, rc); - } else if (rc == LLOG_DEL_RECORD) { - llog_cancel_rec(loghandle, rec->lrh_index); - rc = 0; - } - if (rc) - GOTO(out, rc); - } else { - CDEBUG(D_OTHER, "Skipped index %d\n", index); - } - - /* next record, still in buffer? */ - ++index; - if (index > last_index) - GOTO(out, rc = 0); - } - } - - out: - if (cd != NULL) - cd->last_idx = last_called_index; - if (buf) - OBD_FREE(buf, LLOG_CHUNK_SIZE); - RETURN(rc); -} -EXPORT_SYMBOL(llog_process); - -inline int llog_get_size(struct llog_handle *loghandle) -{ - if (loghandle && loghandle->lgh_hdr) - return loghandle->lgh_hdr->llh_count; - return 0; -} -EXPORT_SYMBOL(llog_get_size); - -int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb, - void *data, void *catdata) -{ - struct llog_log_hdr *llh = loghandle->lgh_hdr; - struct llog_process_cat_data *cd = catdata; - void *buf; - int rc = 0, first_index = 1, index, idx; - ENTRY; - - OBD_ALLOC(buf, LLOG_CHUNK_SIZE); - if (!buf) - RETURN(-ENOMEM); - - if (cd != NULL) - first_index = cd->first_idx + 1; - if (cd != NULL && cd->last_idx) - index = cd->last_idx; - else - index = LLOG_BITMAP_BYTES * 8 - 1; - - while (rc == 0) { - struct llog_rec_hdr *rec; - struct llog_rec_tail *tail; - - /* skip records not set in bitmap */ - while (index >= first_index && - !ext2_test_bit(index, llh->llh_bitmap)) - --index; - - LASSERT(index >= first_index - 1); - if (index == first_index - 1) - break; - - /* get the buf with our target record; avoid old garbage */ - memset(buf, 0, LLOG_CHUNK_SIZE); - rc = llog_prev_block(loghandle, index, buf, LLOG_CHUNK_SIZE); - if (rc) - GOTO(out, rc); - - rec = buf; - idx = le32_to_cpu(rec->lrh_index); - if (idx < index) - CDEBUG(D_RPCTRACE, "index %u : idx %u\n", index, idx); - while (idx < index) { - rec = ((void *)rec + le32_to_cpu(rec->lrh_len)); - idx ++; - } - tail = (void *)rec + le32_to_cpu(rec->lrh_len) - sizeof(*tail); - - /* process records in buffer, starting where we found one */ - while ((void *)tail > buf) { - rec = (void *)tail - le32_to_cpu(tail->lrt_len) + - sizeof(*tail); - - if (rec->lrh_index == 0) - GOTO(out, 0); /* no more records */ - - /* if set, process the callback on this record */ - if (ext2_test_bit(index, llh->llh_bitmap)) { - rc = cb(loghandle, rec, data); - if (rc == LLOG_PROC_BREAK) { - CWARN("recovery from log: "LPX64":%x" - " stopped\n", - loghandle->lgh_id.lgl_oid, - loghandle->lgh_id.lgl_ogen); - GOTO(out, rc); - } - if (rc) - GOTO(out, rc); - } - - /* previous record, still in buffer? */ - --index; - if (index < first_index) - GOTO(out, rc = 0); - tail = (void *)rec - sizeof(*tail); - } - } - -out: - if (buf) - OBD_FREE(buf, LLOG_CHUNK_SIZE); - RETURN(rc); -} -EXPORT_SYMBOL(llog_reverse_process); diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c deleted file mode 100644 index 6cb3175295..0000000000 --- a/lustre/obdclass/llog_cat.c +++ /dev/null @@ -1,539 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - * OST<->MDS recovery logging infrastructure. - * - * Invariants in implementation: - * - we do not share logs among different OST<->MDS connections, so that - * if an OST or MDS fails it need only look at log(s) relevant to itself - */ - -#define DEBUG_SUBSYSTEM S_LOG - -#ifndef EXPORT_SYMTAB -#define EXPORT_SYMTAB -#endif - -#ifndef __KERNEL__ -#include <liblustre.h> -#endif - -#include <obd_class.h> -#include <lustre_log.h> -#include <libcfs/list.h> - -/* Create a new log handle and add it to the open list. - * This log handle will be closed when all of the records in it are removed. - * - * Assumes caller has already pushed us into the kernel context and is locking. - */ -static struct llog_handle *llog_cat_new_log(struct llog_handle *cathandle) -{ - struct llog_handle *loghandle; - struct llog_log_hdr *llh; - struct llog_logid_rec rec = { { 0 }, }; - int rc, index, bitmap_size; - ENTRY; - - llh = cathandle->lgh_hdr; - bitmap_size = LLOG_BITMAP_SIZE(llh); - - index = (cathandle->lgh_last_idx + 1) % bitmap_size; - - /* maximum number of available slots in catlog is bitmap_size - 2 */ - if (llh->llh_cat_idx == index) { - CERROR("no free catalog slots for log...\n"); - RETURN(ERR_PTR(-ENOSPC)); - } - - if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_LLOG_CREATE_FAILED)) - RETURN(ERR_PTR(-ENOSPC)); - - rc = llog_create(cathandle->lgh_ctxt, &loghandle, NULL, NULL); - if (rc) - RETURN(ERR_PTR(rc)); - - rc = llog_init_handle(loghandle, - LLOG_F_IS_PLAIN | LLOG_F_ZAP_WHEN_EMPTY, - &cathandle->lgh_hdr->llh_tgtuuid); - if (rc) - GOTO(out_destroy, rc); - if (index == 0) - index = 1; - if (ext2_set_bit(index, llh->llh_bitmap)) { - CERROR("argh, index %u already set in log bitmap?\n", - index); - LBUG(); /* should never happen */ - } - cathandle->lgh_last_idx = index; - llh->llh_count++; - llh->llh_tail.lrt_index = index; - - CDEBUG(D_RPCTRACE,"new recovery log "LPX64":%x for index %u of catalog " - LPX64"\n", loghandle->lgh_id.lgl_oid, loghandle->lgh_id.lgl_ogen, - index, cathandle->lgh_id.lgl_oid); - /* build the record for this log in the catalog */ - rec.lid_hdr.lrh_len = sizeof(rec); - rec.lid_hdr.lrh_index = index; - rec.lid_hdr.lrh_type = LLOG_LOGID_MAGIC; - rec.lid_id = loghandle->lgh_id; - rec.lid_tail.lrt_len = sizeof(rec); - rec.lid_tail.lrt_index = index; - - /* update the catalog: header and record */ - rc = llog_write_rec(cathandle, &rec.lid_hdr, - &loghandle->u.phd.phd_cookie, 1, NULL, index); - if (rc < 0) { - GOTO(out_destroy, rc); - } - - loghandle->lgh_hdr->llh_cat_idx = index; - cathandle->u.chd.chd_current_log = loghandle; - LASSERT(list_empty(&loghandle->u.phd.phd_entry)); - list_add_tail(&loghandle->u.phd.phd_entry, &cathandle->u.chd.chd_head); - - out_destroy: - if (rc < 0) - llog_destroy(loghandle); - - RETURN(loghandle); -} -EXPORT_SYMBOL(llog_cat_new_log); - -/* Open an existent log handle and add it to the open list. - * This log handle will be closed when all of the records in it are removed. - * - * Assumes caller has already pushed us into the kernel context and is locking. - * We return a lock on the handle to ensure nobody yanks it from us. - */ -int llog_cat_id2handle(struct llog_handle *cathandle, struct llog_handle **res, - struct llog_logid *logid) -{ - struct llog_handle *loghandle; - int rc = 0; - ENTRY; - - if (cathandle == NULL) - RETURN(-EBADF); - - list_for_each_entry(loghandle, &cathandle->u.chd.chd_head, - u.phd.phd_entry) { - struct llog_logid *cgl = &loghandle->lgh_id; - if (cgl->lgl_oid == logid->lgl_oid) { - if (cgl->lgl_ogen != logid->lgl_ogen) { - CERROR("log "LPX64" generation %x != %x\n", - logid->lgl_oid, cgl->lgl_ogen, - logid->lgl_ogen); - continue; - } - loghandle->u.phd.phd_cat_handle = cathandle; - GOTO(out, rc = 0); - } - } - - rc = llog_create(cathandle->lgh_ctxt, &loghandle, logid, NULL); - if (rc) { - CERROR("error opening log id "LPX64":%x: rc %d\n", - logid->lgl_oid, logid->lgl_ogen, rc); - } else { - rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL); - if (!rc) { - list_add(&loghandle->u.phd.phd_entry, - &cathandle->u.chd.chd_head); - } - } - if (!rc) { - loghandle->u.phd.phd_cat_handle = cathandle; - loghandle->u.phd.phd_cookie.lgc_lgl = cathandle->lgh_id; - loghandle->u.phd.phd_cookie.lgc_index = - loghandle->lgh_hdr->llh_cat_idx; - } - -out: - *res = loghandle; - RETURN(rc); -} - -int llog_cat_put(struct llog_handle *cathandle) -{ - struct llog_handle *loghandle, *n; - int rc; - ENTRY; - - list_for_each_entry_safe(loghandle, n, &cathandle->u.chd.chd_head, - u.phd.phd_entry) { - int err = llog_close(loghandle); - if (err) - CERROR("error closing loghandle\n"); - } - rc = llog_close(cathandle); - RETURN(rc); -} -EXPORT_SYMBOL(llog_cat_put); - -/* Return the currently active log handle. If the current log handle doesn't - * have enough space left for the current record, start a new one. - * - * If reclen is 0, we only want to know what the currently active log is, - * otherwise we get a lock on this log so nobody can steal our space. - * - * Assumes caller has already pushed us into the kernel context and is locking. - * - * NOTE: loghandle is write-locked upon successful return - */ -static struct llog_handle *llog_cat_current_log(struct llog_handle *cathandle, - int create) -{ - struct llog_handle *loghandle = NULL; - ENTRY; - - down_read(&cathandle->lgh_lock); - loghandle = cathandle->u.chd.chd_current_log; - if (loghandle) { - struct llog_log_hdr *llh = loghandle->lgh_hdr; - down_write(&loghandle->lgh_lock); - if (loghandle->lgh_last_idx < LLOG_BITMAP_SIZE(llh) - 1) { - up_read(&cathandle->lgh_lock); - RETURN(loghandle); - } else { - up_write(&loghandle->lgh_lock); - } - } - if (!create) { - if (loghandle) - down_write(&loghandle->lgh_lock); - up_read(&cathandle->lgh_lock); - RETURN(loghandle); - } - up_read(&cathandle->lgh_lock); - - /* time to create new log */ - - /* first, we have to make sure the state hasn't changed */ - down_write(&cathandle->lgh_lock); - loghandle = cathandle->u.chd.chd_current_log; - if (loghandle) { - struct llog_log_hdr *llh = loghandle->lgh_hdr; - down_write(&loghandle->lgh_lock); - if (loghandle->lgh_last_idx < LLOG_BITMAP_SIZE(llh) - 1) { - up_write(&cathandle->lgh_lock); - RETURN(loghandle); - } else { - up_write(&loghandle->lgh_lock); - } - } - - CDEBUG(D_INODE, "creating new log\n"); - loghandle = llog_cat_new_log(cathandle); - if (!IS_ERR(loghandle)) - down_write(&loghandle->lgh_lock); - up_write(&cathandle->lgh_lock); - RETURN(loghandle); -} - -/* Add a single record to the recovery log(s) using a catalog - * Returns as llog_write_record - * - * Assumes caller has already pushed us into the kernel context. - */ -int llog_cat_add_rec(struct llog_handle *cathandle, struct llog_rec_hdr *rec, - struct llog_cookie *reccookie, void *buf) -{ - struct llog_handle *loghandle; - int rc; - ENTRY; - - LASSERT(rec->lrh_len <= LLOG_CHUNK_SIZE); - loghandle = llog_cat_current_log(cathandle, 1); - if (IS_ERR(loghandle)) - RETURN(PTR_ERR(loghandle)); - /* loghandle is already locked by llog_cat_current_log() for us */ - rc = llog_write_rec(loghandle, rec, reccookie, 1, buf, -1); - up_write(&loghandle->lgh_lock); - if (rc == -ENOSPC) { - /* to create a new plain log */ - loghandle = llog_cat_current_log(cathandle, 1); - if (IS_ERR(loghandle)) - RETURN(PTR_ERR(loghandle)); - rc = llog_write_rec(loghandle, rec, reccookie, 1, buf, -1); - up_write(&loghandle->lgh_lock); - } - - RETURN(rc); -} -EXPORT_SYMBOL(llog_cat_add_rec); - -/* For each cookie in the cookie array, we clear the log in-use bit and either: - * - the log is empty, so mark it free in the catalog header and delete it - * - the log is not empty, just write out the log header - * - * The cookies may be in different log files, so we need to get new logs - * each time. - * - * Assumes caller has already pushed us into the kernel context. - */ -int llog_cat_cancel_records(struct llog_handle *cathandle, int count, - struct llog_cookie *cookies) -{ - int i, index, rc = 0; - ENTRY; - - down_write(&cathandle->lgh_lock); - for (i = 0; i < count; i++, cookies++) { - struct llog_handle *loghandle; - struct llog_logid *lgl = &cookies->lgc_lgl; - - rc = llog_cat_id2handle(cathandle, &loghandle, lgl); - if (rc) { - CERROR("Cannot find log "LPX64"\n", lgl->lgl_oid); - break; - } - - down_write(&loghandle->lgh_lock); - rc = llog_cancel_rec(loghandle, cookies->lgc_index); - up_write(&loghandle->lgh_lock); - - if (rc == 1) { /* log has been destroyed */ - index = loghandle->u.phd.phd_cookie.lgc_index; - if (cathandle->u.chd.chd_current_log == loghandle) - cathandle->u.chd.chd_current_log = NULL; - llog_free_handle(loghandle); - - LASSERT(index); - llog_cat_set_first_idx(cathandle, index); - rc = llog_cancel_rec(cathandle, index); - if (rc == 0) - CDEBUG(D_RPCTRACE,"cancel plain log at index %u" - " of catalog "LPX64"\n", - index, cathandle->lgh_id.lgl_oid); - } - } - up_write(&cathandle->lgh_lock); - - RETURN(rc); -} -EXPORT_SYMBOL(llog_cat_cancel_records); - -int llog_cat_process_cb(struct llog_handle *cat_llh, struct llog_rec_hdr *rec, - void *data) -{ - struct llog_process_data *d = data; - struct llog_logid_rec *lir = (struct llog_logid_rec *)rec; - struct llog_handle *llh; - int rc; - - ENTRY; - if (rec->lrh_type != LLOG_LOGID_MAGIC) { - CERROR("invalid record in catalog\n"); - RETURN(-EINVAL); - } - CDEBUG(D_HA, "processing log "LPX64":%x at index %u of catalog " - LPX64"\n", lir->lid_id.lgl_oid, lir->lid_id.lgl_ogen, - rec->lrh_index, cat_llh->lgh_id.lgl_oid); - - rc = llog_cat_id2handle(cat_llh, &llh, &lir->lid_id); - if (rc) { - CERROR("Cannot find handle for log "LPX64"\n", - lir->lid_id.lgl_oid); - RETURN(rc); - } - - rc = llog_process(llh, d->lpd_cb, d->lpd_data, NULL); - RETURN(rc); -} - -int llog_cat_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data) -{ - struct llog_process_data d; - struct llog_process_cat_data cd; - struct llog_log_hdr *llh = cat_llh->lgh_hdr; - int rc; - ENTRY; - - LASSERT(llh->llh_flags & LLOG_F_IS_CAT); - d.lpd_data = data; - d.lpd_cb = cb; - - if (llh->llh_cat_idx > cat_llh->lgh_last_idx) { - CWARN("catlog "LPX64" crosses index zero\n", - cat_llh->lgh_id.lgl_oid); - - cd.first_idx = llh->llh_cat_idx; - cd.last_idx = 0; - rc = llog_process(cat_llh, llog_cat_process_cb, &d, &cd); - if (rc != 0) - RETURN(rc); - - cd.first_idx = 0; - cd.last_idx = cat_llh->lgh_last_idx; - rc = llog_process(cat_llh, llog_cat_process_cb, &d, &cd); - } else { - rc = llog_process(cat_llh, llog_cat_process_cb, &d, NULL); - } - - RETURN(rc); -} -EXPORT_SYMBOL(llog_cat_process); - -static int llog_cat_reverse_process_cb(struct llog_handle *cat_llh, - struct llog_rec_hdr *rec, void *data) -{ - struct llog_process_data *d = data; - struct llog_logid_rec *lir = (struct llog_logid_rec *)rec; - struct llog_handle *llh; - int rc; - - if (le32_to_cpu(rec->lrh_type) != LLOG_LOGID_MAGIC) { - CERROR("invalid record in catalog\n"); - RETURN(-EINVAL); - } - CDEBUG(D_HA, "processing log "LPX64":%x at index %u of catalog " - LPX64"\n", lir->lid_id.lgl_oid, lir->lid_id.lgl_ogen, - le32_to_cpu(rec->lrh_index), cat_llh->lgh_id.lgl_oid); - - rc = llog_cat_id2handle(cat_llh, &llh, &lir->lid_id); - if (rc) { - CERROR("Cannot find handle for log "LPX64"\n", - lir->lid_id.lgl_oid); - RETURN(rc); - } - - rc = llog_reverse_process(llh, d->lpd_cb, d->lpd_data, NULL); - RETURN(rc); -} - -int llog_cat_reverse_process(struct llog_handle *cat_llh, - llog_cb_t cb, void *data) -{ - struct llog_process_data d; - struct llog_process_cat_data cd; - struct llog_log_hdr *llh = cat_llh->lgh_hdr; - int rc; - ENTRY; - - LASSERT(llh->llh_flags & LLOG_F_IS_CAT); - d.lpd_data = data; - d.lpd_cb = cb; - - if (llh->llh_cat_idx > cat_llh->lgh_last_idx) { - CWARN("catalog "LPX64" crosses index zero\n", - cat_llh->lgh_id.lgl_oid); - - cd.first_idx = 0; - cd.last_idx = cat_llh->lgh_last_idx; - rc = llog_reverse_process(cat_llh, llog_cat_reverse_process_cb, - &d, &cd); - if (rc != 0) - RETURN(rc); - - cd.first_idx = le32_to_cpu(llh->llh_cat_idx); - cd.last_idx = 0; - rc = llog_reverse_process(cat_llh, llog_cat_reverse_process_cb, - &d, &cd); - } else { - rc = llog_reverse_process(cat_llh, llog_cat_reverse_process_cb, - &d, NULL); - } - - RETURN(rc); -} -EXPORT_SYMBOL(llog_cat_reverse_process); - -int llog_cat_set_first_idx(struct llog_handle *cathandle, int index) -{ - struct llog_log_hdr *llh = cathandle->lgh_hdr; - int i, bitmap_size, idx; - ENTRY; - - bitmap_size = LLOG_BITMAP_SIZE(llh); - if (llh->llh_cat_idx == (index - 1)) { - idx = llh->llh_cat_idx + 1; - llh->llh_cat_idx = idx; - if (idx == cathandle->lgh_last_idx) - goto out; - for (i = (index + 1) % bitmap_size; - i != cathandle->lgh_last_idx; - i = (i + 1) % bitmap_size) { - if (!ext2_test_bit(i, llh->llh_bitmap)) { - idx = llh->llh_cat_idx + 1; - llh->llh_cat_idx = idx; - } else if (i == 0) { - llh->llh_cat_idx = 0; - } else { - break; - } - } -out: - CDEBUG(D_RPCTRACE, "set catlog "LPX64" first idx %u\n", - cathandle->lgh_id.lgl_oid, llh->llh_cat_idx); - } - - RETURN(0); -} - -#if 0 -/* Assumes caller has already pushed us into the kernel context. */ -int llog_cat_init(struct llog_handle *cathandle, struct obd_uuid *tgtuuid) -{ - struct llog_log_hdr *llh; - loff_t offset = 0; - int rc = 0; - ENTRY; - - LASSERT(sizeof(*llh) == LLOG_CHUNK_SIZE); - - down(&cathandle->lgh_lock); - llh = cathandle->lgh_hdr; - - if (i_size_read(cathandle->lgh_file->f_dentry->d_inode) == 0) { - llog_write_rec(cathandle, &llh->llh_hdr, NULL, 0, NULL, 0); - -write_hdr: - rc = lustre_fwrite(cathandle->lgh_file, llh, LLOG_CHUNK_SIZE, - &offset); - if (rc != LLOG_CHUNK_SIZE) { - CERROR("error writing catalog header: rc %d\n", rc); - OBD_FREE(llh, sizeof(*llh)); - if (rc >= 0) - rc = -ENOSPC; - } else - rc = 0; - } else { - rc = lustre_fread(cathandle->lgh_file, llh, LLOG_CHUNK_SIZE, - &offset); - if (rc != LLOG_CHUNK_SIZE) { - CERROR("error reading catalog header: rc %d\n", rc); - /* Can we do much else if the header is bad? */ - goto write_hdr; - } else - rc = 0; - } - - cathandle->lgh_tgtuuid = &llh->llh_tgtuuid; - up(&cathandle->lgh_lock); - RETURN(rc); -} -EXPORT_SYMBOL(llog_cat_init); - -#endif diff --git a/lustre/obdclass/llog_internal.h b/lustre/obdclass/llog_internal.h deleted file mode 100644 index d4be19c282..0000000000 --- a/lustre/obdclass/llog_internal.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __LLOG_INTERNAL_H__ -#define __LLOG_INTERNAL_H__ - -int llog_put_cat_list(struct obd_device *obd, struct obd_device *disk_obd, - char *name, int count, struct llog_catid *idarray); -int llog_cat_id2handle(struct llog_handle *cathandle, struct llog_handle **res, - struct llog_logid *logid); -int class_config_dump_handler(struct llog_handle * handle, - struct llog_rec_hdr *rec, void *data); -#endif diff --git a/lustre/obdclass/llog_ioctl.c b/lustre/obdclass/llog_ioctl.c deleted file mode 100644 index bc8afc60e9..0000000000 --- a/lustre/obdclass/llog_ioctl.c +++ /dev/null @@ -1,452 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2005 Cluster File Systems, Inc. - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - */ - -#define DEBUG_SUBSYSTEM S_LOG - -#ifndef EXPORT_SYMTAB -#define EXPORT_SYMTAB -#endif - -#include <obd_class.h> -#include <lustre_log.h> -#include <libcfs/list.h> -#include "llog_internal.h" - -static int str2logid(struct llog_logid *logid, char *str, int len) -{ - char *start, *end, *endp; - - ENTRY; - start = str; - if (*start != '#') - RETURN(-EINVAL); - - start++; - if (start - str >= len - 1) - RETURN(-EINVAL); - end = strchr(start, '#'); - if (end == NULL || end == start) - RETURN(-EINVAL); - - *end = '\0'; - logid->lgl_oid = simple_strtoull(start, &endp, 0); - if (endp != end) - RETURN(-EINVAL); - - start = ++end; - if (start - str >= len - 1) - RETURN(-EINVAL); - end = strchr(start, '#'); - if (end == NULL || end == start) - RETURN(-EINVAL); - - *end = '\0'; - logid->lgl_ogr = simple_strtoull(start, &endp, 0); - if (endp != end) - RETURN(-EINVAL); - - start = ++end; - if (start - str >= len - 1) - RETURN(-EINVAL); - logid->lgl_ogen = simple_strtoul(start, &endp, 16); - if (*endp != '\0') - RETURN(-EINVAL); - - RETURN(0); -} - -static int llog_check_cb(struct llog_handle *handle, struct llog_rec_hdr *rec, - void *data) -{ - struct obd_ioctl_data *ioc_data = (struct obd_ioctl_data *)data; - static int l, remains, from, to; - static char *out; - char *endp; - int cur_index, rc = 0; - - ENTRY; - cur_index = rec->lrh_index; - - if (ioc_data && (ioc_data->ioc_inllen1)) { - l = 0; - remains = ioc_data->ioc_inllen4 + - size_round(ioc_data->ioc_inllen1) + - size_round(ioc_data->ioc_inllen2) + - size_round(ioc_data->ioc_inllen3); - from = simple_strtol(ioc_data->ioc_inlbuf2, &endp, 0); - if (*endp != '\0') - RETURN(-EINVAL); - to = simple_strtol(ioc_data->ioc_inlbuf3, &endp, 0); - if (*endp != '\0') - RETURN(-EINVAL); - ioc_data->ioc_inllen1 = 0; - out = ioc_data->ioc_bulk; - if (cur_index < from) - RETURN(0); - if (to > 0 && cur_index > to) - RETURN(-LLOG_EEMPTY); - } - if (handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) { - struct llog_logid_rec *lir = (struct llog_logid_rec *)rec; - struct llog_handle *log_handle; - - if (rec->lrh_type != LLOG_LOGID_MAGIC) { - l = snprintf(out, remains, "[index]: %05d [type]: " - "%02x [len]: %04d failed\n", - cur_index, rec->lrh_type, - rec->lrh_len); - } - if (handle->lgh_ctxt == NULL) - RETURN(-EOPNOTSUPP); - rc = llog_cat_id2handle(handle, &log_handle, &lir->lid_id); - if (rc) { - CDEBUG(D_IOCTL, - "cannot find log #"LPX64"#"LPX64"#%08x\n", - lir->lid_id.lgl_oid, lir->lid_id.lgl_ogr, - lir->lid_id.lgl_ogen); - RETURN(rc); - } - rc = llog_process(log_handle, llog_check_cb, NULL, NULL); - llog_close(log_handle); - } else { - switch (rec->lrh_type) { - case OST_SZ_REC: - case OST_RAID1_REC: - case MDS_UNLINK_REC: - case MDS_SETATTR_REC: - case OBD_CFG_REC: - case LLOG_HDR_MAGIC: { - l = snprintf(out, remains, "[index]: %05d [type]: " - "%02x [len]: %04d ok\n", - cur_index, rec->lrh_type, - rec->lrh_len); - out += l; - remains -= l; - if (remains <= 0) { - CERROR("no space to print log records\n"); - RETURN(-LLOG_EEMPTY); - } - RETURN(0); - } - default: { - l = snprintf(out, remains, "[index]: %05d [type]: " - "%02x [len]: %04d failed\n", - cur_index, rec->lrh_type, - rec->lrh_len); - out += l; - remains -= l; - if (remains <= 0) { - CERROR("no space to print log records\n"); - RETURN(-LLOG_EEMPTY); - } - RETURN(0); - } - } - } - RETURN(rc); -} - -static int llog_print_cb(struct llog_handle *handle, struct llog_rec_hdr *rec, - void *data) -{ - struct obd_ioctl_data *ioc_data = (struct obd_ioctl_data *)data; - static int l, remains, from, to; - static char *out; - char *endp; - int cur_index; - - ENTRY; - if (ioc_data->ioc_inllen1) { - l = 0; - remains = ioc_data->ioc_inllen4 + - size_round(ioc_data->ioc_inllen1) + - size_round(ioc_data->ioc_inllen2) + - size_round(ioc_data->ioc_inllen3); - from = simple_strtol(ioc_data->ioc_inlbuf2, &endp, 0); - if (*endp != '\0') - RETURN(-EINVAL); - to = simple_strtol(ioc_data->ioc_inlbuf3, &endp, 0); - if (*endp != '\0') - RETURN(-EINVAL); - out = ioc_data->ioc_bulk; - ioc_data->ioc_inllen1 = 0; - } - - cur_index = rec->lrh_index; - if (cur_index < from) - RETURN(0); - if (to > 0 && cur_index > to) - RETURN(-LLOG_EEMPTY); - - if (handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) { - struct llog_logid_rec *lir = (struct llog_logid_rec *)rec; - if (rec->lrh_type != LLOG_LOGID_MAGIC) { - CERROR("invalid record in catalog\n"); - RETURN(-EINVAL); - } - - l = snprintf(out, remains, - "[index]: %05d [logid]: #"LPX64"#"LPX64"#%08x\n", - cur_index, lir->lid_id.lgl_oid, - lir->lid_id.lgl_ogr, lir->lid_id.lgl_ogen); - } else { - l = snprintf(out, remains, - "[index]: %05d [type]: %02x [len]: %04d\n", - cur_index, rec->lrh_type, - rec->lrh_len); - } - out += l; - remains -= l; - if (remains <= 0) { - CERROR("not enough space for print log records\n"); - RETURN(-LLOG_EEMPTY); - } - - RETURN(0); -} -static int llog_remove_log(struct llog_handle *cat, struct llog_logid *logid) -{ - struct llog_handle *log; - int rc, index = 0; - - ENTRY; - down_write(&cat->lgh_lock); - rc = llog_cat_id2handle(cat, &log, logid); - if (rc) { - CDEBUG(D_IOCTL, "cannot find log #"LPX64"#"LPX64"#%08x\n", - logid->lgl_oid, logid->lgl_ogr, logid->lgl_ogen); - GOTO(out, rc = -ENOENT); - } - - index = log->u.phd.phd_cookie.lgc_index; - LASSERT(index); - rc = llog_destroy(log); - if (rc) { - CDEBUG(D_IOCTL, "cannot destroy log\n"); - GOTO(out, rc); - } - llog_cat_set_first_idx(cat, index); - rc = llog_cancel_rec(cat, index); -out: - llog_free_handle(log); - up_write(&cat->lgh_lock); - RETURN(rc); - -} - -static int llog_delete_cb(struct llog_handle *handle, struct llog_rec_hdr *rec, - void *data) -{ - struct llog_logid_rec *lir = (struct llog_logid_rec*)rec; - int rc; - - ENTRY; - if (rec->lrh_type != LLOG_LOGID_MAGIC) - RETURN (-EINVAL); - rc = llog_remove_log(handle, &lir->lid_id); - - RETURN(rc); -} - - -int llog_ioctl(struct llog_ctxt *ctxt, int cmd, struct obd_ioctl_data *data) -{ - struct llog_logid logid; - int err = 0; - struct llog_handle *handle = NULL; - - ENTRY; - if (*data->ioc_inlbuf1 == '#') { - err = str2logid(&logid, data->ioc_inlbuf1, data->ioc_inllen1); - if (err) - GOTO(out, err); - err = llog_create(ctxt, &handle, &logid, NULL); - if (err) - GOTO(out, err); - } else if (*data->ioc_inlbuf1 == '$') { - char *name = data->ioc_inlbuf1 + 1; - err = llog_create(ctxt, &handle, NULL, name); - if (err) - GOTO(out, err); - } else { - GOTO(out, err = -EINVAL); - } - - err = llog_init_handle(handle, 0, NULL); - if (err) - GOTO(out_close, err = -ENOENT); - - switch (cmd) { - case OBD_IOC_LLOG_INFO: { - int l; - int remains = data->ioc_inllen2 + - size_round(data->ioc_inllen1); - char *out = data->ioc_bulk; - - l = snprintf(out, remains, - "logid: #"LPX64"#"LPX64"#%08x\n" - "flags: %x (%s)\n" - "records count: %d\n" - "last index: %d\n", - handle->lgh_id.lgl_oid, handle->lgh_id.lgl_ogr, - handle->lgh_id.lgl_ogen, - handle->lgh_hdr->llh_flags, - handle->lgh_hdr->llh_flags & - LLOG_F_IS_CAT ? "cat" : "plain", - handle->lgh_hdr->llh_count, - handle->lgh_last_idx); - out += l; - remains -= l; - if (remains <= 0) - CERROR("not enough space for log header info\n"); - - GOTO(out_close, err); - } - case OBD_IOC_LLOG_CHECK: { - LASSERT(data->ioc_inllen1); - err = llog_process(handle, llog_check_cb, data, NULL); - if (err == -LLOG_EEMPTY) - err = 0; - GOTO(out_close, err); - } - - case OBD_IOC_LLOG_PRINT: { - LASSERT(data->ioc_inllen1); - err = llog_process(handle, class_config_dump_handler,data,NULL); - if (err == -LLOG_EEMPTY) - err = 0; - else - err = llog_process(handle, llog_print_cb, data, NULL); - - GOTO(out_close, err); - } - case OBD_IOC_LLOG_CANCEL: { - struct llog_cookie cookie; - struct llog_logid plain; - char *endp; - - cookie.lgc_index = simple_strtoul(data->ioc_inlbuf3, &endp, 0); - if (*endp != '\0') - GOTO(out_close, err = -EINVAL); - - if (handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) { - down_write(&handle->lgh_lock); - err = llog_cancel_rec(handle, cookie.lgc_index); - up_write(&handle->lgh_lock); - GOTO(out_close, err); - } - - err = str2logid(&plain, data->ioc_inlbuf2, data->ioc_inllen2); - if (err) - GOTO(out_close, err); - cookie.lgc_lgl = plain; - - if (!(handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT)) - GOTO(out_close, err = -EINVAL); - - err = llog_cat_cancel_records(handle, 1, &cookie); - GOTO(out_close, err); - } - case OBD_IOC_LLOG_REMOVE: { - struct llog_logid plain; - - if (handle->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN) { - err = llog_destroy(handle); - if (!err) - llog_free_handle(handle); - GOTO(out, err); - } - - if (!(handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT)) - GOTO(out_close, err = -EINVAL); - - if (data->ioc_inlbuf2) { - /*remove indicate log from the catalog*/ - err = str2logid(&plain, data->ioc_inlbuf2, - data->ioc_inllen2); - if (err) - GOTO(out_close, err); - err = llog_remove_log(handle, &plain); - } else { - /*remove all the log of the catalog*/ - llog_process(handle, llog_delete_cb, NULL, NULL); - } - GOTO(out_close, err); - } - } - -out_close: - if (handle->lgh_hdr && - handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) - llog_cat_put(handle); - else - llog_close(handle); -out: - RETURN(err); -} -EXPORT_SYMBOL(llog_ioctl); - -int llog_catalog_list(struct obd_device *obd, int count, - struct obd_ioctl_data *data) -{ - int size, i; - struct llog_catid *idarray; - struct llog_logid *id; - char name[32] = CATLIST; - char *out; - int l, remains, rc = 0; - - ENTRY; - size = sizeof(*idarray) * count; - - OBD_ALLOC(idarray, size); - if (!idarray) - RETURN(-ENOMEM); - memset(idarray, 0, size); - - rc = llog_get_cat_list(obd, obd, name, count, idarray); - if (rc) { - OBD_FREE(idarray, size); - RETURN(rc); - } - - out = data->ioc_bulk; - remains = data->ioc_inllen1; - for (i = 0; i < count; i++) { - id = &idarray[i].lci_logid; - l = snprintf(out, remains, - "catalog log: #"LPX64"#"LPX64"#%08x\n", - id->lgl_oid, id->lgl_ogr, id->lgl_ogen); - out += l; - remains -= l; - if (remains <= 0) { - CWARN("not enough memory for catlog list\n"); - break; - } - } - OBD_FREE(idarray, size); - RETURN(0); - -} -EXPORT_SYMBOL(llog_catalog_list); diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c deleted file mode 100644 index 6204fac228..0000000000 --- a/lustre/obdclass/llog_lvfs.c +++ /dev/null @@ -1,926 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001-2003 Cluster File Systems, Inc. - * Author: Andreas Dilger <adilger@clusterfs.com> - * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. - * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. - * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. - * - * OST<->MDS recovery logging infrastructure. - * - * Invariants in implementation: - * - we do not share logs among different OST<->MDS connections, so that - * if an OST or MDS fails it need only look at log(s) relevant to itself - */ - -#define DEBUG_SUBSYSTEM S_LOG - -#ifndef EXPORT_SYMTAB -#define EXPORT_SYMTAB -#endif - -#ifndef __KERNEL__ -#include <liblustre.h> -#endif - -#include <obd.h> -#include <obd_class.h> -#include <lustre_log.h> -#include <obd_ost.h> -#include <libcfs/list.h> -#include <lvfs.h> -#include <lustre_fsfilt.h> -#include <lustre_disk.h> -#include "llog_internal.h" - -#if defined(__KERNEL__) && defined(LLOG_LVFS) - -static int llog_lvfs_pad(struct obd_device *obd, struct l_file *file, - int len, int index) -{ - struct llog_rec_hdr rec = { 0 }; - struct llog_rec_tail tail; - int rc; - ENTRY; - - LASSERT(len >= LLOG_MIN_REC_SIZE && (len & 0x7) == 0); - - tail.lrt_len = rec.lrh_len = len; - tail.lrt_index = rec.lrh_index = index; - rec.lrh_type = LLOG_PAD_MAGIC; - - rc = fsfilt_write_record(obd, file, &rec, sizeof(rec), &file->f_pos, 0); - if (rc) { - CERROR("error writing padding record: rc %d\n", rc); - goto out; - } - - file->f_pos += len - sizeof(rec) - sizeof(tail); - rc = fsfilt_write_record(obd, file, &tail, sizeof(tail),&file->f_pos,0); - if (rc) { - CERROR("error writing padding record: rc %d\n", rc); - goto out; - } - - out: - RETURN(rc); -} - -static int llog_lvfs_write_blob(struct obd_device *obd, struct l_file *file, - struct llog_rec_hdr *rec, void *buf, loff_t off) -{ - int rc; - struct llog_rec_tail end; - loff_t saved_off = file->f_pos; - int buflen = rec->lrh_len; - ENTRY; - - file->f_pos = off; - - if (buflen == 0) - CWARN("0-length record\n"); - - if (!buf) { - rc = fsfilt_write_record(obd, file, rec, buflen,&file->f_pos,0); - if (rc) { - CERROR("error writing log record: rc %d\n", rc); - goto out; - } - GOTO(out, rc = 0); - } - - /* the buf case */ - rec->lrh_len = sizeof(*rec) + buflen + sizeof(end); - rc = fsfilt_write_record(obd, file, rec, sizeof(*rec), &file->f_pos, 0); - if (rc) { - CERROR("error writing log hdr: rc %d\n", rc); - goto out; - } - - rc = fsfilt_write_record(obd, file, buf, buflen, &file->f_pos, 0); - if (rc) { - CERROR("error writing log buffer: rc %d\n", rc); - goto out; - } - - end.lrt_len = rec->lrh_len; - end.lrt_index = rec->lrh_index; - rc = fsfilt_write_record(obd, file, &end, sizeof(end), &file->f_pos, 0); - if (rc) { - CERROR("error writing log tail: rc %d\n", rc); - goto out; - } - - rc = 0; - out: - if (saved_off > file->f_pos) - file->f_pos = saved_off; - LASSERT(rc <= 0); - RETURN(rc); -} - -static int llog_lvfs_read_blob(struct obd_device *obd, struct l_file *file, - void *buf, int size, loff_t off) -{ - loff_t offset = off; - int rc; - ENTRY; - - rc = fsfilt_read_record(obd, file, buf, size, &offset); - if (rc) { - CERROR("error reading log record: rc %d\n", rc); - RETURN(rc); - } - RETURN(0); -} - -static int llog_lvfs_read_header(struct llog_handle *handle) -{ - struct obd_device *obd; - int rc; - ENTRY; - - LASSERT(sizeof(*handle->lgh_hdr) == LLOG_CHUNK_SIZE); - - obd = handle->lgh_ctxt->loc_exp->exp_obd; - - if (i_size_read(handle->lgh_file->f_dentry->d_inode) == 0) { - CDEBUG(D_RPCTRACE, "not reading header from 0-byte log\n"); - RETURN(LLOG_EEMPTY); - } - - rc = llog_lvfs_read_blob(obd, handle->lgh_file, handle->lgh_hdr, - LLOG_CHUNK_SIZE, 0); - if (rc) { - CERROR("error reading log header from %.*s\n", - handle->lgh_file->f_dentry->d_name.len, - handle->lgh_file->f_dentry->d_name.name); - } else { - struct llog_rec_hdr *llh_hdr = &handle->lgh_hdr->llh_hdr; - - if (LLOG_REC_HDR_NEEDS_SWABBING(llh_hdr)) - lustre_swab_llog_hdr(handle->lgh_hdr); - - if (llh_hdr->lrh_type != LLOG_HDR_MAGIC) { - CERROR("bad log %.*s header magic: %#x (expected %#x)\n", - handle->lgh_file->f_dentry->d_name.len, - handle->lgh_file->f_dentry->d_name.name, - llh_hdr->lrh_type, LLOG_HDR_MAGIC); - rc = -EIO; - } else if (llh_hdr->lrh_len != LLOG_CHUNK_SIZE) { - CERROR("incorrectly sized log %.*s header: %#x " - "(expected %#x)\n", - handle->lgh_file->f_dentry->d_name.len, - handle->lgh_file->f_dentry->d_name.name, - llh_hdr->lrh_len, LLOG_CHUNK_SIZE); - CERROR("you may need to re-run lconf --write_conf.\n"); - rc = -EIO; - } - } - - handle->lgh_last_idx = handle->lgh_hdr->llh_tail.lrt_index; - handle->lgh_file->f_pos = i_size_read(handle->lgh_file->f_dentry->d_inode); - - RETURN(rc); -} - -/* returns negative in on error; 0 if success && reccookie == 0; 1 otherwise */ -/* appends if idx == -1, otherwise overwrites record idx. */ -static int llog_lvfs_write_rec(struct llog_handle *loghandle, - struct llog_rec_hdr *rec, - struct llog_cookie *reccookie, int cookiecount, - void *buf, int idx) -{ - struct llog_log_hdr *llh; - int reclen = rec->lrh_len, index, rc; - struct llog_rec_tail *lrt; - struct obd_device *obd; - struct file *file; - size_t left; - ENTRY; - - llh = loghandle->lgh_hdr; - file = loghandle->lgh_file; - obd = loghandle->lgh_ctxt->loc_exp->exp_obd; - - /* record length should not bigger than LLOG_CHUNK_SIZE */ - if (buf) - rc = (reclen > LLOG_CHUNK_SIZE - sizeof(struct llog_rec_hdr) - - sizeof(struct llog_rec_tail)) ? -E2BIG : 0; - else - rc = (reclen > LLOG_CHUNK_SIZE) ? -E2BIG : 0; - if (rc) - RETURN(rc); - - if (buf) - /* write_blob adds header and tail to lrh_len. */ - reclen = sizeof(*rec) + rec->lrh_len + - sizeof(struct llog_rec_tail); - - if (idx != -1) { - loff_t saved_offset; - - /* no header: only allowed to insert record 1 */ - if (idx != 1 && !i_size_read(file->f_dentry->d_inode)) { - CERROR("idx != -1 in empty log\n"); - LBUG(); - } - - if (idx && llh->llh_size && llh->llh_size != rec->lrh_len) - RETURN(-EINVAL); - - if (!ext2_test_bit(idx, llh->llh_bitmap)) - CERROR("Modify unset record %u\n", idx); - if (idx != rec->lrh_index) - CERROR("Index mismatch %d %u\n", idx, rec->lrh_index); - - rc = llog_lvfs_write_blob(obd, file, &llh->llh_hdr, NULL, 0); - /* we are done if we only write the header or on error */ - if (rc || idx == 0) - RETURN(rc); - - /* Assumes constant lrh_len */ - saved_offset = sizeof(*llh) + (idx - 1) * reclen; - - if (buf) { - struct llog_rec_hdr check; - - /* We assume that caller has set lgh_cur_* */ - saved_offset = loghandle->lgh_cur_offset; - CDEBUG(D_OTHER, - "modify record "LPX64": idx:%d/%u/%d, len:%u " - "offset %llu\n", - loghandle->lgh_id.lgl_oid, idx, rec->lrh_index, - loghandle->lgh_cur_idx, rec->lrh_len, - (long long)(saved_offset - sizeof(*llh))); - if (rec->lrh_index != loghandle->lgh_cur_idx) { - CERROR("modify idx mismatch %u/%d\n", - idx, loghandle->lgh_cur_idx); - RETURN(-EFAULT); - } -#if 1 /* FIXME remove this safety check at some point */ - /* Verify that the record we're modifying is the - right one. */ - rc = llog_lvfs_read_blob(obd, file, &check, - sizeof(check), saved_offset); - if (check.lrh_index != idx || check.lrh_len != reclen) { - CERROR("Bad modify idx %u/%u size %u/%u (%d)\n", - idx, check.lrh_index, reclen, - check.lrh_len, rc); - RETURN(-EFAULT); - } -#endif - } - - rc = llog_lvfs_write_blob(obd, file, rec, buf, saved_offset); - if (rc == 0 && reccookie) { - reccookie->lgc_lgl = loghandle->lgh_id; - reccookie->lgc_index = idx; - rc = 1; - } - RETURN(rc); - } - - /* Make sure that records don't cross a chunk boundary, so we can - * process them page-at-a-time if needed. If it will cross a chunk - * boundary, write in a fake (but referenced) entry to pad the chunk. - * - * We know that llog_current_log() will return a loghandle that is - * big enough to hold reclen, so all we care about is padding here. - */ - left = LLOG_CHUNK_SIZE - (file->f_pos & (LLOG_CHUNK_SIZE - 1)); - - /* NOTE: padding is a record, but no bit is set */ - if (left != 0 && left != reclen && - left < (reclen + LLOG_MIN_REC_SIZE)) { - loghandle->lgh_last_idx++; - rc = llog_lvfs_pad(obd, file, left, loghandle->lgh_last_idx); - if (rc) - RETURN(rc); - /* if it's the last idx in log file, then return -ENOSPC */ - if (loghandle->lgh_last_idx == LLOG_BITMAP_SIZE(llh) - 1) - RETURN(-ENOSPC); - } - - loghandle->lgh_last_idx++; - index = loghandle->lgh_last_idx; - LASSERT(index < LLOG_BITMAP_SIZE(llh)); - rec->lrh_index = index; - if (buf == NULL) { - lrt = (struct llog_rec_tail *) - ((char *)rec + rec->lrh_len - sizeof(*lrt)); - lrt->lrt_len = rec->lrh_len; - lrt->lrt_index = rec->lrh_index; - } - if (ext2_set_bit(index, llh->llh_bitmap)) { - CERROR("argh, index %u already set in log bitmap?\n", index); - LBUG(); /* should never happen */ - } - llh->llh_count++; - llh->llh_tail.lrt_index = index; - - rc = llog_lvfs_write_blob(obd, file, &llh->llh_hdr, NULL, 0); - if (rc) - RETURN(rc); - - rc = llog_lvfs_write_blob(obd, file, rec, buf, file->f_pos); - if (rc) - RETURN(rc); - - CDEBUG(D_RPCTRACE, "added record "LPX64": idx: %u, %u bytes\n", - loghandle->lgh_id.lgl_oid, index, rec->lrh_len); - if (rc == 0 && reccookie) { - reccookie->lgc_lgl = loghandle->lgh_id; - reccookie->lgc_index = index; - if ((rec->lrh_type == MDS_UNLINK_REC) || - (rec->lrh_type == MDS_SETATTR_REC)) - reccookie->lgc_subsys = LLOG_MDS_OST_ORIG_CTXT; - else if (rec->lrh_type == OST_SZ_REC) - reccookie->lgc_subsys = LLOG_SIZE_ORIG_CTXT; - else if (rec->lrh_type == OST_RAID1_REC) - reccookie->lgc_subsys = LLOG_RD1_ORIG_CTXT; - else - reccookie->lgc_subsys = -1; - rc = 1; - } - if (rc == 0 && rec->lrh_type == LLOG_GEN_REC) - rc = 1; - - RETURN(rc); -} - -/* We can skip reading at least as many log blocks as the number of -* minimum sized log records we are skipping. If it turns out -* that we are not far enough along the log (because the -* actual records are larger than minimum size) we just skip -* some more records. */ - -static void llog_skip_over(__u64 *off, int curr, int goal) -{ - if (goal <= curr) - return; - *off = (*off + (goal-curr-1) * LLOG_MIN_REC_SIZE) & - ~(LLOG_CHUNK_SIZE - 1); -} - - -/* sets: - * - cur_offset to the furthest point read in the log file - * - cur_idx to the log index preceeding cur_offset - * returns -EIO/-EINVAL on error - */ -static int llog_lvfs_next_block(struct llog_handle *loghandle, int *cur_idx, - int next_idx, __u64 *cur_offset, void *buf, - int len) -{ - int rc; - ENTRY; - - if (len == 0 || len & (LLOG_CHUNK_SIZE - 1)) - RETURN(-EINVAL); - - CDEBUG(D_OTHER, "looking for log index %u (cur idx %u off "LPU64")\n", - next_idx, *cur_idx, *cur_offset); - - while (*cur_offset < i_size_read(loghandle->lgh_file->f_dentry->d_inode)) { - struct llog_rec_hdr *rec; - struct llog_rec_tail *tail; - loff_t ppos; - - llog_skip_over(cur_offset, *cur_idx, next_idx); - - ppos = *cur_offset; - rc = fsfilt_read_record(loghandle->lgh_ctxt->loc_exp->exp_obd, - loghandle->lgh_file, buf, len, - &ppos); - if (rc) { - CERROR("Cant read llog block at log id "LPU64 - "/%u offset "LPU64"\n", - loghandle->lgh_id.lgl_oid, - loghandle->lgh_id.lgl_ogen, - *cur_offset); - RETURN(rc); - } - - /* put number of bytes read into rc to make code simpler */ - rc = ppos - *cur_offset; - *cur_offset = ppos; - - if (rc < len) { - /* signal the end of the valid buffer to llog_process */ - memset(buf + rc, 0, len - rc); - } - - if (rc == 0) /* end of file, nothing to do */ - RETURN(0); - - if (rc < sizeof(*tail)) { - CERROR("Invalid llog block at log id "LPU64"/%u offset " - LPU64"\n", loghandle->lgh_id.lgl_oid, - loghandle->lgh_id.lgl_ogen, *cur_offset); - RETURN(-EINVAL); - } - - rec = buf; - tail = (struct llog_rec_tail *)((char *)buf + rc - - sizeof(struct llog_rec_tail)); - - if (LLOG_REC_HDR_NEEDS_SWABBING(rec)) { - lustre_swab_llog_rec(rec, tail); - } - - *cur_idx = tail->lrt_index; - - /* this shouldn't happen */ - if (tail->